Commit:     47a4d5be7c50b2e9b905abbe2b97dc87051c5a44
Parent:     e5e5673f828623e58a401862b33173591faaeaff
Author:     Brice Goglin <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 10 23:15:29 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jan 11 18:18:20 2007 -0800

    [PATCH] increment pos before looking for the next cap in 
    While testing 2.6.20-rc3 on a machine with some CK804 chipsets, we noticed
    that quirk_nvidia_ck804_msi_ht_cap() was not detecting HT MSI capabilities
    anymore.  It is actually caused by the MSI mapping on the root chipset
    being the 2nd HT capability in the chain.  pci_find_ht_capability() does
    not seem to find anything but the first HT cap correctly, because it
    forgets to increment the position before looking for the next cap.  The
    following patch seems to fix it.
    At least, this proves that having a ttl is good idea since the machine
    would have been stucked in an infinite loop if we didn't have a ttl :)
    We have to pass pos + PCI_CAP_LIST_NEXT to __pci_find_next_cap_ttl to
    get the next HT cap instead of the same one again.
    Signed-off-by: Brice Goglin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew J. Gallatin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/pci/pci.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6bfb942..206c834 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -254,7 +254,8 @@ static int __pci_find_next_ht_cap(struct pci_dev *dev, int 
pos, int ht_cap)
                if ((cap & mask) == ht_cap)
                        return pos;
-               pos = __pci_find_next_cap_ttl(dev->bus, dev->devfn, pos,
+               pos = __pci_find_next_cap_ttl(dev->bus, dev->devfn,
+                                             pos + PCI_CAP_LIST_NEXT,
                                              PCI_CAP_ID_HT, &ttl);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to