diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/scsi/libsas/sas_scsi_host.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/scsi/libsas/sas_scsi_host.c')
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 1c558d3bce18..822835055cef 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/err.h> | 44 | #include <linux/err.h> |
45 | #include <linux/blkdev.h> | 45 | #include <linux/blkdev.h> |
46 | #include <linux/freezer.h> | 46 | #include <linux/freezer.h> |
47 | #include <linux/gfp.h> | ||
47 | #include <linux/scatterlist.h> | 48 | #include <linux/scatterlist.h> |
48 | #include <linux/libata.h> | 49 | #include <linux/libata.h> |
49 | 50 | ||
@@ -820,10 +821,14 @@ void sas_slave_destroy(struct scsi_device *scsi_dev) | |||
820 | ata_port_disable(dev->sata_dev.ap); | 821 | ata_port_disable(dev->sata_dev.ap); |
821 | } | 822 | } |
822 | 823 | ||
823 | int sas_change_queue_depth(struct scsi_device *scsi_dev, int new_depth) | 824 | int sas_change_queue_depth(struct scsi_device *scsi_dev, int new_depth, |
825 | int reason) | ||
824 | { | 826 | { |
825 | int res = min(new_depth, SAS_MAX_QD); | 827 | int res = min(new_depth, SAS_MAX_QD); |
826 | 828 | ||
829 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
830 | return -EOPNOTSUPP; | ||
831 | |||
827 | if (scsi_dev->tagged_supported) | 832 | if (scsi_dev->tagged_supported) |
828 | scsi_adjust_queue_depth(scsi_dev, scsi_get_tag_type(scsi_dev), | 833 | scsi_adjust_queue_depth(scsi_dev, scsi_get_tag_type(scsi_dev), |
829 | res); | 834 | res); |
@@ -1025,6 +1030,8 @@ int __sas_task_abort(struct sas_task *task) | |||
1025 | void sas_task_abort(struct sas_task *task) | 1030 | void sas_task_abort(struct sas_task *task) |
1026 | { | 1031 | { |
1027 | struct scsi_cmnd *sc = task->uldd_task; | 1032 | struct scsi_cmnd *sc = task->uldd_task; |
1033 | struct request_queue *q = sc->device->request_queue; | ||
1034 | unsigned long flags; | ||
1028 | 1035 | ||
1029 | /* Escape for libsas internal commands */ | 1036 | /* Escape for libsas internal commands */ |
1030 | if (!sc) { | 1037 | if (!sc) { |
@@ -1039,7 +1046,9 @@ void sas_task_abort(struct sas_task *task) | |||
1039 | return; | 1046 | return; |
1040 | } | 1047 | } |
1041 | 1048 | ||
1049 | spin_lock_irqsave(q->queue_lock, flags); | ||
1042 | blk_abort_request(sc->request); | 1050 | blk_abort_request(sc->request); |
1051 | spin_unlock_irqrestore(q->queue_lock, flags); | ||
1043 | scsi_schedule_eh(sc->device->host); | 1052 | scsi_schedule_eh(sc->device->host); |
1044 | } | 1053 | } |
1045 | 1054 | ||