From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EA25C433F5 for ; Thu, 7 Oct 2021 12:52:10 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 17DD460FD9 for ; Thu, 7 Oct 2021 12:52:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 17DD460FD9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 343538350F; Thu, 7 Oct 2021 14:51:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="O2fgZV9W"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 36845834C9; Thu, 7 Oct 2021 14:51:30 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4FEB8834EC for ; Thu, 7 Oct 2021 14:51:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id BCA96610FB; Thu, 7 Oct 2021 12:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633611074; bh=T0jVI+VoQtWncbg34l9u/zgRU1sLhQD0kGqZCyzXgRw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O2fgZV9WiLJ6lv51zT1dRhhUup93rNybgacC69WaDMiwEKWQ0Daz2jeFvezSDuf8p /+0kOjbHFV4UEorwOarzkoL431oNIzQQwtx3MKQf3cboy6O9Ue//Memf8TA8bM2Xbd KjlDfcX1jGES0tPXOZvoFrM1UBS2apca6f1+S3949jaKGZsRp0NkMwR7MwJXY/WFyo AYTy8mhpyZAQOZWDtYS4LRti3MvuypwHIkS9b9bBJiHDxhfDnSsOwgepqQS+XaPUDO 6p2Zbu+wfTKDIvYbrD9luMPslTifiG31VD7cmhKCwMhS9Iz2wkhhHIR1ENx72tjpHy W6HrcfGkFjQLA== Received: by pali.im (Postfix) id 037562828; Thu, 7 Oct 2021 14:51:13 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Simon Glass , Vladimir Oltean , Bin Meng , Stefan Roese Cc: u-boot@lists.denx.de Subject: [PATCH 5/5] pci: Fix showing registers Date: Thu, 7 Oct 2021 14:51:01 +0200 Message-Id: <20211007125101.21811-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211007125101.21811-1-pali@kernel.org> References: <20211007125101.21811-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Header type is 7-bit number so use all 7 bits when detecting header type and not only 2 bits. Signed-off-by: Pali Rohár --- cmd/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/pci.c b/cmd/pci.c index 4a82854db7fa..3b1863f139c9 100644 --- a/cmd/pci.c +++ b/cmd/pci.c @@ -239,7 +239,7 @@ static void pci_header_show(struct udevice *dev) pci_class_str(class)); pci_show_regs(dev, regs_rest); - switch (header_type & 0x03) { + switch (header_type & 0x7f) { case PCI_HEADER_TYPE_NORMAL: /* "normal" PCI device */ pci_show_regs(dev, regs_normal); break; -- 2.20.1