aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-10-30 09:30:06 -0400
committerChristoph Hellwig <hch@lst.de>2014-11-12 05:19:41 -0500
commit5066863337afdb0ad7323f424f7959d9f9f066da (patch)
tree3901d3088c8698f10e1533298ae04a98116bc395 /drivers/scsi/bnx2fc
parentabd0c533e37789ef56a73562d6d06d39897bd801 (diff)
scsi: remove abuses of scsi_populate_tag
Unless we want to build a SPI tag message we should just check SCMD_TAGGED instead of reverse engineering a tag type through the use of scsi_populate_tag_msg. Also rename the function to spi_populate_tag_msg, make it behave like the other spi message helpers, and move it to the spi transport class. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_io.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 5b99844ef6bf..4b56858c1df2 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1725,7 +1725,6 @@ void bnx2fc_build_fcp_cmnd(struct bnx2fc_cmd *io_req,
1725 struct fcp_cmnd *fcp_cmnd) 1725 struct fcp_cmnd *fcp_cmnd)
1726{ 1726{
1727 struct scsi_cmnd *sc_cmd = io_req->sc_cmd; 1727 struct scsi_cmnd *sc_cmd = io_req->sc_cmd;
1728 char tag[2];
1729 1728
1730 memset(fcp_cmnd, 0, sizeof(struct fcp_cmnd)); 1729 memset(fcp_cmnd, 0, sizeof(struct fcp_cmnd));
1731 1730
@@ -1739,21 +1738,10 @@ void bnx2fc_build_fcp_cmnd(struct bnx2fc_cmd *io_req,
1739 fcp_cmnd->fc_tm_flags = io_req->mp_req.tm_flags; 1738 fcp_cmnd->fc_tm_flags = io_req->mp_req.tm_flags;
1740 fcp_cmnd->fc_flags = io_req->io_req_flags; 1739 fcp_cmnd->fc_flags = io_req->io_req_flags;
1741 1740
1742 if (scsi_populate_tag_msg(sc_cmd, tag)) { 1741 if (sc_cmd->flags & SCMD_TAGGED)
1743 switch (tag[0]) { 1742 fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
1744 case HEAD_OF_QUEUE_TAG: 1743 else
1745 fcp_cmnd->fc_pri_ta = FCP_PTA_HEADQ;
1746 break;
1747 case ORDERED_QUEUE_TAG:
1748 fcp_cmnd->fc_pri_ta = FCP_PTA_ORDERED;
1749 break;
1750 default:
1751 fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
1752 break;
1753 }
1754 } else {
1755 fcp_cmnd->fc_pri_ta = 0; 1744 fcp_cmnd->fc_pri_ta = 0;
1756 }
1757} 1745}
1758 1746
1759static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req, 1747static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,