2 * Copyright (c) 2017-2018 Cavium, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
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.
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.
31 #ifndef __ECORE_DEV_API_H__
32 #define __ECORE_DEV_API_H__
34 #include "ecore_status.h"
35 #include "ecore_chain.h"
36 #include "ecore_int_api.h"
38 #define ECORE_DEFAULT_ILT_PAGE_SIZE 4
40 struct ecore_wake_info {
48 * @brief ecore_init_dp - initialize the debug level
55 void ecore_init_dp(struct ecore_dev *p_dev,
61 * @brief ecore_init_struct - initialize the device structure to
66 enum _ecore_status_t ecore_init_struct(struct ecore_dev *p_dev);
69 * @brief ecore_resc_free -
73 void ecore_resc_free(struct ecore_dev *p_dev);
76 * @brief ecore_resc_alloc -
80 * @return enum _ecore_status_t
82 enum _ecore_status_t ecore_resc_alloc(struct ecore_dev *p_dev);
85 * @brief ecore_resc_setup -
89 void ecore_resc_setup(struct ecore_dev *p_dev);
91 enum ecore_mfw_timeout_fallback {
92 ECORE_TO_FALLBACK_TO_NONE,
93 ECORE_TO_FALLBACK_TO_DEFAULT,
94 ECORE_TO_FALLBACK_FAIL_LOAD,
97 enum ecore_override_force_load {
98 ECORE_OVERRIDE_FORCE_LOAD_NONE,
99 ECORE_OVERRIDE_FORCE_LOAD_ALWAYS,
100 ECORE_OVERRIDE_FORCE_LOAD_NEVER,
103 struct ecore_drv_load_params {
104 /* Indicates whether the driver is running over a crash kernel.
105 * As part of the load request, this will be used for providing the
106 * driver role to the MFW.
107 * In case of a crash kernel over PDA - this should be set to false.
109 bool is_crash_kernel;
111 /* The timeout value that the MFW should use when locking the engine for
112 * the driver load process.
113 * A value of '0' means the default value, and '255' means no timeout.
116 #define ECORE_LOAD_REQ_LOCK_TO_DEFAULT 0
117 #define ECORE_LOAD_REQ_LOCK_TO_NONE 255
119 /* Action to take in case the MFW doesn't support timeout values other
120 * then default and none.
122 enum ecore_mfw_timeout_fallback mfw_timeout_fallback;
124 /* Avoid engine reset when first PF loads on it */
125 bool avoid_eng_reset;
127 /* Allow overriding the default force load behavior */
128 enum ecore_override_force_load override_force_load;
131 struct ecore_hw_init_params {
132 /* Tunneling parameters */
133 struct ecore_tunnel_info *p_tunn;
137 /* Interrupt mode [msix, inta, etc.] to use */
138 enum ecore_int_mode int_mode;
140 /* NPAR tx switching to be used for vports configured for tx-switching */
141 bool allow_npar_tx_switch;
143 /* PCI relax ordering to be configured by MFW or ecore client */
144 enum ecore_pci_rlx_odr pci_rlx_odr_mode;
146 /* Binary fw data pointer in binary fw file */
147 const u8 *bin_fw_data;
149 /* Driver load parameters */
150 struct ecore_drv_load_params *p_drv_load_params;
152 /* Avoid engine affinity for RoCE/storage in case of CMT mode */
153 bool avoid_eng_affin;
157 * @brief ecore_hw_init -
162 * @return enum _ecore_status_t
164 enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,
165 struct ecore_hw_init_params *p_params);
168 * @brief ecore_hw_timers_stop_all -
174 void ecore_hw_timers_stop_all(struct ecore_dev *p_dev);
177 * @brief ecore_hw_stop -
181 * @return enum _ecore_status_t
183 enum _ecore_status_t ecore_hw_stop(struct ecore_dev *p_dev);
186 * @brief ecore_hw_stop_fastpath -should be called incase
187 * slowpath is still required for the device,
188 * but fastpath is not.
192 * @return enum _ecore_status_t
194 enum _ecore_status_t ecore_hw_stop_fastpath(struct ecore_dev *p_dev);
198 * @brief ecore_hw_hibernate_prepare -should be called when
199 * the system is going into the hibernate state
204 void ecore_hw_hibernate_prepare(struct ecore_dev *p_dev);
207 * @brief ecore_hw_hibernate_resume -should be called when the system is
208 resuming from D3 power state and before calling ecore_hw_init.
213 void ecore_hw_hibernate_resume(struct ecore_dev *p_dev);
218 * @brief ecore_hw_start_fastpath -restart fastpath traffic,
219 * only if hw_stop_fastpath was called
223 * @return enum _ecore_status_t
225 enum _ecore_status_t ecore_hw_start_fastpath(struct ecore_hwfn *p_hwfn);
227 enum ecore_hw_prepare_result {
228 ECORE_HW_PREPARE_SUCCESS,
230 /* FAILED results indicate probe has failed & cleaned up */
231 ECORE_HW_PREPARE_FAILED_ENG2,
232 ECORE_HW_PREPARE_FAILED_ME,
233 ECORE_HW_PREPARE_FAILED_MEM,
234 ECORE_HW_PREPARE_FAILED_DEV,
235 ECORE_HW_PREPARE_FAILED_NVM,
237 /* BAD results indicate probe is passed even though some wrongness
238 * has occurred; Trying to actually use [I.e., hw_init()] might have
239 * dire reprecautions.
241 ECORE_HW_PREPARE_BAD_IOV,
242 ECORE_HW_PREPARE_BAD_MCP,
243 ECORE_HW_PREPARE_BAD_IGU,
246 struct ecore_hw_prepare_params {
247 /* Personality to initialize */
250 /* Force the driver's default resource allocation */
253 /* Check the reg_fifo after any register access */
256 /* Request the MFW to initiate PF FLR */
257 bool initiate_pf_flr;
259 /* The OS Epoch time in seconds */
262 /* Allow the MFW to collect a crash dump */
265 /* Allow prepare to pass even if some initializations are failing.
266 * If set, the `p_prepare_res' field would be set with the return,
267 * and might allow probe to pass even if there are certain issues.
269 bool b_relaxed_probe;
270 enum ecore_hw_prepare_result p_relaxed_res;
274 * @brief ecore_hw_prepare -
279 * @return enum _ecore_status_t
281 enum _ecore_status_t ecore_hw_prepare(struct ecore_dev *p_dev,
282 struct ecore_hw_prepare_params *p_params);
285 * @brief ecore_hw_remove -
289 void ecore_hw_remove(struct ecore_dev *p_dev);
292 * @brief ecore_set_nwuf_reg -
295 * @param reg_idx - Index of the pattern register
296 * @param pattern_size - size of pattern
297 * @param crc - CRC value of patter & mask
299 * @return enum _ecore_status_t
301 enum _ecore_status_t ecore_set_nwuf_reg(struct ecore_dev *p_dev,
302 u32 reg_idx, u32 pattern_size, u32 crc);
305 * @brief ecore_get_wake_info - get magic packet buffer
309 * @param wake_info - pointer to ecore_wake_info buffer
311 * @return enum _ecore_status_t
313 enum _ecore_status_t ecore_get_wake_info(struct ecore_hwfn *p_hwfn,
314 struct ecore_ptt *p_ptt,
315 struct ecore_wake_info *wake_info);
318 * @brief ecore_wol_buffer_clear - Clear magic package buffer
325 void ecore_wol_buffer_clear(struct ecore_hwfn *p_hwfn,
326 struct ecore_ptt *p_ptt);
329 * @brief ecore_ptt_acquire - Allocate a PTT window
331 * Should be called at the entry point to the driver (at the beginning of an
336 * @return struct ecore_ptt
338 struct ecore_ptt *ecore_ptt_acquire(struct ecore_hwfn *p_hwfn);
341 * @brief ecore_ptt_release - Release PTT Window
343 * Should be called at the end of a flow - at the end of the function that
350 void ecore_ptt_release(struct ecore_hwfn *p_hwfn,
351 struct ecore_ptt *p_ptt);
354 * @brief ecore_get_dev_name - get device name, e.g., "BB B0"
357 * @param name - this is where the name will be written to
358 * @param max_chars - maximum chars that can be written to name including '\0'
360 void ecore_get_dev_name(struct ecore_dev *p_dev,
364 #ifndef __EXTRACT__LINUX__IF__
365 struct ecore_eth_stats_common {
366 u64 no_buff_discards;
367 u64 packet_too_big_discard;
375 u64 mftag_filter_discards;
376 u64 mac_filter_discards;
383 u64 tx_err_drop_pkts;
384 u64 tpa_coalesced_pkts;
385 u64 tpa_coalesced_events;
387 u64 tpa_not_coalesced_pkts;
388 u64 tpa_coalesced_bytes;
391 u64 rx_64_byte_packets;
392 u64 rx_65_to_127_byte_packets;
393 u64 rx_128_to_255_byte_packets;
394 u64 rx_256_to_511_byte_packets;
395 u64 rx_512_to_1023_byte_packets;
396 u64 rx_1024_to_1518_byte_packets;
398 u64 rx_mac_crtl_frames;
402 u64 rx_carrier_errors;
403 u64 rx_oversize_packets;
405 u64 rx_undersize_packets;
407 u64 tx_64_byte_packets;
408 u64 tx_65_to_127_byte_packets;
409 u64 tx_128_to_255_byte_packets;
410 u64 tx_256_to_511_byte_packets;
411 u64 tx_512_to_1023_byte_packets;
412 u64 tx_1024_to_1518_byte_packets;
418 u64 rx_mac_uc_packets;
419 u64 rx_mac_mc_packets;
420 u64 rx_mac_bc_packets;
421 u64 rx_mac_frames_ok;
423 u64 tx_mac_uc_packets;
424 u64 tx_mac_mc_packets;
425 u64 tx_mac_bc_packets;
426 u64 tx_mac_ctrl_frames;
427 u64 link_change_count;
430 struct ecore_eth_stats_bb {
431 u64 rx_1519_to_1522_byte_packets;
432 u64 rx_1519_to_2047_byte_packets;
433 u64 rx_2048_to_4095_byte_packets;
434 u64 rx_4096_to_9216_byte_packets;
435 u64 rx_9217_to_16383_byte_packets;
436 u64 tx_1519_to_2047_byte_packets;
437 u64 tx_2048_to_4095_byte_packets;
438 u64 tx_4096_to_9216_byte_packets;
439 u64 tx_9217_to_16383_byte_packets;
440 u64 tx_lpi_entry_count;
441 u64 tx_total_collisions;
444 struct ecore_eth_stats_ah {
445 u64 rx_1519_to_max_byte_packets;
446 u64 tx_1519_to_max_byte_packets;
449 struct ecore_eth_stats {
450 struct ecore_eth_stats_common common;
452 struct ecore_eth_stats_bb bb;
453 struct ecore_eth_stats_ah ah;
458 enum ecore_dmae_address_type_t {
459 ECORE_DMAE_ADDRESS_HOST_VIRT,
460 ECORE_DMAE_ADDRESS_HOST_PHYS,
461 ECORE_DMAE_ADDRESS_GRC
464 /* value of flags If ECORE_DMAE_FLAG_RW_REPL_SRC flag is set and the
465 * source is a block of length DMAE_MAX_RW_SIZE and the
466 * destination is larger, the source block will be duplicated as
467 * many times as required to fill the destination block. This is
468 * used mostly to write a zeroed buffer to destination address
471 #define ECORE_DMAE_FLAG_RW_REPL_SRC 0x00000001
472 #define ECORE_DMAE_FLAG_VF_SRC 0x00000002
473 #define ECORE_DMAE_FLAG_VF_DST 0x00000004
474 #define ECORE_DMAE_FLAG_COMPLETION_DST 0x00000008
475 #define ECORE_DMAE_FLAG_PORT 0x00000010
476 #define ECORE_DMAE_FLAG_PF_SRC 0x00000020
477 #define ECORE_DMAE_FLAG_PF_DST 0x00000040
479 struct ecore_dmae_params {
480 u32 flags; /* consists of ECORE_DMAE_FLAG_* values */
489 * @brief ecore_dmae_host2grc - copy data from source addr to
490 * dmae registers using the given ptt
495 * @param grc_addr (dmae_data_offset)
496 * @param size_in_dwords
497 * @param p_params (default parameters will be used in case of OSAL_NULL)
499 * @return enum _ecore_status_t
502 ecore_dmae_host2grc(struct ecore_hwfn *p_hwfn,
503 struct ecore_ptt *p_ptt,
507 struct ecore_dmae_params *p_params);
510 * @brief ecore_dmae_grc2host - Read data from dmae data offset
511 * to source address using the given ptt
514 * @param grc_addr (dmae_data_offset)
516 * @param size_in_dwords
517 * @param p_params (default parameters will be used in case of OSAL_NULL)
519 * @return enum _ecore_status_t
522 ecore_dmae_grc2host(struct ecore_hwfn *p_hwfn,
523 struct ecore_ptt *p_ptt,
525 dma_addr_t dest_addr,
527 struct ecore_dmae_params *p_params);
530 * @brief ecore_dmae_host2host - copy data from to source address
531 * to a destination adress (for SRIOV) using the given ptt
537 * @param size_in_dwords
538 * @param p_params (default parameters will be used in case of OSAL_NULL)
540 * @return enum _ecore_status_t
543 ecore_dmae_host2host(struct ecore_hwfn *p_hwfn,
544 struct ecore_ptt *p_ptt,
545 dma_addr_t source_addr,
546 dma_addr_t dest_addr,
548 struct ecore_dmae_params *p_params);
551 * @brief ecore_chain_alloc - Allocate and initialize a chain
554 * @param intended_use
560 * @return enum _ecore_status_t
563 ecore_chain_alloc(struct ecore_dev *p_dev,
564 enum ecore_chain_use_mode intended_use,
565 enum ecore_chain_mode mode,
566 enum ecore_chain_cnt_type cnt_type,
568 osal_size_t elem_size,
569 struct ecore_chain *p_chain,
570 struct ecore_chain_ext_pbl *ext_pbl);
573 * @brief ecore_chain_free - Free chain DMA memory
578 void ecore_chain_free(struct ecore_dev *p_dev,
579 struct ecore_chain *p_chain);
582 * @@brief ecore_fw_l2_queue - Get absolute L2 queue ID
585 * @param src_id - relative to p_hwfn
586 * @param dst_id - absolute per engine
588 * @return enum _ecore_status_t
590 enum _ecore_status_t ecore_fw_l2_queue(struct ecore_hwfn *p_hwfn,
595 * @@brief ecore_fw_vport - Get absolute vport ID
598 * @param src_id - relative to p_hwfn
599 * @param dst_id - absolute per engine
601 * @return enum _ecore_status_t
603 enum _ecore_status_t ecore_fw_vport(struct ecore_hwfn *p_hwfn,
608 * @@brief ecore_fw_rss_eng - Get absolute RSS engine ID
611 * @param src_id - relative to p_hwfn
612 * @param dst_id - absolute per engine
614 * @return enum _ecore_status_t
616 enum _ecore_status_t ecore_fw_rss_eng(struct ecore_hwfn *p_hwfn,
621 * @brief ecore_llh_get_num_ppfid - Return the allocated number of LLH filter
622 * banks that are allocated to the PF.
626 * @return u8 - Number of LLH filter banks
628 u8 ecore_llh_get_num_ppfid(struct ecore_dev *p_dev);
637 * @brief ecore_llh_get_l2_affinity_hint - Return the hint for the L2 affinity
641 * @return enum ecore_eng - L2 affintiy hint
643 enum ecore_eng ecore_llh_get_l2_affinity_hint(struct ecore_dev *p_dev);
646 * @brief ecore_llh_set_ppfid_affinity - Set the engine affinity for the given
650 * @param ppfid - relative within the allocated ppfids ('0' is the default one).
653 * @return enum _ecore_status_t
655 enum _ecore_status_t ecore_llh_set_ppfid_affinity(struct ecore_dev *p_dev,
656 u8 ppfid, enum ecore_eng eng);
659 * @brief ecore_llh_set_roce_affinity - Set the RoCE engine affinity
664 * @return enum _ecore_status_t
666 enum _ecore_status_t ecore_llh_set_roce_affinity(struct ecore_dev *p_dev,
670 * @brief ecore_llh_add_mac_filter - Add a LLH MAC filter into the given filter
674 * @param ppfid - relative within the allocated ppfids ('0' is the default one).
675 * @param mac_addr - MAC to add
677 * @return enum _ecore_status_t
679 enum _ecore_status_t ecore_llh_add_mac_filter(struct ecore_dev *p_dev, u8 ppfid,
680 u8 mac_addr[ETH_ALEN]);
683 * @brief ecore_llh_remove_mac_filter - Remove a LLH MAC filter from the given
687 * @param ppfid - relative within the allocated ppfids ('0' is the default one).
688 * @param mac_addr - MAC to remove
690 void ecore_llh_remove_mac_filter(struct ecore_dev *p_dev, u8 ppfid,
691 u8 mac_addr[ETH_ALEN]);
693 enum ecore_llh_prot_filter_type_t {
694 ECORE_LLH_FILTER_ETHERTYPE,
695 ECORE_LLH_FILTER_TCP_SRC_PORT,
696 ECORE_LLH_FILTER_TCP_DEST_PORT,
697 ECORE_LLH_FILTER_TCP_SRC_AND_DEST_PORT,
698 ECORE_LLH_FILTER_UDP_SRC_PORT,
699 ECORE_LLH_FILTER_UDP_DEST_PORT,
700 ECORE_LLH_FILTER_UDP_SRC_AND_DEST_PORT
704 * @brief ecore_llh_add_protocol_filter - Add a LLH protocol filter into the
708 * @param ppfid - relative within the allocated ppfids ('0' is the default one).
709 * @param type - type of filters and comparing
710 * @param source_port_or_eth_type - source port or ethertype to add
711 * @param dest_port - destination port to add
713 * @return enum _ecore_status_t
716 ecore_llh_add_protocol_filter(struct ecore_dev *p_dev, u8 ppfid,
717 enum ecore_llh_prot_filter_type_t type,
718 u16 source_port_or_eth_type, u16 dest_port);
721 * @brief ecore_llh_remove_protocol_filter - Remove a LLH protocol filter from
722 * the given filter bank.
725 * @param ppfid - relative within the allocated ppfids ('0' is the default one).
726 * @param type - type of filters and comparing
727 * @param source_port_or_eth_type - source port or ethertype to add
728 * @param dest_port - destination port to add
730 void ecore_llh_remove_protocol_filter(struct ecore_dev *p_dev, u8 ppfid,
731 enum ecore_llh_prot_filter_type_t type,
732 u16 source_port_or_eth_type,
736 * @brief ecore_llh_clear_ppfid_filters - Remove all LLH filters from the given
740 * @param ppfid - relative within the allocated ppfids ('0' is the default one).
742 void ecore_llh_clear_ppfid_filters(struct ecore_dev *p_dev, u8 ppfid);
745 * @brief ecore_llh_clear_all_filters - Remove all LLH filters
749 void ecore_llh_clear_all_filters(struct ecore_dev *p_dev);
752 * @brief ecore_llh_set_function_as_default - set function as defult per port
758 ecore_llh_set_function_as_default(struct ecore_hwfn *p_hwfn,
759 struct ecore_ptt *p_ptt);
762 *@brief Cleanup of previous driver remains prior to load
766 * @param id - For PF, engine-relative. For VF, PF-relative.
767 * @param is_vf - true iff cleanup is made for a VF.
769 * @return enum _ecore_status_t
771 enum _ecore_status_t ecore_final_cleanup(struct ecore_hwfn *p_hwfn,
772 struct ecore_ptt *p_ptt,
777 * @brief ecore_get_queue_coalesce - Retrieve coalesce value for a given queue.
780 * @param p_coal - store coalesce value read from the hardware.
783 * @return enum _ecore_status_t
786 ecore_get_queue_coalesce(struct ecore_hwfn *p_hwfn, u16 *coal,
790 * @brief ecore_set_queue_coalesce - Configure coalesce parameters for Rx and
791 * Tx queue. The fact that we can configure coalescing to up to 511, but on
792 * varying accuracy [the bigger the value the less accurate] up to a mistake
793 * of 3usec for the highest values.
794 * While the API allows setting coalescing per-qid, all queues sharing a SB
795 * should be in same range [i.e., either 0-0x7f, 0x80-0xff or 0x100-0x1ff]
796 * otherwise configuration would break.
799 * @param rx_coal - Rx Coalesce value in micro seconds.
800 * @param tx_coal - TX Coalesce value in micro seconds.
803 * @return enum _ecore_status_t
806 ecore_set_queue_coalesce(struct ecore_hwfn *p_hwfn, u16 rx_coal,
807 u16 tx_coal, void *p_handle);
810 * @brief - Recalculate feature distributions based on HW resources and
811 * user inputs. Currently this affects RDMA_CNQ, PF_L2_QUE and VF_L2_QUE.
812 * As a result, this must not be called while RDMA is active or while VFs
817 void ecore_hw_set_feat(struct ecore_hwfn *p_hwfn);
820 * @brief ecore_pglueb_set_pfid_enable - Enable or disable PCI BUS MASTER
824 * @param b_enable - true/false
826 * @return enum _ecore_status_t
828 enum _ecore_status_t ecore_pglueb_set_pfid_enable(struct ecore_hwfn *p_hwfn,
829 struct ecore_ptt *p_ptt,
832 #ifndef __EXTRACT__LINUX__IF__
833 enum ecore_db_rec_width {
838 enum ecore_db_rec_space {
845 * @brief db_recovery_add - add doorbell information to the doorbell
846 * recovery mechanism.
849 * @param db_addr - doorbell address
850 * @param db_data - address of where db_data is stored
851 * @param db_width - doorbell is 32b pr 64b
852 * @param db_space - doorbell recovery addresses are user or kernel space
854 enum _ecore_status_t ecore_db_recovery_add(struct ecore_dev *p_dev,
855 void OSAL_IOMEM *db_addr,
857 enum ecore_db_rec_width db_width,
858 enum ecore_db_rec_space db_space);
861 * @brief db_recovery_del - remove doorbell information from the doorbell
862 * recovery mechanism. db_data serves as key (db_addr is not unique).
865 * @param db_addr - doorbell address
866 * @param db_data - address where db_data is stored. Serves as key for the
869 enum _ecore_status_t ecore_db_recovery_del(struct ecore_dev *p_dev,
870 void OSAL_IOMEM *db_addr,
873 #ifndef __EXTRACT__LINUX__THROW__
874 static OSAL_INLINE bool ecore_is_mf_ufp(struct ecore_hwfn *p_hwfn)
876 return !!OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits);
881 * @brief ecore_set_dev_access_enable - Enable or disable access to the device
884 * @param b_enable - true/false
886 void ecore_set_dev_access_enable(struct ecore_dev *p_dev, bool b_enable);
889 * @brief ecore_set_ilt_page_size - Set ILT page size
894 * @return enum _ecore_status_t
896 void ecore_set_ilt_page_size(struct ecore_dev *p_dev, u8 ilt_size);