Lines Matching refs:hw_feat
747 struct xgbe_hw_features *hw_feat = &pdata->hw_feat; in xgbe_get_all_hw_features() local
753 memset(hw_feat, 0, sizeof(*hw_feat)); in xgbe_get_all_hw_features()
755 hw_feat->version = XGMAC_IOREAD(pdata, MAC_VR); in xgbe_get_all_hw_features()
758 hw_feat->gmii = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, GMIISEL); in xgbe_get_all_hw_features()
759 hw_feat->vlhash = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, VLHASH); in xgbe_get_all_hw_features()
760 hw_feat->sma = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, SMASEL); in xgbe_get_all_hw_features()
761 hw_feat->rwk = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, RWKSEL); in xgbe_get_all_hw_features()
762 hw_feat->mgk = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, MGKSEL); in xgbe_get_all_hw_features()
763 hw_feat->mmc = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, MMCSEL); in xgbe_get_all_hw_features()
764 hw_feat->aoe = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, ARPOFFSEL); in xgbe_get_all_hw_features()
765 hw_feat->ts = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, TSSEL); in xgbe_get_all_hw_features()
766 hw_feat->eee = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, EEESEL); in xgbe_get_all_hw_features()
767 hw_feat->tx_coe = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, TXCOESEL); in xgbe_get_all_hw_features()
768 hw_feat->rx_coe = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, RXCOESEL); in xgbe_get_all_hw_features()
769 hw_feat->addn_mac = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, in xgbe_get_all_hw_features()
771 hw_feat->ts_src = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, TSSTSSEL); in xgbe_get_all_hw_features()
772 hw_feat->sa_vlan_ins = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, SAVLANINS); in xgbe_get_all_hw_features()
773 hw_feat->vxn = XGMAC_GET_BITS(mac_hfr0, MAC_HWF0R, VXN); in xgbe_get_all_hw_features()
776 hw_feat->rx_fifo_size = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, in xgbe_get_all_hw_features()
778 hw_feat->tx_fifo_size = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, in xgbe_get_all_hw_features()
780 hw_feat->adv_ts_hi = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, ADVTHWORD); in xgbe_get_all_hw_features()
781 hw_feat->dma_width = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, ADDR64); in xgbe_get_all_hw_features()
782 hw_feat->dcb = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, DCBEN); in xgbe_get_all_hw_features()
783 hw_feat->sph = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, SPHEN); in xgbe_get_all_hw_features()
784 hw_feat->tso = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, TSOEN); in xgbe_get_all_hw_features()
785 hw_feat->dma_debug = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, DBGMEMA); in xgbe_get_all_hw_features()
786 hw_feat->rss = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, RSSEN); in xgbe_get_all_hw_features()
787 hw_feat->tc_cnt = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, NUMTC); in xgbe_get_all_hw_features()
788 hw_feat->hash_table_size = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, in xgbe_get_all_hw_features()
790 hw_feat->l3l4_filter_num = XGMAC_GET_BITS(mac_hfr1, MAC_HWF1R, in xgbe_get_all_hw_features()
794 hw_feat->rx_q_cnt = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, RXQCNT); in xgbe_get_all_hw_features()
795 hw_feat->tx_q_cnt = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, TXQCNT); in xgbe_get_all_hw_features()
796 hw_feat->rx_ch_cnt = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, RXCHCNT); in xgbe_get_all_hw_features()
797 hw_feat->tx_ch_cnt = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, TXCHCNT); in xgbe_get_all_hw_features()
798 hw_feat->pps_out_num = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, PPSOUTNUM); in xgbe_get_all_hw_features()
799 hw_feat->aux_snap_num = XGMAC_GET_BITS(mac_hfr2, MAC_HWF2R, AUXSNAPNUM); in xgbe_get_all_hw_features()
802 switch (hw_feat->hash_table_size) { in xgbe_get_all_hw_features()
806 hw_feat->hash_table_size = 64; in xgbe_get_all_hw_features()
809 hw_feat->hash_table_size = 128; in xgbe_get_all_hw_features()
812 hw_feat->hash_table_size = 256; in xgbe_get_all_hw_features()
817 switch (hw_feat->dma_width) { in xgbe_get_all_hw_features()
819 hw_feat->dma_width = 32; in xgbe_get_all_hw_features()
822 hw_feat->dma_width = 40; in xgbe_get_all_hw_features()
825 hw_feat->dma_width = 48; in xgbe_get_all_hw_features()
828 hw_feat->dma_width = 32; in xgbe_get_all_hw_features()
834 hw_feat->rx_q_cnt++; in xgbe_get_all_hw_features()
835 hw_feat->tx_q_cnt++; in xgbe_get_all_hw_features()
836 hw_feat->rx_ch_cnt++; in xgbe_get_all_hw_features()
837 hw_feat->tx_ch_cnt++; in xgbe_get_all_hw_features()
838 hw_feat->tc_cnt++; in xgbe_get_all_hw_features()
841 hw_feat->rx_fifo_size = 1 << (hw_feat->rx_fifo_size + 7); in xgbe_get_all_hw_features()
842 hw_feat->tx_fifo_size = 1 << (hw_feat->tx_fifo_size + 7); in xgbe_get_all_hw_features()
849 hw_feat->gmii ? "yes" : "no"); in xgbe_get_all_hw_features()
851 hw_feat->vlhash ? "yes" : "no"); in xgbe_get_all_hw_features()
853 hw_feat->sma ? "yes" : "no"); in xgbe_get_all_hw_features()
855 hw_feat->rwk ? "yes" : "no"); in xgbe_get_all_hw_features()
857 hw_feat->mgk ? "yes" : "no"); in xgbe_get_all_hw_features()
859 hw_feat->mmc ? "yes" : "no"); in xgbe_get_all_hw_features()
861 hw_feat->aoe ? "yes" : "no"); in xgbe_get_all_hw_features()
863 hw_feat->ts ? "yes" : "no"); in xgbe_get_all_hw_features()
865 hw_feat->eee ? "yes" : "no"); in xgbe_get_all_hw_features()
867 hw_feat->tx_coe ? "yes" : "no"); in xgbe_get_all_hw_features()
869 hw_feat->rx_coe ? "yes" : "no"); in xgbe_get_all_hw_features()
871 hw_feat->addn_mac); in xgbe_get_all_hw_features()
873 (hw_feat->ts_src == 1) ? "internal" : in xgbe_get_all_hw_features()
874 (hw_feat->ts_src == 2) ? "external" : in xgbe_get_all_hw_features()
875 (hw_feat->ts_src == 3) ? "internal/external" : "n/a"); in xgbe_get_all_hw_features()
877 hw_feat->sa_vlan_ins ? "yes" : "no"); in xgbe_get_all_hw_features()
879 hw_feat->vxn ? "yes" : "no"); in xgbe_get_all_hw_features()
883 hw_feat->rx_fifo_size); in xgbe_get_all_hw_features()
885 hw_feat->tx_fifo_size); in xgbe_get_all_hw_features()
887 hw_feat->adv_ts_hi ? "yes" : "no"); in xgbe_get_all_hw_features()
889 hw_feat->dma_width); in xgbe_get_all_hw_features()
891 hw_feat->dcb ? "yes" : "no"); in xgbe_get_all_hw_features()
893 hw_feat->sph ? "yes" : "no"); in xgbe_get_all_hw_features()
895 hw_feat->tso ? "yes" : "no"); in xgbe_get_all_hw_features()
897 hw_feat->dma_debug ? "yes" : "no"); in xgbe_get_all_hw_features()
899 hw_feat->rss ? "yes" : "no"); in xgbe_get_all_hw_features()
901 hw_feat->tc_cnt); in xgbe_get_all_hw_features()
903 hw_feat->hash_table_size); in xgbe_get_all_hw_features()
905 hw_feat->l3l4_filter_num); in xgbe_get_all_hw_features()
909 hw_feat->rx_q_cnt); in xgbe_get_all_hw_features()
911 hw_feat->tx_q_cnt); in xgbe_get_all_hw_features()
913 hw_feat->rx_ch_cnt); in xgbe_get_all_hw_features()
915 hw_feat->rx_ch_cnt); in xgbe_get_all_hw_features()
917 hw_feat->pps_out_num); in xgbe_get_all_hw_features()
919 hw_feat->aux_snap_num); in xgbe_get_all_hw_features()
2188 if (tc > pdata->hw_feat.tc_cnt) in xgbe_setup_tc()
2205 if (!pdata->hw_feat.vxn) in xgbe_fix_features()