summaryrefslogtreecommitdiffstats
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 13:31:05 +0200
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 be5b20446e5..b3b1d6fc2d6 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -5,6 +5,7 @@
* See LICENSE.qla2xxx for copyright and licensing details.
*/
+#include "qla_target.h"
/**
* qla24xx_calc_iocbs() - Determine number of Command Type 3 and
* Continuation Type 1 IOCBs to allocate.
@@ -128,12 +129,20 @@ qla2x00_clear_loop_id(fc_port_t *fcport) {
}
static inline void
-qla2x00_clean_dsd_pool(struct qla_hw_data *ha, srb_t *sp)
+qla2x00_clean_dsd_pool(struct qla_hw_data *ha, srb_t *sp,
+ struct qla_tgt_cmd *tc)
{
struct dsd_dma *dsd_ptr, *tdsd_ptr;
struct crc_context *ctx;
- ctx = (struct crc_context *)GET_CMD_CTX_SP(sp);
+ if (sp)
+ ctx = (struct crc_context *)GET_CMD_CTX_SP(sp);
+ else if (tc)
+ ctx = (struct crc_context *)tc->ctx;
+ else {
+ BUG();
+ return;
+ }
/* clean up allocated prev pool */
list_for_each_entry_safe(dsd_ptr, tdsd_ptr,