• Ard Biesheuvel's avatar
    r8169: default to 64-bit DMA on recent PCIe chips · 27896c83
    Ard Biesheuvel authored
    The current logic around the 'use_dac' module parameter prevents the
    r81969 driver from being loadable on 64-bit systems without any RAM
    below 4 GB when the parameter is left at its default value.
    
    So introduce a new default value -1 which indicates that 64-bit DMA
    should be enabled on sufficiently recent PCIe chips, i.e., versions
    RTL_GIGA_MAC_VER_18 or later. Explicit param values of 0 or 1 retain
    the existing behavior of unconditionally enabling/disabling 64-bit DMA
    on 64-bit architectures (i.e., regardless of the type and version of the
    chip)
    
    Since PCIe chips do not need to CPlusCmd Dual Address Cycle to be set,
    make that conditional on the device type as well.
    
    Cc: Realtek linux nic maintainers <nic_swsd@realtek.com>
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    27896c83
r8169.c 209 KB