• Claudiu Beznea's avatar
    net: ravb: Move the update of ndev->features to ravb_set_features() · 7bddccc9
    Claudiu Beznea authored
    Commit c2da9408 ("ravb: Add Rx checksum offload support for GbEth")
    introduced support for setting GbEth features. With this the IP-specific
    features update functions update the ndev->features individually.
    
    Next commits add runtime PM support for the ravb driver. The runtime PM
    implementation will enable/disable the IP clocks on
    the ravb_open()/ravb_close() functions. Accessing the IP registers with
    clocks disabled blocks the system.
    
    The ravb_set_features() function could be executed when the Ethernet
    interface is closed so we need to ensure we don't access IP registers while
    the interface is down when runtime PM support will be in place.
    
    For these, move the update of ndev->features to ravb_set_features(). In
    this way we update the ndev->features only when the IP-specific features
    set function returns success and we can avoid code duplication when
    introducing runtime PM registers protection.
    Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
    Reviewed-by: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7bddccc9
ravb_main.c 82.2 KB