Linux-SCSI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] hpsa: correct ctrl queue depth
@ 2020-07-24 21:25 Don Brace
  2020-07-29  4:10 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Don Brace @ 2020-07-24 21:25 UTC (permalink / raw)
  To: Kevin.Barnett, scott.teel, Justin.Lindley, scott.benesh,
	bader.alisaleh, gerry.morong, mahesh.rajashekhara, hch, jejb,
	joseph.szczypek, POSWALD
  Cc: linux-scsi

 - 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>
---
 drivers/scsi/hpsa.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

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);
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] hpsa: correct ctrl queue depth
  2020-07-24 21:25 [PATCH] hpsa: correct ctrl queue depth Don Brace
@ 2020-07-29  4:10 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-07-29  4:10 UTC (permalink / raw)
  To: hch, gerry.morong, Justin.Lindley, joseph.szczypek, scott.benesh,
	mahesh.rajashekhara, POSWALD, scott.teel, jejb, Kevin.Barnett,
	Don Brace, bader.alisaleh
  Cc: Martin K . Petersen, linux-scsi

On Fri, 24 Jul 2020 16:25:08 -0500, Don Brace wrote:

>  - need to set queue depth for controller devices.
>  - corrects compiler warning in patch:
>    hpsa-increase-ctlr-eh-timeout

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: hpsa: Correct ctrl queue depth
      https://git.kernel.org/mkp/scsi/c/5759ff1131cd

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 21:25 [PATCH] hpsa: correct ctrl queue depth Don Brace
2020-07-29  4:10 ` Martin K. Petersen

Linux-SCSI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-scsi/0 linux-scsi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-scsi linux-scsi/ https://lore.kernel.org/linux-scsi \
		linux-scsi@vger.kernel.org
	public-inbox-index linux-scsi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-scsi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git