* [PATCH] net: phy: at803x: support interrupt on 8030 and 8035
@ 2015-11-12 17:40 Mans Rullgard
2015-11-12 19:06 ` Mason
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mans Rullgard @ 2015-11-12 17:40 UTC (permalink / raw)
To: Florian Fainelli, netdev, linux-kernel; +Cc: slash.tmp
Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt mode"
added interrupt support for the 8031 PHY but left out the other two
chips supported by this driver.
This patch sets the .ack_interrupt and .config_intr functions for the
8030 and 8035 drivers as well.
Signed-off-by: Mans Rullgard <mans@mansr.com>
---
I have only tested this with an 8035. I can't find a datasheet for
the 8030, but since 8031, 8032, and 8035 all have the same register
layout, there's a good chance 8030 does as well.
---
drivers/net/phy/at803x.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index fabf11d..2d020a3 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = {
.flags = PHY_HAS_INTERRUPT,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
+ .ack_interrupt = at803x_ack_interrupt,
+ .config_intr = at803x_config_intr,
.driver = {
.owner = THIS_MODULE,
},
@@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = {
.flags = PHY_HAS_INTERRUPT,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
+ .ack_interrupt = at803x_ack_interrupt,
+ .config_intr = at803x_config_intr,
.driver = {
.owner = THIS_MODULE,
},
--
2.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] net: phy: at803x: support interrupt on 8030 and 8035
2015-11-12 17:40 [PATCH] net: phy: at803x: support interrupt on 8030 and 8035 Mans Rullgard
@ 2015-11-12 19:06 ` Mason
2015-11-12 19:09 ` Måns Rullgård
2015-11-12 19:15 ` Florian Fainelli
2015-11-16 19:19 ` David Miller
2 siblings, 1 reply; 8+ messages in thread
From: Mason @ 2015-11-12 19:06 UTC (permalink / raw)
To: Mans Rullgard; +Cc: Florian Fainelli, netdev, linux-kernel
On 12/11/2015 18:40, Mans Rullgard wrote:
> Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt mode"
> added interrupt support for the 8031 PHY but left out the other two
> chips supported by this driver.
>
> This patch sets the .ack_interrupt and .config_intr functions for the
> 8030 and 8035 drivers as well.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
> I have only tested this with an 8035. I can't find a datasheet for
> the 8030, but since 8031, 8032, and 8035 all have the same register
> layout, there's a good chance 8030 does as well.
> ---
> drivers/net/phy/at803x.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
> index fabf11d..2d020a3 100644
> --- a/drivers/net/phy/at803x.c
> +++ b/drivers/net/phy/at803x.c
> @@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = {
> .flags = PHY_HAS_INTERRUPT,
> .config_aneg = genphy_config_aneg,
> .read_status = genphy_read_status,
> + .ack_interrupt = at803x_ack_interrupt,
> + .config_intr = at803x_config_intr,
> .driver = {
> .owner = THIS_MODULE,
> },
> @@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = {
> .flags = PHY_HAS_INTERRUPT,
> .config_aneg = genphy_config_aneg,
> .read_status = genphy_read_status,
> + .ack_interrupt = at803x_ack_interrupt,
> + .config_intr = at803x_config_intr,
> .driver = {
> .owner = THIS_MODULE,
> },
Shouldn't we take the opportunity to clean up the duplicated register
definitions? (I'll send an informal patch to spur discussion.)
Regards.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: phy: at803x: support interrupt on 8030 and 8035
2015-11-12 19:06 ` Mason
@ 2015-11-12 19:09 ` Måns Rullgård
2015-11-12 19:14 ` Florian Fainelli
0 siblings, 1 reply; 8+ messages in thread
From: Måns Rullgård @ 2015-11-12 19:09 UTC (permalink / raw)
To: Mason; +Cc: Florian Fainelli, netdev, linux-kernel
On 12 November 2015 19:06:23 GMT+00:00, Mason <slash.tmp@free.fr> wrote:
>On 12/11/2015 18:40, Mans Rullgard wrote:
>> Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt
>mode"
>> added interrupt support for the 8031 PHY but left out the other two
>> chips supported by this driver.
>>
>> This patch sets the .ack_interrupt and .config_intr functions for the
>> 8030 and 8035 drivers as well.
>>
>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>> ---
>> I have only tested this with an 8035. I can't find a datasheet for
>> the 8030, but since 8031, 8032, and 8035 all have the same register
>> layout, there's a good chance 8030 does as well.
>> ---
>> drivers/net/phy/at803x.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
>> index fabf11d..2d020a3 100644
>> --- a/drivers/net/phy/at803x.c
>> +++ b/drivers/net/phy/at803x.c
>> @@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = {
>> .flags = PHY_HAS_INTERRUPT,
>> .config_aneg = genphy_config_aneg,
>> .read_status = genphy_read_status,
>> + .ack_interrupt = at803x_ack_interrupt,
>> + .config_intr = at803x_config_intr,
>> .driver = {
>> .owner = THIS_MODULE,
>> },
>> @@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = {
>> .flags = PHY_HAS_INTERRUPT,
>> .config_aneg = genphy_config_aneg,
>> .read_status = genphy_read_status,
>> + .ack_interrupt = at803x_ack_interrupt,
>> + .config_intr = at803x_config_intr,
>> .driver = {
>> .owner = THIS_MODULE,
>> },
>
>Shouldn't we take the opportunity to clean up the duplicated register
>definitions? (I'll send an informal patch to spur discussion.)
>
>Regards.
That can be done independently. Feel free to send a patch.
--
Måns Rullgård
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: phy: at803x: support interrupt on 8030 and 8035
2015-11-12 19:09 ` Måns Rullgård
@ 2015-11-12 19:14 ` Florian Fainelli
2015-11-12 22:14 ` Mason
0 siblings, 1 reply; 8+ messages in thread
From: Florian Fainelli @ 2015-11-12 19:14 UTC (permalink / raw)
To: Måns Rullgård, Mason; +Cc: netdev, linux-kernel
On 12/11/15 11:09, Måns Rullgård wrote:
> On 12 November 2015 19:06:23 GMT+00:00, Mason <slash.tmp@free.fr> wrote:
>> On 12/11/2015 18:40, Mans Rullgard wrote:
>>> Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt
>> mode"
>>> added interrupt support for the 8031 PHY but left out the other two
>>> chips supported by this driver.
>>>
>>> This patch sets the .ack_interrupt and .config_intr functions for the
>>> 8030 and 8035 drivers as well.
>>>
>>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>>> ---
>>> I have only tested this with an 8035. I can't find a datasheet for
>>> the 8030, but since 8031, 8032, and 8035 all have the same register
>>> layout, there's a good chance 8030 does as well.
>>> ---
>>> drivers/net/phy/at803x.c | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
>>> index fabf11d..2d020a3 100644
>>> --- a/drivers/net/phy/at803x.c
>>> +++ b/drivers/net/phy/at803x.c
>>> @@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = {
>>> .flags = PHY_HAS_INTERRUPT,
>>> .config_aneg = genphy_config_aneg,
>>> .read_status = genphy_read_status,
>>> + .ack_interrupt = at803x_ack_interrupt,
>>> + .config_intr = at803x_config_intr,
>>> .driver = {
>>> .owner = THIS_MODULE,
>>> },
>>> @@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = {
>>> .flags = PHY_HAS_INTERRUPT,
>>> .config_aneg = genphy_config_aneg,
>>> .read_status = genphy_read_status,
>>> + .ack_interrupt = at803x_ack_interrupt,
>>> + .config_intr = at803x_config_intr,
>>> .driver = {
>>> .owner = THIS_MODULE,
>>> },
>>
>> Shouldn't we take the opportunity to clean up the duplicated register
>> definitions? (I'll send an informal patch to spur discussion.)
>>
>> Regards.
>
> That can be done independently. Feel free to send a patch.
Agreed, that deserve a separate patch.
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: phy: at803x: support interrupt on 8030 and 8035
2015-11-12 17:40 [PATCH] net: phy: at803x: support interrupt on 8030 and 8035 Mans Rullgard
2015-11-12 19:06 ` Mason
@ 2015-11-12 19:15 ` Florian Fainelli
2015-11-16 19:19 ` David Miller
2 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2015-11-12 19:15 UTC (permalink / raw)
To: Mans Rullgard, netdev, linux-kernel; +Cc: slash.tmp
On 12/11/15 09:40, Mans Rullgard wrote:
> Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt mode"
> added interrupt support for the 8031 PHY but left out the other two
> chips supported by this driver.
>
> This patch sets the .ack_interrupt and .config_intr functions for the
> 8030 and 8035 drivers as well.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: phy: at803x: support interrupt on 8030 and 8035
2015-11-12 19:14 ` Florian Fainelli
@ 2015-11-12 22:14 ` Mason
2015-11-12 22:28 ` Måns Rullgård
0 siblings, 1 reply; 8+ messages in thread
From: Mason @ 2015-11-12 22:14 UTC (permalink / raw)
To: Florian Fainelli; +Cc: Mans Rullgard, netdev, linux-kernel
On 12/11/2015 20:14, Florian Fainelli wrote:
> On 12/11/15 11:09, Måns Rullgård wrote:
>> On 12 November 2015 19:06:23 GMT+00:00, Mason wrote:
>>> On 12/11/2015 18:40, Mans Rullgard wrote:
>>>> Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt mode"
>>>> added interrupt support for the 8031 PHY but left out the other two
>>>> chips supported by this driver.
>>>>
>>>> This patch sets the .ack_interrupt and .config_intr functions for the
>>>> 8030 and 8035 drivers as well.
>>>>
>>>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>>>> ---
>>>> I have only tested this with an 8035. I can't find a datasheet for
>>>> the 8030, but since 8031, 8032, and 8035 all have the same register
>>>> layout, there's a good chance 8030 does as well.
>>>> ---
>>>> drivers/net/phy/at803x.c | 4 ++++
>>>> 1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
>>>> index fabf11d..2d020a3 100644
>>>> --- a/drivers/net/phy/at803x.c
>>>> +++ b/drivers/net/phy/at803x.c
>>>> @@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = {
>>>> .flags = PHY_HAS_INTERRUPT,
>>>> .config_aneg = genphy_config_aneg,
>>>> .read_status = genphy_read_status,
>>>> + .ack_interrupt = at803x_ack_interrupt,
>>>> + .config_intr = at803x_config_intr,
>>>> .driver = {
>>>> .owner = THIS_MODULE,
>>>> },
>>>> @@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = {
>>>> .flags = PHY_HAS_INTERRUPT,
>>>> .config_aneg = genphy_config_aneg,
>>>> .read_status = genphy_read_status,
>>>> + .ack_interrupt = at803x_ack_interrupt,
>>>> + .config_intr = at803x_config_intr,
>>>> .driver = {
>>>> .owner = THIS_MODULE,
>>>> },
>>>
>>> Shouldn't we take the opportunity to clean up the duplicated register
>>> definitions? (I'll send an informal patch to spur discussion.)
>>>
>>> Regards.
>>
>> That can be done independently. Feel free to send a patch.
>
> Agreed, that deserve a separate patch.
Isn't there a problem when at803x_set_wol() sets the AT803X_WOL_ENABLE
bit, but a DISABLE/ENABLE cycle through at803x_config_intr() will
discard that bit?
Regards.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: phy: at803x: support interrupt on 8030 and 8035
2015-11-12 22:14 ` Mason
@ 2015-11-12 22:28 ` Måns Rullgård
0 siblings, 0 replies; 8+ messages in thread
From: Måns Rullgård @ 2015-11-12 22:28 UTC (permalink / raw)
To: Mason; +Cc: Florian Fainelli, netdev, linux-kernel
Mason <slash.tmp@free.fr> writes:
> On 12/11/2015 20:14, Florian Fainelli wrote:
>> On 12/11/15 11:09, Måns Rullgård wrote:
>>> On 12 November 2015 19:06:23 GMT+00:00, Mason wrote:
>>>> On 12/11/2015 18:40, Mans Rullgard wrote:
>>>>> Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt mode"
>>>>> added interrupt support for the 8031 PHY but left out the other two
>>>>> chips supported by this driver.
>>>>>
>>>>> This patch sets the .ack_interrupt and .config_intr functions for the
>>>>> 8030 and 8035 drivers as well.
>>>>>
>>>>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>>>>> ---
>>>>> I have only tested this with an 8035. I can't find a datasheet for
>>>>> the 8030, but since 8031, 8032, and 8035 all have the same register
>>>>> layout, there's a good chance 8030 does as well.
>>>>> ---
>>>>> drivers/net/phy/at803x.c | 4 ++++
>>>>> 1 file changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
>>>>> index fabf11d..2d020a3 100644
>>>>> --- a/drivers/net/phy/at803x.c
>>>>> +++ b/drivers/net/phy/at803x.c
>>>>> @@ -308,6 +308,8 @@ static struct phy_driver at803x_driver[] = {
>>>>> .flags = PHY_HAS_INTERRUPT,
>>>>> .config_aneg = genphy_config_aneg,
>>>>> .read_status = genphy_read_status,
>>>>> + .ack_interrupt = at803x_ack_interrupt,
>>>>> + .config_intr = at803x_config_intr,
>>>>> .driver = {
>>>>> .owner = THIS_MODULE,
>>>>> },
>>>>> @@ -327,6 +329,8 @@ static struct phy_driver at803x_driver[] = {
>>>>> .flags = PHY_HAS_INTERRUPT,
>>>>> .config_aneg = genphy_config_aneg,
>>>>> .read_status = genphy_read_status,
>>>>> + .ack_interrupt = at803x_ack_interrupt,
>>>>> + .config_intr = at803x_config_intr,
>>>>> .driver = {
>>>>> .owner = THIS_MODULE,
>>>>> },
>>>>
>>>> Shouldn't we take the opportunity to clean up the duplicated register
>>>> definitions? (I'll send an informal patch to spur discussion.)
>>>>
>>>> Regards.
>>>
>>> That can be done independently. Feel free to send a patch.
>>
>> Agreed, that deserve a separate patch.
>
> Isn't there a problem when at803x_set_wol() sets the AT803X_WOL_ENABLE
> bit, but a DISABLE/ENABLE cycle through at803x_config_intr() will
> discard that bit?
Possibly, but fixing that should be yet another patch.
--
Måns Rullgård
mans@mansr.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: phy: at803x: support interrupt on 8030 and 8035
2015-11-12 17:40 [PATCH] net: phy: at803x: support interrupt on 8030 and 8035 Mans Rullgard
2015-11-12 19:06 ` Mason
2015-11-12 19:15 ` Florian Fainelli
@ 2015-11-16 19:19 ` David Miller
2 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2015-11-16 19:19 UTC (permalink / raw)
To: mans; +Cc: f.fainelli, netdev, linux-kernel, slash.tmp
From: Mans Rullgard <mans@mansr.com>
Date: Thu, 12 Nov 2015 17:40:20 +0000
> Commit 77a993942 "phy/at8031: enable at8031 to work on interrupt mode"
> added interrupt support for the 8031 PHY but left out the other two
> chips supported by this driver.
>
> This patch sets the .ack_interrupt and .config_intr functions for the
> 8030 and 8035 drivers as well.
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
Applied.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-11-16 19:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 17:40 [PATCH] net: phy: at803x: support interrupt on 8030 and 8035 Mans Rullgard
2015-11-12 19:06 ` Mason
2015-11-12 19:09 ` Måns Rullgård
2015-11-12 19:14 ` Florian Fainelli
2015-11-12 22:14 ` Mason
2015-11-12 22:28 ` Måns Rullgård
2015-11-12 19:15 ` Florian Fainelli
2015-11-16 19:19 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.