diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-04 15:04:04 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-04 15:04:04 -0400 |
commit | 8040d77688014987ca5738bf1731db72ab273441 (patch) | |
tree | 99caf0f4ca88eeeb6e2b812a4002c5c0387f3ef9 | |
parent | fb481dd56adf3c5b0993b8f052cc9ba966e3959d (diff) | |
parent | 268364a0f48aee2f851f9d1ef8a6cda0f3039ef1 (diff) |
Merge branch 'core/resources' into x86/core
48 files changed, 356 insertions, 240 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 9155c9312c1e..c6be19e9ceae 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -116,6 +116,11 @@ ifeq ($(CONFIG_6xx),y) | |||
116 | KBUILD_CFLAGS += -mcpu=powerpc | 116 | KBUILD_CFLAGS += -mcpu=powerpc |
117 | endif | 117 | endif |
118 | 118 | ||
119 | # Work around a gcc code-gen bug with -fno-omit-frame-pointer. | ||
120 | ifeq ($(CONFIG_FTRACE),y) | ||
121 | KBUILD_CFLAGS += -mno-sched-epilog | ||
122 | endif | ||
123 | |||
119 | cpu-as-$(CONFIG_4xx) += -Wa,-m405 | 124 | cpu-as-$(CONFIG_4xx) += -Wa,-m405 |
120 | cpu-as-$(CONFIG_6xx) += -Wa,-maltivec | 125 | cpu-as-$(CONFIG_6xx) += -Wa,-maltivec |
121 | cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec | 126 | cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec |
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h index db0b8f3b8807..4597c491e9b5 100644 --- a/arch/powerpc/include/asm/pgtable-ppc64.h +++ b/arch/powerpc/include/asm/pgtable-ppc64.h | |||
@@ -153,12 +153,10 @@ | |||
153 | #define __S110 PAGE_SHARED_X | 153 | #define __S110 PAGE_SHARED_X |
154 | #define __S111 PAGE_SHARED_X | 154 | #define __S111 PAGE_SHARED_X |
155 | 155 | ||
156 | #ifdef CONFIG_HUGETLB_PAGE | 156 | #ifdef CONFIG_PPC_MM_SLICES |
157 | |||
158 | #define HAVE_ARCH_UNMAPPED_AREA | 157 | #define HAVE_ARCH_UNMAPPED_AREA |
159 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN | 158 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN |
160 | 159 | #endif /* CONFIG_PPC_MM_SLICES */ | |
161 | #endif | ||
162 | 160 | ||
163 | #ifndef __ASSEMBLY__ | 161 | #ifndef __ASSEMBLY__ |
164 | 162 | ||
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 64f5948ebc9d..946daea780f1 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -14,12 +14,13 @@ endif | |||
14 | 14 | ||
15 | ifdef CONFIG_FTRACE | 15 | ifdef CONFIG_FTRACE |
16 | # Do not trace early boot code | 16 | # Do not trace early boot code |
17 | CFLAGS_REMOVE_cputable.o = -pg | 17 | CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog |
18 | CFLAGS_REMOVE_prom_init.o = -pg | 18 | CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog |
19 | CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog | ||
19 | 20 | ||
20 | ifdef CONFIG_DYNAMIC_FTRACE | 21 | ifdef CONFIG_DYNAMIC_FTRACE |
21 | # dynamic ftrace setup. | 22 | # dynamic ftrace setup. |
22 | CFLAGS_REMOVE_ftrace.o = -pg | 23 | CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog |
23 | endif | 24 | endif |
24 | 25 | ||
25 | endif | 26 | endif |
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 367129789cc0..5af4e9b2dbe2 100644 --- a/arch/powerpc/kernel/align.c +++ b/arch/powerpc/kernel/align.c | |||
@@ -647,7 +647,7 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg, | |||
647 | unsigned int flags, unsigned int length) | 647 | unsigned int flags, unsigned int length) |
648 | { | 648 | { |
649 | char *ptr = (char *) ¤t->thread.TS_FPR(reg); | 649 | char *ptr = (char *) ¤t->thread.TS_FPR(reg); |
650 | int ret; | 650 | int ret = 0; |
651 | 651 | ||
652 | flush_vsx_to_thread(current); | 652 | flush_vsx_to_thread(current); |
653 | 653 | ||
diff --git a/arch/powerpc/kernel/idle_6xx.S b/arch/powerpc/kernel/idle_6xx.S index 019b02d8844f..15c611de1ee2 100644 --- a/arch/powerpc/kernel/idle_6xx.S +++ b/arch/powerpc/kernel/idle_6xx.S | |||
@@ -158,7 +158,7 @@ _GLOBAL(power_save_ppc32_restore) | |||
158 | stw r9,_NIP(r11) /* make it do a blr */ | 158 | stw r9,_NIP(r11) /* make it do a blr */ |
159 | 159 | ||
160 | #ifdef CONFIG_SMP | 160 | #ifdef CONFIG_SMP |
161 | mfspr r12,SPRN_SPRG3 | 161 | rlwinm r12,r11,0,0,31-THREAD_SHIFT |
162 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ | 162 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ |
163 | slwi r11,r11,2 | 163 | slwi r11,r11,2 |
164 | #else | 164 | #else |
diff --git a/arch/powerpc/kernel/idle_e500.S b/arch/powerpc/kernel/idle_e500.S index 06304034b393..47a1a983ff88 100644 --- a/arch/powerpc/kernel/idle_e500.S +++ b/arch/powerpc/kernel/idle_e500.S | |||
@@ -84,10 +84,11 @@ _GLOBAL(power_save_ppc32_restore) | |||
84 | stw r9,_NIP(r11) /* make it do a blr */ | 84 | stw r9,_NIP(r11) /* make it do a blr */ |
85 | 85 | ||
86 | #ifdef CONFIG_SMP | 86 | #ifdef CONFIG_SMP |
87 | mfspr r12,SPRN_SPRG3 | 87 | rlwinm r12,r1,0,0,31-THREAD_SHIFT |
88 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ | 88 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ |
89 | slwi r11,r11,2 | 89 | slwi r11,r11,2 |
90 | #else | 90 | #else |
91 | li r11,0 | 91 | li r11,0 |
92 | #endif | 92 | #endif |
93 | |||
93 | b transfer_to_handler_cont | 94 | b transfer_to_handler_cont |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 4a8ce62fe112..9f6c1ca1739e 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -66,11 +66,12 @@ SECTIONS | |||
66 | __got2_end = .; | 66 | __got2_end = .; |
67 | #endif /* CONFIG_PPC32 */ | 67 | #endif /* CONFIG_PPC32 */ |
68 | 68 | ||
69 | . = ALIGN(PAGE_SIZE); | ||
70 | _etext = .; | ||
71 | PROVIDE32 (etext = .); | ||
72 | } :kernel | 69 | } :kernel |
73 | 70 | ||
71 | . = ALIGN(PAGE_SIZE); | ||
72 | _etext = .; | ||
73 | PROVIDE32 (etext = .); | ||
74 | |||
74 | /* Read-only data */ | 75 | /* Read-only data */ |
75 | RODATA | 76 | RODATA |
76 | 77 | ||
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 14be408dfc9b..8920eea34528 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -191,12 +191,17 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend, | |||
191 | unsigned long hash, hpteg; | 191 | unsigned long hash, hpteg; |
192 | unsigned long vsid = get_kernel_vsid(vaddr, ssize); | 192 | unsigned long vsid = get_kernel_vsid(vaddr, ssize); |
193 | unsigned long va = hpt_va(vaddr, vsid, ssize); | 193 | unsigned long va = hpt_va(vaddr, vsid, ssize); |
194 | unsigned long tprot = prot; | ||
195 | |||
196 | /* Make kernel text executable */ | ||
197 | if (in_kernel_text(vaddr)) | ||
198 | tprot &= ~HPTE_R_N; | ||
194 | 199 | ||
195 | hash = hpt_hash(va, shift, ssize); | 200 | hash = hpt_hash(va, shift, ssize); |
196 | hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); | 201 | hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); |
197 | 202 | ||
198 | BUG_ON(!ppc_md.hpte_insert); | 203 | BUG_ON(!ppc_md.hpte_insert); |
199 | ret = ppc_md.hpte_insert(hpteg, va, paddr, prot, | 204 | ret = ppc_md.hpte_insert(hpteg, va, paddr, tprot, |
200 | HPTE_V_BOLTED, psize, ssize); | 205 | HPTE_V_BOLTED, psize, ssize); |
201 | 206 | ||
202 | if (ret < 0) | 207 | if (ret < 0) |
@@ -584,7 +589,7 @@ void __init htab_initialize(void) | |||
584 | { | 589 | { |
585 | unsigned long table; | 590 | unsigned long table; |
586 | unsigned long pteg_count; | 591 | unsigned long pteg_count; |
587 | unsigned long prot, tprot; | 592 | unsigned long prot; |
588 | unsigned long base = 0, size = 0, limit; | 593 | unsigned long base = 0, size = 0, limit; |
589 | int i; | 594 | int i; |
590 | 595 | ||
@@ -660,10 +665,9 @@ void __init htab_initialize(void) | |||
660 | for (i=0; i < lmb.memory.cnt; i++) { | 665 | for (i=0; i < lmb.memory.cnt; i++) { |
661 | base = (unsigned long)__va(lmb.memory.region[i].base); | 666 | base = (unsigned long)__va(lmb.memory.region[i].base); |
662 | size = lmb.memory.region[i].size; | 667 | size = lmb.memory.region[i].size; |
663 | tprot = prot | (in_kernel_text(base) ? _PAGE_EXEC : 0); | ||
664 | 668 | ||
665 | DBG("creating mapping for region: %lx..%lx (prot: %x)\n", | 669 | DBG("creating mapping for region: %lx..%lx (prot: %x)\n", |
666 | base, size, tprot); | 670 | base, size, prot); |
667 | 671 | ||
668 | #ifdef CONFIG_U3_DART | 672 | #ifdef CONFIG_U3_DART |
669 | /* Do not map the DART space. Fortunately, it will be aligned | 673 | /* Do not map the DART space. Fortunately, it will be aligned |
@@ -680,21 +684,21 @@ void __init htab_initialize(void) | |||
680 | unsigned long dart_table_end = dart_tablebase + 16 * MB; | 684 | unsigned long dart_table_end = dart_tablebase + 16 * MB; |
681 | if (base != dart_tablebase) | 685 | if (base != dart_tablebase) |
682 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, | 686 | BUG_ON(htab_bolt_mapping(base, dart_tablebase, |
683 | __pa(base), tprot, | 687 | __pa(base), prot, |
684 | mmu_linear_psize, | 688 | mmu_linear_psize, |
685 | mmu_kernel_ssize)); | 689 | mmu_kernel_ssize)); |
686 | if ((base + size) > dart_table_end) | 690 | if ((base + size) > dart_table_end) |
687 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, | 691 | BUG_ON(htab_bolt_mapping(dart_tablebase+16*MB, |
688 | base + size, | 692 | base + size, |
689 | __pa(dart_table_end), | 693 | __pa(dart_table_end), |
690 | tprot, | 694 | prot, |
691 | mmu_linear_psize, | 695 | mmu_linear_psize, |
692 | mmu_kernel_ssize)); | 696 | mmu_kernel_ssize)); |
693 | continue; | 697 | continue; |
694 | } | 698 | } |
695 | #endif /* CONFIG_U3_DART */ | 699 | #endif /* CONFIG_U3_DART */ |
696 | BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), | 700 | BUG_ON(htab_bolt_mapping(base, base + size, __pa(base), |
697 | tprot, mmu_linear_psize, mmu_kernel_ssize)); | 701 | prot, mmu_linear_psize, mmu_kernel_ssize)); |
698 | } | 702 | } |
699 | 703 | ||
700 | /* | 704 | /* |
diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index 58ecdd72630f..be60d64be7ad 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile | |||
@@ -2,7 +2,7 @@ CFLAGS_bootx_init.o += -fPIC | |||
2 | 2 | ||
3 | ifdef CONFIG_FTRACE | 3 | ifdef CONFIG_FTRACE |
4 | # Do not trace early boot code | 4 | # Do not trace early boot code |
5 | CFLAGS_REMOVE_bootx_init.o = -pg | 5 | CFLAGS_REMOVE_bootx_init.o = -pg -mno-sched-epilog |
6 | endif | 6 | endif |
7 | 7 | ||
8 | obj-y += pic.o setup.o time.o feature.o pci.o \ | 8 | obj-y += pic.o setup.o time.o feature.o pci.o \ |
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index a14dba1afcc5..fd705d1295a7 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h | |||
@@ -151,6 +151,8 @@ struct sw_rx_page { | |||
151 | #define PAGES_PER_SGE_SHIFT 0 | 151 | #define PAGES_PER_SGE_SHIFT 0 |
152 | #define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT) | 152 | #define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT) |
153 | 153 | ||
154 | #define BCM_RX_ETH_PAYLOAD_ALIGN 64 | ||
155 | |||
154 | /* SGE ring related macros */ | 156 | /* SGE ring related macros */ |
155 | #define NUM_RX_SGE_PAGES 2 | 157 | #define NUM_RX_SGE_PAGES 2 |
156 | #define RX_SGE_CNT (BCM_PAGE_SIZE / sizeof(struct eth_rx_sge)) | 158 | #define RX_SGE_CNT (BCM_PAGE_SIZE / sizeof(struct eth_rx_sge)) |
@@ -750,8 +752,7 @@ struct bnx2x { | |||
750 | 752 | ||
751 | u32 rx_csum; | 753 | u32 rx_csum; |
752 | u32 rx_offset; | 754 | u32 rx_offset; |
753 | u32 rx_buf_use_size; /* useable size */ | 755 | u32 rx_buf_size; |
754 | u32 rx_buf_size; /* with alignment */ | ||
755 | #define ETH_OVREHEAD (ETH_HLEN + 8) /* 8 for CRC + VLAN */ | 756 | #define ETH_OVREHEAD (ETH_HLEN + 8) /* 8 for CRC + VLAN */ |
756 | #define ETH_MIN_PACKET_SIZE 60 | 757 | #define ETH_MIN_PACKET_SIZE 60 |
757 | #define ETH_MAX_PACKET_SIZE 1500 | 758 | #define ETH_MAX_PACKET_SIZE 1500 |
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 82deea0a63f5..a8eb3c4a47c8 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -59,8 +59,8 @@ | |||
59 | #include "bnx2x.h" | 59 | #include "bnx2x.h" |
60 | #include "bnx2x_init.h" | 60 | #include "bnx2x_init.h" |
61 | 61 | ||
62 | #define DRV_MODULE_VERSION "1.45.20" | 62 | #define DRV_MODULE_VERSION "1.45.21" |
63 | #define DRV_MODULE_RELDATE "2008/08/25" | 63 | #define DRV_MODULE_RELDATE "2008/09/03" |
64 | #define BNX2X_BC_VER 0x040200 | 64 | #define BNX2X_BC_VER 0x040200 |
65 | 65 | ||
66 | /* Time in jiffies before concluding the transmitter is hung */ | 66 | /* Time in jiffies before concluding the transmitter is hung */ |
@@ -1027,7 +1027,7 @@ static inline int bnx2x_alloc_rx_skb(struct bnx2x *bp, | |||
1027 | if (unlikely(skb == NULL)) | 1027 | if (unlikely(skb == NULL)) |
1028 | return -ENOMEM; | 1028 | return -ENOMEM; |
1029 | 1029 | ||
1030 | mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size, | 1030 | mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_size, |
1031 | PCI_DMA_FROMDEVICE); | 1031 | PCI_DMA_FROMDEVICE); |
1032 | if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { | 1032 | if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { |
1033 | dev_kfree_skb(skb); | 1033 | dev_kfree_skb(skb); |
@@ -1169,7 +1169,7 @@ static void bnx2x_tpa_start(struct bnx2x_fastpath *fp, u16 queue, | |||
1169 | /* move empty skb from pool to prod and map it */ | 1169 | /* move empty skb from pool to prod and map it */ |
1170 | prod_rx_buf->skb = fp->tpa_pool[queue].skb; | 1170 | prod_rx_buf->skb = fp->tpa_pool[queue].skb; |
1171 | mapping = pci_map_single(bp->pdev, fp->tpa_pool[queue].skb->data, | 1171 | mapping = pci_map_single(bp->pdev, fp->tpa_pool[queue].skb->data, |
1172 | bp->rx_buf_use_size, PCI_DMA_FROMDEVICE); | 1172 | bp->rx_buf_size, PCI_DMA_FROMDEVICE); |
1173 | pci_unmap_addr_set(prod_rx_buf, mapping, mapping); | 1173 | pci_unmap_addr_set(prod_rx_buf, mapping, mapping); |
1174 | 1174 | ||
1175 | /* move partial skb from cons to pool (don't unmap yet) */ | 1175 | /* move partial skb from cons to pool (don't unmap yet) */ |
@@ -1276,7 +1276,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, | |||
1276 | pool entry status to BNX2X_TPA_STOP even if new skb allocation | 1276 | pool entry status to BNX2X_TPA_STOP even if new skb allocation |
1277 | fails. */ | 1277 | fails. */ |
1278 | pci_unmap_single(bp->pdev, pci_unmap_addr(rx_buf, mapping), | 1278 | pci_unmap_single(bp->pdev, pci_unmap_addr(rx_buf, mapping), |
1279 | bp->rx_buf_use_size, PCI_DMA_FROMDEVICE); | 1279 | bp->rx_buf_size, PCI_DMA_FROMDEVICE); |
1280 | 1280 | ||
1281 | if (likely(new_skb)) { | 1281 | if (likely(new_skb)) { |
1282 | /* fix ip xsum and give it to the stack */ | 1282 | /* fix ip xsum and give it to the stack */ |
@@ -1520,7 +1520,7 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget) | |||
1520 | } else if (bnx2x_alloc_rx_skb(bp, fp, bd_prod) == 0) { | 1520 | } else if (bnx2x_alloc_rx_skb(bp, fp, bd_prod) == 0) { |
1521 | pci_unmap_single(bp->pdev, | 1521 | pci_unmap_single(bp->pdev, |
1522 | pci_unmap_addr(rx_buf, mapping), | 1522 | pci_unmap_addr(rx_buf, mapping), |
1523 | bp->rx_buf_use_size, | 1523 | bp->rx_buf_size, |
1524 | PCI_DMA_FROMDEVICE); | 1524 | PCI_DMA_FROMDEVICE); |
1525 | skb_reserve(skb, pad); | 1525 | skb_reserve(skb, pad); |
1526 | skb_put(skb, len); | 1526 | skb_put(skb, len); |
@@ -4229,7 +4229,7 @@ static inline void bnx2x_free_tpa_pool(struct bnx2x *bp, | |||
4229 | if (fp->tpa_state[i] == BNX2X_TPA_START) | 4229 | if (fp->tpa_state[i] == BNX2X_TPA_START) |
4230 | pci_unmap_single(bp->pdev, | 4230 | pci_unmap_single(bp->pdev, |
4231 | pci_unmap_addr(rx_buf, mapping), | 4231 | pci_unmap_addr(rx_buf, mapping), |
4232 | bp->rx_buf_use_size, | 4232 | bp->rx_buf_size, |
4233 | PCI_DMA_FROMDEVICE); | 4233 | PCI_DMA_FROMDEVICE); |
4234 | 4234 | ||
4235 | dev_kfree_skb(skb); | 4235 | dev_kfree_skb(skb); |
@@ -4245,15 +4245,14 @@ static void bnx2x_init_rx_rings(struct bnx2x *bp) | |||
4245 | u16 ring_prod, cqe_ring_prod; | 4245 | u16 ring_prod, cqe_ring_prod; |
4246 | int i, j; | 4246 | int i, j; |
4247 | 4247 | ||
4248 | bp->rx_buf_use_size = bp->dev->mtu; | 4248 | bp->rx_buf_size = bp->dev->mtu; |
4249 | bp->rx_buf_use_size += bp->rx_offset + ETH_OVREHEAD; | 4249 | bp->rx_buf_size += bp->rx_offset + ETH_OVREHEAD + |
4250 | bp->rx_buf_size = bp->rx_buf_use_size + 64; | 4250 | BCM_RX_ETH_PAYLOAD_ALIGN; |
4251 | 4251 | ||
4252 | if (bp->flags & TPA_ENABLE_FLAG) { | 4252 | if (bp->flags & TPA_ENABLE_FLAG) { |
4253 | DP(NETIF_MSG_IFUP, | 4253 | DP(NETIF_MSG_IFUP, |
4254 | "rx_buf_use_size %d rx_buf_size %d effective_mtu %d\n", | 4254 | "rx_buf_size %d effective_mtu %d\n", |
4255 | bp->rx_buf_use_size, bp->rx_buf_size, | 4255 | bp->rx_buf_size, bp->dev->mtu + ETH_OVREHEAD); |
4256 | bp->dev->mtu + ETH_OVREHEAD); | ||
4257 | 4256 | ||
4258 | for_each_queue(bp, j) { | 4257 | for_each_queue(bp, j) { |
4259 | struct bnx2x_fastpath *fp = &bp->fp[j]; | 4258 | struct bnx2x_fastpath *fp = &bp->fp[j]; |
@@ -4462,9 +4461,10 @@ static void bnx2x_init_context(struct bnx2x *bp) | |||
4462 | context->ustorm_st_context.common.status_block_id = sb_id; | 4461 | context->ustorm_st_context.common.status_block_id = sb_id; |
4463 | context->ustorm_st_context.common.flags = | 4462 | context->ustorm_st_context.common.flags = |
4464 | USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_MC_ALIGNMENT; | 4463 | USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_MC_ALIGNMENT; |
4465 | context->ustorm_st_context.common.mc_alignment_size = 64; | 4464 | context->ustorm_st_context.common.mc_alignment_size = |
4465 | BCM_RX_ETH_PAYLOAD_ALIGN; | ||
4466 | context->ustorm_st_context.common.bd_buff_size = | 4466 | context->ustorm_st_context.common.bd_buff_size = |
4467 | bp->rx_buf_use_size; | 4467 | bp->rx_buf_size; |
4468 | context->ustorm_st_context.common.bd_page_base_hi = | 4468 | context->ustorm_st_context.common.bd_page_base_hi = |
4469 | U64_HI(fp->rx_desc_mapping); | 4469 | U64_HI(fp->rx_desc_mapping); |
4470 | context->ustorm_st_context.common.bd_page_base_lo = | 4470 | context->ustorm_st_context.common.bd_page_base_lo = |
@@ -4717,7 +4717,7 @@ static void bnx2x_init_internal_func(struct bnx2x *bp) | |||
4717 | } | 4717 | } |
4718 | 4718 | ||
4719 | /* Init CQ ring mapping and aggregation size */ | 4719 | /* Init CQ ring mapping and aggregation size */ |
4720 | max_agg_size = min((u32)(bp->rx_buf_use_size + | 4720 | max_agg_size = min((u32)(bp->rx_buf_size + |
4721 | 8*BCM_PAGE_SIZE*PAGES_PER_SGE), | 4721 | 8*BCM_PAGE_SIZE*PAGES_PER_SGE), |
4722 | (u32)0xffff); | 4722 | (u32)0xffff); |
4723 | for_each_queue(bp, i) { | 4723 | for_each_queue(bp, i) { |
@@ -5940,7 +5940,7 @@ static void bnx2x_free_rx_skbs(struct bnx2x *bp) | |||
5940 | 5940 | ||
5941 | pci_unmap_single(bp->pdev, | 5941 | pci_unmap_single(bp->pdev, |
5942 | pci_unmap_addr(rx_buf, mapping), | 5942 | pci_unmap_addr(rx_buf, mapping), |
5943 | bp->rx_buf_use_size, | 5943 | bp->rx_buf_size, |
5944 | PCI_DMA_FROMDEVICE); | 5944 | PCI_DMA_FROMDEVICE); |
5945 | 5945 | ||
5946 | rx_buf->skb = NULL; | 5946 | rx_buf->skb = NULL; |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 53f41b649f03..a417be7f8be5 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2304,6 +2304,12 @@ static int __devinit ixgbe_set_interrupt_capability(struct ixgbe_adapter | |||
2304 | int vector, v_budget; | 2304 | int vector, v_budget; |
2305 | 2305 | ||
2306 | /* | 2306 | /* |
2307 | * Set the default interrupt throttle rate. | ||
2308 | */ | ||
2309 | adapter->rx_eitr = (1000000 / IXGBE_DEFAULT_ITR_RX_USECS); | ||
2310 | adapter->tx_eitr = (1000000 / IXGBE_DEFAULT_ITR_TX_USECS); | ||
2311 | |||
2312 | /* | ||
2307 | * It's easy to be greedy for MSI-X vectors, but it really | 2313 | * It's easy to be greedy for MSI-X vectors, but it really |
2308 | * doesn't do us much good if we have a lot more vectors | 2314 | * doesn't do us much good if we have a lot more vectors |
2309 | * than CPU's. So let's be conservative and only ask for | 2315 | * than CPU's. So let's be conservative and only ask for |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 32bb47adbe39..008fd6618a5f 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -359,16 +359,6 @@ static void netxen_pcie_strap_init(struct netxen_adapter *adapter) | |||
359 | int i, pos; | 359 | int i, pos; |
360 | struct pci_dev *pdev; | 360 | struct pci_dev *pdev; |
361 | 361 | ||
362 | pdev = pci_get_device(0x1166, 0x0140, NULL); | ||
363 | if (pdev) { | ||
364 | pci_dev_put(pdev); | ||
365 | adapter->hw_read_wx(adapter, | ||
366 | NETXEN_PCIE_REG(PCIE_TGT_SPLIT_CHICKEN), &chicken, 4); | ||
367 | chicken |= 0x4000; | ||
368 | adapter->hw_write_wx(adapter, | ||
369 | NETXEN_PCIE_REG(PCIE_TGT_SPLIT_CHICKEN), &chicken, 4); | ||
370 | } | ||
371 | |||
372 | pdev = adapter->pdev; | 362 | pdev = adapter->pdev; |
373 | 363 | ||
374 | adapter->hw_read_wx(adapter, | 364 | adapter->hw_read_wx(adapter, |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 3f682d49a4e6..52bf11b73c6e 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -784,6 +784,7 @@ static struct pcmcia_device_id axnet_ids[] = { | |||
784 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEther PCC-TXD", 0x5261440f, 0x436768c5), | 784 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEther PCC-TXD", 0x5261440f, 0x436768c5), |
785 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEtherII PCC-TXD", 0x5261440f, 0x730df72e), | 785 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEtherII PCC-TXD", 0x5261440f, 0x730df72e), |
786 | PCMCIA_DEVICE_PROD_ID12("Dynalink", "L100C16", 0x55632fd5, 0x66bc2a90), | 786 | PCMCIA_DEVICE_PROD_ID12("Dynalink", "L100C16", 0x55632fd5, 0x66bc2a90), |
787 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2), | ||
787 | PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8), | 788 | PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8), |
788 | PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609), | 789 | PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609), |
789 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04), | 790 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04), |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 2d4c4ad89b8d..ebc1ae6bcbe5 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -1626,6 +1626,7 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
1626 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-TD", 0x5261440f, 0xc49bd73d), | 1626 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-TD", 0x5261440f, 0xc49bd73d), |
1627 | PCMCIA_DEVICE_PROD_ID12("Corega K.K.", "corega EtherII PCC-TD", 0xd4fdcbd8, 0xc49bd73d), | 1627 | PCMCIA_DEVICE_PROD_ID12("Corega K.K.", "corega EtherII PCC-TD", 0xd4fdcbd8, 0xc49bd73d), |
1628 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega Ether PCC-T", 0x5261440f, 0x6705fcaa), | 1628 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega Ether PCC-T", 0x5261440f, 0x6705fcaa), |
1629 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega Ether PCC-TD", 0x5261440f, 0x47d5ca83), | ||
1629 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FastEther PCC-TX", 0x5261440f, 0x485e85d9), | 1630 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FastEther PCC-TX", 0x5261440f, 0x485e85d9), |
1630 | PCMCIA_DEVICE_PROD_ID12("Corega,K.K.", "Ethernet LAN Card", 0x110d26d9, 0x9fd2f0a2), | 1631 | PCMCIA_DEVICE_PROD_ID12("Corega,K.K.", "Ethernet LAN Card", 0x110d26d9, 0x9fd2f0a2), |
1631 | PCMCIA_DEVICE_PROD_ID12("corega,K.K.", "Ethernet LAN Card", 0x9791a90e, 0x9fd2f0a2), | 1632 | PCMCIA_DEVICE_PROD_ID12("corega,K.K.", "Ethernet LAN Card", 0x9791a90e, 0x9fd2f0a2), |
@@ -1737,7 +1738,6 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
1737 | PCMCIA_DEVICE_PROD_ID1("CyQ've 10 Base-T LAN CARD", 0x94faf360), | 1738 | PCMCIA_DEVICE_PROD_ID1("CyQ've 10 Base-T LAN CARD", 0x94faf360), |
1738 | PCMCIA_DEVICE_PROD_ID1("EP-210 PCMCIA LAN CARD.", 0x8850b4de), | 1739 | PCMCIA_DEVICE_PROD_ID1("EP-210 PCMCIA LAN CARD.", 0x8850b4de), |
1739 | PCMCIA_DEVICE_PROD_ID1("ETHER-C16", 0x06a8514f), | 1740 | PCMCIA_DEVICE_PROD_ID1("ETHER-C16", 0x06a8514f), |
1740 | PCMCIA_DEVICE_PROD_ID1("IC-CARD", 0x60cb09a6), | ||
1741 | PCMCIA_DEVICE_PROD_ID1("NE2000 Compatible", 0x75b8ad5a), | 1741 | PCMCIA_DEVICE_PROD_ID1("NE2000 Compatible", 0x75b8ad5a), |
1742 | PCMCIA_DEVICE_PROD_ID2("EN-6200P2", 0xa996d078), | 1742 | PCMCIA_DEVICE_PROD_ID2("EN-6200P2", 0xa996d078), |
1743 | /* too generic! */ | 1743 | /* too generic! */ |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index a84ba487c713..8c19307e5040 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -117,7 +117,7 @@ static void ctrl_callback(struct urb *urb) | |||
117 | case -ENOENT: | 117 | case -ENOENT: |
118 | break; | 118 | break; |
119 | default: | 119 | default: |
120 | if (netif_msg_drv(pegasus)) | 120 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
121 | dev_dbg(&pegasus->intf->dev, "%s, status %d\n", | 121 | dev_dbg(&pegasus->intf->dev, "%s, status %d\n", |
122 | __FUNCTION__, urb->status); | 122 | __FUNCTION__, urb->status); |
123 | } | 123 | } |
@@ -166,7 +166,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
166 | set_current_state(TASK_RUNNING); | 166 | set_current_state(TASK_RUNNING); |
167 | if (ret == -ENODEV) | 167 | if (ret == -ENODEV) |
168 | netif_device_detach(pegasus->net); | 168 | netif_device_detach(pegasus->net); |
169 | if (netif_msg_drv(pegasus)) | 169 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
170 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 170 | dev_err(&pegasus->intf->dev, "%s, status %d\n", |
171 | __FUNCTION__, ret); | 171 | __FUNCTION__, ret); |
172 | goto out; | 172 | goto out; |
@@ -275,7 +275,7 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) | |||
275 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { | 275 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { |
276 | if (ret == -ENODEV) | 276 | if (ret == -ENODEV) |
277 | netif_device_detach(pegasus->net); | 277 | netif_device_detach(pegasus->net); |
278 | if (netif_msg_drv(pegasus)) | 278 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
279 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 279 | dev_err(&pegasus->intf->dev, "%s, status %d\n", |
280 | __FUNCTION__, ret); | 280 | __FUNCTION__, ret); |
281 | goto out; | 281 | goto out; |
@@ -1209,8 +1209,7 @@ static void pegasus_set_multicast(struct net_device *net) | |||
1209 | pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; | 1209 | pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; |
1210 | if (netif_msg_link(pegasus)) | 1210 | if (netif_msg_link(pegasus)) |
1211 | pr_info("%s: Promiscuous mode enabled.\n", net->name); | 1211 | pr_info("%s: Promiscuous mode enabled.\n", net->name); |
1212 | } else if (net->mc_count || | 1212 | } else if (net->mc_count || (net->flags & IFF_ALLMULTI)) { |
1213 | (net->flags & IFF_ALLMULTI)) { | ||
1214 | pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; | 1213 | pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; |
1215 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; | 1214 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; |
1216 | if (netif_msg_link(pegasus)) | 1215 | if (netif_msg_link(pegasus)) |
@@ -1220,6 +1219,8 @@ static void pegasus_set_multicast(struct net_device *net) | |||
1220 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; | 1219 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; |
1221 | } | 1220 | } |
1222 | 1221 | ||
1222 | pegasus->ctrl_urb->status = 0; | ||
1223 | |||
1223 | pegasus->flags |= ETH_REGS_CHANGE; | 1224 | pegasus->flags |= ETH_REGS_CHANGE; |
1224 | ctrl_callback(pegasus->ctrl_urb); | 1225 | ctrl_callback(pegasus->ctrl_urb); |
1225 | } | 1226 | } |
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 95b337149484..c5107f269f24 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -1067,8 +1067,16 @@ void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, | |||
1067 | tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; | 1067 | tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; |
1068 | tx_status->flags &= ~ATH_TX_BAR; | 1068 | tx_status->flags &= ~ATH_TX_BAR; |
1069 | } | 1069 | } |
1070 | if (tx_status->flags) | 1070 | |
1071 | tx_info->status.excessive_retries = 1; | 1071 | if (tx_status->flags & (ATH_TX_ERROR | ATH_TX_XRETRY)) { |
1072 | if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) { | ||
1073 | /* Frame was not ACKed, but an ACK was expected */ | ||
1074 | tx_info->status.excessive_retries = 1; | ||
1075 | } | ||
1076 | } else { | ||
1077 | /* Frame was ACKed */ | ||
1078 | tx_info->flags |= IEEE80211_TX_STAT_ACK; | ||
1079 | } | ||
1072 | 1080 | ||
1073 | tx_info->status.retry_count = tx_status->retries; | 1081 | tx_info->status.retry_count = tx_status->retries; |
1074 | 1082 | ||
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 157f830ee6b8..550129f717e2 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c | |||
@@ -357,9 +357,9 @@ static int ath_tx_prepare(struct ath_softc *sc, | |||
357 | txctl->flags = ATH9K_TXDESC_CLRDMASK; /* needed for crypto errors */ | 357 | txctl->flags = ATH9K_TXDESC_CLRDMASK; /* needed for crypto errors */ |
358 | 358 | ||
359 | if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) | 359 | if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) |
360 | tx_info->flags |= ATH9K_TXDESC_NOACK; | 360 | txctl->flags |= ATH9K_TXDESC_NOACK; |
361 | if (tx_info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) | 361 | if (tx_info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) |
362 | tx_info->flags |= ATH9K_TXDESC_RTSENA; | 362 | txctl->flags |= ATH9K_TXDESC_RTSENA; |
363 | 363 | ||
364 | /* | 364 | /* |
365 | * Setup for rate calculations. | 365 | * Setup for rate calculations. |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 754fef5b592f..90a2b6dee7c0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -1153,7 +1153,8 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, | |||
1153 | !sta->ht_info.ht_supported) | 1153 | !sta->ht_info.ht_supported) |
1154 | return -1; | 1154 | return -1; |
1155 | 1155 | ||
1156 | if (priv->current_ht_config.tx_mimo_ps_mode == IWL_MIMO_PS_STATIC) | 1156 | if (((sta->ht_info.cap & IEEE80211_HT_CAP_MIMO_PS) >> 2) |
1157 | == IWL_MIMO_PS_STATIC) | ||
1157 | return -1; | 1158 | return -1; |
1158 | 1159 | ||
1159 | /* Need both Tx chains/antennas to support MIMO */ | 1160 | /* Need both Tx chains/antennas to support MIMO */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index c0b73c4d6f44..e01f048a02dd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -181,14 +181,14 @@ static int iwl4965_check_rxon_cmd(struct iwl_rxon_cmd *rxon) | |||
181 | } | 181 | } |
182 | 182 | ||
183 | /** | 183 | /** |
184 | * iwl4965_full_rxon_required - check if full RXON (vs RXON_ASSOC) cmd is needed | 184 | * iwl_full_rxon_required - check if full RXON (vs RXON_ASSOC) cmd is needed |
185 | * @priv: staging_rxon is compared to active_rxon | 185 | * @priv: staging_rxon is compared to active_rxon |
186 | * | 186 | * |
187 | * If the RXON structure is changing enough to require a new tune, | 187 | * If the RXON structure is changing enough to require a new tune, |
188 | * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that | 188 | * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that |
189 | * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required. | 189 | * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required. |
190 | */ | 190 | */ |
191 | static int iwl4965_full_rxon_required(struct iwl_priv *priv) | 191 | static int iwl_full_rxon_required(struct iwl_priv *priv) |
192 | { | 192 | { |
193 | 193 | ||
194 | /* These items are only settable from the full RXON command */ | 194 | /* These items are only settable from the full RXON command */ |
@@ -207,7 +207,6 @@ static int iwl4965_full_rxon_required(struct iwl_priv *priv) | |||
207 | priv->active_rxon.ofdm_ht_single_stream_basic_rates) || | 207 | priv->active_rxon.ofdm_ht_single_stream_basic_rates) || |
208 | (priv->staging_rxon.ofdm_ht_dual_stream_basic_rates != | 208 | (priv->staging_rxon.ofdm_ht_dual_stream_basic_rates != |
209 | priv->active_rxon.ofdm_ht_dual_stream_basic_rates) || | 209 | priv->active_rxon.ofdm_ht_dual_stream_basic_rates) || |
210 | (priv->staging_rxon.rx_chain != priv->active_rxon.rx_chain) || | ||
211 | (priv->staging_rxon.assoc_id != priv->active_rxon.assoc_id)) | 210 | (priv->staging_rxon.assoc_id != priv->active_rxon.assoc_id)) |
212 | return 1; | 211 | return 1; |
213 | 212 | ||
@@ -263,7 +262,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv) | |||
263 | /* If we don't need to send a full RXON, we can use | 262 | /* If we don't need to send a full RXON, we can use |
264 | * iwl4965_rxon_assoc_cmd which is used to reconfigure filter | 263 | * iwl4965_rxon_assoc_cmd which is used to reconfigure filter |
265 | * and other flags for the current radio configuration. */ | 264 | * and other flags for the current radio configuration. */ |
266 | if (!iwl4965_full_rxon_required(priv)) { | 265 | if (!iwl_full_rxon_required(priv)) { |
267 | ret = iwl_send_rxon_assoc(priv); | 266 | ret = iwl_send_rxon_assoc(priv); |
268 | if (ret) { | 267 | if (ret) { |
269 | IWL_ERROR("Error setting RXON_ASSOC (%d)\n", ret); | 268 | IWL_ERROR("Error setting RXON_ASSOC (%d)\n", ret); |
@@ -587,8 +586,6 @@ static void iwl4965_ht_conf(struct iwl_priv *priv, | |||
587 | iwl_conf->supported_chan_width = 0; | 586 | iwl_conf->supported_chan_width = 0; |
588 | } | 587 | } |
589 | 588 | ||
590 | iwl_conf->tx_mimo_ps_mode = | ||
591 | (u8)((ht_conf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2); | ||
592 | memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16); | 589 | memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16); |
593 | 590 | ||
594 | iwl_conf->control_channel = ht_bss_conf->primary_channel; | 591 | iwl_conf->control_channel = ht_bss_conf->primary_channel; |
@@ -2190,7 +2187,10 @@ static void __iwl4965_down(struct iwl_priv *priv) | |||
2190 | udelay(5); | 2187 | udelay(5); |
2191 | 2188 | ||
2192 | /* FIXME: apm_ops.suspend(priv) */ | 2189 | /* FIXME: apm_ops.suspend(priv) */ |
2193 | priv->cfg->ops->lib->apm_ops.reset(priv); | 2190 | if (exit_pending || test_bit(STATUS_IN_SUSPEND, &priv->status)) |
2191 | priv->cfg->ops->lib->apm_ops.stop(priv); | ||
2192 | else | ||
2193 | priv->cfg->ops->lib->apm_ops.reset(priv); | ||
2194 | priv->cfg->ops->lib->free_shared_mem(priv); | 2194 | priv->cfg->ops->lib->free_shared_mem(priv); |
2195 | 2195 | ||
2196 | exit: | 2196 | exit: |
@@ -3588,7 +3588,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk | |||
3588 | 3588 | ||
3589 | priv->assoc_id = 0; | 3589 | priv->assoc_id = 0; |
3590 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; | 3590 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; |
3591 | priv->timestamp = le64_to_cpu(timestamp) + (priv->beacon_int * 1000); | 3591 | priv->timestamp = le64_to_cpu(timestamp); |
3592 | 3592 | ||
3593 | IWL_DEBUG_MAC80211("leave\n"); | 3593 | IWL_DEBUG_MAC80211("leave\n"); |
3594 | spin_unlock_irqrestore(&priv->lock, flags); | 3594 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -4372,15 +4372,18 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
4372 | iwl_dbgfs_unregister(priv); | 4372 | iwl_dbgfs_unregister(priv); |
4373 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); | 4373 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); |
4374 | 4374 | ||
4375 | /* ieee80211_unregister_hw call wil cause iwl4965_mac_stop to | ||
4376 | * to be called and iwl4965_down since we are removing the device | ||
4377 | * we need to set STATUS_EXIT_PENDING bit. | ||
4378 | */ | ||
4379 | set_bit(STATUS_EXIT_PENDING, &priv->status); | ||
4375 | if (priv->mac80211_registered) { | 4380 | if (priv->mac80211_registered) { |
4376 | ieee80211_unregister_hw(priv->hw); | 4381 | ieee80211_unregister_hw(priv->hw); |
4377 | priv->mac80211_registered = 0; | 4382 | priv->mac80211_registered = 0; |
4383 | } else { | ||
4384 | iwl4965_down(priv); | ||
4378 | } | 4385 | } |
4379 | 4386 | ||
4380 | set_bit(STATUS_EXIT_PENDING, &priv->status); | ||
4381 | |||
4382 | iwl4965_down(priv); | ||
4383 | |||
4384 | /* make sure we flush any pending irq or | 4387 | /* make sure we flush any pending irq or |
4385 | * tasklet for the driver | 4388 | * tasklet for the driver |
4386 | */ | 4389 | */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index c72f72579bea..80f2f84defa8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -592,12 +592,11 @@ static void iwlcore_free_geos(struct iwl_priv *priv) | |||
592 | clear_bit(STATUS_GEO_CONFIGURED, &priv->status); | 592 | clear_bit(STATUS_GEO_CONFIGURED, &priv->status); |
593 | } | 593 | } |
594 | 594 | ||
595 | static u8 is_single_rx_stream(struct iwl_priv *priv) | 595 | static bool is_single_rx_stream(struct iwl_priv *priv) |
596 | { | 596 | { |
597 | return !priv->current_ht_config.is_ht || | 597 | return !priv->current_ht_config.is_ht || |
598 | ((priv->current_ht_config.supp_mcs_set[1] == 0) && | 598 | ((priv->current_ht_config.supp_mcs_set[1] == 0) && |
599 | (priv->current_ht_config.supp_mcs_set[2] == 0)) || | 599 | (priv->current_ht_config.supp_mcs_set[2] == 0)); |
600 | priv->ps_mode == IWL_MIMO_PS_STATIC; | ||
601 | } | 600 | } |
602 | 601 | ||
603 | static u8 iwl_is_channel_extension(struct iwl_priv *priv, | 602 | static u8 iwl_is_channel_extension(struct iwl_priv *priv, |
@@ -704,33 +703,39 @@ EXPORT_SYMBOL(iwl_set_rxon_ht); | |||
704 | * MIMO (dual stream) requires at least 2, but works better with 3. | 703 | * MIMO (dual stream) requires at least 2, but works better with 3. |
705 | * This does not determine *which* chains to use, just how many. | 704 | * This does not determine *which* chains to use, just how many. |
706 | */ | 705 | */ |
707 | static int iwlcore_get_rx_chain_counter(struct iwl_priv *priv, | 706 | static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) |
708 | u8 *idle_state, u8 *rx_state) | ||
709 | { | 707 | { |
710 | u8 is_single = is_single_rx_stream(priv); | 708 | bool is_single = is_single_rx_stream(priv); |
711 | u8 is_cam = test_bit(STATUS_POWER_PMI, &priv->status) ? 0 : 1; | 709 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); |
712 | 710 | ||
713 | /* # of Rx chains to use when expecting MIMO. */ | 711 | /* # of Rx chains to use when expecting MIMO. */ |
714 | if (is_single || (!is_cam && (priv->ps_mode == IWL_MIMO_PS_STATIC))) | 712 | if (is_single || (!is_cam && (priv->ps_mode == IWL_MIMO_PS_STATIC))) |
715 | *rx_state = 2; | 713 | return 2; |
716 | else | 714 | else |
717 | *rx_state = 3; | 715 | return 3; |
716 | } | ||
718 | 717 | ||
718 | static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) | ||
719 | { | ||
720 | int idle_cnt; | ||
721 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); | ||
719 | /* # Rx chains when idling and maybe trying to save power */ | 722 | /* # Rx chains when idling and maybe trying to save power */ |
720 | switch (priv->ps_mode) { | 723 | switch (priv->ps_mode) { |
721 | case IWL_MIMO_PS_STATIC: | 724 | case IWL_MIMO_PS_STATIC: |
722 | case IWL_MIMO_PS_DYNAMIC: | 725 | case IWL_MIMO_PS_DYNAMIC: |
723 | *idle_state = (is_cam) ? 2 : 1; | 726 | idle_cnt = (is_cam) ? 2 : 1; |
724 | break; | 727 | break; |
725 | case IWL_MIMO_PS_NONE: | 728 | case IWL_MIMO_PS_NONE: |
726 | *idle_state = (is_cam) ? *rx_state : 1; | 729 | idle_cnt = (is_cam) ? active_cnt : 1; |
727 | break; | 730 | break; |
731 | case IWL_MIMO_PS_INVALID: | ||
728 | default: | 732 | default: |
729 | *idle_state = 1; | 733 | IWL_ERROR("invalide mimo ps mode %d\n", priv->ps_mode); |
734 | WARN_ON(1); | ||
735 | idle_cnt = -1; | ||
730 | break; | 736 | break; |
731 | } | 737 | } |
732 | 738 | return idle_cnt; | |
733 | return 0; | ||
734 | } | 739 | } |
735 | 740 | ||
736 | /** | 741 | /** |
@@ -741,34 +746,44 @@ static int iwlcore_get_rx_chain_counter(struct iwl_priv *priv, | |||
741 | */ | 746 | */ |
742 | void iwl_set_rxon_chain(struct iwl_priv *priv) | 747 | void iwl_set_rxon_chain(struct iwl_priv *priv) |
743 | { | 748 | { |
744 | u8 is_single = is_single_rx_stream(priv); | 749 | bool is_single = is_single_rx_stream(priv); |
745 | u8 idle_state, rx_state; | 750 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); |
746 | 751 | u8 idle_rx_cnt, active_rx_cnt; | |
747 | priv->staging_rxon.rx_chain = 0; | 752 | u16 rx_chain; |
748 | rx_state = idle_state = 3; | ||
749 | 753 | ||
750 | /* Tell uCode which antennas are actually connected. | 754 | /* Tell uCode which antennas are actually connected. |
751 | * Before first association, we assume all antennas are connected. | 755 | * Before first association, we assume all antennas are connected. |
752 | * Just after first association, iwl_chain_noise_calibration() | 756 | * Just after first association, iwl_chain_noise_calibration() |
753 | * checks which antennas actually *are* connected. */ | 757 | * checks which antennas actually *are* connected. */ |
754 | priv->staging_rxon.rx_chain |= | 758 | rx_chain = priv->hw_params.valid_rx_ant << RXON_RX_CHAIN_VALID_POS; |
755 | cpu_to_le16(priv->hw_params.valid_rx_ant << | ||
756 | RXON_RX_CHAIN_VALID_POS); | ||
757 | 759 | ||
758 | /* How many receivers should we use? */ | 760 | /* How many receivers should we use? */ |
759 | iwlcore_get_rx_chain_counter(priv, &idle_state, &rx_state); | 761 | active_rx_cnt = iwl_get_active_rx_chain_count(priv); |
760 | priv->staging_rxon.rx_chain |= | 762 | idle_rx_cnt = iwl_get_idle_rx_chain_count(priv, active_rx_cnt); |
761 | cpu_to_le16(rx_state << RXON_RX_CHAIN_MIMO_CNT_POS); | 763 | |
762 | priv->staging_rxon.rx_chain |= | 764 | /* correct rx chain count accoridng hw settings */ |
763 | cpu_to_le16(idle_state << RXON_RX_CHAIN_CNT_POS); | 765 | if (priv->hw_params.rx_chains_num < active_rx_cnt) |
764 | 766 | active_rx_cnt = priv->hw_params.rx_chains_num; | |
765 | if (!is_single && (rx_state >= 2) && | 767 | |
766 | !test_bit(STATUS_POWER_PMI, &priv->status)) | 768 | if (priv->hw_params.rx_chains_num < idle_rx_cnt) |
769 | idle_rx_cnt = priv->hw_params.rx_chains_num; | ||
770 | |||
771 | rx_chain |= active_rx_cnt << RXON_RX_CHAIN_MIMO_CNT_POS; | ||
772 | rx_chain |= idle_rx_cnt << RXON_RX_CHAIN_CNT_POS; | ||
773 | |||
774 | priv->staging_rxon.rx_chain = cpu_to_le16(rx_chain); | ||
775 | |||
776 | if (!is_single && (active_rx_cnt >= 2) && is_cam) | ||
767 | priv->staging_rxon.rx_chain |= RXON_RX_CHAIN_MIMO_FORCE_MSK; | 777 | priv->staging_rxon.rx_chain |= RXON_RX_CHAIN_MIMO_FORCE_MSK; |
768 | else | 778 | else |
769 | priv->staging_rxon.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK; | 779 | priv->staging_rxon.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK; |
770 | 780 | ||
771 | IWL_DEBUG_ASSOC("rx chain %X\n", priv->staging_rxon.rx_chain); | 781 | IWL_DEBUG_ASSOC("rx_chain=0x%Xi active=%d idle=%d\n", |
782 | priv->staging_rxon.rx_chain, | ||
783 | active_rx_cnt, idle_rx_cnt); | ||
784 | |||
785 | WARN_ON(active_rx_cnt == 0 || idle_rx_cnt == 0 || | ||
786 | active_rx_cnt < idle_rx_cnt); | ||
772 | } | 787 | } |
773 | EXPORT_SYMBOL(iwl_set_rxon_chain); | 788 | EXPORT_SYMBOL(iwl_set_rxon_chain); |
774 | 789 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index c19db438306c..cdfb343c7ec6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -412,7 +412,6 @@ struct iwl_ht_info { | |||
412 | /* self configuration data */ | 412 | /* self configuration data */ |
413 | u8 is_ht; | 413 | u8 is_ht; |
414 | u8 supported_chan_width; | 414 | u8 supported_chan_width; |
415 | u16 tx_mimo_ps_mode; | ||
416 | u8 is_green_field; | 415 | u8 is_green_field; |
417 | u8 sgf; /* HT_SHORT_GI_* short guard interval */ | 416 | u8 sgf; /* HT_SHORT_GI_* short guard interval */ |
418 | u8 max_amsdu_size; | 417 | u8 max_amsdu_size; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index f3f6ea49fdd2..e81bfc42a7cb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -1173,7 +1173,10 @@ void iwl_rx_reply_rx(struct iwl_priv *priv, | |||
1173 | 1173 | ||
1174 | rx_status.antenna = 0; | 1174 | rx_status.antenna = 0; |
1175 | rx_status.flag = 0; | 1175 | rx_status.flag = 0; |
1176 | rx_status.flag |= RX_FLAG_TSFT; | 1176 | |
1177 | /* TSF isn't reliable. In order to allow smooth user experience, | ||
1178 | * this W/A doesn't propagate it to the mac80211 */ | ||
1179 | /*rx_status.flag |= RX_FLAG_TSFT;*/ | ||
1177 | 1180 | ||
1178 | if ((unlikely(rx_start->cfg_phy_cnt > 20))) { | 1181 | if ((unlikely(rx_start->cfg_phy_cnt > 20))) { |
1179 | IWL_DEBUG_DROP("dsp size out of range [0,20]: %d/n", | 1182 | IWL_DEBUG_DROP("dsp size out of range [0,20]: %d/n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 9bb6adb28b73..6c8ac3a87d54 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -421,7 +421,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv, | |||
421 | else | 421 | else |
422 | scan_ch->type = SCAN_CHANNEL_TYPE_ACTIVE; | 422 | scan_ch->type = SCAN_CHANNEL_TYPE_ACTIVE; |
423 | 423 | ||
424 | if ((scan_ch->type & SCAN_CHANNEL_TYPE_ACTIVE) && n_probes) | 424 | if (n_probes) |
425 | scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes); | 425 | scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes); |
426 | 426 | ||
427 | scan_ch->active_dwell = cpu_to_le16(active_dwell); | 427 | scan_ch->active_dwell = cpu_to_le16(active_dwell); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index ff879d46624a..78b1a7a4ca40 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -402,12 +402,11 @@ static int iwl_hw_tx_queue_init(struct iwl_priv *priv, | |||
402 | /** | 402 | /** |
403 | * iwl_tx_queue_init - Allocate and initialize one tx/cmd queue | 403 | * iwl_tx_queue_init - Allocate and initialize one tx/cmd queue |
404 | */ | 404 | */ |
405 | static int iwl_tx_queue_init(struct iwl_priv *priv, | 405 | static int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, |
406 | struct iwl_tx_queue *txq, | ||
407 | int slots_num, u32 txq_id) | 406 | int slots_num, u32 txq_id) |
408 | { | 407 | { |
409 | int i, len; | 408 | int i, len; |
410 | int rc = 0; | 409 | int ret; |
411 | 410 | ||
412 | /* | 411 | /* |
413 | * Alloc buffer array for commands (Tx or other types of commands). | 412 | * Alloc buffer array for commands (Tx or other types of commands). |
@@ -428,17 +427,14 @@ static int iwl_tx_queue_init(struct iwl_priv *priv, | |||
428 | 427 | ||
429 | txq->cmd[i] = kmalloc(len, GFP_KERNEL); | 428 | txq->cmd[i] = kmalloc(len, GFP_KERNEL); |
430 | if (!txq->cmd[i]) | 429 | if (!txq->cmd[i]) |
431 | return -ENOMEM; | 430 | goto err; |
432 | } | 431 | } |
433 | 432 | ||
434 | /* Alloc driver data array and TFD circular buffer */ | 433 | /* Alloc driver data array and TFD circular buffer */ |
435 | rc = iwl_tx_queue_alloc(priv, txq, txq_id); | 434 | ret = iwl_tx_queue_alloc(priv, txq, txq_id); |
436 | if (rc) { | 435 | if (ret) |
437 | for (i = 0; i < slots_num; i++) | 436 | goto err; |
438 | kfree(txq->cmd[i]); | ||
439 | 437 | ||
440 | return -ENOMEM; | ||
441 | } | ||
442 | txq->need_update = 0; | 438 | txq->need_update = 0; |
443 | 439 | ||
444 | /* TFD_QUEUE_SIZE_MAX must be power-of-two size, otherwise | 440 | /* TFD_QUEUE_SIZE_MAX must be power-of-two size, otherwise |
@@ -452,6 +448,17 @@ static int iwl_tx_queue_init(struct iwl_priv *priv, | |||
452 | iwl_hw_tx_queue_init(priv, txq); | 448 | iwl_hw_tx_queue_init(priv, txq); |
453 | 449 | ||
454 | return 0; | 450 | return 0; |
451 | err: | ||
452 | for (i = 0; i < slots_num; i++) { | ||
453 | kfree(txq->cmd[i]); | ||
454 | txq->cmd[i] = NULL; | ||
455 | } | ||
456 | |||
457 | if (txq_id == IWL_CMD_QUEUE_NUM) { | ||
458 | kfree(txq->cmd[slots_num]); | ||
459 | txq->cmd[slots_num] = NULL; | ||
460 | } | ||
461 | return -ENOMEM; | ||
455 | } | 462 | } |
456 | /** | 463 | /** |
457 | * iwl_hw_txq_ctx_free - Free TXQ Context | 464 | * iwl_hw_txq_ctx_free - Free TXQ Context |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 8d3b7a9afd17..fded376b94e3 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -108,6 +108,9 @@ extern struct resource iomem_resource; | |||
108 | 108 | ||
109 | extern int request_resource(struct resource *root, struct resource *new); | 109 | extern int request_resource(struct resource *root, struct resource *new); |
110 | extern int release_resource(struct resource *new); | 110 | extern int release_resource(struct resource *new); |
111 | extern void reserve_region_with_split(struct resource *root, | ||
112 | resource_size_t start, resource_size_t end, | ||
113 | const char *name); | ||
111 | extern int insert_resource(struct resource *parent, struct resource *new); | 114 | extern int insert_resource(struct resource *parent, struct resource *new); |
112 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); | 115 | extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); |
113 | extern int allocate_resource(struct resource *root, struct resource *new, | 116 | extern int allocate_resource(struct resource *root, struct resource *new, |
diff --git a/kernel/resource.c b/kernel/resource.c index 03d796c1b2e9..414d6fc9131e 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -516,6 +516,74 @@ int adjust_resource(struct resource *res, resource_size_t start, resource_size_t | |||
516 | return result; | 516 | return result; |
517 | } | 517 | } |
518 | 518 | ||
519 | static void __init __reserve_region_with_split(struct resource *root, | ||
520 | resource_size_t start, resource_size_t end, | ||
521 | const char *name) | ||
522 | { | ||
523 | struct resource *parent = root; | ||
524 | struct resource *conflict; | ||
525 | struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL); | ||
526 | |||
527 | if (!res) | ||
528 | return; | ||
529 | |||
530 | res->name = name; | ||
531 | res->start = start; | ||
532 | res->end = end; | ||
533 | res->flags = IORESOURCE_BUSY; | ||
534 | |||
535 | for (;;) { | ||
536 | conflict = __request_resource(parent, res); | ||
537 | if (!conflict) | ||
538 | break; | ||
539 | if (conflict != parent) { | ||
540 | parent = conflict; | ||
541 | if (!(conflict->flags & IORESOURCE_BUSY)) | ||
542 | continue; | ||
543 | } | ||
544 | |||
545 | /* Uhhuh, that didn't work out.. */ | ||
546 | kfree(res); | ||
547 | res = NULL; | ||
548 | break; | ||
549 | } | ||
550 | |||
551 | if (!res) { | ||
552 | printk(KERN_DEBUG " __reserve_region_with_split: (%s) [%llx, %llx], res: (%s) [%llx, %llx]\n", | ||
553 | conflict->name, conflict->start, conflict->end, | ||
554 | name, start, end); | ||
555 | |||
556 | /* failed, split and try again */ | ||
557 | |||
558 | /* conflict coverred whole area */ | ||
559 | if (conflict->start <= start && conflict->end >= end) | ||
560 | return; | ||
561 | |||
562 | if (conflict->start > start) | ||
563 | __reserve_region_with_split(root, start, conflict->start-1, name); | ||
564 | if (!(conflict->flags & IORESOURCE_BUSY)) { | ||
565 | resource_size_t common_start, common_end; | ||
566 | |||
567 | common_start = max(conflict->start, start); | ||
568 | common_end = min(conflict->end, end); | ||
569 | if (common_start < common_end) | ||
570 | __reserve_region_with_split(root, common_start, common_end, name); | ||
571 | } | ||
572 | if (conflict->end < end) | ||
573 | __reserve_region_with_split(root, conflict->end+1, end, name); | ||
574 | } | ||
575 | |||
576 | } | ||
577 | |||
578 | void reserve_region_with_split(struct resource *root, | ||
579 | resource_size_t start, resource_size_t end, | ||
580 | const char *name) | ||
581 | { | ||
582 | write_lock(&resource_lock); | ||
583 | __reserve_region_with_split(root, start, end, name); | ||
584 | write_unlock(&resource_lock); | ||
585 | } | ||
586 | |||
519 | EXPORT_SYMBOL(adjust_resource); | 587 | EXPORT_SYMBOL(adjust_resource); |
520 | 588 | ||
521 | /** | 589 | /** |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8b5a7d304a5f..0b504814e378 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -394,7 +394,7 @@ config LOCKDEP | |||
394 | bool | 394 | bool |
395 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 395 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |
396 | select STACKTRACE | 396 | select STACKTRACE |
397 | select FRAME_POINTER if !X86 && !MIPS | 397 | select FRAME_POINTER if !X86 && !MIPS && !PPC |
398 | select KALLSYMS | 398 | select KALLSYMS |
399 | select KALLSYMS_ALL | 399 | select KALLSYMS_ALL |
400 | 400 | ||
@@ -676,13 +676,13 @@ config FAULT_INJECTION_STACKTRACE_FILTER | |||
676 | depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT | 676 | depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT |
677 | depends on !X86_64 | 677 | depends on !X86_64 |
678 | select STACKTRACE | 678 | select STACKTRACE |
679 | select FRAME_POINTER | 679 | select FRAME_POINTER if !PPC |
680 | help | 680 | help |
681 | Provide stacktrace filter for fault-injection capabilities | 681 | Provide stacktrace filter for fault-injection capabilities |
682 | 682 | ||
683 | config LATENCYTOP | 683 | config LATENCYTOP |
684 | bool "Latency measuring infrastructure" | 684 | bool "Latency measuring infrastructure" |
685 | select FRAME_POINTER if !MIPS | 685 | select FRAME_POINTER if !MIPS && !PPC |
686 | select KALLSYMS | 686 | select KALLSYMS |
687 | select KALLSYMS_ALL | 687 | select KALLSYMS_ALL |
688 | select STACKTRACE | 688 | select STACKTRACE |
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index b1ff16aa4bdb..3ddaff42d1bb 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
@@ -96,8 +96,8 @@ struct bcbearer { | |||
96 | struct media media; | 96 | struct media media; |
97 | struct bcbearer_pair bpairs[MAX_BEARERS]; | 97 | struct bcbearer_pair bpairs[MAX_BEARERS]; |
98 | struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; | 98 | struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; |
99 | struct node_map remains; | 99 | struct tipc_node_map remains; |
100 | struct node_map remains_new; | 100 | struct tipc_node_map remains_new; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | /** | 103 | /** |
@@ -110,7 +110,7 @@ struct bcbearer { | |||
110 | 110 | ||
111 | struct bclink { | 111 | struct bclink { |
112 | struct link link; | 112 | struct link link; |
113 | struct node node; | 113 | struct tipc_node node; |
114 | }; | 114 | }; |
115 | 115 | ||
116 | 116 | ||
@@ -149,7 +149,7 @@ static void bcbuf_decr_acks(struct sk_buff *buf) | |||
149 | * Called with 'node' locked, bc_lock unlocked | 149 | * Called with 'node' locked, bc_lock unlocked |
150 | */ | 150 | */ |
151 | 151 | ||
152 | static void bclink_set_gap(struct node *n_ptr) | 152 | static void bclink_set_gap(struct tipc_node *n_ptr) |
153 | { | 153 | { |
154 | struct sk_buff *buf = n_ptr->bclink.deferred_head; | 154 | struct sk_buff *buf = n_ptr->bclink.deferred_head; |
155 | 155 | ||
@@ -202,7 +202,7 @@ static void bclink_retransmit_pkt(u32 after, u32 to) | |||
202 | * Node is locked, bc_lock unlocked. | 202 | * Node is locked, bc_lock unlocked. |
203 | */ | 203 | */ |
204 | 204 | ||
205 | void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked) | 205 | void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked) |
206 | { | 206 | { |
207 | struct sk_buff *crs; | 207 | struct sk_buff *crs; |
208 | struct sk_buff *next; | 208 | struct sk_buff *next; |
@@ -250,7 +250,7 @@ void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked) | |||
250 | * tipc_net_lock and node lock set | 250 | * tipc_net_lock and node lock set |
251 | */ | 251 | */ |
252 | 252 | ||
253 | static void bclink_send_ack(struct node *n_ptr) | 253 | static void bclink_send_ack(struct tipc_node *n_ptr) |
254 | { | 254 | { |
255 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; | 255 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; |
256 | 256 | ||
@@ -264,7 +264,7 @@ static void bclink_send_ack(struct node *n_ptr) | |||
264 | * tipc_net_lock and node lock set | 264 | * tipc_net_lock and node lock set |
265 | */ | 265 | */ |
266 | 266 | ||
267 | static void bclink_send_nack(struct node *n_ptr) | 267 | static void bclink_send_nack(struct tipc_node *n_ptr) |
268 | { | 268 | { |
269 | struct sk_buff *buf; | 269 | struct sk_buff *buf; |
270 | struct tipc_msg *msg; | 270 | struct tipc_msg *msg; |
@@ -308,7 +308,7 @@ static void bclink_send_nack(struct node *n_ptr) | |||
308 | * tipc_net_lock and node lock set | 308 | * tipc_net_lock and node lock set |
309 | */ | 309 | */ |
310 | 310 | ||
311 | void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent) | 311 | void tipc_bclink_check_gap(struct tipc_node *n_ptr, u32 last_sent) |
312 | { | 312 | { |
313 | if (!n_ptr->bclink.supported || | 313 | if (!n_ptr->bclink.supported || |
314 | less_eq(last_sent, mod(n_ptr->bclink.last_in))) | 314 | less_eq(last_sent, mod(n_ptr->bclink.last_in))) |
@@ -328,7 +328,7 @@ void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent) | |||
328 | 328 | ||
329 | static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) | 329 | static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) |
330 | { | 330 | { |
331 | struct node *n_ptr = tipc_node_find(dest); | 331 | struct tipc_node *n_ptr = tipc_node_find(dest); |
332 | u32 my_after, my_to; | 332 | u32 my_after, my_to; |
333 | 333 | ||
334 | if (unlikely(!n_ptr || !tipc_node_is_up(n_ptr))) | 334 | if (unlikely(!n_ptr || !tipc_node_is_up(n_ptr))) |
@@ -418,7 +418,7 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) | |||
418 | static int rx_count = 0; | 418 | static int rx_count = 0; |
419 | #endif | 419 | #endif |
420 | struct tipc_msg *msg = buf_msg(buf); | 420 | struct tipc_msg *msg = buf_msg(buf); |
421 | struct node* node = tipc_node_find(msg_prevnode(msg)); | 421 | struct tipc_node* node = tipc_node_find(msg_prevnode(msg)); |
422 | u32 next_in; | 422 | u32 next_in; |
423 | u32 seqno; | 423 | u32 seqno; |
424 | struct sk_buff *deferred; | 424 | struct sk_buff *deferred; |
@@ -538,7 +538,7 @@ u32 tipc_bclink_get_last_sent(void) | |||
538 | return last_sent; | 538 | return last_sent; |
539 | } | 539 | } |
540 | 540 | ||
541 | u32 tipc_bclink_acks_missing(struct node *n_ptr) | 541 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr) |
542 | { | 542 | { |
543 | return (n_ptr->bclink.supported && | 543 | return (n_ptr->bclink.supported && |
544 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); | 544 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); |
diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h index a2416fa6b906..5aa024b99c55 100644 --- a/net/tipc/bcast.h +++ b/net/tipc/bcast.h | |||
@@ -41,12 +41,12 @@ | |||
41 | #define WSIZE 32 | 41 | #define WSIZE 32 |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * struct node_map - set of node identifiers | 44 | * struct tipc_node_map - set of node identifiers |
45 | * @count: # of nodes in set | 45 | * @count: # of nodes in set |
46 | * @map: bitmap of node identifiers that are in the set | 46 | * @map: bitmap of node identifiers that are in the set |
47 | */ | 47 | */ |
48 | 48 | ||
49 | struct node_map { | 49 | struct tipc_node_map { |
50 | u32 count; | 50 | u32 count; |
51 | u32 map[MAX_NODES / WSIZE]; | 51 | u32 map[MAX_NODES / WSIZE]; |
52 | }; | 52 | }; |
@@ -68,7 +68,7 @@ struct port_list { | |||
68 | }; | 68 | }; |
69 | 69 | ||
70 | 70 | ||
71 | struct node; | 71 | struct tipc_node; |
72 | 72 | ||
73 | extern char tipc_bclink_name[]; | 73 | extern char tipc_bclink_name[]; |
74 | 74 | ||
@@ -77,7 +77,7 @@ extern char tipc_bclink_name[]; | |||
77 | * nmap_add - add a node to a node map | 77 | * nmap_add - add a node to a node map |
78 | */ | 78 | */ |
79 | 79 | ||
80 | static inline void tipc_nmap_add(struct node_map *nm_ptr, u32 node) | 80 | static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node) |
81 | { | 81 | { |
82 | int n = tipc_node(node); | 82 | int n = tipc_node(node); |
83 | int w = n / WSIZE; | 83 | int w = n / WSIZE; |
@@ -93,7 +93,7 @@ static inline void tipc_nmap_add(struct node_map *nm_ptr, u32 node) | |||
93 | * nmap_remove - remove a node from a node map | 93 | * nmap_remove - remove a node from a node map |
94 | */ | 94 | */ |
95 | 95 | ||
96 | static inline void tipc_nmap_remove(struct node_map *nm_ptr, u32 node) | 96 | static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node) |
97 | { | 97 | { |
98 | int n = tipc_node(node); | 98 | int n = tipc_node(node); |
99 | int w = n / WSIZE; | 99 | int w = n / WSIZE; |
@@ -109,7 +109,7 @@ static inline void tipc_nmap_remove(struct node_map *nm_ptr, u32 node) | |||
109 | * nmap_equal - test for equality of node maps | 109 | * nmap_equal - test for equality of node maps |
110 | */ | 110 | */ |
111 | 111 | ||
112 | static inline int tipc_nmap_equal(struct node_map *nm_a, struct node_map *nm_b) | 112 | static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b) |
113 | { | 113 | { |
114 | return !memcmp(nm_a, nm_b, sizeof(*nm_a)); | 114 | return !memcmp(nm_a, nm_b, sizeof(*nm_a)); |
115 | } | 115 | } |
@@ -121,8 +121,8 @@ static inline int tipc_nmap_equal(struct node_map *nm_a, struct node_map *nm_b) | |||
121 | * @nm_diff: output node map A-B (i.e. nodes of A that are not in B) | 121 | * @nm_diff: output node map A-B (i.e. nodes of A that are not in B) |
122 | */ | 122 | */ |
123 | 123 | ||
124 | static inline void tipc_nmap_diff(struct node_map *nm_a, struct node_map *nm_b, | 124 | static inline void tipc_nmap_diff(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b, |
125 | struct node_map *nm_diff) | 125 | struct tipc_node_map *nm_diff) |
126 | { | 126 | { |
127 | int stop = sizeof(nm_a->map) / sizeof(u32); | 127 | int stop = sizeof(nm_a->map) / sizeof(u32); |
128 | int w; | 128 | int w; |
@@ -195,12 +195,12 @@ static inline void tipc_port_list_free(struct port_list *pl_ptr) | |||
195 | 195 | ||
196 | int tipc_bclink_init(void); | 196 | int tipc_bclink_init(void); |
197 | void tipc_bclink_stop(void); | 197 | void tipc_bclink_stop(void); |
198 | void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked); | 198 | void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked); |
199 | int tipc_bclink_send_msg(struct sk_buff *buf); | 199 | int tipc_bclink_send_msg(struct sk_buff *buf); |
200 | void tipc_bclink_recv_pkt(struct sk_buff *buf); | 200 | void tipc_bclink_recv_pkt(struct sk_buff *buf); |
201 | u32 tipc_bclink_get_last_sent(void); | 201 | u32 tipc_bclink_get_last_sent(void); |
202 | u32 tipc_bclink_acks_missing(struct node *n_ptr); | 202 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr); |
203 | void tipc_bclink_check_gap(struct node *n_ptr, u32 seqno); | 203 | void tipc_bclink_check_gap(struct tipc_node *n_ptr, u32 seqno); |
204 | int tipc_bclink_stats(char *stats_buf, const u32 buf_size); | 204 | int tipc_bclink_stats(char *stats_buf, const u32 buf_size); |
205 | int tipc_bclink_reset_stats(void); | 205 | int tipc_bclink_reset_stats(void); |
206 | int tipc_bclink_set_queue_limits(u32 limit); | 206 | int tipc_bclink_set_queue_limits(u32 limit); |
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 6a9aba3edd08..a7a36779b9b3 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -599,7 +599,7 @@ int tipc_block_bearer(const char *name) | |||
599 | spin_lock_bh(&b_ptr->publ.lock); | 599 | spin_lock_bh(&b_ptr->publ.lock); |
600 | b_ptr->publ.blocked = 1; | 600 | b_ptr->publ.blocked = 1; |
601 | list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { | 601 | list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { |
602 | struct node *n_ptr = l_ptr->owner; | 602 | struct tipc_node *n_ptr = l_ptr->owner; |
603 | 603 | ||
604 | spin_lock_bh(&n_ptr->lock); | 604 | spin_lock_bh(&n_ptr->lock); |
605 | tipc_link_reset(l_ptr); | 605 | tipc_link_reset(l_ptr); |
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index 6a36b6600e6c..ca5734892713 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h | |||
@@ -104,7 +104,7 @@ struct bearer { | |||
104 | u32 continue_count; | 104 | u32 continue_count; |
105 | int active; | 105 | int active; |
106 | char net_plane; | 106 | char net_plane; |
107 | struct node_map nodes; | 107 | struct tipc_node_map nodes; |
108 | }; | 108 | }; |
109 | 109 | ||
110 | struct bearer_name { | 110 | struct bearer_name { |
diff --git a/net/tipc/cluster.c b/net/tipc/cluster.c index 46ee6c58532d..689fdefe9d04 100644 --- a/net/tipc/cluster.c +++ b/net/tipc/cluster.c | |||
@@ -48,8 +48,8 @@ static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, | |||
48 | u32 lower, u32 upper); | 48 | u32 lower, u32 upper); |
49 | static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); | 49 | static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); |
50 | 50 | ||
51 | struct node **tipc_local_nodes = NULL; | 51 | struct tipc_node **tipc_local_nodes = NULL; |
52 | struct node_map tipc_cltr_bcast_nodes = {0,{0,}}; | 52 | struct tipc_node_map tipc_cltr_bcast_nodes = {0,{0,}}; |
53 | u32 tipc_highest_allowed_slave = 0; | 53 | u32 tipc_highest_allowed_slave = 0; |
54 | 54 | ||
55 | struct cluster *tipc_cltr_create(u32 addr) | 55 | struct cluster *tipc_cltr_create(u32 addr) |
@@ -115,7 +115,7 @@ void tipc_cltr_delete(struct cluster *c_ptr) | |||
115 | 115 | ||
116 | u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) | 116 | u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) |
117 | { | 117 | { |
118 | struct node *n_ptr; | 118 | struct tipc_node *n_ptr; |
119 | u32 n_num = tipc_node(addr) + 1; | 119 | u32 n_num = tipc_node(addr) + 1; |
120 | 120 | ||
121 | if (!c_ptr) | 121 | if (!c_ptr) |
@@ -133,7 +133,7 @@ u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) | |||
133 | return 0; | 133 | return 0; |
134 | } | 134 | } |
135 | 135 | ||
136 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct node *n_ptr) | 136 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct tipc_node *n_ptr) |
137 | { | 137 | { |
138 | u32 n_num = tipc_node(n_ptr->addr); | 138 | u32 n_num = tipc_node(n_ptr->addr); |
139 | u32 max_n_num = tipc_max_nodes; | 139 | u32 max_n_num = tipc_max_nodes; |
@@ -196,7 +196,7 @@ u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref) | |||
196 | * Uses deterministic and fair algorithm. | 196 | * Uses deterministic and fair algorithm. |
197 | */ | 197 | */ |
198 | 198 | ||
199 | struct node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector) | 199 | struct tipc_node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector) |
200 | { | 200 | { |
201 | u32 n_num; | 201 | u32 n_num; |
202 | u32 mask = tipc_max_nodes; | 202 | u32 mask = tipc_max_nodes; |
@@ -379,7 +379,7 @@ void tipc_cltr_recv_routing_table(struct sk_buff *buf) | |||
379 | { | 379 | { |
380 | struct tipc_msg *msg = buf_msg(buf); | 380 | struct tipc_msg *msg = buf_msg(buf); |
381 | struct cluster *c_ptr; | 381 | struct cluster *c_ptr; |
382 | struct node *n_ptr; | 382 | struct tipc_node *n_ptr; |
383 | unchar *node_table; | 383 | unchar *node_table; |
384 | u32 table_size; | 384 | u32 table_size; |
385 | u32 router; | 385 | u32 router; |
@@ -499,7 +499,7 @@ static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, | |||
499 | u32 lower, u32 upper) | 499 | u32 lower, u32 upper) |
500 | { | 500 | { |
501 | struct sk_buff *buf_copy; | 501 | struct sk_buff *buf_copy; |
502 | struct node *n_ptr; | 502 | struct tipc_node *n_ptr; |
503 | u32 n_num; | 503 | u32 n_num; |
504 | u32 tstop; | 504 | u32 tstop; |
505 | 505 | ||
@@ -534,7 +534,7 @@ void tipc_cltr_broadcast(struct sk_buff *buf) | |||
534 | { | 534 | { |
535 | struct sk_buff *buf_copy; | 535 | struct sk_buff *buf_copy; |
536 | struct cluster *c_ptr; | 536 | struct cluster *c_ptr; |
537 | struct node *n_ptr; | 537 | struct tipc_node *n_ptr; |
538 | u32 n_num; | 538 | u32 n_num; |
539 | u32 tstart; | 539 | u32 tstart; |
540 | u32 tstop; | 540 | u32 tstop; |
diff --git a/net/tipc/cluster.h b/net/tipc/cluster.h index 62df074afaec..333efb0b9c44 100644 --- a/net/tipc/cluster.h +++ b/net/tipc/cluster.h | |||
@@ -54,24 +54,24 @@ | |||
54 | struct cluster { | 54 | struct cluster { |
55 | u32 addr; | 55 | u32 addr; |
56 | struct _zone *owner; | 56 | struct _zone *owner; |
57 | struct node **nodes; | 57 | struct tipc_node **nodes; |
58 | u32 highest_node; | 58 | u32 highest_node; |
59 | u32 highest_slave; | 59 | u32 highest_slave; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | 62 | ||
63 | extern struct node **tipc_local_nodes; | 63 | extern struct tipc_node **tipc_local_nodes; |
64 | extern u32 tipc_highest_allowed_slave; | 64 | extern u32 tipc_highest_allowed_slave; |
65 | extern struct node_map tipc_cltr_bcast_nodes; | 65 | extern struct tipc_node_map tipc_cltr_bcast_nodes; |
66 | 66 | ||
67 | void tipc_cltr_remove_as_router(struct cluster *c_ptr, u32 router); | 67 | void tipc_cltr_remove_as_router(struct cluster *c_ptr, u32 router); |
68 | void tipc_cltr_send_ext_routes(struct cluster *c_ptr, u32 dest); | 68 | void tipc_cltr_send_ext_routes(struct cluster *c_ptr, u32 dest); |
69 | struct node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector); | 69 | struct tipc_node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector); |
70 | u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref); | 70 | u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref); |
71 | void tipc_cltr_recv_routing_table(struct sk_buff *buf); | 71 | void tipc_cltr_recv_routing_table(struct sk_buff *buf); |
72 | struct cluster *tipc_cltr_create(u32 addr); | 72 | struct cluster *tipc_cltr_create(u32 addr); |
73 | void tipc_cltr_delete(struct cluster *c_ptr); | 73 | void tipc_cltr_delete(struct cluster *c_ptr); |
74 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct node *n_ptr); | 74 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct tipc_node *n_ptr); |
75 | void tipc_cltr_send_slave_routes(struct cluster *c_ptr, u32 dest); | 75 | void tipc_cltr_send_slave_routes(struct cluster *c_ptr, u32 dest); |
76 | void tipc_cltr_broadcast(struct sk_buff *buf); | 76 | void tipc_cltr_broadcast(struct sk_buff *buf); |
77 | int tipc_cltr_init(void); | 77 | int tipc_cltr_init(void); |
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index 1657f0e795ff..74b7d1e28aec 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
@@ -193,7 +193,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr) | |||
193 | /* Always accept link here */ | 193 | /* Always accept link here */ |
194 | struct sk_buff *rbuf; | 194 | struct sk_buff *rbuf; |
195 | struct tipc_media_addr *addr; | 195 | struct tipc_media_addr *addr; |
196 | struct node *n_ptr = tipc_node_find(orig); | 196 | struct tipc_node *n_ptr = tipc_node_find(orig); |
197 | int link_fully_up; | 197 | int link_fully_up; |
198 | 198 | ||
199 | dbg(" in own cluster\n"); | 199 | dbg(" in own cluster\n"); |
diff --git a/net/tipc/link.c b/net/tipc/link.c index d60113ba4b1b..dd4c18b9a35b 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -1155,7 +1155,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | |||
1155 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) | 1155 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) |
1156 | { | 1156 | { |
1157 | struct link *l_ptr; | 1157 | struct link *l_ptr; |
1158 | struct node *n_ptr; | 1158 | struct tipc_node *n_ptr; |
1159 | int res = -ELINKCONG; | 1159 | int res = -ELINKCONG; |
1160 | 1160 | ||
1161 | read_lock_bh(&tipc_net_lock); | 1161 | read_lock_bh(&tipc_net_lock); |
@@ -1226,7 +1226,7 @@ static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf, | |||
1226 | int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode) | 1226 | int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode) |
1227 | { | 1227 | { |
1228 | struct link *l_ptr; | 1228 | struct link *l_ptr; |
1229 | struct node *n_ptr; | 1229 | struct tipc_node *n_ptr; |
1230 | int res; | 1230 | int res; |
1231 | u32 selector = msg_origport(buf_msg(buf)) & 1; | 1231 | u32 selector = msg_origport(buf_msg(buf)) & 1; |
1232 | u32 dummy; | 1232 | u32 dummy; |
@@ -1270,7 +1270,7 @@ int tipc_link_send_sections_fast(struct port *sender, | |||
1270 | struct tipc_msg *hdr = &sender->publ.phdr; | 1270 | struct tipc_msg *hdr = &sender->publ.phdr; |
1271 | struct link *l_ptr; | 1271 | struct link *l_ptr; |
1272 | struct sk_buff *buf; | 1272 | struct sk_buff *buf; |
1273 | struct node *node; | 1273 | struct tipc_node *node; |
1274 | int res; | 1274 | int res; |
1275 | u32 selector = msg_origport(hdr) & 1; | 1275 | u32 selector = msg_origport(hdr) & 1; |
1276 | 1276 | ||
@@ -1364,7 +1364,7 @@ static int link_send_sections_long(struct port *sender, | |||
1364 | u32 destaddr) | 1364 | u32 destaddr) |
1365 | { | 1365 | { |
1366 | struct link *l_ptr; | 1366 | struct link *l_ptr; |
1367 | struct node *node; | 1367 | struct tipc_node *node; |
1368 | struct tipc_msg *hdr = &sender->publ.phdr; | 1368 | struct tipc_msg *hdr = &sender->publ.phdr; |
1369 | u32 dsz = msg_data_sz(hdr); | 1369 | u32 dsz = msg_data_sz(hdr); |
1370 | u32 max_pkt,fragm_sz,rest; | 1370 | u32 max_pkt,fragm_sz,rest; |
@@ -1636,7 +1636,7 @@ void tipc_link_push_queue(struct link *l_ptr) | |||
1636 | 1636 | ||
1637 | static void link_reset_all(unsigned long addr) | 1637 | static void link_reset_all(unsigned long addr) |
1638 | { | 1638 | { |
1639 | struct node *n_ptr; | 1639 | struct tipc_node *n_ptr; |
1640 | char addr_string[16]; | 1640 | char addr_string[16]; |
1641 | u32 i; | 1641 | u32 i; |
1642 | 1642 | ||
@@ -1682,7 +1682,7 @@ static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) | |||
1682 | 1682 | ||
1683 | /* Handle failure on broadcast link */ | 1683 | /* Handle failure on broadcast link */ |
1684 | 1684 | ||
1685 | struct node *n_ptr; | 1685 | struct tipc_node *n_ptr; |
1686 | char addr_string[16]; | 1686 | char addr_string[16]; |
1687 | 1687 | ||
1688 | tipc_printf(TIPC_OUTPUT, "Msg seq number: %u, ", msg_seqno(msg)); | 1688 | tipc_printf(TIPC_OUTPUT, "Msg seq number: %u, ", msg_seqno(msg)); |
@@ -1843,7 +1843,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | |||
1843 | read_lock_bh(&tipc_net_lock); | 1843 | read_lock_bh(&tipc_net_lock); |
1844 | while (head) { | 1844 | while (head) { |
1845 | struct bearer *b_ptr = (struct bearer *)tb_ptr; | 1845 | struct bearer *b_ptr = (struct bearer *)tb_ptr; |
1846 | struct node *n_ptr; | 1846 | struct tipc_node *n_ptr; |
1847 | struct link *l_ptr; | 1847 | struct link *l_ptr; |
1848 | struct sk_buff *crs; | 1848 | struct sk_buff *crs; |
1849 | struct sk_buff *buf = head; | 1849 | struct sk_buff *buf = head; |
@@ -2935,7 +2935,7 @@ void tipc_link_set_queue_limits(struct link *l_ptr, u32 window) | |||
2935 | * Returns pointer to link (or 0 if invalid link name). | 2935 | * Returns pointer to link (or 0 if invalid link name). |
2936 | */ | 2936 | */ |
2937 | 2937 | ||
2938 | static struct link *link_find_link(const char *name, struct node **node) | 2938 | static struct link *link_find_link(const char *name, struct tipc_node **node) |
2939 | { | 2939 | { |
2940 | struct link_name link_name_parts; | 2940 | struct link_name link_name_parts; |
2941 | struct bearer *b_ptr; | 2941 | struct bearer *b_ptr; |
@@ -2965,7 +2965,7 @@ struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space | |||
2965 | struct tipc_link_config *args; | 2965 | struct tipc_link_config *args; |
2966 | u32 new_value; | 2966 | u32 new_value; |
2967 | struct link *l_ptr; | 2967 | struct link *l_ptr; |
2968 | struct node *node; | 2968 | struct tipc_node *node; |
2969 | int res; | 2969 | int res; |
2970 | 2970 | ||
2971 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_CONFIG)) | 2971 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_CONFIG)) |
@@ -3043,7 +3043,7 @@ struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_ | |||
3043 | { | 3043 | { |
3044 | char *link_name; | 3044 | char *link_name; |
3045 | struct link *l_ptr; | 3045 | struct link *l_ptr; |
3046 | struct node *node; | 3046 | struct tipc_node *node; |
3047 | 3047 | ||
3048 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_NAME)) | 3048 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_NAME)) |
3049 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | 3049 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); |
@@ -3091,7 +3091,7 @@ static int tipc_link_stats(const char *name, char *buf, const u32 buf_size) | |||
3091 | { | 3091 | { |
3092 | struct print_buf pb; | 3092 | struct print_buf pb; |
3093 | struct link *l_ptr; | 3093 | struct link *l_ptr; |
3094 | struct node *node; | 3094 | struct tipc_node *node; |
3095 | char *status; | 3095 | char *status; |
3096 | u32 profile_total = 0; | 3096 | u32 profile_total = 0; |
3097 | 3097 | ||
@@ -3207,7 +3207,7 @@ int link_control(const char *name, u32 op, u32 val) | |||
3207 | int res = -EINVAL; | 3207 | int res = -EINVAL; |
3208 | struct link *l_ptr; | 3208 | struct link *l_ptr; |
3209 | u32 bearer_id; | 3209 | u32 bearer_id; |
3210 | struct node * node; | 3210 | struct tipc_node * node; |
3211 | u32 a; | 3211 | u32 a; |
3212 | 3212 | ||
3213 | a = link_name2addr(name, &bearer_id); | 3213 | a = link_name2addr(name, &bearer_id); |
@@ -3249,7 +3249,7 @@ int link_control(const char *name, u32 op, u32 val) | |||
3249 | 3249 | ||
3250 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector) | 3250 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector) |
3251 | { | 3251 | { |
3252 | struct node *n_ptr; | 3252 | struct tipc_node *n_ptr; |
3253 | struct link *l_ptr; | 3253 | struct link *l_ptr; |
3254 | u32 res = MAX_PKT_DEFAULT; | 3254 | u32 res = MAX_PKT_DEFAULT; |
3255 | 3255 | ||
diff --git a/net/tipc/link.h b/net/tipc/link.h index 52f3e7c1871f..6a51e38ad25c 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
@@ -116,7 +116,7 @@ struct link { | |||
116 | char name[TIPC_MAX_LINK_NAME]; | 116 | char name[TIPC_MAX_LINK_NAME]; |
117 | struct tipc_media_addr media_addr; | 117 | struct tipc_media_addr media_addr; |
118 | struct timer_list timer; | 118 | struct timer_list timer; |
119 | struct node *owner; | 119 | struct tipc_node *owner; |
120 | struct list_head link_list; | 120 | struct list_head link_list; |
121 | 121 | ||
122 | /* Management and link supervision data */ | 122 | /* Management and link supervision data */ |
diff --git a/net/tipc/name_table.h b/net/tipc/name_table.h index b9e7cd336d76..139882d4ed00 100644 --- a/net/tipc/name_table.h +++ b/net/tipc/name_table.h | |||
@@ -76,7 +76,7 @@ struct publication { | |||
76 | u32 node; | 76 | u32 node; |
77 | u32 ref; | 77 | u32 ref; |
78 | u32 key; | 78 | u32 key; |
79 | struct node_subscr subscr; | 79 | struct tipc_node_subscr subscr; |
80 | struct list_head local_list; | 80 | struct list_head local_list; |
81 | struct list_head pport_list; | 81 | struct list_head pport_list; |
82 | struct publication *node_list_next; | 82 | struct publication *node_list_next; |
diff --git a/net/tipc/net.c b/net/tipc/net.c index ec7b04fbdc43..7906608bf510 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -118,7 +118,7 @@ | |||
118 | DEFINE_RWLOCK(tipc_net_lock); | 118 | DEFINE_RWLOCK(tipc_net_lock); |
119 | struct network tipc_net = { NULL }; | 119 | struct network tipc_net = { NULL }; |
120 | 120 | ||
121 | struct node *tipc_net_select_remote_node(u32 addr, u32 ref) | 121 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref) |
122 | { | 122 | { |
123 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); | 123 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); |
124 | } | 124 | } |
diff --git a/net/tipc/net.h b/net/tipc/net.h index d154ac2bda9a..de2b9ad8f646 100644 --- a/net/tipc/net.h +++ b/net/tipc/net.h | |||
@@ -55,7 +55,7 @@ extern rwlock_t tipc_net_lock; | |||
55 | void tipc_net_remove_as_router(u32 router); | 55 | void tipc_net_remove_as_router(u32 router); |
56 | void tipc_net_send_external_routes(u32 dest); | 56 | void tipc_net_send_external_routes(u32 dest); |
57 | void tipc_net_route_msg(struct sk_buff *buf); | 57 | void tipc_net_route_msg(struct sk_buff *buf); |
58 | struct node *tipc_net_select_remote_node(u32 addr, u32 ref); | 58 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref); |
59 | u32 tipc_net_select_router(u32 addr, u32 ref); | 59 | u32 tipc_net_select_router(u32 addr, u32 ref); |
60 | 60 | ||
61 | int tipc_net_start(u32 addr); | 61 | int tipc_net_start(u32 addr); |
diff --git a/net/tipc/node.c b/net/tipc/node.c index ee952ad60218..20d98c56e152 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -46,11 +46,11 @@ | |||
46 | #include "bearer.h" | 46 | #include "bearer.h" |
47 | #include "name_distr.h" | 47 | #include "name_distr.h" |
48 | 48 | ||
49 | void node_print(struct print_buf *buf, struct node *n_ptr, char *str); | 49 | void node_print(struct print_buf *buf, struct tipc_node *n_ptr, char *str); |
50 | static void node_lost_contact(struct node *n_ptr); | 50 | static void node_lost_contact(struct tipc_node *n_ptr); |
51 | static void node_established_contact(struct node *n_ptr); | 51 | static void node_established_contact(struct tipc_node *n_ptr); |
52 | 52 | ||
53 | struct node *tipc_nodes = NULL; /* sorted list of nodes within cluster */ | 53 | struct tipc_node *tipc_nodes = NULL; /* sorted list of nodes within cluster */ |
54 | 54 | ||
55 | static DEFINE_SPINLOCK(node_create_lock); | 55 | static DEFINE_SPINLOCK(node_create_lock); |
56 | 56 | ||
@@ -66,11 +66,11 @@ u32 tipc_own_tag = 0; | |||
66 | * but this is a non-trivial change.) | 66 | * but this is a non-trivial change.) |
67 | */ | 67 | */ |
68 | 68 | ||
69 | struct node *tipc_node_create(u32 addr) | 69 | struct tipc_node *tipc_node_create(u32 addr) |
70 | { | 70 | { |
71 | struct cluster *c_ptr; | 71 | struct cluster *c_ptr; |
72 | struct node *n_ptr; | 72 | struct tipc_node *n_ptr; |
73 | struct node **curr_node; | 73 | struct tipc_node **curr_node; |
74 | 74 | ||
75 | spin_lock_bh(&node_create_lock); | 75 | spin_lock_bh(&node_create_lock); |
76 | 76 | ||
@@ -120,7 +120,7 @@ struct node *tipc_node_create(u32 addr) | |||
120 | return n_ptr; | 120 | return n_ptr; |
121 | } | 121 | } |
122 | 122 | ||
123 | void tipc_node_delete(struct node *n_ptr) | 123 | void tipc_node_delete(struct tipc_node *n_ptr) |
124 | { | 124 | { |
125 | if (!n_ptr) | 125 | if (!n_ptr) |
126 | return; | 126 | return; |
@@ -146,7 +146,7 @@ void tipc_node_delete(struct node *n_ptr) | |||
146 | * Link becomes active (alone or shared) or standby, depending on its priority. | 146 | * Link becomes active (alone or shared) or standby, depending on its priority. |
147 | */ | 147 | */ |
148 | 148 | ||
149 | void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) | 149 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr) |
150 | { | 150 | { |
151 | struct link **active = &n_ptr->active_links[0]; | 151 | struct link **active = &n_ptr->active_links[0]; |
152 | 152 | ||
@@ -180,7 +180,7 @@ void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) | |||
180 | * node_select_active_links - select active link | 180 | * node_select_active_links - select active link |
181 | */ | 181 | */ |
182 | 182 | ||
183 | static void node_select_active_links(struct node *n_ptr) | 183 | static void node_select_active_links(struct tipc_node *n_ptr) |
184 | { | 184 | { |
185 | struct link **active = &n_ptr->active_links[0]; | 185 | struct link **active = &n_ptr->active_links[0]; |
186 | u32 i; | 186 | u32 i; |
@@ -208,7 +208,7 @@ static void node_select_active_links(struct node *n_ptr) | |||
208 | * tipc_node_link_down - handle loss of link | 208 | * tipc_node_link_down - handle loss of link |
209 | */ | 209 | */ |
210 | 210 | ||
211 | void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr) | 211 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr) |
212 | { | 212 | { |
213 | struct link **active; | 213 | struct link **active; |
214 | 214 | ||
@@ -235,30 +235,30 @@ void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr) | |||
235 | node_lost_contact(n_ptr); | 235 | node_lost_contact(n_ptr); |
236 | } | 236 | } |
237 | 237 | ||
238 | int tipc_node_has_active_links(struct node *n_ptr) | 238 | int tipc_node_has_active_links(struct tipc_node *n_ptr) |
239 | { | 239 | { |
240 | return (n_ptr && | 240 | return (n_ptr && |
241 | ((n_ptr->active_links[0]) || (n_ptr->active_links[1]))); | 241 | ((n_ptr->active_links[0]) || (n_ptr->active_links[1]))); |
242 | } | 242 | } |
243 | 243 | ||
244 | int tipc_node_has_redundant_links(struct node *n_ptr) | 244 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr) |
245 | { | 245 | { |
246 | return (n_ptr->working_links > 1); | 246 | return (n_ptr->working_links > 1); |
247 | } | 247 | } |
248 | 248 | ||
249 | static int tipc_node_has_active_routes(struct node *n_ptr) | 249 | static int tipc_node_has_active_routes(struct tipc_node *n_ptr) |
250 | { | 250 | { |
251 | return (n_ptr && (n_ptr->last_router >= 0)); | 251 | return (n_ptr && (n_ptr->last_router >= 0)); |
252 | } | 252 | } |
253 | 253 | ||
254 | int tipc_node_is_up(struct node *n_ptr) | 254 | int tipc_node_is_up(struct tipc_node *n_ptr) |
255 | { | 255 | { |
256 | return (tipc_node_has_active_links(n_ptr) || tipc_node_has_active_routes(n_ptr)); | 256 | return (tipc_node_has_active_links(n_ptr) || tipc_node_has_active_routes(n_ptr)); |
257 | } | 257 | } |
258 | 258 | ||
259 | struct node *tipc_node_attach_link(struct link *l_ptr) | 259 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr) |
260 | { | 260 | { |
261 | struct node *n_ptr = tipc_node_find(l_ptr->addr); | 261 | struct tipc_node *n_ptr = tipc_node_find(l_ptr->addr); |
262 | 262 | ||
263 | if (!n_ptr) | 263 | if (!n_ptr) |
264 | n_ptr = tipc_node_create(l_ptr->addr); | 264 | n_ptr = tipc_node_create(l_ptr->addr); |
@@ -285,7 +285,7 @@ struct node *tipc_node_attach_link(struct link *l_ptr) | |||
285 | return NULL; | 285 | return NULL; |
286 | } | 286 | } |
287 | 287 | ||
288 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr) | 288 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr) |
289 | { | 289 | { |
290 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; | 290 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; |
291 | tipc_net.zones[tipc_zone(l_ptr->addr)]->links--; | 291 | tipc_net.zones[tipc_zone(l_ptr->addr)]->links--; |
@@ -338,7 +338,7 @@ void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr) | |||
338 | * | 338 | * |
339 | */ | 339 | */ |
340 | 340 | ||
341 | static void node_established_contact(struct node *n_ptr) | 341 | static void node_established_contact(struct tipc_node *n_ptr) |
342 | { | 342 | { |
343 | struct cluster *c_ptr; | 343 | struct cluster *c_ptr; |
344 | 344 | ||
@@ -384,10 +384,10 @@ static void node_established_contact(struct node *n_ptr) | |||
384 | tipc_highest_allowed_slave); | 384 | tipc_highest_allowed_slave); |
385 | } | 385 | } |
386 | 386 | ||
387 | static void node_lost_contact(struct node *n_ptr) | 387 | static void node_lost_contact(struct tipc_node *n_ptr) |
388 | { | 388 | { |
389 | struct cluster *c_ptr; | 389 | struct cluster *c_ptr; |
390 | struct node_subscr *ns, *tns; | 390 | struct tipc_node_subscr *ns, *tns; |
391 | char addr_string[16]; | 391 | char addr_string[16]; |
392 | u32 i; | 392 | u32 i; |
393 | 393 | ||
@@ -466,9 +466,9 @@ static void node_lost_contact(struct node *n_ptr) | |||
466 | * Called by when cluster local lookup has failed. | 466 | * Called by when cluster local lookup has failed. |
467 | */ | 467 | */ |
468 | 468 | ||
469 | struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | 469 | struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector) |
470 | { | 470 | { |
471 | struct node *n_ptr; | 471 | struct tipc_node *n_ptr; |
472 | u32 router_addr; | 472 | u32 router_addr; |
473 | 473 | ||
474 | if (!tipc_addr_domain_valid(addr)) | 474 | if (!tipc_addr_domain_valid(addr)) |
@@ -513,7 +513,7 @@ struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | |||
513 | * Uses a deterministic and fair algorithm for selecting router node. | 513 | * Uses a deterministic and fair algorithm for selecting router node. |
514 | */ | 514 | */ |
515 | 515 | ||
516 | u32 tipc_node_select_router(struct node *n_ptr, u32 ref) | 516 | u32 tipc_node_select_router(struct tipc_node *n_ptr, u32 ref) |
517 | { | 517 | { |
518 | u32 ulim; | 518 | u32 ulim; |
519 | u32 mask; | 519 | u32 mask; |
@@ -551,7 +551,7 @@ u32 tipc_node_select_router(struct node *n_ptr, u32 ref) | |||
551 | return tipc_addr(own_zone(), own_cluster(), r); | 551 | return tipc_addr(own_zone(), own_cluster(), r); |
552 | } | 552 | } |
553 | 553 | ||
554 | void tipc_node_add_router(struct node *n_ptr, u32 router) | 554 | void tipc_node_add_router(struct tipc_node *n_ptr, u32 router) |
555 | { | 555 | { |
556 | u32 r_num = tipc_node(router); | 556 | u32 r_num = tipc_node(router); |
557 | 557 | ||
@@ -562,7 +562,7 @@ void tipc_node_add_router(struct node *n_ptr, u32 router) | |||
562 | !n_ptr->routers[n_ptr->last_router]); | 562 | !n_ptr->routers[n_ptr->last_router]); |
563 | } | 563 | } |
564 | 564 | ||
565 | void tipc_node_remove_router(struct node *n_ptr, u32 router) | 565 | void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router) |
566 | { | 566 | { |
567 | u32 r_num = tipc_node(router); | 567 | u32 r_num = tipc_node(router); |
568 | 568 | ||
@@ -580,7 +580,7 @@ void tipc_node_remove_router(struct node *n_ptr, u32 router) | |||
580 | } | 580 | } |
581 | 581 | ||
582 | #if 0 | 582 | #if 0 |
583 | void node_print(struct print_buf *buf, struct node *n_ptr, char *str) | 583 | void node_print(struct print_buf *buf, struct tipc_node *n_ptr, char *str) |
584 | { | 584 | { |
585 | u32 i; | 585 | u32 i; |
586 | 586 | ||
@@ -597,7 +597,7 @@ void node_print(struct print_buf *buf, struct node *n_ptr, char *str) | |||
597 | 597 | ||
598 | u32 tipc_available_nodes(const u32 domain) | 598 | u32 tipc_available_nodes(const u32 domain) |
599 | { | 599 | { |
600 | struct node *n_ptr; | 600 | struct tipc_node *n_ptr; |
601 | u32 cnt = 0; | 601 | u32 cnt = 0; |
602 | 602 | ||
603 | read_lock_bh(&tipc_net_lock); | 603 | read_lock_bh(&tipc_net_lock); |
@@ -615,7 +615,7 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) | |||
615 | { | 615 | { |
616 | u32 domain; | 616 | u32 domain; |
617 | struct sk_buff *buf; | 617 | struct sk_buff *buf; |
618 | struct node *n_ptr; | 618 | struct tipc_node *n_ptr; |
619 | struct tipc_node_info node_info; | 619 | struct tipc_node_info node_info; |
620 | u32 payload_size; | 620 | u32 payload_size; |
621 | 621 | ||
@@ -667,7 +667,7 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) | |||
667 | { | 667 | { |
668 | u32 domain; | 668 | u32 domain; |
669 | struct sk_buff *buf; | 669 | struct sk_buff *buf; |
670 | struct node *n_ptr; | 670 | struct tipc_node *n_ptr; |
671 | struct tipc_link_info link_info; | 671 | struct tipc_link_info link_info; |
672 | u32 payload_size; | 672 | u32 payload_size; |
673 | 673 | ||
diff --git a/net/tipc/node.h b/net/tipc/node.h index cd1882654bbb..6f990da5d143 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
@@ -43,7 +43,7 @@ | |||
43 | #include "bearer.h" | 43 | #include "bearer.h" |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * struct node - TIPC node structure | 46 | * struct tipc_node - TIPC node structure |
47 | * @addr: network address of node | 47 | * @addr: network address of node |
48 | * @lock: spinlock governing access to structure | 48 | * @lock: spinlock governing access to structure |
49 | * @owner: pointer to cluster that node belongs to | 49 | * @owner: pointer to cluster that node belongs to |
@@ -68,11 +68,11 @@ | |||
68 | * @defragm: list of partially reassembled b'cast message fragments from node | 68 | * @defragm: list of partially reassembled b'cast message fragments from node |
69 | */ | 69 | */ |
70 | 70 | ||
71 | struct node { | 71 | struct tipc_node { |
72 | u32 addr; | 72 | u32 addr; |
73 | spinlock_t lock; | 73 | spinlock_t lock; |
74 | struct cluster *owner; | 74 | struct cluster *owner; |
75 | struct node *next; | 75 | struct tipc_node *next; |
76 | struct list_head nsub; | 76 | struct list_head nsub; |
77 | struct link *active_links[2]; | 77 | struct link *active_links[2]; |
78 | struct link *links[MAX_BEARERS]; | 78 | struct link *links[MAX_BEARERS]; |
@@ -94,26 +94,26 @@ struct node { | |||
94 | } bclink; | 94 | } bclink; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | extern struct node *tipc_nodes; | 97 | extern struct tipc_node *tipc_nodes; |
98 | extern u32 tipc_own_tag; | 98 | extern u32 tipc_own_tag; |
99 | 99 | ||
100 | struct node *tipc_node_create(u32 addr); | 100 | struct tipc_node *tipc_node_create(u32 addr); |
101 | void tipc_node_delete(struct node *n_ptr); | 101 | void tipc_node_delete(struct tipc_node *n_ptr); |
102 | struct node *tipc_node_attach_link(struct link *l_ptr); | 102 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr); |
103 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr); | 103 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr); |
104 | void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr); | 104 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr); |
105 | void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr); | 105 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr); |
106 | int tipc_node_has_active_links(struct node *n_ptr); | 106 | int tipc_node_has_active_links(struct tipc_node *n_ptr); |
107 | int tipc_node_has_redundant_links(struct node *n_ptr); | 107 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr); |
108 | u32 tipc_node_select_router(struct node *n_ptr, u32 ref); | 108 | u32 tipc_node_select_router(struct tipc_node *n_ptr, u32 ref); |
109 | struct node *tipc_node_select_next_hop(u32 addr, u32 selector); | 109 | struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector); |
110 | int tipc_node_is_up(struct node *n_ptr); | 110 | int tipc_node_is_up(struct tipc_node *n_ptr); |
111 | void tipc_node_add_router(struct node *n_ptr, u32 router); | 111 | void tipc_node_add_router(struct tipc_node *n_ptr, u32 router); |
112 | void tipc_node_remove_router(struct node *n_ptr, u32 router); | 112 | void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router); |
113 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); | 113 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); |
114 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); | 114 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); |
115 | 115 | ||
116 | static inline struct node *tipc_node_find(u32 addr) | 116 | static inline struct tipc_node *tipc_node_find(u32 addr) |
117 | { | 117 | { |
118 | if (likely(in_own_cluster(addr))) | 118 | if (likely(in_own_cluster(addr))) |
119 | return tipc_local_nodes[tipc_node(addr)]; | 119 | return tipc_local_nodes[tipc_node(addr)]; |
@@ -126,19 +126,19 @@ static inline struct node *tipc_node_find(u32 addr) | |||
126 | return NULL; | 126 | return NULL; |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline struct node *tipc_node_select(u32 addr, u32 selector) | 129 | static inline struct tipc_node *tipc_node_select(u32 addr, u32 selector) |
130 | { | 130 | { |
131 | if (likely(in_own_cluster(addr))) | 131 | if (likely(in_own_cluster(addr))) |
132 | return tipc_local_nodes[tipc_node(addr)]; | 132 | return tipc_local_nodes[tipc_node(addr)]; |
133 | return tipc_node_select_next_hop(addr, selector); | 133 | return tipc_node_select_next_hop(addr, selector); |
134 | } | 134 | } |
135 | 135 | ||
136 | static inline void tipc_node_lock(struct node *n_ptr) | 136 | static inline void tipc_node_lock(struct tipc_node *n_ptr) |
137 | { | 137 | { |
138 | spin_lock_bh(&n_ptr->lock); | 138 | spin_lock_bh(&n_ptr->lock); |
139 | } | 139 | } |
140 | 140 | ||
141 | static inline void tipc_node_unlock(struct node *n_ptr) | 141 | static inline void tipc_node_unlock(struct tipc_node *n_ptr) |
142 | { | 142 | { |
143 | spin_unlock_bh(&n_ptr->lock); | 143 | spin_unlock_bh(&n_ptr->lock); |
144 | } | 144 | } |
diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c index 8ecbd0fb6103..19194d476a9e 100644 --- a/net/tipc/node_subscr.c +++ b/net/tipc/node_subscr.c | |||
@@ -44,7 +44,7 @@ | |||
44 | * tipc_nodesub_subscribe - create "node down" subscription for specified node | 44 | * tipc_nodesub_subscribe - create "node down" subscription for specified node |
45 | */ | 45 | */ |
46 | 46 | ||
47 | void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | 47 | void tipc_nodesub_subscribe(struct tipc_node_subscr *node_sub, u32 addr, |
48 | void *usr_handle, net_ev_handler handle_down) | 48 | void *usr_handle, net_ev_handler handle_down) |
49 | { | 49 | { |
50 | if (addr == tipc_own_addr) { | 50 | if (addr == tipc_own_addr) { |
@@ -69,7 +69,7 @@ void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | |||
69 | * tipc_nodesub_unsubscribe - cancel "node down" subscription (if any) | 69 | * tipc_nodesub_unsubscribe - cancel "node down" subscription (if any) |
70 | */ | 70 | */ |
71 | 71 | ||
72 | void tipc_nodesub_unsubscribe(struct node_subscr *node_sub) | 72 | void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub) |
73 | { | 73 | { |
74 | if (!node_sub->node) | 74 | if (!node_sub->node) |
75 | return; | 75 | return; |
diff --git a/net/tipc/node_subscr.h b/net/tipc/node_subscr.h index 5f3f5859b84c..006ed739f515 100644 --- a/net/tipc/node_subscr.h +++ b/net/tipc/node_subscr.h | |||
@@ -42,22 +42,22 @@ | |||
42 | typedef void (*net_ev_handler) (void *usr_handle); | 42 | typedef void (*net_ev_handler) (void *usr_handle); |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * struct node_subscr - "node down" subscription entry | 45 | * struct tipc_node_subscr - "node down" subscription entry |
46 | * @node: ptr to node structure of interest (or NULL, if none) | 46 | * @node: ptr to node structure of interest (or NULL, if none) |
47 | * @handle_node_down: routine to invoke when node fails | 47 | * @handle_node_down: routine to invoke when node fails |
48 | * @usr_handle: argument to pass to routine when node fails | 48 | * @usr_handle: argument to pass to routine when node fails |
49 | * @nodesub_list: adjacent entries in list of subscriptions for the node | 49 | * @nodesub_list: adjacent entries in list of subscriptions for the node |
50 | */ | 50 | */ |
51 | 51 | ||
52 | struct node_subscr { | 52 | struct tipc_node_subscr { |
53 | struct node *node; | 53 | struct tipc_node *node; |
54 | net_ev_handler handle_node_down; | 54 | net_ev_handler handle_node_down; |
55 | void *usr_handle; | 55 | void *usr_handle; |
56 | struct list_head nodesub_list; | 56 | struct list_head nodesub_list; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | 59 | void tipc_nodesub_subscribe(struct tipc_node_subscr *node_sub, u32 addr, |
60 | void *usr_handle, net_ev_handler handle_down); | 60 | void *usr_handle, net_ev_handler handle_down); |
61 | void tipc_nodesub_unsubscribe(struct node_subscr *node_sub); | 61 | void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub); |
62 | 62 | ||
63 | #endif | 63 | #endif |
diff --git a/net/tipc/port.h b/net/tipc/port.h index e5f8c16429bd..ff31ee4a1dc3 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h | |||
@@ -105,7 +105,7 @@ struct port { | |||
105 | u32 probing_interval; | 105 | u32 probing_interval; |
106 | u32 last_in_seqno; | 106 | u32 last_in_seqno; |
107 | struct timer_list timer; | 107 | struct timer_list timer; |
108 | struct node_subscr subscription; | 108 | struct tipc_node_subscr subscription; |
109 | }; | 109 | }; |
110 | 110 | ||
111 | extern spinlock_t tipc_port_list_lock; | 111 | extern spinlock_t tipc_port_list_lock; |
diff --git a/net/tipc/zone.c b/net/tipc/zone.c index 3506f8563441..2c01ba2d86bf 100644 --- a/net/tipc/zone.c +++ b/net/tipc/zone.c | |||
@@ -111,10 +111,10 @@ void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest) | |||
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | struct node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) | 114 | struct tipc_node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) |
115 | { | 115 | { |
116 | struct cluster *c_ptr; | 116 | struct cluster *c_ptr; |
117 | struct node *n_ptr; | 117 | struct tipc_node *n_ptr; |
118 | u32 c_num; | 118 | u32 c_num; |
119 | 119 | ||
120 | if (!z_ptr) | 120 | if (!z_ptr) |
diff --git a/net/tipc/zone.h b/net/tipc/zone.h index 6e7a08df8af5..7bdc3406ba9b 100644 --- a/net/tipc/zone.h +++ b/net/tipc/zone.h | |||
@@ -54,7 +54,7 @@ struct _zone { | |||
54 | u32 links; | 54 | u32 links; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | struct node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref); | 57 | struct tipc_node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref); |
58 | u32 tipc_zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref); | 58 | u32 tipc_zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref); |
59 | void tipc_zone_remove_as_router(struct _zone *z_ptr, u32 router); | 59 | void tipc_zone_remove_as_router(struct _zone *z_ptr, u32 router); |
60 | void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest); | 60 | void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest); |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index b52f923ce680..d11a8154500f 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -811,11 +811,12 @@ static int string_to_context_struct(struct policydb *pol, | |||
811 | /* Check the validity of the new context. */ | 811 | /* Check the validity of the new context. */ |
812 | if (!policydb_context_isvalid(pol, ctx)) { | 812 | if (!policydb_context_isvalid(pol, ctx)) { |
813 | rc = -EINVAL; | 813 | rc = -EINVAL; |
814 | context_destroy(ctx); | ||
815 | goto out; | 814 | goto out; |
816 | } | 815 | } |
817 | rc = 0; | 816 | rc = 0; |
818 | out: | 817 | out: |
818 | if (rc) | ||
819 | context_destroy(ctx); | ||
819 | return rc; | 820 | return rc; |
820 | } | 821 | } |
821 | 822 | ||
@@ -868,8 +869,7 @@ static int security_context_to_sid_core(const char *scontext, u32 scontext_len, | |||
868 | } else if (rc) | 869 | } else if (rc) |
869 | goto out; | 870 | goto out; |
870 | rc = sidtab_context_to_sid(&sidtab, &context, sid); | 871 | rc = sidtab_context_to_sid(&sidtab, &context, sid); |
871 | if (rc) | 872 | context_destroy(&context); |
872 | context_destroy(&context); | ||
873 | out: | 873 | out: |
874 | read_unlock(&policy_rwlock); | 874 | read_unlock(&policy_rwlock); |
875 | kfree(scontext2); | 875 | kfree(scontext2); |