Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753931AbbG0Oun (ORCPT ); Mon, 27 Jul 2015 10:50:43 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:35399 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752355AbbG0Oul (ORCPT ); Mon, 27 Jul 2015 10:50:41 -0400 Message-ID: <55B6453C.10500@gmail.com> Date: Mon, 27 Jul 2015 17:50:36 +0300 From: Igor Plyatov Reply-To: plyatov@gmail.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org CC: Florian Fainelli , Joe Perches , Luwei Zhou , b38611@freescale.com, Richard Cochran , "David S. Miller" , =?UTF-8?B?VXdlIEtsZWluZS1Lw7ZuaQ==?= =?UTF-8?B?Zw==?= , Fabio Estevam , =?UTF-8?B?TG90aGFyIFdhw59tYW5u?= , Frank Li Subject: Buggy cable detection on i.MX51, fec driver and LAN8700 PHY Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1729 Lines: 43 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/