lkml.org 
[lkml]   [2016]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 04/15] drivers: net: cpsw: ethtool: fix accessing to suspended device
From
Date
On 06/15/2016 07:14 PM, Florian Fainelli wrote:
> On 06/15/2016 04:55 AM, Grygorii Strashko wrote:
>> The CPSW might be suspended by RPM if all ethX interfaces are down,
>> but it still could be accesible through ethtool interfce. In this case
>> ethtool operations, requiring registers access, will cause L3 errors and
>> CPSW crash.
>>
>> Hence, fix it by adding RPM get/put calls in ethtool callbcaks which
>> can access CPSW registers: .set_coalesce(), .get_ethtool_stats(),
>> .set_pauseparam(), .get_regs()
>
> Provided that you implement an ethtool_ops::begin, it will be called
> before each ethtool operation runs, so that could allow you to eliminate
> some of the duplication here. Conversely ethtool_ops::end terminates
> each operation and can be used for that purpose.

Ah. Thanks for the advice. (assume you've meant .complete())



--
regards,
-grygorii

\
 
 \ /
  Last update: 2016-06-15 19:21    [W:0.084 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site