linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 2/3] arcnet: com20020: Fixup missing SLOWARB bit
@ 2018-05-05 21:37 Andrea Greco
  2018-05-07  2:55 ` Tobin C. Harding
  0 siblings, 1 reply; 3+ messages in thread
From: Andrea Greco @ 2018-05-05 21:37 UTC (permalink / raw)
  To: m.grzeschik; +Cc: Andrea Greco, netdev, linux-kernel

From: Andrea Greco <a.greco@4sigma.it>

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

Signed-off-by: Andrea Greco <a.greco@4sigma.it>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH 2/3] arcnet: com20020: Fixup missing SLOWARB bit
  2018-05-05 21:37 [RFC PATCH 2/3] arcnet: com20020: Fixup missing SLOWARB bit Andrea Greco
@ 2018-05-07  2:55 ` Tobin C. Harding
  2018-05-08  9:52   ` Andrea Greco
  0 siblings, 1 reply; 3+ messages in thread
From: Tobin C. Harding @ 2018-05-07  2:55 UTC (permalink / raw)
  To: Andrea Greco; +Cc: m.grzeschik, Andrea Greco, netdev, linux-kernel

On Sat, May 05, 2018 at 11:37:54PM +0200, Andrea Greco wrote:
> From: Andrea Greco <a.greco@4sigma.it>
> 
> If com20020 clock is major of 40Mhz SLOWARB bit is requested.
> 
> Signed-off-by: Andrea Greco <a.greco@4sigma.it>
> ---
>  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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH 2/3] arcnet: com20020: Fixup missing SLOWARB bit
  2018-05-07  2:55 ` Tobin C. Harding
@ 2018-05-08  9:52   ` Andrea Greco
  0 siblings, 0 replies; 3+ messages in thread
From: Andrea Greco @ 2018-05-08  9:52 UTC (permalink / raw)
  To: Tobin C. Harding; +Cc: m.grzeschik, Andrea Greco, netdev, linux-kernel

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 <a.greco@4sigma.it>
>>
>> If com20020 clock is major of 40Mhz SLOWARB bit is requested.
>>
>> Signed-off-by: Andrea Greco <a.greco@4sigma.it>
>> ---
>>   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.
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-08  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-05 21:37 [RFC PATCH 2/3] arcnet: com20020: Fixup missing SLOWARB bit Andrea Greco
2018-05-07  2:55 ` Tobin C. Harding
2018-05-08  9:52   ` Andrea Greco

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).