Commit 118f01e7 authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Fix RIDA Format-2

This patch fixes offset for Format-2 data structure for Report ID
Acquisition. This caused driver to set remote_nport_id to 0x0000 in N2N
configuration. In a scenario where initiator's WWPN is higher than target's
WWPN, driver will assign 0x00 as target nport-id, which results into login
failure.

Link: https://lore.kernel.org/r/20191217220617.28084-12-hmadhani@marvell.comSigned-off-by: default avatarQuinn Tran <qutran@marvell.com>
Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f994c6d1
...@@ -1354,12 +1354,12 @@ struct vp_rpt_id_entry_24xx { ...@@ -1354,12 +1354,12 @@ struct vp_rpt_id_entry_24xx {
uint8_t port_id[3]; uint8_t port_id[3];
uint8_t format; uint8_t format;
union { union {
struct { struct _f0 {
/* format 0 loop */ /* format 0 loop */
uint8_t vp_idx_map[16]; uint8_t vp_idx_map[16];
uint8_t reserved_4[32]; uint8_t reserved_4[32];
} f0; } f0;
struct { struct _f1 {
/* format 1 fabric */ /* format 1 fabric */
uint8_t vpstat1_subcode; /* vp_status=1 subcode */ uint8_t vpstat1_subcode; /* vp_status=1 subcode */
uint8_t flags; uint8_t flags;
...@@ -1381,10 +1381,10 @@ struct vp_rpt_id_entry_24xx { ...@@ -1381,10 +1381,10 @@ struct vp_rpt_id_entry_24xx {
uint16_t bbcr; uint16_t bbcr;
uint8_t reserved_5[6]; uint8_t reserved_5[6];
} f1; } f1;
struct { /* format 2: N2N direct connect */ struct _f2 { /* format 2: N2N direct connect */
uint8_t vpstat1_subcode; uint8_t vpstat1_subcode;
uint8_t flags; uint8_t flags;
uint16_t rsv6; uint16_t fip_flags;
uint8_t rsv2[12]; uint8_t rsv2[12];
uint8_t ls_rjt_vendor; uint8_t ls_rjt_vendor;
...@@ -1394,8 +1394,9 @@ struct vp_rpt_id_entry_24xx { ...@@ -1394,8 +1394,9 @@ struct vp_rpt_id_entry_24xx {
uint8_t port_name[8]; uint8_t port_name[8];
uint8_t node_name[8]; uint8_t node_name[8];
uint16_t bbcr;
uint8_t reserved_5[2];
uint8_t remote_nport_id[4]; uint8_t remote_nport_id[4];
uint32_t reserved_5;
} f2; } f2;
} u; } u;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment