Hello all:
Please apply.
Index: drivers/ide//pci/piix.c
===================================================================
RCS file: /home/hugang/local/cvs/2.4/drivers/ide/pci/piix.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 piix.c
--- drivers/ide//pci/piix.c 28 Nov 2002 06:41:20 -0000 1.1.1.2
+++ drivers/ide//pci/piix.c 4 Dec 2002 13:02:36 -0000
@@ -652,6 +652,27 @@
static void __init init_setup_piix (struct pci_dev *dev, ide_pci_device_t *d)
{
+ int i;
+ unsigned short cmd;
+ unsigned long flags;
+ unsigned long base_address[4] = { 0x1f0, 0x3f4, 0x170, 0x374 };
+
+ printk(KERN_INFO "PIIX: fixup IDE controller\n");
+ local_irq_save(flags);
+ pci_read_config_word(dev, PCI_COMMAND, &cmd);
+ pci_write_config_word(dev, PCI_COMMAND, cmd & ~PCI_COMMAND_IO);
+
+ for (i=0; i<4; i++) {
+ dev->resource[i].start = base_address[i];
+ dev->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
+ pci_write_config_dword(dev,
+ (PCI_BASE_ADDRESS_0 + (i * 4)),
+ dev->resource[i].start);
+ }
+
+ pci_write_config_word(dev, PCI_COMMAND, cmd);
+ local_irq_restore(flags);
+
ide_setup_pci_device(dev, d);
}
-- - Hu Gang
This archive was generated by hypermail 2b29 : Sat Dec 07 2002 - 22:00:19 EST