# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/linux/hotfix-fw643-reset.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index d797df6e5f3e..e0e4ad9e6d50 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3765,6 +3765,19 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003e, quirk_no_bus_reset); */ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CAVIUM, 0xa100, quirk_no_bus_reset); +/* + * Using LSI / Agere FW643 with vfio-pci will exhaust all + * pci_reset_fn_methods, the bus reset at the end causes a broken link + * only recoverable by removing power + * (power-off / suspend + rescan). + * Prevent this bus reset. + * With this change, the device can be assigned to VMs with VFIO. + * Note that it will not be reset, resulting in leaking state between VMs + * and host. + */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATT, 0x5900, quirk_no_bus_reset); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATT, 0x5901, quirk_no_bus_reset); + /* * Some TI KeyStone C667X devices do not support bus/hot reset. The PCIESS * automatically disables LTSSM when Secondary Bus Reset is received and