scsi: ibmvfc: Avoid unnecessary port relogin
authorBrian King <brking@linux.vnet.ibm.com>
Wed, 14 Mar 2018 22:13:39 +0000 (17:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Nov 2018 13:52:45 +0000 (14:52 +0100)
commit5aa0d86363b2f89789619907dd6f886989eb1c4a
tree8dbb52e8a4cec5f5da2194062a6e31de0ba54911
parent07e2121f4f2b8f6534a3dc42d67fd32403c6b65e
scsi: ibmvfc: Avoid unnecessary port relogin

[ Upstream commit 09dd15e0d9547ca424de4043bcd429bab6f285c8 ]

Following an RSCN, ibmvfc will issue an ADISC to determine if the
underlying target has changed, comparing the SCSI ID, WWPN, and WWNN to
determine how to handle the rport in discovery. However, the comparison
of the WWPN and WWNN was performing a memcmp between a big endian field
against a CPU endian field, which resulted in the wrong answer on LE
systems. This was observed as unexpected errors getting logged at boot
time as targets were getting relogins when not needed.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/ibmvscsi/ibmvfc.c