aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.10/770-bgmac-phylib.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-09-16 19:46:34 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-09-16 19:46:34 +0000
commitdb3414a7e15c2f690d565d5a75169609736a16cf (patch)
tree5e7f5e4c0c07a8989d61ad3e95bba43e73d2a7fe /target/linux/brcm47xx/patches-3.10/770-bgmac-phylib.patch
parentbfe5dcd235b469b42246924d8a825ac451eec6bc (diff)
downloadupstream-db3414a7e15c2f690d565d5a75169609736a16cf.tar.gz
upstream-db3414a7e15c2f690d565d5a75169609736a16cf.tar.bz2
upstream-db3414a7e15c2f690d565d5a75169609736a16cf.zip
brcm47xx: bgmac: implement unaligned addressing for DMA rings that support it
This is important patch for new devices that support unaligned addressing. That devices suffer from the backward-compatibility bug in DMA engine. In theory we should be able to use old mechanism, but in practice DMA address seems to be randomly copied into status register when hardware reaches end of a ring. This breaks reading slot number from status register and we can't use DMA anymore. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38004 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/770-bgmac-phylib.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.10/770-bgmac-phylib.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/770-bgmac-phylib.patch b/target/linux/brcm47xx/patches-3.10/770-bgmac-phylib.patch
index 6041d2a77a..33308319db 100644
--- a/target/linux/brcm47xx/patches-3.10/770-bgmac-phylib.patch
+++ b/target/linux/brcm47xx/patches-3.10/770-bgmac-phylib.patch
@@ -10,7 +10,7 @@
They can be found on BCM47xx SoCs and provide gigabit ethernet.
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
-@@ -1201,27 +1201,14 @@ static int bgmac_set_mac_address(struct
+@@ -1219,27 +1219,14 @@ static int bgmac_set_mac_address(struct
static int bgmac_ioctl(struct net_device *net_dev, struct ifreq *ifr, int cmd)
{
struct bgmac *bgmac = netdev_priv(net_dev);
@@ -45,7 +45,7 @@
}
static const struct net_device_ops bgmac_netdev_ops = {
-@@ -1243,61 +1230,18 @@ static int bgmac_get_settings(struct net
+@@ -1261,61 +1248,18 @@ static int bgmac_get_settings(struct net
{
struct bgmac *bgmac = netdev_priv(net_dev);
@@ -111,7 +111,7 @@
static void bgmac_get_drvinfo(struct net_device *net_dev,
struct ethtool_drvinfo *info)
-@@ -1308,6 +1252,7 @@ static void bgmac_get_drvinfo(struct net
+@@ -1326,6 +1270,7 @@ static void bgmac_get_drvinfo(struct net
static const struct ethtool_ops bgmac_ethtool_ops = {
.get_settings = bgmac_get_settings,
@@ -119,7 +119,7 @@
.get_drvinfo = bgmac_get_drvinfo,
};
-@@ -1326,10 +1271,42 @@ static int bgmac_mii_write(struct mii_bu
+@@ -1344,10 +1289,42 @@ static int bgmac_mii_write(struct mii_bu
return bgmac_phy_write(bus->priv, mii_id, regnum, value);
}
@@ -162,7 +162,7 @@
mii_bus = mdiobus_alloc();
if (!mii_bus)
-@@ -1360,7 +1337,29 @@ static int bgmac_mii_register(struct bgm
+@@ -1378,7 +1355,29 @@ static int bgmac_mii_register(struct bgm
bgmac->mii_bus = mii_bus;
@@ -195,7 +195,7 @@
kfree(mii_bus->irq);
--- a/drivers/net/ethernet/broadcom/bgmac.h
+++ b/drivers/net/ethernet/broadcom/bgmac.h
-@@ -399,7 +399,10 @@ struct bgmac {
+@@ -401,7 +401,10 @@ struct bgmac {
struct bcma_device *cmn; /* Reference to CMN core for BCM4706 */
struct net_device *net_dev;
struct napi_struct napi;