Lines Matching refs:ahw

290 	struct qlcnic_hardware_context *ahw = adapter->ahw;  in qlcnic_82xx_get_settings()  local
293 u16 pcifn = ahw->pci_func; in qlcnic_82xx_get_settings()
296 if (adapter->ahw->port_type == QLCNIC_GBE) { in qlcnic_82xx_get_settings()
309 ethtool_cmd_speed_set(ecmd, adapter->ahw->link_speed); in qlcnic_82xx_get_settings()
310 ecmd->duplex = adapter->ahw->link_duplex; in qlcnic_82xx_get_settings()
311 ecmd->autoneg = adapter->ahw->link_autoneg; in qlcnic_82xx_get_settings()
313 } else if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_82xx_get_settings()
325 if (netif_running(adapter->netdev) && ahw->has_link_events) { in qlcnic_82xx_get_settings()
326 if (ahw->linkup) { in qlcnic_82xx_get_settings()
330 ahw->link_speed = speed * P3P_LINK_SPEED_MHZ; in qlcnic_82xx_get_settings()
333 ethtool_cmd_speed_set(ecmd, ahw->link_speed); in qlcnic_82xx_get_settings()
334 ecmd->autoneg = ahw->link_autoneg; in qlcnic_82xx_get_settings()
335 ecmd->duplex = ahw->link_duplex; in qlcnic_82xx_get_settings()
346 ecmd->phy_address = adapter->ahw->physical_port; in qlcnic_82xx_get_settings()
349 switch (adapter->ahw->board_type) { in qlcnic_82xx_get_settings()
362 ecmd->autoneg = adapter->ahw->link_autoneg; in qlcnic_82xx_get_settings()
378 ahw->has_link_events; in qlcnic_82xx_get_settings()
386 if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_82xx_get_settings()
393 ahw->has_link_events; in qlcnic_82xx_get_settings()
404 adapter->ahw->board_type); in qlcnic_82xx_get_settings()
409 switch (adapter->ahw->module_type) { in qlcnic_82xx_get_settings()
482 if (adapter->ahw->port_type != QLCNIC_GBE) in qlcnic_set_settings()
493 adapter->ahw->link_speed = ethtool_cmd_speed(ecmd); in qlcnic_set_settings()
494 adapter->ahw->link_duplex = ecmd->duplex; in qlcnic_set_settings()
495 adapter->ahw->link_autoneg = ecmd->autoneg; in qlcnic_set_settings()
532 (adapter->ahw->revision_id << 16) | (adapter->pdev)->device; in qlcnic_get_regs()
537 if (adapter->ahw->capabilities & QLC_83XX_ESWITCH_CAPABILITY) in qlcnic_get_regs()
538 regs_buff[2] = adapter->ahw->max_vnic_func; in qlcnic_get_regs()
593 val = XG_LINK_STATE_P3P(adapter->ahw->pci_func, val); in qlcnic_test_link()
778 int port = adapter->ahw->physical_port; in qlcnic_get_pauseparam()
786 if (adapter->ahw->port_type == QLCNIC_GBE) { in qlcnic_get_pauseparam()
812 } else if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_get_pauseparam()
825 adapter->ahw->port_type); in qlcnic_get_pauseparam()
834 int port = adapter->ahw->physical_port; in qlcnic_set_pauseparam()
842 if (adapter->ahw->port_type == QLCNIC_GBE) { in qlcnic_set_pauseparam()
890 } else if (adapter->ahw->port_type == QLCNIC_XGBE) { in qlcnic_set_pauseparam()
914 adapter->ahw->port_type); in qlcnic_set_pauseparam()
964 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_irq_test() local
979 ahw->diag_cnt = 0; in qlcnic_irq_test()
984 cmd.req.arg[1] = ahw->pci_func; in qlcnic_irq_test()
990 ret = !ahw->diag_cnt; in qlcnic_irq_test()
1042 adapter->ahw->diag_cnt = 0; in qlcnic_do_lb_test()
1051 } while (!adapter->ahw->diag_cnt); in qlcnic_do_lb_test()
1055 if (!adapter->ahw->diag_cnt) in qlcnic_do_lb_test()
1079 struct qlcnic_hardware_context *ahw = adapter->ahw; in qlcnic_loopback_test() local
1086 if (!(ahw->capabilities & QLCNIC_FW_CAPABILITY_MULTI_LOOPBACK)) { in qlcnic_loopback_test()
1094 if (ahw->op_mode == QLCNIC_NON_PRIV_FUNC) { in qlcnic_loopback_test()
1112 ahw->diag_cnt = 0; in qlcnic_loopback_test()
1121 } else if (adapter->ahw->diag_cnt) { in qlcnic_loopback_test()
1122 ret = adapter->ahw->diag_cnt; in qlcnic_loopback_test()
1125 } while (!QLCNIC_IS_LB_CONFIGURED(ahw->loopback_state)); in qlcnic_loopback_test()
1359 if (adapter->ahw->linkup) in qlcnic_get_ethtool_stats()
1373 ret = qlcnic_get_port_stats(adapter, adapter->ahw->pci_func, in qlcnic_get_ethtool_stats()
1379 ret = qlcnic_get_port_stats(adapter, adapter->ahw->pci_func, in qlcnic_get_ethtool_stats()
1397 if (adapter->ahw->op_mode == QLCNIC_NON_PRIV_FUNC) { in qlcnic_set_led()
1565 ethcoal->rx_coalesce_usecs = adapter->ahw->coal.rx_time_us; in qlcnic_get_intr_coalesce()
1566 ethcoal->rx_max_coalesced_frames = adapter->ahw->coal.rx_packets; in qlcnic_get_intr_coalesce()
1567 ethcoal->tx_coalesce_usecs = adapter->ahw->coal.tx_time_us; in qlcnic_get_intr_coalesce()
1568 ethcoal->tx_max_coalesced_frames = adapter->ahw->coal.tx_packets; in qlcnic_get_intr_coalesce()
1577 return adapter->ahw->msg_enable; in qlcnic_get_msglevel()
1584 adapter->ahw->msg_enable = msglvl; in qlcnic_set_msglevel()
1589 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_enable_fw_dump_state()
1596 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_CTRL); in qlcnic_enable_fw_dump_state()
1598 QLCWRX(adapter->ahw, QLC_83XX_IDC_CTRL, val); in qlcnic_enable_fw_dump_state()
1612 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_disable_fw_dump_state()
1619 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_CTRL); in qlcnic_disable_fw_dump_state()
1621 QLCWRX(adapter->ahw, QLC_83XX_IDC_CTRL, val); in qlcnic_disable_fw_dump_state()
1635 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_check_fw_dump_state()
1640 val = QLCRDX(adapter->ahw, QLC_83XX_IDC_CTRL); in qlcnic_check_fw_dump_state()
1653 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_get_dump_flag()
1682 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_get_dump_data()
1716 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_set_dump_mask()
1739 struct qlcnic_fw_dump *fw_dump = &adapter->ahw->fw_dump; in qlcnic_set_dump()