Commit 17f0cb1f authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[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: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 51370f4e
......@@ -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 */
}
/* 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,9 +262,6 @@ 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);
if (state != DEV_STATE_NOT_OPER)
wake_up(&cdev->private->wait_q);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment