]> git.baikalelectronics.ru Git - kernel.git/commit
cciss: fix SCSI device reset handler
authorStephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Tue, 2 Jun 2009 12:48:11 +0000 (14:48 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 2 Jun 2009 12:48:11 +0000 (14:48 +0200)
commitee15d04d19939e863931009d34af7c3fe62b9437
tree679356d2253914ae93132c3d0116111e63284cba
parent5531f8e323b85cded9ecd7beddf4c408033596f7
cciss: fix SCSI device reset handler

Fix the SCSI reset error handler to send a working, properly addressed
reset message to the target device and add code to wait for the target
device to become ready by polling it with Test Unit Ready.

The existing reset code was broken in that it didn't bother to set the
8-byte LUN address to anything besides zero, so the command was addressed
to the controller, which pretended to the driver that the command
succeeded, while doing nothing.  Ages ago I tested this code, but
unbeknownst to me, my test was flawed, and what I thought was a tape drive
getting reset was actually nothing of the sort.  Unfortunately, there is
still lots of Smartarray firmware that doesn't handle doing target resets
right, and this code won't help in those cases, but it also shouldn't make
things worse in those cases than they already are.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net>
Cc: Mike Miller <mikem@beardog.cca.cpqcorp.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/cciss.c
drivers/block/cciss_scsi.c