aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-4.4
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/patches-4.4')
-rw-r--r--target/linux/generic/patches-4.4/070-0001-bgmac-fix-a-missing-check-for-build_skb.patch2
-rw-r--r--target/linux/generic/patches-4.4/070-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch2
-rw-r--r--target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch12
-rw-r--r--target/linux/generic/patches-4.4/071-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch2
-rw-r--r--target/linux/generic/patches-4.4/071-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch2
-rw-r--r--target/linux/generic/patches-4.4/072-0001-bgmac-Bind-net_device-with-backing-device-structure.patch2
-rw-r--r--target/linux/generic/patches-4.4/072-0002-bgmac-Add-support-for-ethtool-statistics.patch4
-rw-r--r--target/linux/generic/patches-4.4/072-0003-bgmac-Maintain-some-netdev-statistics.patch8
-rw-r--r--target/linux/generic/patches-4.4/073-0001-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch16
-rw-r--r--target/linux/generic/patches-4.4/074-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch2
-rw-r--r--target/linux/generic/patches-4.4/074-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch2
-rw-r--r--target/linux/generic/patches-4.4/075-0001-net-ethernet-bgmac-change-bgmac_-prints-to-dev_-prin.patch48
-rw-r--r--target/linux/generic/patches-4.4/075-0002-net-ethernet-bgmac-add-dma_dev-pointer.patch14
-rw-r--r--target/linux/generic/patches-4.4/075-0003-net-ethernet-bgmac-move-BCMA-MDIO-Phy-code-into-a-se.patch18
-rw-r--r--target/linux/generic/patches-4.4/075-0004-net-ethernet-bgmac-convert-to-feature-flags.patch34
-rw-r--r--target/linux/generic/patches-4.4/075-0005-net-ethernet-bgmac-Add-platform-device-support.patch30
-rw-r--r--target/linux/generic/patches-4.4/077-0001-net-bgmac-support-Ethernet-core-on-BCM53573-SoCs.patch4
-rw-r--r--target/linux/generic/patches-4.4/077-0002-net-bgmac-make-it-clear-when-setting-interface-type-.patch2
-rw-r--r--target/linux/generic/patches-4.4/077-0003-net-bgmac-Fix-errant-feature-flag-check.patch2
-rw-r--r--target/linux/generic/patches-4.4/077-0004-net-bgmac-fix-spelling-mistake-connecton-connection.patch2
-rw-r--r--target/linux/generic/patches-4.4/077-0005-bgmac-stop-clearing-DMA-receive-control-register-rig.patch54
-rw-r--r--target/linux/generic/patches-4.4/201-extra_optimization.patch2
-rw-r--r--target/linux/generic/patches-4.4/202-reduce_module_size.patch4
-rw-r--r--target/linux/generic/patches-4.4/902-debloat_proc.patch6
24 files changed, 110 insertions, 164 deletions
diff --git a/target/linux/generic/patches-4.4/070-0001-bgmac-fix-a-missing-check-for-build_skb.patch b/target/linux/generic/patches-4.4/070-0001-bgmac-fix-a-missing-check-for-build_skb.patch
index 7e6dc2035d..99f9de65a7 100644
--- a/target/linux/generic/patches-4.4/070-0001-bgmac-fix-a-missing-check-for-build_skb.patch
+++ b/target/linux/generic/patches-4.4/070-0001-bgmac-fix-a-missing-check-for-build_skb.patch
@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -466,6 +466,11 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -469,6 +469,11 @@ static int bgmac_dma_rx_read(struct bgma
len -= ETH_FCS_LEN;
skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
diff --git a/target/linux/generic/patches-4.4/070-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch b/target/linux/generic/patches-4.4/070-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch
index 0b0a28d81a..eebcded6fa 100644
--- a/target/linux/generic/patches-4.4/070-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch
+++ b/target/linux/generic/patches-4.4/070-0002-bgmac-Fix-reversed-test-of-build_skb-return-value.patch
@@ -11,7 +11,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -466,7 +466,7 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -469,7 +469,7 @@ static int bgmac_dma_rx_read(struct bgma
len -= ETH_FCS_LEN;
skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
diff --git a/target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch b/target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch
index 4008c29963..0c007569fb 100644
--- a/target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch
+++ b/target/linux/generic/patches-4.4/071-0001-bgmac-add-helper-checking-for-BCM4707-BCM53018-chip-.patch
@@ -36,7 +36,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static bool bgmac_wait_value(struct bcma_device *core, u16 reg, u32 mask,
u32 value, int timeout)
{
-@@ -987,11 +998,9 @@ static void bgmac_mac_speed(struct bgmac
+@@ -990,11 +1001,9 @@ static void bgmac_mac_speed(struct bgmac
static void bgmac_miiconfig(struct bgmac *bgmac)
{
struct bcma_device *core = bgmac->core;
@@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bcma_awrite32(core, BCMA_IOCTL,
bcma_aread32(core, BCMA_IOCTL) | 0x40 |
BGMAC_BCMA_IOCTL_SW_CLKEN);
-@@ -1055,9 +1064,7 @@ static void bgmac_chip_reset(struct bgma
+@@ -1058,9 +1067,7 @@ static void bgmac_chip_reset(struct bgma
}
/* Request Misc PLL for corerev > 2 */
@@ -60,7 +60,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac_set(bgmac, BCMA_CLKCTLST,
BGMAC_BCMA_CLKCTLST_MISC_PLL_REQ);
bgmac_wait_value(bgmac->core, BCMA_CLKCTLST,
-@@ -1193,8 +1200,7 @@ static void bgmac_enable(struct bgmac *b
+@@ -1196,8 +1203,7 @@ static void bgmac_enable(struct bgmac *b
break;
}
@@ -70,7 +70,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rxq_ctl = bgmac_read(bgmac, BGMAC_RXQ_CTL);
rxq_ctl &= ~BGMAC_RXQ_CTL_MDP_MASK;
bp_clk = bcma_pmu_get_bus_clock(&bgmac->core->bus->drv_cc) /
-@@ -1472,14 +1478,12 @@ static int bgmac_fixed_phy_register(stru
+@@ -1475,14 +1481,12 @@ static int bgmac_fixed_phy_register(stru
static int bgmac_mii_register(struct bgmac *bgmac)
{
@@ -86,7 +86,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return bgmac_fixed_phy_register(bgmac);
mii_bus = mdiobus_alloc();
-@@ -1550,7 +1554,6 @@ static void bgmac_mii_unregister(struct
+@@ -1553,7 +1557,6 @@ static void bgmac_mii_unregister(struct
/* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipattach */
static int bgmac_probe(struct bcma_device *core)
{
@@ -94,7 +94,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct net_device *net_dev;
struct bgmac *bgmac;
struct ssb_sprom *sprom = &core->bus->sprom;
-@@ -1631,8 +1634,7 @@ static int bgmac_probe(struct bcma_devic
+@@ -1634,8 +1637,7 @@ static int bgmac_probe(struct bcma_devic
bgmac_chip_reset(bgmac);
/* For Northstar, we have to take all GMAC core out of reset */
diff --git a/target/linux/generic/patches-4.4/071-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch b/target/linux/generic/patches-4.4/071-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch
index 514fe26f1b..d00c2bd551 100644
--- a/target/linux/generic/patches-4.4/071-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch
+++ b/target/linux/generic/patches-4.4/071-0002-bgmac-support-Ethernet-device-on-BCM47094-SoC.patch
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
case BCMA_CHIP_ID_BCM53018:
return true;
default:
-@@ -1052,8 +1053,9 @@ static void bgmac_chip_reset(struct bgma
+@@ -1055,8 +1056,9 @@ static void bgmac_chip_reset(struct bgma
(ci->id == BCMA_CHIP_ID_BCM53572 && ci->pkg == BCMA_PKG_ID_BCM47188))
iost &= ~BGMAC_BCMA_IOST_ATTACHED;
diff --git a/target/linux/generic/patches-4.4/071-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch b/target/linux/generic/patches-4.4/071-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch
index 4375868b16..021a5913aa 100644
--- a/target/linux/generic/patches-4.4/071-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch
+++ b/target/linux/generic/patches-4.4/071-0003-bgmac-reset-enable-Ethernet-core-before-using-it.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1583,6 +1583,11 @@ static int bgmac_probe(struct bcma_devic
+@@ -1586,6 +1586,11 @@ static int bgmac_probe(struct bcma_devic
dev_warn(&core->dev, "Using random MAC: %pM\n", mac);
}
diff --git a/target/linux/generic/patches-4.4/072-0001-bgmac-Bind-net_device-with-backing-device-structure.patch b/target/linux/generic/patches-4.4/072-0001-bgmac-Bind-net_device-with-backing-device-structure.patch
index 764b16801d..4d00094aa8 100644
--- a/target/linux/generic/patches-4.4/072-0001-bgmac-Bind-net_device-with-backing-device-structure.patch
+++ b/target/linux/generic/patches-4.4/072-0001-bgmac-Bind-net_device-with-backing-device-structure.patch
@@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1599,6 +1599,7 @@ static int bgmac_probe(struct bcma_devic
+@@ -1602,6 +1602,7 @@ static int bgmac_probe(struct bcma_devic
bgmac->net_dev = net_dev;
bgmac->core = core;
bcma_set_drvdata(core, bgmac);
diff --git a/target/linux/generic/patches-4.4/072-0002-bgmac-Add-support-for-ethtool-statistics.patch b/target/linux/generic/patches-4.4/072-0002-bgmac-Add-support-for-ethtool-statistics.patch
index 8f6b6c80fc..cff70802d2 100644
--- a/target/linux/generic/patches-4.4/072-0002-bgmac-Add-support-for-ethtool-statistics.patch
+++ b/target/linux/generic/patches-4.4/072-0002-bgmac-Add-support-for-ethtool-statistics.patch
@@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1382,6 +1382,127 @@ static const struct net_device_ops bgmac
+@@ -1385,6 +1385,127 @@ static const struct net_device_ops bgmac
* ethtool_ops
**************************************************/
@@ -143,7 +143,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int bgmac_get_settings(struct net_device *net_dev,
struct ethtool_cmd *cmd)
{
-@@ -1406,6 +1527,9 @@ static void bgmac_get_drvinfo(struct net
+@@ -1409,6 +1530,9 @@ static void bgmac_get_drvinfo(struct net
}
static const struct ethtool_ops bgmac_ethtool_ops = {
diff --git a/target/linux/generic/patches-4.4/072-0003-bgmac-Maintain-some-netdev-statistics.patch b/target/linux/generic/patches-4.4/072-0003-bgmac-Maintain-some-netdev-statistics.patch
index 17a7ce060c..322851d026 100644
--- a/target/linux/generic/patches-4.4/072-0003-bgmac-Maintain-some-netdev-statistics.patch
+++ b/target/linux/generic/patches-4.4/072-0003-bgmac-Maintain-some-netdev-statistics.patch
@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bytes_compl += slot->skb->len;
pkts_compl++;
-@@ -464,6 +468,7 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -467,6 +471,7 @@ static int bgmac_dma_rx_read(struct bgma
bgmac_err(bgmac, "Found poisoned packet at slot %d, DMA issue!\n",
ring->start);
put_page(virt_to_head_page(buf));
@@ -40,7 +40,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break;
}
-@@ -471,6 +476,8 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -474,6 +479,8 @@ static int bgmac_dma_rx_read(struct bgma
bgmac_err(bgmac, "Found oversized packet at slot %d, DMA issue!\n",
ring->start);
put_page(virt_to_head_page(buf));
@@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break;
}
-@@ -481,6 +488,7 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -484,6 +491,7 @@ static int bgmac_dma_rx_read(struct bgma
if (unlikely(!skb)) {
bgmac_err(bgmac, "build_skb failed\n");
put_page(virt_to_head_page(buf));
@@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break;
}
skb_put(skb, BGMAC_RX_FRAME_OFFSET +
-@@ -490,6 +498,8 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -493,6 +501,8 @@ static int bgmac_dma_rx_read(struct bgma
skb_checksum_none_assert(skb);
skb->protocol = eth_type_trans(skb, bgmac->net_dev);
diff --git a/target/linux/generic/patches-4.4/073-0001-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch b/target/linux/generic/patches-4.4/073-0001-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch
index 17fbea034f..8c97b09970 100644
--- a/target/linux/generic/patches-4.4/073-0001-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch
+++ b/target/linux/generic/patches-4.4/073-0001-net-ethernet-bgmac-use-phydev-from-struct-net_device.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1320,7 +1320,7 @@ static int bgmac_open(struct net_device
+@@ -1323,7 +1323,7 @@ static int bgmac_open(struct net_device
}
napi_enable(&bgmac->napi);
@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
netif_carrier_on(net_dev);
return 0;
-@@ -1332,7 +1332,7 @@ static int bgmac_stop(struct net_device
+@@ -1335,7 +1335,7 @@ static int bgmac_stop(struct net_device
netif_carrier_off(net_dev);
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
napi_disable(&bgmac->napi);
bgmac_chip_intrs_off(bgmac);
-@@ -1370,12 +1370,10 @@ static int bgmac_set_mac_address(struct
+@@ -1373,12 +1373,10 @@ static int bgmac_set_mac_address(struct
static int bgmac_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
{
@@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static const struct net_device_ops bgmac_netdev_ops = {
-@@ -1518,7 +1516,7 @@ static int bgmac_get_settings(struct net
+@@ -1521,7 +1519,7 @@ static int bgmac_get_settings(struct net
{
struct bgmac *bgmac = netdev_priv(net_dev);
@@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static int bgmac_set_settings(struct net_device *net_dev,
-@@ -1526,7 +1524,7 @@ static int bgmac_set_settings(struct net
+@@ -1529,7 +1527,7 @@ static int bgmac_set_settings(struct net
{
struct bgmac *bgmac = netdev_priv(net_dev);
@@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static void bgmac_get_drvinfo(struct net_device *net_dev,
-@@ -1563,7 +1561,7 @@ static int bgmac_mii_write(struct mii_bu
+@@ -1566,7 +1564,7 @@ static int bgmac_mii_write(struct mii_bu
static void bgmac_adjust_link(struct net_device *net_dev)
{
struct bgmac *bgmac = netdev_priv(net_dev);
@@ -76,7 +76,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bool update = false;
if (phy_dev->link) {
-@@ -1607,8 +1605,6 @@ static int bgmac_fixed_phy_register(stru
+@@ -1610,8 +1608,6 @@ static int bgmac_fixed_phy_register(stru
return err;
}
@@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return err;
}
-@@ -1661,7 +1657,6 @@ static int bgmac_mii_register(struct bgm
+@@ -1664,7 +1660,6 @@ static int bgmac_mii_register(struct bgm
err = PTR_ERR(phy_dev);
goto err_unregister_bus;
}
diff --git a/target/linux/generic/patches-4.4/074-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch b/target/linux/generic/patches-4.4/074-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch
index 84772aa920..6a866bccdb 100644
--- a/target/linux/generic/patches-4.4/074-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch
+++ b/target/linux/generic/patches-4.4/074-0002-net-bgmac-Start-transmit-queue-in-bgmac_open.patch
@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1324,6 +1324,9 @@ static int bgmac_open(struct net_device
+@@ -1327,6 +1327,9 @@ static int bgmac_open(struct net_device
phy_start(net_dev->phydev);
netif_carrier_on(net_dev);
diff --git a/target/linux/generic/patches-4.4/074-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch b/target/linux/generic/patches-4.4/074-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch
index edb027c504..0edf9ee9fa 100644
--- a/target/linux/generic/patches-4.4/074-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch
+++ b/target/linux/generic/patches-4.4/074-0003-net-bgmac-Remove-superflous-netif_carrier_on.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1323,8 +1323,6 @@ static int bgmac_open(struct net_device
+@@ -1326,8 +1326,6 @@ static int bgmac_open(struct net_device
phy_start(net_dev->phydev);
diff --git a/target/linux/generic/patches-4.4/075-0001-net-ethernet-bgmac-change-bgmac_-prints-to-dev_-prin.patch b/target/linux/generic/patches-4.4/075-0001-net-ethernet-bgmac-change-bgmac_-prints-to-dev_-prin.patch
index 63b4f4a167..3837b60943 100644
--- a/target/linux/generic/patches-4.4/075-0001-net-ethernet-bgmac-change-bgmac_-prints-to-dev_-prin.patch
+++ b/target/linux/generic/patches-4.4/075-0001-net-ethernet-bgmac-change-bgmac_-prints-to-dev_-prin.patch
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static void bgmac_dma_rx_enable(struct bgmac *bgmac,
-@@ -371,7 +371,7 @@ static int bgmac_dma_rx_skb_for_slot(str
+@@ -374,7 +374,7 @@ static int bgmac_dma_rx_skb_for_slot(str
dma_addr = dma_map_single(dma_dev, buf + BGMAC_RX_BUF_OFFSET,
BGMAC_RX_BUF_SIZE, DMA_FROM_DEVICE);
if (dma_mapping_error(dma_dev, dma_addr)) {
@@ -110,7 +110,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
put_page(virt_to_head_page(buf));
return -ENOMEM;
}
-@@ -466,16 +466,16 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -469,16 +469,16 @@ static int bgmac_dma_rx_read(struct bgma
/* Check for poison and drop or pass the packet */
if (len == 0xdead && flags == 0xbeef) {
@@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
put_page(virt_to_head_page(buf));
bgmac->net_dev->stats.rx_length_errors++;
bgmac->net_dev->stats.rx_errors++;
-@@ -487,7 +487,7 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -490,7 +490,7 @@ static int bgmac_dma_rx_read(struct bgma
skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
if (unlikely(!skb)) {
@@ -140,7 +140,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
put_page(virt_to_head_page(buf));
bgmac->net_dev->stats.rx_errors++;
break;
-@@ -641,7 +641,7 @@ static int bgmac_dma_alloc(struct bgmac
+@@ -644,7 +644,7 @@ static int bgmac_dma_alloc(struct bgmac
BUILD_BUG_ON(BGMAC_MAX_RX_RINGS > ARRAY_SIZE(ring_base));
if (!(bcma_aread32(bgmac->core, BCMA_IOST) & BCMA_IOST_DMA64)) {
@@ -149,7 +149,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return -ENOTSUPP;
}
-@@ -655,8 +655,8 @@ static int bgmac_dma_alloc(struct bgmac
+@@ -658,8 +658,8 @@ static int bgmac_dma_alloc(struct bgmac
&ring->dma_base,
GFP_KERNEL);
if (!ring->cpu_base) {
@@ -160,7 +160,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
goto err_dma_free;
}
-@@ -680,8 +680,8 @@ static int bgmac_dma_alloc(struct bgmac
+@@ -683,8 +683,8 @@ static int bgmac_dma_alloc(struct bgmac
&ring->dma_base,
GFP_KERNEL);
if (!ring->cpu_base) {
@@ -171,7 +171,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err = -ENOMEM;
goto err_dma_free;
}
-@@ -800,8 +800,8 @@ static u16 bgmac_phy_read(struct bgmac *
+@@ -803,8 +803,8 @@ static u16 bgmac_phy_read(struct bgmac *
bcma_write32(core, phy_access_addr, tmp);
if (!bgmac_wait_value(core, phy_access_addr, BGMAC_PA_START, 0, 1000)) {
@@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0xffff;
}
-@@ -833,7 +833,7 @@ static int bgmac_phy_write(struct bgmac
+@@ -836,7 +836,7 @@ static int bgmac_phy_write(struct bgmac
bgmac_write(bgmac, BGMAC_INT_STATUS, BGMAC_IS_MDIO);
if (bgmac_read(bgmac, BGMAC_INT_STATUS) & BGMAC_IS_MDIO)
@@ -191,7 +191,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
tmp = BGMAC_PA_START;
tmp |= BGMAC_PA_WRITE;
-@@ -843,8 +843,8 @@ static int bgmac_phy_write(struct bgmac
+@@ -846,8 +846,8 @@ static int bgmac_phy_write(struct bgmac
bcma_write32(core, phy_access_addr, tmp);
if (!bgmac_wait_value(core, phy_access_addr, BGMAC_PA_START, 0, 1000)) {
@@ -202,7 +202,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return -ETIMEDOUT;
}
-@@ -897,7 +897,7 @@ static void bgmac_phy_reset(struct bgmac
+@@ -900,7 +900,7 @@ static void bgmac_phy_reset(struct bgmac
bgmac_phy_write(bgmac, bgmac->phyaddr, MII_BMCR, BMCR_RESET);
udelay(100);
if (bgmac_phy_read(bgmac, bgmac->phyaddr, MII_BMCR) & BMCR_RESET)
@@ -211,7 +211,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac_phy_init(bgmac);
}
-@@ -998,7 +998,8 @@ static void bgmac_mac_speed(struct bgmac
+@@ -1001,7 +1001,8 @@ static void bgmac_mac_speed(struct bgmac
set |= BGMAC_CMDCFG_ES_2500;
break;
default:
@@ -221,7 +221,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
if (bgmac->mac_duplex == DUPLEX_HALF)
-@@ -1097,8 +1098,8 @@ static void bgmac_chip_reset(struct bgma
+@@ -1100,8 +1101,8 @@ static void bgmac_chip_reset(struct bgma
if (bcm47xx_nvram_getenv("et_swtype", buf, sizeof(buf)) > 0) {
if (kstrtou8(buf, 0, &et_swtype))
@@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
et_swtype &= 0x0f;
et_swtype <<= 4;
sw_type = et_swtype;
-@@ -1261,7 +1262,7 @@ static irqreturn_t bgmac_interrupt(int i
+@@ -1264,7 +1265,7 @@ static irqreturn_t bgmac_interrupt(int i
int_status &= ~(BGMAC_IS_TX0 | BGMAC_IS_RX);
if (int_status)
@@ -241,7 +241,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Disable new interrupts until handling existing ones */
bgmac_chip_intrs_off(bgmac);
-@@ -1315,7 +1316,7 @@ static int bgmac_open(struct net_device
+@@ -1318,7 +1319,7 @@ static int bgmac_open(struct net_device
err = request_irq(bgmac->core->irq, bgmac_interrupt, IRQF_SHARED,
KBUILD_MODNAME, net_dev);
if (err < 0) {
@@ -250,7 +250,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac_dma_cleanup(bgmac);
return err;
}
-@@ -1596,14 +1597,14 @@ static int bgmac_fixed_phy_register(stru
+@@ -1599,14 +1600,14 @@ static int bgmac_fixed_phy_register(stru
phy_dev = fixed_phy_register(PHY_POLL, &fphy_status, -1, NULL);
if (!phy_dev || IS_ERR(phy_dev)) {
@@ -267,7 +267,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return err;
}
-@@ -1643,7 +1644,7 @@ static int bgmac_mii_register(struct bgm
+@@ -1646,7 +1647,7 @@ static int bgmac_mii_register(struct bgm
err = mdiobus_register(mii_bus);
if (err) {
@@ -276,7 +276,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
goto err_free_irq;
}
-@@ -1655,7 +1656,7 @@ static int bgmac_mii_register(struct bgm
+@@ -1658,7 +1659,7 @@ static int bgmac_mii_register(struct bgm
phy_dev = phy_connect(bgmac->net_dev, bus_id, &bgmac_adjust_link,
PHY_INTERFACE_MODE_MII);
if (IS_ERR(phy_dev)) {
@@ -285,7 +285,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err = PTR_ERR(phy_dev);
goto err_unregister_bus;
}
-@@ -1704,7 +1705,8 @@ static int bgmac_probe(struct bcma_devic
+@@ -1707,7 +1708,8 @@ static int bgmac_probe(struct bcma_devic
mac = sprom->et2mac;
break;
default:
@@ -295,7 +295,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return -ENOTSUPP;
}
-@@ -1727,6 +1729,7 @@ static int bgmac_probe(struct bcma_devic
+@@ -1730,6 +1732,7 @@ static int bgmac_probe(struct bcma_devic
net_dev->irq = core->irq;
net_dev->ethtool_ops = &bgmac_ethtool_ops;
bgmac = netdev_priv(net_dev);
@@ -303,7 +303,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac->net_dev = net_dev;
bgmac->core = core;
bcma_set_drvdata(core, bgmac);
-@@ -1738,7 +1741,7 @@ static int bgmac_probe(struct bcma_devic
+@@ -1741,7 +1744,7 @@ static int bgmac_probe(struct bcma_devic
/* On BCM4706 we need common core to access PHY */
if (core->id.id == BCMA_CORE_4706_MAC_GBIT &&
!core->bus->drv_gmac_cmn.core) {
@@ -312,7 +312,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err = -ENODEV;
goto err_netdev_free;
}
-@@ -1757,15 +1760,15 @@ static int bgmac_probe(struct bcma_devic
+@@ -1760,15 +1763,15 @@ static int bgmac_probe(struct bcma_devic
}
bgmac->phyaddr &= BGMAC_PHY_MASK;
if (bgmac->phyaddr == BGMAC_PHY_MASK) {
@@ -332,7 +332,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err = -ENOTSUPP;
goto err_netdev_free;
}
-@@ -1794,7 +1797,7 @@ static int bgmac_probe(struct bcma_devic
+@@ -1797,7 +1800,7 @@ static int bgmac_probe(struct bcma_devic
err = bgmac_dma_alloc(bgmac);
if (err) {
@@ -341,7 +341,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
goto err_netdev_free;
}
-@@ -1808,16 +1811,16 @@ static int bgmac_probe(struct bcma_devic
+@@ -1811,16 +1814,16 @@ static int bgmac_probe(struct bcma_devic
bgmac->has_robosw = !!(core->bus->sprom.boardflags_lo &
BGMAC_BFL_ENETROBO);
if (bgmac->has_robosw)
@@ -361,7 +361,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
goto err_dma_free;
}
-@@ -1827,7 +1830,7 @@ static int bgmac_probe(struct bcma_devic
+@@ -1830,7 +1833,7 @@ static int bgmac_probe(struct bcma_devic
err = register_netdev(bgmac->net_dev);
if (err) {
diff --git a/target/linux/generic/patches-4.4/075-0002-net-ethernet-bgmac-add-dma_dev-pointer.patch b/target/linux/generic/patches-4.4/075-0002-net-ethernet-bgmac-add-dma_dev-pointer.patch
index eeef86af9a..dd5b8772e3 100644
--- a/target/linux/generic/patches-4.4/075-0002-net-ethernet-bgmac-add-dma_dev-pointer.patch
+++ b/target/linux/generic/patches-4.4/075-0002-net-ethernet-bgmac-add-dma_dev-pointer.patch
@@ -38,7 +38,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int empty_slot;
bool freed = false;
unsigned bytes_compl = 0, pkts_compl = 0;
-@@ -352,7 +352,7 @@ static void bgmac_dma_rx_enable(struct b
+@@ -355,7 +355,7 @@ static void bgmac_dma_rx_enable(struct b
static int bgmac_dma_rx_skb_for_slot(struct bgmac *bgmac,
struct bgmac_slot_info *slot)
{
@@ -47,7 +47,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dma_addr_t dma_addr;
struct bgmac_rx_header *rx;
void *buf;
-@@ -441,7 +441,7 @@ static int bgmac_dma_rx_read(struct bgma
+@@ -444,7 +444,7 @@ static int bgmac_dma_rx_read(struct bgma
end_slot /= sizeof(struct bgmac_dma_desc);
while (ring->start != end_slot) {
@@ -56,7 +56,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct bgmac_slot_info *slot = &ring->slots[ring->start];
struct bgmac_rx_header *rx = slot->buf + BGMAC_RX_BUF_OFFSET;
struct sk_buff *skb;
-@@ -544,7 +544,7 @@ static bool bgmac_dma_unaligned(struct b
+@@ -547,7 +547,7 @@ static bool bgmac_dma_unaligned(struct b
static void bgmac_dma_tx_ring_free(struct bgmac *bgmac,
struct bgmac_dma_ring *ring)
{
@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct bgmac_dma_desc *dma_desc = ring->cpu_base;
struct bgmac_slot_info *slot;
int i;
-@@ -570,7 +570,7 @@ static void bgmac_dma_tx_ring_free(struc
+@@ -573,7 +573,7 @@ static void bgmac_dma_tx_ring_free(struc
static void bgmac_dma_rx_ring_free(struct bgmac *bgmac,
struct bgmac_dma_ring *ring)
{
@@ -74,7 +74,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct bgmac_slot_info *slot;
int i;
-@@ -591,7 +591,7 @@ static void bgmac_dma_ring_desc_free(str
+@@ -594,7 +594,7 @@ static void bgmac_dma_ring_desc_free(str
struct bgmac_dma_ring *ring,
int num_slots)
{
@@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int size;
if (!ring->cpu_base)
-@@ -629,7 +629,7 @@ static void bgmac_dma_free(struct bgmac
+@@ -632,7 +632,7 @@ static void bgmac_dma_free(struct bgmac
static int bgmac_dma_alloc(struct bgmac *bgmac)
{
@@ -92,7 +92,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct bgmac_dma_ring *ring;
static const u16 ring_base[] = { BGMAC_DMA_BASE0, BGMAC_DMA_BASE1,
BGMAC_DMA_BASE2, BGMAC_DMA_BASE3, };
-@@ -1730,6 +1730,7 @@ static int bgmac_probe(struct bcma_devic
+@@ -1733,6 +1733,7 @@ static int bgmac_probe(struct bcma_devic
net_dev->ethtool_ops = &bgmac_ethtool_ops;
bgmac = netdev_priv(net_dev);
bgmac->dev = &core->dev;
diff --git a/target/linux/generic/patches-4.4/075-0003-net-ethernet-bgmac-move-BCMA-MDIO-Phy-code-into-a-se.patch b/target/linux/generic/patches-4.4/075-0003-net-ethernet-bgmac-move-BCMA-MDIO-Phy-code-into-a-se.patch
index f698a6fca0..bc7b246cc1 100644
--- a/target/linux/generic/patches-4.4/075-0003-net-ethernet-bgmac-move-BCMA-MDIO-Phy-code-into-a-se.patch
+++ b/target/linux/generic/patches-4.4/075-0003-net-ethernet-bgmac-move-BCMA-MDIO-Phy-code-into-a-se.patch
@@ -317,7 +317,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+MODULE_LICENSE("GPL");
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -756,150 +756,6 @@ error:
+@@ -759,150 +759,6 @@ error:
return err;
}
@@ -468,7 +468,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/**************************************************
* Chip ops
-@@ -1156,7 +1012,8 @@ static void bgmac_chip_reset(struct bgma
+@@ -1159,7 +1015,8 @@ static void bgmac_chip_reset(struct bgma
else
bgmac_set(bgmac, BGMAC_PHY_CNTL, BGMAC_PC_MTE);
bgmac_miiconfig(bgmac);
@@ -478,7 +478,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
netdev_reset_queue(bgmac->net_dev);
}
-@@ -1550,17 +1407,6 @@ static const struct ethtool_ops bgmac_et
+@@ -1553,17 +1410,6 @@ static const struct ethtool_ops bgmac_et
* MII
**************************************************/
@@ -496,7 +496,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void bgmac_adjust_link(struct net_device *net_dev)
{
struct bgmac *bgmac = netdev_priv(net_dev);
-@@ -1585,7 +1431,7 @@ static void bgmac_adjust_link(struct net
+@@ -1588,7 +1434,7 @@ static void bgmac_adjust_link(struct net
}
}
@@ -505,7 +505,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{
struct fixed_phy_status fphy_status = {
.link = 1,
-@@ -1611,81 +1457,24 @@ static int bgmac_fixed_phy_register(stru
+@@ -1614,81 +1460,24 @@ static int bgmac_fixed_phy_register(stru
return err;
}
@@ -591,7 +591,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int bgmac_probe(struct bcma_device *core)
{
struct net_device *net_dev;
-@@ -1806,9 +1595,6 @@ static int bgmac_probe(struct bcma_devic
+@@ -1809,9 +1598,6 @@ static int bgmac_probe(struct bcma_devic
if (bcm47xx_nvram_getenv("et0_no_txint", NULL, 0) == 0)
bgmac->int_mask &= ~BGMAC_IS_TX_MASK;
@@ -601,7 +601,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac->has_robosw = !!(core->bus->sprom.boardflags_lo &
BGMAC_BFL_ENETROBO);
if (bgmac->has_robosw)
-@@ -1819,10 +1605,25 @@ static int bgmac_probe(struct bcma_devic
+@@ -1822,10 +1608,25 @@ static int bgmac_probe(struct bcma_devic
netif_napi_add(net_dev, &bgmac->napi, bgmac_poll, BGMAC_WEIGHT);
@@ -629,7 +629,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
net_dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
-@@ -1832,18 +1633,19 @@ static int bgmac_probe(struct bcma_devic
+@@ -1835,18 +1636,19 @@ static int bgmac_probe(struct bcma_devic
err = register_netdev(bgmac->net_dev);
if (err) {
dev_err(bgmac->dev, "Cannot register net device\n");
@@ -652,7 +652,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err_netdev_free:
bcma_set_drvdata(core, NULL);
free_netdev(net_dev);
-@@ -1856,7 +1658,8 @@ static void bgmac_remove(struct bcma_dev
+@@ -1859,7 +1661,8 @@ static void bgmac_remove(struct bcma_dev
struct bgmac *bgmac = bcma_get_drvdata(core);
unregister_netdev(bgmac->net_dev);
diff --git a/target/linux/generic/patches-4.4/075-0004-net-ethernet-bgmac-convert-to-feature-flags.patch b/target/linux/generic/patches-4.4/075-0004-net-ethernet-bgmac-convert-to-feature-flags.patch
index 82f432d5ff..0f627919d0 100644
--- a/target/linux/generic/patches-4.4/075-0004-net-ethernet-bgmac-convert-to-feature-flags.patch
+++ b/target/linux/generic/patches-4.4/075-0004-net-ethernet-bgmac-convert-to-feature-flags.patch
@@ -32,16 +32,16 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ctl &= ~BGMAC_DMA_TX_BL_MASK;
ctl |= BGMAC_DMA_TX_BL_128 << BGMAC_DMA_TX_BL_SHIFT;
-@@ -331,7 +331,7 @@ static void bgmac_dma_rx_enable(struct b
- u32 ctl;
+@@ -335,7 +335,7 @@ static void bgmac_dma_rx_enable(struct b
+ /* preserve ONLY bits 16-17 from current hardware value */
+ ctl &= BGMAC_DMA_RX_ADDREXT_MASK;
- ctl = bgmac_read(bgmac, ring->mmio_base + BGMAC_DMA_RX_CTL);
- if (bgmac->core->id.rev >= 4) {
+ if (bgmac->feature_flags & BGMAC_FEAT_RX_MASK_SETUP) {
ctl &= ~BGMAC_DMA_RX_BL_MASK;
ctl |= BGMAC_DMA_RX_BL_128 << BGMAC_DMA_RX_BL_SHIFT;
-@@ -769,14 +769,20 @@ static void bgmac_cmdcfg_maskset(struct
+@@ -772,14 +772,20 @@ static void bgmac_cmdcfg_maskset(struct
{
u32 cmdcfg = bgmac_read(bgmac, BGMAC_CMDCFG);
u32 new_val = (cmdcfg & mask) | set;
@@ -64,7 +64,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
udelay(2);
}
-@@ -805,7 +811,7 @@ static void bgmac_chip_stats_update(stru
+@@ -808,7 +814,7 @@ static void bgmac_chip_stats_update(stru
{
int i;
@@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
for (i = 0; i < BGMAC_NUM_MIB_TX_REGS; i++)
bgmac->mib_tx_regs[i] =
bgmac_read(bgmac,
-@@ -824,7 +830,7 @@ static void bgmac_clear_mib(struct bgmac
+@@ -827,7 +833,7 @@ static void bgmac_clear_mib(struct bgmac
{
int i;
@@ -82,7 +82,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return;
bgmac_set(bgmac, BGMAC_DEV_CTL, BGMAC_DC_MROR);
-@@ -867,9 +873,8 @@ static void bgmac_mac_speed(struct bgmac
+@@ -870,9 +876,8 @@ static void bgmac_mac_speed(struct bgmac
static void bgmac_miiconfig(struct bgmac *bgmac)
{
struct bcma_device *core = bgmac->core;
@@ -93,7 +93,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bcma_awrite32(core, BCMA_IOCTL,
bcma_aread32(core, BCMA_IOCTL) | 0x40 |
BGMAC_BCMA_IOCTL_SW_CLKEN);
-@@ -877,6 +882,8 @@ static void bgmac_miiconfig(struct bgmac
+@@ -880,6 +885,8 @@ static void bgmac_miiconfig(struct bgmac
bgmac->mac_duplex = DUPLEX_FULL;
bgmac_mac_speed(bgmac);
} else {
@@ -102,7 +102,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
imode = (bgmac_read(bgmac, BGMAC_DEV_STATUS) &
BGMAC_DS_MM_MASK) >> BGMAC_DS_MM_SHIFT;
if (imode == 0 || imode == 1) {
-@@ -891,9 +898,7 @@ static void bgmac_miiconfig(struct bgmac
+@@ -894,9 +901,7 @@ static void bgmac_miiconfig(struct bgmac
static void bgmac_chip_reset(struct bgmac *bgmac)
{
struct bcma_device *core = bgmac->core;
@@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u32 iost;
int i;
-@@ -916,15 +921,12 @@ static void bgmac_chip_reset(struct bgma
+@@ -919,15 +924,12 @@ static void bgmac_chip_reset(struct bgma
}
iost = bcma_aread32(core, BCMA_IOST);
@@ -132,7 +132,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (iost & BGMAC_BCMA_IOST_ATTACHED) {
flags = BGMAC_BCMA_IOCTL_SW_CLKEN;
if (!bgmac->has_robosw)
-@@ -934,7 +936,7 @@ static void bgmac_chip_reset(struct bgma
+@@ -937,7 +939,7 @@ static void bgmac_chip_reset(struct bgma
}
/* Request Misc PLL for corerev > 2 */
@@ -141,7 +141,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac_set(bgmac, BCMA_CLKCTLST,
BGMAC_BCMA_CLKCTLST_MISC_PLL_REQ);
bgmac_wait_value(bgmac->core, BCMA_CLKCTLST,
-@@ -943,9 +945,7 @@ static void bgmac_chip_reset(struct bgma
+@@ -946,9 +948,7 @@ static void bgmac_chip_reset(struct bgma
1000);
}
@@ -152,7 +152,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct bcma_drv_cc *cc = &bgmac->core->bus->drv_cc;
u8 et_swtype = 0;
u8 sw_type = BGMAC_CHIPCTL_1_SW_TYPE_EPHY |
-@@ -959,11 +959,9 @@ static void bgmac_chip_reset(struct bgma
+@@ -962,11 +962,9 @@ static void bgmac_chip_reset(struct bgma
et_swtype &= 0x0f;
et_swtype <<= 4;
sw_type = et_swtype;
@@ -166,7 +166,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
sw_type = BGMAC_CHIPCTL_1_IF_TYPE_RGMII |
BGMAC_CHIPCTL_1_SW_TYPE_RGMII;
}
-@@ -983,6 +981,11 @@ static void bgmac_chip_reset(struct bgma
+@@ -986,6 +984,11 @@ static void bgmac_chip_reset(struct bgma
* BGMAC_CMDCFG is read _after_ putting chip in a reset. So it has to
* be keps until taking MAC out of the reset.
*/
@@ -178,7 +178,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac_cmdcfg_maskset(bgmac,
~(BGMAC_CMDCFG_TE |
BGMAC_CMDCFG_RE |
-@@ -1000,13 +1003,13 @@ static void bgmac_chip_reset(struct bgma
+@@ -1003,13 +1006,13 @@ static void bgmac_chip_reset(struct bgma
BGMAC_CMDCFG_PROM |
BGMAC_CMDCFG_NLC |
BGMAC_CMDCFG_CFE |
@@ -194,7 +194,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bcma_maskset32(bgmac->cmn, BCMA_GMAC_CMN_PHY_CTL, ~0,
BCMA_GMAC_CMN_PC_MTE);
else
-@@ -1032,46 +1035,48 @@ static void bgmac_chip_intrs_off(struct
+@@ -1035,46 +1038,48 @@ static void bgmac_chip_intrs_off(struct
/* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/gmac_enable */
static void bgmac_enable(struct bgmac *bgmac)
{
@@ -263,7 +263,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rxq_ctl = bgmac_read(bgmac, BGMAC_RXQ_CTL);
rxq_ctl &= ~BGMAC_RXQ_CTL_MDP_MASK;
bp_clk = bcma_pmu_get_bus_clock(&bgmac->core->bus->drv_cc) /
-@@ -1603,6 +1608,74 @@ static int bgmac_probe(struct bcma_devic
+@@ -1606,6 +1611,74 @@ static int bgmac_probe(struct bcma_devic
if (core->bus->sprom.boardflags_lo & BGMAC_BFL_ENETADM)
dev_warn(bgmac->dev, "Support for ADMtek ethernet switch not implemented\n");
diff --git a/target/linux/generic/patches-4.4/075-0005-net-ethernet-bgmac-Add-platform-device-support.patch b/target/linux/generic/patches-4.4/075-0005-net-ethernet-bgmac-Add-platform-device-support.patch
index 4a69524761..5755184949 100644
--- a/target/linux/generic/patches-4.4/075-0005-net-ethernet-bgmac-Add-platform-device-support.patch
+++ b/target/linux/generic/patches-4.4/075-0005-net-ethernet-bgmac-Add-platform-device-support.patch
@@ -689,7 +689,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ring->mmio_base + BGMAC_DMA_RX_STATUS,
BGMAC_DMA_RX_STAT, BGMAC_DMA_RX_STAT_DISABLED,
10000))
-@@ -640,7 +616,7 @@ static int bgmac_dma_alloc(struct bgmac
+@@ -643,7 +619,7 @@ static int bgmac_dma_alloc(struct bgmac
BUILD_BUG_ON(BGMAC_MAX_TX_RINGS > ARRAY_SIZE(ring_base));
BUILD_BUG_ON(BGMAC_MAX_RX_RINGS > ARRAY_SIZE(ring_base));
@@ -698,7 +698,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dev_err(bgmac->dev, "Core does not report 64-bit DMA\n");
return -ENOTSUPP;
}
-@@ -872,12 +848,10 @@ static void bgmac_mac_speed(struct bgmac
+@@ -875,12 +851,10 @@ static void bgmac_mac_speed(struct bgmac
static void bgmac_miiconfig(struct bgmac *bgmac)
{
@@ -714,7 +714,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac->mac_speed = SPEED_2500;
bgmac->mac_duplex = DUPLEX_FULL;
bgmac_mac_speed(bgmac);
-@@ -897,12 +871,11 @@ static void bgmac_miiconfig(struct bgmac
+@@ -900,12 +874,11 @@ static void bgmac_miiconfig(struct bgmac
/* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipreset */
static void bgmac_chip_reset(struct bgmac *bgmac)
{
@@ -728,7 +728,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!bgmac->stats_grabbed) {
/* bgmac_chip_stats_update(bgmac); */
bgmac->stats_grabbed = true;
-@@ -920,7 +893,7 @@ static void bgmac_chip_reset(struct bgma
+@@ -923,7 +896,7 @@ static void bgmac_chip_reset(struct bgma
/* TODO: Clear software multicast filter list */
}
@@ -737,7 +737,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (bgmac->feature_flags & BGMAC_FEAT_IOST_ATTACHED)
iost &= ~BGMAC_BCMA_IOST_ATTACHED;
-@@ -932,21 +905,20 @@ static void bgmac_chip_reset(struct bgma
+@@ -935,21 +908,20 @@ static void bgmac_chip_reset(struct bgma
if (!bgmac->has_robosw)
flags |= BGMAC_BCMA_IOCTL_SW_RESET;
}
@@ -761,7 +761,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
u8 et_swtype = 0;
u8 sw_type = BGMAC_CHIPCTL_1_SW_TYPE_EPHY |
BGMAC_CHIPCTL_1_IF_TYPE_MII;
-@@ -965,16 +937,15 @@ static void bgmac_chip_reset(struct bgma
+@@ -968,16 +940,15 @@ static void bgmac_chip_reset(struct bgma
sw_type = BGMAC_CHIPCTL_1_IF_TYPE_RGMII |
BGMAC_CHIPCTL_1_SW_TYPE_RGMII;
}
@@ -784,7 +784,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/gmac_reset
* Specs don't say about using BGMAC_CMDCFG_SR, but in this routine
-@@ -1010,8 +981,8 @@ static void bgmac_chip_reset(struct bgma
+@@ -1013,8 +984,8 @@ static void bgmac_chip_reset(struct bgma
bgmac_clear_mib(bgmac);
if (bgmac->feature_flags & BGMAC_FEAT_CMN_PHY_CTL)
@@ -795,7 +795,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
else
bgmac_set(bgmac, BGMAC_PHY_CNTL, BGMAC_PC_MTE);
bgmac_miiconfig(bgmac);
-@@ -1056,8 +1027,8 @@ static void bgmac_enable(struct bgmac *b
+@@ -1059,8 +1030,8 @@ static void bgmac_enable(struct bgmac *b
if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST || mode != 0)
bgmac_set(bgmac, BCMA_CLKCTLST, BCMA_CLKCTLST_FORCEHT);
if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST && mode == 2)
@@ -806,7 +806,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (bgmac->feature_flags & (BGMAC_FEAT_FLW_CTRL1 |
BGMAC_FEAT_FLW_CTRL2)) {
-@@ -1079,8 +1050,7 @@ static void bgmac_enable(struct bgmac *b
+@@ -1082,8 +1053,7 @@ static void bgmac_enable(struct bgmac *b
rxq_ctl = bgmac_read(bgmac, BGMAC_RXQ_CTL);
rxq_ctl &= ~BGMAC_RXQ_CTL_MDP_MASK;
@@ -816,7 +816,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mdp = (bp_clk * 128 / 1000) - 3;
rxq_ctl |= (mdp << BGMAC_RXQ_CTL_MDP_SHIFT);
bgmac_write(bgmac, BGMAC_RXQ_CTL, rxq_ctl);
-@@ -1175,7 +1145,7 @@ static int bgmac_open(struct net_device
+@@ -1178,7 +1148,7 @@ static int bgmac_open(struct net_device
/* Specs say about reclaiming rings here, but we do that in DMA init */
bgmac_chip_init(bgmac);
@@ -825,7 +825,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
KBUILD_MODNAME, net_dev);
if (err < 0) {
dev_err(bgmac->dev, "IRQ request error: %d!\n", err);
-@@ -1201,7 +1171,7 @@ static int bgmac_stop(struct net_device
+@@ -1204,7 +1174,7 @@ static int bgmac_stop(struct net_device
napi_disable(&bgmac->napi);
bgmac_chip_intrs_off(bgmac);
@@ -834,7 +834,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac_chip_reset(bgmac);
bgmac_dma_cleanup(bgmac);
-@@ -1396,7 +1366,7 @@ static void bgmac_get_drvinfo(struct net
+@@ -1399,7 +1369,7 @@ static void bgmac_get_drvinfo(struct net
struct ethtool_drvinfo *info)
{
strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
@@ -843,7 +843,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static const struct ethtool_ops bgmac_ethtool_ops = {
-@@ -1480,116 +1450,41 @@ static int bgmac_phy_connect(struct bgma
+@@ -1483,116 +1453,41 @@ static int bgmac_phy_connect(struct bgma
return 0;
}
@@ -976,7 +976,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err = bgmac_dma_alloc(bgmac);
if (err) {
dev_err(bgmac->dev, "Unable to alloc memory for DMA\n");
-@@ -1600,103 +1495,15 @@ static int bgmac_probe(struct bcma_devic
+@@ -1603,103 +1498,15 @@ static int bgmac_probe(struct bcma_devic
if (bcm47xx_nvram_getenv("et0_no_txint", NULL, 0) == 0)
bgmac->int_mask &= ~BGMAC_IS_TX_MASK;
@@ -1081,7 +1081,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
net_dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
-@@ -1715,56 +1522,24 @@ static int bgmac_probe(struct bcma_devic
+@@ -1718,56 +1525,24 @@ static int bgmac_probe(struct bcma_devic
err_phy_disconnect:
phy_disconnect(net_dev->phydev);
diff --git a/target/linux/generic/patches-4.4/077-0001-net-bgmac-support-Ethernet-core-on-BCM53573-SoCs.patch b/target/linux/generic/patches-4.4/077-0001-net-bgmac-support-Ethernet-core-on-BCM53573-SoCs.patch
index c47aab7e06..82d3fe4d6d 100644
--- a/target/linux/generic/patches-4.4/077-0001-net-bgmac-support-Ethernet-core-on-BCM53573-SoCs.patch
+++ b/target/linux/generic/patches-4.4/077-0001-net-bgmac-support-Ethernet-core-on-BCM53573-SoCs.patch
@@ -75,7 +75,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bgmac->feature_flags |= BGMAC_FEAT_SET_RXQ_CLK;
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -940,6 +940,27 @@ static void bgmac_chip_reset(struct bgma
+@@ -943,6 +943,27 @@ static void bgmac_chip_reset(struct bgma
bgmac_cco_ctl_maskset(bgmac, 1, ~(BGMAC_CHIPCTL_1_IF_TYPE_MASK |
BGMAC_CHIPCTL_1_SW_TYPE_MASK),
sw_type);
@@ -103,7 +103,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
if (iost & BGMAC_BCMA_IOST_ATTACHED && !bgmac->has_robosw)
-@@ -1483,6 +1504,10 @@ int bgmac_enet_probe(struct bgmac *info)
+@@ -1486,6 +1507,10 @@ int bgmac_enet_probe(struct bgmac *info)
*/
bgmac_clk_enable(bgmac, 0);
diff --git a/target/linux/generic/patches-4.4/077-0002-net-bgmac-make-it-clear-when-setting-interface-type-.patch b/target/linux/generic/patches-4.4/077-0002-net-bgmac-make-it-clear-when-setting-interface-type-.patch
index 5f60a32576..272ec5c3f3 100644
--- a/target/linux/generic/patches-4.4/077-0002-net-bgmac-make-it-clear-when-setting-interface-type-.patch
+++ b/target/linux/generic/patches-4.4/077-0002-net-bgmac-make-it-clear-when-setting-interface-type-.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -932,7 +932,8 @@ static void bgmac_chip_reset(struct bgma
+@@ -935,7 +935,8 @@ static void bgmac_chip_reset(struct bgma
et_swtype <<= 4;
sw_type = et_swtype;
} else if (bgmac->feature_flags & BGMAC_FEAT_SW_TYPE_EPHYRMII) {
diff --git a/target/linux/generic/patches-4.4/077-0003-net-bgmac-Fix-errant-feature-flag-check.patch b/target/linux/generic/patches-4.4/077-0003-net-bgmac-Fix-errant-feature-flag-check.patch
index 68c885b86b..830d8ccde4 100644
--- a/target/linux/generic/patches-4.4/077-0003-net-bgmac-Fix-errant-feature-flag-check.patch
+++ b/target/linux/generic/patches-4.4/077-0003-net-bgmac-Fix-errant-feature-flag-check.patch
@@ -22,7 +22,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1046,7 +1046,7 @@ static void bgmac_enable(struct bgmac *b
+@@ -1049,7 +1049,7 @@ static void bgmac_enable(struct bgmac *b
mode = (bgmac_read(bgmac, BGMAC_DEV_STATUS) & BGMAC_DS_MM_MASK) >>
BGMAC_DS_MM_SHIFT;
diff --git a/target/linux/generic/patches-4.4/077-0004-net-bgmac-fix-spelling-mistake-connecton-connection.patch b/target/linux/generic/patches-4.4/077-0004-net-bgmac-fix-spelling-mistake-connecton-connection.patch
index 9abe559e1d..5721abcf95 100644
--- a/target/linux/generic/patches-4.4/077-0004-net-bgmac-fix-spelling-mistake-connecton-connection.patch
+++ b/target/linux/generic/patches-4.4/077-0004-net-bgmac-fix-spelling-mistake-connecton-connection.patch
@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1465,7 +1465,7 @@ static int bgmac_phy_connect(struct bgma
+@@ -1468,7 +1468,7 @@ static int bgmac_phy_connect(struct bgma
phy_dev = phy_connect(bgmac->net_dev, bus_id, &bgmac_adjust_link,
PHY_INTERFACE_MODE_MII);
if (IS_ERR(phy_dev)) {
diff --git a/target/linux/generic/patches-4.4/077-0005-bgmac-stop-clearing-DMA-receive-control-register-rig.patch b/target/linux/generic/patches-4.4/077-0005-bgmac-stop-clearing-DMA-receive-control-register-rig.patch
deleted file mode 100644
index e09524b0fa..0000000000
--- a/target/linux/generic/patches-4.4/077-0005-bgmac-stop-clearing-DMA-receive-control-register-rig.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From fcdefccac976ee51dd6071832b842d8fb41c479c Mon Sep 17 00:00:00 2001
-From: Andy Gospodarek <gospo@broadcom.com>
-Date: Mon, 31 Oct 2016 13:32:03 -0400
-Subject: [PATCH] bgmac: stop clearing DMA receive control register right after
- it is set
-
-Current bgmac code initializes some DMA settings in the receive control
-register for some hardware and then immediately clears those settings.
-Not clearing those settings results in ~420Mbps *improvement* in
-throughput; this system can now receive frames at line-rate on Broadcom
-5871x hardware compared to ~520Mbps today. I also tested a few other
-values but found there to be no discernible difference in CPU
-utilization even if burst size and prefetching values are different.
-
-On the hardware tested there was no need to keep the code that cleared
-all but bits 16-17, but since there is a wide variety of hardware that
-used this driver (I did not look at all hardware docs for hardware using
-this IP block), I find it wise to move this call up and clear bits just
-after reading the default value from the hardware rather than completely
-removing it.
-
-This is a good candidate for -stable >=3.14 since that is when the code
-that was supposed to improve performance (but did not) was introduced.
-
-Signed-off-by: Andy Gospodarek <gospo@broadcom.com>
-Fixes: 56ceecde1f29 ("bgmac: initialize the DMA controller of core...")
-Cc: Hauke Mehrtens <hauke@hauke-m.de>
-Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- drivers/net/ethernet/broadcom/bgmac.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/broadcom/bgmac.c
-+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -307,6 +307,10 @@ static void bgmac_dma_rx_enable(struct b
- u32 ctl;
-
- ctl = bgmac_read(bgmac, ring->mmio_base + BGMAC_DMA_RX_CTL);
-+
-+ /* preserve ONLY bits 16-17 from current hardware value */
-+ ctl &= BGMAC_DMA_RX_ADDREXT_MASK;
-+
- if (bgmac->feature_flags & BGMAC_FEAT_RX_MASK_SETUP) {
- ctl &= ~BGMAC_DMA_RX_BL_MASK;
- ctl |= BGMAC_DMA_RX_BL_128 << BGMAC_DMA_RX_BL_SHIFT;
-@@ -317,7 +321,6 @@ static void bgmac_dma_rx_enable(struct b
- ctl &= ~BGMAC_DMA_RX_PT_MASK;
- ctl |= BGMAC_DMA_RX_PT_1 << BGMAC_DMA_RX_PT_SHIFT;
- }
-- ctl &= BGMAC_DMA_RX_ADDREXT_MASK;
- ctl |= BGMAC_DMA_RX_ENABLE;
- ctl |= BGMAC_DMA_RX_PARITY_DISABLE;
- ctl |= BGMAC_DMA_RX_OVERFLOW_CONT;
diff --git a/target/linux/generic/patches-4.4/201-extra_optimization.patch b/target/linux/generic/patches-4.4/201-extra_optimization.patch
index d2f6642226..04192727c0 100644
--- a/target/linux/generic/patches-4.4/201-extra_optimization.patch
+++ b/target/linux/generic/patches-4.4/201-extra_optimization.patch
@@ -1,6 +1,6 @@
--- a/Makefile
+++ b/Makefile
-@@ -620,12 +620,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
+@@ -621,12 +621,12 @@ KBUILD_CFLAGS += $(call cc-disable-warni
KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
diff --git a/target/linux/generic/patches-4.4/202-reduce_module_size.patch b/target/linux/generic/patches-4.4/202-reduce_module_size.patch
index 283d48d992..d68c463648 100644
--- a/target/linux/generic/patches-4.4/202-reduce_module_size.patch
+++ b/target/linux/generic/patches-4.4/202-reduce_module_size.patch
@@ -1,7 +1,7 @@
--- a/Makefile
+++ b/Makefile
-@@ -402,7 +402,7 @@ KBUILD_CFLAGS_KERNEL :=
- KBUILD_AFLAGS := -D__ASSEMBLY__
+@@ -403,7 +403,7 @@ KBUILD_CFLAGS_KERNEL :=
+ KBUILD_AFLAGS := -D__ASSEMBLY__ $(call cc-option,-fno-PIE)
KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
-KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
diff --git a/target/linux/generic/patches-4.4/902-debloat_proc.patch b/target/linux/generic/patches-4.4/902-debloat_proc.patch
index c90f5500e8..3123a4be68 100644
--- a/target/linux/generic/patches-4.4/902-debloat_proc.patch
+++ b/target/linux/generic/patches-4.4/902-debloat_proc.patch
@@ -173,7 +173,7 @@
goto err;
--- a/net/core/sock.c
+++ b/net/core/sock.c
-@@ -3035,6 +3035,8 @@ static __net_initdata struct pernet_oper
+@@ -3036,6 +3036,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{
@@ -184,7 +184,7 @@
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
-@@ -2642,10 +2642,12 @@ static const struct file_operations fib_
+@@ -2639,10 +2639,12 @@ static const struct file_operations fib_
int __net_init fib_proc_init(struct net *net)
{
@@ -199,7 +199,7 @@
&fib_triestat_fops))
goto out2;
-@@ -2655,17 +2657,21 @@ int __net_init fib_proc_init(struct net
+@@ -2652,17 +2654,21 @@ int __net_init fib_proc_init(struct net
return 0;
out3: