Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD-5 against my DVD/CD drive
On Tue, Dec 15, 2009 at 10:05:03PM +0000, Jonathan A. Kollasch wrote:
> On Tue, Dec 15, 2009 at 10:41:24PM +0200, Aleksey Cheusov wrote:
> > >> Dec 12 20:17:41 chen /netbsd: cd0(viaide0:1:0): Sense Error Code 0x44
> >
> > > I see where 0x44 is a CD-related opcode. I'd be interested to see the
> > > original command block that elicited this response.
> >
> > > Could you try a kernel with 'options SCSIDEBUG'? (As this isn't
> > > defflag'd, you'll need to ensure scsipi_base.o gets rebuilt.)
> >
> > With SCSIDEBUG enabled it says
> >
> > Dec 15 22:28:11 chen /netbsd: cd0(viaide0:1:0): undecodable sense error
> > for opcode 0x28, data= 0x44 0x00 0x00 0x00
> >
>
> Hmm, a READ_10 command. And this isn't a normal sense error code,
> it's a wdc(4) atapi error code. 0x44 means
> (SKEY_HARDWARE_ERROR<<4)|WDCE_ABRT.
> That translates to "non-media hardware failure".
>
> It seems the wrong sense interpreter is being used to me.
I think the driver did really issue a
REQUEST_SENSE and got this as reply (or got no data at all as reply),
which is wrong.
I wonder if this error code is a responce from the drive to
the REQUEST_SENSE command.
Can you apply the attached patch and report messages printed by the
kernel ?
> And that SCSIDEBUG code path is printing out sizeof(void *)
> of data rather than the full length.
sizeof(sense) should be sizeof(*sense).
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Index: atapi_wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/scsipi/atapi_wdc.c,v
retrieving revision 1.108.4.1
diff -u -p -u -r1.108.4.1 atapi_wdc.c
--- atapi_wdc.c 20 Nov 2008 02:45:36 -0000 1.108.4.1
+++ atapi_wdc.c 16 Dec 2009 19:05:07 -0000
@@ -1036,6 +1036,8 @@ wdc_atapi_phase_complete(struct ata_xfer
if (chp->ch_status & WDCS_ERR &&
((sc_xfer->xs_control & XS_CTL_REQSENSE) == 0 ||
sc_xfer->resid == sc_xfer->datalen)) {
+ printf("REQUEST_SENSE failed, error 0x%x, previous 0x%x\n",
+ chp->ch_error, sc_xfer->sense.atapi_sense);
/* save the short sense */
sc_xfer->error = XS_SHORTSENSE;
sc_xfer->sense.atapi_sense = chp->ch_error;
Home |
Main Index |
Thread Index |
Old Index