diff mbox

[v3,5/5] net: asix: autoneg will set WRITE_MEDIUM reg

Message ID 9d5c5525f369f1c4098bda989d73886d11036bae.1472155176.git-series.robert.foss@collabora.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

robert.foss@collabora.com Aug. 29, 2016, 1:32 p.m. UTC
From: Robert Foss <robert.foss@collabora.com>

From: Grant Grundler <grundler@chromium.org>

The miii_nway_restart() causes a PHY link change activity and
ax88772_link_reset will be called. link_reset will set
AX_CMD_WRITE_MEDIUM_MODE register correctly.

The asix_write_medium_mode in reset() fills in a default value to the register
which may be different from the negotiation result. So do this first.

Ignore the ret value since it's ignored in XXX_link_reset() functions.

Signed-off-by: Grant Grundler <grundler@google.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Tested-by: Robert Foss <robert.foss@collabora.com>
---
 drivers/net/usb/asix_devices.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Eric Dumazet Sept. 1, 2016, 4:43 p.m. UTC | #1
On Mon, 2016-08-29 at 09:32 -0400, robert.foss@collabora.com wrote:
> From: Robert Foss <robert.foss@collabora.com>
> 
> From: Grant Grundler <grundler@chromium.org>
> 
> The miii_nway_restart() causes a PHY link change activity and
> ax88772_link_reset will be called. link_reset will set
> AX_CMD_WRITE_MEDIUM_MODE register correctly.
> 
> The asix_write_medium_mode in reset() fills in a default value to the register
> which may be different from the negotiation result. So do this first.
> 
> Ignore the ret value since it's ignored in XXX_link_reset() functions.
> 
> Signed-off-by: Grant Grundler <grundler@google.com>
> Signed-off-by: Robert Foss <robert.foss@collabora.com>
> Tested-by: Robert Foss <robert.foss@collabora.com>
> ---

This is _really_ confusing Robert.

Why having two 'From:' clauses ?

Who wrote the patch in the first place ? You or Grant ?



End result is :

commit 535baf8588d04b177cb33700f81499f2b5203c2d
Author: Robert Foss <robert.foss@collabora.com>
Date:   Mon Aug 29 09:32:19 2016 -0400

    net: asix: autoneg will set WRITE_MEDIUM reg
    
    From: Grant Grundler <grundler@chromium.org>
    
    The miii_nway_restart() causes a PHY link change activity and
    ax88772_link_reset will be called. link_reset will set
    AX_CMD_WRITE_MEDIUM_MODE register correctly.
    
    The asix_write_medium_mode in reset() fills in a default value to the register
    which may be different from the negotiation result. So do this first.
    
    Ignore the ret value since it's ignored in XXX_link_reset() functions.
    
    Signed-off-by: Grant Grundler <grundler@google.com>
    Signed-off-by: Robert Foss <robert.foss@collabora.com>
    Tested-by: Robert Foss <robert.foss@collabora.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>



I guess Grant wrote the patch, but attribution is wrong.
robert.foss@collabora.com Sept. 1, 2016, 4:47 p.m. UTC | #2
On 2016-09-01 12:43 PM, Eric Dumazet wrote:
> On Mon, 2016-08-29 at 09:32 -0400, robert.foss@collabora.com wrote:
>> From: Robert Foss <robert.foss@collabora.com>
>>
>> From: Grant Grundler <grundler@chromium.org>
>>
>> The miii_nway_restart() causes a PHY link change activity and
>> ax88772_link_reset will be called. link_reset will set
>> AX_CMD_WRITE_MEDIUM_MODE register correctly.
>>
>> The asix_write_medium_mode in reset() fills in a default value to the register
>> which may be different from the negotiation result. So do this first.
>>
>> Ignore the ret value since it's ignored in XXX_link_reset() functions.
>>
>> Signed-off-by: Grant Grundler <grundler@google.com>
>> Signed-off-by: Robert Foss <robert.foss@collabora.com>
>> Tested-by: Robert Foss <robert.foss@collabora.com>
>> ---
>
> This is _really_ confusing Robert.
>
> Why having two 'From:' clauses ?
>
> Who wrote the patch in the first place ? You or Grant ?

I'm not quite sure how the first From line was added, it
should not have been.
Grant Grundler is most definitely the author.

Would you like me to resubmit in v++ and make sure that it has been 
corrected?

>
>
>
> End result is :
>
> commit 535baf8588d04b177cb33700f81499f2b5203c2d
> Author: Robert Foss <robert.foss@collabora.com>
> Date:   Mon Aug 29 09:32:19 2016 -0400
>
>     net: asix: autoneg will set WRITE_MEDIUM reg
>
>     From: Grant Grundler <grundler@chromium.org>
>
>     The miii_nway_restart() causes a PHY link change activity and
>     ax88772_link_reset will be called. link_reset will set
>     AX_CMD_WRITE_MEDIUM_MODE register correctly.
>
>     The asix_write_medium_mode in reset() fills in a default value to the register
>     which may be different from the negotiation result. So do this first.
>
>     Ignore the ret value since it's ignored in XXX_link_reset() functions.
>
>     Signed-off-by: Grant Grundler <grundler@google.com>
>     Signed-off-by: Robert Foss <robert.foss@collabora.com>
>     Tested-by: Robert Foss <robert.foss@collabora.com>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
>
>
> I guess Grant wrote the patch, but attribution is wrong.
>
>
Eric Dumazet Sept. 1, 2016, 5:02 p.m. UTC | #3
On Thu, 2016-09-01 at 12:47 -0400, Robert Foss wrote:

> I'm not quite sure how the first From line was added, it
> should not have been.
> Grant Grundler is most definitely the author.
> 
> Would you like me to resubmit in v++ and make sure that it has been 
> corrected?

This is too late, patches are already merged in David Miller net-next
tree.

These kinds of errors can not be fixed, we have to be very careful at
submission/review time.

I guess Grant does not care, but some contributors, especially new ones
would like to get proper attribution.

Thanks.
Grant Grundler Sept. 6, 2016, 4:41 p.m. UTC | #4
On Thu, Sep 1, 2016 at 10:02 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Thu, 2016-09-01 at 12:47 -0400, Robert Foss wrote:
>
>> I'm not quite sure how the first From line was added, it
>> should not have been.
>> Grant Grundler is most definitely the author.
>>
>> Would you like me to resubmit in v++ and make sure that it has been
>> corrected?
>
> This is too late, patches are already merged in David Miller net-next
> tree.
>
> These kinds of errors can not be fixed, we have to be very careful at
> submission/review time.
>
> I guess Grant does not care, but some contributors, especially new ones
> would like to get proper attribution.

I do not mind. Robert will get email about bugs instead of me. :D

cheers,
grant

>
> Thanks.
>
>
robert.foss@collabora.com Sept. 6, 2016, 9:48 p.m. UTC | #5
On 2016-09-06 12:41 PM, Grant Grundler wrote:
> On Thu, Sep 1, 2016 at 10:02 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> On Thu, 2016-09-01 at 12:47 -0400, Robert Foss wrote:
>>
>>> I'm not quite sure how the first From line was added, it
>>> should not have been.
>>> Grant Grundler is most definitely the author.
>>>
>>> Would you like me to resubmit in v++ and make sure that it has been
>>> corrected?
>>
>> This is too late, patches are already merged in David Miller net-next
>> tree.
>>
>> These kinds of errors can not be fixed, we have to be very careful at
>> submission/review time.
>>
>> I guess Grant does not care, but some contributors, especially new ones
>> would like to get proper attribution.
>
> I do not mind. Robert will get email about bugs instead of me. :D

Thanks Grant, sorry about the mixup!


Rob.
diff mbox

Patch

diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index dbcdda2..cce2495 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -928,12 +928,9 @@  static int ax88178_reset(struct usbnet *dev)
 	asix_mdio_write(dev->net, dev->mii.phy_id, MII_CTRL1000,
 			ADVERTISE_1000FULL);
 
+	asix_write_medium_mode(dev, AX88178_MEDIUM_DEFAULT, 0);
 	mii_nway_restart(&dev->mii);
 
-	ret = asix_write_medium_mode(dev, AX88178_MEDIUM_DEFAULT, 0);
-	if (ret < 0)
-		return ret;
-
 	/* Rewrite MAC address */
 	memcpy(data->mac_addr, dev->net->dev_addr, ETH_ALEN);
 	ret = asix_write_cmd(dev, AX_CMD_WRITE_NODE_ID, 0, 0, ETH_ALEN,