diff options
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 d625577ed152..8f3c4cc1bfe4 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -808,8 +808,13 @@ void sas_slave_destroy(struct scsi_device *scsi_dev) | |||
808 | int sas_change_queue_depth(struct scsi_device *scsi_dev, int new_depth, | 808 | int sas_change_queue_depth(struct scsi_device *scsi_dev, int new_depth, |
809 | int reason) | 809 | int reason) |
810 | { | 810 | { |
811 | struct domain_device *dev = sdev_to_domain_dev(scsi_dev); | ||
811 | int res = min(new_depth, SAS_MAX_QD); | 812 | int res = min(new_depth, SAS_MAX_QD); |
812 | 813 | ||
814 | if (dev_is_sata(dev)) | ||
815 | return __ata_change_queue_depth(dev->sata_dev.ap, scsi_dev, | ||
816 | new_depth, reason); | ||
817 | |||
813 | if (reason != SCSI_QDEPTH_DEFAULT) | 818 | if (reason != SCSI_QDEPTH_DEFAULT) |
814 | return -EOPNOTSUPP; | 819 | return -EOPNOTSUPP; |
815 | 820 | ||
@@ -817,7 +822,6 @@ int sas_change_queue_depth(struct scsi_device *scsi_dev, int new_depth, | |||
817 | scsi_adjust_queue_depth(scsi_dev, scsi_get_tag_type(scsi_dev), | 822 | scsi_adjust_queue_depth(scsi_dev, scsi_get_tag_type(scsi_dev), |
818 | res); | 823 | res); |
819 | else { | 824 | else { |
820 | struct domain_device *dev = sdev_to_domain_dev(scsi_dev); | ||
821 | sas_printk("device %llx LUN %x queue depth changed to 1\n", | 825 | sas_printk("device %llx LUN %x queue depth changed to 1\n", |
822 | SAS_ADDR(dev->sas_addr), | 826 | SAS_ADDR(dev->sas_addr), |
823 | scsi_dev->lun); | 827 | scsi_dev->lun); |
@@ -830,6 +834,11 @@ int sas_change_queue_depth(struct scsi_device *scsi_dev, int new_depth, | |||
830 | 834 | ||
831 | int sas_change_queue_type(struct scsi_device *scsi_dev, int qt) | 835 | int sas_change_queue_type(struct scsi_device *scsi_dev, int qt) |
832 | { | 836 | { |
837 | struct domain_device *dev = sdev_to_domain_dev(scsi_dev); | ||
838 | |||
839 | if (dev_is_sata(dev)) | ||
840 | return -EINVAL; | ||
841 | |||
833 | if (!scsi_dev->tagged_supported) | 842 | if (!scsi_dev->tagged_supported) |
834 | return 0; | 843 | return 0; |
835 | 844 | ||