Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300605
b: refs/heads/master
c: 31171ae
h: refs/heads/master
i:
  300603: 4bdd991
v: v3
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Apr 12, 2012
1 parent 4c42be3 commit 27eded1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 940ff7ed0e2af6410078addead6ca245f55b72da
refs/heads/master: 31171aec23206e00ca4458cc3e3357a5275ccaaa
12 changes: 10 additions & 2 deletions trunk/drivers/net/ethernet/rdc/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@
#define MID_3M 0x82 /* MID3 Medium */
#define MID_3H 0x84 /* MID3 High */
#define PHY_CC 0x88 /* PHY status change configuration register */
#define SCEN 0x8000 /* PHY status change enable */
#define PHYAD_SHIFT 8 /* PHY address shift */
#define TMRDIV_SHIFT 0 /* Timer divider shift */
#define PHY_ST 0x8A /* PHY status register */
#define MAC_SM 0xAC /* MAC status machine */
#define MAC_SM_RST 0x0002 /* MAC status machine reset */
Expand Down Expand Up @@ -1132,10 +1135,15 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
err = -EIO;
goto err_out_free_res;
}

/* If PHY status change register is still set to zero it means the
* bootloader didn't initialize it */
* bootloader didn't initialize it, so we set it to:
* - enable phy status change
* - enable all phy addresses
* - set to lowest timer divider */
if (ioread16(ioaddr + PHY_CC) == 0)
iowrite16(0x9f07, ioaddr + PHY_CC);
iowrite16(SCEN | PHY_MAX_ADDR << PHYAD_SHIFT |
7 << TMRDIV_SHIFT, ioaddr + PHY_CC);

/* Init system & device */
lp->base = ioaddr;
Expand Down

0 comments on commit 27eded1

Please sign in to comment.