aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/alim15x3.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:30 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:30 -0500
commit8ac2b42a45896641ed292deaf038a1d2703d85a6 (patch)
treefb6c193f4a5f454c36b23c4e972fbe57bb1da6b1 /drivers/ide/pci/alim15x3.c
parent993da8f9ea7e00d21af49d0e14a131183288bcf8 (diff)
ide: add IDE_HFLAG_CLEAR_SIMPLEX host flag
* Rename 'simplex_stat' variable to 'dma_stat' in ide_get_or_set_dma_base(). * Factor out code for forcing host out of "simplex" mode from ide_get_or_set_dma_base() to ide_pci_clear_simplex() helper. * Add IDE_HFLAG_CLEAR_SIMPLEX host flag and set it in alim15x3 (for M5229), amd74xx (for AMD 7409), cmd64x (for CMD643), generic (for Netcell) and serverworks (for CSB5) host drivers. * Make ide_get_or_set_dma_base() test for IDE_HFLAG_CLEAR_SIMPLEX host flag instead of checking dev->device (BTW the code was buggy because it didn't check for dev->vendor, luckily none of these PCI Device IDs was used by some other vendor for PCI IDE controller). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/alim15x3.c')
-rw-r--r--drivers/ide/pci/alim15x3.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 9dd7cb4d07d4..0b65a2c9308f 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -775,7 +775,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
775 }; 775 };
776 776
777 struct ide_port_info d = ali15x3_chipset; 777 struct ide_port_info d = ali15x3_chipset;
778 u8 rev = dev->revision; 778 u8 rev = dev->revision, idx = id->driver_data;
779 779
780 if (pci_dev_present(ati_rs100)) 780 if (pci_dev_present(ati_rs100))
781 printk(KERN_WARNING "alim15x3: ATI Radeon IGP Northbridge is not yet fully tested.\n"); 781 printk(KERN_WARNING "alim15x3: ATI Radeon IGP Northbridge is not yet fully tested.\n");
@@ -798,6 +798,9 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
798 d.udma_mask = ATA_UDMA6; 798 d.udma_mask = ATA_UDMA6;
799 } 799 }
800 800
801 if (idx == 0)
802 d.host_flags |= IDE_HFLAG_CLEAR_SIMPLEX;
803
801#if defined(CONFIG_SPARC64) 804#if defined(CONFIG_SPARC64)
802 d.init_hwif = init_hwif_common_ali15x3; 805 d.init_hwif = init_hwif_common_ali15x3;
803#endif /* CONFIG_SPARC64 */ 806#endif /* CONFIG_SPARC64 */
@@ -807,7 +810,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
807 810
808static const struct pci_device_id alim15x3_pci_tbl[] = { 811static const struct pci_device_id alim15x3_pci_tbl[] = {
809 { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5229), 0 }, 812 { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5229), 0 },
810 { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), 0 }, 813 { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), 1 },
811 { 0, }, 814 { 0, },
812}; 815};
813MODULE_DEVICE_TABLE(pci, alim15x3_pci_tbl); 816MODULE_DEVICE_TABLE(pci, alim15x3_pci_tbl);