diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 5334de2c1..69ce395c5 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -8006,11 +8006,13 @@ qla2xxx_pci_slot_reset(struct pci_dev *pdev) "Slot Reset.\n"); ha->pci_error_state = QLA_PCI_SLOT_RESET; +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 18, 0) /* Workaround: qla2xxx driver which access hardware earlier * needs error state to be pci_channel_io_online. * Otherwise mailbox command timesout. */ pdev->error_state = pci_channel_io_normal; +#endif pci_restore_state(pdev); diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index 200ca377a..6279b6374 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -4678,11 +4678,13 @@ qla2xxx_pci_slot_reset(struct pci_dev *pdev) ql_dbg(ql_dbg_aer, base_vha, 0x9004, "Slot Reset.\n"); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 18, 0) /* Workaround: qla2xxx driver which access hardware earlier * needs error state to be pci_channel_io_online. * Otherwise mailbox command timesout. */ pdev->error_state = pci_channel_io_normal; +#endif pci_restore_state(pdev);