From 2435dcb98cfe13c246aa27df393e22bc24bbcd20 Mon Sep 17 00:00:00 2001 From: Alistair Popple Date: Fri, 22 Nov 2013 13:08:29 +1100 Subject: ahci: add support for IBM Akebono platform device The new IBM Akebono board has a PPC476GTR SoC with an AHCI compliant SATA controller. This patch adds a compatible property for the new SoC to the AHCI platform driver. Signed-off-by: Alistair Popple Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org --- drivers/ata/ahci_platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index f9554318504f..4b231baceb09 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -329,6 +329,7 @@ static SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume); static const struct of_device_id ahci_of_match[] = { { .compatible = "snps,spear-ahci", }, { .compatible = "snps,exynos5440-ahci", }, + { .compatible = "ibm,476gtr-ahci", }, {}, }; MODULE_DEVICE_TABLE(of, ahci_of_match); -- cgit v1.2.3 From 6c9e1499861f34919beb279ea8c7a40378486a24 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Thu, 21 Nov 2013 11:07:09 +0800 Subject: pata_arasan_cf: add missing clk_disable_unprepare() on error path Add the missing clk_disable_unprepare() before return from cf_init() in the error handling case. Signed-off-by: Wei Yongjun Signed-off-by: Tejun Heo Acked-by: Viresh Kumar --- drivers/ata/pata_arasan_cf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index e88690ebfd82..73492dd4a4bc 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c @@ -319,6 +319,7 @@ static int cf_init(struct arasan_cf_dev *acdev) ret = clk_set_rate(acdev->clk, 166000000); if (ret) { dev_warn(acdev->host->dev, "clock set rate failed"); + clk_disable_unprepare(acdev->clk); return ret; } -- cgit v1.2.3 From e2fc623e7dda6004cf24ec1470c5a8cc6e1a05e3 Mon Sep 17 00:00:00 2001 From: Yijing Wang Date: Wed, 20 Nov 2013 17:28:25 +0800 Subject: ata: fix acpi_bus_get_device() return value check Since acpi_bus_get_device() returns plain int and not acpi_status, ACPI_FAILURE() should not be used for checking its return value. Fix that. tj: Dropped unused local variable @status from odd_can_poweroff(). Reported by kbuild test bot. Signed-off-by: Yijing Wang Signed-off-by: Tejun Heo Acked-by: Aaron Lu Cc: linux-ide@vger.kernel.org Cc: kbuild test robot --- drivers/ata/libata-zpodd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c index 68f9e3293e9c..88949c6d55dd 100644 --- a/drivers/ata/libata-zpodd.c +++ b/drivers/ata/libata-zpodd.c @@ -88,15 +88,13 @@ static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev) static bool odd_can_poweroff(struct ata_device *ata_dev) { acpi_handle handle; - acpi_status status; struct acpi_device *acpi_dev; handle = ata_dev_acpi_handle(ata_dev); if (!handle) return false; - status = acpi_bus_get_device(handle, &acpi_dev); - if (ACPI_FAILURE(status)) + if (acpi_bus_get_device(handle, &acpi_dev)) return false; return acpi_device_can_poweroff(acpi_dev); -- cgit v1.2.3 From 6d5278a68a75891db1df5ae1ecf83d288fc58c65 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Sun, 17 Nov 2013 23:56:17 +0100 Subject: ahci: add Marvell 9230 to the AHCI PCI device list Tested with a DAWICONTROL DC-624e on 3.10.10 Signed-off-by: Samir Benmendil Signed-off-by: Tejun Heo Reviewed-by: Levente Kurusa Cc: stable@vger.kernel.org --- drivers/ata/ahci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index e2903d03180e..14f1e9506338 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -435,6 +435,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), .driver_data = board_ahci_yes_fbs }, + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230), + .driver_data = board_ahci_yes_fbs }, /* Promise */ { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ -- cgit v1.2.3 From c5700766975c69d27150256444db63fbfd103791 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Mon, 25 Nov 2013 13:19:01 +0100 Subject: ATA: Fix port removal ordering After commit bcdde7e221a8 (sysfs: make __sysfs_remove_dir() recursive) Mika Westerberg sees traces analogous to the one below in Thunderbolt hot-remove testing: WARNING: CPU: 0 PID: 4 at fs/sysfs/group.c:214 sysfs_remove_group+0xc6/0xd0() sysfs group ffffffff81c6f1e0 not found for kobject 'host7' Modules linked in: CPU: 0 PID: 4 Comm: kworker/0:0 Not tainted 3.12.0+ #13 Hardware name: /D33217CK, BIOS GKPPT10H.86A.0042.2013.0422.1439 04/22/2013 Workqueue: kacpi_hotplug acpi_hotplug_work_fn 0000000000000009 ffff8801002459b0 ffffffff817daab1 ffff8801002459f8 ffff8801002459e8 ffffffff810436b8 0000000000000000 ffffffff81c6f1e0 ffff88006d440358 ffff88006d440188 ffff88006e8b4c28 ffff880100245a48 Call Trace: [] dump_stack+0x45/0x56 [] warn_slowpath_common+0x78/0xa0 [] warn_slowpath_fmt+0x47/0x50 [] ? sysfs_get_dirent_ns+0x49/0x70 [] sysfs_remove_group+0xc6/0xd0 [] dpm_sysfs_remove+0x3e/0x50 [] device_del+0x40/0x1b0 [] device_unregister+0xd/0x20 [] scsi_remove_host+0xba/0x110 [] ata_host_detach+0xc6/0x100 [] ata_pci_remove_one+0x18/0x20 [] pci_device_remove+0x28/0x60 [] __device_release_driver+0x64/0xd0 [] device_release_driver+0x1e/0x30 [] bus_remove_device+0xf7/0x140 [] device_del+0x121/0x1b0 [] pci_stop_bus_device+0x94/0xa0 [] pci_stop_bus_device+0x3b/0xa0 [] pci_stop_bus_device+0x3b/0xa0 [] pci_stop_and_remove_bus_device+0xd/0x20 [] trim_stale_devices+0x73/0xe0 [] trim_stale_devices+0xbb/0xe0 [] trim_stale_devices+0xbb/0xe0 [] acpiphp_check_bridge+0x7e/0xd0 [] hotplug_event+0xcd/0x160 [] hotplug_event_work+0x25/0x60 [] acpi_hotplug_work_fn+0x17/0x22 [] process_one_work+0x17a/0x430 [] worker_thread+0x119/0x390 [] ? manage_workers.isra.25+0x2a0/0x2a0 [] kthread+0xcd/0xf0 [] ? kthread_create_on_node+0x180/0x180 [] ret_from_fork+0x7c/0xb0 [] ? kthread_create_on_node+0x180/0x180 The source of this problem is that SCSI hosts are removed from ATA ports after calling ata_tport_delete() which removes the port's sysfs directory, among other things. Now, after commit bcdde7e221a8, the sysfs directory is removed along with all of its subdirectories that include the SCSI host's sysfs directory and its subdirectories at this point. Consequently, when device_del() is finally called for any child device of the SCSI host and tries to remove its "power" group (which is already gone then), it triggers the above warning. To make the warnings go away, change the removal ordering in ata_port_detach() so that the SCSI host is removed from the port before ata_tport_delete() is called. References: https://bugzilla.kernel.org/show_bug.cgi?id=65281 Reported-and-tested-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki Tested-by: Jingoo Han Signed-off-by: Tejun Heo --- drivers/ata/libata-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 81a94a3919db..75b93678bbcd 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -6304,10 +6304,9 @@ static void ata_port_detach(struct ata_port *ap) for (i = 0; i < SATA_PMP_MAX_PORTS; i++) ata_tlink_delete(&ap->pmp_link[i]); } - ata_tport_delete(ap); - /* remove the associated SCSI host */ scsi_remove_host(ap->scsi_host); + ata_tport_delete(ap); } /** -- cgit v1.2.3