From: Brice Goglin <brice@myri.com>
To: Greg KH <gregkh@suse.de>, Michael Ellerman <michael@ellerman.id.au>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap
Date: Fri, 05 Jan 2007 23:52:14 +0100 [thread overview]
Message-ID: <459ED69E.4060801@myri.com> (raw)
Hi,
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 prooves 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 :)
The patch should go in 2.6.20 since this quirk was working fine in 2.6.19.
---
[PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap
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 <brice@myri.com>
Signed-off-by: Andrew J. Gallatin <gallatin@myri.com>
---
drivers/pci/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-rc/drivers/pci/pci.c
===================================================================
--- linux-rc.orig/drivers/pci/pci.c 2007-01-05 23:34:59.000000000 +0100
+++ linux-rc/drivers/pci/pci.c 2007-01-05 23:35:24.000000000 +0100
@@ -254,7 +254,8 @@
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);
}
next reply other threads:[~2007-01-05 23:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-05 22:52 Brice Goglin [this message]
2007-01-07 6:54 ` patch pci-increment-pos-before-looking-for-the-next-cap-in-__pci_find_next_ht_cap.patch added to gregkh-2.6 tree gregkh
[not found] <fa.HKQ/+MClSV6hJeIdmFjKhgngCZQ@ifi.uio.no>
2007-01-05 23:58 ` [PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap Robert Hancock
2007-01-07 23:37 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=459ED69E.4060801@myri.com \
--to=brice@myri.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox