diff --git a/[refs] b/[refs] index 8c548c805830..ade21772fbe7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0ee31cb5df4b717de923266879964d0418c3308f +refs/heads/master: b8479178901557dc323a69ee254c1c732e85e0e5 diff --git a/trunk/drivers/scsi/sr_ioctl.c b/trunk/drivers/scsi/sr_ioctl.c index cbb38c5197fa..3cd8ffbad577 100644 --- a/trunk/drivers/scsi/sr_ioctl.c +++ b/trunk/drivers/scsi/sr_ioctl.c @@ -324,6 +324,15 @@ int sr_drive_status(struct cdrom_device_info *cdi, int slot) return CDS_NO_DISC; } + /* + * SK/ASC/ASCQ of 2/4/2 means "initialization required" + * Using CD_TRAY_OPEN results in an START_STOP_UNIT to close + * the tray, which resolves the initialization requirement. + */ + if (scsi_sense_valid(&sshdr) && sshdr.sense_key == NOT_READY + && sshdr.asc == 0x04 && sshdr.ascq == 0x02) + return CDS_TRAY_OPEN; + /* * 0x04 is format in progress .. but there must be a disc present! */