aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 14:54:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-24 14:54:29 -0400
commit28f3d717618156c0dcd2f497d791b578a7931d87 (patch)
tree37b11581b51929b5473541e53bd242b3e1a9f666 /arch/mips
parent654443e20dfc0617231f28a07c96a979ee1a0239 (diff)
parent1ca7ee30630e1022dbcf1b51be20580815ffab73 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull more networking updates from David Miller: "Ok, everything from here on out will be bug fixes." 1) One final sync of wireless and bluetooth stuff from John Linville. These changes have all been in his tree for more than a week, and therefore have had the necessary -next exposure. John was just away on a trip and didn't have a change to send the pull request until a day or two ago. 2) Put back some defines in user exposed header file areas that were removed during the tokenring purge. From Stephen Hemminger and Paul Gortmaker. 3) A bug fix for UDP hash table allocation got lost in the pile due to one of those "you got it.. no I've got it.." situations. :-) From Tim Bird. 4) SKB coalescing in TCP needs to have stricter checks, otherwise we'll try to coalesce overlapping frags and crash. Fix from Eric Dumazet. 5) RCU routing table lookups can race with free_fib_info(), causing crashes when we deref the device pointers in the route. Fix by releasing the net device in the RCU callback. From Yanmin Zhang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (293 commits) tcp: take care of overlaps in tcp_try_coalesce() ipv4: fix the rcu race between free_fib_info and ip_route_output_slow mm: add a low limit to alloc_large_system_hash ipx: restore token ring define to include/linux/ipx.h if: restore token ring ARP type to header xen: do not disable netfront in dom0 phy/micrel: Fix ID of KSZ9021 mISDN: Add X-Tensions USB ISDN TA XC-525 gianfar:don't add FCB length to hard_header_len Bluetooth: Report proper error number in disconnection Bluetooth: Create flags for bt_sk() Bluetooth: report the right security level in getsockopt Bluetooth: Lock the L2CAP channel when sending Bluetooth: Restore locking semantics when looking up L2CAP channels Bluetooth: Fix a redundant and problematic incoming MTU check Bluetooth: Add support for Foxconn/Hon Hai AR5BBU22 0489:E03C Bluetooth: Fix EIR data generation for mgmt_device_found Bluetooth: Fix Inquiry with RSSI event mask Bluetooth: improve readability of l2cap_seq_list code Bluetooth: Fix skb length calculation ...
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/bcm47xx/setup.c15
-rw-r--r--arch/mips/bcm47xx/sprom.c28
-rw-r--r--arch/mips/include/asm/mach-bcm47xx/bcm47xx.h9
3 files changed, 42 insertions, 10 deletions
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
index 19780aa91708..95bf4d7bac21 100644
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -90,6 +90,7 @@ static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out)
90 char prefix[10]; 90 char prefix[10];
91 91
92 if (bus->bustype == SSB_BUSTYPE_PCI) { 92 if (bus->bustype == SSB_BUSTYPE_PCI) {
93 memset(out, 0, sizeof(struct ssb_sprom));
93 snprintf(prefix, sizeof(prefix), "pci/%u/%u/", 94 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
94 bus->host_pci->bus->number + 1, 95 bus->host_pci->bus->number + 1,
95 PCI_SLOT(bus->host_pci->devfn)); 96 PCI_SLOT(bus->host_pci->devfn));
@@ -109,15 +110,9 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
109 /* Fill boardinfo structure */ 110 /* Fill boardinfo structure */
110 memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo)); 111 memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
111 112
112 if (nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0) 113 bcm47xx_fill_ssb_boardinfo(&iv->boardinfo, NULL);
113 iv->boardinfo.vendor = (u16)simple_strtoul(buf, NULL, 0);
114 else
115 iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM;
116 if (nvram_getenv("boardtype", buf, sizeof(buf)) >= 0)
117 iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0);
118 if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
119 iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0);
120 114
115 memset(&iv->sprom, 0, sizeof(struct ssb_sprom));
121 bcm47xx_fill_sprom(&iv->sprom, NULL); 116 bcm47xx_fill_sprom(&iv->sprom, NULL);
122 117
123 if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0) 118 if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0)
@@ -166,12 +161,14 @@ static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out)
166 161
167 switch (bus->hosttype) { 162 switch (bus->hosttype) {
168 case BCMA_HOSTTYPE_PCI: 163 case BCMA_HOSTTYPE_PCI:
164 memset(out, 0, sizeof(struct ssb_sprom));
169 snprintf(prefix, sizeof(prefix), "pci/%u/%u/", 165 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
170 bus->host_pci->bus->number + 1, 166 bus->host_pci->bus->number + 1,
171 PCI_SLOT(bus->host_pci->devfn)); 167 PCI_SLOT(bus->host_pci->devfn));
172 bcm47xx_fill_sprom(out, prefix); 168 bcm47xx_fill_sprom(out, prefix);
173 return 0; 169 return 0;
174 case BCMA_HOSTTYPE_SOC: 170 case BCMA_HOSTTYPE_SOC:
171 memset(out, 0, sizeof(struct ssb_sprom));
175 bcm47xx_fill_sprom_ethernet(out, NULL); 172 bcm47xx_fill_sprom_ethernet(out, NULL);
176 core = bcma_find_core(bus, BCMA_CORE_80211); 173 core = bcma_find_core(bus, BCMA_CORE_80211);
177 if (core) { 174 if (core) {
@@ -197,6 +194,8 @@ static void __init bcm47xx_register_bcma(void)
197 err = bcma_host_soc_register(&bcm47xx_bus.bcma); 194 err = bcma_host_soc_register(&bcm47xx_bus.bcma);
198 if (err) 195 if (err)
199 panic("Failed to initialize BCMA bus (err %d)", err); 196 panic("Failed to initialize BCMA bus (err %d)", err);
197
198 bcm47xx_fill_bcma_boardinfo(&bcm47xx_bus.bcma.bus.boardinfo, NULL);
200} 199}
201#endif 200#endif
202 201
diff --git a/arch/mips/bcm47xx/sprom.c b/arch/mips/bcm47xx/sprom.c
index 5c8dcd2a8a93..d3a889745e20 100644
--- a/arch/mips/bcm47xx/sprom.c
+++ b/arch/mips/bcm47xx/sprom.c
@@ -165,6 +165,8 @@ static void bcm47xx_fill_sprom_r1234589(struct ssb_sprom *sprom,
165 const char *prefix) 165 const char *prefix)
166{ 166{
167 nvram_read_u16(prefix, NULL, "boardrev", &sprom->board_rev, 0); 167 nvram_read_u16(prefix, NULL, "boardrev", &sprom->board_rev, 0);
168 if (!sprom->board_rev)
169 nvram_read_u16(NULL, NULL, "boardrev", &sprom->board_rev, 0);
168 nvram_read_u16(prefix, NULL, "boardnum", &sprom->board_num, 0); 170 nvram_read_u16(prefix, NULL, "boardnum", &sprom->board_num, 0);
169 nvram_read_u8(prefix, NULL, "ledbh0", &sprom->gpio0, 0xff); 171 nvram_read_u8(prefix, NULL, "ledbh0", &sprom->gpio0, 0xff);
170 nvram_read_u8(prefix, NULL, "ledbh1", &sprom->gpio1, 0xff); 172 nvram_read_u8(prefix, NULL, "ledbh1", &sprom->gpio1, 0xff);
@@ -555,8 +557,6 @@ void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, const char *prefix)
555 557
556void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix) 558void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix)
557{ 559{
558 memset(sprom, 0, sizeof(struct ssb_sprom));
559
560 bcm47xx_fill_sprom_ethernet(sprom, prefix); 560 bcm47xx_fill_sprom_ethernet(sprom, prefix);
561 561
562 nvram_read_u8(prefix, NULL, "sromrev", &sprom->revision, 0); 562 nvram_read_u8(prefix, NULL, "sromrev", &sprom->revision, 0);
@@ -618,3 +618,27 @@ void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix)
618 bcm47xx_fill_sprom_r1(sprom, prefix); 618 bcm47xx_fill_sprom_r1(sprom, prefix);
619 } 619 }
620} 620}
621
622#ifdef CONFIG_BCM47XX_SSB
623void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo,
624 const char *prefix)
625{
626 nvram_read_u16(prefix, NULL, "boardvendor", &boardinfo->vendor, 0);
627 if (!boardinfo->vendor)
628 boardinfo->vendor = SSB_BOARDVENDOR_BCM;
629
630 nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0);
631}
632#endif
633
634#ifdef CONFIG_BCM47XX_BCMA
635void bcm47xx_fill_bcma_boardinfo(struct bcma_boardinfo *boardinfo,
636 const char *prefix)
637{
638 nvram_read_u16(prefix, NULL, "boardvendor", &boardinfo->vendor, 0);
639 if (!boardinfo->vendor)
640 boardinfo->vendor = SSB_BOARDVENDOR_BCM;
641
642 nvram_read_u16(prefix, NULL, "boardtype", &boardinfo->type, 0);
643}
644#endif
diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
index 5ecaf47b34d2..26fdaf40b930 100644
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
@@ -47,4 +47,13 @@ extern enum bcm47xx_bus_type bcm47xx_bus_type;
47void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix); 47void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix);
48void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, const char *prefix); 48void bcm47xx_fill_sprom_ethernet(struct ssb_sprom *sprom, const char *prefix);
49 49
50#ifdef CONFIG_BCM47XX_SSB
51void bcm47xx_fill_ssb_boardinfo(struct ssb_boardinfo *boardinfo,
52 const char *prefix);
53#endif
54#ifdef CONFIG_BCM47XX_BCMA
55void bcm47xx_fill_bcma_boardinfo(struct bcma_boardinfo *boardinfo,
56 const char *prefix);
57#endif
58
50#endif /* __ASM_BCM47XX_H */ 59#endif /* __ASM_BCM47XX_H */