summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.vnet.ibm.com>2016-09-12 06:37:43 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-09-13 03:37:11 -0400
commitb135077b83f01549c2a0685b16b540254ce60e0f (patch)
tree6963ae510d1b35b9e222ff7bc30fe1de19c7dc0e /drivers/misc
parent3daf3c206992891ac0cec6a54a893521064a7674 (diff)
cxl: Fix informational message
When set_sl_ops() is called, the adapter data structure is not fully initialized yet. Therefore the device name is not showing up in the trace. Fix is simply to get the device name from the pci_dev structure. Fixes: 6d382616ac22 ("cxl: Abstract the differences between the PSL and XSL") Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/cxl/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
index 6f0c4ac4b649..cd922a80bf97 100644
--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -1530,11 +1530,11 @@ static void set_sl_ops(struct cxl *adapter, struct pci_dev *dev)
1530{ 1530{
1531 if (dev->vendor == PCI_VENDOR_ID_MELLANOX && dev->device == 0x1013) { 1531 if (dev->vendor == PCI_VENDOR_ID_MELLANOX && dev->device == 0x1013) {
1532 /* Mellanox CX-4 */ 1532 /* Mellanox CX-4 */
1533 dev_info(&adapter->dev, "Device uses an XSL\n"); 1533 dev_info(&dev->dev, "Device uses an XSL\n");
1534 adapter->native->sl_ops = &xsl_ops; 1534 adapter->native->sl_ops = &xsl_ops;
1535 adapter->min_pe = 1; /* Workaround for CX-4 hardware bug */ 1535 adapter->min_pe = 1; /* Workaround for CX-4 hardware bug */
1536 } else { 1536 } else {
1537 dev_info(&adapter->dev, "Device uses a PSL\n"); 1537 dev_info(&dev->dev, "Device uses a PSL\n");
1538 adapter->native->sl_ops = &psl_ops; 1538 adapter->native->sl_ops = &psl_ops;
1539 } 1539 }
1540} 1540}