2003-11-21 09:51:50

by Russell Coker

[permalink] [raw]
Subject: de2104x tulip driver bug in 2.6.0-test9

00:14.0 Ethernet controller: Digital Equipment Corporation DECchip 21041
[Tulip Pass 3] (rev 11)

Above is the lspci output for my PCI Ethernet card. Below is what happens
when I try to boot 2.6.0-test9. 2.4.x kernels have been working well on the
same card for a long time, so the hardware seems basically OK.

Configuring network interfaces... eth0: set link BNC
eth0: mode 0x7ffc0040, sia 0x10c4,0xffffef09,0xfffff7fd,0xffff0006
eth0: set mode 0x7ffc0000, set sia 0xef09,0xf7fd,0x6
eth0: timeout expired stopping DMA
------------[ cut here ]------------
kernel BUG at drivers/net/tulip/de2104x.c:926!
invalid operand: 0000 [#1]
CPU: 0
EIP: 0060:[<d08a7f4c>] Not tainted
EFLAGS: 00010006
EIP is at de_set_media+0x1c/0x140 [de2104x]
eax: fc200100 ebx: cf172200 ecx: c02c6770 edx: d089f000
esi: cf172200 edi: 00000000 ebp: cf021e50 esp: cf021e44
ds: 007b es: 007b ss: 0068
Process ethtool (pid: 478, threadinfo=cf020000 task=cfb0ccc0)
Stack: cf172200 000008c3 00000000 cf021e84 d08a8fb6 cf172200 cf172200
cf172200
fffff73c 00000000 00000000 00000000 ffffffea cf020000 00000001
00000000
cf021e9c d08a9104 cf172200 cf021eb0 cf021eb0 cf172000 cf021eec
c0224368
Call Trace:
[<d08a8fb6>] __de_set_settings+0x186/0x200 [de2104x]
[<d08a9104>] de_set_settings+0x24/0x50 [de2104x]
[<c0224368>] ethtool_set_settings+0x68/0x90
[<c019e4fa>] capable+0x1a/0x40
[<c022587b>] dev_ethtool+0xab/0x220
[<c0223766>] dev_ioctl+0x156/0x350
[<c02613b7>] inet_ioctl+0xb7/0xd0
[<c021ae31>] sock_ioctl+0xf1/0x280
[<c015eac2>] sys_ioctl+0x112/0x280
[<c0109169>] sysenter_past_esp+0x52/0x79

Code: 0f 0b 9e 03 04 99 8a d0 f6 86 a4 05 00 00 01 74 0a c7 42 58
<7>eth0: tx err, status 0x7fffb178
note: ethtool[478] exited with preempt_count 1
bad: scheduling while atomic!
Call Trace:
[<c0118189>] schedule+0x5b9/0x5c0
[<c013f1a3>] unmap_page_range+0x33/0x60
[<c013f3c3>] unmap_vmas+0x1f3/0x240
[<c01430a5>] exit_mmap+0x65/0x180
[<c0119aaa>] mmput+0x6a/0xc0
[<c011d938>] do_exit+0x128/0x410
[<c0109cc0>] do_invalid_op+0x0/0xa0
[<c0109a74>] die+0xc4/0xd0
[<c0109d54>] do_invalid_op+0x94/0xa0
[<d08a7f4c>] de_set_media+0x1c/0x140 [de2104x]
[<c01d5ae7>] poke_blanked_console+0x57/0x70
[<c01d4f4d>] vt_console_print+0x22d/0x310
[<c011bcd5>] __call_console_drivers+0x55/0x60
[<c011bdac>] call_console_drivers+0x5c/0x100
[<c010942d>] error_code+0x2d/0x40
[<d08a7f4c>] de_set_media+0x1c/0x140 [de2104x]
[<d08a8fb6>] __de_set_settings+0x186/0x200 [de2104x]
[<d08a9104>] de_set_settings+0x24/0x50 [de2104x]
[<c0224368>] ethtool_set_settings+0x68/0x90
[<c019e4fa>] capable+0x1a/0x40
[<c022587b>] dev_ethtool+0xab/0x220
[<c0223766>] dev_ioctl+0x156/0x350
[<c02613b7>] inet_ioctl+0xb7/0xd0
[<c021ae31>] sock_ioctl+0xf1/0x280
[<c015eac2>] sys_ioctl+0x112/0x280
[<c0109169>] sysenter_past_esp+0x52/0x79


--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


2003-11-21 15:32:10

by Christian Kujau

[permalink] [raw]
Subject: Re: de2104x tulip driver bug in 2.6.0-test9

Russell Coker wrote:
> 00:14.0 Ethernet controller: Digital Equipment Corporation DECchip 21041
> [Tulip Pass 3] (rev 11)
>
> Above is the lspci output for my PCI Ethernet card. Below is what happens
> when I try to boot 2.6.0-test9. 2.4.x kernels have been working well on the
> same card for a long time, so the hardware seems basically OK.
>
> Configuring network interfaces... eth0: set link BNC
> eth0: mode 0x7ffc0040, sia 0x10c4,0xffffef09,0xfffff7fd,0xffff0006
> eth0: set mode 0x7ffc0000, set sia 0xef09,0xf7fd,0x6
> eth0: timeout expired stopping DMA

could this be anyhow related to this:

http://marc.theaimsgroup.com/?l=linux-kernel&m=106766135110165&w=2

there is a thread on linuxppc-dev too, as this is ppc specific:

http://lists.linuxppc.org/linuxppc-dev/200311/msg00001.html

it looks similar, but here on ppc32 i got no oops :-(

Christian.
--
BOFH excuse #27:

radiosity depletion

2003-11-21 15:48:06

by Russell Coker

[permalink] [raw]
Subject: Re: de2104x tulip driver bug in 2.6.0-test9

On Sat, 22 Nov 2003 02:32, Christian Kujau <[email protected]> wrote:
> Russell Coker wrote:
> > 00:14.0 Ethernet controller: Digital Equipment Corporation DECchip 21041
> > [Tulip Pass 3] (rev 11)
> >
> > Above is the lspci output for my PCI Ethernet card. Below is what
> > happens when I try to boot 2.6.0-test9. 2.4.x kernels have been working
> > well on the same card for a long time, so the hardware seems basically
> > OK.
> >
> > Configuring network interfaces... eth0: set link BNC
> > eth0: mode 0x7ffc0040, sia 0x10c4,0xffffef09,0xfffff7fd,0xffff0006
> > eth0: set mode 0x7ffc0000, set sia 0xef09,0xf7fd,0x6
> > eth0: timeout expired stopping DMA
>
> could this be anyhow related to this:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=106766135110165&w=2
>
> there is a thread on linuxppc-dev too, as this is ppc specific:

It is a bit different. If I don't load the module during the boot sequence
then I can get it to the stage of being pingable. I think that timing is the
issue, the boot scripts do everything quickly. If I modprobe it, then
ifconfig it, then change the media type, then I have succeeded once in
getting ping responses, but I couldn't ssh.

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page

2003-11-21 18:51:06

by Jeff Garzik

[permalink] [raw]
Subject: [PATCH/CFT] de2104x fixes

===== drivers/net/tulip/de2104x.c 1.25 vs edited =====
--- 1.25/drivers/net/tulip/de2104x.c Thu Sep 11 18:46:11 2003
+++ edited/drivers/net/tulip/de2104x.c Fri Nov 21 13:48:17 2003
@@ -28,8 +28,8 @@
*/

#define DRV_NAME "de2104x"
-#define DRV_VERSION "0.6"
-#define DRV_RELDATE "Sep 1, 2003"
+#define DRV_VERSION "0.9"
+#define DRV_RELDATE "Nov 21, 2003"

#include <linux/config.h>
#include <linux/module.h>
@@ -1380,18 +1380,18 @@
return rc;
}

- rc = de_init_hw(de);
+ rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev);
if (rc) {
- printk(KERN_ERR "%s: h/w init failure, err=%d\n",
- dev->name, rc);
+ printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n",
+ dev->name, dev->irq, rc);
goto err_out_free;
}

- rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev);
+ rc = de_init_hw(de);
if (rc) {
- printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n",
- dev->name, dev->irq, rc);
- goto err_out_hw;
+ printk(KERN_ERR "%s: h/w init failure, err=%d\n",
+ dev->name, rc);
+ goto err_out_free_irq;
}

netif_start_queue(dev);
@@ -1399,10 +1399,8 @@

return 0;

-err_out_hw:
- spin_lock_irqsave(&de->lock, flags);
- de_stop_hw(de);
- spin_unlock_irqrestore(&de->lock, flags);
+err_out_free_irq:
+ free_irq (dev->irq, dev);

err_out_free:
de_free_rings(de);
@@ -1571,13 +1569,17 @@
(ecmd->advertising == de->media_advertise))
return 0; /* nothing to change */

- de_link_down(de);
- de_stop_rxtx(de);
+ if (netif_running(dev)) {
+ de_link_down(de);
+ de_stop_rxtx(de);
+ }

de->media_type = new_media;
de->media_lock = media_lock;
de->media_advertise = ecmd->advertising;
- de_set_media(de);
+
+ if (netif_running(dev))
+ de_set_media(de);

return 0;
}


Attachments:
patch (1.75 kB)

2003-11-25 12:57:18

by Rask Ingemann Lambertsen

[permalink] [raw]
Subject: Re: [PATCH/CFT] de2104x fixes

On Fri, Nov 21, 2003 at 01:50:24PM -0500, Jeff Garzik wrote:
> So, can people give this a test? It includes a change that, I hope,
> addresses Russell's problem, as well as a patch from Rask.

I have attached a patch which fixes two problems I found during compilation:
1) de_open() no longer uses the flags variable because the spinlocking is
gone, but I forgot to remove the variable.
2) __de_set_settings() now references dev which is undefined.

The patch should be applied on top of your patch, Jeff.

--
Regards,
Rask Ingemann Lambertsen


Attachments:
(No filename) (550.00 B)
de2104x-fix-for-jeff.patch (874.00 B)
Download all attachments