aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci.c2
-rw-r--r--drivers/ata/ahci_platform.c1
-rw-r--r--drivers/ata/ata_piix.c2
-rw-r--r--drivers/ata/libata-core.c4
-rw-r--r--drivers/ata/libata-eh.c3
-rw-r--r--drivers/ata/libata-scsi.c38
-rw-r--r--drivers/ata/libata-transport.c1
-rw-r--r--drivers/ata/libata.h2
-rw-r--r--drivers/ata/pata_arasan_cf.c4
-rw-r--r--drivers/ata/sata_mv.c3
10 files changed, 36 insertions, 24 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 79a1e9dd56d9..ebaf67e4b2bc 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -394,6 +394,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
394 .driver_data = board_ahci_yes_fbs }, /* 88se9128 */ 394 .driver_data = board_ahci_yes_fbs }, /* 88se9128 */
395 { PCI_DEVICE(0x1b4b, 0x9125), 395 { PCI_DEVICE(0x1b4b, 0x9125),
396 .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ 396 .driver_data = board_ahci_yes_fbs }, /* 88se9125 */
397 { PCI_DEVICE(0x1b4b, 0x917a),
398 .driver_data = board_ahci_yes_fbs }, /* 88se9172 */
397 { PCI_DEVICE(0x1b4b, 0x91a3), 399 { PCI_DEVICE(0x1b4b, 0x91a3),
398 .driver_data = board_ahci_yes_fbs }, 400 .driver_data = board_ahci_yes_fbs },
399 401
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 0c86c77764bc..9e419e1c2006 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -280,6 +280,7 @@ static struct dev_pm_ops ahci_pm_ops = {
280 280
281static const struct of_device_id ahci_of_match[] = { 281static const struct of_device_id ahci_of_match[] = {
282 { .compatible = "calxeda,hb-ahci", }, 282 { .compatible = "calxeda,hb-ahci", },
283 { .compatible = "snps,spear-ahci", },
283 {}, 284 {},
284}; 285};
285MODULE_DEVICE_TABLE(of, ahci_of_match); 286MODULE_DEVICE_TABLE(of, ahci_of_match);
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 68013f96729f..7857e8fd0a3e 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -329,6 +329,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
329 { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 329 { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
330 /* SATA Controller IDE (Lynx Point) */ 330 /* SATA Controller IDE (Lynx Point) */
331 { 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, 331 { 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
332 /* SATA Controller IDE (DH89xxCC) */
333 { 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
332 { } /* terminate list */ 334 { } /* terminate list */
333}; 335};
334 336
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index e0bda9ff89cd..23763a1ec570 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -95,7 +95,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
95static void ata_dev_xfermask(struct ata_device *dev); 95static void ata_dev_xfermask(struct ata_device *dev);
96static unsigned long ata_dev_blacklisted(const struct ata_device *dev); 96static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
97 97
98unsigned int ata_print_id = 1; 98atomic_t ata_print_id = ATOMIC_INIT(0);
99 99
100struct ata_force_param { 100struct ata_force_param {
101 const char *name; 101 const char *name;
@@ -6029,7 +6029,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
6029 6029
6030 /* give ports names and add SCSI hosts */ 6030 /* give ports names and add SCSI hosts */
6031 for (i = 0; i < host->n_ports; i++) 6031 for (i = 0; i < host->n_ports; i++)
6032 host->ports[i]->print_id = ata_print_id++; 6032 host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
6033 6033
6034 6034
6035 /* Create associated sysfs transport objects */ 6035 /* Create associated sysfs transport objects */
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c61316e9d2f7..d1fbd59ead16 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3501,7 +3501,8 @@ static int ata_count_probe_trials_cb(struct ata_ering_entry *ent, void *void_arg
3501 u64 now = get_jiffies_64(); 3501 u64 now = get_jiffies_64();
3502 int *trials = void_arg; 3502 int *trials = void_arg;
3503 3503
3504 if (ent->timestamp < now - min(now, interval)) 3504 if ((ent->eflags & ATA_EFLAG_OLD_ER) ||
3505 (ent->timestamp < now - min(now, interval)))
3505 return -1; 3506 return -1;
3506 3507
3507 (*trials)++; 3508 (*trials)++;
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 1ee00c8b5b04..22226350cd0c 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3399,7 +3399,8 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht)
3399 */ 3399 */
3400 shost->max_host_blocked = 1; 3400 shost->max_host_blocked = 1;
3401 3401
3402 rc = scsi_add_host(ap->scsi_host, &ap->tdev); 3402 rc = scsi_add_host_with_dma(ap->scsi_host,
3403 &ap->tdev, ap->host->dev);
3403 if (rc) 3404 if (rc)
3404 goto err_add; 3405 goto err_add;
3405 } 3406 }
@@ -3838,18 +3839,25 @@ void ata_sas_port_stop(struct ata_port *ap)
3838} 3839}
3839EXPORT_SYMBOL_GPL(ata_sas_port_stop); 3840EXPORT_SYMBOL_GPL(ata_sas_port_stop);
3840 3841
3841int ata_sas_async_port_init(struct ata_port *ap) 3842/**
3843 * ata_sas_async_probe - simply schedule probing and return
3844 * @ap: Port to probe
3845 *
3846 * For batch scheduling of probe for sas attached ata devices, assumes
3847 * the port has already been through ata_sas_port_init()
3848 */
3849void ata_sas_async_probe(struct ata_port *ap)
3842{ 3850{
3843 int rc = ap->ops->port_start(ap); 3851 __ata_port_probe(ap);
3844 3852}
3845 if (!rc) { 3853EXPORT_SYMBOL_GPL(ata_sas_async_probe);
3846 ap->print_id = ata_print_id++;
3847 __ata_port_probe(ap);
3848 }
3849 3854
3850 return rc; 3855int ata_sas_sync_probe(struct ata_port *ap)
3856{
3857 return ata_port_probe(ap);
3851} 3858}
3852EXPORT_SYMBOL_GPL(ata_sas_async_port_init); 3859EXPORT_SYMBOL_GPL(ata_sas_sync_probe);
3860
3853 3861
3854/** 3862/**
3855 * ata_sas_port_init - Initialize a SATA device 3863 * ata_sas_port_init - Initialize a SATA device
@@ -3866,12 +3874,10 @@ int ata_sas_port_init(struct ata_port *ap)
3866{ 3874{
3867 int rc = ap->ops->port_start(ap); 3875 int rc = ap->ops->port_start(ap);
3868 3876
3869 if (!rc) { 3877 if (rc)
3870 ap->print_id = ata_print_id++; 3878 return rc;
3871 rc = ata_port_probe(ap); 3879 ap->print_id = atomic_inc_return(&ata_print_id);
3872 } 3880 return 0;
3873
3874 return rc;
3875} 3881}
3876EXPORT_SYMBOL_GPL(ata_sas_port_init); 3882EXPORT_SYMBOL_GPL(ata_sas_port_init);
3877 3883
diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
index 74aaee30e264..c34190485377 100644
--- a/drivers/ata/libata-transport.c
+++ b/drivers/ata/libata-transport.c
@@ -294,6 +294,7 @@ int ata_tport_add(struct device *parent,
294 device_enable_async_suspend(dev); 294 device_enable_async_suspend(dev);
295 pm_runtime_set_active(dev); 295 pm_runtime_set_active(dev);
296 pm_runtime_enable(dev); 296 pm_runtime_enable(dev);
297 pm_runtime_forbid(dev);
297 298
298 transport_add_device(dev); 299 transport_add_device(dev);
299 transport_configure_device(dev); 300 transport_configure_device(dev);
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 2e26fcaf635b..9d0fd0b71852 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -53,7 +53,7 @@ enum {
53 ATA_DNXFER_QUIET = (1 << 31), 53 ATA_DNXFER_QUIET = (1 << 31),
54}; 54};
55 55
56extern unsigned int ata_print_id; 56extern atomic_t ata_print_id;
57extern int atapi_passthru16; 57extern int atapi_passthru16;
58extern int libata_fua; 58extern int libata_fua;
59extern int libata_noacpi; 59extern int libata_noacpi;
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index fc2db2a89a6b..3239517f4d90 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -943,9 +943,9 @@ static int arasan_cf_resume(struct device *dev)
943 943
944 return 0; 944 return 0;
945} 945}
946#endif
946 947
947static SIMPLE_DEV_PM_OPS(arasan_cf_pm_ops, arasan_cf_suspend, arasan_cf_resume); 948static SIMPLE_DEV_PM_OPS(arasan_cf_pm_ops, arasan_cf_suspend, arasan_cf_resume);
948#endif
949 949
950static struct platform_driver arasan_cf_driver = { 950static struct platform_driver arasan_cf_driver = {
951 .probe = arasan_cf_probe, 951 .probe = arasan_cf_probe,
@@ -953,9 +953,7 @@ static struct platform_driver arasan_cf_driver = {
953 .driver = { 953 .driver = {
954 .name = DRIVER_NAME, 954 .name = DRIVER_NAME,
955 .owner = THIS_MODULE, 955 .owner = THIS_MODULE,
956#ifdef CONFIG_PM
957 .pm = &arasan_cf_pm_ops, 956 .pm = &arasan_cf_pm_ops,
958#endif
959 }, 957 },
960}; 958};
961 959
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 38950ea8398a..7336d4a7ab31 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4025,7 +4025,8 @@ static int mv_platform_probe(struct platform_device *pdev)
4025 struct ata_host *host; 4025 struct ata_host *host;
4026 struct mv_host_priv *hpriv; 4026 struct mv_host_priv *hpriv;
4027 struct resource *res; 4027 struct resource *res;
4028 int n_ports, rc; 4028 int n_ports = 0;
4029 int rc;
4029 4030
4030 ata_print_version_once(&pdev->dev, DRV_VERSION); 4031 ata_print_version_once(&pdev->dev, DRV_VERSION);
4031 4032