Skip to contentSkip to conversation

Better handling of PCI BAR assignments

PATCH In review Steven Roberts 2 participants 2 messages May 8, 2017 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Better handling of PCI BAR assignments

The Ominpath adapter driver fails to load the ppc64le platform due to invalid PCI setup.
I am recommending this patch to pcie.c which better aligns configuration with linux PCI subsystem functions. It also fixes the issue. Hopefully, this motivates a change. I am new to the group, so if I am short content, I may need more direction than your experienced members.

opa-hfi1/pcie.c +4 -2
@@ -208,8 +208,10 @@
 	/*
 	 * Save BARs and command to rewrite after device reset.
 	 */
-	dd->pcibar0 = addr;
-	dd->pcibar1 = addr >> 32;
+         pci_read_config_dword(dd->pcidev, PCI_BASE_ADDRESS_0, &dd->pcibar0);
+         pci_read_config_dword(dd->pcidev, PCI_BASE_ADDRESS_1, &dd->pcibar1);
+/*      dd->pcibar0 = addr;
+ *      dd->pcibar1 = addr >> 32;*/
 	pci_read_config_dword(dd->pcidev, PCI_ROM_ADDRESS, &dd->pci_rom);
 	pci_read_config_word(dd->pcidev, PCI_COMMAND, &dd->pci_command);
 	pcie_capability_read_word(dd->pcidev, PCI_EXP_DEVCTL, &dd->pcie_devctl);

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive
Quoted 3 lines · Steven Roberts

The Ominpath adapter driver fails to load the ppc64le platform due to invalid PCI setup.
I am recommending this patch to pcie.c which better aligns configuration with linux PCI subsystem functions. It also fixes the issue. Hopefully, this motivates a change. I am new to the group, so if I am short content, I may need more direction than your experienced members.

Thanks for the patch. We'll work with you offline to get it into the right format for Doug to accept.

Quoted 17 lines
opa-hfi1/pcie.c +4 -3
@@ -208,8 +208,10 @@
 	/*
 	 * Save BARs and command to rewrite after device reset.
 	 */
-	dd->pcibar0 = addr;
-	dd->pcibar1 = addr >> 32;
+         pci_read_config_dword(dd->pcidev, PCI_BASE_ADDRESS_0, &dd->pcibar0);
+         pci_read_config_dword(dd->pcidev, PCI_BASE_ADDRESS_1, &dd->pcibar1);
+/*      dd->pcibar0 = addr;
+ *      dd->pcibar1 = addr >> 32;*/
 	pci_read_config_dword(dd->pcidev, PCI_ROM_ADDRESS, &dd->pci_rom);
 	pci_read_config_word(dd->pcidev, PCI_COMMAND, &dd->pci_command);
 	pcie_capability_read_word(dd->pcidev, PCI_EXP_DEVCTL, &dd->pcie_devctl);
 
--
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html