summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedf/qedf.h
diff options
context:
space:
mode:
authorChad Dupuis <cdupuis@marvell.com>2019-03-26 10:38:36 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-03-28 04:54:51 +0300
commit3e2c11b3fb7a237683f9405f14482a6f089b7e37 (patch)
treee4af67b5fd1f7dfbdbea9f37ce5da42a7e0680d9 /drivers/scsi/qedf/qedf.h
parentc5e06ba2f76809ad1492fdad312e81335df46bc5 (diff)
downloadlinux-3e2c11b3fb7a237683f9405f14482a6f089b7e37.tar.xz
scsi: qedf: Simplify s/g list mapping
When mapping the pages from a scatter/gather list from the SCSI layer we only need to follow these rules: - Max SGEs for each I/O request is 256 - No size limit on each SGE - No need to split OS provided SGEs to 4K before sending to firmware. - Slow SGE is applicable only when: - There are > 8 SGEs and any middle SGE is less than a page size (4K) Make necessary changes so that driver follows these rules. Applicable only for Write requests (not for Read requests). No need to check SGE address alignment requirements (first, middle or last) before declaring slow SGE. Signed-off-by: Chad Dupuis <cdupuis@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf/qedf.h')
-rw-r--r--drivers/scsi/qedf/qedf.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h
index 8e75c21b18b9..4080af8b620c 100644
--- a/drivers/scsi/qedf/qedf.h
+++ b/drivers/scsi/qedf/qedf.h
@@ -102,7 +102,6 @@ struct qedf_ioreq {
struct list_head link;
uint16_t xid;
struct scsi_cmnd *sc_cmd;
- bool use_slowpath; /* Use slow SGL for this I/O */
#define QEDF_SCSI_CMD 1
#define QEDF_TASK_MGMT_CMD 2
#define QEDF_ABTS 3
@@ -152,9 +151,9 @@ struct qedf_ioreq {
int fp_idx;
unsigned int cpu;
unsigned int int_cpu;
-#define QEDF_IOREQ_SLOW_SGE 0
-#define QEDF_IOREQ_SINGLE_SGE 1
-#define QEDF_IOREQ_FAST_SGE 2
+#define QEDF_IOREQ_UNKNOWN_SGE 1
+#define QEDF_IOREQ_SLOW_SGE 2
+#define QEDF_IOREQ_FAST_SGE 3
u8 sge_type;
struct delayed_work rrq_work;
@@ -366,7 +365,6 @@ struct qedf_ctx {
u32 slow_sge_ios;
u32 fast_sge_ios;
- u32 single_sge_ios;
uint8_t *grcdump;
uint32_t grcdump_size;