Commit df860b3d authored by James Bottomley's avatar James Bottomley

[SCSI] minor fixes

- remove unnecessary variable
- adjust block layer TCQ interface
parent 996dda30
...@@ -896,7 +896,7 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata ...@@ -896,7 +896,7 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING);
hostdata->tag_negotiated &= ~(1<<SCp->target); hostdata->tag_negotiated &= ~(1<<SCp->target);
SCp->device->tagged_supported = 0; SCp->device->tagged_supported = 0;
scsi_deactivate_tcq(SCp->device); scsi_deactivate_tcq(SCp->device, host->cmd_per_lun);
} else { } else {
printk(KERN_WARNING "scsi%d (%d:%d) Unexpected REJECT Message %s\n", printk(KERN_WARNING "scsi%d (%d:%d) Unexpected REJECT Message %s\n",
host->host_no, pun, lun, host->host_no, pun, lun,
...@@ -1813,8 +1813,6 @@ NCR_700_queuecommand(Scsi_Cmnd *SCp, void (*done)(Scsi_Cmnd *)) ...@@ -1813,8 +1813,6 @@ NCR_700_queuecommand(Scsi_Cmnd *SCp, void (*done)(Scsi_Cmnd *))
* NOTE: There is a danger here: the mid layer supports * NOTE: There is a danger here: the mid layer supports
* tag queuing per LUN. We only support it per PUN because * tag queuing per LUN. We only support it per PUN because
* of potential reselection issues */ * of potential reselection issues */
printk(KERN_NOTICE "scsi%d: (%d:%d) beginning blk layer TCQ\n",
SCp->device->host->host_no, SCp->target, SCp->lun);
scsi_activate_tcq(SCp->device, NCR_700_MAX_TAGS); scsi_activate_tcq(SCp->device, NCR_700_MAX_TAGS);
} }
......
...@@ -51,7 +51,6 @@ static spinlock_t scsi_host_list_lock = SPIN_LOCK_UNLOCKED; ...@@ -51,7 +51,6 @@ static spinlock_t scsi_host_list_lock = SPIN_LOCK_UNLOCKED;
static int scsi_host_next_hn; /* host_no for next new host */ static int scsi_host_next_hn; /* host_no for next new host */
static int scsi_hosts_registered; /* cnt of registered scsi hosts */ static int scsi_hosts_registered; /* cnt of registered scsi hosts */
static int scsi_ignore_no_error_handling = 0;
/** /**
* scsi_tp_for_each_host - call function for each scsi host off a template * scsi_tp_for_each_host - call function for each scsi host off a template
......
...@@ -852,8 +852,9 @@ extern int scsi_reset_provider(Scsi_Device *, int); ...@@ -852,8 +852,9 @@ extern int scsi_reset_provider(Scsi_Device *, int);
static inline void scsi_activate_tcq(Scsi_Device *SDpnt, int depth) { static inline void scsi_activate_tcq(Scsi_Device *SDpnt, int depth) {
request_queue_t *q = &SDpnt->request_queue; request_queue_t *q = &SDpnt->request_queue;
if(SDpnt->tagged_supported && !blk_queue_tagged(q)) { if(SDpnt->tagged_supported) {
blk_queue_init_tags(q, depth); if(!blk_queue_tagged(q))
blk_queue_init_tags(q, depth);
scsi_adjust_queue_depth(SDpnt, MSG_ORDERED_TAG, depth); scsi_adjust_queue_depth(SDpnt, MSG_ORDERED_TAG, depth);
} }
} }
...@@ -862,9 +863,12 @@ static inline void scsi_activate_tcq(Scsi_Device *SDpnt, int depth) { ...@@ -862,9 +863,12 @@ static inline void scsi_activate_tcq(Scsi_Device *SDpnt, int depth) {
* scsi_deactivate_tcq - turn off tag command queueing * scsi_deactivate_tcq - turn off tag command queueing
* @SDpnt: device to turn off TCQ for * @SDpnt: device to turn off TCQ for
**/ **/
static inline void scsi_deactivate_tcq(Scsi_Device *SDpnt) { static inline void scsi_deactivate_tcq(Scsi_Device *SDpnt, int depth) {
blk_queue_free_tags(&SDpnt->request_queue); request_queue_t *q = &SDpnt->request_queue;
scsi_adjust_queue_depth(SDpnt, 0, 2);
if(blk_queue_tagged(q))
blk_queue_free_tags(q);
scsi_adjust_queue_depth(SDpnt, 0, depth);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment