Contents of /trunk/kernel-lts/patches-3.4/0154-3.4.55-all-fixes.patch
Parent Directory | Revision Log
Revision 2259 -
(show annotations)
(download)
Mon Aug 19 09:25:31 2013 UTC (10 years, 8 months ago) by niro
File size: 58426 byte(s)
Mon Aug 19 09:25:31 2013 UTC (10 years, 8 months ago) by niro
File size: 58426 byte(s)
-linux-3.4.55
1 | diff --git a/Makefile b/Makefile |
2 | index 6ca3657..c11116f 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,6 +1,6 @@ |
6 | VERSION = 3 |
7 | PATCHLEVEL = 4 |
8 | -SUBLEVEL = 54 |
9 | +SUBLEVEL = 55 |
10 | EXTRAVERSION = |
11 | NAME = Saber-toothed Squirrel |
12 | |
13 | diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c |
14 | index 68f7e11..ce48203 100644 |
15 | --- a/arch/sparc/kernel/asm-offsets.c |
16 | +++ b/arch/sparc/kernel/asm-offsets.c |
17 | @@ -34,6 +34,8 @@ int foo(void) |
18 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); |
19 | BLANK(); |
20 | DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context)); |
21 | + BLANK(); |
22 | + DEFINE(VMA_VM_MM, offsetof(struct vm_area_struct, vm_mm)); |
23 | |
24 | /* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */ |
25 | return 0; |
26 | diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S |
27 | index 44aad32..969f964 100644 |
28 | --- a/arch/sparc/mm/hypersparc.S |
29 | +++ b/arch/sparc/mm/hypersparc.S |
30 | @@ -74,7 +74,7 @@ hypersparc_flush_cache_mm_out: |
31 | |
32 | /* The things we do for performance... */ |
33 | hypersparc_flush_cache_range: |
34 | - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ |
35 | + ld [%o0 + VMA_VM_MM], %o0 |
36 | #ifndef CONFIG_SMP |
37 | ld [%o0 + AOFF_mm_context], %g1 |
38 | cmp %g1, -1 |
39 | @@ -163,7 +163,7 @@ hypersparc_flush_cache_range_out: |
40 | */ |
41 | /* Verified, my ass... */ |
42 | hypersparc_flush_cache_page: |
43 | - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ |
44 | + ld [%o0 + VMA_VM_MM], %o0 |
45 | ld [%o0 + AOFF_mm_context], %g2 |
46 | #ifndef CONFIG_SMP |
47 | cmp %g2, -1 |
48 | @@ -284,7 +284,7 @@ hypersparc_flush_tlb_mm_out: |
49 | sta %g5, [%g1] ASI_M_MMUREGS |
50 | |
51 | hypersparc_flush_tlb_range: |
52 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
53 | + ld [%o0 + VMA_VM_MM], %o0 |
54 | mov SRMMU_CTX_REG, %g1 |
55 | ld [%o0 + AOFF_mm_context], %o3 |
56 | lda [%g1] ASI_M_MMUREGS, %g5 |
57 | @@ -307,7 +307,7 @@ hypersparc_flush_tlb_range_out: |
58 | sta %g5, [%g1] ASI_M_MMUREGS |
59 | |
60 | hypersparc_flush_tlb_page: |
61 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
62 | + ld [%o0 + VMA_VM_MM], %o0 |
63 | mov SRMMU_CTX_REG, %g1 |
64 | ld [%o0 + AOFF_mm_context], %o3 |
65 | andn %o1, (PAGE_SIZE - 1), %o1 |
66 | diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c |
67 | index 0791618..7f8238f 100644 |
68 | --- a/arch/sparc/mm/init_64.c |
69 | +++ b/arch/sparc/mm/init_64.c |
70 | @@ -1067,7 +1067,14 @@ static int __init grab_mblocks(struct mdesc_handle *md) |
71 | m->size = *val; |
72 | val = mdesc_get_property(md, node, |
73 | "address-congruence-offset", NULL); |
74 | - m->offset = *val; |
75 | + |
76 | + /* The address-congruence-offset property is optional. |
77 | + * Explicity zero it be identifty this. |
78 | + */ |
79 | + if (val) |
80 | + m->offset = *val; |
81 | + else |
82 | + m->offset = 0UL; |
83 | |
84 | numadbg("MBLOCK[%d]: base[%llx] size[%llx] offset[%llx]\n", |
85 | count - 1, m->base, m->size, m->offset); |
86 | diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S |
87 | index c801c39..5d2b88d 100644 |
88 | --- a/arch/sparc/mm/swift.S |
89 | +++ b/arch/sparc/mm/swift.S |
90 | @@ -105,7 +105,7 @@ swift_flush_cache_mm_out: |
91 | |
92 | .globl swift_flush_cache_range |
93 | swift_flush_cache_range: |
94 | - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ |
95 | + ld [%o0 + VMA_VM_MM], %o0 |
96 | sub %o2, %o1, %o2 |
97 | sethi %hi(4096), %o3 |
98 | cmp %o2, %o3 |
99 | @@ -116,7 +116,7 @@ swift_flush_cache_range: |
100 | |
101 | .globl swift_flush_cache_page |
102 | swift_flush_cache_page: |
103 | - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ |
104 | + ld [%o0 + VMA_VM_MM], %o0 |
105 | 70: |
106 | ld [%o0 + AOFF_mm_context], %g2 |
107 | cmp %g2, -1 |
108 | @@ -219,7 +219,7 @@ swift_flush_sig_insns: |
109 | .globl swift_flush_tlb_range |
110 | .globl swift_flush_tlb_all |
111 | swift_flush_tlb_range: |
112 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
113 | + ld [%o0 + VMA_VM_MM], %o0 |
114 | swift_flush_tlb_mm: |
115 | ld [%o0 + AOFF_mm_context], %g2 |
116 | cmp %g2, -1 |
117 | @@ -233,7 +233,7 @@ swift_flush_tlb_all_out: |
118 | |
119 | .globl swift_flush_tlb_page |
120 | swift_flush_tlb_page: |
121 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
122 | + ld [%o0 + VMA_VM_MM], %o0 |
123 | mov SRMMU_CTX_REG, %g1 |
124 | ld [%o0 + AOFF_mm_context], %o3 |
125 | andn %o1, (PAGE_SIZE - 1), %o1 |
126 | diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c |
127 | index afd021e..072f553 100644 |
128 | --- a/arch/sparc/mm/tlb.c |
129 | +++ b/arch/sparc/mm/tlb.c |
130 | @@ -115,8 +115,8 @@ no_cache_flush: |
131 | } |
132 | |
133 | if (!tb->active) { |
134 | - global_flush_tlb_page(mm, vaddr); |
135 | flush_tsb_user_page(mm, vaddr); |
136 | + global_flush_tlb_page(mm, vaddr); |
137 | goto out; |
138 | } |
139 | |
140 | diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S |
141 | index 4e55e8f..bf10a34 100644 |
142 | --- a/arch/sparc/mm/tsunami.S |
143 | +++ b/arch/sparc/mm/tsunami.S |
144 | @@ -24,7 +24,7 @@ |
145 | /* Sliiick... */ |
146 | tsunami_flush_cache_page: |
147 | tsunami_flush_cache_range: |
148 | - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ |
149 | + ld [%o0 + VMA_VM_MM], %o0 |
150 | tsunami_flush_cache_mm: |
151 | ld [%o0 + AOFF_mm_context], %g2 |
152 | cmp %g2, -1 |
153 | @@ -46,7 +46,7 @@ tsunami_flush_sig_insns: |
154 | |
155 | /* More slick stuff... */ |
156 | tsunami_flush_tlb_range: |
157 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
158 | + ld [%o0 + VMA_VM_MM], %o0 |
159 | tsunami_flush_tlb_mm: |
160 | ld [%o0 + AOFF_mm_context], %g2 |
161 | cmp %g2, -1 |
162 | @@ -65,7 +65,7 @@ tsunami_flush_tlb_out: |
163 | |
164 | /* This one can be done in a fine grained manner... */ |
165 | tsunami_flush_tlb_page: |
166 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
167 | + ld [%o0 + VMA_VM_MM], %o0 |
168 | mov SRMMU_CTX_REG, %g1 |
169 | ld [%o0 + AOFF_mm_context], %o3 |
170 | andn %o1, (PAGE_SIZE - 1), %o1 |
171 | diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S |
172 | index 6dfcc13..a516372 100644 |
173 | --- a/arch/sparc/mm/viking.S |
174 | +++ b/arch/sparc/mm/viking.S |
175 | @@ -109,7 +109,7 @@ viking_mxcc_flush_page: |
176 | viking_flush_cache_page: |
177 | viking_flush_cache_range: |
178 | #ifndef CONFIG_SMP |
179 | - ld [%o0 + 0x0], %o0 /* XXX vma->vm_mm, GROSS XXX */ |
180 | + ld [%o0 + VMA_VM_MM], %o0 |
181 | #endif |
182 | viking_flush_cache_mm: |
183 | #ifndef CONFIG_SMP |
184 | @@ -149,7 +149,7 @@ viking_flush_tlb_mm: |
185 | #endif |
186 | |
187 | viking_flush_tlb_range: |
188 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
189 | + ld [%o0 + VMA_VM_MM], %o0 |
190 | mov SRMMU_CTX_REG, %g1 |
191 | ld [%o0 + AOFF_mm_context], %o3 |
192 | lda [%g1] ASI_M_MMUREGS, %g5 |
193 | @@ -174,7 +174,7 @@ viking_flush_tlb_range: |
194 | #endif |
195 | |
196 | viking_flush_tlb_page: |
197 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
198 | + ld [%o0 + VMA_VM_MM], %o0 |
199 | mov SRMMU_CTX_REG, %g1 |
200 | ld [%o0 + AOFF_mm_context], %o3 |
201 | lda [%g1] ASI_M_MMUREGS, %g5 |
202 | @@ -240,7 +240,7 @@ sun4dsmp_flush_tlb_range: |
203 | tst %g5 |
204 | bne 3f |
205 | mov SRMMU_CTX_REG, %g1 |
206 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
207 | + ld [%o0 + VMA_VM_MM], %o0 |
208 | ld [%o0 + AOFF_mm_context], %o3 |
209 | lda [%g1] ASI_M_MMUREGS, %g5 |
210 | sethi %hi(~((1 << SRMMU_PGDIR_SHIFT) - 1)), %o4 |
211 | @@ -266,7 +266,7 @@ sun4dsmp_flush_tlb_page: |
212 | tst %g5 |
213 | bne 2f |
214 | mov SRMMU_CTX_REG, %g1 |
215 | - ld [%o0 + 0x00], %o0 /* XXX vma->vm_mm GROSS XXX */ |
216 | + ld [%o0 + VMA_VM_MM], %o0 |
217 | ld [%o0 + AOFF_mm_context], %o3 |
218 | lda [%g1] ASI_M_MMUREGS, %g5 |
219 | and %o1, PAGE_MASK, %o1 |
220 | diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c |
221 | index af58f9b..45cc02b 100644 |
222 | --- a/drivers/ata/ata_piix.c |
223 | +++ b/drivers/ata/ata_piix.c |
224 | @@ -352,6 +352,8 @@ static const struct pci_device_id piix_pci_tbl[] = { |
225 | /* SATA Controller IDE (BayTrail) */ |
226 | { 0x8086, 0x0F20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt }, |
227 | { 0x8086, 0x0F21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt }, |
228 | + /* SATA Controller IDE (Coleto Creek) */ |
229 | + { 0x8086, 0x23a6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
230 | |
231 | { } /* terminate list */ |
232 | }; |
233 | diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c |
234 | index 21b80c5..f63a588 100644 |
235 | --- a/drivers/ata/libata-pmp.c |
236 | +++ b/drivers/ata/libata-pmp.c |
237 | @@ -389,9 +389,13 @@ static void sata_pmp_quirks(struct ata_port *ap) |
238 | /* link reports offline after LPM */ |
239 | link->flags |= ATA_LFLAG_NO_LPM; |
240 | |
241 | - /* Class code report is unreliable. */ |
242 | + /* |
243 | + * Class code report is unreliable and SRST times |
244 | + * out under certain configurations. |
245 | + */ |
246 | if (link->pmp < 5) |
247 | - link->flags |= ATA_LFLAG_ASSUME_ATA; |
248 | + link->flags |= ATA_LFLAG_NO_SRST | |
249 | + ATA_LFLAG_ASSUME_ATA; |
250 | |
251 | /* port 5 is for SEMB device and it doesn't like SRST */ |
252 | if (link->pmp == 5) |
253 | @@ -399,20 +403,17 @@ static void sata_pmp_quirks(struct ata_port *ap) |
254 | ATA_LFLAG_ASSUME_SEMB; |
255 | } |
256 | } else if (vendor == 0x1095 && devid == 0x4723) { |
257 | - /* sil4723 quirks */ |
258 | - ata_for_each_link(link, ap, EDGE) { |
259 | - /* link reports offline after LPM */ |
260 | - link->flags |= ATA_LFLAG_NO_LPM; |
261 | - |
262 | - /* class code report is unreliable */ |
263 | - if (link->pmp < 2) |
264 | - link->flags |= ATA_LFLAG_ASSUME_ATA; |
265 | - |
266 | - /* the config device at port 2 locks up on SRST */ |
267 | - if (link->pmp == 2) |
268 | - link->flags |= ATA_LFLAG_NO_SRST | |
269 | - ATA_LFLAG_ASSUME_ATA; |
270 | - } |
271 | + /* |
272 | + * sil4723 quirks |
273 | + * |
274 | + * Link reports offline after LPM. Class code report is |
275 | + * unreliable. SIMG PMPs never got SRST reliable and the |
276 | + * config device at port 2 locks up on SRST. |
277 | + */ |
278 | + ata_for_each_link(link, ap, EDGE) |
279 | + link->flags |= ATA_LFLAG_NO_LPM | |
280 | + ATA_LFLAG_NO_SRST | |
281 | + ATA_LFLAG_ASSUME_ATA; |
282 | } else if (vendor == 0x1095 && devid == 0x4726) { |
283 | /* sil4726 quirks */ |
284 | ata_for_each_link(link, ap, EDGE) { |
285 | diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c |
286 | index 99a8444..c0536ed 100644 |
287 | --- a/drivers/iommu/amd_iommu.c |
288 | +++ b/drivers/iommu/amd_iommu.c |
289 | @@ -1309,6 +1309,10 @@ static unsigned long iommu_unmap_page(struct protection_domain *dom, |
290 | |
291 | /* Large PTE found which maps this address */ |
292 | unmap_size = PTE_PAGE_SIZE(*pte); |
293 | + |
294 | + /* Only unmap from the first pte in the page */ |
295 | + if ((unmap_size - 1) & bus_addr) |
296 | + break; |
297 | count = PAGE_SIZE_PTE_COUNT(unmap_size); |
298 | for (i = 0; i < count; i++) |
299 | pte[i] = 0ULL; |
300 | @@ -1318,7 +1322,7 @@ static unsigned long iommu_unmap_page(struct protection_domain *dom, |
301 | unmapped += unmap_size; |
302 | } |
303 | |
304 | - BUG_ON(!is_power_of_2(unmapped)); |
305 | + BUG_ON(unmapped && !is_power_of_2(unmapped)); |
306 | |
307 | return unmapped; |
308 | } |
309 | diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c |
310 | index bab0158..b33ad12 100644 |
311 | --- a/drivers/net/dummy.c |
312 | +++ b/drivers/net/dummy.c |
313 | @@ -186,6 +186,8 @@ static int __init dummy_init_module(void) |
314 | |
315 | rtnl_lock(); |
316 | err = __rtnl_link_register(&dummy_link_ops); |
317 | + if (err < 0) |
318 | + goto out; |
319 | |
320 | for (i = 0; i < numdummies && !err; i++) { |
321 | err = dummy_init_one(); |
322 | @@ -193,6 +195,8 @@ static int __init dummy_init_module(void) |
323 | } |
324 | if (err < 0) |
325 | __rtnl_link_unregister(&dummy_link_ops); |
326 | + |
327 | +out: |
328 | rtnl_unlock(); |
329 | |
330 | return err; |
331 | diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c |
332 | index d53509e..d4a747a 100644 |
333 | --- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c |
334 | +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c |
335 | @@ -1688,8 +1688,8 @@ check_sum: |
336 | return 0; |
337 | } |
338 | |
339 | -static void atl1e_tx_map(struct atl1e_adapter *adapter, |
340 | - struct sk_buff *skb, struct atl1e_tpd_desc *tpd) |
341 | +static int atl1e_tx_map(struct atl1e_adapter *adapter, |
342 | + struct sk_buff *skb, struct atl1e_tpd_desc *tpd) |
343 | { |
344 | struct atl1e_tpd_desc *use_tpd = NULL; |
345 | struct atl1e_tx_buffer *tx_buffer = NULL; |
346 | @@ -1700,6 +1700,8 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter, |
347 | u16 nr_frags; |
348 | u16 f; |
349 | int segment; |
350 | + int ring_start = adapter->tx_ring.next_to_use; |
351 | + int ring_end; |
352 | |
353 | nr_frags = skb_shinfo(skb)->nr_frags; |
354 | segment = (tpd->word3 >> TPD_SEGMENT_EN_SHIFT) & TPD_SEGMENT_EN_MASK; |
355 | @@ -1712,6 +1714,9 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter, |
356 | tx_buffer->length = map_len; |
357 | tx_buffer->dma = pci_map_single(adapter->pdev, |
358 | skb->data, hdr_len, PCI_DMA_TODEVICE); |
359 | + if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma)) |
360 | + return -ENOSPC; |
361 | + |
362 | ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE); |
363 | mapped_len += map_len; |
364 | use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); |
365 | @@ -1738,6 +1743,22 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter, |
366 | tx_buffer->dma = |
367 | pci_map_single(adapter->pdev, skb->data + mapped_len, |
368 | map_len, PCI_DMA_TODEVICE); |
369 | + |
370 | + if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma)) { |
371 | + /* We need to unwind the mappings we've done */ |
372 | + ring_end = adapter->tx_ring.next_to_use; |
373 | + adapter->tx_ring.next_to_use = ring_start; |
374 | + while (adapter->tx_ring.next_to_use != ring_end) { |
375 | + tpd = atl1e_get_tpd(adapter); |
376 | + tx_buffer = atl1e_get_tx_buffer(adapter, tpd); |
377 | + pci_unmap_single(adapter->pdev, tx_buffer->dma, |
378 | + tx_buffer->length, PCI_DMA_TODEVICE); |
379 | + } |
380 | + /* Reset the tx rings next pointer */ |
381 | + adapter->tx_ring.next_to_use = ring_start; |
382 | + return -ENOSPC; |
383 | + } |
384 | + |
385 | ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_SINGLE); |
386 | mapped_len += map_len; |
387 | use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); |
388 | @@ -1773,6 +1794,23 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter, |
389 | (i * MAX_TX_BUF_LEN), |
390 | tx_buffer->length, |
391 | DMA_TO_DEVICE); |
392 | + |
393 | + if (dma_mapping_error(&adapter->pdev->dev, tx_buffer->dma)) { |
394 | + /* We need to unwind the mappings we've done */ |
395 | + ring_end = adapter->tx_ring.next_to_use; |
396 | + adapter->tx_ring.next_to_use = ring_start; |
397 | + while (adapter->tx_ring.next_to_use != ring_end) { |
398 | + tpd = atl1e_get_tpd(adapter); |
399 | + tx_buffer = atl1e_get_tx_buffer(adapter, tpd); |
400 | + dma_unmap_page(&adapter->pdev->dev, tx_buffer->dma, |
401 | + tx_buffer->length, DMA_TO_DEVICE); |
402 | + } |
403 | + |
404 | + /* Reset the ring next to use pointer */ |
405 | + adapter->tx_ring.next_to_use = ring_start; |
406 | + return -ENOSPC; |
407 | + } |
408 | + |
409 | ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_PAGE); |
410 | use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); |
411 | use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) | |
412 | @@ -1790,6 +1828,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter, |
413 | /* The last buffer info contain the skb address, |
414 | so it will be free after unmap */ |
415 | tx_buffer->skb = skb; |
416 | + return 0; |
417 | } |
418 | |
419 | static void atl1e_tx_queue(struct atl1e_adapter *adapter, u16 count, |
420 | @@ -1857,10 +1896,15 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb, |
421 | return NETDEV_TX_OK; |
422 | } |
423 | |
424 | - atl1e_tx_map(adapter, skb, tpd); |
425 | + if (atl1e_tx_map(adapter, skb, tpd)) { |
426 | + dev_kfree_skb_any(skb); |
427 | + goto out; |
428 | + } |
429 | + |
430 | atl1e_tx_queue(adapter, tpd_req, tpd); |
431 | |
432 | netdev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */ |
433 | +out: |
434 | spin_unlock_irqrestore(&adapter->tx_lock, flags); |
435 | return NETDEV_TX_OK; |
436 | } |
437 | diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c |
438 | index d63e09b..16caeba 100644 |
439 | --- a/drivers/net/ethernet/renesas/sh_eth.c |
440 | +++ b/drivers/net/ethernet/renesas/sh_eth.c |
441 | @@ -137,8 +137,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { |
442 | .rmcr_value = 0x00000001, |
443 | |
444 | .tx_check = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO, |
445 | - .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RDE | |
446 | - EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI, |
447 | + .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE | |
448 | + EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | |
449 | + EESR_ECI, |
450 | .tx_error_check = EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE, |
451 | |
452 | .apr = 1, |
453 | @@ -252,9 +253,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data_giga = { |
454 | .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff, |
455 | |
456 | .tx_check = EESR_TC1 | EESR_FTC, |
457 | - .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \ |
458 | - EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \ |
459 | - EESR_ECI, |
460 | + .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | |
461 | + EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE | |
462 | + EESR_TDE | EESR_ECI, |
463 | .tx_error_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \ |
464 | EESR_TFE, |
465 | .fdr_value = 0x0000072f, |
466 | @@ -361,9 +362,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { |
467 | .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff, |
468 | |
469 | .tx_check = EESR_TC1 | EESR_FTC, |
470 | - .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \ |
471 | - EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \ |
472 | - EESR_ECI, |
473 | + .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | |
474 | + EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE | |
475 | + EESR_TDE | EESR_ECI, |
476 | .tx_error_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \ |
477 | EESR_TFE, |
478 | |
479 | diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h |
480 | index 0fa14afc..c49097f 100644 |
481 | --- a/drivers/net/ethernet/renesas/sh_eth.h |
482 | +++ b/drivers/net/ethernet/renesas/sh_eth.h |
483 | @@ -467,7 +467,7 @@ enum EESR_BIT { |
484 | |
485 | #define DEFAULT_TX_CHECK (EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | \ |
486 | EESR_RTO) |
487 | -#define DEFAULT_EESR_ERR_CHECK (EESR_TWB | EESR_TABT | EESR_RABT | \ |
488 | +#define DEFAULT_EESR_ERR_CHECK (EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE | \ |
489 | EESR_RDE | EESR_RFRMER | EESR_ADE | \ |
490 | EESR_TFE | EESR_TDE | EESR_ECI) |
491 | #define DEFAULT_TX_ERROR_CHECK (EESR_TWB | EESR_TABT | EESR_ADE | EESR_TDE | \ |
492 | diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c |
493 | index 38e3ae9..8e2ac64 100644 |
494 | --- a/drivers/net/ethernet/sun/sunvnet.c |
495 | +++ b/drivers/net/ethernet/sun/sunvnet.c |
496 | @@ -1243,6 +1243,8 @@ static int vnet_port_remove(struct vio_dev *vdev) |
497 | dev_set_drvdata(&vdev->dev, NULL); |
498 | |
499 | kfree(port); |
500 | + |
501 | + unregister_netdev(vp->dev); |
502 | } |
503 | return 0; |
504 | } |
505 | diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c |
506 | index 344dceb..635d01c 100644 |
507 | --- a/drivers/net/ifb.c |
508 | +++ b/drivers/net/ifb.c |
509 | @@ -290,11 +290,17 @@ static int __init ifb_init_module(void) |
510 | |
511 | rtnl_lock(); |
512 | err = __rtnl_link_register(&ifb_link_ops); |
513 | + if (err < 0) |
514 | + goto out; |
515 | |
516 | - for (i = 0; i < numifbs && !err; i++) |
517 | + for (i = 0; i < numifbs && !err; i++) { |
518 | err = ifb_init_one(i); |
519 | + cond_resched(); |
520 | + } |
521 | if (err) |
522 | __rtnl_link_unregister(&ifb_link_ops); |
523 | + |
524 | +out: |
525 | rtnl_unlock(); |
526 | |
527 | return err; |
528 | diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c |
529 | index b99c418..5151f06 100644 |
530 | --- a/drivers/net/macvtap.c |
531 | +++ b/drivers/net/macvtap.c |
532 | @@ -534,8 +534,10 @@ static int zerocopy_sg_from_iovec(struct sk_buff *skb, const struct iovec *from, |
533 | return -EMSGSIZE; |
534 | num_pages = get_user_pages_fast(base, size, 0, &page[i]); |
535 | if (num_pages != size) { |
536 | - for (i = 0; i < num_pages; i++) |
537 | - put_page(page[i]); |
538 | + int j; |
539 | + |
540 | + for (j = 0; j < num_pages; j++) |
541 | + put_page(page[i + j]); |
542 | } |
543 | truesize = size * PAGE_SIZE; |
544 | skb->data_len += len; |
545 | @@ -654,6 +656,7 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m, |
546 | int vnet_hdr_len = 0; |
547 | int copylen = 0; |
548 | bool zerocopy = false; |
549 | + size_t linear; |
550 | |
551 | if (q->flags & IFF_VNET_HDR) { |
552 | vnet_hdr_len = q->vnet_hdr_sz; |
553 | @@ -708,11 +711,14 @@ static ssize_t macvtap_get_user(struct macvtap_queue *q, struct msghdr *m, |
554 | copylen = vnet_hdr.hdr_len; |
555 | if (!copylen) |
556 | copylen = GOODCOPY_LEN; |
557 | - } else |
558 | + linear = copylen; |
559 | + } else { |
560 | copylen = len; |
561 | + linear = vnet_hdr.hdr_len; |
562 | + } |
563 | |
564 | skb = macvtap_alloc_skb(&q->sk, NET_IP_ALIGN, copylen, |
565 | - vnet_hdr.hdr_len, noblock, &err); |
566 | + linear, noblock, &err); |
567 | if (!skb) |
568 | goto err; |
569 | |
570 | diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c |
571 | index bbd249d..85e7453 100644 |
572 | --- a/drivers/net/wireless/ath/ath9k/calib.c |
573 | +++ b/drivers/net/wireless/ath/ath9k/calib.c |
574 | @@ -389,7 +389,6 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) |
575 | |
576 | if (!caldata) { |
577 | chan->noisefloor = nf; |
578 | - ah->noise = ath9k_hw_getchan_noise(ah, chan); |
579 | return false; |
580 | } |
581 | |
582 | diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c |
583 | index 2ce6bf5..72cb121 100644 |
584 | --- a/drivers/net/wireless/rt2x00/rt2800lib.c |
585 | +++ b/drivers/net/wireless/rt2x00/rt2800lib.c |
586 | @@ -4627,8 +4627,8 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev) |
587 | default_power2 = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A2); |
588 | |
589 | for (i = 14; i < spec->num_channels; i++) { |
590 | - info[i].default_power1 = default_power1[i]; |
591 | - info[i].default_power2 = default_power2[i]; |
592 | + info[i].default_power1 = default_power1[i - 14]; |
593 | + info[i].default_power2 = default_power2[i - 14]; |
594 | } |
595 | } |
596 | |
597 | diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c |
598 | index bdaba3f..0cb0eec 100644 |
599 | --- a/drivers/net/wireless/rt2x00/rt61pci.c |
600 | +++ b/drivers/net/wireless/rt2x00/rt61pci.c |
601 | @@ -2822,7 +2822,8 @@ static int rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev) |
602 | tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START); |
603 | for (i = 14; i < spec->num_channels; i++) { |
604 | info[i].max_power = MAX_TXPOWER; |
605 | - info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]); |
606 | + info[i].default_power1 = |
607 | + TXPOWER_FROM_DEV(tx_power[i - 14]); |
608 | } |
609 | } |
610 | |
611 | diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c |
612 | index fda8671..ffdd32e 100644 |
613 | --- a/drivers/net/wireless/rt2x00/rt73usb.c |
614 | +++ b/drivers/net/wireless/rt2x00/rt73usb.c |
615 | @@ -2167,7 +2167,8 @@ static int rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev) |
616 | tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START); |
617 | for (i = 14; i < spec->num_channels; i++) { |
618 | info[i].max_power = MAX_TXPOWER; |
619 | - info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]); |
620 | + info[i].default_power1 = |
621 | + TXPOWER_FROM_DEV(tx_power[i - 14]); |
622 | } |
623 | } |
624 | |
625 | diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c |
626 | index 2136fc2..5fdf70b 100644 |
627 | --- a/drivers/s390/scsi/zfcp_fsf.c |
628 | +++ b/drivers/s390/scsi/zfcp_fsf.c |
629 | @@ -563,6 +563,10 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req) |
630 | fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN; |
631 | adapter->hydra_version = 0; |
632 | |
633 | + /* avoids adapter shutdown to be able to recognize |
634 | + * events such as LINK UP */ |
635 | + atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, |
636 | + &adapter->status); |
637 | zfcp_fsf_link_down_info_eval(req, |
638 | &qtcb->header.fsf_status_qual.link_down_info); |
639 | break; |
640 | diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c |
641 | index b79576b..7b35364 100644 |
642 | --- a/drivers/s390/scsi/zfcp_scsi.c |
643 | +++ b/drivers/s390/scsi/zfcp_scsi.c |
644 | @@ -3,7 +3,7 @@ |
645 | * |
646 | * Interface to Linux SCSI midlayer. |
647 | * |
648 | - * Copyright IBM Corporation 2002, 2010 |
649 | + * Copyright IBM Corp. 2002, 2013 |
650 | */ |
651 | |
652 | #define KMSG_COMPONENT "zfcp" |
653 | @@ -311,8 +311,12 @@ static struct scsi_host_template zfcp_scsi_host_template = { |
654 | .proc_name = "zfcp", |
655 | .can_queue = 4096, |
656 | .this_id = -1, |
657 | - .sg_tablesize = 1, /* adjusted later */ |
658 | - .max_sectors = 8, /* adjusted later */ |
659 | + .sg_tablesize = (((QDIO_MAX_ELEMENTS_PER_BUFFER - 1) |
660 | + * ZFCP_QDIO_MAX_SBALS_PER_REQ) - 2), |
661 | + /* GCD, adjusted later */ |
662 | + .max_sectors = (((QDIO_MAX_ELEMENTS_PER_BUFFER - 1) |
663 | + * ZFCP_QDIO_MAX_SBALS_PER_REQ) - 2) * 8, |
664 | + /* GCD, adjusted later */ |
665 | .dma_boundary = ZFCP_QDIO_SBALE_LEN - 1, |
666 | .cmd_per_lun = 1, |
667 | .use_clustering = 1, |
668 | diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c |
669 | index e897ce9..f8a2d12 100644 |
670 | --- a/drivers/scsi/bnx2fc/bnx2fc_io.c |
671 | +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c |
672 | @@ -1786,7 +1786,7 @@ static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req, |
673 | fcp_sns_len = SCSI_SENSE_BUFFERSIZE; |
674 | } |
675 | |
676 | - memset(sc_cmd->sense_buffer, 0, sizeof(sc_cmd->sense_buffer)); |
677 | + memset(sc_cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); |
678 | if (fcp_sns_len) |
679 | memcpy(sc_cmd->sense_buffer, rq_data, fcp_sns_len); |
680 | |
681 | diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c |
682 | index 6308a8d..073d5ad 100644 |
683 | --- a/drivers/scsi/megaraid/megaraid_sas_base.c |
684 | +++ b/drivers/scsi/megaraid/megaraid_sas_base.c |
685 | @@ -4817,10 +4817,12 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance, |
686 | sense, sense_handle); |
687 | } |
688 | |
689 | - for (i = 0; i < ioc->sge_count && kbuff_arr[i]; i++) { |
690 | - dma_free_coherent(&instance->pdev->dev, |
691 | - kern_sge32[i].length, |
692 | - kbuff_arr[i], kern_sge32[i].phys_addr); |
693 | + for (i = 0; i < ioc->sge_count; i++) { |
694 | + if (kbuff_arr[i]) |
695 | + dma_free_coherent(&instance->pdev->dev, |
696 | + kern_sge32[i].length, |
697 | + kbuff_arr[i], |
698 | + kern_sge32[i].phys_addr); |
699 | } |
700 | |
701 | megasas_return_cmd(instance, cmd); |
702 | diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c |
703 | index d953a57..35a05d1 100644 |
704 | --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c |
705 | +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c |
706 | @@ -3963,11 +3963,7 @@ _scsih_qcmd_lck(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *)) |
707 | else |
708 | mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ; |
709 | } else |
710 | -/* MPI Revision I (UNIT = 0xA) - removed MPI2_SCSIIO_CONTROL_UNTAGGED */ |
711 | -/* mpi_control |= MPI2_SCSIIO_CONTROL_UNTAGGED; |
712 | - */ |
713 | - mpi_control |= (0x500); |
714 | - |
715 | + mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ; |
716 | } else |
717 | mpi_control |= MPI2_SCSIIO_CONTROL_SIMPLEQ; |
718 | /* Make sure Device is not raid volume. |
719 | diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c |
720 | index d9811e4..b53065b 100644 |
721 | --- a/drivers/usb/serial/cp210x.c |
722 | +++ b/drivers/usb/serial/cp210x.c |
723 | @@ -60,6 +60,7 @@ static const struct usb_device_id id_table[] = { |
724 | { USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ |
725 | { USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */ |
726 | { USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */ |
727 | + { USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */ |
728 | { USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */ |
729 | { USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */ |
730 | { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ |
731 | @@ -124,6 +125,8 @@ static const struct usb_device_id id_table[] = { |
732 | { USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */ |
733 | { USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */ |
734 | { USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */ |
735 | + { USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */ |
736 | + { USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */ |
737 | { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ |
738 | { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ |
739 | { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ |
740 | @@ -154,6 +157,7 @@ static const struct usb_device_id id_table[] = { |
741 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ |
742 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ |
743 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
744 | + { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ |
745 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ |
746 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ |
747 | { USB_DEVICE(0x1E29, 0x0501) }, /* Festo CMSP */ |
748 | diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
749 | index 33e20e4..a37f14c 100644 |
750 | --- a/drivers/usb/serial/option.c |
751 | +++ b/drivers/usb/serial/option.c |
752 | @@ -347,17 +347,12 @@ static void option_instat_callback(struct urb *urb); |
753 | #define OLIVETTI_VENDOR_ID 0x0b3c |
754 | #define OLIVETTI_PRODUCT_OLICARD100 0xc000 |
755 | #define OLIVETTI_PRODUCT_OLICARD145 0xc003 |
756 | +#define OLIVETTI_PRODUCT_OLICARD200 0xc005 |
757 | |
758 | /* Celot products */ |
759 | #define CELOT_VENDOR_ID 0x211f |
760 | #define CELOT_PRODUCT_CT680M 0x6801 |
761 | |
762 | -/* ONDA Communication vendor id */ |
763 | -#define ONDA_VENDOR_ID 0x1ee8 |
764 | - |
765 | -/* ONDA MT825UP HSDPA 14.2 modem */ |
766 | -#define ONDA_MT825UP 0x000b |
767 | - |
768 | /* Samsung products */ |
769 | #define SAMSUNG_VENDOR_ID 0x04e8 |
770 | #define SAMSUNG_PRODUCT_GT_B3730 0x6889 |
771 | @@ -450,7 +445,8 @@ static void option_instat_callback(struct urb *urb); |
772 | |
773 | /* Hyundai Petatel Inc. products */ |
774 | #define PETATEL_VENDOR_ID 0x1ff4 |
775 | -#define PETATEL_PRODUCT_NP10T 0x600e |
776 | +#define PETATEL_PRODUCT_NP10T_600A 0x600a |
777 | +#define PETATEL_PRODUCT_NP10T_600E 0x600e |
778 | |
779 | /* TP-LINK Incorporated products */ |
780 | #define TPLINK_VENDOR_ID 0x2357 |
781 | @@ -797,6 +793,7 @@ static const struct usb_device_id option_ids[] = { |
782 | { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) }, |
783 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */ |
784 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ |
785 | + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */ |
786 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */ |
787 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */ |
788 | { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) }, |
789 | @@ -832,7 +829,8 @@ static const struct usb_device_id option_ids[] = { |
790 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), |
791 | .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, |
792 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0018, 0xff, 0xff, 0xff) }, |
793 | - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff) }, |
794 | + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0019, 0xff, 0xff, 0xff), |
795 | + .driver_info = (kernel_ulong_t)&net_intf3_blacklist }, |
796 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0020, 0xff, 0xff, 0xff) }, |
797 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0021, 0xff, 0xff, 0xff), |
798 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
799 | @@ -1278,8 +1276,8 @@ static const struct usb_device_id option_ids[] = { |
800 | |
801 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) }, |
802 | { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD145) }, |
803 | + { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD200) }, |
804 | { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */ |
805 | - { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */ |
806 | { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/ |
807 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) }, |
808 | { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) }, |
809 | @@ -1351,9 +1349,12 @@ static const struct usb_device_id option_ids[] = { |
810 | { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) }, |
811 | { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) }, |
812 | { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) }, |
813 | - { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) }, |
814 | + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) }, |
815 | + { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) }, |
816 | { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180), |
817 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
818 | + { USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */ |
819 | + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
820 | { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) }, |
821 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x02, 0x01) }, /* D-Link DWM-156 (variant) */ |
822 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d01, 0xff, 0x00, 0x00) }, /* D-Link DWM-156 (variant) */ |
823 | @@ -1361,6 +1362,8 @@ static const struct usb_device_id option_ids[] = { |
824 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d02, 0xff, 0x00, 0x00) }, |
825 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x02, 0x01) }, |
826 | { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x7d03, 0xff, 0x00, 0x00) }, |
827 | + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ |
828 | + { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ |
829 | { } /* Terminating entry */ |
830 | }; |
831 | MODULE_DEVICE_TABLE(usb, option_ids); |
832 | diff --git a/fs/block_dev.c b/fs/block_dev.c |
833 | index 2f3879c..319d9c7 100644 |
834 | --- a/fs/block_dev.c |
835 | +++ b/fs/block_dev.c |
836 | @@ -57,17 +57,24 @@ static void bdev_inode_switch_bdi(struct inode *inode, |
837 | struct backing_dev_info *dst) |
838 | { |
839 | struct backing_dev_info *old = inode->i_data.backing_dev_info; |
840 | + bool wakeup_bdi = false; |
841 | |
842 | if (unlikely(dst == old)) /* deadlock avoidance */ |
843 | return; |
844 | bdi_lock_two(&old->wb, &dst->wb); |
845 | spin_lock(&inode->i_lock); |
846 | inode->i_data.backing_dev_info = dst; |
847 | - if (inode->i_state & I_DIRTY) |
848 | + if (inode->i_state & I_DIRTY) { |
849 | + if (bdi_cap_writeback_dirty(dst) && !wb_has_dirty_io(&dst->wb)) |
850 | + wakeup_bdi = true; |
851 | list_move(&inode->i_wb_list, &dst->wb.b_dirty); |
852 | + } |
853 | spin_unlock(&inode->i_lock); |
854 | spin_unlock(&old->wb.list_lock); |
855 | spin_unlock(&dst->wb.list_lock); |
856 | + |
857 | + if (wakeup_bdi) |
858 | + bdi_wakeup_thread_delayed(dst); |
859 | } |
860 | |
861 | sector_t blkdev_max_block(struct block_device *bdev) |
862 | diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c |
863 | index 0752817..aad0f39 100644 |
864 | --- a/fs/ext3/inode.c |
865 | +++ b/fs/ext3/inode.c |
866 | @@ -218,7 +218,8 @@ void ext3_evict_inode (struct inode *inode) |
867 | */ |
868 | if (inode->i_nlink && ext3_should_journal_data(inode) && |
869 | EXT3_SB(inode->i_sb)->s_journal && |
870 | - (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode))) { |
871 | + (S_ISLNK(inode->i_mode) || S_ISREG(inode->i_mode)) && |
872 | + inode->i_ino != EXT3_JOURNAL_INO) { |
873 | tid_t commit_tid = atomic_read(&ei->i_datasync_tid); |
874 | journal_t *journal = EXT3_SB(inode->i_sb)->s_journal; |
875 | |
876 | diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c |
877 | index e46353f..aff1c61 100644 |
878 | --- a/fs/lockd/svclock.c |
879 | +++ b/fs/lockd/svclock.c |
880 | @@ -941,6 +941,7 @@ nlmsvc_retry_blocked(void) |
881 | unsigned long timeout = MAX_SCHEDULE_TIMEOUT; |
882 | struct nlm_block *block; |
883 | |
884 | + spin_lock(&nlm_blocked_lock); |
885 | while (!list_empty(&nlm_blocked) && !kthread_should_stop()) { |
886 | block = list_entry(nlm_blocked.next, struct nlm_block, b_list); |
887 | |
888 | @@ -950,6 +951,7 @@ nlmsvc_retry_blocked(void) |
889 | timeout = block->b_when - jiffies; |
890 | break; |
891 | } |
892 | + spin_unlock(&nlm_blocked_lock); |
893 | |
894 | dprintk("nlmsvc_retry_blocked(%p, when=%ld)\n", |
895 | block, block->b_when); |
896 | @@ -959,7 +961,9 @@ nlmsvc_retry_blocked(void) |
897 | retry_deferred_block(block); |
898 | } else |
899 | nlmsvc_grant_blocked(block); |
900 | + spin_lock(&nlm_blocked_lock); |
901 | } |
902 | + spin_unlock(&nlm_blocked_lock); |
903 | |
904 | return timeout; |
905 | } |
906 | diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h |
907 | index b5f927f..732c962 100644 |
908 | --- a/include/linux/if_pppox.h |
909 | +++ b/include/linux/if_pppox.h |
910 | @@ -128,11 +128,11 @@ struct pppoe_tag { |
911 | |
912 | struct pppoe_hdr { |
913 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
914 | - __u8 ver : 4; |
915 | __u8 type : 4; |
916 | + __u8 ver : 4; |
917 | #elif defined(__BIG_ENDIAN_BITFIELD) |
918 | - __u8 type : 4; |
919 | __u8 ver : 4; |
920 | + __u8 type : 4; |
921 | #else |
922 | #error "Please fix <asm/byteorder.h>" |
923 | #endif |
924 | diff --git a/include/net/addrconf.h b/include/net/addrconf.h |
925 | index 757a176..1a77dbb 100644 |
926 | --- a/include/net/addrconf.h |
927 | +++ b/include/net/addrconf.h |
928 | @@ -81,6 +81,9 @@ extern int ipv6_dev_get_saddr(struct net *net, |
929 | const struct in6_addr *daddr, |
930 | unsigned int srcprefs, |
931 | struct in6_addr *saddr); |
932 | +extern int __ipv6_get_lladdr(struct inet6_dev *idev, |
933 | + struct in6_addr *addr, |
934 | + unsigned char banned_flags); |
935 | extern int ipv6_get_lladdr(struct net_device *dev, |
936 | struct in6_addr *addr, |
937 | unsigned char banned_flags); |
938 | diff --git a/include/net/udp.h b/include/net/udp.h |
939 | index 5d606d9..d0bf5b6 100644 |
940 | --- a/include/net/udp.h |
941 | +++ b/include/net/udp.h |
942 | @@ -181,6 +181,7 @@ extern int udp_get_port(struct sock *sk, unsigned short snum, |
943 | extern void udp_err(struct sk_buff *, u32); |
944 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, |
945 | struct msghdr *msg, size_t len); |
946 | +extern int udp_push_pending_frames(struct sock *sk); |
947 | extern void udp_flush_pending_frames(struct sock *sk); |
948 | extern int udp_rcv(struct sk_buff *skb); |
949 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
950 | diff --git a/kernel/events/core.c b/kernel/events/core.c |
951 | index 7ceb270..d074cf0 100644 |
952 | --- a/kernel/events/core.c |
953 | +++ b/kernel/events/core.c |
954 | @@ -719,8 +719,18 @@ perf_lock_task_context(struct task_struct *task, int ctxn, unsigned long *flags) |
955 | { |
956 | struct perf_event_context *ctx; |
957 | |
958 | - rcu_read_lock(); |
959 | retry: |
960 | + /* |
961 | + * One of the few rules of preemptible RCU is that one cannot do |
962 | + * rcu_read_unlock() while holding a scheduler (or nested) lock when |
963 | + * part of the read side critical section was preemptible -- see |
964 | + * rcu_read_unlock_special(). |
965 | + * |
966 | + * Since ctx->lock nests under rq->lock we must ensure the entire read |
967 | + * side critical section is non-preemptible. |
968 | + */ |
969 | + preempt_disable(); |
970 | + rcu_read_lock(); |
971 | ctx = rcu_dereference(task->perf_event_ctxp[ctxn]); |
972 | if (ctx) { |
973 | /* |
974 | @@ -736,6 +746,8 @@ retry: |
975 | raw_spin_lock_irqsave(&ctx->lock, *flags); |
976 | if (ctx != rcu_dereference(task->perf_event_ctxp[ctxn])) { |
977 | raw_spin_unlock_irqrestore(&ctx->lock, *flags); |
978 | + rcu_read_unlock(); |
979 | + preempt_enable(); |
980 | goto retry; |
981 | } |
982 | |
983 | @@ -745,6 +757,7 @@ retry: |
984 | } |
985 | } |
986 | rcu_read_unlock(); |
987 | + preempt_enable(); |
988 | return ctx; |
989 | } |
990 | |
991 | @@ -1702,7 +1715,16 @@ static int __perf_event_enable(void *info) |
992 | struct perf_cpu_context *cpuctx = __get_cpu_context(ctx); |
993 | int err; |
994 | |
995 | - if (WARN_ON_ONCE(!ctx->is_active)) |
996 | + /* |
997 | + * There's a time window between 'ctx->is_active' check |
998 | + * in perf_event_enable function and this place having: |
999 | + * - IRQs on |
1000 | + * - ctx->lock unlocked |
1001 | + * |
1002 | + * where the task could be killed and 'ctx' deactivated |
1003 | + * by perf_event_exit_task. |
1004 | + */ |
1005 | + if (!ctx->is_active) |
1006 | return -EINVAL; |
1007 | |
1008 | raw_spin_lock(&ctx->lock); |
1009 | @@ -6933,7 +6955,7 @@ inherit_task_group(struct perf_event *event, struct task_struct *parent, |
1010 | * child. |
1011 | */ |
1012 | |
1013 | - child_ctx = alloc_perf_context(event->pmu, child); |
1014 | + child_ctx = alloc_perf_context(parent_ctx->pmu, child); |
1015 | if (!child_ctx) |
1016 | return -ENOMEM; |
1017 | |
1018 | diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c |
1019 | index 60f7e32..a57ef25 100644 |
1020 | --- a/kernel/hrtimer.c |
1021 | +++ b/kernel/hrtimer.c |
1022 | @@ -707,17 +707,20 @@ static int hrtimer_switch_to_hres(void) |
1023 | return 1; |
1024 | } |
1025 | |
1026 | +static void clock_was_set_work(struct work_struct *work) |
1027 | +{ |
1028 | + clock_was_set(); |
1029 | +} |
1030 | + |
1031 | +static DECLARE_WORK(hrtimer_work, clock_was_set_work); |
1032 | + |
1033 | /* |
1034 | - * Called from timekeeping code to reprogramm the hrtimer interrupt |
1035 | - * device. If called from the timer interrupt context we defer it to |
1036 | - * softirq context. |
1037 | + * Called from timekeeping and resume code to reprogramm the hrtimer |
1038 | + * interrupt device on all cpus. |
1039 | */ |
1040 | void clock_was_set_delayed(void) |
1041 | { |
1042 | - struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); |
1043 | - |
1044 | - cpu_base->clock_was_set = 1; |
1045 | - __raise_softirq_irqoff(HRTIMER_SOFTIRQ); |
1046 | + schedule_work(&hrtimer_work); |
1047 | } |
1048 | |
1049 | #else |
1050 | @@ -766,8 +769,10 @@ void hrtimers_resume(void) |
1051 | WARN_ONCE(!irqs_disabled(), |
1052 | KERN_INFO "hrtimers_resume() called with IRQs enabled!"); |
1053 | |
1054 | + /* Retrigger on the local CPU */ |
1055 | retrigger_next_event(NULL); |
1056 | - timerfd_clock_was_set(); |
1057 | + /* And schedule a retrigger for all others */ |
1058 | + clock_was_set_delayed(); |
1059 | } |
1060 | |
1061 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) |
1062 | @@ -1416,13 +1421,6 @@ void hrtimer_peek_ahead_timers(void) |
1063 | |
1064 | static void run_hrtimer_softirq(struct softirq_action *h) |
1065 | { |
1066 | - struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); |
1067 | - |
1068 | - if (cpu_base->clock_was_set) { |
1069 | - cpu_base->clock_was_set = 0; |
1070 | - clock_was_set(); |
1071 | - } |
1072 | - |
1073 | hrtimer_peek_ahead_timers(); |
1074 | } |
1075 | |
1076 | diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c |
1077 | index 239a323..f8961bf 100644 |
1078 | --- a/kernel/time/tick-broadcast.c |
1079 | +++ b/kernel/time/tick-broadcast.c |
1080 | @@ -400,7 +400,15 @@ void tick_check_oneshot_broadcast(int cpu) |
1081 | if (cpumask_test_cpu(cpu, to_cpumask(tick_broadcast_oneshot_mask))) { |
1082 | struct tick_device *td = &per_cpu(tick_cpu_device, cpu); |
1083 | |
1084 | - clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_ONESHOT); |
1085 | + /* |
1086 | + * We might be in the middle of switching over from |
1087 | + * periodic to oneshot. If the CPU has not yet |
1088 | + * switched over, leave the device alone. |
1089 | + */ |
1090 | + if (td->mode == TICKDEV_MODE_ONESHOT) { |
1091 | + clockevents_set_mode(td->evtdev, |
1092 | + CLOCK_EVT_MODE_ONESHOT); |
1093 | + } |
1094 | } |
1095 | } |
1096 | |
1097 | diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c |
1098 | index 75c11bf..13cd224 100644 |
1099 | --- a/kernel/trace/trace.c |
1100 | +++ b/kernel/trace/trace.c |
1101 | @@ -687,7 +687,15 @@ __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) |
1102 | |
1103 | memcpy(max_data->comm, tsk->comm, TASK_COMM_LEN); |
1104 | max_data->pid = tsk->pid; |
1105 | - max_data->uid = task_uid(tsk); |
1106 | + /* |
1107 | + * If tsk == current, then use current_uid(), as that does not use |
1108 | + * RCU. The irq tracer can be called out of RCU scope. |
1109 | + */ |
1110 | + if (tsk == current) |
1111 | + max_data->uid = current_uid(); |
1112 | + else |
1113 | + max_data->uid = task_uid(tsk); |
1114 | + |
1115 | max_data->nice = tsk->static_prio - 20 - MAX_RT_PRIO; |
1116 | max_data->policy = tsk->policy; |
1117 | max_data->rt_priority = tsk->rt_priority; |
1118 | diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c |
1119 | index 96fc733..e675182 100644 |
1120 | --- a/kernel/trace/trace_syscalls.c |
1121 | +++ b/kernel/trace/trace_syscalls.c |
1122 | @@ -305,6 +305,8 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id) |
1123 | struct ring_buffer *buffer; |
1124 | int size; |
1125 | int syscall_nr; |
1126 | + unsigned long irq_flags; |
1127 | + int pc; |
1128 | |
1129 | syscall_nr = syscall_get_nr(current, regs); |
1130 | if (syscall_nr < 0) |
1131 | @@ -318,8 +320,11 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id) |
1132 | |
1133 | size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args; |
1134 | |
1135 | + local_save_flags(irq_flags); |
1136 | + pc = preempt_count(); |
1137 | + |
1138 | event = trace_current_buffer_lock_reserve(&buffer, |
1139 | - sys_data->enter_event->event.type, size, 0, 0); |
1140 | + sys_data->enter_event->event.type, size, irq_flags, pc); |
1141 | if (!event) |
1142 | return; |
1143 | |
1144 | @@ -329,7 +334,8 @@ void ftrace_syscall_enter(void *ignore, struct pt_regs *regs, long id) |
1145 | |
1146 | if (!filter_current_check_discard(buffer, sys_data->enter_event, |
1147 | entry, event)) |
1148 | - trace_current_buffer_unlock_commit(buffer, event, 0, 0); |
1149 | + trace_current_buffer_unlock_commit(buffer, event, |
1150 | + irq_flags, pc); |
1151 | } |
1152 | |
1153 | void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret) |
1154 | @@ -339,6 +345,8 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret) |
1155 | struct ring_buffer_event *event; |
1156 | struct ring_buffer *buffer; |
1157 | int syscall_nr; |
1158 | + unsigned long irq_flags; |
1159 | + int pc; |
1160 | |
1161 | syscall_nr = syscall_get_nr(current, regs); |
1162 | if (syscall_nr < 0) |
1163 | @@ -351,7 +359,8 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret) |
1164 | return; |
1165 | |
1166 | event = trace_current_buffer_lock_reserve(&buffer, |
1167 | - sys_data->exit_event->event.type, sizeof(*entry), 0, 0); |
1168 | + sys_data->exit_event->event.type, sizeof(*entry), |
1169 | + irq_flags, pc); |
1170 | if (!event) |
1171 | return; |
1172 | |
1173 | @@ -361,7 +370,8 @@ void ftrace_syscall_exit(void *ignore, struct pt_regs *regs, long ret) |
1174 | |
1175 | if (!filter_current_check_discard(buffer, sys_data->exit_event, |
1176 | entry, event)) |
1177 | - trace_current_buffer_unlock_commit(buffer, event, 0, 0); |
1178 | + trace_current_buffer_unlock_commit(buffer, event, |
1179 | + irq_flags, pc); |
1180 | } |
1181 | |
1182 | int reg_event_syscall_enter(struct ftrace_event_call *call) |
1183 | diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c |
1184 | index daeb19d..8f45392 100644 |
1185 | --- a/net/8021q/vlan_dev.c |
1186 | +++ b/net/8021q/vlan_dev.c |
1187 | @@ -73,6 +73,8 @@ vlan_dev_get_egress_qos_mask(struct net_device *dev, struct sk_buff *skb) |
1188 | { |
1189 | struct vlan_priority_tci_mapping *mp; |
1190 | |
1191 | + smp_rmb(); /* coupled with smp_wmb() in vlan_dev_set_egress_priority() */ |
1192 | + |
1193 | mp = vlan_dev_priv(dev)->egress_priority_map[(skb->priority & 0xF)]; |
1194 | while (mp) { |
1195 | if (mp->priority == skb->priority) { |
1196 | @@ -235,6 +237,11 @@ int vlan_dev_set_egress_priority(const struct net_device *dev, |
1197 | np->next = mp; |
1198 | np->priority = skb_prio; |
1199 | np->vlan_qos = vlan_qos; |
1200 | + /* Before inserting this element in hash table, make sure all its fields |
1201 | + * are committed to memory. |
1202 | + * coupled with smp_rmb() in vlan_dev_get_egress_qos_mask() |
1203 | + */ |
1204 | + smp_wmb(); |
1205 | vlan->egress_priority_map[skb_prio & 0xF] = np; |
1206 | if (vlan_qos) |
1207 | vlan->nr_egress_mappings++; |
1208 | diff --git a/net/9p/trans_common.c b/net/9p/trans_common.c |
1209 | index de8df95..2ee3879 100644 |
1210 | --- a/net/9p/trans_common.c |
1211 | +++ b/net/9p/trans_common.c |
1212 | @@ -24,11 +24,11 @@ |
1213 | */ |
1214 | void p9_release_pages(struct page **pages, int nr_pages) |
1215 | { |
1216 | - int i = 0; |
1217 | - while (pages[i] && nr_pages--) { |
1218 | - put_page(pages[i]); |
1219 | - i++; |
1220 | - } |
1221 | + int i; |
1222 | + |
1223 | + for (i = 0; i < nr_pages; i++) |
1224 | + if (pages[i]) |
1225 | + put_page(pages[i]); |
1226 | } |
1227 | EXPORT_SYMBOL(p9_release_pages); |
1228 | |
1229 | diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c |
1230 | index 27ca25e..9069071 100644 |
1231 | --- a/net/bridge/br_multicast.c |
1232 | +++ b/net/bridge/br_multicast.c |
1233 | @@ -467,8 +467,9 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, |
1234 | skb_set_transport_header(skb, skb->len); |
1235 | mldq = (struct mld_msg *) icmp6_hdr(skb); |
1236 | |
1237 | - interval = ipv6_addr_any(group) ? br->multicast_last_member_interval : |
1238 | - br->multicast_query_response_interval; |
1239 | + interval = ipv6_addr_any(group) ? |
1240 | + br->multicast_query_response_interval : |
1241 | + br->multicast_last_member_interval; |
1242 | |
1243 | mldq->mld_type = ICMPV6_MGM_QUERY; |
1244 | mldq->mld_code = 0; |
1245 | diff --git a/net/core/neighbour.c b/net/core/neighbour.c |
1246 | index ac88107..69b7ca3 100644 |
1247 | --- a/net/core/neighbour.c |
1248 | +++ b/net/core/neighbour.c |
1249 | @@ -237,7 +237,7 @@ static void neigh_flush_dev(struct neigh_table *tbl, struct net_device *dev) |
1250 | we must kill timers etc. and move |
1251 | it to safe state. |
1252 | */ |
1253 | - skb_queue_purge(&n->arp_queue); |
1254 | + __skb_queue_purge(&n->arp_queue); |
1255 | n->arp_queue_len_bytes = 0; |
1256 | n->output = neigh_blackhole; |
1257 | if (n->nud_state & NUD_VALID) |
1258 | @@ -300,7 +300,7 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl, struct net_device |
1259 | if (!n) |
1260 | goto out_entries; |
1261 | |
1262 | - skb_queue_head_init(&n->arp_queue); |
1263 | + __skb_queue_head_init(&n->arp_queue); |
1264 | rwlock_init(&n->lock); |
1265 | seqlock_init(&n->ha_lock); |
1266 | n->updated = n->used = now; |
1267 | @@ -721,7 +721,9 @@ void neigh_destroy(struct neighbour *neigh) |
1268 | if (neigh_del_timer(neigh)) |
1269 | printk(KERN_WARNING "Impossible event.\n"); |
1270 | |
1271 | - skb_queue_purge(&neigh->arp_queue); |
1272 | + write_lock_bh(&neigh->lock); |
1273 | + __skb_queue_purge(&neigh->arp_queue); |
1274 | + write_unlock_bh(&neigh->lock); |
1275 | neigh->arp_queue_len_bytes = 0; |
1276 | |
1277 | if (dev->netdev_ops->ndo_neigh_destroy) |
1278 | @@ -867,7 +869,7 @@ static void neigh_invalidate(struct neighbour *neigh) |
1279 | neigh->ops->error_report(neigh, skb); |
1280 | write_lock(&neigh->lock); |
1281 | } |
1282 | - skb_queue_purge(&neigh->arp_queue); |
1283 | + __skb_queue_purge(&neigh->arp_queue); |
1284 | neigh->arp_queue_len_bytes = 0; |
1285 | } |
1286 | |
1287 | @@ -1206,7 +1208,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, |
1288 | |
1289 | write_lock_bh(&neigh->lock); |
1290 | } |
1291 | - skb_queue_purge(&neigh->arp_queue); |
1292 | + __skb_queue_purge(&neigh->arp_queue); |
1293 | neigh->arp_queue_len_bytes = 0; |
1294 | } |
1295 | out: |
1296 | diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c |
1297 | index 76f50e1..ae03b7b 100644 |
1298 | --- a/net/ipv4/tcp_ipv4.c |
1299 | +++ b/net/ipv4/tcp_ipv4.c |
1300 | @@ -974,7 +974,7 @@ int tcp_md5_do_add(struct sock *sk, const union tcp_md5_addr *addr, |
1301 | struct tcp_sock *tp = tcp_sk(sk); |
1302 | struct tcp_md5sig_info *md5sig; |
1303 | |
1304 | - key = tcp_md5_do_lookup(sk, (union tcp_md5_addr *)&addr, AF_INET); |
1305 | + key = tcp_md5_do_lookup(sk, addr, family); |
1306 | if (key) { |
1307 | /* Pre-existing entry - just update that one. */ |
1308 | memcpy(key->key, newkey, newkeylen); |
1309 | @@ -1019,7 +1019,7 @@ int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr, int family) |
1310 | struct tcp_md5sig_key *key; |
1311 | struct tcp_md5sig_info *md5sig; |
1312 | |
1313 | - key = tcp_md5_do_lookup(sk, (union tcp_md5_addr *)&addr, AF_INET); |
1314 | + key = tcp_md5_do_lookup(sk, addr, family); |
1315 | if (!key) |
1316 | return -ENOENT; |
1317 | hlist_del_rcu(&key->node); |
1318 | diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c |
1319 | index fe14105..0b6136d 100644 |
1320 | --- a/net/ipv4/udp.c |
1321 | +++ b/net/ipv4/udp.c |
1322 | @@ -768,7 +768,7 @@ send: |
1323 | /* |
1324 | * Push out all pending data as one UDP datagram. Socket is locked. |
1325 | */ |
1326 | -static int udp_push_pending_frames(struct sock *sk) |
1327 | +int udp_push_pending_frames(struct sock *sk) |
1328 | { |
1329 | struct udp_sock *up = udp_sk(sk); |
1330 | struct inet_sock *inet = inet_sk(sk); |
1331 | @@ -787,6 +787,7 @@ out: |
1332 | up->pending = 0; |
1333 | return err; |
1334 | } |
1335 | +EXPORT_SYMBOL(udp_push_pending_frames); |
1336 | |
1337 | int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
1338 | size_t len) |
1339 | diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c |
1340 | index f4fe3c0..d427f1b 100644 |
1341 | --- a/net/ipv6/addrconf.c |
1342 | +++ b/net/ipv6/addrconf.c |
1343 | @@ -1233,6 +1233,23 @@ try_nextdev: |
1344 | } |
1345 | EXPORT_SYMBOL(ipv6_dev_get_saddr); |
1346 | |
1347 | +int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr, |
1348 | + unsigned char banned_flags) |
1349 | +{ |
1350 | + struct inet6_ifaddr *ifp; |
1351 | + int err = -EADDRNOTAVAIL; |
1352 | + |
1353 | + list_for_each_entry(ifp, &idev->addr_list, if_list) { |
1354 | + if (ifp->scope == IFA_LINK && |
1355 | + !(ifp->flags & banned_flags)) { |
1356 | + *addr = ifp->addr; |
1357 | + err = 0; |
1358 | + break; |
1359 | + } |
1360 | + } |
1361 | + return err; |
1362 | +} |
1363 | + |
1364 | int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr, |
1365 | unsigned char banned_flags) |
1366 | { |
1367 | @@ -1242,17 +1259,8 @@ int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr, |
1368 | rcu_read_lock(); |
1369 | idev = __in6_dev_get(dev); |
1370 | if (idev) { |
1371 | - struct inet6_ifaddr *ifp; |
1372 | - |
1373 | read_lock_bh(&idev->lock); |
1374 | - list_for_each_entry(ifp, &idev->addr_list, if_list) { |
1375 | - if (ifp->scope == IFA_LINK && |
1376 | - !(ifp->flags & banned_flags)) { |
1377 | - *addr = ifp->addr; |
1378 | - err = 0; |
1379 | - break; |
1380 | - } |
1381 | - } |
1382 | + err = __ipv6_get_lladdr(idev, addr, banned_flags); |
1383 | read_unlock_bh(&idev->lock); |
1384 | } |
1385 | rcu_read_unlock(); |
1386 | @@ -2429,6 +2437,9 @@ static void init_loopback(struct net_device *dev) |
1387 | if (sp_ifa->flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE)) |
1388 | continue; |
1389 | |
1390 | + if (sp_ifa->rt) |
1391 | + continue; |
1392 | + |
1393 | sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0); |
1394 | |
1395 | /* Failure cases are ignored */ |
1396 | diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c |
1397 | index bf290ce..d6b9d56 100644 |
1398 | --- a/net/ipv6/ip6_output.c |
1399 | +++ b/net/ipv6/ip6_output.c |
1400 | @@ -912,11 +912,17 @@ static struct dst_entry *ip6_sk_dst_check(struct sock *sk, |
1401 | const struct flowi6 *fl6) |
1402 | { |
1403 | struct ipv6_pinfo *np = inet6_sk(sk); |
1404 | - struct rt6_info *rt = (struct rt6_info *)dst; |
1405 | + struct rt6_info *rt; |
1406 | |
1407 | if (!dst) |
1408 | goto out; |
1409 | |
1410 | + if (dst->ops->family != AF_INET6) { |
1411 | + dst_release(dst); |
1412 | + return NULL; |
1413 | + } |
1414 | + |
1415 | + rt = (struct rt6_info *)dst; |
1416 | /* Yes, checking route validity in not connected |
1417 | * case is not very simple. Take into account, |
1418 | * that we do not support routing by source, TOS, |
1419 | @@ -1181,11 +1187,12 @@ static inline struct ipv6_rt_hdr *ip6_rthdr_dup(struct ipv6_rt_hdr *src, |
1420 | return src ? kmemdup(src, (src->hdrlen + 1) * 8, gfp) : NULL; |
1421 | } |
1422 | |
1423 | -static void ip6_append_data_mtu(int *mtu, |
1424 | +static void ip6_append_data_mtu(unsigned int *mtu, |
1425 | int *maxfraglen, |
1426 | unsigned int fragheaderlen, |
1427 | struct sk_buff *skb, |
1428 | - struct rt6_info *rt) |
1429 | + struct rt6_info *rt, |
1430 | + bool pmtuprobe) |
1431 | { |
1432 | if (!(rt->dst.flags & DST_XFRM_TUNNEL)) { |
1433 | if (skb == NULL) { |
1434 | @@ -1197,7 +1204,9 @@ static void ip6_append_data_mtu(int *mtu, |
1435 | * this fragment is not first, the headers |
1436 | * space is regarded as data space. |
1437 | */ |
1438 | - *mtu = dst_mtu(rt->dst.path); |
1439 | + *mtu = min(*mtu, pmtuprobe ? |
1440 | + rt->dst.dev->mtu : |
1441 | + dst_mtu(rt->dst.path)); |
1442 | } |
1443 | *maxfraglen = ((*mtu - fragheaderlen) & ~7) |
1444 | + fragheaderlen - sizeof(struct frag_hdr); |
1445 | @@ -1214,11 +1223,10 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, |
1446 | struct ipv6_pinfo *np = inet6_sk(sk); |
1447 | struct inet_cork *cork; |
1448 | struct sk_buff *skb, *skb_prev = NULL; |
1449 | - unsigned int maxfraglen, fragheaderlen; |
1450 | + unsigned int maxfraglen, fragheaderlen, mtu; |
1451 | int exthdrlen; |
1452 | int dst_exthdrlen; |
1453 | int hh_len; |
1454 | - int mtu; |
1455 | int copy; |
1456 | int err; |
1457 | int offset = 0; |
1458 | @@ -1381,7 +1389,9 @@ alloc_new_skb: |
1459 | /* update mtu and maxfraglen if necessary */ |
1460 | if (skb == NULL || skb_prev == NULL) |
1461 | ip6_append_data_mtu(&mtu, &maxfraglen, |
1462 | - fragheaderlen, skb, rt); |
1463 | + fragheaderlen, skb, rt, |
1464 | + np->pmtudisc == |
1465 | + IPV6_PMTUDISC_PROBE); |
1466 | |
1467 | skb_prev = skb; |
1468 | |
1469 | diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c |
1470 | index b2869ca..6a4ab24 100644 |
1471 | --- a/net/ipv6/mcast.c |
1472 | +++ b/net/ipv6/mcast.c |
1473 | @@ -1334,8 +1334,9 @@ mld_scount(struct ifmcaddr6 *pmc, int type, int gdeleted, int sdeleted) |
1474 | return scount; |
1475 | } |
1476 | |
1477 | -static struct sk_buff *mld_newpack(struct net_device *dev, int size) |
1478 | +static struct sk_buff *mld_newpack(struct inet6_dev *idev, int size) |
1479 | { |
1480 | + struct net_device *dev = idev->dev; |
1481 | struct net *net = dev_net(dev); |
1482 | struct sock *sk = net->ipv6.igmp_sk; |
1483 | struct sk_buff *skb; |
1484 | @@ -1360,7 +1361,7 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size) |
1485 | |
1486 | skb_reserve(skb, hlen); |
1487 | |
1488 | - if (ipv6_get_lladdr(dev, &addr_buf, IFA_F_TENTATIVE)) { |
1489 | + if (__ipv6_get_lladdr(idev, &addr_buf, IFA_F_TENTATIVE)) { |
1490 | /* <draft-ietf-magma-mld-source-05.txt>: |
1491 | * use unspecified address as the source address |
1492 | * when a valid link-local address is not available. |
1493 | @@ -1456,7 +1457,7 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc, |
1494 | struct mld2_grec *pgr; |
1495 | |
1496 | if (!skb) |
1497 | - skb = mld_newpack(dev, dev->mtu); |
1498 | + skb = mld_newpack(pmc->idev, dev->mtu); |
1499 | if (!skb) |
1500 | return NULL; |
1501 | pgr = (struct mld2_grec *)skb_put(skb, sizeof(struct mld2_grec)); |
1502 | @@ -1476,7 +1477,8 @@ static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc, |
1503 | static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, |
1504 | int type, int gdeleted, int sdeleted) |
1505 | { |
1506 | - struct net_device *dev = pmc->idev->dev; |
1507 | + struct inet6_dev *idev = pmc->idev; |
1508 | + struct net_device *dev = idev->dev; |
1509 | struct mld2_report *pmr; |
1510 | struct mld2_grec *pgr = NULL; |
1511 | struct ip6_sf_list *psf, *psf_next, *psf_prev, **psf_list; |
1512 | @@ -1505,7 +1507,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, |
1513 | AVAILABLE(skb) < grec_size(pmc, type, gdeleted, sdeleted)) { |
1514 | if (skb) |
1515 | mld_sendpack(skb); |
1516 | - skb = mld_newpack(dev, dev->mtu); |
1517 | + skb = mld_newpack(idev, dev->mtu); |
1518 | } |
1519 | } |
1520 | first = 1; |
1521 | @@ -1532,7 +1534,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc, |
1522 | pgr->grec_nsrcs = htons(scount); |
1523 | if (skb) |
1524 | mld_sendpack(skb); |
1525 | - skb = mld_newpack(dev, dev->mtu); |
1526 | + skb = mld_newpack(idev, dev->mtu); |
1527 | first = 1; |
1528 | scount = 0; |
1529 | } |
1530 | @@ -1587,8 +1589,8 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc) |
1531 | struct sk_buff *skb = NULL; |
1532 | int type; |
1533 | |
1534 | + read_lock_bh(&idev->lock); |
1535 | if (!pmc) { |
1536 | - read_lock_bh(&idev->lock); |
1537 | for (pmc=idev->mc_list; pmc; pmc=pmc->next) { |
1538 | if (pmc->mca_flags & MAF_NOREPORT) |
1539 | continue; |
1540 | @@ -1600,7 +1602,6 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc) |
1541 | skb = add_grec(skb, pmc, type, 0, 0); |
1542 | spin_unlock_bh(&pmc->mca_lock); |
1543 | } |
1544 | - read_unlock_bh(&idev->lock); |
1545 | } else { |
1546 | spin_lock_bh(&pmc->mca_lock); |
1547 | if (pmc->mca_sfcount[MCAST_EXCLUDE]) |
1548 | @@ -1610,6 +1611,7 @@ static void mld_send_report(struct inet6_dev *idev, struct ifmcaddr6 *pmc) |
1549 | skb = add_grec(skb, pmc, type, 0, 0); |
1550 | spin_unlock_bh(&pmc->mca_lock); |
1551 | } |
1552 | + read_unlock_bh(&idev->lock); |
1553 | if (skb) |
1554 | mld_sendpack(skb); |
1555 | } |
1556 | diff --git a/net/ipv6/route.c b/net/ipv6/route.c |
1557 | index 5a272c6..016ed7c 100644 |
1558 | --- a/net/ipv6/route.c |
1559 | +++ b/net/ipv6/route.c |
1560 | @@ -1032,10 +1032,13 @@ static void ip6_link_failure(struct sk_buff *skb) |
1561 | |
1562 | rt = (struct rt6_info *) skb_dst(skb); |
1563 | if (rt) { |
1564 | - if (rt->rt6i_flags & RTF_CACHE) |
1565 | - rt6_update_expires(rt, 0); |
1566 | - else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT)) |
1567 | + if (rt->rt6i_flags & RTF_CACHE) { |
1568 | + dst_hold(&rt->dst); |
1569 | + if (ip6_del_rt(rt)) |
1570 | + dst_free(&rt->dst); |
1571 | + } else if (rt->rt6i_node && (rt->rt6i_flags & RTF_DEFAULT)) { |
1572 | rt->rt6i_node->fn_sernum = -1; |
1573 | + } |
1574 | } |
1575 | } |
1576 | |
1577 | diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c |
1578 | index aa2f18b..f79bfdb 100644 |
1579 | --- a/net/ipv6/udp.c |
1580 | +++ b/net/ipv6/udp.c |
1581 | @@ -895,11 +895,16 @@ static int udp_v6_push_pending_frames(struct sock *sk) |
1582 | struct udphdr *uh; |
1583 | struct udp_sock *up = udp_sk(sk); |
1584 | struct inet_sock *inet = inet_sk(sk); |
1585 | - struct flowi6 *fl6 = &inet->cork.fl.u.ip6; |
1586 | + struct flowi6 *fl6; |
1587 | int err = 0; |
1588 | int is_udplite = IS_UDPLITE(sk); |
1589 | __wsum csum = 0; |
1590 | |
1591 | + if (up->pending == AF_INET) |
1592 | + return udp_push_pending_frames(sk); |
1593 | + |
1594 | + fl6 = &inet->cork.fl.u.ip6; |
1595 | + |
1596 | /* Grab the skbuff where UDP header space exists. */ |
1597 | if ((skb = skb_peek(&sk->sk_write_queue)) == NULL) |
1598 | goto out; |
1599 | diff --git a/net/key/af_key.c b/net/key/af_key.c |
1600 | index 7e5d927..5bbab6a 100644 |
1601 | --- a/net/key/af_key.c |
1602 | +++ b/net/key/af_key.c |
1603 | @@ -1705,6 +1705,7 @@ static int key_notify_sa_flush(const struct km_event *c) |
1604 | hdr->sadb_msg_version = PF_KEY_V2; |
1605 | hdr->sadb_msg_errno = (uint8_t) 0; |
1606 | hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); |
1607 | + hdr->sadb_msg_reserved = 0; |
1608 | |
1609 | pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net); |
1610 | |
1611 | @@ -2686,6 +2687,7 @@ static int key_notify_policy_flush(const struct km_event *c) |
1612 | hdr->sadb_msg_version = PF_KEY_V2; |
1613 | hdr->sadb_msg_errno = (uint8_t) 0; |
1614 | hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); |
1615 | + hdr->sadb_msg_reserved = 0; |
1616 | pfkey_broadcast(skb_out, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net); |
1617 | return 0; |
1618 | |
1619 | diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c |
1620 | index c6dee80..b2982f4 100644 |
1621 | --- a/net/l2tp/l2tp_ppp.c |
1622 | +++ b/net/l2tp/l2tp_ppp.c |
1623 | @@ -1778,7 +1778,8 @@ static const struct proto_ops pppol2tp_ops = { |
1624 | |
1625 | static const struct pppox_proto pppol2tp_proto = { |
1626 | .create = pppol2tp_create, |
1627 | - .ioctl = pppol2tp_ioctl |
1628 | + .ioctl = pppol2tp_ioctl, |
1629 | + .owner = THIS_MODULE, |
1630 | }; |
1631 | |
1632 | #ifdef CONFIG_L2TP_V3 |
1633 | diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c |
1634 | index a306bc6..b943e3e 100644 |
1635 | --- a/net/x25/af_x25.c |
1636 | +++ b/net/x25/af_x25.c |
1637 | @@ -1586,11 +1586,11 @@ out_cud_release: |
1638 | case SIOCX25CALLACCPTAPPRV: { |
1639 | rc = -EINVAL; |
1640 | lock_sock(sk); |
1641 | - if (sk->sk_state != TCP_CLOSE) |
1642 | - break; |
1643 | - clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); |
1644 | + if (sk->sk_state == TCP_CLOSE) { |
1645 | + clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); |
1646 | + rc = 0; |
1647 | + } |
1648 | release_sock(sk); |
1649 | - rc = 0; |
1650 | break; |
1651 | } |
1652 | |
1653 | @@ -1598,14 +1598,15 @@ out_cud_release: |
1654 | rc = -EINVAL; |
1655 | lock_sock(sk); |
1656 | if (sk->sk_state != TCP_ESTABLISHED) |
1657 | - break; |
1658 | + goto out_sendcallaccpt_release; |
1659 | /* must call accptapprv above */ |
1660 | if (test_bit(X25_ACCPT_APPRV_FLAG, &x25->flags)) |
1661 | - break; |
1662 | + goto out_sendcallaccpt_release; |
1663 | x25_write_internal(sk, X25_CALL_ACCEPTED); |
1664 | x25->state = X25_STATE_3; |
1665 | - release_sock(sk); |
1666 | rc = 0; |
1667 | +out_sendcallaccpt_release: |
1668 | + release_sock(sk); |
1669 | break; |
1670 | } |
1671 | |
1672 | diff --git a/sound/soc/codecs/sgtl5000.h b/sound/soc/codecs/sgtl5000.h |
1673 | index 8a9f435..d3a68bb 100644 |
1674 | --- a/sound/soc/codecs/sgtl5000.h |
1675 | +++ b/sound/soc/codecs/sgtl5000.h |
1676 | @@ -347,7 +347,7 @@ |
1677 | #define SGTL5000_PLL_INT_DIV_MASK 0xf800 |
1678 | #define SGTL5000_PLL_INT_DIV_SHIFT 11 |
1679 | #define SGTL5000_PLL_INT_DIV_WIDTH 5 |
1680 | -#define SGTL5000_PLL_FRAC_DIV_MASK 0x0700 |
1681 | +#define SGTL5000_PLL_FRAC_DIV_MASK 0x07ff |
1682 | #define SGTL5000_PLL_FRAC_DIV_SHIFT 0 |
1683 | #define SGTL5000_PLL_FRAC_DIV_WIDTH 11 |
1684 | |
1685 | diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c |
1686 | index c97d05f..4da9ca9 100644 |
1687 | --- a/sound/usb/6fire/pcm.c |
1688 | +++ b/sound/usb/6fire/pcm.c |
1689 | @@ -540,7 +540,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer( |
1690 | snd_pcm_uframes_t ret; |
1691 | |
1692 | if (rt->panic || !sub) |
1693 | - return SNDRV_PCM_STATE_XRUN; |
1694 | + return SNDRV_PCM_POS_XRUN; |
1695 | |
1696 | spin_lock_irqsave(&sub->lock, flags); |
1697 | ret = sub->dma_off; |