Messages in this thread Patch in this message | | | Date | Mon, 5 Jul 2004 16:59:28 +0200 | From | Martin Schwidefsky <> | Subject | [PATCH] s390: common i/o layer. |
| |
[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>
diffstat: drivers/s390/cio/device_fsm.c | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-)
diff -urN linux-2.6/drivers/s390/cio/device_fsm.c linux-2.6-s390/drivers/s390/cio/device_fsm.c --- linux-2.6/drivers/s390/cio/device_fsm.c Mon Jul 5 16:12:27 2004 +++ linux-2.6-s390/drivers/s390/cio/device_fsm.c Mon Jul 5 16:12:48 2004 @@ -165,8 +165,6 @@ return; } cdev->private->flags.donotify = 1; - /* Get device online again. */ - ccw_device_online(cdev); } /* @@ -233,15 +231,23 @@ 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 @@ 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); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |