• Michael Ellerman's avatar
    PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities · 687d5fe3
    Michael Ellerman authored
    There are already several places in the kernel that want to search a PCI
    device for a given Hypertransport capability. Although this is possible
    using pci_find_capability() etc., it makes sense to encapsulate that
    logic in a helper - pci_find_ht_capability().
    
    To cater for searching exhaustively for a capability, we also provide
    pci_find_next_ht_capability().
    
    We also need to cater for the fact that the HT capability fields may be
    either 3 or 5 bits wide. pci_find_ht_capability() deals with this for you,
    but callers using the #defines directly must handle that themselves.
    Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    687d5fe3
pci.c 31.4 KB