]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: default to 64-bit DMA on recent PCIe chips
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 14 May 2016 20:40:15 +0000 (22:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 May 2016 18:31:09 +0000 (14:31 -0400)
commitdf94d0908afa4aefddf8bd2c02aa1f1f058f87ed
tree41c57b6171dd4d4a863078a65b31f1a6933a58d4
parent4c0404b5565bb4ab66e8fe42a2ed18113996580e
r8169: default to 64-bit DMA on recent PCIe chips

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: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c