s390: chp: handle CRW_ERC_INIT for channel-path status change
authorDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Thu, 6 Jul 2017 02:00:45 +0000 (04:00 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 13 Jul 2017 09:28:29 +0000 (11:28 +0200)
When channel path is identified as the report source code (RSC)
of a CRW, and initialized (CRW_ERC_INIT) is recognized as the
error recovery code (ERC) by the channel subsystem, it indicates
a "path has come" event.

Let's handle this case in chp_process_crw().

Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/chp.c

index 7e0d4f724ddae73c71f698a9e4f7775328ef4d93..432fc40990bd26ad2e0dd9e39897ba5c348b197f 100644 (file)
@@ -559,6 +559,7 @@ static void chp_process_crw(struct crw *crw0, struct crw *crw1,
        chpid.id = crw0->rsid;
        switch (crw0->erc) {
        case CRW_ERC_IPARM: /* Path has come. */
+       case CRW_ERC_INIT:
                if (!chp_is_registered(chpid))
                        chp_new(chpid);
                chsc_chp_online(chpid);