atheros: merge a few patches into the right place

SVN-Revision: 26556
This commit is contained in:
Felix Fietkau 2011-04-09 18:26:03 +00:00
parent 63c08f0f0b
commit 7486cf730a
6 changed files with 27 additions and 54 deletions

View file

@ -25,7 +25,7 @@
obj-$(CONFIG_DECLANCE) += declance.o obj-$(CONFIG_DECLANCE) += declance.o
--- /dev/null --- /dev/null
+++ b/drivers/net/ar231x.c +++ b/drivers/net/ar231x.c
@@ -0,0 +1,1278 @@ @@ -0,0 +1,1293 @@
+/* +/*
+ * ar231x.c: Linux driver for the Atheros AR231x Ethernet device. + * ar231x.c: Linux driver for the Atheros AR231x Ethernet device.
+ * + *
@ -182,6 +182,18 @@
+#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args) +#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args)
+#endif +#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 = { +static const struct net_device_ops ar231x_ops = {
+ .ndo_open = ar231x_open, + .ndo_open = ar231x_open,
+ .ndo_stop = ar231x_close, + .ndo_stop = ar231x_close,
@ -192,6 +204,9 @@
+ .ndo_validate_addr = eth_validate_addr, + .ndo_validate_addr = eth_validate_addr,
+ .ndo_set_mac_address = eth_mac_addr, + .ndo_set_mac_address = eth_mac_addr,
+ .ndo_tx_timeout = ar231x_tx_timeout, + .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) +int __init ar231x_probe(struct platform_device *pdev)

View file

@ -1,6 +1,6 @@
--- a/drivers/net/ar231x.c --- a/drivers/net/ar231x.c
+++ b/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++) { for (i = 0; i < nr_bufs; i++) {
struct sk_buff *skb; struct sk_buff *skb;
ar231x_descr_t *rd; ar231x_descr_t *rd;
@ -8,7 +8,7 @@
if (sp->rx_skb[idx]) if (sp->rx_skb[idx])
break; 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. * Make sure IP header starts on a fresh cache line.
*/ */
skb->dev = dev; skb->dev = dev;
@ -19,7 +19,7 @@
sp->rx_skb[idx] = skb; sp->rx_skb[idx] = skb;
rd = (ar231x_descr_t *) & sp->rx_ring[idx]; 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. */ /* alloc new buffer. */
skb_new = netdev_alloc_skb(dev, AR2313_BUFSIZE + RX_OFFSET); skb_new = netdev_alloc_skb(dev, AR2313_BUFSIZE + RX_OFFSET);
if (skb_new != NULL) { if (skb_new != NULL) {
@ -48,7 +48,7 @@
/* reset descriptor's curr_addr */ /* reset descriptor's curr_addr */
rxdesc->addr = virt_to_phys(skb_new->data); 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); return PTR_ERR(phydev);
} }

View file

@ -11,7 +11,7 @@
--- /dev/null --- /dev/null
+++ b/arch/mips/ar231x/reset.c +++ b/arch/mips/ar231x/reset.c
@@ -0,0 +1,160 @@ @@ -0,0 +1,161 @@
+#include <linux/init.h> +#include <linux/init.h>
+#include <linux/module.h> +#include <linux/module.h>
+#include <linux/timer.h> +#include <linux/timer.h>
@ -38,7 +38,8 @@
+static struct timer_list rst_button_timer; +static struct timer_list rst_button_timer;
+static unsigned long seen; +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); +extern u64 uevent_next_seqnum(void);
+ +
+static int no_release_workaround = 1; +static int no_release_workaround = 1;

View file

@ -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;

View file

@ -8,7 +8,7 @@
#ifndef ERR #ifndef ERR
#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args) #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); mdiobus_register(sp->mii_bus);
@ -30,7 +30,7 @@
if (ar231x_mdiobus_probe(dev) != 0) { if (ar231x_mdiobus_probe(dev) != 0) {
printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name); printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name);
rx_tasklet_cleanup(dev); 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); rx_tasklet_cleanup(dev);
ar231x_init_cleanup(dev); ar231x_init_cleanup(dev);
unregister_netdev(dev); unregister_netdev(dev);
@ -43,7 +43,7 @@
kfree(dev); kfree(dev);
return 0; 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; dev->stats.rx_bytes += skb->len;
/* pass the packet to upper layers */ /* pass the packet to upper layers */
@ -57,7 +57,7 @@
skb_new->dev = dev; skb_new->dev = dev;
/* 16 bit align */ /* 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); struct ar231x_private *sp = netdev_priv(dev);
int ret; int ret;

View file

@ -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)