aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-02-09 12:13:55 +0000
committerJohn Crispin <john@openwrt.org>2015-02-09 12:13:55 +0000
commit654bc380ec549e3cdcc2c286ef7d67fea9509609 (patch)
treef25bfc6c0b5a8a9d50c13d0b9df290f25db9112a /target/linux/ramips/files
parent826b461427fa2abe634e652a05dfc86fc8a6c609 (diff)
downloadupstream-654bc380ec549e3cdcc2c286ef7d67fea9509609.tar.gz
upstream-654bc380ec549e3cdcc2c286ef7d67fea9509609.tar.bz2
upstream-654bc380ec549e3cdcc2c286ef7d67fea9509609.zip
ralink: add 3.18 support
keep default as 3.14, mt7621 gic need to be ported to 3.18 Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 44349
Diffstat (limited to 'target/linux/ramips/files')
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c4
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c6
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h6
3 files changed, 11 insertions, 5 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c
index df61963dc9..cbe5fadb1f 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_ethtool.c
@@ -178,12 +178,12 @@ static void fe_get_ethtool_stats(struct net_device *dev,
do {
data_src = &hwstats->tx_bytes;
data_dst = data;
- start = u64_stats_fetch_begin_bh(&hwstats->syncp);
+ start = u64_stats_fetch_begin_irq(&hwstats->syncp);
for (i = 0; i < ARRAY_SIZE(fe_gdma_str); i++)
*data_dst++ = *data_src++;
- } while (u64_stats_fetch_retry_bh(&hwstats->syncp, start));
+ } while (u64_stats_fetch_retry_irq(&hwstats->syncp, start));
}
static struct ethtool_ops fe_ethtool_ops = {
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
index 12c6ccaf98..14a950a003 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
@@ -453,7 +453,7 @@ static struct rtnl_link_stats64 *fe_get_stats64(struct net_device *dev,
}
do {
- start = u64_stats_fetch_begin_bh(&hwstats->syncp);
+ start = u64_stats_fetch_begin_irq(&hwstats->syncp);
storage->rx_packets = hwstats->rx_packets;
storage->tx_packets = hwstats->tx_packets;
storage->rx_bytes = hwstats->rx_bytes;
@@ -465,7 +465,7 @@ static struct rtnl_link_stats64 *fe_get_stats64(struct net_device *dev,
storage->rx_crc_errors = hwstats->rx_fcs_errors;
storage->rx_errors = hwstats->rx_checksum_errors;
storage->tx_aborted_errors = hwstats->tx_skip;
- } while (u64_stats_fetch_retry_bh(&hwstats->syncp, start));
+ } while (u64_stats_fetch_retry_irq(&hwstats->syncp, start));
storage->tx_errors = priv->netdev->stats.tx_errors;
storage->rx_dropped = priv->netdev->stats.rx_dropped;
@@ -1414,7 +1414,7 @@ static int fe_probe(struct platform_device *pdev)
else
soc->reg_table = fe_reg_table;
- fe_base = devm_request_and_ioremap(&pdev->dev, res);
+ fe_base = devm_ioremap_resource(&pdev->dev, res);
if (!fe_base) {
err = -EADDRNOTAVAIL;
goto err_out;
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h
index 8c204768b7..a193a564c5 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h
@@ -25,6 +25,12 @@
#include <linux/dma-mapping.h>
#include <linux/phy.h>
#include <linux/ethtool.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
+#define u64_stats_fetch_retry_irq u64_stats_fetch_retry_bh
+#define u64_stats_fetch_begin_irq u64_stats_fetch_begin_bh
+#endif
enum fe_reg {
FE_REG_PDMA_GLO_CFG = 0,