Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'mt7530-dsa-subdriver-improvements-act-iii'

says:

====================
MT7530 DSA Subdriver Improvements Act III

This is the third patch series with the goal of simplifying the MT7530 DSA
subdriver and improving support for MT7530, MT7531, and the switch on the
MT7988 SoC.

I have done a simple ping test to confirm basic communication on all switch
ports on MCM and standalone MT7530, and MT7531 switch with this patch
series applied.

MT7621 Unielec, MCM MT7530:

rgmii-only-gmac0-mt7621-unielec-u7621-06-16m.dtb
gmac0-and-gmac1-mt7621-unielec-u7621-06-16m.dtb

tftpboot 0x80008000 mips-uzImage.bin; tftpboot 0x83000000 mips-rootfs.cpio.uboot; tftpboot 0x83f00000 $dtb; bootm 0x80008000 0x83000000 0x83f00000

MT7622 Bananapi, MT7531:

gmac0-and-gmac1-mt7622-bananapi-bpi-r64.dtb

tftpboot 0x40000000 arm64-Image; tftpboot 0x45000000 arm64-rootfs.cpio.uboot; tftpboot 0x4a000000 $dtb; booti 0x40000000 0x45000000 0x4a000000

MT7623 Bananapi, standalone MT7530:

rgmii-only-gmac0-mt7623n-bananapi-bpi-r2.dtb
gmac0-and-gmac1-mt7623n-bananapi-bpi-r2.dtb

tftpboot 0x80008000 arm-zImage; tftpboot 0x83000000 arm-rootfs.cpio.uboot; tftpboot 0x83f00000 $dtb; bootz 0x80008000 0x83000000 0x83f00000

This patch series is the continuation of the patch series linked below.

https://lore.kernel.org/r/20230522121532.86610-1-arinc.unal@arinc9.com

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
Changes in v3:
- Patch 8
- Explain properly the behaviour of setting link down on all ports at
setup.
- Split the changes for simplifying the link settings operations out to
another patch.
- Link to v2: https://lore.kernel.org/r/20240216-for-netnext-mt7530-improvements-3-v2-0-094cae3ff23b@arinc9.com

Changes in v2:
- Patch 8
- Use a single mt7530_rmw() instead of two mt7530_clear() and
mt7530_set() commands.
- Link to v1: https://lore.kernel.org/r/20240208-for-netnext-mt7530-improvements-3-v1-0-d7c1cfd502ca@arinc9.com
====================

Link: https://lore.kernel.org/r/20240301-for-netnext-mt7530-improvements-3-v3-0-449f4f166454@arinc9.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

+47 -231
+44 -215
drivers/net/dsa/mt7530.c
··· 966 966 MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY)); 967 967 } 968 968 969 - static int 969 + static void 970 970 mt753x_cpu_port_enable(struct dsa_switch *ds, int port) 971 971 { 972 972 struct mt7530_priv *priv = ds->priv; 973 - int ret; 974 - 975 - /* Setup max capability of CPU port at first */ 976 - if (priv->info->cpu_port_config) { 977 - ret = priv->info->cpu_port_config(ds, port); 978 - if (ret) 979 - return ret; 980 - } 981 973 982 974 /* Enable Mediatek header mode on the cpu port */ 983 975 mt7530_write(priv, MT7530_PVC_P(port), ··· 995 1003 /* Set to fallback mode for independent VLAN learning */ 996 1004 mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK, 997 1005 MT7530_PORT_FALLBACK_MODE); 998 - 999 - return 0; 1000 1006 } 1001 1007 1002 1008 static int ··· 1018 1028 priv->ports[port].enable = true; 1019 1029 mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, 1020 1030 priv->ports[port].pm); 1021 - mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); 1022 1031 1023 1032 mutex_unlock(&priv->reg_mutex); 1024 1033 ··· 1037 1048 priv->ports[port].enable = false; 1038 1049 mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK, 1039 1050 PCR_MATRIX_CLR); 1040 - mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK); 1041 1051 1042 1052 mutex_unlock(&priv->reg_mutex); 1043 1053 } ··· 2043 2055 } 2044 2056 2045 2057 /* This register must be set for MT7530 to properly fire interrupts */ 2046 - if (priv->id != ID_MT7531) 2058 + if (priv->id == ID_MT7530 || priv->id == ID_MT7621) 2047 2059 mt7530_set(priv, MT7530_TOP_SIG_CTRL, TOP_SIG_CTRL_NORMAL); 2048 2060 2049 2061 ret = request_threaded_irq(priv->irq, NULL, mt7530_irq_thread_fn, ··· 2249 2261 val |= MHWTRAP_MANUAL; 2250 2262 mt7530_write(priv, MT7530_MHWTRAP, val); 2251 2263 2252 - priv->p6_interface = PHY_INTERFACE_MODE_NA; 2253 - 2254 2264 mt753x_trap_frames(priv); 2255 2265 2256 2266 /* Enable and reset MIB counters */ 2257 2267 mt7530_mib_reset(ds); 2258 2268 2259 2269 for (i = 0; i < MT7530_NUM_PORTS; i++) { 2270 + /* Clear link settings and enable force mode to force link down 2271 + * on all ports until they're enabled later. 2272 + */ 2273 + mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK | 2274 + PMCR_FORCE_MODE, PMCR_FORCE_MODE); 2275 + 2260 2276 /* Disable forwarding by default on all ports */ 2261 2277 mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, 2262 2278 PCR_MATRIX_CLR); ··· 2269 2277 mt7530_set(priv, MT7530_PSC_P(i), SA_DIS); 2270 2278 2271 2279 if (dsa_is_cpu_port(ds, i)) { 2272 - ret = mt753x_cpu_port_enable(ds, i); 2273 - if (ret) 2274 - return ret; 2280 + mt753x_cpu_port_enable(ds, i); 2275 2281 } else { 2276 2282 mt7530_port_disable(ds, i); 2277 2283 ··· 2363 2373 UNU_FFP_MASK); 2364 2374 2365 2375 for (i = 0; i < MT7530_NUM_PORTS; i++) { 2376 + /* Clear link settings and enable force mode to force link down 2377 + * on all ports until they're enabled later. 2378 + */ 2379 + mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK | 2380 + MT7531_FORCE_MODE, MT7531_FORCE_MODE); 2381 + 2366 2382 /* Disable forwarding by default on all ports */ 2367 2383 mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK, 2368 2384 PCR_MATRIX_CLR); ··· 2379 2383 mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR); 2380 2384 2381 2385 if (dsa_is_cpu_port(ds, i)) { 2382 - ret = mt753x_cpu_port_enable(ds, i); 2383 - if (ret) 2384 - return ret; 2386 + mt753x_cpu_port_enable(ds, i); 2385 2387 } else { 2386 2388 mt7530_port_disable(ds, i); 2387 2389 ··· 2445 2451 val = mt7530_read(priv, MT7531_TOP_SIG_SR); 2446 2452 priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN); 2447 2453 2448 - /* all MACs must be forced link-down before sw reset */ 2454 + /* Force link down on all ports before internal reset */ 2449 2455 for (i = 0; i < MT7530_NUM_PORTS; i++) 2450 2456 mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK); 2451 2457 2452 2458 /* Reset the switch through internal reset */ 2453 - mt7530_write(priv, MT7530_SYS_CTRL, 2454 - SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST | 2455 - SYS_CTRL_REG_RST); 2459 + mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_SW_RST | SYS_CTRL_REG_RST); 2456 2460 2457 2461 if (!priv->p5_sgmii) { 2458 2462 mt7531_pll_setup(priv); ··· 2467 2475 2468 2476 mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK, 2469 2477 MT7531_GPIO0_INTERRUPT); 2470 - 2471 - /* Let phylink decide the interface later. */ 2472 - priv->p5_interface = PHY_INTERFACE_MODE_NA; 2473 - priv->p6_interface = PHY_INTERFACE_MODE_NA; 2474 2478 2475 2479 /* Enable PHY core PLL, since phy_device has not yet been created 2476 2480 * provided for phy_[read,write]_mmd_indirect is called, we provide ··· 2577 2589 } 2578 2590 } 2579 2591 2580 - static int 2592 + static void 2581 2593 mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode, 2582 2594 phy_interface_t interface) 2583 2595 { ··· 2587 2599 mt7530_setup_port5(priv->ds, interface); 2588 2600 else if (port == 6) 2589 2601 mt7530_setup_port6(priv->ds, interface); 2590 - 2591 - return 0; 2592 2602 } 2593 2603 2594 - static int mt7531_rgmii_setup(struct mt7530_priv *priv, u32 port, 2595 - phy_interface_t interface, 2596 - struct phy_device *phydev) 2604 + static void mt7531_rgmii_setup(struct mt7530_priv *priv, u32 port, 2605 + phy_interface_t interface, 2606 + struct phy_device *phydev) 2597 2607 { 2598 2608 u32 val; 2599 - 2600 - if (priv->p5_sgmii) { 2601 - dev_err(priv->dev, "RGMII mode is not available for port %d\n", 2602 - port); 2603 - return -EINVAL; 2604 - } 2605 2609 2606 2610 val = mt7530_read(priv, MT7531_CLKGEN_CTRL); 2607 2611 val |= GP_CLK_EN; ··· 2622 2642 case PHY_INTERFACE_MODE_RGMII_ID: 2623 2643 break; 2624 2644 default: 2625 - return -EINVAL; 2645 + break; 2626 2646 } 2627 2647 } 2648 + 2628 2649 mt7530_write(priv, MT7531_CLKGEN_CTRL, val); 2629 - 2630 - return 0; 2631 2650 } 2632 2651 2633 - static bool mt753x_is_mac_port(u32 port) 2634 - { 2635 - return (port == 5 || port == 6); 2636 - } 2637 - 2638 - static int 2639 - mt7988_mac_config(struct dsa_switch *ds, int port, unsigned int mode, 2640 - phy_interface_t interface) 2641 - { 2642 - if (dsa_is_cpu_port(ds, port) && 2643 - interface == PHY_INTERFACE_MODE_INTERNAL) 2644 - return 0; 2645 - 2646 - return -EINVAL; 2647 - } 2648 - 2649 - static int 2652 + static void 2650 2653 mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, 2651 2654 phy_interface_t interface) 2652 2655 { ··· 2637 2674 struct phy_device *phydev; 2638 2675 struct dsa_port *dp; 2639 2676 2640 - if (!mt753x_is_mac_port(port)) { 2641 - dev_err(priv->dev, "port %d is not a MAC port\n", port); 2642 - return -EINVAL; 2643 - } 2644 - 2645 - switch (interface) { 2646 - case PHY_INTERFACE_MODE_RGMII: 2647 - case PHY_INTERFACE_MODE_RGMII_ID: 2648 - case PHY_INTERFACE_MODE_RGMII_RXID: 2649 - case PHY_INTERFACE_MODE_RGMII_TXID: 2677 + if (phy_interface_mode_is_rgmii(interface)) { 2650 2678 dp = dsa_to_port(ds, port); 2651 2679 phydev = dp->user->phydev; 2652 - return mt7531_rgmii_setup(priv, port, interface, phydev); 2653 - case PHY_INTERFACE_MODE_SGMII: 2654 - case PHY_INTERFACE_MODE_NA: 2655 - case PHY_INTERFACE_MODE_1000BASEX: 2656 - case PHY_INTERFACE_MODE_2500BASEX: 2657 - /* handled in SGMII PCS driver */ 2658 - return 0; 2659 - default: 2660 - return -EINVAL; 2680 + mt7531_rgmii_setup(priv, port, interface, phydev); 2661 2681 } 2662 - 2663 - return -EINVAL; 2664 - } 2665 - 2666 - static int 2667 - mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode, 2668 - const struct phylink_link_state *state) 2669 - { 2670 - struct mt7530_priv *priv = ds->priv; 2671 - 2672 - return priv->info->mac_port_config(ds, port, mode, state->interface); 2673 2682 } 2674 2683 2675 2684 static struct phylink_pcs * ··· 2667 2732 const struct phylink_link_state *state) 2668 2733 { 2669 2734 struct mt7530_priv *priv = ds->priv; 2670 - u32 mcr_cur, mcr_new; 2671 2735 2672 - switch (port) { 2673 - case 0 ... 4: 2674 - if (state->interface != PHY_INTERFACE_MODE_GMII && 2675 - state->interface != PHY_INTERFACE_MODE_INTERNAL) 2676 - goto unsupported; 2677 - break; 2678 - case 5: 2679 - if (priv->p5_interface == state->interface) 2680 - break; 2681 - 2682 - if (mt753x_mac_config(ds, port, mode, state) < 0) 2683 - goto unsupported; 2684 - 2685 - if (priv->p5_intf_sel != P5_DISABLED) 2686 - priv->p5_interface = state->interface; 2687 - break; 2688 - case 6: 2689 - if (priv->p6_interface == state->interface) 2690 - break; 2691 - 2692 - if (mt753x_mac_config(ds, port, mode, state) < 0) 2693 - goto unsupported; 2694 - 2695 - priv->p6_interface = state->interface; 2696 - break; 2697 - default: 2698 - unsupported: 2699 - dev_err(ds->dev, "%s: unsupported %s port: %i\n", 2700 - __func__, phy_modes(state->interface), port); 2701 - return; 2702 - } 2703 - 2704 - mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port)); 2705 - mcr_new = mcr_cur; 2706 - mcr_new &= ~PMCR_LINK_SETTINGS_MASK; 2707 - mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN | 2708 - PMCR_BACKPR_EN | PMCR_FORCE_MODE_ID(priv->id); 2736 + if ((port == 5 || port == 6) && priv->info->mac_port_config) 2737 + priv->info->mac_port_config(ds, port, mode, state->interface); 2709 2738 2710 2739 /* Are we connected to external phy */ 2711 2740 if (port == 5 && dsa_is_user_port(ds, 5)) 2712 - mcr_new |= PMCR_EXT_PHY; 2713 - 2714 - if (mcr_new != mcr_cur) 2715 - mt7530_write(priv, MT7530_PMCR_P(port), mcr_new); 2741 + mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY); 2716 2742 } 2717 2743 2718 2744 static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port, ··· 2697 2801 2698 2802 mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK; 2699 2803 2700 - /* MT753x MAC works in 1G full duplex mode for all up-clocked 2701 - * variants. 2702 - */ 2703 - if (interface == PHY_INTERFACE_MODE_TRGMII || 2704 - (phy_interface_mode_is_8023z(interface))) { 2705 - speed = SPEED_1000; 2706 - duplex = DUPLEX_FULL; 2707 - } 2708 - 2709 2804 switch (speed) { 2710 2805 case SPEED_1000: 2806 + case SPEED_2500: 2807 + case SPEED_10000: 2711 2808 mcr |= PMCR_FORCE_SPEED_1000; 2712 2809 break; 2713 2810 case SPEED_100: ··· 2718 2829 if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) { 2719 2830 switch (speed) { 2720 2831 case SPEED_1000: 2832 + case SPEED_2500: 2721 2833 mcr |= PMCR_FORCE_EEE1G; 2722 2834 break; 2723 2835 case SPEED_100: ··· 2728 2838 } 2729 2839 2730 2840 mt7530_set(priv, MT7530_PMCR_P(port), mcr); 2731 - } 2732 - 2733 - static int 2734 - mt7531_cpu_port_config(struct dsa_switch *ds, int port) 2735 - { 2736 - struct mt7530_priv *priv = ds->priv; 2737 - phy_interface_t interface; 2738 - int speed; 2739 - int ret; 2740 - 2741 - switch (port) { 2742 - case 5: 2743 - if (!priv->p5_sgmii) 2744 - interface = PHY_INTERFACE_MODE_RGMII; 2745 - else 2746 - interface = PHY_INTERFACE_MODE_2500BASEX; 2747 - 2748 - priv->p5_interface = interface; 2749 - break; 2750 - case 6: 2751 - interface = PHY_INTERFACE_MODE_2500BASEX; 2752 - 2753 - priv->p6_interface = interface; 2754 - break; 2755 - default: 2756 - return -EINVAL; 2757 - } 2758 - 2759 - if (interface == PHY_INTERFACE_MODE_2500BASEX) 2760 - speed = SPEED_2500; 2761 - else 2762 - speed = SPEED_1000; 2763 - 2764 - ret = mt7531_mac_config(ds, port, MLO_AN_FIXED, interface); 2765 - if (ret) 2766 - return ret; 2767 - mt7530_write(priv, MT7530_PMCR_P(port), 2768 - PMCR_CPU_PORT_SETTING(priv->id)); 2769 - mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL, 2770 - speed, DUPLEX_FULL, true, true); 2771 - 2772 - return 0; 2773 - } 2774 - 2775 - static int 2776 - mt7988_cpu_port_config(struct dsa_switch *ds, int port) 2777 - { 2778 - struct mt7530_priv *priv = ds->priv; 2779 - 2780 - mt7530_write(priv, MT7530_PMCR_P(port), 2781 - PMCR_CPU_PORT_SETTING(priv->id)); 2782 - 2783 - mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, 2784 - PHY_INTERFACE_MODE_INTERNAL, NULL, 2785 - SPEED_10000, DUPLEX_FULL, true, true); 2786 - 2787 - return 0; 2788 2841 } 2789 2842 2790 2843 static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port, ··· 2812 2979 mt753x_setup(struct dsa_switch *ds) 2813 2980 { 2814 2981 struct mt7530_priv *priv = ds->priv; 2815 - int i, ret; 2982 + int ret = priv->info->sw_setup(ds); 2983 + int i; 2816 2984 2817 - /* Initialise the PCS devices */ 2818 - for (i = 0; i < priv->ds->num_ports; i++) { 2819 - priv->pcs[i].pcs.ops = priv->info->pcs_ops; 2820 - priv->pcs[i].pcs.neg_mode = true; 2821 - priv->pcs[i].priv = priv; 2822 - priv->pcs[i].port = i; 2823 - } 2824 - 2825 - ret = priv->info->sw_setup(ds); 2826 2985 if (ret) 2827 2986 return ret; 2828 2987 ··· 2825 3000 ret = mt7530_setup_mdio(priv); 2826 3001 if (ret && priv->irq) 2827 3002 mt7530_free_irq_common(priv); 3003 + 3004 + /* Initialise the PCS devices */ 3005 + for (i = 0; i < priv->ds->num_ports; i++) { 3006 + priv->pcs[i].pcs.ops = priv->info->pcs_ops; 3007 + priv->pcs[i].pcs.neg_mode = true; 3008 + priv->pcs[i].priv = priv; 3009 + priv->pcs[i].port = i; 3010 + } 2828 3011 2829 3012 if (priv->create_sgmii) { 2830 3013 ret = priv->create_sgmii(priv); ··· 2988 3155 .phy_write_c22 = mt7531_ind_c22_phy_write, 2989 3156 .phy_read_c45 = mt7531_ind_c45_phy_read, 2990 3157 .phy_write_c45 = mt7531_ind_c45_phy_write, 2991 - .cpu_port_config = mt7531_cpu_port_config, 2992 3158 .mac_port_get_caps = mt7531_mac_port_get_caps, 2993 3159 .mac_port_config = mt7531_mac_config, 2994 3160 }, ··· 2999 3167 .phy_write_c22 = mt7531_ind_c22_phy_write, 3000 3168 .phy_read_c45 = mt7531_ind_c45_phy_read, 3001 3169 .phy_write_c45 = mt7531_ind_c45_phy_write, 3002 - .cpu_port_config = mt7988_cpu_port_config, 3003 3170 .mac_port_get_caps = mt7988_mac_port_get_caps, 3004 - .mac_port_config = mt7988_mac_config, 3005 3171 }, 3006 3172 }; 3007 3173 EXPORT_SYMBOL_GPL(mt753x_table); ··· 3027 3197 * properly. 3028 3198 */ 3029 3199 if (!priv->info->sw_setup || !priv->info->phy_read_c22 || 3030 - !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps || 3031 - !priv->info->mac_port_config) 3200 + !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps) 3032 3201 return -EINVAL; 3033 3202 3034 3203 priv->id = priv->info->id;
+3 -16
drivers/net/dsa/mt7530.h
··· 304 304 MT7531_FORCE_DPX | \ 305 305 MT7531_FORCE_RX_FC | \ 306 306 MT7531_FORCE_TX_FC) 307 - #define PMCR_FORCE_MODE_ID(id) ((((id) == ID_MT7531) || ((id) == ID_MT7988)) ? \ 308 - MT7531_FORCE_MODE : PMCR_FORCE_MODE) 309 307 #define PMCR_LINK_SETTINGS_MASK (PMCR_TX_EN | PMCR_FORCE_SPEED_1000 | \ 310 308 PMCR_RX_EN | PMCR_FORCE_SPEED_100 | \ 311 309 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \ 312 310 PMCR_FORCE_FDX | PMCR_FORCE_LNK | \ 313 311 PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100) 314 - #define PMCR_CPU_PORT_SETTING(id) (PMCR_FORCE_MODE_ID((id)) | \ 315 - PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | \ 316 - PMCR_BACKOFF_EN | PMCR_BACKPR_EN | \ 317 - PMCR_TX_EN | PMCR_RX_EN | \ 318 - PMCR_TX_FC_EN | PMCR_RX_FC_EN | \ 319 - PMCR_FORCE_SPEED_1000 | \ 320 - PMCR_FORCE_FDX | PMCR_FORCE_LNK) 321 312 322 313 #define MT7530_PMEEECR_P(x) (0x3004 + (x) * 0x100) 323 314 #define WAKEUP_TIME_1000(x) (((x) & 0xFF) << 24) ··· 715 724 int regnum); 716 725 int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad, 717 726 int regnum, u16 val); 718 - int (*cpu_port_config)(struct dsa_switch *ds, int port); 719 727 void (*mac_port_get_caps)(struct dsa_switch *ds, int port, 720 728 struct phylink_config *config); 721 729 void (*mac_port_validate)(struct dsa_switch *ds, int port, 722 730 phy_interface_t interface, 723 731 unsigned long *supported); 724 - int (*mac_port_config)(struct dsa_switch *ds, int port, 725 - unsigned int mode, 726 - phy_interface_t interface); 732 + void (*mac_port_config)(struct dsa_switch *ds, int port, 733 + unsigned int mode, 734 + phy_interface_t interface); 727 735 }; 728 736 729 737 /* struct mt7530_priv - This is the main data structure for holding the state ··· 740 750 * @ports: Holding the state among ports 741 751 * @reg_mutex: The lock for protecting among process accessing 742 752 * registers 743 - * @p6_interface Holding the current port 6 interface 744 753 * @p5_intf_sel: Holding the current port 5 interface select 745 754 * @p5_sgmii: Flag for distinguishing if port 5 of the MT7531 switch 746 755 * has got SGMII ··· 761 772 const struct mt753x_info *info; 762 773 unsigned int id; 763 774 bool mcm; 764 - phy_interface_t p6_interface; 765 - phy_interface_t p5_interface; 766 775 enum p5_interface_select p5_intf_sel; 767 776 bool p5_sgmii; 768 777 u8 mirror_rx;