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

Stewart Smith stewart at linux.ibm.com
Tue Jun 19 15:29:22 AEST 2018


Oliver <oohall at gmail.com> writes:
> 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>

Weirdly, this tag isn't picked up by Patchwork... and I'm not sure if
that's a bug or a feature :)

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list