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 784D03CB2DB; Fri, 4 Sep 2026 06:17:53 +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=1788502674; cv=none; b=MxozavciqmY5fCaImnfsSGhkCQnlAitop5RQ7d3JWcheNLHVz23kcOxNn6ZwI97QFvci0ze63yYKu9kfZZ9dm6rv4lW/d1X/tndHM9FWn413qV7+Gniui56r+5RR4UPQPeoIsv3c9y6N4JiQWyiNlxKUx0sUomwzjFhwArF19Vg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788502674; c=relaxed/simple; bh=F9ZzMHZKGmmnspaI2kLhPGsIF93TmZ6z07vkDD3/WCo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NdRtN2B1XQ4HHVRtRZ0+6HWXp6vcCKoMzoQTEJI71c5T3bKW9SW9NsfHzxii8H2qNfqeAlN8F47bbZtP2nAkRLDFdL17rfuGQ+LubwbgXzYpo1yS27cy2hXZx3zI0lEAyDUBSW18SYYhbd7nejuc+tcppc9rtst0/0dZEQeMbUo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oqPnsten; 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="oqPnsten" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9F1A1F00A3D; Fri, 4 Sep 2026 06:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788502673; bh=fseq3J3ov4Ai9jUw+sO7bCWCpPfU64YRUiFWlcY8NFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oqPnstenZC9HwhV1h/2iudjbCqpdY7pP0DRT2NQUKPOacRUWZbUIUs+DCH/lntcJx 6uK2C3Y2E0eQni0c6kg8yOiodOJdDG55fYM216QATvl+b+hD84YpwTMU/6tDQgCmuB MmU6HGJDZ4YMCnpLPHNtgjU1F1qLCbPhxGnbUKLg= 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 6.12 290/403] PCI: meson: Fix GPIO state while requesting PERST# Date: Fri, 4 Sep 2026 07:01:33 +0200 Message-ID: <20260904045741.446489355@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260904045734.806166532@linuxfoundation.org> References: <20260904045734.806166532@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 6.12-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 @@ -421,7 +421,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);