Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
be_roce.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005 - 2011 Emulex
3  * All rights reserved.
4  *
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.
9  *
10  * Contact Information:
12  *
13  * Emulex
14  * 3333 Susan Street
15  * Costa Mesa, CA 92626
16  */
17 
18 #ifndef BE_ROCE_H
19 #define BE_ROCE_H
20 
21 #include <linux/pci.h>
22 #include <linux/netdevice.h>
23 
24 struct ocrdma_dev;
25 
30 };
31 
32 #define MAX_ROCE_MSIX_VECTORS 16
33 struct be_dev_info {
40  struct pci_dev *pdev;
41  struct net_device *netdev;
45  struct {
49  } msix;
50 };
51 
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 *);
58 };
59 
60 enum {
61  BE_DEV_UP = 0,
63 };
64 
65 /* APIs for RoCE driver to register callback handlers,
66  * which will be invoked when device is added, removed, ifup, ifdown
67  */
68 int be_roce_register_driver(struct ocrdma_driver *drv);
70 
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);
74 
75 #endif /* BE_ROCE_H */