aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-15 12:40:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-15 12:40:05 -0400
commit2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch)
treede2635426477d86338a9469ce09ba0626052288f /arch
parent0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff)
parent9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits) pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US ipv4: Fix fib_trie rebalancing Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver Bluetooth: Fix Kconfig issue with RFKILL integration PIM-SM: namespace changes ipv4: update ARPD help text net: use a deferred timer in rt_check_expire ieee802154: fix kconfig bool/tristate muckup bonding: initialization rework bonding: use is_zero_ether_addr bonding: network device names are case sensative bonding: elminate bad refcount code bonding: fix style issues bonding: fix destructor bonding: remove bonding read/write semaphore bonding: initialize before registration bonding: bond_create always called with default parameters x_tables: Convert printk to pr_err netfilter: conntrack: optional reliable conntrack event delivery list_nulls: add hlist_nulls_add_head and hlist_nulls_del ...
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/asm/errno.h2
-rw-r--r--arch/arm/kernel/signal.c6
-rw-r--r--arch/arm/mach-pxa/tosa-bt.c30
-rw-r--r--arch/arm/mach-pxa/tosa.c1
-rw-r--r--arch/avr32/kernel/signal.c4
-rw-r--r--arch/mips/include/asm/errno.h2
-rw-r--r--arch/parisc/include/asm/errno.h1
-rw-r--r--arch/powerpc/include/asm/qe.h2
-rw-r--r--arch/powerpc/platforms/82xx/ep8248e.c9
-rw-r--r--arch/powerpc/platforms/pasemi/gpio_mdio.c32
-rw-r--r--arch/sparc/include/asm/errno.h2
11 files changed, 37 insertions, 54 deletions
diff --git a/arch/alpha/include/asm/errno.h b/arch/alpha/include/asm/errno.h
index 69e2655249d2..98099bda9370 100644
--- a/arch/alpha/include/asm/errno.h
+++ b/arch/alpha/include/asm/errno.h
@@ -120,4 +120,6 @@
120#define EOWNERDEAD 136 /* Owner died */ 120#define EOWNERDEAD 136 /* Owner died */
121#define ENOTRECOVERABLE 137 /* State not recoverable */ 121#define ENOTRECOVERABLE 137 /* State not recoverable */
122 122
123#define ERFKILL 138 /* Operation not possible due to RF-kill */
124
123#endif 125#endif
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 442b87476f97..93bb4247b7ed 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -536,7 +536,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
536 return err; 536 return err;
537} 537}
538 538
539static inline void restart_syscall(struct pt_regs *regs) 539static inline void setup_syscall_restart(struct pt_regs *regs)
540{ 540{
541 regs->ARM_r0 = regs->ARM_ORIG_r0; 541 regs->ARM_r0 = regs->ARM_ORIG_r0;
542 regs->ARM_pc -= thumb_mode(regs) ? 2 : 4; 542 regs->ARM_pc -= thumb_mode(regs) ? 2 : 4;
@@ -571,7 +571,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,
571 } 571 }
572 /* fallthrough */ 572 /* fallthrough */
573 case -ERESTARTNOINTR: 573 case -ERESTARTNOINTR:
574 restart_syscall(regs); 574 setup_syscall_restart(regs);
575 } 575 }
576 } 576 }
577 577
@@ -695,7 +695,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
695 if (regs->ARM_r0 == -ERESTARTNOHAND || 695 if (regs->ARM_r0 == -ERESTARTNOHAND ||
696 regs->ARM_r0 == -ERESTARTSYS || 696 regs->ARM_r0 == -ERESTARTSYS ||
697 regs->ARM_r0 == -ERESTARTNOINTR) { 697 regs->ARM_r0 == -ERESTARTNOINTR) {
698 restart_syscall(regs); 698 setup_syscall_restart(regs);
699 } 699 }
700 } 700 }
701 single_step_set(current); 701 single_step_set(current);
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c
index fb0294bd4310..c31e601eb49c 100644
--- a/arch/arm/mach-pxa/tosa-bt.c
+++ b/arch/arm/mach-pxa/tosa-bt.c
@@ -35,21 +35,25 @@ static void tosa_bt_off(struct tosa_bt_data *data)
35 gpio_set_value(data->gpio_reset, 0); 35 gpio_set_value(data->gpio_reset, 0);
36} 36}
37 37
38static int tosa_bt_toggle_radio(void *data, enum rfkill_state state) 38static int tosa_bt_set_block(void *data, bool blocked)
39{ 39{
40 pr_info("BT_RADIO going: %s\n", 40 pr_info("BT_RADIO going: %s\n", blocked ? "off" : "on");
41 state == RFKILL_STATE_ON ? "on" : "off");
42 41
43 if (state == RFKILL_STATE_ON) { 42 if (!blocked) {
44 pr_info("TOSA_BT: going ON\n"); 43 pr_info("TOSA_BT: going ON\n");
45 tosa_bt_on(data); 44 tosa_bt_on(data);
46 } else { 45 } else {
47 pr_info("TOSA_BT: going OFF\n"); 46 pr_info("TOSA_BT: going OFF\n");
48 tosa_bt_off(data); 47 tosa_bt_off(data);
49 } 48 }
49
50 return 0; 50 return 0;
51} 51}
52 52
53static const struct rfkill_ops tosa_bt_rfkill_ops = {
54 .set_block = tosa_bt_set_block,
55};
56
53static int tosa_bt_probe(struct platform_device *dev) 57static int tosa_bt_probe(struct platform_device *dev)
54{ 58{
55 int rc; 59 int rc;
@@ -70,18 +74,14 @@ static int tosa_bt_probe(struct platform_device *dev)
70 if (rc) 74 if (rc)
71 goto err_pwr_dir; 75 goto err_pwr_dir;
72 76
73 rfk = rfkill_allocate(&dev->dev, RFKILL_TYPE_BLUETOOTH); 77 rfk = rfkill_alloc("tosa-bt", &dev->dev, RFKILL_TYPE_BLUETOOTH,
78 &tosa_bt_rfkill_ops, data);
74 if (!rfk) { 79 if (!rfk) {
75 rc = -ENOMEM; 80 rc = -ENOMEM;
76 goto err_rfk_alloc; 81 goto err_rfk_alloc;
77 } 82 }
78 83
79 rfk->name = "tosa-bt"; 84 rfkill_set_led_trigger_name(rfk, "tosa-bt");
80 rfk->toggle_radio = tosa_bt_toggle_radio;
81 rfk->data = data;
82#ifdef CONFIG_RFKILL_LEDS
83 rfk->led_trigger.name = "tosa-bt";
84#endif
85 85
86 rc = rfkill_register(rfk); 86 rc = rfkill_register(rfk);
87 if (rc) 87 if (rc)
@@ -92,9 +92,7 @@ static int tosa_bt_probe(struct platform_device *dev)
92 return 0; 92 return 0;
93 93
94err_rfkill: 94err_rfkill:
95 if (rfk) 95 rfkill_destroy(rfk);
96 rfkill_free(rfk);
97 rfk = NULL;
98err_rfk_alloc: 96err_rfk_alloc:
99 tosa_bt_off(data); 97 tosa_bt_off(data);
100err_pwr_dir: 98err_pwr_dir:
@@ -113,8 +111,10 @@ static int __devexit tosa_bt_remove(struct platform_device *dev)
113 111
114 platform_set_drvdata(dev, NULL); 112 platform_set_drvdata(dev, NULL);
115 113
116 if (rfk) 114 if (rfk) {
117 rfkill_unregister(rfk); 115 rfkill_unregister(rfk);
116 rfkill_destroy(rfk);
117 }
118 rfk = NULL; 118 rfk = NULL;
119 119
120 tosa_bt_off(data); 120 tosa_bt_off(data);
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 168267a5dfb3..117ad5920e53 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -31,7 +31,6 @@
31#include <linux/input.h> 31#include <linux/input.h>
32#include <linux/gpio.h> 32#include <linux/gpio.h>
33#include <linux/pda_power.h> 33#include <linux/pda_power.h>
34#include <linux/rfkill.h>
35#include <linux/spi/spi.h> 34#include <linux/spi/spi.h>
36 35
37#include <asm/setup.h> 36#include <asm/setup.h>
diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c
index 803d7be0938f..27227561bad6 100644
--- a/arch/avr32/kernel/signal.c
+++ b/arch/avr32/kernel/signal.c
@@ -212,7 +212,7 @@ out:
212 return err; 212 return err;
213} 213}
214 214
215static inline void restart_syscall(struct pt_regs *regs) 215static inline void setup_syscall_restart(struct pt_regs *regs)
216{ 216{
217 if (regs->r12 == -ERESTART_RESTARTBLOCK) 217 if (regs->r12 == -ERESTART_RESTARTBLOCK)
218 regs->r8 = __NR_restart_syscall; 218 regs->r8 = __NR_restart_syscall;
@@ -296,7 +296,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
296 } 296 }
297 /* fall through */ 297 /* fall through */
298 case -ERESTARTNOINTR: 298 case -ERESTARTNOINTR:
299 restart_syscall(regs); 299 setup_syscall_restart(regs);
300 } 300 }
301 } 301 }
302 302
diff --git a/arch/mips/include/asm/errno.h b/arch/mips/include/asm/errno.h
index 3c0d840e4577..a0efc73819e4 100644
--- a/arch/mips/include/asm/errno.h
+++ b/arch/mips/include/asm/errno.h
@@ -119,6 +119,8 @@
119#define EOWNERDEAD 165 /* Owner died */ 119#define EOWNERDEAD 165 /* Owner died */
120#define ENOTRECOVERABLE 166 /* State not recoverable */ 120#define ENOTRECOVERABLE 166 /* State not recoverable */
121 121
122#define ERFKILL 167 /* Operation not possible due to RF-kill */
123
122#define EDQUOT 1133 /* Quota exceeded */ 124#define EDQUOT 1133 /* Quota exceeded */
123 125
124#ifdef __KERNEL__ 126#ifdef __KERNEL__
diff --git a/arch/parisc/include/asm/errno.h b/arch/parisc/include/asm/errno.h
index e2f3ddc796be..9992abdd782d 100644
--- a/arch/parisc/include/asm/errno.h
+++ b/arch/parisc/include/asm/errno.h
@@ -120,5 +120,6 @@
120#define EOWNERDEAD 254 /* Owner died */ 120#define EOWNERDEAD 254 /* Owner died */
121#define ENOTRECOVERABLE 255 /* State not recoverable */ 121#define ENOTRECOVERABLE 255 /* State not recoverable */
122 122
123#define ERFKILL 256 /* Operation not possible due to RF-kill */
123 124
124#endif 125#endif
diff --git a/arch/powerpc/include/asm/qe.h b/arch/powerpc/include/asm/qe.h
index e0faf332c9c9..157c5ca581c8 100644
--- a/arch/powerpc/include/asm/qe.h
+++ b/arch/powerpc/include/asm/qe.h
@@ -675,6 +675,8 @@ struct ucc_slow_pram {
675#define UCC_GETH_UPSMR_RMM 0x00001000 675#define UCC_GETH_UPSMR_RMM 0x00001000
676#define UCC_GETH_UPSMR_CAM 0x00000400 676#define UCC_GETH_UPSMR_CAM 0x00000400
677#define UCC_GETH_UPSMR_BRO 0x00000200 677#define UCC_GETH_UPSMR_BRO 0x00000200
678#define UCC_GETH_UPSMR_SMM 0x00000080
679#define UCC_GETH_UPSMR_SGMM 0x00000020
678 680
679/* UCC Transmit On Demand Register (UTODR) */ 681/* UCC Transmit On Demand Register (UTODR) */
680#define UCC_SLOW_TOD 0x8000 682#define UCC_SLOW_TOD 0x8000
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index 0eb6d7f62241..51fcae41f08a 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -14,6 +14,7 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/fsl_devices.h> 15#include <linux/fsl_devices.h>
16#include <linux/mdio-bitbang.h> 16#include <linux/mdio-bitbang.h>
17#include <linux/of_mdio.h>
17#include <linux/of_platform.h> 18#include <linux/of_platform.h>
18 19
19#include <asm/io.h> 20#include <asm/io.h>
@@ -115,7 +116,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
115 struct mii_bus *bus; 116 struct mii_bus *bus;
116 struct resource res; 117 struct resource res;
117 struct device_node *node; 118 struct device_node *node;
118 int ret, i; 119 int ret;
119 120
120 node = of_get_parent(ofdev->node); 121 node = of_get_parent(ofdev->node);
121 of_node_put(node); 122 of_node_put(node);
@@ -130,17 +131,13 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
130 if (!bus) 131 if (!bus)
131 return -ENOMEM; 132 return -ENOMEM;
132 133
133 bus->phy_mask = 0;
134 bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); 134 bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
135 135
136 for (i = 0; i < PHY_MAX_ADDR; i++)
137 bus->irq[i] = -1;
138
139 bus->name = "ep8248e-mdio-bitbang"; 136 bus->name = "ep8248e-mdio-bitbang";
140 bus->parent = &ofdev->dev; 137 bus->parent = &ofdev->dev;
141 snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start); 138 snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
142 139
143 return mdiobus_register(bus); 140 return of_mdiobus_register(bus, ofdev->node);
144} 141}
145 142
146static int ep8248e_mdio_remove(struct of_device *ofdev) 143static int ep8248e_mdio_remove(struct of_device *ofdev)
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index 75cc165d5bee..3bf546797cbb 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -29,7 +29,7 @@
29#include <linux/ioport.h> 29#include <linux/ioport.h>
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/phy.h> 31#include <linux/phy.h>
32#include <linux/platform_device.h> 32#include <linux/of_mdio.h>
33#include <linux/of_platform.h> 33#include <linux/of_platform.h>
34 34
35#define DELAY 1 35#define DELAY 1
@@ -39,6 +39,7 @@ static void __iomem *gpio_regs;
39struct gpio_priv { 39struct gpio_priv {
40 int mdc_pin; 40 int mdc_pin;
41 int mdio_pin; 41 int mdio_pin;
42 int mdio_irqs[PHY_MAX_ADDR];
42}; 43};
43 44
44#define MDC_PIN(bus) (((struct gpio_priv *)bus->priv)->mdc_pin) 45#define MDC_PIN(bus) (((struct gpio_priv *)bus->priv)->mdc_pin)
@@ -218,12 +219,11 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
218 const struct of_device_id *match) 219 const struct of_device_id *match)
219{ 220{
220 struct device *dev = &ofdev->dev; 221 struct device *dev = &ofdev->dev;
221 struct device_node *phy_dn, *np = ofdev->node; 222 struct device_node *np = ofdev->node;
222 struct mii_bus *new_bus; 223 struct mii_bus *new_bus;
223 struct gpio_priv *priv; 224 struct gpio_priv *priv;
224 const unsigned int *prop; 225 const unsigned int *prop;
225 int err; 226 int err;
226 int i;
227 227
228 err = -ENOMEM; 228 err = -ENOMEM;
229 priv = kzalloc(sizeof(struct gpio_priv), GFP_KERNEL); 229 priv = kzalloc(sizeof(struct gpio_priv), GFP_KERNEL);
@@ -244,27 +244,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
244 snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", *prop); 244 snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", *prop);
245 new_bus->priv = priv; 245 new_bus->priv = priv;
246 246
247 new_bus->phy_mask = 0; 247 new_bus->irq = priv->mdio_irqs;
248
249 new_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
250
251 if (!new_bus->irq)
252 goto out_free_bus;
253
254 for (i = 0; i < PHY_MAX_ADDR; i++)
255 new_bus->irq[i] = NO_IRQ;
256
257 for (phy_dn = of_get_next_child(np, NULL);
258 phy_dn != NULL;
259 phy_dn = of_get_next_child(np, phy_dn)) {
260 const unsigned int *ip, *regp;
261
262 ip = of_get_property(phy_dn, "interrupts", NULL);
263 regp = of_get_property(phy_dn, "reg", NULL);
264 if (!ip || !regp || *regp >= PHY_MAX_ADDR)
265 continue;
266 new_bus->irq[*regp] = irq_create_mapping(NULL, *ip);
267 }
268 248
269 prop = of_get_property(np, "mdc-pin", NULL); 249 prop = of_get_property(np, "mdc-pin", NULL);
270 priv->mdc_pin = *prop; 250 priv->mdc_pin = *prop;
@@ -275,7 +255,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
275 new_bus->parent = dev; 255 new_bus->parent = dev;
276 dev_set_drvdata(dev, new_bus); 256 dev_set_drvdata(dev, new_bus);
277 257
278 err = mdiobus_register(new_bus); 258 err = of_mdiobus_register(new_bus, np);
279 259
280 if (err != 0) { 260 if (err != 0) {
281 printk(KERN_ERR "%s: Cannot register as MDIO bus, err %d\n", 261 printk(KERN_ERR "%s: Cannot register as MDIO bus, err %d\n",
@@ -286,8 +266,6 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
286 return 0; 266 return 0;
287 267
288out_free_irq: 268out_free_irq:
289 kfree(new_bus->irq);
290out_free_bus:
291 kfree(new_bus); 269 kfree(new_bus);
292out_free_priv: 270out_free_priv:
293 kfree(priv); 271 kfree(priv);
diff --git a/arch/sparc/include/asm/errno.h b/arch/sparc/include/asm/errno.h
index a9ef172977de..4e2bc490d714 100644
--- a/arch/sparc/include/asm/errno.h
+++ b/arch/sparc/include/asm/errno.h
@@ -110,4 +110,6 @@
110#define EOWNERDEAD 132 /* Owner died */ 110#define EOWNERDEAD 132 /* Owner died */
111#define ENOTRECOVERABLE 133 /* State not recoverable */ 111#define ENOTRECOVERABLE 133 /* State not recoverable */
112 112
113#define ERFKILL 134 /* Operation not possible due to RF-kill */
114
113#endif 115#endif