netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* macb phy address bug?
@ 2008-11-14  7:53 Giulio Benetti
  2008-11-14  8:46 ` Giuseppe CAVALLARO
  0 siblings, 1 reply; 8+ messages in thread
From: Giulio Benetti @ 2008-11-14  7:53 UTC (permalink / raw)
  To: netdev

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

PHYID returns 0xffff and not 0xffffffff when not found and in some 
case(at91sam9263) 0x0. Maybe this patch could be useful.



Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>

[-- Attachment #2: macb.patch --]
[-- Type: text/x-diff, Size: 568 bytes --]

diff -urN -X exclude linux.orig/drivers/net/phy/phy_device.c linux/drivers/net/phy/phy_device.c
--- linux.orig/drivers/net/phy/phy_device.c	2008-11-11 17:52:13.000000000 +0100
+++ linux/drivers/net/phy/phy_device.c	2008-11-12 19:20:47.000000000 +0100
@@ -227,8 +227,8 @@
 	if (r)
 		return ERR_PTR(r);
 
-	/* If the phy_id is all Fs, there is no device there */
-	if (0xffffffff == phy_id)
+	/* If the phy_id is all Fs or all 0s, there is no device there */
+	if ((0xffff == phy_id) || (0x00 == phy_id))
 		return NULL;
 
 	dev = phy_device_create(bus, addr, phy_id);

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: macb phy address bug?
@ 2008-11-16  9:50 David Miller
  2008-11-18  8:50 ` Giuseppe CAVALLARO
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2008-11-16  9:50 UTC (permalink / raw)
  To: giulio.benetti; +Cc: netdev


I've applied this patch to net-2.6, thanks.

As mentioned there is some rare chance that the new
zero test could cause problems, in which case we'll
need to undo that part.

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

end of thread, other threads:[~2008-11-20 16:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-14  7:53 macb phy address bug? Giulio Benetti
2008-11-14  8:46 ` Giuseppe CAVALLARO
  -- strict thread matches above, loose matches on Subject: below --
2008-11-16  9:50 David Miller
2008-11-18  8:50 ` Giuseppe CAVALLARO
2008-11-18 11:54   ` Giulio Benetti
2008-11-18 15:35     ` Giuseppe CAVALLARO
2008-11-20  9:04   ` David Miller
2008-11-20 15:59     ` Giuseppe CAVALLARO

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).