aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_cmds.h
diff options
context:
space:
mode:
authorSarveshwar Bandi <sarveshwarb@serverengines.com>2009-10-28 07:15:20 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-28 07:15:20 -0400
commit0388f251a33ea60937564ad1f27cf77243409f06 (patch)
tree1e70648214ae726e4741f2a8bbe848912ae0e0bf /drivers/net/benet/be_cmds.h
parent7e15b0c9991dfe0bf05a2f8fab9154bb7827622e (diff)
be2net: Changes to update ethtool get_settings function to return appropriate values.
Update ethtool get_settings function to: - get current link speed settings from controller - get port transceiver type from controller - fill appropriate values for supported, phy_address Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_cmds.h')
-rw-r--r--drivers/net/benet/be_cmds.h45
1 files changed, 43 insertions, 2 deletions
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index fe9f535eff12..76410c1d5669 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -140,6 +140,7 @@ struct be_mcc_mailbox {
140#define OPCODE_COMMON_FUNCTION_RESET 61 140#define OPCODE_COMMON_FUNCTION_RESET 61
141#define OPCODE_COMMON_ENABLE_DISABLE_BEACON 69 141#define OPCODE_COMMON_ENABLE_DISABLE_BEACON 69
142#define OPCODE_COMMON_GET_BEACON_STATE 70 142#define OPCODE_COMMON_GET_BEACON_STATE 70
143#define OPCODE_COMMON_READ_TRANSRECV_DATA 73
143 144
144#define OPCODE_ETH_ACPI_CONFIG 2 145#define OPCODE_ETH_ACPI_CONFIG 2
145#define OPCODE_ETH_PROMISCUOUS 3 146#define OPCODE_ETH_PROMISCUOUS 3
@@ -635,9 +636,47 @@ struct be_cmd_resp_link_status {
635 u8 mac_fault; 636 u8 mac_fault;
636 u8 mgmt_mac_duplex; 637 u8 mgmt_mac_duplex;
637 u8 mgmt_mac_speed; 638 u8 mgmt_mac_speed;
638 u16 rsvd0; 639 u16 link_speed;
640 u32 rsvd0;
639} __packed; 641} __packed;
640 642
643/******************** Port Identification ***************************/
644/* Identifies the type of port attached to NIC */
645struct be_cmd_req_port_type {
646 struct be_cmd_req_hdr hdr;
647 u32 page_num;
648 u32 port;
649};
650
651enum {
652 TR_PAGE_A0 = 0xa0,
653 TR_PAGE_A2 = 0xa2
654};
655
656struct be_cmd_resp_port_type {
657 struct be_cmd_resp_hdr hdr;
658 u32 page_num;
659 u32 port;
660 struct data {
661 u8 identifier;
662 u8 identifier_ext;
663 u8 connector;
664 u8 transceiver[8];
665 u8 rsvd0[3];
666 u8 length_km;
667 u8 length_hm;
668 u8 length_om1;
669 u8 length_om2;
670 u8 length_cu;
671 u8 length_cu_m;
672 u8 vendor_name[16];
673 u8 rsvd;
674 u8 vendor_oui[3];
675 u8 vendor_pn[16];
676 u8 vendor_rev[4];
677 } data;
678};
679
641/******************** Get FW Version *******************/ 680/******************** Get FW Version *******************/
642struct be_cmd_req_get_fw_version { 681struct be_cmd_req_get_fw_version {
643 struct be_cmd_req_hdr hdr; 682 struct be_cmd_req_hdr hdr;
@@ -776,7 +815,7 @@ extern int be_cmd_rxq_create(struct be_adapter *adapter,
776extern int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q, 815extern int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
777 int type); 816 int type);
778extern int be_cmd_link_status_query(struct be_adapter *adapter, 817extern int be_cmd_link_status_query(struct be_adapter *adapter,
779 bool *link_up); 818 bool *link_up, u8 *mac_speed, u16 *link_speed);
780extern int be_cmd_reset(struct be_adapter *adapter); 819extern int be_cmd_reset(struct be_adapter *adapter);
781extern int be_cmd_get_stats(struct be_adapter *adapter, 820extern int be_cmd_get_stats(struct be_adapter *adapter,
782 struct be_dma_mem *nonemb_cmd); 821 struct be_dma_mem *nonemb_cmd);
@@ -802,6 +841,8 @@ extern int be_cmd_set_beacon_state(struct be_adapter *adapter,
802 u8 port_num, u8 beacon, u8 status, u8 state); 841 u8 port_num, u8 beacon, u8 status, u8 state);
803extern int be_cmd_get_beacon_state(struct be_adapter *adapter, 842extern int be_cmd_get_beacon_state(struct be_adapter *adapter,
804 u8 port_num, u32 *state); 843 u8 port_num, u32 *state);
844extern int be_cmd_read_port_type(struct be_adapter *adapter, u32 port,
845 u8 *connector);
805extern int be_cmd_write_flashrom(struct be_adapter *adapter, 846extern int be_cmd_write_flashrom(struct be_adapter *adapter,
806 struct be_dma_mem *cmd, u32 flash_oper, 847 struct be_dma_mem *cmd, u32 flash_oper,
807 u32 flash_opcode, u32 buf_size); 848 u32 flash_opcode, u32 buf_size);