diff options
author | Anton Altaparmakov <anton@tuxera.com> | 2012-02-24 04:39:16 -0500 |
---|---|---|
committer | Anton Altaparmakov <anton@tuxera.com> | 2012-02-24 04:39:16 -0500 |
commit | 0afa1b62e33250d4777c5803a98ae69fbe872061 (patch) | |
tree | 1c747bc01b62bca85d277e2c8321ae6cf0006ed8 | |
parent | 97387e3baaf3c35ad560f8878e943c720a77da1b (diff) | |
parent | bb4c7e9a9908548b458f34afb2fee74dc0d49f90 (diff) |
Merge branch 'master' of /Volumes/CaseSensitiveDisk/linux
65 files changed, 473 insertions, 466 deletions
diff --git a/arch/m68k/include/asm/mcf_pgtable.h b/arch/m68k/include/asm/mcf_pgtable.h index 756bde4fb4f8..3c793682e5d9 100644 --- a/arch/m68k/include/asm/mcf_pgtable.h +++ b/arch/m68k/include/asm/mcf_pgtable.h | |||
@@ -78,7 +78,8 @@ | |||
78 | | CF_PAGE_READABLE \ | 78 | | CF_PAGE_READABLE \ |
79 | | CF_PAGE_WRITABLE \ | 79 | | CF_PAGE_WRITABLE \ |
80 | | CF_PAGE_EXEC \ | 80 | | CF_PAGE_EXEC \ |
81 | | CF_PAGE_SYSTEM) | 81 | | CF_PAGE_SYSTEM \ |
82 | | CF_PAGE_SHARED) | ||
82 | 83 | ||
83 | #define PAGE_COPY __pgprot(CF_PAGE_VALID \ | 84 | #define PAGE_COPY __pgprot(CF_PAGE_VALID \ |
84 | | CF_PAGE_ACCESSED \ | 85 | | CF_PAGE_ACCESSED \ |
diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c index babd5a97cdcb..875b800ef0dd 100644 --- a/arch/m68k/mm/mcfmmu.c +++ b/arch/m68k/mm/mcfmmu.c | |||
@@ -87,7 +87,7 @@ void __init paging_init(void) | |||
87 | 87 | ||
88 | int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb, int extension_word) | 88 | int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb, int extension_word) |
89 | { | 89 | { |
90 | unsigned long flags, mmuar; | 90 | unsigned long flags, mmuar, mmutr; |
91 | struct mm_struct *mm; | 91 | struct mm_struct *mm; |
92 | pgd_t *pgd; | 92 | pgd_t *pgd; |
93 | pmd_t *pmd; | 93 | pmd_t *pmd; |
@@ -137,9 +137,10 @@ int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb, int extension_word) | |||
137 | if (!pte_dirty(*pte) && !KMAPAREA(mmuar)) | 137 | if (!pte_dirty(*pte) && !KMAPAREA(mmuar)) |
138 | set_pte(pte, pte_wrprotect(*pte)); | 138 | set_pte(pte, pte_wrprotect(*pte)); |
139 | 139 | ||
140 | mmu_write(MMUTR, (mmuar & PAGE_MASK) | (asid << MMUTR_IDN) | | 140 | mmutr = (mmuar & PAGE_MASK) | (asid << MMUTR_IDN) | MMUTR_V; |
141 | (((int)(pte->pte) & (int)CF_PAGE_MMUTR_MASK) | 141 | if ((mmuar < TASK_UNMAPPED_BASE) || (mmuar >= TASK_SIZE)) |
142 | >> CF_PAGE_MMUTR_SHIFT) | MMUTR_V); | 142 | mmutr |= (pte->pte & CF_PAGE_MMUTR_MASK) >> CF_PAGE_MMUTR_SHIFT; |
143 | mmu_write(MMUTR, mmutr); | ||
143 | 144 | ||
144 | mmu_write(MMUDR, (pte_val(*pte) & PAGE_MASK) | | 145 | mmu_write(MMUDR, (pte_val(*pte) & PAGE_MASK) | |
145 | ((pte->pte) & CF_PAGE_MMUDR_MASK) | MMUDR_SZ_8KB | MMUDR_X); | 146 | ((pte->pte) & CF_PAGE_MMUDR_MASK) | MMUDR_SZ_8KB | MMUDR_X); |
diff --git a/arch/m68k/platform/coldfire/entry.S b/arch/m68k/platform/coldfire/entry.S index 863889fc31c9..281e38c2b6c7 100644 --- a/arch/m68k/platform/coldfire/entry.S +++ b/arch/m68k/platform/coldfire/entry.S | |||
@@ -136,7 +136,7 @@ Luser_return: | |||
136 | movel %sp,%d1 /* get thread_info pointer */ | 136 | movel %sp,%d1 /* get thread_info pointer */ |
137 | andl #-THREAD_SIZE,%d1 /* at base of kernel stack */ | 137 | andl #-THREAD_SIZE,%d1 /* at base of kernel stack */ |
138 | movel %d1,%a0 | 138 | movel %d1,%a0 |
139 | movel %a0@(TINFO_FLAGS),%d1 /* get thread_info->flags */ | 139 | moveb %a0@(TINFO_FLAGS+3),%d1 /* thread_info->flags (low 8 bits) */ |
140 | jne Lwork_to_do /* still work to do */ | 140 | jne Lwork_to_do /* still work to do */ |
141 | 141 | ||
142 | Lreturn: | 142 | Lreturn: |
@@ -148,8 +148,6 @@ Lwork_to_do: | |||
148 | btst #TIF_NEED_RESCHED,%d1 | 148 | btst #TIF_NEED_RESCHED,%d1 |
149 | jne reschedule | 149 | jne reschedule |
150 | 150 | ||
151 | /* GERG: do we need something here for TRACEing?? */ | ||
152 | |||
153 | Lsignal_return: | 151 | Lsignal_return: |
154 | subql #4,%sp /* dummy return address */ | 152 | subql #4,%sp /* dummy return address */ |
155 | SAVE_SWITCH_STACK | 153 | SAVE_SWITCH_STACK |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 4f80cf1ce77b..3e57a00b8cba 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -1213,7 +1213,7 @@ do_user_signal: /* r10 contains MSR_KERNEL here */ | |||
1213 | stw r3,_TRAP(r1) | 1213 | stw r3,_TRAP(r1) |
1214 | 2: addi r3,r1,STACK_FRAME_OVERHEAD | 1214 | 2: addi r3,r1,STACK_FRAME_OVERHEAD |
1215 | mr r4,r9 | 1215 | mr r4,r9 |
1216 | bl do_signal | 1216 | bl do_notify_resume |
1217 | REST_NVGPRS(r1) | 1217 | REST_NVGPRS(r1) |
1218 | b recheck | 1218 | b recheck |
1219 | 1219 | ||
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index d834425186ae..866462cbe2d8 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -751,12 +751,16 @@ user_work: | |||
751 | 751 | ||
752 | andi. r0,r4,_TIF_NEED_RESCHED | 752 | andi. r0,r4,_TIF_NEED_RESCHED |
753 | beq 1f | 753 | beq 1f |
754 | li r5,1 | ||
755 | TRACE_AND_RESTORE_IRQ(r5); | ||
754 | bl .schedule | 756 | bl .schedule |
755 | b .ret_from_except_lite | 757 | b .ret_from_except_lite |
756 | 758 | ||
757 | 1: bl .save_nvgprs | 759 | 1: bl .save_nvgprs |
760 | li r5,1 | ||
761 | TRACE_AND_RESTORE_IRQ(r5); | ||
758 | addi r3,r1,STACK_FRAME_OVERHEAD | 762 | addi r3,r1,STACK_FRAME_OVERHEAD |
759 | bl .do_signal | 763 | bl .do_notify_resume |
760 | b .ret_from_except | 764 | b .ret_from_except |
761 | 765 | ||
762 | unrecov_restore: | 766 | unrecov_restore: |
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 3844ca7c5099..15c5a4f6de01 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -774,8 +774,8 @@ alignment_common: | |||
774 | program_check_common: | 774 | program_check_common: |
775 | EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN) | 775 | EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN) |
776 | bl .save_nvgprs | 776 | bl .save_nvgprs |
777 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
778 | DISABLE_INTS | 777 | DISABLE_INTS |
778 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
779 | bl .program_check_exception | 779 | bl .program_check_exception |
780 | b .ret_from_except | 780 | b .ret_from_except |
781 | 781 | ||
diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c index 2300426e531a..ac6e437b1021 100644 --- a/arch/powerpc/kernel/signal.c +++ b/arch/powerpc/kernel/signal.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/tracehook.h> | 12 | #include <linux/tracehook.h> |
13 | #include <linux/signal.h> | 13 | #include <linux/signal.h> |
14 | #include <linux/key.h> | ||
14 | #include <asm/hw_breakpoint.h> | 15 | #include <asm/hw_breakpoint.h> |
15 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
16 | #include <asm/unistd.h> | 17 | #include <asm/unistd.h> |
@@ -113,8 +114,9 @@ static void check_syscall_restart(struct pt_regs *regs, struct k_sigaction *ka, | |||
113 | } | 114 | } |
114 | } | 115 | } |
115 | 116 | ||
116 | static int do_signal_pending(sigset_t *oldset, struct pt_regs *regs) | 117 | static int do_signal(struct pt_regs *regs) |
117 | { | 118 | { |
119 | sigset_t *oldset; | ||
118 | siginfo_t info; | 120 | siginfo_t info; |
119 | int signr; | 121 | int signr; |
120 | struct k_sigaction ka; | 122 | struct k_sigaction ka; |
@@ -123,7 +125,7 @@ static int do_signal_pending(sigset_t *oldset, struct pt_regs *regs) | |||
123 | 125 | ||
124 | if (current_thread_info()->local_flags & _TLF_RESTORE_SIGMASK) | 126 | if (current_thread_info()->local_flags & _TLF_RESTORE_SIGMASK) |
125 | oldset = ¤t->saved_sigmask; | 127 | oldset = ¤t->saved_sigmask; |
126 | else if (!oldset) | 128 | else |
127 | oldset = ¤t->blocked; | 129 | oldset = ¤t->blocked; |
128 | 130 | ||
129 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 131 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
@@ -191,14 +193,16 @@ static int do_signal_pending(sigset_t *oldset, struct pt_regs *regs) | |||
191 | return ret; | 193 | return ret; |
192 | } | 194 | } |
193 | 195 | ||
194 | void do_signal(struct pt_regs *regs, unsigned long thread_info_flags) | 196 | void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags) |
195 | { | 197 | { |
196 | if (thread_info_flags & _TIF_SIGPENDING) | 198 | if (thread_info_flags & _TIF_SIGPENDING) |
197 | do_signal_pending(NULL, regs); | 199 | do_signal(regs); |
198 | 200 | ||
199 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | 201 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { |
200 | clear_thread_flag(TIF_NOTIFY_RESUME); | 202 | clear_thread_flag(TIF_NOTIFY_RESUME); |
201 | tracehook_notify_resume(regs); | 203 | tracehook_notify_resume(regs); |
204 | if (current->replacement_session_keyring) | ||
205 | key_replace_session_keyring(); | ||
202 | } | 206 | } |
203 | } | 207 | } |
204 | 208 | ||
diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h index 6c0ddfc0603e..8dde973aaaf5 100644 --- a/arch/powerpc/kernel/signal.h +++ b/arch/powerpc/kernel/signal.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 13 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
14 | 14 | ||
15 | extern void do_signal(struct pt_regs *regs, unsigned long thread_info_flags); | 15 | extern void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags); |
16 | 16 | ||
17 | extern void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, | 17 | extern void __user * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, |
18 | size_t frame_size, int is_32); | 18 | size_t frame_size, int is_32); |
diff --git a/arch/powerpc/platforms/wsp/smp.c b/arch/powerpc/platforms/wsp/smp.c index 71bd105f3863..0ba103ae83a5 100644 --- a/arch/powerpc/platforms/wsp/smp.c +++ b/arch/powerpc/platforms/wsp/smp.c | |||
@@ -71,7 +71,7 @@ int __devinit smp_a2_kick_cpu(int nr) | |||
71 | 71 | ||
72 | static int __init smp_a2_probe(void) | 72 | static int __init smp_a2_probe(void) |
73 | { | 73 | { |
74 | return cpus_weight(cpu_possible_map); | 74 | return num_possible_cpus(); |
75 | } | 75 | } |
76 | 76 | ||
77 | static struct smp_ops_t a2_smp_ops = { | 77 | static struct smp_ops_t a2_smp_ops = { |
diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig index 7dbc4a83c45c..78a666d1e5f5 100644 --- a/drivers/cpuidle/Kconfig +++ b/drivers/cpuidle/Kconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | 1 | ||
2 | config CPU_IDLE | 2 | config CPU_IDLE |
3 | bool "CPU idle PM support" | 3 | bool "CPU idle PM support" |
4 | default ACPI | 4 | default y if ACPI || PPC_PSERIES |
5 | help | 5 | help |
6 | CPU idle is a generic framework for supporting software-controlled | 6 | CPU idle is a generic framework for supporting software-controlled |
7 | idle processor power management. It includes modular cross-platform | 7 | idle processor power management. It includes modular cross-platform |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_core.c b/drivers/gpu/drm/exynos/exynos_drm_core.c index 661a03571d0c..d08a55896d50 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_core.c +++ b/drivers/gpu/drm/exynos/exynos_drm_core.c | |||
@@ -193,6 +193,9 @@ int exynos_drm_subdrv_register(struct exynos_drm_subdrv *subdrv) | |||
193 | return err; | 193 | return err; |
194 | } | 194 | } |
195 | 195 | ||
196 | /* setup possible_clones. */ | ||
197 | exynos_drm_encoder_setup(drm_dev); | ||
198 | |||
196 | /* | 199 | /* |
197 | * if any specific driver such as fimd or hdmi driver called | 200 | * if any specific driver such as fimd or hdmi driver called |
198 | * exynos_drm_subdrv_register() later than drm_load(), | 201 | * exynos_drm_subdrv_register() later than drm_load(), |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index e3861ac49295..de818831a511 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c | |||
@@ -307,9 +307,6 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc, | |||
307 | */ | 307 | */ |
308 | event->pipe = exynos_crtc->pipe; | 308 | event->pipe = exynos_crtc->pipe; |
309 | 309 | ||
310 | list_add_tail(&event->base.link, | ||
311 | &dev_priv->pageflip_event_list); | ||
312 | |||
313 | ret = drm_vblank_get(dev, exynos_crtc->pipe); | 310 | ret = drm_vblank_get(dev, exynos_crtc->pipe); |
314 | if (ret) { | 311 | if (ret) { |
315 | DRM_DEBUG("failed to acquire vblank counter\n"); | 312 | DRM_DEBUG("failed to acquire vblank counter\n"); |
@@ -318,6 +315,9 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc, | |||
318 | goto out; | 315 | goto out; |
319 | } | 316 | } |
320 | 317 | ||
318 | list_add_tail(&event->base.link, | ||
319 | &dev_priv->pageflip_event_list); | ||
320 | |||
321 | crtc->fb = fb; | 321 | crtc->fb = fb; |
322 | ret = exynos_drm_crtc_update(crtc); | 322 | ret = exynos_drm_crtc_update(crtc); |
323 | if (ret) { | 323 | if (ret) { |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 35889ca255e9..58820ebd3558 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include "exynos_drm_drv.h" | 34 | #include "exynos_drm_drv.h" |
35 | #include "exynos_drm_crtc.h" | 35 | #include "exynos_drm_crtc.h" |
36 | #include "exynos_drm_encoder.h" | ||
36 | #include "exynos_drm_fbdev.h" | 37 | #include "exynos_drm_fbdev.h" |
37 | #include "exynos_drm_fb.h" | 38 | #include "exynos_drm_fb.h" |
38 | #include "exynos_drm_gem.h" | 39 | #include "exynos_drm_gem.h" |
@@ -99,6 +100,9 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) | |||
99 | if (ret) | 100 | if (ret) |
100 | goto err_vblank; | 101 | goto err_vblank; |
101 | 102 | ||
103 | /* setup possible_clones. */ | ||
104 | exynos_drm_encoder_setup(dev); | ||
105 | |||
102 | /* | 106 | /* |
103 | * create and configure fb helper and also exynos specific | 107 | * create and configure fb helper and also exynos specific |
104 | * fbdev object. | 108 | * fbdev object. |
@@ -141,16 +145,21 @@ static int exynos_drm_unload(struct drm_device *dev) | |||
141 | } | 145 | } |
142 | 146 | ||
143 | static void exynos_drm_preclose(struct drm_device *dev, | 147 | static void exynos_drm_preclose(struct drm_device *dev, |
144 | struct drm_file *file_priv) | 148 | struct drm_file *file) |
145 | { | 149 | { |
146 | struct exynos_drm_private *dev_priv = dev->dev_private; | 150 | DRM_DEBUG_DRIVER("%s\n", __FILE__); |
147 | 151 | ||
148 | /* | 152 | } |
149 | * drm framework frees all events at release time, | 153 | |
150 | * so private event list should be cleared. | 154 | static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file) |
151 | */ | 155 | { |
152 | if (!list_empty(&dev_priv->pageflip_event_list)) | 156 | DRM_DEBUG_DRIVER("%s\n", __FILE__); |
153 | INIT_LIST_HEAD(&dev_priv->pageflip_event_list); | 157 | |
158 | if (!file->driver_priv) | ||
159 | return; | ||
160 | |||
161 | kfree(file->driver_priv); | ||
162 | file->driver_priv = NULL; | ||
154 | } | 163 | } |
155 | 164 | ||
156 | static void exynos_drm_lastclose(struct drm_device *dev) | 165 | static void exynos_drm_lastclose(struct drm_device *dev) |
@@ -195,6 +204,7 @@ static struct drm_driver exynos_drm_driver = { | |||
195 | .unload = exynos_drm_unload, | 204 | .unload = exynos_drm_unload, |
196 | .preclose = exynos_drm_preclose, | 205 | .preclose = exynos_drm_preclose, |
197 | .lastclose = exynos_drm_lastclose, | 206 | .lastclose = exynos_drm_lastclose, |
207 | .postclose = exynos_drm_postclose, | ||
198 | .get_vblank_counter = drm_vblank_count, | 208 | .get_vblank_counter = drm_vblank_count, |
199 | .enable_vblank = exynos_drm_crtc_enable_vblank, | 209 | .enable_vblank = exynos_drm_crtc_enable_vblank, |
200 | .disable_vblank = exynos_drm_crtc_disable_vblank, | 210 | .disable_vblank = exynos_drm_crtc_disable_vblank, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 86b93dde219a..ef4754f1519b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c | |||
@@ -195,6 +195,40 @@ static struct drm_encoder_funcs exynos_encoder_funcs = { | |||
195 | .destroy = exynos_drm_encoder_destroy, | 195 | .destroy = exynos_drm_encoder_destroy, |
196 | }; | 196 | }; |
197 | 197 | ||
198 | static unsigned int exynos_drm_encoder_clones(struct drm_encoder *encoder) | ||
199 | { | ||
200 | struct drm_encoder *clone; | ||
201 | struct drm_device *dev = encoder->dev; | ||
202 | struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder); | ||
203 | struct exynos_drm_display_ops *display_ops = | ||
204 | exynos_encoder->manager->display_ops; | ||
205 | unsigned int clone_mask = 0; | ||
206 | int cnt = 0; | ||
207 | |||
208 | list_for_each_entry(clone, &dev->mode_config.encoder_list, head) { | ||
209 | switch (display_ops->type) { | ||
210 | case EXYNOS_DISPLAY_TYPE_LCD: | ||
211 | case EXYNOS_DISPLAY_TYPE_HDMI: | ||
212 | clone_mask |= (1 << (cnt++)); | ||
213 | break; | ||
214 | default: | ||
215 | continue; | ||
216 | } | ||
217 | } | ||
218 | |||
219 | return clone_mask; | ||
220 | } | ||
221 | |||
222 | void exynos_drm_encoder_setup(struct drm_device *dev) | ||
223 | { | ||
224 | struct drm_encoder *encoder; | ||
225 | |||
226 | DRM_DEBUG_KMS("%s\n", __FILE__); | ||
227 | |||
228 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) | ||
229 | encoder->possible_clones = exynos_drm_encoder_clones(encoder); | ||
230 | } | ||
231 | |||
198 | struct drm_encoder * | 232 | struct drm_encoder * |
199 | exynos_drm_encoder_create(struct drm_device *dev, | 233 | exynos_drm_encoder_create(struct drm_device *dev, |
200 | struct exynos_drm_manager *manager, | 234 | struct exynos_drm_manager *manager, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.h b/drivers/gpu/drm/exynos/exynos_drm_encoder.h index 97b087a51cb6..eb7d2316847e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.h +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.h | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | struct exynos_drm_manager; | 31 | struct exynos_drm_manager; |
32 | 32 | ||
33 | void exynos_drm_encoder_setup(struct drm_device *dev); | ||
33 | struct drm_encoder *exynos_drm_encoder_create(struct drm_device *dev, | 34 | struct drm_encoder *exynos_drm_encoder_create(struct drm_device *dev, |
34 | struct exynos_drm_manager *mgr, | 35 | struct exynos_drm_manager *mgr, |
35 | unsigned int possible_crtcs); | 36 | unsigned int possible_crtcs); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index d7ae29d2f3d6..3508700e529b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c | |||
@@ -195,66 +195,6 @@ out: | |||
195 | return ret; | 195 | return ret; |
196 | } | 196 | } |
197 | 197 | ||
198 | static bool | ||
199 | exynos_drm_fbdev_is_samefb(struct drm_framebuffer *fb, | ||
200 | struct drm_fb_helper_surface_size *sizes) | ||
201 | { | ||
202 | if (fb->width != sizes->surface_width) | ||
203 | return false; | ||
204 | if (fb->height != sizes->surface_height) | ||
205 | return false; | ||
206 | if (fb->bits_per_pixel != sizes->surface_bpp) | ||
207 | return false; | ||
208 | if (fb->depth != sizes->surface_depth) | ||
209 | return false; | ||
210 | |||
211 | return true; | ||
212 | } | ||
213 | |||
214 | static int exynos_drm_fbdev_recreate(struct drm_fb_helper *helper, | ||
215 | struct drm_fb_helper_surface_size *sizes) | ||
216 | { | ||
217 | struct drm_device *dev = helper->dev; | ||
218 | struct exynos_drm_fbdev *exynos_fbdev = to_exynos_fbdev(helper); | ||
219 | struct exynos_drm_gem_obj *exynos_gem_obj; | ||
220 | struct drm_framebuffer *fb = helper->fb; | ||
221 | struct drm_mode_fb_cmd2 mode_cmd = { 0 }; | ||
222 | unsigned long size; | ||
223 | |||
224 | DRM_DEBUG_KMS("%s\n", __FILE__); | ||
225 | |||
226 | if (exynos_drm_fbdev_is_samefb(fb, sizes)) | ||
227 | return 0; | ||
228 | |||
229 | mode_cmd.width = sizes->surface_width; | ||
230 | mode_cmd.height = sizes->surface_height; | ||
231 | mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); | ||
232 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, | ||
233 | sizes->surface_depth); | ||
234 | |||
235 | if (exynos_fbdev->exynos_gem_obj) | ||
236 | exynos_drm_gem_destroy(exynos_fbdev->exynos_gem_obj); | ||
237 | |||
238 | if (fb->funcs->destroy) | ||
239 | fb->funcs->destroy(fb); | ||
240 | |||
241 | size = mode_cmd.pitches[0] * mode_cmd.height; | ||
242 | exynos_gem_obj = exynos_drm_gem_create(dev, size); | ||
243 | if (IS_ERR(exynos_gem_obj)) | ||
244 | return PTR_ERR(exynos_gem_obj); | ||
245 | |||
246 | exynos_fbdev->exynos_gem_obj = exynos_gem_obj; | ||
247 | |||
248 | helper->fb = exynos_drm_framebuffer_init(dev, &mode_cmd, | ||
249 | &exynos_gem_obj->base); | ||
250 | if (IS_ERR_OR_NULL(helper->fb)) { | ||
251 | DRM_ERROR("failed to create drm framebuffer.\n"); | ||
252 | return PTR_ERR(helper->fb); | ||
253 | } | ||
254 | |||
255 | return exynos_drm_fbdev_update(helper, helper->fb); | ||
256 | } | ||
257 | |||
258 | static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper, | 198 | static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper, |
259 | struct drm_fb_helper_surface_size *sizes) | 199 | struct drm_fb_helper_surface_size *sizes) |
260 | { | 200 | { |
@@ -262,6 +202,10 @@ static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper, | |||
262 | 202 | ||
263 | DRM_DEBUG_KMS("%s\n", __FILE__); | 203 | DRM_DEBUG_KMS("%s\n", __FILE__); |
264 | 204 | ||
205 | /* | ||
206 | * with !helper->fb, it means that this funcion is called first time | ||
207 | * and after that, the helper->fb would be used as clone mode. | ||
208 | */ | ||
265 | if (!helper->fb) { | 209 | if (!helper->fb) { |
266 | ret = exynos_drm_fbdev_create(helper, sizes); | 210 | ret = exynos_drm_fbdev_create(helper, sizes); |
267 | if (ret < 0) { | 211 | if (ret < 0) { |
@@ -274,12 +218,6 @@ static int exynos_drm_fbdev_probe(struct drm_fb_helper *helper, | |||
274 | * because register_framebuffer() should be called. | 218 | * because register_framebuffer() should be called. |
275 | */ | 219 | */ |
276 | ret = 1; | 220 | ret = 1; |
277 | } else { | ||
278 | ret = exynos_drm_fbdev_recreate(helper, sizes); | ||
279 | if (ret < 0) { | ||
280 | DRM_ERROR("failed to reconfigure fbdev\n"); | ||
281 | return ret; | ||
282 | } | ||
283 | } | 221 | } |
284 | 222 | ||
285 | return ret; | 223 | return ret; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index b6a737d196ae..0dbb32bb18a3 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -604,7 +604,12 @@ static void fimd_finish_pageflip(struct drm_device *drm_dev, int crtc) | |||
604 | } | 604 | } |
605 | 605 | ||
606 | if (is_checked) { | 606 | if (is_checked) { |
607 | drm_vblank_put(drm_dev, crtc); | 607 | /* |
608 | * call drm_vblank_put only in case that drm_vblank_get was | ||
609 | * called. | ||
610 | */ | ||
611 | if (atomic_read(&drm_dev->vblank_refcount[crtc]) > 0) | ||
612 | drm_vblank_put(drm_dev, crtc); | ||
608 | 613 | ||
609 | /* | 614 | /* |
610 | * don't off vblank if vblank_disable_allowed is 1, | 615 | * don't off vblank if vblank_disable_allowed is 1, |
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index ac24cff39775..93846e810e38 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c | |||
@@ -712,7 +712,12 @@ static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) | |||
712 | } | 712 | } |
713 | 713 | ||
714 | if (is_checked) | 714 | if (is_checked) |
715 | drm_vblank_put(drm_dev, crtc); | 715 | /* |
716 | * call drm_vblank_put only in case that drm_vblank_get was | ||
717 | * called. | ||
718 | */ | ||
719 | if (atomic_read(&drm_dev->vblank_refcount[crtc]) > 0) | ||
720 | drm_vblank_put(drm_dev, crtc); | ||
716 | 721 | ||
717 | spin_unlock_irqrestore(&drm_dev->event_lock, flags); | 722 | spin_unlock_irqrestore(&drm_dev->event_lock, flags); |
718 | } | 723 | } |
@@ -779,15 +784,15 @@ static void mixer_win_reset(struct mixer_context *ctx) | |||
779 | mixer_reg_writemask(res, MXR_STATUS, MXR_STATUS_16_BURST, | 784 | mixer_reg_writemask(res, MXR_STATUS, MXR_STATUS_16_BURST, |
780 | MXR_STATUS_BURST_MASK); | 785 | MXR_STATUS_BURST_MASK); |
781 | 786 | ||
782 | /* setting default layer priority: layer1 > video > layer0 | 787 | /* setting default layer priority: layer1 > layer0 > video |
783 | * because typical usage scenario would be | 788 | * because typical usage scenario would be |
789 | * layer1 - OSD | ||
784 | * layer0 - framebuffer | 790 | * layer0 - framebuffer |
785 | * video - video overlay | 791 | * video - video overlay |
786 | * layer1 - OSD | ||
787 | */ | 792 | */ |
788 | val = MXR_LAYER_CFG_GRP0_VAL(1); | 793 | val = MXR_LAYER_CFG_GRP1_VAL(3); |
789 | val |= MXR_LAYER_CFG_VP_VAL(2); | 794 | val |= MXR_LAYER_CFG_GRP0_VAL(2); |
790 | val |= MXR_LAYER_CFG_GRP1_VAL(3); | 795 | val |= MXR_LAYER_CFG_VP_VAL(1); |
791 | mixer_reg_write(res, MXR_LAYER_CFG, val); | 796 | mixer_reg_write(res, MXR_LAYER_CFG, val); |
792 | 797 | ||
793 | /* setting background color */ | 798 | /* setting background color */ |
@@ -1044,7 +1049,7 @@ static int mixer_remove(struct platform_device *pdev) | |||
1044 | platform_get_drvdata(pdev); | 1049 | platform_get_drvdata(pdev); |
1045 | struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx; | 1050 | struct mixer_context *ctx = (struct mixer_context *)drm_hdmi_ctx->ctx; |
1046 | 1051 | ||
1047 | dev_info(dev, "remove sucessful\n"); | 1052 | dev_info(dev, "remove successful\n"); |
1048 | 1053 | ||
1049 | mixer_resource_poweroff(ctx); | 1054 | mixer_resource_poweroff(ctx); |
1050 | mixer_resources_cleanup(ctx); | 1055 | mixer_resources_cleanup(ctx); |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index c3afb783cb9d..03c53fcf8653 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -3028,6 +3028,20 @@ | |||
3028 | #define DISP_TILE_SURFACE_SWIZZLING (1<<13) | 3028 | #define DISP_TILE_SURFACE_SWIZZLING (1<<13) |
3029 | #define DISP_FBC_WM_DIS (1<<15) | 3029 | #define DISP_FBC_WM_DIS (1<<15) |
3030 | 3030 | ||
3031 | /* GEN7 chicken */ | ||
3032 | #define GEN7_COMMON_SLICE_CHICKEN1 0x7010 | ||
3033 | # define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC ((1<<10) | (1<<26)) | ||
3034 | |||
3035 | #define GEN7_L3CNTLREG1 0xB01C | ||
3036 | #define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C4FFF8C | ||
3037 | |||
3038 | #define GEN7_L3_CHICKEN_MODE_REGISTER 0xB030 | ||
3039 | #define GEN7_WA_L3_CHICKEN_MODE 0x20000000 | ||
3040 | |||
3041 | /* WaCatErrorRejectionIssue */ | ||
3042 | #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030 | ||
3043 | #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) | ||
3044 | |||
3031 | /* PCH */ | 3045 | /* PCH */ |
3032 | 3046 | ||
3033 | /* south display engine interrupt */ | 3047 | /* south display engine interrupt */ |
@@ -3618,6 +3632,7 @@ | |||
3618 | #define GT_FIFO_NUM_RESERVED_ENTRIES 20 | 3632 | #define GT_FIFO_NUM_RESERVED_ENTRIES 20 |
3619 | 3633 | ||
3620 | #define GEN6_UCGCTL2 0x9404 | 3634 | #define GEN6_UCGCTL2 0x9404 |
3635 | # define GEN6_RCZUNIT_CLOCK_GATE_DISABLE (1 << 13) | ||
3621 | # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12) | 3636 | # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12) |
3622 | # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE (1 << 11) | 3637 | # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE (1 << 11) |
3623 | 3638 | ||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 00fbff5ddd81..f425b23e3803 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -8184,8 +8184,8 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv) | |||
8184 | I915_WRITE(GEN6_RC6pp_THRESHOLD, 64000); /* unused */ | 8184 | I915_WRITE(GEN6_RC6pp_THRESHOLD, 64000); /* unused */ |
8185 | 8185 | ||
8186 | if (intel_enable_rc6(dev_priv->dev)) | 8186 | if (intel_enable_rc6(dev_priv->dev)) |
8187 | rc6_mask = GEN6_RC_CTL_RC6p_ENABLE | | 8187 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE | |
8188 | GEN6_RC_CTL_RC6_ENABLE; | 8188 | (IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0; |
8189 | 8189 | ||
8190 | I915_WRITE(GEN6_RC_CONTROL, | 8190 | I915_WRITE(GEN6_RC_CONTROL, |
8191 | rc6_mask | | 8191 | rc6_mask | |
@@ -8463,12 +8463,32 @@ static void ivybridge_init_clock_gating(struct drm_device *dev) | |||
8463 | I915_WRITE(WM2_LP_ILK, 0); | 8463 | I915_WRITE(WM2_LP_ILK, 0); |
8464 | I915_WRITE(WM1_LP_ILK, 0); | 8464 | I915_WRITE(WM1_LP_ILK, 0); |
8465 | 8465 | ||
8466 | /* According to the spec, bit 13 (RCZUNIT) must be set on IVB. | ||
8467 | * This implements the WaDisableRCZUnitClockGating workaround. | ||
8468 | */ | ||
8469 | I915_WRITE(GEN6_UCGCTL2, GEN6_RCZUNIT_CLOCK_GATE_DISABLE); | ||
8470 | |||
8466 | I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE); | 8471 | I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE); |
8467 | 8472 | ||
8468 | I915_WRITE(IVB_CHICKEN3, | 8473 | I915_WRITE(IVB_CHICKEN3, |
8469 | CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE | | 8474 | CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE | |
8470 | CHICKEN3_DGMG_DONE_FIX_DISABLE); | 8475 | CHICKEN3_DGMG_DONE_FIX_DISABLE); |
8471 | 8476 | ||
8477 | /* Apply the WaDisableRHWOOptimizationForRenderHang workaround. */ | ||
8478 | I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1, | ||
8479 | GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC); | ||
8480 | |||
8481 | /* WaApplyL3ControlAndL3ChickenMode requires those two on Ivy Bridge */ | ||
8482 | I915_WRITE(GEN7_L3CNTLREG1, | ||
8483 | GEN7_WA_FOR_GEN7_L3_CONTROL); | ||
8484 | I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER, | ||
8485 | GEN7_WA_L3_CHICKEN_MODE); | ||
8486 | |||
8487 | /* This is required by WaCatErrorRejectionIssue */ | ||
8488 | I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG, | ||
8489 | I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) | | ||
8490 | GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB); | ||
8491 | |||
8472 | for_each_pipe(pipe) { | 8492 | for_each_pipe(pipe) { |
8473 | I915_WRITE(DSPCNTR(pipe), | 8493 | I915_WRITE(DSPCNTR(pipe), |
8474 | I915_READ(DSPCNTR(pipe)) | | 8494 | I915_READ(DSPCNTR(pipe)) | |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 9be353b894cc..f58254a3fb01 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -3223,6 +3223,7 @@ int evergreen_resume(struct radeon_device *rdev) | |||
3223 | r = evergreen_startup(rdev); | 3223 | r = evergreen_startup(rdev); |
3224 | if (r) { | 3224 | if (r) { |
3225 | DRM_ERROR("evergreen startup failed on resume\n"); | 3225 | DRM_ERROR("evergreen startup failed on resume\n"); |
3226 | rdev->accel_working = false; | ||
3226 | return r; | 3227 | return r; |
3227 | } | 3228 | } |
3228 | 3229 | ||
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index db09065e68fd..2509c505acb8 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -1547,6 +1547,7 @@ int cayman_resume(struct radeon_device *rdev) | |||
1547 | r = cayman_startup(rdev); | 1547 | r = cayman_startup(rdev); |
1548 | if (r) { | 1548 | if (r) { |
1549 | DRM_ERROR("cayman startup failed on resume\n"); | 1549 | DRM_ERROR("cayman startup failed on resume\n"); |
1550 | rdev->accel_working = false; | ||
1550 | return r; | 1551 | return r; |
1551 | } | 1552 | } |
1552 | return r; | 1553 | return r; |
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 18cd84fae99c..333cde9d4e7b 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -3928,6 +3928,8 @@ static int r100_startup(struct radeon_device *rdev) | |||
3928 | 3928 | ||
3929 | int r100_resume(struct radeon_device *rdev) | 3929 | int r100_resume(struct radeon_device *rdev) |
3930 | { | 3930 | { |
3931 | int r; | ||
3932 | |||
3931 | /* Make sur GART are not working */ | 3933 | /* Make sur GART are not working */ |
3932 | if (rdev->flags & RADEON_IS_PCI) | 3934 | if (rdev->flags & RADEON_IS_PCI) |
3933 | r100_pci_gart_disable(rdev); | 3935 | r100_pci_gart_disable(rdev); |
@@ -3947,7 +3949,11 @@ int r100_resume(struct radeon_device *rdev) | |||
3947 | radeon_surface_init(rdev); | 3949 | radeon_surface_init(rdev); |
3948 | 3950 | ||
3949 | rdev->accel_working = true; | 3951 | rdev->accel_working = true; |
3950 | return r100_startup(rdev); | 3952 | r = r100_startup(rdev); |
3953 | if (r) { | ||
3954 | rdev->accel_working = false; | ||
3955 | } | ||
3956 | return r; | ||
3951 | } | 3957 | } |
3952 | 3958 | ||
3953 | int r100_suspend(struct radeon_device *rdev) | 3959 | int r100_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index 3fc0d29a5f39..6829638cca40 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -1431,6 +1431,8 @@ static int r300_startup(struct radeon_device *rdev) | |||
1431 | 1431 | ||
1432 | int r300_resume(struct radeon_device *rdev) | 1432 | int r300_resume(struct radeon_device *rdev) |
1433 | { | 1433 | { |
1434 | int r; | ||
1435 | |||
1434 | /* Make sur GART are not working */ | 1436 | /* Make sur GART are not working */ |
1435 | if (rdev->flags & RADEON_IS_PCIE) | 1437 | if (rdev->flags & RADEON_IS_PCIE) |
1436 | rv370_pcie_gart_disable(rdev); | 1438 | rv370_pcie_gart_disable(rdev); |
@@ -1452,7 +1454,11 @@ int r300_resume(struct radeon_device *rdev) | |||
1452 | radeon_surface_init(rdev); | 1454 | radeon_surface_init(rdev); |
1453 | 1455 | ||
1454 | rdev->accel_working = true; | 1456 | rdev->accel_working = true; |
1455 | return r300_startup(rdev); | 1457 | r = r300_startup(rdev); |
1458 | if (r) { | ||
1459 | rdev->accel_working = false; | ||
1460 | } | ||
1461 | return r; | ||
1456 | } | 1462 | } |
1457 | 1463 | ||
1458 | int r300_suspend(struct radeon_device *rdev) | 1464 | int r300_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c index 666e28fe509c..b14323053bad 100644 --- a/drivers/gpu/drm/radeon/r420.c +++ b/drivers/gpu/drm/radeon/r420.c | |||
@@ -291,6 +291,8 @@ static int r420_startup(struct radeon_device *rdev) | |||
291 | 291 | ||
292 | int r420_resume(struct radeon_device *rdev) | 292 | int r420_resume(struct radeon_device *rdev) |
293 | { | 293 | { |
294 | int r; | ||
295 | |||
294 | /* Make sur GART are not working */ | 296 | /* Make sur GART are not working */ |
295 | if (rdev->flags & RADEON_IS_PCIE) | 297 | if (rdev->flags & RADEON_IS_PCIE) |
296 | rv370_pcie_gart_disable(rdev); | 298 | rv370_pcie_gart_disable(rdev); |
@@ -316,7 +318,11 @@ int r420_resume(struct radeon_device *rdev) | |||
316 | radeon_surface_init(rdev); | 318 | radeon_surface_init(rdev); |
317 | 319 | ||
318 | rdev->accel_working = true; | 320 | rdev->accel_working = true; |
319 | return r420_startup(rdev); | 321 | r = r420_startup(rdev); |
322 | if (r) { | ||
323 | rdev->accel_working = false; | ||
324 | } | ||
325 | return r; | ||
320 | } | 326 | } |
321 | 327 | ||
322 | int r420_suspend(struct radeon_device *rdev) | 328 | int r420_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r520.c b/drivers/gpu/drm/radeon/r520.c index 4ae1615e752f..25084e824dbc 100644 --- a/drivers/gpu/drm/radeon/r520.c +++ b/drivers/gpu/drm/radeon/r520.c | |||
@@ -218,6 +218,8 @@ static int r520_startup(struct radeon_device *rdev) | |||
218 | 218 | ||
219 | int r520_resume(struct radeon_device *rdev) | 219 | int r520_resume(struct radeon_device *rdev) |
220 | { | 220 | { |
221 | int r; | ||
222 | |||
221 | /* Make sur GART are not working */ | 223 | /* Make sur GART are not working */ |
222 | if (rdev->flags & RADEON_IS_PCIE) | 224 | if (rdev->flags & RADEON_IS_PCIE) |
223 | rv370_pcie_gart_disable(rdev); | 225 | rv370_pcie_gart_disable(rdev); |
@@ -237,7 +239,11 @@ int r520_resume(struct radeon_device *rdev) | |||
237 | radeon_surface_init(rdev); | 239 | radeon_surface_init(rdev); |
238 | 240 | ||
239 | rdev->accel_working = true; | 241 | rdev->accel_working = true; |
240 | return r520_startup(rdev); | 242 | r = r520_startup(rdev); |
243 | if (r) { | ||
244 | rdev->accel_working = false; | ||
245 | } | ||
246 | return r; | ||
241 | } | 247 | } |
242 | 248 | ||
243 | int r520_init(struct radeon_device *rdev) | 249 | int r520_init(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 4f08e5e6ee9d..fbcd84803b60 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -2529,6 +2529,7 @@ int r600_resume(struct radeon_device *rdev) | |||
2529 | r = r600_startup(rdev); | 2529 | r = r600_startup(rdev); |
2530 | if (r) { | 2530 | if (r) { |
2531 | DRM_ERROR("r600 startup failed on resume\n"); | 2531 | DRM_ERROR("r600 startup failed on resume\n"); |
2532 | rdev->accel_working = false; | ||
2532 | return r; | 2533 | return r; |
2533 | } | 2534 | } |
2534 | 2535 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 9e72daeeddc6..1f53ae74ada1 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -3020,6 +3020,9 @@ radeon_atombios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on) | |||
3020 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 3020 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
3021 | uint32_t bios_2_scratch; | 3021 | uint32_t bios_2_scratch; |
3022 | 3022 | ||
3023 | if (ASIC_IS_DCE4(rdev)) | ||
3024 | return; | ||
3025 | |||
3023 | if (rdev->family >= CHIP_R600) | 3026 | if (rdev->family >= CHIP_R600) |
3024 | bios_2_scratch = RREG32(R600_BIOS_2_SCRATCH); | 3027 | bios_2_scratch = RREG32(R600_BIOS_2_SCRATCH); |
3025 | else | 3028 | else |
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 435a3d970ab8..e64bec488ed8 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c | |||
@@ -453,6 +453,10 @@ int radeon_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp) | |||
453 | int r; | 453 | int r; |
454 | 454 | ||
455 | radeon_mutex_lock(&rdev->cs_mutex); | 455 | radeon_mutex_lock(&rdev->cs_mutex); |
456 | if (!rdev->accel_working) { | ||
457 | radeon_mutex_unlock(&rdev->cs_mutex); | ||
458 | return -EBUSY; | ||
459 | } | ||
456 | /* initialize parser */ | 460 | /* initialize parser */ |
457 | memset(&parser, 0, sizeof(struct radeon_cs_parser)); | 461 | memset(&parser, 0, sizeof(struct radeon_cs_parser)); |
458 | parser.filp = filp; | 462 | parser.filp = filp; |
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 30a4c5014c8b..92c9ea4751fb 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c | |||
@@ -500,8 +500,11 @@ static char radeon_debugfs_ib_names[RADEON_IB_POOL_SIZE][32]; | |||
500 | int radeon_debugfs_ring_init(struct radeon_device *rdev) | 500 | int radeon_debugfs_ring_init(struct radeon_device *rdev) |
501 | { | 501 | { |
502 | #if defined(CONFIG_DEBUG_FS) | 502 | #if defined(CONFIG_DEBUG_FS) |
503 | return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list, | 503 | if (rdev->family >= CHIP_CAYMAN) |
504 | ARRAY_SIZE(radeon_debugfs_ring_info_list)); | 504 | return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list, |
505 | ARRAY_SIZE(radeon_debugfs_ring_info_list)); | ||
506 | else | ||
507 | return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list, 1); | ||
505 | #else | 508 | #else |
506 | return 0; | 509 | return 0; |
507 | #endif | 510 | #endif |
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index b0ce84a20a68..866a05be75f2 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c | |||
@@ -442,6 +442,8 @@ static int rs400_startup(struct radeon_device *rdev) | |||
442 | 442 | ||
443 | int rs400_resume(struct radeon_device *rdev) | 443 | int rs400_resume(struct radeon_device *rdev) |
444 | { | 444 | { |
445 | int r; | ||
446 | |||
445 | /* Make sur GART are not working */ | 447 | /* Make sur GART are not working */ |
446 | rs400_gart_disable(rdev); | 448 | rs400_gart_disable(rdev); |
447 | /* Resume clock before doing reset */ | 449 | /* Resume clock before doing reset */ |
@@ -462,7 +464,11 @@ int rs400_resume(struct radeon_device *rdev) | |||
462 | radeon_surface_init(rdev); | 464 | radeon_surface_init(rdev); |
463 | 465 | ||
464 | rdev->accel_working = true; | 466 | rdev->accel_working = true; |
465 | return rs400_startup(rdev); | 467 | r = rs400_startup(rdev); |
468 | if (r) { | ||
469 | rdev->accel_working = false; | ||
470 | } | ||
471 | return r; | ||
466 | } | 472 | } |
467 | 473 | ||
468 | int rs400_suspend(struct radeon_device *rdev) | 474 | int rs400_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index c05865e5521f..4fc700684dcd 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c | |||
@@ -876,6 +876,8 @@ static int rs600_startup(struct radeon_device *rdev) | |||
876 | 876 | ||
877 | int rs600_resume(struct radeon_device *rdev) | 877 | int rs600_resume(struct radeon_device *rdev) |
878 | { | 878 | { |
879 | int r; | ||
880 | |||
879 | /* Make sur GART are not working */ | 881 | /* Make sur GART are not working */ |
880 | rs600_gart_disable(rdev); | 882 | rs600_gart_disable(rdev); |
881 | /* Resume clock before doing reset */ | 883 | /* Resume clock before doing reset */ |
@@ -894,7 +896,11 @@ int rs600_resume(struct radeon_device *rdev) | |||
894 | radeon_surface_init(rdev); | 896 | radeon_surface_init(rdev); |
895 | 897 | ||
896 | rdev->accel_working = true; | 898 | rdev->accel_working = true; |
897 | return rs600_startup(rdev); | 899 | r = rs600_startup(rdev); |
900 | if (r) { | ||
901 | rdev->accel_working = false; | ||
902 | } | ||
903 | return r; | ||
898 | } | 904 | } |
899 | 905 | ||
900 | int rs600_suspend(struct radeon_device *rdev) | 906 | int rs600_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c index 4f24a0fa8c82..f68dff2fadcb 100644 --- a/drivers/gpu/drm/radeon/rs690.c +++ b/drivers/gpu/drm/radeon/rs690.c | |||
@@ -659,6 +659,8 @@ static int rs690_startup(struct radeon_device *rdev) | |||
659 | 659 | ||
660 | int rs690_resume(struct radeon_device *rdev) | 660 | int rs690_resume(struct radeon_device *rdev) |
661 | { | 661 | { |
662 | int r; | ||
663 | |||
662 | /* Make sur GART are not working */ | 664 | /* Make sur GART are not working */ |
663 | rs400_gart_disable(rdev); | 665 | rs400_gart_disable(rdev); |
664 | /* Resume clock before doing reset */ | 666 | /* Resume clock before doing reset */ |
@@ -677,7 +679,11 @@ int rs690_resume(struct radeon_device *rdev) | |||
677 | radeon_surface_init(rdev); | 679 | radeon_surface_init(rdev); |
678 | 680 | ||
679 | rdev->accel_working = true; | 681 | rdev->accel_working = true; |
680 | return rs690_startup(rdev); | 682 | r = rs690_startup(rdev); |
683 | if (r) { | ||
684 | rdev->accel_working = false; | ||
685 | } | ||
686 | return r; | ||
681 | } | 687 | } |
682 | 688 | ||
683 | int rs690_suspend(struct radeon_device *rdev) | 689 | int rs690_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c index 880637fd1946..959bf4483bea 100644 --- a/drivers/gpu/drm/radeon/rv515.c +++ b/drivers/gpu/drm/radeon/rv515.c | |||
@@ -424,6 +424,8 @@ static int rv515_startup(struct radeon_device *rdev) | |||
424 | 424 | ||
425 | int rv515_resume(struct radeon_device *rdev) | 425 | int rv515_resume(struct radeon_device *rdev) |
426 | { | 426 | { |
427 | int r; | ||
428 | |||
427 | /* Make sur GART are not working */ | 429 | /* Make sur GART are not working */ |
428 | if (rdev->flags & RADEON_IS_PCIE) | 430 | if (rdev->flags & RADEON_IS_PCIE) |
429 | rv370_pcie_gart_disable(rdev); | 431 | rv370_pcie_gart_disable(rdev); |
@@ -443,7 +445,11 @@ int rv515_resume(struct radeon_device *rdev) | |||
443 | radeon_surface_init(rdev); | 445 | radeon_surface_init(rdev); |
444 | 446 | ||
445 | rdev->accel_working = true; | 447 | rdev->accel_working = true; |
446 | return rv515_startup(rdev); | 448 | r = rv515_startup(rdev); |
449 | if (r) { | ||
450 | rdev->accel_working = false; | ||
451 | } | ||
452 | return r; | ||
447 | } | 453 | } |
448 | 454 | ||
449 | int rv515_suspend(struct radeon_device *rdev) | 455 | int rv515_suspend(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index a1668b659ddd..c049c0c51841 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -1139,6 +1139,7 @@ int rv770_resume(struct radeon_device *rdev) | |||
1139 | r = rv770_startup(rdev); | 1139 | r = rv770_startup(rdev); |
1140 | if (r) { | 1140 | if (r) { |
1141 | DRM_ERROR("r600 startup failed on resume\n"); | 1141 | DRM_ERROR("r600 startup failed on resume\n"); |
1142 | rdev->accel_working = false; | ||
1142 | return r; | 1143 | return r; |
1143 | } | 1144 | } |
1144 | 1145 | ||
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index d136b8f4c8a7..81e2c0d9c17d 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -187,7 +187,10 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
187 | return -ENODEV; | 187 | return -ENODEV; |
188 | dev->current_state = PCI_D0; | 188 | dev->current_state = PCI_D0; |
189 | 189 | ||
190 | if (!dev->irq) { | 190 | /* The xHCI driver supports MSI and MSI-X, |
191 | * so don't fail if the BIOS doesn't provide a legacy IRQ. | ||
192 | */ | ||
193 | if (!dev->irq && (driver->flags & HCD_MASK) != HCD_USB3) { | ||
191 | dev_err(&dev->dev, | 194 | dev_err(&dev->dev, |
192 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", | 195 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", |
193 | pci_name(dev)); | 196 | pci_name(dev)); |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index eb19cba34ac9..e1282328fc27 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -2447,8 +2447,10 @@ int usb_add_hcd(struct usb_hcd *hcd, | |||
2447 | && device_can_wakeup(&hcd->self.root_hub->dev)) | 2447 | && device_can_wakeup(&hcd->self.root_hub->dev)) |
2448 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); | 2448 | dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); |
2449 | 2449 | ||
2450 | /* enable irqs just before we start the controller */ | 2450 | /* enable irqs just before we start the controller, |
2451 | if (usb_hcd_is_primary_hcd(hcd)) { | 2451 | * if the BIOS provides legacy PCI irqs. |
2452 | */ | ||
2453 | if (usb_hcd_is_primary_hcd(hcd) && irqnum) { | ||
2452 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); | 2454 | retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); |
2453 | if (retval) | 2455 | if (retval) |
2454 | goto err_request_irq; | 2456 | goto err_request_irq; |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index a0613d8f9be7..265c2f675d04 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -705,10 +705,26 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) | |||
705 | if (type == HUB_INIT3) | 705 | if (type == HUB_INIT3) |
706 | goto init3; | 706 | goto init3; |
707 | 707 | ||
708 | /* After a resume, port power should still be on. | 708 | /* The superspeed hub except for root hub has to use Hub Depth |
709 | * value as an offset into the route string to locate the bits | ||
710 | * it uses to determine the downstream port number. So hub driver | ||
711 | * should send a set hub depth request to superspeed hub after | ||
712 | * the superspeed hub is set configuration in initialization or | ||
713 | * reset procedure. | ||
714 | * | ||
715 | * After a resume, port power should still be on. | ||
709 | * For any other type of activation, turn it on. | 716 | * For any other type of activation, turn it on. |
710 | */ | 717 | */ |
711 | if (type != HUB_RESUME) { | 718 | if (type != HUB_RESUME) { |
719 | if (hdev->parent && hub_is_superspeed(hdev)) { | ||
720 | ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
721 | HUB_SET_DEPTH, USB_RT_HUB, | ||
722 | hdev->level - 1, 0, NULL, 0, | ||
723 | USB_CTRL_SET_TIMEOUT); | ||
724 | if (ret < 0) | ||
725 | dev_err(hub->intfdev, | ||
726 | "set hub depth failed\n"); | ||
727 | } | ||
712 | 728 | ||
713 | /* Speed up system boot by using a delayed_work for the | 729 | /* Speed up system boot by using a delayed_work for the |
714 | * hub's initial power-up delays. This is pretty awkward | 730 | * hub's initial power-up delays. This is pretty awkward |
@@ -987,18 +1003,6 @@ static int hub_configure(struct usb_hub *hub, | |||
987 | goto fail; | 1003 | goto fail; |
988 | } | 1004 | } |
989 | 1005 | ||
990 | if (hub_is_superspeed(hdev) && (hdev->parent != NULL)) { | ||
991 | ret = usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0), | ||
992 | HUB_SET_DEPTH, USB_RT_HUB, | ||
993 | hdev->level - 1, 0, NULL, 0, | ||
994 | USB_CTRL_SET_TIMEOUT); | ||
995 | |||
996 | if (ret < 0) { | ||
997 | message = "can't set hub depth"; | ||
998 | goto fail; | ||
999 | } | ||
1000 | } | ||
1001 | |||
1002 | /* Request the entire hub descriptor. | 1006 | /* Request the entire hub descriptor. |
1003 | * hub->descriptor can handle USB_MAXCHILDREN ports, | 1007 | * hub->descriptor can handle USB_MAXCHILDREN ports, |
1004 | * but the hub can/will return fewer bytes here. | 1008 | * but the hub can/will return fewer bytes here. |
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index ac53a662a6a3..7732d69e49e0 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -872,7 +872,17 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) | |||
872 | */ | 872 | */ |
873 | if (pdev->vendor == 0x184e) /* vendor Netlogic */ | 873 | if (pdev->vendor == 0x184e) /* vendor Netlogic */ |
874 | return; | 874 | return; |
875 | if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI && | ||
876 | pdev->class != PCI_CLASS_SERIAL_USB_OHCI && | ||
877 | pdev->class != PCI_CLASS_SERIAL_USB_EHCI && | ||
878 | pdev->class != PCI_CLASS_SERIAL_USB_XHCI) | ||
879 | return; | ||
875 | 880 | ||
881 | if (pci_enable_device(pdev) < 0) { | ||
882 | dev_warn(&pdev->dev, "Can't enable PCI device, " | ||
883 | "BIOS handoff failed.\n"); | ||
884 | return; | ||
885 | } | ||
876 | if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) | 886 | if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI) |
877 | quirk_usb_handoff_uhci(pdev); | 887 | quirk_usb_handoff_uhci(pdev); |
878 | else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) | 888 | else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI) |
@@ -881,5 +891,6 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev) | |||
881 | quirk_usb_disable_ehci(pdev); | 891 | quirk_usb_disable_ehci(pdev); |
882 | else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) | 892 | else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) |
883 | quirk_usb_handoff_xhci(pdev); | 893 | quirk_usb_handoff_xhci(pdev); |
894 | pci_disable_device(pdev); | ||
884 | } | 895 | } |
885 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); | 896 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 35e257f79c7b..557b6f32db86 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -93,7 +93,7 @@ static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, | |||
93 | */ | 93 | */ |
94 | memset(port_removable, 0, sizeof(port_removable)); | 94 | memset(port_removable, 0, sizeof(port_removable)); |
95 | for (i = 0; i < ports; i++) { | 95 | for (i = 0; i < ports; i++) { |
96 | portsc = xhci_readl(xhci, xhci->usb3_ports[i]); | 96 | portsc = xhci_readl(xhci, xhci->usb2_ports[i]); |
97 | /* If a device is removable, PORTSC reports a 0, same as in the | 97 | /* If a device is removable, PORTSC reports a 0, same as in the |
98 | * hub descriptor DeviceRemovable bits. | 98 | * hub descriptor DeviceRemovable bits. |
99 | */ | 99 | */ |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 36cbe2226a44..383fc857491c 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -1126,26 +1126,42 @@ static unsigned int xhci_parse_exponent_interval(struct usb_device *udev, | |||
1126 | } | 1126 | } |
1127 | 1127 | ||
1128 | /* | 1128 | /* |
1129 | * Convert bInterval expressed in frames (in 1-255 range) to exponent of | 1129 | * Convert bInterval expressed in microframes (in 1-255 range) to exponent of |
1130 | * microframes, rounded down to nearest power of 2. | 1130 | * microframes, rounded down to nearest power of 2. |
1131 | */ | 1131 | */ |
1132 | static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | 1132 | static unsigned int xhci_microframes_to_exponent(struct usb_device *udev, |
1133 | struct usb_host_endpoint *ep) | 1133 | struct usb_host_endpoint *ep, unsigned int desc_interval, |
1134 | unsigned int min_exponent, unsigned int max_exponent) | ||
1134 | { | 1135 | { |
1135 | unsigned int interval; | 1136 | unsigned int interval; |
1136 | 1137 | ||
1137 | interval = fls(8 * ep->desc.bInterval) - 1; | 1138 | interval = fls(desc_interval) - 1; |
1138 | interval = clamp_val(interval, 3, 10); | 1139 | interval = clamp_val(interval, min_exponent, max_exponent); |
1139 | if ((1 << interval) != 8 * ep->desc.bInterval) | 1140 | if ((1 << interval) != desc_interval) |
1140 | dev_warn(&udev->dev, | 1141 | dev_warn(&udev->dev, |
1141 | "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", | 1142 | "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n", |
1142 | ep->desc.bEndpointAddress, | 1143 | ep->desc.bEndpointAddress, |
1143 | 1 << interval, | 1144 | 1 << interval, |
1144 | 8 * ep->desc.bInterval); | 1145 | desc_interval); |
1145 | 1146 | ||
1146 | return interval; | 1147 | return interval; |
1147 | } | 1148 | } |
1148 | 1149 | ||
1150 | static unsigned int xhci_parse_microframe_interval(struct usb_device *udev, | ||
1151 | struct usb_host_endpoint *ep) | ||
1152 | { | ||
1153 | return xhci_microframes_to_exponent(udev, ep, | ||
1154 | ep->desc.bInterval, 0, 15); | ||
1155 | } | ||
1156 | |||
1157 | |||
1158 | static unsigned int xhci_parse_frame_interval(struct usb_device *udev, | ||
1159 | struct usb_host_endpoint *ep) | ||
1160 | { | ||
1161 | return xhci_microframes_to_exponent(udev, ep, | ||
1162 | ep->desc.bInterval * 8, 3, 10); | ||
1163 | } | ||
1164 | |||
1149 | /* Return the polling or NAK interval. | 1165 | /* Return the polling or NAK interval. |
1150 | * | 1166 | * |
1151 | * The polling interval is expressed in "microframes". If xHCI's Interval field | 1167 | * The polling interval is expressed in "microframes". If xHCI's Interval field |
@@ -1164,7 +1180,7 @@ static unsigned int xhci_get_endpoint_interval(struct usb_device *udev, | |||
1164 | /* Max NAK rate */ | 1180 | /* Max NAK rate */ |
1165 | if (usb_endpoint_xfer_control(&ep->desc) || | 1181 | if (usb_endpoint_xfer_control(&ep->desc) || |
1166 | usb_endpoint_xfer_bulk(&ep->desc)) { | 1182 | usb_endpoint_xfer_bulk(&ep->desc)) { |
1167 | interval = ep->desc.bInterval; | 1183 | interval = xhci_parse_microframe_interval(udev, ep); |
1168 | break; | 1184 | break; |
1169 | } | 1185 | } |
1170 | /* Fall through - SS and HS isoc/int have same decoding */ | 1186 | /* Fall through - SS and HS isoc/int have same decoding */ |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6bbe3c3a7111..c939f5fdef9e 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -352,6 +352,11 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd) | |||
352 | /* hcd->irq is -1, we have MSI */ | 352 | /* hcd->irq is -1, we have MSI */ |
353 | return 0; | 353 | return 0; |
354 | 354 | ||
355 | if (!pdev->irq) { | ||
356 | xhci_err(xhci, "No msi-x/msi found and no IRQ in BIOS\n"); | ||
357 | return -EINVAL; | ||
358 | } | ||
359 | |||
355 | /* fall back to legacy interrupt*/ | 360 | /* fall back to legacy interrupt*/ |
356 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, | 361 | ret = request_irq(pdev->irq, &usb_hcd_irq, IRQF_SHARED, |
357 | hcd->irq_descr, hcd); | 362 | hcd->irq_descr, hcd); |
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 8dbf51a43c45..08a5575724cd 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c | |||
@@ -136,6 +136,8 @@ static const struct usb_device_id id_table[] = { | |||
136 | { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ | 136 | { USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */ |
137 | { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ | 137 | { USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */ |
138 | { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ | 138 | { USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */ |
139 | { USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */ | ||
140 | { USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */ | ||
139 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ | 141 | { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */ |
140 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ | 142 | { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */ |
141 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ | 143 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 39ed1f46cec0..b54afceb9611 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -788,7 +788,6 @@ static const struct usb_device_id option_ids[] = { | |||
788 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff), | 788 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff), |
789 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 789 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
790 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, | 790 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) }, |
791 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, | ||
792 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, | 791 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) }, |
793 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, | 792 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) }, |
794 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), | 793 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff), |
@@ -803,7 +802,6 @@ static const struct usb_device_id option_ids[] = { | |||
803 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, | 802 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) }, |
804 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), | 803 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff), |
805 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 804 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
806 | /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */ | ||
807 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, | 805 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) }, |
808 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, | 806 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) }, |
809 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, | 807 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) }, |
@@ -828,7 +826,6 @@ static const struct usb_device_id option_ids[] = { | |||
828 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, | 826 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) }, |
829 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), | 827 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff), |
830 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 828 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
831 | /* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */ | ||
832 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, | 829 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) }, |
833 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), | 830 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff), |
834 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, | 831 | .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, |
@@ -836,7 +833,6 @@ static const struct usb_device_id option_ids[] = { | |||
836 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, | 833 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) }, |
837 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), | 834 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff), |
838 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 835 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
839 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | ||
840 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, | 836 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) }, |
841 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, | 837 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) }, |
842 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff), | 838 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff), |
@@ -846,7 +842,6 @@ static const struct usb_device_id option_ids[] = { | |||
846 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, | 842 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) }, |
847 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, | 843 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) }, |
848 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, | 844 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) }, |
849 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | ||
850 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, | 845 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) }, |
851 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, | 846 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) }, |
852 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, | 847 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) }, |
@@ -865,8 +860,6 @@ static const struct usb_device_id option_ids[] = { | |||
865 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0095, 0xff, 0xff, 0xff) }, | 860 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0095, 0xff, 0xff, 0xff) }, |
866 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) }, | 861 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0096, 0xff, 0xff, 0xff) }, |
867 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) }, | 862 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0097, 0xff, 0xff, 0xff) }, |
868 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0098, 0xff, 0xff, 0xff) }, | ||
869 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0099, 0xff, 0xff, 0xff) }, | ||
870 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), | 863 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff), |
871 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, | 864 | .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, |
872 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, | 865 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) }, |
@@ -887,28 +880,18 @@ static const struct usb_device_id option_ids[] = { | |||
887 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) }, | 880 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0143, 0xff, 0xff, 0xff) }, |
888 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) }, | 881 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0144, 0xff, 0xff, 0xff) }, |
889 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) }, | 882 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0145, 0xff, 0xff, 0xff) }, |
890 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0146, 0xff, 0xff, 0xff) }, | ||
891 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, | ||
892 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) }, | 883 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0148, 0xff, 0xff, 0xff) }, |
893 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0149, 0xff, 0xff, 0xff) }, | ||
894 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0150, 0xff, 0xff, 0xff) }, | ||
895 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) }, | 884 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0151, 0xff, 0xff, 0xff) }, |
896 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, | ||
897 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) }, | 885 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0153, 0xff, 0xff, 0xff) }, |
898 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) }, | 886 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0155, 0xff, 0xff, 0xff) }, |
899 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) }, | 887 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0156, 0xff, 0xff, 0xff) }, |
900 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff) }, | 888 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0157, 0xff, 0xff, 0xff) }, |
901 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) }, | 889 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0158, 0xff, 0xff, 0xff) }, |
902 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) }, | 890 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0159, 0xff, 0xff, 0xff) }, |
903 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0160, 0xff, 0xff, 0xff) }, | ||
904 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, | 891 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) }, |
905 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, | 892 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) }, |
906 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) }, | 893 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0164, 0xff, 0xff, 0xff) }, |
907 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, | 894 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0165, 0xff, 0xff, 0xff) }, |
908 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, | ||
909 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, | ||
910 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, | ||
911 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, | ||
912 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, | 895 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) }, |
913 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, | 896 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) }, |
914 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, | 897 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) }, |
@@ -1083,127 +1066,27 @@ static const struct usb_device_id option_ids[] = { | |||
1083 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, | 1066 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) }, |
1084 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, | 1067 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) }, |
1085 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, | 1068 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) }, |
1086 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1401, 0xff, 0xff, 0xff) }, | 1069 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, |
1087 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1402, 0xff, 0xff, 0xff) }, | 1070 | 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, |
1088 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1403, 0xff, 0xff, 0xff) }, | 1071 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, |
1089 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1404, 0xff, 0xff, 0xff) }, | 1072 | |
1090 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1405, 0xff, 0xff, 0xff) }, | ||
1091 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1406, 0xff, 0xff, 0xff) }, | ||
1092 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1407, 0xff, 0xff, 0xff) }, | ||
1093 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1408, 0xff, 0xff, 0xff) }, | ||
1094 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1409, 0xff, 0xff, 0xff) }, | ||
1095 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1410, 0xff, 0xff, 0xff) }, | ||
1096 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1411, 0xff, 0xff, 0xff) }, | ||
1097 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1412, 0xff, 0xff, 0xff) }, | ||
1098 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1413, 0xff, 0xff, 0xff) }, | ||
1099 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1414, 0xff, 0xff, 0xff) }, | ||
1100 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1415, 0xff, 0xff, 0xff) }, | ||
1101 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1416, 0xff, 0xff, 0xff) }, | ||
1102 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1417, 0xff, 0xff, 0xff) }, | ||
1103 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1418, 0xff, 0xff, 0xff) }, | ||
1104 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1419, 0xff, 0xff, 0xff) }, | ||
1105 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1420, 0xff, 0xff, 0xff) }, | ||
1106 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1421, 0xff, 0xff, 0xff) }, | ||
1107 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1422, 0xff, 0xff, 0xff) }, | ||
1108 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1423, 0xff, 0xff, 0xff) }, | ||
1109 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1424, 0xff, 0xff, 0xff) }, | ||
1110 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1425, 0xff, 0xff, 0xff) }, | ||
1111 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1426, 0xff, 0xff, 0xff) }, | ||
1112 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1427, 0xff, 0xff, 0xff) }, | ||
1113 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff) }, | ||
1114 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1429, 0xff, 0xff, 0xff) }, | ||
1115 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1430, 0xff, 0xff, 0xff) }, | ||
1116 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1431, 0xff, 0xff, 0xff) }, | ||
1117 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1432, 0xff, 0xff, 0xff) }, | ||
1118 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1433, 0xff, 0xff, 0xff) }, | ||
1119 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1434, 0xff, 0xff, 0xff) }, | ||
1120 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1435, 0xff, 0xff, 0xff) }, | ||
1121 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1436, 0xff, 0xff, 0xff) }, | ||
1122 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1437, 0xff, 0xff, 0xff) }, | ||
1123 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1438, 0xff, 0xff, 0xff) }, | ||
1124 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1439, 0xff, 0xff, 0xff) }, | ||
1125 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1440, 0xff, 0xff, 0xff) }, | ||
1126 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1441, 0xff, 0xff, 0xff) }, | ||
1127 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1442, 0xff, 0xff, 0xff) }, | ||
1128 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1443, 0xff, 0xff, 0xff) }, | ||
1129 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1444, 0xff, 0xff, 0xff) }, | ||
1130 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1445, 0xff, 0xff, 0xff) }, | ||
1131 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1446, 0xff, 0xff, 0xff) }, | ||
1132 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1447, 0xff, 0xff, 0xff) }, | ||
1133 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1448, 0xff, 0xff, 0xff) }, | ||
1134 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1449, 0xff, 0xff, 0xff) }, | ||
1135 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1450, 0xff, 0xff, 0xff) }, | ||
1136 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1451, 0xff, 0xff, 0xff) }, | ||
1137 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1452, 0xff, 0xff, 0xff) }, | ||
1138 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1453, 0xff, 0xff, 0xff) }, | ||
1139 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1454, 0xff, 0xff, 0xff) }, | ||
1140 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1455, 0xff, 0xff, 0xff) }, | ||
1141 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1456, 0xff, 0xff, 0xff) }, | ||
1142 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1457, 0xff, 0xff, 0xff) }, | ||
1143 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1458, 0xff, 0xff, 0xff) }, | ||
1144 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1459, 0xff, 0xff, 0xff) }, | ||
1145 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1460, 0xff, 0xff, 0xff) }, | ||
1146 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1461, 0xff, 0xff, 0xff) }, | ||
1147 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1462, 0xff, 0xff, 0xff) }, | ||
1148 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1463, 0xff, 0xff, 0xff) }, | ||
1149 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1464, 0xff, 0xff, 0xff) }, | ||
1150 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1465, 0xff, 0xff, 0xff) }, | ||
1151 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1466, 0xff, 0xff, 0xff) }, | ||
1152 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1467, 0xff, 0xff, 0xff) }, | ||
1153 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1468, 0xff, 0xff, 0xff) }, | ||
1154 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1469, 0xff, 0xff, 0xff) }, | ||
1155 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1470, 0xff, 0xff, 0xff) }, | ||
1156 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1471, 0xff, 0xff, 0xff) }, | ||
1157 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1472, 0xff, 0xff, 0xff) }, | ||
1158 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1473, 0xff, 0xff, 0xff) }, | ||
1159 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1474, 0xff, 0xff, 0xff) }, | ||
1160 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1475, 0xff, 0xff, 0xff) }, | ||
1161 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1476, 0xff, 0xff, 0xff) }, | ||
1162 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1477, 0xff, 0xff, 0xff) }, | ||
1163 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1478, 0xff, 0xff, 0xff) }, | ||
1164 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1479, 0xff, 0xff, 0xff) }, | ||
1165 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1480, 0xff, 0xff, 0xff) }, | ||
1166 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0xff, 0xff) }, | ||
1167 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1482, 0xff, 0xff, 0xff) }, | ||
1168 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1483, 0xff, 0xff, 0xff) }, | ||
1169 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1484, 0xff, 0xff, 0xff) }, | ||
1170 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1485, 0xff, 0xff, 0xff) }, | ||
1171 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1486, 0xff, 0xff, 0xff) }, | ||
1172 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1487, 0xff, 0xff, 0xff) }, | ||
1173 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1488, 0xff, 0xff, 0xff) }, | ||
1174 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1489, 0xff, 0xff, 0xff) }, | ||
1175 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1490, 0xff, 0xff, 0xff) }, | ||
1176 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1491, 0xff, 0xff, 0xff) }, | ||
1177 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1492, 0xff, 0xff, 0xff) }, | ||
1178 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1493, 0xff, 0xff, 0xff) }, | ||
1179 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1494, 0xff, 0xff, 0xff) }, | ||
1180 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1495, 0xff, 0xff, 0xff) }, | ||
1181 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1496, 0xff, 0xff, 0xff) }, | ||
1182 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1497, 0xff, 0xff, 0xff) }, | ||
1183 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1498, 0xff, 0xff, 0xff) }, | ||
1184 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1499, 0xff, 0xff, 0xff) }, | ||
1185 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1500, 0xff, 0xff, 0xff) }, | ||
1186 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1501, 0xff, 0xff, 0xff) }, | ||
1187 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1502, 0xff, 0xff, 0xff) }, | ||
1188 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1503, 0xff, 0xff, 0xff) }, | ||
1189 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1504, 0xff, 0xff, 0xff) }, | ||
1190 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1505, 0xff, 0xff, 0xff) }, | ||
1191 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1506, 0xff, 0xff, 0xff) }, | ||
1192 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1507, 0xff, 0xff, 0xff) }, | ||
1193 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1508, 0xff, 0xff, 0xff) }, | ||
1194 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1509, 0xff, 0xff, 0xff) }, | ||
1195 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1510, 0xff, 0xff, 0xff) }, | ||
1196 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ | 1073 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */ |
1197 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, | 1074 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) }, |
1198 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, | 1075 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) }, |
1199 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, | 1076 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0060, 0xff, 0xff, 0xff) }, |
1200 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, | 1077 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) }, |
1201 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, | 1078 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) }, |
1079 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0094, 0xff, 0xff, 0xff) }, | ||
1202 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, | 1080 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) }, |
1081 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0133, 0xff, 0xff, 0xff) }, | ||
1203 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, | 1082 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) }, |
1204 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, | 1083 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0147, 0xff, 0xff, 0xff) }, |
1205 | 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_k3765_z_blacklist }, | 1084 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0152, 0xff, 0xff, 0xff) }, |
1206 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) }, | 1085 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0168, 0xff, 0xff, 0xff) }, |
1086 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0170, 0xff, 0xff, 0xff) }, | ||
1087 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0176, 0xff, 0xff, 0xff) }, | ||
1088 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff) }, | ||
1089 | |||
1207 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, | 1090 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) }, |
1208 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, | 1091 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) }, |
1209 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, | 1092 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) }, |
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 8468eb769a29..75b838eff178 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -165,7 +165,7 @@ static unsigned int product_5052_count; | |||
165 | /* the array dimension is the number of default entries plus */ | 165 | /* the array dimension is the number of default entries plus */ |
166 | /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ | 166 | /* TI_EXTRA_VID_PID_COUNT user defined entries plus 1 terminating */ |
167 | /* null entry */ | 167 | /* null entry */ |
168 | static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { | 168 | static struct usb_device_id ti_id_table_3410[14+TI_EXTRA_VID_PID_COUNT+1] = { |
169 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, | 169 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, |
170 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, | 170 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, |
171 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, | 171 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, |
@@ -179,6 +179,7 @@ static struct usb_device_id ti_id_table_3410[13+TI_EXTRA_VID_PID_COUNT+1] = { | |||
179 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | 179 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
180 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | 180 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
181 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | 181 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
182 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | ||
182 | }; | 183 | }; |
183 | 184 | ||
184 | static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { | 185 | static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { |
@@ -188,7 +189,7 @@ static struct usb_device_id ti_id_table_5052[5+TI_EXTRA_VID_PID_COUNT+1] = { | |||
188 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, | 189 | { USB_DEVICE(TI_VENDOR_ID, TI_5052_FIRMWARE_PRODUCT_ID) }, |
189 | }; | 190 | }; |
190 | 191 | ||
191 | static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] = { | 192 | static struct usb_device_id ti_id_table_combined[18+2*TI_EXTRA_VID_PID_COUNT+1] = { |
192 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, | 193 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_PRODUCT_ID) }, |
193 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, | 194 | { USB_DEVICE(TI_VENDOR_ID, TI_3410_EZ430_ID) }, |
194 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, | 195 | { USB_DEVICE(MTS_VENDOR_ID, MTS_GSM_NO_FW_PRODUCT_ID) }, |
@@ -206,6 +207,7 @@ static struct usb_device_id ti_id_table_combined[17+2*TI_EXTRA_VID_PID_COUNT+1] | |||
206 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, | 207 | { USB_DEVICE(IBM_VENDOR_ID, IBM_4543_PRODUCT_ID) }, |
207 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, | 208 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454B_PRODUCT_ID) }, |
208 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, | 209 | { USB_DEVICE(IBM_VENDOR_ID, IBM_454C_PRODUCT_ID) }, |
210 | { USB_DEVICE(ABBOTT_VENDOR_ID, ABBOTT_PRODUCT_ID) }, | ||
209 | { } | 211 | { } |
210 | }; | 212 | }; |
211 | 213 | ||
diff --git a/drivers/usb/serial/ti_usb_3410_5052.h b/drivers/usb/serial/ti_usb_3410_5052.h index 2aac1953993b..f140f1b9d5c0 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.h +++ b/drivers/usb/serial/ti_usb_3410_5052.h | |||
@@ -49,6 +49,10 @@ | |||
49 | #define MTS_MT9234ZBA_PRODUCT_ID 0xF115 | 49 | #define MTS_MT9234ZBA_PRODUCT_ID 0xF115 |
50 | #define MTS_MT9234ZBAOLD_PRODUCT_ID 0x0319 | 50 | #define MTS_MT9234ZBAOLD_PRODUCT_ID 0x0319 |
51 | 51 | ||
52 | /* Abbott Diabetics vendor and product ids */ | ||
53 | #define ABBOTT_VENDOR_ID 0x1a61 | ||
54 | #define ABBOTT_PRODUCT_ID 0x3410 | ||
55 | |||
52 | /* Commands */ | 56 | /* Commands */ |
53 | #define TI_GET_VERSION 0x01 | 57 | #define TI_GET_VERSION 0x01 |
54 | #define TI_GET_PORT_STATUS 0x02 | 58 | #define TI_GET_PORT_STATUS 0x02 |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 3dd7da9fd504..db51ba16dc07 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -788,15 +788,19 @@ static void quiesce_and_remove_host(struct us_data *us) | |||
788 | struct Scsi_Host *host = us_to_host(us); | 788 | struct Scsi_Host *host = us_to_host(us); |
789 | 789 | ||
790 | /* If the device is really gone, cut short reset delays */ | 790 | /* If the device is really gone, cut short reset delays */ |
791 | if (us->pusb_dev->state == USB_STATE_NOTATTACHED) | 791 | if (us->pusb_dev->state == USB_STATE_NOTATTACHED) { |
792 | set_bit(US_FLIDX_DISCONNECTING, &us->dflags); | 792 | set_bit(US_FLIDX_DISCONNECTING, &us->dflags); |
793 | wake_up(&us->delay_wait); | ||
794 | } | ||
793 | 795 | ||
794 | /* Prevent SCSI-scanning (if it hasn't started yet) | 796 | /* Prevent SCSI scanning (if it hasn't started yet) |
795 | * and wait for the SCSI-scanning thread to stop. | 797 | * or wait for the SCSI-scanning routine to stop. |
796 | */ | 798 | */ |
797 | set_bit(US_FLIDX_DONT_SCAN, &us->dflags); | 799 | cancel_delayed_work_sync(&us->scan_dwork); |
798 | wake_up(&us->delay_wait); | 800 | |
799 | wait_for_completion(&us->scanning_done); | 801 | /* Balance autopm calls if scanning was cancelled */ |
802 | if (test_bit(US_FLIDX_SCAN_PENDING, &us->dflags)) | ||
803 | usb_autopm_put_interface_no_suspend(us->pusb_intf); | ||
800 | 804 | ||
801 | /* Removing the host will perform an orderly shutdown: caches | 805 | /* Removing the host will perform an orderly shutdown: caches |
802 | * synchronized, disks spun down, etc. | 806 | * synchronized, disks spun down, etc. |
@@ -823,53 +827,28 @@ static void release_everything(struct us_data *us) | |||
823 | scsi_host_put(us_to_host(us)); | 827 | scsi_host_put(us_to_host(us)); |
824 | } | 828 | } |
825 | 829 | ||
826 | /* Thread to carry out delayed SCSI-device scanning */ | 830 | /* Delayed-work routine to carry out SCSI-device scanning */ |
827 | static int usb_stor_scan_thread(void * __us) | 831 | static void usb_stor_scan_dwork(struct work_struct *work) |
828 | { | 832 | { |
829 | struct us_data *us = (struct us_data *)__us; | 833 | struct us_data *us = container_of(work, struct us_data, |
834 | scan_dwork.work); | ||
830 | struct device *dev = &us->pusb_intf->dev; | 835 | struct device *dev = &us->pusb_intf->dev; |
831 | 836 | ||
832 | dev_dbg(dev, "device found\n"); | 837 | dev_dbg(dev, "starting scan\n"); |
833 | |||
834 | set_freezable(); | ||
835 | 838 | ||
836 | /* | 839 | /* For bulk-only devices, determine the max LUN value */ |
837 | * Wait for the timeout to expire or for a disconnect | 840 | if (us->protocol == USB_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN)) { |
838 | * | 841 | mutex_lock(&us->dev_mutex); |
839 | * We can't freeze in this thread or we risk causing khubd to | 842 | us->max_lun = usb_stor_Bulk_max_lun(us); |
840 | * fail to freeze, but we can't be non-freezable either. Nor can | 843 | mutex_unlock(&us->dev_mutex); |
841 | * khubd freeze while waiting for scanning to complete as it may | ||
842 | * hold the device lock, causing a hang when suspending devices. | ||
843 | * So instead of using wait_event_freezable(), explicitly test | ||
844 | * for (DONT_SCAN || freezing) in interruptible wait and proceed | ||
845 | * if any of DONT_SCAN, freezing or timeout has happened. | ||
846 | */ | ||
847 | if (delay_use > 0) { | ||
848 | dev_dbg(dev, "waiting for device to settle " | ||
849 | "before scanning\n"); | ||
850 | wait_event_interruptible_timeout(us->delay_wait, | ||
851 | test_bit(US_FLIDX_DONT_SCAN, &us->dflags) || | ||
852 | freezing(current), delay_use * HZ); | ||
853 | } | 844 | } |
845 | scsi_scan_host(us_to_host(us)); | ||
846 | dev_dbg(dev, "scan complete\n"); | ||
854 | 847 | ||
855 | /* If the device is still connected, perform the scanning */ | 848 | /* Should we unbind if no devices were detected? */ |
856 | if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) { | ||
857 | |||
858 | /* For bulk-only devices, determine the max LUN value */ | ||
859 | if (us->protocol == USB_PR_BULK && | ||
860 | !(us->fflags & US_FL_SINGLE_LUN)) { | ||
861 | mutex_lock(&us->dev_mutex); | ||
862 | us->max_lun = usb_stor_Bulk_max_lun(us); | ||
863 | mutex_unlock(&us->dev_mutex); | ||
864 | } | ||
865 | scsi_scan_host(us_to_host(us)); | ||
866 | dev_dbg(dev, "scan complete\n"); | ||
867 | |||
868 | /* Should we unbind if no devices were detected? */ | ||
869 | } | ||
870 | 849 | ||
871 | usb_autopm_put_interface(us->pusb_intf); | 850 | usb_autopm_put_interface(us->pusb_intf); |
872 | complete_and_exit(&us->scanning_done, 0); | 851 | clear_bit(US_FLIDX_SCAN_PENDING, &us->dflags); |
873 | } | 852 | } |
874 | 853 | ||
875 | static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf) | 854 | static unsigned int usb_stor_sg_tablesize(struct usb_interface *intf) |
@@ -916,7 +895,7 @@ int usb_stor_probe1(struct us_data **pus, | |||
916 | init_completion(&us->cmnd_ready); | 895 | init_completion(&us->cmnd_ready); |
917 | init_completion(&(us->notify)); | 896 | init_completion(&(us->notify)); |
918 | init_waitqueue_head(&us->delay_wait); | 897 | init_waitqueue_head(&us->delay_wait); |
919 | init_completion(&us->scanning_done); | 898 | INIT_DELAYED_WORK(&us->scan_dwork, usb_stor_scan_dwork); |
920 | 899 | ||
921 | /* Associate the us_data structure with the USB device */ | 900 | /* Associate the us_data structure with the USB device */ |
922 | result = associate_dev(us, intf); | 901 | result = associate_dev(us, intf); |
@@ -947,7 +926,6 @@ EXPORT_SYMBOL_GPL(usb_stor_probe1); | |||
947 | /* Second part of general USB mass-storage probing */ | 926 | /* Second part of general USB mass-storage probing */ |
948 | int usb_stor_probe2(struct us_data *us) | 927 | int usb_stor_probe2(struct us_data *us) |
949 | { | 928 | { |
950 | struct task_struct *th; | ||
951 | int result; | 929 | int result; |
952 | struct device *dev = &us->pusb_intf->dev; | 930 | struct device *dev = &us->pusb_intf->dev; |
953 | 931 | ||
@@ -988,20 +966,14 @@ int usb_stor_probe2(struct us_data *us) | |||
988 | goto BadDevice; | 966 | goto BadDevice; |
989 | } | 967 | } |
990 | 968 | ||
991 | /* Start up the thread for delayed SCSI-device scanning */ | 969 | /* Submit the delayed_work for SCSI-device scanning */ |
992 | th = kthread_create(usb_stor_scan_thread, us, "usb-stor-scan"); | ||
993 | if (IS_ERR(th)) { | ||
994 | dev_warn(dev, | ||
995 | "Unable to start the device-scanning thread\n"); | ||
996 | complete(&us->scanning_done); | ||
997 | quiesce_and_remove_host(us); | ||
998 | result = PTR_ERR(th); | ||
999 | goto BadDevice; | ||
1000 | } | ||
1001 | |||
1002 | usb_autopm_get_interface_no_resume(us->pusb_intf); | 970 | usb_autopm_get_interface_no_resume(us->pusb_intf); |
1003 | wake_up_process(th); | 971 | set_bit(US_FLIDX_SCAN_PENDING, &us->dflags); |
1004 | 972 | ||
973 | if (delay_use > 0) | ||
974 | dev_dbg(dev, "waiting for device to settle before scanning\n"); | ||
975 | queue_delayed_work(system_freezable_wq, &us->scan_dwork, | ||
976 | delay_use * HZ); | ||
1005 | return 0; | 977 | return 0; |
1006 | 978 | ||
1007 | /* We come here if there are any problems */ | 979 | /* We come here if there are any problems */ |
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index 7b0f2113632e..75f70f04f37b 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/blkdev.h> | 47 | #include <linux/blkdev.h> |
48 | #include <linux/completion.h> | 48 | #include <linux/completion.h> |
49 | #include <linux/mutex.h> | 49 | #include <linux/mutex.h> |
50 | #include <linux/workqueue.h> | ||
50 | #include <scsi/scsi_host.h> | 51 | #include <scsi/scsi_host.h> |
51 | 52 | ||
52 | struct us_data; | 53 | struct us_data; |
@@ -72,7 +73,7 @@ struct us_unusual_dev { | |||
72 | #define US_FLIDX_DISCONNECTING 3 /* disconnect in progress */ | 73 | #define US_FLIDX_DISCONNECTING 3 /* disconnect in progress */ |
73 | #define US_FLIDX_RESETTING 4 /* device reset in progress */ | 74 | #define US_FLIDX_RESETTING 4 /* device reset in progress */ |
74 | #define US_FLIDX_TIMED_OUT 5 /* SCSI midlayer timed out */ | 75 | #define US_FLIDX_TIMED_OUT 5 /* SCSI midlayer timed out */ |
75 | #define US_FLIDX_DONT_SCAN 6 /* don't scan (disconnect) */ | 76 | #define US_FLIDX_SCAN_PENDING 6 /* scanning not yet done */ |
76 | #define US_FLIDX_REDO_READ10 7 /* redo READ(10) command */ | 77 | #define US_FLIDX_REDO_READ10 7 /* redo READ(10) command */ |
77 | #define US_FLIDX_READ10_WORKED 8 /* previous READ(10) succeeded */ | 78 | #define US_FLIDX_READ10_WORKED 8 /* previous READ(10) succeeded */ |
78 | 79 | ||
@@ -147,8 +148,8 @@ struct us_data { | |||
147 | /* mutual exclusion and synchronization structures */ | 148 | /* mutual exclusion and synchronization structures */ |
148 | struct completion cmnd_ready; /* to sleep thread on */ | 149 | struct completion cmnd_ready; /* to sleep thread on */ |
149 | struct completion notify; /* thread begin/end */ | 150 | struct completion notify; /* thread begin/end */ |
150 | wait_queue_head_t delay_wait; /* wait during scan, reset */ | 151 | wait_queue_head_t delay_wait; /* wait during reset */ |
151 | struct completion scanning_done; /* wait for scan thread */ | 152 | struct delayed_work scan_dwork; /* for async scanning */ |
152 | 153 | ||
153 | /* subdriver information */ | 154 | /* subdriver information */ |
154 | void *extra; /* Any extra data */ | 155 | void *extra; /* Any extra data */ |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index f0c849c98fe4..ec9f6ef6c5dd 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3575,8 +3575,8 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu | |||
3575 | } | 3575 | } |
3576 | if (npages > 1) { | 3576 | if (npages > 1) { |
3577 | /* for decoding across pages */ | 3577 | /* for decoding across pages */ |
3578 | args.acl_scratch = alloc_page(GFP_KERNEL); | 3578 | res.acl_scratch = alloc_page(GFP_KERNEL); |
3579 | if (!args.acl_scratch) | 3579 | if (!res.acl_scratch) |
3580 | goto out_free; | 3580 | goto out_free; |
3581 | } | 3581 | } |
3582 | args.acl_len = npages * PAGE_SIZE; | 3582 | args.acl_len = npages * PAGE_SIZE; |
@@ -3612,8 +3612,8 @@ out_free: | |||
3612 | for (i = 0; i < npages; i++) | 3612 | for (i = 0; i < npages; i++) |
3613 | if (pages[i]) | 3613 | if (pages[i]) |
3614 | __free_page(pages[i]); | 3614 | __free_page(pages[i]); |
3615 | if (args.acl_scratch) | 3615 | if (res.acl_scratch) |
3616 | __free_page(args.acl_scratch); | 3616 | __free_page(res.acl_scratch); |
3617 | return ret; | 3617 | return ret; |
3618 | } | 3618 | } |
3619 | 3619 | ||
@@ -4883,8 +4883,10 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) | |||
4883 | clp->cl_rpcclient->cl_auth->au_flavor); | 4883 | clp->cl_rpcclient->cl_auth->au_flavor); |
4884 | 4884 | ||
4885 | res.server_scope = kzalloc(sizeof(struct server_scope), GFP_KERNEL); | 4885 | res.server_scope = kzalloc(sizeof(struct server_scope), GFP_KERNEL); |
4886 | if (unlikely(!res.server_scope)) | 4886 | if (unlikely(!res.server_scope)) { |
4887 | return -ENOMEM; | 4887 | status = -ENOMEM; |
4888 | goto out; | ||
4889 | } | ||
4888 | 4890 | ||
4889 | status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); | 4891 | status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); |
4890 | if (!status) | 4892 | if (!status) |
@@ -4901,12 +4903,13 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) | |||
4901 | clp->server_scope = NULL; | 4903 | clp->server_scope = NULL; |
4902 | } | 4904 | } |
4903 | 4905 | ||
4904 | if (!clp->server_scope) | 4906 | if (!clp->server_scope) { |
4905 | clp->server_scope = res.server_scope; | 4907 | clp->server_scope = res.server_scope; |
4906 | else | 4908 | goto out; |
4907 | kfree(res.server_scope); | 4909 | } |
4908 | } | 4910 | } |
4909 | 4911 | kfree(res.server_scope); | |
4912 | out: | ||
4910 | dprintk("<-- %s status= %d\n", __func__, status); | 4913 | dprintk("<-- %s status= %d\n", __func__, status); |
4911 | return status; | 4914 | return status; |
4912 | } | 4915 | } |
@@ -5008,37 +5011,53 @@ int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) | |||
5008 | return status; | 5011 | return status; |
5009 | } | 5012 | } |
5010 | 5013 | ||
5014 | static struct nfs4_slot *nfs4_alloc_slots(u32 max_slots, gfp_t gfp_flags) | ||
5015 | { | ||
5016 | return kcalloc(max_slots, sizeof(struct nfs4_slot), gfp_flags); | ||
5017 | } | ||
5018 | |||
5019 | static void nfs4_add_and_init_slots(struct nfs4_slot_table *tbl, | ||
5020 | struct nfs4_slot *new, | ||
5021 | u32 max_slots, | ||
5022 | u32 ivalue) | ||
5023 | { | ||
5024 | struct nfs4_slot *old = NULL; | ||
5025 | u32 i; | ||
5026 | |||
5027 | spin_lock(&tbl->slot_tbl_lock); | ||
5028 | if (new) { | ||
5029 | old = tbl->slots; | ||
5030 | tbl->slots = new; | ||
5031 | tbl->max_slots = max_slots; | ||
5032 | } | ||
5033 | tbl->highest_used_slotid = -1; /* no slot is currently used */ | ||
5034 | for (i = 0; i < tbl->max_slots; i++) | ||
5035 | tbl->slots[i].seq_nr = ivalue; | ||
5036 | spin_unlock(&tbl->slot_tbl_lock); | ||
5037 | kfree(old); | ||
5038 | } | ||
5039 | |||
5011 | /* | 5040 | /* |
5012 | * Reset a slot table | 5041 | * (re)Initialise a slot table |
5013 | */ | 5042 | */ |
5014 | static int nfs4_reset_slot_table(struct nfs4_slot_table *tbl, u32 max_reqs, | 5043 | static int nfs4_realloc_slot_table(struct nfs4_slot_table *tbl, u32 max_reqs, |
5015 | int ivalue) | 5044 | u32 ivalue) |
5016 | { | 5045 | { |
5017 | struct nfs4_slot *new = NULL; | 5046 | struct nfs4_slot *new = NULL; |
5018 | int i; | 5047 | int ret = -ENOMEM; |
5019 | int ret = 0; | ||
5020 | 5048 | ||
5021 | dprintk("--> %s: max_reqs=%u, tbl->max_slots %d\n", __func__, | 5049 | dprintk("--> %s: max_reqs=%u, tbl->max_slots %d\n", __func__, |
5022 | max_reqs, tbl->max_slots); | 5050 | max_reqs, tbl->max_slots); |
5023 | 5051 | ||
5024 | /* Does the newly negotiated max_reqs match the existing slot table? */ | 5052 | /* Does the newly negotiated max_reqs match the existing slot table? */ |
5025 | if (max_reqs != tbl->max_slots) { | 5053 | if (max_reqs != tbl->max_slots) { |
5026 | ret = -ENOMEM; | 5054 | new = nfs4_alloc_slots(max_reqs, GFP_NOFS); |
5027 | new = kmalloc(max_reqs * sizeof(struct nfs4_slot), | ||
5028 | GFP_NOFS); | ||
5029 | if (!new) | 5055 | if (!new) |
5030 | goto out; | 5056 | goto out; |
5031 | ret = 0; | ||
5032 | kfree(tbl->slots); | ||
5033 | } | 5057 | } |
5034 | spin_lock(&tbl->slot_tbl_lock); | 5058 | ret = 0; |
5035 | if (new) { | 5059 | |
5036 | tbl->slots = new; | 5060 | nfs4_add_and_init_slots(tbl, new, max_reqs, ivalue); |
5037 | tbl->max_slots = max_reqs; | ||
5038 | } | ||
5039 | for (i = 0; i < tbl->max_slots; ++i) | ||
5040 | tbl->slots[i].seq_nr = ivalue; | ||
5041 | spin_unlock(&tbl->slot_tbl_lock); | ||
5042 | dprintk("%s: tbl=%p slots=%p max_slots=%d\n", __func__, | 5061 | dprintk("%s: tbl=%p slots=%p max_slots=%d\n", __func__, |
5043 | tbl, tbl->slots, tbl->max_slots); | 5062 | tbl, tbl->slots, tbl->max_slots); |
5044 | out: | 5063 | out: |
@@ -5061,36 +5080,6 @@ static void nfs4_destroy_slot_tables(struct nfs4_session *session) | |||
5061 | } | 5080 | } |
5062 | 5081 | ||
5063 | /* | 5082 | /* |
5064 | * Initialize slot table | ||
5065 | */ | ||
5066 | static int nfs4_init_slot_table(struct nfs4_slot_table *tbl, | ||
5067 | int max_slots, int ivalue) | ||
5068 | { | ||
5069 | struct nfs4_slot *slot; | ||
5070 | int ret = -ENOMEM; | ||
5071 | |||
5072 | BUG_ON(max_slots > NFS4_MAX_SLOT_TABLE); | ||
5073 | |||
5074 | dprintk("--> %s: max_reqs=%u\n", __func__, max_slots); | ||
5075 | |||
5076 | slot = kcalloc(max_slots, sizeof(struct nfs4_slot), GFP_NOFS); | ||
5077 | if (!slot) | ||
5078 | goto out; | ||
5079 | ret = 0; | ||
5080 | |||
5081 | spin_lock(&tbl->slot_tbl_lock); | ||
5082 | tbl->max_slots = max_slots; | ||
5083 | tbl->slots = slot; | ||
5084 | tbl->highest_used_slotid = -1; /* no slot is currently used */ | ||
5085 | spin_unlock(&tbl->slot_tbl_lock); | ||
5086 | dprintk("%s: tbl=%p slots=%p max_slots=%d\n", __func__, | ||
5087 | tbl, tbl->slots, tbl->max_slots); | ||
5088 | out: | ||
5089 | dprintk("<-- %s: return %d\n", __func__, ret); | ||
5090 | return ret; | ||
5091 | } | ||
5092 | |||
5093 | /* | ||
5094 | * Initialize or reset the forechannel and backchannel tables | 5083 | * Initialize or reset the forechannel and backchannel tables |
5095 | */ | 5084 | */ |
5096 | static int nfs4_setup_session_slot_tables(struct nfs4_session *ses) | 5085 | static int nfs4_setup_session_slot_tables(struct nfs4_session *ses) |
@@ -5101,25 +5090,16 @@ static int nfs4_setup_session_slot_tables(struct nfs4_session *ses) | |||
5101 | dprintk("--> %s\n", __func__); | 5090 | dprintk("--> %s\n", __func__); |
5102 | /* Fore channel */ | 5091 | /* Fore channel */ |
5103 | tbl = &ses->fc_slot_table; | 5092 | tbl = &ses->fc_slot_table; |
5104 | if (tbl->slots == NULL) { | 5093 | status = nfs4_realloc_slot_table(tbl, ses->fc_attrs.max_reqs, 1); |
5105 | status = nfs4_init_slot_table(tbl, ses->fc_attrs.max_reqs, 1); | 5094 | if (status) /* -ENOMEM */ |
5106 | if (status) /* -ENOMEM */ | 5095 | return status; |
5107 | return status; | ||
5108 | } else { | ||
5109 | status = nfs4_reset_slot_table(tbl, ses->fc_attrs.max_reqs, 1); | ||
5110 | if (status) | ||
5111 | return status; | ||
5112 | } | ||
5113 | /* Back channel */ | 5096 | /* Back channel */ |
5114 | tbl = &ses->bc_slot_table; | 5097 | tbl = &ses->bc_slot_table; |
5115 | if (tbl->slots == NULL) { | 5098 | status = nfs4_realloc_slot_table(tbl, ses->bc_attrs.max_reqs, 0); |
5116 | status = nfs4_init_slot_table(tbl, ses->bc_attrs.max_reqs, 0); | 5099 | if (status && tbl->slots == NULL) |
5117 | if (status) | 5100 | /* Fore and back channel share a connection so get |
5118 | /* Fore and back channel share a connection so get | 5101 | * both slot tables or neither */ |
5119 | * both slot tables or neither */ | 5102 | nfs4_destroy_slot_tables(ses); |
5120 | nfs4_destroy_slot_tables(ses); | ||
5121 | } else | ||
5122 | status = nfs4_reset_slot_table(tbl, ses->bc_attrs.max_reqs, 0); | ||
5123 | return status; | 5103 | return status; |
5124 | } | 5104 | } |
5125 | 5105 | ||
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index a53f33b4ac3a..45392032e7bd 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1132,6 +1132,8 @@ void nfs4_schedule_stateid_recovery(const struct nfs_server *server, struct nfs4 | |||
1132 | { | 1132 | { |
1133 | struct nfs_client *clp = server->nfs_client; | 1133 | struct nfs_client *clp = server->nfs_client; |
1134 | 1134 | ||
1135 | if (test_and_clear_bit(NFS_DELEGATED_STATE, &state->flags)) | ||
1136 | nfs_async_inode_return_delegation(state->inode, &state->stateid); | ||
1135 | nfs4_state_mark_reclaim_nograce(clp, state); | 1137 | nfs4_state_mark_reclaim_nograce(clp, state); |
1136 | nfs4_schedule_state_manager(clp); | 1138 | nfs4_schedule_state_manager(clp); |
1137 | } | 1139 | } |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 95e92e438407..33bd8d0f745d 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -2522,7 +2522,6 @@ static void nfs4_xdr_enc_getacl(struct rpc_rqst *req, struct xdr_stream *xdr, | |||
2522 | 2522 | ||
2523 | xdr_inline_pages(&req->rq_rcv_buf, replen << 2, | 2523 | xdr_inline_pages(&req->rq_rcv_buf, replen << 2, |
2524 | args->acl_pages, args->acl_pgbase, args->acl_len); | 2524 | args->acl_pages, args->acl_pgbase, args->acl_len); |
2525 | xdr_set_scratch_buffer(xdr, page_address(args->acl_scratch), PAGE_SIZE); | ||
2526 | 2525 | ||
2527 | encode_nops(&hdr); | 2526 | encode_nops(&hdr); |
2528 | } | 2527 | } |
@@ -6032,6 +6031,10 @@ nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr, | |||
6032 | struct compound_hdr hdr; | 6031 | struct compound_hdr hdr; |
6033 | int status; | 6032 | int status; |
6034 | 6033 | ||
6034 | if (res->acl_scratch != NULL) { | ||
6035 | void *p = page_address(res->acl_scratch); | ||
6036 | xdr_set_scratch_buffer(xdr, p, PAGE_SIZE); | ||
6037 | } | ||
6035 | status = decode_compound_hdr(xdr, &hdr); | 6038 | status = decode_compound_hdr(xdr, &hdr); |
6036 | if (status) | 6039 | if (status) |
6037 | goto out; | 6040 | goto out; |
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index cbcb7bea38e2..53db20ee3e77 100644 --- a/fs/xfs/xfs_dquot.c +++ b/fs/xfs/xfs_dquot.c | |||
@@ -139,10 +139,10 @@ xfs_qm_adjust_dqtimers( | |||
139 | 139 | ||
140 | if (!d->d_btimer) { | 140 | if (!d->d_btimer) { |
141 | if ((d->d_blk_softlimit && | 141 | if ((d->d_blk_softlimit && |
142 | (be64_to_cpu(d->d_bcount) >= | 142 | (be64_to_cpu(d->d_bcount) > |
143 | be64_to_cpu(d->d_blk_softlimit))) || | 143 | be64_to_cpu(d->d_blk_softlimit))) || |
144 | (d->d_blk_hardlimit && | 144 | (d->d_blk_hardlimit && |
145 | (be64_to_cpu(d->d_bcount) >= | 145 | (be64_to_cpu(d->d_bcount) > |
146 | be64_to_cpu(d->d_blk_hardlimit)))) { | 146 | be64_to_cpu(d->d_blk_hardlimit)))) { |
147 | d->d_btimer = cpu_to_be32(get_seconds() + | 147 | d->d_btimer = cpu_to_be32(get_seconds() + |
148 | mp->m_quotainfo->qi_btimelimit); | 148 | mp->m_quotainfo->qi_btimelimit); |
@@ -151,10 +151,10 @@ xfs_qm_adjust_dqtimers( | |||
151 | } | 151 | } |
152 | } else { | 152 | } else { |
153 | if ((!d->d_blk_softlimit || | 153 | if ((!d->d_blk_softlimit || |
154 | (be64_to_cpu(d->d_bcount) < | 154 | (be64_to_cpu(d->d_bcount) <= |
155 | be64_to_cpu(d->d_blk_softlimit))) && | 155 | be64_to_cpu(d->d_blk_softlimit))) && |
156 | (!d->d_blk_hardlimit || | 156 | (!d->d_blk_hardlimit || |
157 | (be64_to_cpu(d->d_bcount) < | 157 | (be64_to_cpu(d->d_bcount) <= |
158 | be64_to_cpu(d->d_blk_hardlimit)))) { | 158 | be64_to_cpu(d->d_blk_hardlimit)))) { |
159 | d->d_btimer = 0; | 159 | d->d_btimer = 0; |
160 | } | 160 | } |
@@ -162,10 +162,10 @@ xfs_qm_adjust_dqtimers( | |||
162 | 162 | ||
163 | if (!d->d_itimer) { | 163 | if (!d->d_itimer) { |
164 | if ((d->d_ino_softlimit && | 164 | if ((d->d_ino_softlimit && |
165 | (be64_to_cpu(d->d_icount) >= | 165 | (be64_to_cpu(d->d_icount) > |
166 | be64_to_cpu(d->d_ino_softlimit))) || | 166 | be64_to_cpu(d->d_ino_softlimit))) || |
167 | (d->d_ino_hardlimit && | 167 | (d->d_ino_hardlimit && |
168 | (be64_to_cpu(d->d_icount) >= | 168 | (be64_to_cpu(d->d_icount) > |
169 | be64_to_cpu(d->d_ino_hardlimit)))) { | 169 | be64_to_cpu(d->d_ino_hardlimit)))) { |
170 | d->d_itimer = cpu_to_be32(get_seconds() + | 170 | d->d_itimer = cpu_to_be32(get_seconds() + |
171 | mp->m_quotainfo->qi_itimelimit); | 171 | mp->m_quotainfo->qi_itimelimit); |
@@ -174,10 +174,10 @@ xfs_qm_adjust_dqtimers( | |||
174 | } | 174 | } |
175 | } else { | 175 | } else { |
176 | if ((!d->d_ino_softlimit || | 176 | if ((!d->d_ino_softlimit || |
177 | (be64_to_cpu(d->d_icount) < | 177 | (be64_to_cpu(d->d_icount) <= |
178 | be64_to_cpu(d->d_ino_softlimit))) && | 178 | be64_to_cpu(d->d_ino_softlimit))) && |
179 | (!d->d_ino_hardlimit || | 179 | (!d->d_ino_hardlimit || |
180 | (be64_to_cpu(d->d_icount) < | 180 | (be64_to_cpu(d->d_icount) <= |
181 | be64_to_cpu(d->d_ino_hardlimit)))) { | 181 | be64_to_cpu(d->d_ino_hardlimit)))) { |
182 | d->d_itimer = 0; | 182 | d->d_itimer = 0; |
183 | } | 183 | } |
@@ -185,10 +185,10 @@ xfs_qm_adjust_dqtimers( | |||
185 | 185 | ||
186 | if (!d->d_rtbtimer) { | 186 | if (!d->d_rtbtimer) { |
187 | if ((d->d_rtb_softlimit && | 187 | if ((d->d_rtb_softlimit && |
188 | (be64_to_cpu(d->d_rtbcount) >= | 188 | (be64_to_cpu(d->d_rtbcount) > |
189 | be64_to_cpu(d->d_rtb_softlimit))) || | 189 | be64_to_cpu(d->d_rtb_softlimit))) || |
190 | (d->d_rtb_hardlimit && | 190 | (d->d_rtb_hardlimit && |
191 | (be64_to_cpu(d->d_rtbcount) >= | 191 | (be64_to_cpu(d->d_rtbcount) > |
192 | be64_to_cpu(d->d_rtb_hardlimit)))) { | 192 | be64_to_cpu(d->d_rtb_hardlimit)))) { |
193 | d->d_rtbtimer = cpu_to_be32(get_seconds() + | 193 | d->d_rtbtimer = cpu_to_be32(get_seconds() + |
194 | mp->m_quotainfo->qi_rtbtimelimit); | 194 | mp->m_quotainfo->qi_rtbtimelimit); |
@@ -197,10 +197,10 @@ xfs_qm_adjust_dqtimers( | |||
197 | } | 197 | } |
198 | } else { | 198 | } else { |
199 | if ((!d->d_rtb_softlimit || | 199 | if ((!d->d_rtb_softlimit || |
200 | (be64_to_cpu(d->d_rtbcount) < | 200 | (be64_to_cpu(d->d_rtbcount) <= |
201 | be64_to_cpu(d->d_rtb_softlimit))) && | 201 | be64_to_cpu(d->d_rtb_softlimit))) && |
202 | (!d->d_rtb_hardlimit || | 202 | (!d->d_rtb_hardlimit || |
203 | (be64_to_cpu(d->d_rtbcount) < | 203 | (be64_to_cpu(d->d_rtbcount) <= |
204 | be64_to_cpu(d->d_rtb_hardlimit)))) { | 204 | be64_to_cpu(d->d_rtb_hardlimit)))) { |
205 | d->d_rtbtimer = 0; | 205 | d->d_rtbtimer = 0; |
206 | } | 206 | } |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 15ff5392fb65..0ed9ee77937c 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1981,7 +1981,7 @@ xfs_qm_dqcheck( | |||
1981 | 1981 | ||
1982 | if (!errs && ddq->d_id) { | 1982 | if (!errs && ddq->d_id) { |
1983 | if (ddq->d_blk_softlimit && | 1983 | if (ddq->d_blk_softlimit && |
1984 | be64_to_cpu(ddq->d_bcount) >= | 1984 | be64_to_cpu(ddq->d_bcount) > |
1985 | be64_to_cpu(ddq->d_blk_softlimit)) { | 1985 | be64_to_cpu(ddq->d_blk_softlimit)) { |
1986 | if (!ddq->d_btimer) { | 1986 | if (!ddq->d_btimer) { |
1987 | if (flags & XFS_QMOPT_DOWARN) | 1987 | if (flags & XFS_QMOPT_DOWARN) |
@@ -1992,7 +1992,7 @@ xfs_qm_dqcheck( | |||
1992 | } | 1992 | } |
1993 | } | 1993 | } |
1994 | if (ddq->d_ino_softlimit && | 1994 | if (ddq->d_ino_softlimit && |
1995 | be64_to_cpu(ddq->d_icount) >= | 1995 | be64_to_cpu(ddq->d_icount) > |
1996 | be64_to_cpu(ddq->d_ino_softlimit)) { | 1996 | be64_to_cpu(ddq->d_ino_softlimit)) { |
1997 | if (!ddq->d_itimer) { | 1997 | if (!ddq->d_itimer) { |
1998 | if (flags & XFS_QMOPT_DOWARN) | 1998 | if (flags & XFS_QMOPT_DOWARN) |
@@ -2003,7 +2003,7 @@ xfs_qm_dqcheck( | |||
2003 | } | 2003 | } |
2004 | } | 2004 | } |
2005 | if (ddq->d_rtb_softlimit && | 2005 | if (ddq->d_rtb_softlimit && |
2006 | be64_to_cpu(ddq->d_rtbcount) >= | 2006 | be64_to_cpu(ddq->d_rtbcount) > |
2007 | be64_to_cpu(ddq->d_rtb_softlimit)) { | 2007 | be64_to_cpu(ddq->d_rtb_softlimit)) { |
2008 | if (!ddq->d_rtbtimer) { | 2008 | if (!ddq->d_rtbtimer) { |
2009 | if (flags & XFS_QMOPT_DOWARN) | 2009 | if (flags & XFS_QMOPT_DOWARN) |
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c index eafbcff81f3a..711a86e39ff0 100644 --- a/fs/xfs/xfs_qm_syscalls.c +++ b/fs/xfs/xfs_qm_syscalls.c | |||
@@ -813,11 +813,11 @@ xfs_qm_export_dquot( | |||
813 | (XFS_IS_OQUOTA_ENFORCED(mp) && | 813 | (XFS_IS_OQUOTA_ENFORCED(mp) && |
814 | (dst->d_flags & (FS_PROJ_QUOTA | FS_GROUP_QUOTA)))) && | 814 | (dst->d_flags & (FS_PROJ_QUOTA | FS_GROUP_QUOTA)))) && |
815 | dst->d_id != 0) { | 815 | dst->d_id != 0) { |
816 | if (((int) dst->d_bcount >= (int) dst->d_blk_softlimit) && | 816 | if (((int) dst->d_bcount > (int) dst->d_blk_softlimit) && |
817 | (dst->d_blk_softlimit > 0)) { | 817 | (dst->d_blk_softlimit > 0)) { |
818 | ASSERT(dst->d_btimer != 0); | 818 | ASSERT(dst->d_btimer != 0); |
819 | } | 819 | } |
820 | if (((int) dst->d_icount >= (int) dst->d_ino_softlimit) && | 820 | if (((int) dst->d_icount > (int) dst->d_ino_softlimit) && |
821 | (dst->d_ino_softlimit > 0)) { | 821 | (dst->d_ino_softlimit > 0)) { |
822 | ASSERT(dst->d_itimer != 0); | 822 | ASSERT(dst->d_itimer != 0); |
823 | } | 823 | } |
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index 329b06aba1c2..7adcdf15ae0c 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c | |||
@@ -1151,8 +1151,8 @@ xfs_trans_add_item( | |||
1151 | { | 1151 | { |
1152 | struct xfs_log_item_desc *lidp; | 1152 | struct xfs_log_item_desc *lidp; |
1153 | 1153 | ||
1154 | ASSERT(lip->li_mountp = tp->t_mountp); | 1154 | ASSERT(lip->li_mountp == tp->t_mountp); |
1155 | ASSERT(lip->li_ailp = tp->t_mountp->m_ail); | 1155 | ASSERT(lip->li_ailp == tp->t_mountp->m_ail); |
1156 | 1156 | ||
1157 | lidp = kmem_zone_zalloc(xfs_log_item_desc_zone, KM_SLEEP | KM_NOFS); | 1157 | lidp = kmem_zone_zalloc(xfs_log_item_desc_zone, KM_SLEEP | KM_NOFS); |
1158 | 1158 | ||
diff --git a/fs/xfs/xfs_trans_dquot.c b/fs/xfs/xfs_trans_dquot.c index 4d00ee67792d..c4ba366d24e6 100644 --- a/fs/xfs/xfs_trans_dquot.c +++ b/fs/xfs/xfs_trans_dquot.c | |||
@@ -649,12 +649,12 @@ xfs_trans_dqresv( | |||
649 | * nblks. | 649 | * nblks. |
650 | */ | 650 | */ |
651 | if (hardlimit > 0ULL && | 651 | if (hardlimit > 0ULL && |
652 | hardlimit <= nblks + *resbcountp) { | 652 | hardlimit < nblks + *resbcountp) { |
653 | xfs_quota_warn(mp, dqp, QUOTA_NL_BHARDWARN); | 653 | xfs_quota_warn(mp, dqp, QUOTA_NL_BHARDWARN); |
654 | goto error_return; | 654 | goto error_return; |
655 | } | 655 | } |
656 | if (softlimit > 0ULL && | 656 | if (softlimit > 0ULL && |
657 | softlimit <= nblks + *resbcountp) { | 657 | softlimit < nblks + *resbcountp) { |
658 | if ((timer != 0 && get_seconds() > timer) || | 658 | if ((timer != 0 && get_seconds() > timer) || |
659 | (warns != 0 && warns >= warnlimit)) { | 659 | (warns != 0 && warns >= warnlimit)) { |
660 | xfs_quota_warn(mp, dqp, | 660 | xfs_quota_warn(mp, dqp, |
@@ -677,11 +677,13 @@ xfs_trans_dqresv( | |||
677 | if (!softlimit) | 677 | if (!softlimit) |
678 | softlimit = q->qi_isoftlimit; | 678 | softlimit = q->qi_isoftlimit; |
679 | 679 | ||
680 | if (hardlimit > 0ULL && count >= hardlimit) { | 680 | if (hardlimit > 0ULL && |
681 | hardlimit < ninos + count) { | ||
681 | xfs_quota_warn(mp, dqp, QUOTA_NL_IHARDWARN); | 682 | xfs_quota_warn(mp, dqp, QUOTA_NL_IHARDWARN); |
682 | goto error_return; | 683 | goto error_return; |
683 | } | 684 | } |
684 | if (softlimit > 0ULL && count >= softlimit) { | 685 | if (softlimit > 0ULL && |
686 | softlimit < ninos + count) { | ||
685 | if ((timer != 0 && get_seconds() > timer) || | 687 | if ((timer != 0 && get_seconds() > timer) || |
686 | (warns != 0 && warns >= warnlimit)) { | 688 | (warns != 0 && warns >= warnlimit)) { |
687 | xfs_quota_warn(mp, dqp, | 689 | xfs_quota_warn(mp, dqp, |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index a764cef06b73..d6ba9a12591e 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -614,7 +614,6 @@ struct nfs_getaclargs { | |||
614 | size_t acl_len; | 614 | size_t acl_len; |
615 | unsigned int acl_pgbase; | 615 | unsigned int acl_pgbase; |
616 | struct page ** acl_pages; | 616 | struct page ** acl_pages; |
617 | struct page * acl_scratch; | ||
618 | struct nfs4_sequence_args seq_args; | 617 | struct nfs4_sequence_args seq_args; |
619 | }; | 618 | }; |
620 | 619 | ||
@@ -624,6 +623,7 @@ struct nfs_getaclres { | |||
624 | size_t acl_len; | 623 | size_t acl_len; |
625 | size_t acl_data_offset; | 624 | size_t acl_data_offset; |
626 | int acl_flags; | 625 | int acl_flags; |
626 | struct page * acl_scratch; | ||
627 | struct nfs4_sequence_res seq_res; | 627 | struct nfs4_sequence_res seq_res; |
628 | }; | 628 | }; |
629 | 629 | ||
diff --git a/include/linux/usb/ch11.h b/include/linux/usb/ch11.h index 31fdb4c6ee3d..0b83acd3360a 100644 --- a/include/linux/usb/ch11.h +++ b/include/linux/usb/ch11.h | |||
@@ -61,12 +61,6 @@ | |||
61 | #define USB_PORT_FEAT_TEST 21 | 61 | #define USB_PORT_FEAT_TEST 21 |
62 | #define USB_PORT_FEAT_INDICATOR 22 | 62 | #define USB_PORT_FEAT_INDICATOR 22 |
63 | #define USB_PORT_FEAT_C_PORT_L1 23 | 63 | #define USB_PORT_FEAT_C_PORT_L1 23 |
64 | #define USB_PORT_FEAT_C_PORT_LINK_STATE 25 | ||
65 | #define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26 | ||
66 | #define USB_PORT_FEAT_PORT_REMOTE_WAKE_MASK 27 | ||
67 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
68 | #define USB_PORT_FEAT_C_BH_PORT_RESET 29 | ||
69 | #define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30 | ||
70 | 64 | ||
71 | /* | 65 | /* |
72 | * Port feature selectors added by USB 3.0 spec. | 66 | * Port feature selectors added by USB 3.0 spec. |
@@ -75,8 +69,8 @@ | |||
75 | #define USB_PORT_FEAT_LINK_STATE 5 | 69 | #define USB_PORT_FEAT_LINK_STATE 5 |
76 | #define USB_PORT_FEAT_U1_TIMEOUT 23 | 70 | #define USB_PORT_FEAT_U1_TIMEOUT 23 |
77 | #define USB_PORT_FEAT_U2_TIMEOUT 24 | 71 | #define USB_PORT_FEAT_U2_TIMEOUT 24 |
78 | #define USB_PORT_FEAT_C_LINK_STATE 25 | 72 | #define USB_PORT_FEAT_C_PORT_LINK_STATE 25 |
79 | #define USB_PORT_FEAT_C_CONFIG_ERR 26 | 73 | #define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26 |
80 | #define USB_PORT_FEAT_REMOTE_WAKE_MASK 27 | 74 | #define USB_PORT_FEAT_REMOTE_WAKE_MASK 27 |
81 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | 75 | #define USB_PORT_FEAT_BH_PORT_RESET 28 |
82 | #define USB_PORT_FEAT_C_BH_PORT_RESET 29 | 76 | #define USB_PORT_FEAT_C_BH_PORT_RESET 29 |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 1358987c49d8..3647baa9bfed 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -80,6 +80,8 @@ enum { | |||
80 | ALC_AUTOMUTE_MIXER, /* mute/unmute mixer widget AMP */ | 80 | ALC_AUTOMUTE_MIXER, /* mute/unmute mixer widget AMP */ |
81 | }; | 81 | }; |
82 | 82 | ||
83 | #define MAX_VOL_NIDS 0x40 | ||
84 | |||
83 | struct alc_spec { | 85 | struct alc_spec { |
84 | /* codec parameterization */ | 86 | /* codec parameterization */ |
85 | const struct snd_kcontrol_new *mixers[5]; /* mixer arrays */ | 87 | const struct snd_kcontrol_new *mixers[5]; /* mixer arrays */ |
@@ -118,8 +120,8 @@ struct alc_spec { | |||
118 | const hda_nid_t *capsrc_nids; | 120 | const hda_nid_t *capsrc_nids; |
119 | hda_nid_t dig_in_nid; /* digital-in NID; optional */ | 121 | hda_nid_t dig_in_nid; /* digital-in NID; optional */ |
120 | hda_nid_t mixer_nid; /* analog-mixer NID */ | 122 | hda_nid_t mixer_nid; /* analog-mixer NID */ |
121 | DECLARE_BITMAP(vol_ctls, 0x20 << 1); | 123 | DECLARE_BITMAP(vol_ctls, MAX_VOL_NIDS << 1); |
122 | DECLARE_BITMAP(sw_ctls, 0x20 << 1); | 124 | DECLARE_BITMAP(sw_ctls, MAX_VOL_NIDS << 1); |
123 | 125 | ||
124 | /* capture setup for dynamic dual-adc switch */ | 126 | /* capture setup for dynamic dual-adc switch */ |
125 | hda_nid_t cur_adc; | 127 | hda_nid_t cur_adc; |
@@ -3149,7 +3151,10 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec) | |||
3149 | static inline unsigned int get_ctl_pos(unsigned int data) | 3151 | static inline unsigned int get_ctl_pos(unsigned int data) |
3150 | { | 3152 | { |
3151 | hda_nid_t nid = get_amp_nid_(data); | 3153 | hda_nid_t nid = get_amp_nid_(data); |
3152 | unsigned int dir = get_amp_direction_(data); | 3154 | unsigned int dir; |
3155 | if (snd_BUG_ON(nid >= MAX_VOL_NIDS)) | ||
3156 | return 0; | ||
3157 | dir = get_amp_direction_(data); | ||
3153 | return (nid << 1) | dir; | 3158 | return (nid << 1) | dir; |
3154 | } | 3159 | } |
3155 | 3160 | ||
@@ -4436,12 +4441,20 @@ static void alc889_fixup_dac_route(struct hda_codec *codec, | |||
4436 | const struct alc_fixup *fix, int action) | 4441 | const struct alc_fixup *fix, int action) |
4437 | { | 4442 | { |
4438 | if (action == ALC_FIXUP_ACT_PRE_PROBE) { | 4443 | if (action == ALC_FIXUP_ACT_PRE_PROBE) { |
4444 | /* fake the connections during parsing the tree */ | ||
4439 | hda_nid_t conn1[2] = { 0x0c, 0x0d }; | 4445 | hda_nid_t conn1[2] = { 0x0c, 0x0d }; |
4440 | hda_nid_t conn2[2] = { 0x0e, 0x0f }; | 4446 | hda_nid_t conn2[2] = { 0x0e, 0x0f }; |
4441 | snd_hda_override_conn_list(codec, 0x14, 2, conn1); | 4447 | snd_hda_override_conn_list(codec, 0x14, 2, conn1); |
4442 | snd_hda_override_conn_list(codec, 0x15, 2, conn1); | 4448 | snd_hda_override_conn_list(codec, 0x15, 2, conn1); |
4443 | snd_hda_override_conn_list(codec, 0x18, 2, conn2); | 4449 | snd_hda_override_conn_list(codec, 0x18, 2, conn2); |
4444 | snd_hda_override_conn_list(codec, 0x1a, 2, conn2); | 4450 | snd_hda_override_conn_list(codec, 0x1a, 2, conn2); |
4451 | } else if (action == ALC_FIXUP_ACT_PROBE) { | ||
4452 | /* restore the connections */ | ||
4453 | hda_nid_t conn[5] = { 0x0c, 0x0d, 0x0e, 0x0f, 0x26 }; | ||
4454 | snd_hda_override_conn_list(codec, 0x14, 5, conn); | ||
4455 | snd_hda_override_conn_list(codec, 0x15, 5, conn); | ||
4456 | snd_hda_override_conn_list(codec, 0x18, 5, conn); | ||
4457 | snd_hda_override_conn_list(codec, 0x1a, 5, conn); | ||
4445 | } | 4458 | } |
4446 | } | 4459 | } |
4447 | 4460 | ||
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c index 5ef70b5d27e4..278c0a0575f5 100644 --- a/sound/soc/codecs/ak4642.c +++ b/sound/soc/codecs/ak4642.c | |||
@@ -146,13 +146,10 @@ static const struct snd_kcontrol_new ak4642_snd_controls[] = { | |||
146 | 146 | ||
147 | SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC, | 147 | SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC, |
148 | 0, 0xFF, 1, out_tlv), | 148 | 0, 0xFF, 1, out_tlv), |
149 | |||
150 | SOC_SINGLE("Headphone Switch", PW_MGMT2, 6, 1, 0), | ||
151 | }; | 149 | }; |
152 | 150 | ||
153 | static const struct snd_kcontrol_new ak4642_hpout_mixer_controls[] = { | 151 | static const struct snd_kcontrol_new ak4642_headphone_control = |
154 | SOC_DAPM_SINGLE("DACH", MD_CTL4, 0, 1, 0), | 152 | SOC_DAPM_SINGLE("Switch", PW_MGMT2, 6, 1, 0); |
155 | }; | ||
156 | 153 | ||
157 | static const struct snd_kcontrol_new ak4642_lout_mixer_controls[] = { | 154 | static const struct snd_kcontrol_new ak4642_lout_mixer_controls[] = { |
158 | SOC_DAPM_SINGLE("DACL", SG_SL1, 4, 1, 0), | 155 | SOC_DAPM_SINGLE("DACL", SG_SL1, 4, 1, 0), |
@@ -165,13 +162,12 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = { | |||
165 | SND_SOC_DAPM_OUTPUT("HPOUTR"), | 162 | SND_SOC_DAPM_OUTPUT("HPOUTR"), |
166 | SND_SOC_DAPM_OUTPUT("LINEOUT"), | 163 | SND_SOC_DAPM_OUTPUT("LINEOUT"), |
167 | 164 | ||
168 | SND_SOC_DAPM_MIXER("HPOUTL Mixer", PW_MGMT2, 5, 0, | 165 | SND_SOC_DAPM_PGA("HPL Out", PW_MGMT2, 5, 0, NULL, 0), |
169 | &ak4642_hpout_mixer_controls[0], | 166 | SND_SOC_DAPM_PGA("HPR Out", PW_MGMT2, 4, 0, NULL, 0), |
170 | ARRAY_SIZE(ak4642_hpout_mixer_controls)), | 167 | SND_SOC_DAPM_SWITCH("Headphone Enable", SND_SOC_NOPM, 0, 0, |
168 | &ak4642_headphone_control), | ||
171 | 169 | ||
172 | SND_SOC_DAPM_MIXER("HPOUTR Mixer", PW_MGMT2, 4, 0, | 170 | SND_SOC_DAPM_PGA("DACH", MD_CTL4, 0, 0, NULL, 0), |
173 | &ak4642_hpout_mixer_controls[0], | ||
174 | ARRAY_SIZE(ak4642_hpout_mixer_controls)), | ||
175 | 171 | ||
176 | SND_SOC_DAPM_MIXER("LINEOUT Mixer", PW_MGMT1, 3, 0, | 172 | SND_SOC_DAPM_MIXER("LINEOUT Mixer", PW_MGMT1, 3, 0, |
177 | &ak4642_lout_mixer_controls[0], | 173 | &ak4642_lout_mixer_controls[0], |
@@ -184,12 +180,17 @@ static const struct snd_soc_dapm_widget ak4642_dapm_widgets[] = { | |||
184 | static const struct snd_soc_dapm_route ak4642_intercon[] = { | 180 | static const struct snd_soc_dapm_route ak4642_intercon[] = { |
185 | 181 | ||
186 | /* Outputs */ | 182 | /* Outputs */ |
187 | {"HPOUTL", NULL, "HPOUTL Mixer"}, | 183 | {"HPOUTL", NULL, "HPL Out"}, |
188 | {"HPOUTR", NULL, "HPOUTR Mixer"}, | 184 | {"HPOUTR", NULL, "HPR Out"}, |
189 | {"LINEOUT", NULL, "LINEOUT Mixer"}, | 185 | {"LINEOUT", NULL, "LINEOUT Mixer"}, |
190 | 186 | ||
191 | {"HPOUTL Mixer", "DACH", "DAC"}, | 187 | {"HPL Out", NULL, "Headphone Enable"}, |
192 | {"HPOUTR Mixer", "DACH", "DAC"}, | 188 | {"HPR Out", NULL, "Headphone Enable"}, |
189 | |||
190 | {"Headphone Enable", "Switch", "DACH"}, | ||
191 | |||
192 | {"DACH", NULL, "DAC"}, | ||
193 | |||
193 | {"LINEOUT Mixer", "DACL", "DAC"}, | 194 | {"LINEOUT Mixer", "DACL", "DAC"}, |
194 | }; | 195 | }; |
195 | 196 | ||
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 29c4b02c4790..0ac228b7dc04 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c | |||
@@ -2564,7 +2564,7 @@ static int dsp2_event(struct snd_soc_dapm_widget *w, | |||
2564 | return 0; | 2564 | return 0; |
2565 | } | 2565 | } |
2566 | 2566 | ||
2567 | static const char *st_text[] = { "None", "Right", "Left" }; | 2567 | static const char *st_text[] = { "None", "Left", "Right" }; |
2568 | 2568 | ||
2569 | static const struct soc_enum str_enum = | 2569 | static const struct soc_enum str_enum = |
2570 | SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text); | 2570 | SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text); |
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index 2cf87f5afed4..fde9a7a29cb6 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c | |||
@@ -311,8 +311,10 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub) | |||
311 | 311 | ||
312 | spin_lock(&dev->spinlock); | 312 | spin_lock(&dev->spinlock); |
313 | 313 | ||
314 | if (dev->input_panic || dev->output_panic) | 314 | if (dev->input_panic || dev->output_panic) { |
315 | ptr = SNDRV_PCM_POS_XRUN; | 315 | ptr = SNDRV_PCM_POS_XRUN; |
316 | goto unlock; | ||
317 | } | ||
316 | 318 | ||
317 | if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) | 319 | if (sub->stream == SNDRV_PCM_STREAM_PLAYBACK) |
318 | ptr = bytes_to_frames(sub->runtime, | 320 | ptr = bytes_to_frames(sub->runtime, |
@@ -321,6 +323,7 @@ snd_usb_caiaq_pcm_pointer(struct snd_pcm_substream *sub) | |||
321 | ptr = bytes_to_frames(sub->runtime, | 323 | ptr = bytes_to_frames(sub->runtime, |
322 | dev->audio_in_buf_pos[index]); | 324 | dev->audio_in_buf_pos[index]); |
323 | 325 | ||
326 | unlock: | ||
324 | spin_unlock(&dev->spinlock); | 327 | spin_unlock(&dev->spinlock); |
325 | return ptr; | 328 | return ptr; |
326 | } | 329 | } |
diff --git a/sound/usb/card.h b/sound/usb/card.h index a39edcc32a93..da5fa1ac4eda 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __USBAUDIO_CARD_H | 1 | #ifndef __USBAUDIO_CARD_H |
2 | #define __USBAUDIO_CARD_H | 2 | #define __USBAUDIO_CARD_H |
3 | 3 | ||
4 | #define MAX_NR_RATES 1024 | ||
4 | #define MAX_PACKS 20 | 5 | #define MAX_PACKS 20 |
5 | #define MAX_PACKS_HS (MAX_PACKS * 8) /* in high speed mode */ | 6 | #define MAX_PACKS_HS (MAX_PACKS * 8) /* in high speed mode */ |
6 | #define MAX_URBS 8 | 7 | #define MAX_URBS 8 |
diff --git a/sound/usb/format.c b/sound/usb/format.c index e09aba19375c..ddfef57c4c9f 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c | |||
@@ -209,8 +209,6 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof | |||
209 | return 0; | 209 | return 0; |
210 | } | 210 | } |
211 | 211 | ||
212 | #define MAX_UAC2_NR_RATES 1024 | ||
213 | |||
214 | /* | 212 | /* |
215 | * Helper function to walk the array of sample rate triplets reported by | 213 | * Helper function to walk the array of sample rate triplets reported by |
216 | * the device. The problem is that we need to parse whole array first to | 214 | * the device. The problem is that we need to parse whole array first to |
@@ -255,7 +253,7 @@ static int parse_uac2_sample_rate_range(struct audioformat *fp, int nr_triplets, | |||
255 | fp->rates |= snd_pcm_rate_to_rate_bit(rate); | 253 | fp->rates |= snd_pcm_rate_to_rate_bit(rate); |
256 | 254 | ||
257 | nr_rates++; | 255 | nr_rates++; |
258 | if (nr_rates >= MAX_UAC2_NR_RATES) { | 256 | if (nr_rates >= MAX_NR_RATES) { |
259 | snd_printk(KERN_ERR "invalid uac2 rates\n"); | 257 | snd_printk(KERN_ERR "invalid uac2 rates\n"); |
260 | break; | 258 | break; |
261 | } | 259 | } |
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index a3ddac0deffd..27817266867a 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -132,10 +132,14 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, | |||
132 | unsigned *rate_table = NULL; | 132 | unsigned *rate_table = NULL; |
133 | 133 | ||
134 | fp = kmemdup(quirk->data, sizeof(*fp), GFP_KERNEL); | 134 | fp = kmemdup(quirk->data, sizeof(*fp), GFP_KERNEL); |
135 | if (! fp) { | 135 | if (!fp) { |
136 | snd_printk(KERN_ERR "cannot memdup\n"); | 136 | snd_printk(KERN_ERR "cannot memdup\n"); |
137 | return -ENOMEM; | 137 | return -ENOMEM; |
138 | } | 138 | } |
139 | if (fp->nr_rates > MAX_NR_RATES) { | ||
140 | kfree(fp); | ||
141 | return -EINVAL; | ||
142 | } | ||
139 | if (fp->nr_rates > 0) { | 143 | if (fp->nr_rates > 0) { |
140 | rate_table = kmemdup(fp->rate_table, | 144 | rate_table = kmemdup(fp->rate_table, |
141 | sizeof(int) * fp->nr_rates, GFP_KERNEL); | 145 | sizeof(int) * fp->nr_rates, GFP_KERNEL); |