(bsd)8xx driver: problems when disabling tagged queue

Gerard Roudier (groudier@club-internet.fr)
Mon, 8 Jul 1996 00:00:57 +0000 (GMT)


If you tried to disable tagged command queuing at run time ("settags target
0"), you probably have had problems.
Once tagged queue is enabled, you must not disable this feature.

Here is a little patch that ensure this:

--- /tmp/linux/drivers/scsi/ncr53c8xx.c Sat Jul 6 16:09:02 1996
+++ linux/drivers/scsi/ncr53c8xx.c Sun Jul 7 23:11:23 1996
@@ -8023,6 +8023,12 @@

+ /*
+ ** Not allow to disable tagged queue
+ */
+ if (uc->cmd == UC_SETTAGS && uc->data < 1)
+ return -EINVAL;
if (len)
return -EINVAL;

In fact it is an adaptation of the original driver that I have missed.
Under Linux, it is not (yet) possible to tune the device queue depth
(opennings under FreeBSD) dynamically. We only can announce the value at
scsi initialization step. The max number of commands that can be queued
by the driver to the controller for a target/lun (and then to the device if
disconnections are allowed) is the number of CCB allocated for that device.
So, if there is more than 1 CCB allocated and tagged queue is disable,
the driver may try to send more than 1 untagged command to a device, and
that's quite wrong.

I have added control commands through the proc fs last month. Without
this facility, it was only possible to enable/disable tagged command
queuing statically at "make config" step and so this problem could not

Regards, Gerard.