summaryrefslogtreecommitdiffstats
path: root/drivers/pci/switch/switchtec.c
diff options
context:
space:
mode:
authorLogan Gunthorpe2017-08-03 20:19:46 +0200
committerJon Mason2017-11-19 02:37:12 +0100
commit33dea5aae0320345af26ae9aba0894a930e0d4ec (patch)
treee7549a2db4add2f55c46d3f19b0cec5ee5ee5c84 /drivers/pci/switch/switchtec.c
parentNTB: Add check and comment for link up to mw_count() and mw_get_align() (diff)
downloadkernel-qcow2-linux-33dea5aae0320345af26ae9aba0894a930e0d4ec.tar.gz
kernel-qcow2-linux-33dea5aae0320345af26ae9aba0894a930e0d4ec.tar.xz
kernel-qcow2-linux-33dea5aae0320345af26ae9aba0894a930e0d4ec.zip
NTB: switchtec_ntb: Introduce initial NTB driver
Seeing the Switchtec NTB hardware shares the same endpoint as the management endpoint we utilize the class_interface API to register an NTB driver for every Switchtec device in the system that has the NTB class code. Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Reviewed-by: Stephen Bates <sbates@raithlin.com> Reviewed-by: Kurt Schwemmer <kurt.schwemmer@microsemi.com> Acked-by: Allen Hubbe <Allen.Hubbe@dell.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/pci/switch/switchtec.c')
-rw-r--r--drivers/pci/switch/switchtec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 807569e62bee..58edc24ea381 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -1275,6 +1275,9 @@ static int switchtec_pci_probe(struct pci_dev *pdev,
struct switchtec_dev *stdev;
int rc;
+ if (pdev->class == MICROSEMI_NTB_CLASSCODE)
+ request_module_nowait("ntb_hw_switchtec");
+
stdev = stdev_create(pdev);
if (IS_ERR(stdev))
return PTR_ERR(stdev);