diff options
| author | Matthew Dharm <mdharm-scsi@one-eyed-alien.net> | 2003-09-01 03:37:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-09-01 03:37:10 -0700 |
| commit | 613d15646d479701c95b1b33b8b005c675b08ee0 (patch) | |
| tree | d6e84de74a884d5dbacb4387c227c1336472ebf3 /kernel | |
| parent | 471503720b111665cd8a5449d272a98c5001f0f7 (diff) | |
[PATCH] sr.c should issue TEST_UNIT_READY
The linux/drivers/scsi/sr.c code will issue a MODE_SENSE[_10] command to
a device as the first command sent to the device. If the device has
just come out of reset, it will likely respond with a UNIT_ATTENTION /
NOT_READY status, which causes the MODE_SENSE to fail. In fact, the
device may have several UNIT_ATTENTION conditions queued up (power-up
reset, media change, etc.)
This results in the mode page 0x2a data not being properly read and
interpreted. As an end-effect, things like packet-writing don't work
(because the writeable bit is not set).
The solution to this is to issue one or more TEST_UNIT_READY commands to
the device to clear any pending UNIT_ATTENTION conditions. This is the
technique used by sd.c -- in fact, this code was lifted directly from
sd.c
At some point in the future, abstraction of this initial TEST_UNIT_READY
code between all high-level SCSI drivers may be apropriate. For now,
this patch makes sr.c issue TEST_UNIT_READY to clear the UNIT_ATTENTION,
thus allowing the mode page 0x2a code to work properly. Given the
approaching 2.6.0-final release, I urge that this patch be accepted.
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
