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()
177 if (hw->phy.autoneg_advertised) { in ixgbe_get_settings()
178 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_100_FULL) in ixgbe_get_settings()
180 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_10GB_FULL) in ixgbe_get_settings()
182 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_2_5GB_FULL) in ixgbe_get_settings()
184 if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) in ixgbe_get_settings()
195 if (hw->phy.multispeed_fiber && !autoneg) { in ixgbe_get_settings()
211 switch (adapter->hw.phy.type) { in ixgbe_get_settings()
233 switch (adapter->hw.phy.sfp_type) { in ixgbe_get_settings()
287 hw->mac.ops.check_link(hw, &link_speed, &link_up, false); in ixgbe_get_settings()
318 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_settings() local
322 if ((hw->phy.media_type == ixgbe_media_type_copper) || in ixgbe_set_settings()
323 (hw->phy.multispeed_fiber)) { in ixgbe_set_settings()
332 if (!ecmd->autoneg && hw->phy.multispeed_fiber) { in ixgbe_set_settings()
339 old = hw->phy.autoneg_advertised; in ixgbe_set_settings()
356 hw->mac.autotry_restart = true; in ixgbe_set_settings()
357 err = hw->mac.ops.setup_link(hw, advertised, true); in ixgbe_set_settings()
360 hw->mac.ops.setup_link(hw, old, true); in ixgbe_set_settings()
379 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_pauseparam() local
381 if (ixgbe_device_supports_autoneg_fc(hw) && in ixgbe_get_pauseparam()
382 !hw->fc.disable_fc_autoneg) in ixgbe_get_pauseparam()
387 if (hw->fc.current_mode == ixgbe_fc_rx_pause) { in ixgbe_get_pauseparam()
389 } else if (hw->fc.current_mode == ixgbe_fc_tx_pause) { in ixgbe_get_pauseparam()
391 } else if (hw->fc.current_mode == ixgbe_fc_full) { in ixgbe_get_pauseparam()
401 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_pauseparam() local
402 struct ixgbe_fc_info fc = hw->fc; in ixgbe_set_pauseparam()
405 if ((hw->mac.type == ixgbe_mac_82598EB) && in ixgbe_set_pauseparam()
411 !ixgbe_device_supports_autoneg_fc(hw)) in ixgbe_set_pauseparam()
426 if (memcmp(&fc, &hw->fc, sizeof(struct ixgbe_fc_info))) { in ixgbe_set_pauseparam()
427 hw->fc = fc; in ixgbe_set_pauseparam()
461 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_regs() local
467 regs->version = hw->mac.type << 24 | hw->revision_id << 16 | in ixgbe_get_regs()
468 hw->device_id; in ixgbe_get_regs()
471 regs_buff[0] = IXGBE_READ_REG(hw, IXGBE_CTRL); in ixgbe_get_regs()
472 regs_buff[1] = IXGBE_READ_REG(hw, IXGBE_STATUS); in ixgbe_get_regs()
473 regs_buff[2] = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); in ixgbe_get_regs()
474 regs_buff[3] = IXGBE_READ_REG(hw, IXGBE_ESDP); in ixgbe_get_regs()
475 regs_buff[4] = IXGBE_READ_REG(hw, IXGBE_EODSDP); in ixgbe_get_regs()
476 regs_buff[5] = IXGBE_READ_REG(hw, IXGBE_LEDCTL); in ixgbe_get_regs()
477 regs_buff[6] = IXGBE_READ_REG(hw, IXGBE_FRTIMER); in ixgbe_get_regs()
478 regs_buff[7] = IXGBE_READ_REG(hw, IXGBE_TCPTIMER); in ixgbe_get_regs()
481 regs_buff[8] = IXGBE_READ_REG(hw, IXGBE_EEC(hw)); in ixgbe_get_regs()
482 regs_buff[9] = IXGBE_READ_REG(hw, IXGBE_EERD); in ixgbe_get_regs()
483 regs_buff[10] = IXGBE_READ_REG(hw, IXGBE_FLA(hw)); in ixgbe_get_regs()
484 regs_buff[11] = IXGBE_READ_REG(hw, IXGBE_EEMNGCTL); in ixgbe_get_regs()
485 regs_buff[12] = IXGBE_READ_REG(hw, IXGBE_EEMNGDATA); in ixgbe_get_regs()
486 regs_buff[13] = IXGBE_READ_REG(hw, IXGBE_FLMNGCTL); in ixgbe_get_regs()
487 regs_buff[14] = IXGBE_READ_REG(hw, IXGBE_FLMNGDATA); in ixgbe_get_regs()
488 regs_buff[15] = IXGBE_READ_REG(hw, IXGBE_FLMNGCNT); in ixgbe_get_regs()
489 regs_buff[16] = IXGBE_READ_REG(hw, IXGBE_FLOP); in ixgbe_get_regs()
490 regs_buff[17] = IXGBE_READ_REG(hw, IXGBE_GRC(hw)); in ixgbe_get_regs()
495 regs_buff[18] = IXGBE_READ_REG(hw, IXGBE_EICS); in ixgbe_get_regs()
496 regs_buff[19] = IXGBE_READ_REG(hw, IXGBE_EICS); in ixgbe_get_regs()
497 regs_buff[20] = IXGBE_READ_REG(hw, IXGBE_EIMS); in ixgbe_get_regs()
498 regs_buff[21] = IXGBE_READ_REG(hw, IXGBE_EIMC); in ixgbe_get_regs()
499 regs_buff[22] = IXGBE_READ_REG(hw, IXGBE_EIAC); in ixgbe_get_regs()
500 regs_buff[23] = IXGBE_READ_REG(hw, IXGBE_EIAM); in ixgbe_get_regs()
501 regs_buff[24] = IXGBE_READ_REG(hw, IXGBE_EITR(0)); in ixgbe_get_regs()
502 regs_buff[25] = IXGBE_READ_REG(hw, IXGBE_IVAR(0)); in ixgbe_get_regs()
503 regs_buff[26] = IXGBE_READ_REG(hw, IXGBE_MSIXT); in ixgbe_get_regs()
504 regs_buff[27] = IXGBE_READ_REG(hw, IXGBE_MSIXPBA); in ixgbe_get_regs()
505 regs_buff[28] = IXGBE_READ_REG(hw, IXGBE_PBACL(0)); in ixgbe_get_regs()
506 regs_buff[29] = IXGBE_READ_REG(hw, IXGBE_GPIE); in ixgbe_get_regs()
509 regs_buff[30] = IXGBE_READ_REG(hw, IXGBE_PFCTOP); in ixgbe_get_regs()
510 regs_buff[31] = IXGBE_READ_REG(hw, IXGBE_FCTTV(0)); in ixgbe_get_regs()
511 regs_buff[32] = IXGBE_READ_REG(hw, IXGBE_FCTTV(1)); in ixgbe_get_regs()
512 regs_buff[33] = IXGBE_READ_REG(hw, IXGBE_FCTTV(2)); in ixgbe_get_regs()
513 regs_buff[34] = IXGBE_READ_REG(hw, IXGBE_FCTTV(3)); in ixgbe_get_regs()
515 switch (hw->mac.type) { in ixgbe_get_regs()
517 regs_buff[35 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTL(i)); in ixgbe_get_regs()
518 regs_buff[43 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTH(i)); in ixgbe_get_regs()
524 regs_buff[35 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTL_82599(i)); in ixgbe_get_regs()
525 regs_buff[43 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTH_82599(i)); in ixgbe_get_regs()
531 regs_buff[51] = IXGBE_READ_REG(hw, IXGBE_FCRTV); in ixgbe_get_regs()
532 regs_buff[52] = IXGBE_READ_REG(hw, IXGBE_TFCS); in ixgbe_get_regs()
536 regs_buff[53 + i] = IXGBE_READ_REG(hw, IXGBE_RDBAL(i)); in ixgbe_get_regs()
538 regs_buff[117 + i] = IXGBE_READ_REG(hw, IXGBE_RDBAH(i)); in ixgbe_get_regs()
540 regs_buff[181 + i] = IXGBE_READ_REG(hw, IXGBE_RDLEN(i)); in ixgbe_get_regs()
542 regs_buff[245 + i] = IXGBE_READ_REG(hw, IXGBE_RDH(i)); in ixgbe_get_regs()
544 regs_buff[309 + i] = IXGBE_READ_REG(hw, IXGBE_RDT(i)); in ixgbe_get_regs()
546 regs_buff[373 + i] = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); in ixgbe_get_regs()
548 regs_buff[437 + i] = IXGBE_READ_REG(hw, IXGBE_SRRCTL(i)); in ixgbe_get_regs()
550 regs_buff[453 + i] = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); in ixgbe_get_regs()
551 regs_buff[469] = IXGBE_READ_REG(hw, IXGBE_RDRXCTL); in ixgbe_get_regs()
553 regs_buff[470 + i] = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)); in ixgbe_get_regs()
554 regs_buff[478] = IXGBE_READ_REG(hw, IXGBE_RXCTRL); in ixgbe_get_regs()
555 regs_buff[479] = IXGBE_READ_REG(hw, IXGBE_DROPEN); in ixgbe_get_regs()
558 regs_buff[480] = IXGBE_READ_REG(hw, IXGBE_RXCSUM); in ixgbe_get_regs()
559 regs_buff[481] = IXGBE_READ_REG(hw, IXGBE_RFCTL); in ixgbe_get_regs()
561 regs_buff[482 + i] = IXGBE_READ_REG(hw, IXGBE_RAL(i)); in ixgbe_get_regs()
563 regs_buff[498 + i] = IXGBE_READ_REG(hw, IXGBE_RAH(i)); in ixgbe_get_regs()
564 regs_buff[514] = IXGBE_READ_REG(hw, IXGBE_PSRTYPE(0)); in ixgbe_get_regs()
565 regs_buff[515] = IXGBE_READ_REG(hw, IXGBE_FCTRL); in ixgbe_get_regs()
566 regs_buff[516] = IXGBE_READ_REG(hw, IXGBE_VLNCTRL); in ixgbe_get_regs()
567 regs_buff[517] = IXGBE_READ_REG(hw, IXGBE_MCSTCTRL); in ixgbe_get_regs()
568 regs_buff[518] = IXGBE_READ_REG(hw, IXGBE_MRQC); in ixgbe_get_regs()
569 regs_buff[519] = IXGBE_READ_REG(hw, IXGBE_VMD_CTL); in ixgbe_get_regs()
571 regs_buff[520 + i] = IXGBE_READ_REG(hw, IXGBE_IMIR(i)); in ixgbe_get_regs()
573 regs_buff[528 + i] = IXGBE_READ_REG(hw, IXGBE_IMIREXT(i)); in ixgbe_get_regs()
574 regs_buff[536] = IXGBE_READ_REG(hw, IXGBE_IMIRVP); in ixgbe_get_regs()
578 regs_buff[537 + i] = IXGBE_READ_REG(hw, IXGBE_TDBAL(i)); in ixgbe_get_regs()
580 regs_buff[569 + i] = IXGBE_READ_REG(hw, IXGBE_TDBAH(i)); in ixgbe_get_regs()
582 regs_buff[601 + i] = IXGBE_READ_REG(hw, IXGBE_TDLEN(i)); in ixgbe_get_regs()
584 regs_buff[633 + i] = IXGBE_READ_REG(hw, IXGBE_TDH(i)); in ixgbe_get_regs()
586 regs_buff[665 + i] = IXGBE_READ_REG(hw, IXGBE_TDT(i)); in ixgbe_get_regs()
588 regs_buff[697 + i] = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i)); in ixgbe_get_regs()
590 regs_buff[729 + i] = IXGBE_READ_REG(hw, IXGBE_TDWBAL(i)); in ixgbe_get_regs()
592 regs_buff[761 + i] = IXGBE_READ_REG(hw, IXGBE_TDWBAH(i)); in ixgbe_get_regs()
593 regs_buff[793] = IXGBE_READ_REG(hw, IXGBE_DTXCTL); in ixgbe_get_regs()
595 regs_buff[794 + i] = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); in ixgbe_get_regs()
596 regs_buff[810] = IXGBE_READ_REG(hw, IXGBE_TIPG); in ixgbe_get_regs()
598 regs_buff[811 + i] = IXGBE_READ_REG(hw, IXGBE_TXPBSIZE(i)); in ixgbe_get_regs()
599 regs_buff[819] = IXGBE_READ_REG(hw, IXGBE_MNGTXMAP); in ixgbe_get_regs()
602 regs_buff[820] = IXGBE_READ_REG(hw, IXGBE_WUC); in ixgbe_get_regs()
603 regs_buff[821] = IXGBE_READ_REG(hw, IXGBE_WUFC); in ixgbe_get_regs()
604 regs_buff[822] = IXGBE_READ_REG(hw, IXGBE_WUS); in ixgbe_get_regs()
605 regs_buff[823] = IXGBE_READ_REG(hw, IXGBE_IPAV); in ixgbe_get_regs()
606 regs_buff[824] = IXGBE_READ_REG(hw, IXGBE_IP4AT); in ixgbe_get_regs()
607 regs_buff[825] = IXGBE_READ_REG(hw, IXGBE_IP6AT); in ixgbe_get_regs()
608 regs_buff[826] = IXGBE_READ_REG(hw, IXGBE_WUPL); in ixgbe_get_regs()
609 regs_buff[827] = IXGBE_READ_REG(hw, IXGBE_WUPM); in ixgbe_get_regs()
610 regs_buff[828] = IXGBE_READ_REG(hw, IXGBE_FHFT(0)); in ixgbe_get_regs()
613 regs_buff[829] = IXGBE_READ_REG(hw, IXGBE_RMCS); /* same as FCCFG */ in ixgbe_get_regs()
614 regs_buff[831] = IXGBE_READ_REG(hw, IXGBE_PDPMCS); /* same as RTTPCS */ in ixgbe_get_regs()
616 switch (hw->mac.type) { in ixgbe_get_regs()
618 regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_DPMCS); in ixgbe_get_regs()
619 regs_buff[832] = IXGBE_READ_REG(hw, IXGBE_RUPPBMR); in ixgbe_get_regs()
622 IXGBE_READ_REG(hw, IXGBE_RT2CR(i)); in ixgbe_get_regs()
625 IXGBE_READ_REG(hw, IXGBE_RT2SR(i)); in ixgbe_get_regs()
628 IXGBE_READ_REG(hw, IXGBE_TDTQ2TCCR(i)); in ixgbe_get_regs()
631 IXGBE_READ_REG(hw, IXGBE_TDTQ2TCSR(i)); in ixgbe_get_regs()
637 regs_buff[830] = IXGBE_READ_REG(hw, IXGBE_RTTDCS); in ixgbe_get_regs()
638 regs_buff[832] = IXGBE_READ_REG(hw, IXGBE_RTRPCS); in ixgbe_get_regs()
641 IXGBE_READ_REG(hw, IXGBE_RTRPT4C(i)); in ixgbe_get_regs()
644 IXGBE_READ_REG(hw, IXGBE_RTRPT4S(i)); in ixgbe_get_regs()
647 IXGBE_READ_REG(hw, IXGBE_RTTDT2C(i)); in ixgbe_get_regs()
650 IXGBE_READ_REG(hw, IXGBE_RTTDT2S(i)); in ixgbe_get_regs()
658 IXGBE_READ_REG(hw, IXGBE_TDPT2TCCR(i)); /* same as RTTPT2C */ in ixgbe_get_regs()
661 IXGBE_READ_REG(hw, IXGBE_TDPT2TCSR(i)); /* same as RTTPT2S */ in ixgbe_get_regs()
728 regs_buff[1038] = IXGBE_READ_REG(hw, IXGBE_PCS1GCFIG); in ixgbe_get_regs()
729 regs_buff[1039] = IXGBE_READ_REG(hw, IXGBE_PCS1GLCTL); in ixgbe_get_regs()
730 regs_buff[1040] = IXGBE_READ_REG(hw, IXGBE_PCS1GLSTA); in ixgbe_get_regs()
731 regs_buff[1041] = IXGBE_READ_REG(hw, IXGBE_PCS1GDBG0); in ixgbe_get_regs()
732 regs_buff[1042] = IXGBE_READ_REG(hw, IXGBE_PCS1GDBG1); in ixgbe_get_regs()
733 regs_buff[1043] = IXGBE_READ_REG(hw, IXGBE_PCS1GANA); in ixgbe_get_regs()
734 regs_buff[1044] = IXGBE_READ_REG(hw, IXGBE_PCS1GANLP); in ixgbe_get_regs()
735 regs_buff[1045] = IXGBE_READ_REG(hw, IXGBE_PCS1GANNP); in ixgbe_get_regs()
736 regs_buff[1046] = IXGBE_READ_REG(hw, IXGBE_PCS1GANLPNP); in ixgbe_get_regs()
737 regs_buff[1047] = IXGBE_READ_REG(hw, IXGBE_HLREG0); in ixgbe_get_regs()
738 regs_buff[1048] = IXGBE_READ_REG(hw, IXGBE_HLREG1); in ixgbe_get_regs()
739 regs_buff[1049] = IXGBE_READ_REG(hw, IXGBE_PAP); in ixgbe_get_regs()
740 regs_buff[1050] = IXGBE_READ_REG(hw, IXGBE_MACA); in ixgbe_get_regs()
741 regs_buff[1051] = IXGBE_READ_REG(hw, IXGBE_APAE); in ixgbe_get_regs()
742 regs_buff[1052] = IXGBE_READ_REG(hw, IXGBE_ARD); in ixgbe_get_regs()
743 regs_buff[1053] = IXGBE_READ_REG(hw, IXGBE_AIS); in ixgbe_get_regs()
744 regs_buff[1054] = IXGBE_READ_REG(hw, IXGBE_MSCA); in ixgbe_get_regs()
745 regs_buff[1055] = IXGBE_READ_REG(hw, IXGBE_MSRWD); in ixgbe_get_regs()
746 regs_buff[1056] = IXGBE_READ_REG(hw, IXGBE_MLADD); in ixgbe_get_regs()
747 regs_buff[1057] = IXGBE_READ_REG(hw, IXGBE_MHADD); in ixgbe_get_regs()
748 regs_buff[1058] = IXGBE_READ_REG(hw, IXGBE_TREG); in ixgbe_get_regs()
749 regs_buff[1059] = IXGBE_READ_REG(hw, IXGBE_PCSS1); in ixgbe_get_regs()
750 regs_buff[1060] = IXGBE_READ_REG(hw, IXGBE_PCSS2); in ixgbe_get_regs()
751 regs_buff[1061] = IXGBE_READ_REG(hw, IXGBE_XPCSS); in ixgbe_get_regs()
752 regs_buff[1062] = IXGBE_READ_REG(hw, IXGBE_SERDESC); in ixgbe_get_regs()
753 regs_buff[1063] = IXGBE_READ_REG(hw, IXGBE_MACS); in ixgbe_get_regs()
754 regs_buff[1064] = IXGBE_READ_REG(hw, IXGBE_AUTOC); in ixgbe_get_regs()
755 regs_buff[1065] = IXGBE_READ_REG(hw, IXGBE_LINKS); in ixgbe_get_regs()
756 regs_buff[1066] = IXGBE_READ_REG(hw, IXGBE_AUTOC2); in ixgbe_get_regs()
757 regs_buff[1067] = IXGBE_READ_REG(hw, IXGBE_AUTOC3); in ixgbe_get_regs()
758 regs_buff[1068] = IXGBE_READ_REG(hw, IXGBE_ANLP1); in ixgbe_get_regs()
759 regs_buff[1069] = IXGBE_READ_REG(hw, IXGBE_ANLP2); in ixgbe_get_regs()
760 regs_buff[1070] = IXGBE_READ_REG(hw, IXGBE_ATLASCTL); in ixgbe_get_regs()
763 regs_buff[1071] = IXGBE_READ_REG(hw, IXGBE_RDSTATCTL); in ixgbe_get_regs()
765 regs_buff[1072 + i] = IXGBE_READ_REG(hw, IXGBE_RDSTAT(i)); in ixgbe_get_regs()
766 regs_buff[1080] = IXGBE_READ_REG(hw, IXGBE_RDHMPN); in ixgbe_get_regs()
768 regs_buff[1081 + i] = IXGBE_READ_REG(hw, IXGBE_RIC_DW(i)); in ixgbe_get_regs()
769 regs_buff[1085] = IXGBE_READ_REG(hw, IXGBE_RDPROBE); in ixgbe_get_regs()
770 regs_buff[1086] = IXGBE_READ_REG(hw, IXGBE_TDSTATCTL); in ixgbe_get_regs()
772 regs_buff[1087 + i] = IXGBE_READ_REG(hw, IXGBE_TDSTAT(i)); in ixgbe_get_regs()
773 regs_buff[1095] = IXGBE_READ_REG(hw, IXGBE_TDHMPN); in ixgbe_get_regs()
775 regs_buff[1096 + i] = IXGBE_READ_REG(hw, IXGBE_TIC_DW(i)); in ixgbe_get_regs()
776 regs_buff[1100] = IXGBE_READ_REG(hw, IXGBE_TDPROBE); in ixgbe_get_regs()
777 regs_buff[1101] = IXGBE_READ_REG(hw, IXGBE_TXBUFCTRL); in ixgbe_get_regs()
778 regs_buff[1102] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA0); in ixgbe_get_regs()
779 regs_buff[1103] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA1); in ixgbe_get_regs()
780 regs_buff[1104] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA2); in ixgbe_get_regs()
781 regs_buff[1105] = IXGBE_READ_REG(hw, IXGBE_TXBUFDATA3); in ixgbe_get_regs()
782 regs_buff[1106] = IXGBE_READ_REG(hw, IXGBE_RXBUFCTRL); in ixgbe_get_regs()
783 regs_buff[1107] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA0); in ixgbe_get_regs()
784 regs_buff[1108] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA1); in ixgbe_get_regs()
785 regs_buff[1109] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA2); in ixgbe_get_regs()
786 regs_buff[1110] = IXGBE_READ_REG(hw, IXGBE_RXBUFDATA3); in ixgbe_get_regs()
788 regs_buff[1111 + i] = IXGBE_READ_REG(hw, IXGBE_PCIE_DIAG(i)); in ixgbe_get_regs()
789 regs_buff[1119] = IXGBE_READ_REG(hw, IXGBE_RFVAL); in ixgbe_get_regs()
790 regs_buff[1120] = IXGBE_READ_REG(hw, IXGBE_MDFTC1); in ixgbe_get_regs()
791 regs_buff[1121] = IXGBE_READ_REG(hw, IXGBE_MDFTC2); in ixgbe_get_regs()
792 regs_buff[1122] = IXGBE_READ_REG(hw, IXGBE_MDFTFIFO1); in ixgbe_get_regs()
793 regs_buff[1123] = IXGBE_READ_REG(hw, IXGBE_MDFTFIFO2); in ixgbe_get_regs()
794 regs_buff[1124] = IXGBE_READ_REG(hw, IXGBE_MDFTS); in ixgbe_get_regs()
795 regs_buff[1125] = IXGBE_READ_REG(hw, IXGBE_PCIEECCCTL); in ixgbe_get_regs()
796 regs_buff[1126] = IXGBE_READ_REG(hw, IXGBE_PBTXECC); in ixgbe_get_regs()
797 regs_buff[1127] = IXGBE_READ_REG(hw, IXGBE_PBRXECC); in ixgbe_get_regs()
800 regs_buff[1128] = IXGBE_READ_REG(hw, IXGBE_MFLCN); in ixgbe_get_regs()
803 regs_buff[1129] = IXGBE_READ_REG(hw, IXGBE_RTRUP2TC); in ixgbe_get_regs()
804 regs_buff[1130] = IXGBE_READ_REG(hw, IXGBE_RTTUP2TC); in ixgbe_get_regs()
806 regs_buff[1131 + i] = IXGBE_READ_REG(hw, IXGBE_TXLLQ(i)); in ixgbe_get_regs()
807 regs_buff[1135] = IXGBE_READ_REG(hw, IXGBE_RTTBCNRM); in ixgbe_get_regs()
809 regs_buff[1136] = IXGBE_READ_REG(hw, IXGBE_RTTBCNRD); in ixgbe_get_regs()
813 regs_buff[1137] = IXGBE_READ_REG(hw, IXGBE_RTTQCNCR); in ixgbe_get_regs()
814 regs_buff[1138] = IXGBE_READ_REG(hw, IXGBE_RTTQCNTG); in ixgbe_get_regs()
820 return adapter->hw.eeprom.word_size * 2; in ixgbe_get_eeprom_len()
827 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_eeprom() local
836 eeprom->magic = hw->vendor_id | (hw->device_id << 16); in ixgbe_get_eeprom()
846 ret_val = hw->eeprom.ops.read_buffer(hw, first_word, eeprom_len, in ixgbe_get_eeprom()
863 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_eeprom() local
872 if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) in ixgbe_set_eeprom()
875 max_len = hw->eeprom.word_size * 2; in ixgbe_set_eeprom()
890 ret_val = hw->eeprom.ops.read(hw, first_word, &eeprom_buff[0]); in ixgbe_set_eeprom()
901 ret_val = hw->eeprom.ops.read(hw, last_word, in ixgbe_set_eeprom()
916 ret_val = hw->eeprom.ops.write_buffer(hw, first_word, in ixgbe_set_eeprom()
922 hw->eeprom.ops.update_checksum(hw); in ixgbe_set_eeprom()
1254 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_link_test() local
1258 if (ixgbe_removed(hw->hw_addr)) { in ixgbe_link_test()
1264 hw->mac.ops.check_link(hw, &link_speed, &link_up, true); in ixgbe_link_test()
1357 if (ixgbe_removed(adapter->hw.hw_addr)) { in reg_pattern_test()
1362 before = ixgbe_read_reg(&adapter->hw, reg); in reg_pattern_test()
1363 ixgbe_write_reg(&adapter->hw, reg, test_pattern[pat] & write); in reg_pattern_test()
1364 val = ixgbe_read_reg(&adapter->hw, reg); in reg_pattern_test()
1369 ixgbe_write_reg(&adapter->hw, reg, before); in reg_pattern_test()
1372 ixgbe_write_reg(&adapter->hw, reg, before); in reg_pattern_test()
1382 if (ixgbe_removed(adapter->hw.hw_addr)) { in reg_set_and_check()
1386 before = ixgbe_read_reg(&adapter->hw, reg); in reg_set_and_check()
1387 ixgbe_write_reg(&adapter->hw, reg, write & mask); in reg_set_and_check()
1388 val = ixgbe_read_reg(&adapter->hw, reg); in reg_set_and_check()
1393 ixgbe_write_reg(&adapter->hw, reg, before); in reg_set_and_check()
1396 ixgbe_write_reg(&adapter->hw, reg, before); in reg_set_and_check()
1406 if (ixgbe_removed(adapter->hw.hw_addr)) { in ixgbe_reg_test()
1411 switch (adapter->hw.mac.type) { in ixgbe_reg_test()
1434 before = ixgbe_read_reg(&adapter->hw, IXGBE_STATUS); in ixgbe_reg_test()
1435 value = (ixgbe_read_reg(&adapter->hw, IXGBE_STATUS) & toggle); in ixgbe_reg_test()
1436 ixgbe_write_reg(&adapter->hw, IXGBE_STATUS, toggle); in ixgbe_reg_test()
1437 after = ixgbe_read_reg(&adapter->hw, IXGBE_STATUS) & toggle; in ixgbe_reg_test()
1445 ixgbe_write_reg(&adapter->hw, IXGBE_STATUS, before); in ixgbe_reg_test()
1469 ixgbe_write_reg(&adapter->hw, in ixgbe_reg_test()
1504 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_eeprom_test() local
1505 if (hw->eeprom.ops.validate_checksum(hw, NULL)) in ixgbe_eeprom_test()
1517 adapter->test_icr |= IXGBE_READ_REG(&adapter->hw, IXGBE_EICR); in ixgbe_test_intr()
1549 e_info(hw, "testing %s interrupt\n", shared_int ? in ixgbe_intr_test()
1553 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); in ixgbe_intr_test()
1554 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1571 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, in ixgbe_intr_test()
1573 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, in ixgbe_intr_test()
1575 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1591 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); in ixgbe_intr_test()
1592 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); in ixgbe_intr_test()
1593 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1610 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, in ixgbe_intr_test()
1612 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, in ixgbe_intr_test()
1614 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1625 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFFFFFF); in ixgbe_intr_test()
1626 IXGBE_WRITE_FLUSH(&adapter->hw); in ixgbe_intr_test()
1639 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_free_desc_rings() local
1645 hw->mac.ops.disable_rx(hw); in ixgbe_free_desc_rings()
1649 reg_ctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(tx_ring->reg_idx)); in ixgbe_free_desc_rings()
1651 IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(tx_ring->reg_idx), reg_ctl); in ixgbe_free_desc_rings()
1653 switch (hw->mac.type) { in ixgbe_free_desc_rings()
1658 reg_ctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); in ixgbe_free_desc_rings()
1660 IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, reg_ctl); in ixgbe_free_desc_rings()
1676 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_desc_rings() local
1692 switch (adapter->hw.mac.type) { in ixgbe_setup_desc_rings()
1697 reg_data = IXGBE_READ_REG(&adapter->hw, IXGBE_DMATXCTL); in ixgbe_setup_desc_rings()
1699 IXGBE_WRITE_REG(&adapter->hw, IXGBE_DMATXCTL, reg_data); in ixgbe_setup_desc_rings()
1720 hw->mac.ops.disable_rx(hw); in ixgbe_setup_desc_rings()
1724 rctl = IXGBE_READ_REG(&adapter->hw, IXGBE_RXCTRL); in ixgbe_setup_desc_rings()
1726 IXGBE_WRITE_REG(&adapter->hw, IXGBE_RXCTRL, rctl); in ixgbe_setup_desc_rings()
1728 hw->mac.ops.enable_rx(hw); in ixgbe_setup_desc_rings()
1739 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_setup_loopback_test() local
1744 reg_data = IXGBE_READ_REG(hw, IXGBE_HLREG0); in ixgbe_setup_loopback_test()
1746 IXGBE_WRITE_REG(hw, IXGBE_HLREG0, reg_data); in ixgbe_setup_loopback_test()
1748 reg_data = IXGBE_READ_REG(hw, IXGBE_FCTRL); in ixgbe_setup_loopback_test()
1750 IXGBE_WRITE_REG(hw, IXGBE_FCTRL, reg_data); in ixgbe_setup_loopback_test()
1753 switch (adapter->hw.mac.type) { in ixgbe_setup_loopback_test()
1757 reg_data = IXGBE_READ_REG(hw, IXGBE_MACC); in ixgbe_setup_loopback_test()
1759 IXGBE_WRITE_REG(hw, IXGBE_MACC, reg_data); in ixgbe_setup_loopback_test()
1762 if (hw->mac.orig_autoc) { in ixgbe_setup_loopback_test()
1763 reg_data = hw->mac.orig_autoc | IXGBE_AUTOC_FLU; in ixgbe_setup_loopback_test()
1764 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, reg_data); in ixgbe_setup_loopback_test()
1769 IXGBE_WRITE_FLUSH(hw); in ixgbe_setup_loopback_test()
1773 if (hw->mac.type == ixgbe_mac_82598EB) { in ixgbe_setup_loopback_test()
1776 hw->mac.ops.read_analog_reg8(hw, IXGBE_ATLAS_PDN_LPBK, &atlas); in ixgbe_setup_loopback_test()
1778 hw->mac.ops.write_analog_reg8(hw, IXGBE_ATLAS_PDN_LPBK, atlas); in ixgbe_setup_loopback_test()
1780 hw->mac.ops.read_analog_reg8(hw, IXGBE_ATLAS_PDN_10G, &atlas); in ixgbe_setup_loopback_test()
1782 hw->mac.ops.write_analog_reg8(hw, IXGBE_ATLAS_PDN_10G, atlas); in ixgbe_setup_loopback_test()
1784 hw->mac.ops.read_analog_reg8(hw, IXGBE_ATLAS_PDN_1G, &atlas); in ixgbe_setup_loopback_test()
1786 hw->mac.ops.write_analog_reg8(hw, IXGBE_ATLAS_PDN_1G, atlas); in ixgbe_setup_loopback_test()
1788 hw->mac.ops.read_analog_reg8(hw, IXGBE_ATLAS_PDN_AN, &atlas); in ixgbe_setup_loopback_test()
1790 hw->mac.ops.write_analog_reg8(hw, IXGBE_ATLAS_PDN_AN, atlas); in ixgbe_setup_loopback_test()
1800 reg_data = IXGBE_READ_REG(&adapter->hw, IXGBE_HLREG0); in ixgbe_loopback_cleanup()
1802 IXGBE_WRITE_REG(&adapter->hw, IXGBE_HLREG0, reg_data); in ixgbe_loopback_cleanup()
1987 if (ixgbe_removed(adapter->hw.hw_addr)) { in ixgbe_diag_test()
1988 e_err(hw, "Adapter removed - test blocked\n"); in ixgbe_diag_test()
1999 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_diag_test() local
2020 e_info(hw, "offline testing starting\n"); in ixgbe_diag_test()
2034 e_info(hw, "register testing starting\n"); in ixgbe_diag_test()
2039 e_info(hw, "eeprom testing starting\n"); in ixgbe_diag_test()
2044 e_info(hw, "interrupt testing starting\n"); in ixgbe_diag_test()
2052 e_info(hw, "Skip MAC loopback diagnostic in VT mode\n"); in ixgbe_diag_test()
2058 e_info(hw, "loopback testing starting\n"); in ixgbe_diag_test()
2069 else if (hw->mac.ops.disable_tx_laser) in ixgbe_diag_test()
2070 hw->mac.ops.disable_tx_laser(hw); in ixgbe_diag_test()
2072 e_info(hw, "online testing starting\n"); in ixgbe_diag_test()
2094 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_wol_exclusion() local
2098 if (!ixgbe_wol_supported(adapter, hw->device_id, in ixgbe_wol_exclusion()
2099 hw->subsystem_device_id)) { in ixgbe_wol_exclusion()
2170 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_phys_id() local
2174 adapter->led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL); in ixgbe_set_phys_id()
2178 hw->mac.ops.led_on(hw, IXGBE_LED_ON); in ixgbe_set_phys_id()
2182 hw->mac.ops.led_off(hw, IXGBE_LED_ON); in ixgbe_set_phys_id()
2187 IXGBE_WRITE_REG(&adapter->hw, IXGBE_LEDCTL, adapter->led_reg); in ixgbe_set_phys_id()
2501 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_update_ethtool_fdir_entry() local
2521 err = ixgbe_fdir_erase_perfect_filter_82599(hw, in ixgbe_update_ethtool_fdir_entry()
2599 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_add_ethtool_fdir_entry() local
2693 err = ixgbe_fdir_set_input_mask_82599(hw, &mask); in ixgbe_add_ethtool_fdir_entry()
2707 err = ixgbe_fdir_write_perfect_filter_82599(hw, in ixgbe_add_ethtool_fdir_entry()
2812 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_set_rss_hash_opt() local
2816 if ((hw->mac.type >= ixgbe_mac_X550) && in ixgbe_set_rss_hash_opt()
2818 mrqc = IXGBE_READ_REG(hw, IXGBE_PFVFMRQC(pf_pool)); in ixgbe_set_rss_hash_opt()
2820 mrqc = IXGBE_READ_REG(hw, IXGBE_MRQC); in ixgbe_set_rss_hash_opt()
2843 if ((hw->mac.type >= ixgbe_mac_X550) && in ixgbe_set_rss_hash_opt()
2845 IXGBE_WRITE_REG(hw, IXGBE_PFVFMRQC(pf_pool), mrqc); in ixgbe_set_rss_hash_opt()
2847 IXGBE_WRITE_REG(hw, IXGBE_MRQC, mrqc); in ixgbe_set_rss_hash_opt()
2877 if (adapter->hw.mac.type < ixgbe_mac_X550) in ixgbe_rss_indir_tbl_max()
2965 switch (adapter->hw.mac.type) { in ixgbe_get_ts_info()
3012 if (adapter->hw.mac.type == ixgbe_mac_82598EB) { in ixgbe_max_channels()
3112 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_module_info() local
3118 status = hw->phy.ops.read_i2c_eeprom(hw, in ixgbe_get_module_info()
3125 status = hw->phy.ops.read_i2c_eeprom(hw, in ixgbe_get_module_info()
3154 struct ixgbe_hw *hw = &adapter->hw; in ixgbe_get_module_eeprom() local
3168 status = hw->phy.ops.read_i2c_eeprom(hw, i, &databyte); in ixgbe_get_module_eeprom()
3170 status = hw->phy.ops.read_i2c_sff8472(hw, i, &databyte); in ixgbe_get_module_eeprom()