aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-05 10:41:39 -0400
committerJeff Garzik <jgarzik@redhat.com>2009-06-05 14:40:46 -0400
commit45bc955bb1324a46c9539550cc615994e6d0a43d (patch)
tree93c7349e666c5f13fec8dde04b5c8ac2c9e1a251 /drivers
parentedaba2c5334492f82d39ec35637c6dea5176a977 (diff)
pata_legacy: wait for async probing
The basic problem here that pata_legacy attaches the host, sees if it found any devices and detaches it if none were found. With async probing, it's not waiting until discovery is finished before deciding it has no devices and trying the detach leading to this warning: ata1: PATA max PIO4 cmd 0x1f0 ctl 0x3f6 irq 14 ------------[ cut here ]------------ WARNING: at drivers/ata/libata-core.c:6222 ata_host_detach+0x75/0x90() Modules linked in: Pid: 1, comm: swapper Not tainted 2.6.30-rc7 #1 Call Trace: [<c01fbb05>] ? ata_host_detach+0x75/0x90 [<c01fbb05>] ? ata_host_detach+0x75/0x90 [<c01139b5>] ? warn_slowpath_common+0x45/0x80 [<c01139fa>] ? warn_slowpath_null+0xa/0x10 [<c01fbb05>] ? ata_host_detach+0x75/0x90 [<c02f40e0>] ? legacy_init+0x44e/0x87f [<c02f3c92>] ? legacy_init+0x0/0x87f [<c0101021>] ? _stext+0x21/0x140 [<c01890ff>] ? proc_register+0x2f/0x190 [<c018938c>] ? create_proc_entry+0x5c/0xc0 [<c0135ebe>] ? register_irq_proc+0x6e/0x90 [<c02e6484>] ? kernel_init+0x6e/0xbf [<c02e6416>] ? kernel_init+0x0/0xbf [<c01031d7>] ? kernel_thread_helper+0x7/0x10 ---[ end trace ef1ee36e873ae3a0 ]--- Because it detaches before the probe is complete. One way to fix it would be to put an async_synchronize_full() before looking for devices, which this patch does. A better way might be to separate libata into its own domain and only wait for that. Reported-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/pata_legacy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index f72c6c5b820f..6932e56d179c 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -48,6 +48,7 @@
48 * 48 *
49 */ 49 */
50 50
51#include <linux/async.h>
51#include <linux/kernel.h> 52#include <linux/kernel.h>
52#include <linux/module.h> 53#include <linux/module.h>
53#include <linux/pci.h> 54#include <linux/pci.h>
@@ -1028,6 +1029,7 @@ static __init int legacy_init_one(struct legacy_probe *probe)
1028 &legacy_sht); 1029 &legacy_sht);
1029 if (ret) 1030 if (ret)
1030 goto fail; 1031 goto fail;
1032 async_synchronize_full();
1031 ld->platform_dev = pdev; 1033 ld->platform_dev = pdev;
1032 1034
1033 /* Nothing found means we drop the port as its probably not there */ 1035 /* Nothing found means we drop the port as its probably not there */