* fix-up GIANFAR driver timer bug
@ 2005-09-29 2:07 sun
2005-09-29 14:30 ` Andy Fleming
0 siblings, 1 reply; 2+ messages in thread
From: sun @ 2005-09-29 2:07 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]
Repeat executing a command series like the attached descript will cause
system hanging or kernel panic shown below on a GIANFAR used system.
The attached patch is for fix the above issue.
The issue and the solution have been confirmed on
MPC8560ADS and MPC85555CDS evaluation boards.
----------
-sh-3.00# ./net_setting.sh
eth1 setting start
###set ip-address
###net Trying to free free IRQ103
down
###set MAC address
###net up
kernel BUG in cascade at kernel/timer.c:419!
Oops: Exception in kernel mode, sig: 5 [#1]
NIP: C0029090 LR: C00290A0 SP: CCD69B20 REGS: ccd69a70 TRAP: 0700 Not tainted
MSR: 00021000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
TASK = cde58080[170] 'ifconfig' THREAD: ccd68000
Last syscall: 54
GPR00: 00000001 CCD69B20 CDE58080 C0311DD4 C031269C FFFBD700 C0311F4C C0311E94
GPR08: FFFBD869 00003B60 00000169 00003B5F FFFBD700 1010A204 00000000 00000000
GPR16: 00000000 1001C094 00000000 00000000 C07D2400 FFFF8914 C03092C0 C0310000
GPR24: C0310000 C0310000 C0280000 C0311DD4 00000017 C0311DD4 C0312694 C031269C
NIP [c0029090] cascade+0x40/0x78
LR [c00290a0] cascade+0x50/0x78
Call trace:
[c002923c] run_timer_softirq+0x174/0x1d8
[c0024b4c] __do_softirq+0x80/0xf4
[c0024c18] do_softirq+0x58/0x60
[c0003930] timer_interrupt+0xa0/0x208
[c0002598] ret_from_except+0x0/0x18
[c001f694] release_console_sem+0xc4/0x234
[c001f95c] vprintk+0x158/0x1c0
[c001fa14] printk+0x50/0x60
[c014d91c] get_phy_info+0xcc/0xe4
[c014b30c] gfar_enet_open+0x2ec/0x390
[c01a7630] dev_open+0xb0/0xd8
[c01a8dc4] dev_change_flags+0x6c/0x144
[c01e6eec] devinet_ioctl+0x618/0x764
[c01e8250] inet_ioctl+0x10c/0x120
[c019dbcc] sock_ioctl+0x1ac/0x288
Kernel panic - not syncing: Aiee, killing interrupt handler!
<0>Rebooting in 1 seconds..U-Boot 1.1.2 (Aug 19 2005 - 09:55:23)
[-- Attachment #2: fixIFCONFIGpanic.patch --]
[-- Type: application/octet-stream, Size: 1730 bytes --]
--- old_kernel/drivers/net/gianfar.c 2005-06-21 10:57:29.000000000 +0900
+++ new_kernel/drivers/net/gianfar.c 2005-09-26 17:05:46.116951768 +0900
@@ -541,6 +541,14 @@
MII_INTERRUPT_DISABLED);
}
+/* following 2 steps is a attempting to prevent system hanging/panic
+ when executing ifconfig command. by Sun Zhitai, Sep. 26 2005 */
+
+ cancel_delayed_work(&priv->tq);
+ del_timer_sync(&priv->phy_info_timer);
+
+/* appended end */
+
spin_unlock_irqrestore(&priv->lock, flags);
/* Free the IRQs */
@@ -770,7 +778,7 @@
init_timer(&priv->phy_info_timer);
priv->phy_info_timer.function = &gfar_phy_startup_timer;
priv->phy_info_timer.data = (unsigned long) priv->mii_info;
- mod_timer(&priv->phy_info_timer, jiffies + HZ);
+ __mod_timer(&priv->phy_info_timer, jiffies + HZ);
/* Configure the coalescing support */
if (priv->txcoalescing)
@@ -1500,7 +1508,7 @@
schedule_work(&priv->tq);
- mod_timer(&priv->phy_info_timer, jiffies +
+ __mod_timer(&priv->phy_info_timer, jiffies +
GFAR_PHY_CHANGE_TIME * HZ);
}
@@ -1523,7 +1531,7 @@
/* If autonegotiation failed to start, and
* we haven't timed out, reset the timer, and return */
if (result && secondary--) {
- mod_timer(&priv->phy_info_timer, jiffies + HZ);
+ __mod_timer(&priv->phy_info_timer, jiffies + HZ);
return;
} else if (result) {
/* Couldn't start autonegotiation.
@@ -1564,7 +1572,7 @@
init_timer(&priv->phy_info_timer);
priv->phy_info_timer.function = &gfar_phy_timer;
priv->phy_info_timer.data = (unsigned long) mii_info->dev;
- mod_timer(&priv->phy_info_timer, jiffies +
+ __mod_timer(&priv->phy_info_timer, jiffies +
GFAR_PHY_CHANGE_TIME * HZ);
}
[-- Attachment #3: net_setting.sh --]
[-- Type: application/octet-stream, Size: 291 bytes --]
#! /bin/sh
date
echo "eth1 setting start"
sl(){
echo
}
echo "###set ip-address"
ifconfig eth1 192.168.0.37 netmask 255.255.255.0
sl
echo "###net down"
ifconfig eth1 down
sl
echo "###set MAC address"
ifconfig eth1 hw ether 00:e0:0c:00:01:fd
sl
echo "###net up"
ifconfig eth1 up
sl
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: fix-up GIANFAR driver timer bug
2005-09-29 2:07 fix-up GIANFAR driver timer bug sun
@ 2005-09-29 14:30 ` Andy Fleming
0 siblings, 0 replies; 2+ messages in thread
From: Andy Fleming @ 2005-09-29 14:30 UTC (permalink / raw)
To: sun; +Cc: linuxppc-embedded
The reported issue no longer exists in the latest version of the
driver, which should be in linus' tree soon (it's in the netdev
tree). However, it may have crept into the PHY Layer, so I will
investigate. Thank you for reporting this!
Andy
On Sep 28, 2005, at 21:07, sun wrote:
> Repeat executing a command series like the attached descript will
> cause
> system hanging or kernel panic shown below on a GIANFAR used system.
> The attached patch is for fix the above issue.
> The issue and the solution have been confirmed on
> MPC8560ADS and MPC85555CDS evaluation boards.
>
> ----------
> -sh-3.00# ./net_setting.sh
> eth1 setting start
> ###set ip-address
>
> ###net Trying to free free IRQ103
> down
>
> ###set MAC address
>
> ###net up
> kernel BUG in cascade at kernel/timer.c:419!
> Oops: Exception in kernel mode, sig: 5 [#1]
> NIP: C0029090 LR: C00290A0 SP: CCD69B20 REGS: ccd69a70 TRAP:
> 0700 Not tainted
> MSR: 00021000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
> TASK = cde58080[170] 'ifconfig' THREAD: ccd68000
> Last syscall: 54
> GPR00: 00000001 CCD69B20 CDE58080 C0311DD4 C031269C FFFBD700
> C0311F4C C0311E94
> GPR08: FFFBD869 00003B60 00000169 00003B5F FFFBD700 1010A204
> 00000000 00000000
> GPR16: 00000000 1001C094 00000000 00000000 C07D2400 FFFF8914
> C03092C0 C0310000
> GPR24: C0310000 C0310000 C0280000 C0311DD4 00000017 C0311DD4
> C0312694 C031269C
> NIP [c0029090] cascade+0x40/0x78
> LR [c00290a0] cascade+0x50/0x78
> Call trace:
> [c002923c] run_timer_softirq+0x174/0x1d8
> [c0024b4c] __do_softirq+0x80/0xf4
> [c0024c18] do_softirq+0x58/0x60
> [c0003930] timer_interrupt+0xa0/0x208
> [c0002598] ret_from_except+0x0/0x18
> [c001f694] release_console_sem+0xc4/0x234
> [c001f95c] vprintk+0x158/0x1c0
> [c001fa14] printk+0x50/0x60
> [c014d91c] get_phy_info+0xcc/0xe4
> [c014b30c] gfar_enet_open+0x2ec/0x390
> [c01a7630] dev_open+0xb0/0xd8
> [c01a8dc4] dev_change_flags+0x6c/0x144
> [c01e6eec] devinet_ioctl+0x618/0x764
> [c01e8250] inet_ioctl+0x10c/0x120
> [c019dbcc] sock_ioctl+0x1ac/0x288
> Kernel panic - not syncing: Aiee, killing interrupt handler!
> <0>Rebooting in 1 seconds..U-Boot 1.1.2 (Aug 19 2005 - 09:55:23)
>
>
> <fixIFCONFIGpanic.patch>
> <net_setting.sh>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-29 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-29 2:07 fix-up GIANFAR driver timer bug sun
2005-09-29 14:30 ` Andy Fleming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox