aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c700.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/53c700.c')
-rw-r--r--drivers/scsi/53c700.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 497cbb1efd4b..d7557b932113 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -902,8 +902,10 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
902 /* we're done negotiating */ 902 /* we're done negotiating */
903 NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION); 903 NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION);
904 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); 904 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));
905
905 SCp->device->tagged_supported = 0; 906 SCp->device->tagged_supported = 0;
906 scsi_adjust_queue_depth(SCp->device, 0, host->cmd_per_lun); 907 scsi_adjust_queue_depth(SCp->device, host->cmd_per_lun);
908 scsi_set_tag_type(SCp->device, 0);
907 } else { 909 } else {
908 shost_printk(KERN_WARNING, host, 910 shost_printk(KERN_WARNING, host,
909 "(%d:%d) Unexpected REJECT Message %s\n", 911 "(%d:%d) Unexpected REJECT Message %s\n",
@@ -2050,12 +2052,10 @@ NCR_700_slave_configure(struct scsi_device *SDp)
2050 2052
2051 /* to do here: allocate memory; build a queue_full list */ 2053 /* to do here: allocate memory; build a queue_full list */
2052 if(SDp->tagged_supported) { 2054 if(SDp->tagged_supported) {
2053 scsi_adjust_queue_depth(SDp, MSG_ORDERED_TAG, NCR_700_DEFAULT_TAGS); 2055 scsi_adjust_queue_depth(SDp, NCR_700_DEFAULT_TAGS);
2054 NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION); 2056 NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
2055 } else {
2056 /* initialise to default depth */
2057 scsi_adjust_queue_depth(SDp, 0, SDp->host->cmd_per_lun);
2058 } 2057 }
2058
2059 if(hostdata->fast) { 2059 if(hostdata->fast) {
2060 /* Find the correct offset and period via domain validation */ 2060 /* Find the correct offset and period via domain validation */
2061 if (!spi_initial_dv(SDp->sdev_target)) 2061 if (!spi_initial_dv(SDp->sdev_target))
@@ -2083,7 +2083,7 @@ NCR_700_change_queue_depth(struct scsi_device *SDp, int depth, int reason)
2083 if (depth > NCR_700_MAX_TAGS) 2083 if (depth > NCR_700_MAX_TAGS)
2084 depth = NCR_700_MAX_TAGS; 2084 depth = NCR_700_MAX_TAGS;
2085 2085
2086 scsi_adjust_queue_depth(SDp, scsi_get_tag_type(SDp), depth); 2086 scsi_adjust_queue_depth(SDp, depth);
2087 return depth; 2087 return depth;
2088} 2088}
2089 2089
@@ -2101,15 +2101,16 @@ static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
2101 if (change_tag) 2101 if (change_tag)
2102 scsi_target_quiesce(SDp->sdev_target); 2102 scsi_target_quiesce(SDp->sdev_target);
2103 2103
2104 scsi_set_tag_type(SDp, tag_type);
2104 if (!tag_type) { 2105 if (!tag_type) {
2105 /* shift back to the default unqueued number of commands 2106 /* shift back to the default unqueued number of commands
2106 * (the user can still raise this) */ 2107 * (the user can still raise this) */
2107 scsi_adjust_queue_depth(SDp, 0, SDp->host->cmd_per_lun); 2108 scsi_adjust_queue_depth(SDp, SDp->host->cmd_per_lun);
2108 hostdata->tag_negotiated &= ~(1 << sdev_id(SDp)); 2109 hostdata->tag_negotiated &= ~(1 << sdev_id(SDp));
2109 } else { 2110 } else {
2110 /* Here, we cleared the negotiation flag above, so this 2111 /* Here, we cleared the negotiation flag above, so this
2111 * will force the driver to renegotiate */ 2112 * will force the driver to renegotiate */
2112 scsi_adjust_queue_depth(SDp, tag_type, SDp->queue_depth); 2113 scsi_adjust_queue_depth(SDp, SDp->queue_depth);
2113 if (change_tag) 2114 if (change_tag)
2114 NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION); 2115 NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
2115 } 2116 }