]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
SCSI: qla1280: Fix queue depth problem
authorJeremy Higdon <jeremy@sgi.com>
Tue, 13 May 2008 19:10:09 +0000 (19:10 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 15 May 2008 14:50:07 +0000 (07:50 -0700)
commit76188088d6cbef84417e0a762c68de5801cb135c
treecbec176a67241fa13ef31d8b53b68057742b2548
parent05d5b6cf37de1a9ceb873b770de113861a5b3df9
SCSI: qla1280: Fix queue depth problem

commit af5741c6de4f4a1d8608b0f00867c77cb7123635 upstream

The qla1280 driver was ANDing the output value of mailbox register
0 with (1 << target-number) to determine whether to enable queueing
on the target in question.

But mailbox register 0 has the status code for the mailbox command
(in this case, Set Target Parameters).  Potential values are:
/*
 * ISP mailbox command complete status codes
 */

So clearly that is in error.  I can't think what the author of that
line was looking for in a mailbox register, so I just eliminated the
AND.  flag is used later in the function, and I think that the later
usage was also wrong, though it was used to set values that aren't
used.  Oh well, an overhaul of this driver is not what I want to do
now -- just a bugfix.

After the fix, I found that my disks were getting a queue depth of
255, which is far too many.  Most SCSI disks are limited to 32 or
64.  In any case, there's no point, queueing up a bunch of commands
to the adapter that will just result in queue full or starve other
targets from being issued commands due to running out of internal
memory.  So I dropped default queue depth to 32 (from which 1 is
subtracted elsewhere, giving net of 31).

I tested with a Seagate ST336753LC, and results look good, so
I'm satisfied with this patch.

Signed-off-by: Jeremy Higdon <jeremy@sgi.com>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/qla1280.c