From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 748743DAAB7; Fri, 4 Sep 2026 05:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788499735; cv=none; b=AwF/ScBJfF4aFnAW9KHo62VEtFR89cWfakI+Nv3kIpk1OAg9nji7XSaqfxcaKEffJkHWJJpgd6LTutAGOste29jKw6mzCM76YrgydZuPKfRHIEnf+cSvIRw4+3YvPfojg7adXOaBRpLUrXhWiFFWrKfXFdlVSFG+u/+5s4a1ZcQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788499735; c=relaxed/simple; bh=1ApNEILGMZkB2/9zN5OBDFCDPcdt35b1v3/kNGBCVQQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sBffb/ReVhXhXSU2umNF7stFt7XPQ5YDRhYyHAASB30G+cYRdPgut0G3lq9tTg7QNN/qy4TLHs4AZSR6w3zPgjxAF0S4p8GQqTDpUQE17tTv18DlAfJzEMxW4LmxfVSCGuO9P99L2PJi1z08Y+td0pL2WKwFZUCKTJITxOv3z4E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zy37OIRV; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zy37OIRV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFC191F00A3E; Fri, 4 Sep 2026 05:28:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788499734; bh=gDD7Cbv6uKvOOaPlvHLQ8MjkxoYOVaN6WXAc6Rz7wCA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=zy37OIRV/LSlL0zvQtRMPrVqpDq88+YLjnPcnm2TbdkIQIkr1bCLTIDt1eMmUSQqM 38AC868KGcJHfxiuR0CPrRzomRuhlfGq7i8kGv601wC6DkZYeeH1aBb6g9N8EQLOkW la/C606zAYMj+EtSaFMbkHySzv1aiW/aZh4uiIU4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ronald Claveau , Manivannan Sadhasivam , Bjorn Helgaas , Neil Armstrong Subject: [PATCH 7.2 522/713] PCI: meson: Fix GPIO state while requesting PERST# Date: Fri, 4 Sep 2026 06:58:10 +0200 Message-ID: <20260904045815.520182704@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260904045803.810145556@linuxfoundation.org> References: <20260904045803.810145556@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ronald Claveau commit 40fb390cbcc11797c44c16dabdf763ec87643671 upstream. Meson devicetree defines the PERST# GPIO as 'reset' GPIO. Commit 4d3186a525b3 ("PCI: amlogic: Fix reset assertion via gpio descriptor") inverted the PERST# assertion logic to use proper GPIO descriptor semantics and moved the polarity configuration to the device tree as GPIO_ACTIVE_LOW. However, the initial PERST# GPIO state "GPIOD_OUT_LOW" was not updated accordingly. This results in the enumeration failure of the endpoint devices as PERST# would get deasserted while requesting the GPIO even before power and REFCLK becomes stable. Without this fix: ahci 0000:01:00.0: enabling device (0000 -> 0002) ahci 0000:01:00.0: SSS flag set, parallel bus scan disabled ahci 0000:01:00.0: Controller reset failed (0xffffffff) ahci 0000:01:00.0: probe with driver ahci failed with error -5 With this fix: ahci 0000:01:00.0: enabling device (0000 -> 0002) ahci 0000:01:00.0: AHCI vers 0001.0300, 32 command slots, 6 Gbps, SATA mode ahci 0000:01:00.0: 1/1 ports implemented (port mask 0x1) ahci 0000:01:00.0: flags: 64bit ncq led clo only pio ccc Change the GPIO request flag from GPIOD_OUT_LOW to GPIOD_OUT_HIGH to get the right behaviour. Fixes: 4d3186a525b3 ("PCI: amlogic: Fix reset assertion via gpio descriptor") Signed-off-by: Ronald Claveau [mani: CCed stable and commit log] Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Neil Armstrong Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260616-fix-meson-pcie-reset-gpio-v1-1-fca404b4c8be@aliel.fr Signed-off-by: Greg Kroah-Hartman --- drivers/pci/controller/dwc/pci-meson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/controller/dwc/pci-meson.c +++ b/drivers/pci/controller/dwc/pci-meson.c @@ -401,7 +401,7 @@ static int meson_pcie_probe(struct platf return PTR_ERR(mp->phy); } - mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); + mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(mp->reset_gpio)) { dev_err(dev, "get reset gpio failed\n"); return PTR_ERR(mp->reset_gpio);