Skip to content

Commit

Permalink
r6040: fix typo in use of MCR0 register bits
Browse files Browse the repository at this point in the history
Commit 4e16d6e (r6040: define more MCR0
register bits) added #define values for MCR0 register bits and converted
uses of hardcoded magic values to uses of these defines.

However, one of the conversions looks suspicious:

 #define MCR0		0x00	/* Control register 0 */
+#define  MCR0_RCVEN	0x0002	/* Receive enable */
+#define  MCR0_XMTEN	0x1000	/* Transmission enable */

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

I believe what was meant here was MCR0_XMTEN | MCR0_RCVEN, which makes
sense and matches the original values.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Cesar Eduardo Barros authored and David S. Miller committed Jan 7, 2012
1 parent f3f511e commit 77e1e43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/rdc/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
lp->dev = dev;

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

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

0 comments on commit 77e1e43

Please sign in to comment.