kernel: bump 4.9 to 4.9.124
[openwrt/staging/chunkeey.git] / target / linux / sunxi / patches-4.9 / 0053-stmmac-form-4-13.patch
index a5d860ddc4ace25f8e23e3f3187070415964a548..abdc618e6bf73fa81e6782a5345b4381f5539462 100644 (file)
@@ -47,7 +47,7 @@
  struct mii_regs {
 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
-@@ -269,7 +269,10 @@ static int socfpga_dwmac_set_phy_mode(st
+@@ -270,7 +270,10 @@ static int socfpga_dwmac_set_phy_mode(st
        ctrl &= ~(SYSMGR_EMACGRP_CTRL_PHYSEL_MASK << reg_shift);
        ctrl |= val << reg_shift;
  
        free_dma_tx_desc_resources(priv);
  
        return ret;
-@@ -2902,8 +2900,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -2907,8 +2905,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)) {
-@@ -2981,7 +2978,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -2993,7 +2990,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);
        }
  
-@@ -3112,8 +3109,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -3124,8 +3121,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
-@@ -3990,7 +3986,9 @@ static int stmmac_hw_init(struct stmmac_
+@@ -4002,7 +3998,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,
-@@ -4010,6 +4008,10 @@ static int stmmac_hw_init(struct stmmac_
+@@ -4022,6 +4020,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;
-@@ -4138,8 +4140,15 @@ int stmmac_dvr_probe(struct device *devi
+@@ -4150,8 +4152,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);
-@@ -4156,7 +4165,7 @@ int stmmac_dvr_probe(struct device *devi
+@@ -4168,7 +4177,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");
        }
-@@ -4318,7 +4327,7 @@ int stmmac_suspend(struct device *dev)
+@@ -4330,7 +4339,7 @@ int stmmac_suspend(struct device *dev)
        }
        spin_unlock_irqrestore(&priv->lock, flags);
  
        int phy_addr;
  };
  
--struct stmmac_pci_info {
++struct stmmac_pci_dmi_data {
++      const struct stmmac_pci_func_data *func;
++      size_t nfuncs;
++};
++
+ struct stmmac_pci_info {
 -      struct pci_dev *pdev;
 -      int (*setup)(struct plat_stmmacenet_data *plat,
 -                   struct stmmac_pci_info *info);
 -      struct stmmac_pci_dmi_data *dmi;
-+struct stmmac_pci_dmi_data {
-+      const struct stmmac_pci_func_data *func;
-+      size_t nfuncs;
++      int (*setup)(struct pci_dev *pdev, struct plat_stmmacenet_data *plat);
  };
  
 -static int stmmac_pci_find_phy_addr(struct stmmac_pci_info *info)
--{
++static int stmmac_pci_find_phy_addr(struct pci_dev *pdev,
++                                  const struct dmi_system_id *dmi_list)
+ {
 -      const char *name = dmi_get_system_info(DMI_BOARD_NAME);
 -      const char *asset_tag = dmi_get_system_info(DMI_BOARD_ASSET_TAG);
 -      unsigned int func = PCI_FUNC(info->pdev->devfn);
 -       */
 -      if (!name)
 -              return 1;
-+struct stmmac_pci_info {
-+      int (*setup)(struct pci_dev *pdev, struct plat_stmmacenet_data *plat);
-+};
+-
 -      for (dmi = info->dmi; dmi->name && *dmi->name; dmi++) {
 -              if (!strcmp(dmi->name, name) && dmi->func == func) {
 -                      /* If asset tag is provided, match on it as well. */
 -                      return dmi->phy_addr;
 -              }
 -      }
-+static int stmmac_pci_find_phy_addr(struct pci_dev *pdev,
-+                                  const struct dmi_system_id *dmi_list)
-+{
 +      const struct stmmac_pci_func_data *func_data;
 +      const struct stmmac_pci_dmi_data *dmi_data;
 +      const struct dmi_system_id *dmi_id;
  
        pci_enable_msi(pdev);
  
-@@ -270,14 +304,21 @@ static void stmmac_pci_remove(struct pci
+@@ -306,14 +340,21 @@ static int stmmac_pci_resume(struct devi
  
- static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_suspend, stmmac_resume);
+ static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_pci_suspend, stmmac_pci_resume);
  
 -#define STMMAC_VENDOR_ID 0x700
 +/* synthetic ID, no official vendor */