summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2004-07-06 09:17:53 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-06 09:17:53 -0700
commit17f0cb1f106fd62855ab0e077a6e169d549ca110 (patch)
treeb9b9ce01ef4a8986697100f5825aee0750e2d677
parent51370f4e16aafaad07f01f9c25065c05c4b0ea92 (diff)
[PATCH] s390: common i/o layer
From: Arnd Bergmann <arndb@de.ibm.com> Common i/o layer changes: - Reorder checking and setting of the ccw device id. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/s390/cio/device_fsm.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index fe10f20da40a..35e584c45400 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -165,8 +165,6 @@ ccw_device_handle_oper(struct ccw_device *cdev)
return;
}
cdev->private->flags.donotify = 1;
- /* Get device online again. */
- ccw_device_online(cdev);
}
/*
@@ -233,15 +231,23 @@ ccw_device_recog_done(struct ccw_device *cdev, int state)
cdev->private->devno, sch->irq);
break;
case DEV_STATE_OFFLINE:
- if (cdev->private->state == DEV_STATE_DISCONNECTED_SENSE_ID)
+ if (cdev->private->state == DEV_STATE_DISCONNECTED_SENSE_ID) {
+ ccw_device_handle_oper(cdev);
notify = 1;
- else /* fill out sense information */
- cdev->id = (struct ccw_device_id) {
- .cu_type = cdev->private->senseid.cu_type,
- .cu_model = cdev->private->senseid.cu_model,
- .dev_type = cdev->private->senseid.dev_type,
- .dev_model = cdev->private->senseid.dev_model,
- };
+ }
+ /* fill out sense information */
+ cdev->id = (struct ccw_device_id) {
+ .cu_type = cdev->private->senseid.cu_type,
+ .cu_model = cdev->private->senseid.cu_model,
+ .dev_type = cdev->private->senseid.dev_type,
+ .dev_model = cdev->private->senseid.dev_model,
+ };
+ if (notify) {
+ /* Get device online again. */
+ ccw_device_online(cdev);
+ wake_up(&cdev->private->wait_q);
+ return;
+ }
/* Issue device info message. */
CIO_DEBUG(KERN_INFO, 2, "SenseID : device %04x reports: "
"CU Type/Mod = %04X/%02X, Dev Type/Mod = "
@@ -256,10 +262,7 @@ ccw_device_recog_done(struct ccw_device *cdev, int state)
break;
}
cdev->private->state = state;
- if (notify && state == DEV_STATE_OFFLINE)
- ccw_device_handle_oper(cdev);
- else
- io_subchannel_recog_done(cdev);
+ io_subchannel_recog_done(cdev);
if (state != DEV_STATE_NOT_OPER)
wake_up(&cdev->private->wait_q);
}