Commit 74e1f30a authored by Kashyap Desai's avatar Kashyap Desai Committed by Martin K. Petersen
parent 28cbe2f4
...@@ -123,6 +123,7 @@ extern struct list_head mrioc_list; ...@@ -123,6 +123,7 @@ extern struct list_head mrioc_list;
#define MPI3MR_SENSEBUF_SZ 256 #define MPI3MR_SENSEBUF_SZ 256
#define MPI3MR_SENSEBUF_FACTOR 3 #define MPI3MR_SENSEBUF_FACTOR 3
#define MPI3MR_CHAINBUF_FACTOR 3 #define MPI3MR_CHAINBUF_FACTOR 3
#define MPI3MR_CHAINBUFDIX_FACTOR 2
/* Invalid target device handle */ /* Invalid target device handle */
#define MPI3MR_INVALID_DEV_HANDLE 0xFFFF #define MPI3MR_INVALID_DEV_HANDLE 0xFFFF
...@@ -562,17 +563,21 @@ struct chain_element { ...@@ -562,17 +563,21 @@ struct chain_element {
* *
* @host_tag: Host tag specific to operational queue * @host_tag: Host tag specific to operational queue
* @in_lld_scope: Command in LLD scope or not * @in_lld_scope: Command in LLD scope or not
* @meta_sg_valid: DIX command with meta data SGL or not
* @scmd: SCSI Command pointer * @scmd: SCSI Command pointer
* @req_q_idx: Operational request queue index * @req_q_idx: Operational request queue index
* @chain_idx: Chain frame index * @chain_idx: Chain frame index
* @meta_chain_idx: Chain frame index of meta data SGL
* @mpi3mr_scsiio_req: MPI SCSI IO request * @mpi3mr_scsiio_req: MPI SCSI IO request
*/ */
struct scmd_priv { struct scmd_priv {
u16 host_tag; u16 host_tag;
u8 in_lld_scope; u8 in_lld_scope;
u8 meta_sg_valid;
struct scsi_cmnd *scmd; struct scsi_cmnd *scmd;
u16 req_q_idx; u16 req_q_idx;
int chain_idx; int chain_idx;
int meta_chain_idx;
u8 mpi3mr_scsiio_req[MPI3MR_ADMIN_REQ_FRAME_SZ]; u8 mpi3mr_scsiio_req[MPI3MR_ADMIN_REQ_FRAME_SZ];
}; };
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "mpi3mr.h" #include "mpi3mr.h"
#include <linux/io-64-nonatomic-lo-hi.h> #include <linux/io-64-nonatomic-lo-hi.h>
extern int prot_mask;
#if defined(writeq) && defined(CONFIG_64BIT) #if defined(writeq) && defined(CONFIG_64BIT)
static inline void mpi3mr_writeq(__u64 b, volatile void __iomem *addr) static inline void mpi3mr_writeq(__u64 b, volatile void __iomem *addr)
...@@ -2749,6 +2750,12 @@ static int mpi3mr_alloc_chain_bufs(struct mpi3mr_ioc *mrioc) ...@@ -2749,6 +2750,12 @@ static int mpi3mr_alloc_chain_bufs(struct mpi3mr_ioc *mrioc)
num_chains = mrioc->max_host_ios / MPI3MR_CHAINBUF_FACTOR; num_chains = mrioc->max_host_ios / MPI3MR_CHAINBUF_FACTOR;
if (prot_mask & (SHOST_DIX_TYPE0_PROTECTION
| SHOST_DIX_TYPE1_PROTECTION
| SHOST_DIX_TYPE2_PROTECTION
| SHOST_DIX_TYPE3_PROTECTION))
num_chains += (num_chains / MPI3MR_CHAINBUFDIX_FACTOR);
mrioc->chain_buf_count = num_chains; mrioc->chain_buf_count = num_chains;
sz = sizeof(struct chain_element) * num_chains; sz = sizeof(struct chain_element) * num_chains;
mrioc->chain_sgl_list = kzalloc(sz, GFP_KERNEL); mrioc->chain_sgl_list = kzalloc(sz, GFP_KERNEL);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment