Bug 253

Summary: Tagged queuing with an Adaptec 2842 controller doesn't work
Product: Base System Reporter: pritc003 <pritc003>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description pritc003 1995-03-18 16:40:01 UTC
System fails to boot when using the latest version of the Adaptec 2842
drive (sys/i386/scsi/aic7xxx.c).  About 15 - 20 "sd1: Target Busy" 
messages are displayed on the console, and the system panics because
it is unable to mount the root file system.  

I tracked this down to the fact that the driver is now enabling "tagged
queuing" for the ST31230 SCSI-2 disk.  If I disable the line of code
that does this, the system boots fine.

Fix: A workaround is to disable tagged queuing for now:
How-To-Repeat: 
Boot with a device that supports tagged queuing (or one that the
driver thinks does).

Here is all of the relevant information from the boot sequence after
I disabled the tagged queing code and with AHC_DEBUG turned on.

ahc0: scb 2104 bytes; SCB_SIZE 19 bytes, ahc_dma 8 bytes
ahc0: reading board settings
ahc0: 284x Single Channel, SCSI Id=7, aic7770 <= Rev C, 4 SCBs
NEEDSDTR == 0xfffa
NEEDWDTR == 0x0
ahc0: Downloading Sequencer Program...Done
ahc0 at 0x1000-0x10ff irq 11 on eisa slot 1
ahc0: Probing channel A
scbus0: ahc0 waiting for scsi devices to settle
ahc0: target 0, lun 0 (probe0) requests Check Status
ahc0: target 0, lun 0 (probe0) Sending Sense
(ahc0:0:0): "CDC ST1239NS 9212" is a type 0 fixed SCSI 1
sd0(ahc0:0:0): Direct-Access 
sd0(ahc0:0:0): 194MB (398790 sectors), 1268 C 9 H 34 S/T 512 B/S
ahc0: target 1 synchronous at 10.0MB/s, offset = 0xf
ahc0: target 1, lun 0 (probe0) requests Check Status
ahc0: target 1, lun 0 (probe0) Sending Sense
ahc0: target 1 Tagged Queuing Device
(ahc0:1:0): "SEAGATE ST31230N 0290" is a type 0 fixed SCSI 2
sd1(ahc0:1:0): Direct-Access 
sd1(ahc0:1:0): 1010MB (2069860 sectors), 3992 C 5 H 103 S/T 512 B/S
ahc0: target 2, lun 0 (probe0) requests Check Status
ahc0: target 2, lun 0 (probe0) Sending Sense
(ahc0:2:0): "ARCHIVE VIPER 150  21944 -001" is a type 1 removable SCSI 1
st0(ahc0:2:0): Sequential-Access st0: Archive  Viper 150 is a known rogue
density code 0x0, ahc0: target 2, lun 0 (st0) requests Check Status
ahc0: target 2, lun 0 (st0) Sending Sense
 drive empty
ahc0: target 1, lun 0 (sd1) requests Check Status
ahc0: target 1, lun 0 (sd1) Sending Sense
ahc0: target 1, lun 0 (sd1) requests Check Status
ahc0: target 1, lun 0 (sd1) Sending Sense
...
Comment 1 Joerg Wunsch freebsd_committer freebsd_triage 1995-07-08 17:56:24 UTC
State Changed
From-To: open->closed

From mpp@legarto.minn.net (Mike Pritchard): 

I filed this report originally.  This is working in -current (with  
AHC_TAGENABLE defined).  I think that Justin Gibbs is still working 
on something to allow tagged queuing to be enabled/disabled on 
a device-by-device basis, so he might not want this closed yet. 

Comment 2 Joerg Wunsch freebsd_committer freebsd_triage 1995-07-08 18:04:03 UTC
State Changed
From-To: closed->analyzed

Accidentally closed; seems Justin Gibbs is still working here... 

Comment 3 Justin T. Gibbs freebsd_committer freebsd_triage 1995-07-18 16:45:57 UTC
State Changed
From-To: analyzed->closed

With the addition of disabling tagged queuing for devices that say 
the support tagged queuing but reject tagged queuing messages, the 
driver appears to work with every drive I've tested and tagged queing 
enabled.  It would be nice to allow tagged queuing more selectively, 
but I look at that as a task to be performed generically by the SCSI 
system, but not by individual drivers.