Lines Matching refs:hw
158 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_settings() local
164 hw->mac.ops.get_link_capabilities(hw, &supported_link, &autoneg); in ixgbe_get_settings()
175 if (hw->phy.autoneg_advertised) { in ixgbe_get_settings()
176 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL) in ixgbe_get_settings()
178 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL) in ixgbe_get_settings()
180 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) in ixgbe_get_settings()
191 if (hw->phy.multispeed_fiber && !autoneg) { in ixgbe_get_settings()
207 switch (adapter->hw.phy.type) { in ixgbe_get_settings()
228 switch (adapter->hw.phy.sfp_type) { in ixgbe_get_settings()
282 hw->mac.ops.check_link(hw, &link_speed, &link_up, false); in ixgbe_get_settings()
310 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_settings() local
314 if ((hw->phy.media_type == ixgbe_media_type_copper) || in ixgbe_set_settings()
315 (hw->phy.multispeed_fiber)) { in ixgbe_set_settings()
324 if (!ecmd->autoneg && hw->phy.multispeed_fiber) { in ixgbe_set_settings()
331 old = hw->phy.autoneg_advertised; in ixgbe_set_settings()
348 hw->mac.autotry_restart = true; in ixgbe_set_settings()
349 err = hw->mac.ops.setup_link(hw, advertised, true); in ixgbe_set_settings()
352 hw->mac.ops.setup_link(hw, old, true); in ixgbe_set_settings()
371 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_pauseparam() local
373 if (ixgbe_device_supports_autoneg_fc(hw) && in ixgbe_get_pauseparam()
374 !hw->fc.disable_fc_autoneg) in ixgbe_get_pauseparam()
379 if (hw->fc.current_mode == ixgbe_fc_rx_pause) { in ixgbe_get_pauseparam()
381 } else if (hw->fc.current_mode == ixgbe_fc_tx_pause) { in ixgbe_get_pauseparam()
383 } else if (hw->fc.current_mode == ixgbe_fc_full) { in ixgbe_get_pauseparam()
393 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_pauseparam() local
394 struct ixgbe_fc_info fc = hw->fc; in ixgbe_set_pauseparam()
397 if ((hw->mac.type == ixgbe_mac_82598EB) && in ixgbe_set_pauseparam()
403 !ixgbe_device_supports_autoneg_fc(hw)) in ixgbe_set_pauseparam()
418 if (memcmp(&fc, &hw->fc, sizeof(struct ixgbe_fc_info))) { in ixgbe_set_pauseparam()
419 hw->fc = fc; in ixgbe_set_pauseparam()
453 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_regs() local
459 regs->version = hw->mac.type << 24 | hw->revision_id << 16 | in ixgbe_get_regs()
460 hw->device_id; in ixgbe_get_regs()
463 regs_buff[0] = IXGBE_READ_REG(hw, IXGBE_CTRL); in ixgbe_get_regs()
464 regs_buff[1] = IXGBE_READ_REG(hw, IXGBE_STATUS); in ixgbe_get_regs()
465 regs_buff[2] = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); in ixgbe_get_regs()
466 regs_buff[3] = IXGBE_READ_REG(hw, IXGBE_ESDP); in ixgbe_get_regs()
467 regs_buff[4] = IXGBE_READ_REG(hw, IXGBE_EODSDP); in ixgbe_get_regs()
468 regs_buff[5] = IXGBE_READ_REG(hw, IXGBE_LEDCTL); in ixgbe_get_regs()
469 regs_buff[6] = IXGBE_READ_REG(hw, IXGBE_FRTIMER); in ixgbe_get_regs()
470 regs_buff[7] = IXGBE_READ_REG(hw, IXGBE_TCPTIMER); in ixgbe_get_regs()
473 regs_buff[8] = IXGBE_READ_REG(hw, IXGBE_EEC); in ixgbe_get_regs()
474 regs_buff[9] = IXGBE_READ_REG(hw, IXGBE_EERD); in ixgbe_get_regs()
475 regs_buff[10] = IXGBE_READ_REG(hw, IXGBE_FLA); in ixgbe_get_regs()
476 regs_buff[11] = IXGBE_READ_REG(hw, IXGBE_EEMNGCTL); in ixgbe_get_regs()
477 regs_buff[12] = IXGBE_READ_REG(hw, IXGBE_EEMNGDATA); in ixgbe_get_regs()
478 regs_buff[13] = IXGBE_READ_REG(hw, IXGBE_FLMNGCTL); in ixgbe_get_regs()
479 regs_buff[14] = IXGBE_READ_REG(hw, IXGBE_FLMNGDATA); in ixgbe_get_regs()
480 regs_buff[15] = IXGBE_READ_REG(hw, IXGBE_FLMNGCNT); in ixgbe_get_regs()
481 regs_buff[16] = IXGBE_READ_REG(hw, IXGBE_FLOP); in ixgbe_get_regs()
482 regs_buff[17] = IXGBE_READ_REG(hw, IXGBE_GRC); in ixgbe_get_regs()
487 regs_buff[18] = IXGBE_READ_REG(hw, IXGBE_EICS); in ixgbe_get_regs()
488 regs_buff[19] = IXGBE_READ_REG(hw, IXGBE_EICS); in ixgbe_get_regs()
489 regs_buff[20] = IXGBE_READ_REG(hw, IXGBE_EIMS); in ixgbe_get_regs()
490 regs_buff[21] = IXGBE_READ_REG(hw, IXGBE_EIMC); in ixgbe_get_regs()
491 regs_buff[22] = IXGBE_READ_REG(hw, IXGBE_EIAC); in ixgbe_get_regs()
492 regs_buff[23] = IXGBE_READ_REG(hw, IXGBE_EIAM); in ixgbe_get_regs()
493 regs_buff[24] = IXGBE_READ_REG(hw, IXGBE_EITR(0)); in ixgbe_get_regs()
494 regs_buff[25] = IXGBE_READ_REG(hw, IXGBE_IVAR(0)); in ixgbe_get_regs()
495 regs_buff[26] = IXGBE_READ_REG(hw, IXGBE_MSIXT); in ixgbe_get_regs()
496 regs_buff[27] = IXGBE_READ_REG(hw, IXGBE_MSIXPBA); in ixgbe_get_regs()
497 regs_buff[28] = IXGBE_READ_REG(hw, IXGBE_PBACL(0)); in ixgbe_get_regs()
498 regs_buff[29] = IXGBE_READ_REG(hw, IXGBE_GPIE); in ixgbe_get_regs()
501 regs_buff[30] = IXGBE_READ_REG(hw, IXGBE_PFCTOP); in ixgbe_get_regs()
502 regs_buff[31] = IXGBE_READ_REG(hw, IXGBE_FCTTV(0)); in ixgbe_get_regs()
503 regs_buff[32] = IXGBE_READ_REG(hw, IXGBE_FCTTV(1)); in ixgbe_get_regs()
504 regs_buff[33] = IXGBE_READ_REG(hw, IXGBE_FCTTV(2)); in ixgbe_get_regs()
505 regs_buff[34] = IXGBE_READ_REG(hw, IXGBE_FCTTV(3)); in ixgbe_get_regs()
507 switch (hw->mac.type) { in ixgbe_get_regs()
509 regs_buff[35 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTL(i)); in ixgbe_get_regs()
510 regs_buff[43 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTH(i)); in ixgbe_get_regs()
516 regs_buff[35 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTL_82599(i)); in ixgbe_get_regs()
517 regs_buff[43 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTH_82599(i)); in ixgbe_get_regs()
523 regs_buff[51] = IXGBE_READ_REG(hw, IXGBE_FCRTV); in ixgbe_get_regs()
524 regs_buff[52] = IXGBE_READ_REG(hw, IXGBE_TFCS); in ixgbe_get_regs()
528 regs_buff[53 + i] = IXGBE_READ_REG(hw, IXGBE_RDBAL(i)); in ixgbe_get_regs()
530 regs_buff[117 + i] = IXGBE_READ_REG(hw, IXGBE_RDBAH(i)); in ixgbe_get_regs()
532 regs_buff[181 + i] = IXGBE_READ_REG(hw, IXGBE_RDLEN(i)); in ixgbe_get_regs()
534 regs_buff[245 + i] = IXGBE_READ_REG(hw, IXGBE_RDH(i)); in ixgbe_get_regs()
536 regs_buff[309 + i] = IXGBE_READ_REG(hw, IXGBE_RDT(i)); in ixgbe_get_regs()
538 regs_buff[373 + i] = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); in ixgbe_get_regs()
540 regs_buff[437 + i] = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); in ixgbe_get_regs()
542 regs_buff[453 + i] = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); in ixgbe_get_regs()
543 regs_buff[469] = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); in ixgbe_get_regs()
545 regs_buff[470 + i] = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)); in ixgbe_get_regs()
546 regs_buff[478] = IXGBE_READ_REG(hw, IXGBE_RXCTRL); in ixgbe_get_regs()
547 regs_buff[479] = IXGBE_READ_REG(hw, IXGBE_DROPEN); in ixgbe_get_regs()
550 regs_buff[480] = IXGBE_READ_REG(hw, IXGBE_RXCSUM); in ixgbe_get_regs()
551 regs_buff[481] = IXGBE_READ_REG(hw, IXGBE_RFCTL); in ixgbe_get_regs()
553 regs_buff[482 + i] = IXGBE_READ_REG(hw, IXGBE_RAL(i)); in ixgbe_get_regs()
555 regs_buff[498 + i] = IXGBE_READ_REG(hw, IXGBE_RAH(i)); in ixgbe_get_regs()
556 regs_buff[514] = IXGBE_READ_REG(hw, IXGBE_PSRTYPE(0)); in ixgbe_get_regs()
557 regs_buff[515] = IXGBE_READ_REG(hw, IXGBE_FCTRL); in ixgbe_get_regs()
558 regs_buff[516] = IXGBE_READ_REG(hw, IXGBE_VLNCTRL); in ixgbe_get_regs()
559 regs_buff[517] = IXGBE_READ_REG(hw, IXGBE_MCSTCTRL); in ixgbe_get_regs()
560 regs_buff[518] = IXGBE_READ_REG(hw, IXGBE_MRQC); in ixgbe_get_regs()
561 regs_buff[519] = IXGBE_READ_REG(hw, IXGBE_VMD_CTL); in ixgbe_get_regs()
563 regs_buff[520 + i] = IXGBE_READ_REG(hw, IXGBE_IMIR(i)); in ixgbe_get_regs()
565 regs_buff[528 + i] = IXGBE_READ_REG(hw, IXGBE_IMIREXT(i)); in ixgbe_get_regs()
566 regs_buff[536] = IXGBE_READ_REG(hw, IXGBE_IMIRVP); in ixgbe_get_regs()
570 regs_buff[537 + i] = IXGBE_READ_REG(hw, IXGBE_TDBAL(i)); in ixgbe_get_regs()
572 regs_buff[569 + i] = IXGBE_READ_REG(hw, IXGBE_TDBAH(i)); in ixgbe_get_regs()
574 regs_buff[601 + i] = IXGBE_READ_REG(hw, IXGBE_TDLEN(i)); in ixgbe_get_regs()
576 regs_buff[633 + i] = IXGBE_READ_REG(hw, IXGBE_TDH(i)); in ixgbe_get_regs()
578 regs_buff[665 + i] = IXGBE_READ_REG(hw, IXGBE_TDT(i)); in ixgbe_get_regs()
580 regs_buff[697 + i] = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i)); in ixgbe_get_regs()
582 regs_buff[729 + i] = IXGBE_READ_REG(hw, IXGBE_TDWBAL(i)); in ixgbe_get_regs()
584 regs_buff[761 + i] = IXGBE_READ_REG(hw, IXGBE_TDWBAH(i)); in ixgbe_get_regs()
585 regs_buff[793] = IXGBE_READ_REG(hw, IXGBE_DTXCTL); in ixgbe_get_regs()
587 regs_buff[794 + i] = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); in ixgbe_get_regs()
588 regs_buff[810] = IXGBE_READ_REG(hw, IXGBE_TIPG); in ixgbe_get_regs()
590 regs_buff[811 + i] = IXGBE_READ_REG(hw, IXGBE_TXPBSIZE(i)); in ixgbe_get_regs()
591 regs_buff[819] = IXGBE_READ_REG(hw, IXGBE_MNGTXMAP); in ixgbe_get_regs()
594 regs_buff[820] = IXGBE_READ_REG(hw, IXGBE_WUC); in ixgbe_get_regs()
595 regs_buff[821] = IXGBE_READ_REG(hw, IXGBE_WUFC); in ixgbe_get_regs()
596 regs_buff[822] = IXGBE_READ_REG(hw, IXGBE_WUS); in ixgbe_get_regs()
597 regs_buff[823] = IXGBE_READ_REG(hw, IXGBE_IPAV); in ixgbe_get_regs()
598 regs_buff[824] = IXGBE_READ_REG(hw, IXGBE_IP4AT); in ixgbe_get_regs()
599 regs_buff[825] = IXGBE_READ_REG(hw, IXGBE_IP6AT); in ixgbe_get_regs()
600 regs_buff[826] = IXGBE_READ_REG(hw, IXGBE_WUPL); in ixgbe_get_regs()
601 regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM); in ixgbe_get_regs()
602 regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT(0)); in ixgbe_get_regs()
605 regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS); /* same as FCCFG */ in ixgbe_get_regs()
606 regs_buff[831] = IXGBE_READ_REG(hw, IXGBE_PDPMCS); /* same as RTTPCS */ in ixgbe_get_regs()
608 switch (hw->mac.type) { in ixgbe_get_regs()
610 regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS); in ixgbe_get_regs()
611 regs_buff[832] = IXGBE_READ_REG(hw, IXGBE_RUPPBMR); in ixgbe_get_regs()
614 IXGBE_READ_REG(hw, IXGBE_RT2CR(i)); in ixgbe_get_regs()
617 IXGBE_READ_REG(hw, IXGBE_RT2SR(i)); in ixgbe_get_regs()
620 IXGBE_READ_REG(hw, IXGBE_TDTQ2TCCR(i)); in ixgbe_get_regs()
623 IXGBE_READ_REG(hw, IXGBE_TDTQ2TCSR(i)); in ixgbe_get_regs()
629 regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_RTTDCS); in ixgbe_get_regs()
630 regs_buff[832] = IXGBE_READ_REG(hw, IXGBE_RTRPCS); in ixgbe_get_regs()
633 IXGBE_READ_REG(hw, IXGBE_RTRPT4C(i)); in ixgbe_get_regs()
636 IXGBE_READ_REG(hw, IXGBE_RTRPT4S(i)); in ixgbe_get_regs()
639 IXGBE_READ_REG(hw, IXGBE_RTTDT2C(i)); in ixgbe_get_regs()
642 IXGBE_READ_REG(hw, IXGBE_RTTDT2S(i)); in ixgbe_get_regs()
650 IXGBE_READ_REG(hw, IXGBE_TDPT2TCCR(i)); /* same as RTTPT2C */ in ixgbe_get_regs()
653 IXGBE_READ_REG(hw, IXGBE_TDPT2TCSR(i)); /* same as RTTPT2S */ in ixgbe_get_regs()
720 regs_buff[1038] = IXGBE_READ_REG(hw, IXGBE_PCS1GCFIG); in ixgbe_get_regs()
721 regs_buff[1039] = IXGBE_READ_REG(hw, IXGBE_PCS1GLCTL); in ixgbe_get_regs()
722 regs_buff[1040] = IXGBE_READ_REG(hw, IXGBE_PCS1GLSTA); in ixgbe_get_regs()
723 regs_buff[1041] = IXGBE_READ_REG(hw, IXGBE_PCS1GDBG0); in ixgbe_get_regs()
724 regs_buff[1042] = IXGBE_READ_REG(hw, IXGBE_PCS1GDBG1); in ixgbe_get_regs()
725 regs_buff[1043] = IXGBE_READ_REG(hw, IXGBE_PCS1GANA); in ixgbe_get_regs()
726 regs_buff[1044] = IXGBE_READ_REG(hw, IXGBE_PCS1GANLP); in ixgbe_get_regs()
727 regs_buff[1045] = IXGBE_READ_REG(hw, IXGBE_PCS1GANNP); in ixgbe_get_regs()
728 regs_buff[1046] = IXGBE_READ_REG(hw, IXGBE_PCS1GANLPNP); in ixgbe_get_regs()
729 regs_buff[1047] = IXGBE_READ_REG(hw, IXGBE_HLREG0); in ixgbe_get_regs()
730 regs_buff[1048] = IXGBE_READ_REG(hw, IXGBE_HLREG1); in ixgbe_get_regs()
731 regs_buff[1049] = IXGBE_READ_REG(hw, IXGBE_PAP); in ixgbe_get_regs()
732 regs_buff[1050] = IXGBE_READ_REG(hw, IXGBE_MACA); in ixgbe_get_regs()
733 regs_buff[1051] = IXGBE_READ_REG(hw, IXGBE_APAE); in ixgbe_get_regs()
734 regs_buff[1052] = IXGBE_READ_REG(hw, IXGBE_ARD); in ixgbe_get_regs()
735 regs_buff[1053] = IXGBE_READ_REG(hw, IXGBE_AIS); in ixgbe_get_regs()
736 regs_buff[1054] = IXGBE_READ_REG(hw, IXGBE_MSCA); in ixgbe_get_regs()
737 regs_buff[1055] = IXGBE_READ_REG(hw, IXGBE_MSRWD); in ixgbe_get_regs()
738 regs_buff[1056] = IXGBE_READ_REG(hw, IXGBE_MLADD); in ixgbe_get_regs()
739 regs_buff[1057] = IXGBE_READ_REG(hw, IXGBE_MHADD); in ixgbe_get_regs()
740 regs_buff[1058] = IXGBE_READ_REG(hw, IXGBE_TREG); in ixgbe_get_regs()
741 regs_buff[1059] = IXGBE_READ_REG(hw, IXGBE_PCSS1); in ixgbe_get_regs()
742 regs_buff[1060] = IXGBE_READ_REG(hw, IXGBE_PCSS2); in ixgbe_get_regs()
743 regs_buff[1061] = IXGBE_READ_REG(hw, IXGBE_XPCSS); in ixgbe_get_regs()
744 regs_buff[1062] = IXGBE_READ_REG(hw, IXGBE_SERDESC); in ixgbe_get_regs()
745 regs_buff[1063] = IXGBE_READ_REG(hw, IXGBE_MACS); in ixgbe_get_regs()
746 regs_buff[1064] = IXGBE_READ_REG(hw, IXGBE_AUTOC); in ixgbe_get_regs()
747 regs_buff[1065] = IXGBE_READ_REG(hw, IXGBE_LINKS); in ixgbe_get_regs()
748 regs_buff[1066] = IXGBE_READ_REG(hw, IXGBE_AUTOC2); in ixgbe_get_regs()
749 regs_buff[1067] = IXGBE_READ_REG(hw, IXGBE_AUTOC3); in ixgbe_get_regs()
750 regs_buff[1068] = IXGBE_READ_REG(hw, IXGBE_ANLP1); in ixgbe_get_regs()
751 regs_buff[1069] = IXGBE_READ_REG(hw, IXGBE_ANLP2); in ixgbe_get_regs()
752 regs_buff[1070] = IXGBE_READ_REG(hw, IXGBE_ATLASCTL); in ixgbe_get_regs()
755 regs_buff[1071] = IXGBE_READ_REG(hw, IXGBE_RDSTATCTL); in ixgbe_get_regs()
757 regs_buff[1072 + i] = IXGBE_READ_REG(hw, IXGBE_RDSTAT(i)); in ixgbe_get_regs()
758 regs_buff[1080] = IXGBE_READ_REG(hw, IXGBE_RDHMPN); in ixgbe_get_regs()
760 regs_buff[1081 + i] = IXGBE_READ_REG(hw, IXGBE_RIC_DW(i)); in ixgbe_get_regs()
761 regs_buff[1085] = IXGBE_READ_REG(hw, IXGBE_RDPROBE); in ixgbe_get_regs()
762 regs_buff[1086] = IXGBE_READ_REG(hw, IXGBE_TDSTATCTL); in ixgbe_get_regs()
764 regs_buff[1087 + i] = IXGBE_READ_REG(hw, IXGBE_TDSTAT(i)); in ixgbe_get_regs()
765 regs_buff[1095] = IXGBE_READ_REG(hw, IXGBE_TDHMPN); in ixgbe_get_regs()
767 regs_buff[1096 + i] = IXGBE_READ_REG(hw, IXGBE_TIC_DW(i)); in ixgbe_get_regs()
768 regs_buff[1100] = IXGBE_READ_REG(hw, IXGBE_TDPROBE); in ixgbe_get_regs()
769 regs_buff[1101] = IXGBE_READ_REG(hw, IXGBE_TXBUFCTRL); in ixgbe_get_regs()
770 regs_buff[1102] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA0); in ixgbe_get_regs()
771 regs_buff[1103] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA1); in ixgbe_get_regs()
772 regs_buff[1104] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA2); in ixgbe_get_regs()
773 regs_buff[1105] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA3); in ixgbe_get_regs()
774 regs_buff[1106] = IXGBE_READ_REG(hw, IXGBE_RXBUFCTRL); in ixgbe_get_regs()
775 regs_buff[1107] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA0); in ixgbe_get_regs()
776 regs_buff[1108] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA1); in ixgbe_get_regs()
777 regs_buff[1109] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA2); in ixgbe_get_regs()
778 regs_buff[1110] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA3); in ixgbe_get_regs()
780 regs_buff[1111 + i] = IXGBE_READ_REG(hw, IXGBE_PCIE_DIAG(i)); in ixgbe_get_regs()
781 regs_buff[1119] = IXGBE_READ_REG(hw, IXGBE_RFVAL); in ixgbe_get_regs()
782 regs_buff[1120] = IXGBE_READ_REG(hw, IXGBE_MDFTC1); in ixgbe_get_regs()
783 regs_buff[1121] = IXGBE_READ_REG(hw, IXGBE_MDFTC2); in ixgbe_get_regs()
784 regs_buff[1122] = IXGBE_READ_REG(hw, IXGBE_MDFTFIFO1); in ixgbe_get_regs()
785 regs_buff[1123] = IXGBE_READ_REG(hw, IXGBE_MDFTFIFO2); in ixgbe_get_regs()
786 regs_buff[1124] = IXGBE_READ_REG(hw, IXGBE_MDFTS); in ixgbe_get_regs()
787 regs_buff[1125] = IXGBE_READ_REG(hw, IXGBE_PCIEECCCTL); in ixgbe_get_regs()
788 regs_buff[1126] = IXGBE_READ_REG(hw, IXGBE_PBTXECC); in ixgbe_get_regs()
789 regs_buff[1127] = IXGBE_READ_REG(hw, IXGBE_PBRXECC); in ixgbe_get_regs()
792 regs_buff[1128] = IXGBE_READ_REG(hw, IXGBE_MFLCN); in ixgbe_get_regs()
795 regs_buff[1129] = IXGBE_READ_REG(hw, IXGBE_RTRUP2TC); in ixgbe_get_regs()
796 regs_buff[1130] = IXGBE_READ_REG(hw, IXGBE_RTTUP2TC); in ixgbe_get_regs()
798 regs_buff[1131 + i] = IXGBE_READ_REG(hw, IXGBE_TXLLQ(i)); in ixgbe_get_regs()
799 regs_buff[1135] = IXGBE_READ_REG(hw, IXGBE_RTTBCNRM); in ixgbe_get_regs()
801 regs_buff[1136] = IXGBE_READ_REG(hw, IXGBE_RTTBCNRD); in ixgbe_get_regs()
805 regs_buff[1137] = IXGBE_READ_REG(hw, IXGBE_RTTQCNCR); in ixgbe_get_regs()
806 regs_buff[1138] = IXGBE_READ_REG(hw, IXGBE_RTTQCNTG); in ixgbe_get_regs()
812 return adapter->hw.eeprom.word_size * 2; in ixgbe_get_eeprom_len()
819 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_eeprom() local
828 eeprom->magic = hw->vendor_id | (hw->device_id << 16); in ixgbe_get_eeprom()
838 ret_val = hw->eeprom.ops.read_buffer(hw, first_word, eeprom_len, in ixgbe_get_eeprom()
855 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_eeprom() local
864 if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) in ixgbe_set_eeprom()
867 max_len = hw->eeprom.word_size * 2; in ixgbe_set_eeprom()
882 ret_val = hw->eeprom.ops.read(hw, first_word, &eeprom_buff[0]); in ixgbe_set_eeprom()
893 ret_val = hw->eeprom.ops.read(hw, last_word, in ixgbe_set_eeprom()
908 ret_val = hw->eeprom.ops.write_buffer(hw, first_word, in ixgbe_set_eeprom()
914 hw->eeprom.ops.update_checksum(hw); in ixgbe_set_eeprom()
1249 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_link_test() local
1253 if (ixgbe_removed(hw->hw_addr)) { in ixgbe_link_test()
1259 hw->mac.ops.check_link(hw, &link_speed, &link_up, true); in ixgbe_link_test()
1352 if (ixgbe_removed(adapter->hw.hw_addr)) { in reg_pattern_test()
1357 before = ixgbe_read_reg(&adapter->hw, reg); in reg_pattern_test()
1358 ixgbe_write_reg(&adapter->hw, reg, test_pattern[pat] & write); in reg_pattern_test()
1359 val = ixgbe_read_reg(&adapter->hw, reg); in reg_pattern_test()
1364 ixgbe_write_reg(&adapter->hw, reg, before); in reg_pattern_test()
1367 ixgbe_write_reg(&adapter->hw, reg, before); in reg_pattern_test()
1377 if (ixgbe_removed(adapter->hw.hw_addr)) { in reg_set_and_check()
1381 before = ixgbe_read_reg(&adapter->hw, reg); in reg_set_and_check()
1382 ixgbe_write_reg(&adapter->hw, reg, write & mask); in reg_set_and_check()
1383 val = ixgbe_read_reg(&adapter->hw, reg); in reg_set_and_check()
1388 ixgbe_write_reg(&adapter->hw, reg, before); in reg_set_and_check()
1391 ixgbe_write_reg(&adapter->hw, reg, before); in reg_set_and_check()
1401 if (ixgbe_removed(adapter->hw.hw_addr)) { in ixgbe_reg_test()
1406 switch (adapter->hw.mac.type) { in ixgbe_reg_test()
1429 before = ixgbe_read_reg(&adapter->hw, IXGBE_STATUS); in ixgbe_reg_test()
1430 value = (ixgbe_read_reg(&adapter->hw, IXGBE_STATUS) & toggle); in ixgbe_reg_test()
1431 ixgbe_write_reg(&adapter->hw, IXGBE_STATUS, toggle); in ixgbe_reg_test()
1432 after = ixgbe_read_reg(&adapter->hw, IXGBE_STATUS) & toggle; in ixgbe_reg_test()
1440 ixgbe_write_reg(&adapter->hw, IXGBE_STATUS, before); in ixgbe_reg_test()
1464 ixgbe_write_reg(&adapter->hw, in ixgbe_reg_test()
1499 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_eeprom_test() local
1500 if (hw->eeprom.ops.validate_checksum(hw, NULL)) in ixgbe_eeprom_test()
1512 adapter->test_icr |= IXGBE_READ_REG(&adapter->hw, IXGBE_EICR); in ixgbe_test_intr()
1544 e_info(hw, "testing %s interrupt\n", shared_int ? in ixgbe_intr_test()
1548 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); in ixgbe_intr_test()
1549 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1566 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, in ixgbe_intr_test()
1568 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, in ixgbe_intr_test()
1570 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1586 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); in ixgbe_intr_test()
1587 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); in ixgbe_intr_test()
1588 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1605 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, in ixgbe_intr_test()
1607 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, in ixgbe_intr_test()
1609 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1620 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); in ixgbe_intr_test()
1621 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1634 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_free_desc_rings() local
1640 hw->mac.ops.disable_rx(hw); in ixgbe_free_desc_rings()
1644 reg_ctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(tx_ring->reg_idx)); in ixgbe_free_desc_rings()
1646 IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(tx_ring->reg_idx), reg_ctl); in ixgbe_free_desc_rings()
1648 switch (hw->mac.type) { in ixgbe_free_desc_rings()
1653 reg_ctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); in ixgbe_free_desc_rings()
1655 IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, reg_ctl); in ixgbe_free_desc_rings()
1671 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_desc_rings() local
1687 switch (adapter->hw.mac.type) { in ixgbe_setup_desc_rings()
1692 reg_data = IXGBE_READ_REG(&adapter->hw, IXGBE_DMATXCTL); in ixgbe_setup_desc_rings()
1694 IXGBE_WRITE_REG(&adapter->hw, IXGBE_DMATXCTL, reg_data); in ixgbe_setup_desc_rings()
1715 hw->mac.ops.disable_rx(hw); in ixgbe_setup_desc_rings()
1719 rctl = IXGBE_READ_REG(&adapter->hw, IXGBE_RXCTRL); in ixgbe_setup_desc_rings()
1721 IXGBE_WRITE_REG(&adapter->hw, IXGBE_RXCTRL, rctl); in ixgbe_setup_desc_rings()
1723 hw->mac.ops.enable_rx(hw); in ixgbe_setup_desc_rings()
1734 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_loopback_test() local
1739 reg_data = IXGBE_READ_REG(hw, IXGBE_HLREG0); in ixgbe_setup_loopback_test()
1741 IXGBE_WRITE_REG(hw, IXGBE_HLREG0, reg_data); in ixgbe_setup_loopback_test()
1743 reg_data = IXGBE_READ_REG(hw, IXGBE_FCTRL); in ixgbe_setup_loopback_test()
1745 IXGBE_WRITE_REG(hw, IXGBE_FCTRL, reg_data); in ixgbe_setup_loopback_test()
1748 switch (adapter->hw.mac.type) { in ixgbe_setup_loopback_test()
1752 reg_data = IXGBE_READ_REG(hw, IXGBE_MACC); in ixgbe_setup_loopback_test()
1754 IXGBE_WRITE_REG(hw, IXGBE_MACC, reg_data); in ixgbe_setup_loopback_test()
1757 if (hw->mac.orig_autoc) { in ixgbe_setup_loopback_test()
1758 reg_data = hw->mac.orig_autoc | IXGBE_AUTOC_FLU; in ixgbe_setup_loopback_test()
1759 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, reg_data); in ixgbe_setup_loopback_test()
1764 IXGBE_WRITE_FLUSH(hw); in ixgbe_setup_loopback_test()
1768 if (hw->mac.type == ixgbe_mac_82598EB) { in ixgbe_setup_loopback_test()
1771 hw->mac.ops.read_analog_reg8(hw, IXGBE_ATLAS_PDN_LPBK, &atlas); in ixgbe_setup_loopback_test()
1773 hw->mac.ops.write_analog_reg8(hw, IXGBE_ATLAS_PDN_LPBK, atlas); in ixgbe_setup_loopback_test()
1775 hw->mac.ops.read_analog_reg8(hw, IXGBE_ATLAS_PDN_10G, &atlas); in ixgbe_setup_loopback_test()
1777 hw->mac.ops.write_analog_reg8(hw, IXGBE_ATLAS_PDN_10G, atlas); in ixgbe_setup_loopback_test()
1779 hw->mac.ops.read_analog_reg8(hw, IXGBE_ATLAS_PDN_1G, &atlas); in ixgbe_setup_loopback_test()
1781 hw->mac.ops.write_analog_reg8(hw, IXGBE_ATLAS_PDN_1G, atlas); in ixgbe_setup_loopback_test()
1783 hw->mac.ops.read_analog_reg8(hw, IXGBE_ATLAS_PDN_AN, &atlas); in ixgbe_setup_loopback_test()
1785 hw->mac.ops.write_analog_reg8(hw, IXGBE_ATLAS_PDN_AN, atlas); in ixgbe_setup_loopback_test()
1795 reg_data = IXGBE_READ_REG(&adapter->hw, IXGBE_HLREG0); in ixgbe_loopback_cleanup()
1797 IXGBE_WRITE_REG(&adapter->hw, IXGBE_HLREG0, reg_data); in ixgbe_loopback_cleanup()
1982 if (ixgbe_removed(adapter->hw.hw_addr)) { in ixgbe_diag_test()
1983 e_err(hw, "Adapter removed - test blocked\n"); in ixgbe_diag_test()
1994 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_diag_test() local
2015 e_info(hw, "offline testing starting\n"); in ixgbe_diag_test()
2029 e_info(hw, "register testing starting\n"); in ixgbe_diag_test()
2034 e_info(hw, "eeprom testing starting\n"); in ixgbe_diag_test()
2039 e_info(hw, "interrupt testing starting\n"); in ixgbe_diag_test()
2047 e_info(hw, "Skip MAC loopback diagnostic in VT mode\n"); in ixgbe_diag_test()
2053 e_info(hw, "loopback testing starting\n"); in ixgbe_diag_test()
2064 else if (hw->mac.ops.disable_tx_laser) in ixgbe_diag_test()
2065 hw->mac.ops.disable_tx_laser(hw); in ixgbe_diag_test()
2067 e_info(hw, "online testing starting\n"); in ixgbe_diag_test()
2089 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_wol_exclusion() local
2093 if (!ixgbe_wol_supported(adapter, hw->device_id, in ixgbe_wol_exclusion()
2094 hw->subsystem_device_id)) { in ixgbe_wol_exclusion()
2165 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_phys_id() local
2169 adapter->led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL); in ixgbe_set_phys_id()
2173 hw->mac.ops.led_on(hw, IXGBE_LED_ON); in ixgbe_set_phys_id()
2177 hw->mac.ops.led_off(hw, IXGBE_LED_ON); in ixgbe_set_phys_id()
2182 IXGBE_WRITE_REG(&adapter->hw, IXGBE_LEDCTL, adapter->led_reg); in ixgbe_set_phys_id()
2496 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_update_ethtool_fdir_entry() local
2516 err = ixgbe_fdir_erase_perfect_filter_82599(hw, in ixgbe_update_ethtool_fdir_entry()
2594 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_add_ethtool_fdir_entry() local
2671 err = ixgbe_fdir_set_input_mask_82599(hw, &mask); in ixgbe_add_ethtool_fdir_entry()
2685 err = ixgbe_fdir_write_perfect_filter_82599(hw, in ixgbe_add_ethtool_fdir_entry()
2793 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_rss_hash_opt() local
2797 if ((hw->mac.type >= ixgbe_mac_X550) && in ixgbe_set_rss_hash_opt()
2799 mrqc = IXGBE_READ_REG(hw, IXGBE_PFVFMRQC(pf_pool)); in ixgbe_set_rss_hash_opt()
2801 mrqc = IXGBE_READ_REG(hw, IXGBE_MRQC); in ixgbe_set_rss_hash_opt()
2824 if ((hw->mac.type >= ixgbe_mac_X550) && in ixgbe_set_rss_hash_opt()
2826 IXGBE_WRITE_REG(hw, IXGBE_PFVFMRQC(pf_pool), mrqc); in ixgbe_set_rss_hash_opt()
2828 IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); in ixgbe_set_rss_hash_opt()
2900 switch (adapter->hw.mac.type) { in ixgbe_get_ts_info()
2955 if (adapter->hw.mac.type == ixgbe_mac_82598EB) { in ixgbe_max_channels()
3055 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_module_info() local
3061 status = hw->phy.ops.read_i2c_eeprom(hw, in ixgbe_get_module_info()
3068 status = hw->phy.ops.read_i2c_eeprom(hw, in ixgbe_get_module_info()
3097 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_module_eeprom() local
3111 status = hw->phy.ops.read_i2c_eeprom(hw, i, &databyte); in ixgbe_get_module_eeprom()
3113 status = hw->phy.ops.read_i2c_sff8472(hw, i, &databyte); in ixgbe_get_module_eeprom()