Skip to content

Commit 51abb2a

Browse files
James Smartgregkh
authored andcommitted
scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload
[ Upstream commit e0165f20447c8ca1d367725ee94d8ec9f38ca275 ] Clear the VendorVersion in the PLOGI/PLOGI ACC payload Vendor version info may have been set on fabric login. Before sending PLOGI payloads, ensure that it's cleared. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8d8723c commit 51abb2a

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,6 +1982,9 @@ lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry)
19821982
if (sp->cmn.fcphHigh < FC_PH3)
19831983
sp->cmn.fcphHigh = FC_PH3;
19841984

1985+
sp->cmn.valid_vendor_ver_level = 0;
1986+
memset(sp->vendorVersion, 0, sizeof(sp->vendorVersion));
1987+
19851988
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
19861989
"Issue PLOGI: did:x%x",
19871990
did, 0, 0);
@@ -3966,6 +3969,9 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
39663969
} else {
39673970
memcpy(pcmd, &vport->fc_sparam,
39683971
sizeof(struct serv_parm));
3972+
3973+
sp->cmn.valid_vendor_ver_level = 0;
3974+
memset(sp->vendorVersion, 0, sizeof(sp->vendorVersion));
39693975
}
39703976

39713977
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP,

drivers/scsi/lpfc/lpfc_hw.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,12 @@ struct csp {
360360
* Word 1 Bit 30 in PLOGI request is random offset
361361
*/
362362
#define virtual_fabric_support randomOffset /* Word 1, bit 30 */
363+
/*
364+
* Word 1 Bit 29 in common service parameter is overloaded.
365+
* Word 1 Bit 29 in FLOGI response is multiple NPort assignment
366+
* Word 1 Bit 29 in FLOGI/PLOGI request is Valid Vendor Version Level
367+
*/
368+
#define valid_vendor_ver_level response_multiple_NPort /* Word 1, bit 29 */
363369
#ifdef __BIG_ENDIAN_BITFIELD
364370
uint16_t request_multiple_Nport:1; /* FC Word 1, bit 31 */
365371
uint16_t randomOffset:1; /* FC Word 1, bit 30 */

0 commit comments

Comments
 (0)