aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-09-20 18:11:03 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-02 13:40:43 -0400
commit11e16364aaac4544dd26ca56d399c954cc95d7a5 (patch)
tree909ade73511f7ef1f233bfa54684c2512828ae86 /drivers/scsi/pm8001
parente211e2c7b6e7f470c818ef67c952954e1b46a46d (diff)
[SCSI] pm8001: remove pm8001_slave_{alloc|configure}
libsas handles: 1/ limiting ata scanning to lun0 2/ changes to /sys/block/<sdX>/device/queue_depth for ata devices libata handles turning off ncq globally via kernel command line (libata.force=noncq) or sysfs (echo 1 > /sys/block/<sdX>/device/queue_depth). A lldd specific compile option is not necessary. Cc: Jack Wang <jack_wang@usish.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/pm8001')
-rw-r--r--drivers/scsi/pm8001/pm8001_init.c4
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.c31
-rw-r--r--drivers/scsi/pm8001/pm8001_sas.h2
3 files changed, 3 insertions, 34 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 172cefb6deb9..c21a2163f9f6 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -61,7 +61,7 @@ static struct scsi_host_template pm8001_sht = {
61 .name = DRV_NAME, 61 .name = DRV_NAME,
62 .queuecommand = sas_queuecommand, 62 .queuecommand = sas_queuecommand,
63 .target_alloc = sas_target_alloc, 63 .target_alloc = sas_target_alloc,
64 .slave_configure = pm8001_slave_configure, 64 .slave_configure = sas_slave_configure,
65 .slave_destroy = sas_slave_destroy, 65 .slave_destroy = sas_slave_destroy,
66 .scan_finished = pm8001_scan_finished, 66 .scan_finished = pm8001_scan_finished,
67 .scan_start = pm8001_scan_start, 67 .scan_start = pm8001_scan_start,
@@ -76,7 +76,7 @@ static struct scsi_host_template pm8001_sht = {
76 .use_clustering = ENABLE_CLUSTERING, 76 .use_clustering = ENABLE_CLUSTERING,
77 .eh_device_reset_handler = sas_eh_device_reset_handler, 77 .eh_device_reset_handler = sas_eh_device_reset_handler,
78 .eh_bus_reset_handler = sas_eh_bus_reset_handler, 78 .eh_bus_reset_handler = sas_eh_bus_reset_handler,
79 .slave_alloc = pm8001_slave_alloc, 79 .slave_alloc = sas_slave_alloc,
80 .target_destroy = sas_target_destroy, 80 .target_destroy = sas_target_destroy,
81 .ioctl = sas_ioctl, 81 .ioctl = sas_ioctl,
82 .shost_attrs = pm8001_host_attrs, 82 .shost_attrs = pm8001_host_attrs,
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c
index 7dbbf8bb4d88..9068f123eccf 100644
--- a/drivers/scsi/pm8001/pm8001_sas.c
+++ b/drivers/scsi/pm8001/pm8001_sas.c
@@ -216,20 +216,6 @@ int pm8001_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
216 return rc; 216 return rc;
217} 217}
218 218
219int pm8001_slave_alloc(struct scsi_device *scsi_dev)
220{
221 struct domain_device *dev = sdev_to_domain_dev(scsi_dev);
222 if (dev_is_sata(dev)) {
223 /* We don't need to rescan targets
224 * if REPORT_LUNS request is failed
225 */
226 if (scsi_dev->lun > 0)
227 return -ENXIO;
228 scsi_dev->tagged_supported = 1;
229 }
230 return sas_slave_alloc(scsi_dev);
231}
232
233/** 219/**
234 * pm8001_scan_start - we should enable all HBA phys by sending the phy_start 220 * pm8001_scan_start - we should enable all HBA phys by sending the phy_start
235 * command to HBA. 221 * command to HBA.
@@ -314,22 +300,7 @@ static int pm8001_task_prep_ssp(struct pm8001_hba_info *pm8001_ha,
314{ 300{
315 return PM8001_CHIP_DISP->ssp_io_req(pm8001_ha, ccb); 301 return PM8001_CHIP_DISP->ssp_io_req(pm8001_ha, ccb);
316} 302}
317int pm8001_slave_configure(struct scsi_device *sdev) 303
318{
319 struct domain_device *dev = sdev_to_domain_dev(sdev);
320 int ret = sas_slave_configure(sdev);
321 if (ret)
322 return ret;
323 if (dev_is_sata(dev)) {
324 #ifdef PM8001_DISABLE_NCQ
325 struct ata_port *ap = dev->sata_dev.ap;
326 struct ata_device *adev = ap->link.device;
327 adev->flags |= ATA_DFLAG_NCQ_OFF;
328 scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, 1);
329 #endif
330 }
331 return 0;
332}
333 /* Find the local port id that's attached to this device */ 304 /* Find the local port id that's attached to this device */
334static int sas_find_local_port_id(struct domain_device *dev) 305static int sas_find_local_port_id(struct domain_device *dev)
335{ 306{
diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h
index b97c8ab0c20e..93959febe205 100644
--- a/drivers/scsi/pm8001/pm8001_sas.h
+++ b/drivers/scsi/pm8001/pm8001_sas.h
@@ -471,8 +471,6 @@ void pm8001_ccb_task_free(struct pm8001_hba_info *pm8001_ha,
471 struct sas_task *task, struct pm8001_ccb_info *ccb, u32 ccb_idx); 471 struct sas_task *task, struct pm8001_ccb_info *ccb, u32 ccb_idx);
472int pm8001_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func, 472int pm8001_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func,
473 void *funcdata); 473 void *funcdata);
474int pm8001_slave_alloc(struct scsi_device *scsi_dev);
475int pm8001_slave_configure(struct scsi_device *sdev);
476void pm8001_scan_start(struct Scsi_Host *shost); 474void pm8001_scan_start(struct Scsi_Host *shost);
477int pm8001_scan_finished(struct Scsi_Host *shost, unsigned long time); 475int pm8001_scan_finished(struct Scsi_Host *shost, unsigned long time);
478int pm8001_queue_command(struct sas_task *task, const int num, 476int pm8001_queue_command(struct sas_task *task, const int num,