@@ -2653,38 +2653,6 @@ static int macb_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
26532653 }
26542654}
26552655
2656- static void macb_restore_features (struct net_device * netdev )
2657- {
2658- struct macb * bp = netdev_priv (netdev );
2659-
2660- netdev_features_t features = netdev -> features ;
2661-
2662- /* TX checksum offload */
2663- if (macb_is_gem (bp )) {
2664- u32 dmacfg ;
2665-
2666- dmacfg = gem_readl (bp , DMACFG );
2667- if (features & NETIF_F_HW_CSUM )
2668- dmacfg |= GEM_BIT (TXCOEN );
2669- else
2670- dmacfg &= ~GEM_BIT (TXCOEN );
2671- gem_writel (bp , DMACFG , dmacfg );
2672- }
2673-
2674- /* RX checksum offload */
2675- if (macb_is_gem (bp )) {
2676- u32 netcfg ;
2677-
2678- netcfg = gem_readl (bp , NCFGR );
2679- if (features & NETIF_F_RXCSUM &&
2680- !(netdev -> flags & IFF_PROMISC ))
2681- netcfg |= GEM_BIT (RXCOEN );
2682- else
2683- netcfg &= ~GEM_BIT (RXCOEN );
2684- gem_writel (bp , NCFGR , netcfg );
2685- }
2686- }
2687-
26882656static int macb_set_features (struct net_device * netdev ,
26892657 netdev_features_t features )
26902658{
@@ -2985,7 +2953,6 @@ static int macb_init(struct platform_device *pdev)
29852953 if (bp -> caps & MACB_CAPS_USRIO_HAS_CLKEN )
29862954 val |= MACB_BIT (CLKEN );
29872955
2988- bp -> suspend .usrio = val ;
29892956 macb_or_gem_writel (bp , USRIO , val );
29902957 }
29912958
@@ -2994,8 +2961,6 @@ static int macb_init(struct platform_device *pdev)
29942961 val |= macb_dbw (bp );
29952962 if (bp -> phy_interface == PHY_INTERFACE_MODE_SGMII )
29962963 val |= GEM_BIT (SGMIIEN ) | GEM_BIT (PCSSEL );
2997-
2998- bp -> suspend .ncfgr = val ;
29992964 macb_writel (bp , NCFGR , val );
30002965
30012966 return 0 ;
@@ -3650,9 +3615,6 @@ static int __maybe_unused macb_suspend(struct device *dev)
36503615 macb_writel (bp , WOL , MACB_BIT (MAG ));
36513616 enable_irq_wake (bp -> queues [0 ].irq );
36523617 } else {
3653- if (netif_running (netdev )) {
3654- macb_close (netdev );
3655- }
36563618 clk_disable_unprepare (bp -> tx_clk );
36573619 clk_disable_unprepare (bp -> hclk );
36583620 clk_disable_unprepare (bp -> pclk );
@@ -3677,17 +3639,6 @@ static int __maybe_unused macb_resume(struct device *dev)
36773639 clk_prepare_enable (bp -> hclk );
36783640 clk_prepare_enable (bp -> tx_clk );
36793641 clk_prepare_enable (bp -> rx_clk );
3680-
3681- macb_or_gem_writel (bp , USRIO , bp -> suspend .usrio );
3682- macb_writel (bp , NCFGR , bp -> suspend .ncfgr );
3683-
3684- phy_restore (netdev -> phydev );
3685- if (netif_running (netdev )) {
3686- macb_open (netdev );
3687- }
3688-
3689- macb_set_rx_mode (netdev );
3690- macb_restore_features (netdev );
36913642 }
36923643
36933644 netif_device_attach (netdev );
0 commit comments