[Skiboot] [PATCH] pci: Add -Tn to SAS adapter's loc-code
Gavin Shan
gwshan at linux.vnet.ibm.com
Fri Mar 3 10:54:42 AEDT 2017
This adds -Tn to the device-tree node's loc-code property for SAS
adaptr as we did for ethernet adapter in commit 6558adff01bb ("
Add -Tn to ibm,loc-code for ethernet adaptors"). "n" represents
the function number of the PCI device.
Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
---
core/pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/pci.c b/core/pci.c
index 9889dbf..6c8f65c 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -1288,7 +1288,9 @@ static void pci_add_loc_code(struct dt_node *np, struct pci_device *pd)
/* XXX Don't do that on openpower for now, we will need to sort things
* out later, otherwise the mezzanine slot on Habanero gets weird results
*/
- if (class == 0x02 && sub == 0x00 && fsp_present()) {
+ if (fsp_present() &&
+ ((class == 0x02 && sub == 0x00) || /* Ethernet */
+ (class == 0x01 && sub == 0x07))) { /* SAS */
/* There's usually several spaces at the end of the property.
Test for, but don't rely on, that being the case */
len = strlen(blcode);
--
2.7.4
More information about the Skiboot
mailing list