]> git.itanic.dy.fi Git - linux-stable/commit
PCI: Add AMD RS690 quirk to enable 64-bit DMA
authorMikel Rychliski <mikel@mikelr.com>
Fri, 11 Jun 2021 21:48:23 +0000 (17:48 -0400)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:47:01 +0000 (08:47 -0400)
commitdb676e73666ade02c8e07a6aa7bfb8ab4e0a620e
tree1eb1e4bf10e1b7df49f1a68aa7dd451506eb882d
parent9a10de6de0ff7a344cb1826b08c68261d1ecd01a
PCI: Add AMD RS690 quirk to enable 64-bit DMA

[ Upstream commit cacf994a91d3a55c0c2f853d6429cd7b86113915 ]

Although the AMD RS690 chipset has 64-bit DMA support, BIOS implementations
sometimes fail to configure the memory limit registers correctly.

The Acer F690GVM mainboard uses this chipset and a Marvell 88E8056 NIC. The
sky2 driver programs the NIC to use 64-bit DMA, which will not work:

  sky2 0000:02:00.0: error interrupt status=0x8
  sky2 0000:02:00.0 eth0: tx timeout
  sky2 0000:02:00.0 eth0: transmit ring 0 .. 22 report=0 done=0

Other drivers required by this mainboard either don't support 64-bit DMA,
or have it disabled using driver specific quirks. For example, the ahci
driver has quirks to enable or disable 64-bit DMA depending on the BIOS
version (see ahci_sb600_enable_64bit() in ahci.c). This ahci quirk matches
against the SB600 SATA controller, but the real issue is almost certainly
with the RS690 PCI host that it was commonly attached to.

To avoid this issue in all drivers with 64-bit DMA support, fix the
configuration of the PCI host. If the kernel is aware of physical memory
above 4GB, but the BIOS never configured the PCI host with this
information, update the registers with our values.

[bhelgaas: drop PCI_DEVICE_ID_ATI_RS690 definition]
Link: https://lore.kernel.org/r/20210611214823.4898-1-mikel@mikelr.com
Signed-off-by: Mikel Rychliski <mikel@mikelr.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/pci/fixup.c