xref: /linux/drivers/net/ethernet/mellanox/mlxsw/pci.h (revision 9948a0641a17a38935a28d05f6c56d9d1ffabae6)
1*9948a064SJiri Pirko /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2*9948a064SJiri 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
12d1ba5263SElad Raz #define PCI_DEVICE_ID_MELLANOX_SWITCHIB		0xcb20
13d1ba5263SElad Raz #define PCI_DEVICE_ID_MELLANOX_SWITCHIB2	0xcf08
141d20d23cSJiri Pirko 
151d20d23cSJiri Pirko #if IS_ENABLED(CONFIG_MLXSW_PCI)
161d20d23cSJiri Pirko 
171d20d23cSJiri Pirko int mlxsw_pci_driver_register(struct pci_driver *pci_driver);
181d20d23cSJiri Pirko void mlxsw_pci_driver_unregister(struct pci_driver *pci_driver);
191d20d23cSJiri Pirko 
201d20d23cSJiri Pirko #else
211d20d23cSJiri Pirko 
221d20d23cSJiri Pirko static inline int
231d20d23cSJiri Pirko mlxsw_pci_driver_register(struct pci_driver *pci_driver)
241d20d23cSJiri Pirko {
251d20d23cSJiri Pirko 	return 0;
261d20d23cSJiri Pirko }
271d20d23cSJiri Pirko 
281d20d23cSJiri Pirko static inline void
291d20d23cSJiri Pirko mlxsw_pci_driver_unregister(struct pci_driver *pci_driver)
301d20d23cSJiri Pirko {
311d20d23cSJiri Pirko }
321d20d23cSJiri Pirko 
331d20d23cSJiri Pirko #endif
341d20d23cSJiri Pirko 
351d20d23cSJiri Pirko #endif
36