Lines Matching refs:adapter

434 #define for_each_port(adapter, iter) \  argument
435 for (iter = 0; iter < (adapter)->params.nports; ++iter)
437 static inline int is_ftid(const struct adapter *sc, u_int tid) in is_ftid()
444 static inline int is_hpftid(const struct adapter *sc, u_int tid) in is_hpftid()
451 static inline int is_etid(const struct adapter *sc, u_int tid) in is_etid()
458 static inline int is_offload(const struct adapter *adap) in is_offload()
463 static inline int is_ethoffload(const struct adapter *adap) in is_ethoffload()
468 static inline int is_hashfilter(const struct adapter *adap) in is_hashfilter()
473 static inline int chip_id(struct adapter *adap) in chip_id()
478 static inline int chip_rev(struct adapter *adap) in chip_rev()
483 static inline int is_t4(struct adapter *adap) in is_t4()
488 static inline int is_t5(struct adapter *adap) in is_t5()
493 static inline int is_t6(struct adapter *adap) in is_t6()
498 static inline int is_fpga(struct adapter *adap) in is_fpga()
503 static inline unsigned int core_ticks_per_usec(const struct adapter *adap) in core_ticks_per_usec()
508 static inline unsigned int us_to_core_ticks(const struct adapter *adap, in us_to_core_ticks()
514 static inline unsigned int core_ticks_to_us(const struct adapter *adapter, in core_ticks_to_us() argument
518 return ((ticks * 1000 + adapter->params.vpd.cclk/2) / in core_ticks_to_us()
519 adapter->params.vpd.cclk); in core_ticks_to_us()
522 static inline unsigned int dack_ticks_to_usec(const struct adapter *adap, in dack_ticks_to_usec()
528 static inline u_int us_to_tcp_ticks(const struct adapter *adap, u_long us) in us_to_tcp_ticks()
534 static inline u_int tcp_ticks_to_us(const struct adapter *adap, u_int ticks) in tcp_ticks_to_us()
540 void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, u32 val);
542 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
544 int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
547 static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox, in t4_wr_mbox_timeout()
555 static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox()
561 static inline int t4_wr_mbox_ns(struct adapter *adap, int mbox, const void *cmd, in t4_wr_mbox_ns()
567 void t4_read_indirect(struct adapter *adap, unsigned int addr_reg,
570 void t4_write_indirect(struct adapter *adap, unsigned int addr_reg,
574 u32 t4_hw_pci_read_cfg4(adapter_t *adapter, int reg);
578 void t4_intr_enable(struct adapter *adapter);
579 void t4_intr_disable(struct adapter *adapter);
580 void t4_intr_clear(struct adapter *adapter);
581 int t4_slow_intr_handler(struct adapter *adapter, bool verbose);
584 int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
586 int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port);
587 int t4_seeprom_read(struct adapter *adapter, u32 addr, u32 *data);
588 int t4_seeprom_write(struct adapter *adapter, u32 addr, u32 data);
590 int t4_seeprom_wp(struct adapter *adapter, int enable);
591 int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords,
593 int t4_write_flash(struct adapter *adapter, unsigned int addr,
595 int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
596 int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
597 int t5_fw_init_extern_mem(struct adapter *adap);
598 int t4_load_bootcfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
599 int t4_load_boot(struct adapter *adap, u8 *boot_data,
601 int t4_flash_erase_sectors(struct adapter *adapter, int start, int end);
602 int t4_flash_cfg_addr(struct adapter *adapter);
603 int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
604 int t4_get_fw_version(struct adapter *adapter, u32 *vers);
605 int t4_get_fw_hdr(struct adapter *adapter, struct fw_hdr *hdr);
606 int t4_get_bs_version(struct adapter *adapter, u32 *vers);
607 int t4_get_tp_version(struct adapter *adapter, u32 *vers);
608 int t4_get_exprom_version(struct adapter *adapter, u32 *vers);
609 int t4_get_scfg_version(struct adapter *adapter, u32 *vers);
610 int t4_get_vpd_version(struct adapter *adapter, u32 *vers);
611 int t4_get_version_info(struct adapter *adapter);
612 int t4_init_hw(struct adapter *adapter, u32 fw_params);
614 int t4_prep_adapter(struct adapter *adapter, u32 *buf);
615 int t4_shutdown_adapter(struct adapter *adapter);
616 int t4_init_devlog_params(struct adapter *adapter, int fw_attach);
617 int t4_init_sge_params(struct adapter *adapter);
618 int t4_init_tp_params(struct adapter *adap, bool sleep_ok);
619 int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
620 int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id);
621 void t4_fatal_err(struct adapter *adapter, bool fw_error);
622 int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp,
624 void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp,
626 int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid,
628 int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode,
630 int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid,
633 int t4_read_rss(struct adapter *adapter, u16 *entries);
634 void t4_read_rss_key(struct adapter *adapter, u32 *key, bool sleep_ok);
635 void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx,
637 void t4_read_rss_pf_config(struct adapter *adapter, unsigned int index,
639 void t4_write_rss_pf_config(struct adapter *adapter, unsigned int index,
641 void t4_read_rss_vf_config(struct adapter *adapter, unsigned int index,
643 void t4_write_rss_vf_config(struct adapter *adapter, unsigned int index,
645 u32 t4_read_rss_pf_map(struct adapter *adapter, bool sleep_ok);
646 void t4_write_rss_pf_map(struct adapter *adapter, u32 pfmap, bool sleep_ok);
647 u32 t4_read_rss_pf_mask(struct adapter *adapter, bool sleep_ok);
648 void t4_write_rss_pf_mask(struct adapter *adapter, u32 pfmask, bool sleep_ok);
649 int t4_mps_set_active_ports(struct adapter *adap, unsigned int port_mask);
650 void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
651 void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]);
652 void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres);
653 int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data, size_t n);
654 int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data, size_t n);
655 int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n,
657 int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n,
659 int t4_cim_ctl_read(struct adapter *adap, unsigned int addr, unsigned int n,
661 int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
662 void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
664 void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
665 int t4_get_flash_params(struct adapter *adapter);
667 u32 t4_read_pcie_cfg4(struct adapter *adap, int reg, int drv_fw_attach);
668 int t4_mc_read(struct adapter *adap, int idx, u32 addr,
670 int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity);
671 int t4_mem_read(struct adapter *adap, int mtype, u32 addr, u32 size,
673 void t4_idma_monitor_init(struct adapter *adapter,
675 void t4_idma_monitor(struct adapter *adapter,
679 unsigned int t4_get_regs_len(struct adapter *adapter);
680 void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size);
683 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
684 void t4_get_port_stats_offset(struct adapter *adap, int idx,
687 void t4_get_lb_stats(struct adapter *adap, int idx, struct lb_port_stats *p);
688 void t4_clr_port_stats(struct adapter *adap, int idx);
690 void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log);
691 void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]);
692 void t4_read_pace_tbl(struct adapter *adap, unsigned int pace_vals[NTX_SCHED]);
693 void t4_get_tx_sched(struct adapter *adap, unsigned int sched, unsigned int *kbps,
695 void t4_tp_wr_bits_indirect(struct adapter *adap, unsigned int addr,
697 void t4_tp_read_la(struct adapter *adap, u64 *la_buf, unsigned int *wrptr);
698 void t4_tp_get_err_stats(struct adapter *adap, struct tp_err_stats *st,
700 void t4_tp_get_proxy_stats(struct adapter *adap, struct tp_proxy_stats *st,
702 void t4_tp_get_cpl_stats(struct adapter *adap, struct tp_cpl_stats *st,
704 void t4_tp_get_rdma_stats(struct adapter *adap, struct tp_rdma_stats *st,
706 void t4_get_usm_stats(struct adapter *adap, struct tp_usm_stats *st,
708 void t4_tp_get_tcp_stats(struct adapter *adap, struct tp_tcp_stats *v4,
710 void t4_get_fcoe_stats(struct adapter *adap, unsigned int idx,
712 void t4_load_mtus(struct adapter *adap, const unsigned short *mtus,
715 void t4_ulprx_read_la(struct adapter *adap, u32 *la_buf);
717 int t4_set_sched_bps(struct adapter *adap, int sched, unsigned int kbps);
718 int t4_set_sched_ipg(struct adapter *adap, int sched, unsigned int ipg);
719 int t4_set_pace_tbl(struct adapter *adap, const unsigned int *pace_vals,
721 void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate);
722 int t4_set_filter_mode(struct adapter *adap, unsigned int mode_map,
726 void t4_wol_magic_enable(struct adapter *adap, unsigned int port, const u8 *addr);
727 int t4_wol_pat_enable(struct adapter *adap, unsigned int port, unsigned int map,
730 int t4_fw_hello(struct adapter *adap, unsigned int mbox, unsigned int evt_mbox,
732 int t4_fw_bye(struct adapter *adap, unsigned int mbox);
733 int t4_fw_reset(struct adapter *adap, unsigned int mbox, int reset);
734 int t4_fw_halt(struct adapter *adap, unsigned int mbox, int force);
735 int t4_fw_restart(struct adapter *adap, unsigned int mbox);
736 int t4_fw_upgrade(struct adapter *adap, unsigned int mbox,
738 int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
739 int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
742 int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
745 int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
749 int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
752 int t4_cfg_pfvf(struct adapter *adap, unsigned int mbox, unsigned int pf,
757 int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox,
762 int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
765 int t4_free_vi(struct adapter *adap, unsigned int mbox,
768 int t4_set_rxmode(struct adapter *adap, unsigned int mbox, unsigned int viid,
771 int t4_alloc_mac_filt(struct adapter *adap, unsigned int mbox, unsigned int viid,
774 int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
776 int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
778 int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
780 int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
782 int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
784 int t4_mdio_rd(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
786 int t4_mdio_wr(struct adapter *adap, unsigned int mbox, unsigned int phy_addr,
788 int t4_i2c_rd(struct adapter *adap, unsigned int mbox,
792 int t4_i2c_wr(struct adapter *adap, unsigned int mbox,
796 int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
799 int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
802 int t4_eth_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
804 int t4_ctrl_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
806 int t4_ofld_eq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
808 int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid,
810 int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype,
812 int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox);
815 int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
816 int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val);
817 int t4_sched_config(struct adapter *adapter, int type, int minmaxen,
819 int t4_sched_params(struct adapter *adapter, int type, int level, int mode,
823 int t4_sched_params_ch_rl(struct adapter *adapter, int channel, int ratemode,
825 int t4_sched_params_cl_wrr(struct adapter *adapter, int channel, int cl,
827 int t4_sched_params_cl_rl_kbps(struct adapter *adapter, int channel, int cl,
830 int t4_config_watchdog(struct adapter *adapter, unsigned int mbox,
833 int t4_get_devlog_level(struct adapter *adapter, unsigned int *level);
834 int t4_set_devlog_level(struct adapter *adapter, unsigned int level);
835 void t4_sge_decode_idma_state(struct adapter *adapter, int state);
837 void t4_tp_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
839 void t4_tp_pio_write(struct adapter *adap, const u32 *buff, u32 nregs,
841 void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
843 void t4_tp_mib_read(struct adapter *adap, u32 *buff, u32 nregs,
846 static inline int t4vf_query_params(struct adapter *adapter, in t4vf_query_params() argument
850 return t4_query_params(adapter, 0, 0, 0, nparams, params, vals); in t4vf_query_params()
853 static inline int t4vf_set_params(struct adapter *adapter, in t4vf_set_params() argument
857 return t4_set_params(adapter, 0, 0, 0, nparams, params, vals); in t4vf_set_params()
860 static inline int t4vf_wr_mbox(struct adapter *adap, const void *cmd, in t4vf_wr_mbox()
866 int t4vf_wait_dev_ready(struct adapter *adapter);
867 int t4vf_fw_reset(struct adapter *adapter);
868 int t4vf_get_sge_params(struct adapter *adapter);
869 int t4vf_get_rss_glb_config(struct adapter *adapter);
870 int t4vf_get_vfres(struct adapter *adapter);
871 int t4vf_prep_adapter(struct adapter *adapter);
872 int t4_bar2_sge_qregs(struct adapter *adapter, unsigned int qid,