From: Florian Fainelli <f.fainelli@gmail.com>
To: maowenan <maowenan@huawei.com>,
David Laight <David.Laight@ACULAB.COM>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Dingtianhong <dingtianhong@huawei.com>,
"weiyongjun (A)" <weiyongjun1@huawei.com>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH] net:phy fix driver reference count error when attach and detach phy device
Date: Tue, 31 Jan 2017 12:05:15 -0800 [thread overview]
Message-ID: <de519e4c-8c46-369d-bca8-53f4982c14ae@gmail.com> (raw)
In-Reply-To: <83f87925-5456-1896-e8ff-4d9f724158e4@huawei.com>
On 01/23/2017 01:33 AM, maowenan wrote:
>
>
> On 2017/1/6 12:48, Florian Fainelli wrote:
>> Le 01/05/17 à 19:39, maowenan a écrit :
>>>
>>>
>>> On 2017/1/6 11:21, Florian Fainelli wrote:
>>>> +Andrew,
>>>>
>>>> Le 01/05/17 à 18:29, maowenan a écrit :
>>>>>>> @Florian Fainelli, what's your comments about this patch?
>>>>>>
>>>>>> I am trying to reproduce what you are seeing, but at first glance is looks like an
>>>>>> appropriate solution to me. Do you mind giving me a couple more days?
>>>>>>
>>>>>> Thanks!
>>>>>> --
>>>>>> Florian
>>>>>
>>>>> Hi Florian,
>>>>> Do you have any update about this patch?
>>>>
>>>> Your patch is not complete, there are now MDIO device (which PHY devices
>>>> are a superset of) that would also need a similar fix.
>>>>
>>> ok, is there any patch to fix MDIO yet? if not, i will verify it and give a fix patch?
>>>
>>
>> No, there is not a patch yet, your approach looks okay, but need to be
>> made general and cover MDIO devices as well.
>>
>> Thank you!
>>
>
> Hi Florian,
> Sorry I can't get you. There has already existed codes which are not originally written by me to cover MDIO device in phy_attach_direct and phy_detach in my patch .
> Please help check, thank you.
> phy_attach_direct:
> struct device *d = &phydev->mdio.dev;
> ...
> get_device(d);
> ...
>
> phy_detach:
> put_device(&phydev->mdio.dev); /*--MDIO device--*/
> + module_put(phydev->mdio.dev.driver->owner);
> module_put(bus->owner);
Took me a while, but I can finally reproduce this here as well, will
come up with a fix, thanks for your patience!
--
Florian
prev parent reply other threads:[~2017-01-31 20:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 10:22 [PATCH] net:phy fix driver reference count error when attach and detach phy device Mao Wenan
2016-12-02 9:45 ` David Laight
2016-12-05 8:47 ` maowenan
2016-12-12 8:49 ` maowenan
2016-12-12 16:33 ` Florian Fainelli
2017-01-06 2:29 ` maowenan
2017-01-06 3:21 ` Florian Fainelli
2017-01-06 3:39 ` maowenan
2017-01-06 4:48 ` Florian Fainelli
2017-01-23 9:33 ` maowenan
2017-01-31 20:05 ` Florian Fainelli [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=de519e4c-8c46-369d-bca8-53f4982c14ae@gmail.com \
--to=f.fainelli@gmail.com \
--cc=David.Laight@ACULAB.COM \
--cc=andrew@lunn.ch \
--cc=dingtianhong@huawei.com \
--cc=maowenan@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=weiyongjun1@huawei.com \
/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).