]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: qla2xxx: Use correct feature type field during RFF_ID processing
authorManish Rangankar <mrangankar@marvell.com>
Thu, 10 Mar 2022 09:26:02 +0000 (01:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Apr 2022 12:14:57 +0000 (14:14 +0200)
commit a7e05f7a1bcbe4ee055479242de46c5c16ab03b1 upstream.

During SNS Register FC-4 Features (RFF_ID) the initiator driver was sending
incorrect type field for NVMe supported device. Use correct feature type
field.

Link: https://lore.kernel.org/r/20220310092604.22950-12-njavali@marvell.com
Fixes: e374f9f59281 ("scsi: qla2xxx: Migrate switch registration commands away from mailbox interface")
Cc: stable@vger.kernel.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_gs.c

index c3195d4c25e5c3251bd6f6afae5f1ade10473c25..ba695d6482090cabb09e6556ed6beb713b9188eb 100644 (file)
@@ -691,8 +691,7 @@ qla2x00_rff_id(scsi_qla_host_t *vha, u8 type)
                return (QLA_SUCCESS);
        }
 
-       return qla_async_rffid(vha, &vha->d_id, qlt_rff_id(vha),
-           FC4_TYPE_FCP_SCSI);
+       return qla_async_rffid(vha, &vha->d_id, qlt_rff_id(vha), type);
 }
 
 static int qla_async_rffid(scsi_qla_host_t *vha, port_id_t *d_id,
@@ -744,7 +743,7 @@ static int qla_async_rffid(scsi_qla_host_t *vha, port_id_t *d_id,
        ct_req->req.rff_id.port_id[1] = d_id->b.area;
        ct_req->req.rff_id.port_id[2] = d_id->b.al_pa;
        ct_req->req.rff_id.fc4_feature = fc4feature;
-       ct_req->req.rff_id.fc4_type = fc4type;          /* SCSI - FCP */
+       ct_req->req.rff_id.fc4_type = fc4type;          /* SCSI-FCP or FC-NVMe */
 
        sp->u.iocb_cmd.u.ctarg.req_size = RFF_ID_REQ_SIZE;
        sp->u.iocb_cmd.u.ctarg.rsp_size = RFF_ID_RSP_SIZE;