Commit b135077b authored by Frederic Barrat's avatar Frederic Barrat Committed by Michael Ellerman

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: 6d382616 ("cxl: Abstract the differences between the PSL and XSL")
Signed-off-by: default avatarFrederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 3daf3c20
...@@ -1530,11 +1530,11 @@ static void set_sl_ops(struct cxl *adapter, struct pci_dev *dev) ...@@ -1530,11 +1530,11 @@ static void set_sl_ops(struct cxl *adapter, struct pci_dev *dev)
{ {
if (dev->vendor == PCI_VENDOR_ID_MELLANOX && dev->device == 0x1013) { if (dev->vendor == PCI_VENDOR_ID_MELLANOX && dev->device == 0x1013) {
/* Mellanox CX-4 */ /* Mellanox CX-4 */
dev_info(&adapter->dev, "Device uses an XSL\n"); dev_info(&dev->dev, "Device uses an XSL\n");
adapter->native->sl_ops = &xsl_ops; adapter->native->sl_ops = &xsl_ops;
adapter->min_pe = 1; /* Workaround for CX-4 hardware bug */ adapter->min_pe = 1; /* Workaround for CX-4 hardware bug */
} else { } else {
dev_info(&adapter->dev, "Device uses a PSL\n"); dev_info(&dev->dev, "Device uses a PSL\n");
adapter->native->sl_ops = &psl_ops; adapter->native->sl_ops = &psl_ops;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment