lkml.org 
[lkml]   [2005]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch] drivers/ide/pci/alim15x3.c SMP fix

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

    Ingo

    Signed-off-by: Ingo Molnar <mingo@elte.hu>

    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 majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-09-01 09:26    [W:0.026 / U:1.292 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site