Lines Matching refs:hw

171 static bool ixgbe_check_cfg_remove(struct ixgbe_hw *hw, struct pci_dev *pdev);
192 ixgbe_check_cfg_remove(&adapter->hw, parent_dev)) in ixgbe_read_pci_cfg_word_parent()
199 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_parent_bus_info() local
203 hw->bus.type = ixgbe_bus_type_pci_express; in ixgbe_get_parent_bus_info()
214 hw->bus.width = ixgbe_convert_bus_width(link_status); in ixgbe_get_parent_bus_info()
215 hw->bus.speed = ixgbe_convert_bus_speed(link_status); in ixgbe_get_parent_bus_info()
229 static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw) in ixgbe_pcie_from_parent() argument
231 switch (hw->device_id) { in ixgbe_pcie_from_parent()
250 if (ixgbe_pcie_from_parent(&adapter->hw)) in ixgbe_check_minimum_link()
308 static void ixgbe_remove_adapter(struct ixgbe_hw *hw) in ixgbe_remove_adapter() argument
310 struct ixgbe_adapter *adapter = hw->back; in ixgbe_remove_adapter()
312 if (!hw->hw_addr) in ixgbe_remove_adapter()
314 hw->hw_addr = NULL; in ixgbe_remove_adapter()
320 static void ixgbe_check_remove(struct ixgbe_hw *hw, u32 reg) in ixgbe_check_remove() argument
331 ixgbe_remove_adapter(hw); in ixgbe_check_remove()
334 value = ixgbe_read_reg(hw, IXGBE_STATUS); in ixgbe_check_remove()
336 ixgbe_remove_adapter(hw); in ixgbe_check_remove()
352 u32 ixgbe_read_reg(struct ixgbe_hw *hw, u32 reg) in ixgbe_read_reg() argument
354 u8 __iomem *reg_addr = ACCESS_ONCE(hw->hw_addr); in ixgbe_read_reg()
361 ixgbe_check_remove(hw, reg); in ixgbe_read_reg()
365 static bool ixgbe_check_cfg_remove(struct ixgbe_hw *hw, struct pci_dev *pdev) in ixgbe_check_cfg_remove() argument
371 ixgbe_remove_adapter(hw); in ixgbe_check_cfg_remove()
377 u16 ixgbe_read_pci_cfg_word(struct ixgbe_hw *hw, u32 reg) in ixgbe_read_pci_cfg_word() argument
379 struct ixgbe_adapter *adapter = hw->back; in ixgbe_read_pci_cfg_word()
382 if (ixgbe_removed(hw->hw_addr)) in ixgbe_read_pci_cfg_word()
386 ixgbe_check_cfg_remove(hw, adapter->pdev)) in ixgbe_read_pci_cfg_word()
392 static u32 ixgbe_read_pci_cfg_dword(struct ixgbe_hw *hw, u32 reg) in ixgbe_read_pci_cfg_dword() argument
394 struct ixgbe_adapter *adapter = hw->back; in ixgbe_read_pci_cfg_dword()
397 if (ixgbe_removed(hw->hw_addr)) in ixgbe_read_pci_cfg_dword()
401 ixgbe_check_cfg_remove(hw, adapter->pdev)) in ixgbe_read_pci_cfg_dword()
407 void ixgbe_write_pci_cfg_word(struct ixgbe_hw *hw, u32 reg, u16 value) in ixgbe_write_pci_cfg_word() argument
409 struct ixgbe_adapter *adapter = hw->back; in ixgbe_write_pci_cfg_word()
411 if (ixgbe_removed(hw->hw_addr)) in ixgbe_write_pci_cfg_word()
466 static void ixgbe_regdump(struct ixgbe_hw *hw, struct ixgbe_reg_info *reginfo) in ixgbe_regdump() argument
475 regs[i] = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); in ixgbe_regdump()
479 regs[i] = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); in ixgbe_regdump()
483 regs[i] = IXGBE_READ_REG(hw, IXGBE_RDLEN(i)); in ixgbe_regdump()
487 regs[i] = IXGBE_READ_REG(hw, IXGBE_RDH(i)); in ixgbe_regdump()
491 regs[i] = IXGBE_READ_REG(hw, IXGBE_RDT(i)); in ixgbe_regdump()
495 regs[i] = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); in ixgbe_regdump()
499 regs[i] = IXGBE_READ_REG(hw, IXGBE_RDBAL(i)); in ixgbe_regdump()
503 regs[i] = IXGBE_READ_REG(hw, IXGBE_RDBAH(i)); in ixgbe_regdump()
507 regs[i] = IXGBE_READ_REG(hw, IXGBE_TDBAL(i)); in ixgbe_regdump()
511 regs[i] = IXGBE_READ_REG(hw, IXGBE_TDBAH(i)); in ixgbe_regdump()
515 regs[i] = IXGBE_READ_REG(hw, IXGBE_TDLEN(i)); in ixgbe_regdump()
519 regs[i] = IXGBE_READ_REG(hw, IXGBE_TDH(i)); in ixgbe_regdump()
523 regs[i] = IXGBE_READ_REG(hw, IXGBE_TDT(i)); in ixgbe_regdump()
527 regs[i] = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i)); in ixgbe_regdump()
531 IXGBE_READ_REG(hw, reginfo->ofs)); in ixgbe_regdump()
551 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_dump() local
584 ixgbe_regdump(hw, reginfo); in ixgbe_dump()
813 ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT); in ixgbe_release_hw_control()
814 IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT, in ixgbe_release_hw_control()
823 ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT); in ixgbe_get_hw_control()
824 IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT, in ixgbe_get_hw_control()
840 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_ivar() local
841 switch (hw->mac.type) { in ixgbe_set_ivar()
847 ivar = IXGBE_READ_REG(hw, IXGBE_IVAR(index)); in ixgbe_set_ivar()
850 IXGBE_WRITE_REG(hw, IXGBE_IVAR(index), ivar); in ixgbe_set_ivar()
860 ivar = IXGBE_READ_REG(&adapter->hw, IXGBE_IVAR_MISC); in ixgbe_set_ivar()
863 IXGBE_WRITE_REG(&adapter->hw, IXGBE_IVAR_MISC, ivar); in ixgbe_set_ivar()
869 ivar = IXGBE_READ_REG(hw, IXGBE_IVAR(queue >> 1)); in ixgbe_set_ivar()
872 IXGBE_WRITE_REG(hw, IXGBE_IVAR(queue >> 1), ivar); in ixgbe_set_ivar()
885 switch (adapter->hw.mac.type) { in ixgbe_irq_rearm_queues()
888 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); in ixgbe_irq_rearm_queues()
895 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(0), mask); in ixgbe_irq_rearm_queues()
897 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(1), mask); in ixgbe_irq_rearm_queues()
928 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_update_xoff_rx_lfc() local
933 if ((hw->fc.current_mode != ixgbe_fc_full) && in ixgbe_update_xoff_rx_lfc()
934 (hw->fc.current_mode != ixgbe_fc_rx_pause)) in ixgbe_update_xoff_rx_lfc()
937 switch (hw->mac.type) { in ixgbe_update_xoff_rx_lfc()
939 data = IXGBE_READ_REG(hw, IXGBE_LXOFFRXC); in ixgbe_update_xoff_rx_lfc()
942 data = IXGBE_READ_REG(hw, IXGBE_LXOFFRXCNT); in ixgbe_update_xoff_rx_lfc()
957 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_update_xoff_received() local
976 switch (hw->mac.type) { in ixgbe_update_xoff_received()
978 pxoffrxc = IXGBE_READ_REG(hw, IXGBE_PXOFFRXC(i)); in ixgbe_update_xoff_received()
981 pxoffrxc = IXGBE_READ_REG(hw, IXGBE_PXOFFRXCNT(i)); in ixgbe_update_xoff_received()
1007 struct ixgbe_hw *hw; in ixgbe_get_tx_pending() local
1015 hw = &adapter->hw; in ixgbe_get_tx_pending()
1016 head = IXGBE_READ_REG(hw, IXGBE_TDH(ring->reg_idx)); in ixgbe_get_tx_pending()
1017 tail = IXGBE_READ_REG(hw, IXGBE_TDT(ring->reg_idx)); in ixgbe_get_tx_pending()
1178 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_clean_tx_irq() local
1188 IXGBE_READ_REG(hw, IXGBE_TDH(tx_ring->reg_idx)), in ixgbe_clean_tx_irq()
1189 IXGBE_READ_REG(hw, IXGBE_TDT(tx_ring->reg_idx)), in ixgbe_clean_tx_irq()
1233 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_update_tx_dca() local
1237 switch (hw->mac.type) { in ixgbe_update_tx_dca()
1260 IXGBE_WRITE_REG(hw, reg_offset, txctrl); in ixgbe_update_tx_dca()
1267 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_update_rx_dca() local
1272 switch (hw->mac.type) { in ixgbe_update_rx_dca()
1289 IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(reg_idx), rxctrl); in ixgbe_update_rx_dca()
1320 IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_CTRL, 2); in ixgbe_setup_dca()
1351 IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_CTRL, 1); in __ixgbe_notify_dca()
2153 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITRSEL, eitrsel); in ixgbe_configure_msix()
2173 switch (adapter->hw.mac.type) { in ixgbe_configure_msix()
2187 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITR(v_idx), 1950); in ixgbe_configure_msix()
2195 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIAC, mask); in ixgbe_configure_msix()
2280 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_write_eitr() local
2284 switch (adapter->hw.mac.type) { in ixgbe_write_eitr()
2302 IXGBE_WRITE_REG(hw, IXGBE_EITR(v_idx), itr_reg); in ixgbe_write_eitr()
2348 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_check_overtemp_subtask() local
2360 switch (hw->device_id) { in ixgbe_check_overtemp_subtask()
2373 if (!(eicr & IXGBE_EICR_LSC) && hw->mac.ops.check_link) { in ixgbe_check_overtemp_subtask()
2377 hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_check_overtemp_subtask()
2384 if (hw->phy.ops.check_overtemp(hw) != IXGBE_ERR_OVERTEMP) in ixgbe_check_overtemp_subtask()
2403 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_check_fan_failure() local
2409 IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1); in ixgbe_check_fan_failure()
2418 switch (adapter->hw.mac.type) { in ixgbe_check_overtemp_event()
2448 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_check_sfp_event() local
2452 IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP2); in ixgbe_check_sfp_event()
2461 IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1); in ixgbe_check_sfp_event()
2471 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_check_lsc() local
2477 IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_LSC); in ixgbe_check_lsc()
2478 IXGBE_WRITE_FLUSH(hw); in ixgbe_check_lsc()
2487 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_irq_enable_queues() local
2489 switch (hw->mac.type) { in ixgbe_irq_enable_queues()
2492 IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask); in ixgbe_irq_enable_queues()
2500 IXGBE_WRITE_REG(hw, IXGBE_EIMS_EX(0), mask); in ixgbe_irq_enable_queues()
2503 IXGBE_WRITE_REG(hw, IXGBE_EIMS_EX(1), mask); in ixgbe_irq_enable_queues()
2515 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_irq_disable_queues() local
2517 switch (hw->mac.type) { in ixgbe_irq_disable_queues()
2520 IXGBE_WRITE_REG(hw, IXGBE_EIMC, mask); in ixgbe_irq_disable_queues()
2528 IXGBE_WRITE_REG(hw, IXGBE_EIMC_EX(0), mask); in ixgbe_irq_disable_queues()
2531 IXGBE_WRITE_REG(hw, IXGBE_EIMC_EX(1), mask); in ixgbe_irq_disable_queues()
2553 switch (adapter->hw.mac.type) { in ixgbe_irq_enable()
2567 switch (adapter->hw.mac.type) { in ixgbe_irq_enable()
2586 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); in ixgbe_irq_enable()
2590 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_irq_enable()
2596 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_msix_other() local
2605 eicr = IXGBE_READ_REG(hw, IXGBE_EICS); in ixgbe_msix_other()
2616 IXGBE_WRITE_REG(hw, IXGBE_EICR, eicr); in ixgbe_msix_other()
2624 switch (hw->mac.type) { in ixgbe_msix_other()
2633 IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC); in ixgbe_msix_other()
2647 IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_FLOW_DIR); in ixgbe_msix_other()
2814 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_intr() local
2822 IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_IRQ_CLEAR_MASK); in ixgbe_intr()
2826 eicr = IXGBE_READ_REG(hw, IXGBE_EICR); in ixgbe_intr()
2843 switch (hw->mac.type) { in ixgbe_intr()
2854 IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC); in ixgbe_intr()
2938 switch (adapter->hw.mac.type) { in ixgbe_irq_disable()
2940 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0); in ixgbe_irq_disable()
2946 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFF0000); in ixgbe_irq_disable()
2947 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC_EX(0), ~0); in ixgbe_irq_disable()
2948 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC_EX(1), ~0); in ixgbe_irq_disable()
2953 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_irq_disable()
2979 e_info(hw, "Legacy interrupt IVAR setup done\n"); in ixgbe_configure_msi_and_legacy()
2992 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_tx_ring() local
2999 IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(reg_idx), 0); in ixgbe_configure_tx_ring()
3000 IXGBE_WRITE_FLUSH(hw); in ixgbe_configure_tx_ring()
3002 IXGBE_WRITE_REG(hw, IXGBE_TDBAL(reg_idx), in ixgbe_configure_tx_ring()
3004 IXGBE_WRITE_REG(hw, IXGBE_TDBAH(reg_idx), (tdba >> 32)); in ixgbe_configure_tx_ring()
3005 IXGBE_WRITE_REG(hw, IXGBE_TDLEN(reg_idx), in ixgbe_configure_tx_ring()
3007 IXGBE_WRITE_REG(hw, IXGBE_TDH(reg_idx), 0); in ixgbe_configure_tx_ring()
3008 IXGBE_WRITE_REG(hw, IXGBE_TDT(reg_idx), 0); in ixgbe_configure_tx_ring()
3055 IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(reg_idx), txdctl); in ixgbe_configure_tx_ring()
3058 if (hw->mac.type == ixgbe_mac_82598EB && in ixgbe_configure_tx_ring()
3059 !(IXGBE_READ_REG(hw, IXGBE_LINKS) & IXGBE_LINKS_UP)) in ixgbe_configure_tx_ring()
3065 txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(reg_idx)); in ixgbe_configure_tx_ring()
3073 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_mtqc() local
3077 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_setup_mtqc()
3081 rttdcs = IXGBE_READ_REG(hw, IXGBE_RTTDCS); in ixgbe_setup_mtqc()
3083 IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); in ixgbe_setup_mtqc()
3105 IXGBE_WRITE_REG(hw, IXGBE_MTQC, mtqc); in ixgbe_setup_mtqc()
3109 u32 sectx = IXGBE_READ_REG(hw, IXGBE_SECTXMINIFG); in ixgbe_setup_mtqc()
3111 IXGBE_WRITE_REG(hw, IXGBE_SECTXMINIFG, sectx); in ixgbe_setup_mtqc()
3116 IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); in ixgbe_setup_mtqc()
3127 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_tx() local
3133 if (hw->mac.type != ixgbe_mac_82598EB) { in ixgbe_configure_tx()
3135 dmatxctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); in ixgbe_configure_tx()
3137 IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, dmatxctl); in ixgbe_configure_tx()
3148 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_enable_rx_drop() local
3150 u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(reg_idx)); in ixgbe_enable_rx_drop()
3154 IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(reg_idx), srrctl); in ixgbe_enable_rx_drop()
3160 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_disable_rx_drop() local
3162 u32 srrctl = IXGBE_READ_REG(hw, IXGBE_SRRCTL(reg_idx)); in ixgbe_disable_rx_drop()
3166 IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(reg_idx), srrctl); in ixgbe_disable_rx_drop()
3191 !(adapter->hw.fc.current_mode & ixgbe_fc_tx_pause) && !pfc_en)) { in ixgbe_set_rx_drop_en()
3205 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_srrctl() local
3209 if (hw->mac.type == ixgbe_mac_82598EB) { in ixgbe_configure_srrctl()
3228 IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(reg_idx), srrctl); in ixgbe_configure_srrctl()
3242 if (adapter->hw.mac.type < ixgbe_mac_X550) in ixgbe_rss_indir_tbl_entries()
3260 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_store_reta() local
3271 if (adapter->hw.mac.type == ixgbe_mac_82598EB) in ixgbe_store_reta()
3281 IXGBE_WRITE_REG(hw, IXGBE_RETA(i >> 2), reta); in ixgbe_store_reta()
3283 IXGBE_WRITE_REG(hw, IXGBE_ERETA((i >> 2) - 32), in ixgbe_store_reta()
3300 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_store_vfreta() local
3308 IXGBE_WRITE_REG(hw, IXGBE_PFVFRETA(i >> 2, pf_pool), in ixgbe_store_vfreta()
3317 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_reta() local
3331 IXGBE_WRITE_REG(hw, IXGBE_RSSRK(i), adapter->rss_key[i]); in ixgbe_setup_reta()
3348 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_vfreta() local
3355 IXGBE_WRITE_REG(hw, IXGBE_PFVFRSSRK(i, pf_pool), in ixgbe_setup_vfreta()
3371 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_mrqc() local
3376 rxcsum = IXGBE_READ_REG(hw, IXGBE_RXCSUM); in ixgbe_setup_mrqc()
3378 IXGBE_WRITE_REG(hw, IXGBE_RXCSUM, rxcsum); in ixgbe_setup_mrqc()
3380 if (adapter->hw.mac.type == ixgbe_mac_82598EB) { in ixgbe_setup_mrqc()
3417 if ((hw->mac.type >= ixgbe_mac_X550) && in ixgbe_setup_mrqc()
3423 IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); in ixgbe_setup_mrqc()
3429 IXGBE_WRITE_REG(hw, IXGBE_PFVFMRQC(pf_pool), vfmrqc); in ixgbe_setup_mrqc()
3433 IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); in ixgbe_setup_mrqc()
3445 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_rscctl() local
3452 rscctrl = IXGBE_READ_REG(hw, IXGBE_RSCCTL(reg_idx)); in ixgbe_configure_rscctl()
3460 IXGBE_WRITE_REG(hw, IXGBE_RSCCTL(reg_idx), rscctrl); in ixgbe_configure_rscctl()
3467 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_rx_desc_queue_enable() local
3472 if (ixgbe_removed(hw->hw_addr)) in ixgbe_rx_desc_queue_enable()
3475 if (hw->mac.type == ixgbe_mac_82598EB && in ixgbe_rx_desc_queue_enable()
3476 !(IXGBE_READ_REG(hw, IXGBE_LINKS) & IXGBE_LINKS_UP)) in ixgbe_rx_desc_queue_enable()
3481 rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(reg_idx)); in ixgbe_rx_desc_queue_enable()
3493 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_disable_rx_queue() local
3498 if (ixgbe_removed(hw->hw_addr)) in ixgbe_disable_rx_queue()
3500 rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(reg_idx)); in ixgbe_disable_rx_queue()
3504 IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(reg_idx), rxdctl); in ixgbe_disable_rx_queue()
3506 if (hw->mac.type == ixgbe_mac_82598EB && in ixgbe_disable_rx_queue()
3507 !(IXGBE_READ_REG(hw, IXGBE_LINKS) & IXGBE_LINKS_UP)) in ixgbe_disable_rx_queue()
3513 rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(reg_idx)); in ixgbe_disable_rx_queue()
3525 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_rx_ring() local
3531 rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(reg_idx)); in ixgbe_configure_rx_ring()
3534 IXGBE_WRITE_REG(hw, IXGBE_RDBAL(reg_idx), (rdba & DMA_BIT_MASK(32))); in ixgbe_configure_rx_ring()
3535 IXGBE_WRITE_REG(hw, IXGBE_RDBAH(reg_idx), (rdba >> 32)); in ixgbe_configure_rx_ring()
3536 IXGBE_WRITE_REG(hw, IXGBE_RDLEN(reg_idx), in ixgbe_configure_rx_ring()
3538 IXGBE_WRITE_REG(hw, IXGBE_RDH(reg_idx), 0); in ixgbe_configure_rx_ring()
3539 IXGBE_WRITE_REG(hw, IXGBE_RDT(reg_idx), 0); in ixgbe_configure_rx_ring()
3545 if (hw->mac.type == ixgbe_mac_82598EB) { in ixgbe_configure_rx_ring()
3559 IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(reg_idx), rxdctl); in ixgbe_configure_rx_ring()
3567 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_psrtype() local
3578 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_setup_psrtype()
3587 IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(VMDQ_P(pool)), psrtype); in ixgbe_setup_psrtype()
3592 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_virtualization() local
3600 vmdctl = IXGBE_READ_REG(hw, IXGBE_VT_CTL); in ixgbe_configure_virtualization()
3605 IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl); in ixgbe_configure_virtualization()
3611 IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (~0) << vf_shift); in ixgbe_configure_virtualization()
3612 IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset ^ 1), reg_offset - 1); in ixgbe_configure_virtualization()
3613 IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset), (~0) << vf_shift); in ixgbe_configure_virtualization()
3614 IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset ^ 1), reg_offset - 1); in ixgbe_configure_virtualization()
3616 IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN); in ixgbe_configure_virtualization()
3619 hw->mac.ops.set_vmdq(hw, 0, VMDQ_P(0)); in ixgbe_configure_virtualization()
3637 IXGBE_WRITE_REG(hw, IXGBE_GCR_EXT, gcr_ext); in ixgbe_configure_virtualization()
3641 hw->mac.ops.set_mac_anti_spoofing(hw, (adapter->num_vfs != 0), in ixgbe_configure_virtualization()
3647 if (hw->mac.ops.set_ethertype_anti_spoofing) in ixgbe_configure_virtualization()
3648 IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_LLDP), in ixgbe_configure_virtualization()
3659 if (hw->mac.ops.set_ethertype_anti_spoofing) in ixgbe_configure_virtualization()
3660 hw->mac.ops.set_ethertype_anti_spoofing(hw, true, i); in ixgbe_configure_virtualization()
3670 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_rx_buffer_len() local
3689 mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); in ixgbe_set_rx_buffer_len()
3694 IXGBE_WRITE_REG(hw, IXGBE_MHADD, mhadd); in ixgbe_set_rx_buffer_len()
3697 hlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0); in ixgbe_set_rx_buffer_len()
3700 IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0); in ixgbe_set_rx_buffer_len()
3717 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_rdrxctl() local
3718 u32 rdrxctl = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); in ixgbe_setup_rdrxctl()
3720 switch (hw->mac.type) { in ixgbe_setup_rdrxctl()
3739 IXGBE_WRITE_REG(hw, IXGBE_RSCDBU, in ixgbe_setup_rdrxctl()
3740 (IXGBE_RSCDBU_RSCACKDIS | IXGBE_READ_REG(hw, IXGBE_RSCDBU))); in ixgbe_setup_rdrxctl()
3751 IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, rdrxctl); in ixgbe_setup_rdrxctl()
3762 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_rx() local
3767 hw->mac.ops.disable_rx(hw); in ixgbe_configure_rx()
3773 rfctl = IXGBE_READ_REG(hw, IXGBE_RFCTL); in ixgbe_configure_rx()
3777 IXGBE_WRITE_REG(hw, IXGBE_RFCTL, rfctl); in ixgbe_configure_rx()
3792 rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL); in ixgbe_configure_rx()
3794 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_configure_rx()
3799 hw->mac.ops.enable_rx_dma(hw, rxctrl); in ixgbe_configure_rx()
3806 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_vlan_rx_add_vid() local
3809 hw->mac.ops.set_vfta(&adapter->hw, vid, VMDQ_P(0), true); in ixgbe_vlan_rx_add_vid()
3819 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_vlan_rx_kill_vid() local
3822 hw->mac.ops.set_vfta(&adapter->hw, vid, VMDQ_P(0), false); in ixgbe_vlan_rx_kill_vid()
3834 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_vlan_strip_disable() local
3838 switch (hw->mac.type) { in ixgbe_vlan_strip_disable()
3840 vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL); in ixgbe_vlan_strip_disable()
3842 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl); in ixgbe_vlan_strip_disable()
3854 vlnctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(j)); in ixgbe_vlan_strip_disable()
3856 IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(j), vlnctrl); in ixgbe_vlan_strip_disable()
3870 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_vlan_strip_enable() local
3874 switch (hw->mac.type) { in ixgbe_vlan_strip_enable()
3876 vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL); in ixgbe_vlan_strip_enable()
3878 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl); in ixgbe_vlan_strip_enable()
3890 vlnctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(j)); in ixgbe_vlan_strip_enable()
3892 IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(j), vlnctrl); in ixgbe_vlan_strip_enable()
3922 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_write_mc_addr_list() local
3927 if (hw->mac.ops.update_mc_addr_list) in ixgbe_write_mc_addr_list()
3928 hw->mac.ops.update_mc_addr_list(hw, netdev); in ixgbe_write_mc_addr_list()
3942 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_full_sync_mac_table() local
3944 for (i = 0; i < hw->mac.num_rar_entries; i++) { in ixgbe_full_sync_mac_table()
3946 hw->mac.ops.set_rar(hw, i, adapter->mac_table[i].addr, in ixgbe_full_sync_mac_table()
3950 hw->mac.ops.clear_rar(hw, i); in ixgbe_full_sync_mac_table()
3959 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_sync_mac_table() local
3961 for (i = 0; i < hw->mac.num_rar_entries; i++) { in ixgbe_sync_mac_table()
3965 hw->mac.ops.set_rar(hw, i, in ixgbe_sync_mac_table()
3970 hw->mac.ops.clear_rar(hw, i); in ixgbe_sync_mac_table()
3981 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_flush_sw_mac_table() local
3983 for (i = 0; i < hw->mac.num_rar_entries; i++) { in ixgbe_flush_sw_mac_table()
3994 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_available_rars() local
3997 for (i = 0; i < hw->mac.num_rar_entries; i++) { in ixgbe_available_rars()
4008 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_mac_set_default_filter() local
4014 hw->mac.ops.set_rar(hw, 0, adapter->mac_table[0].addr, in ixgbe_mac_set_default_filter()
4021 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_add_mac_filter() local
4027 for (i = 0; i < hw->mac.num_rar_entries; i++) { in ixgbe_add_mac_filter()
4044 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_del_mac_filter() local
4049 for (i = 0; i < hw->mac.num_rar_entries; i++) { in ixgbe_del_mac_filter()
4103 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_rx_mode() local
4109 fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); in ixgbe_set_rx_mode()
4110 vlnctrl = IXGBE_READ_REG(hw, IXGBE_VLNCTRL); in ixgbe_set_rx_mode()
4122 hw->addr_ctrl.user_set_promisc = true; in ixgbe_set_rx_mode()
4138 hw->addr_ctrl.user_set_promisc = false; in ixgbe_set_rx_mode()
4164 if (hw->mac.type != ixgbe_mac_82598EB) { in ixgbe_set_rx_mode()
4165 vmolr |= IXGBE_READ_REG(hw, IXGBE_VMOLR(VMDQ_P(0))) & in ixgbe_set_rx_mode()
4168 IXGBE_WRITE_REG(hw, IXGBE_VMOLR(VMDQ_P(0)), vmolr); in ixgbe_set_rx_mode()
4183 IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, vlnctrl); in ixgbe_set_rx_mode()
4184 IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); in ixgbe_set_rx_mode()
4226 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_dcb() local
4230 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_configure_dcb()
4235 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_configure_dcb()
4245 ixgbe_dcb_calculate_tc_credits(hw, &adapter->dcb_cfg, max_frame, in ixgbe_configure_dcb()
4247 ixgbe_dcb_calculate_tc_credits(hw, &adapter->dcb_cfg, max_frame, in ixgbe_configure_dcb()
4249 ixgbe_dcb_hw_config(hw, &adapter->dcb_cfg); in ixgbe_configure_dcb()
4251 ixgbe_dcb_hw_ets(&adapter->hw, in ixgbe_configure_dcb()
4254 ixgbe_dcb_hw_pfc_config(&adapter->hw, in ixgbe_configure_dcb()
4260 if (hw->mac.type != ixgbe_mac_82598EB) { in ixgbe_configure_dcb()
4270 IXGBE_WRITE_REG(hw, IXGBE_RQTC, msb * 0x11111111); in ixgbe_configure_dcb()
4286 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_hpbthresh() local
4303 switch (hw->mac.type) { in ixgbe_hpbthresh()
4320 rx_pba = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(pb)) >> 10; in ixgbe_hpbthresh()
4346 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_lpbthresh() local
4363 switch (hw->mac.type) { in ixgbe_lpbthresh()
4383 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_pbthresh_setup() local
4391 hw->fc.high_water[i] = ixgbe_hpbthresh(adapter, i); in ixgbe_pbthresh_setup()
4392 hw->fc.low_water[i] = ixgbe_lpbthresh(adapter, i); in ixgbe_pbthresh_setup()
4395 if (hw->fc.low_water[i] > hw->fc.high_water[i]) in ixgbe_pbthresh_setup()
4396 hw->fc.low_water[i] = 0; in ixgbe_pbthresh_setup()
4400 hw->fc.high_water[i] = 0; in ixgbe_pbthresh_setup()
4405 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_pb() local
4415 hw->mac.ops.set_rxpba(hw, tc, hdrm, PBA_STRATEGY_EQUAL); in ixgbe_configure_pb()
4421 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_fdir_filter_restore() local
4428 ixgbe_fdir_set_input_mask_82599(hw, &adapter->fdir_mask); in ixgbe_fdir_filter_restore()
4432 ixgbe_fdir_write_perfect_filter_82599(hw, in ixgbe_fdir_filter_restore()
4446 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_macvlan_set_rx_mode() local
4450 vmolr = IXGBE_READ_REG(hw, IXGBE_VMOLR(pool)); in ixgbe_macvlan_set_rx_mode()
4460 hw->mac.ops.update_mc_addr_list(hw, dev); in ixgbe_macvlan_set_rx_mode()
4463 IXGBE_WRITE_REG(hw, IXGBE_VMOLR(pool), vmolr); in ixgbe_macvlan_set_rx_mode()
4470 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_fwd_psrtype() local
4478 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_fwd_psrtype()
4486 IXGBE_WRITE_REG(hw, IXGBE_PSRTYPE(VMDQ_P(pool)), psrtype); in ixgbe_fwd_psrtype()
4654 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure() local
4669 switch (hw->mac.type) { in ixgbe_configure()
4672 hw->mac.ops.disable_rx_buff(hw); in ixgbe_configure()
4679 ixgbe_init_fdir_signature_82599(&adapter->hw, in ixgbe_configure()
4682 ixgbe_init_fdir_perfect_82599(&adapter->hw, in ixgbe_configure()
4687 switch (hw->mac.type) { in ixgbe_configure()
4690 hw->mac.ops.enable_rx_buff(hw); in ixgbe_configure()
4706 static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw) in ixgbe_is_sfp() argument
4708 switch (hw->phy.type) { in ixgbe_is_sfp()
4725 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_is_sfp()
4744 if (adapter->hw.mac.type == ixgbe_mac_82598EB) in ixgbe_sfp_link_config()
4756 static int ixgbe_non_sfp_link_config(struct ixgbe_hw *hw) in ixgbe_non_sfp_link_config() argument
4762 if (hw->mac.ops.check_link) in ixgbe_non_sfp_link_config()
4763 ret = hw->mac.ops.check_link(hw, &speed, &link_up, false); in ixgbe_non_sfp_link_config()
4768 speed = hw->phy.autoneg_advertised; in ixgbe_non_sfp_link_config()
4769 if ((!speed) && (hw->mac.ops.get_link_capabilities)) in ixgbe_non_sfp_link_config()
4770 ret = hw->mac.ops.get_link_capabilities(hw, &speed, in ixgbe_non_sfp_link_config()
4775 if (hw->mac.ops.setup_link) in ixgbe_non_sfp_link_config()
4776 ret = hw->mac.ops.setup_link(hw, speed, link_up); in ixgbe_non_sfp_link_config()
4783 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_gpie() local
4794 switch (hw->mac.type) { in ixgbe_setup_gpie()
4796 IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE); in ixgbe_setup_gpie()
4803 IXGBE_WRITE_REG(hw, IXGBE_EIAM_EX(0), 0xFFFFFFFF); in ixgbe_setup_gpie()
4804 IXGBE_WRITE_REG(hw, IXGBE_EIAM_EX(1), 0xFFFFFFFF); in ixgbe_setup_gpie()
4810 IXGBE_WRITE_REG(hw, IXGBE_EIAM, IXGBE_EICS_RTX_QUEUE); in ixgbe_setup_gpie()
4834 switch (adapter->hw.mac.type) { in ixgbe_setup_gpie()
4850 if (hw->mac.type == ixgbe_mac_82599EB) { in ixgbe_setup_gpie()
4855 IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); in ixgbe_setup_gpie()
4860 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_up_complete() local
4873 if (hw->mac.ops.enable_tx_laser) in ixgbe_up_complete()
4874 hw->mac.ops.enable_tx_laser(hw); in ixgbe_up_complete()
4880 if (ixgbe_is_sfp(hw)) { in ixgbe_up_complete()
4883 err = ixgbe_non_sfp_link_config(hw); in ixgbe_up_complete()
4889 IXGBE_READ_REG(hw, IXGBE_EICR); in ixgbe_up_complete()
4897 u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); in ixgbe_up_complete()
4909 ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); in ixgbe_up_complete()
4911 IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); in ixgbe_up_complete()
4945 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_reset() local
4950 if (ixgbe_removed(hw->hw_addr)) in ixgbe_reset()
4961 err = hw->mac.ops.init_hw(hw); in ixgbe_reset()
4990 if (hw->mac.san_mac_rar_index) in ixgbe_reset()
4991 hw->mac.ops.set_vmdq_san_mac(hw, VMDQ_P(0)); in ixgbe_reset()
5073 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_down() local
5083 hw->mac.ops.disable_rx(hw); in ixgbe_down()
5123 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITRSEL, 0); in ixgbe_down()
5139 IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(reg_idx), IXGBE_TXDCTL_SWFLSH); in ixgbe_down()
5143 switch (hw->mac.type) { in ixgbe_down()
5148 IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, in ixgbe_down()
5149 (IXGBE_READ_REG(hw, IXGBE_DMATXCTL) & in ixgbe_down()
5160 if (hw->mac.ops.disable_tx_laser) in ixgbe_down()
5161 hw->mac.ops.disable_tx_laser(hw); in ixgbe_down()
5194 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_sw_init() local
5205 hw->vendor_id = pdev->vendor; in ixgbe_sw_init()
5206 hw->device_id = pdev->device; in ixgbe_sw_init()
5207 hw->revision_id = pdev->revision; in ixgbe_sw_init()
5208 hw->subsystem_vendor_id = pdev->subsystem_vendor; in ixgbe_sw_init()
5209 hw->subsystem_device_id = pdev->subsystem_device; in ixgbe_sw_init()
5234 hw->mac.num_rar_entries, in ixgbe_sw_init()
5238 switch (hw->mac.type) { in ixgbe_sw_init()
5243 if (hw->device_id == IXGBE_DEV_ID_82598AT) in ixgbe_sw_init()
5259 if (hw->device_id == IXGBE_DEV_ID_82599_T3_LOM) in ixgbe_sw_init()
5263 fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM); in ixgbe_sw_init()
5286 switch (hw->mac.type) { in ixgbe_sw_init()
5325 hw->fc.requested_mode = ixgbe_fc_full; in ixgbe_sw_init()
5326 hw->fc.current_mode = ixgbe_fc_full; /* init for ethtool output */ in ixgbe_sw_init()
5328 hw->fc.pause_time = IXGBE_DEFAULT_FCPAUSE; in ixgbe_sw_init()
5329 hw->fc.send_xon = true; in ixgbe_sw_init()
5330 hw->fc.disable_fc_autoneg = ixgbe_device_supports_autoneg_fc(hw); in ixgbe_sw_init()
5337 if (hw->mac.type != ixgbe_mac_82598EB) { in ixgbe_sw_init()
5359 if (ixgbe_init_eeprom_params_generic(hw)) { in ixgbe_sw_init()
5645 (adapter->hw.mac.type == ixgbe_mac_82599EB) && in ixgbe_change_mtu()
5784 adapter->hw.hw_addr = adapter->io_addr; in ixgbe_resume()
5806 IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); in ixgbe_resume()
5828 struct ixgbe_hw *hw = &adapter->hw; in __ixgbe_shutdown() local
5850 if (hw->mac.ops.stop_link_on_d3) in __ixgbe_shutdown()
5851 hw->mac.ops.stop_link_on_d3(hw); in __ixgbe_shutdown()
5857 if (hw->mac.ops.enable_tx_laser) in __ixgbe_shutdown()
5858 hw->mac.ops.enable_tx_laser(hw); in __ixgbe_shutdown()
5862 fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); in __ixgbe_shutdown()
5864 IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); in __ixgbe_shutdown()
5867 ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL); in __ixgbe_shutdown()
5869 IXGBE_WRITE_REG(hw, IXGBE_CTRL, ctrl); in __ixgbe_shutdown()
5871 IXGBE_WRITE_REG(hw, IXGBE_WUFC, wufc); in __ixgbe_shutdown()
5873 IXGBE_WRITE_REG(hw, IXGBE_WUC, 0); in __ixgbe_shutdown()
5874 IXGBE_WRITE_REG(hw, IXGBE_WUFC, 0); in __ixgbe_shutdown()
5877 switch (hw->mac.type) { in __ixgbe_shutdown()
5941 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_update_stats() local
5995 hwstats->crcerrs += IXGBE_READ_REG(hw, IXGBE_CRCERRS); in ixgbe_update_stats()
6000 mpc = IXGBE_READ_REG(hw, IXGBE_MPC(i)); in ixgbe_update_stats()
6004 hwstats->pxontxc[i] += IXGBE_READ_REG(hw, IXGBE_PXONTXC(i)); in ixgbe_update_stats()
6005 hwstats->pxofftxc[i] += IXGBE_READ_REG(hw, IXGBE_PXOFFTXC(i)); in ixgbe_update_stats()
6006 switch (hw->mac.type) { in ixgbe_update_stats()
6008 hwstats->rnbc[i] += IXGBE_READ_REG(hw, IXGBE_RNBC(i)); in ixgbe_update_stats()
6009 hwstats->qbtc[i] += IXGBE_READ_REG(hw, IXGBE_QBTC(i)); in ixgbe_update_stats()
6010 hwstats->qbrc[i] += IXGBE_READ_REG(hw, IXGBE_QBRC(i)); in ixgbe_update_stats()
6012 IXGBE_READ_REG(hw, IXGBE_PXONRXC(i)); in ixgbe_update_stats()
6019 IXGBE_READ_REG(hw, IXGBE_PXONRXCNT(i)); in ixgbe_update_stats()
6028 hwstats->qptc[i] += IXGBE_READ_REG(hw, IXGBE_QPTC(i)); in ixgbe_update_stats()
6029 hwstats->qprc[i] += IXGBE_READ_REG(hw, IXGBE_QPRC(i)); in ixgbe_update_stats()
6030 if ((hw->mac.type == ixgbe_mac_82599EB) || in ixgbe_update_stats()
6031 (hw->mac.type == ixgbe_mac_X540) || in ixgbe_update_stats()
6032 (hw->mac.type == ixgbe_mac_X550) || in ixgbe_update_stats()
6033 (hw->mac.type == ixgbe_mac_X550EM_x)) { in ixgbe_update_stats()
6034 hwstats->qbtc[i] += IXGBE_READ_REG(hw, IXGBE_QBTC_L(i)); in ixgbe_update_stats()
6035 IXGBE_READ_REG(hw, IXGBE_QBTC_H(i)); /* to clear */ in ixgbe_update_stats()
6036 hwstats->qbrc[i] += IXGBE_READ_REG(hw, IXGBE_QBRC_L(i)); in ixgbe_update_stats()
6037 IXGBE_READ_REG(hw, IXGBE_QBRC_H(i)); /* to clear */ in ixgbe_update_stats()
6041 hwstats->gprc += IXGBE_READ_REG(hw, IXGBE_GPRC); in ixgbe_update_stats()
6048 switch (hw->mac.type) { in ixgbe_update_stats()
6050 hwstats->lxonrxc += IXGBE_READ_REG(hw, IXGBE_LXONRXC); in ixgbe_update_stats()
6051 hwstats->gorc += IXGBE_READ_REG(hw, IXGBE_GORCH); in ixgbe_update_stats()
6052 hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCH); in ixgbe_update_stats()
6053 hwstats->tor += IXGBE_READ_REG(hw, IXGBE_TORH); in ixgbe_update_stats()
6059 hwstats->o2bgptc += IXGBE_READ_REG(hw, IXGBE_O2BGPTC); in ixgbe_update_stats()
6060 hwstats->o2bspc += IXGBE_READ_REG(hw, IXGBE_O2BSPC); in ixgbe_update_stats()
6061 hwstats->b2ospc += IXGBE_READ_REG(hw, IXGBE_B2OSPC); in ixgbe_update_stats()
6062 hwstats->b2ogprc += IXGBE_READ_REG(hw, IXGBE_B2OGPRC); in ixgbe_update_stats()
6066 IXGBE_READ_REG(hw, IXGBE_QPRDC(i)); in ixgbe_update_stats()
6067 hwstats->gorc += IXGBE_READ_REG(hw, IXGBE_GORCL); in ixgbe_update_stats()
6068 IXGBE_READ_REG(hw, IXGBE_GORCH); /* to clear */ in ixgbe_update_stats()
6069 hwstats->gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL); in ixgbe_update_stats()
6070 IXGBE_READ_REG(hw, IXGBE_GOTCH); /* to clear */ in ixgbe_update_stats()
6071 hwstats->tor += IXGBE_READ_REG(hw, IXGBE_TORL); in ixgbe_update_stats()
6072 IXGBE_READ_REG(hw, IXGBE_TORH); /* to clear */ in ixgbe_update_stats()
6073 hwstats->lxonrxc += IXGBE_READ_REG(hw, IXGBE_LXONRXCNT); in ixgbe_update_stats()
6074 hwstats->fdirmatch += IXGBE_READ_REG(hw, IXGBE_FDIRMATCH); in ixgbe_update_stats()
6075 hwstats->fdirmiss += IXGBE_READ_REG(hw, IXGBE_FDIRMISS); in ixgbe_update_stats()
6077 hwstats->fccrc += IXGBE_READ_REG(hw, IXGBE_FCCRC); in ixgbe_update_stats()
6078 hwstats->fcoerpdc += IXGBE_READ_REG(hw, IXGBE_FCOERPDC); in ixgbe_update_stats()
6079 hwstats->fcoeprc += IXGBE_READ_REG(hw, IXGBE_FCOEPRC); in ixgbe_update_stats()
6080 hwstats->fcoeptc += IXGBE_READ_REG(hw, IXGBE_FCOEPTC); in ixgbe_update_stats()
6081 hwstats->fcoedwrc += IXGBE_READ_REG(hw, IXGBE_FCOEDWRC); in ixgbe_update_stats()
6082 hwstats->fcoedwtc += IXGBE_READ_REG(hw, IXGBE_FCOEDWTC); in ixgbe_update_stats()
6102 bprc = IXGBE_READ_REG(hw, IXGBE_BPRC); in ixgbe_update_stats()
6104 hwstats->mprc += IXGBE_READ_REG(hw, IXGBE_MPRC); in ixgbe_update_stats()
6105 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_update_stats()
6107 hwstats->roc += IXGBE_READ_REG(hw, IXGBE_ROC); in ixgbe_update_stats()
6108 hwstats->prc64 += IXGBE_READ_REG(hw, IXGBE_PRC64); in ixgbe_update_stats()
6109 hwstats->prc127 += IXGBE_READ_REG(hw, IXGBE_PRC127); in ixgbe_update_stats()
6110 hwstats->prc255 += IXGBE_READ_REG(hw, IXGBE_PRC255); in ixgbe_update_stats()
6111 hwstats->prc511 += IXGBE_READ_REG(hw, IXGBE_PRC511); in ixgbe_update_stats()
6112 hwstats->prc1023 += IXGBE_READ_REG(hw, IXGBE_PRC1023); in ixgbe_update_stats()
6113 hwstats->prc1522 += IXGBE_READ_REG(hw, IXGBE_PRC1522); in ixgbe_update_stats()
6114 hwstats->rlec += IXGBE_READ_REG(hw, IXGBE_RLEC); in ixgbe_update_stats()
6115 lxon = IXGBE_READ_REG(hw, IXGBE_LXONTXC); in ixgbe_update_stats()
6117 lxoff = IXGBE_READ_REG(hw, IXGBE_LXOFFTXC); in ixgbe_update_stats()
6119 hwstats->gptc += IXGBE_READ_REG(hw, IXGBE_GPTC); in ixgbe_update_stats()
6120 hwstats->mptc += IXGBE_READ_REG(hw, IXGBE_MPTC); in ixgbe_update_stats()
6128 hwstats->ruc += IXGBE_READ_REG(hw, IXGBE_RUC); in ixgbe_update_stats()
6129 hwstats->rfc += IXGBE_READ_REG(hw, IXGBE_RFC); in ixgbe_update_stats()
6130 hwstats->rjc += IXGBE_READ_REG(hw, IXGBE_RJC); in ixgbe_update_stats()
6131 hwstats->tpr += IXGBE_READ_REG(hw, IXGBE_TPR); in ixgbe_update_stats()
6132 hwstats->ptc64 += IXGBE_READ_REG(hw, IXGBE_PTC64); in ixgbe_update_stats()
6134 hwstats->ptc127 += IXGBE_READ_REG(hw, IXGBE_PTC127); in ixgbe_update_stats()
6135 hwstats->ptc255 += IXGBE_READ_REG(hw, IXGBE_PTC255); in ixgbe_update_stats()
6136 hwstats->ptc511 += IXGBE_READ_REG(hw, IXGBE_PTC511); in ixgbe_update_stats()
6137 hwstats->ptc1023 += IXGBE_READ_REG(hw, IXGBE_PTC1023); in ixgbe_update_stats()
6138 hwstats->ptc1522 += IXGBE_READ_REG(hw, IXGBE_PTC1522); in ixgbe_update_stats()
6139 hwstats->bptc += IXGBE_READ_REG(hw, IXGBE_BPTC); in ixgbe_update_stats()
6158 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_fdir_reinit_subtask() local
6176 if (ixgbe_reinit_fdir_tables_82599(hw) == 0) { in ixgbe_fdir_reinit_subtask()
6181 IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMS_FLOW_DIR); in ixgbe_fdir_reinit_subtask()
6199 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_check_hang_subtask() local
6221 IXGBE_WRITE_REG(hw, IXGBE_EICS, in ixgbe_check_hang_subtask()
6243 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_watchdog_update_link() local
6251 if (hw->mac.ops.check_link) { in ixgbe_watchdog_update_link()
6252 hw->mac.ops.check_link(hw, &link_speed, &link_up, false); in ixgbe_watchdog_update_link()
6263 hw->mac.ops.fc_enable(hw); in ixgbe_watchdog_update_link()
6271 IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EIMC_LSC); in ixgbe_watchdog_update_link()
6272 IXGBE_WRITE_FLUSH(hw); in ixgbe_watchdog_update_link()
6304 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_watchdog_link_is_up() local
6316 switch (hw->mac.type) { in ixgbe_watchdog_link_is_up()
6318 u32 frctl = IXGBE_READ_REG(hw, IXGBE_FCTRL); in ixgbe_watchdog_link_is_up()
6319 u32 rmcs = IXGBE_READ_REG(hw, IXGBE_RMCS); in ixgbe_watchdog_link_is_up()
6328 u32 mflcn = IXGBE_READ_REG(hw, IXGBE_MFLCN); in ixgbe_watchdog_link_is_up()
6329 u32 fccfg = IXGBE_READ_REG(hw, IXGBE_FCCFG); in ixgbe_watchdog_link_is_up()
6390 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_watchdog_link_is_down() local
6400 if (ixgbe_is_sfp(hw) && hw->mac.type == ixgbe_mac_82598EB) in ixgbe_watchdog_link_is_down()
6429 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_vf_tx_pending() local
6439 if (hw->mac.type >= ixgbe_mac_X550) in ixgbe_vf_tx_pending()
6446 h = IXGBE_READ_REG(hw, IXGBE_PVFTDHN(q_per_pool, i, j)); in ixgbe_vf_tx_pending()
6447 t = IXGBE_READ_REG(hw, IXGBE_PVFTDTN(q_per_pool, i, j)); in ixgbe_vf_tx_pending()
6492 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_check_for_bad_vf() local
6502 gpc = IXGBE_READ_REG(hw, IXGBE_TXDGPC); in ixgbe_check_for_bad_vf()
6542 if (adapter->hw.mac.type == ixgbe_mac_82598EB || in ixgbe_spoof_check()
6546 ssvpc = IXGBE_READ_REG(&adapter->hw, IXGBE_SSVPC); in ixgbe_spoof_check()
6601 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_sfp_detection_subtask() local
6613 err = hw->phy.ops.identify_sfp(hw); in ixgbe_sfp_detection_subtask()
6638 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_sfp_detection_subtask()
6639 err = hw->phy.ops.reset(hw); in ixgbe_sfp_detection_subtask()
6641 err = hw->mac.ops.setup_sfp(hw); in ixgbe_sfp_detection_subtask()
6647 e_info(probe, "detected SFP+: %d\n", hw->phy.sfp_type); in ixgbe_sfp_detection_subtask()
6668 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_sfp_link_config_subtask() local
6681 speed = hw->phy.autoneg_advertised; in ixgbe_sfp_link_config_subtask()
6682 if ((!speed) && (hw->mac.ops.get_link_capabilities)) { in ixgbe_sfp_link_config_subtask()
6683 hw->mac.ops.get_link_capabilities(hw, &speed, &autoneg); in ixgbe_sfp_link_config_subtask()
6692 if (hw->mac.ops.setup_link) in ixgbe_sfp_link_config_subtask()
6693 hw->mac.ops.setup_link(hw, speed, true); in ixgbe_sfp_link_config_subtask()
6752 if (ixgbe_removed(adapter->hw.hw_addr)) { in ixgbe_service_task()
7233 ixgbe_fdir_add_signature_filter_82599(&q_vector->adapter->hw, in ixgbe_atr()
7450 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_mac() local
7457 ixgbe_del_mac_filter(adapter, hw->mac.addr, VMDQ_P(0)); in ixgbe_set_mac()
7459 memcpy(hw->mac.addr, addr->sa_data, netdev->addr_len); in ixgbe_set_mac()
7461 ret = ixgbe_add_mac_filter(adapter, hw->mac.addr, VMDQ_P(0)); in ixgbe_set_mac()
7469 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_mdio_read() local
7473 if (prtad != hw->phy.mdio.prtad) in ixgbe_mdio_read()
7475 rc = hw->phy.ops.read_reg(hw, addr, devad, &value); in ixgbe_mdio_read()
7485 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_mdio_write() local
7487 if (prtad != hw->phy.mdio.prtad) in ixgbe_mdio_write()
7489 return hw->phy.ops.write_reg(hw, addr, devad, value); in ixgbe_mdio_write()
7502 return mdio_mii_ioctl(&adapter->hw.phy.mdio, if_mii(req), cmd); in ixgbe_ioctl()
7517 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_add_sanmac_netdev() local
7519 if (is_valid_ether_addr(hw->mac.san_addr)) { in ixgbe_add_sanmac_netdev()
7521 err = dev_addr_add(dev, hw->mac.san_addr, NETDEV_HW_ADDR_T_SAN); in ixgbe_add_sanmac_netdev()
7525 hw->mac.ops.set_vmdq_san_mac(hw, VMDQ_P(0)); in ixgbe_add_sanmac_netdev()
7541 struct ixgbe_mac_info *mac = &adapter->hw.mac; in ixgbe_del_sanmac_netdev()
7631 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_validate_rtr() local
7638 if (hw->mac.type == ixgbe_mac_82598EB) in ixgbe_validate_rtr()
7641 reg = IXGBE_READ_REG(hw, IXGBE_RTRUP2TC); in ixgbe_validate_rtr()
7653 IXGBE_WRITE_REG(hw, IXGBE_RTRUP2TC, reg); in ixgbe_validate_rtr()
7693 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_tc() local
7698 (hw->mac.type == ixgbe_mac_82598EB && in ixgbe_setup_tc()
7721 if (adapter->hw.mac.type == ixgbe_mac_82598EB) { in ixgbe_setup_tc()
7722 adapter->last_lfc_mode = adapter->hw.fc.requested_mode; in ixgbe_setup_tc()
7723 adapter->hw.fc.requested_mode = ixgbe_fc_none; in ixgbe_setup_tc()
7728 if (adapter->hw.mac.type == ixgbe_mac_82598EB) in ixgbe_setup_tc()
7729 adapter->hw.fc.requested_mode = adapter->last_lfc_mode; in ixgbe_setup_tc()
7874 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_add_vxlan_port() local
7893 IXGBE_WRITE_REG(hw, IXGBE_VXLANCTRL, new_port); in ixgbe_add_vxlan_port()
7906 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_del_vxlan_port() local
7919 IXGBE_WRITE_REG(hw, IXGBE_VXLANCTRL, 0); in ixgbe_del_vxlan_port()
7946 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_configure_bridge_mode() local
7953 IXGBE_WRITE_REG(&adapter->hw, IXGBE_PFDTXGSWC, 0); in ixgbe_configure_bridge_mode()
7959 vmdctl = IXGBE_READ_REG(hw, IXGBE_VMD_CTL); in ixgbe_configure_bridge_mode()
7961 IXGBE_WRITE_REG(hw, IXGBE_VMD_CTL, vmdctl); in ixgbe_configure_bridge_mode()
7968 if (hw->mac.ops.set_source_address_pruning) in ixgbe_configure_bridge_mode()
7969 hw->mac.ops.set_source_address_pruning(hw, in ixgbe_configure_bridge_mode()
7976 IXGBE_WRITE_REG(&adapter->hw, IXGBE_PFDTXGSWC, in ixgbe_configure_bridge_mode()
7982 vmdctl = IXGBE_READ_REG(hw, IXGBE_VMD_CTL); in ixgbe_configure_bridge_mode()
7985 IXGBE_WRITE_REG(hw, IXGBE_VMD_CTL, vmdctl); in ixgbe_configure_bridge_mode()
7992 if (hw->mac.ops.set_source_address_pruning) in ixgbe_configure_bridge_mode()
7993 hw->mac.ops.set_source_address_pruning(hw, in ixgbe_configure_bridge_mode()
8217 if (ixgbe_pcie_from_parent(&adapter->hw)) in ixgbe_enumerate_functions()
8254 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_wol_supported() local
8265 if (hw->bus.func != 0) in ixgbe_wol_supported()
8297 (hw->bus.func == 0))) { in ixgbe_wol_supported()
8314 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_platform_mac_addr() local
8319 ether_addr_copy(hw->mac.perm_addr, addr); in ixgbe_get_platform_mac_addr()
8325 ether_addr_copy(hw->mac.perm_addr, idprom->id_ethaddr); in ixgbe_get_platform_mac_addr()
8344 struct ixgbe_hw *hw; in ixgbe_probe() local
8414 hw = &adapter->hw; in ixgbe_probe()
8415 hw->back = adapter; in ixgbe_probe()
8418 hw->hw_addr = ioremap(pci_resource_start(pdev, 0), in ixgbe_probe()
8420 adapter->io_addr = hw->hw_addr; in ixgbe_probe()
8421 if (!hw->hw_addr) { in ixgbe_probe()
8432 memcpy(&hw->mac.ops, ii->mac_ops, sizeof(hw->mac.ops)); in ixgbe_probe()
8433 hw->mac.type = ii->mac; in ixgbe_probe()
8436 memcpy(&hw->eeprom.ops, ii->eeprom_ops, sizeof(hw->eeprom.ops)); in ixgbe_probe()
8437 eec = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_probe()
8438 if (ixgbe_removed(hw->hw_addr)) { in ixgbe_probe()
8444 hw->eeprom.ops.read = &ixgbe_read_eeprom_bit_bang_generic; in ixgbe_probe()
8447 memcpy(&hw->phy.ops, ii->phy_ops, sizeof(hw->phy.ops)); in ixgbe_probe()
8448 hw->phy.sfp_type = ixgbe_sfp_type_unknown; in ixgbe_probe()
8450 hw->phy.mdio.prtad = MDIO_PRTAD_NONE; in ixgbe_probe()
8451 hw->phy.mdio.mmds = 0; in ixgbe_probe()
8452 hw->phy.mdio.mode_support = MDIO_SUPPORTS_C45 | MDIO_EMULATE_C22; in ixgbe_probe()
8453 hw->phy.mdio.dev = netdev; in ixgbe_probe()
8454 hw->phy.mdio.mdio_read = ixgbe_mdio_read; in ixgbe_probe()
8455 hw->phy.mdio.mdio_write = ixgbe_mdio_write; in ixgbe_probe()
8457 ii->get_invariants(hw); in ixgbe_probe()
8465 switch (adapter->hw.mac.type) { in ixgbe_probe()
8470 IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); in ixgbe_probe()
8481 u32 esdp = IXGBE_READ_REG(hw, IXGBE_ESDP); in ixgbe_probe()
8487 hw->allow_unsupported_sfp = allow_unsupported_sfp; in ixgbe_probe()
8490 hw->phy.reset_if_overtemp = true; in ixgbe_probe()
8491 err = hw->mac.ops.reset_hw(hw); in ixgbe_probe()
8492 hw->phy.reset_if_overtemp = false; in ixgbe_probe()
8494 hw->mac.type == ixgbe_mac_82598EB) { in ixgbe_probe()
8507 if (adapter->hw.mac.type == ixgbe_mac_82598EB) in ixgbe_probe()
8510 ixgbe_init_mbx_params_pf(hw); in ixgbe_probe()
8511 memcpy(&hw->mbx.ops, ii->mbx_ops, sizeof(hw->mbx.ops)); in ixgbe_probe()
8529 switch (adapter->hw.mac.type) { in ixgbe_probe()
8554 switch (adapter->hw.mac.type) { in ixgbe_probe()
8571 if (hw->mac.ops.get_device_caps) { in ixgbe_probe()
8572 hw->mac.ops.get_device_caps(hw, &device_caps); in ixgbe_probe()
8600 if (hw->eeprom.ops.validate_checksum(hw, NULL) < 0) { in ixgbe_probe()
8608 memcpy(netdev->dev_addr, hw->mac.perm_addr, netdev->addr_len); in ixgbe_probe()
8616 ixgbe_mac_set_default_filter(adapter, hw->mac.perm_addr); in ixgbe_probe()
8621 if (ixgbe_removed(hw->hw_addr)) { in ixgbe_probe()
8635 hw->eeprom.ops.read(hw, 0x2c, &adapter->eeprom_cap); in ixgbe_probe()
8636 hw->wol_enabled = ixgbe_wol_supported(adapter, pdev->device, in ixgbe_probe()
8638 if (hw->wol_enabled) in ixgbe_probe()
8644 hw->eeprom.ops.read(hw, 0x2e, &adapter->eeprom_verh); in ixgbe_probe()
8645 hw->eeprom.ops.read(hw, 0x2d, &adapter->eeprom_verl); in ixgbe_probe()
8648 hw->mac.ops.get_bus_info(hw); in ixgbe_probe()
8649 if (ixgbe_pcie_from_parent(hw)) in ixgbe_probe()
8657 switch (hw->mac.type) { in ixgbe_probe()
8670 err = ixgbe_read_pba_string_generic(hw, part_str, sizeof(part_str)); in ixgbe_probe()
8673 if (ixgbe_is_sfp(hw) && hw->phy.sfp_type != ixgbe_sfp_type_not_present) in ixgbe_probe()
8675 hw->mac.type, hw->phy.type, hw->phy.sfp_type, in ixgbe_probe()
8679 hw->mac.type, hw->phy.type, part_str); in ixgbe_probe()
8684 err = hw->mac.ops.start_hw(hw); in ixgbe_probe()
8702 if (hw->mac.ops.disable_tx_laser) in ixgbe_probe()
8703 hw->mac.ops.disable_tx_laser(hw); in ixgbe_probe()
8723 if (hw->mac.ops.set_fw_drv_ver) in ixgbe_probe()
8724 hw->mac.ops.set_fw_drv_ver(hw, 0xFF, 0xFF, 0xFF, in ixgbe_probe()
8740 if (ixgbe_mng_enabled(hw) && ixgbe_is_sfp(hw) && hw->mac.ops.setup_link) in ixgbe_probe()
8741 hw->mac.ops.setup_link(hw, in ixgbe_probe()
8798 IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_CTRL, 1); in ixgbe_remove()
8860 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_io_error_detected() local
8866 if (adapter->hw.mac.type == ixgbe_mac_82598EB || in ixgbe_io_error_detected()
8881 dw0 = ixgbe_read_pci_cfg_dword(hw, pos + PCI_ERR_HEADER_LOG); in ixgbe_io_error_detected()
8882 dw1 = ixgbe_read_pci_cfg_dword(hw, pos + PCI_ERR_HEADER_LOG + 4); in ixgbe_io_error_detected()
8883 dw2 = ixgbe_read_pci_cfg_dword(hw, pos + PCI_ERR_HEADER_LOG + 8); in ixgbe_io_error_detected()
8884 dw3 = ixgbe_read_pci_cfg_dword(hw, pos + PCI_ERR_HEADER_LOG + 12); in ixgbe_io_error_detected()
8885 if (ixgbe_removed(hw->hw_addr)) in ixgbe_io_error_detected()
8902 switch (adapter->hw.mac.type) { in ixgbe_io_error_detected()
8994 adapter->hw.hw_addr = adapter->io_addr; in ixgbe_io_slot_reset()
9002 IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); in ixgbe_io_slot_reset()