]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scsi: lpfc: Fix Fabric hostname registration if system hostname changes
authorJames Smart <jsmart2021@gmail.com>
Wed, 18 Dec 2019 23:58:02 +0000 (15:58 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 7 Apr 2020 15:40:13 +0000 (10:40 -0500)
commit8d291637e21c4596393ce1f67b5376cd4702b10d
treeaf898eeebe30c3a17759d4b3d06a41db088e1ab6
parentc7f141b558f6ceef9e23d45c27e5da244dcd4055
scsi: lpfc: Fix Fabric hostname registration if system hostname changes

BugLink: https://bugs.launchpad.net/bugs/1855303
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>
(cherry picked from commit e3ba04c9bad1d1c7f15df43da25e878045150777)
Signed-off-by: Vignesh Gunasekaran <vignesh.gunasekaran@broadcom.com>
Signed-off-by: Jeff Lane <jeffrey.lane@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_crtn.h
drivers/scsi/lpfc/lpfc_ct.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_init.c