From patchwork Tue Sep 24 10:04:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Szycik X-Patchwork-Id: 1988839 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=4Ah9j2SF; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XCb4v3w1pz1xsn for ; Tue, 24 Sep 2024 20:02:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A6A9940BCA; Tue, 24 Sep 2024 10:02:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id GID_PXVDllIn; Tue, 24 Sep 2024 10:02:20 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EF0F640BBF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1727172140; bh=ky32Kn7HuJIisHMrFl4GiKp6MFGwcgyPZs+1QFPic8E=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=4Ah9j2SF6iW9Oig68Z/8n2ZTBU6TwSz6+MuzVO0FXqy0NPxKFEtprPxsMb471L1Ts jAxsBElk3praeh9ZG55Qruq5qcBvpA82heciVuWajf96fSl4tsGQRvPq39cyEORa91 X6+zKsMwilzyivFsnyA8TzQ4oi99xA4dsBXf9auLiS3aYNDQT9sRl1ZBSHEMzLNN0x JW9ETX0r9InDcLrBFS/sCHfWHXA8p9sYnX9svwjODaTePp0rletkbys1ga4rPf3jJj 6O50SoMb5Qwnfl2hmQdVZ4JpZ7L1LjzPSzvsYBsKKeWwpKvnY52zmW5H0lbtaeVDoX Jy8snny8ozRHg== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id EF0F640BBF; Tue, 24 Sep 2024 10:02:19 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 644CB1BF954 for ; Tue, 24 Sep 2024 10:02:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 537B581425 for ; Tue, 24 Sep 2024 10:02:17 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 70fljKxck5Un for ; Tue, 24 Sep 2024 10:02:15 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=198.175.65.11; helo=mgamail.intel.com; envelope-from=marcin.szycik@linux.intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 25142813B8 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 25142813B8 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by smtp1.osuosl.org (Postfix) with ESMTPS id 25142813B8 for ; Tue, 24 Sep 2024 10:02:14 +0000 (UTC) X-CSE-ConnectionGUID: PPk4Ww9sQ+C6qYtCnm2R7g== X-CSE-MsgGUID: Zld4tND2Tn6rhcIyyqW8KQ== X-IronPort-AV: E=McAfee;i="6700,10204,11204"; a="36725586" X-IronPort-AV: E=Sophos;i="6.10,254,1719903600"; d="scan'208";a="36725586" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 03:02:14 -0700 X-CSE-ConnectionGUID: +NqXWJA9R4+NBzFH5pzaFQ== X-CSE-MsgGUID: ho9Qm7d8TY+0ouj7wV4+NQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,254,1719903600"; d="scan'208";a="76285967" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by orviesa004.jf.intel.com with ESMTP; 24 Sep 2024 03:02:12 -0700 Received: from mystra-4.igk.intel.com (mystra-4.igk.intel.com [10.123.220.40]) by irvmail002.ir.intel.com (Postfix) with ESMTP id E507D135E8; Tue, 24 Sep 2024 11:02:10 +0100 (IST) From: Marcin Szycik To: intel-wired-lan@lists.osuosl.org Date: Tue, 24 Sep 2024 12:04:23 +0200 Message-ID: <20240924100422.8010-3-marcin.szycik@linux.intel.com> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727172135; x=1758708135; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fWzi33r9j5RvdX7aTM0+xoJHBSYq79DFwoV4k5670xI=; b=fsRy0qO2P3C2aM9MZ20E0jRn5hi8IG0U+BV5TNG2HsAOsq2pYPh/gJQo h1vJKimoTxCcrVBs0CJ/tC4DmDxM5MoSAlFIkaxWX5nZZpvsjEwNvaC8f /6nk5TdgKDF7oEEafm/XJKvM8841Zaekp0YU0lQowYl17NUCIyCwS4/Lj NarOpTKm8ixlR5ZN9zuP+Tqj95DZ8KyEi9f816lwxQdSekNbGZxJjUHMc xo9OHgt04QwOnOJtEHsTo/+YOFaLlaaxHkrAyU915bJkX3OTlA6vSsc4t ufdPfUJu4M4jU7fqx7bb/K6u0L1pXmryKBKl7zbbgUk/vQZW5pkLLlqyr w==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=fsRy0qO2 Subject: [Intel-wired-lan] [PATCH iwl-net v3 1/2] ice: Fix entering Safe Mode X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maciej.fijalkowski@intel.com, netdev@vger.kernel.org, mateusz.polchlopek@intel.com, Marcin Szycik , Przemek Kitszel , bcreeley@amd.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" If DDP package is missing or corrupted, the driver should enter Safe Mode. Instead, an error is returned and probe fails. To fix this, don't exit init if ice_init_ddp_config() returns an error. Repro: * Remove or rename DDP package (/lib/firmware/intel/ice/ddp/ice.pkg) * Load ice Fixes: cc5776fe1832 ("ice: Enable switching default Tx scheduler topology") Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Reviewed-by: Brett Creeley Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) --- v3: Change ice_init_ddp_config() type to int, check return (Brett) v2: Change ice_init_ddp_config() type to void (Maciej) --- drivers/net/ethernet/intel/ice/ice_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 0f5c9d347806..7a84d3c4c305 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -4749,14 +4749,12 @@ int ice_init_dev(struct ice_pf *pf) ice_init_feature_support(pf); err = ice_init_ddp_config(hw, pf); - if (err) - return err; /* if ice_init_ddp_config fails, ICE_FLAG_ADV_FEATURES bit won't be * set in pf->state, which will cause ice_is_safe_mode to return * true */ - if (ice_is_safe_mode(pf)) { + if (err || ice_is_safe_mode(pf)) { /* we already got function/device capabilities but these don't * reflect what the driver needs to do in safe mode. Instead of * adding conditional logic everywhere to ignore these From patchwork Tue Sep 24 10:04:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Szycik X-Patchwork-Id: 1988838 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=sIAwJ7lx; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XCb4r5dq1z1xsn for ; Tue, 24 Sep 2024 20:02:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A6AFC40BC3; Tue, 24 Sep 2024 10:02:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id x9YyR_JRxBqP; Tue, 24 Sep 2024 10:02:18 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D3A8140AEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1727172137; bh=wG5c13nnCWbHWZyJHWnMG/nWVzMpLPHAUjZZ/mfBnA0=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=sIAwJ7lxf7+DsH6hb7dGAy0eFs2NomAlaaN5zFcQ0ltFF/D6KehIi3KAOvXFFB3nb wzs+TBgVFUH50iryOTZQOvI8VwmLSm3PeubpUPUhZ3yxFl3+FjRSDN7suSnCS2Xwk3 /BgMzI7lM0By53emCC8XlZhfIV2/5BBvvUzpqBY5Jb5XKKOkQMzS082tCYJD5hOCmx RSk1A3WoZr3P46grzo1hERv4qMpgiu5dIPVQuDF2iI9sCYPuZMT6acff46+F8C+KKr CGkzrfRFKuHWvVIzBBOuraTZH44PQufp2IW2ualcTbfll2lr3s3GxUvJHDVNc231TK NCD6MfgYwUEZw== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id D3A8140AEE; Tue, 24 Sep 2024 10:02:17 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AD9371BF954 for ; Tue, 24 Sep 2024 10:02:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9BE6D8149A for ; Tue, 24 Sep 2024 10:02:16 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id R1GSWWxK_mhy for ; Tue, 24 Sep 2024 10:02:16 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=198.175.65.11; helo=mgamail.intel.com; envelope-from=marcin.szycik@linux.intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org BD77681425 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org BD77681425 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by smtp1.osuosl.org (Postfix) with ESMTPS id BD77681425 for ; Tue, 24 Sep 2024 10:02:15 +0000 (UTC) X-CSE-ConnectionGUID: 3+L+j9u/RAyDUgwcLZctOg== X-CSE-MsgGUID: 49ClSbd5T3GwQnp/SxO+sQ== X-IronPort-AV: E=McAfee;i="6700,10204,11204"; a="36725593" X-IronPort-AV: E=Sophos;i="6.10,254,1719903600"; d="scan'208";a="36725593" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 03:02:14 -0700 X-CSE-ConnectionGUID: k4NHMK89TyeiUggX//f82g== X-CSE-MsgGUID: TCMOIc3WTj29KK6OBIcttg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,254,1719903600"; d="scan'208";a="76285974" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by orviesa004.jf.intel.com with ESMTP; 24 Sep 2024 03:02:13 -0700 Received: from mystra-4.igk.intel.com (mystra-4.igk.intel.com [10.123.220.40]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 8269027BA0; Tue, 24 Sep 2024 11:02:11 +0100 (IST) From: Marcin Szycik To: intel-wired-lan@lists.osuosl.org Date: Tue, 24 Sep 2024 12:04:24 +0200 Message-ID: <20240924100422.8010-4-marcin.szycik@linux.intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240924100422.8010-3-marcin.szycik@linux.intel.com> References: <20240924100422.8010-3-marcin.szycik@linux.intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727172136; x=1758708136; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9pTCtvoU8bZ1CmLxI3yN4pIXZkad/QyzLZAJMugUkNo=; b=Z+uK1mmeo3Ve8z/a0x0GB3H1/0goxKDhJDJf6kLO0kGp+blcocYAYveI lmHZPYDZgynrC7UxlgLwZ8k+uetXhmyxXTLWOW2iGs+uh2yi89UMDsKAw 54cLFLeFTyOJ8GAKX9DgLGLLFmRn4X0GlhWWICGJ3K50mOUPpCaH5zdXu eHPSwZBc7PFHzvCngaQzftj4gYsNpTE7h75576Jca2r76M1gTUHekQov3 oBWvvotA9h8EqEk0YqYl4NNrvg/DT/thuEVKTsDx5BTyPGXuFxSI5eP5m VQkuiFG9Dn7O3sqbgYjdxhQTxV/OBEMUTs5ys0NAImahU3K6ARFxf7TV7 g==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Z+uK1mme Subject: [Intel-wired-lan] [PATCH iwl-net v3 2/2] ice: Fix netif_is_ice() in Safe Mode X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maciej.fijalkowski@intel.com, netdev@vger.kernel.org, mateusz.polchlopek@intel.com, Marcin Szycik , Przemek Kitszel , bcreeley@amd.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" netif_is_ice() works by checking the pointer to netdev ops. However, it only checks for the default ice_netdev_ops, not ice_netdev_safe_mode_ops, so in Safe Mode it always returns false, which is unintuitive. While it doesn't look like netif_is_ice() is currently being called anywhere in Safe Mode, this could change and potentially lead to unexpected behaviour. Fixes: df006dd4b1dc ("ice: Add initial support framework for LAG") Reviewed-by: Przemek Kitszel Signed-off-by: Marcin Szycik Reviewed-by: Brett Creeley Tested-by: Sujai Buvaneswaran --- drivers/net/ethernet/intel/ice/ice_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 7a84d3c4c305..b1e7727b8677 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -87,7 +87,8 @@ ice_indr_setup_tc_cb(struct net_device *netdev, struct Qdisc *sch, bool netif_is_ice(const struct net_device *dev) { - return dev && (dev->netdev_ops == &ice_netdev_ops); + return dev && (dev->netdev_ops == &ice_netdev_ops || + dev->netdev_ops == &ice_netdev_safe_mode_ops); } /**