From: Jeremy Linton <jeremy.linton@arm.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
netdev@vger.kernel.org
Cc: steve.glendinning@shawell.net
Subject: Re: [PATCH] net: smsc911x: If PHY doesn't have an interrupt then POLL
Date: Wed, 15 Jun 2016 10:56:51 -0500 [thread overview]
Message-ID: <57617AC3.1@arm.com> (raw)
In-Reply-To: <cf3c6e59-76f9-4b13-2bfb-0755c68acc9c@cogentembedded.com>
On 06/14/2016 04:56 PM, Sergei Shtylyov wrote:
> On 06/15/2016 12:53 AM, Jeremy Linton wrote:
>
>>>>>>>> If the interrupt configuration isn't set and we are using the
>>>>>>>
>>>>>>> It's never set, judging by the driver code.
>>>>>>>
>>>>>>>> internal phy, then we need to poll the phy to reliably detect
>>>>>>>> phy state changes.
>>>>>>>
>>>>>>> What address your internal PHY is at? Mine is at 1, and things
>>>>>>> seem
>>>>>>> to work reliably after probing:
>>>>>>>
>>>>>>> SMSC LAN8700 18000000.etherne:01: attached PHY driver [SMSC LAN8700]
>>>>>>> (mii_bus:phy_addr=18000000.etherne:01, irq=-1)
>>>>>>>
>>>>>>> I'm using the device tree on my board.
>>>>>>
>>>>>> Ok, I'm back on the machine, this is what mine says without that
>>>>>> patch.
>>>>>>
>>>>>> SMSC LAN911x Internal PHY 18000000.etherne:01: attached PHY driver
>>>>>> [SMSC
>>>>>> LAN911x Internal PHY] (mii_bus:phy_addr=18000000.etherne:01, irq=0)
>>>>>
>>>>> Hum, that's unexpected... things are probably more complex that I
>>>>> thought. Do you have extra patches to this driver by changce?
>>>>
>>>> No, the initial kernel where the problem was discovered is
>>>> 4.5.2-301.fc24.aarch64, but I built a mainline 4.6, and modprobed the
>>>> driver
>>>> with the same effect.
>>>>
>>>> Although, now that I'm looking closer at phy_irq, I'm curious how it
>>>> works for
>>>> anyone else...
>>>
>>> Does anything change when you comment out that memcpy()? It
>>> shouldn't probably...
>>
>> Well that should change the irq to PHY_POLL by default rather than
>> the 0's
>> in the structure, which may be a better patch.
>
> It shouldn't due to the wrong size. It should only overwrite IRQ and
> index 0, unless I'm mistaken.
Oh, sizeof(pointer)==8 on arm64, yah in the arm32 case you dodge the
bullet.
I think the memcpy removal solves the problem, i'm also going to test
moving the mii_probe and will post an updated patch.
Thanks!
prev parent reply other threads:[~2016-06-15 15:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 16:16 [PATCH] net: smsc911x: If PHY doesn't have an interrupt then POLL Jeremy Linton
2016-06-14 18:30 ` Sergei Shtylyov
2016-06-14 19:27 ` Sergei Shtylyov
2016-06-14 19:49 ` Sergei Shtylyov
2016-06-14 20:12 ` Andrew Lunn
2016-06-14 20:21 ` Sergei Shtylyov
2016-06-14 20:13 ` Jeremy Linton
2016-06-14 18:42 ` Andrew Lunn
2016-06-14 20:48 ` Jeremy Linton
2016-06-14 20:44 ` Sergei Shtylyov
2016-06-14 20:59 ` Jeremy Linton
2016-06-14 21:24 ` Sergei Shtylyov
2016-06-14 22:26 ` Andrew Lunn
2016-06-15 15:50 ` Jeremy Linton
2016-06-14 21:02 ` Jeremy Linton
2016-06-14 21:12 ` Jeremy Linton
2016-06-14 21:26 ` Sergei Shtylyov
2016-06-14 21:29 ` Jeremy Linton
2016-06-14 21:34 ` Sergei Shtylyov
2016-06-14 21:40 ` Jeremy Linton
2016-06-14 21:42 ` Sergei Shtylyov
2016-06-14 21:53 ` Jeremy Linton
2016-06-14 21:56 ` Sergei Shtylyov
2016-06-15 15:56 ` Jeremy Linton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57617AC3.1@arm.com \
--to=jeremy.linton@arm.com \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=steve.glendinning@shawell.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).