[PATCH 04/18] pci: set upper word for 64bit base addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set the upper word correctly when the PCI address space is outside
the 32bit range.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/pci/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 57a7a75f84..046711cd14 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -223,7 +223,7 @@ static void setup_device(struct pci_dev *dev, int max_bar)
 			*last_addr = ALIGN(*last_addr, size);
 			pci_write_config_dword(dev, pci_base_address_0, *last_addr);
 			if (mask & PCI_BASE_ADDRESS_MEM_TYPE_64)
-				pci_write_config_dword(dev, pci_base_address_1, 0);
+				pci_write_config_dword(dev, pci_base_address_1, *last_addr >> 32);
 			start = *last_addr;
 			*last_addr += size;
 		} else {
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux