projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[target] generic: ESFQ patch, only include net/netfilter/nf_conntrack.h when CONFIG_N...
[openwrt.git]
/
target
/
linux
/
brcm63xx
/
files
/
drivers
/
net
/
bcm63xx_enet.c
diff --git
a/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c
b/target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c
index
a721492
..
d338bbc
100644
(file)
--- a/
target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c
+++ b/
target/linux/brcm63xx/files/drivers/net/bcm63xx_enet.c
@@
-28,6
+28,7
@@
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/if_vlan.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/if_vlan.h>
+#include <linux/version.h>
#include <bcm63xx_dev_enet.h>
#include "bcm63xx_enet.h"
#include <bcm63xx_dev_enet.h>
#include "bcm63xx_enet.h"
@@
-451,7
+452,11
@@
static int bcm_enet_poll(struct napi_struct *napi, int budget)
/* no more packet in rx/tx queue, remove device from poll
* queue */
/* no more packet in rx/tx queue, remove device from poll
* queue */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
netif_rx_complete(dev, napi);
netif_rx_complete(dev, napi);
+#else
+ napi_complete(napi);
+#endif
/* restore rx/tx interrupt */
enet_dma_writel(priv, ENETDMA_IR_PKTDONE_MASK,
/* restore rx/tx interrupt */
enet_dma_writel(priv, ENETDMA_IR_PKTDONE_MASK,
@@
-503,7
+508,11
@@
static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id)
enet_dma_writel(priv, 0, ENETDMA_IRMASK_REG(priv->rx_chan));
enet_dma_writel(priv, 0, ENETDMA_IRMASK_REG(priv->tx_chan));
enet_dma_writel(priv, 0, ENETDMA_IRMASK_REG(priv->rx_chan));
enet_dma_writel(priv, 0, ENETDMA_IRMASK_REG(priv->tx_chan));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
netif_rx_schedule(dev, &priv->napi);
netif_rx_schedule(dev, &priv->napi);
+#else
+ napi_schedule(&priv->napi);
+#endif
return IRQ_HANDLED;
}
return IRQ_HANDLED;
}
@@
-1709,7
+1718,11
@@
static int __devinit bcm_enet_probe(struct platform_device *pdev)
if (priv->has_phy) {
bus = &priv->mii_bus;
bus->name = "bcm63xx_enet MII bus";
if (priv->has_phy) {
bus = &priv->mii_bus;
bus->name = "bcm63xx_enet MII bus";
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
bus->dev = &pdev->dev;
bus->dev = &pdev->dev;
+#else
+ bus->parent = &pdev->dev;
+#endif
bus->priv = priv;
bus->read = bcm_enet_mdio_read_phylib;
bus->write = bcm_enet_mdio_write_phylib;
bus->priv = priv;
bus->read = bcm_enet_mdio_read_phylib;
bus->write = bcm_enet_mdio_write_phylib;
@@
-1778,6
+1791,7
@@
static int __devinit bcm_enet_probe(struct platform_device *pdev)
dev->change_mtu = bcm_enet_change_mtu;
SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops);
dev->change_mtu = bcm_enet_change_mtu;
SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops);
+ SET_NETDEV_DEV(dev, &pdev->dev);
ret = register_netdev(dev);
if (ret)
ret = register_netdev(dev);
if (ret)
@@
-1786,7
+1800,6
@@
static int __devinit bcm_enet_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, dev);
priv->pdev = pdev;
priv->net_dev = dev;
platform_set_drvdata(pdev, dev);
priv->pdev = pdev;
priv->net_dev = dev;
- SET_NETDEV_DEV(dev, &pdev->dev);
return 0;
return 0;
@@
-1857,6
+1870,7
@@
static int __devexit bcm_enet_remove(struct platform_device *pdev)
clk_disable(priv->mac_clk);
clk_put(priv->mac_clk);
clk_disable(priv->mac_clk);
clk_put(priv->mac_clk);
+ platform_set_drvdata(pdev, NULL);
free_netdev(dev);
return 0;
}
free_netdev(dev);
return 0;
}
This page took
0.02563 seconds
and
4
git commands to generate.