Lines Matching refs:adapter

468 #define for_each_port(adapter, iter) \  argument
469 for (iter = 0; iter < (adapter)->params.nports; ++iter)
471 static inline int is_ftid(const struct adapter *sc, u_int tid) in is_ftid()
478 static inline int is_hpftid(const struct adapter *sc, u_int tid) in is_hpftid()
485 static inline int is_etid(const struct adapter *sc, u_int tid) in is_etid()
492 static inline int is_offload(const struct adapter *adap) in is_offload()
497 static inline int is_ethoffload(const struct adapter *adap) in is_ethoffload()
502 static inline int is_hashfilter(const struct adapter *adap) in is_hashfilter()
507 static inline int is_ktls(const struct adapter *adap) in is_ktls()
512 static inline int chip_id(struct adapter *adap) in chip_id()
517 static inline int chip_rev(struct adapter *adap) in chip_rev()
522 static inline int is_t4(struct adapter *adap) in is_t4()
527 static inline int is_t5(struct adapter *adap) in is_t5()
532 static inline int is_t6(struct adapter *adap) in is_t6()
537 static inline int is_fpga(struct adapter *adap) in is_fpga()
542 static inline unsigned int core_ticks_per_usec(const struct adapter *adap) in core_ticks_per_usec()
547 static inline unsigned int us_to_core_ticks(const struct adapter *adap, in us_to_core_ticks()
553 static inline unsigned int core_ticks_to_us(const struct adapter *adapter, in core_ticks_to_us() argument
557 return ((ticks * 1000 + adapter->params.vpd.cclk/2) / in core_ticks_to_us()
558 adapter->params.vpd.cclk); in core_ticks_to_us()
561 static inline unsigned int dack_ticks_to_usec(const struct adapter *adap, in dack_ticks_to_usec()
567 static inline u_int us_to_tcp_ticks(const struct adapter *adap, u_long us) in us_to_tcp_ticks()
573 static inline u_int tcp_ticks_to_us(const struct adapter *adap, u_int ticks) in tcp_ticks_to_us()
579 void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, u32 val);
581 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
583 int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
585 void t4_report_fw_error(struct adapter *adap);
587 static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox, in t4_wr_mbox_timeout()
595 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox()
601 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox_ns()
607 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
610 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
614 u32 t4_hw_pci_read_cfg4(adapter_t *adapter, int reg);
618 void t4_intr_enable(struct adapter *adapter);
619 void t4_intr_disable(struct adapter *adapter);
620 void t4_intr_clear(struct adapter *adapter);
621 bool t4_slow_intr_handler(struct adapter *adapter, bool verbose);
624 int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
626 int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port);
627 int t4_seeprom_read(struct adapter *adapter, u32 addr, u32 *data);
628 int t4_seeprom_write(struct adapter *adapter, u32 addr, u32 data);
630 int t4_seeprom_wp(struct adapter *adapter, int enable);
631 int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords,
633 int t4_write_flash(struct adapter *adapter, unsigned int addr,
635 int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
636 int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
637 int t5_fw_init_extern_mem(struct adapter *adap);
638 int t4_load_bootcfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
639 int t4_load_boot(struct adapter *adap, u8 *boot_data,
641 int t4_flash_erase_sectors(struct adapter *adapter, int start, int end);
642 int t4_flash_cfg_addr(struct adapter *adapter);
643 int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
644 int t4_get_fw_version(struct adapter *adapter, u32 *vers);
645 int t4_get_fw_hdr(struct adapter *adapter, struct fw_hdr *hdr);
646 int t4_get_bs_version(struct adapter *adapter, u32 *vers);
647 int t4_get_tp_version(struct adapter *adapter, u32 *vers);
648 int t4_get_exprom_version(struct adapter *adapter, u32 *vers);
649 int t4_get_scfg_version(struct adapter *adapter, u32 *vers);
650 int t4_get_vpd_version(struct adapter *adapter, u32 *vers);
651 int t4_get_version_info(struct adapter *adapter);
652 int t4_init_hw(struct adapter *adapter, u32 fw_params);
654 int t4_prep_adapter(struct adapter *adapter, u32 *buf);
655 int t4_shutdown_adapter(struct adapter *adapter);
656 int t4_init_devlog_params(struct adapter *adapter, int fw_attach);
657 int t4_init_sge_params(struct adapter *adapter);
658 int t4_init_tp_params(struct adapter *adap);
659 int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
660 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id);
661 void t4_fatal_err(struct adapter *adapter, bool fw_error);
662 int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp,
664 void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp,
666 int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
668 int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode,
670 int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid,
673 int t4_read_rss(struct adapter *adapter, u16 *entries);
674 void t4_read_rss_key(struct adapter *adapter, u32 *key, bool sleep_ok);
675 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx,
677 void t4_read_rss_pf_config(struct adapter *adapter, unsigned int index,
679 void t4_write_rss_pf_config(struct adapter *adapter, unsigned int index,
681 void t4_read_rss_vf_config(struct adapter *adapter, unsigned int index,
683 void t4_write_rss_vf_config(struct adapter *adapter, unsigned int index,
685 u32 t4_read_rss_pf_map(struct adapter *adapter, bool sleep_ok);
686 void t4_write_rss_pf_map(struct adapter *adapter, u32 pfmap, bool sleep_ok);
687 u32 t4_read_rss_pf_mask(struct adapter *adapter, bool sleep_ok);
688 void t4_write_rss_pf_mask(struct adapter *adapter, u32 pfmask, bool sleep_ok);
689 int t4_mps_set_active_ports(struct adapter *adap, unsigned int port_mask);
690 void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
691 void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
692 void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres);
693 int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data, size_t n);
694 int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data, size_t n);
695 int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n,
697 int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n,
699 int t4_cim_ctl_read(struct adapter *adap, unsigned int addr, unsigned int n,
701 int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
702 void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
704 void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
705 int t4_get_flash_params(struct adapter *adapter);
707 u32 t4_read_pcie_cfg4(struct adapter *adap, int reg, int drv_fw_attach);
708 int t4_mc_read(struct adapter *adap, int idx, u32 addr,
710 int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity);
711 int t4_mem_read(struct adapter *adap, int mtype, u32 addr, u32 size,
713 void t4_idma_monitor_init(struct adapter *adapter,
715 void t4_idma_monitor(struct adapter *adapter,
718 int t4_set_vf_mac(struct adapter *adapter, unsigned int pf, unsigned int vf,
721 unsigned int t4_get_regs_len(struct adapter *adapter);
722 void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size);
725 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
726 void t4_get_port_stats_offset(struct adapter *adap, int idx,
729 void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p);
730 void t4_clr_port_stats(struct adapter *adap, int idx);
732 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
733 void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]);
734 void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]);
735 void t4_get_tx_sched(struct adapter *adap, unsigned int sched, unsigned int *kbps,
737 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
739 void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr);
740 void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st,
742 void t4_tp_get_tnl_stats(struct adapter *adap, struct tp_tnl_stats *st,
744 void t4_tp_get_proxy_stats(struct adapter *adap, struct tp_proxy_stats *st,
746 void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st,
748 void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st,
750 void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st,
752 void t4_tp_get_tid_stats(struct adapter *adap, struct tp_tid_stats *st,
754 void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4,
756 void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx,
758 void t4_load_mtus(struct adapter *adap, const unsigned short *mtus,
761 void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf);
763 int t4_set_sched_bps(struct adapter *adap, int sched, unsigned int kbps);
764 int t4_set_sched_ipg(struct adapter *adap, int sched, unsigned int ipg);
765 int t4_set_pace_tbl(struct adapter *adap, const unsigned int *pace_vals,
767 void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate);
768 int t4_set_filter_cfg(struct adapter *adap, int mode, int mask, int vnic_mode);
771 void t4_wol_magic_enable(struct adapter *adap, unsigned int port, const u8 *addr);
772 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
775 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
777 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
778 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
779 int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force);
780 int t4_fw_restart(struct adapter *adap, unsigned int mbox);
781 int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
783 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
784 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
787 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
790 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
794 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
797 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
802 int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox,
807 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
810 int t4_free_vi(struct adapter *adap, unsigned int mbox,
813 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
816 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, unsigned int viid,
819 int t4_free_mac_filt(struct adapter *adap, unsigned int mbox,
822 int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid,
824 int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid,
827 int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid,
830 int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid,
834 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
836 int t4_del_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
838 int t4_add_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
840 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
842 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
844 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
846 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
848 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
850 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
852 int t4_i2c_io(struct adapter *adap, unsigned int mbox,
856 int t4_i2c_rd(struct adapter *adap, unsigned int mbox,
860 int t4_i2c_wr(struct adapter *adap, unsigned int mbox,
864 int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
867 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
870 int t4_eth_eq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
872 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
874 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
876 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
878 int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid,
880 int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype,
882 int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type);
885 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
886 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val);
887 int t4_sched_config(struct adapter *adapter, int type, int minmaxen,
889 int t4_sched_params(struct adapter *adapter, int type, int level, int mode,
893 int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode,
895 int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl,
897 int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl,
900 int t4_config_watchdog(struct adapter *adapter, unsigned int mbox,
903 int t4_get_devlog_level(struct adapter *adapter, unsigned int *level);
904 int t4_set_devlog_level(struct adapter *adapter, unsigned int level);
905 void t4_sge_decode_idma_state(struct adapter *adapter, int state);
907 void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
909 void t4_tp_pio_write(struct adapter *adap, const u32 *buff, u32 nregs,
911 void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
913 void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs,
915 int t4_configure_ringbb(struct adapter *adap);
916 int t4_configure_add_smac(struct adapter *adap);
917 int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf,
920 static inline int t4vf_query_params(struct adapter *adapter, in t4vf_query_params() argument
924 return t4_query_params(adapter, 0, 0, 0, nparams, params, vals); in t4vf_query_params()
927 static inline int t4vf_set_params(struct adapter *adapter, in t4vf_set_params() argument
931 return t4_set_params(adapter, 0, 0, 0, nparams, params, vals); in t4vf_set_params()
934 static inline int t4vf_wr_mbox(struct adapter *adap, const void *cmd, in t4vf_wr_mbox()
940 int t4vf_wait_dev_ready(struct adapter *adapter);
941 int t4vf_fw_reset(struct adapter *adapter);
942 int t4vf_get_sge_params(struct adapter *adapter);
943 int t4vf_get_rss_glb_config(struct adapter *adapter);
944 int t4vf_get_vfres(struct adapter *adapter);
945 int t4vf_prep_adapter(struct adapter *adapter);
946 int t4vf_get_vf_mac(struct adapter *adapter, unsigned int port,
948 int t4_bar2_sge_qregs(struct adapter *adapter, unsigned int qid,