Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / ide / pci / alim15x3.c
index 67efb38..8b24b4f 100644 (file)
@@ -583,7 +583,7 @@ static int ali15x3_dma_setup(ide_drive_t *drive)
  *     appropriate also sets up the 1533 southbridge.
  */
   
-static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const char *name)
 {
        unsigned long flags;
        u8 tmpbyte;
@@ -677,7 +677,7 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char
  *     FIXME: frobs bits that are not defined on newer ALi devicea
  */
 
-static unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_ali15x3 (ide_hwif_t *hwif)
 {
        struct pci_dev *dev     = hwif->pci_dev;
        unsigned int ata66      = 0;
@@ -731,6 +731,8 @@ static unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif)
        
        if(m5229_revision <= 0x20)
                tmpbyte = (tmpbyte & (~0x02)) | 0x01;
+       else if (m5229_revision == 0xc7)
+               tmpbyte |= 0x03;
        else
                tmpbyte |= 0x01;
 
@@ -748,7 +750,7 @@ static unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif)
  *     Initialize the IDE structure side of the ALi 15x3 driver.
  */
  
-static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif)
+static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif)
 {
        hwif->autodma = 0;
        hwif->tuneproc = &ali15x3_tune_drive;
@@ -794,7 +796,7 @@ static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif)
  *     Sparc systems
  */
 
-static void __init init_hwif_ali15x3 (ide_hwif_t *hwif)
+static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
 {
        u8 ideic, inmir;
        s8 irq_routing_table[] = { -1,  9, 3, 10, 4,  5, 7,  6,
@@ -847,7 +849,7 @@ static void __init init_hwif_ali15x3 (ide_hwif_t *hwif)
  *     the actual work.
  */
 
-static void __init init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
+static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
 {
        if (m5229_revision < 0x20)
                return;
@@ -876,10 +878,15 @@ static ide_pci_device_t ali15x3_chipset __devinitdata = {
  
 static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
+       static struct pci_device_id ati_rs100[] = {
+               { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100) },
+               { },
+       };
+
        ide_pci_device_t *d = &ali15x3_chipset;
 
-       if(pci_find_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, NULL))
-               printk(KERN_ERR "Warning: ATI Radeon IGP Northbridge is not yet fully tested.\n");
+       if (pci_dev_present(ati_rs100))
+               printk(KERN_WARNING "alim15x3: ATI Radeon IGP Northbridge is not yet fully tested.\n");
 
 #if defined(CONFIG_SPARC64)
        d->init_hwif = init_hwif_common_ali15x3;