2 * Copyright (C) 2005 - 2013 Emulex
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>
26 enum be_interrupt_mode
{
27 BE_INTERRUPT_MODE_MSIX
= 0,
28 BE_INTERRUPT_MODE_INTX
= 1,
29 BE_INTERRUPT_MODE_MSI
= 2,
32 #define MAX_MSIX_VECTORS 32
38 u64 dpp_unmapped_addr
;
41 struct net_device
*netdev
;
42 u8 mac_addr
[ETH_ALEN
];
44 enum be_interrupt_mode intr_mode
;
48 u32 vector_list
[MAX_MSIX_VECTORS
];
52 /* ocrdma driver register's the callback functions with nic driver. */
53 struct ocrdma_driver
{
54 unsigned char name
[32];
55 struct ocrdma_dev
*(*add
) (struct be_dev_info
*dev_info
);
56 void (*remove
) (struct ocrdma_dev
*);
57 void (*state_change_handler
) (struct ocrdma_dev
*, u32 new_state
);
65 /* APIs for RoCE driver to register callback handlers,
66 * which will be invoked when device is added, removed, ifup, ifdown
68 int be_roce_register_driver(struct ocrdma_driver
*drv
);
69 void be_roce_unregister_driver(struct ocrdma_driver
*drv
);
71 /* API for RoCE driver to issue mailbox commands */
72 int be_roce_mcc_cmd(void *netdev_handle
, void *wrb_payload
,
73 int wrb_payload_size
, u16
*cmd_status
, u16
*ext_status
);
75 #endif /* BE_ROCE_H */