Skip to content

Commit

Permalink
[S390] dasd: wait for terminated request
Browse files Browse the repository at this point in the history
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 <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Stefan Haberland authored and Martin Schwidefsky committed Oct 30, 2011
1 parent 3948a10 commit 214b8ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 214b8ff

Please sign in to comment.