lkml.org 
[lkml]   [2000]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Oops when loading 3c509-module in test10
Håvard Garnes wrote:
>
> This occurs when the 3c509-module is being loaded at startup, and in
> /proc/modules it is listed as (initialising). It it worth mentioning
> that I have two 3c509-cards in my computer. This worked in test8.

Oops. This is one of the newer (and better) ISA modules, which actually
does allocate its device structure correctly.

Please apply this patch...

Jeff


--
Jeff Garzik | Dinner is ready when
Building 1024 | the smoke alarm goes off.
MandrakeSoft | -/usr/games/fortuneIndex: linux_2_4/drivers/net/3c509.c
diff -u linux_2_4/drivers/net/3c509.c:1.1.1.5 linux_2_4/drivers/net/3c509.c:1.1.1.3
--- linux_2_4/drivers/net/3c509.c:1.1.1.5 Tue Oct 31 13:21:47 2000
+++ linux_2_4/drivers/net/3c509.c Sun Oct 22 13:29:58 2000
@@ -434,6 +436,13 @@
/* Free the interrupt so that some other card can use it. */
outw(0x0f00, ioaddr + WN0_IRQ);
found:
+ if (dev == NULL) {
+ dev = init_etherdev(dev, sizeof(struct el3_private));
+ if (dev == NULL) {
+ release_region(ioaddr, EL3_IO_EXTENT);
+ return -ENOMEM;
+ }
+ }
memcpy(dev->dev_addr, phys_addr, sizeof(phys_addr));
dev->base_addr = ioaddr;
dev->irq = irq;
\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.306 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site