linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers
@ 2008-01-09 20:20 Matvejchikov Ilya
  0 siblings, 0 replies; 13+ messages in thread
From: Matvejchikov Ilya @ 2008-01-09 20:20 UTC (permalink / raw)
  To: linuxppc-embedded, netdev

Hi folks!

I had the same problem too. The solution was the following:
http://www.mail-archive.com/netdev@vger.kernel.org/msg37951.html

Also have a look at the potential multicasting recovery problem in
fs_enet driver:
http://patchwork.ozlabs.org/linuxppc/patch?id=10700

Best regards,
Matvejchikov Ilya.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers
@ 2008-01-09 20:14 Matvejchikov Ilya
  0 siblings, 0 replies; 13+ messages in thread
From: Matvejchikov Ilya @ 2008-01-09 20:14 UTC (permalink / raw)
  To: linuxppc-embedded, netdev

Hi folks!

I had the same problem too. The solution was the following:
http://www.mail-archive.com/netdev@vger.kernel.org/msg37951.html

Also have a look at the potential multicasting recovery problem in
fs_enet driver:
http://patchwork.ozlabs.org/linuxppc/patch?id=10700

Best regards,
Matvejchikov Ilya.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers
@ 2008-01-09 20:10 Matvejchikov Ilya
  0 siblings, 0 replies; 13+ messages in thread
From: Matvejchikov Ilya @ 2008-01-09 20:10 UTC (permalink / raw)
  To: linuxppc-embedded, netdev

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

Hi folks!

I had the same problem too. The solution was the following:
http://www.mail-archive.com/netdev@vger.kernel.org/msg37951.html

Also have a look at the potential multicasting recovery problem in fs_enet
driver:
http://patchwork.ozlabs.org/linuxppc/patch?id=10700

Best regards,
Matvejchikov Ilya.

[-- Attachment #2: Type: text/html, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers
@ 2008-01-08 19:05 Anton Vorontsov
  2008-01-09 10:46 ` Sergej Stepanov
  2008-01-12 22:45 ` Jeff Garzik
  0 siblings, 2 replies; 13+ messages in thread
From: Anton Vorontsov @ 2008-01-08 19:05 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, linuxppc-dev

Otherwise oops will happen if ethernet device has not been opened:

Unable to handle kernel paging request for data at address 0x0000014c
Faulting instruction address: 0xc016f7f0
Oops: Kernel access of bad area, sig: 11 [#1]
MPC85xx
NIP: c016f7f0 LR: c01722a0 CTR: 00000000
REGS: c79ddc70 TRAP: 0300   Not tainted  (2.6.24-rc3-g820a386b)
MSR: 00029000 <EE,ME>  CR: 20004428  XER: 20000000
DEAR: 0000014c, ESR: 00000000
TASK = c789f5e0[999] 'snmpd' THREAD: c79dc000
GPR00: c01aceb8 c79ddd20 c789f5e0 00000000 c79ddd3c 00000000 c79ddd64 00000000
GPR08: 00000000 c7845b60 c79dde3c c01ace80 20004422 200249fc 000002a0 100da728
GPR16: 100c0000 00000000 00000000 00000000 20022078 00000009 200220e0 bfc85558
GPR24: c79ddd3c 00000000 00000000 c02e0e70 c022fc64 ffffffff c7845800 bfc85498
NIP [c016f7f0] phy_ethtool_gset+0x0/0x4c
LR [c01722a0] fs_get_settings+0x18/0x28
Call Trace:
[c79ddd20] [c79dde38] 0xc79dde38 (unreliable)
[c79ddd30] [c01aceb8] dev_ethtool+0x294/0x11ec
[c79dde30] [c01aaa44] dev_ioctl+0x454/0x6a8
[c79ddeb0] [c019b9d4] sock_ioctl+0x84/0x230
[c79dded0] [c007ded8] do_ioctl+0x34/0x8c
[c79ddee0] [c007dfbc] vfs_ioctl+0x8c/0x41c
[c79ddf10] [c007e38c] sys_ioctl+0x40/0x74
[c79ddf40] [c000d4c0] ret_from_syscall+0x0/0x3c
Instruction dump:
81630000 800b0030 2f800000 419e0010 7c0803a6 4e800021 7c691b78 80010014
7d234b78 38210010 7c0803a6 4e800020 <8003014c> 7c6b1b78 38600000 90040004

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Vitaly Bordug <vitb@kernel.crashing.org>
---

Just resending it, it feels like it got lost during holidays.

 drivers/net/fs_enet/fs_enet-main.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index f2a4d39..23fddc3 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -897,14 +897,21 @@ static void fs_get_regs(struct net_device *dev, struct ethtool_regs *regs,
 static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
+
+	if (!fep->phydev)
+		return -ENODEV;
+
 	return phy_ethtool_gset(fep->phydev, cmd);
 }
 
 static int fs_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
-	phy_ethtool_sset(fep->phydev, cmd);
-	return 0;
+
+	if (!fep->phydev)
+		return -ENODEV;
+
+	return phy_ethtool_sset(fep->phydev, cmd);
 }
 
 static int fs_nway_reset(struct net_device *dev)
-- 
1.5.2.2

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-01-12 22:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09 20:20 [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers Matvejchikov Ilya
  -- strict thread matches above, loose matches on Subject: below --
2008-01-09 20:14 Matvejchikov Ilya
2008-01-09 20:10 Matvejchikov Ilya
2008-01-08 19:05 Anton Vorontsov
2008-01-09 10:46 ` Sergej Stepanov
2008-01-09 12:58   ` Heiko Schocher
2008-01-09 18:20     ` Scott Wood
2008-01-10  8:14       ` Heiko Schocher
2008-01-10  9:06         ` Heiko Schocher
2008-01-10 17:27           ` Scott Wood
2008-01-10 18:41             ` Heiko Schocher
2008-01-11 16:01               ` Sergej Stepanov
2008-01-12 22:45 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).