scsi: mpi3mr: Set the WriteSame Divert Capability in the IOCInit MPI Request
authorRanjan Kumar <ranjan.kumar@broadcom.com>
Wed, 13 Mar 2024 10:07:43 +0000 (15:37 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 25 Mar 2024 22:14:32 +0000 (18:14 -0400)
Modify driver to set the Write Same Divert Capability bit in the IOCInit
message for the firmware to know that the driver is capable of diverting
certain Write Same commands as defined by the MPI specification.

Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com>
Link: https://lore.kernel.org/r/20240313100746.128951-5-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpi3mr/mpi/mpi30_ioc.h
drivers/scsi/mpi3mr/mpi3mr_fw.c

index 0cb24fc03620058cf1f760e3e451cab0422cc899..85b91583bacfe597384b05309b975f7242216e5c 100644 (file)
@@ -27,7 +27,7 @@ struct mpi3_ioc_init_request {
        __le64                   sense_buffer_free_queue_address;
        __le64                   driver_information_address;
 };
-
+#define MPI3_IOCINIT_MSGFLAGS_WRITESAMEDIVERT_SUPPORTED                (0x08)
 #define MPI3_IOCINIT_MSGFLAGS_SCSIIOSTATUSREPLY_SUPPORTED      (0x04)
 #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_MASK          (0x03)
 #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_NOT_USED      (0x00)
index a21fbff60b590fc2bb837ec4cb2cc4efb6674a91..ae0e2c6cd2af6b88fdc9335e29a53f8d037bf972 100644 (file)
@@ -3302,6 +3302,8 @@ static int mpi3mr_issue_iocinit(struct mpi3mr_ioc *mrioc)
 
        iocinit_req.msg_flags |=
            MPI3_IOCINIT_MSGFLAGS_SCSIIOSTATUSREPLY_SUPPORTED;
+       iocinit_req.msg_flags |=
+               MPI3_IOCINIT_MSGFLAGS_WRITESAMEDIVERT_SUPPORTED;
 
        init_completion(&mrioc->init_cmds.done);
        retval = mpi3mr_admin_request_post(mrioc, &iocinit_req,