Subject: Re: Check Condition on CDB
To: None <netbsd-help@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 12/13/2001 22:49:29
On Thu, Dec 13, 2001 at 04:30:20PM -0500, James K. Lowden wrote:
> Hello, 
> 
> In trying to create a CD with cdrecord, I seem to have run into some
> disagreement on the scsi bus.  
> 
> Devices in question, from dmesg:
> 
> adv1 at pci0 dev 15 function 0: AdvanSys ABP-9xxUA SCSI adapter
> adv1: interrupting at irq 9
> scsibus0 at adv1: 8 targets, 8 luns per target
> cd0 at scsibus0 target 1 lun 0: <NAKAMICH, MJ-5.16S, 1.02> SCSI2 5/cdrom removable
> 	[cd0..cd4 are luns on the Nakamichi drive.]
> cd5 at scsibus0 target 4 lun 0: <RICOH, MP6201S, 2.20> SCSI2 5/cdrom removable
> sd0 at scsibus0 target 6 lun 0: <QUANTUM, FIREBALL SE4.3S, PJ0A> SCSI2 0/direct fixed
> 
> FWIW, the adv man page says the driver supports the ABP930UA and the
> ABP940U, but I apparently have the ABP940UA (not mentioned).  
> 
> Behavior:
> 
> The MP6201S (cd5) has green and amber lights.  Green is read-only,
> amber indicates writeable media.  When I insert a blank cd-r disk in
> cd5, the light should glow amber.  Instead, it flashes green/amber
> rapidly.  At that point, I can neither eject(1) the drive nor reset
> it with scsictl(8).  
> 
> The drive behaves normally with cd-rom disks. For that reason and
> because sd0 and cd0-4 never complain, I assume the scsi bus is set up
> correctly.  
> 
> /var/log/messages reports:
> 
>  /netbsd: cd5(adv1:4:0):  Check Condition on CDB: 0x00 00 00 00 00 00
>  /netbsd:	  SENSE KEY:  Hardware Error
>  /netbsd:	   ASC/ASCQ:  Random Positioning Error
>  /netbsd: 
>  /netbsd: cd5(adv1:4:0):  Check Condition on CDB: 0x00 00 00 00 00 00
>  /netbsd:	  SENSE KEY:  Media Error
>  /netbsd:	   ASC/ASCQ:  Logical Unit Communication Failure

Hum, this doesn't really looks good. Either this drive doesn't
follow the SCSI command set, or it really has some hardware problems.

>  
> I'd be happy of course to provide more information.  
> 
> I'm guessing NetBSD can't write to this particular drive for
> quasi-proprietary reasons, that the drive behaves in some quirky way
> that cd(4) doesn't expect.  That's fine; this looks to me like a
> learning opportunity.  I'm hoping someone will tell me:
> 
> 1.  How to determine what module encountered the error.  

It's the cd driver: sys/dev/scsipi/cd.c

> 2.	Whether there's an analog to tcpdump for the scsi bus, so we can
> see what's really going on, commandwise.  

No. And what would be usefull here is to see what command does
windows send to the drive.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--