• Arthur Kiyanovski's avatar
    net: ena: move llq configuration from ena_probe to ena_device_init() · c29efeae
    Arthur Kiyanovski authored
    When the ENA device resets to recover from some error state, all LLQ
    configuration values are reset to their defaults, because LLQ is
    initialized only once during ena_probe().
    
    Changes in this commit:
    1. Move the LLQ configuration process into ena_init_device()
    which is called from both ena_probe() and ena_restore_device(). This
    way, LLQ setup configurations that are different from the default
    values will survive resets.
    
    2. Extract the LLQ bar mapping to ena_map_llq_bar(),
    and call once in the lifetime of the driver from ena_probe(),
    since there is no need to unmap and map the LLQ bar again every reset.
    
    3. Map the LLQ bar if it exists, regardless if initialization of LLQ
    placement policy (ENA_ADMIN_PLACEMENT_POLICY_DEV) succeeded
    or not. Initialization might fail the first time, falling back to the
    ENA_ADMIN_PLACEMENT_POLICY_HOST placement policy, but later succeed
    after device reset, in which case the LLQ bar needs to be mapped
    already.
    Signed-off-by: default avatarSameeh Jubran <sameehj@amazon.com>
    Signed-off-by: default avatarArthur Kiyanovski <akiyano@amazon.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c29efeae
ena_netdev.c 123 KB