diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2010-11-10 04:05:53 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-11-10 04:05:54 -0500 |
commit | 16d2ce271c6b8b3527ed1461d03b5f373d53f78f (patch) | |
tree | 9e2fbffaf696bfa681a822ac27061bee35476fd7 /drivers | |
parent | 3b210e7652a0ac638b1a267b6a181c8f742d8462 (diff) |
[S390] cio: fix incorrect ccw_device_init_count
If device recognition is interrupted by a subchannel event
indicating that the device is gone, ccw_device_init_count
is not correctly decreased.
Fix this by reporting the corresponding event to the device
recognition callback via the state machine.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/cio/device.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 2ff8a22d4257..e8391b89eff4 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -1455,7 +1455,16 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process) | |||
1455 | break; | 1455 | break; |
1456 | case IO_SCH_UNREG_ATTACH: | 1456 | case IO_SCH_UNREG_ATTACH: |
1457 | case IO_SCH_UNREG: | 1457 | case IO_SCH_UNREG: |
1458 | if (cdev) | 1458 | if (!cdev) |
1459 | break; | ||
1460 | if (cdev->private->state == DEV_STATE_SENSE_ID) { | ||
1461 | /* | ||
1462 | * Note: delayed work triggered by this event | ||
1463 | * and repeated calls to sch_event are synchronized | ||
1464 | * by the above check for work_pending(cdev). | ||
1465 | */ | ||
1466 | dev_fsm_event(cdev, DEV_EVENT_NOTOPER); | ||
1467 | } else | ||
1459 | ccw_device_set_notoper(cdev); | 1468 | ccw_device_set_notoper(cdev); |
1460 | break; | 1469 | break; |
1461 | case IO_SCH_NOP: | 1470 | case IO_SCH_NOP: |