Skip to content

Commit

Permalink
asix: Do full reset during ax88772_bind
Browse files Browse the repository at this point in the history
commit 3cc81d8 ("asix: Don't reset PHY on if_up for ASIX 88772")
causes the ethernet on Arndale to no longer function. This appears to
be because the Arndale ethernet requires a full reset before it will
function correctly, however simply reverting the above patch causes
problems with ethtool settings getting reset.

It seems the problem is that the ethernet is not properly reset during
bind, and indeed the code in ax88772_bind that resets the device is a
very small subset of the actual ax88772_reset function. This patch uses
ax88772_reset in place of the existing reset code in ax88772_bind which
removes some code duplication and fixes the ethernet on Arndale.

It is still possible that the original patch causes some issues with
suspend and resume but that seems like a separate issue and I haven't
had a chance to test that yet.

Signed-off-by: Charles Keepax <[email protected]>
Tested-by: Riku Voipio <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
charleskeepax authored and davem330 committed Nov 7, 2014
1 parent 1310b54 commit 436c2a5
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/net/usb/asix_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,19 +465,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
return ret;
}

ret = asix_sw_reset(dev, AX_SWRESET_IPPD | AX_SWRESET_PRL);
if (ret < 0)
return ret;

msleep(150);

ret = asix_sw_reset(dev, AX_SWRESET_CLEAR);
if (ret < 0)
return ret;

msleep(150);

ret = asix_sw_reset(dev, embd_phy ? AX_SWRESET_IPRL : AX_SWRESET_PRTE);
ax88772_reset(dev);

/* Read PHYID register *AFTER* the PHY was reset properly */
phyid = asix_get_phyid(dev);
Expand Down

0 comments on commit 436c2a5

Please sign in to comment.