aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_inline.h
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@qlogic.com>2014-04-11 16:54:43 -0400
committerChristoph Hellwig <hch@lst.de>2014-05-19 07:31:05 -0400
commitf83adb617f55be13046191d83fa9110ff0689406 (patch)
tree79975dd317761859016a96e573f0fde2ff82b1c6 /drivers/scsi/qla2xxx/qla_inline.h
parent5921cda6c1a402bacbfa5c97bbb7039eb0fd9dd8 (diff)
qla2xxx: T10-Dif: add T10-PI support
Add support for T10-Dif for Target Mode to qla driver. The driver will look for firmware attribute that support this feature. When the feature is present, the capabilities will be report to TCM layer. Add CTIO CRC2 iocb to build T10-Dif commands. Add support routines to process good & error cases. Signed-off-by: Quinn Tran <quinn.tran@qlogic.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_inline.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_inline.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
index be5b20446e5c..b3b1d6fc2d6c 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -5,6 +5,7 @@
5 * See LICENSE.qla2xxx for copyright and licensing details. 5 * See LICENSE.qla2xxx for copyright and licensing details.
6 */ 6 */
7 7
8#include "qla_target.h"
8/** 9/**
9 * qla24xx_calc_iocbs() - Determine number of Command Type 3 and 10 * qla24xx_calc_iocbs() - Determine number of Command Type 3 and
10 * Continuation Type 1 IOCBs to allocate. 11 * Continuation Type 1 IOCBs to allocate.
@@ -128,12 +129,20 @@ qla2x00_clear_loop_id(fc_port_t *fcport) {
128} 129}
129 130
130static inline void 131static inline void
131qla2x00_clean_dsd_pool(struct qla_hw_data *ha, srb_t *sp) 132qla2x00_clean_dsd_pool(struct qla_hw_data *ha, srb_t *sp,
133 struct qla_tgt_cmd *tc)
132{ 134{
133 struct dsd_dma *dsd_ptr, *tdsd_ptr; 135 struct dsd_dma *dsd_ptr, *tdsd_ptr;
134 struct crc_context *ctx; 136 struct crc_context *ctx;
135 137
136 ctx = (struct crc_context *)GET_CMD_CTX_SP(sp); 138 if (sp)
139 ctx = (struct crc_context *)GET_CMD_CTX_SP(sp);
140 else if (tc)
141 ctx = (struct crc_context *)tc->ctx;
142 else {
143 BUG();
144 return;
145 }
137 146
138 /* clean up allocated prev pool */ 147 /* clean up allocated prev pool */
139 list_for_each_entry_safe(dsd_ptr, tdsd_ptr, 148 list_for_each_entry_safe(dsd_ptr, tdsd_ptr,