>From David Martin <> Subject [PATCH] SCSI not showing tray status correctly Date Mon, 27 Dec 2004 06:26:32 +0100 Digg This When trying to get the drive status via ioctl CDROM_DRIVE_STATUS, with no disk it gives CDS_TRAY_OPEN even if the tray is closed. ioctl works as expected with ide-cd driver. Here is the patch to get the same behaviour on SCSI drives for kernel 2.6.10. 2.4 branch have same problem. Get from Debian bug #447337 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447337) Reproducible: Always Steps to Reproduce: 1. Close empty CD tray. 2. call state = ioctl(device_handle, CDROM_DRIVE_STATUS); 3. state always gives CDS_TRAY_OPEN even if the tray is closed. Patch for solve this problem present at Debian bug #447337 by URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447337 I apply this patch. It work correctly. Now ioctl(device_handle, CDROM_DRIVE_STATUS) returns right result.
Submission of patch to lkml: http://lkml.org/lkml/2004/12/27/1
The patch has been sent upstream (again), we'll wait for their response.
submission thread: http://lkml.org/lkml/2007/10/27/219
Created attachment 141718 [details, diff] patch Sorry for the delay here. Please apply this patch instead, and confirm it solves the issue.
I went ahead and tested this myself. It needed some extra work (another patch backported first, and a fix applying after), but it's done now. Patches 2100, 2101, and 2102 queued for next gentoo-sources-2.6.24 release
Fixed in gentoo-sources-2.6.24-r1 (genpatches-2.6.24-2) Not planning on backporting to 2.6.23 as this is more than a simple bugfix.