]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - sys/dev/qlnx/qlnxe/ecore_mcp_api.h
MFC r316485
[FreeBSD/stable/10.git] / sys / dev / qlnx / qlnxe / ecore_mcp_api.h
1 /*
2  * Copyright (c) 2017-2018 Cavium, Inc. 
3  * All rights reserved.
4  *
5  *  Redistribution and use in source and binary forms, with or without
6  *  modification, are permitted provided that the following conditions
7  *  are met:
8  *
9  *  1. Redistributions of source code must retain the above copyright
10  *     notice, this list of conditions and the following disclaimer.
11  *  2. Redistributions in binary form must reproduce the above copyright
12  *     notice, this list of conditions and the following disclaimer in the
13  *     documentation and/or other materials provided with the distribution.
14  *
15  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25  *  POSSIBILITY OF SUCH DAMAGE.
26  *
27  * $FreeBSD$
28  *
29  */
30
31 #ifndef __ECORE_MCP_API_H__
32 #define __ECORE_MCP_API_H__
33
34 #include "ecore_status.h"
35
36 struct ecore_mcp_link_speed_params {
37         bool autoneg;
38         u32 advertised_speeds; /* bitmask of DRV_SPEED_CAPABILITY */
39         u32 forced_speed; /* In Mb/s */
40 };
41
42 struct ecore_mcp_link_pause_params {
43         bool autoneg;
44         bool forced_rx;
45         bool forced_tx;
46 };
47
48 enum ecore_mcp_eee_mode {
49         ECORE_MCP_EEE_DISABLED,
50         ECORE_MCP_EEE_ENABLED,
51         ECORE_MCP_EEE_UNSUPPORTED
52 };
53
54 struct ecore_link_eee_params {
55         u32 tx_lpi_timer;
56 #define ECORE_EEE_1G_ADV        (1 << 0)
57 #define ECORE_EEE_10G_ADV       (1 << 1)
58         /* Capabilities are represented using ECORE_EEE_*_ADV values */
59         u8 adv_caps;
60         u8 lp_adv_caps;
61         bool enable;
62         bool tx_lpi_enable;
63 };
64
65 struct ecore_mcp_link_params {
66         struct ecore_mcp_link_speed_params speed;
67         struct ecore_mcp_link_pause_params pause;
68         u32 loopback_mode; /* in PMM_LOOPBACK values */
69         struct ecore_link_eee_params eee;
70 };
71
72 struct ecore_mcp_link_capabilities {
73         u32 speed_capabilities;
74         bool default_speed_autoneg; /* In Mb/s */
75         u32 default_speed; /* In Mb/s */
76         enum ecore_mcp_eee_mode default_eee;
77         u32 eee_lpi_timer;
78 };
79
80 struct ecore_mcp_link_state {
81         bool link_up;
82
83         u32 line_speed; /* In Mb/s */
84         u32 min_pf_rate; /* In Mb/s */
85         u32 speed; /* In Mb/s */
86         bool full_duplex;
87
88         bool an;
89         bool an_complete;
90         bool parallel_detection;
91         bool pfc_enabled;
92
93 #define ECORE_LINK_PARTNER_SPEED_1G_HD  (1 << 0)
94 #define ECORE_LINK_PARTNER_SPEED_1G_FD  (1 << 1)
95 #define ECORE_LINK_PARTNER_SPEED_10G    (1 << 2)
96 #define ECORE_LINK_PARTNER_SPEED_20G    (1 << 3)
97 #define ECORE_LINK_PARTNER_SPEED_25G    (1 << 4)
98 #define ECORE_LINK_PARTNER_SPEED_40G    (1 << 5)
99 #define ECORE_LINK_PARTNER_SPEED_50G    (1 << 6)
100 #define ECORE_LINK_PARTNER_SPEED_100G   (1 << 7)
101         u32 partner_adv_speed;
102
103         bool partner_tx_flow_ctrl_en;
104         bool partner_rx_flow_ctrl_en;
105
106 #define ECORE_LINK_PARTNER_SYMMETRIC_PAUSE (1)
107 #define ECORE_LINK_PARTNER_ASYMMETRIC_PAUSE (2)
108 #define ECORE_LINK_PARTNER_BOTH_PAUSE (3)
109         u8 partner_adv_pause;
110
111         bool sfp_tx_fault;
112
113         bool eee_active;
114         u8 eee_adv_caps;
115         u8 eee_lp_adv_caps;
116 };
117
118 struct ecore_mcp_function_info {
119         u8 pause_on_host;
120
121         enum ecore_pci_personality protocol;
122
123         u8 bandwidth_min;
124         u8 bandwidth_max;
125
126         u8 mac[ETH_ALEN];
127
128         u64 wwn_port;
129         u64 wwn_node;
130
131 #define ECORE_MCP_VLAN_UNSET            (0xffff)
132         u16 ovlan;
133
134         u16 mtu;
135 };
136
137 struct ecore_mcp_nvm_common {
138         u32 offset;
139         u32 param;
140         u32 resp;
141         u32 cmd;
142 };
143
144 struct ecore_mcp_nvm_rd {
145         u32 *buf_size;
146         u32 *buf;
147 };
148
149 struct ecore_mcp_nvm_wr {
150         u32 buf_size;
151         u32 *buf;
152 };
153
154 struct ecore_mcp_nvm_params {
155 #define ECORE_MCP_CMD           (1 << 0)
156 #define ECORE_MCP_NVM_RD        (1 << 1)
157 #define ECORE_MCP_NVM_WR        (1 << 2)
158         u8 type;
159
160         struct ecore_mcp_nvm_common nvm_common;
161
162         union {
163                 struct ecore_mcp_nvm_rd nvm_rd;
164                 struct ecore_mcp_nvm_wr nvm_wr;
165         };
166 };
167
168 enum ecore_nvm_images {
169         ECORE_NVM_IMAGE_ISCSI_CFG,
170         ECORE_NVM_IMAGE_FCOE_CFG,
171         ECORE_NVM_IMAGE_MDUMP,
172 };
173
174 struct ecore_mcp_drv_version {
175         u32 version;
176         u8 name[MCP_DRV_VER_STR_SIZE - 4];
177 };
178
179 struct ecore_mcp_lan_stats {
180         u64 ucast_rx_pkts;
181         u64 ucast_tx_pkts;
182         u32 fcs_err;
183 };
184
185 #ifndef ECORE_PROTO_STATS
186 #define ECORE_PROTO_STATS
187 struct ecore_mcp_fcoe_stats {
188         u64 rx_pkts;
189         u64 tx_pkts;
190         u32 fcs_err;
191         u32 login_failure;
192 };
193
194 struct ecore_mcp_iscsi_stats {
195         u64 rx_pdus;
196         u64 tx_pdus;
197         u64 rx_bytes;
198         u64 tx_bytes;
199 };
200
201 struct ecore_mcp_rdma_stats {
202         u64 rx_pkts;
203         u64 tx_pkts;
204         u64 rx_bytes;
205         u64 tx_byts;
206 };
207
208 enum ecore_mcp_protocol_type {
209         ECORE_MCP_LAN_STATS,
210         ECORE_MCP_FCOE_STATS,
211         ECORE_MCP_ISCSI_STATS,
212         ECORE_MCP_RDMA_STATS
213 };
214
215 union ecore_mcp_protocol_stats {
216         struct ecore_mcp_lan_stats lan_stats;
217         struct ecore_mcp_fcoe_stats fcoe_stats;
218         struct ecore_mcp_iscsi_stats iscsi_stats;
219         struct ecore_mcp_rdma_stats rdma_stats;
220 };
221 #endif
222
223 enum ecore_ov_client {
224         ECORE_OV_CLIENT_DRV,
225         ECORE_OV_CLIENT_USER,
226         ECORE_OV_CLIENT_VENDOR_SPEC
227 };
228
229 enum ecore_ov_driver_state {
230         ECORE_OV_DRIVER_STATE_NOT_LOADED,
231         ECORE_OV_DRIVER_STATE_DISABLED,
232         ECORE_OV_DRIVER_STATE_ACTIVE
233 };
234
235 enum ecore_ov_wol {
236         ECORE_OV_WOL_DEFAULT,
237         ECORE_OV_WOL_DISABLED,
238         ECORE_OV_WOL_ENABLED
239 };
240
241 #define ECORE_MAX_NPIV_ENTRIES 128
242 #define ECORE_WWN_SIZE 8
243 struct ecore_fc_npiv_tbl {
244         u16 num_wwpn;
245         u16 num_wwnn;
246         u8 wwpn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
247         u8 wwnn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
248 };
249
250 enum ecore_led_mode {
251         ECORE_LED_MODE_OFF,
252         ECORE_LED_MODE_ON,
253         ECORE_LED_MODE_RESTORE
254 };
255
256 struct ecore_temperature_sensor {
257         u8 sensor_location;
258         u8 threshold_high;
259         u8 critical;
260         u8 current_temp;
261 };
262
263 #define ECORE_MAX_NUM_OF_SENSORS        7
264 struct ecore_temperature_info {
265         u32 num_sensors;
266         struct ecore_temperature_sensor sensors[ECORE_MAX_NUM_OF_SENSORS];
267 };
268
269 enum ecore_mba_img_idx {
270         ECORE_MBA_LEGACY_IDX,
271         ECORE_MBA_PCI3CLP_IDX,
272         ECORE_MBA_PCI3_IDX,
273         ECORE_MBA_FCODE_IDX,
274         ECORE_EFI_X86_IDX,
275         ECORE_EFI_IPF_IDX,
276         ECORE_EFI_EBC_IDX,
277         ECORE_EFI_X64_IDX,
278         ECORE_MAX_NUM_OF_ROMIMG
279 };
280
281 struct ecore_mba_vers {
282         u32 mba_vers[ECORE_MAX_NUM_OF_ROMIMG];
283 };
284
285 enum ecore_mfw_tlv_type {
286         ECORE_MFW_TLV_GENERIC = 0x1, /* Core driver TLVs */
287         ECORE_MFW_TLV_ETH = 0x2, /* L2 driver TLVs */
288         ECORE_MFW_TLV_FCOE = 0x4, /* FCoE protocol TLVs */
289         ECORE_MFW_TLV_ISCSI = 0x8, /* SCSI protocol TLVs */
290         ECORE_MFW_TLV_MAX = 0x16,
291 };
292
293 struct ecore_mfw_tlv_generic {
294         struct {
295                 u8 ipv4_csum_offload;
296                 u8 lso_supported;
297                 bool b_set;
298         } flags;
299
300 #define ECORE_MFW_TLV_MAC_COUNT 3
301         /* First entry for primary MAC, 2 secondary MACs possible */
302         u8 mac[ECORE_MFW_TLV_MAC_COUNT][6];
303         bool mac_set[ECORE_MFW_TLV_MAC_COUNT];
304
305         u64 rx_frames;
306         bool rx_frames_set;
307         u64 rx_bytes;
308         bool rx_bytes_set;
309         u64 tx_frames;
310         bool tx_frames_set;
311         u64 tx_bytes;
312         bool tx_bytes_set;
313 };
314
315 struct ecore_mfw_tlv_eth {
316         u16 lso_maxoff_size;
317         bool lso_maxoff_size_set;
318         u16 lso_minseg_size;
319         bool lso_minseg_size_set;
320         u8 prom_mode;
321         bool prom_mode_set;
322         u16 tx_descr_size;
323         bool tx_descr_size_set;
324         u16 rx_descr_size;
325         bool rx_descr_size_set;
326         u16 netq_count;
327         bool netq_count_set;
328         u32 tcp4_offloads;
329         bool tcp4_offloads_set;
330         u32 tcp6_offloads;
331         bool tcp6_offloads_set;
332         u16 tx_descr_qdepth;
333         bool tx_descr_qdepth_set;
334         u16 rx_descr_qdepth;
335         bool rx_descr_qdepth_set;
336         u8 iov_offload;
337 #define ECORE_MFW_TLV_IOV_OFFLOAD_NONE          (0)
338 #define ECORE_MFW_TLV_IOV_OFFLOAD_MULTIQUEUE    (1)
339 #define ECORE_MFW_TLV_IOV_OFFLOAD_VEB           (2)
340 #define ECORE_MFW_TLV_IOV_OFFLOAD_VEPA          (3)
341         bool iov_offload_set;
342         u8 txqs_empty;
343         bool txqs_empty_set;
344         u8 rxqs_empty;
345         bool rxqs_empty_set;
346         u8 num_txqs_full;
347         bool num_txqs_full_set;
348         u8 num_rxqs_full;
349         bool num_rxqs_full_set;
350 };
351
352 struct ecore_mfw_tlv_time {
353         bool b_set;
354         u8 month;
355         u8 day;
356         u8 hour;
357         u8 min;
358         u16 msec;
359         u16 usec;
360 };
361
362 struct ecore_mfw_tlv_fcoe {
363         u8 scsi_timeout;
364         bool scsi_timeout_set;
365         u32 rt_tov;
366         bool rt_tov_set;
367         u32 ra_tov;
368         bool ra_tov_set;
369         u32 ed_tov;
370         bool ed_tov_set;
371         u32 cr_tov;
372         bool cr_tov_set;
373         u8 boot_type;
374         bool boot_type_set;
375         u8 npiv_state;
376         bool npiv_state_set;
377         u32 num_npiv_ids;
378         bool num_npiv_ids_set;
379         u8 switch_name[8];
380         bool switch_name_set;
381         u16 switch_portnum;
382         bool switch_portnum_set;
383         u8 switch_portid[3];
384         bool switch_portid_set;
385         u8 vendor_name[8];
386         bool vendor_name_set;
387         u8 switch_model[8];
388         bool switch_model_set;
389         u8 switch_fw_version[8];
390         bool switch_fw_version_set;
391         u8 qos_pri;
392         bool qos_pri_set;
393         u8 port_alias[3];
394         bool port_alias_set;
395         u8 port_state;
396 #define ECORE_MFW_TLV_PORT_STATE_OFFLINE        (0)
397 #define ECORE_MFW_TLV_PORT_STATE_LOOP           (1)
398 #define ECORE_MFW_TLV_PORT_STATE_P2P            (2)
399 #define ECORE_MFW_TLV_PORT_STATE_FABRIC         (3)
400         bool port_state_set;
401         u16 fip_tx_descr_size;
402         bool fip_tx_descr_size_set;
403         u16 fip_rx_descr_size;
404         bool fip_rx_descr_size_set;
405         u16 link_failures;
406         bool link_failures_set;
407         u8 fcoe_boot_progress;
408         bool fcoe_boot_progress_set;
409         u64 rx_bcast;
410         bool rx_bcast_set;
411         u64 tx_bcast;
412         bool tx_bcast_set;
413         u16 fcoe_txq_depth;
414         bool fcoe_txq_depth_set;
415         u16 fcoe_rxq_depth;
416         bool fcoe_rxq_depth_set;
417         u64 fcoe_rx_frames;
418         bool fcoe_rx_frames_set;
419         u64 fcoe_rx_bytes;
420         bool fcoe_rx_bytes_set;
421         u64 fcoe_tx_frames;
422         bool fcoe_tx_frames_set;
423         u64 fcoe_tx_bytes;
424         bool fcoe_tx_bytes_set;
425         u16 crc_count;
426         bool crc_count_set;
427         u32 crc_err_src_fcid[5];
428         bool crc_err_src_fcid_set[5];
429         struct ecore_mfw_tlv_time crc_err[5];
430         u16 losync_err;
431         bool losync_err_set;
432         u16 losig_err;
433         bool losig_err_set;
434         u16 primtive_err;
435         bool primtive_err_set;
436         u16 disparity_err;
437         bool disparity_err_set;
438         u16 code_violation_err;
439         bool code_violation_err_set;
440         u32 flogi_param[4];
441         bool flogi_param_set[4];
442         struct ecore_mfw_tlv_time flogi_tstamp;
443         u32 flogi_acc_param[4];
444         bool flogi_acc_param_set[4];
445         struct ecore_mfw_tlv_time flogi_acc_tstamp;
446         u32 flogi_rjt;
447         bool flogi_rjt_set;
448         struct ecore_mfw_tlv_time flogi_rjt_tstamp;
449         u32 fdiscs;
450         bool fdiscs_set;
451         u8 fdisc_acc;
452         bool fdisc_acc_set;
453         u8 fdisc_rjt;
454         bool fdisc_rjt_set;
455         u8 plogi;
456         bool plogi_set;
457         u8 plogi_acc;
458         bool plogi_acc_set;
459         u8 plogi_rjt;
460         bool plogi_rjt_set;
461         u32 plogi_dst_fcid[5];
462         bool plogi_dst_fcid_set[5];
463         struct ecore_mfw_tlv_time plogi_tstamp[5];
464         u32 plogi_acc_src_fcid[5];
465         bool plogi_acc_src_fcid_set[5];
466         struct ecore_mfw_tlv_time plogi_acc_tstamp[5];
467         u8 tx_plogos;
468         bool tx_plogos_set;
469         u8 plogo_acc;
470         bool plogo_acc_set;
471         u8 plogo_rjt;
472         bool plogo_rjt_set;
473         u32 plogo_src_fcid[5];
474         bool plogo_src_fcid_set[5];
475         struct ecore_mfw_tlv_time plogo_tstamp[5];
476         u8 rx_logos;
477         bool rx_logos_set;
478         u8 tx_accs;
479         bool tx_accs_set;
480         u8 tx_prlis;
481         bool tx_prlis_set;
482         u8 rx_accs;
483         bool rx_accs_set;
484         u8 tx_abts;
485         bool tx_abts_set;
486         u8 rx_abts_acc;
487         bool rx_abts_acc_set;
488         u8 rx_abts_rjt;
489         bool rx_abts_rjt_set;
490         u32 abts_dst_fcid[5];
491         bool abts_dst_fcid_set[5];
492         struct ecore_mfw_tlv_time abts_tstamp[5];
493         u8 rx_rscn;
494         bool rx_rscn_set;
495         u32 rx_rscn_nport[4];
496         bool rx_rscn_nport_set[4];
497         u8 tx_lun_rst;
498         bool tx_lun_rst_set;
499         u8 abort_task_sets;
500         bool abort_task_sets_set;
501         u8 tx_tprlos;
502         bool tx_tprlos_set;
503         u8 tx_nos;
504         bool tx_nos_set;
505         u8 rx_nos;
506         bool rx_nos_set;
507         u8 ols;
508         bool ols_set;
509         u8 lr;
510         bool lr_set;
511         u8 lrr;
512         bool lrr_set;
513         u8 tx_lip;
514         bool tx_lip_set;
515         u8 rx_lip;
516         bool rx_lip_set;
517         u8 eofa;
518         bool eofa_set;
519         u8 eofni;
520         bool eofni_set;
521         u8 scsi_chks;
522         bool scsi_chks_set;
523         u8 scsi_cond_met;
524         bool scsi_cond_met_set;
525         u8 scsi_busy;
526         bool scsi_busy_set;
527         u8 scsi_inter;
528         bool scsi_inter_set;
529         u8 scsi_inter_cond_met;
530         bool scsi_inter_cond_met_set;
531         u8 scsi_rsv_conflicts;
532         bool scsi_rsv_conflicts_set;
533         u8 scsi_tsk_full;
534         bool scsi_tsk_full_set;
535         u8 scsi_aca_active;
536         bool scsi_aca_active_set;
537         u8 scsi_tsk_abort;
538         bool scsi_tsk_abort_set;
539         u32 scsi_rx_chk[5];
540         bool scsi_rx_chk_set[5];
541         struct ecore_mfw_tlv_time scsi_chk_tstamp[5];
542 };
543
544 struct ecore_mfw_tlv_iscsi {
545         u8 target_llmnr;
546         bool target_llmnr_set;
547         u8 header_digest;
548         bool header_digest_set;
549         u8 data_digest;
550         bool data_digest_set;
551         u8 auth_method;
552 #define ECORE_MFW_TLV_AUTH_METHOD_NONE          (1)
553 #define ECORE_MFW_TLV_AUTH_METHOD_CHAP          (2)
554 #define ECORE_MFW_TLV_AUTH_METHOD_MUTUAL_CHAP   (3)
555         bool auth_method_set;
556         u16 boot_taget_portal;
557         bool boot_taget_portal_set;
558         u16 frame_size;
559         bool frame_size_set;
560         u16 tx_desc_size;
561         bool tx_desc_size_set;
562         u16 rx_desc_size;
563         bool rx_desc_size_set;
564         u8 boot_progress;
565         bool boot_progress_set;
566         u16 tx_desc_qdepth;
567         bool tx_desc_qdepth_set;
568         u16 rx_desc_qdepth;
569         bool rx_desc_qdepth_set;
570         u64 rx_frames;
571         bool rx_frames_set;
572         u64 rx_bytes;
573         bool rx_bytes_set;
574         u64 tx_frames;
575         bool tx_frames_set;
576         u64 tx_bytes;
577         bool tx_bytes_set;
578 };
579
580 union ecore_mfw_tlv_data {
581         struct ecore_mfw_tlv_generic generic;
582         struct ecore_mfw_tlv_eth eth;
583         struct ecore_mfw_tlv_fcoe fcoe;
584         struct ecore_mfw_tlv_iscsi iscsi;
585 };
586
587 enum ecore_hw_info_change {
588         ECORE_HW_INFO_CHANGE_OVLAN,
589 };
590
591 /**
592  * @brief - returns the link params of the hw function
593  *
594  * @param p_hwfn
595  *
596  * @returns pointer to link params
597  */
598 struct ecore_mcp_link_params *ecore_mcp_get_link_params(struct ecore_hwfn*);
599
600 /**
601  * @brief - return the link state of the hw function
602  *
603  * @param p_hwfn
604  *
605  * @returns pointer to link state
606  */
607 struct ecore_mcp_link_state *ecore_mcp_get_link_state(struct ecore_hwfn*);
608
609 /**
610  * @brief - return the link capabilities of the hw function
611  *
612  * @param p_hwfn
613  *
614  * @returns pointer to link capabilities
615  */
616 struct ecore_mcp_link_capabilities
617 *ecore_mcp_get_link_capabilities(struct ecore_hwfn *p_hwfn);
618
619 /**
620  * @brief Request the MFW to set the the link according to 'link_input'.
621  *
622  * @param p_hwfn
623  * @param p_ptt
624  * @param b_up - raise link if `true'. Reset link if `false'.
625  *
626  * @return enum _ecore_status_t
627  */
628 enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
629                                         struct ecore_ptt *p_ptt,
630                                         bool b_up);
631
632 /**
633  * @brief Get the management firmware version value
634  *
635  * @param p_hwfn
636  * @param p_ptt
637  * @param p_mfw_ver    - mfw version value
638  * @param p_running_bundle_id   - image id in nvram; Optional.
639  *
640  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
641  */
642 enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,
643                                            struct ecore_ptt *p_ptt,
644                                            u32 *p_mfw_ver,
645                                            u32 *p_running_bundle_id);
646
647 /**
648  * @brief Get the MBI version value
649  *
650  * @param p_hwfn
651  * @param p_ptt
652  * @param p_mbi_ver - A pointer to a variable to be filled with the MBI version.
653  *
654  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
655  */
656 enum _ecore_status_t ecore_mcp_get_mbi_ver(struct ecore_hwfn *p_hwfn,
657                                            struct ecore_ptt *p_ptt,
658                                            u32 *p_mbi_ver);
659
660 /**
661  * @brief Get media type value of the port.
662  *
663  * @param p_dev      - ecore dev pointer
664  * @param mfw_ver    - media type value
665  *
666  * @return enum _ecore_status_t -
667  *      ECORE_SUCCESS - Operation was successful.
668  *      ECORE_BUSY - Operation failed
669  */
670 enum _ecore_status_t ecore_mcp_get_media_type(struct ecore_dev *p_dev,
671                                            u32 *media_type);
672
673 /**
674  * @brief - Sends a command to the MCP mailbox.
675  *
676  * @param p_hwfn      - hw function
677  * @param p_ptt       - PTT required for register access
678  * @param cmd         - command to be sent to the MCP
679  * @param param       - optional param
680  * @param o_mcp_resp  - the MCP response code (exclude sequence)
681  * @param o_mcp_param - optional parameter provided by the MCP response
682  *
683  * @return enum _ecore_status_t -
684  *      ECORE_SUCCESS - operation was successful
685  *      ECORE_BUSY    - operation failed
686  */
687 enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
688                                    struct ecore_ptt *p_ptt, u32 cmd, u32 param,
689                                    u32 *o_mcp_resp, u32 *o_mcp_param);
690
691 /**
692  * @brief - drains the nig, allowing completion to pass in case of pauses.
693  *          (Should be called only from sleepable context)
694  *
695  * @param p_hwfn
696  * @param p_ptt
697  */
698 enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
699                                      struct ecore_ptt *p_ptt);
700
701 /**
702  * @brief - return the mcp function info of the hw function
703  *
704  * @param p_hwfn
705  *
706  * @returns pointer to mcp function info
707  */
708 const struct ecore_mcp_function_info
709 *ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn);
710
711 /**
712  * @brief - Function for reading/manipulating the nvram. Following are supported
713  *          functionalities.
714  *          1. Read: Read the specified nvram offset.
715  *             input values:
716  *               type   - ECORE_MCP_NVM_RD
717  *               cmd    - command code (e.g. DRV_MSG_CODE_NVM_READ_NVRAM)
718  *               offset - nvm offset
719  *
720  *             output values:
721  *               buf      - buffer
722  *               buf_size - buffer size
723  *
724  *          2. Write: Write the data at the specified nvram offset
725  *             input values:
726  *               type     - ECORE_MCP_NVM_WR
727  *               cmd      - command code (e.g. DRV_MSG_CODE_NVM_WRITE_NVRAM)
728  *               offset   - nvm offset
729  *               buf      - buffer
730  *               buf_size - buffer size
731  *
732  *          3. Command: Send the NVM command to MCP.
733  *             input values:
734  *               type   - ECORE_MCP_CMD
735  *               cmd    - command code (e.g. DRV_MSG_CODE_NVM_DEL_FILE)
736  *               offset - nvm offset
737  *
738  *
739  * @param p_hwfn
740  * @param p_ptt
741  * @param params
742  *
743  * @return ECORE_SUCCESS - operation was successful.
744  */
745 enum _ecore_status_t ecore_mcp_nvm_command(struct ecore_hwfn *p_hwfn,
746                                            struct ecore_ptt *p_ptt,
747                                            struct ecore_mcp_nvm_params *params);
748
749 /**
750  * @brief - count number of function with a matching personality on engine.
751  *
752  * @param p_hwfn
753  * @param p_ptt
754  * @param personalities - a bitmask of ecore_pci_personality values
755  *
756  * @returns the count of all devices on engine whose personality match one of
757  *          the bitsmasks.
758  */
759 int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
760                                   struct ecore_ptt *p_ptt,
761                                   u32 personalities);
762
763 /**
764  * @brief Get the flash size value
765  *
766  * @param p_hwfn
767  * @param p_ptt
768  * @param p_flash_size  - flash size in bytes to be filled.
769  *
770  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
771  */
772 enum _ecore_status_t ecore_mcp_get_flash_size(struct ecore_hwfn *p_hwfn,
773                                               struct ecore_ptt *p_ptt,
774                                               u32 *p_flash_size);
775
776 /**
777  * @brief Send driver version to MFW
778  *
779  * @param p_hwfn
780  * @param p_ptt
781  * @param version - Version value
782  * @param name - Protocol driver name
783  *
784  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
785  */
786 enum _ecore_status_t
787 ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
788                            struct ecore_mcp_drv_version *p_ver);
789
790 /**
791  * @brief Read the MFW process kill counter
792  *
793  * @param p_hwfn
794  * @param p_ptt
795  *
796  * @return u32
797  */
798 u32 ecore_get_process_kill_counter(struct ecore_hwfn *p_hwfn,
799                                    struct ecore_ptt *p_ptt);
800
801 /**
802  * @brief Trigger a recovery process
803  *
804  *  @param p_hwfn
805  *  @param p_ptt
806  *
807  * @return enum _ecore_status_t
808  */
809 enum _ecore_status_t ecore_start_recovery_process(struct ecore_hwfn *p_hwfn,
810                                                   struct ecore_ptt *p_ptt);
811
812 /**
813  * @brief Notify MFW about the change in base device properties
814  *
815  *  @param p_hwfn
816  *  @param p_ptt
817  *  @param client - ecore client type
818  *
819  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
820  */
821 enum _ecore_status_t
822 ecore_mcp_ov_update_current_config(struct ecore_hwfn *p_hwfn,
823                                    struct ecore_ptt *p_ptt,
824                                    enum ecore_ov_client client);
825
826 /**
827  * @brief Notify MFW about the driver state
828  *
829  *  @param p_hwfn
830  *  @param p_ptt
831  *  @param drv_state - Driver state
832  *
833  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
834  */
835 enum _ecore_status_t
836 ecore_mcp_ov_update_driver_state(struct ecore_hwfn *p_hwfn,
837                                  struct ecore_ptt *p_ptt,
838                                  enum ecore_ov_driver_state drv_state);
839
840 /**
841  * @brief Read NPIV settings form the MFW
842  *
843  *  @param p_hwfn
844  *  @param p_ptt
845  *  @param p_table - Array to hold the FC NPIV data. Client need allocate the
846  *                   required buffer. The field 'count' specifies number of NPIV
847  *                   entries. A value of 0 means the table was not populated.
848  *
849  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
850  */
851 enum _ecore_status_t
852 ecore_mcp_ov_get_fc_npiv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
853                          struct ecore_fc_npiv_tbl *p_table);
854
855 /**
856  * @brief Send MTU size to MFW
857  *
858  *  @param p_hwfn
859  *  @param p_ptt
860  *  @param mtu - MTU size
861  *
862  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
863  */
864 enum _ecore_status_t ecore_mcp_ov_update_mtu(struct ecore_hwfn *p_hwfn,
865                                              struct ecore_ptt *p_ptt, u16 mtu);
866
867 /**
868  * @brief Send MAC address to MFW
869  *
870  *  @param p_hwfn
871  *  @param p_ptt
872  *  @param mac - MAC address
873  *
874  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
875  */
876 enum _ecore_status_t
877 ecore_mcp_ov_update_mac(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
878                         u8 *mac);
879
880 /**
881  * @brief Send WOL mode to MFW
882  *
883  *  @param p_hwfn
884  *  @param p_ptt
885  *  @param wol - WOL mode
886  *
887  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
888  */
889 enum _ecore_status_t
890 ecore_mcp_ov_update_wol(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
891                         enum ecore_ov_wol wol);
892
893 /**
894  * @brief Set LED status
895  *
896  *  @param p_hwfn
897  *  @param p_ptt
898  *  @param mode - LED mode
899  *
900  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
901  */
902 enum _ecore_status_t ecore_mcp_set_led(struct ecore_hwfn *p_hwfn,
903                                        struct ecore_ptt *p_ptt,
904                                        enum ecore_led_mode mode);
905
906 /**
907  * @brief Set secure mode
908  *
909  *  @param p_dev
910  *  @param addr - nvm offset
911  *
912  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
913  */
914 enum _ecore_status_t ecore_mcp_nvm_set_secure_mode(struct ecore_dev *p_dev,
915                                                    u32 addr);
916
917 /**
918  * @brief Write to phy
919  *
920  *  @param p_dev
921  *  @param addr - nvm offset
922  *  @param cmd - nvm command
923  *  @param p_buf - nvm write buffer
924  *  @param len - buffer len
925  *
926  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
927  */
928 enum _ecore_status_t ecore_mcp_phy_write(struct ecore_dev *p_dev, u32 cmd,
929                                          u32 addr, u8 *p_buf, u32 len);
930
931 /**
932  * @brief Write to nvm
933  *
934  *  @param p_dev
935  *  @param addr - nvm offset
936  *  @param cmd - nvm command
937  *  @param p_buf - nvm write buffer
938  *  @param len - buffer len
939  *
940  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
941  */
942 enum _ecore_status_t ecore_mcp_nvm_write(struct ecore_dev *p_dev, u32 cmd,
943                                          u32 addr, u8 *p_buf, u32 len);
944
945 /**
946  * @brief Put file begin
947  *
948  *  @param p_dev
949  *  @param addr - nvm offset
950  *
951  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
952  */
953 enum _ecore_status_t ecore_mcp_nvm_put_file_begin(struct ecore_dev *p_dev,
954                                                   u32 addr);
955
956 /**
957  * @brief Delete file
958  *
959  *  @param p_dev
960  *  @param addr - nvm offset
961  *
962  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
963  */
964 enum _ecore_status_t ecore_mcp_nvm_del_file(struct ecore_dev *p_dev,
965                                             u32 addr);
966
967 /**
968  * @brief Check latest response
969  *
970  *  @param p_dev
971  *  @param p_buf - nvm write buffer
972  *
973  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
974  */
975 enum _ecore_status_t ecore_mcp_nvm_resp(struct ecore_dev *p_dev, u8 *p_buf);
976
977 /**
978  * @brief Read from phy
979  *
980  *  @param p_dev
981  *  @param addr - nvm offset
982  *  @param cmd - nvm command
983  *  @param p_buf - nvm write buffer
984  *  @param len - buffer len
985  *
986  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
987  */
988 enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
989                                         u32 addr, u8 *p_buf, u32 len);
990
991 /**
992  * @brief Read from nvm
993  *
994  *  @param p_dev
995  *  @param addr - nvm offset
996  *  @param p_buf - nvm write buffer
997  *  @param len - buffer len
998  *
999  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1000  */
1001 enum _ecore_status_t ecore_mcp_nvm_read(struct ecore_dev *p_dev, u32 addr,
1002                            u8 *p_buf, u32 len);
1003
1004 struct ecore_nvm_image_att {
1005         u32 start_addr;
1006         u32 length;
1007 };
1008
1009 /**
1010  * @brief Allows reading a whole nvram image
1011  *
1012  * @param p_hwfn
1013  * @param p_ptt
1014  * @param image_id - image to get attributes for
1015  * @param p_image_att - image attributes structure into which to fill data
1016  *
1017  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1018  */
1019 enum _ecore_status_t
1020 ecore_mcp_get_nvm_image_att(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1021                             enum ecore_nvm_images image_id,
1022                             struct ecore_nvm_image_att *p_image_att);
1023
1024 /**
1025  * @brief Allows reading a whole nvram image
1026  *
1027  * @param p_hwfn
1028  * @param p_ptt
1029  * @param image_id - image requested for reading
1030  * @param p_buffer - allocated buffer into which to fill data
1031  * @param buffer_len - length of the allocated buffer.
1032  *
1033  * @return ECORE_SUCCESS iff p_buffer now contains the nvram image.
1034  */
1035 enum _ecore_status_t ecore_mcp_get_nvm_image(struct ecore_hwfn *p_hwfn,
1036                                              struct ecore_ptt *p_ptt,
1037                                              enum ecore_nvm_images image_id,
1038                                              u8 *p_buffer, u32 buffer_len);
1039
1040 /**
1041  * @brief Read from sfp
1042  *
1043  *  @param p_hwfn - hw function
1044  *  @param p_ptt  - PTT required for register access
1045  *  @param port   - transceiver port
1046  *  @param addr   - I2C address
1047  *  @param offset - offset in sfp
1048  *  @param len    - buffer length
1049  *  @param p_buf  - buffer to read into
1050  *
1051  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1052  */
1053 enum _ecore_status_t ecore_mcp_phy_sfp_read(struct ecore_hwfn *p_hwfn,
1054                                             struct ecore_ptt *p_ptt,
1055                                             u32 port, u32 addr, u32 offset,
1056                                             u32 len, u8 *p_buf);
1057
1058 /**
1059  * @brief Write to sfp
1060  *
1061  *  @param p_hwfn - hw function
1062  *  @param p_ptt  - PTT required for register access
1063  *  @param port   - transceiver port
1064  *  @param addr   - I2C address
1065  *  @param offset - offset in sfp
1066  *  @param len    - buffer length
1067  *  @param p_buf  - buffer to write from
1068  *
1069  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1070  */
1071 enum _ecore_status_t ecore_mcp_phy_sfp_write(struct ecore_hwfn *p_hwfn,
1072                                              struct ecore_ptt *p_ptt,
1073                                              u32 port, u32 addr, u32 offset,
1074                                              u32 len, u8 *p_buf);
1075
1076 /**
1077  * @brief Gpio read
1078  *
1079  *  @param p_hwfn    - hw function
1080  *  @param p_ptt     - PTT required for register access
1081  *  @param gpio      - gpio number
1082  *  @param gpio_val  - value read from gpio
1083  *
1084  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1085  */
1086 enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
1087                                          struct ecore_ptt *p_ptt,
1088                                          u16 gpio, u32 *gpio_val);
1089
1090 /**
1091  * @brief Gpio write
1092  *
1093  *  @param p_hwfn    - hw function
1094  *  @param p_ptt     - PTT required for register access
1095  *  @param gpio      - gpio number
1096  *  @param gpio_val  - value to write to gpio
1097  *
1098  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1099  */
1100 enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
1101                                           struct ecore_ptt *p_ptt,
1102                                           u16 gpio, u16 gpio_val);
1103
1104 /**
1105  * @brief Gpio get information
1106  *
1107  *  @param p_hwfn          - hw function
1108  *  @param p_ptt           - PTT required for register access
1109  *  @param gpio            - gpio number
1110  *  @param gpio_direction  - gpio is output (0) or input (1)
1111  *  @param gpio_ctrl       - gpio control is uninitialized (0),
1112  *                         path 0 (1), path 1 (2) or shared(3)
1113  *
1114  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1115  */
1116 enum _ecore_status_t ecore_mcp_gpio_info(struct ecore_hwfn *p_hwfn,
1117                                          struct ecore_ptt *p_ptt,
1118                                          u16 gpio, u32 *gpio_direction,
1119                                          u32 *gpio_ctrl);
1120
1121 /**
1122  * @brief Bist register test
1123  *
1124  *  @param p_hwfn    - hw function
1125  *  @param p_ptt     - PTT required for register access
1126  *
1127  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1128  */
1129 enum _ecore_status_t ecore_mcp_bist_register_test(struct ecore_hwfn *p_hwfn,
1130                                                    struct ecore_ptt *p_ptt);
1131
1132 /**
1133  * @brief Bist clock test
1134  *
1135  *  @param p_hwfn    - hw function
1136  *  @param p_ptt     - PTT required for register access
1137  *
1138  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1139  */
1140 enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
1141                                                 struct ecore_ptt *p_ptt);
1142
1143 /**
1144  * @brief Bist nvm test - get number of images
1145  *
1146  *  @param p_hwfn       - hw function
1147  *  @param p_ptt        - PTT required for register access
1148  *  @param num_images   - number of images if operation was
1149  *                        successful. 0 if not.
1150  *
1151  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1152  */
1153 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images(struct ecore_hwfn *p_hwfn,
1154                                                             struct ecore_ptt *p_ptt,
1155                                                             u32 *num_images);
1156
1157 /**
1158  * @brief Bist nvm test - get image attributes by index
1159  *
1160  *  @param p_hwfn      - hw function
1161  *  @param p_ptt       - PTT required for register access
1162  *  @param p_image_att - Attributes of image
1163  *  @param image_index - Index of image to get information for
1164  *
1165  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1166  */
1167 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_image_att(struct ecore_hwfn *p_hwfn,
1168                                                            struct ecore_ptt *p_ptt,
1169                                                            struct bist_nvm_image_att *p_image_att,
1170                                                            u32 image_index);
1171
1172 /**
1173  * @brief ecore_mcp_get_temperature_info - get the status of the temperature
1174  *                                         sensors
1175  *
1176  *  @param p_hwfn        - hw function
1177  *  @param p_ptt         - PTT required for register access
1178  *  @param p_temp_status - A pointer to an ecore_temperature_info structure to
1179  *                         be filled with the temperature data
1180  *
1181  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1182  */
1183 enum _ecore_status_t
1184 ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
1185                                struct ecore_ptt *p_ptt,
1186                                struct ecore_temperature_info *p_temp_info);
1187
1188 /**
1189  * @brief Get MBA versions - get MBA sub images versions
1190  *
1191  *  @param p_hwfn      - hw function
1192  *  @param p_ptt       - PTT required for register access
1193  *  @param p_mba_vers  - MBA versions array to fill
1194  *
1195  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1196  */
1197 enum _ecore_status_t ecore_mcp_get_mba_versions(
1198         struct ecore_hwfn *p_hwfn,
1199         struct ecore_ptt *p_ptt,
1200         struct ecore_mba_vers *p_mba_vers);
1201
1202 /**
1203  * @brief Count memory ecc events
1204  *
1205  *  @param p_hwfn      - hw function
1206  *  @param p_ptt       - PTT required for register access
1207  *  @param num_events  - number of memory ecc events
1208  *
1209  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1210  */
1211 enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,
1212                                               struct ecore_ptt *p_ptt,
1213                                               u64 *num_events);
1214
1215 struct ecore_mdump_info {
1216         u32 reason;
1217         u32 version;
1218         u32 config;
1219         u32 epoch;
1220         u32 num_of_logs;
1221         u32 valid_logs;
1222 };
1223
1224 /**
1225  * @brief - Gets the MFW crash dump configuration and logs info.
1226  *
1227  * @param p_hwfn
1228  * @param p_ptt
1229  * @param p_mdump_info
1230  *
1231  * @param return ECORE_SUCCESS upon success.
1232  */
1233 enum _ecore_status_t
1234 ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1235                          struct ecore_mdump_info *p_mdump_info);
1236
1237 /**
1238  * @brief - Clears the MFW crash dump logs.
1239  *
1240  * @param p_hwfn
1241  * @param p_ptt
1242  *
1243  * @param return ECORE_SUCCESS upon success.
1244  */
1245 enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,
1246                                                 struct ecore_ptt *p_ptt);
1247
1248 /**
1249  * @brief - Gets the LLDP MAC address.
1250  *
1251  * @param p_hwfn
1252  * @param p_ptt
1253  * @param lldp_mac_addr - a buffer to be filled with the read LLDP MAC address.
1254  *
1255  * @param return ECORE_SUCCESS upon success.
1256  */
1257 enum _ecore_status_t ecore_mcp_get_lldp_mac(struct ecore_hwfn *p_hwfn,
1258                                             struct ecore_ptt *p_ptt,
1259                                             u8 lldp_mac_addr[ETH_ALEN]);
1260
1261 /**
1262  * @brief - Sets the LLDP MAC address.
1263  *
1264  * @param p_hwfn
1265  * @param p_ptt
1266  * @param lldp_mac_addr - a buffer with the LLDP MAC address to be written.
1267  *
1268  * @param return ECORE_SUCCESS upon success.
1269  */
1270 enum _ecore_status_t ecore_mcp_set_lldp_mac(struct ecore_hwfn *p_hwfn,
1271                                             struct ecore_ptt *p_ptt,
1272                                             u8 lldp_mac_addr[ETH_ALEN]);
1273
1274 /**
1275  * @brief - Processes the TLV request from MFW i.e., get the required TLV info
1276  *          from the ecore client and send it to the MFW.
1277  *
1278  * @param p_hwfn
1279  * @param p_ptt
1280  *
1281  * @param return ECORE_SUCCESS upon success.
1282  */
1283 enum _ecore_status_t ecore_mfw_process_tlv_req(struct ecore_hwfn *p_hwfn,
1284                                                struct ecore_ptt *p_ptt);
1285
1286 /**
1287  * @brief - Update fcoe vlan id value to the MFW.
1288  *
1289  * @param p_hwfn
1290  * @param p_ptt
1291  * @param vlan - fcoe vlan
1292  *
1293  * @param return ECORE_SUCCESS upon success.
1294  */
1295 enum _ecore_status_t
1296 ecore_mcp_update_fcoe_cvid(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1297                            u16 vlan);
1298
1299 /**
1300  * @brief - Update fabric name (wwn) value to the MFW.
1301  *
1302  * @param p_hwfn
1303  * @param p_ptt
1304  * @param wwn - world wide name
1305  *
1306  * @param return ECORE_SUCCESS upon success.
1307  */
1308 enum _ecore_status_t
1309 ecore_mcp_update_fcoe_fabric_name(struct ecore_hwfn *p_hwfn,
1310                                   struct ecore_ptt *p_ptt, u8 *wwn);
1311 #endif