Messages in this thread | | | Date | Thu, 16 Mar 2000 00:35:55 +0900 | From | GOTO Masanori <> | Subject | Re: [2.3.51] via-rhine died |
| |
At Tue, 14 Mar 2000 21:29:20 +0100 (CET), Urban Widmark <urban@svenskatest.se> wrote: > > On Tue, 14 Mar 2000, GOTO Masanori wrote: > > > At Sat, 11 Mar 2000 16:16:54 +0100 (CET), > > Urban Widmark <urban@svenskatest.se> wrote: > > > > When I try to ping anything outside my box, I get 'unreachable' errors. I > > > > tried compiling it as a module or inside the kernel - no luck. 2.3.49 > > > > worked fine. > > > > > > Same here. My kernel log: > > > > Also same under my environment. > > This problem was appeared under 2.3.50: > > I get no interrupts from the card with 2.3.51 and pre-2.3.52-2 (assuming > 2.3.50 would be the same). It appears something was lost in the change to > the init routine. > > The patch below makes the card come to life for me. patch is for > pre-2.3.52-2 but should work with 2.3.51. Please test it and see if it > works for you. Changing the #if 1 to #if 0 should make it stop working > again. > > I'm guessing init_alloc_dev doesn't allocate the device private area on > the boundary that the via-rhine driver assumes. But I can't find where it > assumes things about that (unless virt_to_bus is involved ...?). > > /Urban > > > --- linux/drivers/net/via-rhine.c.52 Tue Mar 14 19:05:59 2000 > +++ linux/drivers/net/via-rhine.c Tue Mar 14 21:04:40 2000 > @@ -426,6 +426,14 @@ > card_idx); > goto err_out; > } > +#if 1 > + /* We need this for some reason ... why? */ > + np = (void *)(((long)kmalloc(sizeof(*np), GFP_KERNEL) + 31) & ~31); > + if(!np) > + goto err_out_free_netdev; > + memset(np, 0, sizeof(*np)); > + dev->priv = np; > +#endif > > if (!request_region(pci_resource_start (pdev, 0), io_size, dev->name)) { > printk (KERN_ERR "request_region failed for device %s, region 0x%X @ 0x%lX\n", >
I tested your patch with 2.3.50 and 2.3.51, it worked fine. Thanks!
I got another mail from Jeff Garzik <jgarzik@mandrakesoft.mandrakesoft.com>, and that patch made by Justin <jguyett@andrew.cmu.edu> seems same as your patch, but this patch includes the modification of 'dev = init_etherdev(NULL, sizeof (*dev));'. It works also fine. I add Jeff's mail (including Justin's patch) below.
IMHO, via-rhine.c should fix quickly with these patches.
At Tue, 14 Mar 2000 10:08:11 -0600 (CST), Jeff Garzik <jgarzik@mandrakesoft.mandrakesoft.com> wrote: > > GOTO -- can you try this patch? > > Jeff > > > > > > ---------- Forwarded message ---------- > Date: Thu, 9 Mar 2000 15:40:43 -0500 (EST) > From: Justin <jguyett@andrew.cmu.edu> > To: Jeff Garzik <jgarzik@mandrakesoft.com> > Subject: Re: [patch] via-rhine.c on 2.3.50 > > Whoops, I was wrong, the pci stuff had nothing to do with it. > > This patch seems to fix the driver on 2.3.50, and beautifies the initial > comment. > > This is probably a dumb question, but what's the reasoning behind starting > the queue after a tx timeout? (around like 710) > > (patch is against 2.3.50) > --- via-rhine.c.orig Thu Mar 9 12:15:59 2000 > +++ via-rhine.c Thu Mar 9 15:17:40 2000 > @@ -20,14 +20,14 @@ > > > Linux kernel version history: > - > + > LK1.1.0: > - Jeff Garzik: softnet 'n stuff > - > + > LK1.1.1: > - Justin Guyett: softnet and locking fixes > - Jeff Garzik: use PCI interface > - > + > */ > > static const char *versionA = > @@ -420,7 +420,7 @@ > if (via_rhine_chip_info[chip_id].flags & PCI_USES_MASTER) > pci_set_master (pdev); > > - dev = init_etherdev(NULL, sizeof (*np)); > + dev = init_etherdev(NULL, sizeof (*dev)); > if (dev == NULL) { > printk (KERN_ERR "init_ethernet failed for card #%d\n", > card_idx); > @@ -466,7 +466,10 @@ > dev->base_addr = ioaddr; > dev->irq = irq; > > - np = dev->priv; > + np = (void *)(((long)kmalloc(sizeof(*np), GFP_KERNEL) + 31) & ~31); > + if(np == NULL) > + goto err_out_np_failed; > + dev->priv = np; > spin_lock_init (&np->lock); > np->chip_id = chip_id; > > @@ -518,6 +521,7 @@ > > return 0; > > +err_out_np_failed: > #ifndef VIA_USE_IO > /* note this is ifdef'd because the ioremap is ifdef'd... > * so additional exit conditions above this must move >
Regards, -- GOTO Masanori
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |