pci.h 747 B

12345678910111213141516171819202122232425262728293031323334
  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_SPECTRUM 0xcb84
  7. #define PCI_DEVICE_ID_MELLANOX_SPECTRUM2 0xcf6c
  8. #define PCI_DEVICE_ID_MELLANOX_SPECTRUM3 0xcf70
  9. #define PCI_DEVICE_ID_MELLANOX_SPECTRUM4 0xcf80
  10. #if IS_ENABLED(CONFIG_MLXSW_PCI)
  11. int mlxsw_pci_driver_register(struct pci_driver *pci_driver);
  12. void mlxsw_pci_driver_unregister(struct pci_driver *pci_driver);
  13. #else
  14. static inline int
  15. mlxsw_pci_driver_register(struct pci_driver *pci_driver)
  16. {
  17. return 0;
  18. }
  19. static inline void
  20. mlxsw_pci_driver_unregister(struct pci_driver *pci_driver)
  21. {
  22. }
  23. #endif
  24. #endif