aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_cmds.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/benet/be_cmds.h')
-rw-r--r--drivers/net/benet/be_cmds.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index a567aa437ec9..747626da7b4e 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -76,6 +76,34 @@ struct be_mcc_cq_entry {
76 u32 flags; /* dword 3 */ 76 u32 flags; /* dword 3 */
77}; 77};
78 78
79/* When the async bit of mcc_compl is set, the last 4 bytes of
80 * mcc_compl is interpreted as follows:
81 */
82#define ASYNC_TRAILER_EVENT_CODE_SHIFT 8 /* bits 8 - 15 */
83#define ASYNC_TRAILER_EVENT_CODE_MASK 0xFF
84#define ASYNC_EVENT_CODE_LINK_STATE 0x1
85struct be_async_event_trailer {
86 u32 code;
87};
88
89enum {
90 ASYNC_EVENT_LINK_DOWN = 0x0,
91 ASYNC_EVENT_LINK_UP = 0x1
92};
93
94/* When the event code of an async trailer is link-state, the mcc_compl
95 * must be interpreted as follows
96 */
97struct be_async_event_link_state {
98 u8 physical_port;
99 u8 port_link_status;
100 u8 port_duplex;
101 u8 port_speed;
102 u8 port_fault;
103 u8 rsvd0[7];
104 struct be_async_event_trailer trailer;
105} __packed;
106
79struct be_mcc_mailbox { 107struct be_mcc_mailbox {
80 struct be_mcc_wrb wrb; 108 struct be_mcc_wrb wrb;
81 struct be_mcc_cq_entry cqe; 109 struct be_mcc_cq_entry cqe;
@@ -580,12 +608,6 @@ struct be_cmd_req_link_status {
580 u32 rsvd; 608 u32 rsvd;
581}; 609};
582 610
583struct be_link_info {
584 u8 duplex;
585 u8 speed;
586 u8 fault;
587};
588
589enum { 611enum {
590 PHY_LINK_DUPLEX_NONE = 0x0, 612 PHY_LINK_DUPLEX_NONE = 0x0,
591 PHY_LINK_DUPLEX_HALF = 0x1, 613 PHY_LINK_DUPLEX_HALF = 0x1,
@@ -704,7 +726,7 @@ extern int be_cmd_rxq_create(struct be_ctrl_info *ctrl,
704extern int be_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q, 726extern int be_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q,
705 int type); 727 int type);
706extern int be_cmd_link_status_query(struct be_ctrl_info *ctrl, 728extern int be_cmd_link_status_query(struct be_ctrl_info *ctrl,
707 struct be_link_info *link); 729 bool *link_up);
708extern int be_cmd_reset(struct be_ctrl_info *ctrl); 730extern int be_cmd_reset(struct be_ctrl_info *ctrl);
709extern int be_cmd_get_stats(struct be_ctrl_info *ctrl, 731extern int be_cmd_get_stats(struct be_ctrl_info *ctrl,
710 struct be_dma_mem *nonemb_cmd); 732 struct be_dma_mem *nonemb_cmd);