From 410519634eb28ddb19d5951d76b8ac3afbd3118d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 16 Jun 2015 17:38:05 +0000 Subject: [PATCH] qla2x00t: Minimize diffs with the upstream driver in the >= 3.19 kernel code git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6323 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t/qla_iocb.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/qla2x00t/qla_iocb.c b/qla2x00t/qla_iocb.c index 58465ee07..aa236d2ae 100644 --- a/qla2x00t/qla_iocb.c +++ b/qla2x00t/qla_iocb.c @@ -409,9 +409,8 @@ qla2x00_start_scsi(srb_t *sp) /* Set target ID and LUN number*/ SET_TARGET_ID(ha, cmd_pkt->target, sp->fcport->loop_id); cmd_pkt->lun = cpu_to_le16(cmd->device->lun); - - /* Update tagged queuing modifier */ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) + /* Update tagged queuing modifier */ if (scsi_populate_tag_msg(cmd, tag)) { switch (tag[0]) { case HEAD_OF_QUEUE_TAG: @@ -429,8 +428,7 @@ qla2x00_start_scsi(srb_t *sp) } } #else - if (cmd->flags & SCMD_TAGGED) - cmd_pkt->control_flags = cpu_to_le16(CF_SIMPLE_TAG); + cmd_pkt->control_flags = cpu_to_le16(CF_SIMPLE_TAG); #endif /* Load SCSI command packet. */ @@ -1403,11 +1401,10 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, cmd_pkt->fcp_cmnd_dseg_address[1] = cpu_to_le32( MSD(crc_ctx_dma + CRC_CONTEXT_FCPCMND_OFF)); fcp_cmnd->task_management = 0; - +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) /* * Update tagged queuing modifier if using command tag queuing */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) if (scsi_populate_tag_msg(cmd, tag)) { switch (tag[0]) { case HEAD_OF_QUEUE_TAG: @@ -1424,7 +1421,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, fcp_cmnd->task_attribute = 0; } #else - fcp_cmnd->task_attribute = 0; + fcp_cmnd->task_attribute = TSK_SIMPLE; #endif cmd_pkt->fcp_rsp_dseg_len = 0; /* Let response come in status iocb */ @@ -1634,6 +1631,8 @@ qla24xx_start_scsi(srb_t *sp) break; } } +#else + cmd_pkt->task = TSK_SIMPLE; #endif /* Load SCSI command packet. */