Re: scsi_cd or atapicam crash in current.

From: Thomas Quinot <thomas_at_cuivre.fr.eu.org>
Date: Tue, 16 Sep 2003 17:02:19 +0200
Le 2003-09-16, Daniel Eischen écrivait :

> I get this even without atapicam in the kernel.  Is trying
> CAMDEBUG and CAM_DEBUG_CDB going to show anything interesting?

No, indeed, probably not. Can you try the following patch:

Index: ata-lowlevel.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-lowlevel.c,v
retrieving revision 1.11
diff -u -r1.11 ata-lowlevel.c
--- ata-lowlevel.c	10 Sep 2003 09:57:16 -0000	1.11
+++ ata-lowlevel.c	16 Sep 2003 15:00:13 -0000
_at__at_ -374,6 +374,11 _at__at_
 
     /* ATAPI PIO commands */
     case ATA_R_ATAPI:
+	if (request->status & (ATA_S_ERROR | ATA_S_DWF)) {
+	    request->error = ATA_IDX_INB(ch, ATA_ERROR);
+	    break;
+	}
+
 	length = ATA_IDX_INB(ch, ATA_CYL_LSB)|(ATA_IDX_INB(ch, ATA_CYL_MSB)<<8);
 
 	switch ((ATA_IDX_INB(ch, ATA_IREASON) & (ATA_I_CMD | ATA_I_IN)) |
_at__at_ -446,8 +451,6 _at__at_
 
 	case ATAPI_P_ABORT:
 	case ATAPI_P_DONE:
-	    if (request->status & (ATA_S_ERROR | ATA_S_DWF))
-		request->error = ATA_IDX_INB(ch, ATA_ERROR);
 	    break;
 
 	default:
-- 
    Thomas.Quinot_at_Cuivre.FR.EU.ORG

Received on Tue Sep 16 2003 - 06:02:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:22 UTC