This is that patch that is required for the
NatSemi DP83815/NetGear FA311 patch
Description: PCI 'read_config_dword' and PCI bus patch
Fix: export 'pcibios_read_config_dword'
Fix: support PCI busses up to 127 (yes, I have such a machine)
Requires: Etherboot-5.0.1
diff --exclude=*~ --recursive --new-file -u etherboot-5.0.1/src/pci.c etherboot-5.0.1.new/src/pci.c
--- etherboot-5.0.1/src/pci.c Mon Apr 2 05:00:04 2001
+++ etherboot-5.0.1.new/src/pci.c Fri Jun 8 12:50:58 2001
@@ -48,7 +48,7 @@
return PCIBIOS_SUCCESSFUL;
}
-static int pcibios_read_config_dword (unsigned int bus, unsigned int device_fn,
+int pcibios_read_config_dword (unsigned int bus, unsigned int device_fn,
unsigned int where, unsigned int *value)
{
outl(CONFIG_CMD(bus,device_fn,where), 0xCF8);
@@ -170,7 +170,7 @@
return (int) (ret & 0xff00) >> 8;
}
-static int pcibios_read_config_dword(unsigned int bus,
+int pcibios_read_config_dword(unsigned int bus,
unsigned int device_fn, unsigned int where, unsigned int *value)
{
unsigned long ret;
@@ -365,7 +365,7 @@
int i, reg;
unsigned int pci_ioaddr = 0;
- buses=1;
+ buses=127;
for (bus = 0; bus < buses; ++bus) {
for (devfn = 0; devfn < 0xff; ++devfn) {
if (PCI_FUNC (devfn) == 0)
diff --exclude=*~ --recursive --new-file -u etherboot-5.0.1/src/pci.h etherboot-5.0.1.new/src/pci.h
--- etherboot-5.0.1/src/pci.h Wed Apr 18 11:22:51 2001
+++ etherboot-5.0.1.new/src/pci.h Thu Jun 7 09:59:07 2001
@@ -174,5 +176,6 @@
extern int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned char value);
extern int pcibios_read_config_word(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned short *value);
extern int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned short value);
+extern int pcibios_read_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int *value);
extern int pcibios_write_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int value);
#endif /* PCI_H */
--
Jason McMullan, Senior Linux Consultant
Linuxcare, Inc. 412.432.6457 tel, 412.656.3519 cell
jmc...@li..., http://www.linuxcare.com/
Linuxcare. Putting open source to work.
|