diff options
author | Ajit Khaparde <ajitk@serverengines.com> | 2009-12-03 01:12:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 15:39:20 -0500 |
commit | d744b44e21a2c908aae23a60da1b4ce35cd925ef (patch) | |
tree | 5274f25cde31b97bf3c842c63eae231224e51ba3 /drivers | |
parent | b099ce2602d806deb41caaa578731848995cdb2a (diff) |
be2net: Changes to print fw command opcode when command is failed by controller.
When a firmware command fails, only the failure codes are printed.
It is difficult to co-relate this to the actual command that has failed.
These changes will now print the command code that has failed.
Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/benet/be_cmds.c | 89 |
1 files changed, 57 insertions, 32 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 8bd531560043..5ec61de3b97f 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
@@ -71,8 +71,8 @@ static int be_mcc_compl_process(struct be_adapter *adapter, | |||
71 | extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) & | 71 | extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) & |
72 | CQE_STATUS_EXTD_MASK; | 72 | CQE_STATUS_EXTD_MASK; |
73 | dev_warn(&adapter->pdev->dev, | 73 | dev_warn(&adapter->pdev->dev, |
74 | "Error in cmd completion: status(compl/extd)=%d/%d\n", | 74 | "Error in cmd completion - opcode %d, compl %d, extd %d\n", |
75 | compl_status, extd_status); | 75 | compl->tag0, compl_status, extd_status); |
76 | } | 76 | } |
77 | return compl_status; | 77 | return compl_status; |
78 | } | 78 | } |
@@ -277,7 +277,7 @@ static inline struct be_sge *nonembedded_sgl(struct be_mcc_wrb *wrb) | |||
277 | 277 | ||
278 | /* Don't touch the hdr after it's prepared */ | 278 | /* Don't touch the hdr after it's prepared */ |
279 | static void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, | 279 | static void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, |
280 | bool embedded, u8 sge_cnt) | 280 | bool embedded, u8 sge_cnt, u32 opcode) |
281 | { | 281 | { |
282 | if (embedded) | 282 | if (embedded) |
283 | wrb->embedded |= MCC_WRB_EMBEDDED_MASK; | 283 | wrb->embedded |= MCC_WRB_EMBEDDED_MASK; |
@@ -285,6 +285,7 @@ static void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, | |||
285 | wrb->embedded |= (sge_cnt & MCC_WRB_SGE_CNT_MASK) << | 285 | wrb->embedded |= (sge_cnt & MCC_WRB_SGE_CNT_MASK) << |
286 | MCC_WRB_SGE_CNT_SHIFT; | 286 | MCC_WRB_SGE_CNT_SHIFT; |
287 | wrb->payload_length = payload_len; | 287 | wrb->payload_length = payload_len; |
288 | wrb->tag0 = opcode; | ||
288 | be_dws_cpu_to_le(wrb, 20); | 289 | be_dws_cpu_to_le(wrb, 20); |
289 | } | 290 | } |
290 | 291 | ||
@@ -425,7 +426,7 @@ int be_cmd_eq_create(struct be_adapter *adapter, | |||
425 | wrb = wrb_from_mbox(adapter); | 426 | wrb = wrb_from_mbox(adapter); |
426 | req = embedded_payload(wrb); | 427 | req = embedded_payload(wrb); |
427 | 428 | ||
428 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 429 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, OPCODE_COMMON_EQ_CREATE); |
429 | 430 | ||
430 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 431 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
431 | OPCODE_COMMON_EQ_CREATE, sizeof(*req)); | 432 | OPCODE_COMMON_EQ_CREATE, sizeof(*req)); |
@@ -469,7 +470,8 @@ int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr, | |||
469 | wrb = wrb_from_mbox(adapter); | 470 | wrb = wrb_from_mbox(adapter); |
470 | req = embedded_payload(wrb); | 471 | req = embedded_payload(wrb); |
471 | 472 | ||
472 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 473 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
474 | OPCODE_COMMON_NTWK_MAC_QUERY); | ||
473 | 475 | ||
474 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 476 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
475 | OPCODE_COMMON_NTWK_MAC_QUERY, sizeof(*req)); | 477 | OPCODE_COMMON_NTWK_MAC_QUERY, sizeof(*req)); |
@@ -509,7 +511,8 @@ int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr, | |||
509 | } | 511 | } |
510 | req = embedded_payload(wrb); | 512 | req = embedded_payload(wrb); |
511 | 513 | ||
512 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 514 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
515 | OPCODE_COMMON_NTWK_PMAC_ADD); | ||
513 | 516 | ||
514 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 517 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
515 | OPCODE_COMMON_NTWK_PMAC_ADD, sizeof(*req)); | 518 | OPCODE_COMMON_NTWK_PMAC_ADD, sizeof(*req)); |
@@ -544,7 +547,8 @@ int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, u32 pmac_id) | |||
544 | } | 547 | } |
545 | req = embedded_payload(wrb); | 548 | req = embedded_payload(wrb); |
546 | 549 | ||
547 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 550 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
551 | OPCODE_COMMON_NTWK_PMAC_DEL); | ||
548 | 552 | ||
549 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 553 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
550 | OPCODE_COMMON_NTWK_PMAC_DEL, sizeof(*req)); | 554 | OPCODE_COMMON_NTWK_PMAC_DEL, sizeof(*req)); |
@@ -576,7 +580,8 @@ int be_cmd_cq_create(struct be_adapter *adapter, | |||
576 | req = embedded_payload(wrb); | 580 | req = embedded_payload(wrb); |
577 | ctxt = &req->context; | 581 | ctxt = &req->context; |
578 | 582 | ||
579 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 583 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
584 | OPCODE_COMMON_CQ_CREATE); | ||
580 | 585 | ||
581 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 586 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
582 | OPCODE_COMMON_CQ_CREATE, sizeof(*req)); | 587 | OPCODE_COMMON_CQ_CREATE, sizeof(*req)); |
@@ -633,7 +638,8 @@ int be_cmd_mccq_create(struct be_adapter *adapter, | |||
633 | req = embedded_payload(wrb); | 638 | req = embedded_payload(wrb); |
634 | ctxt = &req->context; | 639 | ctxt = &req->context; |
635 | 640 | ||
636 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 641 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
642 | OPCODE_COMMON_MCC_CREATE); | ||
637 | 643 | ||
638 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 644 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
639 | OPCODE_COMMON_MCC_CREATE, sizeof(*req)); | 645 | OPCODE_COMMON_MCC_CREATE, sizeof(*req)); |
@@ -677,7 +683,8 @@ int be_cmd_txq_create(struct be_adapter *adapter, | |||
677 | req = embedded_payload(wrb); | 683 | req = embedded_payload(wrb); |
678 | ctxt = &req->context; | 684 | ctxt = &req->context; |
679 | 685 | ||
680 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 686 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
687 | OPCODE_ETH_TX_CREATE); | ||
681 | 688 | ||
682 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, OPCODE_ETH_TX_CREATE, | 689 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, OPCODE_ETH_TX_CREATE, |
683 | sizeof(*req)); | 690 | sizeof(*req)); |
@@ -724,7 +731,8 @@ int be_cmd_rxq_create(struct be_adapter *adapter, | |||
724 | wrb = wrb_from_mbox(adapter); | 731 | wrb = wrb_from_mbox(adapter); |
725 | req = embedded_payload(wrb); | 732 | req = embedded_payload(wrb); |
726 | 733 | ||
727 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 734 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
735 | OPCODE_ETH_RX_CREATE); | ||
728 | 736 | ||
729 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, OPCODE_ETH_RX_CREATE, | 737 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, OPCODE_ETH_RX_CREATE, |
730 | sizeof(*req)); | 738 | sizeof(*req)); |
@@ -765,8 +773,6 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q, | |||
765 | wrb = wrb_from_mbox(adapter); | 773 | wrb = wrb_from_mbox(adapter); |
766 | req = embedded_payload(wrb); | 774 | req = embedded_payload(wrb); |
767 | 775 | ||
768 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | ||
769 | |||
770 | switch (queue_type) { | 776 | switch (queue_type) { |
771 | case QTYPE_EQ: | 777 | case QTYPE_EQ: |
772 | subsys = CMD_SUBSYSTEM_COMMON; | 778 | subsys = CMD_SUBSYSTEM_COMMON; |
@@ -791,6 +797,9 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q, | |||
791 | default: | 797 | default: |
792 | BUG(); | 798 | BUG(); |
793 | } | 799 | } |
800 | |||
801 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, opcode); | ||
802 | |||
794 | be_cmd_hdr_prepare(&req->hdr, subsys, opcode, sizeof(*req)); | 803 | be_cmd_hdr_prepare(&req->hdr, subsys, opcode, sizeof(*req)); |
795 | req->id = cpu_to_le16(q->id); | 804 | req->id = cpu_to_le16(q->id); |
796 | 805 | ||
@@ -816,7 +825,8 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags, | |||
816 | wrb = wrb_from_mbox(adapter); | 825 | wrb = wrb_from_mbox(adapter); |
817 | req = embedded_payload(wrb); | 826 | req = embedded_payload(wrb); |
818 | 827 | ||
819 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 828 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
829 | OPCODE_COMMON_NTWK_INTERFACE_CREATE); | ||
820 | 830 | ||
821 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 831 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
822 | OPCODE_COMMON_NTWK_INTERFACE_CREATE, sizeof(*req)); | 832 | OPCODE_COMMON_NTWK_INTERFACE_CREATE, sizeof(*req)); |
@@ -851,7 +861,8 @@ int be_cmd_if_destroy(struct be_adapter *adapter, u32 interface_id) | |||
851 | wrb = wrb_from_mbox(adapter); | 861 | wrb = wrb_from_mbox(adapter); |
852 | req = embedded_payload(wrb); | 862 | req = embedded_payload(wrb); |
853 | 863 | ||
854 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 864 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
865 | OPCODE_COMMON_NTWK_INTERFACE_DESTROY); | ||
855 | 866 | ||
856 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 867 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
857 | OPCODE_COMMON_NTWK_INTERFACE_DESTROY, sizeof(*req)); | 868 | OPCODE_COMMON_NTWK_INTERFACE_DESTROY, sizeof(*req)); |
@@ -886,8 +897,8 @@ int be_cmd_get_stats(struct be_adapter *adapter, struct be_dma_mem *nonemb_cmd) | |||
886 | req = nonemb_cmd->va; | 897 | req = nonemb_cmd->va; |
887 | sge = nonembedded_sgl(wrb); | 898 | sge = nonembedded_sgl(wrb); |
888 | 899 | ||
889 | be_wrb_hdr_prepare(wrb, sizeof(*req), false, 1); | 900 | be_wrb_hdr_prepare(wrb, sizeof(*req), false, 1, |
890 | wrb->tag0 = OPCODE_ETH_GET_STATISTICS; | 901 | OPCODE_ETH_GET_STATISTICS); |
891 | 902 | ||
892 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, | 903 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, |
893 | OPCODE_ETH_GET_STATISTICS, sizeof(*req)); | 904 | OPCODE_ETH_GET_STATISTICS, sizeof(*req)); |
@@ -921,7 +932,8 @@ int be_cmd_link_status_query(struct be_adapter *adapter, | |||
921 | 932 | ||
922 | *link_up = false; | 933 | *link_up = false; |
923 | 934 | ||
924 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 935 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
936 | OPCODE_COMMON_NTWK_LINK_STATUS_QUERY); | ||
925 | 937 | ||
926 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 938 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
927 | OPCODE_COMMON_NTWK_LINK_STATUS_QUERY, sizeof(*req)); | 939 | OPCODE_COMMON_NTWK_LINK_STATUS_QUERY, sizeof(*req)); |
@@ -953,7 +965,8 @@ int be_cmd_get_fw_ver(struct be_adapter *adapter, char *fw_ver) | |||
953 | wrb = wrb_from_mbox(adapter); | 965 | wrb = wrb_from_mbox(adapter); |
954 | req = embedded_payload(wrb); | 966 | req = embedded_payload(wrb); |
955 | 967 | ||
956 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 968 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
969 | OPCODE_COMMON_GET_FW_VERSION); | ||
957 | 970 | ||
958 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 971 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
959 | OPCODE_COMMON_GET_FW_VERSION, sizeof(*req)); | 972 | OPCODE_COMMON_GET_FW_VERSION, sizeof(*req)); |
@@ -986,7 +999,8 @@ int be_cmd_modify_eqd(struct be_adapter *adapter, u32 eq_id, u32 eqd) | |||
986 | } | 999 | } |
987 | req = embedded_payload(wrb); | 1000 | req = embedded_payload(wrb); |
988 | 1001 | ||
989 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1002 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
1003 | OPCODE_COMMON_MODIFY_EQ_DELAY); | ||
990 | 1004 | ||
991 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1005 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
992 | OPCODE_COMMON_MODIFY_EQ_DELAY, sizeof(*req)); | 1006 | OPCODE_COMMON_MODIFY_EQ_DELAY, sizeof(*req)); |
@@ -1020,7 +1034,8 @@ int be_cmd_vlan_config(struct be_adapter *adapter, u32 if_id, u16 *vtag_array, | |||
1020 | } | 1034 | } |
1021 | req = embedded_payload(wrb); | 1035 | req = embedded_payload(wrb); |
1022 | 1036 | ||
1023 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1037 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
1038 | OPCODE_COMMON_NTWK_VLAN_CONFIG); | ||
1024 | 1039 | ||
1025 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1040 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1026 | OPCODE_COMMON_NTWK_VLAN_CONFIG, sizeof(*req)); | 1041 | OPCODE_COMMON_NTWK_VLAN_CONFIG, sizeof(*req)); |
@@ -1059,7 +1074,7 @@ int be_cmd_promiscuous_config(struct be_adapter *adapter, u8 port_num, bool en) | |||
1059 | } | 1074 | } |
1060 | req = embedded_payload(wrb); | 1075 | req = embedded_payload(wrb); |
1061 | 1076 | ||
1062 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1077 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, OPCODE_ETH_PROMISCUOUS); |
1063 | 1078 | ||
1064 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, | 1079 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, |
1065 | OPCODE_ETH_PROMISCUOUS, sizeof(*req)); | 1080 | OPCODE_ETH_PROMISCUOUS, sizeof(*req)); |
@@ -1099,7 +1114,8 @@ int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id, | |||
1099 | sge = nonembedded_sgl(wrb); | 1114 | sge = nonembedded_sgl(wrb); |
1100 | memset(req, 0, sizeof(*req)); | 1115 | memset(req, 0, sizeof(*req)); |
1101 | 1116 | ||
1102 | be_wrb_hdr_prepare(wrb, sizeof(*req), false, 1); | 1117 | be_wrb_hdr_prepare(wrb, sizeof(*req), false, 1, |
1118 | OPCODE_COMMON_NTWK_MULTICAST_SET); | ||
1103 | sge->pa_hi = cpu_to_le32(upper_32_bits(mem->dma)); | 1119 | sge->pa_hi = cpu_to_le32(upper_32_bits(mem->dma)); |
1104 | sge->pa_lo = cpu_to_le32(mem->dma & 0xFFFFFFFF); | 1120 | sge->pa_lo = cpu_to_le32(mem->dma & 0xFFFFFFFF); |
1105 | sge->len = cpu_to_le32(mem->size); | 1121 | sge->len = cpu_to_le32(mem->size); |
@@ -1143,7 +1159,8 @@ int be_cmd_set_flow_control(struct be_adapter *adapter, u32 tx_fc, u32 rx_fc) | |||
1143 | } | 1159 | } |
1144 | req = embedded_payload(wrb); | 1160 | req = embedded_payload(wrb); |
1145 | 1161 | ||
1146 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1162 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
1163 | OPCODE_COMMON_SET_FLOW_CONTROL); | ||
1147 | 1164 | ||
1148 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1165 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1149 | OPCODE_COMMON_SET_FLOW_CONTROL, sizeof(*req)); | 1166 | OPCODE_COMMON_SET_FLOW_CONTROL, sizeof(*req)); |
@@ -1174,7 +1191,8 @@ int be_cmd_get_flow_control(struct be_adapter *adapter, u32 *tx_fc, u32 *rx_fc) | |||
1174 | } | 1191 | } |
1175 | req = embedded_payload(wrb); | 1192 | req = embedded_payload(wrb); |
1176 | 1193 | ||
1177 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1194 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
1195 | OPCODE_COMMON_GET_FLOW_CONTROL); | ||
1178 | 1196 | ||
1179 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1197 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1180 | OPCODE_COMMON_GET_FLOW_CONTROL, sizeof(*req)); | 1198 | OPCODE_COMMON_GET_FLOW_CONTROL, sizeof(*req)); |
@@ -1204,7 +1222,8 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num, u32 *cap) | |||
1204 | wrb = wrb_from_mbox(adapter); | 1222 | wrb = wrb_from_mbox(adapter); |
1205 | req = embedded_payload(wrb); | 1223 | req = embedded_payload(wrb); |
1206 | 1224 | ||
1207 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1225 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
1226 | OPCODE_COMMON_QUERY_FIRMWARE_CONFIG); | ||
1208 | 1227 | ||
1209 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1228 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1210 | OPCODE_COMMON_QUERY_FIRMWARE_CONFIG, sizeof(*req)); | 1229 | OPCODE_COMMON_QUERY_FIRMWARE_CONFIG, sizeof(*req)); |
@@ -1232,7 +1251,8 @@ int be_cmd_reset_function(struct be_adapter *adapter) | |||
1232 | wrb = wrb_from_mbox(adapter); | 1251 | wrb = wrb_from_mbox(adapter); |
1233 | req = embedded_payload(wrb); | 1252 | req = embedded_payload(wrb); |
1234 | 1253 | ||
1235 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1254 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
1255 | OPCODE_COMMON_FUNCTION_RESET); | ||
1236 | 1256 | ||
1237 | be_cmd_hdr_prepare(req, CMD_SUBSYSTEM_COMMON, | 1257 | be_cmd_hdr_prepare(req, CMD_SUBSYSTEM_COMMON, |
1238 | OPCODE_COMMON_FUNCTION_RESET, sizeof(*req)); | 1258 | OPCODE_COMMON_FUNCTION_RESET, sizeof(*req)); |
@@ -1260,7 +1280,8 @@ int be_cmd_set_beacon_state(struct be_adapter *adapter, u8 port_num, | |||
1260 | } | 1280 | } |
1261 | req = embedded_payload(wrb); | 1281 | req = embedded_payload(wrb); |
1262 | 1282 | ||
1263 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1283 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
1284 | OPCODE_COMMON_ENABLE_DISABLE_BEACON); | ||
1264 | 1285 | ||
1265 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1286 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1266 | OPCODE_COMMON_ENABLE_DISABLE_BEACON, sizeof(*req)); | 1287 | OPCODE_COMMON_ENABLE_DISABLE_BEACON, sizeof(*req)); |
@@ -1293,7 +1314,8 @@ int be_cmd_get_beacon_state(struct be_adapter *adapter, u8 port_num, u32 *state) | |||
1293 | } | 1314 | } |
1294 | req = embedded_payload(wrb); | 1315 | req = embedded_payload(wrb); |
1295 | 1316 | ||
1296 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); | 1317 | be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, |
1318 | OPCODE_COMMON_GET_BEACON_STATE); | ||
1297 | 1319 | ||
1298 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1320 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1299 | OPCODE_COMMON_GET_BEACON_STATE, sizeof(*req)); | 1321 | OPCODE_COMMON_GET_BEACON_STATE, sizeof(*req)); |
@@ -1329,7 +1351,8 @@ int be_cmd_read_port_type(struct be_adapter *adapter, u32 port, | |||
1329 | } | 1351 | } |
1330 | req = embedded_payload(wrb); | 1352 | req = embedded_payload(wrb); |
1331 | 1353 | ||
1332 | be_wrb_hdr_prepare(wrb, sizeof(struct be_cmd_resp_port_type), true, 0); | 1354 | be_wrb_hdr_prepare(wrb, sizeof(struct be_cmd_resp_port_type), true, 0, |
1355 | OPCODE_COMMON_READ_TRANSRECV_DATA); | ||
1333 | 1356 | ||
1334 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1357 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1335 | OPCODE_COMMON_READ_TRANSRECV_DATA, sizeof(*req)); | 1358 | OPCODE_COMMON_READ_TRANSRECV_DATA, sizeof(*req)); |
@@ -1365,7 +1388,8 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd, | |||
1365 | req = cmd->va; | 1388 | req = cmd->va; |
1366 | sge = nonembedded_sgl(wrb); | 1389 | sge = nonembedded_sgl(wrb); |
1367 | 1390 | ||
1368 | be_wrb_hdr_prepare(wrb, cmd->size, false, 1); | 1391 | be_wrb_hdr_prepare(wrb, cmd->size, false, 1, |
1392 | OPCODE_COMMON_WRITE_FLASHROM); | ||
1369 | 1393 | ||
1370 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1394 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1371 | OPCODE_COMMON_WRITE_FLASHROM, cmd->size); | 1395 | OPCODE_COMMON_WRITE_FLASHROM, cmd->size); |
@@ -1399,7 +1423,8 @@ int be_cmd_get_flash_crc(struct be_adapter *adapter, u8 *flashed_crc) | |||
1399 | } | 1423 | } |
1400 | req = embedded_payload(wrb); | 1424 | req = embedded_payload(wrb); |
1401 | 1425 | ||
1402 | be_wrb_hdr_prepare(wrb, sizeof(*req)+4, true, 0); | 1426 | be_wrb_hdr_prepare(wrb, sizeof(*req)+4, true, 0, |
1427 | OPCODE_COMMON_READ_FLASHROM); | ||
1403 | 1428 | ||
1404 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 1429 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
1405 | OPCODE_COMMON_READ_FLASHROM, sizeof(*req)+4); | 1430 | OPCODE_COMMON_READ_FLASHROM, sizeof(*req)+4); |