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]
Date:   Tue, 1 Oct 2019 21:17:01 +0000
From:   Jeroen Hofstee <jhofstee@...tronenergy.com>
To:     Marc Kleine-Budde <mkl@...gutronix.de>,
        "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>
CC:     Wolfgang Grandegger <wg@...ndegger.com>,
        "David S. Miller" <davem@...emloft.net>,
        "open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] can: D_CAN: perform a sofware reset on open

Hello Marc,

On 10/1/19 4:32 PM, Marc Kleine-Budde wrote:
> On 9/26/19 10:50 AM, Jeroen Hofstee wrote:
>> When the C_CAN interface is closed it is put in power down mode, but
>> does not reset the error counters / state. So reset the D_CAN on open,
>> so the reported state and the actual state match.
>>
>> According to [1], the C_CAN module doesn't have the software reset.
>>
>> [1] http://www.bosch-semiconductors.com/media/ip_modules/pdf_2/c_can_fd8/users_manual_c_can_fd8_r210_1.pdf
>>
>> Signed-off-by: Jeroen Hofstee <jhofstee@...tronenergy.com>
>> ---
>>   drivers/net/can/c_can/c_can.c | 26 ++++++++++++++++++++++++++
>>   1 file changed, 26 insertions(+)
>>
>> diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c
>> index 606b7d8ffe13..502a181d02e7 100644
>> --- a/drivers/net/can/c_can/c_can.c
>> +++ b/drivers/net/can/c_can/c_can.c
>> @@ -52,6 +52,7 @@
>>   #define CONTROL_EX_PDR		BIT(8)
>>   
>>   /* control register */
>> +#define CONTROL_SWR		BIT(15)
>>   #define CONTROL_TEST		BIT(7)
>>   #define CONTROL_CCE		BIT(6)
>>   #define CONTROL_DISABLE_AR	BIT(5)
>> @@ -569,6 +570,26 @@ static void c_can_configure_msg_objects(struct net_device *dev)
>>   				   IF_MCONT_RCV_EOB);
>>   }
>>   
>> +static int software_reset(struct net_device *dev)
> Please add the common prefix "c_can_" to the function

Fine with me, I did sent a v2.

Regards,
Jeroen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ