Skip to contentSkip to conversation

qedf: Update the max_id value in host structure.

PATCH Applied Javed Hasan 3 participants 4 messages Jun 2, 2021 – Jun 16, 2021

Subsystems (2)
lore
Share & tools
lore

Javed Hasan

author maintainer
#0 lore raw

PATCH v2 1/1 qedf: Update the max_id value in host structure.

From: Saurav Kashyap <[email protected]>

The max_id value defines the max id of the target that stack can scan during manual scanning through scsi_host sysfs interface. If default value is 8, update the value to the max sessions driver support.

---
Changes in v2:
- Added description and signed-off.

---
 drivers/scsi/qedf/qedf_main.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/scsi/qedf/qedf_main.c +2 -0
index c5f37277..322046f4 100644
@@ -2089,6 +2089,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
 	vn_port->host->max_lun = qedf_max_lun;
 	vn_port->host->sg_tablesize = QEDF_MAX_BDS_PER_CMD;
 	vn_port->host->max_cmd_len = QEDF_MAX_CDB_LEN;
+	vn_port->host->max_id = QEDF_MAX_SESSIONS;
 
 	rc = scsi_add_host(vn_port->host, &vport->dev);
 	if (rc) {
@@ -3855,6 +3856,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
 		host->transportt = qedf_fc_transport_template;
 		host->max_lun = qedf_max_lun;
 		host->max_cmd_len = QEDF_MAX_CDB_LEN;
+		host->max_id = QEDF_MAX_SESSIONS;
 #ifdef USE_BLK_MQ
 		host->use_blk_mq = qedf_use_blk_mq;
 		if (shost_use_blk_mq(host)) {
Signature · 1 line
2.18.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 29 lines · Javed Hasan

From: Saurav Kashyap <[email protected]>

The max_id value defines the max id of the target that stack can scan during manual scanning through scsi_host sysfs interface. If default value is 8, update the value to the max sessions driver support.

---
Changes in v2:
- Added description and signed-off.

---
  drivers/scsi/qedf/qedf_main.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/scsi/qedf/qedf_main.c +1 -0
index c5f37277..322046f4 100644
@@ -2089,6 +2089,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
  	vn_port->host->max_lun = qedf_max_lun;
  	vn_port->host->sg_tablesize = QEDF_MAX_BDS_PER_CMD;
  	vn_port->host->max_cmd_len = QEDF_MAX_CDB_LEN;
+	vn_port->host->max_id = QEDF_MAX_SESSIONS;
 
  	rc = scsi_add_host(vn_port->host, &vport->dev);
  	if (rc) {

drivers/scsi/qedf/qedf_main.c static int __qedf_probe(struct pci_dev *pdev, int mode) · line 3862

Quoted 7 lines
drivers/scsi/qedf/qedf_main.c +1 -0
@@ -3855,6 +3856,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
  		host->transportt = qedf_fc_transport_template;
  		host->max_lun = qedf_max_lun;
  		host->max_cmd_len = QEDF_MAX_CDB_LEN;
+		host->max_id = QEDF_MAX_SESSIONS;
  #ifdef USE_BLK_MQ
  		host->use_blk_mq = qedf_use_blk_mq;
  		if (shost_use_blk_mq(host)) {
Signature · 1 line
Himanshu Madhani                                Oracle Linux Engineering
#2 lore raw
In reply to Javed Hasan

Javed,

Quoted 3 lines

The max_id value defines the max id of the target that stack can scan during manual scanning through scsi_host sysfs interface. If default value is 8, update the value to the max sessions driver support.

Applied to 5.14/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#3 lore raw
In reply to Javed Hasan
Quoted 3 lines · Javed Hasan

The max_id value defines the max id of the target that stack can scan during manual scanning through scsi_host sysfs interface. If default value is 8, update the value to the max sessions driver support.

Applied to 5.14/scsi-queue, thanks!

[1/1] qedf: Update the max_id value in host structure.

      https://git.kernel.org/mkp/scsi/c/1b67f3d74e45
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering