Skip to content

Commit bc69ad7

Browse files
rickywu0421anguy11
authored andcommitted
ice: avoid IRQ collision to fix init failure on ACPI S3 resume
A bug in https://bugzilla.kernel.org/show_bug.cgi?id=218906 describes that irdma would break and report hardware initialization failed after suspend/resume with Intel E810 NIC (tested on 6.9.0-rc5). The problem is caused due to the collision between the irq numbers requested in irdma and the irq numbers requested in other drivers after suspend/resume. The irq numbers used by irdma are derived from ice's ice_pf->msix_entries which stores mappings between MSI-X index and Linux interrupt number. It's supposed to be cleaned up when suspend and rebuilt in resume but it's not, causing irdma using the old irq numbers stored in the old ice_pf->msix_entries to request_irq() when resume. And eventually collide with other drivers. This patch fixes this problem. On suspend, we call ice_deinit_rdma() to clean up the ice_pf->msix_entries (and free the MSI-X vectors used by irdma if we've dynamically allocated them). On resume, we call ice_init_rdma() to rebuild the ice_pf->msix_entries (and allocate the MSI-X vectors if we would like to dynamically allocate them). Fixes: f9f5301 ("ice: Register auxiliary device to provide RDMA") Tested-by: Cyrus Lien <cyrus.lien@canonical.com> Signed-off-by: En-Wei Wu <en-wei.wu@canonical.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent a9b9741 commit bc69ad7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5564,7 +5564,7 @@ static int ice_suspend(struct device *dev)
55645564
*/
55655565
disabled = ice_service_task_stop(pf);
55665566

5567-
ice_unplug_aux_dev(pf);
5567+
ice_deinit_rdma(pf);
55685568

55695569
/* Already suspended?, then there is nothing to do */
55705570
if (test_and_set_bit(ICE_SUSPENDED, pf->state)) {
@@ -5644,6 +5644,11 @@ static int ice_resume(struct device *dev)
56445644
if (ret)
56455645
dev_err(dev, "Cannot restore interrupt scheme: %d\n", ret);
56465646

5647+
ret = ice_init_rdma(pf);
5648+
if (ret)
5649+
dev_err(dev, "Reinitialize RDMA during resume failed: %d\n",
5650+
ret);
5651+
56475652
clear_bit(ICE_DOWN, pf->state);
56485653
/* Now perform PF reset and rebuild */
56495654
reset_type = ICE_RESET_PFR;

0 commit comments

Comments
 (0)