Home
last modified time | relevance | path

Searched refs:ahw (Results 1 – 22 of 22) sorted by relevance

/drivers/net/ethernet/qlogic/qlcnic/
Dqlcnic_83xx_vnic.c16 QLCWRX(adapter->ahw, QLC_83XX_VNIC_STATE, QLCNIC_DEV_NPAR_OPER); in qlcnic_83xx_enable_vnic_mode()
25 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_disable_vnic_mode() local
32 QLCWRX(adapter->ahw, QLC_83XX_VNIC_STATE, QLCNIC_DEV_NPAR_NON_OPER); in qlcnic_83xx_disable_vnic_mode()
33 ahw->idc.vnic_state = QLCNIC_DEV_NPAR_NON_OPER; in qlcnic_83xx_disable_vnic_mode()
46 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_set_vnic_opmode() local
51 id = ahw->pci_func; in qlcnic_83xx_set_vnic_opmode()
52 data = QLCRDX(adapter->ahw, QLC_83XX_DRV_OP_MODE); in qlcnic_83xx_set_vnic_opmode()
56 QLCWRX(adapter->ahw, QLC_83XX_DRV_OP_MODE, data); in qlcnic_83xx_set_vnic_opmode()
66 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_config_vnic_buff_descriptors() local
68 if (ahw->port_type == QLCNIC_XGBE) { in qlcnic_83xx_config_vnic_buff_descriptors()
[all …]
Dqlcnic_83xx_init.c136 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_DRV_PRESENCE); in qlcnic_83xx_idc_check_driver_presence_reg()
146 cur = adapter->ahw->idc.curr_state; in qlcnic_83xx_idc_log_state_history()
147 prev = adapter->ahw->idc.prev_state; in qlcnic_83xx_idc_log_state_history()
151 adapter->ahw->idc.name[cur], in qlcnic_83xx_idc_log_state_history()
152 adapter->ahw->idc.name[prev]); in qlcnic_83xx_idc_log_state_history()
166 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_DRV_AUDIT); in qlcnic_83xx_idc_update_audit_reg()
170 seconds = jiffies / HZ - adapter->ahw->idc.sec_counter; in qlcnic_83xx_idc_update_audit_reg()
175 QLCWRX(adapter->ahw, QLC_83XX_IDC_DRV_AUDIT, val); in qlcnic_83xx_idc_update_audit_reg()
176 adapter->ahw->idc.sec_counter = jiffies / HZ; in qlcnic_83xx_idc_update_audit_reg()
188 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_MIN_VERSION); in qlcnic_83xx_idc_update_minor_version()
[all …]
Dqlcnic_83xx_hw.c261 void qlcnic_83xx_register_map(struct qlcnic_hardware_context *ahw) in qlcnic_83xx_register_map() argument
263 ahw->hw_ops = &qlcnic_83xx_hw_ops; in qlcnic_83xx_register_map()
264 ahw->reg_tbl = (u32 *)qlcnic_83xx_reg_tbl; in qlcnic_83xx_register_map()
265 ahw->ext_reg_tbl = (u32 *)qlcnic_83xx_ext_reg_tbl; in qlcnic_83xx_register_map()
289 base = adapter->ahw->pci_base0 + in __qlcnic_set_win_base()
290 QLC_83XX_CRB_WIN_FUNC(adapter->ahw->pci_func); in __qlcnic_set_win_base()
302 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_rd_reg_indirect() local
306 return QLCRDX(ahw, QLCNIC_WILDCARD); in qlcnic_83xx_rd_reg_indirect()
318 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_wrt_reg_indirect() local
322 QLCWRX(ahw, QLCNIC_WILDCARD, data); in qlcnic_83xx_wrt_reg_indirect()
[all …]
Dqlcnic_main.c91 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_vlan_tx_check() local
94 return ahw->capabilities & QLCNIC_FW_CAPABILITY_FVLANTX; in qlcnic_vlan_tx_check()
303 adapter->ahw->pci_func); in qlcnic_read_mac_addr()
415 if (netdev_uc_count(netdev) < adapter->ahw->max_uc_count) in qlcnic_fdb_add()
460 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_get_phys_port_id() local
465 ppid->id_len = sizeof(ahw->phys_port_id); in qlcnic_get_phys_port_id()
466 memcpy(ppid->id, ahw->phys_port_id, ppid->id_len); in qlcnic_get_phys_port_id()
612 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_check_multi_tx_capability() local
615 (ahw->extra_capability[0] & QLCNIC_FW_CAPABILITY_2_MULTI_TX)) { in qlcnic_check_multi_tx_capability()
722 adapter->ahw->num_msix = num_msix; in qlcnic_setup_tss_rss_intr()
[all …]
Dqlcnic_sriov_common.c156 adapter->ahw->sriov = sriov; in qlcnic_sriov_init()
235 kfree(adapter->ahw->sriov); in qlcnic_sriov_init()
263 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in __qlcnic_sriov_cleanup()
287 kfree(adapter->ahw->sriov); in __qlcnic_sriov_cleanup()
314 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_sriov_post_bc_msg() local
315 struct qlcnic_mailbox *mbx = ahw->mailbox; in qlcnic_sriov_post_bc_msg()
332 __func__, cmd.cmd_op, cmd.type, ahw->pci_func, in qlcnic_sriov_post_bc_msg()
333 ahw->op_mode); in qlcnic_sriov_post_bc_msg()
340 __func__, cmd.cmd_op, cmd.type, ahw->pci_func, in qlcnic_sriov_post_bc_msg()
341 ahw->op_mode); in qlcnic_sriov_post_bc_msg()
[all …]
Dqlcnic_ethtool.c290 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_82xx_get_link_ksettings() local
293 u16 pcifn = ahw->pci_func; in qlcnic_82xx_get_link_ksettings()
297 if (adapter->ahw->port_type == QLCNIC_GBE) { in qlcnic_82xx_get_link_ksettings()
310 ecmd->base.speed = adapter->ahw->link_speed; in qlcnic_82xx_get_link_ksettings()
311 ecmd->base.duplex = adapter->ahw->link_duplex; in qlcnic_82xx_get_link_ksettings()
312 ecmd->base.autoneg = adapter->ahw->link_autoneg; in qlcnic_82xx_get_link_ksettings()
314 } else if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_82xx_get_link_ksettings()
326 if (netif_running(adapter->netdev) && ahw->has_link_events) { in qlcnic_82xx_get_link_ksettings()
327 if (ahw->linkup) { in qlcnic_82xx_get_link_ksettings()
331 ahw->link_speed = speed * P3P_LINK_SPEED_MHZ; in qlcnic_82xx_get_link_ksettings()
[all …]
Dqlcnic_ctx.c45 static inline u32 qlcnic_get_cmd_signature(struct qlcnic_hardware_context *ahw) in qlcnic_get_cmd_signature() argument
47 return (ahw->pci_func & 0xff) | ((ahw->fw_hal_version & 0xff) << 8) | in qlcnic_get_cmd_signature()
117 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_82xx_issue_cmd() local
120 signature = qlcnic_get_cmd_signature(ahw); in qlcnic_82xx_issue_cmd()
236 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_82xx_fw_cmd_create_rx_ctx() local
286 !adapter->ahw->diag_test) { in qlcnic_82xx_fw_cmd_create_rx_ctx()
330 !adapter->ahw->diag_test) in qlcnic_82xx_fw_cmd_create_rx_ctx()
331 prq_sds[i].msi_index = cpu_to_le16(ahw->intr_tbl[i].id); in qlcnic_82xx_fw_cmd_create_rx_ctx()
357 rds_ring->crb_rcv_producer = ahw->pci_base0 + reg; in qlcnic_82xx_fw_cmd_create_rx_ctx()
366 if (qlcnic_check_multi_tx(adapter) && !adapter->ahw->diag_test) in qlcnic_82xx_fw_cmd_create_rx_ctx()
[all …]
Dqlcnic_hw.c359 qlcnic_read_window_reg(addr, adapter->ahw->pci_base0, &data); in qlcnic_ind_rd()
373 qlcnic_write_window_reg(addr, adapter->ahw->pci_base0, data); in qlcnic_ind_wr()
531 struct qlcnic_hardware_context *ahw = adapter->ahw; in __qlcnic_set_multi() local
549 (netdev_mc_count(netdev) > ahw->max_mc_count)) { in __qlcnic_set_multi()
561 if (netdev_uc_count(netdev) > ahw->max_uc_count) { in __qlcnic_set_multi()
758 adapter->ahw->physical_port); in qlcnic_82xx_read_phys_port_id()
762 memcpy(adapter->ahw->phys_port_id, mac, ETH_ALEN); in qlcnic_82xx_read_phys_port_id()
780 req.words[0] = cpu_to_le64(((u64) adapter->ahw->coal.flag) << 32); in qlcnic_82xx_set_rx_coalesce()
781 req.words[2] = cpu_to_le64(adapter->ahw->coal.rx_packets | in qlcnic_82xx_set_rx_coalesce()
782 ((u64) adapter->ahw->coal.rx_time_us) << 16); in qlcnic_82xx_set_rx_coalesce()
[all …]
Dqlcnic_sysfs.c43 if (!(adapter->ahw->capabilities & QLCNIC_FW_CAPABILITY_BDG)) in qlcnic_store_bridged_mode()
66 if (adapter->ahw->capabilities & QLCNIC_FW_CAPABILITY_BDG) in qlcnic_show_bridged_mode()
119 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_83xx_store_beacon() local
131 if (ahw->beacon_state == h_beacon) in qlcnic_83xx_store_beacon()
135 if (!ahw->beacon_state) { in qlcnic_83xx_store_beacon()
147 ahw->beacon_state = h_beacon; in qlcnic_83xx_store_beacon()
149 if (!ahw->beacon_state) in qlcnic_83xx_store_beacon()
159 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_82xx_store_beacon() local
174 if (ahw->beacon_state == b_state) in qlcnic_82xx_store_beacon()
178 if (!ahw->beacon_state) { in qlcnic_82xx_store_beacon()
[all …]
Dqlcnic.h1031 ((adapter)->ahw->capabilities & QLCNIC_FW_CAPABILITY_TSO)
1100 struct qlcnic_hardware_context *ahw; member
1545 (adapter->ahw->hw_ops->read_reg)(adapter, off, err)
1548 adapter->ahw->hw_ops->write_reg(adapter, off, val)
1832 return adapter->ahw->extra_capability[0] & in qlcnic_83xx_encap_tx_offload()
1838 return adapter->ahw->extra_capability[0] & in qlcnic_83xx_encap_rx_offload()
1854 return adapter->ahw->hw_ops->encap_rx_offload(adapter); in qlcnic_encap_rx_offload()
1859 return adapter->ahw->hw_ops->encap_tx_offload(adapter); in qlcnic_encap_tx_offload()
1870 adapter->ahw->hw_ops->read_crb(adapter, buf, offset, size); in qlcnic_read_crb()
1876 adapter->ahw->hw_ops->write_crb(adapter, buf, offset, size); in qlcnic_write_crb()
[all …]
Dqlcnic_hw.h39 readl(((a)->ahw->pci_base0) + ((a)->ahw->reg_tbl[addr]))
43 writel(value, ((a)->ahw->pci_base0) + ((a)->ahw->reg_tbl[addr]))
46 #define QLCRDX(ahw, addr) \ argument
47 readl(((ahw)->pci_base0) + ((ahw)->ext_reg_tbl[addr]))
50 #define QLCWRX(ahw, addr, value) \ argument
51 writel(value, (((ahw)->pci_base0) + ((ahw)->ext_reg_tbl[addr])))
Dqlcnic_sriov_pf.c70 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_pf_cal_res_limit()
91 if (adapter->ahw->pci_func == func) { in qlcnic_sriov_pf_cal_res_limit()
139 struct qlcnic_resources *ff_max = &adapter->ahw->sriov->ff_max; in qlcnic_sriov_pf_set_ff_max_res()
158 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_set_vf_max_vlan()
235 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_pf_reset_vport_handle()
239 if (adapter->ahw->pci_func == func) { in qlcnic_sriov_pf_reset_vport_handle()
253 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_pf_set_vport_handle()
257 if (adapter->ahw->pci_func == func) { in qlcnic_sriov_pf_set_vport_handle()
271 struct qlcnic_sriov *sriov = adapter->ahw->sriov; in qlcnic_sriov_pf_get_vport_handle()
275 if (adapter->ahw->pci_func == func) { in qlcnic_sriov_pf_get_vport_handle()
[all …]
Dqlcnic_minidump.c405 void *hdr = adapter->ahw->fw_dump.tmpl_hdr; in qlcnic_dump_ctrl()
549 addr = adapter->ahw->pci_base0 + ocm->read_addr; in qlcnic_dump_ocm()
575 adapter->ahw->pci_func); in qlcnic_read_rom()
678 mutex_lock(&adapter->ahw->mem_lock); in qlcnic_read_memory_test_agent()
708 mutex_unlock(&adapter->ahw->mem_lock); in qlcnic_read_memory_test_agent()
728 tmpl_hdr = adapter->ahw->fw_dump.tmpl_hdr; in qlcnic_start_pex_dma()
771 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_read_memory_pexdma()
811 temp |= (adapter->ahw->pci_func & 0xf) << 4; in qlcnic_read_memory_pexdma()
857 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_read_memory()
1208 struct qlcnic_hardware_context *ahw; in qlcnic_fw_cmd_get_minidump_temp() local
[all …]
Dqlcnic_init.c213 if (adapter->ahw->capabilities & in qlcnic_alloc_sw_resources()
247 !adapter->ahw->diag_test) in qlcnic_alloc_sw_resources()
627 adapter->ahw->physical_port = (val >> 2); in qlcnic_setup_idc_param()
698 if (adapter->ahw->revision_id == QLCNIC_P3P_C0) in qlcnic_check_flash_fw_ver()
881 u8 chiprev = adapter->ahw->revision_id; in qlcnic_validate_product_offs()
968 if (adapter->ahw->fw_type == QLCNIC_UNIFIED_ROMIMAGE) in qlcnic_get_bootld_offs()
982 if (adapter->ahw->fw_type == QLCNIC_UNIFIED_ROMIMAGE) in qlcnic_get_fw_offs()
996 if (adapter->ahw->fw_type == QLCNIC_UNIFIED_ROMIMAGE) in qlcnic_get_fw_size()
1011 if (adapter->ahw->fw_type != QLCNIC_UNIFIED_ROMIMAGE) { in qlcnic_get_fw_version()
1042 if (adapter->ahw->fw_type != QLCNIC_UNIFIED_ROMIMAGE) { in qlcnic_get_bios_version()
[all …]
Dqlcnic_io.c793 if (adapter->ahw->linkup && !linkup) { in qlcnic_advert_link_change()
795 adapter->ahw->linkup = 0; in qlcnic_advert_link_change()
797 } else if (!adapter->ahw->linkup && linkup) { in qlcnic_advert_link_change()
798 adapter->ahw->linkup = 1; in qlcnic_advert_link_change()
803 if (qlcnic_83xx_check(adapter) && adapter->ahw->lb_mode) { in qlcnic_advert_link_change()
1039 adapter->ahw->has_link_events = 1; in qlcnic_handle_linkevent()
1061 adapter->ahw->loopback_state |= QLCNIC_LINKEVENT; in qlcnic_handle_linkevent()
1066 adapter->ahw->link_duplex = DUPLEX_FULL; in qlcnic_handle_linkevent()
1068 adapter->ahw->link_duplex = DUPLEX_HALF; in qlcnic_handle_linkevent()
1070 adapter->ahw->module_type = module; in qlcnic_handle_linkevent()
[all …]
Dqlcnic_83xx_hw.h350 #define QLCNIC_MBX_HOST(ahw, i) ((ahw)->pci_base0 + ((i) * 4)) argument
351 #define QLCNIC_MBX_FW(ahw, i) ((ahw)->pci_base0 + 0x800 + ((i) * 4)) argument
/drivers/net/ethernet/qlogic/netxen/
Dnetxen_nic_hw.c34 ((adapter)->ahw.pci_base0 + (off))
36 ((adapter)->ahw.pci_base1 + (off) - SECOND_PAGE_GROUP_START)
38 ((adapter)->ahw.pci_base2 + (off) - THIRD_PAGE_GROUP_START)
320 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { in netxen_niu_xg_init_port()
334 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) in netxen_niu_disable_xg_port()
362 u16 board_type = adapter->ahw.board_type; in netxen_p2_nic_set_promisc()
1026 int pci_func = adapter->ahw.pci_func; in netxen_p3_get_mac_addr()
1051 u8 func = adapter->ahw.pci_func; in netxen_nic_pci_set_crbwindow_128M()
1053 if (adapter->ahw.crb_win == window) in netxen_nic_pci_set_crbwindow_128M()
1073 adapter->ahw.crb_win = window; in netxen_nic_pci_set_crbwindow_128M()
[all …]
Dnetxen_nic_main.c237 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { in nx_set_dma_mask()
269 if (NX_IS_REVISION_P3(adapter->ahw.revision_id) && (shift > 9)) in nx_update_dma_mask()
271 else if ((adapter->ahw.revision_id == NX_P2_C1) && (shift <= 4)) in nx_update_dma_mask()
284 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { in nx_update_dma_mask()
310 if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) in netxen_check_hw_init()
349 val = adapter->ahw.board_type; in netxen_set_port_mode()
412 if (adapter->ahw.revision_id == NX_P3_B0) in netxen_pcie_strap_init()
467 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { in netxen_read_mac_addr()
584 if (adapter->ahw.revision_id >= NX_P3_B0) in netxen_initialize_interrupt_registers()
585 legacy_intrp = &legacy_intr[adapter->ahw.pci_func]; in netxen_initialize_interrupt_registers()
[all …]
Dnetxen_nic_ethtool.c91 if (adapter->ahw.port_type == NETXEN_NIC_GBE) { in netxen_nic_get_link_ksettings()
110 } else if (adapter->ahw.port_type == NETXEN_NIC_XGBE) { in netxen_nic_get_link_ksettings()
131 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { in netxen_nic_get_link_ksettings()
132 u16 pcifn = adapter->ahw.pci_func; in netxen_nic_get_link_ksettings()
148 switch (adapter->ahw.board_type) { in netxen_nic_get_link_ksettings()
164 cmd->base.autoneg = (adapter->ahw.board_type == in netxen_nic_get_link_ksettings()
194 if (adapter->ahw.port_type == NETXEN_NIC_XGBE) { in netxen_nic_get_link_ksettings()
211 adapter->ahw.board_type); in netxen_nic_get_link_ksettings()
233 if (!netif_running(dev) || !adapter->ahw.linkup) { in netxen_nic_get_link_ksettings()
254 if (adapter->ahw.port_type != NETXEN_NIC_GBE) in netxen_nic_set_link_ksettings()
[all …]
Dnetxen_nic_init.c217 if (adapter->ahw.cut_through) { in netxen_alloc_sw_resources()
223 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) in netxen_alloc_sw_resources()
236 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) in netxen_alloc_sw_resources()
427 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { in netxen_pinit_from_rom()
487 if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { in netxen_pinit_from_rom()
504 !NX_IS_REVISION_P3P(adapter->ahw.revision_id)) in netxen_pinit_from_rom()
520 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { in netxen_pinit_from_rom()
536 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { in netxen_pinit_from_rom()
684 int mn_present = (NX_IS_REVISION_P2(adapter->ahw.revision_id)) ? in netxen_nic_validate_product_offs()
706 u8 chiprev = adapter->ahw.revision_id; in netxen_nic_validate_product_offs()
[all …]
Dnetxen_nic_ctx.c39 signature = NX_CDRP_SIGNATURE_MAKE(adapter->ahw.pci_func, in netxen_issue_cmd()
794 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) in netxen_alloc_hw_resources()
815 if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { in netxen_alloc_hw_resources()
827 if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) { in netxen_alloc_hw_resources()
860 if (!NX_IS_REVISION_P2(adapter->ahw.revision_id)) { in netxen_free_hw_resources()
Dnetxen_nic.h94 (adapter->ahw.db_base + (off))
1582 struct netxen_hardware_context ahw; member