Lines Matching refs:hw_feat
640 struct xgbe_hw_features *hw_feat = &pdata->hw_feat; in xgbe_get_all_hw_features() local
646 memset(hw_feat, 0, sizeof(*hw_feat)); in xgbe_get_all_hw_features()
648 hw_feat->version = XGMAC_IOREAD(pdata, MAC_VR); in xgbe_get_all_hw_features()
651 hw_feat->gmii = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, GMIISEL); in xgbe_get_all_hw_features()
652 hw_feat->vlhash = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, VLHASH); in xgbe_get_all_hw_features()
653 hw_feat->sma = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, SMASEL); in xgbe_get_all_hw_features()
654 hw_feat->rwk = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, RWKSEL); in xgbe_get_all_hw_features()
655 hw_feat->mgk = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, MGKSEL); in xgbe_get_all_hw_features()
656 hw_feat->mmc = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, MMCSEL); in xgbe_get_all_hw_features()
657 hw_feat->aoe = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, ARPOFFSEL); in xgbe_get_all_hw_features()
658 hw_feat->ts = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, TSSEL); in xgbe_get_all_hw_features()
659 hw_feat->eee = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, EEESEL); in xgbe_get_all_hw_features()
660 hw_feat->tx_coe = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, TXCOESEL); in xgbe_get_all_hw_features()
661 hw_feat->rx_coe = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, RXCOESEL); in xgbe_get_all_hw_features()
662 hw_feat->addn_mac = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, in xgbe_get_all_hw_features()
664 hw_feat->ts_src = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, TSSTSSEL); in xgbe_get_all_hw_features()
665 hw_feat->sa_vlan_ins = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, SAVLANINS); in xgbe_get_all_hw_features()
666 hw_feat->vxn = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, VXN); in xgbe_get_all_hw_features()
669 hw_feat->rx_fifo_size = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, in xgbe_get_all_hw_features()
671 hw_feat->tx_fifo_size = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, in xgbe_get_all_hw_features()
673 hw_feat->adv_ts_hi = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, ADVTHWORD); in xgbe_get_all_hw_features()
674 hw_feat->dma_width = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, ADDR64); in xgbe_get_all_hw_features()
675 hw_feat->dcb = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, DCBEN); in xgbe_get_all_hw_features()
676 hw_feat->sph = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, SPHEN); in xgbe_get_all_hw_features()
677 hw_feat->tso = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, TSOEN); in xgbe_get_all_hw_features()
678 hw_feat->dma_debug = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, DBGMEMA); in xgbe_get_all_hw_features()
679 hw_feat->rss = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, RSSEN); in xgbe_get_all_hw_features()
680 hw_feat->tc_cnt = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, NUMTC); in xgbe_get_all_hw_features()
681 hw_feat->hash_table_size = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, in xgbe_get_all_hw_features()
683 hw_feat->l3l4_filter_num = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, in xgbe_get_all_hw_features()
687 hw_feat->rx_q_cnt = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, RXQCNT); in xgbe_get_all_hw_features()
688 hw_feat->tx_q_cnt = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, TXQCNT); in xgbe_get_all_hw_features()
689 hw_feat->rx_ch_cnt = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, RXCHCNT); in xgbe_get_all_hw_features()
690 hw_feat->tx_ch_cnt = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, TXCHCNT); in xgbe_get_all_hw_features()
691 hw_feat->pps_out_num = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, PPSOUTNUM); in xgbe_get_all_hw_features()
692 hw_feat->aux_snap_num = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, AUXSNAPNUM); in xgbe_get_all_hw_features()
695 switch (hw_feat->hash_table_size) { in xgbe_get_all_hw_features()
699 hw_feat->hash_table_size = 64; in xgbe_get_all_hw_features()
702 hw_feat->hash_table_size = 128; in xgbe_get_all_hw_features()
705 hw_feat->hash_table_size = 256; in xgbe_get_all_hw_features()
710 switch (hw_feat->dma_width) { in xgbe_get_all_hw_features()
712 hw_feat->dma_width = 32; in xgbe_get_all_hw_features()
715 hw_feat->dma_width = 40; in xgbe_get_all_hw_features()
718 hw_feat->dma_width = 48; in xgbe_get_all_hw_features()
721 hw_feat->dma_width = 32; in xgbe_get_all_hw_features()
727 hw_feat->rx_q_cnt++; in xgbe_get_all_hw_features()
728 hw_feat->tx_q_cnt++; in xgbe_get_all_hw_features()
729 hw_feat->rx_ch_cnt++; in xgbe_get_all_hw_features()
730 hw_feat->tx_ch_cnt++; in xgbe_get_all_hw_features()
731 hw_feat->tc_cnt++; in xgbe_get_all_hw_features()
734 hw_feat->rx_fifo_size = 1 << (hw_feat->rx_fifo_size + 7); in xgbe_get_all_hw_features()
735 hw_feat->tx_fifo_size = 1 << (hw_feat->tx_fifo_size + 7); in xgbe_get_all_hw_features()
742 hw_feat->gmii ? "yes" : "no"); in xgbe_get_all_hw_features()
744 hw_feat->vlhash ? "yes" : "no"); in xgbe_get_all_hw_features()
746 hw_feat->sma ? "yes" : "no"); in xgbe_get_all_hw_features()
748 hw_feat->rwk ? "yes" : "no"); in xgbe_get_all_hw_features()
750 hw_feat->mgk ? "yes" : "no"); in xgbe_get_all_hw_features()
752 hw_feat->mmc ? "yes" : "no"); in xgbe_get_all_hw_features()
754 hw_feat->aoe ? "yes" : "no"); in xgbe_get_all_hw_features()
756 hw_feat->ts ? "yes" : "no"); in xgbe_get_all_hw_features()
758 hw_feat->eee ? "yes" : "no"); in xgbe_get_all_hw_features()
760 hw_feat->tx_coe ? "yes" : "no"); in xgbe_get_all_hw_features()
762 hw_feat->rx_coe ? "yes" : "no"); in xgbe_get_all_hw_features()
764 hw_feat->addn_mac); in xgbe_get_all_hw_features()
766 (hw_feat->ts_src == 1) ? "internal" : in xgbe_get_all_hw_features()
767 (hw_feat->ts_src == 2) ? "external" : in xgbe_get_all_hw_features()
768 (hw_feat->ts_src == 3) ? "internal/external" : "n/a"); in xgbe_get_all_hw_features()
770 hw_feat->sa_vlan_ins ? "yes" : "no"); in xgbe_get_all_hw_features()
772 hw_feat->vxn ? "yes" : "no"); in xgbe_get_all_hw_features()
776 hw_feat->rx_fifo_size); in xgbe_get_all_hw_features()
778 hw_feat->tx_fifo_size); in xgbe_get_all_hw_features()
780 hw_feat->adv_ts_hi ? "yes" : "no"); in xgbe_get_all_hw_features()
782 hw_feat->dma_width); in xgbe_get_all_hw_features()
784 hw_feat->dcb ? "yes" : "no"); in xgbe_get_all_hw_features()
786 hw_feat->sph ? "yes" : "no"); in xgbe_get_all_hw_features()
788 hw_feat->tso ? "yes" : "no"); in xgbe_get_all_hw_features()
790 hw_feat->dma_debug ? "yes" : "no"); in xgbe_get_all_hw_features()
792 hw_feat->rss ? "yes" : "no"); in xgbe_get_all_hw_features()
794 hw_feat->tc_cnt); in xgbe_get_all_hw_features()
796 hw_feat->hash_table_size); in xgbe_get_all_hw_features()
798 hw_feat->l3l4_filter_num); in xgbe_get_all_hw_features()
802 hw_feat->rx_q_cnt); in xgbe_get_all_hw_features()
804 hw_feat->tx_q_cnt); in xgbe_get_all_hw_features()
806 hw_feat->rx_ch_cnt); in xgbe_get_all_hw_features()
808 hw_feat->rx_ch_cnt); in xgbe_get_all_hw_features()
810 hw_feat->pps_out_num); in xgbe_get_all_hw_features()
812 hw_feat->aux_snap_num); in xgbe_get_all_hw_features()
1891 if (tc > pdata->hw_feat.tc_cnt) in xgbe_setup_tc()
1908 if (!pdata->hw_feat.vxn) in xgbe_fix_features()