diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 827412a72..319d6ba2b 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -8029,10 +8029,12 @@ qla2xxx_pci_slot_reset(struct pci_dev *pdev) pci_restore_state(pdev); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 19, 0) /* pci_restore_state() clears the saved_state flag of the device * save restored state which resets saved_state flag */ pci_save_state(pdev); +#endif if (ha->mem_only) rc = pci_enable_device_mem(pdev); diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index f4ce5704d..db3dc939d 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -4692,10 +4692,12 @@ qla2xxx_pci_slot_reset(struct pci_dev *pdev) pci_restore_state(pdev); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 19, 0) /* pci_restore_state() clears the saved_state flag of the device * save restored state which resets saved_state flag */ pci_save_state(pdev); +#endif if (ha->mem_only) rc = pci_enable_device_mem(pdev);