Message ID | 20231030200547.6517-2-asmaa@nvidia.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SK47J33knz1yQ4 for <incoming@patchwork.ozlabs.org>; Tue, 31 Oct 2023 07:07:24 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1qxYXY-0008Ef-67; Mon, 30 Oct 2023 20:07:12 +0000 Received: from mail-dm6nam12on2069.outbound.protection.outlook.com ([40.107.243.69] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <asmaa@nvidia.com>) id 1qxYWd-0008At-GL for kernel-team@lists.ubuntu.com; Mon, 30 Oct 2023 20:06:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ciPMJSd9t/HwMuv40o2y9C2UOQJV6eKUMQ4RK69M6ODh8rG2f6eW0OOlFL+2HUCPiHS2OMYPcmj6d4uAddJbTLGagRCdVxe5xebgZ0MBYnX0szwMb1bbJj2heSgNF32KRWLh2C271iTBUn9Je8hJyoZD9FySPJTPdd1oeQUKHvSKbfhHX6LWJC/ThteHX7F61HazWHX/6m/Yx9cf83qIcy0FUK6JOSZsrHkeb7zSM+rtd71weZx8UH4h4KxK97n11OjQYPZP7n+Bsf6fC8LlO/J1niZx5chYsgsrpzlAGNZI5KIHLKkzCck+PUR1hmIZ4QwfI/Q9FVhduOwe7uLqhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cAJZufjk9FxRVqyDoH8OJBbs4BJC1T0VDVcScIokaG4=; b=EY2S5g3HNIQ1iCEwsojHlQnnwQWZWwQl5tXW+B6a8HLIlqpHD4MF4Tg1E0kNcI6G9z7PfwDPJruvMDh4V4CSQvl350GAqiJtrQMSttd3siWtaq92j2W7bTed+4LyBQ4E36WtydkPmEZ5ZSSFdscPOh5elsPEcvQfFzv4hXvkxRc53/vAfB5cqa/vaTueqNyjU8hQ6SSZYsajERBwqSqCFf7NTym5C8SA9R49JbVuknxaezNGC1btCzW5dgWnDitD1TnYDlMDa7eRsvlJqsiXrotF4pEWzXGm0TrmDRZzNbIq5wzwq7L0C5ONvB3BhKWNzW0ODLvpB00iTRpIx3IIVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from BLAP220CA0019.NAMP220.PROD.OUTLOOK.COM (2603:10b6:208:32c::24) by CY8PR12MB8267.namprd12.prod.outlook.com (2603:10b6:930:7c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.28; Mon, 30 Oct 2023 20:06:12 +0000 Received: from BL6PEPF0001AB50.namprd04.prod.outlook.com (2603:10b6:208:32c:cafe::a8) by BLAP220CA0019.outlook.office365.com (2603:10b6:208:32c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29 via Frontend Transport; Mon, 30 Oct 2023 20:06:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by BL6PEPF0001AB50.mail.protection.outlook.com (10.167.242.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Mon, 30 Oct 2023 20:06:11 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 30 Oct 2023 13:05:51 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 30 Oct 2023 13:05:50 -0700 Received: from vdi.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Mon, 30 Oct 2023 13:05:50 -0700 From: Asmaa Mnebhi <asmaa@nvidia.com> To: <kernel-team@lists.ubuntu.com> Subject: [SRU][F:linux-bluefield][PATCH v1 1/3] UBUNTU: SAUCE: Fix race condition between loading pwr-mlxbf.c and gpio-mlxbf2.c drivers Date: Mon, 30 Oct 2023 16:05:45 -0400 Message-ID: <20231030200547.6517-2-asmaa@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20231030200547.6517-1-asmaa@nvidia.com> References: <20231030200547.6517-1-asmaa@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB50:EE_|CY8PR12MB8267:EE_ X-MS-Office365-Filtering-Correlation-Id: 2722ac7a-b4ee-4b0b-0e01-08dbd983a9e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ozLxsqXgr706O/oofgCN17TB2A86/GYbwc+tkJ62sWxzDBYiy0cDrkKMi0H9jo7/HF30V8LwQ8pfX6trafNpZ5Pv9oNfvFhPr3be1k/3R/US556PziVJyU6CiG1wFCGf8f6hcb/Myxup2Y9BrLTwJoVLrAcnlugurAFoGVXLqKNS4KfFg4Q2lxU2HxwWzsll0qYhk4ldcvIQk048322NdAkuq9KDGHKfqTLzO6HmDJOAr4jBvmxQnaJFfRQ6edSOMdzbbd68ks9UAsFKeKlWmFwEWcbiph+SZbVYgUrO6PeYlPCjKxkH4S/XztWmamoZTUJeVQV88QxCdioEnNh2Xea2gjXbV10uIgMaC6dfr8fUxcFnDUWy6jaY1zZhV2qNoth8MWbdQyfgas4hA92dVn737cJNivafLzVGcBhf+2NVARNNJFheLMT6c5YetmgDME8sCQeH4O1X9Jqo5xsvFlx5Qd4e3hhtVwK4okzGBVdXWwGnTmEi/f1PN7oMTBrJ4lXKdrbwEo+i14BLYXkAE9gEGh5kr1Tfmh8jMCfYsoLiVPL6/99Iut+jcTCYvT07uO3O2hsG1q4FDZQoxdtrzMCzbBF4mZGSgMr50gHHmLK8QIFWtPWzr9wVX0BwSGx5J0vE4ZUD6Uqij0lqzIoRWeiKG7IU9EIyhJlYCyh+2mSIP7ohYcAkcS/FJ11Z/lPX4q6yPf3AtzdxPSlN2f+knFxiJzTxlusRnfbrRURBjJkarlKEAmt6MluaLw3gW+8dp9vjLIAc9ZBB74ubRmy3on/eU1B9HI+JTfbrNlJzZv8= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(39860400002)(396003)(376002)(230922051799003)(82310400011)(451199024)(1800799009)(186009)(64100799003)(46966006)(36840700001)(40470700004)(41300700001)(8936002)(107886003)(8676002)(4326008)(6666004)(7696005)(36860700001)(6916009)(70206006)(316002)(70586007)(426003)(2906002)(1076003)(2616005)(83380400001)(336012)(26005)(5660300002)(966005)(478600001)(356005)(7636003)(86362001)(40480700001)(47076005)(82740400003)(40460700003)(36756003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2023 20:06:11.5158 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2722ac7a-b4ee-4b0b-0e01-08dbd983a9e0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB50.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8267 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Cc: asmaa@nvidia.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
UBUNTU: SAUCE: pwr-mlxbf: Several bug fixes for focal
|
expand
|
diff --git a/drivers/power/reset/pwr-mlxbf.c b/drivers/power/reset/pwr-mlxbf.c index 40cd71338010..ba40c964d8bb 100644 --- a/drivers/power/reset/pwr-mlxbf.c +++ b/drivers/power/reset/pwr-mlxbf.c @@ -63,11 +63,11 @@ pwr_mlxbf_probe(struct platform_device *pdev) priv->hid = hid; irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(dev), 0); - if (irq == -EPROBE_DEFER) { + + /* This happens if the GPIO driver is not yet completely probed, let's always defer */ + if (irq < 0) { + dev_dbg(dev, "Error getting %s irq from gpio driver so defer probe\n", priv->hid); return -EPROBE_DEFER; - } else if (irq < 0) { - dev_err(dev, "Error getting %s irq.\n", priv->hid); - return -ENXIO; } INIT_WORK(&priv->send_work, pwr_mlxbf_send_work);
BugLink: https://bugs.launchpad.net/bugs/2041996 The following message is intermittently printed during boot (in 1000 reboot test): pwr_mlxbf MLNXBF24:00: Error getting MLNXBF24 irq Although we already handle the case where the pwr-mlxbf driver fails to find the gpio irq due to the gpio driver not being loaded yet, there are some instances where the gpio driver is in the process of being loaded so acpi_dev_gpio_irq_get returns some other error besides -EPROBE_DEFER. It doesnt hurt to always return -EPROBE_DEFER until linux is booted. if there is no gpio driver or the gpio driver fails to load due to a bug, it has no consequences on the pwr-mlxbf.c driver. It will keep trying until linux is done booting. Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com> --- drivers/power/reset/pwr-mlxbf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)