atheros: merge a few patches into the right place
SVN-Revision: 26556
This commit is contained in:
parent
63c08f0f0b
commit
7486cf730a
|
@ -25,7 +25,7 @@
|
|||
obj-$(CONFIG_DECLANCE) += declance.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/ar231x.c
|
||||
@@ -0,0 +1,1278 @@
|
||||
@@ -0,0 +1,1293 @@
|
||||
+/*
|
||||
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
|
||||
+ *
|
||||
|
@ -182,6 +182,18 @@
|
|||
+#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
+static void
|
||||
+ar231x_netpoll(struct net_device *dev)
|
||||
+{
|
||||
+ unsigned long flags;
|
||||
+
|
||||
+ local_irq_save(flags);
|
||||
+ ar231x_interrupt(dev->irq, dev);
|
||||
+ local_irq_restore(flags);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static const struct net_device_ops ar231x_ops = {
|
||||
+ .ndo_open = ar231x_open,
|
||||
+ .ndo_stop = ar231x_close,
|
||||
|
@ -192,6 +204,9 @@
|
|||
+ .ndo_validate_addr = eth_validate_addr,
|
||||
+ .ndo_set_mac_address = eth_mac_addr,
|
||||
+ .ndo_tx_timeout = ar231x_tx_timeout,
|
||||
+#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
+ .ndo_poll_controller = ar231x_netpoll,
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+int __init ar231x_probe(struct platform_device *pdev)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/ar231x.c
|
||||
+++ b/drivers/net/ar231x.c
|
||||
@@ -740,6 +740,7 @@ static void ar231x_load_rx_ring(struct n
|
||||
@@ -755,6 +755,7 @@ static void ar231x_load_rx_ring(struct n
|
||||
for (i = 0; i < nr_bufs; i++) {
|
||||
struct sk_buff *skb;
|
||||
ar231x_descr_t *rd;
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
if (sp->rx_skb[idx])
|
||||
break;
|
||||
@@ -755,7 +756,9 @@ static void ar231x_load_rx_ring(struct n
|
||||
@@ -770,7 +771,9 @@ static void ar231x_load_rx_ring(struct n
|
||||
* Make sure IP header starts on a fresh cache line.
|
||||
*/
|
||||
skb->dev = dev;
|
||||
|
@ -19,7 +19,7 @@
|
|||
sp->rx_skb[idx] = skb;
|
||||
|
||||
rd = (ar231x_descr_t *) & sp->rx_ring[idx];
|
||||
@@ -829,20 +832,23 @@ static int ar231x_rx_int(struct net_devi
|
||||
@@ -844,20 +847,23 @@ static int ar231x_rx_int(struct net_devi
|
||||
/* alloc new buffer. */
|
||||
skb_new = netdev_alloc_skb(dev, AR2313_BUFSIZE + RX_OFFSET);
|
||||
if (skb_new != NULL) {
|
||||
|
@ -48,7 +48,7 @@
|
|||
/* reset descriptor's curr_addr */
|
||||
rxdesc->addr = virt_to_phys(skb_new->data);
|
||||
|
||||
@@ -1254,6 +1260,8 @@ static int ar231x_mdiobus_probe (struct
|
||||
@@ -1269,6 +1275,8 @@ static int ar231x_mdiobus_probe (struct
|
||||
return PTR_ERR(phydev);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/ar231x/reset.c
|
||||
@@ -0,0 +1,160 @@
|
||||
@@ -0,0 +1,161 @@
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/timer.h>
|
||||
|
@ -38,7 +38,8 @@
|
|||
+static struct timer_list rst_button_timer;
|
||||
+static unsigned long seen;
|
||||
+
|
||||
+extern struct sock *uevent_sock;
|
||||
+struct sock *uevent_sock = NULL;
|
||||
+EXPORT_SYMBOL_GPL(uevent_sock);
|
||||
+extern u64 uevent_next_seqnum(void);
|
||||
+
|
||||
+static int no_release_workaround = 1;
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
--- a/arch/mips/ar231x/reset.c
|
||||
+++ b/arch/mips/ar231x/reset.c
|
||||
@@ -24,7 +24,8 @@ struct event_t {
|
||||
static struct timer_list rst_button_timer;
|
||||
static unsigned long seen;
|
||||
|
||||
-extern struct sock *uevent_sock;
|
||||
+struct sock *uevent_sock = NULL;
|
||||
+EXPORT_SYMBOL_GPL(uevent_sock);
|
||||
extern u64 uevent_next_seqnum(void);
|
||||
|
||||
static int no_release_workaround = 1;
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#ifndef ERR
|
||||
#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
|
||||
@@ -283,6 +284,21 @@ int __init ar231x_probe(struct platform_
|
||||
@@ -298,6 +299,21 @@ int __init ar231x_probe(struct platform_
|
||||
|
||||
mdiobus_register(sp->mii_bus);
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
if (ar231x_mdiobus_probe(dev) != 0) {
|
||||
printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name);
|
||||
rx_tasklet_cleanup(dev);
|
||||
@@ -339,8 +355,10 @@ static int __devexit ar231x_remove(struc
|
||||
@@ -354,8 +370,10 @@ static int __devexit ar231x_remove(struc
|
||||
rx_tasklet_cleanup(dev);
|
||||
ar231x_init_cleanup(dev);
|
||||
unregister_netdev(dev);
|
||||
|
@ -43,7 +43,7 @@
|
|||
kfree(dev);
|
||||
return 0;
|
||||
}
|
||||
@@ -841,7 +859,12 @@ static int ar231x_rx_int(struct net_devi
|
||||
@@ -856,7 +874,12 @@ static int ar231x_rx_int(struct net_devi
|
||||
dev->stats.rx_bytes += skb->len;
|
||||
|
||||
/* pass the packet to upper layers */
|
||||
|
@ -57,7 +57,7 @@
|
|||
skb_new->dev = dev;
|
||||
|
||||
/* 16 bit align */
|
||||
@@ -1138,6 +1161,9 @@ static int ar231x_ioctl(struct net_devic
|
||||
@@ -1153,6 +1176,9 @@ static int ar231x_ioctl(struct net_devic
|
||||
struct ar231x_private *sp = netdev_priv(dev);
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
--- a/drivers/net/ar231x.c
|
||||
+++ b/drivers/net/ar231x.c
|
||||
@@ -155,6 +155,18 @@
|
||||
#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
+static void
|
||||
+ar231x_netpoll(struct net_device *dev)
|
||||
+{
|
||||
+ unsigned long flags;
|
||||
+
|
||||
+ local_irq_save(flags);
|
||||
+ ar231x_interrupt(dev->irq, dev);
|
||||
+ local_irq_restore(flags);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static const struct net_device_ops ar231x_ops = {
|
||||
.ndo_open = ar231x_open,
|
||||
.ndo_stop = ar231x_close,
|
||||
@@ -165,6 +177,9 @@
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_tx_timeout = ar231x_tx_timeout,
|
||||
+#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
+ .ndo_poll_controller = ar231x_netpoll,
|
||||
+#endif
|
||||
};
|
||||
|
||||
int __init ar231x_probe(struct platform_device *pdev)
|
Loading…
Reference in New Issue