mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCIE: use PCI_EXT_CAP_NEXT to traverse PCIE extended capability list.
@ 2008-09-28  5:07 qingtao.cao
  2008-09-28  7:20 ` Zhang, Yanmin
  0 siblings, 1 reply; 2+ messages in thread
From: qingtao.cao @ 2008-09-28  5:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: yanmin.zhang

PCIE extended capability unit is of 4-byte, so the least 2 bits of the most 
significant 12 bits should be masked off to zero when accessing the extended
capability list.

Signed-off-by: Harry Ciao<qingtao.cao@windriver.com>
---
 drivers/pci/pcie/aer/aerdrv_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -52,7 +52,7 @@
 		if (PCI_EXT_CAP_ID(reg32) == PCI_EXT_CAP_ID_ERR)
 			break;
 
-		pos = reg32 >> 20;
+		pos = PCI_EXT_CAP_NEXT(reg32);
 	}
 
 	return pos;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCIE: use PCI_EXT_CAP_NEXT to traverse PCIE extended capability list.
  2008-09-28  5:07 [PATCH] PCIE: use PCI_EXT_CAP_NEXT to traverse PCIE extended capability list qingtao.cao
@ 2008-09-28  7:20 ` Zhang, Yanmin
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Yanmin @ 2008-09-28  7:20 UTC (permalink / raw)
  To: qingtao.cao; +Cc: linux-kernel, yanmin.zhang


On Sun, 2008-09-28 at 13:07 +0800, qingtao.cao@windriver.com wrote:
> PCIE extended capability unit is of 4-byte, so the least 2 bits of the most 
> significant 12 bits should be masked off to zero when accessing the extended
> capability list.
> 
> Signed-off-by: Harry Ciao<qingtao.cao@windriver.com>
Acked-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>

> ---
>  drivers/pci/pcie/aer/aerdrv_core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/pci/pcie/aer/aerdrv_core.c
> +++ b/drivers/pci/pcie/aer/aerdrv_core.c
> @@ -52,7 +52,7 @@
>  		if (PCI_EXT_CAP_ID(reg32) == PCI_EXT_CAP_ID_ERR)
>  			break;
>  
> -		pos = reg32 >> 20;
> +		pos = PCI_EXT_CAP_NEXT(reg32);
>  	}
>  
>  	return pos;



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-28  7:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-28  5:07 [PATCH] PCIE: use PCI_EXT_CAP_NEXT to traverse PCIE extended capability list qingtao.cao
2008-09-28  7:20 ` Zhang, Yanmin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®