Subject:[PATCH] PCIE: use PCI_EXT_CAP_NEXT to traverse PCIE extended capability list.

Previous thread: [PATCH] x86: mtrr_cleanup hole size should be less than half of chunk_size v2 by Yinghai Lu on Saturday, September 27, 2008 - 8:26 pm. (4 messages)

Next thread: [PATCH] PCIE: use PCI_EXT_CAP_NEXT to traverse PCIE extended capability list. by qingtao.cao on Saturday, September 27, 2008 - 10:07 pm. (2 messages)
From: qingtao.cao
Date: Saturday, September 27, 2008 - 8:58 pm

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;
--

Previous thread: [PATCH] x86: mtrr_cleanup hole size should be less than half of chunk_size v2 by Yinghai Lu on Saturday, September 27, 2008 - 8:26 pm. (4 messages)

Next thread: [PATCH] PCIE: use PCI_EXT_CAP_NEXT to traverse PCIE extended capability list. by qingtao.cao on Saturday, September 27, 2008 - 10:07 pm. (2 messages)