]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] sr: report more accurate drive status after closing the tray.
authorPeter Jones <pjones@redhat.com>
Fri, 11 Jul 2008 20:17:05 +0000 (16:17 -0400)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 27 Apr 2009 14:32:30 +0000 (09:32 -0500)
commit8f1a9ac4a3a9b60cba2814b719f61ce4ab8418bd
tree3b4acbb4edf5ad7cedaa425251fa278c96fb93a5
parentd8660ce831736773aa5ba8d5bc676e7de6799dde
[SCSI] sr: report more accurate drive status after closing the tray.

So, what's happening here is that the drive is reporting a sense of
2/4/1 ("logical unit is becoming ready") from sr_test_unit_ready(), and
then we ask for the media event notification before checking that result
at all.  The check_media_event_descriptor() call isn't getting a check
condition, but it's also reporting that the tray is closed and that
there's no media.  In actuality it doesn't yet know if there's media or
not, but there's no way to express that in the media event status field.

My current thought is that if it told us the device isn't yet ready, we
should return that immediately, since there's nothing that'll tell us
any more data than that reliably:

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/sr_ioctl.c