Skip to contentSkip to conversation

problem with commit "cdrom_id: Do not ignore errors from scsi_cmd_run()"

DISCUSSION Gerardo Exequiel Pozzi 2 participants 3 messages Jun 28, 2010 – Jun 30, 2010

lore
Share & tools
lore
#0 lore raw

Hello

I have a problem with this commit [#1] "cdrom_id: Do not ignore errors from scsi_cmd_run()" and qemu-kvm-0.12.4.

running /lib/udev/cdrom_id /dev/sr0 does not return ID_CDROM_MEDIA_TRACK_COUNT_DATA (there is a iso image specified on qemu-kvm command line, so there is a media present) Running with --debug show that error is produced (add below)

For working again I done:
1) Only reverting this commit [#1] "cdrom_id: Do not ignore errors from scsi_cmd_run()"
2) Only revert revert the commit [#2] "cdrom_id: Swap media state and TOC info probing"

In case (1) no error is displayed and ID_CDROM_MEDIA_TRACK_COUNT_DATA is printed.
In case (2) error is displayed and ID_CDROM_MEDIA_TRACK_COUNT_DATA is printed.

As result udev rule that uses this info will fail.

Tested on Linux 2.6.33.5 and 2.6.34, under 32 bits and 64 bits with the same results.

If need more info, please let me know.

Thanks.

# /lib/udev/cdrom_id --debug /dev/sr0
main: probing: '/dev/sr0'
cd_inquiry: INQUIRY: [QEMU    ][QEMU DVD-ROM    ][0.12]
cd_profiles: GET CONFIGURATION: size of features buffer 0x0010
cd_profiles: GET CONFIGURATION: feature 'profiles', with 2 entries
feature_profiles: profile 0x10 dvd_rom
feature_profiles: profile 0x08 cd_rom
cd_profiles: current profile 0x08
cd_profiles: profile 0x08 media_cd_rom
info_scsi_cmd_err: READ DISC INFORMATION failed with SK=5h/ASC h/ACQh
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_DVD=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD=1

[#1]
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;hXe178894bfc040834e1270c6fe9b9fdef513550#patch1
[#2]
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h0e3b1a0d3a3ec76f16736470dc656744848d941

Signature · 2 lines
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1
#1 lore raw
Quoted 49 lines · Gerardo Exequiel Pozzi

Hello

I have a problem with this commit [#1] "cdrom_id: Do not ignore errors from scsi_cmd_run()" and qemu-kvm-0.12.4.

running /lib/udev/cdrom_id /dev/sr0 does not return ID_CDROM_MEDIA_TRACK_COUNT_DATA (there is a iso image specified on qemu-kvm command line, so there is a media present) Running with --debug show that error is produced (add below)

For working again I done:
1) Only reverting this commit [#1] "cdrom_id: Do not ignore errors from scsi_cmd_run()"
2) Only revert revert the commit [#2] "cdrom_id: Swap media state and TOC info probing"

In case (1) no error is displayed and ID_CDROM_MEDIA_TRACK_COUNT_DATA is printed.
In case (2) error is displayed and ID_CDROM_MEDIA_TRACK_COUNT_DATA is printed.

As result udev rule that uses this info will fail.

Tested on Linux 2.6.33.5 and 2.6.34, under 32 bits and 64 bits with the same results.

If need more info, please let me know.

Thanks.

# /lib/udev/cdrom_id --debug /dev/sr0
main: probing: '/dev/sr0'
cd_inquiry: INQUIRY: [QEMU ][QEMU DVD-ROM ][0.12]
cd_profiles: GET CONFIGURATION: size of features buffer 0x0010
cd_profiles: GET CONFIGURATION: feature 'profiles', with 2 entries
feature_profiles: profile 0x10 dvd_rom
feature_profiles: profile 0x08 cd_rom
cd_profiles: current profile 0x08
cd_profiles: profile 0x08 media_cd_rom
info_scsi_cmd_err: READ DISC INFORMATION failed with SK=5h/ASC h/ACQh
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_DVD=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD=1
Quoted 7 lines

[#1]
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;hXe178894bfc040834e1270c6fe9b9fdef513550#patch1

[#2]
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h0e3b1a0d3a3ec76f16736470dc656744848d941

Apparently qemu does not implement the scsi "READ DISC INFORMATION" command for cdroms.

Filed on the Red Hat bugzilla https://bugzilla.redhat.com/show_bug.cgi?id`9049

#2 lore raw
In reply to Gerardo Exequiel Pozzi
Quoted 61 lines · Harald Hoyer
Quoted 50 lines · Gerardo Exequiel Pozzi

Hello

I have a problem with this commit [#1] "cdrom_id: Do not ignore errors from scsi_cmd_run()" and qemu-kvm-0.12.4.

running /lib/udev/cdrom_id /dev/sr0 does not return ID_CDROM_MEDIA_TRACK_COUNT_DATA (there is a iso image specified on qemu-kvm command line, so there is a media present) Running with --debug show that error is produced (add below)

For working again I done:
1) Only reverting this commit [#1] "cdrom_id: Do not ignore errors from scsi_cmd_run()"
2) Only revert revert the commit [#2] "cdrom_id: Swap media state and TOC info probing"

In case (1) no error is displayed and ID_CDROM_MEDIA_TRACK_COUNT_DATA is printed.
In case (2) error is displayed and ID_CDROM_MEDIA_TRACK_COUNT_DATA is printed.

As result udev rule that uses this info will fail.

Tested on Linux 2.6.33.5 and 2.6.34, under 32 bits and 64 bits with the same results.

If need more info, please let me know.

Thanks.

# /lib/udev/cdrom_id --debug /dev/sr0
main: probing: '/dev/sr0'
cd_inquiry: INQUIRY: [QEMU ][QEMU DVD-ROM ][0.12]
cd_profiles: GET CONFIGURATION: size of features buffer 0x0010
cd_profiles: GET CONFIGURATION: feature 'profiles', with 2 entries
feature_profiles: profile 0x10 dvd_rom
feature_profiles: profile 0x08 cd_rom
cd_profiles: current profile 0x08
cd_profiles: profile 0x08 media_cd_rom
info_scsi_cmd_err: READ DISC INFORMATION failed with
SK=5h/ASC h/ACQh
ID_CDROM=1
ID_CDROM_CD=1
ID_CDROM_DVD=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_CDROM_MEDIA=1
ID_CDROM_MEDIA_CD=1
Quoted 9 lines

[#1]
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;hXe178894bfc040834e1270c6fe9b9fdef513550#patch1

[#2]
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h0e3b1a0d3a3ec76f16736470dc656744848d941

Quoted 5 lines

Apparently qemu does not implement the scsi "READ DISC INFORMATION" command for cdroms.

Filed on the Red Hat bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id`9049

Comment of Gerardo Exequiel Pozzi

Additional note: This only fail with IDE cd-rom, SCSI cd-rom works OK

With "-drive file=xyz.iso,if=scsi,mediaÍrom" works fine, but with "-drive file=xyz.iso,if=ide,mediaÍrom" (or directly -cdrom) fails.