aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_cmds.h
diff options
context:
space:
mode:
authorAjit Khaparde <ajitk@serverengines.com>2009-09-03 23:12:16 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-07 04:56:38 -0400
commit84517482e19bc775de7b3b4e998dee2f506bc34e (patch)
treeae3491a5cf8891feef8c2896ef50758d763646f2 /drivers/net/benet/be_cmds.h
parent384824281caa9ac4b76664033416f1eac4a652fe (diff)
be2net: Changes to support flashing of the be2 network adapter
Changes to support flashing of the be2 network adapter using the request_firmware() & ethtool infrastructure. The trigger to flash the device will come from ethtool utility. The driver will invoke request_firmware() to start the flash process. The file containing the flash image is expected to be available in /lib/firmware/ Signed-off-by: Ajit Khaparde <ajitk@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.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index 70618064ae15..fd7028e5b78e 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -117,6 +117,7 @@ struct be_mcc_mailbox {
117#define OPCODE_COMMON_NTWK_MULTICAST_SET 3 117#define OPCODE_COMMON_NTWK_MULTICAST_SET 3
118#define OPCODE_COMMON_NTWK_VLAN_CONFIG 4 118#define OPCODE_COMMON_NTWK_VLAN_CONFIG 4
119#define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5 119#define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5
120#define OPCODE_COMMON_WRITE_FLASHROM 7
120#define OPCODE_COMMON_CQ_CREATE 12 121#define OPCODE_COMMON_CQ_CREATE 12
121#define OPCODE_COMMON_EQ_CREATE 13 122#define OPCODE_COMMON_EQ_CREATE 13
122#define OPCODE_COMMON_MCC_CREATE 21 123#define OPCODE_COMMON_MCC_CREATE 21
@@ -693,10 +694,24 @@ struct be_cmd_resp_query_fw_cfg {
693 u32 be_config_number; 694 u32 be_config_number;
694 u32 asic_revision; 695 u32 asic_revision;
695 u32 phys_port; 696 u32 phys_port;
696 u32 function_mode; 697 u32 function_cap;
697 u32 rsvd[26]; 698 u32 rsvd[26];
698}; 699};
699 700
701/****************** Firmware Flash ******************/
702struct flashrom_params {
703 u32 op_code;
704 u32 op_type;
705 u32 data_buf_size;
706 u32 offset;
707 u8 data_buf[4];
708};
709
710struct be_cmd_write_flashrom {
711 struct be_cmd_req_hdr hdr;
712 struct flashrom_params params;
713};
714
700extern int be_pci_fnum_get(struct be_adapter *adapter); 715extern int be_pci_fnum_get(struct be_adapter *adapter);
701extern int be_cmd_POST(struct be_adapter *adapter); 716extern int be_cmd_POST(struct be_adapter *adapter);
702extern int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr, 717extern int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
@@ -747,3 +762,6 @@ extern int be_cmd_get_flow_control(struct be_adapter *adapter,
747extern int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num); 762extern int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num);
748extern int be_cmd_reset_function(struct be_adapter *adapter); 763extern int be_cmd_reset_function(struct be_adapter *adapter);
749extern void be_process_mcc(struct be_adapter *adapter); 764extern void be_process_mcc(struct be_adapter *adapter);
765extern int be_cmd_write_flashrom(struct be_adapter *adapter,
766 struct be_dma_mem *cmd, u32 flash_oper,
767 u32 flash_opcode, u32 buf_size);