From patchwork Thu Jun 13 15:45:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13697067 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 C6207146588 for ; Thu, 13 Jun 2024 15:45:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293525; cv=none; b=BvUZA916kQC6OIUPg15K8+LccgCy+1caWsJMn5VieRW+Ck2+DEtbffaCkCCCjVRiEZh84l/8U4xSb3y/3PBERmJ0j3c12gsvGK9vej7CYL4N17ircvznJhVX/BJKTHCisZYhRQcgW9eWaBfyuUog0wIb69xToogZLrK8mXVQ3eA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293525; c=relaxed/simple; bh=cdci/UIHnxyuQxXe4uC5r8TNaiA1AXhAkgJObHOgHx0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nGo85VmntNkrS2GLTyh4SAEY7arOdv/YhEBjzP+fQgJgI1STXN5t6RrWShUk+cRnXQFaFngZmzAh2Eiboq2pY9B9mInxBqqR34OxCR3VUAcMFDgwG4QeBvGjx6JPTi48+C5Xc91DcVAcVlQXoxL22d3bmU3y26bC1zqe1Ww0ZbI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=H69YgYY/; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="H69YgYY/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718293523; x=1749829523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cdci/UIHnxyuQxXe4uC5r8TNaiA1AXhAkgJObHOgHx0=; b=H69YgYY/P9Hj3vFEqWuoZVlGw3OxpsLR4uPNNGkzVrhw0SboL9Ilh1S5 vNUlzAq+42VPF0n7cDWiei4ICVWk59Bi63pxeM54+mEUBrVSkyJ1F21HK tLEzfLa23Jr0glom1HITzqTbpoltReaBrtu8qf83k6lcJmmAAta88Metm 2iKREGYhNlf2mcYdYhUBHD36KpNg20t19spBxsf3nWwlDeTD9nyehgJNZ pv/HHCroI4ZwvbXJWex9c0YH0Wnzysz3FqBz3xgqd6Xg1I7BELLNFhiy3 V3b04q2IeClh4qejp8IEc9IwdZf7+nOhLzk9HRwcO+YszGCTkPrk/9rGX A==; X-CSE-ConnectionGUID: vD+gjsfMTzC+664vRtZi7g== X-CSE-MsgGUID: cnyZ6TBOSCGlRqiDPW4DtA== X-IronPort-AV: E=McAfee;i="6700,10204,11102"; a="37645759" X-IronPort-AV: E=Sophos;i="6.08,235,1712646000"; d="scan'208";a="37645759" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2024 08:45:21 -0700 X-CSE-ConnectionGUID: 2l5vtxseQte4FiriGXwvHw== X-CSE-MsgGUID: S45v37sNQW2hrCug702H9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,235,1712646000"; d="scan'208";a="40124489" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 13 Jun 2024 08:45:21 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: En-Wei Wu , anthony.l.nguyen@intel.com, david.m.ertman@intel.com, shiraz.saleem@intel.com, Cyrus Lien , Wojciech Drewek , Pucha Himasekhar Reddy Subject: [PATCH net v2 1/3] ice: avoid IRQ collision to fix init failure on ACPI S3 resume Date: Thu, 13 Jun 2024 08:45:08 -0700 Message-ID: <20240613154514.1948785-2-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240613154514.1948785-1-anthony.l.nguyen@intel.com> References: <20240613154514.1948785-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: En-Wei Wu 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: f9f5301e7e2d ("ice: Register auxiliary device to provide RDMA") Tested-by: Cyrus Lien Signed-off-by: En-Wei Wu Reviewed-by: Wojciech Drewek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 1b61ca3a6eb6..45d850514f4c 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -5564,7 +5564,7 @@ static int ice_suspend(struct device *dev) */ disabled = ice_service_task_stop(pf); - ice_unplug_aux_dev(pf); + ice_deinit_rdma(pf); /* Already suspended?, then there is nothing to do */ if (test_and_set_bit(ICE_SUSPENDED, pf->state)) { @@ -5644,6 +5644,11 @@ static int ice_resume(struct device *dev) if (ret) dev_err(dev, "Cannot restore interrupt scheme: %d\n", ret); + ret = ice_init_rdma(pf); + if (ret) + dev_err(dev, "Reinitialize RDMA during resume failed: %d\n", + ret); + clear_bit(ICE_DOWN, pf->state); /* Now perform PF reset and rebuild */ reset_type = ICE_RESET_PFR; From patchwork Thu Jun 13 15:45:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13697068 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 1CE7614AD0A for ; Thu, 13 Jun 2024 15:45:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293526; cv=none; b=n1pNEG9ETXUROzDpq9cpfVqNpAMJKemHUp5Yd26GOrg1E98BBsUwwxK5YZPMBalWGscwgRHpaXCmMnDc2xSjIPmm3Ie412ub5Ar1TWpgxxFRfE/rmHPShfSLr1rPV+LG4iI9UP/df6AVo8NjW7sfbVNZ+MU0gpcxamPEc8Q+kOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293526; c=relaxed/simple; bh=pJgk+4GFxhSP9n+1P6GfF3XIwj+YEmPeHsu9OPdKcTo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hpBZ8Qqw+SGeC23nHLog9uCQK2dXUshYL+NQeS0TOl4oqoW24b3ynWUA8yYmywzQiVb3ZGU6IEX/4B3FVTEG8DhkGUrtZVORWOgkFCdpMV+daZWVIwz9LWWd/oTCmYIBVKb3qJlS8BAe620s31EanhHhmJjKm3m/PAv9HTGzUN0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Ci4EQ1a4; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Ci4EQ1a4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718293523; x=1749829523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pJgk+4GFxhSP9n+1P6GfF3XIwj+YEmPeHsu9OPdKcTo=; b=Ci4EQ1a4iM0Iqj07KL1T4GHGaEsHT1m66h34uGDK3Yvp8gPRgk1r9GV5 k/RPT5lPRrsUmFFF1gzK2fMj1fMT02j6UG9a6o91PazluCn065Whwwh15 e4yIQBqwKp7GOVaGt3DtfI5SM+LR5P9Cs3BXrCPZflV3rSHr0MZhruxvD 1oPjYllNsr01RgBQqMKi/var223ubzYmz5ty7qNou1crlLaj2QMOmRXzi 6vPb9q2YCujBySrNJ6Mb5Hw3qUufDbx8dbE1tqtmWAt1uc0Bxh7X59uRB GWW16GBhQZh/k0e6h7BqAuzdRY3jZoZ1qPrhKXlOBiT8NLjsDQj2SCoCI A==; X-CSE-ConnectionGUID: J517xLuYSPqRNY+yhkTgAA== X-CSE-MsgGUID: TlliEPd2SYaqiBX4ARZ67g== X-IronPort-AV: E=McAfee;i="6700,10204,11102"; a="37645766" X-IronPort-AV: E=Sophos;i="6.08,235,1712646000"; d="scan'208";a="37645766" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2024 08:45:22 -0700 X-CSE-ConnectionGUID: DLOEzH2GTyC5iXud5enF5A== X-CSE-MsgGUID: sHcJt3W5RNKWCoCd6LRC2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,235,1712646000"; d="scan'208";a="40124495" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 13 Jun 2024 08:45:21 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: Paul Greenwalt , anthony.l.nguyen@intel.com, horms@kernel.org, Michal Swiatkowski , Jesse Brandeburg , Pucha Himasekhar Reddy Subject: [PATCH net v2 2/3] ice: fix 200G link speed message log Date: Thu, 13 Jun 2024 08:45:09 -0700 Message-ID: <20240613154514.1948785-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240613154514.1948785-1-anthony.l.nguyen@intel.com> References: <20240613154514.1948785-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Paul Greenwalt Commit 24407a01e57c ("ice: Add 200G speed/phy type use") added support for 200G PHY speeds, but did not include 200G link speed message support. As a result the driver incorrectly reports Unknown for 200G link speed. Fix this by adding 200G support to ice_print_link_msg(). Fixes: 24407a01e57c ("ice: Add 200G speed/phy type use") Reviewed-by: Michal Swiatkowski Signed-off-by: Paul Greenwalt Reviewed-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 45d850514f4c..1766230abfff 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -805,6 +805,9 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup) } switch (vsi->port_info->phy.link_info.link_speed) { + case ICE_AQ_LINK_SPEED_200GB: + speed = "200 G"; + break; case ICE_AQ_LINK_SPEED_100GB: speed = "100 G"; break; From patchwork Thu Jun 13 15:45:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13697069 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 42E1614B94F for ; Thu, 13 Jun 2024 15:45:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293526; cv=none; b=dXMySJvXjUA+F2ecvnQRAuGmhl72dXmV27D8QiqlthFf78eO+w6wdZT2vkiTaR+0QHQ60kzwiYrhKIGvBG/Iix8zhHQ5sdVT+pT70BIY/L8+ieRSHBq9AWNLCZO2OyzA0aeST2bBKGbsy8CnssSdzV7JjXeYwtsquBsiIsMv2gE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718293526; c=relaxed/simple; bh=Kzn4+5NYzf3vBoHKEY1YRsaK1lMRlsJAo/vlsKmp0SY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OI68ocvZOuIdLzf19cFM2sAWTqpfcrLehzehzgDS130W90BkTWww/FuHMPqcwgVgzWDu9HAZmpXlA0GFRnB6SeBDVsACDAoksQVjWfr0guVkcxL9s1wy4eocfz860J/jy4s6+bt6YW4jz8M/2uGA4oZTHkiMbLnrR7V/WkrAjPQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NuKZuAak; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NuKZuAak" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718293525; x=1749829525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Kzn4+5NYzf3vBoHKEY1YRsaK1lMRlsJAo/vlsKmp0SY=; b=NuKZuAakpjhder08Q08CrKy8Ec056da1l1LvrZ+EOtG17f2hcVq0lhRi AueAwsHg3OqCTxn3S0iH00lFYurQJaJkj3u5j8lHjvSHXmdMSRiLBOt3A DbMJg/KxcDwtKAOyfZ3Esa1+L8PvtOGEbBuyeilbN1Uk6vi0oz/yjnyXS U+VBECRShMkak31PYcHU2Crg2Pik8NAZgT1wSuKVqx9NadXEXVfzQ2ugw 9AQWXjgESn6WEUH6Nhdbwqu+67PzmiOwnvBqC2+7HJZmjhnCylHpqgTTW 0EyMFEaFPPN8nNroYEIFB9tzM8JrEo6rmt2P+QfkERIOOFn9rT1KdUmR6 Q==; X-CSE-ConnectionGUID: eGpDUcPXST27ZQ1YJ9h3Xw== X-CSE-MsgGUID: 6dGuWmYRS6CdVUJJGJWreA== X-IronPort-AV: E=McAfee;i="6700,10204,11102"; a="37645771" X-IronPort-AV: E=Sophos;i="6.08,235,1712646000"; d="scan'208";a="37645771" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2024 08:45:22 -0700 X-CSE-ConnectionGUID: d/ju/p1kRNe2GNP0XIsPiw== X-CSE-MsgGUID: alKR7UHyT2i7WSzyMb9VIA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,235,1712646000"; d="scan'208";a="40124498" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 13 Jun 2024 08:45:22 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: Wojciech Drewek , anthony.l.nguyen@intel.com, Michal Swiatkowski , Brett Creeley , Przemek Kitszel , Pucha Himasekhar Reddy Subject: [PATCH net v2 3/3] ice: implement AQ download pkg retry Date: Thu, 13 Jun 2024 08:45:10 -0700 Message-ID: <20240613154514.1948785-4-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240613154514.1948785-1-anthony.l.nguyen@intel.com> References: <20240613154514.1948785-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Wojciech Drewek ice_aqc_opc_download_pkg (0x0C40) AQ sporadically returns error due to FW issue. Fix this by retrying five times before moving to Safe Mode. Sleep for 20 ms before retrying. This was tested with the 4.40 firmware. Fixes: c76488109616 ("ice: Implement Dynamic Device Personalization (DDP) download") Reviewed-by: Michal Swiatkowski Signed-off-by: Wojciech Drewek Reviewed-by: Brett Creeley Reviewed-by: Przemek Kitszel Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_ddp.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ddp.c b/drivers/net/ethernet/intel/ice/ice_ddp.c index ce5034ed2b24..f182179529b7 100644 --- a/drivers/net/ethernet/intel/ice/ice_ddp.c +++ b/drivers/net/ethernet/intel/ice/ice_ddp.c @@ -1339,6 +1339,7 @@ ice_dwnld_cfg_bufs_no_lock(struct ice_hw *hw, struct ice_buf *bufs, u32 start, for (i = 0; i < count; i++) { bool last = false; + int try_cnt = 0; int status; bh = (struct ice_buf_hdr *)(bufs + start + i); @@ -1346,8 +1347,26 @@ ice_dwnld_cfg_bufs_no_lock(struct ice_hw *hw, struct ice_buf *bufs, u32 start, if (indicate_last) last = ice_is_last_download_buffer(bh, i, count); - status = ice_aq_download_pkg(hw, bh, ICE_PKG_BUF_SIZE, last, - &offset, &info, NULL); + while (1) { + status = ice_aq_download_pkg(hw, bh, ICE_PKG_BUF_SIZE, + last, &offset, &info, + NULL); + if (hw->adminq.sq_last_status != ICE_AQ_RC_ENOSEC && + hw->adminq.sq_last_status != ICE_AQ_RC_EBADSIG) + break; + + try_cnt++; + + if (try_cnt == 5) + break; + + msleep(20); + } + + if (try_cnt) + dev_dbg(ice_hw_to_dev(hw), + "ice_aq_download_pkg number of retries: %d\n", + try_cnt); /* Save AQ status from download package */ if (status) {