Refreshed all patches.
Altered patches:
- 707-dpaa-ethernet-support-layerscape.patch
Remove upstreamed:
- 034-v4.20-MIPS-BCM47XX-Enable-USB-power-on-Netgear-WNDR3400v3.patch
- 001-4.21-01-BCM63XX-fix-switch-core-reset-on-BCM6368.patch
- 073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch
Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
endif
-LINUX_VERSION-4.14 = .154
+LINUX_VERSION-4.14 = .155
-LINUX_KERNEL_HASH-4.14.154 = 86de4a24379a78d67fc08b2e249ccf7b689eb6c37fbe329fc3dfbe8ab4300603
+LINUX_KERNEL_HASH-4.14.155 = 77d61979556b81c95b81452fa10e1fe9368cbe2f9f80a13e4669b0464722e481
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -2956,8 +2956,12 @@ static void lan78xx_rx_csum_offload(stru
+@@ -2961,8 +2961,12 @@ static void lan78xx_rx_csum_offload(stru
struct sk_buff *skb,
u32 rx_cmd_a, u32 rx_cmd_b)
{
pdata->rfe_ctl |= RFE_CTL_VLAN_FILTER_;
else
pdata->rfe_ctl &= ~RFE_CTL_VLAN_FILTER_;
-@@ -2892,6 +2892,9 @@ static int lan78xx_bind(struct lan78xx_n
+@@ -2897,6 +2897,9 @@ static int lan78xx_bind(struct lan78xx_n
if (DEFAULT_TSO_CSUM_ENABLE)
dev->net->features |= NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG;
if (features & NETIF_F_HW_VLAN_CTAG_FILTER)
pdata->rfe_ctl |= RFE_CTL_VLAN_FILTER_;
else
-@@ -2892,6 +2898,9 @@ static int lan78xx_bind(struct lan78xx_n
+@@ -2897,6 +2903,9 @@ static int lan78xx_bind(struct lan78xx_n
if (DEFAULT_TSO_CSUM_ENABLE)
dev->net->features |= NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG;
if (DEFAULT_VLAN_FILTER_ENABLE)
dev->net->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
-@@ -2972,6 +2981,16 @@ static void lan78xx_rx_csum_offload(stru
+@@ -2977,6 +2986,16 @@ static void lan78xx_rx_csum_offload(stru
}
}
static void lan78xx_skb_return(struct lan78xx_net *dev, struct sk_buff *skb)
{
int status;
-@@ -3036,6 +3055,8 @@ static int lan78xx_rx(struct lan78xx_net
+@@ -3041,6 +3060,8 @@ static int lan78xx_rx(struct lan78xx_net
if (skb->len == size) {
lan78xx_rx_csum_offload(dev, skb,
rx_cmd_a, rx_cmd_b);
skb_trim(skb, skb->len - 4); /* remove fcs */
skb->truesize = size + sizeof(struct sk_buff);
-@@ -3054,6 +3075,7 @@ static int lan78xx_rx(struct lan78xx_net
+@@ -3059,6 +3080,7 @@ static int lan78xx_rx(struct lan78xx_net
skb_set_tail_pointer(skb2, size);
lan78xx_rx_csum_offload(dev, skb2, rx_cmd_a, rx_cmd_b);
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
-@@ -2968,12 +2968,13 @@ static void lan78xx_rx_csum_offload(stru
+@@ -2973,12 +2973,13 @@ static void lan78xx_rx_csum_offload(stru
struct sk_buff *skb,
u32 rx_cmd_a, u32 rx_cmd_b)
{
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
-@@ -2895,8 +2904,14 @@ static int lan78xx_bind(struct lan78xx_n
+@@ -2900,8 +2909,14 @@ static int lan78xx_bind(struct lan78xx_n
if (DEFAULT_RX_CSUM_ENABLE)
dev->net->features |= NETIF_F_RXCSUM;
static int lan78xx_read_reg(struct lan78xx_net *dev, u32 index, u32 *data)
{
u32 *buf = kmalloc(sizeof(u32), GFP_KERNEL);
-@@ -3711,7 +3716,12 @@ static int lan78xx_probe(struct usb_inte
+@@ -3716,7 +3721,12 @@ static int lan78xx_probe(struct usb_inte
dev->pipe_intr = usb_rcvintpipe(dev->udev,
dev->ep_intr->desc.bEndpointAddress &
USB_ENDPOINT_NUMBER_MASK);
+++ /dev/null
-From feef7918667b84f9d5653c501542dd8d84ae32af Mon Sep 17 00:00:00 2001
-From: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
-Date: Sun, 19 Aug 2018 22:20:23 +0300
-Subject: [PATCH] MIPS: BCM47XX: Enable USB power on Netgear WNDR3400v3
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Setting GPIO 21 high seems to be required to enable power to USB ports
-on the WNDR3400v3. As there is already similar code for WNR3500L,
-make the existing USB power GPIO code generic and use that.
-
-Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Signed-off-by: Paul Burton <paul.burton@mips.com>
-Patchwork: https://patchwork.linux-mips.org/patch/20259/
-Cc: Rafał Miłecki <zajec5@gmail.com>
-Cc: linux-mips@linux-mips.org
-Cc: linux-kernel@vger.kernel.org
----
- arch/mips/bcm47xx/workarounds.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
---- a/arch/mips/bcm47xx/workarounds.c
-+++ b/arch/mips/bcm47xx/workarounds.c
-@@ -5,9 +5,8 @@
- #include <bcm47xx_board.h>
- #include <bcm47xx.h>
-
--static void __init bcm47xx_workarounds_netgear_wnr3500l(void)
-+static void __init bcm47xx_workarounds_enable_usb_power(int usb_power)
- {
-- const int usb_power = 12;
- int err;
-
- err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
-@@ -23,7 +22,10 @@ void __init bcm47xx_workarounds(void)
-
- switch (board) {
- case BCM47XX_BOARD_NETGEAR_WNR3500L:
-- bcm47xx_workarounds_netgear_wnr3500l();
-+ bcm47xx_workarounds_enable_usb_power(12);
-+ break;
-+ case BCM47XX_BOARD_NETGEAR_WNDR3400_V3:
-+ bcm47xx_workarounds_enable_usb_power(21);
- break;
- default:
- /* No workaround(s) needed */
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1722,10 +1722,8 @@ static int bcm_enet_probe(struct platfor
+@@ -1723,10 +1723,8 @@ static int bcm_enet_probe(struct platfor
const char *clk_name;
int i, ret;
res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
res_irq_rx = platform_get_resource(pdev, IORESOURCE_IRQ, 1);
-@@ -2700,11 +2698,8 @@ static int bcm_enetsw_probe(struct platf
+@@ -2701,11 +2699,8 @@ static int bcm_enetsw_probe(struct platf
struct resource *res_mem;
int ret, irq_rx, irq_tx;
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1767,14 +1767,14 @@ static int bcm_enet_probe(struct platfor
+@@ -1768,14 +1768,14 @@ static int bcm_enet_probe(struct platfor
clk_name = "enet1";
}
/* initialize default and fetch platform data */
priv->rx_ring_size = BCMENET_DEF_RX_DESC;
-@@ -1802,7 +1802,7 @@ static int bcm_enet_probe(struct platfor
+@@ -1803,7 +1803,7 @@ static int bcm_enet_probe(struct platfor
if (priv->mac_id == 0 && priv->has_phy && !priv->use_external_mii) {
/* using internal PHY, enable clock */
if (IS_ERR(priv->phy_clk)) {
ret = PTR_ERR(priv->phy_clk);
priv->phy_clk = NULL;
-@@ -1810,7 +1810,7 @@ static int bcm_enet_probe(struct platfor
+@@ -1811,7 +1811,7 @@ static int bcm_enet_probe(struct platfor
}
ret = clk_prepare_enable(priv->phy_clk);
if (ret)
}
/* do minimal hardware init to be able to probe mii bus */
-@@ -1907,14 +1907,8 @@ out_uninit_hw:
+@@ -1908,14 +1908,8 @@ out_uninit_hw:
if (priv->phy_clk)
clk_disable_unprepare(priv->phy_clk);
out:
free_netdev(dev);
return ret;
-@@ -1950,12 +1944,10 @@ static int bcm_enet_remove(struct platfo
+@@ -1951,12 +1945,10 @@ static int bcm_enet_remove(struct platfo
}
/* disable hw block clocks */
free_netdev(dev);
return 0;
-@@ -2738,26 +2730,20 @@ static int bcm_enetsw_probe(struct platf
+@@ -2739,26 +2731,20 @@ static int bcm_enetsw_probe(struct platf
if (ret)
goto out;
priv->rx_chan = 0;
priv->tx_chan = 1;
-@@ -2789,15 +2775,6 @@ static int bcm_enetsw_probe(struct platf
+@@ -2790,15 +2776,6 @@ static int bcm_enetsw_probe(struct platf
out_disable_clk:
clk_disable_unprepare(priv->mac_clk);
out:
free_netdev(dev);
return ret;
-@@ -2809,20 +2786,13 @@ static int bcm_enetsw_remove(struct plat
+@@ -2810,20 +2787,13 @@ static int bcm_enetsw_remove(struct plat
{
struct bcm_enet_priv *priv;
struct net_device *dev;
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1904,8 +1904,7 @@ out_free_mdio:
+@@ -1905,8 +1905,7 @@ out_free_mdio:
out_uninit_hw:
/* turn off mdc clock */
enet_writel(priv, 0, ENET_MIISC_REG);
out_disable_clk_mac:
clk_disable_unprepare(priv->mac_clk);
-@@ -1944,9 +1943,7 @@ static int bcm_enet_remove(struct platfo
+@@ -1945,9 +1944,7 @@ static int bcm_enet_remove(struct platfo
}
/* disable hw block clocks */
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1719,7 +1719,6 @@ static int bcm_enet_probe(struct platfor
+@@ -1720,7 +1720,6 @@ static int bcm_enet_probe(struct platfor
struct bcm63xx_enet_platform_data *pd;
struct resource *res_mem, *res_irq, *res_irq_rx, *res_irq_tx;
struct mii_bus *bus;
int i, ret;
if (!bcm_enet_shared_base[0])
-@@ -1760,14 +1759,12 @@ static int bcm_enet_probe(struct platfor
+@@ -1761,14 +1760,12 @@ static int bcm_enet_probe(struct platfor
if (priv->mac_id == 0) {
priv->rx_chan = 0;
priv->tx_chan = 1;
/*
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1755,15 +1755,6 @@ static int bcm_enet_probe(struct platfor
+@@ -1756,15 +1756,6 @@ static int bcm_enet_probe(struct platfor
priv->irq_tx = res_irq_tx->start;
priv->mac_id = pdev->id;
priv->mac_clk = devm_clk_get(&pdev->dev, "enet");
if (IS_ERR(priv->mac_clk)) {
ret = PTR_ERR(priv->mac_clk);
-@@ -1795,6 +1786,8 @@ static int bcm_enet_probe(struct platfor
+@@ -1796,6 +1787,8 @@ static int bcm_enet_probe(struct platfor
priv->dma_chan_width = pd->dma_chan_width;
priv->dma_has_sram = pd->dma_has_sram;
priv->dma_desc_shift = pd->dma_desc_shift;
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1790,7 +1790,7 @@ static int bcm_enet_probe(struct platfor
+@@ -1791,7 +1791,7 @@ static int bcm_enet_probe(struct platfor
priv->tx_chan = pd->tx_chan;
}
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1753,7 +1753,6 @@ static int bcm_enet_probe(struct platfor
+@@ -1754,7 +1754,6 @@ static int bcm_enet_probe(struct platfor
dev->irq = priv->irq = res_irq->start;
priv->irq_rx = res_irq_rx->start;
priv->irq_tx = res_irq_tx->start;
priv->mac_clk = devm_clk_get(&pdev->dev, "enet");
if (IS_ERR(priv->mac_clk)) {
-@@ -1821,7 +1820,7 @@ static int bcm_enet_probe(struct platfor
+@@ -1822,7 +1821,7 @@ static int bcm_enet_probe(struct platfor
bus->priv = priv;
bus->read = bcm_enet_mdio_read_phylib;
bus->write = bcm_enet_mdio_write_phylib;
+++ /dev/null
-From f1af8bb8e0879a3c2d9679a7274c2774335e9876 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Wed, 14 Nov 2018 12:06:41 +0100
-Subject: [PATCH] MIPS: BCM63XX: fix switch core reset on BCM6368
-
-The Ethernet Switch core mask was set to 0, causing the switch core to
-be not reset on BCM6368 on boot. Provide the proper mask so the switch
-core gets reset to a known good state.
-
-Fixes: 799faa626c71 ("MIPS: BCM63XX: add core reset helper")
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- arch/mips/bcm63xx/reset.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/mips/bcm63xx/reset.c
-+++ b/arch/mips/bcm63xx/reset.c
-@@ -120,7 +120,7 @@
- #define BCM6368_RESET_DSL 0
- #define BCM6368_RESET_SAR SOFTRESET_6368_SAR_MASK
- #define BCM6368_RESET_EPHY SOFTRESET_6368_EPHY_MASK
--#define BCM6368_RESET_ENETSW 0
-+#define BCM6368_RESET_ENETSW SOFTRESET_6368_ENETSW_MASK
- #define BCM6368_RESET_PCM SOFTRESET_6368_PCM_MASK
- #define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK
- #define BCM6368_RESET_PCIE 0
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1636,7 +1636,7 @@ static int bcm_enet_change_mtu(struct ne
+@@ -1637,7 +1637,7 @@ static int bcm_enet_change_mtu(struct ne
return -EBUSY;
/* add ethernet header + vlan tag size */
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -869,10 +869,8 @@ static int bcm_enet_open(struct net_devi
+@@ -870,10 +870,8 @@ static int bcm_enet_open(struct net_devi
struct bcm_enet_priv *priv;
struct sockaddr addr;
struct device *kdev;
void *p;
u32 val;
-@@ -880,40 +878,10 @@ static int bcm_enet_open(struct net_devi
+@@ -881,40 +879,10 @@ static int bcm_enet_open(struct net_devi
kdev = &priv->pdev->dev;
if (priv->has_phy) {
}
/* mask all interrupts and request them */
-@@ -923,7 +891,7 @@ static int bcm_enet_open(struct net_devi
+@@ -924,7 +892,7 @@ static int bcm_enet_open(struct net_devi
ret = request_irq(dev->irq, bcm_enet_isr_mac, 0, dev->name, dev);
if (ret)
ret = request_irq(priv->irq_rx, bcm_enet_isr_dma, 0,
dev->name, dev);
-@@ -1085,8 +1053,8 @@ static int bcm_enet_open(struct net_devi
+@@ -1086,8 +1054,8 @@ static int bcm_enet_open(struct net_devi
enet_dmac_writel(priv, priv->dma_chan_int_mask,
ENETDMAC_IRMASK, priv->tx_chan);
else
bcm_enet_adjust_link(dev);
-@@ -1127,10 +1095,6 @@ out_freeirq_rx:
+@@ -1128,10 +1096,6 @@ out_freeirq_rx:
out_freeirq:
free_irq(dev->irq, dev);
return ret;
}
-@@ -1235,10 +1199,6 @@ static int bcm_enet_stop(struct net_devi
+@@ -1236,10 +1200,6 @@ static int bcm_enet_stop(struct net_devi
free_irq(priv->irq_rx, dev);
free_irq(dev->irq, dev);
return 0;
}
-@@ -1804,14 +1764,49 @@ static int bcm_enet_probe(struct platfor
+@@ -1805,14 +1765,49 @@ static int bcm_enet_probe(struct platfor
/* do minimal hardware init to be able to probe mii bus */
bcm_enet_hw_preinit(priv);
}
bus = priv->mii_bus;
-@@ -1835,6 +1830,35 @@ static int bcm_enet_probe(struct platfor
+@@ -1836,6 +1831,35 @@ static int bcm_enet_probe(struct platfor
dev_err(&pdev->dev, "unable to register mdio bus\n");
goto out_free_mdio;
}
} else {
/* run platform code to initialize PHY device */
-@@ -1842,47 +1866,16 @@ static int bcm_enet_probe(struct platfor
+@@ -1843,47 +1867,16 @@ static int bcm_enet_probe(struct platfor
pd->mii_config(dev, 1, bcm_enet_mdio_read_mii,
bcm_enet_mdio_write_mii)) {
dev_err(&pdev->dev, "unable to configure mdio bus\n");
if (priv->mii_bus)
mdiobus_unregister(priv->mii_bus);
-@@ -1890,6 +1883,9 @@ out_free_mdio:
+@@ -1891,6 +1884,9 @@ out_free_mdio:
if (priv->mii_bus)
mdiobus_free(priv->mii_bus);
out_uninit_hw:
/* turn off mdc clock */
enet_writel(priv, 0, ENET_MIISC_REG);
-@@ -1920,6 +1916,7 @@ static int bcm_enet_remove(struct platfo
+@@ -1921,6 +1917,7 @@ static int bcm_enet_remove(struct platfo
enet_writel(priv, 0, ENET_MIISC_REG);
if (priv->has_phy) {
#define ENETSW_MDIOC_EXT_MASK (1 << 16)
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -2191,6 +2191,18 @@ static int bcm_enetsw_open(struct net_de
+@@ -2192,6 +2192,18 @@ static int bcm_enetsw_open(struct net_de
priv->sw_port_link[i] = 0;
}
#include <bcm63xx_dev_enet.h>
#include "bcm63xx_enet.h"
-@@ -1936,7 +1937,8 @@ static int bcm_enet_remove(struct platfo
+@@ -1937,7 +1938,8 @@ static int bcm_enet_remove(struct platfo
return 0;
}
.probe = bcm_enet_probe,
.remove = bcm_enet_remove,
.driver = {
-@@ -1945,6 +1947,42 @@ struct platform_driver bcm63xx_enet_driv
+@@ -1946,6 +1948,42 @@ struct platform_driver bcm63xx_enet_driv
},
};
/*
* switch mii access callbacks
*/
-@@ -2203,29 +2241,6 @@ static int bcm_enetsw_open(struct net_de
+@@ -2204,29 +2242,6 @@ static int bcm_enetsw_open(struct net_de
enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i));
}
/* initialize flow control buffer allocation */
enet_dma_writel(priv, ENETDMA_BUFALLOC_FORCE_MASK | 0,
ENETDMA_BUFALLOC_REG(priv->rx_chan));
-@@ -2684,6 +2699,9 @@ static int bcm_enetsw_probe(struct platf
+@@ -2685,6 +2700,9 @@ static int bcm_enetsw_probe(struct platf
struct bcm63xx_enetsw_platform_data *pd;
struct resource *res_mem;
int ret, irq_rx, irq_tx;
if (!bcm_enet_shared_base[0])
return -EPROBE_DEFER;
-@@ -2766,6 +2784,43 @@ static int bcm_enetsw_probe(struct platf
+@@ -2767,6 +2785,43 @@ static int bcm_enetsw_probe(struct platf
priv->pdev = pdev;
priv->net_dev = dev;
return 0;
out_disable_clk:
-@@ -2787,6 +2842,9 @@ static int bcm_enetsw_remove(struct plat
+@@ -2788,6 +2843,9 @@ static int bcm_enetsw_remove(struct plat
priv = netdev_priv(dev);
unregister_netdev(dev);
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -2743,9 +2743,9 @@ static int bcm_enetsw_probe(struct platf
+@@ -2744,9 +2744,9 @@ static int bcm_enetsw_probe(struct platf
if (ret)
goto out;
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -2238,6 +2238,10 @@ static int bcm_enetsw_open(struct net_de
+@@ -2239,6 +2239,10 @@ static int bcm_enetsw_open(struct net_de
rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i));
rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN;
+++ /dev/null
-From d60e006ec0e425877aacc61c7ece3da0434a8fce Mon Sep 17 00:00:00 2001
-From: Christian Lamparter <chunkeey@gmail.com>
-Date: Mon, 23 Jul 2018 16:34:54 +0200
-Subject: [PATCH 7/8] qcom: ipq4019: fix cpu0's qcom,saw2 reg value
-
-while compiling an ipq4019 target, dtc will complain:
-regulator@b089000 unit address format error, expected "2089000"
-
-The saw0 regulator reg value seems to be
-copied and pasted from qcom-ipq8064.dtsi.
-
-This patch fixes the reg value to match that of the
-unit address which in turn silences the warning.
-(There is no driver for qcom,saw2 right now.
-So this went unnoticed)
-
-Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
-Signed-off-by: John Crispin <john@phrozen.org>
----
- arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
-@@ -262,7 +262,7 @@
-
- saw0: regulator@b089000 {
- compatible = "qcom,saw2";
-- reg = <0x02089000 0x1000>, <0x0b009000 0x1000>;
-+ reg = <0x0b089000 0x1000>, <0x0b009000 0x1000>;
- regulator;
- };
-
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
-@@ -1280,11 +1280,13 @@ struct opp_table *dev_pm_opp_set_regulat
+@@ -1292,11 +1292,13 @@ struct opp_table *dev_pm_opp_set_regulat
if (!opp_table)
return ERR_PTR(-ENOMEM);
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
-@@ -1608,6 +1608,83 @@ put_table:
+@@ -1620,6 +1620,83 @@ put_table:
}
/**
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
-@@ -126,6 +126,27 @@ unsigned long dev_pm_opp_get_freq(struct
+@@ -131,6 +131,27 @@ unsigned long dev_pm_opp_get_freq(struct
}
EXPORT_SYMBOL_GPL(dev_pm_opp_get_freq);
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
-@@ -1652,6 +1652,7 @@ int dev_pm_opp_adjust_voltage(struct dev
+@@ -1664,6 +1664,7 @@ int dev_pm_opp_adjust_voltage(struct dev
struct opp_table *opp_table;
struct dev_pm_opp *new_opp, *tmp_opp, *opp = ERR_PTR(-ENODEV);
int r = 0;
/* keep the node allocated */
new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL);
-@@ -1688,6 +1689,10 @@ int dev_pm_opp_adjust_voltage(struct dev
+@@ -1700,6 +1701,10 @@ int dev_pm_opp_adjust_voltage(struct dev
/* plug in new node */
new_opp->supplies[0].u_volt = u_volt;
*
* We must do this before dma_map_single(DMA_TO_DEVICE), because we may
* need to write into the skb.
-@@ -2036,12 +2091,129 @@ static inline int dpaa_xmit(struct dpaa_
+@@ -2036,6 +2091,123 @@ static inline int dpaa_xmit(struct dpaa_
return 0;
}
-+#ifndef CONFIG_PPC
-+/* On LS1043A SoC there is a known erratum ERR010022 that results in split DMA
-+ * transfers in the FMan under certain conditions. This, combined with a fixed
-+ * size FIFO of ongoing DMA transfers that may overflow when a split occurs,
-+ * results in the FMan stalling DMA transfers under high traffic. To avoid the
-+ * problem, one needs to prevent the DMA transfer splits to occur by preparing
-+ * the buffers
-+ */
-+
-+#define DPAA_A010022_HEADROOM 256
-+#define CROSS_4K_BOUND(start, size) \
+++#ifndef CONFIG_PPC
+++/* On LS1043A SoC there is a known erratum ERR010022 that results in split DMA
+++ * transfers in the FMan under certain conditions. This, combined with a fixed
+++ * size FIFO of ongoing DMA transfers that may overflow when a split occurs,
+++ * results in the FMan stalling DMA transfers under high traffic. To avoid the
+++ * problem, one needs to prevent the DMA transfer splits to occur by preparing
+++ * the buffers
+++ */
+++
+++#define DPAA_A010022_HEADROOM 256
+++#define CROSS_4K_BOUND(start, size) \
+ (((start) + (size)) > (((start) + 0x1000) & ~0xFFF))
+
+static bool dpaa_errata_a010022_has_dma_issue(struct sk_buff *skb,
+ struct dpaa_priv *priv)
+{
+ int nr_frags, i = 0;
-+ skb_frag_t *frag;
++ skb_frag_t *frag;
+
+ /* Transfers that do not start at 16B aligned addresses will be split;
+ * Transfers that cross a 4K page boundary will also be split
+ dev_kfree_skb(skb);
+ return nskb;
+
-+err:
+++err:
+ if (nskb)
+ dev_kfree_skb(nskb);
+ put_page(npage);
+}
+#endif
+
- static int dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
++
+ static netdev_tx_t
+ dpaa_start_xmit(struct sk_buff *skb, struct net_device *net_dev)
{
- const int queue_mapping = skb_get_queue_mapping(skb);
+@@ -2043,6 +2215,7 @@ dpaa_start_xmit(struct sk_buff *skb, str
bool nonlinear = skb_is_nonlinear(skb);
struct rtnl_link_stats64 *percpu_stats;
struct dpaa_percpu_priv *percpu_priv;
struct dpaa_priv *priv;
struct qm_fd fd;
int offset = 0;
-@@ -2069,24 +2241,47 @@ static int dpaa_start_xmit(struct sk_buf
+@@ -2070,24 +2243,47 @@ dpaa_start_xmit(struct sk_buff *skb, str
/* MAX_SKB_FRAGS is equal or larger than our dpaa_SGT_MAX_ENTRIES;
* make sure we don't feed FMan with more fragments than it supports.
*/
if (likely(dpaa_xmit(priv, percpu_stats, queue_mapping, &fd) == 0))
return NETDEV_TX_OK;
-@@ -2218,14 +2413,8 @@ static enum qman_cb_dqrr_result rx_error
+@@ -2219,14 +2415,8 @@ static enum qman_cb_dqrr_result rx_error
if (dpaa_eth_napi_schedule(percpu_priv, portal))
return qman_cb_dqrr_stop;
return qman_cb_dqrr_consume;
}
-@@ -2234,6 +2423,7 @@ static enum qman_cb_dqrr_result rx_defau
+@@ -2235,6 +2425,7 @@ static enum qman_cb_dqrr_result rx_defau
struct qman_fq *fq,
const struct qm_dqrr_entry *dq)
{
struct rtnl_link_stats64 *percpu_stats;
struct dpaa_percpu_priv *percpu_priv;
const struct qm_fd *fd = &dq->fd;
-@@ -2247,6 +2437,7 @@ static enum qman_cb_dqrr_result rx_defau
+@@ -2248,6 +2439,7 @@ static enum qman_cb_dqrr_result rx_defau
struct sk_buff *skb;
int *count_ptr;
void *vaddr;
fd_status = be32_to_cpu(fd->status);
fd_format = qm_fd_get_format(fd);
-@@ -2289,12 +2480,12 @@ static enum qman_cb_dqrr_result rx_defau
+@@ -2290,12 +2482,12 @@ static enum qman_cb_dqrr_result rx_defau
if (!dpaa_bp)
return qman_cb_dqrr_consume;
/* The only FD types that we may receive are contig and S/G */
WARN_ON((fd_format != qm_fd_contig) && (fd_format != qm_fd_sg));
-@@ -2305,12 +2496,22 @@ static enum qman_cb_dqrr_result rx_defau
+@@ -2306,12 +2498,22 @@ static enum qman_cb_dqrr_result rx_defau
(*count_ptr)--;
if (likely(fd_format == qm_fd_contig))
skb->protocol = eth_type_trans(skb, net_dev);
if (net_dev->features & NETIF_F_RXHASH && priv->keygen_in_use &&
-@@ -2439,6 +2640,44 @@ static void dpaa_eth_napi_disable(struct
+@@ -2440,6 +2642,44 @@ static void dpaa_eth_napi_disable(struct
}
}
static int dpaa_open(struct net_device *net_dev)
{
struct mac_device *mac_dev;
-@@ -2449,12 +2688,9 @@ static int dpaa_open(struct net_device *
+@@ -2450,12 +2690,9 @@ static int dpaa_open(struct net_device *
mac_dev = priv->mac_dev;
dpaa_eth_napi_enable(priv);
for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) {
err = fman_port_enable(mac_dev->port[i]);
-@@ -2495,11 +2731,58 @@ static int dpaa_eth_stop(struct net_devi
+@@ -2496,11 +2733,58 @@ static int dpaa_eth_stop(struct net_devi
return err;
}
}
static const struct net_device_ops dpaa_ops = {
-@@ -2653,7 +2936,6 @@ static inline u16 dpaa_get_headroom(stru
+@@ -2654,7 +2938,6 @@ static inline u16 dpaa_get_headroom(stru
static int dpaa_eth_probe(struct platform_device *pdev)
{
struct dpaa_bp *dpaa_bps[DPAA_BPS_NUM] = {NULL};
struct net_device *net_dev = NULL;
struct dpaa_fq *dpaa_fq, *tmp;
struct dpaa_priv *priv = NULL;
-@@ -2662,7 +2944,51 @@ static int dpaa_eth_probe(struct platfor
+@@ -2663,7 +2946,51 @@ static int dpaa_eth_probe(struct platfor
int err = 0, i, channel;
struct device *dev;
/* Allocate this early, so we can store relevant information in
* the private area
-@@ -2670,7 +2996,7 @@ static int dpaa_eth_probe(struct platfor
+@@ -2671,7 +2998,7 @@ static int dpaa_eth_probe(struct platfor
net_dev = alloc_etherdev_mq(sizeof(*priv), DPAA_ETH_TXQ_NUM);
if (!net_dev) {
dev_err(dev, "alloc_etherdev_mq() failed\n");
}
/* Do this here, so we can be verbose early */
-@@ -2682,13 +3008,6 @@ static int dpaa_eth_probe(struct platfor
+@@ -2683,13 +3010,6 @@ static int dpaa_eth_probe(struct platfor
priv->msg_enable = netif_msg_init(debug, DPAA_MSG_DEFAULT);
/* If fsl_fm_max_frm is set to a higher value than the all-common 1500,
* we choose conservatively and let the user explicitly set a higher
* MTU via ifconfig. Otherwise, the user may end up with different MTUs
-@@ -2704,21 +3023,13 @@ static int dpaa_eth_probe(struct platfor
+@@ -2705,21 +3025,13 @@ static int dpaa_eth_probe(struct platfor
priv->buf_layout[RX].priv_data_size = DPAA_RX_PRIV_DATA_SIZE; /* Rx */
priv->buf_layout[TX].priv_data_size = DPAA_TX_PRIV_DATA_SIZE; /* Tx */
/* the raw size of the buffers used for reception */
dpaa_bps[i]->raw_size = bpool_buffer_raw_size(i, DPAA_BPS_NUM);
/* avoid runtime computations by keeping the usable size here */
-@@ -2726,11 +3037,8 @@ static int dpaa_eth_probe(struct platfor
+@@ -2727,11 +3039,8 @@ static int dpaa_eth_probe(struct platfor
dpaa_bps[i]->dev = dev;
err = dpaa_bp_alloc_pool(dpaa_bps[i]);
priv->dpaa_bps[i] = dpaa_bps[i];
}
-@@ -2741,7 +3049,7 @@ static int dpaa_eth_probe(struct platfor
+@@ -2742,7 +3051,7 @@ static int dpaa_eth_probe(struct platfor
err = dpaa_alloc_all_fqs(dev, &priv->dpaa_fq_list, &port_fqs);
if (err < 0) {
dev_err(dev, "dpaa_alloc_all_fqs() failed\n");
}
priv->mac_dev = mac_dev;
-@@ -2750,12 +3058,12 @@ static int dpaa_eth_probe(struct platfor
+@@ -2751,12 +3060,12 @@ static int dpaa_eth_probe(struct platfor
if (channel < 0) {
dev_err(dev, "dpaa_get_channel() failed\n");
err = channel;
* and add this pool channel to each's dequeue mask.
*/
dpaa_eth_add_channel(priv->channel);
-@@ -2770,20 +3078,20 @@ static int dpaa_eth_probe(struct platfor
+@@ -2771,20 +3080,20 @@ static int dpaa_eth_probe(struct platfor
err = dpaa_eth_cgr_init(priv);
if (err < 0) {
dev_err(dev, "Error initializing CGR\n");
}
priv->tx_headroom = dpaa_get_headroom(&priv->buf_layout[TX]);
-@@ -2793,7 +3101,7 @@ static int dpaa_eth_probe(struct platfor
+@@ -2794,7 +3103,7 @@ static int dpaa_eth_probe(struct platfor
err = dpaa_eth_init_ports(mac_dev, dpaa_bps, DPAA_BPS_NUM, &port_fqs,
&priv->buf_layout[0], dev);
if (err)
/* Rx traffic distribution based on keygen hashing defaults to on */
priv->keygen_in_use = true;
-@@ -2802,11 +3110,7 @@ static int dpaa_eth_probe(struct platfor
+@@ -2803,11 +3112,7 @@ static int dpaa_eth_probe(struct platfor
if (!priv->percpu_priv) {
dev_err(dev, "devm_alloc_percpu() failed\n");
err = -ENOMEM;
}
priv->num_tc = 1;
-@@ -2815,11 +3119,11 @@ static int dpaa_eth_probe(struct platfor
+@@ -2816,11 +3121,11 @@ static int dpaa_eth_probe(struct platfor
/* Initialize NAPI */
err = dpaa_napi_add(net_dev);
if (err < 0)
dpaa_eth_sysfs_init(&net_dev->dev);
-@@ -2828,32 +3132,21 @@ static int dpaa_eth_probe(struct platfor
+@@ -2829,32 +3134,21 @@ static int dpaa_eth_probe(struct platfor
return 0;
return err;
}
-@@ -2890,6 +3183,23 @@ static int dpaa_remove(struct platform_d
+@@ -2891,6 +3185,23 @@ static int dpaa_remove(struct platform_d
return err;
}
static const struct platform_device_id dpaa_devtype[] = {
{
.name = "dpaa-ethernet",
-@@ -2914,6 +3224,10 @@ static int __init dpaa_load(void)
+@@ -2915,6 +3226,10 @@ static int __init dpaa_load(void)
pr_debug("FSL DPAA Ethernet driver\n");
--- a/drivers/usb/host/xhci-mtk-sch.c
+++ b/drivers/usb/host/xhci-mtk-sch.c
-@@ -287,12 +287,13 @@ static bool need_bw_sch(struct usb_host_
+@@ -289,12 +289,13 @@ static bool need_bw_sch(struct usb_host_
int xhci_mtk_sch_init(struct xhci_hcd_mtk *mtk)
{