netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Buggy cable detection on i.MX51, fec driver and LAN8700 PHY
@ 2015-07-27 14:50 Igor Plyatov
  2015-07-28  1:24 ` Duan Andy
  2015-07-28  1:51 ` Fabio Estevam
  0 siblings, 2 replies; 3+ messages in thread
From: Igor Plyatov @ 2015-07-27 14:50 UTC (permalink / raw)
  To: linux-kernel, netdev
  Cc: Florian Fainelli, Joe Perches, Luwei Zhou, b38611,
	Richard Cochran, David S. Miller, Uwe Kleine-König,
	Fabio Estevam, Lothar Waßmann, Frank Li

Dear all,

very often we observe issue with Ethernet cable detection during cable 
unplugging and plugging.

We use Voipac i.MX51 SOMs (System On Modules). They are based on 
Freescale i.MX51 CPU with LAN7800 PHY in MII mode. The schematic of PHY 
connection is very similar to the Freescale i.MX51 Babbage board.

The Ethernet interface eth0 is configured statically for simplicity, but 
same issue exists with DHCP configuration.

I did a lot of tests to determine stability of Ethernet cable detection 
by the "fec" Ethernet driver.

In normal operation, if I unplug the Ethernet cable, then "fec" driver 
prints "fec 83fec000.ethernet eth0: Link is Down" and green LED 
(Ethernet medium detected) is OFF.
If I plug cable back, then "fec" driver print "fec 83fec000.ethernet 
eth0: Link is Up - 100Mbps/Full - flow control off" and green LED is ON.

But sometimes, after cable plugging, "fec" driver does not print 
anything on the console and green LED does not show detection of 
Ethernet cable. Frequency of issue appearing is a random value. 
Sometimes issue appears after second cable unplugging/plugging, but 
sometimes - after 10-20 unplugging/plugging.

The issue was tested and exists on kernels from linux-3.8.5 till current 
linux-4.2-rc4-cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f.

Same tests was made with different versions of the Barebox bootloader 
and cable detection works flawless.

Please, help to resolve issue with Linux drivers.

Best wishes.
--
Igor Plyatov

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

* RE: Buggy cable detection on i.MX51, fec driver and LAN8700 PHY
  2015-07-27 14:50 Buggy cable detection on i.MX51, fec driver and LAN8700 PHY Igor Plyatov
@ 2015-07-28  1:24 ` Duan Andy
  2015-07-28  1:51 ` Fabio Estevam
  1 sibling, 0 replies; 3+ messages in thread
From: Duan Andy @ 2015-07-28  1:24 UTC (permalink / raw)
  To: plyatov, linux-kernel, netdev
  Cc: Florian Fainelli, Joe Perches, Zhou David, Richard Cochran,
	David S. Miller, Uwe Kleine-K?nig, Fabio Estevam, Lothar Wa?mann,
	Li Frank

From: Igor Plyatov <plyatov@gmail.com> Sent: Monday, July 27, 2015 10:51 PM
> To: linux-kernel@vger.kernel.org; netdev@vger.kernel.org
> Cc: Florian Fainelli; Joe Perches; Zhou Luwei-B45643; Duan Fugang-B38611;
> Richard Cochran; David S. Miller; Uwe Kleine-König; Estevam Fabio-R49496;
> Lothar Waßmann; Li Frank-B20596
> Subject: Buggy cable detection on i.MX51, fec driver and LAN8700 PHY
> 
> Dear all,
> 
> very often we observe issue with Ethernet cable detection during cable
> unplugging and plugging.
> 
> We use Voipac i.MX51 SOMs (System On Modules). They are based on
> Freescale i.MX51 CPU with LAN7800 PHY in MII mode. The schematic of PHY
> connection is very similar to the Freescale i.MX51 Babbage board.
> 
> The Ethernet interface eth0 is configured statically for simplicity, but
> same issue exists with DHCP configuration.
> 
> I did a lot of tests to determine stability of Ethernet cable detection
> by the "fec" Ethernet driver.
> 
> In normal operation, if I unplug the Ethernet cable, then "fec" driver
> prints "fec 83fec000.ethernet eth0: Link is Down" and green LED (Ethernet
> medium detected) is OFF.
> If I plug cable back, then "fec" driver print "fec 83fec000.ethernet
> eth0: Link is Up - 100Mbps/Full - flow control off" and green LED is ON.
> 
> But sometimes, after cable plugging, "fec" driver does not print anything
> on the console and green LED does not show detection of Ethernet cable.
> Frequency of issue appearing is a random value.
> Sometimes issue appears after second cable unplugging/plugging, but
> sometimes - after 10-20 unplugging/plugging.
> 
> The issue was tested and exists on kernels from linux-3.8.5 till current
> linux-4.2-rc4-cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f.
> 
> Same tests was made with different versions of the Barebox bootloader and
> cable detection works flawless.
> 
> Please, help to resolve issue with Linux drivers.
> 
> Best wishes.
> --
> Igor Plyatov

For phy cable detection issue, mostly it is phy device issue like:
-	Phy is not stable, maybe the phy initial setting is not right.
-	MDIO bus read is not right, maybe MDIO/MDC pin drive strength (timing) doesn't match spec requirement.

You can measure the MDIO timing firstly, and then check the phy setting.

Regards,
Andy

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

* Re: Buggy cable detection on i.MX51, fec driver and LAN8700 PHY
  2015-07-27 14:50 Buggy cable detection on i.MX51, fec driver and LAN8700 PHY Igor Plyatov
  2015-07-28  1:24 ` Duan Andy
@ 2015-07-28  1:51 ` Fabio Estevam
  1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2015-07-28  1:51 UTC (permalink / raw)
  To: plyatov
  Cc: linux-kernel, netdev, Florian Fainelli, Joe Perches, Luwei Zhou,
	Duan Fugang-B38611, Richard Cochran, David S. Miller,
	Uwe Kleine-König, Fabio Estevam, Lothar Waßmann,
	Frank Li

On Mon, Jul 27, 2015 at 11:50 AM, Igor Plyatov <plyatov@gmail.com> wrote:
> Dear all,
>
> very often we observe issue with Ethernet cable detection during cable
> unplugging and plugging.
>
> We use Voipac i.MX51 SOMs (System On Modules). They are based on Freescale
> i.MX51 CPU with LAN7800 PHY in MII mode. The schematic of PHY connection is
> very similar to the Freescale i.MX51 Babbage board.
>
> The Ethernet interface eth0 is configured statically for simplicity, but
> same issue exists with DHCP configuration.
>
> I did a lot of tests to determine stability of Ethernet cable detection by
> the "fec" Ethernet driver.
>
> In normal operation, if I unplug the Ethernet cable, then "fec" driver
> prints "fec 83fec000.ethernet eth0: Link is Down" and green LED (Ethernet
> medium detected) is OFF.
> If I plug cable back, then "fec" driver print "fec 83fec000.ethernet eth0:
> Link is Up - 100Mbps/Full - flow control off" and green LED is ON.
>
> But sometimes, after cable plugging, "fec" driver does not print anything on
> the console and green LED does not show detection of Ethernet cable.
> Frequency of issue appearing is a random value. Sometimes issue appears
> after second cable unplugging/plugging, but sometimes - after 10-20
> unplugging/plugging.
>
> The issue was tested and exists on kernels from linux-3.8.5 till current
> linux-4.2-rc4-cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f.
>
> Same tests was made with different versions of the Barebox bootloader and
> cable detection works flawless.
>
> Please, help to resolve issue with Linux drivers.

I tried linux-next on a imx51-babbage and could not reproduce the problem here.

Regards,

Fabio Estevam

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

end of thread, other threads:[~2015-07-28  1:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27 14:50 Buggy cable detection on i.MX51, fec driver and LAN8700 PHY Igor Plyatov
2015-07-28  1:24 ` Duan Andy
2015-07-28  1:51 ` Fabio Estevam

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