losing TQC after add-single-device [2.2.12, scsi, aic7xxx]

mkwasigr@INTERCOPE.COM
Thu, 14 Oct 1999 13:29:11 +0200


Hi all,

I'm using this extremely handy /proc/scsi/scsi interface to enable/disable
my scsi DAT via add/remove-single-device. After adding **ANY** device I
noticed that **ALL** devices are no longer TCQ "enabled", even if some were
after reboot (e.g. my hds).

I'm using an adaptec 2940 (plain SCSI-II, no Ultra) and the aic7xxx driver
together with the sd and st driver is compiled into my 2.2.12 kernel.

Here's what's happening:

---> After reboot, the aic7xxx setup is as follows:

Adaptec AIC7xxx driver version: 5.1.19/3.2.4
Compile Options:
TCQ Enabled By Default : Enabled
AIC7XXX_PROC_STATS : Disabled
AIC7XXX_RESET_DELAY : 5

Adapter Configuration:
SCSI Adapter: Adaptec AHA-294X SCSI host adapter
Narrow Controller
PCI MMAPed I/O Base: 0xe2000000
Adapter SEEPROM Config: SEEPROM found and used.
Adaptec SCSI BIOS: Enabled
IRQ: 16
SCBs: Active 0, Max Active 8,
Allocated 30, HW 16, Page 255
Interrupts: 2619
BIOS Control Word: 0x18b6
Adapter Control Word: 0x0058
Extended Translation: Enabled
Disconnect Enable Flags: 0x00ff
Tag Queue Enable Flags: 0x0003
Ordered Queue Tag Flags: 0x0003
Default Tag Queue Depth: 8
Tagged Queue By Device array for aic7xxx host instance 0:
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
Actual queue depth per device for aic7xxx host instance 0:
{8,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1}

Statistics:

(scsi0:0:0:0)
Device using Narrow/Sync transfers at 10.0 MByte/sec, offset 15
Transinfo settings: current(25/15/0/0), goal(25/15/0/0), user(25/15/0/0)
Total transfers 2 (2 reads and 0 writes)

(scsi0:0:1:0)
Device using Narrow/Sync transfers at 10.0 MByte/sec, offset 15
Transinfo settings: current(25/15/0/0), goal(25/15/0/0), user(25/15/0/0)
Total transfers 2542 (2396 reads and 146 writes)

(scsi0:0:2:0)
Device using Narrow/Sync transfers at 10.0 MByte/sec, offset 15
Transinfo settings: current(25/15/0/0), goal(25/15/0/0), user(25/15/0/0)
Total transfers 0 (0 reads and 0 writes)

(scsi0:0:5:0)
Device using Narrow/Async transfers.
Transinfo settings: current(0/0/0/0), goal(0/0/0/0), user(25/15/0/0)
Total transfers 0 (0 reads and 0 writes)

---> After adding any device (even if the command failes or the added
device does not exist) I get the following:

Adaptec AIC7xxx driver version: 5.1.19/3.2.4
Compile Options:
TCQ Enabled By Default : Enabled
AIC7XXX_PROC_STATS : Disabled
AIC7XXX_RESET_DELAY : 5

Adapter Configuration:
SCSI Adapter: Adaptec AHA-294X SCSI host adapter
Narrow Controller
PCI MMAPed I/O Base: 0xe2000000
Adapter SEEPROM Config: SEEPROM found and used.
Adaptec SCSI BIOS: Enabled
IRQ: 16
SCBs: Active 0, Max Active 8,
Allocated 30, HW 16, Page 255
Interrupts: 3882
BIOS Control Word: 0x18b6
Adapter Control Word: 0x0058
Extended Translation: Enabled
Disconnect Enable Flags: 0x00ff
Tag Queue Enable Flags: 0x0000
Ordered Queue Tag Flags: 0x0003
Default Tag Queue Depth: 8
Tagged Queue By Device array for aic7xxx host instance 0:
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
Actual queue depth per device for aic7xxx host instance 0:
{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}

Statistics:

(scsi0:0:0:0)
Device using Narrow/Sync transfers at 10.0 MByte/sec, offset 15
Transinfo settings: current(25/15/0/0), goal(25/15/0/0), user(25/15/0/0)
Total transfers 2 (2 reads and 0 writes)

(scsi0:0:1:0)
Device using Narrow/Sync transfers at 10.0 MByte/sec, offset 15
Transinfo settings: current(25/15/0/0), goal(25/15/0/0), user(25/15/0/0)
Total transfers 3803 (3103 reads and 700 writes)

(scsi0:0:2:0)
Device using Narrow/Sync transfers at 10.0 MByte/sec, offset 15
Transinfo settings: current(25/15/0/0), goal(25/15/0/0), user(25/15/0/0)
Total transfers 0 (0 reads and 0 writes)

(scsi0:0:5:0)
Device using Narrow/Async transfers.
Transinfo settings: current(0/0/0/0), goal(0/0/0/0), user(25/15/0/0)
Total transfers 0 (0 reads and 0 writes)

---> These are my devices (the DAT is missing, it is on id 3 but was
switched off):
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: DORS-32160 Rev: WA6A
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: IBM Model: DCAS-34330 Rev: S65A
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: PIONEER Model: CD-ROM DR-U12X Rev: 1.06
Type: CD-ROM ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 05 Lun: 00
Vendor: IOMEGA Model: ZIP 100 Rev: J.02
Type: Direct-Access ANSI SCSI revision: 02

---> BTW: I'm not loosing TQC if I only remove a device via
remove-single-device.

I figured out that the "Tag Queue Enable Flags" change from 0x0003 to
0x0000 disabling the TCQ feature for my two disks (id 0 and 1). I fear a
certain performance degradation due to that. However, I was looking up the
code but could not determine if this "works as designed" or is simply a
bug. I also could not find a sysctl with which to set the "Tag Queue Enable
Flags" back to 0x0003.

I know that this enable/disable feature should still be considered beta
(regarding the comments in the source) but it is so extremely handy and
works so well except for the TQC loss...

Trying to understand the code I was coming up to the function scan_scsis()
which is called after reboot and whenever the driver rescans the bus (the
only difference is the 'hardcoded' flag param: 0 on boot, 1 on rescan).
Here I got lost in space...

I also found that /proc/scsi/aic7xxx/0 is writeable. Maybe that's were I
can reenable TCQ directly? But no readme, howto or the source revealed what
can be written to /proc/scsi/aic7xxx/0 or the syntax. I've tried the
commands that can be specified if aic7xxx is loaded as a module but that
didn't do anything. Does anybody know where to look this up?

So, if someone with a good understanding of the scsi driver (and/or the
aic7xxx driver) could you please put some light into this? I'd appreciate
this very much!!! Please let me know if you need more information. I'd also
do any testing necessary.

P.S.: Please cc me since I'm not subscribed to l-k. TIA.

Mit freundlichen Gruessen / best regards

Michael Kwasigroch
FaxPlus/Open Development
________________________________________

eMail: mkwasigr@intercope.com

INTERCOPE GmbH, Hamburg, Bebelallee 72

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/