Skip to content

Commit e7b856d

Browse files
kwizartLorenzo Pieralisi
authored andcommitted
PCI: tegra: Revert tegra124 raw_violation_fixup
As reported in https://bugzilla.kernel.org/206217 , raw_violation_fixup is causing more harm than good in some common use-cases. This patch is a partial revert of commit: 191cd6f ("PCI: tegra: Add SW fixup for RAW violations") and fixes the following regression since then. * Description: When both the NIC and MMC are used one can see the following message: NETDEV WATCHDOG: enp1s0 (r8169): transmit queue 0 timed out and pcieport 0000:00:02.0: AER: Uncorrected (Non-Fatal) error received: 0000:01:00.0 r8169 0000:01:00.0: AER: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID) r8169 0000:01:00.0: AER: device [10ec:8168] error status/mask=00004000/00400000 r8169 0000:01:00.0: AER: [14] CmpltTO (First) r8169 0000:01:00.0: AER: can't recover (no error_detected callback) pcieport 0000:00:02.0: AER: device recovery failed After that, the ethernet NIC is not functional anymore even after reloading the r8169 module. After a reboot, this is reproducible by copying a large file over the NIC to the MMC. For some reason this is not reproducible when files are copied to a tmpfs. * Little background on the fixup, by Manikanta Maddireddy: "In the internal testing with dGPU on Tegra124, CmplTO is reported by dGPU. This happened because FIFO queue in AFI(AXI to PCIe) module get full by upstream posted writes. Back to back upstream writes interleaved with infrequent reads, triggers RAW violation and CmpltTO. This is fixed by reducing the posted write credits and by changing updateFC timer frequency. These settings are fixed after stress test. In the current case, RTL NIC is also reporting CmplTO. These settings seems to be aggravating the issue instead of fixing it." Link: https://lore.kernel.org/r/[email protected] Fixes: 191cd6f ("PCI: tegra: Add SW fixup for RAW violations") Signed-off-by: Nicolas Chauvet <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Manikanta Maddireddy <[email protected]> Cc: [email protected]
1 parent b3a9e3b commit e7b856d

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

drivers/pci/controller/pci-tegra.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,6 @@
181181

182182
#define AFI_PEXBIAS_CTRL_0 0x168
183183

184-
#define RP_PRIV_XP_DL 0x00000494
185-
#define RP_PRIV_XP_DL_GEN2_UPD_FC_TSHOLD (0x1ff << 1)
186-
187-
#define RP_RX_HDR_LIMIT 0x00000e00
188-
#define RP_RX_HDR_LIMIT_PW_MASK (0xff << 8)
189-
#define RP_RX_HDR_LIMIT_PW (0x0e << 8)
190-
191184
#define RP_ECTL_2_R1 0x00000e84
192185
#define RP_ECTL_2_R1_RX_CTLE_1C_MASK 0xffff
193186

@@ -323,7 +316,6 @@ struct tegra_pcie_soc {
323316
bool program_uphy;
324317
bool update_clamp_threshold;
325318
bool program_deskew_time;
326-
bool raw_violation_fixup;
327319
bool update_fc_timer;
328320
bool has_cache_bars;
329321
struct {
@@ -659,23 +651,6 @@ static void tegra_pcie_apply_sw_fixup(struct tegra_pcie_port *port)
659651
writel(value, port->base + RP_VEND_CTL0);
660652
}
661653

662-
/* Fixup for read after write violation. */
663-
if (soc->raw_violation_fixup) {
664-
value = readl(port->base + RP_RX_HDR_LIMIT);
665-
value &= ~RP_RX_HDR_LIMIT_PW_MASK;
666-
value |= RP_RX_HDR_LIMIT_PW;
667-
writel(value, port->base + RP_RX_HDR_LIMIT);
668-
669-
value = readl(port->base + RP_PRIV_XP_DL);
670-
value |= RP_PRIV_XP_DL_GEN2_UPD_FC_TSHOLD;
671-
writel(value, port->base + RP_PRIV_XP_DL);
672-
673-
value = readl(port->base + RP_VEND_XP);
674-
value &= ~RP_VEND_XP_UPDATE_FC_THRESHOLD_MASK;
675-
value |= soc->update_fc_threshold;
676-
writel(value, port->base + RP_VEND_XP);
677-
}
678-
679654
if (soc->update_fc_timer) {
680655
value = readl(port->base + RP_VEND_XP);
681656
value &= ~RP_VEND_XP_UPDATE_FC_THRESHOLD_MASK;
@@ -2416,7 +2391,6 @@ static const struct tegra_pcie_soc tegra20_pcie = {
24162391
.program_uphy = true,
24172392
.update_clamp_threshold = false,
24182393
.program_deskew_time = false,
2419-
.raw_violation_fixup = false,
24202394
.update_fc_timer = false,
24212395
.has_cache_bars = true,
24222396
.ectl.enable = false,
@@ -2446,7 +2420,6 @@ static const struct tegra_pcie_soc tegra30_pcie = {
24462420
.program_uphy = true,
24472421
.update_clamp_threshold = false,
24482422
.program_deskew_time = false,
2449-
.raw_violation_fixup = false,
24502423
.update_fc_timer = false,
24512424
.has_cache_bars = false,
24522425
.ectl.enable = false,
@@ -2459,8 +2432,6 @@ static const struct tegra_pcie_soc tegra124_pcie = {
24592432
.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
24602433
.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
24612434
.pads_refclk_cfg0 = 0x44ac44ac,
2462-
/* FC threshold is bit[25:18] */
2463-
.update_fc_threshold = 0x03fc0000,
24642435
.has_pex_clkreq_en = true,
24652436
.has_pex_bias_ctrl = true,
24662437
.has_intr_prsnt_sense = true,
@@ -2470,7 +2441,6 @@ static const struct tegra_pcie_soc tegra124_pcie = {
24702441
.program_uphy = true,
24712442
.update_clamp_threshold = true,
24722443
.program_deskew_time = false,
2473-
.raw_violation_fixup = true,
24742444
.update_fc_timer = false,
24752445
.has_cache_bars = false,
24762446
.ectl.enable = false,
@@ -2494,7 +2464,6 @@ static const struct tegra_pcie_soc tegra210_pcie = {
24942464
.program_uphy = true,
24952465
.update_clamp_threshold = true,
24962466
.program_deskew_time = true,
2497-
.raw_violation_fixup = false,
24982467
.update_fc_timer = true,
24992468
.has_cache_bars = false,
25002469
.ectl = {
@@ -2536,7 +2505,6 @@ static const struct tegra_pcie_soc tegra186_pcie = {
25362505
.program_uphy = false,
25372506
.update_clamp_threshold = false,
25382507
.program_deskew_time = false,
2539-
.raw_violation_fixup = false,
25402508
.update_fc_timer = false,
25412509
.has_cache_bars = false,
25422510
.ectl.enable = false,

0 commit comments

Comments
 (0)