scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload
authorJames Smart <james.smart@broadcom.com>
Mon, 19 Dec 2016 23:07:20 +0000 (15:07 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 5 Jan 2017 05:21:11 +0000 (00:21 -0500)
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>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_hw.h

index 236e4e51d1617243d279d09089d95bb50c0a09d6..27f0cbb9b278e95ee43d088447805e600d64a26c 100644 (file)
@@ -1999,6 +1999,9 @@ lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry)
        if (sp->cmn.fcphHigh < FC_PH3)
                sp->cmn.fcphHigh = FC_PH3;
 
+       sp->cmn.valid_vendor_ver_level = 0;
+       memset(sp->vendorVersion, 0, sizeof(sp->vendorVersion));
+
        lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
                "Issue PLOGI:     did:x%x",
                did, 0, 0);
@@ -3988,6 +3991,9 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
                } else {
                        memcpy(pcmd, &vport->fc_sparam,
                               sizeof(struct serv_parm));
+
+                       sp->cmn.valid_vendor_ver_level = 0;
+                       memset(sp->vendorVersion, 0, sizeof(sp->vendorVersion));
                }
 
                lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP,
index 822654322e67896b68a6fd2e023ebfbc7546ca04..3b970d3706008cc01604946419bbaa99dfc73798 100644 (file)
@@ -360,6 +360,12 @@ struct csp {
  * Word 1 Bit 30 in PLOGI request is random offset
  */
 #define virtual_fabric_support randomOffset /* Word 1, bit 30 */
+/*
+ * Word 1 Bit 29 in common service parameter is overloaded.
+ * Word 1 Bit 29 in FLOGI response is multiple NPort assignment
+ * Word 1 Bit 29 in FLOGI/PLOGI request is Valid Vendor Version Level
+ */
+#define valid_vendor_ver_level response_multiple_NPort /* Word 1, bit 29 */
 #ifdef __BIG_ENDIAN_BITFIELD
        uint16_t request_multiple_Nport:1;      /* FC Word 1, bit 31 */
        uint16_t randomOffset:1;        /* FC Word 1, bit 30 */