Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279417
b: refs/heads/master
c: 4e16d6e
h: refs/heads/master
i:
  279415: 87cc52a
v: v3
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Jan 4, 2012
1 parent 300b023 commit 1977544
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 49f26720d46476384a090c4e281be73e5de4f1e1
refs/heads/master: 4e16d6ebd65b4f2c4e3f780b4c5704beef64019c
9 changes: 6 additions & 3 deletions trunk/drivers/net/ethernet/rdc/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@

/* MAC registers */
#define MCR0 0x00 /* Control register 0 */
#define MCR0_RCVEN 0x0002 /* Receive enable */
#define MCR0_PROMISC 0x0020 /* Promiscuous mode */
#define MCR0_HASH_EN 0x0100 /* Enable multicast hash table function */
#define MCR0_XMTEN 0x1000 /* Transmission enable */
#define MCR0_FD 0x8000 /* Full/Half duplex */
#define MCR1 0x04 /* Control register 1 */
#define MAC_RST 0x0001 /* Reset the MAC */
#define MBCR 0x08 /* Bus control */
Expand Down Expand Up @@ -398,7 +401,7 @@ static void r6040_init_mac_regs(struct net_device *dev)
iowrite16(INT_MASK, ioaddr + MIER);

/* Enable TX and RX */
iowrite16(lp->mcr0 | 0x0002, ioaddr);
iowrite16(lp->mcr0 | MCR0_RCVEN, ioaddr);

/* Let TX poll the descriptors
* we may got called by r6040_tx_timeout which has left
Expand Down Expand Up @@ -1002,7 +1005,7 @@ static void r6040_adjust_link(struct net_device *dev)

/* reflect duplex change */
if (phydev->link && (lp->old_duplex != phydev->duplex)) {
lp->mcr0 |= (phydev->duplex == DUPLEX_FULL ? 0x8000 : 0);
lp->mcr0 |= (phydev->duplex == DUPLEX_FULL ? MCR0_FD : 0);
iowrite16(lp->mcr0, ioaddr);

status_changed = 1;
Expand Down Expand Up @@ -1155,7 +1158,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
lp->dev = dev;

/* Init RDC private data */
lp->mcr0 = 0x1002;
lp->mcr0 = MCR0_XMTEN | MCR0;

/* The RDC-specific entries in the device structure. */
dev->netdev_ops = &r6040_netdev_ops;
Expand Down

0 comments on commit 1977544

Please sign in to comment.