Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45602
b: refs/heads/master
c: d0ffff8
h: refs/heads/master
v: v3
  • Loading branch information
Andres Salomon authored and Greg Kroah-Hartman committed Jan 22, 2007
1 parent 6dd2658 commit 1b3d93e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9d8c2b324d24ffb4fdcd93b3f752530a5a0a591
refs/heads/master: d0ffff8fddd5853e4b2b101790ac0c3690655af5
18 changes: 13 additions & 5 deletions trunk/drivers/usb/net/asix.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ static int ax88772_link_reset(struct usbnet *dev)

static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
{
int ret;
int ret, embd_phy;
void *buf;
u16 rx_ctl;
struct asix_data *data = (struct asix_data *)&dev->data;
Expand All @@ -919,22 +919,30 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
AX_GPIO_RSE | AX_GPIO_GPO_2 | AX_GPIO_GPO2EN, 5)) < 0)
goto out2;

/* 0x10 is the phy id of the embedded 10/100 ethernet phy */
embd_phy = ((asix_get_phy_addr(dev) & 0x1f) == 0x10 ? 1 : 0);
if ((ret = asix_write_cmd(dev, AX_CMD_SW_PHY_SELECT,
1, 0, 0, buf)) < 0) {
embd_phy, 0, 0, buf)) < 0) {
dbg("Select PHY #1 failed: %d", ret);
goto out2;
}

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

msleep(150);
if ((ret = asix_sw_reset(dev, AX_SWRESET_CLEAR)) < 0)
goto out2;

msleep(150);
if ((ret = asix_sw_reset(dev, AX_SWRESET_IPRL | AX_SWRESET_PRL)) < 0)
goto out2;
if (embd_phy) {
if ((ret = asix_sw_reset(dev, AX_SWRESET_IPRL)) < 0)
goto out2;
}
else {
if ((ret = asix_sw_reset(dev, AX_SWRESET_PRTE)) < 0)
goto out2;
}

msleep(150);
rx_ctl = asix_read_rx_ctl(dev);
Expand Down

0 comments on commit 1b3d93e

Please sign in to comment.