lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f5a184a4-95ea-33d4-473c-ea9da266c12c@st.com>
Date:   Fri, 7 Jul 2017 09:10:49 +0200
From:   Giuseppe CAVALLARO <peppe.cavallaro@...com>
To:     <thor.thayer@...ux.intel.com>, <linville@...driver.com>
CC:     <netdev@...r.kernel.org>
Subject: Re: [PATCHv2 1/3] ethtool: stmmac: Fix Designware ethtool register
 dump

On 7/6/2017 10:22 PM, Thor Thayer wrote:
> On 06/28/2017 10:13 AM, thor.thayer@...ux.intel.com wrote:
>> From: Thor Thayer <thor.thayer@...ux.intel.com>
>>
>> The commit fbf68229ffe7 ("net: stmmac: unify registers dumps methods")
>>
>> in the Linux kernel modified the register dump to store the DMA 
>> registers
>> at the DMA register offset (0x1000) but ethtool (stmmac.c) looks for the
>> DMA registers after the MAC registers which is offset 12.
>> This patch adds the DMA register offset so that indexing is correct.
>>
>> Signed-off-by: Thor Thayer <thor.thayer@...ux.intel.com>
>> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@...com>
>> ---
>> v2  Modify the commit message to specify commit from Linux kernel.
>>      Add Acked-by.
>> ---
>
> Please disregard this patch.
>
> After further reflection, it would be better to leave this alone and 
> change the kernel driver. This change would require using different 
> ethtool for different versions.
>
> The other 2 patches with macro changes are still valid.

I think it is better to resend a V3 with the two patches

Regards
Peppe

>
> Thanks,
>
> Thor
>
>>   stmmac.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/stmmac.c b/stmmac.c
>> index fb69bfe..e1bb291 100644
>> --- a/stmmac.c
>> +++ b/stmmac.c
>> @@ -14,6 +14,9 @@
>>   #include <string.h>
>>   #include "internal.h"
>>   +/* The DMA Registers start at offset 0x1000 in the DW IP */
>> +#define DMA_REG_OFFSET    (0x1000 / 4)
>> +
>>   int st_mac100_dump_regs(struct ethtool_drvinfo *info,
>>               struct ethtool_regs *regs)
>>   {
>> @@ -36,6 +39,7 @@ int st_mac100_dump_regs(struct ethtool_drvinfo *info,
>>         fprintf(stdout, "\n");
>>       fprintf(stdout, "DMA Registers\n");
>> +    stmmac_reg = (unsigned int *)regs->data + DMA_REG_OFFSET;
>>       for (i = 0; i < 9; i++)
>>           fprintf(stdout, "CSR%d  0x%08X\n", i, *stmmac_reg++);
>>   @@ -59,6 +63,7 @@ int st_gmac_dump_regs(struct ethtool_drvinfo 
>> *info, struct ethtool_regs *regs)
>>         fprintf(stdout, "\n");
>>       fprintf(stdout, "DMA Registers\n");
>> +    stmmac_reg = (unsigned int *)regs->data + DMA_REG_OFFSET;
>>       for (i = 0; i < 22; i++)
>>           fprintf(stdout, "Reg%d  0x%08X\n", i, *stmmac_reg++);
>>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ