* [PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap
@ 2007-01-05 22:52 Brice Goglin
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
0 siblings, 1 reply; 4+ messages in thread
From: Brice Goglin @ 2007-01-05 22:52 UTC (permalink / raw)
To: Greg KH, Michael Ellerman; +Cc: LKML
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);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* patch pci-increment-pos-before-looking-for-the-next-cap-in-__pci_find_next_ht_cap.patch added to gregkh-2.6 tree
2007-01-05 22:52 [PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap Brice Goglin
@ 2007-01-07 6:54 ` gregkh
0 siblings, 0 replies; 4+ messages in thread
From: gregkh @ 2007-01-07 6:54 UTC (permalink / raw)
To: brice, gallatin, gregkh, linux-kernel, michael
This is a note to let you know that I've just added the patch titled
Subject: PCI: increment pos before looking for the next cap in __pci_find_next_ht_cap
to my gregkh-2.6 tree. Its filename is
pci-increment-pos-before-looking-for-the-next-cap-in-__pci_find_next_ht_cap.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From brice@myri.com Fri Jan 5 15:01:21 2007
From: Brice Goglin <brice@myri.com>
Date: Fri, 05 Jan 2007 23:52:14 +0100
Subject: PCI: increment pos before looking for the next cap in __pci_find_next_ht_cap
To: Greg KH <gregkh@suse.de>, Michael Ellerman <michael@ellerman.id.au>
Cc: LKML <linux-kernel@vger.kernel.org>
Message-ID: <459ED69E.4060801@myri.com>
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 :)
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Andrew J. Gallatin <gallatin@myri.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- gregkh-2.6.orig/drivers/pci/pci.c
+++ gregkh-2.6/drivers/pci/pci.c
@@ -254,7 +254,8 @@ static int __pci_find_next_ht_cap(struct
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);
}
Patches currently in gregkh-2.6 which might be from brice@myri.com are
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <fa.HKQ/+MClSV6hJeIdmFjKhgngCZQ@ifi.uio.no>]
* Re: [PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap
[not found] <fa.HKQ/+MClSV6hJeIdmFjKhgngCZQ@ifi.uio.no>
@ 2007-01-05 23:58 ` Robert Hancock
2007-01-07 23:37 ` Michael Ellerman
0 siblings, 1 reply; 4+ messages in thread
From: Robert Hancock @ 2007-01-05 23:58 UTC (permalink / raw)
To: Brice Goglin, linux-kernel; +Cc: Greg KH, Michael Ellerman
Brice Goglin wrote:
> 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.
Yes, I saw this on my A8N-SLI Deluxe board as well. This is a regression
since MSI is being disabled on the PCI Express slots when it wasn't before..
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap
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
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2007-01-07 23:37 UTC (permalink / raw)
To: Robert Hancock; +Cc: Brice Goglin, linux-kernel, Greg KH
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
On Fri, 2007-01-05 at 17:58 -0600, Robert Hancock wrote:
> Brice Goglin wrote:
> > 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.
>
> Yes, I saw this on my A8N-SLI Deluxe board as well. This is a regression
> since MSI is being disabled on the PCI Express slots when it wasn't before..
>
Guilty as charged :/
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-07 23:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-05 22:52 [PATCH] increment pos before looking for the next cap in __pci_find_next_ht_cap Brice Goglin
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox