pci.h 795 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2. /* Copyright (c) 2016-2018 Mellanox Technologies. All rights reserved */
  3. #ifndef _MLXSW_PCI_H
  4. #define _MLXSW_PCI_H
  5. #include <linux/pci.h>
  6. #define PCI_DEVICE_ID_MELLANOX_SWITCHX2 0xc738
  7. #define PCI_DEVICE_ID_MELLANOX_SPECTRUM 0xcb84
  8. #define PCI_DEVICE_ID_MELLANOX_SPECTRUM2 0xcf6c
  9. #define PCI_DEVICE_ID_MELLANOX_SWITCHIB 0xcb20
  10. #define PCI_DEVICE_ID_MELLANOX_SWITCHIB2 0xcf08
  11. #if IS_ENABLED(CONFIG_MLXSW_PCI)
  12. int mlxsw_pci_driver_register(struct pci_driver *pci_driver);
  13. void mlxsw_pci_driver_unregister(struct pci_driver *pci_driver);
  14. #else
  15. static inline int
  16. mlxsw_pci_driver_register(struct pci_driver *pci_driver)
  17. {
  18. return 0;
  19. }
  20. static inline void
  21. mlxsw_pci_driver_unregister(struct pci_driver *pci_driver)
  22. {
  23. }
  24. #endif
  25. #endif