Skip to content

Commit e84d343

Browse files
Merge branch '6.8/s/mpi3mr2' into 6.8/scsi-staging
Two driver updates from Chandrakanth patil at Broadcom: scsi: mpi3mr: Update driver version to 8.5.1.0.0 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-3 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-2 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-1 scsi: mpi3mr: Fetch correct device dev handle for status reply descriptor scsi: mpi3mr: Block PEL Enable Command on Controller Reset and Unrecoverable State scsi: mpi3mr: Clean up block devices post controller reset scsi: mpi3mr: Refresh sdev queue depth after controller reset Signed-off-by: Martin K. Petersen <[email protected]>
2 parents f200dad + d0a60e3 commit e84d343

File tree

5 files changed

+583
-118
lines changed

5 files changed

+583
-118
lines changed

drivers/scsi/mpi3mr/mpi3mr.h

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ extern struct list_head mrioc_list;
5555
extern int prot_mask;
5656
extern atomic64_t event_counter;
5757

58-
#define MPI3MR_DRIVER_VERSION "8.5.0.0.50"
59-
#define MPI3MR_DRIVER_RELDATE "22-November-2023"
58+
#define MPI3MR_DRIVER_VERSION "8.5.1.0.0"
59+
#define MPI3MR_DRIVER_RELDATE "5-December-2023"
6060

6161
#define MPI3MR_DRIVER_NAME "mpi3mr"
6262
#define MPI3MR_DRIVER_LICENSE "GPL"
@@ -218,14 +218,16 @@ extern atomic64_t event_counter;
218218
* @length: SGE length
219219
* @rsvd: Reserved
220220
* @rsvd1: Reserved
221-
* @sgl_type: sgl type
221+
* @sub_type: sgl sub type
222+
* @type: sgl type
222223
*/
223224
struct mpi3mr_nvme_pt_sge {
224-
u64 base_addr;
225-
u32 length;
225+
__le64 base_addr;
226+
__le32 length;
226227
u16 rsvd;
227228
u8 rsvd1;
228-
u8 sgl_type;
229+
u8 sub_type:4;
230+
u8 type:4;
229231
};
230232

231233
/**
@@ -247,6 +249,8 @@ struct mpi3mr_buf_map {
247249
u32 kern_buf_len;
248250
dma_addr_t kern_buf_dma;
249251
u8 data_dir;
252+
u16 num_dma_desc;
253+
struct dma_memory_desc *dma_desc;
250254
};
251255

252256
/* IOC State definitions */
@@ -477,6 +481,10 @@ struct mpi3mr_throttle_group_info {
477481
/* HBA port flags */
478482
#define MPI3MR_HBA_PORT_FLAG_DIRTY 0x01
479483

484+
/* IOCTL data transfer sge*/
485+
#define MPI3MR_NUM_IOCTL_SGE 256
486+
#define MPI3MR_IOCTL_SGE_SIZE (8 * 1024)
487+
480488
/**
481489
* struct mpi3mr_hba_port - HBA's port information
482490
* @port_id: Port number
@@ -1042,6 +1050,11 @@ struct scmd_priv {
10421050
* @sas_node_lock: Lock to protect SAS node list
10431051
* @hba_port_table_list: List of HBA Ports
10441052
* @enclosure_list: List of Enclosure objects
1053+
* @ioctl_dma_pool: DMA pool for IOCTL data buffers
1054+
* @ioctl_sge: DMA buffer descriptors for IOCTL data
1055+
* @ioctl_chain_sge: DMA buffer descriptor for IOCTL chain
1056+
* @ioctl_resp_sge: DMA buffer descriptor for Mgmt cmd response
1057+
* @ioctl_sges_allocated: Flag for IOCTL SGEs allocated or not
10451058
*/
10461059
struct mpi3mr_ioc {
10471060
struct list_head list;
@@ -1227,6 +1240,12 @@ struct mpi3mr_ioc {
12271240
spinlock_t sas_node_lock;
12281241
struct list_head hba_port_table_list;
12291242
struct list_head enclosure_list;
1243+
1244+
struct dma_pool *ioctl_dma_pool;
1245+
struct dma_memory_desc ioctl_sge[MPI3MR_NUM_IOCTL_SGE];
1246+
struct dma_memory_desc ioctl_chain_sge;
1247+
struct dma_memory_desc ioctl_resp_sge;
1248+
bool ioctl_sges_allocated;
12301249
};
12311250

12321251
/**

0 commit comments

Comments
 (0)