From e7db78c341692d2a3dd399659f61e9cef213e360 Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 9 Apr 2011 18:26:03 +0000 Subject: [PATCH] atheros: merge a few patches into the right place git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26556 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches-2.6.37/110-ar2313_ethernet.patch | 17 +++++++++- .../200-ar2313_enable_mvswitch.patch | 8 ++--- .../patches-2.6.37/210-reset_button.patch | 5 +-- .../211-reset_button-2.6.36.patch | 12 ------- .../220-enet_micrel_workaround.patch | 8 ++--- .../patches-2.6.37/240-ar231x_netpoll.patch | 31 ------------------- 6 files changed, 27 insertions(+), 54 deletions(-) delete mode 100644 target/linux/atheros/patches-2.6.37/211-reset_button-2.6.36.patch delete mode 100644 target/linux/atheros/patches-2.6.37/240-ar231x_netpoll.patch diff --git a/target/linux/atheros/patches-2.6.37/110-ar2313_ethernet.patch b/target/linux/atheros/patches-2.6.37/110-ar2313_ethernet.patch index 132fd0131..42d9229b1 100644 --- a/target/linux/atheros/patches-2.6.37/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-2.6.37/110-ar2313_ethernet.patch @@ -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) diff --git a/target/linux/atheros/patches-2.6.37/200-ar2313_enable_mvswitch.patch b/target/linux/atheros/patches-2.6.37/200-ar2313_enable_mvswitch.patch index bb4af76a6..e59005944 100644 --- a/target/linux/atheros/patches-2.6.37/200-ar2313_enable_mvswitch.patch +++ b/target/linux/atheros/patches-2.6.37/200-ar2313_enable_mvswitch.patch @@ -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); } diff --git a/target/linux/atheros/patches-2.6.37/210-reset_button.patch b/target/linux/atheros/patches-2.6.37/210-reset_button.patch index 3c9181814..7bf9d0e14 100644 --- a/target/linux/atheros/patches-2.6.37/210-reset_button.patch +++ b/target/linux/atheros/patches-2.6.37/210-reset_button.patch @@ -11,7 +11,7 @@ --- /dev/null +++ b/arch/mips/ar231x/reset.c -@@ -0,0 +1,160 @@ +@@ -0,0 +1,161 @@ +#include +#include +#include @@ -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; diff --git a/target/linux/atheros/patches-2.6.37/211-reset_button-2.6.36.patch b/target/linux/atheros/patches-2.6.37/211-reset_button-2.6.36.patch deleted file mode 100644 index e19144cc1..000000000 --- a/target/linux/atheros/patches-2.6.37/211-reset_button-2.6.36.patch +++ /dev/null @@ -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; diff --git a/target/linux/atheros/patches-2.6.37/220-enet_micrel_workaround.patch b/target/linux/atheros/patches-2.6.37/220-enet_micrel_workaround.patch index 6d0bf4725..374b29282 100644 --- a/target/linux/atheros/patches-2.6.37/220-enet_micrel_workaround.patch +++ b/target/linux/atheros/patches-2.6.37/220-enet_micrel_workaround.patch @@ -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; diff --git a/target/linux/atheros/patches-2.6.37/240-ar231x_netpoll.patch b/target/linux/atheros/patches-2.6.37/240-ar231x_netpoll.patch deleted file mode 100644 index c2f3d26a9..000000000 --- a/target/linux/atheros/patches-2.6.37/240-ar231x_netpoll.patch +++ /dev/null @@ -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) -- 2.20.1