/[linux-patches]/genpatches-2.6/tags/3.0-30/1042_linux-3.0.43.patch
Gentoo

Contents of /genpatches-2.6/tags/3.0-30/1042_linux-3.0.43.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2206 - (show annotations) (download)
Mon Sep 17 18:58:14 2012 UTC (19 months ago) by mpagano
File size: 42430 byte(s)
3.0-30 release
1 diff --git a/Makefile b/Makefile
2 index d863aa0..4bd7aed 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 0
8 -SUBLEVEL = 42
9 +SUBLEVEL = 43
10 EXTRAVERSION =
11 NAME = Sneaky Weasel
12
13 diff --git a/arch/alpha/include/asm/socket.h b/arch/alpha/include/asm/socket.h
14 index 06edfef..3eeb47c 100644
15 --- a/arch/alpha/include/asm/socket.h
16 +++ b/arch/alpha/include/asm/socket.h
17 @@ -69,9 +69,11 @@
18
19 #define SO_RXQ_OVFL 40
20
21 +#ifdef __KERNEL__
22 /* O_NONBLOCK clashes with the bits used for socket types. Therefore we
23 * have to define SOCK_NONBLOCK to a different value here.
24 */
25 #define SOCK_NONBLOCK 0x40000000
26 +#endif /* __KERNEL__ */
27
28 #endif /* _ASM_SOCKET_H */
29 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
30 index f9b212e..fad8e72 100644
31 --- a/arch/arm/Kconfig
32 +++ b/arch/arm/Kconfig
33 @@ -1875,6 +1875,7 @@ source "drivers/cpufreq/Kconfig"
34 config CPU_FREQ_IMX
35 tristate "CPUfreq driver for i.MX CPUs"
36 depends on ARCH_MXC && CPU_FREQ
37 + select CPU_FREQ_TABLE
38 help
39 This enables the CPUfreq driver for i.MX CPUs.
40
41 diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
42 index 5750704..6afd081 100644
43 --- a/arch/arm/include/asm/pgtable.h
44 +++ b/arch/arm/include/asm/pgtable.h
45 @@ -360,6 +360,18 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
46 #define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)
47 #define pte_clear(mm,addr,ptep) set_pte_ext(ptep, __pte(0), 0)
48
49 +#define pte_none(pte) (!pte_val(pte))
50 +#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT)
51 +#define pte_write(pte) (!(pte_val(pte) & L_PTE_RDONLY))
52 +#define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY)
53 +#define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG)
54 +#define pte_exec(pte) (!(pte_val(pte) & L_PTE_XN))
55 +#define pte_special(pte) (0)
56 +
57 +#define pte_present_user(pte) \
58 + ((pte_val(pte) & (L_PTE_PRESENT | L_PTE_USER)) == \
59 + (L_PTE_PRESENT | L_PTE_USER))
60 +
61 #if __LINUX_ARM_ARCH__ < 6
62 static inline void __sync_icache_dcache(pte_t pteval)
63 {
64 @@ -371,25 +383,15 @@ extern void __sync_icache_dcache(pte_t pteval);
65 static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
66 pte_t *ptep, pte_t pteval)
67 {
68 - if (addr >= TASK_SIZE)
69 - set_pte_ext(ptep, pteval, 0);
70 - else {
71 + unsigned long ext = 0;
72 +
73 + if (addr < TASK_SIZE && pte_present_user(pteval)) {
74 __sync_icache_dcache(pteval);
75 - set_pte_ext(ptep, pteval, PTE_EXT_NG);
76 + ext |= PTE_EXT_NG;
77 }
78 -}
79
80 -#define pte_none(pte) (!pte_val(pte))
81 -#define pte_present(pte) (pte_val(pte) & L_PTE_PRESENT)
82 -#define pte_write(pte) (!(pte_val(pte) & L_PTE_RDONLY))
83 -#define pte_dirty(pte) (pte_val(pte) & L_PTE_DIRTY)
84 -#define pte_young(pte) (pte_val(pte) & L_PTE_YOUNG)
85 -#define pte_exec(pte) (!(pte_val(pte) & L_PTE_XN))
86 -#define pte_special(pte) (0)
87 -
88 -#define pte_present_user(pte) \
89 - ((pte_val(pte) & (L_PTE_PRESENT | L_PTE_USER)) == \
90 - (L_PTE_PRESENT | L_PTE_USER))
91 + set_pte_ext(ptep, pteval, ext);
92 +}
93
94 #define PTE_BIT_FUNC(fn,op) \
95 static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
96 @@ -416,13 +418,13 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
97 *
98 * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
99 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
100 - * <--------------- offset --------------------> <- type --> 0 0 0
101 + * <--------------- offset ----------------------> < type -> 0 0 0
102 *
103 - * This gives us up to 63 swap files and 32GB per swap file. Note that
104 + * This gives us up to 31 swap files and 64GB per swap file. Note that
105 * the offset field is always non-zero.
106 */
107 #define __SWP_TYPE_SHIFT 3
108 -#define __SWP_TYPE_BITS 6
109 +#define __SWP_TYPE_BITS 5
110 #define __SWP_TYPE_MASK ((1 << __SWP_TYPE_BITS) - 1)
111 #define __SWP_OFFSET_SHIFT (__SWP_TYPE_BITS + __SWP_TYPE_SHIFT)
112
113 diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
114 index 1a8d4aa..8fda9f7 100644
115 --- a/arch/arm/mm/flush.c
116 +++ b/arch/arm/mm/flush.c
117 @@ -236,8 +236,6 @@ void __sync_icache_dcache(pte_t pteval)
118 struct page *page;
119 struct address_space *mapping;
120
121 - if (!pte_present_user(pteval))
122 - return;
123 if (cache_is_vipt_nonaliasing() && !pte_exec(pteval))
124 /* only flush non-aliasing VIPT caches for exec mappings */
125 return;
126 diff --git a/arch/arm/mm/tlb-v7.S b/arch/arm/mm/tlb-v7.S
127 index 875634a..d7d0f7f 100644
128 --- a/arch/arm/mm/tlb-v7.S
129 +++ b/arch/arm/mm/tlb-v7.S
130 @@ -38,10 +38,10 @@ ENTRY(v7wbi_flush_user_tlb_range)
131 dsb
132 mov r0, r0, lsr #PAGE_SHIFT @ align address
133 mov r1, r1, lsr #PAGE_SHIFT
134 -#ifdef CONFIG_ARM_ERRATA_720789
135 - mov r3, #0
136 -#else
137 asid r3, r3 @ mask ASID
138 +#ifdef CONFIG_ARM_ERRATA_720789
139 + ALT_SMP(W(mov) r3, #0 )
140 + ALT_UP(W(nop) )
141 #endif
142 orr r0, r3, r0, lsl #PAGE_SHIFT @ Create initial MVA
143 mov r1, r1, lsl #PAGE_SHIFT
144 diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
145 index 0719f49..9f422ba 100644
146 --- a/arch/arm/plat-s3c24xx/dma.c
147 +++ b/arch/arm/plat-s3c24xx/dma.c
148 @@ -431,7 +431,7 @@ s3c2410_dma_canload(struct s3c2410_dma_chan *chan)
149 * when necessary.
150 */
151
152 -int s3c2410_dma_enqueue(unsigned int channel, void *id,
153 +int s3c2410_dma_enqueue(enum dma_ch channel, void *id,
154 dma_addr_t data, int size)
155 {
156 struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
157 diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
158 index 26fd114..3706cf0 100644
159 --- a/arch/parisc/include/asm/atomic.h
160 +++ b/arch/parisc/include/asm/atomic.h
161 @@ -248,7 +248,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
162
163 #define atomic_sub_and_test(i,v) (atomic_sub_return((i),(v)) == 0)
164
165 -#define ATOMIC_INIT(i) ((atomic_t) { (i) })
166 +#define ATOMIC_INIT(i) { (i) }
167
168 #define smp_mb__before_atomic_dec() smp_mb()
169 #define smp_mb__after_atomic_dec() smp_mb()
170 @@ -257,7 +257,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
171
172 #ifdef CONFIG_64BIT
173
174 -#define ATOMIC64_INIT(i) ((atomic64_t) { (i) })
175 +#define ATOMIC64_INIT(i) { (i) }
176
177 static __inline__ s64
178 __atomic64_add_return(s64 i, atomic64_t *v)
179 diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
180 index 36e1c8a..4c12a751 100644
181 --- a/arch/powerpc/kernel/asm-offsets.c
182 +++ b/arch/powerpc/kernel/asm-offsets.c
183 @@ -75,6 +75,7 @@ int main(void)
184 DEFINE(SIGSEGV, SIGSEGV);
185 DEFINE(NMI_MASK, NMI_MASK);
186 DEFINE(THREAD_DSCR, offsetof(struct thread_struct, dscr));
187 + DEFINE(THREAD_DSCR_INHERIT, offsetof(struct thread_struct, dscr_inherit));
188 #else
189 DEFINE(THREAD_INFO, offsetof(struct task_struct, stack));
190 #endif /* CONFIG_PPC64 */
191 diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
192 index d834425..654fc53 100644
193 --- a/arch/powerpc/kernel/entry_64.S
194 +++ b/arch/powerpc/kernel/entry_64.S
195 @@ -380,6 +380,12 @@ _GLOBAL(ret_from_fork)
196 li r3,0
197 b syscall_exit
198
199 + .section ".toc","aw"
200 +DSCR_DEFAULT:
201 + .tc dscr_default[TC],dscr_default
202 +
203 + .section ".text"
204 +
205 /*
206 * This routine switches between two different tasks. The process
207 * state of one is saved on its kernel stack. Then the state
208 @@ -519,9 +525,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
209 mr r1,r8 /* start using new stack pointer */
210 std r7,PACAKSAVE(r13)
211
212 - ld r6,_CCR(r1)
213 - mtcrf 0xFF,r6
214 -
215 #ifdef CONFIG_ALTIVEC
216 BEGIN_FTR_SECTION
217 ld r0,THREAD_VRSAVE(r4)
218 @@ -530,14 +533,22 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
219 #endif /* CONFIG_ALTIVEC */
220 #ifdef CONFIG_PPC64
221 BEGIN_FTR_SECTION
222 + lwz r6,THREAD_DSCR_INHERIT(r4)
223 + ld r7,DSCR_DEFAULT@toc(2)
224 ld r0,THREAD_DSCR(r4)
225 - cmpd r0,r25
226 - beq 1f
227 + cmpwi r6,0
228 + bne 1f
229 + ld r0,0(r7)
230 +1: cmpd r0,r25
231 + beq 2f
232 mtspr SPRN_DSCR,r0
233 -1:
234 +2:
235 END_FTR_SECTION_IFSET(CPU_FTR_DSCR)
236 #endif
237
238 + ld r6,_CCR(r1)
239 + mtcrf 0xFF,r6
240 +
241 /* r3-r13 are destroyed -- Cort */
242 REST_8GPRS(14, r1)
243 REST_10GPRS(22, r1)
244 diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
245 index 91e52df..5596397 100644
246 --- a/arch/powerpc/kernel/process.c
247 +++ b/arch/powerpc/kernel/process.c
248 @@ -794,16 +794,8 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
249 #endif /* CONFIG_PPC_STD_MMU_64 */
250 #ifdef CONFIG_PPC64
251 if (cpu_has_feature(CPU_FTR_DSCR)) {
252 - if (current->thread.dscr_inherit) {
253 - p->thread.dscr_inherit = 1;
254 - p->thread.dscr = current->thread.dscr;
255 - } else if (0 != dscr_default) {
256 - p->thread.dscr_inherit = 1;
257 - p->thread.dscr = dscr_default;
258 - } else {
259 - p->thread.dscr_inherit = 0;
260 - p->thread.dscr = 0;
261 - }
262 + p->thread.dscr_inherit = current->thread.dscr_inherit;
263 + p->thread.dscr = current->thread.dscr;
264 }
265 #endif
266
267 diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c
268 index f581a18..df7d12c 100644
269 --- a/arch/x86/mm/hugetlbpage.c
270 +++ b/arch/x86/mm/hugetlbpage.c
271 @@ -56,9 +56,16 @@ static int vma_shareable(struct vm_area_struct *vma, unsigned long addr)
272 }
273
274 /*
275 - * search for a shareable pmd page for hugetlb.
276 + * Search for a shareable pmd page for hugetlb. In any case calls pmd_alloc()
277 + * and returns the corresponding pte. While this is not necessary for the
278 + * !shared pmd case because we can allocate the pmd later as well, it makes the
279 + * code much cleaner. pmd allocation is essential for the shared case because
280 + * pud has to be populated inside the same i_mmap_mutex section - otherwise
281 + * racing tasks could either miss the sharing (see huge_pte_offset) or select a
282 + * bad pmd for sharing.
283 */
284 -static void huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud)
285 +static pte_t *
286 +huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud)
287 {
288 struct vm_area_struct *vma = find_vma(mm, addr);
289 struct address_space *mapping = vma->vm_file->f_mapping;
290 @@ -68,9 +75,10 @@ static void huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud)
291 struct vm_area_struct *svma;
292 unsigned long saddr;
293 pte_t *spte = NULL;
294 + pte_t *pte;
295
296 if (!vma_shareable(vma, addr))
297 - return;
298 + return (pte_t *)pmd_alloc(mm, pud, addr);
299
300 mutex_lock(&mapping->i_mmap_mutex);
301 vma_prio_tree_foreach(svma, &iter, &mapping->i_mmap, idx, idx) {
302 @@ -97,7 +105,9 @@ static void huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud)
303 put_page(virt_to_page(spte));
304 spin_unlock(&mm->page_table_lock);
305 out:
306 + pte = (pte_t *)pmd_alloc(mm, pud, addr);
307 mutex_unlock(&mapping->i_mmap_mutex);
308 + return pte;
309 }
310
311 /*
312 @@ -142,8 +152,9 @@ pte_t *huge_pte_alloc(struct mm_struct *mm,
313 } else {
314 BUG_ON(sz != PMD_SIZE);
315 if (pud_none(*pud))
316 - huge_pmd_share(mm, addr, pud);
317 - pte = (pte_t *) pmd_alloc(mm, pud, addr);
318 + pte = huge_pmd_share(mm, addr, pud);
319 + else
320 + pte = (pte_t *)pmd_alloc(mm, pud, addr);
321 }
322 }
323 BUG_ON(pte && !pte_none(*pte) && !pte_huge(*pte));
324 diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
325 index 4b7085d..55edd4a 100644
326 --- a/drivers/acpi/acpica/tbxface.c
327 +++ b/drivers/acpi/acpica/tbxface.c
328 @@ -435,6 +435,7 @@ acpi_get_table_with_size(char *signature,
329
330 return (AE_NOT_FOUND);
331 }
332 +ACPI_EXPORT_SYMBOL(acpi_get_table_with_size)
333
334 acpi_status
335 acpi_get_table(char *signature,
336 diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c
337 index a552cab..3796fcc 100644
338 --- a/drivers/block/cciss_scsi.c
339 +++ b/drivers/block/cciss_scsi.c
340 @@ -763,16 +763,7 @@ static void complete_scsi_command(CommandList_struct *c, int timeout,
341 {
342 case CMD_TARGET_STATUS:
343 /* Pass it up to the upper layers... */
344 - if( ei->ScsiStatus)
345 - {
346 -#if 0
347 - printk(KERN_WARNING "cciss: cmd %p "
348 - "has SCSI Status = %x\n",
349 - c, ei->ScsiStatus);
350 -#endif
351 - cmd->result |= (ei->ScsiStatus << 1);
352 - }
353 - else { /* scsi status is zero??? How??? */
354 + if (!ei->ScsiStatus) {
355
356 /* Ordinarily, this case should never happen, but there is a bug
357 in some released firmware revisions that allows it to happen
358 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
359 index 96949b9..8b8c85c 100644
360 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
361 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
362 @@ -147,6 +147,7 @@ static struct pci_device_id vmw_pci_id_list[] = {
363 {0x15ad, 0x0405, PCI_ANY_ID, PCI_ANY_ID, 0, 0, VMWGFX_CHIP_SVGAII},
364 {0, 0, 0}
365 };
366 +MODULE_DEVICE_TABLE(pci, vmw_pci_id_list);
367
368 static int enable_fbdev;
369
370 diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
371 index 00e9851..83d2fbd6 100644
372 --- a/drivers/hwmon/asus_atk0110.c
373 +++ b/drivers/hwmon/asus_atk0110.c
374 @@ -34,6 +34,12 @@ static const struct dmi_system_id __initconst atk_force_new_if[] = {
375 .matches = {
376 DMI_MATCH(DMI_BOARD_NAME, "SABERTOOTH X58")
377 }
378 + }, {
379 + /* Old interface reads the same sensor for fan0 and fan1 */
380 + .ident = "Asus M5A78L",
381 + .matches = {
382 + DMI_MATCH(DMI_BOARD_NAME, "M5A78L")
383 + }
384 },
385 { }
386 };
387 diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
388 index bb9f5d3..15f53c5 100644
389 --- a/drivers/input/serio/i8042-x86ia64io.h
390 +++ b/drivers/input/serio/i8042-x86ia64io.h
391 @@ -177,6 +177,20 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
392 },
393 },
394 {
395 + /* Gigabyte T1005 - defines wrong chassis type ("Other") */
396 + .matches = {
397 + DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
398 + DMI_MATCH(DMI_PRODUCT_NAME, "T1005"),
399 + },
400 + },
401 + {
402 + /* Gigabyte T1005M/P - defines wrong chassis type ("Other") */
403 + .matches = {
404 + DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
405 + DMI_MATCH(DMI_PRODUCT_NAME, "T1005M/P"),
406 + },
407 + },
408 + {
409 .matches = {
410 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
411 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"),
412 diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c
413 index 4e5719e..3d2867d 100644
414 --- a/drivers/media/dvb/siano/smsusb.c
415 +++ b/drivers/media/dvb/siano/smsusb.c
416 @@ -480,7 +480,7 @@ static int smsusb_resume(struct usb_interface *intf)
417 return 0;
418 }
419
420 -static const struct usb_device_id smsusb_id_table[] __devinitconst = {
421 +static const struct usb_device_id smsusb_id_table[] = {
422 { USB_DEVICE(0x187f, 0x0010),
423 .driver_info = SMS1XXX_BOARD_SIANO_STELLAR },
424 { USB_DEVICE(0x187f, 0x0100),
425 diff --git a/drivers/media/video/gspca/spca506.c b/drivers/media/video/gspca/spca506.c
426 index 89fec4c..731cd16 100644
427 --- a/drivers/media/video/gspca/spca506.c
428 +++ b/drivers/media/video/gspca/spca506.c
429 @@ -685,7 +685,7 @@ static const struct sd_desc sd_desc = {
430 };
431
432 /* -- module initialisation -- */
433 -static const struct usb_device_id device_table[] __devinitconst = {
434 +static const struct usb_device_id device_table[] = {
435 {USB_DEVICE(0x06e1, 0xa190)},
436 /*fixme: may be IntelPCCameraPro BRIDGE_SPCA505
437 {USB_DEVICE(0x0733, 0x0430)}, */
438 diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
439 index 3b5f9d6..932b3ab 100644
440 --- a/drivers/net/wireless/ath/ath9k/recv.c
441 +++ b/drivers/net/wireless/ath/ath9k/recv.c
442 @@ -1697,7 +1697,6 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
443 struct ieee80211_hw *hw = sc->hw;
444 struct ieee80211_hdr *hdr;
445 int retval;
446 - bool decrypt_error = false;
447 struct ath_rx_status rs;
448 enum ath9k_rx_qtype qtype;
449 bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);
450 @@ -1719,6 +1718,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
451 tsf_lower = tsf & 0xffffffff;
452
453 do {
454 + bool decrypt_error = false;
455 /* If handling rx interrupt and flush is in progress => exit */
456 if ((sc->sc_flags & SC_OP_RXFLUSH) && (flush == 0))
457 break;
458 diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
459 index a8f3bc7..f44f2f3 100644
460 --- a/drivers/net/wireless/p54/p54usb.c
461 +++ b/drivers/net/wireless/p54/p54usb.c
462 @@ -41,7 +41,7 @@ MODULE_FIRMWARE("isl3887usb");
463 * whenever you add a new device.
464 */
465
466 -static struct usb_device_id p54u_table[] __devinitdata = {
467 +static struct usb_device_id p54u_table[] = {
468 /* Version 1 devices (pci chip + net2280) */
469 {USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */
470 {USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */
471 diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
472 index 1e0be14..bf01d21 100644
473 --- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
474 +++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
475 @@ -43,7 +43,7 @@ MODULE_AUTHOR("Larry Finger <Larry.Finger@lwfinger.net>");
476 MODULE_DESCRIPTION("RTL8187/RTL8187B USB wireless driver");
477 MODULE_LICENSE("GPL");
478
479 -static struct usb_device_id rtl8187_table[] __devinitdata = {
480 +static struct usb_device_id rtl8187_table[] = {
481 /* Asus */
482 {USB_DEVICE(0x0b05, 0x171d), .driver_info = DEVICE_RTL8187},
483 /* Belkin */
484 diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
485 index 475a340..5d5bdf7 100644
486 --- a/drivers/pci/pci-driver.c
487 +++ b/drivers/pci/pci-driver.c
488 @@ -936,6 +936,13 @@ static int pci_pm_poweroff_noirq(struct device *dev)
489 if (!pci_dev->state_saved && !pci_is_bridge(pci_dev))
490 pci_prepare_to_sleep(pci_dev);
491
492 + /*
493 + * The reason for doing this here is the same as for the analogous code
494 + * in pci_pm_suspend_noirq().
495 + */
496 + if (pci_dev->class == PCI_CLASS_SERIAL_USB_EHCI)
497 + pci_write_config_word(pci_dev, PCI_COMMAND, 0);
498 +
499 return 0;
500 }
501
502 diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
503 index e6e30f4..931cb11 100644
504 --- a/drivers/scsi/megaraid/megaraid_sas_base.c
505 +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
506 @@ -4052,7 +4052,6 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
507 spin_lock_init(&instance->cmd_pool_lock);
508 spin_lock_init(&instance->hba_lock);
509 spin_lock_init(&instance->completion_lock);
510 - spin_lock_init(&poll_aen_lock);
511
512 mutex_init(&instance->aen_mutex);
513 mutex_init(&instance->reset_mutex);
514 @@ -5380,6 +5379,8 @@ static int __init megasas_init(void)
515 printk(KERN_INFO "megasas: %s %s\n", MEGASAS_VERSION,
516 MEGASAS_EXT_VERSION);
517
518 + spin_lock_init(&poll_aen_lock);
519 +
520 support_poll_for_event = 2;
521 support_device_change = 1;
522
523 diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
524 index e10639b..7d6e476 100644
525 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c
526 +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
527 @@ -2140,10 +2140,13 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
528 }
529
530 /* command line tunables for max controller queue depth */
531 - if (max_queue_depth != -1)
532 - max_request_credit = (max_queue_depth < facts->RequestCredit)
533 - ? max_queue_depth : facts->RequestCredit;
534 - else
535 + if (max_queue_depth != -1 && max_queue_depth != 0) {
536 + max_request_credit = min_t(u16, max_queue_depth +
537 + ioc->hi_priority_depth + ioc->internal_depth,
538 + facts->RequestCredit);
539 + if (max_request_credit > MAX_HBA_QUEUE_DEPTH)
540 + max_request_credit = MAX_HBA_QUEUE_DEPTH;
541 + } else
542 max_request_credit = min_t(u16, facts->RequestCredit,
543 MAX_HBA_QUEUE_DEPTH);
544
545 @@ -2218,7 +2221,7 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
546 /* set the scsi host can_queue depth
547 * with some internal commands that could be outstanding
548 */
549 - ioc->shost->can_queue = ioc->scsiio_depth - (2);
550 + ioc->shost->can_queue = ioc->scsiio_depth;
551 dinitprintk(ioc, printk(MPT2SAS_INFO_FMT "scsi host: "
552 "can_queue depth (%d)\n", ioc->name, ioc->shost->can_queue));
553
554 diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
555 index 7f1afde..198e4cd 100644
556 --- a/drivers/scsi/scsi_error.c
557 +++ b/drivers/scsi/scsi_error.c
558 @@ -41,6 +41,8 @@
559
560 #include <trace/events/scsi.h>
561
562 +static void scsi_eh_done(struct scsi_cmnd *scmd);
563 +
564 #define SENSE_TIMEOUT (10*HZ)
565
566 /*
567 @@ -240,6 +242,14 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
568 if (! scsi_command_normalize_sense(scmd, &sshdr))
569 return FAILED; /* no valid sense data */
570
571 + if (scmd->cmnd[0] == TEST_UNIT_READY && scmd->scsi_done != scsi_eh_done)
572 + /*
573 + * nasty: for mid-layer issued TURs, we need to return the
574 + * actual sense data without any recovery attempt. For eh
575 + * issued ones, we need to try to recover and interpret
576 + */
577 + return SUCCESS;
578 +
579 if (scsi_sense_is_deferred(&sshdr))
580 return NEEDS_RETRY;
581
582 diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
583 index a48b59c..c6c80c9 100644
584 --- a/drivers/scsi/scsi_scan.c
585 +++ b/drivers/scsi/scsi_scan.c
586 @@ -776,6 +776,16 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
587 sdev->model = (char *) (sdev->inquiry + 16);
588 sdev->rev = (char *) (sdev->inquiry + 32);
589
590 + if (strncmp(sdev->vendor, "ATA ", 8) == 0) {
591 + /*
592 + * sata emulation layer device. This is a hack to work around
593 + * the SATL power management specifications which state that
594 + * when the SATL detects the device has gone into standby
595 + * mode, it shall respond with NOT READY.
596 + */
597 + sdev->allow_restart = 1;
598 + }
599 +
600 if (*bflags & BLIST_ISROM) {
601 sdev->type = TYPE_ROM;
602 sdev->removable = 1;
603 diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
604 index e18efd4..ce459d5 100644
605 --- a/drivers/staging/vt6656/main_usb.c
606 +++ b/drivers/staging/vt6656/main_usb.c
607 @@ -222,7 +222,7 @@ DEVICE_PARAM(b80211hEnable, "802.11h mode");
608 // Static vars definitions
609 //
610
611 -static struct usb_device_id vt6656_table[] __devinitdata = {
612 +static struct usb_device_id vt6656_table[] = {
613 {USB_DEVICE(VNT_USB_VENDOR_ID, VNT_USB_PRODUCT_ID)},
614 {}
615 };
616 diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
617 index 3724e1e..02f9eb8 100644
618 --- a/drivers/staging/winbond/wbusb.c
619 +++ b/drivers/staging/winbond/wbusb.c
620 @@ -24,7 +24,7 @@ MODULE_DESCRIPTION("IS89C35 802.11bg WLAN USB Driver");
621 MODULE_LICENSE("GPL");
622 MODULE_VERSION("0.1");
623
624 -static const struct usb_device_id wb35_table[] __devinitconst = {
625 +static const struct usb_device_id wb35_table[] = {
626 { USB_DEVICE(0x0416, 0x0035) },
627 { USB_DEVICE(0x18E8, 0x6201) },
628 { USB_DEVICE(0x18E8, 0x6206) },
629 diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
630 index 496e06e..de80171 100644
631 --- a/drivers/usb/class/cdc-acm.c
632 +++ b/drivers/usb/class/cdc-acm.c
633 @@ -1043,7 +1043,8 @@ skip_normal_probe:
634 }
635
636
637 - if (data_interface->cur_altsetting->desc.bNumEndpoints < 2)
638 + if (data_interface->cur_altsetting->desc.bNumEndpoints < 2 ||
639 + control_interface->cur_altsetting->desc.bNumEndpoints == 0)
640 return -EINVAL;
641
642 epctrl = &control_interface->cur_altsetting->endpoint[0].desc;
643 diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c
644 index fc15ad4..723e833 100644
645 --- a/drivers/usb/misc/emi62.c
646 +++ b/drivers/usb/misc/emi62.c
647 @@ -259,7 +259,7 @@ wraperr:
648 return err;
649 }
650
651 -static const struct usb_device_id id_table[] __devinitconst = {
652 +static const struct usb_device_id id_table[] = {
653 { USB_DEVICE(EMI62_VENDOR_ID, EMI62_PRODUCT_ID) },
654 { } /* Terminating entry */
655 };
656 diff --git a/fs/buffer.c b/fs/buffer.c
657 index d421626..166028b 100644
658 --- a/fs/buffer.c
659 +++ b/fs/buffer.c
660 @@ -961,7 +961,7 @@ link_dev_buffers(struct page *page, struct buffer_head *head)
661 /*
662 * Initialise the state of a blockdev page's buffers.
663 */
664 -static void
665 +static sector_t
666 init_page_buffers(struct page *page, struct block_device *bdev,
667 sector_t block, int size)
668 {
669 @@ -983,33 +983,41 @@ init_page_buffers(struct page *page, struct block_device *bdev,
670 block++;
671 bh = bh->b_this_page;
672 } while (bh != head);
673 +
674 + /*
675 + * Caller needs to validate requested block against end of device.
676 + */
677 + return end_block;
678 }
679
680 /*
681 * Create the page-cache page that contains the requested block.
682 *
683 - * This is user purely for blockdev mappings.
684 + * This is used purely for blockdev mappings.
685 */
686 -static struct page *
687 +static int
688 grow_dev_page(struct block_device *bdev, sector_t block,
689 - pgoff_t index, int size)
690 + pgoff_t index, int size, int sizebits)
691 {
692 struct inode *inode = bdev->bd_inode;
693 struct page *page;
694 struct buffer_head *bh;
695 + sector_t end_block;
696 + int ret = 0; /* Will call free_more_memory() */
697
698 page = find_or_create_page(inode->i_mapping, index,
699 (mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS)|__GFP_MOVABLE);
700 if (!page)
701 - return NULL;
702 + return ret;
703
704 BUG_ON(!PageLocked(page));
705
706 if (page_has_buffers(page)) {
707 bh = page_buffers(page);
708 if (bh->b_size == size) {
709 - init_page_buffers(page, bdev, block, size);
710 - return page;
711 + end_block = init_page_buffers(page, bdev,
712 + index << sizebits, size);
713 + goto done;
714 }
715 if (!try_to_free_buffers(page))
716 goto failed;
717 @@ -1029,15 +1037,15 @@ grow_dev_page(struct block_device *bdev, sector_t block,
718 */
719 spin_lock(&inode->i_mapping->private_lock);
720 link_dev_buffers(page, bh);
721 - init_page_buffers(page, bdev, block, size);
722 + end_block = init_page_buffers(page, bdev, index << sizebits, size);
723 spin_unlock(&inode->i_mapping->private_lock);
724 - return page;
725 +done:
726 + ret = (block < end_block) ? 1 : -ENXIO;
727
728 failed:
729 - BUG();
730 unlock_page(page);
731 page_cache_release(page);
732 - return NULL;
733 + return ret;
734 }
735
736 /*
737 @@ -1047,7 +1055,6 @@ failed:
738 static int
739 grow_buffers(struct block_device *bdev, sector_t block, int size)
740 {
741 - struct page *page;
742 pgoff_t index;
743 int sizebits;
744
745 @@ -1071,22 +1078,14 @@ grow_buffers(struct block_device *bdev, sector_t block, int size)
746 bdevname(bdev, b));
747 return -EIO;
748 }
749 - block = index << sizebits;
750 +
751 /* Create a page with the proper size buffers.. */
752 - page = grow_dev_page(bdev, block, index, size);
753 - if (!page)
754 - return 0;
755 - unlock_page(page);
756 - page_cache_release(page);
757 - return 1;
758 + return grow_dev_page(bdev, block, index, size, sizebits);
759 }
760
761 static struct buffer_head *
762 __getblk_slow(struct block_device *bdev, sector_t block, int size)
763 {
764 - int ret;
765 - struct buffer_head *bh;
766 -
767 /* Size must be multiple of hard sectorsize */
768 if (unlikely(size & (bdev_logical_block_size(bdev)-1) ||
769 (size < 512 || size > PAGE_SIZE))) {
770 @@ -1099,21 +1098,20 @@ __getblk_slow(struct block_device *bdev, sector_t block, int size)
771 return NULL;
772 }
773
774 -retry:
775 - bh = __find_get_block(bdev, block, size);
776 - if (bh)
777 - return bh;
778 + for (;;) {
779 + struct buffer_head *bh;
780 + int ret;
781
782 - ret = grow_buffers(bdev, block, size);
783 - if (ret == 0) {
784 - free_more_memory();
785 - goto retry;
786 - } else if (ret > 0) {
787 bh = __find_get_block(bdev, block, size);
788 if (bh)
789 return bh;
790 +
791 + ret = grow_buffers(bdev, block, size);
792 + if (ret < 0)
793 + return NULL;
794 + if (ret == 0)
795 + free_more_memory();
796 }
797 - return NULL;
798 }
799
800 /*
801 @@ -1369,10 +1367,6 @@ EXPORT_SYMBOL(__find_get_block);
802 * which corresponds to the passed block_device, block and size. The
803 * returned buffer has its reference count incremented.
804 *
805 - * __getblk() cannot fail - it just keeps trying. If you pass it an
806 - * illegal block number, __getblk() will happily return a buffer_head
807 - * which represents the non-existent block. Very weird.
808 - *
809 * __getblk() will lock up the machine if grow_dev_page's try_to_free_buffers()
810 * attempt is failing. FIXME, perhaps?
811 */
812 diff --git a/fs/compat.c b/fs/compat.c
813 index 0ea0083..e5358c2 100644
814 --- a/fs/compat.c
815 +++ b/fs/compat.c
816 @@ -1177,11 +1177,14 @@ compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec,
817 struct file *file;
818 int fput_needed;
819 ssize_t ret;
820 + loff_t pos;
821
822 file = fget_light(fd, &fput_needed);
823 if (!file)
824 return -EBADF;
825 - ret = compat_readv(file, vec, vlen, &file->f_pos);
826 + pos = file->f_pos;
827 + ret = compat_readv(file, vec, vlen, &pos);
828 + file->f_pos = pos;
829 fput_light(file, fput_needed);
830 return ret;
831 }
832 @@ -1236,11 +1239,14 @@ compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec,
833 struct file *file;
834 int fput_needed;
835 ssize_t ret;
836 + loff_t pos;
837
838 file = fget_light(fd, &fput_needed);
839 if (!file)
840 return -EBADF;
841 - ret = compat_writev(file, vec, vlen, &file->f_pos);
842 + pos = file->f_pos;
843 + ret = compat_writev(file, vec, vlen, &pos);
844 + file->f_pos = pos;
845 fput_light(file, fput_needed);
846 return ret;
847 }
848 diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
849 index db9ba1a..0aedb27 100644
850 --- a/fs/ext3/inode.c
851 +++ b/fs/ext3/inode.c
852 @@ -3013,6 +3013,8 @@ static int ext3_do_update_inode(handle_t *handle,
853 struct ext3_inode_info *ei = EXT3_I(inode);
854 struct buffer_head *bh = iloc->bh;
855 int err = 0, rc, block;
856 + int need_datasync = 0;
857 + __le32 disksize;
858
859 again:
860 /* we can't allow multiple procs in here at once, its a bit racey */
861 @@ -3050,7 +3052,11 @@ again:
862 raw_inode->i_gid_high = 0;
863 }
864 raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
865 - raw_inode->i_size = cpu_to_le32(ei->i_disksize);
866 + disksize = cpu_to_le32(ei->i_disksize);
867 + if (disksize != raw_inode->i_size) {
868 + need_datasync = 1;
869 + raw_inode->i_size = disksize;
870 + }
871 raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
872 raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
873 raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec);
874 @@ -3066,8 +3072,11 @@ again:
875 if (!S_ISREG(inode->i_mode)) {
876 raw_inode->i_dir_acl = cpu_to_le32(ei->i_dir_acl);
877 } else {
878 - raw_inode->i_size_high =
879 - cpu_to_le32(ei->i_disksize >> 32);
880 + disksize = cpu_to_le32(ei->i_disksize >> 32);
881 + if (disksize != raw_inode->i_size_high) {
882 + raw_inode->i_size_high = disksize;
883 + need_datasync = 1;
884 + }
885 if (ei->i_disksize > 0x7fffffffULL) {
886 struct super_block *sb = inode->i_sb;
887 if (!EXT3_HAS_RO_COMPAT_FEATURE(sb,
888 @@ -3120,6 +3129,8 @@ again:
889 ext3_clear_inode_state(inode, EXT3_STATE_NEW);
890
891 atomic_set(&ei->i_sync_tid, handle->h_transaction->t_tid);
892 + if (need_datasync)
893 + atomic_set(&ei->i_datasync_tid, handle->h_transaction->t_tid);
894 out_brelse:
895 brelse (bh);
896 ext3_std_error(inode->i_sb, err);
897 diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
898 index 2aaf3ea..5c029fb 100644
899 --- a/fs/fuse/dev.c
900 +++ b/fs/fuse/dev.c
901 @@ -1524,6 +1524,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode,
902 req->pages[req->num_pages] = page;
903 req->num_pages++;
904
905 + offset = 0;
906 num -= this_num;
907 total_len += this_num;
908 index++;
909 diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
910 index 771741f..edfca53 100644
911 --- a/fs/nfs/nfs3proc.c
912 +++ b/fs/nfs/nfs3proc.c
913 @@ -68,7 +68,7 @@ do_proc_get_root(struct rpc_clnt *client, struct nfs_fh *fhandle,
914 nfs_fattr_init(info->fattr);
915 status = rpc_call_sync(client, &msg, 0);
916 dprintk("%s: reply fsinfo: %d\n", __func__, status);
917 - if (!(info->fattr->valid & NFS_ATTR_FATTR)) {
918 + if (status == 0 && !(info->fattr->valid & NFS_ATTR_FATTR)) {
919 msg.rpc_proc = &nfs3_procedures[NFS3PROC_GETATTR];
920 msg.rpc_resp = info->fattr;
921 status = rpc_call_sync(client, &msg, 0);
922 diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
923 index b7a7e5f..3da1166 100644
924 --- a/fs/nfs/nfs4proc.c
925 +++ b/fs/nfs/nfs4proc.c
926 @@ -5766,12 +5766,8 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata)
927 return;
928 }
929 spin_lock(&lo->plh_inode->i_lock);
930 - if (task->tk_status == 0) {
931 - if (lrp->res.lrs_present) {
932 - pnfs_set_layout_stateid(lo, &lrp->res.stateid, true);
933 - } else
934 - BUG_ON(!list_empty(&lo->plh_segs));
935 - }
936 + if (task->tk_status == 0 && lrp->res.lrs_present)
937 + pnfs_set_layout_stateid(lo, &lrp->res.stateid, true);
938 lo->plh_block_lgets--;
939 spin_unlock(&lo->plh_inode->i_lock);
940 dprintk("<-- %s\n", __func__);
941 diff --git a/fs/nfs/super.c b/fs/nfs/super.c
942 index 8e7b61d..d709112 100644
943 --- a/fs/nfs/super.c
944 +++ b/fs/nfs/super.c
945 @@ -3096,4 +3096,6 @@ static struct dentry *nfs4_referral_mount(struct file_system_type *fs_type,
946 return res;
947 }
948
949 +MODULE_ALIAS("nfs4");
950 +
951 #endif /* CONFIG_NFS_V4 */
952 diff --git a/fs/open.c b/fs/open.c
953 index 7e18c4d..bf00a86 100644
954 --- a/fs/open.c
955 +++ b/fs/open.c
956 @@ -900,9 +900,10 @@ static inline int build_open_flags(int flags, int mode, struct open_flags *op)
957 int lookup_flags = 0;
958 int acc_mode;
959
960 - if (!(flags & O_CREAT))
961 - mode = 0;
962 - op->mode = mode;
963 + if (flags & O_CREAT)
964 + op->mode = (mode & S_IALLUGO) | S_IFREG;
965 + else
966 + op->mode = 0;
967
968 /* Must never be set by userspace */
969 flags &= ~FMODE_NONOTIFY;
970 diff --git a/fs/udf/file.c b/fs/udf/file.c
971 index 3438b00..8eb9628 100644
972 --- a/fs/udf/file.c
973 +++ b/fs/udf/file.c
974 @@ -39,20 +39,24 @@
975 #include "udf_i.h"
976 #include "udf_sb.h"
977
978 -static int udf_adinicb_readpage(struct file *file, struct page *page)
979 +static void __udf_adinicb_readpage(struct page *page)
980 {
981 struct inode *inode = page->mapping->host;
982 char *kaddr;
983 struct udf_inode_info *iinfo = UDF_I(inode);
984
985 - BUG_ON(!PageLocked(page));
986 -
987 kaddr = kmap(page);
988 - memset(kaddr, 0, PAGE_CACHE_SIZE);
989 memcpy(kaddr, iinfo->i_ext.i_data + iinfo->i_lenEAttr, inode->i_size);
990 + memset(kaddr + inode->i_size, 0, PAGE_CACHE_SIZE - inode->i_size);
991 flush_dcache_page(page);
992 SetPageUptodate(page);
993 kunmap(page);
994 +}
995 +
996 +static int udf_adinicb_readpage(struct file *file, struct page *page)
997 +{
998 + BUG_ON(!PageLocked(page));
999 + __udf_adinicb_readpage(page);
1000 unlock_page(page);
1001
1002 return 0;
1003 @@ -77,6 +81,25 @@ static int udf_adinicb_writepage(struct page *page,
1004 return 0;
1005 }
1006
1007 +static int udf_adinicb_write_begin(struct file *file,
1008 + struct address_space *mapping, loff_t pos,
1009 + unsigned len, unsigned flags, struct page **pagep,
1010 + void **fsdata)
1011 +{
1012 + struct page *page;
1013 +
1014 + if (WARN_ON_ONCE(pos >= PAGE_CACHE_SIZE))
1015 + return -EIO;
1016 + page = grab_cache_page_write_begin(mapping, 0, flags);
1017 + if (!page)
1018 + return -ENOMEM;
1019 + *pagep = page;
1020 +
1021 + if (!PageUptodate(page) && len != PAGE_CACHE_SIZE)
1022 + __udf_adinicb_readpage(page);
1023 + return 0;
1024 +}
1025 +
1026 static int udf_adinicb_write_end(struct file *file,
1027 struct address_space *mapping,
1028 loff_t pos, unsigned len, unsigned copied,
1029 @@ -98,8 +121,8 @@ static int udf_adinicb_write_end(struct file *file,
1030 const struct address_space_operations udf_adinicb_aops = {
1031 .readpage = udf_adinicb_readpage,
1032 .writepage = udf_adinicb_writepage,
1033 - .write_begin = simple_write_begin,
1034 - .write_end = udf_adinicb_write_end,
1035 + .write_begin = udf_adinicb_write_begin,
1036 + .write_end = udf_adinicb_write_end,
1037 };
1038
1039 static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
1040 diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
1041 index e99dda0..f6b4ac7 100644
1042 --- a/kernel/audit_tree.c
1043 +++ b/kernel/audit_tree.c
1044 @@ -256,7 +256,6 @@ static void untag_chunk(struct node *p)
1045 spin_unlock(&hash_lock);
1046 spin_unlock(&entry->lock);
1047 fsnotify_destroy_mark(entry);
1048 - fsnotify_put_mark(entry);
1049 goto out;
1050 }
1051
1052 @@ -265,7 +264,7 @@ static void untag_chunk(struct node *p)
1053
1054 fsnotify_duplicate_mark(&new->mark, entry);
1055 if (fsnotify_add_mark(&new->mark, new->mark.group, new->mark.i.inode, NULL, 1)) {
1056 - free_chunk(new);
1057 + fsnotify_put_mark(&new->mark);
1058 goto Fallback;
1059 }
1060
1061 @@ -299,7 +298,6 @@ static void untag_chunk(struct node *p)
1062 spin_unlock(&hash_lock);
1063 spin_unlock(&entry->lock);
1064 fsnotify_destroy_mark(entry);
1065 - fsnotify_put_mark(entry);
1066 goto out;
1067
1068 Fallback:
1069 @@ -328,7 +326,7 @@ static int create_chunk(struct inode *inode, struct audit_tree *tree)
1070
1071 entry = &chunk->mark;
1072 if (fsnotify_add_mark(entry, audit_tree_group, inode, NULL, 0)) {
1073 - free_chunk(chunk);
1074 + fsnotify_put_mark(entry);
1075 return -ENOSPC;
1076 }
1077
1078 @@ -338,6 +336,7 @@ static int create_chunk(struct inode *inode, struct audit_tree *tree)
1079 spin_unlock(&hash_lock);
1080 chunk->dead = 1;
1081 spin_unlock(&entry->lock);
1082 + fsnotify_get_mark(entry);
1083 fsnotify_destroy_mark(entry);
1084 fsnotify_put_mark(entry);
1085 return 0;
1086 @@ -402,7 +401,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
1087 fsnotify_duplicate_mark(chunk_entry, old_entry);
1088 if (fsnotify_add_mark(chunk_entry, chunk_entry->group, chunk_entry->i.inode, NULL, 1)) {
1089 spin_unlock(&old_entry->lock);
1090 - free_chunk(chunk);
1091 + fsnotify_put_mark(chunk_entry);
1092 fsnotify_put_mark(old_entry);
1093 return -ENOSPC;
1094 }
1095 @@ -418,6 +417,7 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
1096 spin_unlock(&chunk_entry->lock);
1097 spin_unlock(&old_entry->lock);
1098
1099 + fsnotify_get_mark(chunk_entry);
1100 fsnotify_destroy_mark(chunk_entry);
1101
1102 fsnotify_put_mark(chunk_entry);
1103 @@ -451,7 +451,6 @@ static int tag_chunk(struct inode *inode, struct audit_tree *tree)
1104 spin_unlock(&old_entry->lock);
1105 fsnotify_destroy_mark(old_entry);
1106 fsnotify_put_mark(old_entry); /* pair to fsnotify_find mark_entry */
1107 - fsnotify_put_mark(old_entry); /* and kill it */
1108 return 0;
1109 }
1110
1111 diff --git a/mm/mempolicy.c b/mm/mempolicy.c
1112 index cff919f..3f3cc56 100644
1113 --- a/mm/mempolicy.c
1114 +++ b/mm/mempolicy.c
1115 @@ -2500,7 +2500,7 @@ int mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol, int no_context)
1116 break;
1117
1118 default:
1119 - BUG();
1120 + return -EINVAL;
1121 }
1122
1123 l = strlen(policy_modes[mode]);
1124 diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
1125 index 75c3582..fb85d37 100644
1126 --- a/net/dccp/ccid.h
1127 +++ b/net/dccp/ccid.h
1128 @@ -246,7 +246,7 @@ static inline int ccid_hc_rx_getsockopt(struct ccid *ccid, struct sock *sk,
1129 u32 __user *optval, int __user *optlen)
1130 {
1131 int rc = -ENOPROTOOPT;
1132 - if (ccid->ccid_ops->ccid_hc_rx_getsockopt != NULL)
1133 + if (ccid != NULL && ccid->ccid_ops->ccid_hc_rx_getsockopt != NULL)
1134 rc = ccid->ccid_ops->ccid_hc_rx_getsockopt(sk, optname, len,
1135 optval, optlen);
1136 return rc;
1137 @@ -257,7 +257,7 @@ static inline int ccid_hc_tx_getsockopt(struct ccid *ccid, struct sock *sk,
1138 u32 __user *optval, int __user *optlen)
1139 {
1140 int rc = -ENOPROTOOPT;
1141 - if (ccid->ccid_ops->ccid_hc_tx_getsockopt != NULL)
1142 + if (ccid != NULL && ccid->ccid_ops->ccid_hc_tx_getsockopt != NULL)
1143 rc = ccid->ccid_ops->ccid_hc_tx_getsockopt(sk, optname, len,
1144 optval, optlen);
1145 return rc;
1146 diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
1147 index 9d7ed0b..05dbccf 100644
1148 --- a/net/sunrpc/svc_xprt.c
1149 +++ b/net/sunrpc/svc_xprt.c
1150 @@ -323,7 +323,6 @@ static bool svc_xprt_has_something_to_do(struct svc_xprt *xprt)
1151 */
1152 void svc_xprt_enqueue(struct svc_xprt *xprt)
1153 {
1154 - struct svc_serv *serv = xprt->xpt_server;
1155 struct svc_pool *pool;
1156 struct svc_rqst *rqstp;
1157 int cpu;
1158 @@ -369,8 +368,6 @@ void svc_xprt_enqueue(struct svc_xprt *xprt)
1159 rqstp, rqstp->rq_xprt);
1160 rqstp->rq_xprt = xprt;
1161 svc_xprt_get(xprt);
1162 - rqstp->rq_reserved = serv->sv_max_mesg;
1163 - atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved);
1164 pool->sp_stats.threads_woken++;
1165 wake_up(&rqstp->rq_wait);
1166 } else {
1167 @@ -650,8 +647,6 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
1168 if (xprt) {
1169 rqstp->rq_xprt = xprt;
1170 svc_xprt_get(xprt);
1171 - rqstp->rq_reserved = serv->sv_max_mesg;
1172 - atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved);
1173
1174 /* As there is a shortage of threads and this request
1175 * had to be queued, don't allow the thread to wait so
1176 @@ -748,6 +743,8 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
1177 else
1178 len = xprt->xpt_ops->xpo_recvfrom(rqstp);
1179 dprintk("svc: got len=%d\n", len);
1180 + rqstp->rq_reserved = serv->sv_max_mesg;
1181 + atomic_add(rqstp->rq_reserved, &xprt->xpt_reserved);
1182 }
1183 svc_xprt_received(xprt);
1184
1185 @@ -804,7 +801,8 @@ int svc_send(struct svc_rqst *rqstp)
1186
1187 /* Grab mutex to serialize outgoing data. */
1188 mutex_lock(&xprt->xpt_mutex);
1189 - if (test_bit(XPT_DEAD, &xprt->xpt_flags))
1190 + if (test_bit(XPT_DEAD, &xprt->xpt_flags)
1191 + || test_bit(XPT_CLOSE, &xprt->xpt_flags))
1192 len = -ENOTCONN;
1193 else
1194 len = xprt->xpt_ops->xpo_sendto(rqstp);
1195 diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
1196 index af04f77..80c6c96 100644
1197 --- a/net/sunrpc/svcsock.c
1198 +++ b/net/sunrpc/svcsock.c
1199 @@ -1122,9 +1122,9 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp)
1200 if (len >= 0)
1201 svsk->sk_tcplen += len;
1202 if (len != want) {
1203 + svc_tcp_save_pages(svsk, rqstp);
1204 if (len < 0 && len != -EAGAIN)
1205 goto err_other;
1206 - svc_tcp_save_pages(svsk, rqstp);
1207 dprintk("svc: incomplete TCP record (%d of %d)\n",
1208 svsk->sk_tcplen, svsk->sk_reclen);
1209 goto err_noclose;
1210 diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
1211 index 6fe944a..d0e5dec 100644
1212 --- a/sound/pci/hda/hda_proc.c
1213 +++ b/sound/pci/hda/hda_proc.c
1214 @@ -406,7 +406,7 @@ static void print_digital_conv(struct snd_info_buffer *buffer,
1215 if (digi1 & AC_DIG1_EMPHASIS)
1216 snd_iprintf(buffer, " Preemphasis");
1217 if (digi1 & AC_DIG1_COPYRIGHT)
1218 - snd_iprintf(buffer, " Copyright");
1219 + snd_iprintf(buffer, " Non-Copyright");
1220 if (digi1 & AC_DIG1_NONAUDIO)
1221 snd_iprintf(buffer, " Non-Audio");
1222 if (digi1 & AC_DIG1_PROFESSIONAL)
1223 diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
1224 index 90117f8..90e5005 100644
1225 --- a/sound/soc/codecs/wm9712.c
1226 +++ b/sound/soc/codecs/wm9712.c
1227 @@ -270,7 +270,7 @@ SOC_DAPM_ENUM("Route", wm9712_enum[9]);
1228
1229 /* Mic select */
1230 static const struct snd_kcontrol_new wm9712_mic_src_controls =
1231 -SOC_DAPM_ENUM("Route", wm9712_enum[7]);
1232 +SOC_DAPM_ENUM("Mic Source Select", wm9712_enum[7]);
1233
1234 /* diff select */
1235 static const struct snd_kcontrol_new wm9712_diff_sel_controls =
1236 @@ -289,7 +289,9 @@ SND_SOC_DAPM_MUX("Left Capture Select", SND_SOC_NOPM, 0, 0,
1237 &wm9712_capture_selectl_controls),
1238 SND_SOC_DAPM_MUX("Right Capture Select", SND_SOC_NOPM, 0, 0,
1239 &wm9712_capture_selectr_controls),
1240 -SND_SOC_DAPM_MUX("Mic Select Source", SND_SOC_NOPM, 0, 0,
1241 +SND_SOC_DAPM_MUX("Left Mic Select Source", SND_SOC_NOPM, 0, 0,
1242 + &wm9712_mic_src_controls),
1243 +SND_SOC_DAPM_MUX("Right Mic Select Source", SND_SOC_NOPM, 0, 0,
1244 &wm9712_mic_src_controls),
1245 SND_SOC_DAPM_MUX("Differential Source", SND_SOC_NOPM, 0, 0,
1246 &wm9712_diff_sel_controls),
1247 @@ -317,6 +319,7 @@ SND_SOC_DAPM_PGA("Out 3 PGA", AC97_INT_PAGING, 5, 1, NULL, 0),
1248 SND_SOC_DAPM_PGA("Line PGA", AC97_INT_PAGING, 2, 1, NULL, 0),
1249 SND_SOC_DAPM_PGA("Phone PGA", AC97_INT_PAGING, 1, 1, NULL, 0),
1250 SND_SOC_DAPM_PGA("Mic PGA", AC97_INT_PAGING, 0, 1, NULL, 0),
1251 +SND_SOC_DAPM_PGA("Differential Mic", SND_SOC_NOPM, 0, 0, NULL, 0),
1252 SND_SOC_DAPM_MICBIAS("Mic Bias", AC97_INT_PAGING, 10, 1),
1253 SND_SOC_DAPM_OUTPUT("MONOOUT"),
1254 SND_SOC_DAPM_OUTPUT("HPOUTL"),
1255 @@ -377,6 +380,18 @@ static const struct snd_soc_dapm_route wm9712_audio_map[] = {
1256 {"Mic PGA", NULL, "MIC1"},
1257 {"Mic PGA", NULL, "MIC2"},
1258
1259 + /* microphones */
1260 + {"Differential Mic", NULL, "MIC1"},
1261 + {"Differential Mic", NULL, "MIC2"},
1262 + {"Left Mic Select Source", "Mic 1", "MIC1"},
1263 + {"Left Mic Select Source", "Mic 2", "MIC2"},
1264 + {"Left Mic Select Source", "Stereo", "MIC1"},
1265 + {"Left Mic Select Source", "Differential", "Differential Mic"},
1266 + {"Right Mic Select Source", "Mic 1", "MIC1"},
1267 + {"Right Mic Select Source", "Mic 2", "MIC2"},
1268 + {"Right Mic Select Source", "Stereo", "MIC2"},
1269 + {"Right Mic Select Source", "Differential", "Differential Mic"},
1270 +
1271 /* left capture selector */
1272 {"Left Capture Select", "Mic", "MIC1"},
1273 {"Left Capture Select", "Speaker Mixer", "Speaker Mixer"},

  ViewVC Help
Powered by ViewVC 1.1.20