Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300601
b: refs/heads/master
c: 2fa15bb
h: refs/heads/master
i:
  300599: 7b5e5d6
v: v3
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Apr 12, 2012
1 parent 5415e65 commit 91f1226
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 0db0cfcc4ddff3226c8c721760b6a4eaf0e5229a
refs/heads/master: 2fa15bbdd8a1ac096819df29db8d69b063752bee
8 changes: 5 additions & 3 deletions trunk/drivers/net/ethernet/rdc/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@
#define MBCR_DEFAULT 0x012A /* MAC Bus Control Register */
#define MCAST_MAX 3 /* Max number multicast addresses to filter */

#define MAC_DEF_TIMEOUT 2048 /* Default MAC read/write operation timeout */

/* Descriptor status */
#define DSC_OWNER_MAC 0x8000 /* MAC is the owner of this descriptor */
#define DSC_RX_OK 0x4000 /* RX was successful */
Expand Down Expand Up @@ -204,7 +206,7 @@ static char version[] __devinitdata = DRV_NAME
/* Read a word data from PHY Chip */
static int r6040_phy_read(void __iomem *ioaddr, int phy_addr, int reg)
{
int limit = 2048;
int limit = MAC_DEF_TIMEOUT;
u16 cmd;

iowrite16(MDIO_READ + reg + (phy_addr << 8), ioaddr + MMDIO);
Expand All @@ -222,7 +224,7 @@ static int r6040_phy_read(void __iomem *ioaddr, int phy_addr, int reg)
static void r6040_phy_write(void __iomem *ioaddr,
int phy_addr, int reg, u16 val)
{
int limit = 2048;
int limit = MAC_DEF_TIMEOUT;
u16 cmd;

iowrite16(val, ioaddr + MMWD);
Expand Down Expand Up @@ -361,7 +363,7 @@ static int r6040_alloc_rxbufs(struct net_device *dev)
static void r6040_reset_mac(struct r6040_private *lp)
{
void __iomem *ioaddr = lp->base;
int limit = 2048;
int limit = MAC_DEF_TIMEOUT;
u16 cmd;

iowrite16(MAC_RST, ioaddr + MCR1);
Expand Down

0 comments on commit 91f1226

Please sign in to comment.