| 1 |
diff --git a/Documentation/hwmon/ltc4245 b/Documentation/hwmon/ltc4245
|
| 2 |
index 02838a4..86b5880 100644
|
| 3 |
--- a/Documentation/hwmon/ltc4245
|
| 4 |
+++ b/Documentation/hwmon/ltc4245
|
| 5 |
@@ -72,9 +72,7 @@ in6_min_alarm 5v output undervoltage alarm
|
| 6 |
in7_min_alarm 3v output undervoltage alarm
|
| 7 |
in8_min_alarm Vee (-12v) output undervoltage alarm
|
| 8 |
|
| 9 |
-in9_input GPIO #1 voltage data
|
| 10 |
-in10_input GPIO #2 voltage data
|
| 11 |
-in11_input GPIO #3 voltage data
|
| 12 |
+in9_input GPIO voltage data
|
| 13 |
|
| 14 |
power1_input 12v power usage (mW)
|
| 15 |
power2_input 5v power usage (mW)
|
| 16 |
diff --git a/Documentation/networking/3c509.txt b/Documentation/networking/3c509.txt
|
| 17 |
index 0643e3b..3c45d5d 100644
|
| 18 |
--- a/Documentation/networking/3c509.txt
|
| 19 |
+++ b/Documentation/networking/3c509.txt
|
| 20 |
@@ -48,11 +48,11 @@ for LILO parameters for doing this:
|
| 21 |
This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and
|
| 22 |
transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts
|
| 23 |
with other card types when overriding the I/O address. When the driver is
|
| 24 |
-loaded as a module, only the IRQ and transceiver setting may be overridden.
|
| 25 |
-For example, setting two cards to 10base2/IRQ10 and AUI/IRQ11 is done by using
|
| 26 |
-the xcvr and irq module options:
|
| 27 |
+loaded as a module, only the IRQ may be overridden. For example,
|
| 28 |
+setting two cards to IRQ10 and IRQ11 is done by using the irq module
|
| 29 |
+option:
|
| 30 |
|
| 31 |
- options 3c509 xcvr=3,1 irq=10,11
|
| 32 |
+ options 3c509 irq=10,11
|
| 33 |
|
| 34 |
|
| 35 |
(2) Full-duplex mode
|
| 36 |
@@ -77,6 +77,8 @@ operation.
|
| 37 |
itself full-duplex capable. This is almost certainly one of two things: a full-
|
| 38 |
duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on
|
| 39 |
another system that's connected directly to the 3c509B via a crossover cable.
|
| 40 |
+
|
| 41 |
+Full-duplex mode can be enabled using 'ethtool'.
|
| 42 |
|
| 43 |
/////Extremely important caution concerning full-duplex mode/////
|
| 44 |
Understand that the 3c509B's hardware's full-duplex support is much more
|
| 45 |
@@ -113,6 +115,8 @@ This insured that merely upgrading the driver from an earlier version would
|
| 46 |
never automatically enable full-duplex mode in an existing installation;
|
| 47 |
it must always be explicitly enabled via one of these code in order to be
|
| 48 |
activated.
|
| 49 |
+
|
| 50 |
+The transceiver type can be changed using 'ethtool'.
|
| 51 |
|
| 52 |
|
| 53 |
(4a) Interpretation of error messages and common problems
|
| 54 |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
|
| 55 |
index 8ba7044..b07bfee 100644
|
| 56 |
--- a/arch/arm/common/sa1111.c
|
| 57 |
+++ b/arch/arm/common/sa1111.c
|
| 58 |
@@ -887,8 +887,6 @@ static int sa1111_resume(struct platform_device *dev)
|
| 59 |
if (!save)
|
| 60 |
return 0;
|
| 61 |
|
| 62 |
- spin_lock_irqsave(&sachip->lock, flags);
|
| 63 |
-
|
| 64 |
/*
|
| 65 |
* Ensure that the SA1111 is still here.
|
| 66 |
* FIXME: shouldn't do this here.
|
| 67 |
@@ -905,6 +903,13 @@ static int sa1111_resume(struct platform_device *dev)
|
| 68 |
* First of all, wake up the chip.
|
| 69 |
*/
|
| 70 |
sa1111_wake(sachip);
|
| 71 |
+
|
| 72 |
+ /*
|
| 73 |
+ * Only lock for write ops. Also, sa1111_wake must be called with
|
| 74 |
+ * released spinlock!
|
| 75 |
+ */
|
| 76 |
+ spin_lock_irqsave(&sachip->lock, flags);
|
| 77 |
+
|
| 78 |
sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN0);
|
| 79 |
sa1111_writel(0, sachip->base + SA1111_INTC + SA1111_INTEN1);
|
| 80 |
|
| 81 |
diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c
|
| 82 |
index 70997d5..dd9598b 100644
|
| 83 |
--- a/arch/arm/mm/copypage-feroceon.c
|
| 84 |
+++ b/arch/arm/mm/copypage-feroceon.c
|
| 85 |
@@ -18,7 +18,7 @@ feroceon_copy_user_page(void *kto, const void *kfrom)
|
| 86 |
{
|
| 87 |
asm("\
|
| 88 |
stmfd sp!, {r4-r9, lr} \n\
|
| 89 |
- mov ip, %0 \n\
|
| 90 |
+ mov ip, %2 \n\
|
| 91 |
1: mov lr, r1 \n\
|
| 92 |
ldmia r1!, {r2 - r9} \n\
|
| 93 |
pld [lr, #32] \n\
|
| 94 |
@@ -64,7 +64,7 @@ feroceon_copy_user_page(void *kto, const void *kfrom)
|
| 95 |
mcr p15, 0, ip, c7, c10, 4 @ drain WB\n\
|
| 96 |
ldmfd sp!, {r4-r9, pc}"
|
| 97 |
:
|
| 98 |
- : "I" (PAGE_SIZE));
|
| 99 |
+ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE));
|
| 100 |
}
|
| 101 |
|
| 102 |
void feroceon_copy_user_highpage(struct page *to, struct page *from,
|
| 103 |
diff --git a/arch/arm/mm/copypage-v4wb.c b/arch/arm/mm/copypage-v4wb.c
|
| 104 |
index 9ab0984..7bc0ac7 100644
|
| 105 |
--- a/arch/arm/mm/copypage-v4wb.c
|
| 106 |
+++ b/arch/arm/mm/copypage-v4wb.c
|
| 107 |
@@ -27,7 +27,7 @@ v4wb_copy_user_page(void *kto, const void *kfrom)
|
| 108 |
{
|
| 109 |
asm("\
|
| 110 |
stmfd sp!, {r4, lr} @ 2\n\
|
| 111 |
- mov r2, %0 @ 1\n\
|
| 112 |
+ mov r2, %2 @ 1\n\
|
| 113 |
ldmia r1!, {r3, r4, ip, lr} @ 4\n\
|
| 114 |
1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\
|
| 115 |
stmia r0!, {r3, r4, ip, lr} @ 4\n\
|
| 116 |
@@ -44,7 +44,7 @@ v4wb_copy_user_page(void *kto, const void *kfrom)
|
| 117 |
mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB\n\
|
| 118 |
ldmfd sp!, {r4, pc} @ 3"
|
| 119 |
:
|
| 120 |
- : "I" (PAGE_SIZE / 64));
|
| 121 |
+ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64));
|
| 122 |
}
|
| 123 |
|
| 124 |
void v4wb_copy_user_highpage(struct page *to, struct page *from,
|
| 125 |
diff --git a/arch/arm/mm/copypage-v4wt.c b/arch/arm/mm/copypage-v4wt.c
|
| 126 |
index 300efaf..35bf609 100644
|
| 127 |
--- a/arch/arm/mm/copypage-v4wt.c
|
| 128 |
+++ b/arch/arm/mm/copypage-v4wt.c
|
| 129 |
@@ -25,7 +25,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom)
|
| 130 |
{
|
| 131 |
asm("\
|
| 132 |
stmfd sp!, {r4, lr} @ 2\n\
|
| 133 |
- mov r2, %0 @ 1\n\
|
| 134 |
+ mov r2, %2 @ 1\n\
|
| 135 |
ldmia r1!, {r3, r4, ip, lr} @ 4\n\
|
| 136 |
1: stmia r0!, {r3, r4, ip, lr} @ 4\n\
|
| 137 |
ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\
|
| 138 |
@@ -40,7 +40,7 @@ v4wt_copy_user_page(void *kto, const void *kfrom)
|
| 139 |
mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\
|
| 140 |
ldmfd sp!, {r4, pc} @ 3"
|
| 141 |
:
|
| 142 |
- : "I" (PAGE_SIZE / 64));
|
| 143 |
+ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64));
|
| 144 |
}
|
| 145 |
|
| 146 |
void v4wt_copy_user_highpage(struct page *to, struct page *from,
|
| 147 |
diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c
|
| 148 |
index bc4525f..27dc363 100644
|
| 149 |
--- a/arch/arm/mm/copypage-xsc3.c
|
| 150 |
+++ b/arch/arm/mm/copypage-xsc3.c
|
| 151 |
@@ -34,7 +34,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom)
|
| 152 |
{
|
| 153 |
asm("\
|
| 154 |
stmfd sp!, {r4, r5, lr} \n\
|
| 155 |
- mov lr, %0 \n\
|
| 156 |
+ mov lr, %2 \n\
|
| 157 |
\n\
|
| 158 |
pld [r1, #0] \n\
|
| 159 |
pld [r1, #32] \n\
|
| 160 |
@@ -67,7 +67,7 @@ xsc3_mc_copy_user_page(void *kto, const void *kfrom)
|
| 161 |
\n\
|
| 162 |
ldmfd sp!, {r4, r5, pc}"
|
| 163 |
:
|
| 164 |
- : "I" (PAGE_SIZE / 64 - 1));
|
| 165 |
+ : "r" (kto), "r" (kfrom), "I" (PAGE_SIZE / 64 - 1));
|
| 166 |
}
|
| 167 |
|
| 168 |
void xsc3_mc_copy_user_highpage(struct page *to, struct page *from,
|
| 169 |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
|
| 170 |
index 10e0680..3191cd6 100644
|
| 171 |
--- a/arch/arm/mm/fault.c
|
| 172 |
+++ b/arch/arm/mm/fault.c
|
| 173 |
@@ -386,6 +386,9 @@ do_translation_fault(unsigned long addr, unsigned int fsr,
|
| 174 |
if (addr < TASK_SIZE)
|
| 175 |
return do_page_fault(addr, fsr, regs);
|
| 176 |
|
| 177 |
+ if (user_mode(regs))
|
| 178 |
+ goto bad_area;
|
| 179 |
+
|
| 180 |
index = pgd_index(addr);
|
| 181 |
|
| 182 |
/*
|
| 183 |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
|
| 184 |
index 52c40d1..94945db 100644
|
| 185 |
--- a/arch/arm/mm/init.c
|
| 186 |
+++ b/arch/arm/mm/init.c
|
| 187 |
@@ -632,10 +632,10 @@ void __init mem_init(void)
|
| 188 |
void free_initmem(void)
|
| 189 |
{
|
| 190 |
#ifdef CONFIG_HAVE_TCM
|
| 191 |
- extern char *__tcm_start, *__tcm_end;
|
| 192 |
+ extern char __tcm_start, __tcm_end;
|
| 193 |
|
| 194 |
- totalram_pages += free_area(__phys_to_pfn(__pa(__tcm_start)),
|
| 195 |
- __phys_to_pfn(__pa(__tcm_end)),
|
| 196 |
+ totalram_pages += free_area(__phys_to_pfn(__pa(&__tcm_start)),
|
| 197 |
+ __phys_to_pfn(__pa(&__tcm_end)),
|
| 198 |
"TCM link");
|
| 199 |
#endif
|
| 200 |
|
| 201 |
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
|
| 202 |
index 66dc2d0..d66cead 100644
|
| 203 |
--- a/arch/arm/vfp/vfphw.S
|
| 204 |
+++ b/arch/arm/vfp/vfphw.S
|
| 205 |
@@ -277,7 +277,7 @@ ENTRY(vfp_put_double)
|
| 206 |
#ifdef CONFIG_VFPv3
|
| 207 |
@ d16 - d31 registers
|
| 208 |
.irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
| 209 |
-1: mcrr p11, 3, r1, r2, c\dr @ fmdrr r1, r2, d\dr
|
| 210 |
+1: mcrr p11, 3, r0, r1, c\dr @ fmdrr r0, r1, d\dr
|
| 211 |
mov pc, lr
|
| 212 |
.org 1b + 8
|
| 213 |
.endr
|
| 214 |
diff --git a/arch/blackfin/include/asm/cache.h b/arch/blackfin/include/asm/cache.h
|
| 215 |
index 8542bc3..93f6c63 100644
|
| 216 |
--- a/arch/blackfin/include/asm/cache.h
|
| 217 |
+++ b/arch/blackfin/include/asm/cache.h
|
| 218 |
@@ -15,6 +15,8 @@
|
| 219 |
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
| 220 |
#define SMP_CACHE_BYTES L1_CACHE_BYTES
|
| 221 |
|
| 222 |
+#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
|
| 223 |
+
|
| 224 |
#ifdef CONFIG_SMP
|
| 225 |
#define __cacheline_aligned
|
| 226 |
#else
|
| 227 |
diff --git a/arch/frv/include/asm/cache.h b/arch/frv/include/asm/cache.h
|
| 228 |
index 2797163..7dc0f0f 100644
|
| 229 |
--- a/arch/frv/include/asm/cache.h
|
| 230 |
+++ b/arch/frv/include/asm/cache.h
|
| 231 |
@@ -17,6 +17,8 @@
|
| 232 |
#define L1_CACHE_SHIFT (CONFIG_FRV_L1_CACHE_SHIFT)
|
| 233 |
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
|
| 234 |
|
| 235 |
+#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
|
| 236 |
+
|
| 237 |
#define __cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))
|
| 238 |
#define ____cacheline_aligned __attribute__((aligned(L1_CACHE_BYTES)))
|
| 239 |
|
| 240 |
diff --git a/arch/m68k/include/asm/cache.h b/arch/m68k/include/asm/cache.h
|
| 241 |
index fed3fd3..ecafbe1 100644
|
| 242 |
--- a/arch/m68k/include/asm/cache.h
|
| 243 |
+++ b/arch/m68k/include/asm/cache.h
|
| 244 |
@@ -8,4 +8,6 @@
|
| 245 |
#define L1_CACHE_SHIFT 4
|
| 246 |
#define L1_CACHE_BYTES (1<< L1_CACHE_SHIFT)
|
| 247 |
|
| 248 |
+#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
|
| 249 |
+
|
| 250 |
#endif
|
| 251 |
diff --git a/arch/mn10300/include/asm/cache.h b/arch/mn10300/include/asm/cache.h
|
| 252 |
index e03cfa2..6e2fe28 100644
|
| 253 |
--- a/arch/mn10300/include/asm/cache.h
|
| 254 |
+++ b/arch/mn10300/include/asm/cache.h
|
| 255 |
@@ -21,6 +21,8 @@
|
| 256 |
#define L1_CACHE_DISPARITY L1_CACHE_NENTRIES * L1_CACHE_BYTES
|
| 257 |
#endif
|
| 258 |
|
| 259 |
+#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
|
| 260 |
+
|
| 261 |
/* data cache purge registers
|
| 262 |
* - read from the register to unconditionally purge that cache line
|
| 263 |
* - write address & 0xffffff00 to conditionally purge that cache line
|
| 264 |
diff --git a/arch/parisc/math-emu/decode_exc.c b/arch/parisc/math-emu/decode_exc.c
|
| 265 |
index 3ca1c61..27a7492 100644
|
| 266 |
--- a/arch/parisc/math-emu/decode_exc.c
|
| 267 |
+++ b/arch/parisc/math-emu/decode_exc.c
|
| 268 |
@@ -342,6 +342,7 @@ decode_fpu(unsigned int Fpu_register[], unsigned int trap_counts[])
|
| 269 |
return SIGNALCODE(SIGFPE, FPE_FLTINV);
|
| 270 |
case DIVISIONBYZEROEXCEPTION:
|
| 271 |
update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
|
| 272 |
+ Clear_excp_register(exception_index);
|
| 273 |
return SIGNALCODE(SIGFPE, FPE_FLTDIV);
|
| 274 |
case INEXACTEXCEPTION:
|
| 275 |
update_trap_counts(Fpu_register, aflags, bflags, trap_counts);
|
| 276 |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
|
| 277 |
index 2a4551f..ff184f4 100644
|
| 278 |
--- a/arch/powerpc/kvm/powerpc.c
|
| 279 |
+++ b/arch/powerpc/kvm/powerpc.c
|
| 280 |
@@ -176,7 +176,8 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
|
| 281 |
{
|
| 282 |
struct kvm_vcpu *vcpu;
|
| 283 |
vcpu = kvmppc_core_vcpu_create(kvm, id);
|
| 284 |
- kvmppc_create_vcpu_debugfs(vcpu, id);
|
| 285 |
+ if (!IS_ERR(vcpu))
|
| 286 |
+ kvmppc_create_vcpu_debugfs(vcpu, id);
|
| 287 |
return vcpu;
|
| 288 |
}
|
| 289 |
|
| 290 |
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S
|
| 291 |
index 64e2e49..3ac0cd3 100644
|
| 292 |
--- a/arch/powerpc/lib/string.S
|
| 293 |
+++ b/arch/powerpc/lib/string.S
|
| 294 |
@@ -71,7 +71,7 @@ _GLOBAL(strcmp)
|
| 295 |
|
| 296 |
_GLOBAL(strncmp)
|
| 297 |
PPC_LCMPI r5,0
|
| 298 |
- beqlr
|
| 299 |
+ ble- 2f
|
| 300 |
mtctr r5
|
| 301 |
addi r5,r3,-1
|
| 302 |
addi r4,r4,-1
|
| 303 |
@@ -82,6 +82,8 @@ _GLOBAL(strncmp)
|
| 304 |
beqlr 1
|
| 305 |
bdnzt eq,1b
|
| 306 |
blr
|
| 307 |
+2: li r3,0
|
| 308 |
+ blr
|
| 309 |
|
| 310 |
_GLOBAL(strlen)
|
| 311 |
addi r4,r3,-1
|
| 312 |
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c
|
| 313 |
index ae06c62..c8fc4dc 100644
|
| 314 |
--- a/arch/powerpc/oprofile/op_model_cell.c
|
| 315 |
+++ b/arch/powerpc/oprofile/op_model_cell.c
|
| 316 |
@@ -1077,7 +1077,7 @@ static int calculate_lfsr(int n)
|
| 317 |
index = ENTRIES-1;
|
| 318 |
|
| 319 |
/* make sure index is valid */
|
| 320 |
- if ((index > ENTRIES) || (index < 0))
|
| 321 |
+ if ((index >= ENTRIES) || (index < 0))
|
| 322 |
index = ENTRIES-1;
|
| 323 |
|
| 324 |
return initial_lfsr[index];
|
| 325 |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
|
| 326 |
index ebff6d9..c2c1720 100644
|
| 327 |
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
|
| 328 |
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
|
| 329 |
@@ -66,30 +66,6 @@ static void pseries_mach_cpu_die(void)
|
| 330 |
for(;;);
|
| 331 |
}
|
| 332 |
|
| 333 |
-static int qcss_tok; /* query-cpu-stopped-state token */
|
| 334 |
-
|
| 335 |
-/* Get state of physical CPU.
|
| 336 |
- * Return codes:
|
| 337 |
- * 0 - The processor is in the RTAS stopped state
|
| 338 |
- * 1 - stop-self is in progress
|
| 339 |
- * 2 - The processor is not in the RTAS stopped state
|
| 340 |
- * -1 - Hardware Error
|
| 341 |
- * -2 - Hardware Busy, Try again later.
|
| 342 |
- */
|
| 343 |
-static int query_cpu_stopped(unsigned int pcpu)
|
| 344 |
-{
|
| 345 |
- int cpu_status, status;
|
| 346 |
-
|
| 347 |
- status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu);
|
| 348 |
- if (status != 0) {
|
| 349 |
- printk(KERN_ERR
|
| 350 |
- "RTAS query-cpu-stopped-state failed: %i\n", status);
|
| 351 |
- return status;
|
| 352 |
- }
|
| 353 |
-
|
| 354 |
- return cpu_status;
|
| 355 |
-}
|
| 356 |
-
|
| 357 |
static int pseries_cpu_disable(void)
|
| 358 |
{
|
| 359 |
int cpu = smp_processor_id();
|
| 360 |
@@ -113,8 +89,9 @@ static void pseries_cpu_die(unsigned int cpu)
|
| 361 |
unsigned int pcpu = get_hard_smp_processor_id(cpu);
|
| 362 |
|
| 363 |
for (tries = 0; tries < 25; tries++) {
|
| 364 |
- cpu_status = query_cpu_stopped(pcpu);
|
| 365 |
- if (cpu_status == 0 || cpu_status == -1)
|
| 366 |
+ cpu_status = smp_query_cpu_stopped(pcpu);
|
| 367 |
+ if (cpu_status == QCSS_STOPPED ||
|
| 368 |
+ cpu_status == QCSS_HARDWARE_ERROR)
|
| 369 |
break;
|
| 370 |
cpu_relax();
|
| 371 |
}
|
| 372 |
@@ -256,6 +233,7 @@ static int __init pseries_cpu_hotplug_init(void)
|
| 373 |
{
|
| 374 |
struct device_node *np;
|
| 375 |
const char *typep;
|
| 376 |
+ int qcss_tok;
|
| 377 |
|
| 378 |
for_each_node_by_name(np, "interrupt-controller") {
|
| 379 |
typep = of_get_property(np, "compatible", NULL);
|
| 380 |
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h
|
| 381 |
index a24a6b2..45f634c 100644
|
| 382 |
--- a/arch/powerpc/platforms/pseries/plpar_wrappers.h
|
| 383 |
+++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h
|
| 384 |
@@ -4,6 +4,14 @@
|
| 385 |
#include <asm/hvcall.h>
|
| 386 |
#include <asm/page.h>
|
| 387 |
|
| 388 |
+/* Get state of physical CPU from query_cpu_stopped */
|
| 389 |
+int smp_query_cpu_stopped(unsigned int pcpu);
|
| 390 |
+#define QCSS_STOPPED 0
|
| 391 |
+#define QCSS_STOPPING 1
|
| 392 |
+#define QCSS_NOT_STOPPED 2
|
| 393 |
+#define QCSS_HARDWARE_ERROR -1
|
| 394 |
+#define QCSS_HARDWARE_BUSY -2
|
| 395 |
+
|
| 396 |
static inline long poll_pending(void)
|
| 397 |
{
|
| 398 |
return plpar_hcall_norets(H_POLL_PENDING);
|
| 399 |
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
|
| 400 |
index 440000c..3afa079 100644
|
| 401 |
--- a/arch/powerpc/platforms/pseries/smp.c
|
| 402 |
+++ b/arch/powerpc/platforms/pseries/smp.c
|
| 403 |
@@ -56,6 +56,28 @@
|
| 404 |
*/
|
| 405 |
static cpumask_t of_spin_map;
|
| 406 |
|
| 407 |
+/* Query where a cpu is now. Return codes #defined in plpar_wrappers.h */
|
| 408 |
+int smp_query_cpu_stopped(unsigned int pcpu)
|
| 409 |
+{
|
| 410 |
+ int cpu_status, status;
|
| 411 |
+ int qcss_tok = rtas_token("query-cpu-stopped-state");
|
| 412 |
+
|
| 413 |
+ if (qcss_tok == RTAS_UNKNOWN_SERVICE) {
|
| 414 |
+ printk(KERN_INFO "Firmware doesn't support "
|
| 415 |
+ "query-cpu-stopped-state\n");
|
| 416 |
+ return QCSS_HARDWARE_ERROR;
|
| 417 |
+ }
|
| 418 |
+
|
| 419 |
+ status = rtas_call(qcss_tok, 1, 2, &cpu_status, pcpu);
|
| 420 |
+ if (status != 0) {
|
| 421 |
+ printk(KERN_ERR
|
| 422 |
+ "RTAS query-cpu-stopped-state failed: %i\n", status);
|
| 423 |
+ return status;
|
| 424 |
+ }
|
| 425 |
+
|
| 426 |
+ return cpu_status;
|
| 427 |
+}
|
| 428 |
+
|
| 429 |
/**
|
| 430 |
* smp_startup_cpu() - start the given cpu
|
| 431 |
*
|
| 432 |
@@ -81,6 +103,12 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
|
| 433 |
|
| 434 |
pcpu = get_hard_smp_processor_id(lcpu);
|
| 435 |
|
| 436 |
+ /* Check to see if the CPU out of FW already for kexec */
|
| 437 |
+ if (smp_query_cpu_stopped(pcpu) == QCSS_NOT_STOPPED){
|
| 438 |
+ cpu_set(lcpu, of_spin_map);
|
| 439 |
+ return 1;
|
| 440 |
+ }
|
| 441 |
+
|
| 442 |
/* Fixup atomic count: it exited inside IRQ handler. */
|
| 443 |
task_thread_info(paca[lcpu].__current)->preempt_count = 0;
|
| 444 |
|
| 445 |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
|
| 446 |
index ca2d312..75fbf19 100644
|
| 447 |
--- a/arch/s390/kvm/kvm-s390.c
|
| 448 |
+++ b/arch/s390/kvm/kvm-s390.c
|
| 449 |
@@ -338,11 +338,13 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
|
| 450 |
|
| 451 |
rc = kvm_vcpu_init(vcpu, kvm, id);
|
| 452 |
if (rc)
|
| 453 |
- goto out_free_cpu;
|
| 454 |
+ goto out_free_sie_block;
|
| 455 |
VM_EVENT(kvm, 3, "create cpu %d at %p, sie block at %p", id, vcpu,
|
| 456 |
vcpu->arch.sie_block);
|
| 457 |
|
| 458 |
return vcpu;
|
| 459 |
+out_free_sie_block:
|
| 460 |
+ free_page((unsigned long)(vcpu->arch.sie_block));
|
| 461 |
out_free_cpu:
|
| 462 |
kfree(vcpu);
|
| 463 |
out_nomem:
|
| 464 |
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
|
| 465 |
index 6ead43e..9113954 100644
|
| 466 |
--- a/arch/x86/include/asm/kvm_host.h
|
| 467 |
+++ b/arch/x86/include/asm/kvm_host.h
|
| 468 |
@@ -193,6 +193,7 @@ union kvm_mmu_page_role {
|
| 469 |
unsigned invalid:1;
|
| 470 |
unsigned cr4_pge:1;
|
| 471 |
unsigned nxe:1;
|
| 472 |
+ unsigned cr0_wp:1;
|
| 473 |
};
|
| 474 |
};
|
| 475 |
|
| 476 |
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
|
| 477 |
index 7825b0c..a7881c7 100644
|
| 478 |
--- a/arch/x86/include/asm/msr-index.h
|
| 479 |
+++ b/arch/x86/include/asm/msr-index.h
|
| 480 |
@@ -198,8 +198,9 @@
|
| 481 |
#define MSR_IA32_EBL_CR_POWERON 0x0000002a
|
| 482 |
#define MSR_IA32_FEATURE_CONTROL 0x0000003a
|
| 483 |
|
| 484 |
-#define FEATURE_CONTROL_LOCKED (1<<0)
|
| 485 |
-#define FEATURE_CONTROL_VMXON_ENABLED (1<<2)
|
| 486 |
+#define FEATURE_CONTROL_LOCKED (1<<0)
|
| 487 |
+#define FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX (1<<1)
|
| 488 |
+#define FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX (1<<2)
|
| 489 |
|
| 490 |
#define MSR_IA32_APICBASE 0x0000001b
|
| 491 |
#define MSR_IA32_APICBASE_BSP (1<<8)
|
| 492 |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
|
| 493 |
index c0ebc63..f0fa7a1 100644
|
| 494 |
--- a/arch/x86/kernel/amd_iommu.c
|
| 495 |
+++ b/arch/x86/kernel/amd_iommu.c
|
| 496 |
@@ -544,7 +544,7 @@ static void flush_devices_by_domain(struct protection_domain *domain)
|
| 497 |
|
| 498 |
for (i = 0; i <= amd_iommu_last_bdf; ++i) {
|
| 499 |
if ((domain == NULL && amd_iommu_pd_table[i] == NULL) ||
|
| 500 |
- (amd_iommu_pd_table[i] != domain))
|
| 501 |
+ (domain != NULL && amd_iommu_pd_table[i] != domain))
|
| 502 |
continue;
|
| 503 |
|
| 504 |
iommu = amd_iommu_rlookup_table[i];
|
| 505 |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
|
| 506 |
index efea222..0ff02ca 100644
|
| 507 |
--- a/arch/x86/kernel/cpu/perf_event.c
|
| 508 |
+++ b/arch/x86/kernel/cpu/perf_event.c
|
| 509 |
@@ -1005,8 +1005,11 @@ static int __hw_perf_event_init(struct perf_event *event)
|
| 510 |
if (atomic_read(&active_events) == 0) {
|
| 511 |
if (!reserve_pmc_hardware())
|
| 512 |
err = -EBUSY;
|
| 513 |
- else
|
| 514 |
+ else {
|
| 515 |
err = reserve_bts_hardware();
|
| 516 |
+ if (err)
|
| 517 |
+ release_pmc_hardware();
|
| 518 |
+ }
|
| 519 |
}
|
| 520 |
if (!err)
|
| 521 |
atomic_inc(&active_events);
|
| 522 |
diff --git a/arch/x86/kernel/pvclock.c b/arch/x86/kernel/pvclock.c
|
| 523 |
index 03801f2..dfdfe46 100644
|
| 524 |
--- a/arch/x86/kernel/pvclock.c
|
| 525 |
+++ b/arch/x86/kernel/pvclock.c
|
| 526 |
@@ -109,11 +109,14 @@ unsigned long pvclock_tsc_khz(struct pvclock_vcpu_time_info *src)
|
| 527 |
return pv_tsc_khz;
|
| 528 |
}
|
| 529 |
|
| 530 |
+static atomic64_t last_value = ATOMIC64_INIT(0);
|
| 531 |
+
|
| 532 |
cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
|
| 533 |
{
|
| 534 |
struct pvclock_shadow_time shadow;
|
| 535 |
unsigned version;
|
| 536 |
cycle_t ret, offset;
|
| 537 |
+ u64 last;
|
| 538 |
|
| 539 |
do {
|
| 540 |
version = pvclock_get_time_values(&shadow, src);
|
| 541 |
@@ -123,6 +126,27 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
|
| 542 |
barrier();
|
| 543 |
} while (version != src->version);
|
| 544 |
|
| 545 |
+ /*
|
| 546 |
+ * Assumption here is that last_value, a global accumulator, always goes
|
| 547 |
+ * forward. If we are less than that, we should not be much smaller.
|
| 548 |
+ * We assume there is an error marging we're inside, and then the correction
|
| 549 |
+ * does not sacrifice accuracy.
|
| 550 |
+ *
|
| 551 |
+ * For reads: global may have changed between test and return,
|
| 552 |
+ * but this means someone else updated poked the clock at a later time.
|
| 553 |
+ * We just need to make sure we are not seeing a backwards event.
|
| 554 |
+ *
|
| 555 |
+ * For updates: last_value = ret is not enough, since two vcpus could be
|
| 556 |
+ * updating at the same time, and one of them could be slightly behind,
|
| 557 |
+ * making the assumption that last_value always go forward fail to hold.
|
| 558 |
+ */
|
| 559 |
+ last = atomic64_read(&last_value);
|
| 560 |
+ do {
|
| 561 |
+ if (ret < last)
|
| 562 |
+ return last;
|
| 563 |
+ last = atomic64_cmpxchg(&last_value, last, ret);
|
| 564 |
+ } while (unlikely(last != ret));
|
| 565 |
+
|
| 566 |
return ret;
|
| 567 |
}
|
| 568 |
|
| 569 |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
| 570 |
index 8425f7e..d7a0888 100644
|
| 571 |
--- a/arch/x86/kernel/setup.c
|
| 572 |
+++ b/arch/x86/kernel/setup.c
|
| 573 |
@@ -688,6 +688,17 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
|
| 574 |
DMI_MATCH(DMI_BOARD_NAME, "DG45FC"),
|
| 575 |
},
|
| 576 |
},
|
| 577 |
+ /*
|
| 578 |
+ * The Dell Inspiron Mini 1012 has DMI_BIOS_VENDOR = "Dell Inc.", so
|
| 579 |
+ * match on the product name.
|
| 580 |
+ */
|
| 581 |
+ {
|
| 582 |
+ .callback = dmi_low_memory_corruption,
|
| 583 |
+ .ident = "Phoenix BIOS",
|
| 584 |
+ .matches = {
|
| 585 |
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
|
| 586 |
+ },
|
| 587 |
+ },
|
| 588 |
#endif
|
| 589 |
{}
|
| 590 |
};
|
| 591 |
diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
|
| 592 |
index 86c9f91..46b8277 100644
|
| 593 |
--- a/arch/x86/kernel/tboot.c
|
| 594 |
+++ b/arch/x86/kernel/tboot.c
|
| 595 |
@@ -46,6 +46,7 @@
|
| 596 |
|
| 597 |
/* Global pointer to shared data; NULL means no measured launch. */
|
| 598 |
struct tboot *tboot __read_mostly;
|
| 599 |
+EXPORT_SYMBOL(tboot);
|
| 600 |
|
| 601 |
/* timeout for APs (in secs) to enter wait-for-SIPI state during shutdown */
|
| 602 |
#define AP_WAIT_TIMEOUT 1
|
| 603 |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
|
| 604 |
index 762efc2..a265626 100644
|
| 605 |
--- a/arch/x86/kvm/mmu.c
|
| 606 |
+++ b/arch/x86/kvm/mmu.c
|
| 607 |
@@ -221,7 +221,7 @@ void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask,
|
| 608 |
}
|
| 609 |
EXPORT_SYMBOL_GPL(kvm_mmu_set_mask_ptes);
|
| 610 |
|
| 611 |
-static int is_write_protection(struct kvm_vcpu *vcpu)
|
| 612 |
+static bool is_write_protection(struct kvm_vcpu *vcpu)
|
| 613 |
{
|
| 614 |
return vcpu->arch.cr0 & X86_CR0_WP;
|
| 615 |
}
|
| 616 |
@@ -2091,11 +2091,13 @@ static int mmu_alloc_roots(struct kvm_vcpu *vcpu)
|
| 617 |
direct = 1;
|
| 618 |
if (mmu_check_root(vcpu, root_gfn))
|
| 619 |
return 1;
|
| 620 |
+ spin_lock(&vcpu->kvm->mmu_lock);
|
| 621 |
sp = kvm_mmu_get_page(vcpu, root_gfn, 0,
|
| 622 |
PT64_ROOT_LEVEL, direct,
|
| 623 |
ACC_ALL, NULL);
|
| 624 |
root = __pa(sp->spt);
|
| 625 |
++sp->root_count;
|
| 626 |
+ spin_unlock(&vcpu->kvm->mmu_lock);
|
| 627 |
vcpu->arch.mmu.root_hpa = root;
|
| 628 |
return 0;
|
| 629 |
}
|
| 630 |
@@ -2117,11 +2119,14 @@ static int mmu_alloc_roots(struct kvm_vcpu *vcpu)
|
| 631 |
root_gfn = 0;
|
| 632 |
if (mmu_check_root(vcpu, root_gfn))
|
| 633 |
return 1;
|
| 634 |
+ spin_lock(&vcpu->kvm->mmu_lock);
|
| 635 |
sp = kvm_mmu_get_page(vcpu, root_gfn, i << 30,
|
| 636 |
PT32_ROOT_LEVEL, direct,
|
| 637 |
ACC_ALL, NULL);
|
| 638 |
root = __pa(sp->spt);
|
| 639 |
++sp->root_count;
|
| 640 |
+ spin_unlock(&vcpu->kvm->mmu_lock);
|
| 641 |
+
|
| 642 |
vcpu->arch.mmu.pae_root[i] = root | PT_PRESENT_MASK;
|
| 643 |
}
|
| 644 |
vcpu->arch.mmu.root_hpa = __pa(vcpu->arch.mmu.pae_root);
|
| 645 |
@@ -2445,6 +2450,7 @@ static int init_kvm_softmmu(struct kvm_vcpu *vcpu)
|
| 646 |
r = paging32_init_context(vcpu);
|
| 647 |
|
| 648 |
vcpu->arch.mmu.base_role.glevels = vcpu->arch.mmu.root_level;
|
| 649 |
+ vcpu->arch.mmu.base_role.cr0_wp = is_write_protection(vcpu);
|
| 650 |
|
| 651 |
return r;
|
| 652 |
}
|
| 653 |
@@ -2484,7 +2490,9 @@ int kvm_mmu_load(struct kvm_vcpu *vcpu)
|
| 654 |
goto out;
|
| 655 |
spin_lock(&vcpu->kvm->mmu_lock);
|
| 656 |
kvm_mmu_free_some_pages(vcpu);
|
| 657 |
+ spin_unlock(&vcpu->kvm->mmu_lock);
|
| 658 |
r = mmu_alloc_roots(vcpu);
|
| 659 |
+ spin_lock(&vcpu->kvm->mmu_lock);
|
| 660 |
mmu_sync_roots(vcpu);
|
| 661 |
spin_unlock(&vcpu->kvm->mmu_lock);
|
| 662 |
if (r)
|
| 663 |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
|
| 664 |
index fa297d6..6a28d5d 100644
|
| 665 |
--- a/arch/x86/kvm/vmx.c
|
| 666 |
+++ b/arch/x86/kvm/vmx.c
|
| 667 |
@@ -26,6 +26,7 @@
|
| 668 |
#include <linux/sched.h>
|
| 669 |
#include <linux/moduleparam.h>
|
| 670 |
#include <linux/ftrace_event.h>
|
| 671 |
+#include <linux/tboot.h>
|
| 672 |
#include "kvm_cache_regs.h"
|
| 673 |
#include "x86.h"
|
| 674 |
|
| 675 |
@@ -1140,9 +1141,16 @@ static __init int vmx_disabled_by_bios(void)
|
| 676 |
u64 msr;
|
| 677 |
|
| 678 |
rdmsrl(MSR_IA32_FEATURE_CONTROL, msr);
|
| 679 |
- return (msr & (FEATURE_CONTROL_LOCKED |
|
| 680 |
- FEATURE_CONTROL_VMXON_ENABLED))
|
| 681 |
- == FEATURE_CONTROL_LOCKED;
|
| 682 |
+ if (msr & FEATURE_CONTROL_LOCKED) {
|
| 683 |
+ if (!(msr & FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX)
|
| 684 |
+ && tboot_enabled())
|
| 685 |
+ return 1;
|
| 686 |
+ if (!(msr & FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX)
|
| 687 |
+ && !tboot_enabled())
|
| 688 |
+ return 1;
|
| 689 |
+ }
|
| 690 |
+
|
| 691 |
+ return 0;
|
| 692 |
/* locked but not enabled */
|
| 693 |
}
|
| 694 |
|
| 695 |
@@ -1150,18 +1158,20 @@ static void hardware_enable(void *garbage)
|
| 696 |
{
|
| 697 |
int cpu = raw_smp_processor_id();
|
| 698 |
u64 phys_addr = __pa(per_cpu(vmxarea, cpu));
|
| 699 |
- u64 old;
|
| 700 |
+ u64 old, test_bits;
|
| 701 |
|
| 702 |
INIT_LIST_HEAD(&per_cpu(vcpus_on_cpu, cpu));
|
| 703 |
rdmsrl(MSR_IA32_FEATURE_CONTROL, old);
|
| 704 |
- if ((old & (FEATURE_CONTROL_LOCKED |
|
| 705 |
- FEATURE_CONTROL_VMXON_ENABLED))
|
| 706 |
- != (FEATURE_CONTROL_LOCKED |
|
| 707 |
- FEATURE_CONTROL_VMXON_ENABLED))
|
| 708 |
+
|
| 709 |
+ test_bits = FEATURE_CONTROL_LOCKED;
|
| 710 |
+ test_bits |= FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX;
|
| 711 |
+ if (tboot_enabled())
|
| 712 |
+ test_bits |= FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX;
|
| 713 |
+
|
| 714 |
+ if ((old & test_bits) != test_bits) {
|
| 715 |
/* enable and lock */
|
| 716 |
- wrmsrl(MSR_IA32_FEATURE_CONTROL, old |
|
| 717 |
- FEATURE_CONTROL_LOCKED |
|
| 718 |
- FEATURE_CONTROL_VMXON_ENABLED);
|
| 719 |
+ wrmsrl(MSR_IA32_FEATURE_CONTROL, old | test_bits);
|
| 720 |
+ }
|
| 721 |
write_cr4(read_cr4() | X86_CR4_VMXE); /* FIXME: not cpu hotplug safe */
|
| 722 |
asm volatile (ASM_VMX_VMXON_RAX
|
| 723 |
: : "a"(&phys_addr), "m"(phys_addr)
|
| 724 |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
| 725 |
index 2782509..281ac63 100644
|
| 726 |
--- a/arch/x86/kvm/x86.c
|
| 727 |
+++ b/arch/x86/kvm/x86.c
|
| 728 |
@@ -345,7 +345,7 @@ EXPORT_SYMBOL_GPL(kvm_set_cr0);
|
| 729 |
|
| 730 |
void kvm_lmsw(struct kvm_vcpu *vcpu, unsigned long msw)
|
| 731 |
{
|
| 732 |
- kvm_set_cr0(vcpu, (vcpu->arch.cr0 & ~0x0ful) | (msw & 0x0f));
|
| 733 |
+ kvm_set_cr0(vcpu, (vcpu->arch.cr0 & ~0x0eul) | (msw & 0x0f));
|
| 734 |
}
|
| 735 |
EXPORT_SYMBOL_GPL(kvm_lmsw);
|
| 736 |
|
| 737 |
@@ -483,48 +483,42 @@ static u32 emulated_msrs[] = {
|
| 738 |
MSR_IA32_MISC_ENABLE,
|
| 739 |
};
|
| 740 |
|
| 741 |
-static void set_efer(struct kvm_vcpu *vcpu, u64 efer)
|
| 742 |
+static int set_efer(struct kvm_vcpu *vcpu, u64 efer)
|
| 743 |
{
|
| 744 |
- if (efer & efer_reserved_bits) {
|
| 745 |
- kvm_inject_gp(vcpu, 0);
|
| 746 |
- return;
|
| 747 |
- }
|
| 748 |
+ if (efer & efer_reserved_bits)
|
| 749 |
+ return 1;
|
| 750 |
|
| 751 |
if (is_paging(vcpu)
|
| 752 |
- && (vcpu->arch.shadow_efer & EFER_LME) != (efer & EFER_LME)) {
|
| 753 |
- kvm_inject_gp(vcpu, 0);
|
| 754 |
- return;
|
| 755 |
- }
|
| 756 |
+ && (vcpu->arch.shadow_efer & EFER_LME) != (efer & EFER_LME))
|
| 757 |
+ return 1;
|
| 758 |
|
| 759 |
if (efer & EFER_FFXSR) {
|
| 760 |
struct kvm_cpuid_entry2 *feat;
|
| 761 |
|
| 762 |
feat = kvm_find_cpuid_entry(vcpu, 0x80000001, 0);
|
| 763 |
- if (!feat || !(feat->edx & bit(X86_FEATURE_FXSR_OPT))) {
|
| 764 |
- kvm_inject_gp(vcpu, 0);
|
| 765 |
- return;
|
| 766 |
- }
|
| 767 |
+ if (!feat || !(feat->edx & bit(X86_FEATURE_FXSR_OPT)))
|
| 768 |
+ return 1;
|
| 769 |
}
|
| 770 |
|
| 771 |
if (efer & EFER_SVME) {
|
| 772 |
struct kvm_cpuid_entry2 *feat;
|
| 773 |
|
| 774 |
feat = kvm_find_cpuid_entry(vcpu, 0x80000001, 0);
|
| 775 |
- if (!feat || !(feat->ecx & bit(X86_FEATURE_SVM))) {
|
| 776 |
- kvm_inject_gp(vcpu, 0);
|
| 777 |
- return;
|
| 778 |
- }
|
| 779 |
+ if (!feat || !(feat->ecx & bit(X86_FEATURE_SVM)))
|
| 780 |
+ return 1;
|
| 781 |
}
|
| 782 |
|
| 783 |
- kvm_x86_ops->set_efer(vcpu, efer);
|
| 784 |
-
|
| 785 |
efer &= ~EFER_LMA;
|
| 786 |
efer |= vcpu->arch.shadow_efer & EFER_LMA;
|
| 787 |
|
| 788 |
+ kvm_x86_ops->set_efer(vcpu, efer);
|
| 789 |
+
|
| 790 |
vcpu->arch.shadow_efer = efer;
|
| 791 |
|
| 792 |
vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled;
|
| 793 |
kvm_mmu_reset_context(vcpu);
|
| 794 |
+
|
| 795 |
+ return 0;
|
| 796 |
}
|
| 797 |
|
| 798 |
void kvm_enable_efer_bits(u64 mask)
|
| 799 |
@@ -554,14 +548,22 @@ static int do_set_msr(struct kvm_vcpu *vcpu, unsigned index, u64 *data)
|
| 800 |
|
| 801 |
static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
|
| 802 |
{
|
| 803 |
- static int version;
|
| 804 |
+ int version;
|
| 805 |
+ int r;
|
| 806 |
struct pvclock_wall_clock wc;
|
| 807 |
struct timespec boot;
|
| 808 |
|
| 809 |
if (!wall_clock)
|
| 810 |
return;
|
| 811 |
|
| 812 |
- version++;
|
| 813 |
+ r = kvm_read_guest(kvm, wall_clock, &version, sizeof(version));
|
| 814 |
+ if (r)
|
| 815 |
+ return;
|
| 816 |
+
|
| 817 |
+ if (version & 1)
|
| 818 |
+ ++version; /* first time write, random junk */
|
| 819 |
+
|
| 820 |
+ ++version;
|
| 821 |
|
| 822 |
kvm_write_guest(kvm, wall_clock, &version, sizeof(version));
|
| 823 |
|
| 824 |
@@ -819,8 +821,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
|
| 825 |
{
|
| 826 |
switch (msr) {
|
| 827 |
case MSR_EFER:
|
| 828 |
- set_efer(vcpu, data);
|
| 829 |
- break;
|
| 830 |
+ return set_efer(vcpu, data);
|
| 831 |
case MSR_K7_HWCR:
|
| 832 |
data &= ~(u64)0x40; /* ignore flush filter disable */
|
| 833 |
if (data != 0) {
|
| 834 |
@@ -1412,6 +1413,7 @@ static int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
|
| 835 |
{
|
| 836 |
int r;
|
| 837 |
|
| 838 |
+ vcpu_load(vcpu);
|
| 839 |
r = -E2BIG;
|
| 840 |
if (cpuid->nent < vcpu->arch.cpuid_nent)
|
| 841 |
goto out;
|
| 842 |
@@ -1423,6 +1425,7 @@ static int kvm_vcpu_ioctl_get_cpuid2(struct kvm_vcpu *vcpu,
|
| 843 |
|
| 844 |
out:
|
| 845 |
cpuid->nent = vcpu->arch.cpuid_nent;
|
| 846 |
+ vcpu_put(vcpu);
|
| 847 |
return r;
|
| 848 |
}
|
| 849 |
|
| 850 |
@@ -1672,6 +1675,7 @@ static int kvm_vcpu_ioctl_x86_setup_mce(struct kvm_vcpu *vcpu,
|
| 851 |
int r;
|
| 852 |
unsigned bank_num = mcg_cap & 0xff, bank;
|
| 853 |
|
| 854 |
+ vcpu_load(vcpu);
|
| 855 |
r = -EINVAL;
|
| 856 |
if (!bank_num || bank_num >= KVM_MAX_MCE_BANKS)
|
| 857 |
goto out;
|
| 858 |
@@ -1686,6 +1690,7 @@ static int kvm_vcpu_ioctl_x86_setup_mce(struct kvm_vcpu *vcpu,
|
| 859 |
for (bank = 0; bank < bank_num; bank++)
|
| 860 |
vcpu->arch.mce_banks[bank*4] = ~(u64)0;
|
| 861 |
out:
|
| 862 |
+ vcpu_put(vcpu);
|
| 863 |
return r;
|
| 864 |
}
|
| 865 |
|
| 866 |
@@ -1888,7 +1893,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
|
| 867 |
r = -EFAULT;
|
| 868 |
if (copy_from_user(&mce, argp, sizeof mce))
|
| 869 |
goto out;
|
| 870 |
+ vcpu_load(vcpu);
|
| 871 |
r = kvm_vcpu_ioctl_x86_set_mce(vcpu, &mce);
|
| 872 |
+ vcpu_put(vcpu);
|
| 873 |
break;
|
| 874 |
}
|
| 875 |
default:
|
| 876 |
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
|
| 877 |
index 2c505ee..f1fb411 100644
|
| 878 |
--- a/arch/x86/oprofile/nmi_int.c
|
| 879 |
+++ b/arch/x86/oprofile/nmi_int.c
|
| 880 |
@@ -95,7 +95,10 @@ static void nmi_cpu_save_registers(struct op_msrs *msrs)
|
| 881 |
static void nmi_cpu_start(void *dummy)
|
| 882 |
{
|
| 883 |
struct op_msrs const *msrs = &__get_cpu_var(cpu_msrs);
|
| 884 |
- model->start(msrs);
|
| 885 |
+ if (!msrs->controls)
|
| 886 |
+ WARN_ON_ONCE(1);
|
| 887 |
+ else
|
| 888 |
+ model->start(msrs);
|
| 889 |
}
|
| 890 |
|
| 891 |
static int nmi_start(void)
|
| 892 |
@@ -107,7 +110,10 @@ static int nmi_start(void)
|
| 893 |
static void nmi_cpu_stop(void *dummy)
|
| 894 |
{
|
| 895 |
struct op_msrs const *msrs = &__get_cpu_var(cpu_msrs);
|
| 896 |
- model->stop(msrs);
|
| 897 |
+ if (!msrs->controls)
|
| 898 |
+ WARN_ON_ONCE(1);
|
| 899 |
+ else
|
| 900 |
+ model->stop(msrs);
|
| 901 |
}
|
| 902 |
|
| 903 |
static void nmi_stop(void)
|
| 904 |
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
|
| 905 |
index 987267f..a9c6611 100644
|
| 906 |
--- a/arch/x86/xen/suspend.c
|
| 907 |
+++ b/arch/x86/xen/suspend.c
|
| 908 |
@@ -60,6 +60,6 @@ static void xen_vcpu_notify_restore(void *data)
|
| 909 |
|
| 910 |
void xen_arch_resume(void)
|
| 911 |
{
|
| 912 |
- smp_call_function(xen_vcpu_notify_restore,
|
| 913 |
- (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
|
| 914 |
+ on_each_cpu(xen_vcpu_notify_restore,
|
| 915 |
+ (void *)CLOCK_EVT_NOTIFY_RESUME, 1);
|
| 916 |
}
|
| 917 |
diff --git a/arch/xtensa/include/asm/cache.h b/arch/xtensa/include/asm/cache.h
|
| 918 |
index f04c989..ed8cd3c 100644
|
| 919 |
--- a/arch/xtensa/include/asm/cache.h
|
| 920 |
+++ b/arch/xtensa/include/asm/cache.h
|
| 921 |
@@ -29,5 +29,6 @@
|
| 922 |
# define CACHE_WAY_SIZE ICACHE_WAY_SIZE
|
| 923 |
#endif
|
| 924 |
|
| 925 |
+#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES
|
| 926 |
|
| 927 |
#endif /* _XTENSA_CACHE_H */
|
| 928 |
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
|
| 929 |
index 575593a..e7b9606 100644
|
| 930 |
--- a/drivers/acpi/video_detect.c
|
| 931 |
+++ b/drivers/acpi/video_detect.c
|
| 932 |
@@ -250,7 +250,7 @@ static int __init acpi_backlight(char *str)
|
| 933 |
ACPI_VIDEO_BACKLIGHT_FORCE_VENDOR;
|
| 934 |
if (!strcmp("video", str))
|
| 935 |
acpi_video_support |=
|
| 936 |
- ACPI_VIDEO_OUTPUT_SWITCHING_FORCE_VIDEO;
|
| 937 |
+ ACPI_VIDEO_BACKLIGHT_FORCE_VIDEO;
|
| 938 |
}
|
| 939 |
return 1;
|
| 940 |
}
|
| 941 |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
|
| 942 |
index 3b09e83..6a96da6 100644
|
| 943 |
--- a/drivers/ata/libata-core.c
|
| 944 |
+++ b/drivers/ata/libata-core.c
|
| 945 |
@@ -159,6 +159,10 @@ int libata_allow_tpm = 0;
|
| 946 |
module_param_named(allow_tpm, libata_allow_tpm, int, 0444);
|
| 947 |
MODULE_PARM_DESC(allow_tpm, "Permit the use of TPM commands (0=off [default], 1=on)");
|
| 948 |
|
| 949 |
+static int atapi_an;
|
| 950 |
+module_param(atapi_an, int, 0444);
|
| 951 |
+MODULE_PARM_DESC(atapi_an, "Enable ATAPI AN media presence notification (0=0ff [default], 1=on)");
|
| 952 |
+
|
| 953 |
MODULE_AUTHOR("Jeff Garzik");
|
| 954 |
MODULE_DESCRIPTION("Library module for ATA devices");
|
| 955 |
MODULE_LICENSE("GPL");
|
| 956 |
@@ -2570,7 +2574,8 @@ int ata_dev_configure(struct ata_device *dev)
|
| 957 |
* to enable ATAPI AN to discern between PHY status
|
| 958 |
* changed notifications and ATAPI ANs.
|
| 959 |
*/
|
| 960 |
- if ((ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) &&
|
| 961 |
+ if (atapi_an &&
|
| 962 |
+ (ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) &&
|
| 963 |
(!sata_pmp_attached(ap) ||
|
| 964 |
sata_scr_read(&ap->link, SCR_NOTIFICATION, &sntf) == 0)) {
|
| 965 |
unsigned int err_mask;
|
| 966 |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
|
| 967 |
index 2ae15c3..776a895 100644
|
| 968 |
--- a/drivers/ata/libata-sff.c
|
| 969 |
+++ b/drivers/ata/libata-sff.c
|
| 970 |
@@ -893,7 +893,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
|
| 971 |
do_write);
|
| 972 |
}
|
| 973 |
|
| 974 |
- if (!do_write)
|
| 975 |
+ if (!do_write && !PageSlab(page))
|
| 976 |
flush_dcache_page(page);
|
| 977 |
|
| 978 |
qc->curbytes += qc->sect_size;
|
| 979 |
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
|
| 980 |
index 1eb4e02..ae2297c 100644
|
| 981 |
--- a/drivers/ata/sata_nv.c
|
| 982 |
+++ b/drivers/ata/sata_nv.c
|
| 983 |
@@ -1673,7 +1673,6 @@ static void nv_mcp55_freeze(struct ata_port *ap)
|
| 984 |
mask = readl(mmio_base + NV_INT_ENABLE_MCP55);
|
| 985 |
mask &= ~(NV_INT_ALL_MCP55 << shift);
|
| 986 |
writel(mask, mmio_base + NV_INT_ENABLE_MCP55);
|
| 987 |
- ata_sff_freeze(ap);
|
| 988 |
}
|
| 989 |
|
| 990 |
static void nv_mcp55_thaw(struct ata_port *ap)
|
| 991 |
@@ -1687,7 +1686,6 @@ static void nv_mcp55_thaw(struct ata_port *ap)
|
| 992 |
mask = readl(mmio_base + NV_INT_ENABLE_MCP55);
|
| 993 |
mask |= (NV_INT_MASK_MCP55 << shift);
|
| 994 |
writel(mask, mmio_base + NV_INT_ENABLE_MCP55);
|
| 995 |
- ata_sff_thaw(ap);
|
| 996 |
}
|
| 997 |
|
| 998 |
static void nv_adma_error_handler(struct ata_port *ap)
|
| 999 |
@@ -2478,8 +2476,7 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
| 1000 |
}
|
| 1001 |
|
| 1002 |
pci_set_master(pdev);
|
| 1003 |
- return ata_host_activate(host, pdev->irq, ipriv->irq_handler,
|
| 1004 |
- IRQF_SHARED, ipriv->sht);
|
| 1005 |
+ return ata_pci_sff_activate_host(host, ipriv->irq_handler, ipriv->sht);
|
| 1006 |
}
|
| 1007 |
|
| 1008 |
#ifdef CONFIG_PM
|
| 1009 |
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
|
| 1010 |
index 02efd9a..e35596b 100644
|
| 1011 |
--- a/drivers/ata/sata_via.c
|
| 1012 |
+++ b/drivers/ata/sata_via.c
|
| 1013 |
@@ -558,6 +558,19 @@ static void svia_configure(struct pci_dev *pdev)
|
| 1014 |
tmp8 |= NATIVE_MODE_ALL;
|
| 1015 |
pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8);
|
| 1016 |
}
|
| 1017 |
+
|
| 1018 |
+ /*
|
| 1019 |
+ * vt6421 has problems talking to some drives. The following
|
| 1020 |
+ * is the magic fix from Joseph Chan <JosephChan@via.com.tw>.
|
| 1021 |
+ * Please add proper documentation if possible.
|
| 1022 |
+ *
|
| 1023 |
+ * https://bugzilla.kernel.org/show_bug.cgi?id=15173
|
| 1024 |
+ */
|
| 1025 |
+ if (pdev->device == 0x3249) {
|
| 1026 |
+ pci_read_config_byte(pdev, 0x52, &tmp8);
|
| 1027 |
+ tmp8 |= 1 << 2;
|
| 1028 |
+ pci_write_config_byte(pdev, 0x52, tmp8);
|
| 1029 |
+ }
|
| 1030 |
}
|
| 1031 |
|
| 1032 |
static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
| 1033 |
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
|
| 1034 |
index e62a4cc..1e2196f 100644
|
| 1035 |
--- a/drivers/base/cpu.c
|
| 1036 |
+++ b/drivers/base/cpu.c
|
| 1037 |
@@ -149,7 +149,7 @@ static ssize_t print_cpus_offline(struct sysdev_class *class, char *buf)
|
| 1038 |
/* display offline cpus < nr_cpu_ids */
|
| 1039 |
if (!alloc_cpumask_var(&offline, GFP_KERNEL))
|
| 1040 |
return -ENOMEM;
|
| 1041 |
- cpumask_complement(offline, cpu_online_mask);
|
| 1042 |
+ cpumask_andnot(offline, cpu_possible_mask, cpu_online_mask);
|
| 1043 |
n = cpulist_scnprintf(buf, len, offline);
|
| 1044 |
free_cpumask_var(offline);
|
| 1045 |
|
| 1046 |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
|
| 1047 |
index d2e6980..abae8c9 100644
|
| 1048 |
--- a/drivers/char/ipmi/ipmi_si_intf.c
|
| 1049 |
+++ b/drivers/char/ipmi/ipmi_si_intf.c
|
| 1050 |
@@ -310,9 +310,14 @@ static void deliver_recv_msg(struct smi_info *smi_info,
|
| 1051 |
{
|
| 1052 |
/* Deliver the message to the upper layer with the lock
|
| 1053 |
released. */
|
| 1054 |
- spin_unlock(&(smi_info->si_lock));
|
| 1055 |
- ipmi_smi_msg_received(smi_info->intf, msg);
|
| 1056 |
- spin_lock(&(smi_info->si_lock));
|
| 1057 |
+
|
| 1058 |
+ if (smi_info->run_to_completion) {
|
| 1059 |
+ ipmi_smi_msg_received(smi_info->intf, msg);
|
| 1060 |
+ } else {
|
| 1061 |
+ spin_unlock(&(smi_info->si_lock));
|
| 1062 |
+ ipmi_smi_msg_received(smi_info->intf, msg);
|
| 1063 |
+ spin_lock(&(smi_info->si_lock));
|
| 1064 |
+ }
|
| 1065 |
}
|
| 1066 |
|
| 1067 |
static void return_hosed_msg(struct smi_info *smi_info, int cCode)
|
| 1068 |
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
|
| 1069 |
index 6fe4f77..234d9f6 100644
|
| 1070 |
--- a/drivers/clocksource/sh_cmt.c
|
| 1071 |
+++ b/drivers/clocksource/sh_cmt.c
|
| 1072 |
@@ -413,18 +413,10 @@ static cycle_t sh_cmt_clocksource_read(struct clocksource *cs)
|
| 1073 |
static int sh_cmt_clocksource_enable(struct clocksource *cs)
|
| 1074 |
{
|
| 1075 |
struct sh_cmt_priv *p = cs_to_sh_cmt(cs);
|
| 1076 |
- int ret;
|
| 1077 |
|
| 1078 |
p->total_cycles = 0;
|
| 1079 |
|
| 1080 |
- ret = sh_cmt_start(p, FLAG_CLOCKSOURCE);
|
| 1081 |
- if (ret)
|
| 1082 |
- return ret;
|
| 1083 |
-
|
| 1084 |
- /* TODO: calculate good shift from rate and counter bit width */
|
| 1085 |
- cs->shift = 0;
|
| 1086 |
- cs->mult = clocksource_hz2mult(p->rate, cs->shift);
|
| 1087 |
- return 0;
|
| 1088 |
+ return sh_cmt_start(p, FLAG_CLOCKSOURCE);
|
| 1089 |
}
|
| 1090 |
|
| 1091 |
static void sh_cmt_clocksource_disable(struct clocksource *cs)
|
| 1092 |
@@ -444,7 +436,18 @@ static int sh_cmt_register_clocksource(struct sh_cmt_priv *p,
|
| 1093 |
cs->disable = sh_cmt_clocksource_disable;
|
| 1094 |
cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8);
|
| 1095 |
cs->flags = CLOCK_SOURCE_IS_CONTINUOUS;
|
| 1096 |
+
|
| 1097 |
+ /* clk_get_rate() needs an enabled clock */
|
| 1098 |
+ clk_enable(p->clk);
|
| 1099 |
+ p->rate = clk_get_rate(p->clk) / (p->width == 16) ? 512 : 8;
|
| 1100 |
+ clk_disable(p->clk);
|
| 1101 |
+
|
| 1102 |
+ /* TODO: calculate good shift from rate and counter bit width */
|
| 1103 |
+ cs->shift = 10;
|
| 1104 |
+ cs->mult = clocksource_hz2mult(p->rate, cs->shift);
|
| 1105 |
+
|
| 1106 |
pr_info("sh_cmt: %s used as clock source\n", cs->name);
|
| 1107 |
+
|
| 1108 |
clocksource_register(cs);
|
| 1109 |
return 0;
|
| 1110 |
}
|
| 1111 |
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
|
| 1112 |
index ed635ae..3fc2ceb 100644
|
| 1113 |
--- a/drivers/firewire/core-card.c
|
| 1114 |
+++ b/drivers/firewire/core-card.c
|
| 1115 |
@@ -239,7 +239,7 @@ void fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
|
| 1116 |
static void fw_card_bm_work(struct work_struct *work)
|
| 1117 |
{
|
| 1118 |
struct fw_card *card = container_of(work, struct fw_card, work.work);
|
| 1119 |
- struct fw_device *root_device;
|
| 1120 |
+ struct fw_device *root_device, *irm_device;
|
| 1121 |
struct fw_node *root_node;
|
| 1122 |
unsigned long flags;
|
| 1123 |
int root_id, new_root_id, irm_id, local_id;
|
| 1124 |
@@ -247,6 +247,7 @@ static void fw_card_bm_work(struct work_struct *work)
|
| 1125 |
bool do_reset = false;
|
| 1126 |
bool root_device_is_running;
|
| 1127 |
bool root_device_is_cmc;
|
| 1128 |
+ bool irm_is_1394_1995_only;
|
| 1129 |
|
| 1130 |
spin_lock_irqsave(&card->lock, flags);
|
| 1131 |
|
| 1132 |
@@ -256,12 +257,18 @@ static void fw_card_bm_work(struct work_struct *work)
|
| 1133 |
}
|
| 1134 |
|
| 1135 |
generation = card->generation;
|
| 1136 |
+
|
| 1137 |
root_node = card->root_node;
|
| 1138 |
fw_node_get(root_node);
|
| 1139 |
root_device = root_node->data;
|
| 1140 |
root_device_is_running = root_device &&
|
| 1141 |
atomic_read(&root_device->state) == FW_DEVICE_RUNNING;
|
| 1142 |
root_device_is_cmc = root_device && root_device->cmc;
|
| 1143 |
+
|
| 1144 |
+ irm_device = card->irm_node->data;
|
| 1145 |
+ irm_is_1394_1995_only = irm_device && irm_device->config_rom &&
|
| 1146 |
+ (irm_device->config_rom[2] & 0x000000f0) == 0;
|
| 1147 |
+
|
| 1148 |
root_id = root_node->node_id;
|
| 1149 |
irm_id = card->irm_node->node_id;
|
| 1150 |
local_id = card->local_node->node_id;
|
| 1151 |
@@ -284,8 +291,15 @@ static void fw_card_bm_work(struct work_struct *work)
|
| 1152 |
|
| 1153 |
if (!card->irm_node->link_on) {
|
| 1154 |
new_root_id = local_id;
|
| 1155 |
- fw_notify("IRM has link off, making local node (%02x) root.\n",
|
| 1156 |
- new_root_id);
|
| 1157 |
+ fw_notify("%s, making local node (%02x) root.\n",
|
| 1158 |
+ "IRM has link off", new_root_id);
|
| 1159 |
+ goto pick_me;
|
| 1160 |
+ }
|
| 1161 |
+
|
| 1162 |
+ if (irm_is_1394_1995_only) {
|
| 1163 |
+ new_root_id = local_id;
|
| 1164 |
+ fw_notify("%s, making local node (%02x) root.\n",
|
| 1165 |
+ "IRM is not 1394a compliant", new_root_id);
|
| 1166 |
goto pick_me;
|
| 1167 |
}
|
| 1168 |
|
| 1169 |
@@ -324,8 +338,8 @@ static void fw_card_bm_work(struct work_struct *work)
|
| 1170 |
* root, and thus, IRM.
|
| 1171 |
*/
|
| 1172 |
new_root_id = local_id;
|
| 1173 |
- fw_notify("BM lock failed, making local node (%02x) root.\n",
|
| 1174 |
- new_root_id);
|
| 1175 |
+ fw_notify("%s, making local node (%02x) root.\n",
|
| 1176 |
+ "BM lock failed", new_root_id);
|
| 1177 |
goto pick_me;
|
| 1178 |
}
|
| 1179 |
} else if (card->bm_generation != generation) {
|
| 1180 |
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
|
| 1181 |
index 8fb1346..259ec21 100644
|
| 1182 |
--- a/drivers/gpu/drm/drm_edid.c
|
| 1183 |
+++ b/drivers/gpu/drm/drm_edid.c
|
| 1184 |
@@ -324,7 +324,7 @@ static struct drm_display_mode drm_dmt_modes[] = {
|
| 1185 |
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
|
| 1186 |
/* 1024x768@85Hz */
|
| 1187 |
{ DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 94500, 1024, 1072,
|
| 1188 |
- 1072, 1376, 0, 768, 769, 772, 808, 0,
|
| 1189 |
+ 1168, 1376, 0, 768, 769, 772, 808, 0,
|
| 1190 |
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
|
| 1191 |
/* 1152x864@75Hz */
|
| 1192 |
{ DRM_MODE("1152x864", DRM_MODE_TYPE_DRIVER, 108000, 1152, 1216,
|
| 1193 |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
|
| 1194 |
index aa8a4e9..df6f7c9 100644
|
| 1195 |
--- a/drivers/gpu/drm/i915/i915_gem.c
|
| 1196 |
+++ b/drivers/gpu/drm/i915/i915_gem.c
|
| 1197 |
@@ -2615,6 +2615,14 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
|
| 1198 |
return -EINVAL;
|
| 1199 |
}
|
| 1200 |
|
| 1201 |
+ /* If the object is bigger than the entire aperture, reject it early
|
| 1202 |
+ * before evicting everything in a vain attempt to find space.
|
| 1203 |
+ */
|
| 1204 |
+ if (obj->size > dev->gtt_total) {
|
| 1205 |
+ DRM_ERROR("Attempting to bind an object larger than the aperture\n");
|
| 1206 |
+ return -E2BIG;
|
| 1207 |
+ }
|
| 1208 |
+
|
| 1209 |
search_free:
|
| 1210 |
free_space = drm_mm_search_free(&dev_priv->mm.gtt_space,
|
| 1211 |
obj->size, alignment, 0);
|
| 1212 |
@@ -3939,6 +3947,17 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment)
|
| 1213 |
int ret;
|
| 1214 |
|
| 1215 |
i915_verify_inactive(dev, __FILE__, __LINE__);
|
| 1216 |
+
|
| 1217 |
+ if (obj_priv->gtt_space != NULL) {
|
| 1218 |
+ if (alignment == 0)
|
| 1219 |
+ alignment = i915_gem_get_gtt_alignment(obj);
|
| 1220 |
+ if (obj_priv->gtt_offset & (alignment - 1)) {
|
| 1221 |
+ ret = i915_gem_object_unbind(obj);
|
| 1222 |
+ if (ret)
|
| 1223 |
+ return ret;
|
| 1224 |
+ }
|
| 1225 |
+ }
|
| 1226 |
+
|
| 1227 |
if (obj_priv->gtt_space == NULL) {
|
| 1228 |
ret = i915_gem_object_bind_to_gtt(obj, alignment);
|
| 1229 |
if (ret)
|
| 1230 |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
|
| 1231 |
index 4a85aa3..bf05762 100644
|
| 1232 |
--- a/drivers/gpu/drm/i915/intel_lvds.c
|
| 1233 |
+++ b/drivers/gpu/drm/i915/intel_lvds.c
|
| 1234 |
@@ -648,8 +648,12 @@ static const struct dmi_system_id bad_lid_status[] = {
|
| 1235 |
*/
|
| 1236 |
static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector)
|
| 1237 |
{
|
| 1238 |
+ struct drm_device *dev = connector->dev;
|
| 1239 |
enum drm_connector_status status = connector_status_connected;
|
| 1240 |
|
| 1241 |
+ if (IS_I8XX(dev))
|
| 1242 |
+ return connector_status_connected;
|
| 1243 |
+
|
| 1244 |
if (!acpi_lid_open() && !dmi_check_system(bad_lid_status))
|
| 1245 |
status = connector_status_disconnected;
|
| 1246 |
|
| 1247 |
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
|
| 1248 |
index 969502a..a4813c6 100644
|
| 1249 |
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
|
| 1250 |
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
|
| 1251 |
@@ -942,7 +942,7 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct
|
| 1252 |
lvds->native_mode.vtotal = lvds->native_mode.vdisplay +
|
| 1253 |
le16_to_cpu(lvds_info->info.sLCDTiming.usVBlanking_Time);
|
| 1254 |
lvds->native_mode.vsync_start = lvds->native_mode.vdisplay +
|
| 1255 |
- le16_to_cpu(lvds_info->info.sLCDTiming.usVSyncWidth);
|
| 1256 |
+ le16_to_cpu(lvds_info->info.sLCDTiming.usVSyncOffset);
|
| 1257 |
lvds->native_mode.vsync_end = lvds->native_mode.vsync_start +
|
| 1258 |
le16_to_cpu(lvds_info->info.sLCDTiming.usVSyncWidth);
|
| 1259 |
lvds->panel_pwr_delay =
|
| 1260 |
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c
|
| 1261 |
index 1c46848..c7236f4 100644
|
| 1262 |
--- a/drivers/gpu/drm/radeon/radeon_cp.c
|
| 1263 |
+++ b/drivers/gpu/drm/radeon/radeon_cp.c
|
| 1264 |
@@ -1646,6 +1646,7 @@ static int radeon_do_resume_cp(struct drm_device *dev, struct drm_file *file_pri
|
| 1265 |
radeon_cp_load_microcode(dev_priv);
|
| 1266 |
radeon_cp_init_ring_buffer(dev, dev_priv, file_priv);
|
| 1267 |
|
| 1268 |
+ dev_priv->have_z_offset = 0;
|
| 1269 |
radeon_do_engine_reset(dev);
|
| 1270 |
radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1);
|
| 1271 |
|
| 1272 |
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
|
| 1273 |
index 350962e..76e4070 100644
|
| 1274 |
--- a/drivers/gpu/drm/radeon/radeon_drv.h
|
| 1275 |
+++ b/drivers/gpu/drm/radeon/radeon_drv.h
|
| 1276 |
@@ -267,6 +267,8 @@ typedef struct drm_radeon_private {
|
| 1277 |
|
| 1278 |
u32 scratch_ages[5];
|
| 1279 |
|
| 1280 |
+ int have_z_offset;
|
| 1281 |
+
|
| 1282 |
/* starting from here on, data is preserved accross an open */
|
| 1283 |
uint32_t flags; /* see radeon_chip_flags */
|
| 1284 |
resource_size_t fb_aper_offset;
|
| 1285 |
diff --git a/drivers/gpu/drm/radeon/radeon_state.c b/drivers/gpu/drm/radeon/radeon_state.c
|
| 1286 |
index 38537d9..4747910 100644
|
| 1287 |
--- a/drivers/gpu/drm/radeon/radeon_state.c
|
| 1288 |
+++ b/drivers/gpu/drm/radeon/radeon_state.c
|
| 1289 |
@@ -101,6 +101,7 @@ static __inline__ int radeon_check_and_fixup_packets(drm_radeon_private_t *
|
| 1290 |
DRM_ERROR("Invalid depth buffer offset\n");
|
| 1291 |
return -EINVAL;
|
| 1292 |
}
|
| 1293 |
+ dev_priv->have_z_offset = 1;
|
| 1294 |
break;
|
| 1295 |
|
| 1296 |
case RADEON_EMIT_PP_CNTL:
|
| 1297 |
@@ -876,6 +877,12 @@ static void radeon_cp_dispatch_clear(struct drm_device * dev,
|
| 1298 |
if (tmp & RADEON_BACK)
|
| 1299 |
flags |= RADEON_FRONT;
|
| 1300 |
}
|
| 1301 |
+ if (flags & (RADEON_DEPTH|RADEON_STENCIL)) {
|
| 1302 |
+ if (!dev_priv->have_z_offset) {
|
| 1303 |
+ printk_once(KERN_ERR "radeon: illegal depth clear request. Buggy mesa detected - please update.\n");
|
| 1304 |
+ flags &= ~(RADEON_DEPTH | RADEON_STENCIL);
|
| 1305 |
+ }
|
| 1306 |
+ }
|
| 1307 |
|
| 1308 |
if (flags & (RADEON_FRONT | RADEON_BACK)) {
|
| 1309 |
|
| 1310 |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
| 1311 |
index 668604b..1597863 100644
|
| 1312 |
--- a/drivers/hid/hid-core.c
|
| 1313 |
+++ b/drivers/hid/hid-core.c
|
| 1314 |
@@ -1306,6 +1306,7 @@ static const struct hid_device_id hid_blacklist[] = {
|
| 1315 |
{ HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) },
|
| 1316 |
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
|
| 1317 |
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
|
| 1318 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
|
| 1319 |
{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
|
| 1320 |
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
|
| 1321 |
{ HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
|
| 1322 |
diff --git a/drivers/hid/hid-gyration.c b/drivers/hid/hid-gyration.c
|
| 1323 |
index 62416e6..3975e03 100644
|
| 1324 |
--- a/drivers/hid/hid-gyration.c
|
| 1325 |
+++ b/drivers/hid/hid-gyration.c
|
| 1326 |
@@ -73,6 +73,7 @@ static int gyration_event(struct hid_device *hdev, struct hid_field *field,
|
| 1327 |
static const struct hid_device_id gyration_devices[] = {
|
| 1328 |
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
|
| 1329 |
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
|
| 1330 |
+ { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
|
| 1331 |
{ }
|
| 1332 |
};
|
| 1333 |
MODULE_DEVICE_TABLE(hid, gyration_devices);
|
| 1334 |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
| 1335 |
index 9831c3a..252853d 100644
|
| 1336 |
--- a/drivers/hid/hid-ids.h
|
| 1337 |
+++ b/drivers/hid/hid-ids.h
|
| 1338 |
@@ -251,6 +251,7 @@
|
| 1339 |
#define USB_VENDOR_ID_GYRATION 0x0c16
|
| 1340 |
#define USB_DEVICE_ID_GYRATION_REMOTE 0x0002
|
| 1341 |
#define USB_DEVICE_ID_GYRATION_REMOTE_2 0x0003
|
| 1342 |
+#define USB_DEVICE_ID_GYRATION_REMOTE_3 0x0008
|
| 1343 |
|
| 1344 |
#define USB_VENDOR_ID_HAPP 0x078b
|
| 1345 |
#define USB_DEVICE_ID_UGCI_DRIVING 0x0010
|
| 1346 |
diff --git a/drivers/hwmon/ltc4245.c b/drivers/hwmon/ltc4245.c
|
| 1347 |
index 65c232a..21d201b 100644
|
| 1348 |
--- a/drivers/hwmon/ltc4245.c
|
| 1349 |
+++ b/drivers/hwmon/ltc4245.c
|
| 1350 |
@@ -45,9 +45,7 @@ enum ltc4245_cmd {
|
| 1351 |
LTC4245_VEEIN = 0x19,
|
| 1352 |
LTC4245_VEESENSE = 0x1a,
|
| 1353 |
LTC4245_VEEOUT = 0x1b,
|
| 1354 |
- LTC4245_GPIOADC1 = 0x1c,
|
| 1355 |
- LTC4245_GPIOADC2 = 0x1d,
|
| 1356 |
- LTC4245_GPIOADC3 = 0x1e,
|
| 1357 |
+ LTC4245_GPIOADC = 0x1c,
|
| 1358 |
};
|
| 1359 |
|
| 1360 |
struct ltc4245_data {
|
| 1361 |
@@ -61,7 +59,7 @@ struct ltc4245_data {
|
| 1362 |
u8 cregs[0x08];
|
| 1363 |
|
| 1364 |
/* Voltage registers */
|
| 1365 |
- u8 vregs[0x0f];
|
| 1366 |
+ u8 vregs[0x0d];
|
| 1367 |
};
|
| 1368 |
|
| 1369 |
static struct ltc4245_data *ltc4245_update_device(struct device *dev)
|
| 1370 |
@@ -86,7 +84,7 @@ static struct ltc4245_data *ltc4245_update_device(struct device *dev)
|
| 1371 |
data->cregs[i] = val;
|
| 1372 |
}
|
| 1373 |
|
| 1374 |
- /* Read voltage registers -- 0x10 to 0x1f */
|
| 1375 |
+ /* Read voltage registers -- 0x10 to 0x1c */
|
| 1376 |
for (i = 0; i < ARRAY_SIZE(data->vregs); i++) {
|
| 1377 |
val = i2c_smbus_read_byte_data(client, i+0x10);
|
| 1378 |
if (unlikely(val < 0))
|
| 1379 |
@@ -128,9 +126,7 @@ static int ltc4245_get_voltage(struct device *dev, u8 reg)
|
| 1380 |
case LTC4245_VEEOUT:
|
| 1381 |
voltage = regval * -55;
|
| 1382 |
break;
|
| 1383 |
- case LTC4245_GPIOADC1:
|
| 1384 |
- case LTC4245_GPIOADC2:
|
| 1385 |
- case LTC4245_GPIOADC3:
|
| 1386 |
+ case LTC4245_GPIOADC:
|
| 1387 |
voltage = regval * 10;
|
| 1388 |
break;
|
| 1389 |
default:
|
| 1390 |
@@ -297,9 +293,7 @@ LTC4245_ALARM(in7_min_alarm, (1 << 2), LTC4245_FAULT2);
|
| 1391 |
LTC4245_ALARM(in8_min_alarm, (1 << 3), LTC4245_FAULT2);
|
| 1392 |
|
| 1393 |
/* GPIO voltages */
|
| 1394 |
-LTC4245_VOLTAGE(in9_input, LTC4245_GPIOADC1);
|
| 1395 |
-LTC4245_VOLTAGE(in10_input, LTC4245_GPIOADC2);
|
| 1396 |
-LTC4245_VOLTAGE(in11_input, LTC4245_GPIOADC3);
|
| 1397 |
+LTC4245_VOLTAGE(in9_input, LTC4245_GPIOADC);
|
| 1398 |
|
| 1399 |
/* Power Consumption (virtual) */
|
| 1400 |
LTC4245_POWER(power1_input, LTC4245_12VSENSE);
|
| 1401 |
@@ -342,8 +336,6 @@ static struct attribute *ltc4245_attributes[] = {
|
| 1402 |
&sensor_dev_attr_in8_min_alarm.dev_attr.attr,
|
| 1403 |
|
| 1404 |
&sensor_dev_attr_in9_input.dev_attr.attr,
|
| 1405 |
- &sensor_dev_attr_in10_input.dev_attr.attr,
|
| 1406 |
- &sensor_dev_attr_in11_input.dev_attr.attr,
|
| 1407 |
|
| 1408 |
&sensor_dev_attr_power1_input.dev_attr.attr,
|
| 1409 |
&sensor_dev_attr_power2_input.dev_attr.attr,
|
| 1410 |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
|
| 1411 |
index 0876d82..9451e28 100644
|
| 1412 |
--- a/drivers/input/mouse/psmouse-base.c
|
| 1413 |
+++ b/drivers/input/mouse/psmouse-base.c
|
| 1414 |
@@ -1349,6 +1349,7 @@ static int psmouse_reconnect(struct serio *serio)
|
| 1415 |
struct psmouse *psmouse = serio_get_drvdata(serio);
|
| 1416 |
struct psmouse *parent = NULL;
|
| 1417 |
struct serio_driver *drv = serio->drv;
|
| 1418 |
+ unsigned char type;
|
| 1419 |
int rc = -1;
|
| 1420 |
|
| 1421 |
if (!drv || !psmouse) {
|
| 1422 |
@@ -1368,10 +1369,15 @@ static int psmouse_reconnect(struct serio *serio)
|
| 1423 |
if (psmouse->reconnect) {
|
| 1424 |
if (psmouse->reconnect(psmouse))
|
| 1425 |
goto out;
|
| 1426 |
- } else if (psmouse_probe(psmouse) < 0 ||
|
| 1427 |
- psmouse->type != psmouse_extensions(psmouse,
|
| 1428 |
- psmouse_max_proto, false)) {
|
| 1429 |
- goto out;
|
| 1430 |
+ } else {
|
| 1431 |
+ psmouse_reset(psmouse);
|
| 1432 |
+
|
| 1433 |
+ if (psmouse_probe(psmouse) < 0)
|
| 1434 |
+ goto out;
|
| 1435 |
+
|
| 1436 |
+ type = psmouse_extensions(psmouse, psmouse_max_proto, false);
|
| 1437 |
+ if (psmouse->type != type)
|
| 1438 |
+ goto out;
|
| 1439 |
}
|
| 1440 |
|
| 1441 |
/* ok, the device type (and capabilities) match the old one,
|
| 1442 |
diff --git a/drivers/md/dm-exception-store.h b/drivers/md/dm-exception-store.h
|
| 1443 |
index 8a223a4..5f9315b 100644
|
| 1444 |
--- a/drivers/md/dm-exception-store.h
|
| 1445 |
+++ b/drivers/md/dm-exception-store.h
|
| 1446 |
@@ -162,7 +162,7 @@ static inline sector_t get_dev_size(struct block_device *bdev)
|
| 1447 |
static inline chunk_t sector_to_chunk(struct dm_exception_store *store,
|
| 1448 |
sector_t sector)
|
| 1449 |
{
|
| 1450 |
- return (sector & ~store->chunk_mask) >> store->chunk_shift;
|
| 1451 |
+ return sector >> store->chunk_shift;
|
| 1452 |
}
|
| 1453 |
|
| 1454 |
int dm_exception_store_type_register(struct dm_exception_store_type *type);
|
| 1455 |
diff --git a/drivers/md/md.c b/drivers/md/md.c
|
| 1456 |
index f2e719d..0147079 100644
|
| 1457 |
--- a/drivers/md/md.c
|
| 1458 |
+++ b/drivers/md/md.c
|
| 1459 |
@@ -5334,6 +5334,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
|
| 1460 |
int err = 0;
|
| 1461 |
void __user *argp = (void __user *)arg;
|
| 1462 |
mddev_t *mddev = NULL;
|
| 1463 |
+ int ro;
|
| 1464 |
|
| 1465 |
if (!capable(CAP_SYS_ADMIN))
|
| 1466 |
return -EACCES;
|
| 1467 |
@@ -5469,6 +5470,34 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
|
| 1468 |
err = do_md_stop(mddev, 1, 1);
|
| 1469 |
goto done_unlock;
|
| 1470 |
|
| 1471 |
+ case BLKROSET:
|
| 1472 |
+ if (get_user(ro, (int __user *)(arg))) {
|
| 1473 |
+ err = -EFAULT;
|
| 1474 |
+ goto done_unlock;
|
| 1475 |
+ }
|
| 1476 |
+ err = -EINVAL;
|
| 1477 |
+
|
| 1478 |
+ /* if the bdev is going readonly the value of mddev->ro
|
| 1479 |
+ * does not matter, no writes are coming
|
| 1480 |
+ */
|
| 1481 |
+ if (ro)
|
| 1482 |
+ goto done_unlock;
|
| 1483 |
+
|
| 1484 |
+ /* are we are already prepared for writes? */
|
| 1485 |
+ if (mddev->ro != 1)
|
| 1486 |
+ goto done_unlock;
|
| 1487 |
+
|
| 1488 |
+ /* transitioning to readauto need only happen for
|
| 1489 |
+ * arrays that call md_write_start
|
| 1490 |
+ */
|
| 1491 |
+ if (mddev->pers) {
|
| 1492 |
+ err = restart_array(mddev);
|
| 1493 |
+ if (err == 0) {
|
| 1494 |
+ mddev->ro = 2;
|
| 1495 |
+ set_disk_ro(mddev->gendisk, 0);
|
| 1496 |
+ }
|
| 1497 |
+ }
|
| 1498 |
+ goto done_unlock;
|
| 1499 |
}
|
| 1500 |
|
| 1501 |
/*
|
| 1502 |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
|
| 1503 |
index e07ce2e..5ccad28 100644
|
| 1504 |
--- a/drivers/md/raid1.c
|
| 1505 |
+++ b/drivers/md/raid1.c
|
| 1506 |
@@ -417,7 +417,7 @@ static void raid1_end_write_request(struct bio *bio, int error)
|
| 1507 |
*/
|
| 1508 |
static int read_balance(conf_t *conf, r1bio_t *r1_bio)
|
| 1509 |
{
|
| 1510 |
- const unsigned long this_sector = r1_bio->sector;
|
| 1511 |
+ const sector_t this_sector = r1_bio->sector;
|
| 1512 |
int new_disk = conf->last_used, disk = new_disk;
|
| 1513 |
int wonly_disk = -1;
|
| 1514 |
const int sectors = r1_bio->sectors;
|
| 1515 |
@@ -433,7 +433,7 @@ static int read_balance(conf_t *conf, r1bio_t *r1_bio)
|
| 1516 |
retry:
|
| 1517 |
if (conf->mddev->recovery_cp < MaxSector &&
|
| 1518 |
(this_sector + sectors >= conf->next_resync)) {
|
| 1519 |
- /* Choose the first operation device, for consistancy */
|
| 1520 |
+ /* Choose the first operational device, for consistancy */
|
| 1521 |
new_disk = 0;
|
| 1522 |
|
| 1523 |
for (rdev = rcu_dereference(conf->mirrors[new_disk].rdev);
|
| 1524 |
@@ -891,9 +891,10 @@ static int make_request(struct request_queue *q, struct bio * bio)
|
| 1525 |
if (test_bit(Faulty, &rdev->flags)) {
|
| 1526 |
rdev_dec_pending(rdev, mddev);
|
| 1527 |
r1_bio->bios[i] = NULL;
|
| 1528 |
- } else
|
| 1529 |
+ } else {
|
| 1530 |
r1_bio->bios[i] = bio;
|
| 1531 |
- targets++;
|
| 1532 |
+ targets++;
|
| 1533 |
+ }
|
| 1534 |
} else
|
| 1535 |
r1_bio->bios[i] = NULL;
|
| 1536 |
}
|
| 1537 |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
|
| 1538 |
index 3860ac7..6c2a35b 100644
|
| 1539 |
--- a/drivers/md/raid10.c
|
| 1540 |
+++ b/drivers/md/raid10.c
|
| 1541 |
@@ -493,7 +493,7 @@ static int raid10_mergeable_bvec(struct request_queue *q,
|
| 1542 |
*/
|
| 1543 |
static int read_balance(conf_t *conf, r10bio_t *r10_bio)
|
| 1544 |
{
|
| 1545 |
- const unsigned long this_sector = r10_bio->sector;
|
| 1546 |
+ const sector_t this_sector = r10_bio->sector;
|
| 1547 |
int disk, slot, nslot;
|
| 1548 |
const int sectors = r10_bio->sectors;
|
| 1549 |
sector_t new_distance, current_distance;
|
| 1550 |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c
|
| 1551 |
index bfae63f..7878182 100644
|
| 1552 |
--- a/drivers/media/video/gspca/stv06xx/stv06xx.c
|
| 1553 |
+++ b/drivers/media/video/gspca/stv06xx/stv06xx.c
|
| 1554 |
@@ -497,8 +497,6 @@ static const __devinitdata struct usb_device_id device_table[] = {
|
| 1555 |
{USB_DEVICE(0x046D, 0x08F5), .driver_info = BRIDGE_ST6422 },
|
| 1556 |
/* QuickCam Messenger (new) */
|
| 1557 |
{USB_DEVICE(0x046D, 0x08F6), .driver_info = BRIDGE_ST6422 },
|
| 1558 |
- /* QuickCam Messenger (new) */
|
| 1559 |
- {USB_DEVICE(0x046D, 0x08DA), .driver_info = BRIDGE_ST6422 },
|
| 1560 |
{}
|
| 1561 |
};
|
| 1562 |
MODULE_DEVICE_TABLE(usb, device_table);
|
| 1563 |
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c
|
| 1564 |
index dbf4de3..69698e5 100644
|
| 1565 |
--- a/drivers/net/arcnet/com20020-pci.c
|
| 1566 |
+++ b/drivers/net/arcnet/com20020-pci.c
|
| 1567 |
@@ -165,8 +165,8 @@ static struct pci_device_id com20020pci_id_table[] = {
|
| 1568 |
{ 0x1571, 0xa204, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ARC_CAN_10MBIT },
|
| 1569 |
{ 0x1571, 0xa205, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ARC_CAN_10MBIT },
|
| 1570 |
{ 0x1571, 0xa206, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ARC_CAN_10MBIT },
|
| 1571 |
- { 0x10B5, 0x9030, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ARC_CAN_10MBIT },
|
| 1572 |
- { 0x10B5, 0x9050, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ARC_CAN_10MBIT },
|
| 1573 |
+ { 0x10B5, 0x9030, 0x10B5, 0x2978, 0, 0, ARC_CAN_10MBIT },
|
| 1574 |
+ { 0x10B5, 0x9050, 0x10B5, 0x2273, 0, 0, ARC_CAN_10MBIT },
|
| 1575 |
{ 0x14BA, 0x6000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ARC_CAN_10MBIT },
|
| 1576 |
{ 0x10B5, 0x2200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ARC_CAN_10MBIT },
|
| 1577 |
{0,}
|
| 1578 |
diff --git a/drivers/net/atl1e/atl1e_ethtool.c b/drivers/net/atl1e/atl1e_ethtool.c
|
| 1579 |
index 60edb9f..b0fb725 100644
|
| 1580 |
--- a/drivers/net/atl1e/atl1e_ethtool.c
|
| 1581 |
+++ b/drivers/net/atl1e/atl1e_ethtool.c
|
| 1582 |
@@ -394,11 +394,13 @@ static const struct ethtool_ops atl1e_ethtool_ops = {
|
| 1583 |
.get_eeprom = atl1e_get_eeprom,
|
| 1584 |
.set_eeprom = atl1e_set_eeprom,
|
| 1585 |
.get_tx_csum = atl1e_get_tx_csum,
|
| 1586 |
+ .set_tx_csum = ethtool_op_set_tx_hw_csum,
|
| 1587 |
.get_sg = ethtool_op_get_sg,
|
| 1588 |
.set_sg = ethtool_op_set_sg,
|
| 1589 |
#ifdef NETIF_F_TSO
|
| 1590 |
.get_tso = ethtool_op_get_tso,
|
| 1591 |
#endif
|
| 1592 |
+ .set_tso = ethtool_op_set_tso,
|
| 1593 |
};
|
| 1594 |
|
| 1595 |
void atl1e_set_ethtool_ops(struct net_device *netdev)
|
| 1596 |
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
|
| 1597 |
index 16d2ecd..9463e5d 100644
|
| 1598 |
--- a/drivers/net/can/sja1000/sja1000.c
|
| 1599 |
+++ b/drivers/net/can/sja1000/sja1000.c
|
| 1600 |
@@ -84,6 +84,20 @@ static struct can_bittiming_const sja1000_bittiming_const = {
|
| 1601 |
.brp_inc = 1,
|
| 1602 |
};
|
| 1603 |
|
| 1604 |
+static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)
|
| 1605 |
+{
|
| 1606 |
+ unsigned long flags;
|
| 1607 |
+
|
| 1608 |
+ /*
|
| 1609 |
+ * The command register needs some locking and time to settle
|
| 1610 |
+ * the write_reg() operation - especially on SMP systems.
|
| 1611 |
+ */
|
| 1612 |
+ spin_lock_irqsave(&priv->cmdreg_lock, flags);
|
| 1613 |
+ priv->write_reg(priv, REG_CMR, val);
|
| 1614 |
+ priv->read_reg(priv, REG_SR);
|
| 1615 |
+ spin_unlock_irqrestore(&priv->cmdreg_lock, flags);
|
| 1616 |
+}
|
| 1617 |
+
|
| 1618 |
static int sja1000_probe_chip(struct net_device *dev)
|
| 1619 |
{
|
| 1620 |
struct sja1000_priv *priv = netdev_priv(dev);
|
| 1621 |
@@ -279,7 +293,7 @@ static netdev_tx_t sja1000_start_xmit(struct sk_buff *skb,
|
| 1622 |
|
| 1623 |
can_put_echo_skb(skb, dev, 0);
|
| 1624 |
|
| 1625 |
- priv->write_reg(priv, REG_CMR, CMD_TR);
|
| 1626 |
+ sja1000_write_cmdreg(priv, CMD_TR);
|
| 1627 |
|
| 1628 |
return NETDEV_TX_OK;
|
| 1629 |
}
|
| 1630 |
@@ -334,7 +348,7 @@ static void sja1000_rx(struct net_device *dev)
|
| 1631 |
cf->data[i++] = 0;
|
| 1632 |
|
| 1633 |
/* release receive buffer */
|
| 1634 |
- priv->write_reg(priv, REG_CMR, CMD_RRB);
|
| 1635 |
+ sja1000_write_cmdreg(priv, CMD_RRB);
|
| 1636 |
|
| 1637 |
netif_rx(skb);
|
| 1638 |
|
| 1639 |
@@ -368,7 +382,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
|
| 1640 |
cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
|
| 1641 |
stats->rx_over_errors++;
|
| 1642 |
stats->rx_errors++;
|
| 1643 |
- priv->write_reg(priv, REG_CMR, CMD_CDO); /* clear bit */
|
| 1644 |
+ sja1000_write_cmdreg(priv, CMD_CDO); /* clear bit */
|
| 1645 |
}
|
| 1646 |
|
| 1647 |
if (isrc & IRQ_EI) {
|
| 1648 |
diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h
|
| 1649 |
index 302d2c7..cfd3f57 100644
|
| 1650 |
--- a/drivers/net/can/sja1000/sja1000.h
|
| 1651 |
+++ b/drivers/net/can/sja1000/sja1000.h
|
| 1652 |
@@ -165,6 +165,7 @@ struct sja1000_priv {
|
| 1653 |
|
| 1654 |
void __iomem *reg_base; /* ioremap'ed address to registers */
|
| 1655 |
unsigned long irq_flags; /* for request_irq() */
|
| 1656 |
+ spinlock_t cmdreg_lock; /* lock for concurrent cmd register writes */
|
| 1657 |
|
| 1658 |
u16 flags; /* custom mode flags */
|
| 1659 |
u8 ocr; /* output control register */
|
| 1660 |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
|
| 1661 |
index 6339d65..a873c5d 100644
|
| 1662 |
--- a/drivers/net/ixgbe/ixgbe_main.c
|
| 1663 |
+++ b/drivers/net/ixgbe/ixgbe_main.c
|
| 1664 |
@@ -5241,9 +5241,13 @@ static int ixgbe_maybe_stop_tx(struct net_device *netdev,
|
| 1665 |
static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
|
| 1666 |
{
|
| 1667 |
struct ixgbe_adapter *adapter = netdev_priv(dev);
|
| 1668 |
+ int txq = smp_processor_id();
|
| 1669 |
|
| 1670 |
- if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
|
| 1671 |
- return smp_processor_id();
|
| 1672 |
+ if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) {
|
| 1673 |
+ while (unlikely(txq >= dev->real_num_tx_queues))
|
| 1674 |
+ txq -= dev->real_num_tx_queues;
|
| 1675 |
+ return txq;
|
| 1676 |
+ }
|
| 1677 |
|
| 1678 |
if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
|
| 1679 |
return (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK) >> 13;
|
| 1680 |
diff --git a/drivers/net/mlx4/icm.c b/drivers/net/mlx4/icm.c
|
| 1681 |
index 04b382f..83eef8e 100644
|
| 1682 |
--- a/drivers/net/mlx4/icm.c
|
| 1683 |
+++ b/drivers/net/mlx4/icm.c
|
| 1684 |
@@ -174,9 +174,10 @@ struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages,
|
| 1685 |
|
| 1686 |
if (chunk->nsg <= 0)
|
| 1687 |
goto fail;
|
| 1688 |
+ }
|
| 1689 |
|
| 1690 |
+ if (chunk->npages == MLX4_ICM_CHUNK_LEN)
|
| 1691 |
chunk = NULL;
|
| 1692 |
- }
|
| 1693 |
|
| 1694 |
npages -= 1 << cur_order;
|
| 1695 |
} else {
|
| 1696 |
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
|
| 1697 |
index 5910df6..b724d7f 100644
|
| 1698 |
--- a/drivers/net/pppol2tp.c
|
| 1699 |
+++ b/drivers/net/pppol2tp.c
|
| 1700 |
@@ -1178,7 +1178,8 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
|
| 1701 |
/* Calculate UDP checksum if configured to do so */
|
| 1702 |
if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT)
|
| 1703 |
skb->ip_summed = CHECKSUM_NONE;
|
| 1704 |
- else if (!(skb_dst(skb)->dev->features & NETIF_F_V4_CSUM)) {
|
| 1705 |
+ else if ((skb_dst(skb) && skb_dst(skb)->dev) &&
|
| 1706 |
+ (!(skb_dst(skb)->dev->features & NETIF_F_V4_CSUM))) {
|
| 1707 |
skb->ip_summed = CHECKSUM_COMPLETE;
|
| 1708 |
csum = skb_checksum(skb, 0, udp_len, 0);
|
| 1709 |
uh->check = csum_tcpudp_magic(inet->saddr, inet->daddr,
|
| 1710 |
diff --git a/drivers/net/tulip/Kconfig b/drivers/net/tulip/Kconfig
|
| 1711 |
index 1cc8cf4..516713f 100644
|
| 1712 |
--- a/drivers/net/tulip/Kconfig
|
| 1713 |
+++ b/drivers/net/tulip/Kconfig
|
| 1714 |
@@ -101,6 +101,10 @@ config TULIP_NAPI_HW_MITIGATION
|
| 1715 |
|
| 1716 |
If in doubt, say Y.
|
| 1717 |
|
| 1718 |
+config TULIP_DM910X
|
| 1719 |
+ def_bool y
|
| 1720 |
+ depends on TULIP && SPARC
|
| 1721 |
+
|
| 1722 |
config DE4X5
|
| 1723 |
tristate "Generic DECchip & DIGITAL EtherWORKS PCI/EISA"
|
| 1724 |
depends on PCI || EISA
|
| 1725 |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
|
| 1726 |
index a45ded0..b94370f 100644
|
| 1727 |
--- a/drivers/net/tulip/dmfe.c
|
| 1728 |
+++ b/drivers/net/tulip/dmfe.c
|
| 1729 |
@@ -92,6 +92,10 @@
|
| 1730 |
#include <asm/uaccess.h>
|
| 1731 |
#include <asm/irq.h>
|
| 1732 |
|
| 1733 |
+#ifdef CONFIG_TULIP_DM910X
|
| 1734 |
+#include <linux/of.h>
|
| 1735 |
+#endif
|
| 1736 |
+
|
| 1737 |
|
| 1738 |
/* Board/System/Debug information/definition ---------------- */
|
| 1739 |
#define PCI_DM9132_ID 0x91321282 /* Davicom DM9132 ID */
|
| 1740 |
@@ -377,6 +381,23 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
|
| 1741 |
if (!printed_version++)
|
| 1742 |
printk(version);
|
| 1743 |
|
| 1744 |
+ /*
|
| 1745 |
+ * SPARC on-board DM910x chips should be handled by the main
|
| 1746 |
+ * tulip driver, except for early DM9100s.
|
| 1747 |
+ */
|
| 1748 |
+#ifdef CONFIG_TULIP_DM910X
|
| 1749 |
+ if ((ent->driver_data == PCI_DM9100_ID && pdev->revision >= 0x30) ||
|
| 1750 |
+ ent->driver_data == PCI_DM9102_ID) {
|
| 1751 |
+ struct device_node *dp = pci_device_to_OF_node(pdev);
|
| 1752 |
+
|
| 1753 |
+ if (dp && of_get_property(dp, "local-mac-address", NULL)) {
|
| 1754 |
+ printk(KERN_INFO DRV_NAME
|
| 1755 |
+ ": skipping on-board DM910x (use tulip)\n");
|
| 1756 |
+ return -ENODEV;
|
| 1757 |
+ }
|
| 1758 |
+ }
|
| 1759 |
+#endif
|
| 1760 |
+
|
| 1761 |
/* Init network device */
|
| 1762 |
dev = alloc_etherdev(sizeof(*db));
|
| 1763 |
if (dev == NULL)
|
| 1764 |
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
|
| 1765 |
index 6b2330e..88bf54f 100644
|
| 1766 |
--- a/drivers/net/tulip/tulip_core.c
|
| 1767 |
+++ b/drivers/net/tulip/tulip_core.c
|
| 1768 |
@@ -196,9 +196,13 @@ struct tulip_chip_table tulip_tbl[] = {
|
| 1769 |
| HAS_NWAY | HAS_PCI_MWI, tulip_timer, tulip_media_task },
|
| 1770 |
|
| 1771 |
/* DM910X */
|
| 1772 |
+#ifdef CONFIG_TULIP_DM910X
|
| 1773 |
{ "Davicom DM9102/DM9102A", 128, 0x0001ebef,
|
| 1774 |
HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_ACPI,
|
| 1775 |
tulip_timer, tulip_media_task },
|
| 1776 |
+#else
|
| 1777 |
+ { NULL },
|
| 1778 |
+#endif
|
| 1779 |
|
| 1780 |
/* RS7112 */
|
| 1781 |
{ "Conexant LANfinity", 256, 0x0001ebef,
|
| 1782 |
@@ -228,8 +232,10 @@ static struct pci_device_id tulip_pci_tbl[] = {
|
| 1783 |
{ 0x1259, 0xa120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
|
| 1784 |
{ 0x11F6, 0x9881, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMPEX9881 },
|
| 1785 |
{ 0x8086, 0x0039, PCI_ANY_ID, PCI_ANY_ID, 0, 0, I21145 },
|
| 1786 |
+#ifdef CONFIG_TULIP_DM910X
|
| 1787 |
{ 0x1282, 0x9100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X },
|
| 1788 |
{ 0x1282, 0x9102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X },
|
| 1789 |
+#endif
|
| 1790 |
{ 0x1113, 0x1216, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
|
| 1791 |
{ 0x1113, 0x1217, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MX98715 },
|
| 1792 |
{ 0x1113, 0x9511, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
|
| 1793 |
@@ -1299,18 +1305,30 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
|
| 1794 |
}
|
| 1795 |
|
| 1796 |
/*
|
| 1797 |
- * Early DM9100's need software CRC and the DMFE driver
|
| 1798 |
+ * DM910x chips should be handled by the dmfe driver, except
|
| 1799 |
+ * on-board chips on SPARC systems. Also, early DM9100s need
|
| 1800 |
+ * software CRC which only the dmfe driver supports.
|
| 1801 |
*/
|
| 1802 |
|
| 1803 |
- if (pdev->vendor == 0x1282 && pdev->device == 0x9100)
|
| 1804 |
- {
|
| 1805 |
- /* Read Chip revision */
|
| 1806 |
- if (pdev->revision < 0x30)
|
| 1807 |
- {
|
| 1808 |
- printk(KERN_ERR PFX "skipping early DM9100 with Crc bug (use dmfe)\n");
|
| 1809 |
+#ifdef CONFIG_TULIP_DM910X
|
| 1810 |
+ if (chip_idx == DM910X) {
|
| 1811 |
+ struct device_node *dp;
|
| 1812 |
+
|
| 1813 |
+ if (pdev->vendor == 0x1282 && pdev->device == 0x9100 &&
|
| 1814 |
+ pdev->revision < 0x30) {
|
| 1815 |
+ printk(KERN_INFO PFX
|
| 1816 |
+ "skipping early DM9100 with Crc bug (use dmfe)\n");
|
| 1817 |
+ return -ENODEV;
|
| 1818 |
+ }
|
| 1819 |
+
|
| 1820 |
+ dp = pci_device_to_OF_node(pdev);
|
| 1821 |
+ if (!(dp && of_get_property(dp, "local-mac-address", NULL))) {
|
| 1822 |
+ printk(KERN_INFO PFX
|
| 1823 |
+ "skipping DM910x expansion card (use dmfe)\n");
|
| 1824 |
return -ENODEV;
|
| 1825 |
}
|
| 1826 |
}
|
| 1827 |
+#endif
|
| 1828 |
|
| 1829 |
/*
|
| 1830 |
* Looks for early PCI chipsets where people report hangs
|
| 1831 |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
|
| 1832 |
index 4469f24..b4b25ff 100644
|
| 1833 |
--- a/drivers/net/ucc_geth.c
|
| 1834 |
+++ b/drivers/net/ucc_geth.c
|
| 1835 |
@@ -1563,7 +1563,10 @@ static int ugeth_disable(struct ucc_geth_private *ugeth, enum comm_dir mode)
|
| 1836 |
|
| 1837 |
static void ugeth_quiesce(struct ucc_geth_private *ugeth)
|
| 1838 |
{
|
| 1839 |
- /* Wait for and prevent any further xmits. */
|
| 1840 |
+ /* Prevent any further xmits, plus detach the device. */
|
| 1841 |
+ netif_device_detach(ugeth->ndev);
|
| 1842 |
+
|
| 1843 |
+ /* Wait for any current xmits to finish. */
|
| 1844 |
netif_tx_disable(ugeth->ndev);
|
| 1845 |
|
| 1846 |
/* Disable the interrupt to avoid NAPI rescheduling. */
|
| 1847 |
@@ -1577,7 +1580,7 @@ static void ugeth_activate(struct ucc_geth_private *ugeth)
|
| 1848 |
{
|
| 1849 |
napi_enable(&ugeth->napi);
|
| 1850 |
enable_irq(ugeth->ug_info->uf_info.irq);
|
| 1851 |
- netif_tx_wake_all_queues(ugeth->ndev);
|
| 1852 |
+ netif_device_attach(ugeth->ndev);
|
| 1853 |
}
|
| 1854 |
|
| 1855 |
/* Called every time the controller might need to be made
|
| 1856 |
@@ -3273,13 +3276,12 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
|
| 1857 |
/* Handle the transmitted buffer and release */
|
| 1858 |
/* the BD to be used with the current frame */
|
| 1859 |
|
| 1860 |
- if ((bd == ugeth->txBd[txQ]) && (netif_queue_stopped(dev) == 0))
|
| 1861 |
+ skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]];
|
| 1862 |
+ if (!skb)
|
| 1863 |
break;
|
| 1864 |
|
| 1865 |
dev->stats.tx_packets++;
|
| 1866 |
|
| 1867 |
- skb = ugeth->tx_skbuff[txQ][ugeth->skb_dirtytx[txQ]];
|
| 1868 |
-
|
| 1869 |
if (skb_queue_len(&ugeth->rx_recycle) < RX_BD_RING_LEN &&
|
| 1870 |
skb_recycle_check(skb,
|
| 1871 |
ugeth->ug_info->uf_info.max_rx_buf_length +
|
| 1872 |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
|
| 1873 |
index e04e5be..74b9d7d 100644
|
| 1874 |
--- a/drivers/net/via-velocity.c
|
| 1875 |
+++ b/drivers/net/via-velocity.c
|
| 1876 |
@@ -2186,8 +2186,6 @@ static int velocity_open(struct net_device *dev)
|
| 1877 |
/* Ensure chip is running */
|
| 1878 |
pci_set_power_state(vptr->pdev, PCI_D0);
|
| 1879 |
|
| 1880 |
- velocity_give_many_rx_descs(vptr);
|
| 1881 |
-
|
| 1882 |
velocity_init_registers(vptr, VELOCITY_INIT_COLD);
|
| 1883 |
|
| 1884 |
ret = request_irq(vptr->pdev->irq, &velocity_intr, IRQF_SHARED,
|
| 1885 |
@@ -2199,6 +2197,8 @@ static int velocity_open(struct net_device *dev)
|
| 1886 |
goto out;
|
| 1887 |
}
|
| 1888 |
|
| 1889 |
+ velocity_give_many_rx_descs(vptr);
|
| 1890 |
+
|
| 1891 |
mac_enable_int(vptr->mac_regs);
|
| 1892 |
netif_start_queue(dev);
|
| 1893 |
vptr->flags |= VELOCITY_FLAGS_OPENED;
|
| 1894 |
@@ -2287,10 +2287,10 @@ static int velocity_change_mtu(struct net_device *dev, int new_mtu)
|
| 1895 |
|
| 1896 |
dev->mtu = new_mtu;
|
| 1897 |
|
| 1898 |
- velocity_give_many_rx_descs(vptr);
|
| 1899 |
-
|
| 1900 |
velocity_init_registers(vptr, VELOCITY_INIT_COLD);
|
| 1901 |
|
| 1902 |
+ velocity_give_many_rx_descs(vptr);
|
| 1903 |
+
|
| 1904 |
mac_enable_int(vptr->mac_regs);
|
| 1905 |
netif_start_queue(dev);
|
| 1906 |
|
| 1907 |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
|
| 1908 |
index b9e002f..7e3788d 100644
|
| 1909 |
--- a/drivers/net/virtio_net.c
|
| 1910 |
+++ b/drivers/net/virtio_net.c
|
| 1911 |
@@ -398,8 +398,7 @@ static void refill_work(struct work_struct *work)
|
| 1912 |
|
| 1913 |
vi = container_of(work, struct virtnet_info, refill.work);
|
| 1914 |
napi_disable(&vi->napi);
|
| 1915 |
- try_fill_recv(vi, GFP_KERNEL);
|
| 1916 |
- still_empty = (vi->num == 0);
|
| 1917 |
+ still_empty = !try_fill_recv(vi, GFP_KERNEL);
|
| 1918 |
napi_enable(&vi->napi);
|
| 1919 |
|
| 1920 |
/* In theory, this can happen: if we don't get any buffers in
|
| 1921 |
diff --git a/drivers/net/wireless/ath/ar9170/hw.h b/drivers/net/wireless/ath/ar9170/hw.h
|
| 1922 |
index 6cbfb2f..3931181 100644
|
| 1923 |
--- a/drivers/net/wireless/ath/ar9170/hw.h
|
| 1924 |
+++ b/drivers/net/wireless/ath/ar9170/hw.h
|
| 1925 |
@@ -422,5 +422,6 @@ enum ar9170_txq {
|
| 1926 |
|
| 1927 |
#define AR9170_TXQ_DEPTH 32
|
| 1928 |
#define AR9170_TX_MAX_PENDING 128
|
| 1929 |
+#define AR9170_RX_STREAM_MAX_SIZE 65535
|
| 1930 |
|
| 1931 |
#endif /* __AR9170_HW_H */
|
| 1932 |
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
|
| 1933 |
index c1f8c69..3e547b5 100644
|
| 1934 |
--- a/drivers/net/wireless/ath/ar9170/main.c
|
| 1935 |
+++ b/drivers/net/wireless/ath/ar9170/main.c
|
| 1936 |
@@ -2526,7 +2526,7 @@ void *ar9170_alloc(size_t priv_size)
|
| 1937 |
* tends to split the streams into seperate rx descriptors.
|
| 1938 |
*/
|
| 1939 |
|
| 1940 |
- skb = __dev_alloc_skb(AR9170_MAX_RX_BUFFER_SIZE, GFP_KERNEL);
|
| 1941 |
+ skb = __dev_alloc_skb(AR9170_RX_STREAM_MAX_SIZE, GFP_KERNEL);
|
| 1942 |
if (!skb)
|
| 1943 |
goto err_nomem;
|
| 1944 |
|
| 1945 |
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c
|
| 1946 |
index 6c70481..dbcb729 100644
|
| 1947 |
--- a/drivers/net/wireless/ath/ar9170/usb.c
|
| 1948 |
+++ b/drivers/net/wireless/ath/ar9170/usb.c
|
| 1949 |
@@ -66,18 +66,28 @@ static struct usb_device_id ar9170_usb_ids[] = {
|
| 1950 |
{ USB_DEVICE(0x0cf3, 0x1001) },
|
| 1951 |
/* TP-Link TL-WN821N v2 */
|
| 1952 |
{ USB_DEVICE(0x0cf3, 0x1002) },
|
| 1953 |
+ /* 3Com Dual Band 802.11n USB Adapter */
|
| 1954 |
+ { USB_DEVICE(0x0cf3, 0x1010) },
|
| 1955 |
+ /* H3C Dual Band 802.11n USB Adapter */
|
| 1956 |
+ { USB_DEVICE(0x0cf3, 0x1011) },
|
| 1957 |
/* Cace Airpcap NX */
|
| 1958 |
{ USB_DEVICE(0xcace, 0x0300) },
|
| 1959 |
/* D-Link DWA 160 A1 */
|
| 1960 |
{ USB_DEVICE(0x07d1, 0x3c10) },
|
| 1961 |
/* D-Link DWA 160 A2 */
|
| 1962 |
{ USB_DEVICE(0x07d1, 0x3a09) },
|
| 1963 |
+ /* Netgear WNA1000 */
|
| 1964 |
+ { USB_DEVICE(0x0846, 0x9040) },
|
| 1965 |
/* Netgear WNDA3100 */
|
| 1966 |
{ USB_DEVICE(0x0846, 0x9010) },
|
| 1967 |
/* Netgear WN111 v2 */
|
| 1968 |
{ USB_DEVICE(0x0846, 0x9001) },
|
| 1969 |
/* Zydas ZD1221 */
|
| 1970 |
{ USB_DEVICE(0x0ace, 0x1221) },
|
| 1971 |
+ /* Proxim ORiNOCO 802.11n USB */
|
| 1972 |
+ { USB_DEVICE(0x1435, 0x0804) },
|
| 1973 |
+ /* WNC Generic 11n USB Dongle */
|
| 1974 |
+ { USB_DEVICE(0x1435, 0x0326) },
|
| 1975 |
/* ZyXEL NWD271N */
|
| 1976 |
{ USB_DEVICE(0x0586, 0x3417) },
|
| 1977 |
/* Z-Com UB81 BG */
|
| 1978 |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
|
| 1979 |
index 6313788..cefbfb9 100644
|
| 1980 |
--- a/drivers/net/wireless/ath/ath5k/base.c
|
| 1981 |
+++ b/drivers/net/wireless/ath/ath5k/base.c
|
| 1982 |
@@ -2975,13 +2975,15 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
|
| 1983 |
|
| 1984 |
if (changed_flags & (FIF_PROMISC_IN_BSS | FIF_OTHER_BSS)) {
|
| 1985 |
if (*new_flags & FIF_PROMISC_IN_BSS) {
|
| 1986 |
- rfilt |= AR5K_RX_FILTER_PROM;
|
| 1987 |
__set_bit(ATH_STAT_PROMISC, sc->status);
|
| 1988 |
} else {
|
| 1989 |
__clear_bit(ATH_STAT_PROMISC, sc->status);
|
| 1990 |
}
|
| 1991 |
}
|
| 1992 |
|
| 1993 |
+ if (test_bit(ATH_STAT_PROMISC, sc->status))
|
| 1994 |
+ rfilt |= AR5K_RX_FILTER_PROM;
|
| 1995 |
+
|
| 1996 |
/* Note, AR5K_RX_FILTER_MCAST is already enabled */
|
| 1997 |
if (*new_flags & FIF_ALLMULTI) {
|
| 1998 |
mfilt[0] = ~0;
|
| 1999 |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
|
| 2000 |
index f735a96..2185f97 100644
|
| 2001 |
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
| 2002 |
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
| 2003 |
@@ -398,7 +398,6 @@ static void ath9k_hw_init_config(struct ath_hw *ah)
|
| 2004 |
ah->config.pcie_clock_req = 0;
|
| 2005 |
ah->config.pcie_waen = 0;
|
| 2006 |
ah->config.analog_shiftreg = 1;
|
| 2007 |
- ah->config.ht_enable = 1;
|
| 2008 |
ah->config.ofdm_trig_low = 200;
|
| 2009 |
ah->config.ofdm_trig_high = 500;
|
| 2010 |
ah->config.cck_trig_high = 200;
|
| 2011 |
@@ -412,6 +411,11 @@ static void ath9k_hw_init_config(struct ath_hw *ah)
|
| 2012 |
ah->config.spurchans[i][1] = AR_NO_SPUR;
|
| 2013 |
}
|
| 2014 |
|
| 2015 |
+ if (ah->hw_version.devid != AR2427_DEVID_PCIE)
|
| 2016 |
+ ah->config.ht_enable = 1;
|
| 2017 |
+ else
|
| 2018 |
+ ah->config.ht_enable = 0;
|
| 2019 |
+
|
| 2020 |
ah->config.intr_mitigation = true;
|
| 2021 |
|
| 2022 |
/*
|
| 2023 |
@@ -617,6 +621,7 @@ static bool ath9k_hw_devid_supported(u16 devid)
|
| 2024 |
case AR9285_DEVID_PCIE:
|
| 2025 |
case AR5416_DEVID_AR9287_PCI:
|
| 2026 |
case AR5416_DEVID_AR9287_PCIE:
|
| 2027 |
+ case AR2427_DEVID_PCIE:
|
| 2028 |
return true;
|
| 2029 |
default:
|
| 2030 |
break;
|
| 2031 |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
|
| 2032 |
index ff4383b..262556a 100644
|
| 2033 |
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
| 2034 |
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
| 2035 |
@@ -37,6 +37,7 @@
|
| 2036 |
#define AR9280_DEVID_PCI 0x0029
|
| 2037 |
#define AR9280_DEVID_PCIE 0x002a
|
| 2038 |
#define AR9285_DEVID_PCIE 0x002b
|
| 2039 |
+#define AR2427_DEVID_PCIE 0x002c
|
| 2040 |
#define AR5416_AR9100_DEVID 0x000b
|
| 2041 |
#define AR_SUBVENDOR_ID_NOG 0x0e11
|
| 2042 |
#define AR_SUBVENDOR_ID_NEW_A 0x7065
|
| 2043 |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
|
| 2044 |
index 15eb245..087b7e5 100644
|
| 2045 |
--- a/drivers/net/wireless/ath/ath9k/main.c
|
| 2046 |
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
| 2047 |
@@ -1541,12 +1541,14 @@ void ath_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
|
| 2048 |
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
|
| 2049 |
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
|
| 2050 |
IEEE80211_HW_SIGNAL_DBM |
|
| 2051 |
- IEEE80211_HW_AMPDU_AGGREGATION |
|
| 2052 |
IEEE80211_HW_SUPPORTS_PS |
|
| 2053 |
IEEE80211_HW_PS_NULLFUNC_STACK |
|
| 2054 |
IEEE80211_HW_REPORTS_TX_ACK_STATUS |
|
| 2055 |
IEEE80211_HW_SPECTRUM_MGMT;
|
| 2056 |
|
| 2057 |
+ if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
|
| 2058 |
+ hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
|
| 2059 |
+
|
| 2060 |
if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || modparam_nohwcrypt)
|
| 2061 |
hw->flags |= IEEE80211_HW_MFP_CAPABLE;
|
| 2062 |
|
| 2063 |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
|
| 2064 |
index 903dd8a..14cf3fe 100644
|
| 2065 |
--- a/drivers/net/wireless/ath/ath9k/pci.c
|
| 2066 |
+++ b/drivers/net/wireless/ath/ath9k/pci.c
|
| 2067 |
@@ -25,6 +25,7 @@ static struct pci_device_id ath_pci_id_table[] __devinitdata = {
|
| 2068 |
{ PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */
|
| 2069 |
{ PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */
|
| 2070 |
{ PCI_VDEVICE(ATHEROS, 0x002B) }, /* PCI-E */
|
| 2071 |
+ { PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */
|
| 2072 |
{ PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI */
|
| 2073 |
{ PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
|
| 2074 |
{ 0 }
|
| 2075 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
|
| 2076 |
index d636639..1f423f2 100644
|
| 2077 |
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
|
| 2078 |
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
|
| 2079 |
@@ -1674,12 +1674,12 @@ struct iwl_cfg iwl5300_agn_cfg = {
|
| 2080 |
.use_rts_for_ht = true, /* use rts/cts protection */
|
| 2081 |
};
|
| 2082 |
|
| 2083 |
-struct iwl_cfg iwl5100_bg_cfg = {
|
| 2084 |
- .name = "5100BG",
|
| 2085 |
+struct iwl_cfg iwl5100_bgn_cfg = {
|
| 2086 |
+ .name = "5100BGN",
|
| 2087 |
.fw_name_pre = IWL5000_FW_PRE,
|
| 2088 |
.ucode_api_max = IWL5000_UCODE_API_MAX,
|
| 2089 |
.ucode_api_min = IWL5000_UCODE_API_MIN,
|
| 2090 |
- .sku = IWL_SKU_G,
|
| 2091 |
+ .sku = IWL_SKU_G|IWL_SKU_N,
|
| 2092 |
.ops = &iwl5000_ops,
|
| 2093 |
.eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
|
| 2094 |
.eeprom_ver = EEPROM_5000_EEPROM_VERSION,
|
| 2095 |
@@ -1705,7 +1705,6 @@ struct iwl_cfg iwl5100_abg_cfg = {
|
| 2096 |
.valid_tx_ant = ANT_B,
|
| 2097 |
.valid_rx_ant = ANT_AB,
|
| 2098 |
.need_pll_cfg = true,
|
| 2099 |
- .ht_greenfield_support = true,
|
| 2100 |
};
|
| 2101 |
|
| 2102 |
struct iwl_cfg iwl5100_agn_cfg = {
|
| 2103 |
@@ -1762,6 +1761,22 @@ struct iwl_cfg iwl5150_agn_cfg = {
|
| 2104 |
.use_rts_for_ht = true, /* use rts/cts protection */
|
| 2105 |
};
|
| 2106 |
|
| 2107 |
+struct iwl_cfg iwl5150_abg_cfg = {
|
| 2108 |
+ .name = "5150ABG",
|
| 2109 |
+ .fw_name_pre = IWL5150_FW_PRE,
|
| 2110 |
+ .ucode_api_max = IWL5150_UCODE_API_MAX,
|
| 2111 |
+ .ucode_api_min = IWL5150_UCODE_API_MIN,
|
| 2112 |
+ .sku = IWL_SKU_A|IWL_SKU_G,
|
| 2113 |
+ .ops = &iwl5150_ops,
|
| 2114 |
+ .eeprom_size = IWL_5000_EEPROM_IMG_SIZE,
|
| 2115 |
+ .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
|
| 2116 |
+ .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
|
| 2117 |
+ .mod_params = &iwl50_mod_params,
|
| 2118 |
+ .valid_tx_ant = ANT_A,
|
| 2119 |
+ .valid_rx_ant = ANT_AB,
|
| 2120 |
+ .need_pll_cfg = true,
|
| 2121 |
+};
|
| 2122 |
+
|
| 2123 |
MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
|
| 2124 |
MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX));
|
| 2125 |
|
| 2126 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
|
| 2127 |
index 0eb2591..1a3dfa2 100644
|
| 2128 |
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
|
| 2129 |
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
|
| 2130 |
@@ -402,10 +402,23 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
|
| 2131 |
struct iwl_lq_sta *lq_data, u8 tid,
|
| 2132 |
struct ieee80211_sta *sta)
|
| 2133 |
{
|
| 2134 |
+ int ret;
|
| 2135 |
+
|
| 2136 |
if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) {
|
| 2137 |
IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n",
|
| 2138 |
sta->addr, tid);
|
| 2139 |
- ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid);
|
| 2140 |
+ ret = ieee80211_start_tx_ba_session(priv->hw, sta->addr, tid);
|
| 2141 |
+ if (ret == -EAGAIN) {
|
| 2142 |
+ /*
|
| 2143 |
+ * driver and mac80211 is out of sync
|
| 2144 |
+ * this might be cause by reloading firmware
|
| 2145 |
+ * stop the tx ba session here
|
| 2146 |
+ */
|
| 2147 |
+ IWL_DEBUG_HT(priv, "Fail start Tx agg on tid: %d\n",
|
| 2148 |
+ tid);
|
| 2149 |
+ ret = ieee80211_stop_tx_ba_session(priv->hw, sta->addr, tid,
|
| 2150 |
+ WLAN_BACK_INITIATOR);
|
| 2151 |
+ }
|
| 2152 |
}
|
| 2153 |
}
|
| 2154 |
|
| 2155 |
@@ -2180,9 +2193,12 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
|
| 2156 |
|
| 2157 |
/* Else we have enough samples; calculate estimate of
|
| 2158 |
* actual average throughput */
|
| 2159 |
-
|
| 2160 |
- BUG_ON(window->average_tpt != ((window->success_ratio *
|
| 2161 |
- tbl->expected_tpt[index] + 64) / 128));
|
| 2162 |
+ if (window->average_tpt != ((window->success_ratio *
|
| 2163 |
+ tbl->expected_tpt[index] + 64) / 128)) {
|
| 2164 |
+ IWL_ERR(priv, "expected_tpt should have been calculated by now\n");
|
| 2165 |
+ window->average_tpt = ((window->success_ratio *
|
| 2166 |
+ tbl->expected_tpt[index] + 64) / 128);
|
| 2167 |
+ }
|
| 2168 |
|
| 2169 |
/* If we are searching for better modulation mode, check success. */
|
| 2170 |
if (lq_sta->search_better_tbl &&
|
| 2171 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
| 2172 |
index 921dc4a..166bedd 100644
|
| 2173 |
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
|
| 2174 |
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
|
| 2175 |
@@ -3203,23 +3203,63 @@ static struct pci_device_id iwl_hw_card_ids[] = {
|
| 2176 |
{IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)},
|
| 2177 |
#endif /* CONFIG_IWL4965 */
|
| 2178 |
#ifdef CONFIG_IWL5000
|
| 2179 |
- {IWL_PCI_DEVICE(0x4232, 0x1205, iwl5100_bg_cfg)},
|
| 2180 |
- {IWL_PCI_DEVICE(0x4232, 0x1305, iwl5100_bg_cfg)},
|
| 2181 |
- {IWL_PCI_DEVICE(0x4232, 0x1206, iwl5100_abg_cfg)},
|
| 2182 |
- {IWL_PCI_DEVICE(0x4232, 0x1306, iwl5100_abg_cfg)},
|
| 2183 |
- {IWL_PCI_DEVICE(0x4232, 0x1326, iwl5100_abg_cfg)},
|
| 2184 |
- {IWL_PCI_DEVICE(0x4237, 0x1216, iwl5100_abg_cfg)},
|
| 2185 |
- {IWL_PCI_DEVICE(0x4232, PCI_ANY_ID, iwl5100_agn_cfg)},
|
| 2186 |
- {IWL_PCI_DEVICE(0x4235, PCI_ANY_ID, iwl5300_agn_cfg)},
|
| 2187 |
- {IWL_PCI_DEVICE(0x4236, PCI_ANY_ID, iwl5300_agn_cfg)},
|
| 2188 |
- {IWL_PCI_DEVICE(0x4237, PCI_ANY_ID, iwl5100_agn_cfg)},
|
| 2189 |
-/* 5350 WiFi/WiMax */
|
| 2190 |
- {IWL_PCI_DEVICE(0x423A, 0x1001, iwl5350_agn_cfg)},
|
| 2191 |
- {IWL_PCI_DEVICE(0x423A, 0x1021, iwl5350_agn_cfg)},
|
| 2192 |
- {IWL_PCI_DEVICE(0x423B, 0x1011, iwl5350_agn_cfg)},
|
| 2193 |
-/* 5150 Wifi/WiMax */
|
| 2194 |
- {IWL_PCI_DEVICE(0x423C, PCI_ANY_ID, iwl5150_agn_cfg)},
|
| 2195 |
- {IWL_PCI_DEVICE(0x423D, PCI_ANY_ID, iwl5150_agn_cfg)},
|
| 2196 |
+/* 5100 Series WiFi */
|
| 2197 |
+ {IWL_PCI_DEVICE(0x4232, 0x1201, iwl5100_agn_cfg)}, /* Mini Card */
|
| 2198 |
+ {IWL_PCI_DEVICE(0x4232, 0x1301, iwl5100_agn_cfg)}, /* Half Mini Card */
|
| 2199 |
+ {IWL_PCI_DEVICE(0x4232, 0x1204, iwl5100_agn_cfg)}, /* Mini Card */
|
| 2200 |
+ {IWL_PCI_DEVICE(0x4232, 0x1304, iwl5100_agn_cfg)}, /* Half Mini Card */
|
| 2201 |
+ {IWL_PCI_DEVICE(0x4232, 0x1205, iwl5100_bgn_cfg)}, /* Mini Card */
|
| 2202 |
+ {IWL_PCI_DEVICE(0x4232, 0x1305, iwl5100_bgn_cfg)}, /* Half Mini Card */
|
| 2203 |
+ {IWL_PCI_DEVICE(0x4232, 0x1206, iwl5100_abg_cfg)}, /* Mini Card */
|
| 2204 |
+ {IWL_PCI_DEVICE(0x4232, 0x1306, iwl5100_abg_cfg)}, /* Half Mini Card */
|
| 2205 |
+ {IWL_PCI_DEVICE(0x4232, 0x1221, iwl5100_agn_cfg)}, /* Mini Card */
|
| 2206 |
+ {IWL_PCI_DEVICE(0x4232, 0x1321, iwl5100_agn_cfg)}, /* Half Mini Card */
|
| 2207 |
+ {IWL_PCI_DEVICE(0x4232, 0x1224, iwl5100_agn_cfg)}, /* Mini Card */
|
| 2208 |
+ {IWL_PCI_DEVICE(0x4232, 0x1324, iwl5100_agn_cfg)}, /* Half Mini Card */
|
| 2209 |
+ {IWL_PCI_DEVICE(0x4232, 0x1225, iwl5100_bgn_cfg)}, /* Mini Card */
|
| 2210 |
+ {IWL_PCI_DEVICE(0x4232, 0x1325, iwl5100_bgn_cfg)}, /* Half Mini Card */
|
| 2211 |
+ {IWL_PCI_DEVICE(0x4232, 0x1226, iwl5100_abg_cfg)}, /* Mini Card */
|
| 2212 |
+ {IWL_PCI_DEVICE(0x4232, 0x1326, iwl5100_abg_cfg)}, /* Half Mini Card */
|
| 2213 |
+ {IWL_PCI_DEVICE(0x4237, 0x1211, iwl5100_agn_cfg)}, /* Mini Card */
|
| 2214 |
+ {IWL_PCI_DEVICE(0x4237, 0x1311, iwl5100_agn_cfg)}, /* Half Mini Card */
|
| 2215 |
+ {IWL_PCI_DEVICE(0x4237, 0x1214, iwl5100_agn_cfg)}, /* Mini Card */
|
| 2216 |
+ {IWL_PCI_DEVICE(0x4237, 0x1314, iwl5100_agn_cfg)}, /* Half Mini Card */
|
| 2217 |
+ {IWL_PCI_DEVICE(0x4237, 0x1215, iwl5100_bgn_cfg)}, /* Mini Card */
|
| 2218 |
+ {IWL_PCI_DEVICE(0x4237, 0x1315, iwl5100_bgn_cfg)}, /* Half Mini Card */
|
| 2219 |
+ {IWL_PCI_DEVICE(0x4237, 0x1216, iwl5100_abg_cfg)}, /* Mini Card */
|
| 2220 |
+ {IWL_PCI_DEVICE(0x4237, 0x1316, iwl5100_abg_cfg)}, /* Half Mini Card */
|
| 2221 |
+
|
| 2222 |
+/* 5300 Series WiFi */
|
| 2223 |
+ {IWL_PCI_DEVICE(0x4235, 0x1021, iwl5300_agn_cfg)}, /* Mini Card */
|
| 2224 |
+ {IWL_PCI_DEVICE(0x4235, 0x1121, iwl5300_agn_cfg)}, /* Half Mini Card */
|
| 2225 |
+ {IWL_PCI_DEVICE(0x4235, 0x1024, iwl5300_agn_cfg)}, /* Mini Card */
|
| 2226 |
+ {IWL_PCI_DEVICE(0x4235, 0x1124, iwl5300_agn_cfg)}, /* Half Mini Card */
|
| 2227 |
+ {IWL_PCI_DEVICE(0x4235, 0x1001, iwl5300_agn_cfg)}, /* Mini Card */
|
| 2228 |
+ {IWL_PCI_DEVICE(0x4235, 0x1101, iwl5300_agn_cfg)}, /* Half Mini Card */
|
| 2229 |
+ {IWL_PCI_DEVICE(0x4235, 0x1004, iwl5300_agn_cfg)}, /* Mini Card */
|
| 2230 |
+ {IWL_PCI_DEVICE(0x4235, 0x1104, iwl5300_agn_cfg)}, /* Half Mini Card */
|
| 2231 |
+ {IWL_PCI_DEVICE(0x4236, 0x1011, iwl5300_agn_cfg)}, /* Mini Card */
|
| 2232 |
+ {IWL_PCI_DEVICE(0x4236, 0x1111, iwl5300_agn_cfg)}, /* Half Mini Card */
|
| 2233 |
+ {IWL_PCI_DEVICE(0x4236, 0x1014, iwl5300_agn_cfg)}, /* Mini Card */
|
| 2234 |
+ {IWL_PCI_DEVICE(0x4236, 0x1114, iwl5300_agn_cfg)}, /* Half Mini Card */
|
| 2235 |
+
|
| 2236 |
+/* 5350 Series WiFi/WiMax */
|
| 2237 |
+ {IWL_PCI_DEVICE(0x423A, 0x1001, iwl5350_agn_cfg)}, /* Mini Card */
|
| 2238 |
+ {IWL_PCI_DEVICE(0x423A, 0x1021, iwl5350_agn_cfg)}, /* Mini Card */
|
| 2239 |
+ {IWL_PCI_DEVICE(0x423B, 0x1011, iwl5350_agn_cfg)}, /* Mini Card */
|
| 2240 |
+
|
| 2241 |
+/* 5150 Series Wifi/WiMax */
|
| 2242 |
+ {IWL_PCI_DEVICE(0x423C, 0x1201, iwl5150_agn_cfg)}, /* Mini Card */
|
| 2243 |
+ {IWL_PCI_DEVICE(0x423C, 0x1301, iwl5150_agn_cfg)}, /* Half Mini Card */
|
| 2244 |
+ {IWL_PCI_DEVICE(0x423C, 0x1206, iwl5150_abg_cfg)}, /* Mini Card */
|
| 2245 |
+ {IWL_PCI_DEVICE(0x423C, 0x1306, iwl5150_abg_cfg)}, /* Half Mini Card */
|
| 2246 |
+ {IWL_PCI_DEVICE(0x423C, 0x1221, iwl5150_agn_cfg)}, /* Mini Card */
|
| 2247 |
+ {IWL_PCI_DEVICE(0x423C, 0x1321, iwl5150_agn_cfg)}, /* Half Mini Card */
|
| 2248 |
+
|
| 2249 |
+ {IWL_PCI_DEVICE(0x423D, 0x1211, iwl5150_agn_cfg)}, /* Mini Card */
|
| 2250 |
+ {IWL_PCI_DEVICE(0x423D, 0x1311, iwl5150_agn_cfg)}, /* Half Mini Card */
|
| 2251 |
+ {IWL_PCI_DEVICE(0x423D, 0x1216, iwl5150_abg_cfg)}, /* Mini Card */
|
| 2252 |
+ {IWL_PCI_DEVICE(0x423D, 0x1316, iwl5150_abg_cfg)}, /* Half Mini Card */
|
| 2253 |
/* 6000/6050 Series */
|
| 2254 |
{IWL_PCI_DEVICE(0x008D, PCI_ANY_ID, iwl6000h_2agn_cfg)},
|
| 2255 |
{IWL_PCI_DEVICE(0x008E, PCI_ANY_ID, iwl6000h_2agn_cfg)},
|
| 2256 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
|
| 2257 |
index cea2ee2..3539ea4 100644
|
| 2258 |
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
|
| 2259 |
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
|
| 2260 |
@@ -53,9 +53,10 @@ extern struct iwl_cfg iwl4965_agn_cfg;
|
| 2261 |
extern struct iwl_cfg iwl5300_agn_cfg;
|
| 2262 |
extern struct iwl_cfg iwl5100_agn_cfg;
|
| 2263 |
extern struct iwl_cfg iwl5350_agn_cfg;
|
| 2264 |
-extern struct iwl_cfg iwl5100_bg_cfg;
|
| 2265 |
+extern struct iwl_cfg iwl5100_bgn_cfg;
|
| 2266 |
extern struct iwl_cfg iwl5100_abg_cfg;
|
| 2267 |
extern struct iwl_cfg iwl5150_agn_cfg;
|
| 2268 |
+extern struct iwl_cfg iwl5150_abg_cfg;
|
| 2269 |
extern struct iwl_cfg iwl6000h_2agn_cfg;
|
| 2270 |
extern struct iwl_cfg iwl6000i_2agn_cfg;
|
| 2271 |
extern struct iwl_cfg iwl6000_3agn_cfg;
|
| 2272 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
|
| 2273 |
index cc96d13..7f15b7e 100644
|
| 2274 |
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
|
| 2275 |
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
|
| 2276 |
@@ -791,8 +791,10 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
|
| 2277 |
hdr->seq_ctrl |= cpu_to_le16(seq_number);
|
| 2278 |
seq_number += 0x10;
|
| 2279 |
/* aggregation is on for this <sta,tid> */
|
| 2280 |
- if (info->flags & IEEE80211_TX_CTL_AMPDU)
|
| 2281 |
+ if (info->flags & IEEE80211_TX_CTL_AMPDU &&
|
| 2282 |
+ priv->stations[sta_id].tid[tid].agg.state == IWL_AGG_ON) {
|
| 2283 |
txq_id = priv->stations[sta_id].tid[tid].agg.txq_id;
|
| 2284 |
+ }
|
| 2285 |
}
|
| 2286 |
|
| 2287 |
txq = &priv->txq[txq_id];
|
| 2288 |
@@ -1273,7 +1275,7 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid)
|
| 2289 |
{
|
| 2290 |
int tx_fifo_id, txq_id, sta_id, ssn = -1;
|
| 2291 |
struct iwl_tid_data *tid_data;
|
| 2292 |
- int ret, write_ptr, read_ptr;
|
| 2293 |
+ int write_ptr, read_ptr;
|
| 2294 |
unsigned long flags;
|
| 2295 |
|
| 2296 |
if (!ra) {
|
| 2297 |
@@ -1325,13 +1327,17 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8 *ra, u16 tid)
|
| 2298 |
priv->stations[sta_id].tid[tid].agg.state = IWL_AGG_OFF;
|
| 2299 |
|
| 2300 |
spin_lock_irqsave(&priv->lock, flags);
|
| 2301 |
- ret = priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, ssn,
|
| 2302 |
+ /*
|
| 2303 |
+ * the only reason this call can fail is queue number out of range,
|
| 2304 |
+ * which can happen if uCode is reloaded and all the station
|
| 2305 |
+ * information are lost. if it is outside the range, there is no need
|
| 2306 |
+ * to deactivate the uCode queue, just return "success" to allow
|
| 2307 |
+ * mac80211 to clean up it own data.
|
| 2308 |
+ */
|
| 2309 |
+ priv->cfg->ops->lib->txq_agg_disable(priv, txq_id, ssn,
|
| 2310 |
tx_fifo_id);
|
| 2311 |
spin_unlock_irqrestore(&priv->lock, flags);
|
| 2312 |
|
| 2313 |
- if (ret)
|
| 2314 |
- return ret;
|
| 2315 |
-
|
| 2316 |
ieee80211_stop_tx_ba_cb_irqsafe(priv->hw, ra, tid);
|
| 2317 |
|
| 2318 |
return 0;
|
| 2319 |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c
|
| 2320 |
index b3c4fbd..805284d 100644
|
| 2321 |
--- a/drivers/net/wireless/p54/p54usb.c
|
| 2322 |
+++ b/drivers/net/wireless/p54/p54usb.c
|
| 2323 |
@@ -78,6 +78,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
|
| 2324 |
{USB_DEVICE(0x1413, 0x5400)}, /* Telsey 802.11g USB2.0 Adapter */
|
| 2325 |
{USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */
|
| 2326 |
{USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */
|
| 2327 |
+ {USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */
|
| 2328 |
{USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */
|
| 2329 |
{USB_DEVICE(0x413c, 0x8104)}, /* Cohiba Proto board */
|
| 2330 |
{}
|
| 2331 |
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
|
| 2332 |
index 16429c4..c6ca7ee 100644
|
| 2333 |
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
|
| 2334 |
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
|
| 2335 |
@@ -190,6 +190,7 @@ static void rtl8180_handle_tx(struct ieee80211_hw *dev, unsigned int prio)
|
| 2336 |
info->flags |= IEEE80211_TX_STAT_ACK;
|
| 2337 |
|
| 2338 |
info->status.rates[0].count = (flags & 0xFF) + 1;
|
| 2339 |
+ info->status.rates[1].idx = -1;
|
| 2340 |
|
| 2341 |
ieee80211_tx_status_irqsafe(dev, skb);
|
| 2342 |
if (ring->entries - skb_queue_len(&ring->queue) == 2)
|
| 2343 |
diff --git a/drivers/net/wireless/wl12xx/wl1251_sdio.c b/drivers/net/wireless/wl12xx/wl1251_sdio.c
|
| 2344 |
index 9423f22..d74b89b 100644
|
| 2345 |
--- a/drivers/net/wireless/wl12xx/wl1251_sdio.c
|
| 2346 |
+++ b/drivers/net/wireless/wl12xx/wl1251_sdio.c
|
| 2347 |
@@ -160,6 +160,7 @@ disable:
|
| 2348 |
sdio_disable_func(func);
|
| 2349 |
release:
|
| 2350 |
sdio_release_host(func);
|
| 2351 |
+ wl1251_free_hw(wl);
|
| 2352 |
return ret;
|
| 2353 |
}
|
| 2354 |
|
| 2355 |
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
|
| 2356 |
index a7aae24..1f1f5a8 100644
|
| 2357 |
--- a/drivers/oprofile/cpu_buffer.c
|
| 2358 |
+++ b/drivers/oprofile/cpu_buffer.c
|
| 2359 |
@@ -30,23 +30,7 @@
|
| 2360 |
|
| 2361 |
#define OP_BUFFER_FLAGS 0
|
| 2362 |
|
| 2363 |
-/*
|
| 2364 |
- * Read and write access is using spin locking. Thus, writing to the
|
| 2365 |
- * buffer by NMI handler (x86) could occur also during critical
|
| 2366 |
- * sections when reading the buffer. To avoid this, there are 2
|
| 2367 |
- * buffers for independent read and write access. Read access is in
|
| 2368 |
- * process context only, write access only in the NMI handler. If the
|
| 2369 |
- * read buffer runs empty, both buffers are swapped atomically. There
|
| 2370 |
- * is potentially a small window during swapping where the buffers are
|
| 2371 |
- * disabled and samples could be lost.
|
| 2372 |
- *
|
| 2373 |
- * Using 2 buffers is a little bit overhead, but the solution is clear
|
| 2374 |
- * and does not require changes in the ring buffer implementation. It
|
| 2375 |
- * can be changed to a single buffer solution when the ring buffer
|
| 2376 |
- * access is implemented as non-locking atomic code.
|
| 2377 |
- */
|
| 2378 |
-static struct ring_buffer *op_ring_buffer_read;
|
| 2379 |
-static struct ring_buffer *op_ring_buffer_write;
|
| 2380 |
+static struct ring_buffer *op_ring_buffer;
|
| 2381 |
DEFINE_PER_CPU(struct oprofile_cpu_buffer, cpu_buffer);
|
| 2382 |
|
| 2383 |
static void wq_sync_buffer(struct work_struct *work);
|
| 2384 |
@@ -69,12 +53,9 @@ void oprofile_cpu_buffer_inc_smpl_lost(void)
|
| 2385 |
|
| 2386 |
void free_cpu_buffers(void)
|
| 2387 |
{
|
| 2388 |
- if (op_ring_buffer_read)
|
| 2389 |
- ring_buffer_free(op_ring_buffer_read);
|
| 2390 |
- op_ring_buffer_read = NULL;
|
| 2391 |
- if (op_ring_buffer_write)
|
| 2392 |
- ring_buffer_free(op_ring_buffer_write);
|
| 2393 |
- op_ring_buffer_write = NULL;
|
| 2394 |
+ if (op_ring_buffer)
|
| 2395 |
+ ring_buffer_free(op_ring_buffer);
|
| 2396 |
+ op_ring_buffer = NULL;
|
| 2397 |
}
|
| 2398 |
|
| 2399 |
#define RB_EVENT_HDR_SIZE 4
|
| 2400 |
@@ -87,11 +68,8 @@ int alloc_cpu_buffers(void)
|
| 2401 |
unsigned long byte_size = buffer_size * (sizeof(struct op_sample) +
|
| 2402 |
RB_EVENT_HDR_SIZE);
|
| 2403 |
|
| 2404 |
- op_ring_buffer_read = ring_buffer_alloc(byte_size, OP_BUFFER_FLAGS);
|
| 2405 |
- if (!op_ring_buffer_read)
|
| 2406 |
- goto fail;
|
| 2407 |
- op_ring_buffer_write = ring_buffer_alloc(byte_size, OP_BUFFER_FLAGS);
|
| 2408 |
- if (!op_ring_buffer_write)
|
| 2409 |
+ op_ring_buffer = ring_buffer_alloc(byte_size, OP_BUFFER_FLAGS);
|
| 2410 |
+ if (!op_ring_buffer)
|
| 2411 |
goto fail;
|
| 2412 |
|
| 2413 |
for_each_possible_cpu(i) {
|
| 2414 |
@@ -163,16 +141,11 @@ struct op_sample
|
| 2415 |
*op_cpu_buffer_write_reserve(struct op_entry *entry, unsigned long size)
|
| 2416 |
{
|
| 2417 |
entry->event = ring_buffer_lock_reserve
|
| 2418 |
- (op_ring_buffer_write, sizeof(struct op_sample) +
|
| 2419 |
+ (op_ring_buffer, sizeof(struct op_sample) +
|
| 2420 |
size * sizeof(entry->sample->data[0]));
|
| 2421 |
- if (entry->event)
|
| 2422 |
- entry->sample = ring_buffer_event_data(entry->event);
|
| 2423 |
- else
|
| 2424 |
- entry->sample = NULL;
|
| 2425 |
-
|
| 2426 |
- if (!entry->sample)
|
| 2427 |
+ if (!entry->event)
|
| 2428 |
return NULL;
|
| 2429 |
-
|
| 2430 |
+ entry->sample = ring_buffer_event_data(entry->event);
|
| 2431 |
entry->size = size;
|
| 2432 |
entry->data = entry->sample->data;
|
| 2433 |
|
| 2434 |
@@ -181,25 +154,16 @@ struct op_sample
|
| 2435 |
|
| 2436 |
int op_cpu_buffer_write_commit(struct op_entry *entry)
|
| 2437 |
{
|
| 2438 |
- return ring_buffer_unlock_commit(op_ring_buffer_write, entry->event);
|
| 2439 |
+ return ring_buffer_unlock_commit(op_ring_buffer, entry->event);
|
| 2440 |
}
|
| 2441 |
|
| 2442 |
struct op_sample *op_cpu_buffer_read_entry(struct op_entry *entry, int cpu)
|
| 2443 |
{
|
| 2444 |
struct ring_buffer_event *e;
|
| 2445 |
- e = ring_buffer_consume(op_ring_buffer_read, cpu, NULL);
|
| 2446 |
- if (e)
|
| 2447 |
- goto event;
|
| 2448 |
- if (ring_buffer_swap_cpu(op_ring_buffer_read,
|
| 2449 |
- op_ring_buffer_write,
|
| 2450 |
- cpu))
|
| 2451 |
+ e = ring_buffer_consume(op_ring_buffer, cpu, NULL);
|
| 2452 |
+ if (!e)
|
| 2453 |
return NULL;
|
| 2454 |
- e = ring_buffer_consume(op_ring_buffer_read, cpu, NULL);
|
| 2455 |
- if (e)
|
| 2456 |
- goto event;
|
| 2457 |
- return NULL;
|
| 2458 |
|
| 2459 |
-event:
|
| 2460 |
entry->event = e;
|
| 2461 |
entry->sample = ring_buffer_event_data(e);
|
| 2462 |
entry->size = (ring_buffer_event_length(e) - sizeof(struct op_sample))
|
| 2463 |
@@ -210,8 +174,7 @@ event:
|
| 2464 |
|
| 2465 |
unsigned long op_cpu_buffer_entries(int cpu)
|
| 2466 |
{
|
| 2467 |
- return ring_buffer_entries_cpu(op_ring_buffer_read, cpu)
|
| 2468 |
- + ring_buffer_entries_cpu(op_ring_buffer_write, cpu);
|
| 2469 |
+ return ring_buffer_entries_cpu(op_ring_buffer, cpu);
|
| 2470 |
}
|
| 2471 |
|
| 2472 |
static int
|
| 2473 |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
| 2474 |
index e2641cd..c0de0b9 100644
|
| 2475 |
--- a/drivers/pci/quirks.c
|
| 2476 |
+++ b/drivers/pci/quirks.c
|
| 2477 |
@@ -1444,7 +1444,8 @@ static void quirk_jmicron_ata(struct pci_dev *pdev)
|
| 2478 |
conf5 &= ~(1 << 24); /* Clear bit 24 */
|
| 2479 |
|
| 2480 |
switch (pdev->device) {
|
| 2481 |
- case PCI_DEVICE_ID_JMICRON_JMB360:
|
| 2482 |
+ case PCI_DEVICE_ID_JMICRON_JMB360: /* SATA single port */
|
| 2483 |
+ case PCI_DEVICE_ID_JMICRON_JMB362: /* SATA dual ports */
|
| 2484 |
/* The controller should be in single function ahci mode */
|
| 2485 |
conf1 |= 0x0002A100; /* Set 8, 13, 15, 17 */
|
| 2486 |
break;
|
| 2487 |
@@ -1480,12 +1481,14 @@ static void quirk_jmicron_ata(struct pci_dev *pdev)
|
| 2488 |
}
|
| 2489 |
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata);
|
| 2490 |
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata);
|
| 2491 |
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB362, quirk_jmicron_ata);
|
| 2492 |
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata);
|
| 2493 |
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata);
|
| 2494 |
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata);
|
| 2495 |
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, quirk_jmicron_ata);
|
| 2496 |
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata);
|
| 2497 |
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata);
|
| 2498 |
+DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB362, quirk_jmicron_ata);
|
| 2499 |
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata);
|
| 2500 |
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata);
|
| 2501 |
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata);
|
| 2502 |
@@ -2092,6 +2095,8 @@ static void __devinit quirk_disable_msi(struct pci_dev *dev)
|
| 2503 |
}
|
| 2504 |
}
|
| 2505 |
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_disable_msi);
|
| 2506 |
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0xa238, quirk_disable_msi);
|
| 2507 |
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi);
|
| 2508 |
|
| 2509 |
/* Go through the list of Hypertransport capabilities and
|
| 2510 |
* return 1 if a HT MSI capability is found and enabled */
|
| 2511 |
@@ -2183,15 +2188,16 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS,
|
| 2512 |
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8132_BRIDGE,
|
| 2513 |
ht_enable_msi_mapping);
|
| 2514 |
|
| 2515 |
-/* The P5N32-SLI Premium motherboard from Asus has a problem with msi
|
| 2516 |
+/* The P5N32-SLI motherboards from Asus have a problem with msi
|
| 2517 |
* for the MCP55 NIC. It is not yet determined whether the msi problem
|
| 2518 |
* also affects other devices. As for now, turn off msi for this device.
|
| 2519 |
*/
|
| 2520 |
static void __devinit nvenet_msi_disable(struct pci_dev *dev)
|
| 2521 |
{
|
| 2522 |
- if (dmi_name_in_vendors("P5N32-SLI PREMIUM")) {
|
| 2523 |
+ if (dmi_name_in_vendors("P5N32-SLI PREMIUM") ||
|
| 2524 |
+ dmi_name_in_vendors("P5N32-E SLI")) {
|
| 2525 |
dev_info(&dev->dev,
|
| 2526 |
- "Disabling msi for MCP55 NIC on P5N32-SLI Premium\n");
|
| 2527 |
+ "Disabling msi for MCP55 NIC on P5N32-SLI\n");
|
| 2528 |
dev->no_msi = 1;
|
| 2529 |
}
|
| 2530 |
}
|
| 2531 |
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
|
| 2532 |
index 473e5f2..66c2d6a 100644
|
| 2533 |
--- a/drivers/rtc/rtc-cmos.c
|
| 2534 |
+++ b/drivers/rtc/rtc-cmos.c
|
| 2535 |
@@ -723,6 +723,9 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
|
| 2536 |
}
|
| 2537 |
}
|
| 2538 |
|
| 2539 |
+ cmos_rtc.dev = dev;
|
| 2540 |
+ dev_set_drvdata(dev, &cmos_rtc);
|
| 2541 |
+
|
| 2542 |
cmos_rtc.rtc = rtc_device_register(driver_name, dev,
|
| 2543 |
&cmos_rtc_ops, THIS_MODULE);
|
| 2544 |
if (IS_ERR(cmos_rtc.rtc)) {
|
| 2545 |
@@ -730,8 +733,6 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
|
| 2546 |
goto cleanup0;
|
| 2547 |
}
|
| 2548 |
|
| 2549 |
- cmos_rtc.dev = dev;
|
| 2550 |
- dev_set_drvdata(dev, &cmos_rtc);
|
| 2551 |
rename_region(ports, dev_name(&cmos_rtc.rtc->dev));
|
| 2552 |
|
| 2553 |
spin_lock_irq(&rtc_lock);
|
| 2554 |
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
|
| 2555 |
index e0d7b99..43bfffe 100644
|
| 2556 |
--- a/drivers/rtc/rtc-s3c.c
|
| 2557 |
+++ b/drivers/rtc/rtc-s3c.c
|
| 2558 |
@@ -456,8 +456,6 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
|
| 2559 |
pr_debug("s3c2410_rtc: RTCCON=%02x\n",
|
| 2560 |
readb(s3c_rtc_base + S3C2410_RTCCON));
|
| 2561 |
|
| 2562 |
- s3c_rtc_setfreq(&pdev->dev, 1);
|
| 2563 |
-
|
| 2564 |
device_init_wakeup(&pdev->dev, 1);
|
| 2565 |
|
| 2566 |
/* register RTC and exit */
|
| 2567 |
@@ -474,6 +472,9 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
|
| 2568 |
rtc->max_user_freq = 128;
|
| 2569 |
|
| 2570 |
platform_set_drvdata(pdev, rtc);
|
| 2571 |
+
|
| 2572 |
+ s3c_rtc_setfreq(&pdev->dev, 1);
|
| 2573 |
+
|
| 2574 |
return 0;
|
| 2575 |
|
| 2576 |
err_nortc:
|
| 2577 |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
|
| 2578 |
index 799bd75..f3e5e30 100644
|
| 2579 |
--- a/drivers/scsi/qla2xxx/qla_isr.c
|
| 2580 |
+++ b/drivers/scsi/qla2xxx/qla_isr.c
|
| 2581 |
@@ -2240,30 +2240,28 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)
|
| 2582 |
|
| 2583 |
/* If possible, enable MSI-X. */
|
| 2584 |
if (!IS_QLA2432(ha) && !IS_QLA2532(ha) &&
|
| 2585 |
- !IS_QLA8432(ha) && !IS_QLA8001(ha))
|
| 2586 |
- goto skip_msix;
|
| 2587 |
+ !IS_QLA8432(ha) && !IS_QLA8001(ha))
|
| 2588 |
+ goto skip_msi;
|
| 2589 |
+
|
| 2590 |
+ if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP &&
|
| 2591 |
+ (ha->pdev->subsystem_device == 0x7040 ||
|
| 2592 |
+ ha->pdev->subsystem_device == 0x7041 ||
|
| 2593 |
+ ha->pdev->subsystem_device == 0x1705)) {
|
| 2594 |
+ DEBUG2(qla_printk(KERN_WARNING, ha,
|
| 2595 |
+ "MSI-X: Unsupported ISP2432 SSVID/SSDID (0x%X,0x%X).\n",
|
| 2596 |
+ ha->pdev->subsystem_vendor,
|
| 2597 |
+ ha->pdev->subsystem_device));
|
| 2598 |
+ goto skip_msi;
|
| 2599 |
+ }
|
| 2600 |
|
| 2601 |
if (IS_QLA2432(ha) && (ha->pdev->revision < QLA_MSIX_CHIP_REV_24XX ||
|
| 2602 |
!QLA_MSIX_FW_MODE_1(ha->fw_attributes))) {
|
| 2603 |
DEBUG2(qla_printk(KERN_WARNING, ha,
|
| 2604 |
"MSI-X: Unsupported ISP2432 (0x%X, 0x%X).\n",
|
| 2605 |
ha->pdev->revision, ha->fw_attributes));
|
| 2606 |
-
|
| 2607 |
goto skip_msix;
|
| 2608 |
}
|
| 2609 |
|
| 2610 |
- if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP &&
|
| 2611 |
- (ha->pdev->subsystem_device == 0x7040 ||
|
| 2612 |
- ha->pdev->subsystem_device == 0x7041 ||
|
| 2613 |
- ha->pdev->subsystem_device == 0x1705)) {
|
| 2614 |
- DEBUG2(qla_printk(KERN_WARNING, ha,
|
| 2615 |
- "MSI-X: Unsupported ISP2432 SSVID/SSDID (0x%X, 0x%X).\n",
|
| 2616 |
- ha->pdev->subsystem_vendor,
|
| 2617 |
- ha->pdev->subsystem_device));
|
| 2618 |
-
|
| 2619 |
- goto skip_msi;
|
| 2620 |
- }
|
| 2621 |
-
|
| 2622 |
ret = qla24xx_enable_msix(ha, rsp);
|
| 2623 |
if (!ret) {
|
| 2624 |
DEBUG2(qla_printk(KERN_INFO, ha,
|
| 2625 |
diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c
|
| 2626 |
index 9aef87f..27829e7 100644
|
| 2627 |
--- a/drivers/staging/comedi/drivers/ni_mio_cs.c
|
| 2628 |
+++ b/drivers/staging/comedi/drivers/ni_mio_cs.c
|
| 2629 |
@@ -123,7 +123,7 @@ static const struct ni_board_struct ni_boards[] = {
|
| 2630 |
.adbits = 12,
|
| 2631 |
.ai_fifo_depth = 1024,
|
| 2632 |
.alwaysdither = 0,
|
| 2633 |
- .gainlkup = ai_gain_16,
|
| 2634 |
+ .gainlkup = ai_gain_4,
|
| 2635 |
.ai_speed = 5000,
|
| 2636 |
.n_aochan = 2,
|
| 2637 |
.aobits = 12,
|
| 2638 |
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
|
| 2639 |
index 66274d7..88644ef 100644
|
| 2640 |
--- a/drivers/staging/rtl8192su/r8192U_core.c
|
| 2641 |
+++ b/drivers/staging/rtl8192su/r8192U_core.c
|
| 2642 |
@@ -120,6 +120,7 @@ static struct usb_device_id rtl8192_usb_id_tbl[] = {
|
| 2643 |
{USB_DEVICE(0x050d, 0x805E)},
|
| 2644 |
/* Sitecom */
|
| 2645 |
{USB_DEVICE(0x0df6, 0x0031)},
|
| 2646 |
+ {USB_DEVICE(0x0df6, 0x004b)}, /* WL-349 */
|
| 2647 |
/* EnGenius */
|
| 2648 |
{USB_DEVICE(0x1740, 0x9201)},
|
| 2649 |
/* Dlink */
|
| 2650 |
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
|
| 2651 |
index 53450b4..269d1e2 100644
|
| 2652 |
--- a/drivers/staging/vt6655/device_main.c
|
| 2653 |
+++ b/drivers/staging/vt6655/device_main.c
|
| 2654 |
@@ -1089,11 +1089,13 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
|
| 2655 |
}
|
| 2656 |
//2008-07-21-01<Add>by MikeLiu
|
| 2657 |
//register wpadev
|
| 2658 |
+#if 0
|
| 2659 |
if(wpa_set_wpadev(pDevice, 1)!=0) {
|
| 2660 |
printk("Fail to Register WPADEV?\n");
|
| 2661 |
unregister_netdev(pDevice->dev);
|
| 2662 |
free_netdev(dev);
|
| 2663 |
}
|
| 2664 |
+#endif
|
| 2665 |
device_print_info(pDevice);
|
| 2666 |
pci_set_drvdata(pcid, pDevice);
|
| 2667 |
return 0;
|
| 2668 |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
|
| 2669 |
index e6119ed..0e64037 100644
|
| 2670 |
--- a/drivers/usb/class/cdc-acm.c
|
| 2671 |
+++ b/drivers/usb/class/cdc-acm.c
|
| 2672 |
@@ -1201,7 +1201,7 @@ made_compressed_probe:
|
| 2673 |
if (rcv->urb == NULL) {
|
| 2674 |
dev_dbg(&intf->dev,
|
| 2675 |
"out of memory (read urbs usb_alloc_urb)\n");
|
| 2676 |
- goto alloc_fail7;
|
| 2677 |
+ goto alloc_fail6;
|
| 2678 |
}
|
| 2679 |
|
| 2680 |
rcv->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
| 2681 |
@@ -1225,7 +1225,7 @@ made_compressed_probe:
|
| 2682 |
if (snd->urb == NULL) {
|
| 2683 |
dev_dbg(&intf->dev,
|
| 2684 |
"out of memory (write urbs usb_alloc_urb)");
|
| 2685 |
- goto alloc_fail7;
|
| 2686 |
+ goto alloc_fail8;
|
| 2687 |
}
|
| 2688 |
|
| 2689 |
if (usb_endpoint_xfer_int(epwrite))
|
| 2690 |
@@ -1264,6 +1264,7 @@ made_compressed_probe:
|
| 2691 |
i = device_create_file(&intf->dev,
|
| 2692 |
&dev_attr_iCountryCodeRelDate);
|
| 2693 |
if (i < 0) {
|
| 2694 |
+ device_remove_file(&intf->dev, &dev_attr_wCountryCodes);
|
| 2695 |
kfree(acm->country_codes);
|
| 2696 |
goto skip_countries;
|
| 2697 |
}
|
| 2698 |
@@ -1300,6 +1301,7 @@ alloc_fail8:
|
| 2699 |
usb_free_urb(acm->wb[i].urb);
|
| 2700 |
alloc_fail7:
|
| 2701 |
acm_read_buffers_free(acm);
|
| 2702 |
+alloc_fail6:
|
| 2703 |
for (i = 0; i < num_rx_buf; i++)
|
| 2704 |
usb_free_urb(acm->ru[i].urb);
|
| 2705 |
usb_free_urb(acm->ctrlurb);
|
| 2706 |
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
|
| 2707 |
index fa3d142..08a9a62 100644
|
| 2708 |
--- a/drivers/usb/gadget/fsl_udc_core.c
|
| 2709 |
+++ b/drivers/usb/gadget/fsl_udc_core.c
|
| 2710 |
@@ -489,7 +489,7 @@ static int fsl_ep_enable(struct usb_ep *_ep,
|
| 2711 |
case USB_ENDPOINT_XFER_ISOC:
|
| 2712 |
/* Calculate transactions needed for high bandwidth iso */
|
| 2713 |
mult = (unsigned char)(1 + ((max >> 11) & 0x03));
|
| 2714 |
- max = max & 0x8ff; /* bit 0~10 */
|
| 2715 |
+ max = max & 0x7ff; /* bit 0~10 */
|
| 2716 |
/* 3 transactions at most */
|
| 2717 |
if (mult > 3)
|
| 2718 |
goto en_done;
|
| 2719 |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
|
| 2720 |
index 698f461..6ac3976 100644
|
| 2721 |
--- a/drivers/usb/host/ehci-hub.c
|
| 2722 |
+++ b/drivers/usb/host/ehci-hub.c
|
| 2723 |
@@ -292,6 +292,16 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
|
| 2724 |
/* manually resume the ports we suspended during bus_suspend() */
|
| 2725 |
i = HCS_N_PORTS (ehci->hcs_params);
|
| 2726 |
while (i--) {
|
| 2727 |
+ /* clear phy low power mode before resume */
|
| 2728 |
+ if (ehci->has_hostpc) {
|
| 2729 |
+ u32 __iomem *hostpc_reg =
|
| 2730 |
+ (u32 __iomem *)((u8 *)ehci->regs
|
| 2731 |
+ + HOSTPC0 + 4 * (i & 0xff));
|
| 2732 |
+ temp = ehci_readl(ehci, hostpc_reg);
|
| 2733 |
+ ehci_writel(ehci, temp & ~HOSTPC_PHCD,
|
| 2734 |
+ hostpc_reg);
|
| 2735 |
+ mdelay(5);
|
| 2736 |
+ }
|
| 2737 |
temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
|
| 2738 |
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
|
| 2739 |
if (test_bit(i, &ehci->bus_suspended) &&
|
| 2740 |
@@ -676,6 +686,13 @@ static int ehci_hub_control (
|
| 2741 |
if (temp & PORT_SUSPEND) {
|
| 2742 |
if ((temp & PORT_PE) == 0)
|
| 2743 |
goto error;
|
| 2744 |
+ /* clear phy low power mode before resume */
|
| 2745 |
+ if (hostpc_reg) {
|
| 2746 |
+ temp1 = ehci_readl(ehci, hostpc_reg);
|
| 2747 |
+ ehci_writel(ehci, temp1 & ~HOSTPC_PHCD,
|
| 2748 |
+ hostpc_reg);
|
| 2749 |
+ mdelay(5);
|
| 2750 |
+ }
|
| 2751 |
/* resume signaling for 20 msec */
|
| 2752 |
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
|
| 2753 |
ehci_writel(ehci, temp | PORT_RESUME,
|
| 2754 |
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c
|
| 2755 |
index 9974f32..a24a92f 100644
|
| 2756 |
--- a/drivers/usb/host/xhci-hcd.c
|
| 2757 |
+++ b/drivers/usb/host/xhci-hcd.c
|
| 2758 |
@@ -97,6 +97,33 @@ int xhci_halt(struct xhci_hcd *xhci)
|
| 2759 |
}
|
| 2760 |
|
| 2761 |
/*
|
| 2762 |
+ * Set the run bit and wait for the host to be running.
|
| 2763 |
+ */
|
| 2764 |
+int xhci_start(struct xhci_hcd *xhci)
|
| 2765 |
+{
|
| 2766 |
+ u32 temp;
|
| 2767 |
+ int ret;
|
| 2768 |
+
|
| 2769 |
+ temp = xhci_readl(xhci, &xhci->op_regs->command);
|
| 2770 |
+ temp |= (CMD_RUN);
|
| 2771 |
+ xhci_dbg(xhci, "// Turn on HC, cmd = 0x%x.\n",
|
| 2772 |
+ temp);
|
| 2773 |
+ xhci_writel(xhci, temp, &xhci->op_regs->command);
|
| 2774 |
+
|
| 2775 |
+ /*
|
| 2776 |
+ * Wait for the HCHalted Status bit to be 0 to indicate the host is
|
| 2777 |
+ * running.
|
| 2778 |
+ */
|
| 2779 |
+ ret = handshake(xhci, &xhci->op_regs->status,
|
| 2780 |
+ STS_HALT, 0, XHCI_MAX_HALT_USEC);
|
| 2781 |
+ if (ret == -ETIMEDOUT)
|
| 2782 |
+ xhci_err(xhci, "Host took too long to start, "
|
| 2783 |
+ "waited %u microseconds.\n",
|
| 2784 |
+ XHCI_MAX_HALT_USEC);
|
| 2785 |
+ return ret;
|
| 2786 |
+}
|
| 2787 |
+
|
| 2788 |
+/*
|
| 2789 |
* Reset a halted HC, and set the internal HC state to HC_STATE_HALT.
|
| 2790 |
*
|
| 2791 |
* This resets pipelines, timers, counters, state machines, etc.
|
| 2792 |
@@ -107,6 +134,7 @@ int xhci_reset(struct xhci_hcd *xhci)
|
| 2793 |
{
|
| 2794 |
u32 command;
|
| 2795 |
u32 state;
|
| 2796 |
+ int ret;
|
| 2797 |
|
| 2798 |
state = xhci_readl(xhci, &xhci->op_regs->status);
|
| 2799 |
if ((state & STS_HALT) == 0) {
|
| 2800 |
@@ -121,7 +149,17 @@ int xhci_reset(struct xhci_hcd *xhci)
|
| 2801 |
/* XXX: Why does EHCI set this here? Shouldn't other code do this? */
|
| 2802 |
xhci_to_hcd(xhci)->state = HC_STATE_HALT;
|
| 2803 |
|
| 2804 |
- return handshake(xhci, &xhci->op_regs->command, CMD_RESET, 0, 250 * 1000);
|
| 2805 |
+ ret = handshake(xhci, &xhci->op_regs->command,
|
| 2806 |
+ CMD_RESET, 0, 250 * 1000);
|
| 2807 |
+ if (ret)
|
| 2808 |
+ return ret;
|
| 2809 |
+
|
| 2810 |
+ xhci_dbg(xhci, "Wait for controller to be ready for doorbell rings\n");
|
| 2811 |
+ /*
|
| 2812 |
+ * xHCI cannot write to any doorbells or operational registers other
|
| 2813 |
+ * than status until the "Controller Not Ready" flag is cleared.
|
| 2814 |
+ */
|
| 2815 |
+ return handshake(xhci, &xhci->op_regs->status, STS_CNR, 0, 250 * 1000);
|
| 2816 |
}
|
| 2817 |
|
| 2818 |
/*
|
| 2819 |
@@ -460,13 +498,11 @@ int xhci_run(struct usb_hcd *hcd)
|
| 2820 |
if (NUM_TEST_NOOPS > 0)
|
| 2821 |
doorbell = xhci_setup_one_noop(xhci);
|
| 2822 |
|
| 2823 |
- temp = xhci_readl(xhci, &xhci->op_regs->command);
|
| 2824 |
- temp |= (CMD_RUN);
|
| 2825 |
- xhci_dbg(xhci, "// Turn on HC, cmd = 0x%x.\n",
|
| 2826 |
- temp);
|
| 2827 |
- xhci_writel(xhci, temp, &xhci->op_regs->command);
|
| 2828 |
- /* Flush PCI posted writes */
|
| 2829 |
- temp = xhci_readl(xhci, &xhci->op_regs->command);
|
| 2830 |
+ if (xhci_start(xhci)) {
|
| 2831 |
+ xhci_halt(xhci);
|
| 2832 |
+ return -ENODEV;
|
| 2833 |
+ }
|
| 2834 |
+
|
| 2835 |
xhci_dbg(xhci, "// @%p = 0x%x\n", &xhci->op_regs->command, temp);
|
| 2836 |
if (doorbell)
|
| 2837 |
(*doorbell)(xhci);
|
| 2838 |
@@ -1414,6 +1450,8 @@ void xhci_endpoint_reset(struct usb_hcd *hcd,
|
| 2839 |
kfree(virt_ep->stopped_td);
|
| 2840 |
xhci_ring_cmd_db(xhci);
|
| 2841 |
}
|
| 2842 |
+ virt_ep->stopped_td = NULL;
|
| 2843 |
+ virt_ep->stopped_trb = NULL;
|
| 2844 |
spin_unlock_irqrestore(&xhci->lock, flags);
|
| 2845 |
|
| 2846 |
if (ret)
|
| 2847 |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
|
| 2848 |
index 821b7b4..317e8dc 100644
|
| 2849 |
--- a/drivers/usb/host/xhci-ring.c
|
| 2850 |
+++ b/drivers/usb/host/xhci-ring.c
|
| 2851 |
@@ -241,10 +241,27 @@ static int room_on_ring(struct xhci_hcd *xhci, struct xhci_ring *ring,
|
| 2852 |
int i;
|
| 2853 |
union xhci_trb *enq = ring->enqueue;
|
| 2854 |
struct xhci_segment *enq_seg = ring->enq_seg;
|
| 2855 |
+ struct xhci_segment *cur_seg;
|
| 2856 |
+ unsigned int left_on_ring;
|
| 2857 |
|
| 2858 |
/* Check if ring is empty */
|
| 2859 |
- if (enq == ring->dequeue)
|
| 2860 |
+ if (enq == ring->dequeue) {
|
| 2861 |
+ /* Can't use link trbs */
|
| 2862 |
+ left_on_ring = TRBS_PER_SEGMENT - 1;
|
| 2863 |
+ for (cur_seg = enq_seg->next; cur_seg != enq_seg;
|
| 2864 |
+ cur_seg = cur_seg->next)
|
| 2865 |
+ left_on_ring += TRBS_PER_SEGMENT - 1;
|
| 2866 |
+
|
| 2867 |
+ /* Always need one TRB free in the ring. */
|
| 2868 |
+ left_on_ring -= 1;
|
| 2869 |
+ if (num_trbs > left_on_ring) {
|
| 2870 |
+ xhci_warn(xhci, "Not enough room on ring; "
|
| 2871 |
+ "need %u TRBs, %u TRBs left\n",
|
| 2872 |
+ num_trbs, left_on_ring);
|
| 2873 |
+ return 0;
|
| 2874 |
+ }
|
| 2875 |
return 1;
|
| 2876 |
+ }
|
| 2877 |
/* Make sure there's an extra empty TRB available */
|
| 2878 |
for (i = 0; i <= num_trbs; ++i) {
|
| 2879 |
if (enq == ring->dequeue)
|
| 2880 |
@@ -333,7 +350,8 @@ static struct xhci_segment *find_trb_seg(
|
| 2881 |
while (cur_seg->trbs > trb ||
|
| 2882 |
&cur_seg->trbs[TRBS_PER_SEGMENT - 1] < trb) {
|
| 2883 |
generic_trb = &cur_seg->trbs[TRBS_PER_SEGMENT - 1].generic;
|
| 2884 |
- if (TRB_TYPE(generic_trb->field[3]) == TRB_LINK &&
|
| 2885 |
+ if ((generic_trb->field[3] & TRB_TYPE_BITMASK) ==
|
| 2886 |
+ TRB_TYPE(TRB_LINK) &&
|
| 2887 |
(generic_trb->field[3] & LINK_TOGGLE))
|
| 2888 |
*cycle_state = ~(*cycle_state) & 0x1;
|
| 2889 |
cur_seg = cur_seg->next;
|
| 2890 |
@@ -389,7 +407,7 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
|
| 2891 |
BUG();
|
| 2892 |
|
| 2893 |
trb = &state->new_deq_ptr->generic;
|
| 2894 |
- if (TRB_TYPE(trb->field[3]) == TRB_LINK &&
|
| 2895 |
+ if ((trb->field[3] & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK) &&
|
| 2896 |
(trb->field[3] & LINK_TOGGLE))
|
| 2897 |
state->new_cycle_state = ~(state->new_cycle_state) & 0x1;
|
| 2898 |
next_trb(xhci, ep_ring, &state->new_deq_seg, &state->new_deq_ptr);
|
| 2899 |
@@ -548,6 +566,8 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci,
|
| 2900 |
/* Otherwise just ring the doorbell to restart the ring */
|
| 2901 |
ring_ep_doorbell(xhci, slot_id, ep_index);
|
| 2902 |
}
|
| 2903 |
+ ep->stopped_td = NULL;
|
| 2904 |
+ ep->stopped_trb = NULL;
|
| 2905 |
|
| 2906 |
/*
|
| 2907 |
* Drop the lock and complete the URBs in the cancelled TD list.
|
| 2908 |
@@ -1065,8 +1085,13 @@ static int handle_tx_event(struct xhci_hcd *xhci,
|
| 2909 |
|
| 2910 |
ep->stopped_td = td;
|
| 2911 |
ep->stopped_trb = event_trb;
|
| 2912 |
+
|
| 2913 |
xhci_queue_reset_ep(xhci, slot_id, ep_index);
|
| 2914 |
xhci_cleanup_stalled_ring(xhci, td->urb->dev, ep_index);
|
| 2915 |
+
|
| 2916 |
+ ep->stopped_td = NULL;
|
| 2917 |
+ ep->stopped_trb = NULL;
|
| 2918 |
+
|
| 2919 |
xhci_ring_cmd_db(xhci);
|
| 2920 |
goto td_cleanup;
|
| 2921 |
default:
|
| 2922 |
@@ -1186,8 +1211,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
|
| 2923 |
for (cur_trb = ep_ring->dequeue, cur_seg = ep_ring->deq_seg;
|
| 2924 |
cur_trb != event_trb;
|
| 2925 |
next_trb(xhci, ep_ring, &cur_seg, &cur_trb)) {
|
| 2926 |
- if (TRB_TYPE(cur_trb->generic.field[3]) != TRB_TR_NOOP &&
|
| 2927 |
- TRB_TYPE(cur_trb->generic.field[3]) != TRB_LINK)
|
| 2928 |
+ if ((cur_trb->generic.field[3] &
|
| 2929 |
+ TRB_TYPE_BITMASK) != TRB_TYPE(TRB_TR_NOOP) &&
|
| 2930 |
+ (cur_trb->generic.field[3] &
|
| 2931 |
+ TRB_TYPE_BITMASK) != TRB_TYPE(TRB_LINK))
|
| 2932 |
td->urb->actual_length +=
|
| 2933 |
TRB_LEN(cur_trb->generic.field[2]);
|
| 2934 |
}
|
| 2935 |
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
|
| 2936 |
index 7d920f2..e3e087e 100644
|
| 2937 |
--- a/drivers/usb/serial/cp210x.c
|
| 2938 |
+++ b/drivers/usb/serial/cp210x.c
|
| 2939 |
@@ -61,6 +61,8 @@ static struct usb_device_id id_table [] = {
|
| 2940 |
{ USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */
|
| 2941 |
{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
|
| 2942 |
{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
|
| 2943 |
+ { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
|
| 2944 |
+ { USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
|
| 2945 |
{ USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
|
| 2946 |
{ USB_DEVICE(0x0FCF, 0x1004) }, /* Dynastream ANT2USB */
|
| 2947 |
{ USB_DEVICE(0x0FCF, 0x1006) }, /* Dynastream ANT development board */
|
| 2948 |
@@ -72,9 +74,12 @@ static struct usb_device_id id_table [] = {
|
| 2949 |
{ USB_DEVICE(0x10C4, 0x1601) }, /* Arkham Technology DS101 Adapter */
|
| 2950 |
{ USB_DEVICE(0x10C4, 0x800A) }, /* SPORTident BSM7-D-USB main station */
|
| 2951 |
{ USB_DEVICE(0x10C4, 0x803B) }, /* Pololu USB-serial converter */
|
| 2952 |
+ { USB_DEVICE(0x10C4, 0x8044) }, /* Cygnal Debug Adapter */
|
| 2953 |
+ { USB_DEVICE(0x10C4, 0x804E) }, /* Software Bisque Paramount ME build-in converter */
|
| 2954 |
{ USB_DEVICE(0x10C4, 0x8053) }, /* Enfora EDG1228 */
|
| 2955 |
{ USB_DEVICE(0x10C4, 0x8054) }, /* Enfora GSM2228 */
|
| 2956 |
{ USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */
|
| 2957 |
+ { USB_DEVICE(0x10C4, 0x806F) }, /* IMS USB to RS422 Converter Cable */
|
| 2958 |
{ USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */
|
| 2959 |
{ USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */
|
| 2960 |
{ USB_DEVICE(0x10C4, 0x80DD) }, /* Tracient RFID */
|
| 2961 |
@@ -82,12 +87,15 @@ static struct usb_device_id id_table [] = {
|
| 2962 |
{ USB_DEVICE(0x10C4, 0x8115) }, /* Arygon NFC/Mifare Reader */
|
| 2963 |
{ USB_DEVICE(0x10C4, 0x813D) }, /* Burnside Telecom Deskmobile */
|
| 2964 |
{ USB_DEVICE(0x10C4, 0x813F) }, /* Tams Master Easy Control */
|
| 2965 |
+ { USB_DEVICE(0x10C4, 0x8149) }, /* West Mountain Radio Computerized Battery Analyzer */
|
| 2966 |
{ USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */
|
| 2967 |
{ USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */
|
| 2968 |
{ USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */
|
| 2969 |
+ { USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */
|
| 2970 |
{ USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
|
| 2971 |
{ USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */
|
| 2972 |
{ USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */
|
| 2973 |
+ { USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */
|
| 2974 |
{ USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
|
| 2975 |
{ USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
|
| 2976 |
{ USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */
|
| 2977 |
@@ -105,6 +113,7 @@ static struct usb_device_id id_table [] = {
|
| 2978 |
{ USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */
|
| 2979 |
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
|
| 2980 |
{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
|
| 2981 |
+ { USB_DEVICE(0x10C4, 0xEA71) }, /* Infinity GPS-MIC-1 Radio Monophone */
|
| 2982 |
{ USB_DEVICE(0x10C4, 0xF001) }, /* Elan Digital Systems USBscope50 */
|
| 2983 |
{ USB_DEVICE(0x10C4, 0xF002) }, /* Elan Digital Systems USBwave12 */
|
| 2984 |
{ USB_DEVICE(0x10C4, 0xF003) }, /* Elan Digital Systems USBpulse100 */
|
| 2985 |
@@ -115,6 +124,8 @@ static struct usb_device_id id_table [] = {
|
| 2986 |
{ USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */
|
| 2987 |
{ USB_DEVICE(0x166A, 0x0303) }, /* Clipsal 5500PCU C-Bus USB interface */
|
| 2988 |
{ USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
|
| 2989 |
+ { USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
|
| 2990 |
+ { USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
|
| 2991 |
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
|
| 2992 |
{ USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
|
| 2993 |
{ } /* Terminating Entry */
|
| 2994 |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
|
| 2995 |
index 9cf4652..bf56be1 100644
|
| 2996 |
--- a/drivers/usb/serial/ftdi_sio.c
|
| 2997 |
+++ b/drivers/usb/serial/ftdi_sio.c
|
| 2998 |
@@ -2306,6 +2306,8 @@ static void ftdi_set_termios(struct tty_struct *tty,
|
| 2999 |
"urb failed to set to rts/cts flow control\n");
|
| 3000 |
}
|
| 3001 |
|
| 3002 |
+ /* raise DTR/RTS */
|
| 3003 |
+ set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
|
| 3004 |
} else {
|
| 3005 |
/*
|
| 3006 |
* Xon/Xoff code
|
| 3007 |
@@ -2353,6 +2355,8 @@ static void ftdi_set_termios(struct tty_struct *tty,
|
| 3008 |
}
|
| 3009 |
}
|
| 3010 |
|
| 3011 |
+ /* lower DTR/RTS */
|
| 3012 |
+ clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
|
| 3013 |
}
|
| 3014 |
return;
|
| 3015 |
}
|
| 3016 |
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
|
| 3017 |
index 95d8d26..2e0497b 100644
|
| 3018 |
--- a/drivers/usb/serial/ir-usb.c
|
| 3019 |
+++ b/drivers/usb/serial/ir-usb.c
|
| 3020 |
@@ -312,6 +312,7 @@ static int ir_open(struct tty_struct *tty, struct usb_serial_port *port)
|
| 3021 |
kfree(port->read_urb->transfer_buffer);
|
| 3022 |
port->read_urb->transfer_buffer = buffer;
|
| 3023 |
port->read_urb->transfer_buffer_length = buffer_size;
|
| 3024 |
+ port->bulk_in_buffer = buffer;
|
| 3025 |
|
| 3026 |
buffer = kmalloc(buffer_size, GFP_KERNEL);
|
| 3027 |
if (!buffer) {
|
| 3028 |
@@ -321,6 +322,7 @@ static int ir_open(struct tty_struct *tty, struct usb_serial_port *port)
|
| 3029 |
kfree(port->write_urb->transfer_buffer);
|
| 3030 |
port->write_urb->transfer_buffer = buffer;
|
| 3031 |
port->write_urb->transfer_buffer_length = buffer_size;
|
| 3032 |
+ port->bulk_out_buffer = buffer;
|
| 3033 |
port->bulk_out_size = buffer_size;
|
| 3034 |
}
|
| 3035 |
|
| 3036 |
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
|
| 3037 |
index 3a78738..6825082 100644
|
| 3038 |
--- a/drivers/usb/serial/kl5kusb105.c
|
| 3039 |
+++ b/drivers/usb/serial/kl5kusb105.c
|
| 3040 |
@@ -310,6 +310,7 @@ err_cleanup:
|
| 3041 |
usb_free_urb(priv->write_urb_pool[j]);
|
| 3042 |
}
|
| 3043 |
}
|
| 3044 |
+ kfree(priv);
|
| 3045 |
usb_set_serial_port_data(serial->port[i], NULL);
|
| 3046 |
}
|
| 3047 |
return -ENOMEM;
|
| 3048 |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
|
| 3049 |
index 45ea694..9d99e68 100644
|
| 3050 |
--- a/drivers/usb/serial/kobil_sct.c
|
| 3051 |
+++ b/drivers/usb/serial/kobil_sct.c
|
| 3052 |
@@ -345,7 +345,8 @@ static void kobil_close(struct usb_serial_port *port)
|
| 3053 |
|
| 3054 |
/* FIXME: Add rts/dtr methods */
|
| 3055 |
if (port->write_urb) {
|
| 3056 |
- usb_kill_urb(port->write_urb);
|
| 3057 |
+ usb_poison_urb(port->write_urb);
|
| 3058 |
+ kfree(port->write_urb->transfer_buffer);
|
| 3059 |
usb_free_urb(port->write_urb);
|
| 3060 |
port->write_urb = NULL;
|
| 3061 |
}
|
| 3062 |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
|
| 3063 |
index 485fa9c..a861cd2 100644
|
| 3064 |
--- a/drivers/usb/serial/mos7840.c
|
| 3065 |
+++ b/drivers/usb/serial/mos7840.c
|
| 3066 |
@@ -714,7 +714,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
|
| 3067 |
mos7840_port = urb->context;
|
| 3068 |
if (!mos7840_port) {
|
| 3069 |
dbg("%s", "NULL mos7840_port pointer");
|
| 3070 |
- mos7840_port->read_urb_busy = false;
|
| 3071 |
return;
|
| 3072 |
}
|
| 3073 |
|
| 3074 |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
|
| 3075 |
index fcf56f9..fac0732 100644
|
| 3076 |
--- a/drivers/usb/serial/option.c
|
| 3077 |
+++ b/drivers/usb/serial/option.c
|
| 3078 |
@@ -334,6 +334,24 @@ static int option_resume(struct usb_serial *serial);
|
| 3079 |
#define ALCATEL_VENDOR_ID 0x1bbb
|
| 3080 |
#define ALCATEL_PRODUCT_X060S 0x0000
|
| 3081 |
|
| 3082 |
+#define PIRELLI_VENDOR_ID 0x1266
|
| 3083 |
+#define PIRELLI_PRODUCT_C100_1 0x1002
|
| 3084 |
+#define PIRELLI_PRODUCT_C100_2 0x1003
|
| 3085 |
+#define PIRELLI_PRODUCT_1004 0x1004
|
| 3086 |
+#define PIRELLI_PRODUCT_1005 0x1005
|
| 3087 |
+#define PIRELLI_PRODUCT_1006 0x1006
|
| 3088 |
+#define PIRELLI_PRODUCT_1007 0x1007
|
| 3089 |
+#define PIRELLI_PRODUCT_1008 0x1008
|
| 3090 |
+#define PIRELLI_PRODUCT_1009 0x1009
|
| 3091 |
+#define PIRELLI_PRODUCT_100A 0x100a
|
| 3092 |
+#define PIRELLI_PRODUCT_100B 0x100b
|
| 3093 |
+#define PIRELLI_PRODUCT_100C 0x100c
|
| 3094 |
+#define PIRELLI_PRODUCT_100D 0x100d
|
| 3095 |
+#define PIRELLI_PRODUCT_100E 0x100e
|
| 3096 |
+#define PIRELLI_PRODUCT_100F 0x100f
|
| 3097 |
+#define PIRELLI_PRODUCT_1011 0x1011
|
| 3098 |
+#define PIRELLI_PRODUCT_1012 0x1012
|
| 3099 |
+
|
| 3100 |
/* Airplus products */
|
| 3101 |
#define AIRPLUS_VENDOR_ID 0x1011
|
| 3102 |
#define AIRPLUS_PRODUCT_MCD650 0x3198
|
| 3103 |
@@ -346,6 +364,12 @@ static int option_resume(struct usb_serial *serial);
|
| 3104 |
#define HAIER_VENDOR_ID 0x201e
|
| 3105 |
#define HAIER_PRODUCT_CE100 0x2009
|
| 3106 |
|
| 3107 |
+#define CINTERION_VENDOR_ID 0x0681
|
| 3108 |
+
|
| 3109 |
+/* Olivetti products */
|
| 3110 |
+#define OLIVETTI_VENDOR_ID 0x0b3c
|
| 3111 |
+#define OLIVETTI_PRODUCT_OLICARD100 0xc000
|
| 3112 |
+
|
| 3113 |
static struct usb_device_id option_ids[] = {
|
| 3114 |
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
|
| 3115 |
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
|
| 3116 |
@@ -621,6 +645,180 @@ static struct usb_device_id option_ids[] = {
|
| 3117 |
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0160, 0xff, 0xff, 0xff) },
|
| 3118 |
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0161, 0xff, 0xff, 0xff) },
|
| 3119 |
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0162, 0xff, 0xff, 0xff) },
|
| 3120 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) },
|
| 3121 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) },
|
| 3122 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) },
|
| 3123 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) },
|
| 3124 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) },
|
| 3125 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) },
|
| 3126 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1060, 0xff, 0xff, 0xff) },
|
| 3127 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1061, 0xff, 0xff, 0xff) },
|
| 3128 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1062, 0xff, 0xff, 0xff) },
|
| 3129 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1063, 0xff, 0xff, 0xff) },
|
| 3130 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1064, 0xff, 0xff, 0xff) },
|
| 3131 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1065, 0xff, 0xff, 0xff) },
|
| 3132 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1066, 0xff, 0xff, 0xff) },
|
| 3133 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1067, 0xff, 0xff, 0xff) },
|
| 3134 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1068, 0xff, 0xff, 0xff) },
|
| 3135 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1069, 0xff, 0xff, 0xff) },
|
| 3136 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1070, 0xff, 0xff, 0xff) },
|
| 3137 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1071, 0xff, 0xff, 0xff) },
|
| 3138 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1072, 0xff, 0xff, 0xff) },
|
| 3139 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1073, 0xff, 0xff, 0xff) },
|
| 3140 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1074, 0xff, 0xff, 0xff) },
|
| 3141 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1075, 0xff, 0xff, 0xff) },
|
| 3142 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1076, 0xff, 0xff, 0xff) },
|
| 3143 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1077, 0xff, 0xff, 0xff) },
|
| 3144 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1078, 0xff, 0xff, 0xff) },
|
| 3145 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1079, 0xff, 0xff, 0xff) },
|
| 3146 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1080, 0xff, 0xff, 0xff) },
|
| 3147 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1081, 0xff, 0xff, 0xff) },
|
| 3148 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1082, 0xff, 0xff, 0xff) },
|
| 3149 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1083, 0xff, 0xff, 0xff) },
|
| 3150 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1084, 0xff, 0xff, 0xff) },
|
| 3151 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1085, 0xff, 0xff, 0xff) },
|
| 3152 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1086, 0xff, 0xff, 0xff) },
|
| 3153 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1087, 0xff, 0xff, 0xff) },
|
| 3154 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1088, 0xff, 0xff, 0xff) },
|
| 3155 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1089, 0xff, 0xff, 0xff) },
|
| 3156 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1090, 0xff, 0xff, 0xff) },
|
| 3157 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1091, 0xff, 0xff, 0xff) },
|
| 3158 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1092, 0xff, 0xff, 0xff) },
|
| 3159 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1093, 0xff, 0xff, 0xff) },
|
| 3160 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1094, 0xff, 0xff, 0xff) },
|
| 3161 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1095, 0xff, 0xff, 0xff) },
|
| 3162 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1096, 0xff, 0xff, 0xff) },
|
| 3163 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1097, 0xff, 0xff, 0xff) },
|
| 3164 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1098, 0xff, 0xff, 0xff) },
|
| 3165 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1099, 0xff, 0xff, 0xff) },
|
| 3166 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1100, 0xff, 0xff, 0xff) },
|
| 3167 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1101, 0xff, 0xff, 0xff) },
|
| 3168 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1102, 0xff, 0xff, 0xff) },
|
| 3169 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1103, 0xff, 0xff, 0xff) },
|
| 3170 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1104, 0xff, 0xff, 0xff) },
|
| 3171 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1105, 0xff, 0xff, 0xff) },
|
| 3172 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1106, 0xff, 0xff, 0xff) },
|
| 3173 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1107, 0xff, 0xff, 0xff) },
|
| 3174 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1108, 0xff, 0xff, 0xff) },
|
| 3175 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1109, 0xff, 0xff, 0xff) },
|
| 3176 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1110, 0xff, 0xff, 0xff) },
|
| 3177 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1111, 0xff, 0xff, 0xff) },
|
| 3178 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1112, 0xff, 0xff, 0xff) },
|
| 3179 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1113, 0xff, 0xff, 0xff) },
|
| 3180 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1114, 0xff, 0xff, 0xff) },
|
| 3181 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1115, 0xff, 0xff, 0xff) },
|
| 3182 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1116, 0xff, 0xff, 0xff) },
|
| 3183 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1117, 0xff, 0xff, 0xff) },
|
| 3184 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1118, 0xff, 0xff, 0xff) },
|
| 3185 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1119, 0xff, 0xff, 0xff) },
|
| 3186 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1120, 0xff, 0xff, 0xff) },
|
| 3187 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1121, 0xff, 0xff, 0xff) },
|
| 3188 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1122, 0xff, 0xff, 0xff) },
|
| 3189 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1123, 0xff, 0xff, 0xff) },
|
| 3190 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1124, 0xff, 0xff, 0xff) },
|
| 3191 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1125, 0xff, 0xff, 0xff) },
|
| 3192 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1126, 0xff, 0xff, 0xff) },
|
| 3193 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1127, 0xff, 0xff, 0xff) },
|
| 3194 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1128, 0xff, 0xff, 0xff) },
|
| 3195 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1129, 0xff, 0xff, 0xff) },
|
| 3196 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1130, 0xff, 0xff, 0xff) },
|
| 3197 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1131, 0xff, 0xff, 0xff) },
|
| 3198 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1132, 0xff, 0xff, 0xff) },
|
| 3199 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1133, 0xff, 0xff, 0xff) },
|
| 3200 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1134, 0xff, 0xff, 0xff) },
|
| 3201 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1135, 0xff, 0xff, 0xff) },
|
| 3202 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1136, 0xff, 0xff, 0xff) },
|
| 3203 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1137, 0xff, 0xff, 0xff) },
|
| 3204 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1138, 0xff, 0xff, 0xff) },
|
| 3205 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1139, 0xff, 0xff, 0xff) },
|
| 3206 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1140, 0xff, 0xff, 0xff) },
|
| 3207 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1141, 0xff, 0xff, 0xff) },
|
| 3208 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1142, 0xff, 0xff, 0xff) },
|
| 3209 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1143, 0xff, 0xff, 0xff) },
|
| 3210 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1144, 0xff, 0xff, 0xff) },
|
| 3211 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1145, 0xff, 0xff, 0xff) },
|
| 3212 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1146, 0xff, 0xff, 0xff) },
|
| 3213 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1147, 0xff, 0xff, 0xff) },
|
| 3214 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1148, 0xff, 0xff, 0xff) },
|
| 3215 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1149, 0xff, 0xff, 0xff) },
|
| 3216 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1150, 0xff, 0xff, 0xff) },
|
| 3217 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1151, 0xff, 0xff, 0xff) },
|
| 3218 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1152, 0xff, 0xff, 0xff) },
|
| 3219 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1153, 0xff, 0xff, 0xff) },
|
| 3220 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1154, 0xff, 0xff, 0xff) },
|
| 3221 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1155, 0xff, 0xff, 0xff) },
|
| 3222 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1156, 0xff, 0xff, 0xff) },
|
| 3223 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1157, 0xff, 0xff, 0xff) },
|
| 3224 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1158, 0xff, 0xff, 0xff) },
|
| 3225 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1159, 0xff, 0xff, 0xff) },
|
| 3226 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1160, 0xff, 0xff, 0xff) },
|
| 3227 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1161, 0xff, 0xff, 0xff) },
|
| 3228 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1162, 0xff, 0xff, 0xff) },
|
| 3229 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1163, 0xff, 0xff, 0xff) },
|
| 3230 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1164, 0xff, 0xff, 0xff) },
|
| 3231 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1165, 0xff, 0xff, 0xff) },
|
| 3232 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1166, 0xff, 0xff, 0xff) },
|
| 3233 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1167, 0xff, 0xff, 0xff) },
|
| 3234 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1168, 0xff, 0xff, 0xff) },
|
| 3235 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1169, 0xff, 0xff, 0xff) },
|
| 3236 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1170, 0xff, 0xff, 0xff) },
|
| 3237 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1244, 0xff, 0xff, 0xff) },
|
| 3238 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1245, 0xff, 0xff, 0xff) },
|
| 3239 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1246, 0xff, 0xff, 0xff) },
|
| 3240 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1247, 0xff, 0xff, 0xff) },
|
| 3241 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1248, 0xff, 0xff, 0xff) },
|
| 3242 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1249, 0xff, 0xff, 0xff) },
|
| 3243 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1250, 0xff, 0xff, 0xff) },
|
| 3244 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1251, 0xff, 0xff, 0xff) },
|
| 3245 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1252, 0xff, 0xff, 0xff) },
|
| 3246 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1253, 0xff, 0xff, 0xff) },
|
| 3247 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1254, 0xff, 0xff, 0xff) },
|
| 3248 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1255, 0xff, 0xff, 0xff) },
|
| 3249 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1256, 0xff, 0xff, 0xff) },
|
| 3250 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1257, 0xff, 0xff, 0xff) },
|
| 3251 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1258, 0xff, 0xff, 0xff) },
|
| 3252 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1259, 0xff, 0xff, 0xff) },
|
| 3253 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1260, 0xff, 0xff, 0xff) },
|
| 3254 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1261, 0xff, 0xff, 0xff) },
|
| 3255 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1262, 0xff, 0xff, 0xff) },
|
| 3256 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1263, 0xff, 0xff, 0xff) },
|
| 3257 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1264, 0xff, 0xff, 0xff) },
|
| 3258 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1265, 0xff, 0xff, 0xff) },
|
| 3259 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1266, 0xff, 0xff, 0xff) },
|
| 3260 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1267, 0xff, 0xff, 0xff) },
|
| 3261 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1268, 0xff, 0xff, 0xff) },
|
| 3262 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1269, 0xff, 0xff, 0xff) },
|
| 3263 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff) },
|
| 3264 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1271, 0xff, 0xff, 0xff) },
|
| 3265 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1272, 0xff, 0xff, 0xff) },
|
| 3266 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1273, 0xff, 0xff, 0xff) },
|
| 3267 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1274, 0xff, 0xff, 0xff) },
|
| 3268 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1275, 0xff, 0xff, 0xff) },
|
| 3269 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1276, 0xff, 0xff, 0xff) },
|
| 3270 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1277, 0xff, 0xff, 0xff) },
|
| 3271 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1278, 0xff, 0xff, 0xff) },
|
| 3272 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1279, 0xff, 0xff, 0xff) },
|
| 3273 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1280, 0xff, 0xff, 0xff) },
|
| 3274 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1281, 0xff, 0xff, 0xff) },
|
| 3275 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1282, 0xff, 0xff, 0xff) },
|
| 3276 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1283, 0xff, 0xff, 0xff) },
|
| 3277 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1284, 0xff, 0xff, 0xff) },
|
| 3278 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1285, 0xff, 0xff, 0xff) },
|
| 3279 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1286, 0xff, 0xff, 0xff) },
|
| 3280 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1287, 0xff, 0xff, 0xff) },
|
| 3281 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1288, 0xff, 0xff, 0xff) },
|
| 3282 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1289, 0xff, 0xff, 0xff) },
|
| 3283 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1290, 0xff, 0xff, 0xff) },
|
| 3284 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1291, 0xff, 0xff, 0xff) },
|
| 3285 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1292, 0xff, 0xff, 0xff) },
|
| 3286 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1293, 0xff, 0xff, 0xff) },
|
| 3287 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1294, 0xff, 0xff, 0xff) },
|
| 3288 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1295, 0xff, 0xff, 0xff) },
|
| 3289 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1296, 0xff, 0xff, 0xff) },
|
| 3290 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1297, 0xff, 0xff, 0xff) },
|
| 3291 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1298, 0xff, 0xff, 0xff) },
|
| 3292 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1299, 0xff, 0xff, 0xff) },
|
| 3293 |
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1300, 0xff, 0xff, 0xff) },
|
| 3294 |
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) }, /* ZTE CDMA products */
|
| 3295 |
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0027, 0xff, 0xff, 0xff) },
|
| 3296 |
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) },
|
| 3297 |
@@ -649,6 +847,27 @@ static struct usb_device_id option_ids[] = {
|
| 3298 |
{ USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
|
| 3299 |
{ USB_DEVICE(FOUR_G_SYSTEMS_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14) },
|
| 3300 |
{ USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
|
| 3301 |
+ /* Pirelli */
|
| 3302 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1)},
|
| 3303 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2)},
|
| 3304 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1004)},
|
| 3305 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1005)},
|
| 3306 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1006)},
|
| 3307 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1007)},
|
| 3308 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1008)},
|
| 3309 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1009)},
|
| 3310 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100A)},
|
| 3311 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100B) },
|
| 3312 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100C) },
|
| 3313 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100D) },
|
| 3314 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100E) },
|
| 3315 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100F) },
|
| 3316 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)},
|
| 3317 |
+ { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)},
|
| 3318 |
+
|
| 3319 |
+ { USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) },
|
| 3320 |
+
|
| 3321 |
+ { USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) },
|
| 3322 |
{ } /* Terminating entry */
|
| 3323 |
};
|
| 3324 |
MODULE_DEVICE_TABLE(usb, option_ids);
|
| 3325 |
@@ -771,12 +990,19 @@ static int option_probe(struct usb_serial *serial,
|
| 3326 |
const struct usb_device_id *id)
|
| 3327 |
{
|
| 3328 |
struct option_intf_private *data;
|
| 3329 |
+
|
| 3330 |
/* D-Link DWM 652 still exposes CD-Rom emulation interface in modem mode */
|
| 3331 |
if (serial->dev->descriptor.idVendor == DLINK_VENDOR_ID &&
|
| 3332 |
serial->dev->descriptor.idProduct == DLINK_PRODUCT_DWM_652 &&
|
| 3333 |
serial->interface->cur_altsetting->desc.bInterfaceClass == 0x8)
|
| 3334 |
return -ENODEV;
|
| 3335 |
|
| 3336 |
+ /* Bandrich modem and AT command interface is 0xff */
|
| 3337 |
+ if ((serial->dev->descriptor.idVendor == BANDRICH_VENDOR_ID ||
|
| 3338 |
+ serial->dev->descriptor.idVendor == PIRELLI_VENDOR_ID) &&
|
| 3339 |
+ serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff)
|
| 3340 |
+ return -ENODEV;
|
| 3341 |
+
|
| 3342 |
data = serial->private = kzalloc(sizeof(struct option_intf_private), GFP_KERNEL);
|
| 3343 |
if (!data)
|
| 3344 |
return -ENOMEM;
|
| 3345 |
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
|
| 3346 |
index ad1f923..c140870 100644
|
| 3347 |
--- a/drivers/usb/serial/visor.c
|
| 3348 |
+++ b/drivers/usb/serial/visor.c
|
| 3349 |
@@ -249,6 +249,7 @@ static struct usb_serial_driver clie_3_5_device = {
|
| 3350 |
.throttle = visor_throttle,
|
| 3351 |
.unthrottle = visor_unthrottle,
|
| 3352 |
.attach = clie_3_5_startup,
|
| 3353 |
+ .release = visor_release,
|
| 3354 |
.write = visor_write,
|
| 3355 |
.write_room = visor_write_room,
|
| 3356 |
.write_bulk_callback = visor_write_bulk_callback,
|
| 3357 |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
|
| 3358 |
index 4d0a208..7215002 100644
|
| 3359 |
--- a/drivers/usb/storage/unusual_devs.h
|
| 3360 |
+++ b/drivers/usb/storage/unusual_devs.h
|
| 3361 |
@@ -1858,6 +1858,21 @@ UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201,
|
| 3362 |
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
| 3363 |
US_FL_IGNORE_RESIDUE ),
|
| 3364 |
|
| 3365 |
+/* Reported by Hans de Goede <hdegoede@redhat.com>
|
| 3366 |
+ * These Appotech controllers are found in Picture Frames, they provide a
|
| 3367 |
+ * (buggy) emulation of a cdrom drive which contains the windows software
|
| 3368 |
+ * Uploading of pictures happens over the corresponding /dev/sg device. */
|
| 3369 |
+UNUSUAL_DEV( 0x1908, 0x1315, 0x0000, 0x0000,
|
| 3370 |
+ "BUILDWIN",
|
| 3371 |
+ "Photo Frame",
|
| 3372 |
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
|
| 3373 |
+ US_FL_BAD_SENSE ),
|
| 3374 |
+UNUSUAL_DEV( 0x1908, 0x1320, 0x0000, 0x0000,
|
| 3375 |
+ "BUILDWIN",
|
| 3376 |
+ "Photo Frame",
|
| 3377 |
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
|
| 3378 |
+ US_FL_BAD_SENSE ),
|
| 3379 |
+
|
| 3380 |
UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001,
|
| 3381 |
"ST",
|
| 3382 |
"2A",
|
| 3383 |
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
|
| 3384 |
index eab33f1..7b547f5 100644
|
| 3385 |
--- a/drivers/xen/xenbus/xenbus_xs.c
|
| 3386 |
+++ b/drivers/xen/xenbus/xenbus_xs.c
|
| 3387 |
@@ -499,7 +499,7 @@ int xenbus_printf(struct xenbus_transaction t,
|
| 3388 |
#define PRINTF_BUFFER_SIZE 4096
|
| 3389 |
char *printf_buffer;
|
| 3390 |
|
| 3391 |
- printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_KERNEL);
|
| 3392 |
+ printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_NOIO | __GFP_HIGH);
|
| 3393 |
if (printf_buffer == NULL)
|
| 3394 |
return -ENOMEM;
|
| 3395 |
|
| 3396 |
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
|
| 3397 |
index 3616042..38ebe78 100644
|
| 3398 |
--- a/fs/btrfs/acl.c
|
| 3399 |
+++ b/fs/btrfs/acl.c
|
| 3400 |
@@ -157,6 +157,9 @@ static int btrfs_xattr_set_acl(struct inode *inode, int type,
|
| 3401 |
int ret = 0;
|
| 3402 |
struct posix_acl *acl = NULL;
|
| 3403 |
|
| 3404 |
+ if (!is_owner_or_cap(inode))
|
| 3405 |
+ return -EPERM;
|
| 3406 |
+
|
| 3407 |
if (value) {
|
| 3408 |
acl = posix_acl_from_xattr(value, size);
|
| 3409 |
if (acl == NULL) {
|
| 3410 |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
|
| 3411 |
index 5646727..05a9b77 100644
|
| 3412 |
--- a/fs/cifs/cifsproto.h
|
| 3413 |
+++ b/fs/cifs/cifsproto.h
|
| 3414 |
@@ -95,8 +95,10 @@ extern struct cifsFileInfo *cifs_new_fileinfo(struct inode *newinode,
|
| 3415 |
__u16 fileHandle, struct file *file,
|
| 3416 |
struct vfsmount *mnt, unsigned int oflags);
|
| 3417 |
extern int cifs_posix_open(char *full_path, struct inode **pinode,
|
| 3418 |
- struct vfsmount *mnt, int mode, int oflags,
|
| 3419 |
- __u32 *poplock, __u16 *pnetfid, int xid);
|
| 3420 |
+ struct vfsmount *mnt,
|
| 3421 |
+ struct super_block *sb,
|
| 3422 |
+ int mode, int oflags,
|
| 3423 |
+ __u32 *poplock, __u16 *pnetfid, int xid);
|
| 3424 |
extern void cifs_unix_basic_to_fattr(struct cifs_fattr *fattr,
|
| 3425 |
FILE_UNIX_BASIC_INFO *info,
|
| 3426 |
struct cifs_sb_info *cifs_sb);
|
| 3427 |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
|
| 3428 |
index 1f42f77..c3d6182 100644
|
| 3429 |
--- a/fs/cifs/dir.c
|
| 3430 |
+++ b/fs/cifs/dir.c
|
| 3431 |
@@ -183,13 +183,14 @@ cifs_new_fileinfo(struct inode *newinode, __u16 fileHandle,
|
| 3432 |
}
|
| 3433 |
|
| 3434 |
int cifs_posix_open(char *full_path, struct inode **pinode,
|
| 3435 |
- struct vfsmount *mnt, int mode, int oflags,
|
| 3436 |
- __u32 *poplock, __u16 *pnetfid, int xid)
|
| 3437 |
+ struct vfsmount *mnt, struct super_block *sb,
|
| 3438 |
+ int mode, int oflags,
|
| 3439 |
+ __u32 *poplock, __u16 *pnetfid, int xid)
|
| 3440 |
{
|
| 3441 |
int rc;
|
| 3442 |
FILE_UNIX_BASIC_INFO *presp_data;
|
| 3443 |
__u32 posix_flags = 0;
|
| 3444 |
- struct cifs_sb_info *cifs_sb = CIFS_SB(mnt->mnt_sb);
|
| 3445 |
+ struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
|
| 3446 |
struct cifs_fattr fattr;
|
| 3447 |
|
| 3448 |
cFYI(1, ("posix open %s", full_path));
|
| 3449 |
@@ -241,7 +242,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode,
|
| 3450 |
|
| 3451 |
/* get new inode and set it up */
|
| 3452 |
if (*pinode == NULL) {
|
| 3453 |
- *pinode = cifs_iget(mnt->mnt_sb, &fattr);
|
| 3454 |
+ *pinode = cifs_iget(sb, &fattr);
|
| 3455 |
if (!*pinode) {
|
| 3456 |
rc = -ENOMEM;
|
| 3457 |
goto posix_open_ret;
|
| 3458 |
@@ -250,7 +251,8 @@ int cifs_posix_open(char *full_path, struct inode **pinode,
|
| 3459 |
cifs_fattr_to_inode(*pinode, &fattr);
|
| 3460 |
}
|
| 3461 |
|
| 3462 |
- cifs_new_fileinfo(*pinode, *pnetfid, NULL, mnt, oflags);
|
| 3463 |
+ if (mnt)
|
| 3464 |
+ cifs_new_fileinfo(*pinode, *pnetfid, NULL, mnt, oflags);
|
| 3465 |
|
| 3466 |
posix_open_ret:
|
| 3467 |
kfree(presp_data);
|
| 3468 |
@@ -314,13 +316,14 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
|
| 3469 |
if (nd && (nd->flags & LOOKUP_OPEN))
|
| 3470 |
oflags = nd->intent.open.flags;
|
| 3471 |
else
|
| 3472 |
- oflags = FMODE_READ;
|
| 3473 |
+ oflags = FMODE_READ | SMB_O_CREAT;
|
| 3474 |
|
| 3475 |
if (tcon->unix_ext && (tcon->ses->capabilities & CAP_UNIX) &&
|
| 3476 |
(CIFS_UNIX_POSIX_PATH_OPS_CAP &
|
| 3477 |
le64_to_cpu(tcon->fsUnixInfo.Capability))) {
|
| 3478 |
- rc = cifs_posix_open(full_path, &newinode, nd->path.mnt,
|
| 3479 |
- mode, oflags, &oplock, &fileHandle, xid);
|
| 3480 |
+ rc = cifs_posix_open(full_path, &newinode,
|
| 3481 |
+ nd ? nd->path.mnt : NULL,
|
| 3482 |
+ inode->i_sb, mode, oflags, &oplock, &fileHandle, xid);
|
| 3483 |
/* EIO could indicate that (posix open) operation is not
|
| 3484 |
supported, despite what server claimed in capability
|
| 3485 |
negotation. EREMOTE indicates DFS junction, which is not
|
| 3486 |
@@ -677,6 +680,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
|
| 3487 |
(nd->flags & LOOKUP_OPEN) && !pTcon->broken_posix_open &&
|
| 3488 |
(nd->intent.open.flags & O_CREAT)) {
|
| 3489 |
rc = cifs_posix_open(full_path, &newInode, nd->path.mnt,
|
| 3490 |
+ parent_dir_inode->i_sb,
|
| 3491 |
nd->intent.open.create_mode,
|
| 3492 |
nd->intent.open.flags, &oplock,
|
| 3493 |
&fileHandle, xid);
|
| 3494 |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
|
| 3495 |
index 429337e..5d1099a 100644
|
| 3496 |
--- a/fs/cifs/file.c
|
| 3497 |
+++ b/fs/cifs/file.c
|
| 3498 |
@@ -295,10 +295,12 @@ int cifs_open(struct inode *inode, struct file *file)
|
| 3499 |
(CIFS_UNIX_POSIX_PATH_OPS_CAP &
|
| 3500 |
le64_to_cpu(tcon->fsUnixInfo.Capability))) {
|
| 3501 |
int oflags = (int) cifs_posix_convert_flags(file->f_flags);
|
| 3502 |
+ oflags |= SMB_O_CREAT;
|
| 3503 |
/* can not refresh inode info since size could be stale */
|
| 3504 |
rc = cifs_posix_open(full_path, &inode, file->f_path.mnt,
|
| 3505 |
- cifs_sb->mnt_file_mode /* ignored */,
|
| 3506 |
- oflags, &oplock, &netfid, xid);
|
| 3507 |
+ inode->i_sb,
|
| 3508 |
+ cifs_sb->mnt_file_mode /* ignored */,
|
| 3509 |
+ oflags, &oplock, &netfid, xid);
|
| 3510 |
if (rc == 0) {
|
| 3511 |
cFYI(1, ("posix open succeeded"));
|
| 3512 |
/* no need for special case handling of setting mode
|
| 3513 |
@@ -510,8 +512,9 @@ reopen_error_exit:
|
| 3514 |
int oflags = (int) cifs_posix_convert_flags(file->f_flags);
|
| 3515 |
/* can not refresh inode info since size could be stale */
|
| 3516 |
rc = cifs_posix_open(full_path, NULL, file->f_path.mnt,
|
| 3517 |
- cifs_sb->mnt_file_mode /* ignored */,
|
| 3518 |
- oflags, &oplock, &netfid, xid);
|
| 3519 |
+ inode->i_sb,
|
| 3520 |
+ cifs_sb->mnt_file_mode /* ignored */,
|
| 3521 |
+ oflags, &oplock, &netfid, xid);
|
| 3522 |
if (rc == 0) {
|
| 3523 |
cFYI(1, ("posix reopen succeeded"));
|
| 3524 |
goto reopen_success;
|
| 3525 |
diff --git a/fs/exofs/dir.c b/fs/exofs/dir.c
|
| 3526 |
index 4cfab1c..d91e9d8 100644
|
| 3527 |
--- a/fs/exofs/dir.c
|
| 3528 |
+++ b/fs/exofs/dir.c
|
| 3529 |
@@ -608,7 +608,7 @@ int exofs_make_empty(struct inode *inode, struct inode *parent)
|
| 3530 |
de->inode_no = cpu_to_le64(parent->i_ino);
|
| 3531 |
memcpy(de->name, PARENT_DIR, sizeof(PARENT_DIR));
|
| 3532 |
exofs_set_de_type(de, inode);
|
| 3533 |
- kunmap_atomic(page, KM_USER0);
|
| 3534 |
+ kunmap_atomic(kaddr, KM_USER0);
|
| 3535 |
err = exofs_commit_chunk(page, 0, chunk_size);
|
| 3536 |
fail:
|
| 3537 |
page_cache_release(page);
|
| 3538 |
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
|
| 3539 |
index bff5f77..ef2acd2 100644
|
| 3540 |
--- a/fs/fs-writeback.c
|
| 3541 |
+++ b/fs/fs-writeback.c
|
| 3542 |
@@ -859,6 +859,12 @@ static long wb_check_old_data_flush(struct bdi_writeback *wb)
|
| 3543 |
unsigned long expired;
|
| 3544 |
long nr_pages;
|
| 3545 |
|
| 3546 |
+ /*
|
| 3547 |
+ * When set to zero, disable periodic writeback
|
| 3548 |
+ */
|
| 3549 |
+ if (!dirty_writeback_interval)
|
| 3550 |
+ return 0;
|
| 3551 |
+
|
| 3552 |
expired = wb->last_old_flush +
|
| 3553 |
msecs_to_jiffies(dirty_writeback_interval * 10);
|
| 3554 |
if (time_before(jiffies, expired))
|
| 3555 |
@@ -954,8 +960,12 @@ int bdi_writeback_task(struct bdi_writeback *wb)
|
| 3556 |
break;
|
| 3557 |
}
|
| 3558 |
|
| 3559 |
- wait_jiffies = msecs_to_jiffies(dirty_writeback_interval * 10);
|
| 3560 |
- schedule_timeout_interruptible(wait_jiffies);
|
| 3561 |
+ if (dirty_writeback_interval) {
|
| 3562 |
+ wait_jiffies = msecs_to_jiffies(dirty_writeback_interval * 10);
|
| 3563 |
+ schedule_timeout_interruptible(wait_jiffies);
|
| 3564 |
+ } else
|
| 3565 |
+ schedule();
|
| 3566 |
+
|
| 3567 |
try_to_freeze();
|
| 3568 |
}
|
| 3569 |
|
| 3570 |
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
|
| 3571 |
index a32bcd7..b3fd1d8 100644
|
| 3572 |
--- a/fs/gfs2/file.c
|
| 3573 |
+++ b/fs/gfs2/file.c
|
| 3574 |
@@ -218,6 +218,11 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask)
|
| 3575 |
if (error)
|
| 3576 |
goto out_drop_write;
|
| 3577 |
|
| 3578 |
+ error = -EACCES;
|
| 3579 |
+ if (!is_owner_or_cap(inode))
|
| 3580 |
+ goto out;
|
| 3581 |
+
|
| 3582 |
+ error = 0;
|
| 3583 |
flags = ip->i_diskflags;
|
| 3584 |
new_flags = (flags & ~mask) | (reqflags & mask);
|
| 3585 |
if ((new_flags ^ flags) == 0)
|
| 3586 |
@@ -275,8 +280,10 @@ static int gfs2_set_flags(struct file *filp, u32 __user *ptr)
|
| 3587 |
{
|
| 3588 |
struct inode *inode = filp->f_path.dentry->d_inode;
|
| 3589 |
u32 fsflags, gfsflags;
|
| 3590 |
+
|
| 3591 |
if (get_user(fsflags, ptr))
|
| 3592 |
return -EFAULT;
|
| 3593 |
+
|
| 3594 |
gfsflags = fsflags_cvt(fsflags_to_gfs2, fsflags);
|
| 3595 |
if (!S_ISDIR(inode->i_mode)) {
|
| 3596 |
if (gfsflags & GFS2_DIF_INHERIT_JDATA)
|
| 3597 |
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
|
| 3598 |
index 4160afa..bd224ee 100644
|
| 3599 |
--- a/fs/jbd/journal.c
|
| 3600 |
+++ b/fs/jbd/journal.c
|
| 3601 |
@@ -1913,7 +1913,7 @@ static void __init jbd_create_debugfs_entry(void)
|
| 3602 |
{
|
| 3603 |
jbd_debugfs_dir = debugfs_create_dir("jbd", NULL);
|
| 3604 |
if (jbd_debugfs_dir)
|
| 3605 |
- jbd_debug = debugfs_create_u8("jbd-debug", S_IRUGO,
|
| 3606 |
+ jbd_debug = debugfs_create_u8("jbd-debug", S_IRUGO | S_IWUSR,
|
| 3607 |
jbd_debugfs_dir,
|
| 3608 |
&journal_enable_debug);
|
| 3609 |
}
|
| 3610 |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
|
| 3611 |
index b7ca3a9..17af879 100644
|
| 3612 |
--- a/fs/jbd2/journal.c
|
| 3613 |
+++ b/fs/jbd2/journal.c
|
| 3614 |
@@ -2115,7 +2115,8 @@ static void __init jbd2_create_debugfs_entry(void)
|
| 3615 |
{
|
| 3616 |
jbd2_debugfs_dir = debugfs_create_dir("jbd2", NULL);
|
| 3617 |
if (jbd2_debugfs_dir)
|
| 3618 |
- jbd2_debug = debugfs_create_u8(JBD2_DEBUG_NAME, S_IRUGO,
|
| 3619 |
+ jbd2_debug = debugfs_create_u8(JBD2_DEBUG_NAME,
|
| 3620 |
+ S_IRUGO | S_IWUSR,
|
| 3621 |
jbd2_debugfs_dir,
|
| 3622 |
&jbd2_journal_enable_debug);
|
| 3623 |
}
|
| 3624 |
diff --git a/fs/libfs.c b/fs/libfs.c
|
| 3625 |
index 219576c..ba36e93 100644
|
| 3626 |
--- a/fs/libfs.c
|
| 3627 |
+++ b/fs/libfs.c
|
| 3628 |
@@ -415,7 +415,8 @@ int simple_write_end(struct file *file, struct address_space *mapping,
|
| 3629 |
* unique inode values later for this filesystem, then you must take care
|
| 3630 |
* to pass it an appropriate max_reserved value to avoid collisions.
|
| 3631 |
*/
|
| 3632 |
-int simple_fill_super(struct super_block *s, int magic, struct tree_descr *files)
|
| 3633 |
+int simple_fill_super(struct super_block *s, unsigned long magic,
|
| 3634 |
+ struct tree_descr *files)
|
| 3635 |
{
|
| 3636 |
struct inode *inode;
|
| 3637 |
struct dentry *root;
|
| 3638 |
diff --git a/fs/namespace.c b/fs/namespace.c
|
| 3639 |
index bdc3cb4..2beb0fb 100644
|
| 3640 |
--- a/fs/namespace.c
|
| 3641 |
+++ b/fs/namespace.c
|
| 3642 |
@@ -1119,8 +1119,15 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
|
| 3643 |
{
|
| 3644 |
struct path path;
|
| 3645 |
int retval;
|
| 3646 |
+ int lookup_flags = 0;
|
| 3647 |
|
| 3648 |
- retval = user_path(name, &path);
|
| 3649 |
+ if (flags & ~(MNT_FORCE | MNT_DETACH | MNT_EXPIRE | UMOUNT_NOFOLLOW))
|
| 3650 |
+ return -EINVAL;
|
| 3651 |
+
|
| 3652 |
+ if (!(flags & UMOUNT_NOFOLLOW))
|
| 3653 |
+ lookup_flags |= LOOKUP_FOLLOW;
|
| 3654 |
+
|
| 3655 |
+ retval = user_path_at(AT_FDCWD, name, lookup_flags, &path);
|
| 3656 |
if (retval)
|
| 3657 |
goto out;
|
| 3658 |
retval = -EINVAL;
|
| 3659 |
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
|
| 3660 |
index 67ea83e..4d4e2d0 100644
|
| 3661 |
--- a/fs/nfsd/nfssvc.c
|
| 3662 |
+++ b/fs/nfsd/nfssvc.c
|
| 3663 |
@@ -136,7 +136,7 @@ u32 nfsd_supported_minorversion;
|
| 3664 |
int nfsd_vers(int vers, enum vers_op change)
|
| 3665 |
{
|
| 3666 |
if (vers < NFSD_MINVERS || vers >= NFSD_NRVERS)
|
| 3667 |
- return -1;
|
| 3668 |
+ return 0;
|
| 3669 |
switch(change) {
|
| 3670 |
case NFSD_SET:
|
| 3671 |
nfsd_versions[vers] = nfsd_version[vers];
|
| 3672 |
diff --git a/include/linux/fs.h b/include/linux/fs.h
|
| 3673 |
index 9b67805..b6a5622 100644
|
| 3674 |
--- a/include/linux/fs.h
|
| 3675 |
+++ b/include/linux/fs.h
|
| 3676 |
@@ -1310,6 +1310,8 @@ extern int send_sigurg(struct fown_struct *fown);
|
| 3677 |
#define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */
|
| 3678 |
#define MNT_DETACH 0x00000002 /* Just detach from the tree */
|
| 3679 |
#define MNT_EXPIRE 0x00000004 /* Mark for expiry */
|
| 3680 |
+#define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */
|
| 3681 |
+#define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */
|
| 3682 |
|
| 3683 |
extern struct list_head super_blocks;
|
| 3684 |
extern spinlock_t sb_lock;
|
| 3685 |
@@ -2376,7 +2378,7 @@ extern const struct file_operations simple_dir_operations;
|
| 3686 |
extern const struct inode_operations simple_dir_inode_operations;
|
| 3687 |
struct tree_descr { char *name; const struct file_operations *ops; int mode; };
|
| 3688 |
struct dentry *d_alloc_name(struct dentry *, const char *);
|
| 3689 |
-extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
|
| 3690 |
+extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *);
|
| 3691 |
extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count);
|
| 3692 |
extern void simple_release_fs(struct vfsmount **mount, int *count);
|
| 3693 |
|
| 3694 |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
|
| 3695 |
index 63adefe..67325bf 100644
|
| 3696 |
--- a/include/linux/pci_ids.h
|
| 3697 |
+++ b/include/linux/pci_ids.h
|
| 3698 |
@@ -2317,6 +2317,7 @@
|
| 3699 |
#define PCI_VENDOR_ID_JMICRON 0x197B
|
| 3700 |
#define PCI_DEVICE_ID_JMICRON_JMB360 0x2360
|
| 3701 |
#define PCI_DEVICE_ID_JMICRON_JMB361 0x2361
|
| 3702 |
+#define PCI_DEVICE_ID_JMICRON_JMB362 0x2362
|
| 3703 |
#define PCI_DEVICE_ID_JMICRON_JMB363 0x2363
|
| 3704 |
#define PCI_DEVICE_ID_JMICRON_JMB365 0x2365
|
| 3705 |
#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
|
| 3706 |
diff --git a/include/linux/swap.h b/include/linux/swap.h
|
| 3707 |
index 4ec9001..977d150 100644
|
| 3708 |
--- a/include/linux/swap.h
|
| 3709 |
+++ b/include/linux/swap.h
|
| 3710 |
@@ -218,21 +218,11 @@ static inline void lru_cache_add_anon(struct page *page)
|
| 3711 |
__lru_cache_add(page, LRU_INACTIVE_ANON);
|
| 3712 |
}
|
| 3713 |
|
| 3714 |
-static inline void lru_cache_add_active_anon(struct page *page)
|
| 3715 |
-{
|
| 3716 |
- __lru_cache_add(page, LRU_ACTIVE_ANON);
|
| 3717 |
-}
|
| 3718 |
-
|
| 3719 |
static inline void lru_cache_add_file(struct page *page)
|
| 3720 |
{
|
| 3721 |
__lru_cache_add(page, LRU_INACTIVE_FILE);
|
| 3722 |
}
|
| 3723 |
|
| 3724 |
-static inline void lru_cache_add_active_file(struct page *page)
|
| 3725 |
-{
|
| 3726 |
- __lru_cache_add(page, LRU_ACTIVE_FILE);
|
| 3727 |
-}
|
| 3728 |
-
|
| 3729 |
/* linux/mm/vmscan.c */
|
| 3730 |
extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
|
| 3731 |
gfp_t gfp_mask, nodemask_t *mask);
|
| 3732 |
diff --git a/include/linux/tboot.h b/include/linux/tboot.h
|
| 3733 |
index bf2a0c7..1dba6ee 100644
|
| 3734 |
--- a/include/linux/tboot.h
|
| 3735 |
+++ b/include/linux/tboot.h
|
| 3736 |
@@ -150,6 +150,7 @@ extern int tboot_force_iommu(void);
|
| 3737 |
|
| 3738 |
#else
|
| 3739 |
|
| 3740 |
+#define tboot_enabled() 0
|
| 3741 |
#define tboot_probe() do { } while (0)
|
| 3742 |
#define tboot_shutdown(shutdown_type) do { } while (0)
|
| 3743 |
#define tboot_sleep(sleep_state, pm1a_control, pm1b_control) \
|
| 3744 |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
|
| 3745 |
index 0a47456..89e54e9 100644
|
| 3746 |
--- a/include/net/sctp/structs.h
|
| 3747 |
+++ b/include/net/sctp/structs.h
|
| 3748 |
@@ -772,6 +772,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len,
|
| 3749 |
struct iovec *data);
|
| 3750 |
void sctp_chunk_free(struct sctp_chunk *);
|
| 3751 |
void *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data);
|
| 3752 |
+void *sctp_addto_chunk_fixed(struct sctp_chunk *, int len, const void *data);
|
| 3753 |
struct sctp_chunk *sctp_chunkify(struct sk_buff *,
|
| 3754 |
const struct sctp_association *,
|
| 3755 |
struct sock *);
|
| 3756 |
diff --git a/kernel/compat.c b/kernel/compat.c
|
| 3757 |
index f6c204f..180d188 100644
|
| 3758 |
--- a/kernel/compat.c
|
| 3759 |
+++ b/kernel/compat.c
|
| 3760 |
@@ -494,29 +494,26 @@ asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid, unsigned int len,
|
| 3761 |
{
|
| 3762 |
int ret;
|
| 3763 |
cpumask_var_t mask;
|
| 3764 |
- unsigned long *k;
|
| 3765 |
- unsigned int min_length = cpumask_size();
|
| 3766 |
-
|
| 3767 |
- if (nr_cpu_ids <= BITS_PER_COMPAT_LONG)
|
| 3768 |
- min_length = sizeof(compat_ulong_t);
|
| 3769 |
|
| 3770 |
- if (len < min_length)
|
| 3771 |
+ if ((len * BITS_PER_BYTE) < nr_cpu_ids)
|
| 3772 |
+ return -EINVAL;
|
| 3773 |
+ if (len & (sizeof(compat_ulong_t)-1))
|
| 3774 |
return -EINVAL;
|
| 3775 |
|
| 3776 |
if (!alloc_cpumask_var(&mask, GFP_KERNEL))
|
| 3777 |
return -ENOMEM;
|
| 3778 |
|
| 3779 |
ret = sched_getaffinity(pid, mask);
|
| 3780 |
- if (ret < 0)
|
| 3781 |
- goto out;
|
| 3782 |
+ if (ret == 0) {
|
| 3783 |
+ size_t retlen = min_t(size_t, len, cpumask_size());
|
| 3784 |
|
| 3785 |
- k = cpumask_bits(mask);
|
| 3786 |
- ret = compat_put_bitmap(user_mask_ptr, k, min_length * 8);
|
| 3787 |
- if (ret == 0)
|
| 3788 |
- ret = min_length;
|
| 3789 |
-
|
| 3790 |
-out:
|
| 3791 |
+ if (compat_put_bitmap(user_mask_ptr, cpumask_bits(mask), retlen * 8))
|
| 3792 |
+ ret = -EFAULT;
|
| 3793 |
+ else
|
| 3794 |
+ ret = retlen;
|
| 3795 |
+ }
|
| 3796 |
free_cpumask_var(mask);
|
| 3797 |
+
|
| 3798 |
return ret;
|
| 3799 |
}
|
| 3800 |
|
| 3801 |
diff --git a/kernel/mutex.c b/kernel/mutex.c
|
| 3802 |
index 947b3ad..f85644c 100644
|
| 3803 |
--- a/kernel/mutex.c
|
| 3804 |
+++ b/kernel/mutex.c
|
| 3805 |
@@ -172,6 +172,13 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
|
| 3806 |
struct thread_info *owner;
|
| 3807 |
|
| 3808 |
/*
|
| 3809 |
+ * If we own the BKL, then don't spin. The owner of
|
| 3810 |
+ * the mutex might be waiting on us to release the BKL.
|
| 3811 |
+ */
|
| 3812 |
+ if (unlikely(current->lock_depth >= 0))
|
| 3813 |
+ break;
|
| 3814 |
+
|
| 3815 |
+ /*
|
| 3816 |
* If there's an owner, wait for it to either
|
| 3817 |
* release the lock or go to sleep.
|
| 3818 |
*/
|
| 3819 |
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
|
| 3820 |
index 72df1eb..183d437 100644
|
| 3821 |
--- a/kernel/perf_event.c
|
| 3822 |
+++ b/kernel/perf_event.c
|
| 3823 |
@@ -4510,8 +4510,8 @@ SYSCALL_DEFINE5(perf_event_open,
|
| 3824 |
struct perf_event_context *ctx;
|
| 3825 |
struct file *event_file = NULL;
|
| 3826 |
struct file *group_file = NULL;
|
| 3827 |
+ int event_fd;
|
| 3828 |
int fput_needed = 0;
|
| 3829 |
- int fput_needed2 = 0;
|
| 3830 |
int err;
|
| 3831 |
|
| 3832 |
/* for future expandability... */
|
| 3833 |
@@ -4532,12 +4532,18 @@ SYSCALL_DEFINE5(perf_event_open,
|
| 3834 |
return -EINVAL;
|
| 3835 |
}
|
| 3836 |
|
| 3837 |
+ event_fd = get_unused_fd_flags(O_RDWR);
|
| 3838 |
+ if (event_fd < 0)
|
| 3839 |
+ return event_fd;
|
| 3840 |
+
|
| 3841 |
/*
|
| 3842 |
* Get the target context (task or percpu):
|
| 3843 |
*/
|
| 3844 |
ctx = find_get_context(pid, cpu);
|
| 3845 |
- if (IS_ERR(ctx))
|
| 3846 |
- return PTR_ERR(ctx);
|
| 3847 |
+ if (IS_ERR(ctx)) {
|
| 3848 |
+ err = PTR_ERR(ctx);
|
| 3849 |
+ goto err_fd;
|
| 3850 |
+ }
|
| 3851 |
|
| 3852 |
/*
|
| 3853 |
* Look up the group leader (we will attach this event to it):
|
| 3854 |
@@ -4577,13 +4583,11 @@ SYSCALL_DEFINE5(perf_event_open,
|
| 3855 |
if (IS_ERR(event))
|
| 3856 |
goto err_put_context;
|
| 3857 |
|
| 3858 |
- err = anon_inode_getfd("[perf_event]", &perf_fops, event, 0);
|
| 3859 |
- if (err < 0)
|
| 3860 |
- goto err_free_put_context;
|
| 3861 |
-
|
| 3862 |
- event_file = fget_light(err, &fput_needed2);
|
| 3863 |
- if (!event_file)
|
| 3864 |
+ event_file = anon_inode_getfile("[perf_event]", &perf_fops, event, O_RDWR);
|
| 3865 |
+ if (IS_ERR(event_file)) {
|
| 3866 |
+ err = PTR_ERR(event_file);
|
| 3867 |
goto err_free_put_context;
|
| 3868 |
+ }
|
| 3869 |
|
| 3870 |
if (flags & PERF_FLAG_FD_OUTPUT) {
|
| 3871 |
err = perf_event_set_output(event, group_fd);
|
| 3872 |
@@ -4604,19 +4608,19 @@ SYSCALL_DEFINE5(perf_event_open,
|
| 3873 |
list_add_tail(&event->owner_entry, ¤t->perf_event_list);
|
| 3874 |
mutex_unlock(¤t->perf_event_mutex);
|
| 3875 |
|
| 3876 |
-err_fput_free_put_context:
|
| 3877 |
- fput_light(event_file, fput_needed2);
|
| 3878 |
+ fput_light(group_file, fput_needed);
|
| 3879 |
+ fd_install(event_fd, event_file);
|
| 3880 |
+ return event_fd;
|
| 3881 |
|
| 3882 |
+err_fput_free_put_context:
|
| 3883 |
+ fput(event_file);
|
| 3884 |
err_free_put_context:
|
| 3885 |
- if (err < 0)
|
| 3886 |
- free_event(event);
|
| 3887 |
-
|
| 3888 |
+ free_event(event);
|
| 3889 |
err_put_context:
|
| 3890 |
- if (err < 0)
|
| 3891 |
- put_ctx(ctx);
|
| 3892 |
-
|
| 3893 |
fput_light(group_file, fput_needed);
|
| 3894 |
-
|
| 3895 |
+ put_ctx(ctx);
|
| 3896 |
+err_fd:
|
| 3897 |
+ put_unused_fd(event_fd);
|
| 3898 |
return err;
|
| 3899 |
}
|
| 3900 |
|
| 3901 |
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
|
| 3902 |
index 4954407..5e76d22 100644
|
| 3903 |
--- a/kernel/posix-timers.c
|
| 3904 |
+++ b/kernel/posix-timers.c
|
| 3905 |
@@ -559,14 +559,7 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
|
| 3906 |
new_timer->it_id = (timer_t) new_timer_id;
|
| 3907 |
new_timer->it_clock = which_clock;
|
| 3908 |
new_timer->it_overrun = -1;
|
| 3909 |
- error = CLOCK_DISPATCH(which_clock, timer_create, (new_timer));
|
| 3910 |
- if (error)
|
| 3911 |
- goto out;
|
| 3912 |
|
| 3913 |
- /*
|
| 3914 |
- * return the timer_id now. The next step is hard to
|
| 3915 |
- * back out if there is an error.
|
| 3916 |
- */
|
| 3917 |
if (copy_to_user(created_timer_id,
|
| 3918 |
&new_timer_id, sizeof (new_timer_id))) {
|
| 3919 |
error = -EFAULT;
|
| 3920 |
@@ -597,6 +590,10 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
|
| 3921 |
new_timer->sigq->info.si_tid = new_timer->it_id;
|
| 3922 |
new_timer->sigq->info.si_code = SI_TIMER;
|
| 3923 |
|
| 3924 |
+ error = CLOCK_DISPATCH(which_clock, timer_create, (new_timer));
|
| 3925 |
+ if (error)
|
| 3926 |
+ goto out;
|
| 3927 |
+
|
| 3928 |
spin_lock_irq(¤t->sighand->siglock);
|
| 3929 |
new_timer->it_signal = current->signal;
|
| 3930 |
list_add(&new_timer->list, ¤t->signal->posix_timers);
|
| 3931 |
diff --git a/kernel/signal.c b/kernel/signal.c
|
| 3932 |
index 4d0658d..423655a 100644
|
| 3933 |
--- a/kernel/signal.c
|
| 3934 |
+++ b/kernel/signal.c
|
| 3935 |
@@ -591,7 +591,7 @@ static int rm_from_queue(unsigned long mask, struct sigpending *s)
|
| 3936 |
static int check_kill_permission(int sig, struct siginfo *info,
|
| 3937 |
struct task_struct *t)
|
| 3938 |
{
|
| 3939 |
- const struct cred *cred = current_cred(), *tcred;
|
| 3940 |
+ const struct cred *cred, *tcred;
|
| 3941 |
struct pid *sid;
|
| 3942 |
int error;
|
| 3943 |
|
| 3944 |
@@ -605,8 +605,10 @@ static int check_kill_permission(int sig, struct siginfo *info,
|
| 3945 |
if (error)
|
| 3946 |
return error;
|
| 3947 |
|
| 3948 |
+ cred = current_cred();
|
| 3949 |
tcred = __task_cred(t);
|
| 3950 |
- if ((cred->euid ^ tcred->suid) &&
|
| 3951 |
+ if (!same_thread_group(current, t) &&
|
| 3952 |
+ (cred->euid ^ tcred->suid) &&
|
| 3953 |
(cred->euid ^ tcred->uid) &&
|
| 3954 |
(cred->uid ^ tcred->suid) &&
|
| 3955 |
(cred->uid ^ tcred->uid) &&
|
| 3956 |
diff --git a/mm/filemap.c b/mm/filemap.c
|
| 3957 |
index 8e96c90..46e3f8a 100644
|
| 3958 |
--- a/mm/filemap.c
|
| 3959 |
+++ b/mm/filemap.c
|
| 3960 |
@@ -462,7 +462,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
|
| 3961 |
/*
|
| 3962 |
* Splice_read and readahead add shmem/tmpfs pages into the page cache
|
| 3963 |
* before shmem_readpage has a chance to mark them as SwapBacked: they
|
| 3964 |
- * need to go on the active_anon lru below, and mem_cgroup_cache_charge
|
| 3965 |
+ * need to go on the anon lru below, and mem_cgroup_cache_charge
|
| 3966 |
* (called in add_to_page_cache) needs to know where they're going too.
|
| 3967 |
*/
|
| 3968 |
if (mapping_cap_swap_backed(mapping))
|
| 3969 |
@@ -473,7 +473,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
|
| 3970 |
if (page_is_file_cache(page))
|
| 3971 |
lru_cache_add_file(page);
|
| 3972 |
else
|
| 3973 |
- lru_cache_add_active_anon(page);
|
| 3974 |
+ lru_cache_add_anon(page);
|
| 3975 |
}
|
| 3976 |
return ret;
|
| 3977 |
}
|
| 3978 |
@@ -1120,6 +1120,12 @@ page_not_up_to_date_locked:
|
| 3979 |
}
|
| 3980 |
|
| 3981 |
readpage:
|
| 3982 |
+ /*
|
| 3983 |
+ * A previous I/O error may have been due to temporary
|
| 3984 |
+ * failures, eg. multipath errors.
|
| 3985 |
+ * PG_error will be set again if readpage fails.
|
| 3986 |
+ */
|
| 3987 |
+ ClearPageError(page);
|
| 3988 |
/* Start the actual read. The read will unlock the page. */
|
| 3989 |
error = mapping->a_ops->readpage(filp, page);
|
| 3990 |
|
| 3991 |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
|
| 3992 |
index b7b02ce..f5a106e 100644
|
| 3993 |
--- a/mm/hugetlb.c
|
| 3994 |
+++ b/mm/hugetlb.c
|
| 3995 |
@@ -401,7 +401,7 @@ static void clear_huge_page(struct page *page,
|
| 3996 |
{
|
| 3997 |
int i;
|
| 3998 |
|
| 3999 |
- if (unlikely(sz > MAX_ORDER_NR_PAGES)) {
|
| 4000 |
+ if (unlikely(sz/PAGE_SIZE > MAX_ORDER_NR_PAGES)) {
|
| 4001 |
clear_gigantic_page(page, addr, sz);
|
| 4002 |
return;
|
| 4003 |
}
|
| 4004 |
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig
|
| 4005 |
index 4d5543a..ea367cf 100644
|
| 4006 |
--- a/net/mac80211/Kconfig
|
| 4007 |
+++ b/net/mac80211/Kconfig
|
| 4008 |
@@ -15,8 +15,12 @@ comment "CFG80211 needs to be enabled for MAC80211"
|
| 4009 |
|
| 4010 |
if MAC80211 != n
|
| 4011 |
|
| 4012 |
+config MAC80211_HAS_RC
|
| 4013 |
+ def_bool n
|
| 4014 |
+
|
| 4015 |
config MAC80211_RC_PID
|
| 4016 |
bool "PID controller based rate control algorithm" if EMBEDDED
|
| 4017 |
+ select MAC80211_HAS_RC
|
| 4018 |
---help---
|
| 4019 |
This option enables a TX rate control algorithm for
|
| 4020 |
mac80211 that uses a PID controller to select the TX
|
| 4021 |
@@ -24,12 +28,14 @@ config MAC80211_RC_PID
|
| 4022 |
|
| 4023 |
config MAC80211_RC_MINSTREL
|
| 4024 |
bool "Minstrel" if EMBEDDED
|
| 4025 |
+ select MAC80211_HAS_RC
|
| 4026 |
default y
|
| 4027 |
---help---
|
| 4028 |
This option enables the 'minstrel' TX rate control algorithm
|
| 4029 |
|
| 4030 |
choice
|
| 4031 |
prompt "Default rate control algorithm"
|
| 4032 |
+ depends on MAC80211_HAS_RC
|
| 4033 |
default MAC80211_RC_DEFAULT_MINSTREL
|
| 4034 |
---help---
|
| 4035 |
This option selects the default rate control algorithm
|
| 4036 |
@@ -62,6 +68,9 @@ config MAC80211_RC_DEFAULT
|
| 4037 |
|
| 4038 |
endif
|
| 4039 |
|
| 4040 |
+comment "Some wireless drivers require a rate control algorithm"
|
| 4041 |
+ depends on MAC80211_HAS_RC=n
|
| 4042 |
+
|
| 4043 |
config MAC80211_MESH
|
| 4044 |
bool "Enable mac80211 mesh networking (pre-802.11s) support"
|
| 4045 |
depends on MAC80211 && EXPERIMENTAL
|
| 4046 |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
|
| 4047 |
index 538a7d7..3ee3cb8 100644
|
| 4048 |
--- a/net/mac80211/rx.c
|
| 4049 |
+++ b/net/mac80211/rx.c
|
| 4050 |
@@ -1220,7 +1220,8 @@ ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
|
| 4051 |
(rx->key || rx->sdata->drop_unencrypted)))
|
| 4052 |
return -EACCES;
|
| 4053 |
if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) {
|
| 4054 |
- if (unlikely(ieee80211_is_unicast_robust_mgmt_frame(rx->skb) &&
|
| 4055 |
+ if (unlikely(!ieee80211_has_protected(fc) &&
|
| 4056 |
+ ieee80211_is_unicast_robust_mgmt_frame(rx->skb) &&
|
| 4057 |
rx->key))
|
| 4058 |
return -EACCES;
|
| 4059 |
/* BIP does not use Protected field, so need to check MMIE */
|
| 4060 |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
|
| 4061 |
index d3efff2..b1d7904 100644
|
| 4062 |
--- a/net/mac80211/tx.c
|
| 4063 |
+++ b/net/mac80211/tx.c
|
| 4064 |
@@ -496,7 +496,8 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
|
| 4065 |
struct ieee80211_hdr *hdr = (void *)tx->skb->data;
|
| 4066 |
struct ieee80211_supported_band *sband;
|
| 4067 |
struct ieee80211_rate *rate;
|
| 4068 |
- int i, len;
|
| 4069 |
+ int i;
|
| 4070 |
+ u32 len;
|
| 4071 |
bool inval = false, rts = false, short_preamble = false;
|
| 4072 |
struct ieee80211_tx_rate_control txrc;
|
| 4073 |
u32 sta_flags;
|
| 4074 |
@@ -505,7 +506,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
|
| 4075 |
|
| 4076 |
sband = tx->local->hw.wiphy->bands[tx->channel->band];
|
| 4077 |
|
| 4078 |
- len = min_t(int, tx->skb->len + FCS_LEN,
|
| 4079 |
+ len = min_t(u32, tx->skb->len + FCS_LEN,
|
| 4080 |
tx->local->hw.wiphy->frag_threshold);
|
| 4081 |
|
| 4082 |
/* set up the tx rate control struct we give the RC algo */
|
| 4083 |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
|
| 4084 |
index 9d881a6..8579b4f 100644
|
| 4085 |
--- a/net/sctp/sm_make_chunk.c
|
| 4086 |
+++ b/net/sctp/sm_make_chunk.c
|
| 4087 |
@@ -107,7 +107,7 @@ static const struct sctp_paramhdr prsctp_param = {
|
| 4088 |
cpu_to_be16(sizeof(struct sctp_paramhdr)),
|
| 4089 |
};
|
| 4090 |
|
| 4091 |
-/* A helper to initialize to initialize an op error inside a
|
| 4092 |
+/* A helper to initialize an op error inside a
|
| 4093 |
* provided chunk, as most cause codes will be embedded inside an
|
| 4094 |
* abort chunk.
|
| 4095 |
*/
|
| 4096 |
@@ -124,6 +124,29 @@ void sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
|
| 4097 |
chunk->subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), &err);
|
| 4098 |
}
|
| 4099 |
|
| 4100 |
+/* A helper to initialize an op error inside a
|
| 4101 |
+ * provided chunk, as most cause codes will be embedded inside an
|
| 4102 |
+ * abort chunk. Differs from sctp_init_cause in that it won't oops
|
| 4103 |
+ * if there isn't enough space in the op error chunk
|
| 4104 |
+ */
|
| 4105 |
+int sctp_init_cause_fixed(struct sctp_chunk *chunk, __be16 cause_code,
|
| 4106 |
+ size_t paylen)
|
| 4107 |
+{
|
| 4108 |
+ sctp_errhdr_t err;
|
| 4109 |
+ __u16 len;
|
| 4110 |
+
|
| 4111 |
+ /* Cause code constants are now defined in network order. */
|
| 4112 |
+ err.cause = cause_code;
|
| 4113 |
+ len = sizeof(sctp_errhdr_t) + paylen;
|
| 4114 |
+ err.length = htons(len);
|
| 4115 |
+
|
| 4116 |
+ if (skb_tailroom(chunk->skb) < len)
|
| 4117 |
+ return -ENOSPC;
|
| 4118 |
+ chunk->subh.err_hdr = sctp_addto_chunk_fixed(chunk,
|
| 4119 |
+ sizeof(sctp_errhdr_t),
|
| 4120 |
+ &err);
|
| 4121 |
+ return 0;
|
| 4122 |
+}
|
| 4123 |
/* 3.3.2 Initiation (INIT) (1)
|
| 4124 |
*
|
| 4125 |
* This chunk is used to initiate a SCTP association between two
|
| 4126 |
@@ -1125,6 +1148,24 @@ nodata:
|
| 4127 |
return retval;
|
| 4128 |
}
|
| 4129 |
|
| 4130 |
+/* Create an Operation Error chunk of a fixed size,
|
| 4131 |
+ * specifically, max(asoc->pathmtu, SCTP_DEFAULT_MAXSEGMENT)
|
| 4132 |
+ * This is a helper function to allocate an error chunk for
|
| 4133 |
+ * for those invalid parameter codes in which we may not want
|
| 4134 |
+ * to report all the errors, if the incomming chunk is large
|
| 4135 |
+ */
|
| 4136 |
+static inline struct sctp_chunk *sctp_make_op_error_fixed(
|
| 4137 |
+ const struct sctp_association *asoc,
|
| 4138 |
+ const struct sctp_chunk *chunk)
|
| 4139 |
+{
|
| 4140 |
+ size_t size = asoc ? asoc->pathmtu : 0;
|
| 4141 |
+
|
| 4142 |
+ if (!size)
|
| 4143 |
+ size = SCTP_DEFAULT_MAXSEGMENT;
|
| 4144 |
+
|
| 4145 |
+ return sctp_make_op_error_space(asoc, chunk, size);
|
| 4146 |
+}
|
| 4147 |
+
|
| 4148 |
/* Create an Operation Error chunk. */
|
| 4149 |
struct sctp_chunk *sctp_make_op_error(const struct sctp_association *asoc,
|
| 4150 |
const struct sctp_chunk *chunk,
|
| 4151 |
@@ -1365,6 +1406,18 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data)
|
| 4152 |
return target;
|
| 4153 |
}
|
| 4154 |
|
| 4155 |
+/* Append bytes to the end of a chunk. Returns NULL if there isn't sufficient
|
| 4156 |
+ * space in the chunk
|
| 4157 |
+ */
|
| 4158 |
+void *sctp_addto_chunk_fixed(struct sctp_chunk *chunk,
|
| 4159 |
+ int len, const void *data)
|
| 4160 |
+{
|
| 4161 |
+ if (skb_tailroom(chunk->skb) >= len)
|
| 4162 |
+ return sctp_addto_chunk(chunk, len, data);
|
| 4163 |
+ else
|
| 4164 |
+ return NULL;
|
| 4165 |
+}
|
| 4166 |
+
|
| 4167 |
/* Append bytes from user space to the end of a chunk. Will panic if
|
| 4168 |
* chunk is not big enough.
|
| 4169 |
* Returns a kernel err value.
|
| 4170 |
@@ -1968,13 +2021,12 @@ static sctp_ierror_t sctp_process_unk_param(const struct sctp_association *asoc,
|
| 4171 |
* returning multiple unknown parameters.
|
| 4172 |
*/
|
| 4173 |
if (NULL == *errp)
|
| 4174 |
- *errp = sctp_make_op_error_space(asoc, chunk,
|
| 4175 |
- ntohs(chunk->chunk_hdr->length));
|
| 4176 |
+ *errp = sctp_make_op_error_fixed(asoc, chunk);
|
| 4177 |
|
| 4178 |
if (*errp) {
|
| 4179 |
- sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM,
|
| 4180 |
+ sctp_init_cause_fixed(*errp, SCTP_ERROR_UNKNOWN_PARAM,
|
| 4181 |
WORD_ROUND(ntohs(param.p->length)));
|
| 4182 |
- sctp_addto_chunk(*errp,
|
| 4183 |
+ sctp_addto_chunk_fixed(*errp,
|
| 4184 |
WORD_ROUND(ntohs(param.p->length)),
|
| 4185 |
param.v);
|
| 4186 |
} else {
|
| 4187 |
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
|
| 4188 |
index 327011f..7809137 100644
|
| 4189 |
--- a/net/tipc/bearer.c
|
| 4190 |
+++ b/net/tipc/bearer.c
|
| 4191 |
@@ -45,10 +45,10 @@
|
| 4192 |
|
| 4193 |
#define MAX_ADDR_STR 32
|
| 4194 |
|
| 4195 |
-static struct media *media_list = NULL;
|
| 4196 |
+static struct media media_list[MAX_MEDIA];
|
| 4197 |
static u32 media_count = 0;
|
| 4198 |
|
| 4199 |
-struct bearer *tipc_bearers = NULL;
|
| 4200 |
+struct bearer tipc_bearers[MAX_BEARERS];
|
| 4201 |
|
| 4202 |
/**
|
| 4203 |
* media_name_valid - validate media name
|
| 4204 |
@@ -108,9 +108,11 @@ int tipc_register_media(u32 media_type,
|
| 4205 |
int res = -EINVAL;
|
| 4206 |
|
| 4207 |
write_lock_bh(&tipc_net_lock);
|
| 4208 |
- if (!media_list)
|
| 4209 |
- goto exit;
|
| 4210 |
|
| 4211 |
+ if (tipc_mode != TIPC_NET_MODE) {
|
| 4212 |
+ warn("Media <%s> rejected, not in networked mode yet\n", name);
|
| 4213 |
+ goto exit;
|
| 4214 |
+ }
|
| 4215 |
if (!media_name_valid(name)) {
|
| 4216 |
warn("Media <%s> rejected, illegal name\n", name);
|
| 4217 |
goto exit;
|
| 4218 |
@@ -660,33 +662,10 @@ int tipc_disable_bearer(const char *name)
|
| 4219 |
|
| 4220 |
|
| 4221 |
|
| 4222 |
-int tipc_bearer_init(void)
|
| 4223 |
-{
|
| 4224 |
- int res;
|
| 4225 |
-
|
| 4226 |
- write_lock_bh(&tipc_net_lock);
|
| 4227 |
- tipc_bearers = kcalloc(MAX_BEARERS, sizeof(struct bearer), GFP_ATOMIC);
|
| 4228 |
- media_list = kcalloc(MAX_MEDIA, sizeof(struct media), GFP_ATOMIC);
|
| 4229 |
- if (tipc_bearers && media_list) {
|
| 4230 |
- res = 0;
|
| 4231 |
- } else {
|
| 4232 |
- kfree(tipc_bearers);
|
| 4233 |
- kfree(media_list);
|
| 4234 |
- tipc_bearers = NULL;
|
| 4235 |
- media_list = NULL;
|
| 4236 |
- res = -ENOMEM;
|
| 4237 |
- }
|
| 4238 |
- write_unlock_bh(&tipc_net_lock);
|
| 4239 |
- return res;
|
| 4240 |
-}
|
| 4241 |
-
|
| 4242 |
void tipc_bearer_stop(void)
|
| 4243 |
{
|
| 4244 |
u32 i;
|
| 4245 |
|
| 4246 |
- if (!tipc_bearers)
|
| 4247 |
- return;
|
| 4248 |
-
|
| 4249 |
for (i = 0; i < MAX_BEARERS; i++) {
|
| 4250 |
if (tipc_bearers[i].active)
|
| 4251 |
tipc_bearers[i].publ.blocked = 1;
|
| 4252 |
@@ -695,10 +674,6 @@ void tipc_bearer_stop(void)
|
| 4253 |
if (tipc_bearers[i].active)
|
| 4254 |
bearer_disable(tipc_bearers[i].publ.name);
|
| 4255 |
}
|
| 4256 |
- kfree(tipc_bearers);
|
| 4257 |
- kfree(media_list);
|
| 4258 |
- tipc_bearers = NULL;
|
| 4259 |
- media_list = NULL;
|
| 4260 |
media_count = 0;
|
| 4261 |
}
|
| 4262 |
|
| 4263 |
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h
|
| 4264 |
index ca57348..000228e 100644
|
| 4265 |
--- a/net/tipc/bearer.h
|
| 4266 |
+++ b/net/tipc/bearer.h
|
| 4267 |
@@ -114,7 +114,7 @@ struct bearer_name {
|
| 4268 |
|
| 4269 |
struct link;
|
| 4270 |
|
| 4271 |
-extern struct bearer *tipc_bearers;
|
| 4272 |
+extern struct bearer tipc_bearers[];
|
| 4273 |
|
| 4274 |
void tipc_media_addr_printf(struct print_buf *pb, struct tipc_media_addr *a);
|
| 4275 |
struct sk_buff *tipc_media_get_names(void);
|
| 4276 |
diff --git a/net/tipc/net.c b/net/tipc/net.c
|
| 4277 |
index 7906608..f25b1cd 100644
|
| 4278 |
--- a/net/tipc/net.c
|
| 4279 |
+++ b/net/tipc/net.c
|
| 4280 |
@@ -116,7 +116,8 @@
|
| 4281 |
*/
|
| 4282 |
|
| 4283 |
DEFINE_RWLOCK(tipc_net_lock);
|
| 4284 |
-struct network tipc_net = { NULL };
|
| 4285 |
+struct _zone *tipc_zones[256] = { NULL, };
|
| 4286 |
+struct network tipc_net = { tipc_zones };
|
| 4287 |
|
| 4288 |
struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref)
|
| 4289 |
{
|
| 4290 |
@@ -158,28 +159,12 @@ void tipc_net_send_external_routes(u32 dest)
|
| 4291 |
}
|
| 4292 |
}
|
| 4293 |
|
| 4294 |
-static int net_init(void)
|
| 4295 |
-{
|
| 4296 |
- memset(&tipc_net, 0, sizeof(tipc_net));
|
| 4297 |
- tipc_net.zones = kcalloc(tipc_max_zones + 1, sizeof(struct _zone *), GFP_ATOMIC);
|
| 4298 |
- if (!tipc_net.zones) {
|
| 4299 |
- return -ENOMEM;
|
| 4300 |
- }
|
| 4301 |
- return 0;
|
| 4302 |
-}
|
| 4303 |
-
|
| 4304 |
static void net_stop(void)
|
| 4305 |
{
|
| 4306 |
u32 z_num;
|
| 4307 |
|
| 4308 |
- if (!tipc_net.zones)
|
| 4309 |
- return;
|
| 4310 |
-
|
| 4311 |
- for (z_num = 1; z_num <= tipc_max_zones; z_num++) {
|
| 4312 |
+ for (z_num = 1; z_num <= tipc_max_zones; z_num++)
|
| 4313 |
tipc_zone_delete(tipc_net.zones[z_num]);
|
| 4314 |
- }
|
| 4315 |
- kfree(tipc_net.zones);
|
| 4316 |
- tipc_net.zones = NULL;
|
| 4317 |
}
|
| 4318 |
|
| 4319 |
static void net_route_named_msg(struct sk_buff *buf)
|
| 4320 |
@@ -282,9 +267,7 @@ int tipc_net_start(u32 addr)
|
| 4321 |
tipc_named_reinit();
|
| 4322 |
tipc_port_reinit();
|
| 4323 |
|
| 4324 |
- if ((res = tipc_bearer_init()) ||
|
| 4325 |
- (res = net_init()) ||
|
| 4326 |
- (res = tipc_cltr_init()) ||
|
| 4327 |
+ if ((res = tipc_cltr_init()) ||
|
| 4328 |
(res = tipc_bclink_init())) {
|
| 4329 |
return res;
|
| 4330 |
}
|
| 4331 |
diff --git a/net/wireless/core.h b/net/wireless/core.h
|
| 4332 |
index 68b3219..376798f 100644
|
| 4333 |
--- a/net/wireless/core.h
|
| 4334 |
+++ b/net/wireless/core.h
|
| 4335 |
@@ -385,6 +385,8 @@ int rdev_set_freq(struct cfg80211_registered_device *rdev,
|
| 4336 |
struct wireless_dev *for_wdev,
|
| 4337 |
int freq, enum nl80211_channel_type channel_type);
|
| 4338 |
|
| 4339 |
+u16 cfg80211_calculate_bitrate(struct rate_info *rate);
|
| 4340 |
+
|
| 4341 |
#ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS
|
| 4342 |
#define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond)
|
| 4343 |
#else
|
| 4344 |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
| 4345 |
index ca3c92a..b75e718 100644
|
| 4346 |
--- a/net/wireless/nl80211.c
|
| 4347 |
+++ b/net/wireless/nl80211.c
|
| 4348 |
@@ -1562,39 +1562,6 @@ static int parse_station_flags(struct genl_info *info,
|
| 4349 |
return 0;
|
| 4350 |
}
|
| 4351 |
|
| 4352 |
-static u16 nl80211_calculate_bitrate(struct rate_info *rate)
|
| 4353 |
-{
|
| 4354 |
- int modulation, streams, bitrate;
|
| 4355 |
-
|
| 4356 |
- if (!(rate->flags & RATE_INFO_FLAGS_MCS))
|
| 4357 |
- return rate->legacy;
|
| 4358 |
-
|
| 4359 |
- /* the formula below does only work for MCS values smaller than 32 */
|
| 4360 |
- if (rate->mcs >= 32)
|
| 4361 |
- return 0;
|
| 4362 |
-
|
| 4363 |
- modulation = rate->mcs & 7;
|
| 4364 |
- streams = (rate->mcs >> 3) + 1;
|
| 4365 |
-
|
| 4366 |
- bitrate = (rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH) ?
|
| 4367 |
- 13500000 : 6500000;
|
| 4368 |
-
|
| 4369 |
- if (modulation < 4)
|
| 4370 |
- bitrate *= (modulation + 1);
|
| 4371 |
- else if (modulation == 4)
|
| 4372 |
- bitrate *= (modulation + 2);
|
| 4373 |
- else
|
| 4374 |
- bitrate *= (modulation + 3);
|
| 4375 |
-
|
| 4376 |
- bitrate *= streams;
|
| 4377 |
-
|
| 4378 |
- if (rate->flags & RATE_INFO_FLAGS_SHORT_GI)
|
| 4379 |
- bitrate = (bitrate / 9) * 10;
|
| 4380 |
-
|
| 4381 |
- /* do NOT round down here */
|
| 4382 |
- return (bitrate + 50000) / 100000;
|
| 4383 |
-}
|
| 4384 |
-
|
| 4385 |
static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
|
| 4386 |
int flags, struct net_device *dev,
|
| 4387 |
u8 *mac_addr, struct station_info *sinfo)
|
| 4388 |
@@ -1641,8 +1608,8 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
|
| 4389 |
if (!txrate)
|
| 4390 |
goto nla_put_failure;
|
| 4391 |
|
| 4392 |
- /* nl80211_calculate_bitrate will return 0 for mcs >= 32 */
|
| 4393 |
- bitrate = nl80211_calculate_bitrate(&sinfo->txrate);
|
| 4394 |
+ /* cfg80211_calculate_bitrate will return 0 for mcs >= 32 */
|
| 4395 |
+ bitrate = cfg80211_calculate_bitrate(&sinfo->txrate);
|
| 4396 |
if (bitrate > 0)
|
| 4397 |
NLA_PUT_U16(msg, NL80211_RATE_INFO_BITRATE, bitrate);
|
| 4398 |
|
| 4399 |
diff --git a/net/wireless/util.c b/net/wireless/util.c
|
| 4400 |
index 3fc2df8..a6a38b1 100644
|
| 4401 |
--- a/net/wireless/util.c
|
| 4402 |
+++ b/net/wireless/util.c
|
| 4403 |
@@ -682,3 +682,36 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
|
| 4404 |
|
| 4405 |
return err;
|
| 4406 |
}
|
| 4407 |
+
|
| 4408 |
+u16 cfg80211_calculate_bitrate(struct rate_info *rate)
|
| 4409 |
+{
|
| 4410 |
+ int modulation, streams, bitrate;
|
| 4411 |
+
|
| 4412 |
+ if (!(rate->flags & RATE_INFO_FLAGS_MCS))
|
| 4413 |
+ return rate->legacy;
|
| 4414 |
+
|
| 4415 |
+ /* the formula below does only work for MCS values smaller than 32 */
|
| 4416 |
+ if (rate->mcs >= 32)
|
| 4417 |
+ return 0;
|
| 4418 |
+
|
| 4419 |
+ modulation = rate->mcs & 7;
|
| 4420 |
+ streams = (rate->mcs >> 3) + 1;
|
| 4421 |
+
|
| 4422 |
+ bitrate = (rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH) ?
|
| 4423 |
+ 13500000 : 6500000;
|
| 4424 |
+
|
| 4425 |
+ if (modulation < 4)
|
| 4426 |
+ bitrate *= (modulation + 1);
|
| 4427 |
+ else if (modulation == 4)
|
| 4428 |
+ bitrate *= (modulation + 2);
|
| 4429 |
+ else
|
| 4430 |
+ bitrate *= (modulation + 3);
|
| 4431 |
+
|
| 4432 |
+ bitrate *= streams;
|
| 4433 |
+
|
| 4434 |
+ if (rate->flags & RATE_INFO_FLAGS_SHORT_GI)
|
| 4435 |
+ bitrate = (bitrate / 9) * 10;
|
| 4436 |
+
|
| 4437 |
+ /* do NOT round down here */
|
| 4438 |
+ return (bitrate + 50000) / 100000;
|
| 4439 |
+}
|
| 4440 |
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
|
| 4441 |
index 561a45c..6a60c5a 100644
|
| 4442 |
--- a/net/wireless/wext-compat.c
|
| 4443 |
+++ b/net/wireless/wext-compat.c
|
| 4444 |
@@ -1227,10 +1227,7 @@ int cfg80211_wext_giwrate(struct net_device *dev,
|
| 4445 |
if (!(sinfo.filled & STATION_INFO_TX_BITRATE))
|
| 4446 |
return -EOPNOTSUPP;
|
| 4447 |
|
| 4448 |
- rate->value = 0;
|
| 4449 |
-
|
| 4450 |
- if (!(sinfo.txrate.flags & RATE_INFO_FLAGS_MCS))
|
| 4451 |
- rate->value = 100000 * sinfo.txrate.legacy;
|
| 4452 |
+ rate->value = 100000 * cfg80211_calculate_bitrate(&sinfo.txrate);
|
| 4453 |
|
| 4454 |
return 0;
|
| 4455 |
}
|
| 4456 |
diff --git a/security/keys/keyring.c b/security/keys/keyring.c
|
| 4457 |
index 8ec0274..e031952 100644
|
| 4458 |
--- a/security/keys/keyring.c
|
| 4459 |
+++ b/security/keys/keyring.c
|
| 4460 |
@@ -524,9 +524,8 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check)
|
| 4461 |
struct key *keyring;
|
| 4462 |
int bucket;
|
| 4463 |
|
| 4464 |
- keyring = ERR_PTR(-EINVAL);
|
| 4465 |
if (!name)
|
| 4466 |
- goto error;
|
| 4467 |
+ return ERR_PTR(-EINVAL);
|
| 4468 |
|
| 4469 |
bucket = keyring_hash(name);
|
| 4470 |
|
| 4471 |
@@ -553,17 +552,18 @@ struct key *find_keyring_by_name(const char *name, bool skip_perm_check)
|
| 4472 |
KEY_SEARCH) < 0)
|
| 4473 |
continue;
|
| 4474 |
|
| 4475 |
- /* we've got a match */
|
| 4476 |
- atomic_inc(&keyring->usage);
|
| 4477 |
- read_unlock(&keyring_name_lock);
|
| 4478 |
- goto error;
|
| 4479 |
+ /* we've got a match but we might end up racing with
|
| 4480 |
+ * key_cleanup() if the keyring is currently 'dead'
|
| 4481 |
+ * (ie. it has a zero usage count) */
|
| 4482 |
+ if (!atomic_inc_not_zero(&keyring->usage))
|
| 4483 |
+ continue;
|
| 4484 |
+ goto out;
|
| 4485 |
}
|
| 4486 |
}
|
| 4487 |
|
| 4488 |
- read_unlock(&keyring_name_lock);
|
| 4489 |
keyring = ERR_PTR(-ENOKEY);
|
| 4490 |
-
|
| 4491 |
- error:
|
| 4492 |
+out:
|
| 4493 |
+ read_unlock(&keyring_name_lock);
|
| 4494 |
return keyring;
|
| 4495 |
|
| 4496 |
} /* end find_keyring_by_name() */
|
| 4497 |
diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
|
| 4498 |
index 5c23afb..931cfda 100644
|
| 4499 |
--- a/security/keys/process_keys.c
|
| 4500 |
+++ b/security/keys/process_keys.c
|
| 4501 |
@@ -509,7 +509,7 @@ try_again:
|
| 4502 |
|
| 4503 |
ret = install_thread_keyring();
|
| 4504 |
if (ret < 0) {
|
| 4505 |
- key = ERR_PTR(ret);
|
| 4506 |
+ key_ref = ERR_PTR(ret);
|
| 4507 |
goto error;
|
| 4508 |
}
|
| 4509 |
goto reget_creds;
|
| 4510 |
@@ -527,7 +527,7 @@ try_again:
|
| 4511 |
|
| 4512 |
ret = install_process_keyring();
|
| 4513 |
if (ret < 0) {
|
| 4514 |
- key = ERR_PTR(ret);
|
| 4515 |
+ key_ref = ERR_PTR(ret);
|
| 4516 |
goto error;
|
| 4517 |
}
|
| 4518 |
goto reget_creds;
|
| 4519 |
@@ -586,7 +586,7 @@ try_again:
|
| 4520 |
|
| 4521 |
case KEY_SPEC_GROUP_KEYRING:
|
| 4522 |
/* group keyrings are not yet supported */
|
| 4523 |
- key = ERR_PTR(-EINVAL);
|
| 4524 |
+ key_ref = ERR_PTR(-EINVAL);
|
| 4525 |
goto error;
|
| 4526 |
|
| 4527 |
case KEY_SPEC_REQKEY_AUTH_KEY:
|
| 4528 |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
| 4529 |
index ebba28e..cc2a5a2 100644
|
| 4530 |
--- a/sound/pci/hda/hda_intel.c
|
| 4531 |
+++ b/sound/pci/hda/hda_intel.c
|
| 4532 |
@@ -2226,16 +2226,23 @@ static int azx_dev_free(struct snd_device *device)
|
| 4533 |
* white/black-listing for position_fix
|
| 4534 |
*/
|
| 4535 |
static struct snd_pci_quirk position_fix_list[] __devinitdata = {
|
| 4536 |
+ SND_PCI_QUIRK(0x1025, 0x009f, "Acer Aspire 5110", POS_FIX_LPIB),
|
| 4537 |
SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB),
|
| 4538 |
SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
|
| 4539 |
SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
|
| 4540 |
- SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
|
| 4541 |
- SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
|
| 4542 |
SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
|
| 4543 |
+ SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
|
| 4544 |
+ SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB),
|
| 4545 |
+ SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB),
|
| 4546 |
+ SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB),
|
| 4547 |
+ SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
|
| 4548 |
+ SND_PCI_QUIRK(0x1179, 0xff10, "Toshiba A100-259", POS_FIX_LPIB),
|
| 4549 |
+ SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB),
|
| 4550 |
SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB),
|
| 4551 |
SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
|
| 4552 |
SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),
|
| 4553 |
SND_PCI_QUIRK(0x1565, 0x8218, "Biostar Microtech", POS_FIX_LPIB),
|
| 4554 |
+ SND_PCI_QUIRK(0x1849, 0x0888, "775Dual-VSTA", POS_FIX_LPIB),
|
| 4555 |
SND_PCI_QUIRK(0x8086, 0x2503, "DG965OT AAD63733-203", POS_FIX_LPIB),
|
| 4556 |
SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB),
|
| 4557 |
{}
|
| 4558 |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
| 4559 |
index a9bdccc..82a53d9 100644
|
| 4560 |
--- a/sound/pci/hda/patch_realtek.c
|
| 4561 |
+++ b/sound/pci/hda/patch_realtek.c
|
| 4562 |
@@ -8937,6 +8937,7 @@ static struct snd_pci_quirk alc882_ssid_cfg_tbl[] = {
|
| 4563 |
SND_PCI_QUIRK(0x106b, 0x1000, "iMac 24", ALC885_IMAC24),
|
| 4564 |
SND_PCI_QUIRK(0x106b, 0x2800, "AppleTV", ALC885_IMAC24),
|
| 4565 |
SND_PCI_QUIRK(0x106b, 0x2c00, "MacbookPro rev3", ALC885_MBP3),
|
| 4566 |
+ SND_PCI_QUIRK(0x106b, 0x3000, "iMac", ALC889A_MB31),
|
| 4567 |
SND_PCI_QUIRK(0x106b, 0x3600, "Macbook 3,1", ALC889A_MB31),
|
| 4568 |
SND_PCI_QUIRK(0x106b, 0x3800, "MacbookPro 4,1", ALC885_MBP3),
|
| 4569 |
SND_PCI_QUIRK(0x106b, 0x3e00, "iMac 24 Aluminum", ALC885_IMAC24),
|
| 4570 |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
|
| 4571 |
index a519a72..fee411b 100644
|
| 4572 |
--- a/sound/pci/hda/patch_sigmatel.c
|
| 4573 |
+++ b/sound/pci/hda/patch_sigmatel.c
|
| 4574 |
@@ -2059,12 +2059,12 @@ static struct snd_pci_quirk stac927x_cfg_tbl[] = {
|
| 4575 |
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_INTEL, 0xff00, 0x2000,
|
| 4576 |
"Intel D965", STAC_D965_3ST),
|
| 4577 |
/* Dell 3 stack systems */
|
| 4578 |
- SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f7, "Dell XPS M1730", STAC_DELL_3ST),
|
| 4579 |
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01dd, "Dell Dimension E520", STAC_DELL_3ST),
|
| 4580 |
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ed, "Dell ", STAC_DELL_3ST),
|
| 4581 |
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f4, "Dell ", STAC_DELL_3ST),
|
| 4582 |
/* Dell 3 stack systems with verb table in BIOS */
|
| 4583 |
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f3, "Dell Inspiron 1420", STAC_DELL_BIOS),
|
| 4584 |
+ SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f7, "Dell XPS M1730", STAC_DELL_BIOS),
|
| 4585 |
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0227, "Dell Vostro 1400 ", STAC_DELL_BIOS),
|
| 4586 |
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022e, "Dell ", STAC_DELL_BIOS),
|
| 4587 |
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x022f, "Dell Inspiron 1525", STAC_DELL_BIOS),
|
| 4588 |
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
|
| 4589 |
index 2089fe7..9f9bcd8 100644
|
| 4590 |
--- a/sound/soc/codecs/wm8350.c
|
| 4591 |
+++ b/sound/soc/codecs/wm8350.c
|
| 4592 |
@@ -423,8 +423,8 @@ static const struct soc_enum wm8350_enum[] = {
|
| 4593 |
SOC_ENUM_SINGLE(WM8350_INPUT_MIXER_VOLUME, 15, 2, wm8350_lr),
|
| 4594 |
};
|
| 4595 |
|
| 4596 |
-static DECLARE_TLV_DB_LINEAR(pre_amp_tlv, -1200, 3525);
|
| 4597 |
-static DECLARE_TLV_DB_LINEAR(out_pga_tlv, -5700, 600);
|
| 4598 |
+static DECLARE_TLV_DB_SCALE(pre_amp_tlv, -1200, 3525, 0);
|
| 4599 |
+static DECLARE_TLV_DB_SCALE(out_pga_tlv, -5700, 600, 0);
|
| 4600 |
static DECLARE_TLV_DB_SCALE(dac_pcm_tlv, -7163, 36, 1);
|
| 4601 |
static DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -12700, 50, 1);
|
| 4602 |
static DECLARE_TLV_DB_SCALE(out_mix_tlv, -1500, 300, 1);
|
| 4603 |
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
|
| 4604 |
index b9ef4d9..775195b 100644
|
| 4605 |
--- a/sound/soc/codecs/wm8400.c
|
| 4606 |
+++ b/sound/soc/codecs/wm8400.c
|
| 4607 |
@@ -106,21 +106,21 @@ static void wm8400_codec_reset(struct snd_soc_codec *codec)
|
| 4608 |
wm8400_reset_codec_reg_cache(wm8400->wm8400);
|
| 4609 |
}
|
| 4610 |
|
| 4611 |
-static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -1500, 600);
|
| 4612 |
+static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0);
|
| 4613 |
|
| 4614 |
-static const DECLARE_TLV_DB_LINEAR(in_pga_tlv, -1650, 3000);
|
| 4615 |
+static const DECLARE_TLV_DB_SCALE(in_pga_tlv, -1650, 3000, 0);
|
| 4616 |
|
| 4617 |
-static const DECLARE_TLV_DB_LINEAR(out_mix_tlv, -2100, 0);
|
| 4618 |
+static const DECLARE_TLV_DB_SCALE(out_mix_tlv, -2100, 0, 0);
|
| 4619 |
|
| 4620 |
-static const DECLARE_TLV_DB_LINEAR(out_pga_tlv, -7300, 600);
|
| 4621 |
+static const DECLARE_TLV_DB_SCALE(out_pga_tlv, -7300, 600, 0);
|
| 4622 |
|
| 4623 |
-static const DECLARE_TLV_DB_LINEAR(out_omix_tlv, -600, 0);
|
| 4624 |
+static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0);
|
| 4625 |
|
| 4626 |
-static const DECLARE_TLV_DB_LINEAR(out_dac_tlv, -7163, 0);
|
| 4627 |
+static const DECLARE_TLV_DB_SCALE(out_dac_tlv, -7163, 0, 0);
|
| 4628 |
|
| 4629 |
-static const DECLARE_TLV_DB_LINEAR(in_adc_tlv, -7163, 1763);
|
| 4630 |
+static const DECLARE_TLV_DB_SCALE(in_adc_tlv, -7163, 1763, 0);
|
| 4631 |
|
| 4632 |
-static const DECLARE_TLV_DB_LINEAR(out_sidetone_tlv, -3600, 0);
|
| 4633 |
+static const DECLARE_TLV_DB_SCALE(out_sidetone_tlv, -3600, 0, 0);
|
| 4634 |
|
| 4635 |
static int wm8400_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
|
| 4636 |
struct snd_ctl_elem_value *ucontrol)
|
| 4637 |
@@ -439,7 +439,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w,
|
| 4638 |
/* INMIX dB values */
|
| 4639 |
static const unsigned int in_mix_tlv[] = {
|
| 4640 |
TLV_DB_RANGE_HEAD(1),
|
| 4641 |
- 0,7, TLV_DB_LINEAR_ITEM(-1200, 600),
|
| 4642 |
+ 0,7, TLV_DB_SCALE_ITEM(-1200, 600, 0),
|
| 4643 |
};
|
| 4644 |
|
| 4645 |
/* Left In PGA Connections */
|
| 4646 |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
|
| 4647 |
index 2d702db..253159c 100644
|
| 4648 |
--- a/sound/soc/codecs/wm8990.c
|
| 4649 |
+++ b/sound/soc/codecs/wm8990.c
|
| 4650 |
@@ -110,21 +110,21 @@ static const u16 wm8990_reg[] = {
|
| 4651 |
|
| 4652 |
#define wm8990_reset(c) snd_soc_write(c, WM8990_RESET, 0)
|
| 4653 |
|
| 4654 |
-static const DECLARE_TLV_DB_LINEAR(rec_mix_tlv, -1500, 600);
|
| 4655 |
+static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0);
|
| 4656 |
|
| 4657 |
-static const DECLARE_TLV_DB_LINEAR(in_pga_tlv, -1650, 3000);
|
| 4658 |
+static const DECLARE_TLV_DB_SCALE(in_pga_tlv, -1650, 3000, 0);
|
| 4659 |
|
| 4660 |
-static const DECLARE_TLV_DB_LINEAR(out_mix_tlv, 0, -2100);
|
| 4661 |
+static const DECLARE_TLV_DB_SCALE(out_mix_tlv, 0, -2100, 0);
|
| 4662 |
|
| 4663 |
-static const DECLARE_TLV_DB_LINEAR(out_pga_tlv, -7300, 600);
|
| 4664 |
+static const DECLARE_TLV_DB_SCALE(out_pga_tlv, -7300, 600, 0);
|
| 4665 |
|
| 4666 |
-static const DECLARE_TLV_DB_LINEAR(out_omix_tlv, -600, 0);
|
| 4667 |
+static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0);
|
| 4668 |
|
| 4669 |
-static const DECLARE_TLV_DB_LINEAR(out_dac_tlv, -7163, 0);
|
| 4670 |
+static const DECLARE_TLV_DB_SCALE(out_dac_tlv, -7163, 0, 0);
|
| 4671 |
|
| 4672 |
-static const DECLARE_TLV_DB_LINEAR(in_adc_tlv, -7163, 1763);
|
| 4673 |
+static const DECLARE_TLV_DB_SCALE(in_adc_tlv, -7163, 1763, 0);
|
| 4674 |
|
| 4675 |
-static const DECLARE_TLV_DB_LINEAR(out_sidetone_tlv, -3600, 0);
|
| 4676 |
+static const DECLARE_TLV_DB_SCALE(out_sidetone_tlv, -3600, 0, 0);
|
| 4677 |
|
| 4678 |
static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
|
| 4679 |
struct snd_ctl_elem_value *ucontrol)
|
| 4680 |
@@ -450,7 +450,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
|
| 4681 |
/* INMIX dB values */
|
| 4682 |
static const unsigned int in_mix_tlv[] = {
|
| 4683 |
TLV_DB_RANGE_HEAD(1),
|
| 4684 |
- 0, 7, TLV_DB_LINEAR_ITEM(-1200, 600),
|
| 4685 |
+ 0, 7, TLV_DB_SCALE_ITEM(-1200, 600, 0),
|
| 4686 |
};
|
| 4687 |
|
| 4688 |
/* Left In PGA Connections */
|