lkml.org 
[lkml]   [2017]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL for-4.4 21/39] scsi: lpfc: Clear the VendorVersion in the PLOGI/PLOGI ACC payload
    Date
    From: James Smart <james.smart@broadcom.com>

    [ 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>
    ---
    drivers/scsi/lpfc/lpfc_els.c | 6 ++++++
    drivers/scsi/lpfc/lpfc_hw.h | 6 ++++++
    2 files changed, 12 insertions(+)

    diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
    index c74f74ab981c..d278362448ca 100644
    --- a/drivers/scsi/lpfc/lpfc_els.c
    +++ b/drivers/scsi/lpfc/lpfc_els.c
    @@ -1982,6 +1982,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);
    @@ -3966,6 +3969,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,
    diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
    index 2cce88e967ce..a8ad97300177 100644
    --- a/drivers/scsi/lpfc/lpfc_hw.h
    +++ b/drivers/scsi/lpfc/lpfc_hw.h
    @@ -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 */
    --
    2.11.0
    \
     
     \ /
      Last update: 2017-11-08 21:53    [W:5.125 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site