Bug 65889

Summary: adding cdrw drive after installation doesn't enable ide-scsi
Product: [Retired] Red Hat Linux Reporter: Glen A. Foster <glen.foster>
Component: kudzuAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: notting, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-30 06:02:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Output of dmesg none

Description Glen A. Foster 2002-06-03 20:27:27 UTC
Description of Problem: It appears the 2.4.9-31 kernel does not identify the
Matsushita UDJA340 CD/RW drive I have plugged into my laptop (before boot). 
It's either that or cdrecord has a problem identifying the device as
write-capable... I suspect the former.

Dmesg output says it thinks the device is DVD.  The hardware itself (and
websites) say it's CD/RW.  Witness:

# dmesg | grep hdc
hdc: UJDA340, ATAPI CD/DVD-ROM drive

HP OEMs this device for the OmniBook laptop line; I do not have hardware to send
in to help replicate the defect, and am hoping I/we can troubleshoot this using
this bugzilla defect as a "communication vehicle" as needed/necessary.

Version-Release number of selected component (if applicable):
# rpm -q kernel
kernel-2.4.9-31

How Reproducible: 100%

Steps to Reproduce:
1. Plug in the Matshshita UDJA340 CD/RW drive with laptop powered-off
2. Boot 2.4.9-31 kernel
3. Run cdrecord -scanbus

Actual Results: cdrecord cannot find a writeable device

Expected Results: cdrecord *does* find a writeable device (I have faith once
cdrecord finds the device, it'll burn CD images just fine)

Additional Information:
-------------------------------------------------
    * dmesg output to be attached separately
    * /proc/ide files (contents) documented here
-------------------------------------------------
# ls -l /dev/cdrom 
lrwxrwxrwx    1 root   root     8 May 30 09:38 /dev/cdrom -> /dev/hdc
# ls -l /proc/ide/hdc
lrwxrwxrwx    1 root   root     8 Jun  3 14:14 /proc/ide/hdc -> ide1/hdc
# ls -l /proc/ide/ide1/hdc
total 0
-r--r--r--    1 root   root     0 Jun  3 14:15 capacity
-r--r--r--    1 root   root     0 Jun  3 14:15 driver
-r--------    1 root   root     0 Jun  3 14:15 identify
-r--r--r--    1 root   root     0 Jun  3 14:15 media
-r--r--r--    1 root   root     0 Jun  3 14:15 model
-rw-------    1 root   root     0 Jun  3 14:15 settings
# cat /proc/ide/ide1/hdc/capacity
0
# cat /proc/ide/ide1/hdc/driver 
ide-cdrom version 4.59
# cat /proc/ide/ide1/hdc/identify 
85c0 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 312e
3530 2020 2020 554a 4441 3334 3020 2020
2020 2020 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 0000
0000 0b00 0000 0200 0200 0002 0000 0000
0000 0000 0000 0000 0000 0000 0000 0407
0003 0078 0078 00f0 0078 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
003e 0013 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 404d 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 fffe 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
# cat /proc/ide/ide1/hdc/media 
cdrom
# cat /proc/ide/ide1/hdc/model 
UJDA340
# cat /proc/ide/ide1/hdc/settings 
name
		value	     min	max	   mode
----
		-----	     ---	---	   ----
breada_readahead        4            0          127        rw
current_speed           34           0          69         rw
dsc_overlap             0            0          1          rw
file_readahead          0            0          2097151    rw
ide_scsi                0            0          1          rw
init_speed              34           0          69         rw
io_32bit                0            0          3          rw
keepsettings            0            0          1          rw
max_kb_per_request      127          1          127        rw
nice1                   1            0          1          rw
number                  2            0          3          rw
pio_mode                write-only   0          255        w
slow                    0            0          1          rw
unmaskirq               0            0          1          rw
using_dma               0            0          1          rw
# dmesg | grep hdc
    ide1: BM-DMA at 0x1c28-0x1c2f, BIOS settings: hdc:pio, hdd:pio
hdc: UJDA340, ATAPI CD/DVD-ROM drive
hdc: ATAPI 24X CD-ROM CD-R/RW drive, 2048kB Cache, DMA
hdc: status timeout: status=0xff { Busy }
hdc: DMA disabled
hdc: drive not ready for command
hdc: ATAPI reset timed-out, status=0xff
hdc: status timeout: status=0xff { Busy }
hdc: drive not ready for command
hdc: ATAPI reset complete
# cdrecord -scanbus
Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jvrg Schilling
cdrecord: No such file or directory. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
# id
uid=0(root) gid=0(root)
groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

Comment 1 Glen A. Foster 2002-06-03 20:27:57 UTC
Created attachment 59444 [details]
Output of dmesg

Comment 2 Arjan van de Ven 2002-06-04 07:08:50 UTC
cdrecord: No such file or directory. Cannot open SCSI driver.

this is because it seems you're not using the ide-scsi mechanism. In Linux, cd
burners need to emulate a scsi device (atapi, the cdrom protocol, is basically
scsi over a ide cable). 

Change your /etc/grub/grub.conf to have the kernel line to be something like this:
        kernel /vmlinuz-2.4.9-31 ro root=/dev/hda6 hdc=ide-scsi

(the root=/dev/hdaX you should leave as is in your file, on my laptop it's hda6,
it's the hdc=ide-scsi that you should add.)


Comment 3 Glen A. Foster 2002-06-04 15:21:00 UTC
Voila!  Now cdrecord recognizes the burner:

# cdrecord -scanbus
Cdrecord 1.10 (i686-pc-linux-gnu) Copyright (C) 1995-2001 Jvrg Schilling
Linux sg driver version: 3.1.20
Using libscg version 'schily-0.5'
scsibus0:
	0,0,0	  0) 'MATSHITA' 'UJDA340         ' '1.50' Removable CD-ROM
	0,1,0	  1) *
	0,2,0	  2) *
	0,3,0	  3) *
	0,4,0	  4) *
	0,5,0	  5) *
	0,6,0	  6) *
	0,7,0	  7) *
# dmesg | grep hdc
Kernel command line: ro root=/dev/hda5 hdc=ide-scsi
ide_setup: hdc=ide-scsi
    ide1: BM-DMA at 0x1c28-0x1c2f, BIOS settings: hdc:pio, hdd:pio
hdc: UJDA340, ATAPI CD/DVD-ROM drive

Comment 4 Glen A. Foster 2002-06-04 15:22:44 UTC
Pardon the ignorant question, but now what?  Is this now NOTABUG and I need to
somehow change a configuration file/parameter somewhere?

Do I just add the hdc=ide-scsi to grub.conf?  If so, what about when I take the
burner out and put in a floppy drive?

Comment 5 Arjan van de Ven 2002-06-04 15:27:52 UTC
Normally, anaconda will detect the burner and automatically add the grub.conf
bits. For a burner that is added later I'd think kudzu could/should this
automatically....

the ide-scsi bit is harmless if the hdc device doesn't exist; only if you put in
another ide device then it becomes relevant (but afaik not with disks, with tape
streamers it does matter though)

Comment 6 Glen A. Foster 2002-06-04 15:31:45 UTC
Thanks for the timely reply, Arjan.  So... it this a bug or not?  If it is,
should the defect be reassigned to kudzu?  The net effect to a customer is that
the CD/RW does not function _as a burner_ if/when (while the laptop is powered
off) the device is inserted and the system is powered up.

... and it's quite doubtful I'll insert a streaming tape drive as "hdc".

Comment 7 Arjan van de Ven 2002-06-05 09:54:08 UTC
It would be a nice kudzu enhancement if kudzu did this

Comment 8 Bill Nottingham 2003-01-30 06:02:18 UTC
Done as part of updfstab in 0.99.91-1.