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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 Jan 2019 17:21:28 +0000
From:   Sowjanya Komatineni <skomatineni@...dia.com>
To:     Jonathan Hunter <jonathanh@...dia.com>,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        Mantravadi Karthik <mkarthik@...dia.com>,
        Shardar Mohammed <smohammed@...dia.com>,
        Timo Alho <talho@...dia.com>
CC:     "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>
Subject: RE: [PATCH V1] i2c: tegra: increase transfer timeout



>> increase transfer timeout to 10s to allow enough time during max 
>> transfer size.
>> 
>> Signed-off-by: Sowjanya Komatineni <skomatineni@...dia.com>
>> ---
>>  drivers/i2c/busses/i2c-tegra.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/i2c/busses/i2c-tegra.c 
>> b/drivers/i2c/busses/i2c-tegra.c index e417ebf7628c..ca7c581fb4c0 
>> 100644
>> --- a/drivers/i2c/busses/i2c-tegra.c
>> +++ b/drivers/i2c/busses/i2c-tegra.c
>> @@ -25,7 +25,7 @@
>>  
>>  #include <asm/unaligned.h>
>>  
>> -#define TEGRA_I2C_TIMEOUT (msecs_to_jiffies(1000))
>> +#define TEGRA_I2C_TIMEOUT (msecs_to_jiffies(10000))
>>  #define BYTES_PER_FIFO_WORD 4
>>  
>>  #define I2C_CNFG				0x000
>
>Should the timeout be set depending on the max transfer size? 10s seems an age if the max transfer size is 4KB. In other words, we should this only be applied for >T194+?
>
>Furthermore, in tegra_i2c_xfer_msg() we know the len of the message and so maybe it would be better to dynamically set the timeout depending on length?
>
>Cheers
>Jon

Yes, that’s the ideal way to compute timeout based on msg len and bus rate. 
To do this I had to update TEGRA_I2C_TIMEOUT macro to take arg and there are 3 different patches for tegra i2c under review and all of those will effect as the patch changes use TEGRA_I2C_TIMEOUT. 

So, Should I hold on to this change for now till those patches are merged?

Thanks
Sowjanya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ