Lines Matching refs:adap

456 static inline int is_offload(const struct adapter *adap)
458 return adap->params.offload;
461 static inline int is_ethoffload(const struct adapter *adap)
463 return adap->params.ethoffload;
466 static inline int is_hashfilter(const struct adapter *adap)
468 return adap->params.hash_filter;
471 static inline int chip_id(struct adapter *adap)
473 return adap->params.chipid;
476 static inline int chip_rev(struct adapter *adap)
478 return adap->params.rev;
481 static inline int is_t4(struct adapter *adap)
483 return adap->params.chipid == CHELSIO_T4;
486 static inline int is_t5(struct adapter *adap)
488 return adap->params.chipid == CHELSIO_T5;
491 static inline int is_t6(struct adapter *adap)
493 return adap->params.chipid == CHELSIO_T6;
496 static inline int is_fpga(struct adapter *adap)
498 return adap->params.fpga;
501 static inline unsigned int core_ticks_per_usec(const struct adapter *adap)
503 return adap->params.vpd.cclk / 1000;
506 static inline unsigned int us_to_core_ticks(const struct adapter *adap,
509 return (us * adap->params.vpd.cclk) / 1000;
520 static inline unsigned int dack_ticks_to_usec(const struct adapter *adap,
523 return (ticks << adap->params.tp.dack_re) / core_ticks_per_usec(adap);
526 static inline u_int us_to_tcp_ticks(const struct adapter *adap, u_long us)
529 return (us * adap->params.vpd.cclk / 1000 >> adap->params.tp.tre);
532 static inline u_int tcp_ticks_to_us(const struct adapter *adap, u_int ticks)
534 return ((uint64_t)ticks << adap->params.tp.tre) /
535 core_ticks_per_usec(adap);
538 void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, u32 val);
540 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
542 int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
545 static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox,
549 return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, true,
553 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd,
556 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, true);
559 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd,
562 return t4_wr_mbox_meat(adap, mbox, cmd, size, rpl, false);
565 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
568 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
582 int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
584 int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port);
594 int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
595 int t5_fw_init_extern_mem(struct adapter *adap);
597 int t4_load_boot(struct adapter *adap, u8 *boot_data,
616 int t4_init_tp_params(struct adapter *adap, bool sleep_ok);
617 int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
618 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id);
633 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx,
647 int t4_mps_set_active_ports(struct adapter *adap, unsigned int port_mask);
648 void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
649 void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
650 void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres);
651 int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data, size_t n);
652 int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data, size_t n);
653 int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n,
655 int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n,
657 int t4_cim_ctl_read(struct adapter *adap, unsigned int addr, unsigned int n,
659 int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
660 void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
662 void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
665 u32 t4_read_pcie_cfg4(struct adapter *adap, int reg, int drv_fw_attach);
666 int t4_mc_read(struct adapter *adap, int idx, u32 addr,
668 int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity);
669 int t4_mem_read(struct adapter *adap, int mtype, u32 addr, u32 size,
678 void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size);
681 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
682 void t4_get_port_stats_offset(struct adapter *adap, int idx,
685 void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p);
686 void t4_clr_port_stats(struct adapter *adap, int idx);
688 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
689 void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]);
690 void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]);
691 void t4_get_tx_sched(struct adapter *adap, unsigned int sched, unsigned int *kbps,
693 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
695 void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr);
696 void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st,
698 void t4_tp_get_proxy_stats(struct adapter *adap, struct tp_proxy_stats *st,
700 void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st,
702 void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st,
704 void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st,
706 void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4,
708 void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx,
710 void t4_load_mtus(struct adapter *adap, const unsigned short *mtus,
713 void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf);
715 int t4_set_sched_bps(struct adapter *adap, int sched, unsigned int kbps);
716 int t4_set_sched_ipg(struct adapter *adap, int sched, unsigned int ipg);
717 int t4_set_pace_tbl(struct adapter *adap, const unsigned int *pace_vals,
719 void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate);
720 int t4_set_filter_mode(struct adapter *adap, unsigned int mode_map,
724 void t4_wol_magic_enable(struct adapter *adap, unsigned int port, const u8 *addr);
725 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
728 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
730 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
731 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
732 int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force);
733 int t4_fw_restart(struct adapter *adap, unsigned int mbox);
734 int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
736 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
737 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
740 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
743 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
747 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
750 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
755 int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox,
760 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
763 int t4_free_vi(struct adapter *adap, unsigned int mbox,
766 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
769 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, unsigned int viid,
772 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
774 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
776 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
778 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
780 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
782 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
784 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
786 int t4_i2c_rd(struct adapter *adap, unsigned int mbox,
790 int t4_i2c_wr(struct adapter *adap, unsigned int mbox,
794 int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
797 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
800 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
802 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
804 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
806 int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid,
808 int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype,
810 int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox);
813 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
814 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val);
835 void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
837 void t4_tp_pio_write(struct adapter *adap, const u32 *buff, u32 nregs,
839 void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
841 void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs,
858 static inline int t4vf_wr_mbox(struct adapter *adap, const void *cmd,
861 return t4_wr_mbox(adap, adap->mbox, cmd, size, rpl);