From: Thibaut VARENE This patch adds missing initialization sequence, necessary to get the "Macintosh" version of AEC6280 cards to work in Linux. Without this patch, the driver hangs for several minutes trying to initialize the card and the kernel is left in an unstable state. This patch has been tested fine on ppc and i386. Signed-off-by: Thibaut VARENE Cc: Bartlomiej Zolnierkiewicz Cc: Alan Cox Signed-off-by: Andrew Morton --- drivers/ide/pci/aec62xx.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+) diff -puN drivers/ide/pci/aec62xx.c~ide-restore-support-for-aec6280m-cards-in-aec62xxc drivers/ide/pci/aec62xx.c --- devel/drivers/ide/pci/aec62xx.c~ide-restore-support-for-aec6280m-cards-in-aec62xxc 2005-12-10 18:43:09.000000000 -0800 +++ devel-akpm/drivers/ide/pci/aec62xx.c 2005-12-10 18:43:09.000000000 -0800 @@ -262,6 +262,21 @@ static unsigned int __devinit init_chips else pci_set_drvdata(dev, (void *) aec6xxx_34_base); + /* These are necessary to get AEC6280 Macintosh cards to work */ + if ((dev->device == PCI_DEVICE_ID_ARTOP_ATP865) || + (dev->device == PCI_DEVICE_ID_ARTOP_ATP865R)) { + u8 reg49h = 0, reg4ah = 0; + /* Clear reset and test bits. */ + pci_read_config_byte(dev, 0x49, ®49h); + pci_write_config_byte(dev, 0x49, reg49h & ~0x30); + /* Enable chip interrupt output. */ + pci_read_config_byte(dev, 0x4a, ®4ah); + pci_write_config_byte(dev, 0x4a, reg4ah & ~0x01); + /* Enable burst mode. */ + pci_read_config_byte(dev, 0x4a, ®4ah); + pci_write_config_byte(dev, 0x4a, reg4ah | 0x80); + } + return dev->irq; } _