* de2104x tulip driver bug in 2.6.0-test9
@ 2003-11-21 9:51 Russell Coker
2003-11-21 15:32 ` Christian Kujau
2003-11-21 18:50 ` [PATCH/CFT] de2104x fixes Jeff Garzik
0 siblings, 2 replies; 6+ messages in thread
From: Russell Coker @ 2003-11-21 9:51 UTC (permalink / raw)
To: Linux Kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: de2104x tulip driver bug in 2.6.0-test9
2003-11-21 9:51 de2104x tulip driver bug in 2.6.0-test9 Russell Coker
@ 2003-11-21 15:32 ` Christian Kujau
2003-11-21 15:47 ` Russell Coker
2003-11-21 18:50 ` [PATCH/CFT] de2104x fixes Jeff Garzik
1 sibling, 1 reply; 6+ messages in thread
From: Christian Kujau @ 2003-11-21 15:32 UTC (permalink / raw)
To: russell; +Cc: Linux Kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: de2104x tulip driver bug in 2.6.0-test9
2003-11-21 15:32 ` Christian Kujau
@ 2003-11-21 15:47 ` Russell Coker
0 siblings, 0 replies; 6+ messages in thread
From: Russell Coker @ 2003-11-21 15:47 UTC (permalink / raw)
To: Christian Kujau; +Cc: Linux Kernel
On Sat, 22 Nov 2003 02:32, Christian Kujau <evil@g-house.de> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH/CFT] de2104x fixes
2003-11-21 9:51 de2104x tulip driver bug in 2.6.0-test9 Russell Coker
2003-11-21 15:32 ` Christian Kujau
@ 2003-11-21 18:50 ` Jeff Garzik
[not found] ` <200311221305.25718.russell@coker.com.au>
2003-11-25 12:57 ` Rask Ingemann Lambertsen
1 sibling, 2 replies; 6+ messages in thread
From: Jeff Garzik @ 2003-11-21 18:50 UTC (permalink / raw)
To: russell; +Cc: Linux Kernel, rask, akpm, netdev
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
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.
Jeff
P.S. It would be great if people cc'd me on such bug reports ;-)
Quicker to find and respond, these days.
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1792 bytes --]
===== 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;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH/CFT] de2104x fixes
[not found] ` <200311221305.25718.russell@coker.com.au>
@ 2003-11-22 12:07 ` Jeff Garzik
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2003-11-22 12:07 UTC (permalink / raw)
To: russell; +Cc: Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
Russell Coker wrote:
> On Sat, 22 Nov 2003 05:50, Jeff Garzik <jgarzik@pobox.com> 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.
>
>
> It does not compile for me, below are the warnings and errors. I am using
> 2.6.0-test9 with no patches applied other than your patch.
>
> drivers/net/tulip/de2104x.c: In function `de_open':
> drivers/net/tulip/de2104x.c:1369: warning: unused variable `flags'
> drivers/net/tulip/de2104x.c: In function `__de_set_settings':
> drivers/net/tulip/de2104x.c:1572: error: `dev' undeclared (first use in this
> function)
> drivers/net/tulip/de2104x.c:1572: error: (Each undeclared identifier is
> reported only once
> drivers/net/tulip/de2104x.c:1572: error: for each function it appears in.)
Ok, here's a better patch. It's against 2.6.0-test9-BK-latest
(currently bk25).
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 2437 bytes --]
===== 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 Sat Nov 22 07:05:40 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>
@@ -1366,7 +1366,6 @@
{
struct de_private *de = dev->priv;
int rc;
- unsigned long flags;
if (netif_msg_ifup(de))
printk(KERN_DEBUG "%s: enabling interface\n", dev->name);
@@ -1380,18 +1379,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 +1398,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);
@@ -1514,7 +1511,8 @@
return 0;
}
-static int __de_set_settings(struct de_private *de, struct ethtool_cmd *ecmd)
+static int __de_set_settings(struct net_device *dev, struct de_private *de,
+ struct ethtool_cmd *ecmd)
{
u32 new_media;
unsigned int media_lock;
@@ -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;
}
@@ -1615,7 +1617,7 @@
int rc;
spin_lock_irq(&de->lock);
- rc = __de_set_settings(de, ecmd);
+ rc = __de_set_settings(dev, de, ecmd);
spin_unlock_irq(&de->lock);
return rc;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH/CFT] de2104x fixes
2003-11-21 18:50 ` [PATCH/CFT] de2104x fixes Jeff Garzik
[not found] ` <200311221305.25718.russell@coker.com.au>
@ 2003-11-25 12:57 ` Rask Ingemann Lambertsen
1 sibling, 0 replies; 6+ messages in thread
From: Rask Ingemann Lambertsen @ 2003-11-25 12:57 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Linux Kernel, akpm, netdev
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
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
[-- Attachment #2: de2104x-fix-for-jeff.patch --]
[-- Type: text/plain, Size: 874 bytes --]
--- linux-2.6.0-test8/drivers/net/tulip/de2104x.c-orig Tue Nov 25 13:20:25 2003
+++ linux-2.6.0-test8/drivers/net/tulip/de2104x.c Tue Nov 25 13:20:25 2003
@@ -1384,7 +1384,6 @@ static int de_open (struct net_device *d
{
struct de_private *de = dev->priv;
int rc;
- unsigned long flags;
if (netif_msg_ifup(de))
printk(KERN_DEBUG "%s: enabling interface\n", dev->name);
@@ -1601,7 +1600,7 @@ static int __de_set_settings(struct de_p
(ecmd->advertising == de->media_advertise))
return 0; /* nothing to change */
- if (netif_running(dev)) {
+ if (netif_running(de->dev)) {
de_link_down(de);
de_stop_rxtx(de);
}
@@ -1610,7 +1609,7 @@ static int __de_set_settings(struct de_p
de->media_lock = media_lock;
de->media_advertise = ecmd->advertising;
- if (netif_running(dev))
+ if (netif_running(de->dev))
de_set_media(de);
return 0;
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-25 12:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-21 9:51 de2104x tulip driver bug in 2.6.0-test9 Russell Coker
2003-11-21 15:32 ` Christian Kujau
2003-11-21 15:47 ` Russell Coker
2003-11-21 18:50 ` [PATCH/CFT] de2104x fixes Jeff Garzik
[not found] ` <200311221305.25718.russell@coker.com.au>
2003-11-22 12:07 ` Jeff Garzik
2003-11-25 12:57 ` Rask Ingemann Lambertsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox