summaryrefslogtreecommitdiffstats
path: root/drivers/net/dgrs.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
commitdcec8a13bf565e47942a1751a9cec21bec5648fe (patch)
tree548b69625b18cc2e88c3e68d0923be546c9ebb03 /drivers/net/dgrs.c
parent2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff)
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash. o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'drivers/net/dgrs.c')
-rw-r--r--drivers/net/dgrs.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c
index e562446e8..c379b3a43 100644
--- a/drivers/net/dgrs.c
+++ b/drivers/net/dgrs.c
@@ -87,7 +87,6 @@ static char *version = "$Id: dgrs.c,v 1.12 1996/12/21 13:43:58 rick Exp $";
#include <linux/malloc.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
-#include <linux/bios32.h>
#include <linux/init.h>
#include <asm/bitops.h>
#include <asm/io.h>
@@ -109,6 +108,7 @@ static char *version = "$Id: dgrs.c,v 1.12 1996/12/21 13:43:58 rick Exp $";
#define COPY_FROM_USER(DST,SRC,LEN) copy_from_user(DST,SRC,LEN)
#define COPY_TO_USER(DST,SRC,LEN) copy_to_user(DST,SRC,LEN)
#else
+ #include <linux/bios32.h>
#define IOREMAP(ADDR, LEN) vremap(ADDR, LEN)
#define IOUNMAP(ADDR) vfree(ADDR)
#define COPY_FROM_USER(DST,SRC,LEN) memcpy_fromfs(DST,SRC,LEN)
@@ -1373,14 +1373,19 @@ dgrs_scan(struct device *dev))
/*
* First, check for PCI boards
*/
- if (pcibios_present())
+ if (pci_present())
{
int pci_index = 0;
for (; pci_index < 8; pci_index++)
{
uchar pci_bus, pci_device_fn;
+#if LINUX_VERSION_CODE < 0x20100
uchar pci_irq;
+#else
+ uint pci_irq;
+ struct pci_dev *pdev;
+#endif
uchar pci_latency;
ushort pci_command;
@@ -1390,6 +1395,7 @@ dgrs_scan(struct device *dev))
&pci_device_fn))
break;
+#if LINUX_VERSION_CODE < 0x20100
pcibios_read_config_byte(pci_bus, pci_device_fn,
PCI_INTERRUPT_LINE, &pci_irq);
pcibios_read_config_dword(pci_bus, pci_device_fn,
@@ -1398,6 +1404,13 @@ dgrs_scan(struct device *dev))
PCI_BASE_ADDRESS_1, &io);
pcibios_read_config_dword(pci_bus, pci_device_fn,
PCI_BASE_ADDRESS_2, &mem);
+#else
+ pdev = pci_find_slot(pci_bus, pci_device_fn);
+ pci_irq = pdev->irq;
+ plxreg = pdev->base_address[0];
+ io = pdev->base_address[1];
+ mem = pdev->base_address[2];
+#endif
pcibios_read_config_dword(pci_bus, pci_device_fn,
0x30, &plxdma);
irq = pci_irq;