* [PATCH] sh_eth: fix SH7619/771x support
@ 2014-06-03 19:42 Sergei Shtylyov
2014-06-04 0:34 ` Yoshihiro Shimoda
2014-06-04 2:29 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-06-03 19:42 UTC (permalink / raw)
To: netdev; +Cc: linux-sh, yoshihiro.shimoda.uh
Commit 4a55530f38e4 (net: sh_eth: modify the definitions of register) managed
to leave out the E-DMAC register entries in sh_eth_offset_fast_sh3_sh2[], thus
totally breaking SH7619/771x support. Add the missing entries using the data
from before that commit.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
The patch is against Dave Miller's 'net.git' repo.
Although there have been no complaints during 3+ years of this being broken, I
think it's probably worth queuing the patch for the stable trees...
drivers/net/ethernet/renesas/sh_eth.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
Index: net/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net/drivers/net/ethernet/renesas/sh_eth.c
@@ -307,6 +307,27 @@ static const u16 sh_eth_offset_fast_sh4[
};
static const u16 sh_eth_offset_fast_sh3_sh2[SH_ETH_MAX_REGISTER_OFFSET] = {
+ [EDMR] = 0x0000,
+ [EDTRR] = 0x0004,
+ [EDRRR] = 0x0008,
+ [TDLAR] = 0x000c,
+ [RDLAR] = 0x0010,
+ [EESR] = 0x0014,
+ [EESIPR] = 0x0018,
+ [TRSCER] = 0x001c,
+ [RMFCR] = 0x0020,
+ [TFTR] = 0x0024,
+ [FDR] = 0x0028,
+ [RMCR] = 0x002c,
+ [EDOCR] = 0x0030,
+ [FCFTR] = 0x0034,
+ [RPADIR] = 0x0038,
+ [TRIMD] = 0x003c,
+ [RBWAR] = 0x0040,
+ [RDFAR] = 0x0044,
+ [TBRAR] = 0x004c,
+ [TDFAR] = 0x0050,
+
[ECMR] = 0x0160,
[ECSR] = 0x0164,
[ECSIPR] = 0x0168,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sh_eth: fix SH7619/771x support
2014-06-03 19:42 [PATCH] sh_eth: fix SH7619/771x support Sergei Shtylyov
@ 2014-06-04 0:34 ` Yoshihiro Shimoda
2014-06-04 2:02 ` David Miller
2014-06-04 12:37 ` Sergei Shtylyov
2014-06-04 2:29 ` David Miller
1 sibling, 2 replies; 6+ messages in thread
From: Yoshihiro Shimoda @ 2014-06-04 0:34 UTC (permalink / raw)
To: Sergei Shtylyov, netdev@vger.kernel.org; +Cc: linux-sh@vger.kernel.org
Hi Sergei,
Thank you for the patch!
(2014/06/04 4:42), Sergei Shtylyov wrote:
> Commit 4a55530f38e4 (net: sh_eth: modify the definitions of register) managed
> to leave out the E-DMAC register entries in sh_eth_offset_fast_sh3_sh2[], thus
> totally breaking SH7619/771x support. Add the missing entries using the data
> from before that commit.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> The patch is against Dave Miller's 'net.git' repo.
> Although there have been no complaints during 3+ years of this being broken, I
> think it's probably worth queuing the patch for the stable trees...
>
> drivers/net/ethernet/renesas/sh_eth.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> Index: net/drivers/net/ethernet/renesas/sh_eth.c
> ===================================================================
> --- net.orig/drivers/net/ethernet/renesas/sh_eth.c
> +++ net/drivers/net/ethernet/renesas/sh_eth.c
> @@ -307,6 +307,27 @@ static const u16 sh_eth_offset_fast_sh4[
> };
>
> static const u16 sh_eth_offset_fast_sh3_sh2[SH_ETH_MAX_REGISTER_OFFSET] = {
> + [EDMR] = 0x0000,
> + [EDTRR] = 0x0004,
> + [EDRRR] = 0x0008,
> + [TDLAR] = 0x000c,
> + [RDLAR] = 0x0010,
> + [EESR] = 0x0014,
> + [EESIPR] = 0x0018,
> + [TRSCER] = 0x001c,
> + [RMFCR] = 0x0020,
> + [TFTR] = 0x0024,
> + [FDR] = 0x0028,
> + [RMCR] = 0x002c,
> + [EDOCR] = 0x0030,
> + [FCFTR] = 0x0034,
> + [RPADIR] = 0x0038,
I checked sh7710 and sh7619 datasheet, but they don't have RPADIR register.
Since I would like to check a datasheet you looked into, would you tell me about this?
Best regards,
Yoshihiro Shimoda
> + [TRIMD] = 0x003c,
> + [RBWAR] = 0x0040,
> + [RDFAR] = 0x0044,
> + [TBRAR] = 0x004c,
> + [TDFAR] = 0x0050,
> +
> [ECMR] = 0x0160,
> [ECSR] = 0x0164,
> [ECSIPR] = 0x0168,
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sh_eth: fix SH7619/771x support
2014-06-04 0:34 ` Yoshihiro Shimoda
@ 2014-06-04 2:02 ` David Miller
2014-06-04 2:20 ` Yoshihiro Shimoda
2014-06-04 12:37 ` Sergei Shtylyov
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2014-06-04 2:02 UTC (permalink / raw)
To: yoshihiro.shimoda.uh; +Cc: sergei.shtylyov, netdev, linux-sh
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Wed, 4 Jun 2014 09:34:56 +0900
> (2014/06/04 4:42), Sergei Shtylyov wrote:
>> Commit 4a55530f38e4 (net: sh_eth: modify the definitions of register) managed
>> to leave out the E-DMAC register entries in sh_eth_offset_fast_sh3_sh2[], thus
>> totally breaking SH7619/771x support. Add the missing entries using the data
>> from before that commit.
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
...
> I checked sh7710 and sh7619 datasheet, but they don't have RPADIR register.
> Since I would like to check a datasheet you looked into, would you tell me about this?
I think what Sergei simply did is take what was used for register offsets
before the mentioned commits.
The RPADIR register write is guarded by "mdp->cd->rpadir" being non-zero,
so his change is very safe.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sh_eth: fix SH7619/771x support
2014-06-04 2:02 ` David Miller
@ 2014-06-04 2:20 ` Yoshihiro Shimoda
0 siblings, 0 replies; 6+ messages in thread
From: Yoshihiro Shimoda @ 2014-06-04 2:20 UTC (permalink / raw)
To: David Miller; +Cc: sergei.shtylyov, netdev, linux-sh
Hi David,
(2014/06/04 11:02), David Miller wrote:
> From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Date: Wed, 4 Jun 2014 09:34:56 +0900
>
>> (2014/06/04 4:42), Sergei Shtylyov wrote:
>>> Commit 4a55530f38e4 (net: sh_eth: modify the definitions of register) managed
>>> to leave out the E-DMAC register entries in sh_eth_offset_fast_sh3_sh2[], thus
>>> totally breaking SH7619/771x support. Add the missing entries using the data
>>> from before that commit.
>>>
>>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> ...
>> I checked sh7710 and sh7619 datasheet, but they don't have RPADIR register.
>> Since I would like to check a datasheet you looked into, would you tell me about this?
>
> I think what Sergei simply did is take what was used for register offsets
> before the mentioned commits.
>
> The RPADIR register write is guarded by "mdp->cd->rpadir" being non-zero,
> so his change is very safe.
Thank you for the reply. I understood it.
Since I checked all of the registers offset in this patch and they are good:
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Best regards,
Yoshihiro Shimoda
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sh_eth: fix SH7619/771x support
2014-06-04 0:34 ` Yoshihiro Shimoda
2014-06-04 2:02 ` David Miller
@ 2014-06-04 12:37 ` Sergei Shtylyov
1 sibling, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2014-06-04 12:37 UTC (permalink / raw)
To: Yoshihiro Shimoda, netdev@vger.kernel.org; +Cc: linux-sh@vger.kernel.org
Hello.
On 06/04/2014 04:34 AM, Yoshihiro Shimoda wrote:
>> Commit 4a55530f38e4 (net: sh_eth: modify the definitions of register) managed
>> to leave out the E-DMAC register entries in sh_eth_offset_fast_sh3_sh2[], thus
>> totally breaking SH7619/771x support. Add the missing entries using the data
>> from before that commit.
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> ---
>> The patch is against Dave Miller's 'net.git' repo.
>> Although there have been no complaints during 3+ years of this being broken, I
>> think it's probably worth queuing the patch for the stable trees...
>> drivers/net/ethernet/renesas/sh_eth.c | 21 +++++++++++++++++++++
>> 1 file changed, 21 insertions(+)
>> Index: net/drivers/net/ethernet/renesas/sh_eth.c
>> ===================================================================
>> --- net.orig/drivers/net/ethernet/renesas/sh_eth.c
>> +++ net/drivers/net/ethernet/renesas/sh_eth.c
>> @@ -307,6 +307,27 @@ static const u16 sh_eth_offset_fast_sh4[
>> };
>>
>> static const u16 sh_eth_offset_fast_sh3_sh2[SH_ETH_MAX_REGISTER_OFFSET] = {
>> + [EDMR] = 0x0000,
>> + [EDTRR] = 0x0004,
>> + [EDRRR] = 0x0008,
>> + [TDLAR] = 0x000c,
>> + [RDLAR] = 0x0010,
>> + [EESR] = 0x0014,
>> + [EESIPR] = 0x0018,
>> + [TRSCER] = 0x001c,
>> + [RMFCR] = 0x0020,
>> + [TFTR] = 0x0024,
>> + [FDR] = 0x0028,
>> + [RMCR] = 0x002c,
>> + [EDOCR] = 0x0030,
>> + [FCFTR] = 0x0034,
>> + [RPADIR] = 0x0038,
> I checked sh7710 and sh7619 datasheet, but they don't have RPADIR register.
> Since I would like to check a datasheet you looked into, would you tell me about this?
As I wrote in the changelog, I used the driver source. I don't have access
to SH7619/771x datasheets.
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] sh_eth: fix SH7619/771x support
2014-06-03 19:42 [PATCH] sh_eth: fix SH7619/771x support Sergei Shtylyov
2014-06-04 0:34 ` Yoshihiro Shimoda
@ 2014-06-04 2:29 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2014-06-04 2:29 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-sh, yoshihiro.shimoda.uh
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Tue, 3 Jun 2014 23:42:26 +0400
> Commit 4a55530f38e4 (net: sh_eth: modify the definitions of register) managed
> to leave out the E-DMAC register entries in sh_eth_offset_fast_sh3_sh2[], thus
> totally breaking SH7619/771x support. Add the missing entries using the data
> from before that commit.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Applied.
I'll queue both of these sh_eth changes for -stable.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-04 12:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-03 19:42 [PATCH] sh_eth: fix SH7619/771x support Sergei Shtylyov
2014-06-04 0:34 ` Yoshihiro Shimoda
2014-06-04 2:02 ` David Miller
2014-06-04 2:20 ` Yoshihiro Shimoda
2014-06-04 12:37 ` Sergei Shtylyov
2014-06-04 2:29 ` David Miller
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).