[systemd-bugs] [Bug 52474] cdrom_id probing and USB Flash Drive CDROMs
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Jul 26 04:13:17 PDT 2012
https://bugs.freedesktop.org/show_bug.cgi?id=52474
--- Comment #17 from Giuseppe Amato <gam at bit4id.com> 2012-07-26 11:13:17 UTC ---
Created attachment 64720
--> https://bugs.freedesktop.org/attachment.cgi?id=64720
bugged response to the GET CONFIGURATION command
the log of one of the controllers I've tested:
main: probing: '/dev/sr1'
cd_inquiry: INQUIRY: [Generic ][Autorun Disk ][8.00]
cd_profiles: no current profile, assuming no media
cd_profiles: GET CONFIGURATION: size of features buffer 0x0000
cd_profiles: GET CONFIGURATION: size of features buffer 0x0000
ID_CDROM=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_MEDIA=1
Another (bugged) controller responds to the GET CONFIGURATION command with an
"apparently" malformed response, since the "len" fields is decoded to 0x5800202
(actually it may vary), so cdrom_id truncates it; then in the parsing procedure
most of the features is just junk (see the cdrom_id_bugged.log attachment)
And another one respond with status error to GET CONFIGURATION, so the "old
mmc" code is activated and it correctly detect a data cdrom media type and sets
the ID_CDROM_MEDIA_TRACK_COUNT_DATA=1 value:
main: probing: '/dev/sr2'
cd_inquiry: INQUIRY: [GENERIC ][ ][0.00]
info_scsi_cmd_err: GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h
cd_profiles: drive is pre-MMC2 and does not support 46h get configuration
command
cd_profiles: trying to work around the problem
info_scsi_cmd_err: READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
cd_profiles_old_mmc: no current profile, but disc is present; assuming CD-ROM
cd_media_toc: READ TOC: len: 20, start track: 1, end track: 1
cd_media_toc: track=1 info=0x4(data) start_block=0
cd_media_toc: last track 1 starts at block 0
info_scsi_cmd_err: READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
ID_CDROM=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD=1
ID_CDROM_MEDIA_TRACK_COUNT_DATA=1
As I expected, each vendor did some mistake and the possible responses are very
different.
What do you think, it would be possible to patch cdrom_id so the tcase of zero
len response to "GET CONFIGURATION" would be treated as "GET CONFIGURATION"
returning a status error?
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the systemd-bugs
mailing list