Lines Matching refs:adap
495 static inline int is_offload(const struct adapter *adap) in is_offload() argument
497 return adap->params.offload; in is_offload()
500 static inline int is_ethoffload(const struct adapter *adap) in is_ethoffload() argument
502 return adap->params.ethoffload; in is_ethoffload()
505 static inline int is_hashfilter(const struct adapter *adap) in is_hashfilter() argument
507 return adap->params.hash_filter; in is_hashfilter()
510 static inline int is_ktls(const struct adapter *adap) in is_ktls() argument
512 return adap->cryptocaps & FW_CAPS_CONFIG_TLS_HW; in is_ktls()
515 static inline int chip_id(struct adapter *adap) in chip_id() argument
517 return adap->params.chipid; in chip_id()
520 static inline int chip_rev(struct adapter *adap) in chip_rev() argument
522 return adap->params.rev; in chip_rev()
525 static inline int is_t4(struct adapter *adap) in is_t4() argument
527 return adap->params.chipid == CHELSIO_T4; in is_t4()
530 static inline int is_t5(struct adapter *adap) in is_t5() argument
532 return adap->params.chipid == CHELSIO_T5; in is_t5()
535 static inline int is_t6(struct adapter *adap) in is_t6() argument
537 return adap->params.chipid == CHELSIO_T6; in is_t6()
540 static inline int is_fpga(struct adapter *adap) in is_fpga() argument
542 return adap->params.fpga; in is_fpga()
545 static inline unsigned int core_ticks_per_usec(const struct adapter *adap) in core_ticks_per_usec() argument
547 return adap->params.vpd.cclk / 1000; in core_ticks_per_usec()
550 static inline unsigned int us_to_core_ticks(const struct adapter *adap, in us_to_core_ticks() argument
553 return (us * adap->params.vpd.cclk) / 1000; in us_to_core_ticks()
564 static inline unsigned int dack_ticks_to_usec(const struct adapter *adap, in dack_ticks_to_usec() argument
567 return (ticks << adap->params.tp.dack_re) / core_ticks_per_usec(adap); in dack_ticks_to_usec()
570 static inline u_int us_to_tcp_ticks(const struct adapter *adap, u_long us) in us_to_tcp_ticks() argument
573 return (us * adap->params.vpd.cclk / 1000 >> adap->params.tp.tre); in us_to_tcp_ticks()
576 static inline u_int tcp_ticks_to_us(const struct adapter *adap, u_int ticks) in tcp_ticks_to_us() argument
578 return ((uint64_t)ticks << adap->params.tp.tre) / in tcp_ticks_to_us()
579 core_ticks_per_usec(adap); in tcp_ticks_to_us()
582 void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, u32 val);
584 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
586 int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
588 void t4_report_fw_error(struct adapter *adap);
590 static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox, in t4_wr_mbox_timeout() argument
594 return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, true, in t4_wr_mbox_timeout()
598 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox() argument
601 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, true); in t4_wr_mbox()
604 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox_ns() argument
607 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, false); in t4_wr_mbox_ns()
610 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
613 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
626 int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
628 int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port);
638 int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
639 int t5_fw_init_extern_mem(struct adapter *adap);
641 int t4_load_boot(struct adapter *adap, u8 *boot_data,
660 int t4_init_tp_params(struct adapter *adap);
661 int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
662 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id);
677 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx,
691 int t4_mps_set_active_ports(struct adapter *adap, unsigned int port_mask);
692 void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
693 void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
694 void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres);
695 int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data, size_t n);
696 int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data, size_t n);
697 int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n,
699 int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n,
701 int t4_cim_ctl_read(struct adapter *adap, unsigned int addr, unsigned int n,
703 int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
704 void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
706 void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
709 u32 t4_read_pcie_cfg4(struct adapter *adap, int reg, int drv_fw_attach);
710 int t4_mc_read(struct adapter *adap, int idx, u32 addr,
712 int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity);
713 int t4_mem_read(struct adapter *adap, int mtype, u32 addr, u32 size,
724 void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size);
726 u32 t4_port_reg(struct adapter *adap, u8 port, u32 reg);
728 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
729 void t4_get_port_stats_offset(struct adapter *adap, int idx,
732 void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p);
733 void t4_clr_port_stats(struct adapter *adap, int idx);
735 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
736 void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]);
737 void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]);
738 void t4_get_tx_sched(struct adapter *adap, unsigned int sched, unsigned int *kbps,
740 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
742 void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr);
743 void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st,
745 void t4_tp_get_tnl_stats(struct adapter *adap, struct tp_tnl_stats *st,
747 void t4_tp_get_proxy_stats(struct adapter *adap, struct tp_proxy_stats *st,
749 void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st,
751 void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st,
753 void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st,
755 void t4_tp_get_tid_stats(struct adapter *adap, struct tp_tid_stats *st,
757 void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4,
759 void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx,
761 void t4_load_mtus(struct adapter *adap, const unsigned short *mtus,
764 void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf);
766 int t4_set_sched_bps(struct adapter *adap, int sched, unsigned int kbps);
767 int t4_set_sched_ipg(struct adapter *adap, int sched, unsigned int ipg);
768 int t4_set_pace_tbl(struct adapter *adap, const unsigned int *pace_vals,
770 void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate);
771 int t4_set_filter_cfg(struct adapter *adap, int mode, int mask, int vnic_mode);
774 void t4_wol_magic_enable(struct adapter *adap, unsigned int port, const u8 *addr);
775 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
778 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
780 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
781 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
782 int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force);
783 int t4_fw_restart(struct adapter *adap, unsigned int mbox);
784 int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
786 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
787 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
790 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
793 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
797 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
800 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
805 int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox,
810 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
813 int t4_free_vi(struct adapter *adap, unsigned int mbox,
816 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
819 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, unsigned int viid,
822 int t4_free_mac_filt(struct adapter *adap, unsigned int mbox,
825 int t4_free_encap_mac_filt(struct adapter *adap, unsigned int viid,
827 int t4_free_raw_mac_filt(struct adapter *adap, unsigned int viid,
830 int t4_alloc_raw_mac_filt(struct adapter *adap, unsigned int viid,
833 int t4_alloc_encap_mac_filt(struct adapter *adap, unsigned int viid,
837 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
839 int t4_del_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
841 int t4_add_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
843 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
845 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
847 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
849 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
851 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
853 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
855 int t4_i2c_io(struct adapter *adap, unsigned int mbox,
859 int t4_i2c_rd(struct adapter *adap, unsigned int mbox,
863 int t4_i2c_wr(struct adapter *adap, unsigned int mbox,
867 int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
870 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
873 int t4_eth_eq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
875 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
877 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
879 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
881 int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid,
883 int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype,
885 int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox, int ctxt_type);
888 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
889 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val);
910 void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
912 void t4_tp_pio_write(struct adapter *adap, const u32 *buff, u32 nregs,
914 void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
916 void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs,
918 int t4_configure_ringbb(struct adapter *adap);
919 int t4_configure_add_smac(struct adapter *adap);
920 int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf,
937 static inline int t4vf_wr_mbox(struct adapter *adap, const void *cmd, in t4vf_wr_mbox() argument
940 return t4_wr_mbox(adap, adap->mbox, cmd, size, rpl); in t4vf_wr_mbox()