back ports ICH3M support into 2.4.20
PATCH 1/1 back ports ICH3M support into 2.4.20
hello
Here is a back port patch for Intel ICH3M IDE support. It's more stable for me. Hope can merage into stable tree. thanks.
Signature · 1 line
- Hu Gang
Quoted 2 lines · hugang
hello
Here is a back port patch for Intel ICH3M IDE
2.4.20 already has the correct version of the fixes for partially configured IDE devices. The code you are posting is old and in several places wrong, hence it was removed.
2.4.20 will try and do a full pci device setup, then fall back to just configuring BAR4.
Alan
Quoted 4 lines · On 01 Dec 2002 18:03:25 +0000 Alan Cox <[email protected]> wrote:
Quoted 2 lines · hugang
hello
Here is a back port patch for Intel ICH3M IDE
Quoted 9 lines
2.4.20 already has the correct version of the fixes for partially configured IDE devices. The code you are posting is old and in several places wrong, hence it was removed.
2.4.20 will try and do a full pci device setup, then fall back to just configuring BAR4.
Alan
Here is an new patch for it. But I'm not true that , Place the fixup function in pci_init_piix is good way. But it works. Here is it.
Index: 2.4/drivers/ide/piix.c
drivers/ide/piix.c renamed from drivers/ide/piix.c:1.1.1.4 +27 -0
@@ -480,6 +480,30 @@ }#endif /* defined(CONFIG_BLK_DEV_IDEDMA) && (CONFIG_PIIX_TUNING) */ +inline void ide_register_xp_fix (struct pci_dev *dev) +{ +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); +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); +} +unsigned int __init pci_init_piix (struct pci_dev *dev,const char *name) {#if defined(DISPLAY_PIIX_TIMINGS ) && defined(CONFIG_PROC_FS )
@@ -489,6 +513,9 @@ piix_display_info = &piix_get_info; }#endif /* DISPLAY_PIIX_TIMINGS && CONFIG_PROC_FS */ +if (dev->resource[0 ].start !=0x01f1 ) +ide_register_xp_fix (dev); +return 0 ; }
Signature · 1 line
- Hu Gang
Quoted 11 lines · hugang
Quoted 9 lines
2.4.20 already has the correct version of the fixes for partially configured IDE devices. The code you are posting is old and in several places wrong, hence it was removed.
2.4.20 will try and do a full pci device setup, then fall back to just configuring BAR4.
Alan
Here is an new patch for it. But I'm not true that , Place the fixup function in
pci_init_piixis good way. But it works. Here is it.
See what I said before. 2.4.20 already does a pci BAR4 fixup if needed. Your change is still wrong.