2 * Copyright (C) 2005 - 2016 Broadcom
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License version 2
7 * as published by the Free Software Foundation. The full GNU General
8 * Public License is included in this distribution in the file called COPYING.
10 * Contact Information:
11 * linux-drivers@emulex.com
15 * Costa Mesa, CA 92626
21 #include <linux/pci.h>
22 #include <linux/netdevice.h>
24 #define BE_ROCE_ABI_VERSION 1
28 enum be_interrupt_mode
{
29 BE_INTERRUPT_MODE_MSIX
= 0,
30 BE_INTERRUPT_MODE_INTX
= 1,
31 BE_INTERRUPT_MODE_MSI
= 2,
34 #define MAX_MSIX_VECTORS 32
40 u64 dpp_unmapped_addr
;
43 struct net_device
*netdev
;
44 u8 mac_addr
[ETH_ALEN
];
46 enum be_interrupt_mode intr_mode
;
50 u32 vector_list
[MAX_MSIX_VECTORS
];
54 /* ocrdma driver register's the callback functions with nic driver. */
55 struct ocrdma_driver
{
56 unsigned char name
[32];
58 struct ocrdma_dev
*(*add
) (struct be_dev_info
*dev_info
);
59 void (*remove
) (struct ocrdma_dev
*);
60 void (*state_change_handler
) (struct ocrdma_dev
*, u32 new_state
);
67 /* APIs for RoCE driver to register callback handlers,
68 * which will be invoked when device is added, removed, ifup, ifdown
70 int be_roce_register_driver(struct ocrdma_driver
*drv
);
71 void be_roce_unregister_driver(struct ocrdma_driver
*drv
);
73 /* API for RoCE driver to issue mailbox commands */
74 int be_roce_mcc_cmd(void *netdev_handle
, void *wrb_payload
,
75 int wrb_payload_size
, u16
*cmd_status
, u16
*ext_status
);
77 #endif /* BE_ROCE_H */