On Sun May 25 18:44:44 2025 +0000, Jinoh Kang wrote:
Any chance it could be a driver bug?
Since you asked, I dug into the kernel code today and learned that Linux's DVD_READ_STRUCT ioctl is implemented on top of SCSI command 0xAD which returns physical disc information (among other things). The data returned from command 0xAD has a completely different format in the [DVD](https://www.t10.org/ftp/t10/document.97/97-108r0.pdf#page=36) and [Blu-ray](https://www.t10.org/ftp/t10/document.04/04-318r0.pdf#page=32) specifications. The Blu-ray spec changes the second byte of the SCSI command, which was reserved in the DVD spec, to a value that indicates whether a DVD struct or a blu-ray struct should be returned. It doesn't surprise me that the SCSI command fails to return any DVD information when a blu-ray is in the drive, and consequently Linux fails to return anything for DVD_STRUCT_PHYSICAL.
What we could do is send command 0xAD twice to see if we can get the DVD struct or the blu-ray struct. If either one succeeds, we can be confident in reporting FILE_DEVICE_DVD. I've pushed a new patch that does exactly that. Hopefully it makes everyone happy.