Tagged Command Queueing (TCQ) is a cool part of SCSI-2 that allows the controller to issue commands to a device on the chain, but issue another command before the first one completes. Some older drives don’t support this, though. On a default Red Hat 8.0 install, I ran into this with a ST15150 Seagate Barracuda drive. You can check out the status of your adapter and the queueing:
cat /proc/scsi/aic7xxx/0 . . . Channel A Target 4 Negotiation Settings User: 10.000MB/s transfers (10.000MHz, offset 255) Goal: 10.000MB/s transfers (10.000MHz, offset 15) Curr: 10.000MB/s transfers (10.000MHz, offset 15) Channel A Target 4 Lun 0 Settings Commands Queued 6130 Commands Active 0 Command Openings 253 Max Tagged Openings 253 Device Queue Frozen Count 0 . . .
There is an option to the aic7xxx driver that can supposedly disable TCQ for a particular device, but we had some difficulties with this approach. For those of you who are interested in trying the module approach, check out the tag_info option in drivers/scsi/README.aic7xxx. One freaky thing about this option is that you need to convert commas to periods and mess with quotes because insmod has troubles with distinguishing options in a list with commas. Also, remember that on most systems you will need to modify initrd.x.x.x.img. Add your options line to /etc/modules.conf, and then run mkinitrd to create a new initrd image.
We also have an old Adaptec 2940. The aic7xxx_old driver seems to work better with our drive, and, you can disable TCQ easily with an option in the kernel compile. I decided to strip down and create a monolithic kernel to solve the TCQ issue. Here is a .config file for the trimmed down 2.4.20 kernel I created. Just put this in /usr/src/linux and run make oldconfig, make dep clean bzImage, etc. Note that this does not have IDE support. Also, it includes an NFS client and the Packet socket ( af_packet) option. This is required because /etc/sysconfig/network-scripts/ifup has a test using arping that needs it. If you just comment out the test in ifup, the interface will come up fine, otherwise you will get errors about a duplicate address.