* [bug report] scsi: hpsa: Increase controller error handling timeout
@ 2020-07-27 11:19 dan.carpenter
2020-07-27 14:31 ` Don.Brace
0 siblings, 1 reply; 2+ messages in thread
From: dan.carpenter @ 2020-07-27 11:19 UTC (permalink / raw)
To: don.brace; +Cc: esc.storagedev, linux-scsi
Hello Don Brace,
The patch c73deaf3b001: "scsi: hpsa: Increase controller error
handling timeout" from Jul 20, 2020, leads to the following static
checker warning:
drivers/scsi/hpsa.c:2163 hpsa_slave_configure()
error: uninitialized symbol 'queue_depth'.
drivers/scsi/hpsa.c
2136 /* configure scsi device based on internal per-device structure */
2137 #define CTLR_TIMEOUT (120 * HZ)
2138 static int hpsa_slave_configure(struct scsi_device *sdev)
2139 {
2140 struct hpsa_scsi_dev_t *sd;
2141 int queue_depth;
^^^^^^^^^^^^^^^
2142
2143 sd = sdev->hostdata;
2144 sdev->no_uld_attach = !sd || !sd->expose_device;
2145
2146 if (sd) {
2147 sd->was_removed = 0;
2148 if (sd->external) {
2149 queue_depth = EXTERNAL_QD;
2150 sdev->eh_timeout = HPSA_EH_PTRAID_TIMEOUT;
2151 blk_queue_rq_timeout(sdev->request_queue,
2152 HPSA_EH_PTRAID_TIMEOUT);
2153 } else if (is_hba_lunid(sd->scsi3addr)) {
2154 sdev->eh_timeout = CTLR_TIMEOUT;
2155 blk_queue_rq_timeout(sdev->request_queue, CTLR_TIMEOUT);
Not set on this path.
2156 } else {
2157 queue_depth = sd->queue_depth != 0 ?
2158 sd->queue_depth : sdev->host->can_queue;
2159 }
2160 } else
2161 queue_depth = sdev->host->can_queue;
2162
2163 scsi_change_queue_depth(sdev, queue_depth);
^^^^^^^^^^^
2164
2165 return 0;
2166 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [bug report] scsi: hpsa: Increase controller error handling timeout
2020-07-27 11:19 [bug report] scsi: hpsa: Increase controller error handling timeout dan.carpenter
@ 2020-07-27 14:31 ` Don.Brace
0 siblings, 0 replies; 2+ messages in thread
From: Don.Brace @ 2020-07-27 14:31 UTC (permalink / raw)
To: dan.carpenter, don.brace; +Cc: esc.storagedev, linux-scsi
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of dan.carpenter@oracle.com
Sent: Monday, July 27, 2020 6:19 AM
To: don.brace@microsemi.com
Hello Don Brace,
The patch c73deaf3b001: "scsi: hpsa: Increase controller error handling timeout" from Jul 20, 2020, leads to the following static checker warning:
drivers/scsi/hpsa.c:2163 hpsa_slave_configure()
error: uninitialized symbol 'queue_depth'.
I uploaded the patch bellow on Friday to correct this.
I should have asked for the patch to be squashed into this patch.
commit e5ad119720fd64cb7dd1fdd41e12f2fa5655b608
Author: Don Brace <don.brace@microsemi.com>
Date: Fri Jul 24 15:26:39 2020 -0500
hpsa: correct ctrl queue depth
- need to set queue depth for controller devices.
- corrects compiler warning in patch:
hpsa-increase-ctlr-eh-timeout
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 90c36d75bf92..91794a50b31f 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2145,20 +2145,21 @@ static int hpsa_slave_configure(struct scsi_device *sdev)
if (sd) {
sd->was_removed = 0;
+ queue_depth = sd->queue_depth != 0 ?
+ sd->queue_depth : sdev->host->can_queue;
if (sd->external) {
queue_depth = EXTERNAL_QD;
sdev->eh_timeout = HPSA_EH_PTRAID_TIMEOUT;
blk_queue_rq_timeout(sdev->request_queue,
HPSA_EH_PTRAID_TIMEOUT);
- } else if (is_hba_lunid(sd->scsi3addr)) {
+ }
+ if (is_hba_lunid(sd->scsi3addr)) {
sdev->eh_timeout = CTLR_TIMEOUT;
blk_queue_rq_timeout(sdev->request_queue, CTLR_TIMEOUT);
- } else {
- queue_depth = sd->queue_depth != 0 ?
- sd->queue_depth : sdev->host->can_queue;
}
- } else
+ } else {
queue_depth = sdev->host->can_queue;
+ }
scsi_change_queue_depth(sdev, queue_depth);
regards,
dan carpenter
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-27 14:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-27 11:19 [bug report] scsi: hpsa: Increase controller error handling timeout dan.carpenter
2020-07-27 14:31 ` Don.Brace
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox