From 2e21f2ac441ec267aacd80a53bc7e4242e31ac0a Mon Sep 17 00:00:00 2001 From: Ivan Kokshaysky Date: Tue, 11 Nov 2003 17:02:24 -0800 Subject: [PATCH] [PATCH] ALI IDE forward port from 2.4.x This forward-ports some more of the ALI IDE sanity checks from the 2.4.x tree. In particular, we only do the enable bits for revisions < 0xC5 --- drivers/ide/pci/alim15x3.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 52225ce5e97ab..74202147fa055 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -629,28 +629,30 @@ static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char * box without a device at 0:0.0. The ALi bridge will be at * 0:0.0 so if we didn't find one we know what is cooking. */ - if (!isa_dev || (north && north->vendor != PCI_VENDOR_ID_AL)) { + if (north && north->vendor != PCI_VENDOR_ID_AL) { local_irq_restore(flags); return 0; } - /* - * set south-bridge's enable bit, m1533, 0x79 - */ - - pci_read_config_byte(isa_dev, 0x79, &tmpbyte); - if (m5229_revision == 0xC2) { + if (m5229_revision < 0xC5 && isa_dev) + { /* - * 1543C-B0 (m1533, 0x79, bit 2) + * set south-bridge's enable bit, m1533, 0x79 */ - pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x04); - } else if (m5229_revision >= 0xC3) { - /* - * 1553/1535 (m1533, 0x79, bit 1) - */ - pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02); - } + pci_read_config_byte(isa_dev, 0x79, &tmpbyte); + if (m5229_revision == 0xC2) { + /* + * 1543C-B0 (m1533, 0x79, bit 2) + */ + pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x04); + } else if (m5229_revision >= 0xC3) { + /* + * 1553/1535 (m1533, 0x79, bit 1) + */ + pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02); + } + } local_irq_restore(flags); return 0; } -- 2.53.0