Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932093AbbG1BYj (ORCPT ); Mon, 27 Jul 2015 21:24:39 -0400 Received: from mail-by2on0127.outbound.protection.outlook.com ([207.46.100.127]:44884 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754838AbbG1BYg (ORCPT ); Mon, 27 Jul 2015 21:24:36 -0400 X-Greylist: delayed 85345 seconds by postgrey-1.27 at vger.kernel.org; Mon, 27 Jul 2015 21:24:36 EDT From: Duan Andy To: "plyatov@gmail.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" CC: Florian Fainelli , Joe Perches , Zhou David , Richard Cochran , "David S. Miller" , "Uwe Kleine-K?nig" , Fabio Estevam , Lothar Wa?mann , "Li Frank" Subject: RE: Buggy cable detection on i.MX51, fec driver and LAN8700 PHY Thread-Topic: Buggy cable detection on i.MX51, fec driver and LAN8700 PHY Thread-Index: AQHQyHudbApnKT1390CHNwBmxCZfo53wFjzA Date: Tue, 28 Jul 2015 01:24:33 +0000 Message-ID: References: <55B6453C.10500@gmail.com> In-Reply-To: <55B6453C.10500@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gmail.com; dkim=none (message not signed) header.d=none; x-originating-ip: [192.158.241.86] x-microsoft-exchange-diagnostics: 1;BN3PR0301MB1298;5:XEDTBj69hNqmUjYUCx5iUIZ8iwbmIm0kZ3vgh7UvXGMkz2AoXhn5d/4Y9B3UeBYSLs5Ab6ToR0Hm1qFKAQRLKuw2mXeQHvAN9ESLcZdzriCzaloSS+XXEmpKsHoPSxQl4BGHZ47A102bnWHJs4a9nQ==;24:naNx8mtiHHOVmCWBRnJL4JOZtTqm0NP6QBRmx50xmU4H+D2AWaRA3vcz5W0cz/PPSeRC/5cD8Ba/VZ5DgzWk8VTnHHfaXMz2fJ4wlmi82Bk=;20:AfVualntGL3MgqBNApkA4m7CoyCmB42wblY7pv6bKDdTyJY0RZmFzkMOAi1OyS0eL5CD214lYZyAOiXFAxtQJg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1298;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1316; bn3pr0301mb1298: X-MS-Exchange-Organization-RulesExecuted x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BN3PR0301MB1298;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1298; x-forefront-prvs: 06515DA04B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(66066001)(40100003)(19580395003)(77096005)(102836002)(50986999)(5001770100001)(46102003)(74316001)(5002640100001)(2950100001)(2501003)(87936001)(106116001)(99286002)(77156002)(2900100001)(62966003)(92566002)(122556002)(33656002)(76576001)(5003600100002)(2201001)(86362001)(2656002)(76176999)(54356999)(19580405001)(189998001)(107886002)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB1298;H:BN3PR0301MB1219.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2015 01:24:33.8745 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1298 X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1316;2:gsBJIOrI+ZS1QXRn/oijhN6Ns6J1TjOkU7EFiWQATgKF3BxpzOS1HKuB72xVmkELotXOkHZkjpLy7oNjT5mGJjU/QDsy5OB/wq1rQPjB/xFIiY1x++Iou6ORxpxMKUb9ehAQ/G0AHTS41uOnsjCMBwr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N8or/JKp1sIpa6KtNU6+XhvEqQ3/hoQ+eGt+HF38hQQ6UT8f6HGp7VfKk1JtnRkoAmbBYWxixVhzyamNXA8xgaIi56Tt/hjw2Ds/fv7gM0UHEwzg/WTeLju8xTBNmAY1 X-OriginatorOrg: freescale.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t6S1Oh4X013087 Content-Length: 2430 Lines: 55 From: Igor Plyatov 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 ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?