BACKPORT: FROMGIT: wifi: rtw89: pci: add PCI Express error handling

Sometimes PCIe Advanced Error Reporting(AER), like bad TLP or
Data link protocol error, happens due to unstable pci signal or
no response from PCI host.

  pcieport 0000:00:1c.0: AER: Uncorrected (Non-Fatal) error message received from 0000:01:00.0
  rtw89_8852be 0000:01:00.0: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID)
  rtw89_8852be 0000:01:00.0:   device [10ec:b852] error status/mask=00004000/00400000
  rtw89_8852be 0000:01:00.0:    [14] CmpltTO                (First)
  rtw89_8852be 0000:01:00.0: SER catches error: 0x4000
  pcieport 0000:00:1c.0: AER: device recovery successful
  rtw89_8852be 0000:01:00.0: FW backtrace invalid key: 0xbb6c3214
  ieee80211 phy0: Hardware restart was requested

Setup callback function to call SER function to reset driver to recover
from these states.

Signed-off-by: Chin-Yen Lee <timlee@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250523062711.27213-3-pkshih@realtek.com
(cherry picked from commit 16e3d93c6183649a3b210f82b83c1cb12aa5e8a3
 https://github.com/pkshih/rtw.git rtw-next)

Conflicts:
   drivers/net/wireless/realtek/rtw89/pci.h
	(contextual conflicts)
   drivers/net/wireless/realtek/rtw89/rtw8851be.c
	(Unmerged path)
   drivers/net/wireless/realtek/rtw89/rtw8922ae.c
	(Unmerged path)

BUG=none
TEST=verify on dedede with 8852B.

Change-Id: I02555fb4ce7bd5463bdc29a5829ab4b3c127bcfc
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/6640912
Tested-by: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Commit-Queue: David Ruth <druth@chromium.org>
Reviewed-by: Ruth Mekonnen <rmekonnen@google.com>
6 files changed