public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: <jinpu.wang@cloud.ionos.com>, <jejb@linux.ibm.com>,
	<martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<hare@suse.de>, <damien.lemoal@opensource.wdc.com>,
	<Ajish.Koshy@microchip.com>, John Garry <john.garry@huawei.com>
Subject: [PATCH 1/4] scsi: pm8001: Rework shost initial values
Date: Sat, 11 Jun 2022 00:46:39 +0800	[thread overview]
Message-ID: <1654879602-33497-2-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1654879602-33497-1-git-send-email-john.garry@huawei.com>

Some values in pm8001_prep_sas_ha_init() are set the same as they would be
set in scsi_host_alloc(), or could be in the sht (which would be better),
or later just overwritten, so rework the following:
- cmd_per_lun can be set in the sht
- max_lun and max_channel are as scsi_host_alloc() (so no need to set)
- can_queue is later overwritten (so don't set in
  pm8001_prep_sas_ha_init())

Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/pm8001/pm8001_init.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 9b04f1a6a67d..4288c6b8f041 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -109,6 +109,7 @@ static struct scsi_host_template pm8001_sht = {
 #endif
 	.shost_groups		= pm8001_host_groups,
 	.track_queue_depth	= 1,
+	.cmd_per_lun		= 32,
 };
 
 /*
@@ -605,12 +606,8 @@ static int pm8001_prep_sas_ha_init(struct Scsi_Host *shost,
 
 	shost->transportt = pm8001_stt;
 	shost->max_id = PM8001_MAX_DEVICES;
-	shost->max_lun = 8;
-	shost->max_channel = 0;
 	shost->unique_id = pm8001_id;
 	shost->max_cmd_len = 16;
-	shost->can_queue = PM8001_CAN_QUEUE;
-	shost->cmd_per_lun = 32;
 	return 0;
 exit_free1:
 	kfree(arr_port);
-- 
2.26.2


  reply	other threads:[~2022-06-10 16:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 16:46 [PATCH 0/4] pm8001 driver improvements John Garry
2022-06-10 16:46 ` John Garry [this message]
2022-06-13  6:39   ` [PATCH 1/4] scsi: pm8001: Rework shost initial values Jinpu Wang
2022-06-10 16:46 ` [PATCH 2/4] scsi: pm8001: Setup tags before using them John Garry
2022-06-10 16:46 ` [PATCH 3/4] scsi: pm8001: Use non-atomic bitmap ops for tag alloc + free John Garry
2022-06-20  6:00   ` Hannes Reinecke
2022-06-20  6:07     ` Damien Le Moal
2022-06-20  6:53       ` Jinpu Wang
2022-06-20  7:40       ` John Garry
2022-06-10 16:46 ` [PATCH 4/4] scsi: pm8001: Expose HW queues for pm80xx hw John Garry
2022-06-13  7:28 ` [PATCH 0/4] pm8001 driver improvements Damien Le Moal
2022-06-17  1:45 ` Martin K. Petersen
2022-06-22  2:10 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1654879602-33497-2-git-send-email-john.garry@huawei.com \
    --to=john.garry@huawei.com \
    --cc=Ajish.Koshy@microchip.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hare@suse.de \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox