* [PATCH] r6040: fix typo in use of MCR0 register bits
@ 2012-01-07 15:13 Cesar Eduardo Barros
2012-01-07 20:09 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Cesar Eduardo Barros @ 2012-01-07 15:13 UTC (permalink / raw)
To: Florian Fainelli
Cc: David S. Miller, netdev, linux-kernel, Cesar Eduardo Barros
Commit 4e16d6ebd65b4f2c4e3f780b4c5704beef64019c (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>
---
drivers/net/ethernet/rdc/r6040.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 87aa439..cb0eca8 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -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;
--
1.7.7.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] r6040: fix typo in use of MCR0 register bits
2012-01-07 15:13 [PATCH] r6040: fix typo in use of MCR0 register bits Cesar Eduardo Barros
@ 2012-01-07 20:09 ` David Miller
2012-01-09 10:15 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2012-01-07 20:09 UTC (permalink / raw)
To: cesarb; +Cc: florian, netdev, linux-kernel
From: Cesar Eduardo Barros <cesarb@cesarb.net>
Date: Sat, 7 Jan 2012 13:13:17 -0200
> Commit 4e16d6ebd65b4f2c4e3f780b4c5704beef64019c (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>
Good catch, applied, thanks a lot.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] r6040: fix typo in use of MCR0 register bits
2012-01-07 20:09 ` David Miller
@ 2012-01-09 10:15 ` Florian Fainelli
0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2012-01-09 10:15 UTC (permalink / raw)
To: David Miller; +Cc: cesarb, netdev, linux-kernel
On 01/07/12 21:09, David Miller wrote:
> From: Cesar Eduardo Barros<cesarb@cesarb.net>
> Date: Sat, 7 Jan 2012 13:13:17 -0200
>
>> Commit 4e16d6ebd65b4f2c4e3f780b4c5704beef64019c (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>
> Good catch, applied, thanks a lot.
Indeed, thanks Cesar.
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-09 10:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-07 15:13 [PATCH] r6040: fix typo in use of MCR0 register bits Cesar Eduardo Barros
2012-01-07 20:09 ` David Miller
2012-01-09 10:15 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).