This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 134822 - scd* does not seem to respond to SC_INQUIRY - sg* works
scd* does not seem to respond to SC_INQUIRY - sg* works
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Doug Ledford
Brian Brock
:
: 127685 129671 137105 137212 140506 141433 (view as bug list)
Depends On:
Blocks: 127685 136155 FC4Target 136982 138739 140506 147461
  Show dependency treegraph
 
Reported: 2004-10-06 11:11 EDT by Harald Hoyer
Modified: 2007-11-30 17:07 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-07 12:47:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Harald Hoyer 2004-10-06 11:11:46 EDT
e.g. /dev/hdc is a normal IDE Burner...
$ ./dvd+rw-mediainfo /dev/hdc
INQUIRY:                [PIONEER ][DVD-RW  DVR-105 ][1.00]
GET [CURRENT] CONFIGURATION:
:-( no media mounted, exiting...

scd0 is a SCSI Burner... 
$ ./dvd+rw-mediainfo /dev/scd0
:-( not an MMC unit!

but... using cdrecord... and /dev/sg0
$ cdrecord -VVVVVVVVVVVVV -inq dev=/dev/sg0
....
Executing 'inquiry' command on Bus 0 Target 6, Lun 0 timeout 40s
CDB:  12 00 00 00 24 00
cmd finished after 0.002s timeout 40s
Got 36 (0x24), expecting 36 (0x24) bytes of data.
Received Data:  05 80 02 02 27 00 00 10 59 41 4D 41 48 41 20 20 43 52
57 34 3431 36 53 20 20 20 20 20 20 20 20 31 2E 30 65
Inquiry Data   : 05 80 02 02 27 00 00 10 59 41 4D 41 48 41 20 20 43 52
57 34 34 31 36 53 20 20 20 20 20 20 20 20 31 2E 30 65
...
Vendor_info    : 'YAMAHA  '
Identifikation : 'CRW4416S        '
Revision       : '1.0e'
Device seems to be: Generic mmc CD-RW.
...

Using /dev/scd0 with cdrecord..
$ cdrecord -VVVVVVVVVVVVV -inq dev=/dev/scd0
Executing 'test unit ready' command on Bus 0 Target 6, Lun 0 timeout 40s
CDB:  00 00 00 00 00 00
cmd finished after 0.000s timeout 40s

Executing 'test unit ready' command on Bus 0 Target 6, Lun 0 timeout 40s
CDB:  00 00 00 00 00 00
cmd finished after 0.000s timeout 40s

Executing 'inquiry' command on Bus 0 Target 6, Lun 0 timeout 40s
CDB:  12 00 00 00 24 00
resid: 36
cmd finished after 0.000s timeout 40s
Got 0 (0x0), expecting 36 (0x24) bytes of data.
Received Data:
Inquiry Data   :
Comment 1 Harald Hoyer 2004-10-06 11:13:14 EDT
$ cdrecord -VVVVVVVVVVVVV -inq dev=/dev/hdc                          
         
...
Executing 'inquiry' command on Bus 1 Target 0, Lun 0 timeout 40s
CDB:  12 00 00 00 24 00
cmd finished after 0.000s timeout 40s
Got 36 (0x24), expecting 36 (0x24) bytes of data.
Received Data:  05 80 00 32 5B 00 00 00 50 49 4F 4E 45 45 52 20 44 56
44 2D 5257 20 20 44 56 52 2D 31 30 35 20 31 2E 30 30
Inquiry Data   : 05 80 00 32 5B 00 00 00 50 49 4F 4E 45 45 52 20 44 56
44 2D 52 57 20 20 44 56 52 2D 31 30 35 20 31 2E 30 30

...
Comment 2 Harald Hoyer 2004-10-06 11:14:10 EDT
$ uname -r
2.6.8-1.541smp
Comment 3 Harald Hoyer 2004-10-06 11:28:59 EDT
oh... funny... after I inserted a medium..
$ dvd+rw-mediainfo /dev/scd0
INQUIRY:                [YAMAHA  ][CRW4416S        ][1.0e]
:-( not a DVD unit
Comment 4 Harald Hoyer 2004-10-06 11:31:59 EDT
Expected result: INQUIRY should work without a medium inserted, just
like talking to /dev/sg0
Comment 5 Harald Hoyer 2004-10-06 12:59:21 EDT
More evidence found in bug #129671
Comment 6 Ralf Ertzinger 2004-10-06 13:00:32 EDT
*** Bug 129671 has been marked as a duplicate of this bug. ***
Comment 7 Harald Hoyer 2004-10-11 09:26:23 EDT
Still present in
$ uname -r
2.6.8-1.603smp
Comment 8 Harald Hoyer 2004-10-27 04:30:46 EDT
*** Bug 137212 has been marked as a duplicate of this bug. ***
Comment 12 Harald Hoyer 2004-11-03 09:38:28 EST
and btw, this is no "drive problem", cause it works with /dev/sg0,
only not with /dev/scd0
Comment 17 H.J. Lu 2004-11-23 11:28:58 EST
*** Bug 127685 has been marked as a duplicate of this bug. ***
Comment 19 Harald Hoyer 2004-12-01 06:19:18 EST
*** Bug 141433 has been marked as a duplicate of this bug. ***
Comment 20 Doug Ledford 2004-12-02 13:18:20 EST
Trying to reproduce, give me a bit.  If I can reproduce, then I should
be able to fix it fairly easily.  From the looks of it, it sounds like
the SG_IO based cooked ioctl interface on /dev/scd* devices is doing a
medium check on a few commands that it shouldn't do a medium check on
(such as INQUIRY and eject).
Comment 21 Doug Ledford 2004-12-02 14:09:11 EST
Reproduced.  Working on it now.
Comment 22 Doug Ledford 2004-12-02 17:38:38 EST
OK, I reproduced this with 2.6.9-1.784_EL.  However, when I compiled a
kernel from a fresh cvs update as of today, version 2.6.9-1.850_EL,
the problem was gone.  So, as far as I can tell, this is fixed
CURRENTRELEASE, but setting state to MODIFIED for tracking purposes. 
If you have problems with the next tree built with a post 1.850_EL
kernel, please set back to ASSIGNED.
Comment 23 Harald Hoyer 2004-12-06 11:18:12 EST
ok... new kernel fixes it :)

Please do not forgot the FC2 and FC3 users! Many of them would love to
see an updated kernel!
Comment 24 Harald Hoyer 2004-12-07 11:45:31 EST
*** Bug 137105 has been marked as a duplicate of this bug. ***
Comment 25 Harald Hoyer 2004-12-07 12:11:02 EST
*** Bug 140506 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.