Subject: kern/2003: SCSI system doesn't retry for a "COMMAND ABORTED"
To: None <gnats-bugs@NetBSD.ORG>
From: None <kenh@cmf.nrl.navy.mil>
List: netbsd-bugs
Date: 01/30/1996 23:16:09
>Number:         2003
>Category:       kern
>Synopsis:       SCSI system doesn't retry for a "COMMAND ABORTED"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 30 23:35:02 1996
>Last-Modified:
>Originator:     Ken Hornstein
>Organization:
	None
	
>Release:        1.1
>Environment:
	
System: NetBSD excalibur 1.1 NetBSD 1.1 (EXCALIBUR) #16: Sun Jan 28 02:09:58 EST 1996 kenh@excalibur:/usr/src/sys/arch/i386/compile/EXCALIBUR i386


>Description:
According to the SCSI-II spec that I looked at, when a SCSI device returns
a sense key of 0xb (COMMAND ABORTED), it should retry the command.  Ours
does not.
	
>How-To-Repeat:
Find a device that likes to force retries via this mechanism, and watch
it fail.
	
>Fix:
	
This simple patch seems to work:

*** /sys/scsi/scsi_base.c.old	Sun Jan 28 00:37:27 1996
--- /sys/scsi/scsi_base.c	Tue Jan 30 23:11:52 1996
***************
*** 680,685 ****
--- 680,688 ----
  		case 0x8:	/* BLANK CHECK */
  			error = 0;
  			break;
+ 		case 0xb:	/* COMMAND ABORTED */
+ 			return ERESTART;
+ 			break;
  		case 0xd:	/* VOLUME OVERFLOW */
  			error = ENOSPC;
  			break;
>Audit-Trail:
>Unformatted: