summaryrefslogtreecommitdiff
path: root/drivers/scsi/be2iscsi/be_mgmt.c
diff options
context:
space:
mode:
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>2017-10-10 13:48:16 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2017-10-11 21:18:29 +0300
commit4788e732c39120e55762a7e296cf7dbdf366f44c (patch)
treee81a8b5c0deca346f1111374061e94afdb8c694d /drivers/scsi/be2iscsi/be_mgmt.c
parentc5905bf82287a9aada3e4b0b1d3425c6e1a91828 (diff)
downloadlinux-4788e732c39120e55762a7e296cf7dbdf366f44c.tar.xz
scsi: be2iscsi: Modify IOCTL to fetch user configured IQN
Add version 1 of GET_HBA_NAME to fetch port specific IQN first. If it fails use version 0 to get the IQN. To use this old IQN names of interfaces needs to be cleared from the iscsiadm database. Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_mgmt.c')
-rw-r--r--drivers/scsi/be2iscsi/be_mgmt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 0c25c105e44f..713c7de0ea2f 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -339,12 +339,14 @@ int beiscsi_modify_eq_delay(struct beiscsi_hba *phba,
* beiscsi_get_initiator_name - read initiator name from flash
* @phba: device priv structure
* @name: buffer pointer
+ * @cfg: fetch user configured
*
*/
-int beiscsi_get_initiator_name(struct beiscsi_hba *phba, char *name)
+int beiscsi_get_initiator_name(struct beiscsi_hba *phba, char *name, bool cfg)
{
struct be_dma_mem nonemb_cmd;
struct be_cmd_hba_name resp;
+ struct be_cmd_hba_name *req;
int rc;
rc = beiscsi_prep_nemb_cmd(phba, &nonemb_cmd, CMD_SUBSYSTEM_ISCSI_INI,
@@ -352,6 +354,9 @@ int beiscsi_get_initiator_name(struct beiscsi_hba *phba, char *name)
if (rc)
return rc;
+ req = nonemb_cmd.va;
+ if (cfg)
+ req->hdr.version = 1;
rc = beiscsi_exec_nemb_cmd(phba, &nonemb_cmd, NULL,
&resp, sizeof(resp));
if (rc) {