[Skiboot] [PATCH] pci: Fix PCI_DEVICE_ID()

Oliver oohall at gmail.com
Mon Jun 4 13:33:26 AEST 2018


On Mon, Jun 4, 2018 at 1:06 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> The vendor ID is 16 bits not 8. This error leaves the top of the vendor
> ID in the bottom bits of the device ID, which resulted in e.g. a failure
> to run the PCI quirk for the AST VGA device.
>
> Fixes: 2b841bf0ef1b ("core/pci: Use cached vendor/device IDs in quirks")
> Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
> ---
>  include/pci.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/pci.h b/include/pci.h
> index 6141159f2fcc..253dbd8b1e9a 100644
> --- a/include/pci.h
> +++ b/include/pci.h
> @@ -76,7 +76,7 @@ struct pci_device {
>         uint32_t                vdid;
>         uint32_t                sub_vdid;
>  #define PCI_VENDOR_ID(x)       ((x) & 0xFFFF)
> -#define PCI_DEVICE_ID(x)       ((x) >> 8)

Haha-what-the-fuck-by: Oliver O'Halloran <oohall at gmail.com>

> +#define PCI_DEVICE_ID(x)       ((x) >> 16)
>         uint32_t                class;
>         uint64_t                cap_list;
>         struct {
> --
> 2.17.0
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot


More information about the Skiboot mailing list