Lines Matching refs:ahw

291 	struct qlcnic_hardware_context *ahw = adapter->ahw;  in qlcnic_82xx_get_settings()  local
294 u16 pcifn = ahw->pci_func; in qlcnic_82xx_get_settings()
297 if (adapter->ahw->port_type == QLCNIC_GBE) { in qlcnic_82xx_get_settings()
310 ethtool_cmd_speed_set(ecmd, adapter->ahw->link_speed); in qlcnic_82xx_get_settings()
311 ecmd->duplex = adapter->ahw->link_duplex; in qlcnic_82xx_get_settings()
312 ecmd->autoneg = adapter->ahw->link_autoneg; in qlcnic_82xx_get_settings()
314 } else if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_82xx_get_settings()
326 if (netif_running(adapter->netdev) && ahw->has_link_events) { in qlcnic_82xx_get_settings()
327 if (ahw->linkup) { in qlcnic_82xx_get_settings()
331 ahw->link_speed = speed * P3P_LINK_SPEED_MHZ; in qlcnic_82xx_get_settings()
334 ethtool_cmd_speed_set(ecmd, ahw->link_speed); in qlcnic_82xx_get_settings()
335 ecmd->autoneg = ahw->link_autoneg; in qlcnic_82xx_get_settings()
336 ecmd->duplex = ahw->link_duplex; in qlcnic_82xx_get_settings()
347 ecmd->phy_address = adapter->ahw->physical_port; in qlcnic_82xx_get_settings()
350 switch (adapter->ahw->board_type) { in qlcnic_82xx_get_settings()
363 ecmd->autoneg = adapter->ahw->link_autoneg; in qlcnic_82xx_get_settings()
379 ahw->has_link_events; in qlcnic_82xx_get_settings()
387 if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_82xx_get_settings()
394 ahw->has_link_events; in qlcnic_82xx_get_settings()
405 adapter->ahw->board_type); in qlcnic_82xx_get_settings()
410 switch (adapter->ahw->module_type) { in qlcnic_82xx_get_settings()
483 if (adapter->ahw->port_type != QLCNIC_GBE) in qlcnic_set_settings()
494 adapter->ahw->link_speed = ethtool_cmd_speed(ecmd); in qlcnic_set_settings()
495 adapter->ahw->link_duplex = ecmd->duplex; in qlcnic_set_settings()
496 adapter->ahw->link_autoneg = ecmd->autoneg; in qlcnic_set_settings()
533 (adapter->ahw->revision_id << 16) | (adapter->pdev)->device; in qlcnic_get_regs()
538 if (adapter->ahw->capabilities & QLC_83XX_ESWITCH_CAPABILITY) in qlcnic_get_regs()
539 regs_buff[2] = adapter->ahw->max_vnic_func; in qlcnic_get_regs()
594 val = XG_LINK_STATE_P3P(adapter->ahw->pci_func, val); in qlcnic_test_link()
779 int port = adapter->ahw->physical_port; in qlcnic_get_pauseparam()
787 if (adapter->ahw->port_type == QLCNIC_GBE) { in qlcnic_get_pauseparam()
813 } else if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_get_pauseparam()
826 adapter->ahw->port_type); in qlcnic_get_pauseparam()
835 int port = adapter->ahw->physical_port; in qlcnic_set_pauseparam()
843 if (adapter->ahw->port_type == QLCNIC_GBE) { in qlcnic_set_pauseparam()
891 } else if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_set_pauseparam()
915 adapter->ahw->port_type); in qlcnic_set_pauseparam()
965 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_irq_test() local
980 ahw->diag_cnt = 0; in qlcnic_irq_test()
985 cmd.req.arg[1] = ahw->pci_func; in qlcnic_irq_test()
991 ret = !ahw->diag_cnt; in qlcnic_irq_test()
1043 adapter->ahw->diag_cnt = 0; in qlcnic_do_lb_test()
1052 } while (!adapter->ahw->diag_cnt); in qlcnic_do_lb_test()
1056 if (!adapter->ahw->diag_cnt) in qlcnic_do_lb_test()
1080 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_loopback_test() local
1087 if (!(ahw->capabilities & QLCNIC_FW_CAPABILITY_MULTI_LOOPBACK)) { in qlcnic_loopback_test()
1095 if (ahw->op_mode == QLCNIC_NON_PRIV_FUNC) { in qlcnic_loopback_test()
1113 ahw->diag_cnt = 0; in qlcnic_loopback_test()
1122 } else if (adapter->ahw->diag_cnt) { in qlcnic_loopback_test()
1123 ret = adapter->ahw->diag_cnt; in qlcnic_loopback_test()
1126 } while (!QLCNIC_IS_LB_CONFIGURED(ahw->loopback_state)); in qlcnic_loopback_test()
1360 if (adapter->ahw->linkup) in qlcnic_get_ethtool_stats()
1374 ret = qlcnic_get_port_stats(adapter, adapter->ahw->pci_func, in qlcnic_get_ethtool_stats()
1380 ret = qlcnic_get_port_stats(adapter, adapter->ahw->pci_func, in qlcnic_get_ethtool_stats()
1398 if (adapter->ahw->op_mode == QLCNIC_NON_PRIV_FUNC) { in qlcnic_set_led()
1566 ethcoal->rx_coalesce_usecs = adapter->ahw->coal.rx_time_us; in qlcnic_get_intr_coalesce()
1567 ethcoal->rx_max_coalesced_frames = adapter->ahw->coal.rx_packets; in qlcnic_get_intr_coalesce()
1568 ethcoal->tx_coalesce_usecs = adapter->ahw->coal.tx_time_us; in qlcnic_get_intr_coalesce()
1569 ethcoal->tx_max_coalesced_frames = adapter->ahw->coal.tx_packets; in qlcnic_get_intr_coalesce()
1578 return adapter->ahw->msg_enable; in qlcnic_get_msglevel()
1585 adapter->ahw->msg_enable = msglvl; in qlcnic_set_msglevel()
1590 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_enable_fw_dump_state()
1597 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_CTRL); in qlcnic_enable_fw_dump_state()
1599 QLCWRX(adapter->ahw, QLC_83XX_IDC_CTRL, val); in qlcnic_enable_fw_dump_state()
1613 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_disable_fw_dump_state()
1620 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_CTRL); in qlcnic_disable_fw_dump_state()
1622 QLCWRX(adapter->ahw, QLC_83XX_IDC_CTRL, val); in qlcnic_disable_fw_dump_state()
1636 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_check_fw_dump_state()
1641 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_CTRL); in qlcnic_check_fw_dump_state()
1654 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_get_dump_flag()
1683 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_get_dump_data()
1717 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_set_dump_mask()
1740 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_set_dump()