aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c700.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-11-03 06:47:47 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-12 05:19:40 -0500
commit125c99bc8b6b108d251169a86324a7ed3c6f3cce (patch)
tree58c721993e8b2be80e2993ea864529923c904b29 /drivers/scsi/53c700.c
parenta62182f338b39a22035531c6afc0a8d2928b1df2 (diff)
scsi: add new scsi-command flag for tagged commands
Currently scsi piggy backs on the block layer to define the concept of a tagged command. But we want to be able to have block-level host-wide tags assigned even for untagged commands like the initial INQUIRY, so add a new SCSI-level flag for commands that are tagged at the scsi level, so that even commands without that set can have tags assigned to them. Note that this alredy is the case for the blk-mq code path, and this just lets the old path catch up with it. We also set this flag based upon sdev->simple_tags instead of the block queue flag, so that it is entirely independent of the block layer tagging, and thus always correct even if a driver doesn't use block level tagging yet. Also remove the old blk_rq_tagged; it was only used by SCSI drivers, and removing it forces them to look for the proper replacement. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/53c700.c')
-rw-r--r--drivers/scsi/53c700.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 474cc6dc98e2..5143d3213e86 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -1767,7 +1767,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
1767 */ 1767 */
1768 if(NCR_700_get_depth(SCp->device) != 0 1768 if(NCR_700_get_depth(SCp->device) != 0
1769 && (!(hostdata->tag_negotiated & (1<<scmd_id(SCp))) 1769 && (!(hostdata->tag_negotiated & (1<<scmd_id(SCp)))
1770 || !blk_rq_tagged(SCp->request))) { 1770 || !(SCp->flags & SCMD_TAGGED))) {
1771 CDEBUG(KERN_ERR, SCp, "has non zero depth %d\n", 1771 CDEBUG(KERN_ERR, SCp, "has non zero depth %d\n",
1772 NCR_700_get_depth(SCp->device)); 1772 NCR_700_get_depth(SCp->device));
1773 return SCSI_MLQUEUE_DEVICE_BUSY; 1773 return SCSI_MLQUEUE_DEVICE_BUSY;
@@ -1795,7 +1795,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
1795 printk("53c700: scsi%d, command ", SCp->device->host->host_no); 1795 printk("53c700: scsi%d, command ", SCp->device->host->host_no);
1796 scsi_print_command(SCp); 1796 scsi_print_command(SCp);
1797#endif 1797#endif
1798 if(blk_rq_tagged(SCp->request) 1798 if ((SCp->flags & SCMD_TAGGED)
1799 && (hostdata->tag_negotiated &(1<<scmd_id(SCp))) == 0 1799 && (hostdata->tag_negotiated &(1<<scmd_id(SCp))) == 0
1800 && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) { 1800 && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) {
1801 scmd_printk(KERN_ERR, SCp, "Enabling Tag Command Queuing\n"); 1801 scmd_printk(KERN_ERR, SCp, "Enabling Tag Command Queuing\n");
@@ -1809,7 +1809,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
1809 * 1809 *
1810 * FIXME: This will royally screw up on multiple LUN devices 1810 * FIXME: This will royally screw up on multiple LUN devices
1811 * */ 1811 * */
1812 if(!blk_rq_tagged(SCp->request) 1812 if (!(SCp->flags & SCMD_TAGGED)
1813 && (hostdata->tag_negotiated &(1<<scmd_id(SCp)))) { 1813 && (hostdata->tag_negotiated &(1<<scmd_id(SCp)))) {
1814 scmd_printk(KERN_INFO, SCp, "Disabling Tag Command Queuing\n"); 1814 scmd_printk(KERN_INFO, SCp, "Disabling Tag Command Queuing\n");
1815 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); 1815 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));