kernel: bump 4.9 to 4.9.77
[openwrt/openwrt.git] / target / linux / sunxi / patches-4.9 / 0053-stmmac-form-4-13.patch
index f829b79..a5d860d 100644 (file)
  }
  
  static void print_pkt(unsigned char *buf, int len)
-@@ -783,7 +794,7 @@ static void stmmac_adjust_link(struct ne
+@@ -789,7 +800,7 @@ static void stmmac_adjust_link(struct ne
        struct stmmac_priv *priv = netdev_priv(dev);
        struct phy_device *phydev = dev->phydev;
        unsigned long flags;
  
        if (!phydev)
                return;
-@@ -796,8 +807,8 @@ static void stmmac_adjust_link(struct ne
+@@ -802,8 +813,8 @@ static void stmmac_adjust_link(struct ne
                /* Now we make sure that we can be in full duplex mode.
                 * If not, we operate in half-duplex mode. */
                if (phydev->duplex != priv->oldduplex) {
                                ctrl &= ~priv->hw->link.duplex;
                        else
                                ctrl |= priv->hw->link.duplex;
-@@ -808,30 +819,17 @@ static void stmmac_adjust_link(struct ne
+@@ -814,30 +825,17 @@ static void stmmac_adjust_link(struct ne
                        stmmac_mac_flow_ctrl(priv, phydev->duplex);
  
                if (phydev->speed != priv->speed) {
                                break;
                        default:
                                netif_warn(priv, link, priv->dev,
-@@ -847,12 +845,12 @@ static void stmmac_adjust_link(struct ne
+@@ -853,12 +851,12 @@ static void stmmac_adjust_link(struct ne
                writel(ctrl, priv->ioaddr + MAC_CTRL_REG);
  
                if (!priv->oldlink) {
                priv->speed = SPEED_UNKNOWN;
                priv->oldduplex = DUPLEX_UNKNOWN;
        }
-@@ -915,7 +913,7 @@ static int stmmac_init_phy(struct net_de
+@@ -921,7 +919,7 @@ static int stmmac_init_phy(struct net_de
        char bus_id[MII_BUS_ID_SIZE];
        int interface = priv->plat->interface;
        int max_speed = priv->plat->max_speed;
        priv->speed = SPEED_UNKNOWN;
        priv->oldduplex = DUPLEX_UNKNOWN;
  
-@@ -1450,7 +1448,7 @@ static void free_dma_rx_desc_resources(s
+@@ -1456,7 +1454,7 @@ static void free_dma_rx_desc_resources(s
  static void free_dma_tx_desc_resources(struct stmmac_priv *priv)
  {
        u32 tx_count = priv->plat->tx_queues_to_use;
  
        /* Free TX queue resources */
        for (queue = 0; queue < tx_count; queue++) {
-@@ -1499,7 +1497,7 @@ static int alloc_dma_rx_desc_resources(s
+@@ -1505,7 +1503,7 @@ static int alloc_dma_rx_desc_resources(s
                                                    sizeof(dma_addr_t),
                                                    GFP_KERNEL);
                if (!rx_q->rx_skbuff_dma)
  
                rx_q->rx_skbuff = kmalloc_array(DMA_RX_SIZE,
                                                sizeof(struct sk_buff *),
-@@ -1562,13 +1560,13 @@ static int alloc_dma_tx_desc_resources(s
+@@ -1568,13 +1566,13 @@ static int alloc_dma_tx_desc_resources(s
                                                    sizeof(*tx_q->tx_skbuff_dma),
                                                    GFP_KERNEL);
                if (!tx_q->tx_skbuff_dma)
  
                if (priv->extend_desc) {
                        tx_q->dma_etx = dma_zalloc_coherent(priv->device,
-@@ -1578,7 +1576,7 @@ static int alloc_dma_tx_desc_resources(s
+@@ -1584,7 +1582,7 @@ static int alloc_dma_tx_desc_resources(s
                                                            &tx_q->dma_tx_phy,
                                                            GFP_KERNEL);
                        if (!tx_q->dma_etx)
                } else {
                        tx_q->dma_tx = dma_zalloc_coherent(priv->device,
                                                           DMA_TX_SIZE *
-@@ -1587,13 +1585,13 @@ static int alloc_dma_tx_desc_resources(s
+@@ -1593,13 +1591,13 @@ static int alloc_dma_tx_desc_resources(s
                                                           &tx_q->dma_tx_phy,
                                                           GFP_KERNEL);
                        if (!tx_q->dma_tx)
        free_dma_tx_desc_resources(priv);
  
        return ret;
-@@ -2895,8 +2893,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2902,8 +2900,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
                priv->xstats.tx_set_ic_bit++;
        }
  
  
        if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
                     priv->hwts_tx_en)) {
-@@ -2974,7 +2971,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2981,7 +2978,7 @@ static netdev_tx_t stmmac_xmit(struct sk
  
        /* Manage oversized TCP frames for GMAC4 device */
        if (skb_is_gso(skb) && priv->tso) {
                        return stmmac_tso_xmit(skb, dev);
        }
  
-@@ -3105,8 +3102,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -3112,8 +3109,7 @@ static netdev_tx_t stmmac_xmit(struct sk
                priv->xstats.tx_set_ic_bit++;
        }
  
  
        /* Ready to fill the first descriptor and set the OWN bit w/o any
         * problems because all the descriptors are actually ready to be
-@@ -3983,7 +3979,9 @@ static int stmmac_hw_init(struct stmmac_
+@@ -3990,7 +3986,9 @@ static int stmmac_hw_init(struct stmmac_
        struct mac_device_info *mac;
  
        /* Identify the MAC HW device */
                priv->dev->priv_flags |= IFF_UNICAST_FLT;
                mac = dwmac1000_setup(priv->ioaddr,
                                      priv->plat->multicast_filter_bins,
-@@ -4003,6 +4001,10 @@ static int stmmac_hw_init(struct stmmac_
+@@ -4010,6 +4008,10 @@ static int stmmac_hw_init(struct stmmac_
  
        priv->hw = mac;
  
        /* To use the chained or ring mode */
        if (priv->synopsys_id >= DWMAC_CORE_4_00) {
                priv->hw->mode = &dwmac4_ring_mode_ops;
-@@ -4131,8 +4133,15 @@ int stmmac_dvr_probe(struct device *devi
+@@ -4138,8 +4140,15 @@ int stmmac_dvr_probe(struct device *devi
        if ((phyaddr >= 0) && (phyaddr <= 31))
                priv->plat->phy_addr = phyaddr;
  
  
        /* Init MAC and get the capabilities */
        ret = stmmac_hw_init(priv);
-@@ -4149,7 +4158,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -4156,7 +4165,7 @@ int stmmac_dvr_probe(struct device *devi
                            NETIF_F_RXCSUM;
  
        if ((priv->plat->tso_en) && (priv->dma_cap.tsoen)) {
                priv->tso = true;
                dev_info(priv->device, "TSO feature enabled\n");
        }
-@@ -4311,7 +4320,7 @@ int stmmac_suspend(struct device *dev)
+@@ -4318,7 +4327,7 @@ int stmmac_suspend(struct device *dev)
        }
        spin_unlock_irqrestore(&priv->lock, flags);