diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-09 11:18:42 +0100 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-12-16 17:53:39 +0100 |
commit | 638428ece619495edc9579b1e21493eb00f9687c (patch) | |
tree | 08fec48e5218977d0d2db5b0a0a205c76b38f07e /drivers/scsi/sd.c | |
parent | 2d9217296bfa6fdc0d3707264076e5296faffdbd (diff) |
scsi: fix TUR error handling in sr_media_change()
sr_test_unit_ready() returns 0 iff TUR succeeded - IOW, when media is
present and the device is actually ready, so the return value wouldn't
be zero when TUR ends with sense data. sr_media_change() incorrectly
tests (retval || (scsi_sense_valid(sshdr)...)) when it tries to test
whether TUR failed without sense data or with sense data indicating
media-not-present.
Fix the test using scsi_status_is_good() and update comments.
- Fixed a comment typo spotted by Eike.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/scsi/sd.c')
0 files changed, 0 insertions, 0 deletions