2018-05-05 21:38:50

by Andrea Greco

[permalink] [raw]
Subject: [RFC PATCH 2/3] arcnet: com20020: Fixup missing SLOWARB bit

From: Andrea Greco <[email protected]>

If com20020 clock is major of 40Mhz SLOWARB bit is requested.

Signed-off-by: Andrea Greco <[email protected]>
---
drivers/net/arcnet/com20020.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c
index f09ea77dd6a8..abd32ed8ec9b 100644
--- a/drivers/net/arcnet/com20020.c
+++ b/drivers/net/arcnet/com20020.c
@@ -102,6 +102,10 @@ int com20020_check(struct net_device *dev)
lp->setup = lp->clockm ? 0 : (lp->clockp << 1);
lp->setup2 = (lp->clockm << 4) | 8;

+ // If clock is major of 40Mhz, SLOWARB bit must be set
+ if (lp->clockm > 1)
+ lp->setup2 |= SLOWARB;
+
/* CHECK: should we do this for SOHARD cards ? */
/* Enable P1Mode for backplane mode */
lp->setup = lp->setup | P1MODE;
--
2.14.3



2018-05-07 02:56:51

by Tobin C. Harding

[permalink] [raw]
Subject: Re: [RFC PATCH 2/3] arcnet: com20020: Fixup missing SLOWARB bit

On Sat, May 05, 2018 at 11:37:54PM +0200, Andrea Greco wrote:
> From: Andrea Greco <[email protected]>
>
> If com20020 clock is major of 40Mhz SLOWARB bit is requested.
>
> Signed-off-by: Andrea Greco <[email protected]>
> ---
> drivers/net/arcnet/com20020.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c
> index f09ea77dd6a8..abd32ed8ec9b 100644
> --- a/drivers/net/arcnet/com20020.c
> +++ b/drivers/net/arcnet/com20020.c
> @@ -102,6 +102,10 @@ int com20020_check(struct net_device *dev)
> lp->setup = lp->clockm ? 0 : (lp->clockp << 1);
> lp->setup2 = (lp->clockm << 4) | 8;
>
> + // If clock is major of 40Mhz, SLOWARB bit must be set

/* C89 style comments please :) */


Hope this helps,
Tobin.

2018-05-08 09:54:02

by Andrea Greco

[permalink] [raw]
Subject: Re: [RFC PATCH 2/3] arcnet: com20020: Fixup missing SLOWARB bit

On 05/07/2018 04:55 AM, Tobin C. Harding wrote:
> On Sat, May 05, 2018 at 11:37:54PM +0200, Andrea Greco wrote:
>> From: Andrea Greco <[email protected]>
>>
>> If com20020 clock is major of 40Mhz SLOWARB bit is requested.
>>
>> Signed-off-by: Andrea Greco <[email protected]>
>> ---
>> drivers/net/arcnet/com20020.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/arcnet/com20020.c b/drivers/net/arcnet/com20020.c
>> index f09ea77dd6a8..abd32ed8ec9b 100644
>> --- a/drivers/net/arcnet/com20020.c
>> +++ b/drivers/net/arcnet/com20020.c
>> @@ -102,6 +102,10 @@ int com20020_check(struct net_device *dev)
>> lp->setup = lp->clockm ? 0 : (lp->clockp << 1);
>> lp->setup2 = (lp->clockm << 4) | 8;
>>
>> + // If clock is major of 40Mhz, SLOWARB bit must be set
>
> /* C89 style comments please :) */
>

Done

>
> Hope this helps,
> Tobin.
>