aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
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/message
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/message')
-rw-r--r--drivers/message/fusion/mptscsih.c12
-rw-r--r--drivers/message/fusion/mptscsih.h3
2 files changed, 4 insertions, 11 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index dee06d6f0b68..6c9fc11efb87 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2311,12 +2311,11 @@ mptscsih_slave_destroy(struct scsi_device *sdev)
2311 * mptscsih_change_queue_depth - This function will set a devices queue depth 2311 * mptscsih_change_queue_depth - This function will set a devices queue depth
2312 * @sdev: per scsi_device pointer 2312 * @sdev: per scsi_device pointer
2313 * @qdepth: requested queue depth 2313 * @qdepth: requested queue depth
2314 * @reason: calling context
2315 * 2314 *
2316 * Adding support for new 'change_queue_depth' api. 2315 * Adding support for new 'change_queue_depth' api.
2317*/ 2316*/
2318int 2317int
2319mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) 2318mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
2320{ 2319{
2321 MPT_SCSI_HOST *hd = shost_priv(sdev->host); 2320 MPT_SCSI_HOST *hd = shost_priv(sdev->host);
2322 VirtTarget *vtarget; 2321 VirtTarget *vtarget;
@@ -2327,9 +2326,6 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
2327 starget = scsi_target(sdev); 2326 starget = scsi_target(sdev);
2328 vtarget = starget->hostdata; 2327 vtarget = starget->hostdata;
2329 2328
2330 if (reason != SCSI_QDEPTH_DEFAULT)
2331 return -EOPNOTSUPP;
2332
2333 if (ioc->bus_type == SPI) { 2329 if (ioc->bus_type == SPI) {
2334 if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)) 2330 if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES))
2335 max_depth = 1; 2331 max_depth = 1;
@@ -2347,8 +2343,7 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
2347 if (qdepth > max_depth) 2343 if (qdepth > max_depth)
2348 qdepth = max_depth; 2344 qdepth = max_depth;
2349 2345
2350 scsi_adjust_queue_depth(sdev, qdepth); 2346 return scsi_change_queue_depth(sdev, qdepth);
2351 return sdev->queue_depth;
2352} 2347}
2353 2348
2354/* 2349/*
@@ -2392,8 +2387,7 @@ mptscsih_slave_configure(struct scsi_device *sdev)
2392 ioc->name, vtarget->negoFlags, vtarget->maxOffset, 2387 ioc->name, vtarget->negoFlags, vtarget->maxOffset,
2393 vtarget->minSyncFactor)); 2388 vtarget->minSyncFactor));
2394 2389
2395 mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH, 2390 mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH);
2396 SCSI_QDEPTH_DEFAULT);
2397 dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT 2391 dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
2398 "tagged %d, simple %d\n", 2392 "tagged %d, simple %d\n",
2399 ioc->name,sdev->tagged_supported, sdev->simple_tags)); 2393 ioc->name,sdev->tagged_supported, sdev->simple_tags));
diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h
index e1b1a198a62a..2baeefd9be7a 100644
--- a/drivers/message/fusion/mptscsih.h
+++ b/drivers/message/fusion/mptscsih.h
@@ -128,8 +128,7 @@ extern int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_F
128extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r); 128extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
129extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); 129extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
130extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); 130extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
131extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, 131extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
132 int reason);
133extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id); 132extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id);
134extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id); 133extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id);
135extern struct device_attribute *mptscsih_host_attrs[]; 134extern struct device_attribute *mptscsih_host_attrs[];