Patch to compile latest driver under 2.3.42
Carlo E. Prelz
fluido@fluidware.com
Thu Feb 3 16:38:23 2000
Hello. I had been afflicted by the "trying to restart" messages on a
machine with an eepro card, together with a tulip and an old isa
3c509. I dowloaded Donald becker's latest driver (v1.09t) in the hope
to solve this problem, but the file would not compile under the latest
kernel source. With this patch, it compiles fine, and no warning
messages are generated anymore.
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
--- eepro100.c Thu Sep 30 02:51:26 1999
+++ /usr/src/linux/drivers/net/eepro100.c Thu Feb 3 14:35:26 2000
@@ -90,9 +90,7 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
-#if LINUX_VERSION_CODE >= 0x20200
-#include <asm/spinlock.h>
-#endif
+#include <linux/spinlock.h>
#include <asm/bitops.h>
#include <asm/io.h>
@@ -163,7 +161,7 @@
struct pci_dev { int not_used; };
#endif
-#define pci_find_slot(bus, devfn) (struct pci_dev*)((bus<<8) | devfn | 0xf0000)
+//#define pci_find_slot(bus, devfn) (struct pci_dev*)((bus<<8) | devfn | 0xf0000)
#define bus_number(pci_dev) ((((int)(pci_dev))>>8) & 0xff)
#define devfn_number(pci_dev) (((int)(pci_dev)) & 0xff)
@@ -655,7 +653,7 @@
pci_flags = pci_tbl[chip_idx].pci_flags;
pdev = pci_find_slot(pci_bus, pci_device_fn);
#if LINUX_VERSION_CODE >= 0x20155
- pciaddr = pdev->base_address[(pci_flags >> 4) & 7];
+ pciaddr = pdev->resource[(pci_flags >> 4) & 7].start;
irq = pdev->irq;
#else
{
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
Enjoy!
Carlo
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluidware.com che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
-------------------------------------------------------------------
To unsubscribe send a message body containing "unsubscribe"
to linux-eepro100-request@beowulf.org