summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/53c700.c6
-rw-r--r--drivers/scsi/53c700.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index c35a22196f8d..c84c73d778ae 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -612,7 +612,7 @@ NCR_700_scsi_done(struct NCR_700_Host_Parameters *hostdata,
free_slot(slot, hostdata);
#ifdef NCR_700_DEBUG
if(NCR_700_get_depth(SCp->device) == 0 ||
- NCR_700_get_depth(SCp->device) > NCR_700_MAX_TAGS)
+ NCR_700_get_depth(SCp->device) > SCp->device->queue_depth)
printk(KERN_ERR "Invalid depth in NCR_700_scsi_done(): %d\n",
NCR_700_get_depth(SCp->device));
#endif /* NCR_700_DEBUG */
@@ -1732,7 +1732,7 @@ NCR_700_queuecommand(Scsi_Cmnd *SCp, void (*done)(Scsi_Cmnd *))
NCR_700_get_depth(SCp->device)));
return SCSI_MLQUEUE_DEVICE_BUSY;
}
- if(NCR_700_get_depth(SCp->device) >= NCR_700_MAX_TAGS) {
+ if(NCR_700_get_depth(SCp->device) >= SCp->device->queue_depth) {
DEBUG((KERN_ERR "scsi%d (%d:%d) has max tag depth %d\n",
SCp->device->host->host_no, SCp->device->id, SCp->device->lun,
NCR_700_get_depth(SCp->device)));
@@ -1765,7 +1765,7 @@ NCR_700_queuecommand(Scsi_Cmnd *SCp, void (*done)(Scsi_Cmnd *))
* NOTE: There is a danger here: the mid layer supports
* tag queuing per LUN. We only support it per PUN because
* of potential reselection issues */
- scsi_activate_tcq(SCp->device, NCR_700_MAX_TAGS);
+ scsi_activate_tcq(SCp->device, NCR_700_DEFAULT_TAGS);
}
if(blk_rq_tagged(SCp->request)
diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h
index 76700b2feeda..8ad08965551b 100644
--- a/drivers/scsi/53c700.h
+++ b/drivers/scsi/53c700.h
@@ -35,9 +35,10 @@
/* The maximum number of luns (make this of the form 2^n) */
#define NCR_700_MAX_LUNS 32
#define NCR_700_LUN_MASK (NCR_700_MAX_LUNS - 1)
-/* Alter this with care: too many tags won't give the elevator a chance to
- * work; too few will cause the device to operate less efficiently */
+/* Maximum number of tags the driver ever allows per device */
#define NCR_700_MAX_TAGS 16
+/* Tag depth the driver starts out with (can be altered in sysfs) */
+#define NCR_700_DEFAULT_TAGS 4
/* This is the default number of commands per LUN in the untagged case.
* two is a good value because it means we can have one command active and
* one command fully prepared and waiting