aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c700.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-11-13 09:08:42 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-24 08:45:27 -0500
commitdb5ed4dfd5dd0142ec36ff7b335e0ec3b836b3e6 (patch)
tree6cae824b5c9e5a7fd9d213e3f9c2b1c7dc8b7b8a /drivers/scsi/53c700.c
parent1e6f2416044c062a56091ebf8d76760956dd5872 (diff)
scsi: drop reason argument from ->change_queue_depth
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. 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/53c700.c')
-rw-r--r--drivers/scsi/53c700.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index d7557b932113..aa915da2a5e5 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -175,7 +175,7 @@ STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
175STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt); 175STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt);
176STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt); 176STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt);
177STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt); 177STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt);
178static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth, int reason); 178static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth);
179static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth); 179static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth);
180 180
181STATIC struct device_attribute *NCR_700_dev_attrs[]; 181STATIC struct device_attribute *NCR_700_dev_attrs[];
@@ -904,7 +904,7 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
904 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); 904 hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));
905 905
906 SCp->device->tagged_supported = 0; 906 SCp->device->tagged_supported = 0;
907 scsi_adjust_queue_depth(SCp->device, host->cmd_per_lun); 907 scsi_change_queue_depth(SCp->device, host->cmd_per_lun);
908 scsi_set_tag_type(SCp->device, 0); 908 scsi_set_tag_type(SCp->device, 0);
909 } else { 909 } else {
910 shost_printk(KERN_WARNING, host, 910 shost_printk(KERN_WARNING, host,
@@ -2052,7 +2052,7 @@ NCR_700_slave_configure(struct scsi_device *SDp)
2052 2052
2053 /* to do here: allocate memory; build a queue_full list */ 2053 /* to do here: allocate memory; build a queue_full list */
2054 if(SDp->tagged_supported) { 2054 if(SDp->tagged_supported) {
2055 scsi_adjust_queue_depth(SDp, NCR_700_DEFAULT_TAGS); 2055 scsi_change_queue_depth(SDp, NCR_700_DEFAULT_TAGS);
2056 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);
2057 } 2057 }
2058 2058
@@ -2075,16 +2075,11 @@ NCR_700_slave_destroy(struct scsi_device *SDp)
2075} 2075}
2076 2076
2077static int 2077static int
2078NCR_700_change_queue_depth(struct scsi_device *SDp, int depth, int reason) 2078NCR_700_change_queue_depth(struct scsi_device *SDp, int depth)
2079{ 2079{
2080 if (reason != SCSI_QDEPTH_DEFAULT)
2081 return -EOPNOTSUPP;
2082
2083 if (depth > NCR_700_MAX_TAGS) 2080 if (depth > NCR_700_MAX_TAGS)
2084 depth = NCR_700_MAX_TAGS; 2081 depth = NCR_700_MAX_TAGS;
2085 2082 return scsi_change_queue_depth(SDp, depth);
2086 scsi_adjust_queue_depth(SDp, depth);
2087 return depth;
2088} 2083}
2089 2084
2090static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type) 2085static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
@@ -2105,12 +2100,12 @@ static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
2105 if (!tag_type) { 2100 if (!tag_type) {
2106 /* shift back to the default unqueued number of commands 2101 /* shift back to the default unqueued number of commands
2107 * (the user can still raise this) */ 2102 * (the user can still raise this) */
2108 scsi_adjust_queue_depth(SDp, SDp->host->cmd_per_lun); 2103 scsi_change_queue_depth(SDp, SDp->host->cmd_per_lun);
2109 hostdata->tag_negotiated &= ~(1 << sdev_id(SDp)); 2104 hostdata->tag_negotiated &= ~(1 << sdev_id(SDp));
2110 } else { 2105 } else {
2111 /* Here, we cleared the negotiation flag above, so this 2106 /* Here, we cleared the negotiation flag above, so this
2112 * will force the driver to renegotiate */ 2107 * will force the driver to renegotiate */
2113 scsi_adjust_queue_depth(SDp, SDp->queue_depth); 2108 scsi_change_queue_depth(SDp, SDp->queue_depth);
2114 if (change_tag) 2109 if (change_tag)
2115 NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION); 2110 NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
2116 } 2111 }