diff options
author | Sarveshwar Bandi <sarveshwarb@serverengines.com> | 2009-10-28 07:15:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-28 07:15:20 -0400 |
commit | 0388f251a33ea60937564ad1f27cf77243409f06 (patch) | |
tree | 1e70648214ae726e4741f2a8bbe848912ae0e0bf /drivers/net/benet/be_cmds.h | |
parent | 7e15b0c9991dfe0bf05a2f8fab9154bb7827622e (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.h | 45 |
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 */ | ||
645 | struct be_cmd_req_port_type { | ||
646 | struct be_cmd_req_hdr hdr; | ||
647 | u32 page_num; | ||
648 | u32 port; | ||
649 | }; | ||
650 | |||
651 | enum { | ||
652 | TR_PAGE_A0 = 0xa0, | ||
653 | TR_PAGE_A2 = 0xa2 | ||
654 | }; | ||
655 | |||
656 | struct 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 *******************/ |
642 | struct be_cmd_req_get_fw_version { | 681 | struct 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, | |||
776 | extern int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q, | 815 | extern int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q, |
777 | int type); | 816 | int type); |
778 | extern int be_cmd_link_status_query(struct be_adapter *adapter, | 817 | extern int be_cmd_link_status_query(struct be_adapter *adapter, |
779 | bool *link_up); | 818 | bool *link_up, u8 *mac_speed, u16 *link_speed); |
780 | extern int be_cmd_reset(struct be_adapter *adapter); | 819 | extern int be_cmd_reset(struct be_adapter *adapter); |
781 | extern int be_cmd_get_stats(struct be_adapter *adapter, | 820 | extern 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); |
803 | extern int be_cmd_get_beacon_state(struct be_adapter *adapter, | 842 | extern int be_cmd_get_beacon_state(struct be_adapter *adapter, |
804 | u8 port_num, u32 *state); | 843 | u8 port_num, u32 *state); |
844 | extern int be_cmd_read_port_type(struct be_adapter *adapter, u32 port, | ||
845 | u8 *connector); | ||
805 | extern int be_cmd_write_flashrom(struct be_adapter *adapter, | 846 | extern 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); |