aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc.h
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2019-12-18 15:58:02 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-12-21 13:42:42 -0500
commite3ba04c9bad1d1c7f15df43da25e878045150777 (patch)
treecace08182383c0910bbca4494f7db3fcf10a50e6 /drivers/scsi/lpfc/lpfc.h
parentscsi: lpfc: Fix missing check for CSF in Write Object Mbox Rsp (diff)
downloadlinux-dev-e3ba04c9bad1d1c7f15df43da25e878045150777.tar.xz
linux-dev-e3ba04c9bad1d1c7f15df43da25e878045150777.zip
scsi: lpfc: Fix Fabric hostname registration if system hostname changes
There are reports of multiple ports on the same system displaying different hostnames in fabric FDMI displays. Currently, the driver registers the hostname at initialization and obtains the hostname via init_utsname()->nodename queried at the time the FC link comes up. Unfortunately, if the machine hostname is updated after initialization, such as via DHCP or admin command, the value registered initially will be incorrect. Fix by having the driver save the hostname that was registered with FDMI. The driver then runs a heartbeat action that will check the hostname. If the name changes, reregister the FMDI data. The hostname is used in RSNN_NN, FDMI RPA and FDMI RHBA. Link: https://lore.kernel.org/r/20191218235808.31922-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/lpfc/lpfc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 935f98804198..04d73e2be373 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -1223,6 +1223,8 @@ struct lpfc_hba {
#define LPFC_POLL_HB 1 /* slowpath heartbeat */
#define LPFC_POLL_FASTPATH 0 /* called from fastpath */
#define LPFC_POLL_SLOWPATH 1 /* called from slowpath */
+
+ char os_host_name[MAXHOSTNAMELEN];
};
static inline struct Scsi_Host *