Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp275776lqo; Wed, 15 May 2024 14:14:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUZ6e/a7wuTm9pBSMoLuHT5qKlnFGF6it2719HMyBoh2+uXANyrAOFMAB590LdyfZJXgBX6aNdoxaluXkwFPs5juedZk24DSEjirGYlTQ== X-Google-Smtp-Source: AGHT+IGkXCLV4TO2+lTrQr/KiLFszl2U4pQEX+xjxle6+T7JY4xO1TElGo3JzwjAQsx6e2TWLG17 X-Received: by 2002:a0c:bf0c:0:b0:6a3:294f:554a with SMTP id 6a1803df08f44-6a3294f555bmr171374646d6.32.1715807654732; Wed, 15 May 2024 14:14:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715807654; cv=pass; d=google.com; s=arc-20160816; b=P+XZqNY8I1mqhy+0BXcBQH4nMtgKgcjucuUP9mEuv+oLzjsEFNDRm/z2AOkuLytiZs fSV66ymqbK/nwNfPVwpziIkN6bQMd/LChjlgGrx//j+s57wdS0wGTyOvYEVsRiIX+egn eTZxuiFIijn5KE9ibdlALS7hzC8VA5f+IaRcuOUts/dEMhLRJr7qYx3ILcHaoHekw2q+ 0Q1XsT1ClTsW8Xkz/up6YBaNro9kzsdOpxk8qq8dJZmctap0IovUzjxrI4UxrDNWRRjZ A3WrxZldt82EkJtJ2Uh/i61VDG/J0av6eDApr4sPWmsfCd9mV72PpveWfVlZ0OtdjNfA 0eHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=tY5OZizwj6qNcoABbgErhLJM0GEfBFQiq1w5ok444yE=; fh=TBAjeoa4ZKHJIQCjZO8Zbj7iAeqrp8Opvd6vCA+B4qI=; b=VNddN3R1jXhkn5Q8f+emFlSrwKvuHh3c8FeHbHEXZ4wyhrUhHdJ6yTdWJK6KWnfpUz KVVfv8W6V+czj6WodYAfLWSW6X4oI/pf1Xzheyzg0I9Q6bI0xX+11IvWHKgkEdOQM3Oa TYYESp7qr5/ZsTDqkt80jtpxOS7doiPT22CaS48KsxjcjBElHatO+8JFqpgiqHBfsUp8 MNeTT+C3U03SN4ma/4vVPzxZ02FdrBmj6vIo1WtQ9wkBu4sYm3OGJMpVkxqQNwP3F0iX Z1PKFkD+igV1162qwgIHL6SGo8q08s4V6idWf/bXkMwN4al6Fh/IxNAR65ZQXNc3vsWr 3i9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S8BA31QH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180372-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29aaecsi138976176d6.196.2024.05.15.14.14.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 14:14:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S8BA31QH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180372-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F30AE1C21397 for ; Wed, 15 May 2024 21:14:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 362AD15B573; Wed, 15 May 2024 21:13:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="S8BA31QH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5808A155A57; Wed, 15 May 2024 21:13:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715807632; cv=none; b=LJcL4LGQyd2zhfmv6EMUJsAttA/v+3i7HB+hYCRVUtxExHGXZKofW6IrWaiMxoh0UwqBbdT7p6pDUGqBNcenDLnZH2/u6WZodPlxk0Wk4dKbY7XdceeXCP7vNc5X9VNgv5rOB3XOS8guIhfWSNSdyFpTGuDK4Taklj+EY+aUpRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715807632; c=relaxed/simple; bh=92Bg9W1jfudPogCMHlnwGwZOFXqjwzrhqg+gfddCvgc=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=fgCUxqSoF9NTkRBfO9sc3evTmZPajhqf/FDchCjO80CDX2Zx53wfr16DY8fVal+e/XgYzVIqxKRIwo6j08sekf5tnnkrs+as/PyXLxuD7eZyJgzZ9Gh891xZhBaUJHVu98CS8Ie42JJgVlMkw1VaIf5GeTHlc7U3VCHWsm9hn8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=S8BA31QH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 990FAC32781; Wed, 15 May 2024 21:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715807631; bh=92Bg9W1jfudPogCMHlnwGwZOFXqjwzrhqg+gfddCvgc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=S8BA31QH7LK+QVdeB6Mu1tL7+oDDrVuB4pRkhH06CYUtwMegzUFlB095Sb4Zwbpxw VCTDALqX31X7kPYjnVtfuNvBOfAMqp4H+tFZ51c8ck9ZLD/PZJon2wzFZUaVnmgwPf VymrE+aaYcnRQ18OYFpYbHeRsJvbpYkdkY0+nSbVdVAXVDHlPcV27HTs0JBMc1e9lE Kmnw5ArBPlB1/loKB0GII383RGiB5aqWOZEhmn0bP2SaYXt6Jobj78xGr5ImNgYquk tWoxD5bSzr/EzVgKknGN1ep3dhmHUtvGcD+NiTrtSTfBHHnmmCL3IrgrobAWP4w3yG ZWxO6cM77OF/g== Date: Wed, 15 May 2024 16:13:50 -0500 From: Bjorn Helgaas To: Rick Wertenbroek Cc: rick.wertenbroek@heig-vd.ch, dlemoal@kernel.org, stable@vger.kernel.org, Shawn Lin , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Heiko Stuebner , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: rockchip-ep: Remove wrong mask on subsys_vendor_id Message-ID: <20240515211350.GA2139074@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240515205547.GA2137633@bhelgaas> On Wed, May 15, 2024 at 03:55:49PM -0500, Bjorn Helgaas wrote: > On Wed, Apr 03, 2024 at 04:45:08PM +0200, Rick Wertenbroek wrote: > > Remove wrong mask on subsys_vendor_id. Both the Vendor ID and Subsystem > > Vendor ID are u16 variables and are written to a u32 register of the > > controller. The Subsystem Vendor ID was always 0 because the u16 value > > was masked incorrectly with GENMASK(31,16) resulting in all lower 16 > > bits being set to 0 prior to the shift. > > > > Remove both masks as they are unnecessary and set the register correctly > > i.e., the lower 16-bits are the Vendor ID and the upper 16-bits are the > > Subsystem Vendor ID. > > > > This is documented in the RK3399 TRM section 17.6.7.1.17 > > > > Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller") > > Signed-off-by: Rick Wertenbroek > > Cc: stable@vger.kernel.org > > Applied to pci/controller/rockchip by Krzysztof, but his outgoing mail > queue got stuck. I added Damien's Reviewed-by. Trying to squeeze > into v6.9. Sorry, I meant v6.10. v6.9 is already done. > > --- > > drivers/pci/controller/pcie-rockchip-ep.c | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c > > index c9046e97a1d2..37d4bcb8bd5b 100644 > > --- a/drivers/pci/controller/pcie-rockchip-ep.c > > +++ b/drivers/pci/controller/pcie-rockchip-ep.c > > @@ -98,10 +98,9 @@ static int rockchip_pcie_ep_write_header(struct pci_epc *epc, u8 fn, u8 vfn, > > > > /* All functions share the same vendor ID with function 0 */ > > if (fn == 0) { > > - u32 vid_regs = (hdr->vendorid & GENMASK(15, 0)) | > > - (hdr->subsys_vendor_id & GENMASK(31, 16)) << 16; > > - > > - rockchip_pcie_write(rockchip, vid_regs, > > + rockchip_pcie_write(rockchip, > > + hdr->vendorid | > > + hdr->subsys_vendor_id << 16, > > PCIE_CORE_CONFIG_VENDOR); > > } > > > > -- > > 2.25.1 > >