Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057AbbKKHFd (ORCPT ); Wed, 11 Nov 2015 02:05:33 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:33211 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbbKKHFb (ORCPT ); Wed, 11 Nov 2015 02:05:31 -0500 X-AuditID: cbfec7f4-f79c56d0000012ee-83-5642e8b753c3 From: Pavel Fedin To: "'David Miller'" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, steve.glendinning@shawell.net References: <006801d11b82$1f5704b0$5e050e10$@samsung.com> <20151110.115149.604622279273759756.davem@davemloft.net> In-reply-to: <20151110.115149.604622279273759756.davem@davemloft.net> Subject: RE: PING: [PATCH] net: smsc911x: Reset PHY during initialization Date: Wed, 11 Nov 2015 10:05:24 +0300 Message-id: <009b01d11c4f$57f6ef10$07e4cd30$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQGNlvOQLk12RLtxbxMqxIJosf2yhwLNy61Pnwb+EgA= Content-language: ru X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKLMWRmVeSWpSXmKPExsVy+t/xK7rbXziFGczpV7aYc76FxeLyrjls FscWiFk0f3rF5MDisWXlTSaP/82XWTw+b5ILYI7isklJzcksSy3St0vgyni/7yZzQZtAxdTF C9gaGDfxdDFyckgImEhMOHaEDcIWk7hwbz2QzcUhJLCUUaJ10WsmkISQwHdGiXvTLUFsNgF1 idNfP7CA2CICGhIn/zaC1TALREpMvdrIAlFfIrGy+Tg7iM0p4CpxedNMZhBbWMBTYvvfTWA1 LAKqEuvmPQazeQUsJXZd3M0IYQtK/Jh8jwVippbE+p3HoebLS2xe85YZ4lAFiR1nXzNC3GAl 0XTmMBtEjYjEtH/3mCcwCs1CMmoWklGzkIyahaRlASPLKkbR1NLkguKk9FxDveLE3OLSvHS9 5PzcTYyQwP+yg3HxMatDjAIcjEo8vBvsnMKEWBPLiitzDzFKcDArifDanQAK8aYkVlalFuXH F5XmpBYfYpTmYFES5527632IkEB6YklqdmpqQWoRTJaJg1OqgXHK5cw9b/dyHYn4oMHCfo/1 d8fxNQcPye97+muRzAHzv5sCltTHCYubLffMrP1pG3h8T+Iq3Rvy1RJi2z0vXAz0SI+zfmhR y9/LVqfZpRF7/YNc4ZaItyEymyy3CkWvb0r5xSF0/zy/iHgV/0zrLSsZHGJ7Fvz4/Ebohqqj 6U7zpUrXf9x5ZKDEUpyRaKjFXFScCACKlXQXeAIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2252 Lines: 53 Hello! > If you think I should reconsider the patch, you should resubmit it. I understand this, of course. But, before doing this i'd like to clarify your concern, why exactly you think that loopback test will break. Because the (simplified) algorithm is: do { result = loopback_test() if (result == failed) reset_phy() } while (result == ok) So, if loopback test works for the first time, PHY reset will never be done. So, the conclusion is: in real situation it is never used at all. Conclusion no 2, coming from my tests: if loopback test fails, phy reset actually does not fix it. So, perhaps, it's not needed there at all. I understand, that some other boards might behave differently, and loopback test was written this very way for some reason. Also, i understand that you, as a maintainer, have rights for the final decision. And in order to rework the patch, i'd like to discuss with you, which rework you would prefer. I came up with three possibilities: --- cut --- a) Leave PHY reset inside loopback test as it is, but add a second routine and call it only before smsc911x_soft_reset(). b) Reset PHY only conditionally, using the following algorithm: if smsc911x_soft_reset() { /* NIC reset failed, kick the PHY and retry */ smsc911x_phy_reset() if (smsc_911x_soft_reset()) return -ENODEV; } c) Do extra PHY reset only if some hint in device tree is specified (or the machine is known to have the problem) --- cut --- I can even try to guess your thoughts (because you never elaborated them for me): 1. loopback test will break because PHY has been reset before. In this case, (b) or (c) is a way to go. 2. loopback test will break because of reset method change. In this case (a) is the way to go. So, what do you really think? BTW, where is Steve, whose address is specified in MAINTAINERS for this code? Is it abandonware? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia -- 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/