From 33dea5aae0320345af26ae9aba0894a930e0d4ec Mon Sep 17 00:00:00 2001 From: Logan Gunthorpe Date: Thu, 3 Aug 2017 12:19:46 -0600 Subject: 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 Reviewed-by: Stephen Bates Reviewed-by: Kurt Schwemmer Acked-by: Allen Hubbe Acked-by: Bjorn Helgaas Signed-off-by: Jon Mason --- include/linux/switchtec.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h index d8159944f013..09d73d0d1aa8 100644 --- a/include/linux/switchtec.h +++ b/include/linux/switchtec.h @@ -320,6 +320,8 @@ struct pff_csr_regs { u32 reserved4[174]; } __packed; +struct switchtec_ntb; + struct switchtec_dev { struct pci_dev *pdev; struct device dev; @@ -357,6 +359,8 @@ struct switchtec_dev { struct work_struct link_event_work; void (*link_notifier)(struct switchtec_dev *stdev); u8 link_event_count[SWITCHTEC_MAX_PFF_CSR]; + + struct switchtec_ntb *sndev; }; static inline struct switchtec_dev *to_stdev(struct device *dev) -- cgit v1.2.3