]> git.karo-electronics.de Git - mv-sheeva.git/blob - drivers/staging/benet/fw/asyncmesg.h
Staging: Add ServerEngines benet 10Gb ethernet driver
[mv-sheeva.git] / drivers / staging / benet / fw / asyncmesg.h
1 /*
2  * Copyright (C) 2005 - 2008 ServerEngines
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:
11  * linux-drivers@serverengines.com
12  *
13  * ServerEngines
14  * 209 N. Fair Oaks Ave
15  * Sunnyvale, CA 94085
16  */
17 /*
18  * Autogenerated by srcgen version: 0127
19  */
20 #ifndef __asyncmesg_amap_h__
21 #define __asyncmesg_amap_h__
22 #include "fwcmd_common.h"
23
24 /* --- ASYNC_EVENT_CODES --- */
25 #define ASYNC_EVENT_CODE_LINK_STATE     (1)
26 #define ASYNC_EVENT_CODE_ISCSI          (2)
27
28 /* --- ASYNC_LINK_STATES --- */
29 #define ASYNC_EVENT_LINK_DOWN           (0)     /* Link Down on a port */
30 #define ASYNC_EVENT_LINK_UP             (1)     /* Link Up on a port */
31
32 /*
33  * The last 4 bytes of the async events have this common format.  It allows
34  * the driver to distinguish [link]MCC_CQ_ENTRY[/link] structs from
35  * asynchronous events.  Both arrive on the same completion queue.  This
36  * structure also contains the common fields used to decode the async event.
37  */
38 struct BE_ASYNC_EVENT_TRAILER_AMAP {
39         u8 rsvd0[8];    /* DWORD 0 */
40         u8 event_code[8];       /* DWORD 0 */
41         u8 event_type[8];       /* DWORD 0 */
42         u8 rsvd1[6];    /* DWORD 0 */
43         u8 async_event; /* DWORD 0 */
44         u8 valid;               /* DWORD 0 */
45 } __packed;
46 struct ASYNC_EVENT_TRAILER_AMAP {
47         u32 dw[1];
48 };
49
50 /*
51  * Applicable in Initiator, Target and NIC modes.
52  * A link state async event is seen by all device drivers as soon they
53  * create an MCC ring. Thereafter, anytime the link status changes the
54  * drivers will receive a link state async event. Notifications continue to
55  * be sent until a driver destroys its MCC ring. A link down event is
56  * reported when either port loses link. A link up event is reported
57  * when either port regains link. When BE's failover mechanism is enabled, a
58  * link down on the active port causes traffic to be diverted to the standby
59  * port by the BE's ARM firmware (assuming the standby port has link). In
60  * this case, the standy port assumes the active status. Note: when link is
61  * restored on the failed port, traffic continues on the currently active
62  * port. The ARM firmware does not attempt to 'fail back' traffic to
63  * the restored port.
64  */
65 #if 0
66 struct BE_ASYNC_EVENT_LINK_STATE_AMAP {
67         struct BE_UEXACT8_AMAP port0_link_status;
68         struct BE_UEXACT8_AMAP port1_link_status;
69         struct BE_UEXACT8_AMAP active_port;
70         u8 rsvd0[8];    /* DWORD 0 */
71         struct BE_UEXACT8_AMAP port0_duplex;
72         struct BE_UEXACT8_AMAP port0_speed;
73         struct BE_UEXACT8_AMAP port1_duplex;
74         struct BE_UEXACT8_AMAP port1_speed;
75         struct BE_UEXACT8_AMAP port0_fault;
76         struct BE_UEXACT8_AMAP port1_fault;
77         u8 rsvd1[2][8]; /* DWORD 2 */
78         struct BE_ASYNC_EVENT_TRAILER_AMAP trailer;
79 } __packed;
80 #endif
81 struct BE_ASYNC_EVENT_LINK_STATE_AMAP {
82         u8 port0_link_status[8];
83         u8 port1_link_status[8];
84         u8 active_port[8];
85         u8 rsvd0[8];    /* DWORD 0 */
86         u8 port0_duplex[8];
87         u8 port0_speed[8];
88         u8 port1_duplex[8];
89         u8 port1_speed[8];
90         u8 port0_fault[8];
91         u8 port1_fault[8];
92         u8 rsvd1[2][8]; /* DWORD 2 */
93         struct BE_ASYNC_EVENT_TRAILER_AMAP trailer;
94 } __packed;
95 struct ASYNC_EVENT_LINK_STATE_AMAP {
96         u32 dw[4];
97 };
98 #endif /* __asyncmesg_amap_h__ */