Subject: cannot access cdrom drive
To: None <current-users@netbsd.org>
From: Brett Lymn <blymn@baesystems.com.au>
List: current-users
Date: 01/15/2001 16:06:21
Folks,
        I have a laptop (a digital HiNote Ultra II) running NetBSD
1.5_ALPHA2 that has a cdrom drive that connects via a weird pcmcia
arrangement.  I can see the cd get probed and identified ok on boot,
viz:

Jan 14 11:11:05 rover /netbsd: wdc2 at pcmcia2 function 0 port 0x170-0x177 port 0x376-0x378: Digital Mobile Media CD-ROM
Jan 14 11:11:05 rover /netbsd: atapibus0 at wdc2 channel 0
Jan 14 11:11:05 rover /netbsd: cd0 at atapibus0 drive 0: <TOSHIBA CD-ROM XM-1202B, 0600155424, 2475> type 5 cdrom removable
Jan 14 11:11:05 rover /netbsd: cd0: drive supports PIO mode 3

But when I try and access a CD in the drive I just get a "read error"
almost immediately, the drive gets accessed because the access light
flashes momentarily but the drive does not spin up.  The drive does
spin up on boot so I _think_ the thing is working ok.  I tried
twiddling the debug mask for the wdc driver and got the following out:

Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 0 len 12 st 0x58 err 0x0 ire 0x1 :PHASE_CMDOUT
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 0 len 12 st 0x51 err 0x60 ire 0x3 :PHASE_COMPLETED
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 32 len 12 st 0x58 err 0x0 ire 0x1 :PHASE_CMDOUT
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 32 len 18 st 0x58 err 0x0 ire 0x2 :PHASE_DATAIN
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 14 len 18 st 0x50 err 0x0 ire 0x3 :PHASE_COMPLETED
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: wdc_atapi_done() (end), error 0x1 sense 0x60070
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 0 len 12 st 0x58 err 0x0 ire 0x1 :PHASE_CMDOUT
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 0 len 12 st 0x51 err 0x20 ire 0x3 :PHASE_COMPLETED
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 32 len 12 st 0x58 err 0x0 ire 0x1 :PHASE_CMDOUT
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 32 len 18 st 0x58 err 0x0 ire 0x2 :PHASE_DATAIN
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr wdc2:0:0
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: c_bcount 14 len 18 st 0x50 err 0x0 ire 0x3 :PHASE_COMPLETED
Jan 14 11:40:30 rover /netbsd: wdc_atapi_intr: wdc_atapi_done() (end), error 0x1 sense 0x20070

This is not a show stopper for me but I would like to get the CD
working at some stage.  I cannot update my kernel due to other issues
at the moment so if a kernel update will cure the problem I will not
be able to test immediately but will do so when I can.

BTW detaching the CD when the machine is up makes it hang until the CD
is reattached, it looks like the only way I can get the CD on and off
the machine is to reboot.

-- 
===============================================================================
Brett Lymn, Computer Systems Administrator, BAE SYSTEMS
===============================================================================