aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-10-15 20:46:39 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:00:41 -0500
commite881a172dac4d9ea3b2a1540041d872963c269bd (patch)
tree9eb1f344b107806c0041c4e0a64192a055117289 /include
parentdbf9bfe615717d1145f263c0049fe2328e6ed395 (diff)
[SCSI] modify change_queue_depth to take in reason why it is being called
This patch modifies scsi_host_template->change_queue_depth so that it takes an argument indicating why it is being called. This will be used so that if a LLD needs to do some extra processing when handling queue fulls or later ramp ups, it can do so. This is a simple port of the drivers setting a change_queue_depth callback. In the patch I just have these LLDs adjust the queue depth if the user was requesting it. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> [Vasu.Dev: v2 Also converted pmcraid_change_queue_depth and then verified all modules compile using "make allmodconfig" for any new build warnings on X86_64. Updated original description after combing two original patches from Mike to make this patch git bisectable.] Signed-off-by: Vasu Dev <vasu.dev@intel.com> [jejb: fixed up 53c700] Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h2
-rw-r--r--include/scsi/libfc.h2
-rw-r--r--include/scsi/libiscsi.h3
-rw-r--r--include/scsi/libsas.h3
-rw-r--r--include/scsi/scsi_host.h8
5 files changed, 13 insertions, 5 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 87698640c091..85df383fd4bd 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1023,7 +1023,7 @@ extern int ata_std_bios_param(struct scsi_device *sdev,
1023extern int ata_scsi_slave_config(struct scsi_device *sdev); 1023extern int ata_scsi_slave_config(struct scsi_device *sdev);
1024extern void ata_scsi_slave_destroy(struct scsi_device *sdev); 1024extern void ata_scsi_slave_destroy(struct scsi_device *sdev);
1025extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, 1025extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
1026 int queue_depth); 1026 int queue_depth, int reason);
1027extern struct ata_device *ata_dev_pair(struct ata_device *adev); 1027extern struct ata_device *ata_dev_pair(struct ata_device *adev);
1028extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); 1028extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
1029 1029
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 1662d73d85a7..9617f9365e45 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -919,7 +919,7 @@ int fc_slave_alloc(struct scsi_device *sdev);
919/* 919/*
920 * Adjust the queue depth. 920 * Adjust the queue depth.
921 */ 921 */
922int fc_change_queue_depth(struct scsi_device *sdev, int qdepth); 922int fc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason);
923 923
924/* 924/*
925 * Change the tag type. 925 * Change the tag type.
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index a72edd4eceec..2db2bc26b1e9 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -333,7 +333,8 @@ struct iscsi_host {
333/* 333/*
334 * scsi host template 334 * scsi host template
335 */ 335 */
336extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth); 336extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth,
337 int reason);
337extern int iscsi_eh_abort(struct scsi_cmnd *sc); 338extern int iscsi_eh_abort(struct scsi_cmnd *sc);
338extern int iscsi_eh_target_reset(struct scsi_cmnd *sc); 339extern int iscsi_eh_target_reset(struct scsi_cmnd *sc);
339extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); 340extern int iscsi_eh_device_reset(struct scsi_cmnd *sc);
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index e78d3b62d8ec..9eaa3f05f954 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -634,7 +634,8 @@ extern int sas_target_alloc(struct scsi_target *);
634extern int sas_slave_alloc(struct scsi_device *); 634extern int sas_slave_alloc(struct scsi_device *);
635extern int sas_slave_configure(struct scsi_device *); 635extern int sas_slave_configure(struct scsi_device *);
636extern void sas_slave_destroy(struct scsi_device *); 636extern void sas_slave_destroy(struct scsi_device *);
637extern int sas_change_queue_depth(struct scsi_device *, int new_depth); 637extern int sas_change_queue_depth(struct scsi_device *, int new_depth,
638 int reason);
638extern int sas_change_queue_type(struct scsi_device *, int qt); 639extern int sas_change_queue_type(struct scsi_device *, int qt);
639extern int sas_bios_param(struct scsi_device *, 640extern int sas_bios_param(struct scsi_device *,
640 struct block_device *, 641 struct block_device *,
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 6e728b176904..603054d8f40c 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -43,6 +43,12 @@ struct blk_queue_tags;
43#define DISABLE_CLUSTERING 0 43#define DISABLE_CLUSTERING 0
44#define ENABLE_CLUSTERING 1 44#define ENABLE_CLUSTERING 1
45 45
46enum {
47 SCSI_QDEPTH_DEFAULT, /* default requested change, e.g. from sysfs */
48 SCSI_QDEPTH_QFULL, /* scsi-ml requested due to queue full */
49 SCSI_QDEPTH_RAMP_UP, /* scsi-ml requested due to threshhold event */
50};
51
46struct scsi_host_template { 52struct scsi_host_template {
47 struct module *module; 53 struct module *module;
48 const char *name; 54 const char *name;
@@ -294,7 +300,7 @@ struct scsi_host_template {
294 * 300 *
295 * Status: OPTIONAL 301 * Status: OPTIONAL
296 */ 302 */
297 int (* change_queue_depth)(struct scsi_device *, int); 303 int (* change_queue_depth)(struct scsi_device *, int, int);
298 304
299 /* 305 /*
300 * Fill in this function to allow the changing of tag types 306 * Fill in this function to allow the changing of tag types