diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-05-19 23:19:14 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-24 13:03:56 -0400 |
commit | e66ecd505addaaf40e7d352796ba8d344f6359dd (patch) | |
tree | 3a97bb4ff8936ae73150a499acd73119cb7dca04 /drivers/target/tcm_fc | |
parent | d60b7a0fc918245c6fb8cc2b15e570e040d8f38b (diff) |
[SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions
This patch converts target core and follwing scsi-misc upstream fabric
modules to use include/scsi/scsi_tcq.h includes for SIMPLE, HEAD_OF_QUEUE
and ORDERED SCSI tasks instead of scsi/libsas.h with TASK_ATTR*
*) tcm_loop: Convert tcm_loop_allocate_core_cmd() + tcm_loop_device_reset() to
scsi_tcq.h
*) tcm_fc: Convert ft_send_cmd() from FCP_PTA_* to scsi_tcq.h
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Diffstat (limited to 'drivers/target/tcm_fc')
-rw-r--r-- | drivers/target/tcm_fc/tfc_cmd.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c index 49e51778f733..c056a1132ae1 100644 --- a/drivers/target/tcm_fc/tfc_cmd.c +++ b/drivers/target/tcm_fc/tfc_cmd.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <scsi/scsi_host.h> | 35 | #include <scsi/scsi_host.h> |
36 | #include <scsi/scsi_device.h> | 36 | #include <scsi/scsi_device.h> |
37 | #include <scsi/scsi_cmnd.h> | 37 | #include <scsi/scsi_cmnd.h> |
38 | #include <scsi/scsi_tcq.h> | ||
38 | #include <scsi/libfc.h> | 39 | #include <scsi/libfc.h> |
39 | #include <scsi/fc_encode.h> | 40 | #include <scsi/fc_encode.h> |
40 | 41 | ||
@@ -592,8 +593,25 @@ static void ft_send_cmd(struct ft_cmd *cmd) | |||
592 | case FCP_CFL_WRDATA | FCP_CFL_RDDATA: | 593 | case FCP_CFL_WRDATA | FCP_CFL_RDDATA: |
593 | goto err; /* TBD not supported by tcm_fc yet */ | 594 | goto err; /* TBD not supported by tcm_fc yet */ |
594 | } | 595 | } |
596 | /* | ||
597 | * Locate the SAM Task Attr from fc_pri_ta | ||
598 | */ | ||
599 | switch (fcp->fc_pri_ta & FCP_PTA_MASK) { | ||
600 | case FCP_PTA_HEADQ: | ||
601 | task_attr = MSG_HEAD_TAG; | ||
602 | break; | ||
603 | case FCP_PTA_ORDERED: | ||
604 | task_attr = MSG_ORDERED_TAG; | ||
605 | break; | ||
606 | case FCP_PTA_ACA: | ||
607 | task_attr = MSG_ACA_TAG; | ||
608 | break; | ||
609 | case FCP_PTA_SIMPLE: /* Fallthrough */ | ||
610 | default: | ||
611 | task_attr = MSG_SIMPLE_TAG; | ||
612 | } | ||
613 | |||
595 | 614 | ||
596 | /* FCP_PTA_ maps 1:1 to TASK_ATTR_ */ | ||
597 | task_attr = fcp->fc_pri_ta & FCP_PTA_MASK; | 615 | task_attr = fcp->fc_pri_ta & FCP_PTA_MASK; |
598 | data_len = ntohl(fcp->fc_dl); | 616 | data_len = ntohl(fcp->fc_dl); |
599 | cmd->cdb = fcp->fc_cdb; | 617 | cmd->cdb = fcp->fc_cdb; |