[PATCH 5/5] pci: Fix showing registers
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
Re: [PATCH 5/5] pci: Fix showing registers
On 07.10.21 14:51, Pali Rohár wrote: 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 Reviewed-by: Stefan Roese Thanks, Stefan --- 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; Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de
Re: [PATCH 5/5] pci: Fix showing registers
On Thu, Oct 07, 2021 at 02:51:01PM +0200, Pali Rohár wrote: > 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 > Reviewed-by: Stefan Roese Applied to u-boot/master, thanks! -- Tom signature.asc Description: PGP signature