Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2e13093a834ddbbf92701d477e69c9018959a82c
Commit:     2e13093a834ddbbf92701d477e69c9018959a82c
Parent:     ba6560aa45fc498125b07130784ec5ca8a6922a6
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 26 20:13:04 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Jan 26 20:13:04 2008 +0100

    ide: fix probing for hosts with serialized or IRQ sharing interfaces
    
    After hwif_register_devices() IDE devices are ready to be used so
    the way in which ide_device_add() works currently is racy for hosts
    with serialized / IRQ sharing interfaces.
    
    Fix ide_device_add() by looping over interfaces for probe_hwif(),
    hwif_init() and hwif_register_devices() operations.
    
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-probe.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index bfcc807..817564f 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1382,9 +1382,14 @@ int ide_device_add(u8 idx[4])
                if (idx[i] == 0xff)
                        continue;
 
-               hwif = &ide_hwifs[idx[i]];
+               probe_hwif(&ide_hwifs[idx[i]]);
+       }
 
-               probe_hwif(hwif);
+       for (i = 0; i < 4; i++) {
+               if (idx[i] == 0xff)
+                       continue;
+
+               hwif = &ide_hwifs[idx[i]];
 
                if (hwif_init(hwif) == 0) {
                        printk(KERN_INFO "%s: failed to initialize IDE "
@@ -1392,6 +1397,13 @@ int ide_device_add(u8 idx[4])
                        rc = -1;
                        continue;
                }
+       }
+
+       for (i = 0; i < 4; i++) {
+               if (idx[i] == 0xff)
+                       continue;
+
+               hwif = &ide_hwifs[idx[i]];
 
                if (hwif->present)
                        hwif_register_devices(hwif);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to