From: Stefan Haberland Date: Sun, 30 Oct 2011 14:16:56 +0000 (+0100) Subject: [S390] dasd: wait for terminated request X-Git-Tag: firefly_0821_release~3680^2~4253^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=214b8ffc205bcf2ca5b04b3903be13a9257c3fbd;p=firefly-linux-kernel-4.4.55.git [S390] dasd: wait for terminated request After terminating a request in the dasd_sleep_on_immediatly function, wait for the clear interrupt to be received before starting the new request. This prevents the requests from getting mixed up. Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 46054c75cf31..3b94b6542fc0 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -2261,7 +2261,11 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) cqr->callback = dasd_wakeup_cb; cqr->callback_data = DASD_SLEEPON_START_TAG; cqr->status = DASD_CQR_QUEUED; - list_add(&cqr->devlist, &device->ccw_queue); + /* + * add new request as second + * first the terminated cqr needs to be finished + */ + list_add(&cqr->devlist, device->ccw_queue.next); /* let the bh start the request to keep them in order */ dasd_schedule_device_bh(device);