is this the right way to fix the UP assumption below?

        Ingo

Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>

Index: linux/drivers/ide/pci/alim15x3.c
===================================================================
--- linux.orig/drivers/ide/pci/alim15x3.c
+++ linux/drivers/ide/pci/alim15x3.c
@@ -323,7 +323,7 @@ static void ali15x3_tune_drive (ide_driv
                if (r_clc >= 16)
                        r_clc = 0;
        }
-       local_irq_save(flags);
+       spin_lock_irqsave(&ide_lock, flags);
        
        /* 
         * PIO mode => ATA FIFO on, ATAPI FIFO off
@@ -345,7 +345,7 @@ static void ali15x3_tune_drive (ide_driv
        
        pci_write_config_byte(dev, port, s_clc);
        pci_write_config_byte(dev, port+drive->select.b.unit+2, (a_clc << 4) | 
r_clc);
-       local_irq_restore(flags);
+       spin_unlock_irqrestore(&ide_lock, flags);
 
        /*
         * setup   active  rec
@@ -601,7 +601,7 @@ static unsigned int __devinit init_chips
        }
 #endif  /* defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) */
 
-       local_irq_save(flags);
+       spin_lock_irqsave(&ide_lock, flags);
 
        if (m5229_revision < 0xC2) {
                /*
@@ -614,7 +614,7 @@ static unsigned int __devinit init_chips
                 * clear bit 7
                 */
                pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F);
-               local_irq_restore(flags);
+               spin_unlock_irqrestore(&ide_lock, flags);
                return 0;
        }
 
@@ -639,7 +639,7 @@ static unsigned int __devinit init_chips
         * 0:0.0 so if we didn't find one we know what is cooking.
         */
        if (north && north->vendor != PCI_VENDOR_ID_AL) {
-               local_irq_restore(flags);
+               spin_unlock_irqrestore(&ide_lock, flags);
                return 0;
        }
 
@@ -662,7 +662,7 @@ static unsigned int __devinit init_chips
                        pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02);
                }
        }
-       local_irq_restore(flags);
+       spin_unlock_irqrestore(&ide_lock, flags);
        return 0;
 }
 
@@ -686,7 +686,7 @@ static unsigned int __devinit ata66_ali1
        unsigned long flags;
        u8 tmpbyte;
 
-       local_irq_save(flags);
+       spin_lock_irqsave(&ide_lock, flags);
 
        if (m5229_revision >= 0xC2) {
                /*
@@ -736,7 +736,7 @@ static unsigned int __devinit ata66_ali1
 
        pci_write_config_byte(dev, 0x53, tmpbyte);
 
-       local_irq_restore(flags);
+       spin_unlock_irqrestore(&ide_lock, flags);
 
        return(ata66);
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to