From 6d2dd054295e26dad0a84e2fe2029a1428242f8b Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Mon, 31 Oct 2011 23:50:16 -0200 Subject: [libata] libata-scsi.c: Add function parameter documentation Add the documentation of parameters of ata_change_queue_depth to silence the warning of make xmldocs Signed-off-by: Marcos paulo de Souza Acked-by: Randy Dunlap Signed-off-by: Jeff Garzik diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 72a9770..2a5412e 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -1217,6 +1217,10 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev) /** * __ata_change_queue_depth - helper for ata_scsi_change_queue_depth + * @ap: ATA port to which the device change the queue depth + * @sdev: SCSI device to configure queue depth for + * @queue_depth: new queue depth + * @reason: calling context * * libsas and libata have different approaches for associating a sdev to * its ata_port. -- cgit v0.10.2 From 003456145f0d23b73f080abd1fd7981788438693 Mon Sep 17 00:00:00 2001 From: JiSheng Zhang Date: Mon, 31 Oct 2011 21:20:10 +0800 Subject: ahci_platform: use dev_get_platdata() Use dev_get_platdata() to retrieve the struct ahci_platform_data data from the platform. Signed-off-by: JiSheng Zhang Signed-off-by: Jeff Garzik diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 004f2ce..ec55595 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -65,7 +65,7 @@ static struct scsi_host_template ahci_platform_sht = { static int __init ahci_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct ahci_platform_data *pdata = dev->platform_data; + struct ahci_platform_data *pdata = dev_get_platdata(dev); const struct platform_device_id *id = platform_get_device_id(pdev); struct ata_port_info pi = ahci_port_info[id->driver_data]; const struct ata_port_info *ppi[] = { &pi, NULL }; @@ -191,7 +191,7 @@ err0: static int __devexit ahci_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct ahci_platform_data *pdata = dev->platform_data; + struct ahci_platform_data *pdata = dev_get_platdata(dev); struct ata_host *host = dev_get_drvdata(dev); ata_host_detach(host); -- cgit v0.10.2 From 142924cf402f9c0568004f0e2a27988fe3556c61 Mon Sep 17 00:00:00 2001 From: Chris Dunlop Date: Mon, 24 Oct 2011 10:38:18 +1100 Subject: sata_sis.c: trivial spelling fix Trivial spelling fix. Signed-off-by: Chris Dunlop Signed-off-by: Jeff Garzik diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index 447d9c0..95ec435 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c @@ -104,7 +104,7 @@ static const struct ata_port_info sis_port_info = { }; MODULE_AUTHOR("Uwe Koziolek"); -MODULE_DESCRIPTION("low-level driver for Silicon Integratad Systems SATA controller"); +MODULE_DESCRIPTION("low-level driver for Silicon Integrated Systems SATA controller"); MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, sis_pci_tbl); MODULE_VERSION(DRV_VERSION); -- cgit v0.10.2 From 7a46c0780babea7d0b3f277a33ea243be38eb942 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Wed, 19 Oct 2011 17:17:02 -0700 Subject: [libata] Issue SRST to Sil3726 PMP Reenable sending SRST to devices connected behind a Sil3726 PMP. This allow staggered spinups and handles drives that spins up slowly. While the drives spin up, the PMP will not accept SRST. Most controller reissues the reset until the drive is ready, while some [Sil3124] returns an error. In ata_eh_error, wait 10s before reset the ATA port and try again. Signed-off-by: Gwendal Grignou Acked-by: Tejun Heo Signed-off-by: Jeff Garzik diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index f22957c..a9b2820 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2883,7 +2883,7 @@ int ata_eh_reset(struct ata_link *link, int classify, sata_scr_read(link, SCR_STATUS, &sstatus)) rc = -ERESTART; - if (rc == -ERESTART || try >= max_tries) { + if (try >= max_tries) { /* * Thaw host port even if reset failed, so that the port * can be retried on the next phy event. This risks @@ -2909,6 +2909,16 @@ int ata_eh_reset(struct ata_link *link, int classify, ata_eh_acquire(ap); } + /* + * While disks spinup behind PMP, some controllers fail sending SRST. + * They need to be reset - as well as the PMP - before retrying. + */ + if (rc == -ERESTART) { + if (ata_is_host_link(link)) + ata_eh_thaw_port(ap); + goto out; + } + if (try == max_tries - 1) { sata_down_spd_limit(link, 0); if (slave) diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index 104462d..21b80c5 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c @@ -389,12 +389,9 @@ static void sata_pmp_quirks(struct ata_port *ap) /* link reports offline after LPM */ link->flags |= ATA_LFLAG_NO_LPM; - /* Class code report is unreliable and SRST - * times out under certain configurations. - */ + /* Class code report is unreliable. */ if (link->pmp < 5) - link->flags |= ATA_LFLAG_NO_SRST | - ATA_LFLAG_ASSUME_ATA; + link->flags |= ATA_LFLAG_ASSUME_ATA; /* port 5 is for SEMB device and it doesn't like SRST */ if (link->pmp == 5) -- cgit v0.10.2 From c9703765f3d5ab27909011dee4a05affe48e4442 Mon Sep 17 00:00:00 2001 From: Keng-Yu Lin Date: Wed, 9 Nov 2011 01:47:36 -0500 Subject: [libata] ahci: Add ASMedia ASM1061 support Signed-off-by: Keng-Yu Lin Signed-off-by: Jeff Garzik diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index fb7b90b..cf26222 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -390,6 +390,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { /* Promise */ { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ + /* Asmedia */ + { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1061 */ + /* Generic, PCI class code for AHCI */ { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci }, diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 3fdf251..172ba70 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2405,6 +2405,8 @@ #define PCI_VENDOR_ID_AZWAVE 0x1a3b +#define PCI_VENDOR_ID_ASMEDIA 0x1b21 + #define PCI_VENDOR_ID_TEKRAM 0x1de1 #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 -- cgit v0.10.2 From 2d5fcc986da944bca8257f358b155eec79fc4120 Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Thu, 10 Nov 2011 20:28:59 +0400 Subject: pata_of_platform: Don't use NO_IRQ Drivers should not use NO_IRQ; moreover, some architectures don't have it nowadays. '0' is the 'no irq' case. Signed-off-by: Anton Vorontsov Acked-by: Alan Cox Signed-off-by: Jeff Garzik diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c index a72ab0d..2a472c5 100644 --- a/drivers/ata/pata_of_platform.c +++ b/drivers/ata/pata_of_platform.c @@ -52,7 +52,7 @@ static int __devinit pata_of_platform_probe(struct platform_device *ofdev) } ret = of_irq_to_resource(dn, 0, &irq_res); - if (ret == NO_IRQ) + if (!ret) irq_res.start = irq_res.end = 0; else irq_res.flags = 0; -- cgit v0.10.2