19948a064SJiri Pirko /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 29948a064SJiri Pirko /* Copyright (c) 2016-2018 Mellanox Technologies. All rights reserved */ 31d20d23cSJiri Pirko 41d20d23cSJiri Pirko #ifndef _MLXSW_PCI_H 51d20d23cSJiri Pirko #define _MLXSW_PCI_H 61d20d23cSJiri Pirko 71d20d23cSJiri Pirko #include <linux/pci.h> 81d20d23cSJiri Pirko 91d20d23cSJiri Pirko #define PCI_DEVICE_ID_MELLANOX_SWITCHX2 0xc738 101d20d23cSJiri Pirko #define PCI_DEVICE_ID_MELLANOX_SPECTRUM 0xcb84 11c3ab4354SJiri Pirko #define PCI_DEVICE_ID_MELLANOX_SPECTRUM2 0xcf6c 12*da382875SJiri Pirko #define PCI_DEVICE_ID_MELLANOX_SPECTRUM3 0xcf70 13d1ba5263SElad Raz #define PCI_DEVICE_ID_MELLANOX_SWITCHIB 0xcb20 14d1ba5263SElad Raz #define PCI_DEVICE_ID_MELLANOX_SWITCHIB2 0xcf08 151d20d23cSJiri Pirko 161d20d23cSJiri Pirko #if IS_ENABLED(CONFIG_MLXSW_PCI) 171d20d23cSJiri Pirko 181d20d23cSJiri Pirko int mlxsw_pci_driver_register(struct pci_driver *pci_driver); 191d20d23cSJiri Pirko void mlxsw_pci_driver_unregister(struct pci_driver *pci_driver); 201d20d23cSJiri Pirko 211d20d23cSJiri Pirko #else 221d20d23cSJiri Pirko 231d20d23cSJiri Pirko static inline int 241d20d23cSJiri Pirko mlxsw_pci_driver_register(struct pci_driver *pci_driver) 251d20d23cSJiri Pirko { 261d20d23cSJiri Pirko return 0; 271d20d23cSJiri Pirko } 281d20d23cSJiri Pirko 291d20d23cSJiri Pirko static inline void 301d20d23cSJiri Pirko mlxsw_pci_driver_unregister(struct pci_driver *pci_driver) 311d20d23cSJiri Pirko { 321d20d23cSJiri Pirko } 331d20d23cSJiri Pirko 341d20d23cSJiri Pirko #endif 351d20d23cSJiri Pirko 361d20d23cSJiri Pirko #endif 37