From nobody Sun Feb 8 02:41:18 2026 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 477E210A1E for ; Thu, 29 Jan 2026 04:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.122 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769659247; cv=none; b=gVlZIW/zfH2B8rJ9LYue+DmAEGenWVR4tjkClxnvre0uPt1bsTlTnfVsnw+BnrrIqOfCAkIbz6hYvJK4xBbcuRMcCy96ZvWATqGWTmxGSmAhfdaLEF347a4bc7gjsVwWZ78svfWe2wZ7B3L2UqzIinoH8TIMyrD3pAwDMksTHEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769659247; c=relaxed/simple; bh=rzaxSdtqzDXfWysjmOOD8rn5zx0atH7wn6hro0V9WpM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=AlHgn8e5j3vi/b/mY4gejV0kwwlT4cfNwOhhcjpv40MRQP3KwEaWzCyt21zZA3g8GpwtDqsO3JRqiPqTa920FDAn1dvBqLYFjdDxx6IW0UbLKmIgnrOzjd5Yu1ZIg+kUUPkEzAfXotIqKhs+v9KUNJvvoA5sxdKH5qdVwjFrn04= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (4096-bit key) header.d=canonical.com header.i=@canonical.com header.b=SiCR0GOu; arc=none smtp.client-ip=185.125.188.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=canonical.com header.i=@canonical.com header.b="SiCR0GOu" Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 7A7623FAE8 for ; Thu, 29 Jan 2026 04:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20251003; t=1769659242; bh=USqOveOYsJXn+ZSyuAuAAWc+4m7dnuwhvblWv/bFrO4=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=SiCR0GOue4EHCu9tX0T/alnJklK+LfYP7zBQFkYJRssflqagN32kfSyeSo3Hsgv4H Ali/pgIlCLW/6MKZMgIVvLynLeaQ7yLw0u2Gzj9RChbNVA0PvB0b278qTFvsZredPa eYdL73XLEddpV8YxaIIZPK8EIj1+YksLlBIpBVLhBAXTWdvOyLgaE5vSanISdnZWJE CQks6Yfbg2HlUlJ1VuhS0pS/43y4q+bfJ0qLipB8KBy2sYmkhxjQeYfGehAXy9bXg6 k1xy6XrcuMQMRhscElJYCiK4jXk61jdlgTmVdQuZcf446OvbqyxfoQQ0jKPN9+rSPT SY0MUbbrzJ2TXnjBa02wuZEKuqfL7XFForq5yCaWGWxWFrS72KonqGp0KE0uocgLWr 07CyRYa49otoMzC4H7ri1c8zJ748TLEoA7cidiNmuHB7vJnVbYCSsQ4Dbh0FIu2rzb G3DYzNk94vO6vsQtY9FXuw536zXVzee4hgZYn7NNGznahlXZZ4yMV+0wr1PLIPnE6a 9NsXkkw2ECbspiH/wNxVNZxBSLjpkuckXYg9GOP7tB4HmtSQeUHh6I6MevrO+KLFCw fYl9pwJI8prKHHZXvLHg3tMw6stNPd4mWYfRYXKuGBVqSD83y54HhBZubrj+/+cmPJ fQMyvUaPaI5n2x0PIJfdraMM= Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-34c2f670a06so623446a91.3 for ; Wed, 28 Jan 2026 20:00:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769659241; x=1770264041; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=USqOveOYsJXn+ZSyuAuAAWc+4m7dnuwhvblWv/bFrO4=; b=Mq4kku/smCaw/JnjXrnpdY87wFXUB6QIPgUA3q2cBzVtt7yyohGO+7rqDEMamz5+aX 4gxgASBOM85GDS9LsTMtuNR/kx8jdzSCk9d9wpvzG1ubDM/qQSgg+6PtM6Z6Bg49xvym e8/HwHoXcKn3X3KDDlrZm/0BZ570HJ/v2H0xp0DGF2gg7KiTvt2EVqcv7G2ppK76MWNQ qqw7D/SadKG7oWNYGcjk+GvEU6EenISoH5z7uQD9+JGkhmMbCqGxgMpgvZxwdh6neVWx 7WS+UEOWA/j1Y2zMilwPs/RjC4Zx7hFjPKvSCQUfvJ0N3aP9AJdAFJYF9ynFs49ZQnZV jdDA== X-Forwarded-Encrypted: i=1; AJvYcCUpVlr1n8xAdojbcHi2JIw5d9fNI5cMZoxzdIYd4eUd451/ikME8HRijqP9yQKrEedwIj2WuJTPukCrouI=@vger.kernel.org X-Gm-Message-State: AOJu0YwagpIFZI1KaJgGUVmnp9ERwCGBb3/Vi5hp624wpN/7jFX4QUXA pIjhlEwbObGWUV4LRFlTzi2AJJXwkR/0A0OGnEAq/BLYwUn1IWAGpN8TKhpJKsHaRh/VvTLtHqJ zL5vAiTpmcEp0g37qdEs7XB0t3GK5puOmAY4gHh0jV7be033D9DjioteukEiaehjSneVB9X2bRy KvaTwAYw== X-Gm-Gg: AZuq6aJR49nVzVkqUf/QSVCxTrtxmn03cDv9gixWI+rqpr2KriNPqxYn8wVfEugRqih /bM8JsewB/U6R2mqidVYDGqf8OIile4zkDCdk0VgUidiAKRXIusBUsMmvONMccC9dkH8TJhz/lr NMcgR4B8VJ78Zgj2dQNSRHOS/nBs3sYb6LNC9V6qEhFZeaF+CY7GWnOqWGDCaxA2LbpTDnW5rXR +it3nog7PivHRfrb188NU/cfrt6Aez93jXCCMupSqjiZLhbmuauTFZent7qPRBxyFUOYD9dbdsF fSou2Yt9m5R406HKPZgqlRTXEbBttH7W/XJxqeZzLKB56isGzITOoV6yKpFQtmU1XeDM2VZ1RbD T5mobQmoAwHaLKtXR5BEqQlox X-Received: by 2002:a17:90b:2892:b0:341:194:5e7d with SMTP id 98e67ed59e1d1-353fed74c1fmr6685201a91.24.1769659240754; Wed, 28 Jan 2026 20:00:40 -0800 (PST) X-Received: by 2002:a17:90b:2892:b0:341:194:5e7d with SMTP id 98e67ed59e1d1-353fed74c1fmr6685177a91.24.1769659240343; Wed, 28 Jan 2026 20:00:40 -0800 (PST) Received: from localhost.localdomain ([103.155.100.3]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-353f6103e9fsm6709121a91.2.2026.01.28.20.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jan 2026 20:00:39 -0800 (PST) From: Aaron Ma To: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4] ice: recap the VSI and QoS info after rebuild Date: Thu, 29 Jan 2026 12:00:26 +0800 Message-ID: <20260129040026.832452-1-aaron.ma@canonical.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix IRDMA hardware initialization timeout (-110) after resume by separating VSI-dependent configuration from RDMA resource allocation, ensuring VSI is rebuilt before IRDMA accesses it. After resume from suspend, IRDMA hardware initialization fails: ice: IRDMA hardware initialization FAILED init_state=3D4 status=3D-110 Separate RDMA initialization into two phases: 1. ice_init_rdma() - Allocate resources only (no VSI/QoS access, no plug) 2. ice_rdma_finalize_setup() - Assign VSI/QoS info and plug device This allows: - ice_init_rdma() to stay in ice_resume() (mirrors ice_deinit_rdma() in ice_suspend()) - VSI assignment deferred until after ice_vsi_rebuild() completes - QoS info updated after ice_dcb_rebuild() completes - Device plugged only when control queues, VSI, and DCB are all ready Fixes: bc69ad74867db ("ice: avoid IRQ collision to fix init failure on ACPI= S3 resume") Reviewed-by: Aleksandr Loktionov Signed-off-by: Aaron Ma Reviewed-by: Simon Horman --- V1 -> V2: no changes. V2 -> V3: - mirrors init_rdma in resume as Tony Nguyen suggested to fix the memleak and move ice_plug_aux_dev/ice_unplug_aux_dev out of init/deinit rdma. - ensure the correct VSI/QoS info is loaded after rebuild. V3 -> V4: - Log warning when aux device plug fails. - Remove incorrect xa_erase() call when xa_alloc() fails. - Add pf->vsi NULL check. drivers/net/ethernet/intel/ice/ice.h | 1 + drivers/net/ethernet/intel/ice/ice_idc.c | 44 +++++++++++++++++------ drivers/net/ethernet/intel/ice/ice_main.c | 7 +++- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/in= tel/ice/ice.h index 00f75d87c73f9..15a7fcd888b26 100644 --- a/drivers/net/ethernet/intel/ice/ice.h +++ b/drivers/net/ethernet/intel/ice/ice.h @@ -990,6 +990,7 @@ int ice_schedule_reset(struct ice_pf *pf, enum ice_rese= t_req reset); void ice_print_link_msg(struct ice_vsi *vsi, bool isup); int ice_plug_aux_dev(struct ice_pf *pf); void ice_unplug_aux_dev(struct ice_pf *pf); +void ice_rdma_finalize_setup(struct ice_pf *pf); int ice_init_rdma(struct ice_pf *pf); void ice_deinit_rdma(struct ice_pf *pf); bool ice_is_wol_supported(struct ice_hw *hw); diff --git a/drivers/net/ethernet/intel/ice/ice_idc.c b/drivers/net/etherne= t/intel/ice/ice_idc.c index 420d45c2558b6..d976cb85e4aa4 100644 --- a/drivers/net/ethernet/intel/ice/ice_idc.c +++ b/drivers/net/ethernet/intel/ice/ice_idc.c @@ -360,6 +360,39 @@ void ice_unplug_aux_dev(struct ice_pf *pf) auxiliary_device_uninit(adev); } =20 +/** + * ice_rdma_finalize_setup - Complete RDMA setup after VSI is ready + * @pf: ptr to ice_pf + * + * Sets VSI-dependent information and plugs aux device. + * Must be called after ice_init_rdma(), ice_vsi_rebuild(), and + * ice_dcb_rebuild() complete. + */ +void ice_rdma_finalize_setup(struct ice_pf *pf) +{ + struct iidc_rdma_priv_dev_info *privd; + struct device *dev =3D ice_pf_to_dev(pf); + int ret; + + if (!ice_is_rdma_ena(pf) || !pf->cdev_info) + return; + + privd =3D pf->cdev_info->iidc_priv; + if (!privd || !pf->vsi || !pf->vsi[0] || !pf->vsi[0]->netdev) + return; + + /* Assign VSI info now that VSI is valid */ + privd->netdev =3D pf->vsi[0]->netdev; + privd->vport_id =3D pf->vsi[0]->vsi_num; + + /* Update QoS info after DCB has been rebuilt */ + ice_setup_dcb_qos_info(pf, &privd->qos_info); + + ret =3D ice_plug_aux_dev(pf); + if (ret) + dev_warn(dev, "Failed to plug RDMA aux device: %d\n", ret); +} + /** * ice_init_rdma - initializes PF for RDMA use * @pf: ptr to ice_pf @@ -398,22 +431,14 @@ int ice_init_rdma(struct ice_pf *pf) } =20 cdev->iidc_priv =3D privd; - privd->netdev =3D pf->vsi[0]->netdev; =20 privd->hw_addr =3D (u8 __iomem *)pf->hw.hw_addr; cdev->pdev =3D pf->pdev; - privd->vport_id =3D pf->vsi[0]->vsi_num; =20 pf->cdev_info->rdma_protocol |=3D IIDC_RDMA_PROTOCOL_ROCEV2; - ice_setup_dcb_qos_info(pf, &privd->qos_info); - ret =3D ice_plug_aux_dev(pf); - if (ret) - goto err_plug_aux_dev; + return 0; =20 -err_plug_aux_dev: - pf->cdev_info->adev =3D NULL; - xa_erase(&ice_aux_id, pf->aux_idx); err_alloc_xa: kfree(privd); err_privd_alloc: @@ -432,7 +457,6 @@ void ice_deinit_rdma(struct ice_pf *pf) if (!ice_is_rdma_ena(pf)) return; =20 - ice_unplug_aux_dev(pf); xa_erase(&ice_aux_id, pf->aux_idx); kfree(pf->cdev_info->iidc_priv); kfree(pf->cdev_info); diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethern= et/intel/ice/ice_main.c index a511bc28be055..cfd1c3396d851 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -5136,6 +5136,9 @@ int ice_load(struct ice_pf *pf) if (err) goto err_init_rdma; =20 + /* Finalize RDMA: VSI already created, assign info and plug device */ + ice_rdma_finalize_setup(pf); + ice_service_task_restart(pf); =20 clear_bit(ICE_DOWN, pf->state); @@ -5167,6 +5170,7 @@ void ice_unload(struct ice_pf *pf) =20 devl_assert_locked(priv_to_devlink(pf)); =20 + ice_unplug_aux_dev(pf); ice_deinit_rdma(pf); ice_deinit_features(pf); ice_tc_indir_block_unregister(vsi); @@ -5593,6 +5597,7 @@ static int ice_suspend(struct device *dev) */ disabled =3D ice_service_task_stop(pf); =20 + ice_unplug_aux_dev(pf); ice_deinit_rdma(pf); =20 /* Already suspended?, then there is nothing to do */ @@ -7802,7 +7807,7 @@ static void ice_rebuild(struct ice_pf *pf, enum ice_r= eset_req reset_type) =20 ice_health_clear(pf); =20 - ice_plug_aux_dev(pf); + ice_rdma_finalize_setup(pf); if (ice_is_feature_supported(pf, ICE_F_SRIOV_LAG)) ice_lag_rebuild(pf); =20 --=20 2.43.0