linux/drivers/ata
Aaron Lu 44521527be libata-acpi: add back ACPI based hotplug functionality
Commit 30dcf76acc "libata: migrate ACPI code over to new bindings"
mistakenly dropped the code to register hotplug notificaion handler
for ATA port/devices, causing regression for people using ATA bay,
as kernel bug #59871 shows.

Fix this by adding back the hotplug notification handler registration
code.  Since this code has to be run once and notification needs to
be installed on every ATA port/devices handle no matter if there is
actual device attached, we can't do this in binding time for ATA
device ACPI handle, as the binding only occurs when a SCSI device is
created, i.e. there is device attached.  So introduce the
ata_acpi_hotplug_init() function to loop scan all ATA ACPI handles
and if it is available, install the notificaion handler for it during
ATA init time.

With the ATA ACPI handle binding to SCSI device tree, it is possible
now that when the SCSI hotplug work removes the SCSI device, the ACPI
unbind function will find that the corresponding ACPI device has
already been deleted by dock driver, causing a scaring message like:
[  128.263966] scsi 4:0:0:0: Oops, 'acpi_handle' corrupt
Fix this by waiting for SCSI hotplug task finish in our notificaion
handler, so that the removal of ACPI device done in ACPI unbind
function triggered by the removal of SCSI device is run earlier when
ACPI device is still available.

[rjw: Rebased]
References: https://bugzilla.kernel.org/show_bug.cgi?id=59871
Reported-bisected-and-tested-by: Dirk Griesbach <spamthis@freenet.de>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: 3.6+ <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-06-25 00:51:33 +02:00
..
acard-ahci.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
ahci_platform.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
ahci.c ahci: add an observed PCI ID for Marvell 88se9172 SATA controller 2013-05-29 10:20:35 +09:00
ahci.h libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
ata_generic.c
ata_piix.c ata_piix: add PCI IDs for Intel BayTail 2013-05-16 11:06:29 -07:00
Kconfig [libata] Avoid specialized TLA's in ZPODD's Kconfig 2013-03-04 17:12:46 -05:00
libahci.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
libata-acpi.c libata-acpi: add back ACPI based hotplug functionality 2013-06-25 00:51:33 +02:00
libata-core.c libata-acpi: add back ACPI based hotplug functionality 2013-06-25 00:51:33 +02:00
libata-eh.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
libata-pmp.c
libata-scsi.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
libata-sff.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
libata-transport.c Revert "libata: export host controller number thru /sys" 2013-01-25 15:30:23 -05:00
libata-transport.h
libata-zpodd.c [libata] fix smatch warning for zpodd_wake_dev 2013-02-20 17:14:03 -05:00
libata.h libata-acpi: add back ACPI based hotplug functionality 2013-06-25 00:51:33 +02:00
Makefile libata: add R-Car SATA driver 2013-02-20 17:10:53 -05:00
pata_acpi.c
pata_ali.c
pata_amd.c
pata_arasan_cf.c ata: arasan: remove the need for platform_data 2013-04-19 22:25:51 +02:00
pata_artop.c
pata_at32.c pata_at32: use module_platform_driver_probe() 2013-04-03 19:52:10 -04:00
pata_at91.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_atiixp.c
pata_atp867x.c
pata_bf54x.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_cmd64x.c
pata_cmd640.c
pata_cs5520.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_cs5530.c
pata_cs5535.c
pata_cs5536.c
pata_cypress.c
pata_efar.c
pata_ep93xx.c drivers/ata: don't check resource with devm_ioremap_resource 2013-05-12 15:19:46 +02:00
pata_hpt3x2n.c
pata_hpt3x3.c
pata_hpt37x.c
pata_hpt366.c
pata_icside.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_imx.c pata_imx: add devicetree support 2013-04-11 19:38:00 -04:00
pata_isapnp.c
pata_it821x.c
pata_it8213.c
pata_ixp4xx_cf.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_jmicron.c
pata_legacy.c pata_legacy: bogus clock in opti82c46x_set_piomode() 2013-04-03 19:53:10 -04:00
pata_macio.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_marvell.c
pata_mpc52xx.c Merge remote-tracking branch 'agust/next' into next 2013-02-20 11:39:05 +11:00
pata_mpiix.c
pata_netcell.c
pata_ninja32.c
pata_ns87410.c
pata_ns87415.c
pata_octeon_cf.c pata_octeon_cf: Use resource_size function 2013-04-03 19:53:30 -04:00
pata_of_platform.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_oldpiix.c
pata_opti.c
pata_optidma.c
pata_palmld.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_pcmcia.c drivers/ata: use module_pcmcia_driver() in pcmcia drivers 2013-03-15 12:26:03 -07:00
pata_pdc202xx_old.c
pata_pdc2027x.c pata_pdc2027x: Fix compiler warning 2013-04-12 15:24:12 +02:00
pata_piccolo.c
pata_platform.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_pxa.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_radisys.c
pata_rb532_cf.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_rdc.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_rz1000.c
pata_samsung_cf.c pata_samsung_cf: use module_platform_driver_probe() 2013-03-04 17:12:52 -05:00
pata_sc1200.c
pata_scc.c
pata_sch.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_serverworks.c
pata_sil680.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pata_sis.c
pata_sl82c105.c
pata_triflex.c
pata_via.c
pdc_adma.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
sata_dwc_460ex.c
sata_fsl.c 1) More ACPI fixes, cleanups 2013-04-30 16:13:36 -07:00
sata_highbank.c sata_highbank: Rename proc_name to the module name 2013-04-30 18:02:56 -04:00
sata_inic162x.c
sata_mv.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
sata_nv.c
sata_promise.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
sata_promise.h
sata_qstor.c
sata_rcar.c sata_rcar: fix interrupt handling 2013-06-02 00:54:45 -07:00
sata_sil24.c
sata_sil.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
sata_sis.c
sata_svw.c sata_svw: switch to ->show_info() 2013-04-09 14:13:28 -04:00
sata_sx4.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
sata_uli.c
sata_via.c libata: update "Maintained by:" tags 2013-05-14 11:13:04 -07:00
sata_vsc.c Drivers: ata: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
sis.h