Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933106AbcJLQkI (ORCPT ); Wed, 12 Oct 2016 12:40:08 -0400 Received: from mail-co1nam03on0098.outbound.protection.outlook.com ([104.47.40.98]:65088 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932125AbcJLQkG (ORCPT ); Wed, 12 Oct 2016 12:40:06 -0400 X-Greylist: delayed 5690 seconds by postgrey-1.27 at vger.kernel.org; Wed, 12 Oct 2016 12:40:06 EDT Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kyle.roeschley@ni.com; Date: Wed, 12 Oct 2016 10:05:33 -0500 From: Kyle Roeschley To: Florian Fainelli CC: , , Andrew Lunn Subject: Re: [RFC] net: phy: smsc: Disable auto-negotiation on startup Message-ID: <20161012150533.dctakcjczclk2mml@senary> References: <20161010174123.21436-1-kyle.roeschley@ni.com> <0c2488d0-45f5-1ab7-bfa5-f19ae687a90f@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <0c2488d0-45f5-1ab7-bfa5-f19ae687a90f@gmail.com> User-Agent: NeoMutt/20160916 (1.7.0) X-Originating-IP: [130.164.62.227] X-ClientProxiedBy: BY2PR1001CA0025.namprd10.prod.outlook.com (10.164.163.163) To BN6PR04MB0211.namprd04.prod.outlook.com (10.168.224.20) X-MS-Office365-Filtering-Correlation-Id: a3366857-ead5-4b55-2f0b-08d3f2b12be4 X-Microsoft-Exchange-Diagnostics: 1;BN6PR04MB0211;2:m/1OMZJEGvUUmTJYFKmeIDu9rYieupuRwStLOM2DiIfTobtRwIgQD+Vg1zmtvgyZNwqazWIZ1pTvDSe20tTtxX9yqWz+j8Srv5l1gpDnbG9gBaPg0udeyEjG2Fhj0NMEbqsWYXwVPiTyflynaYlB5zk7FFm2PjG+q4HHIhkwo0DfOxq+F/l8ni60ejc2M22L9z87hN/TRppKh8QzR1AZN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bP/zPGStTw8xhDs2QVAT5z+w14gAJHQ== X-Microsoft-Exchange-Diagnostics: 1;BN6PR04MB0211;31:qNdmXiTv9XbXc97M9RR5fSWnsa7kCIcOu15DcLtVNwA/bMaJaNtSNFAecjRyf5RLB4+OQRFRnXe2hiiVBqeA3EdYn4gVe8P6Z5LXYN8XhUYcdCSSdAS7/6oX4Bp85sCwukw8il8yIua16RDyskK+6jvrNkS3Qh2od3vWVPTCvM8rr1pKoCwWBnjiU4LvSFliqtozc1IAHloF2CR+ltRlfmXiENgSiodpS+hQJG22q4hPhAHrK36Sefgq+YZYaZa/e860JYKN/KcgadIKNTw7Kg==;20:OpylWfg6ljYVkmM2k9HImP37QrnU2nk0rMaEGBpthQTaVngQvwsrrWz6Vo2bbGiYcB+Macs6gyCDGirkZWa5ykmZOuVKNXTgRxfp/1n2OO/GxaseR21NTt/NhSZcY9Fpty/BqQxr7ztKKErGhih89wxva9OtoiHfG0GgXDfjqxfiW7eENYlmpZj18/bl04uOovNuDBfD31FvnqLjVkdlocK8l4UtStj2a2MD7SPnvA2q9f2af6KksCWOej+nOrmadk1cgH5Euu1Sg6D5sdYPxQQkcibSoOyQCX8TpfZ6Vv7nlSHZW3meKxCgkEmnyxdcQ32xApVXpGGaxlRNKTxZQ9p/QzyTaKrt/tfC/dSkGLlaI8ZawufB440ZFmTu9QwT4u2d4jjHNwb6GJ5qgRlP5BeOjsbpiHecUnmB2rAOlSxYJzz2Xj6lqS1kfx/YgLrRTC/GtnTlQvtGLPTkwLitQq/85m4lmMEGurpyLckZLG26pfvGLugrbY89S+pWDBI6DigI6vBz5RhMWfOS7zaQNmLCWJQHz4j3LZoOfDebhmXEphU2kbnriQwYBmtwdO/RxflO6Dd1ue4fBh/H4/HYkwhMsJf3sAQC7nxQJrrwWDE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:BN6PR04MB0211;BCL:0;PCL:0;RULEID:;SRVR:BN6PR04MB0211; X-Microsoft-Exchange-Diagnostics: 1;BN6PR04MB0211;4:FfjvcMzQ7xvaVECXB5FnxH/B8DvCG50B8Vpoa1oXGsgUM7/h+qi48su5al2jaYzUxNrErfsORdCZHOZWwr7+zthB5Qbt34iuzH3zRtnsS86gIlqw7xvRJKAYbd26O1xtMZPOA5X9auiJ9/RlOfAYpdQh4iMfEh+XLnKLrFYAZr46scZ1WzlTjwOjmtCxRRmZCBKm4vTMlAjBf9V4PKxigx85MsvDMzMoXZeyPaMPszFfSNlUbEAEivThR/xI588K1A3UNQEzdmf1k5M93WN5Kf2I9NNhiwWTenkgzYFVLqx31HH3mlUQ2OegOPQlHoL+/OYvbPfEuyXdddlWyy1Vbb5DAYw1A1SPUP3nYTOpHHyd5gdUe2URN1l5rXmmIdJI2ZRtgso4vNEcLPwl2Txd8Q== X-Forefront-PRVS: 0093C80C01 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(377454003)(24454002)(199003)(189002)(76176999)(2906002)(47776003)(68736007)(4326007)(105586002)(42186005)(92566002)(97736004)(4001350100001)(33646002)(106356001)(50466002)(66066001)(15975445007)(1076002)(3846002)(23726003)(81156014)(101416001)(50986999)(81166006)(54356999)(77096005)(189998001)(6116002)(8676002)(46406003)(586003)(19580395003)(6666003)(305945005)(110136003)(33716001)(6916009)(2950100002)(83506001)(7846002)(9686002)(7736002)(5660300001)(86362001)(97756001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR04MB0211;H:senary;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR04MB0211;23:1cZrKcCO3UQYPPrb8wLz5dW+D20B0zOuO4Y/VEnef?= =?us-ascii?Q?ylAtoIZo2doiZp0a0fpQUioVWnfYipNj6RmbZvay8dNwnehYLbPIvsA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Ju6iFXW74IQ/d1BUqYfCr6t36RabgjhMyIKjoJSuj0sXB052ydh7yiZwN14FPEc6KdEgIH0hDBbfY5i1ajxaKcIaSE2e8y0s/ozEutRW2G4cGwVSHyqlYzcmU2eWajDXWhSL8td0i4bpmMwon7UijCddQ84W8WSidF+lNc2sq0ql8k5wECD1MVCeTSbbUROA5MAHZ+IKuIfvRJx8aep3BX6w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: ni.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2016 15:05:13.8811 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR04MB0211 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1172 Lines: 32 On Wed, Oct 12, 2016 at 02:13:06AM -0700, Florian Fainelli wrote: > On 10/10/2016 10:41 AM, Kyle Roeschley wrote: > > Because the SMSC PHY completes auto-negotiation before the driver is > > ready to handle interrupts, the PHY state machine never realizes that we > > have a link. Clear the ANENABLE bit on initialization, which lets > > genphy_config_aneg do its thing when that code is hit later. > > > > While this patch does fix the problem we see (no link on boot without > > re-plugging the cable), it seems like the generic PHY code should be > > able to handle auto-negotiation completing before interrupts are > > enabled. Submitted as an RFC in the hopes that someone has an idea as to > > how that could be done. > > > > This fix is copied from commit 99f81afc139c ("phy: micrel: Disable auto > > negotiation on startup"). > > Do you mind trying: > > https://www.spinics.net/lists/netdev/msg397857.html > > and see if you do get link interrupts without your patch applied? Thanks! Yep, that fixes it. I figured there was some state machine issue I was missing. Thanks very much! > -- > Florian -- Kyle Roeschley Software Engineer National Instruments