diff options
author | Jeremy Higdon <jeremy@sgi.com> | 2008-05-12 02:17:03 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-05-13 13:16:23 -0400 |
commit | af5741c6de4f4a1d8608b0f00867c77cb7123635 (patch) | |
tree | d796f70265dd1d6ffeabf47264b16ded012242c0 /drivers/scsi/qla1280.c | |
parent | 64976a0387835a7ac61bbe2a99b27ccae34eac5d (diff) |
[SCSI] qla1280: Fix queue depth problem
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>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla1280.c')
-rw-r--r-- | drivers/scsi/qla1280.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index fa060932d2b4..51e2f299dbbb 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -2007,7 +2007,7 @@ qla1280_set_defaults(struct scsi_qla_host *ha) | |||
2007 | nv->bus[bus].config_2.req_ack_active_negation = 1; | 2007 | nv->bus[bus].config_2.req_ack_active_negation = 1; |
2008 | nv->bus[bus].config_2.data_line_active_negation = 1; | 2008 | nv->bus[bus].config_2.data_line_active_negation = 1; |
2009 | nv->bus[bus].selection_timeout = 250; | 2009 | nv->bus[bus].selection_timeout = 250; |
2010 | nv->bus[bus].max_queue_depth = 256; | 2010 | nv->bus[bus].max_queue_depth = 32; |
2011 | 2011 | ||
2012 | if (IS_ISP1040(ha)) { | 2012 | if (IS_ISP1040(ha)) { |
2013 | nv->bus[bus].bus_reset_delay = 3; | 2013 | nv->bus[bus].bus_reset_delay = 3; |
@@ -2051,7 +2051,7 @@ qla1280_config_target(struct scsi_qla_host *ha, int bus, int target) | |||
2051 | status = qla1280_mailbox_command(ha, 0x0f, mb); | 2051 | status = qla1280_mailbox_command(ha, 0x0f, mb); |
2052 | 2052 | ||
2053 | /* Save Tag queuing enable flag. */ | 2053 | /* Save Tag queuing enable flag. */ |
2054 | flag = (BIT_0 << target) & mb[0]; | 2054 | flag = (BIT_0 << target); |
2055 | if (nv->bus[bus].target[target].parameter.tag_queuing) | 2055 | if (nv->bus[bus].target[target].parameter.tag_queuing) |
2056 | ha->bus_settings[bus].qtag_enables |= flag; | 2056 | ha->bus_settings[bus].qtag_enables |= flag; |
2057 | 2057 | ||