kernel_samsung_a53x/drivers/thunderbolt
Mika Westerberg 29b6fdc73b thunderbolt: Workaround an IOMMU fault on certain systems with Intel Maple Ridge
[ Upstream commit 582620d9f6b352552bc9a3316fe2b1c3acd8742d ]

On some systems the IOMMU blocks the first couple of driver ready
messages to the connection manager firmware as can be seen in below
excerpts:

  thunderbolt 0000:06:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0010 address=0xbb0e3400 flags=0x0020]

or

  DMAR: DRHD: handling fault status reg 2
  DMAR: [DMA Write] Request device [04:00.0] PASID ffffffff fault addr 69974000 [fault reason 05] PTE Write access is not set

The reason is unknown and hard to debug because we were not able to
reproduce this locally. This only happens on certain systems with Intel
Maple Ridge Thunderbolt controller. If there is a device connected when
the driver is loaded the issue does not happen either. Only when there
is nothing connected (so typically when the system is booted up).

We can work this around by sending the driver ready several times. After
a couple of retries the message goes through and the controller works
just fine. For this reason make the number of retries a parameter for
icm_request() and then for Maple Ridge (and Titan Ridge as they us the
same function but this should not matter) increase number of retries
while shortening the timeout accordingly.

Reported-by: Werner Sembach <wse@tuxedocomputers.com>
Reported-by: Konrad J Hambrick <kjhambrick@gmail.com>
Reported-by: Calvin Walton <calvin.walton@kepstin.ca>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=214259
Cc: stable@vger.kernel.org
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-08 11:26:11 +01:00
..
acpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ctl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dma_port.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dma_port.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
domain.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eeprom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
icm.c thunderbolt: Workaround an IOMMU fault on certain systems with Intel Maple Ridge 2024-11-08 11:26:11 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nhi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nhi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nhi_ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nhi_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
path.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
property.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
quirks.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
retimer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sb_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
switch.c thunderbolt: Check that lane 1 is in CL0 before enabling lane bonding 2024-11-08 11:25:50 +01:00
tb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tb_msgs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tb_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tunnel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tunnel.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb4.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xdomain.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00