1 |
Author: mpagano |
2 |
Date: 2009-03-24 02:08:56 +0000 (Tue, 24 Mar 2009) |
3 |
New Revision: 1532 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/2.6.28/1008_linux-2.6.28.9.patch |
7 |
genpatches-2.6/trunk/2.6.28/2910_makefile-cflags.patch |
8 |
Removed: |
9 |
genpatches-2.6/trunk/2.6.28/2705_i915-no-vblank-on-disabled-pipe.patch |
10 |
genpatches-2.6/trunk/2.6.28/2710_i915-set-vblank-flag-correctly.patch |
11 |
Modified: |
12 |
genpatches-2.6/trunk/2.6.28/0000_README |
13 |
Log: |
14 |
Linux 2.6.28.9. Removal of redundant patches. Addtion of cflags patch for the main makefile to disable invalid cant wrap optizations. |
15 |
|
16 |
Modified: genpatches-2.6/trunk/2.6.28/0000_README |
17 |
=================================================================== |
18 |
--- genpatches-2.6/trunk/2.6.28/0000_README 2009-03-21 15:32:23 UTC (rev 1531) |
19 |
+++ genpatches-2.6/trunk/2.6.28/0000_README 2009-03-24 02:08:56 UTC (rev 1532) |
20 |
@@ -119,18 +119,14 @@ |
21 |
From: http://bugs.gentoo.org/254793 |
22 |
Desc: Fix boot hang with pata_hpt366 driver |
23 |
|
24 |
-Patch: 2705_i915-no-vblank-on-disabled-pipe.patch |
25 |
-From: http://bugs.gentoo.org/253813 |
26 |
-ppDesc: Fix crash with GEM + compiz |
27 |
- |
28 |
-Patch: 2710_i915-set-vblank-flag-correctly.patch |
29 |
-From; http://bugs.gentoo.org/253813 |
30 |
-Desc: Fix crash with GEM + compiz |
31 |
- |
32 |
Patch: 2900_IT8720-chipset-support-and-type-values-fix.patch |
33 |
From: http://bugs.gentoo.org/show_bug.cgi?id=245625 |
34 |
Desc: Patch to retrieve sensor information from the IT8720 chipset and type values fixes |
35 |
|
36 |
+Patch: 2910_makefile-cflags.patch |
37 |
+From: http://www.kernel.org |
38 |
+Desc: Disable invalid "can't wrap" optimzations for signed / pointers |
39 |
+ |
40 |
Patch: 4100_dm-bbr.patch |
41 |
From: EVMS 2.5.2 |
42 |
Desc: Bad block relocation support for LiveCD users |
43 |
|
44 |
Added: genpatches-2.6/trunk/2.6.28/1008_linux-2.6.28.9.patch |
45 |
=================================================================== |
46 |
--- genpatches-2.6/trunk/2.6.28/1008_linux-2.6.28.9.patch (rev 0) |
47 |
+++ genpatches-2.6/trunk/2.6.28/1008_linux-2.6.28.9.patch 2009-03-24 02:08:56 UTC (rev 1532) |
48 |
@@ -0,0 +1,1319 @@ |
49 |
+diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig |
50 |
+index 0429d3e..4d19a0b 100644 |
51 |
+--- a/arch/ia64/Kconfig |
52 |
++++ b/arch/ia64/Kconfig |
53 |
+@@ -479,8 +479,7 @@ config HOLES_IN_ZONE |
54 |
+ default y if VIRTUAL_MEM_MAP |
55 |
+ |
56 |
+ config HAVE_ARCH_EARLY_PFN_TO_NID |
57 |
+- def_bool y |
58 |
+- depends on NEED_MULTIPLE_NODES |
59 |
++ def_bool NUMA && SPARSEMEM |
60 |
+ |
61 |
+ config HAVE_ARCH_NODEDATA_EXTENSION |
62 |
+ def_bool y |
63 |
+diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c |
64 |
+index 26ecb96..507fc15 100644 |
65 |
+--- a/arch/powerpc/sysdev/fsl_soc.c |
66 |
++++ b/arch/powerpc/sysdev/fsl_soc.c |
67 |
+@@ -257,7 +257,7 @@ static int __init gfar_mdio_of_init(void) |
68 |
+ gfar_mdio_of_init_one(np); |
69 |
+ |
70 |
+ /* try the deprecated version */ |
71 |
+- for_each_compatible_node(np, "mdio", "gianfar"); |
72 |
++ for_each_compatible_node(np, "mdio", "gianfar") |
73 |
+ gfar_mdio_of_init_one(np); |
74 |
+ |
75 |
+ return 0; |
76 |
+diff --git a/arch/s390/lib/div64.c b/arch/s390/lib/div64.c |
77 |
+index a5f8300..d9e62c0 100644 |
78 |
+--- a/arch/s390/lib/div64.c |
79 |
++++ b/arch/s390/lib/div64.c |
80 |
+@@ -61,7 +61,7 @@ static uint32_t __div64_31(uint64_t *n, uint32_t base) |
81 |
+ " clr %0,%3\n" |
82 |
+ " jl 0f\n" |
83 |
+ " slr %0,%3\n" |
84 |
+- " alr %1,%2\n" |
85 |
++ " ahi %1,1\n" |
86 |
+ "0:\n" |
87 |
+ : "+d" (reg2), "+d" (reg3), "=d" (tmp) |
88 |
+ : "d" (base), "2" (1UL) : "cc" ); |
89 |
+diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h |
90 |
+index e38859d..07684f8 100644 |
91 |
+--- a/arch/x86/include/asm/msr-index.h |
92 |
++++ b/arch/x86/include/asm/msr-index.h |
93 |
+@@ -200,6 +200,35 @@ |
94 |
+ #define MSR_IA32_THERM_STATUS 0x0000019c |
95 |
+ #define MSR_IA32_MISC_ENABLE 0x000001a0 |
96 |
+ |
97 |
++/* MISC_ENABLE bits: architectural */ |
98 |
++#define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0) |
99 |
++#define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1) |
100 |
++#define MSR_IA32_MISC_ENABLE_EMON (1ULL << 7) |
101 |
++#define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1ULL << 11) |
102 |
++#define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1ULL << 12) |
103 |
++#define MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP (1ULL << 16) |
104 |
++#define MSR_IA32_MISC_ENABLE_MWAIT (1ULL << 18) |
105 |
++#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID (1ULL << 22) |
106 |
++#define MSR_IA32_MISC_ENABLE_XTPR_DISABLE (1ULL << 23) |
107 |
++#define MSR_IA32_MISC_ENABLE_XD_DISABLE (1ULL << 34) |
108 |
++ |
109 |
++/* MISC_ENABLE bits: model-specific, meaning may vary from core to core */ |
110 |
++#define MSR_IA32_MISC_ENABLE_X87_COMPAT (1ULL << 2) |
111 |
++#define MSR_IA32_MISC_ENABLE_TM1 (1ULL << 3) |
112 |
++#define MSR_IA32_MISC_ENABLE_SPLIT_LOCK_DISABLE (1ULL << 4) |
113 |
++#define MSR_IA32_MISC_ENABLE_L3CACHE_DISABLE (1ULL << 6) |
114 |
++#define MSR_IA32_MISC_ENABLE_SUPPRESS_LOCK (1ULL << 8) |
115 |
++#define MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE (1ULL << 9) |
116 |
++#define MSR_IA32_MISC_ENABLE_FERR (1ULL << 10) |
117 |
++#define MSR_IA32_MISC_ENABLE_FERR_MULTIPLEX (1ULL << 10) |
118 |
++#define MSR_IA32_MISC_ENABLE_TM2 (1ULL << 13) |
119 |
++#define MSR_IA32_MISC_ENABLE_ADJ_PREF_DISABLE (1ULL << 19) |
120 |
++#define MSR_IA32_MISC_ENABLE_SPEEDSTEP_LOCK (1ULL << 20) |
121 |
++#define MSR_IA32_MISC_ENABLE_L1D_CONTEXT (1ULL << 24) |
122 |
++#define MSR_IA32_MISC_ENABLE_DCU_PREF_DISABLE (1ULL << 37) |
123 |
++#define MSR_IA32_MISC_ENABLE_TURBO_DISABLE (1ULL << 38) |
124 |
++#define MSR_IA32_MISC_ENABLE_IP_PREF_DISABLE (1ULL << 39) |
125 |
++ |
126 |
+ /* Intel Model 6 */ |
127 |
+ #define MSR_P6_EVNTSEL0 0x00000186 |
128 |
+ #define MSR_P6_EVNTSEL1 0x00000187 |
129 |
+diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c |
130 |
+index 57e3fba..d8cfe54 100644 |
131 |
+--- a/arch/x86/kernel/cpu/intel.c |
132 |
++++ b/arch/x86/kernel/cpu/intel.c |
133 |
+@@ -30,6 +30,19 @@ |
134 |
+ |
135 |
+ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) |
136 |
+ { |
137 |
++ /* Unmask CPUID levels if masked: */ |
138 |
++ if (c->x86 == 6 && c->x86_model >= 15) { |
139 |
++ u64 misc_enable; |
140 |
++ |
141 |
++ rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
142 |
++ |
143 |
++ if (misc_enable & MSR_IA32_MISC_ENABLE_LIMIT_CPUID) { |
144 |
++ misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID; |
145 |
++ wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
146 |
++ c->cpuid_level = cpuid_eax(0); |
147 |
++ } |
148 |
++ } |
149 |
++ |
150 |
+ if ((c->x86 == 0xf && c->x86_model >= 0x03) || |
151 |
+ (c->x86 == 0x6 && c->x86_model >= 0x0e)) |
152 |
+ set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); |
153 |
+diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c |
154 |
+index c11936e..458532d 100644 |
155 |
+--- a/drivers/ata/ata_piix.c |
156 |
++++ b/drivers/ata/ata_piix.c |
157 |
+@@ -1294,6 +1294,39 @@ static const int *__devinit piix_init_sata_map(struct pci_dev *pdev, |
158 |
+ return map; |
159 |
+ } |
160 |
+ |
161 |
++static bool piix_no_sidpr(struct ata_host *host) |
162 |
++{ |
163 |
++ struct pci_dev *pdev = to_pci_dev(host->dev); |
164 |
++ |
165 |
++ /* |
166 |
++ * Samsung DB-P70 only has three ATA ports exposed and |
167 |
++ * curiously the unconnected first port reports link online |
168 |
++ * while not responding to SRST protocol causing excessive |
169 |
++ * detection delay. |
170 |
++ * |
171 |
++ * Unfortunately, the system doesn't carry enough DMI |
172 |
++ * information to identify the machine but does have subsystem |
173 |
++ * vendor and device set. As it's unclear whether the |
174 |
++ * subsystem vendor/device is used only for this specific |
175 |
++ * board, the port can't be disabled solely with the |
176 |
++ * information; however, turning off SIDPR access works around |
177 |
++ * the problem. Turn it off. |
178 |
++ * |
179 |
++ * This problem is reported in bnc#441240. |
180 |
++ * |
181 |
++ * https://bugzilla.novell.com/show_bug.cgi?id=441420 |
182 |
++ */ |
183 |
++ if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x2920 && |
184 |
++ pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG && |
185 |
++ pdev->subsystem_device == 0xb049) { |
186 |
++ dev_printk(KERN_WARNING, host->dev, |
187 |
++ "Samsung DB-P70 detected, disabling SIDPR\n"); |
188 |
++ return true; |
189 |
++ } |
190 |
++ |
191 |
++ return false; |
192 |
++} |
193 |
++ |
194 |
+ static int __devinit piix_init_sidpr(struct ata_host *host) |
195 |
+ { |
196 |
+ struct pci_dev *pdev = to_pci_dev(host->dev); |
197 |
+@@ -1307,6 +1340,10 @@ static int __devinit piix_init_sidpr(struct ata_host *host) |
198 |
+ if (hpriv->map[i] == IDE) |
199 |
+ return 0; |
200 |
+ |
201 |
++ /* is it blacklisted? */ |
202 |
++ if (piix_no_sidpr(host)) |
203 |
++ return 0; |
204 |
++ |
205 |
+ if (!(host->ports[0]->flags & PIIX_FLAG_SIDPR)) |
206 |
+ return 0; |
207 |
+ |
208 |
+diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c |
209 |
+index 1e787f8..e2f5d23 100644 |
210 |
+--- a/drivers/gpu/drm/drm_irq.c |
211 |
++++ b/drivers/gpu/drm/drm_irq.c |
212 |
+@@ -259,7 +259,8 @@ EXPORT_SYMBOL(drm_irq_install); |
213 |
+ */ |
214 |
+ int drm_irq_uninstall(struct drm_device * dev) |
215 |
+ { |
216 |
+- int irq_enabled; |
217 |
++ unsigned long irqflags; |
218 |
++ int irq_enabled, i; |
219 |
+ |
220 |
+ if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) |
221 |
+ return -EINVAL; |
222 |
+@@ -269,6 +270,16 @@ int drm_irq_uninstall(struct drm_device * dev) |
223 |
+ dev->irq_enabled = 0; |
224 |
+ mutex_unlock(&dev->struct_mutex); |
225 |
+ |
226 |
++ /* |
227 |
++ * Wake up any waiters so they don't hang. |
228 |
++ */ |
229 |
++ spin_lock_irqsave(&dev->vbl_lock, irqflags); |
230 |
++ for (i = 0; i < dev->num_crtcs; i++) { |
231 |
++ DRM_WAKEUP(&dev->vbl_queue[i]); |
232 |
++ dev->vblank_enabled[i] = 0; |
233 |
++ } |
234 |
++ spin_unlock_irqrestore(&dev->vbl_lock, irqflags); |
235 |
++ |
236 |
+ if (!irq_enabled) |
237 |
+ return -EINVAL; |
238 |
+ |
239 |
+@@ -617,8 +628,9 @@ int drm_wait_vblank(struct drm_device *dev, void *data, |
240 |
+ DRM_DEBUG("waiting on vblank count %d, crtc %d\n", |
241 |
+ vblwait->request.sequence, crtc); |
242 |
+ DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ, |
243 |
+- ((drm_vblank_count(dev, crtc) |
244 |
+- - vblwait->request.sequence) <= (1 << 23))); |
245 |
++ (((drm_vblank_count(dev, crtc) - |
246 |
++ vblwait->request.sequence) <= (1 << 23)) || |
247 |
++ !dev->irq_enabled)); |
248 |
+ |
249 |
+ if (ret != -EINTR) { |
250 |
+ struct timeval now; |
251 |
+diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c |
252 |
+index 24fe8c1..7247824 100644 |
253 |
+--- a/drivers/gpu/drm/i915/i915_gem.c |
254 |
++++ b/drivers/gpu/drm/i915/i915_gem.c |
255 |
+@@ -1161,6 +1161,8 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment) |
256 |
+ struct drm_mm_node *free_space; |
257 |
+ int page_count, ret; |
258 |
+ |
259 |
++ if (dev_priv->mm.suspended) |
260 |
++ return -EBUSY; |
261 |
+ if (alignment == 0) |
262 |
+ alignment = PAGE_SIZE; |
263 |
+ if (alignment & (PAGE_SIZE - 1)) { |
264 |
+@@ -2029,13 +2031,15 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, |
265 |
+ |
266 |
+ /* error other than GTT full, or we've already tried again */ |
267 |
+ if (ret != -ENOMEM || pin_tries >= 1) { |
268 |
+- DRM_ERROR("Failed to pin buffers %d\n", ret); |
269 |
++ if (ret != -ERESTARTSYS) |
270 |
++ DRM_ERROR("Failed to pin buffers %d\n", ret); |
271 |
+ goto err; |
272 |
+ } |
273 |
+ |
274 |
+ /* unpin all of our buffers */ |
275 |
+ for (i = 0; i < pinned; i++) |
276 |
+ i915_gem_object_unpin(object_list[i]); |
277 |
++ pinned = 0; |
278 |
+ |
279 |
+ /* evict everyone we can from the aperture */ |
280 |
+ ret = i915_gem_evict_everything(dev); |
281 |
+@@ -2178,7 +2182,8 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment) |
282 |
+ if (obj_priv->gtt_space == NULL) { |
283 |
+ ret = i915_gem_object_bind_to_gtt(obj, alignment); |
284 |
+ if (ret != 0) { |
285 |
+- DRM_ERROR("Failure to bind: %d", ret); |
286 |
++ if (ret != -EBUSY && ret != -ERESTARTSYS) |
287 |
++ DRM_ERROR("Failure to bind: %d", ret); |
288 |
+ return ret; |
289 |
+ } |
290 |
+ } |
291 |
+@@ -2700,20 +2705,21 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data, |
292 |
+ dev_priv->mm.wedged = 0; |
293 |
+ } |
294 |
+ |
295 |
+- ret = i915_gem_init_ringbuffer(dev); |
296 |
+- if (ret != 0) |
297 |
+- return ret; |
298 |
+- |
299 |
+ dev_priv->mm.gtt_mapping = io_mapping_create_wc(dev->agp->base, |
300 |
+ dev->agp->agp_info.aper_size |
301 |
+ * 1024 * 1024); |
302 |
+ |
303 |
+ mutex_lock(&dev->struct_mutex); |
304 |
++ dev_priv->mm.suspended = 0; |
305 |
++ |
306 |
++ ret = i915_gem_init_ringbuffer(dev); |
307 |
++ if (ret != 0) |
308 |
++ return ret; |
309 |
++ |
310 |
+ BUG_ON(!list_empty(&dev_priv->mm.active_list)); |
311 |
+ BUG_ON(!list_empty(&dev_priv->mm.flushing_list)); |
312 |
+ BUG_ON(!list_empty(&dev_priv->mm.inactive_list)); |
313 |
+ BUG_ON(!list_empty(&dev_priv->mm.request_list)); |
314 |
+- dev_priv->mm.suspended = 0; |
315 |
+ mutex_unlock(&dev->struct_mutex); |
316 |
+ |
317 |
+ drm_irq_install(dev); |
318 |
+diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c |
319 |
+index 69b9a42..81ac2bd 100644 |
320 |
+--- a/drivers/gpu/drm/i915/i915_irq.c |
321 |
++++ b/drivers/gpu/drm/i915/i915_irq.c |
322 |
+@@ -400,6 +400,12 @@ int i915_enable_vblank(struct drm_device *dev, int pipe) |
323 |
+ { |
324 |
+ drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
325 |
+ unsigned long irqflags; |
326 |
++ int pipeconf_reg = (pipe == 0) ? PIPEACONF : PIPEBCONF; |
327 |
++ u32 pipeconf; |
328 |
++ |
329 |
++ pipeconf = I915_READ(pipeconf_reg); |
330 |
++ if (!(pipeconf & PIPEACONF_ENABLE)) |
331 |
++ return -EINVAL; |
332 |
+ |
333 |
+ spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); |
334 |
+ if (IS_I965G(dev)) |
335 |
+diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c |
336 |
+index ce26c84..51047d3 100644 |
337 |
+--- a/drivers/md/dm-crypt.c |
338 |
++++ b/drivers/md/dm-crypt.c |
339 |
+@@ -60,6 +60,7 @@ struct dm_crypt_io { |
340 |
+ }; |
341 |
+ |
342 |
+ struct dm_crypt_request { |
343 |
++ struct convert_context *ctx; |
344 |
+ struct scatterlist sg_in; |
345 |
+ struct scatterlist sg_out; |
346 |
+ }; |
347 |
+@@ -335,6 +336,18 @@ static void crypt_convert_init(struct crypt_config *cc, |
348 |
+ init_completion(&ctx->restart); |
349 |
+ } |
350 |
+ |
351 |
++static struct dm_crypt_request *dmreq_of_req(struct crypt_config *cc, |
352 |
++ struct ablkcipher_request *req) |
353 |
++{ |
354 |
++ return (struct dm_crypt_request *)((char *)req + cc->dmreq_start); |
355 |
++} |
356 |
++ |
357 |
++static struct ablkcipher_request *req_of_dmreq(struct crypt_config *cc, |
358 |
++ struct dm_crypt_request *dmreq) |
359 |
++{ |
360 |
++ return (struct ablkcipher_request *)((char *)dmreq - cc->dmreq_start); |
361 |
++} |
362 |
++ |
363 |
+ static int crypt_convert_block(struct crypt_config *cc, |
364 |
+ struct convert_context *ctx, |
365 |
+ struct ablkcipher_request *req) |
366 |
+@@ -345,10 +358,11 @@ static int crypt_convert_block(struct crypt_config *cc, |
367 |
+ u8 *iv; |
368 |
+ int r = 0; |
369 |
+ |
370 |
+- dmreq = (struct dm_crypt_request *)((char *)req + cc->dmreq_start); |
371 |
++ dmreq = dmreq_of_req(cc, req); |
372 |
+ iv = (u8 *)ALIGN((unsigned long)(dmreq + 1), |
373 |
+ crypto_ablkcipher_alignmask(cc->tfm) + 1); |
374 |
+ |
375 |
++ dmreq->ctx = ctx; |
376 |
+ sg_init_table(&dmreq->sg_in, 1); |
377 |
+ sg_set_page(&dmreq->sg_in, bv_in->bv_page, 1 << SECTOR_SHIFT, |
378 |
+ bv_in->bv_offset + ctx->offset_in); |
379 |
+@@ -395,8 +409,9 @@ static void crypt_alloc_req(struct crypt_config *cc, |
380 |
+ cc->req = mempool_alloc(cc->req_pool, GFP_NOIO); |
381 |
+ ablkcipher_request_set_tfm(cc->req, cc->tfm); |
382 |
+ ablkcipher_request_set_callback(cc->req, CRYPTO_TFM_REQ_MAY_BACKLOG | |
383 |
+- CRYPTO_TFM_REQ_MAY_SLEEP, |
384 |
+- kcryptd_async_done, ctx); |
385 |
++ CRYPTO_TFM_REQ_MAY_SLEEP, |
386 |
++ kcryptd_async_done, |
387 |
++ dmreq_of_req(cc, cc->req)); |
388 |
+ } |
389 |
+ |
390 |
+ /* |
391 |
+@@ -553,19 +568,22 @@ static void crypt_inc_pending(struct dm_crypt_io *io) |
392 |
+ static void crypt_dec_pending(struct dm_crypt_io *io) |
393 |
+ { |
394 |
+ struct crypt_config *cc = io->target->private; |
395 |
++ struct bio *base_bio = io->base_bio; |
396 |
++ struct dm_crypt_io *base_io = io->base_io; |
397 |
++ int error = io->error; |
398 |
+ |
399 |
+ if (!atomic_dec_and_test(&io->pending)) |
400 |
+ return; |
401 |
+ |
402 |
+- if (likely(!io->base_io)) |
403 |
+- bio_endio(io->base_bio, io->error); |
404 |
++ mempool_free(io, cc->io_pool); |
405 |
++ |
406 |
++ if (likely(!base_io)) |
407 |
++ bio_endio(base_bio, error); |
408 |
+ else { |
409 |
+- if (io->error && !io->base_io->error) |
410 |
+- io->base_io->error = io->error; |
411 |
+- crypt_dec_pending(io->base_io); |
412 |
++ if (error && !base_io->error) |
413 |
++ base_io->error = error; |
414 |
++ crypt_dec_pending(base_io); |
415 |
+ } |
416 |
+- |
417 |
+- mempool_free(io, cc->io_pool); |
418 |
+ } |
419 |
+ |
420 |
+ /* |
421 |
+@@ -821,7 +839,8 @@ static void kcryptd_crypt_read_convert(struct dm_crypt_io *io) |
422 |
+ static void kcryptd_async_done(struct crypto_async_request *async_req, |
423 |
+ int error) |
424 |
+ { |
425 |
+- struct convert_context *ctx = async_req->data; |
426 |
++ struct dm_crypt_request *dmreq = async_req->data; |
427 |
++ struct convert_context *ctx = dmreq->ctx; |
428 |
+ struct dm_crypt_io *io = container_of(ctx, struct dm_crypt_io, ctx); |
429 |
+ struct crypt_config *cc = io->target->private; |
430 |
+ |
431 |
+@@ -830,7 +849,7 @@ static void kcryptd_async_done(struct crypto_async_request *async_req, |
432 |
+ return; |
433 |
+ } |
434 |
+ |
435 |
+- mempool_free(ablkcipher_request_cast(async_req), cc->req_pool); |
436 |
++ mempool_free(req_of_dmreq(cc, dmreq), cc->req_pool); |
437 |
+ |
438 |
+ if (!atomic_dec_and_test(&ctx->pending)) |
439 |
+ return; |
440 |
+diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c |
441 |
+index 2fd6d44..657e1dd 100644 |
442 |
+--- a/drivers/md/dm-io.c |
443 |
++++ b/drivers/md/dm-io.c |
444 |
+@@ -292,6 +292,8 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where, |
445 |
+ (PAGE_SIZE >> SECTOR_SHIFT)); |
446 |
+ num_bvecs = 1 + min_t(int, bio_get_nr_vecs(where->bdev), |
447 |
+ num_bvecs); |
448 |
++ if (unlikely(num_bvecs > BIO_MAX_PAGES)) |
449 |
++ num_bvecs = BIO_MAX_PAGES; |
450 |
+ bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios); |
451 |
+ bio->bi_sector = where->sector + (where->count - remaining); |
452 |
+ bio->bi_bdev = where->bdev; |
453 |
+diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c |
454 |
+index 777c948..c4819b6 100644 |
455 |
+--- a/drivers/md/dm-ioctl.c |
456 |
++++ b/drivers/md/dm-ioctl.c |
457 |
+@@ -704,7 +704,8 @@ static int dev_rename(struct dm_ioctl *param, size_t param_size) |
458 |
+ char *new_name = (char *) param + param->data_start; |
459 |
+ |
460 |
+ if (new_name < param->data || |
461 |
+- invalid_str(new_name, (void *) param + param_size)) { |
462 |
++ invalid_str(new_name, (void *) param + param_size) || |
463 |
++ strlen(new_name) > DM_NAME_LEN - 1) { |
464 |
+ DMWARN("Invalid new logical volume name supplied."); |
465 |
+ return -EINVAL; |
466 |
+ } |
467 |
+diff --git a/drivers/md/dm.c b/drivers/md/dm.c |
468 |
+index c99e472..b798bd3 100644 |
469 |
+--- a/drivers/md/dm.c |
470 |
++++ b/drivers/md/dm.c |
471 |
+@@ -480,9 +480,12 @@ static int __noflush_suspending(struct mapped_device *md) |
472 |
+ static void dec_pending(struct dm_io *io, int error) |
473 |
+ { |
474 |
+ unsigned long flags; |
475 |
++ int io_error; |
476 |
++ struct bio *bio; |
477 |
++ struct mapped_device *md = io->md; |
478 |
+ |
479 |
+ /* Push-back supersedes any I/O errors */ |
480 |
+- if (error && !(io->error > 0 && __noflush_suspending(io->md))) |
481 |
++ if (error && !(io->error > 0 && __noflush_suspending(md))) |
482 |
+ io->error = error; |
483 |
+ |
484 |
+ if (atomic_dec_and_test(&io->io_count)) { |
485 |
+@@ -492,25 +495,28 @@ static void dec_pending(struct dm_io *io, int error) |
486 |
+ * This must be handled before the sleeper on |
487 |
+ * suspend queue merges the pushback list. |
488 |
+ */ |
489 |
+- spin_lock_irqsave(&io->md->pushback_lock, flags); |
490 |
+- if (__noflush_suspending(io->md)) |
491 |
+- bio_list_add(&io->md->pushback, io->bio); |
492 |
++ spin_lock_irqsave(&md->pushback_lock, flags); |
493 |
++ if (__noflush_suspending(md)) |
494 |
++ bio_list_add(&md->pushback, io->bio); |
495 |
+ else |
496 |
+ /* noflush suspend was interrupted. */ |
497 |
+ io->error = -EIO; |
498 |
+- spin_unlock_irqrestore(&io->md->pushback_lock, flags); |
499 |
++ spin_unlock_irqrestore(&md->pushback_lock, flags); |
500 |
+ } |
501 |
+ |
502 |
+ end_io_acct(io); |
503 |
+ |
504 |
+- if (io->error != DM_ENDIO_REQUEUE) { |
505 |
+- blk_add_trace_bio(io->md->queue, io->bio, |
506 |
++ io_error = io->error; |
507 |
++ bio = io->bio; |
508 |
++ |
509 |
++ free_io(md, io); |
510 |
++ |
511 |
++ if (io_error != DM_ENDIO_REQUEUE) { |
512 |
++ blk_add_trace_bio(md->queue, io->bio, |
513 |
+ BLK_TA_COMPLETE); |
514 |
+ |
515 |
+- bio_endio(io->bio, io->error); |
516 |
++ bio_endio(bio, io_error); |
517 |
+ } |
518 |
+- |
519 |
+- free_io(io->md, io); |
520 |
+ } |
521 |
+ } |
522 |
+ |
523 |
+@@ -518,6 +524,7 @@ static void clone_endio(struct bio *bio, int error) |
524 |
+ { |
525 |
+ int r = 0; |
526 |
+ struct dm_target_io *tio = bio->bi_private; |
527 |
++ struct dm_io *io = tio->io; |
528 |
+ struct mapped_device *md = tio->io->md; |
529 |
+ dm_endio_fn endio = tio->ti->type->end_io; |
530 |
+ |
531 |
+@@ -541,15 +548,14 @@ static void clone_endio(struct bio *bio, int error) |
532 |
+ } |
533 |
+ } |
534 |
+ |
535 |
+- dec_pending(tio->io, error); |
536 |
+- |
537 |
+ /* |
538 |
+ * Store md for cleanup instead of tio which is about to get freed. |
539 |
+ */ |
540 |
+ bio->bi_private = md->bs; |
541 |
+ |
542 |
+- bio_put(bio); |
543 |
+ free_tio(md, tio); |
544 |
++ bio_put(bio); |
545 |
++ dec_pending(io, error); |
546 |
+ } |
547 |
+ |
548 |
+ static sector_t max_io_len(struct mapped_device *md, |
549 |
+diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c |
550 |
+index 00831f3..c388579 100644 |
551 |
+--- a/drivers/media/video/cx23885/cx23885-417.c |
552 |
++++ b/drivers/media/video/cx23885/cx23885-417.c |
553 |
+@@ -1585,7 +1585,8 @@ static int mpeg_open(struct inode *inode, struct file *file) |
554 |
+ lock_kernel(); |
555 |
+ list_for_each(list, &cx23885_devlist) { |
556 |
+ h = list_entry(list, struct cx23885_dev, devlist); |
557 |
+- if (h->v4l_device->minor == minor) { |
558 |
++ if (h->v4l_device && |
559 |
++ h->v4l_device->minor == minor) { |
560 |
+ dev = h; |
561 |
+ break; |
562 |
+ } |
563 |
+diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c |
564 |
+index c742a10..0aabc53 100644 |
565 |
+--- a/drivers/media/video/cx23885/cx23885-video.c |
566 |
++++ b/drivers/media/video/cx23885/cx23885-video.c |
567 |
+@@ -730,12 +730,13 @@ static int video_open(struct inode *inode, struct file *file) |
568 |
+ lock_kernel(); |
569 |
+ list_for_each(list, &cx23885_devlist) { |
570 |
+ h = list_entry(list, struct cx23885_dev, devlist); |
571 |
+- if (h->video_dev->minor == minor) { |
572 |
++ if (h->video_dev && |
573 |
++ h->video_dev->minor == minor) { |
574 |
+ dev = h; |
575 |
+ type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
576 |
+ } |
577 |
+ if (h->vbi_dev && |
578 |
+- h->vbi_dev->minor == minor) { |
579 |
++ h->vbi_dev->minor == minor) { |
580 |
+ dev = h; |
581 |
+ type = V4L2_BUF_TYPE_VBI_CAPTURE; |
582 |
+ } |
583 |
+diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c |
584 |
+index 899766e..36b88e7 100644 |
585 |
+--- a/drivers/misc/thinkpad_acpi.c |
586 |
++++ b/drivers/misc/thinkpad_acpi.c |
587 |
+@@ -6927,7 +6927,7 @@ MODULE_ALIAS(TPACPI_DRVR_SHORTNAME); |
588 |
+ * if it is not there yet. |
589 |
+ */ |
590 |
+ #define IBM_BIOS_MODULE_ALIAS(__type) \ |
591 |
+- MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW") |
592 |
++ MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW*") |
593 |
+ |
594 |
+ /* Non-ancient thinkpads */ |
595 |
+ MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); |
596 |
+@@ -6936,9 +6936,9 @@ MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*"); |
597 |
+ /* Ancient thinkpad BIOSes have to be identified by |
598 |
+ * BIOS type or model number, and there are far less |
599 |
+ * BIOS types than model numbers... */ |
600 |
+-IBM_BIOS_MODULE_ALIAS("I[B,D,H,I,M,N,O,T,W,V,Y,Z]"); |
601 |
+-IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]"); |
602 |
+-IBM_BIOS_MODULE_ALIAS("K[U,X-Z]"); |
603 |
++IBM_BIOS_MODULE_ALIAS("I[BDHIMNOTWVYZ]"); |
604 |
++IBM_BIOS_MODULE_ALIAS("1[0368A-GIKM-PST]"); |
605 |
++IBM_BIOS_MODULE_ALIAS("K[UX-Z]"); |
606 |
+ |
607 |
+ MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); |
608 |
+ MODULE_DESCRIPTION(TPACPI_DESC); |
609 |
+diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c |
610 |
+index 43a863c..aeb188a 100644 |
611 |
+--- a/drivers/usb/class/usbtmc.c |
612 |
++++ b/drivers/usb/class/usbtmc.c |
613 |
+@@ -49,6 +49,7 @@ |
614 |
+ |
615 |
+ static struct usb_device_id usbtmc_devices[] = { |
616 |
+ { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), }, |
617 |
++ { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 1), }, |
618 |
+ { 0, } /* terminating entry */ |
619 |
+ }; |
620 |
+ MODULE_DEVICE_TABLE(usb, usbtmc_devices); |
621 |
+@@ -105,12 +106,13 @@ static int usbtmc_open(struct inode *inode, struct file *filp) |
622 |
+ { |
623 |
+ struct usb_interface *intf; |
624 |
+ struct usbtmc_device_data *data; |
625 |
+- int retval = -ENODEV; |
626 |
++ int retval = 0; |
627 |
+ |
628 |
+ intf = usb_find_interface(&usbtmc_driver, iminor(inode)); |
629 |
+ if (!intf) { |
630 |
+ printk(KERN_ERR KBUILD_MODNAME |
631 |
+ ": can not find device for minor %d", iminor(inode)); |
632 |
++ retval = -ENODEV; |
633 |
+ goto exit; |
634 |
+ } |
635 |
+ |
636 |
+diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c |
637 |
+index c7e5339..7d6611a 100644 |
638 |
+--- a/drivers/usb/core/devio.c |
639 |
++++ b/drivers/usb/core/devio.c |
640 |
+@@ -359,11 +359,6 @@ static void destroy_async(struct dev_state *ps, struct list_head *list) |
641 |
+ spin_lock_irqsave(&ps->lock, flags); |
642 |
+ } |
643 |
+ spin_unlock_irqrestore(&ps->lock, flags); |
644 |
+- as = async_getcompleted(ps); |
645 |
+- while (as) { |
646 |
+- free_async(as); |
647 |
+- as = async_getcompleted(ps); |
648 |
+- } |
649 |
+ } |
650 |
+ |
651 |
+ static void destroy_async_on_interface(struct dev_state *ps, |
652 |
+@@ -642,6 +637,7 @@ static int usbdev_release(struct inode *inode, struct file *file) |
653 |
+ struct dev_state *ps = file->private_data; |
654 |
+ struct usb_device *dev = ps->dev; |
655 |
+ unsigned int ifnum; |
656 |
++ struct async *as; |
657 |
+ |
658 |
+ usb_lock_device(dev); |
659 |
+ |
660 |
+@@ -660,6 +656,12 @@ static int usbdev_release(struct inode *inode, struct file *file) |
661 |
+ usb_unlock_device(dev); |
662 |
+ usb_put_dev(dev); |
663 |
+ put_pid(ps->disc_pid); |
664 |
++ |
665 |
++ as = async_getcompleted(ps); |
666 |
++ while (as) { |
667 |
++ free_async(as); |
668 |
++ as = async_getcompleted(ps); |
669 |
++ } |
670 |
+ kfree(ps); |
671 |
+ return 0; |
672 |
+ } |
673 |
+diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c |
674 |
+index 3712b92..ecc9b66 100644 |
675 |
+--- a/drivers/usb/host/ehci-q.c |
676 |
++++ b/drivers/usb/host/ehci-q.c |
677 |
+@@ -1095,7 +1095,8 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) |
678 |
+ prev->qh_next = qh->qh_next; |
679 |
+ wmb (); |
680 |
+ |
681 |
+- if (unlikely (ehci_to_hcd(ehci)->state == HC_STATE_HALT)) { |
682 |
++ /* If the controller isn't running, we don't have to wait for it */ |
683 |
++ if (unlikely(!HC_IS_RUNNING(ehci_to_hcd(ehci)->state))) { |
684 |
+ /* if (unlikely (qh->reclaim != 0)) |
685 |
+ * this will recurse, probably not much |
686 |
+ */ |
687 |
+diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c |
688 |
+index 07bcb93..1d0b49e 100644 |
689 |
+--- a/drivers/usb/host/ehci-sched.c |
690 |
++++ b/drivers/usb/host/ehci-sched.c |
691 |
+@@ -1536,7 +1536,7 @@ itd_link_urb ( |
692 |
+ struct ehci_itd, itd_list); |
693 |
+ list_move_tail (&itd->itd_list, &stream->td_list); |
694 |
+ itd->stream = iso_stream_get (stream); |
695 |
+- itd->urb = usb_get_urb (urb); |
696 |
++ itd->urb = urb; |
697 |
+ itd_init (ehci, stream, itd); |
698 |
+ } |
699 |
+ |
700 |
+@@ -1645,7 +1645,7 @@ itd_complete ( |
701 |
+ (void) disable_periodic(ehci); |
702 |
+ ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; |
703 |
+ |
704 |
+- if (unlikely (list_empty (&stream->td_list))) { |
705 |
++ if (unlikely(list_is_singular(&stream->td_list))) { |
706 |
+ ehci_to_hcd(ehci)->self.bandwidth_allocated |
707 |
+ -= stream->bandwidth; |
708 |
+ ehci_vdbg (ehci, |
709 |
+@@ -1656,7 +1656,6 @@ itd_complete ( |
710 |
+ iso_stream_put (ehci, stream); |
711 |
+ |
712 |
+ done: |
713 |
+- usb_put_urb(urb); |
714 |
+ itd->urb = NULL; |
715 |
+ if (ehci->clock_frame != itd->frame || itd->index[7] != -1) { |
716 |
+ /* OK to recycle this ITD now. */ |
717 |
+@@ -1949,7 +1948,7 @@ sitd_link_urb ( |
718 |
+ struct ehci_sitd, sitd_list); |
719 |
+ list_move_tail (&sitd->sitd_list, &stream->td_list); |
720 |
+ sitd->stream = iso_stream_get (stream); |
721 |
+- sitd->urb = usb_get_urb (urb); |
722 |
++ sitd->urb = urb; |
723 |
+ |
724 |
+ sitd_patch(ehci, stream, sitd, sched, packet); |
725 |
+ sitd_link (ehci, (next_uframe >> 3) % ehci->periodic_size, |
726 |
+@@ -2034,7 +2033,7 @@ sitd_complete ( |
727 |
+ (void) disable_periodic(ehci); |
728 |
+ ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; |
729 |
+ |
730 |
+- if (list_empty (&stream->td_list)) { |
731 |
++ if (list_is_singular(&stream->td_list)) { |
732 |
+ ehci_to_hcd(ehci)->self.bandwidth_allocated |
733 |
+ -= stream->bandwidth; |
734 |
+ ehci_vdbg (ehci, |
735 |
+@@ -2045,7 +2044,6 @@ sitd_complete ( |
736 |
+ iso_stream_put (ehci, stream); |
737 |
+ /* OK to recycle this SITD now that its completion callback ran. */ |
738 |
+ done: |
739 |
+- usb_put_urb(urb); |
740 |
+ sitd->urb = NULL; |
741 |
+ sitd->stream = NULL; |
742 |
+ list_move(&sitd->sitd_list, &stream->free_list); |
743 |
+diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c |
744 |
+index cfaf1f0..4294e6e 100644 |
745 |
+--- a/drivers/usb/serial/cp2101.c |
746 |
++++ b/drivers/usb/serial/cp2101.c |
747 |
+@@ -79,6 +79,7 @@ static struct usb_device_id id_table [] = { |
748 |
+ { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ |
749 |
+ { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ |
750 |
+ { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ |
751 |
++ { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */ |
752 |
+ { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */ |
753 |
+ { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */ |
754 |
+ { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ |
755 |
+diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c |
756 |
+index fb6f293..aa21adb 100644 |
757 |
+--- a/drivers/usb/serial/ftdi_sio.c |
758 |
++++ b/drivers/usb/serial/ftdi_sio.c |
759 |
+@@ -660,6 +660,11 @@ static struct usb_device_id id_table_combined [] = { |
760 |
+ { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, |
761 |
+ { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, |
762 |
+ { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, |
763 |
++ { USB_DEVICE(ATMEL_VID, STK541_PID) }, |
764 |
++ { USB_DEVICE(DE_VID, STB_PID) }, |
765 |
++ { USB_DEVICE(DE_VID, WHT_PID) }, |
766 |
++ { USB_DEVICE(ADI_VID, ADI_GNICE_PID), |
767 |
++ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
768 |
+ { }, /* Optional parameter entry */ |
769 |
+ { } /* Terminating entry */ |
770 |
+ }; |
771 |
+diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h |
772 |
+index 373ee09..171a97c 100644 |
773 |
+--- a/drivers/usb/serial/ftdi_sio.h |
774 |
++++ b/drivers/usb/serial/ftdi_sio.h |
775 |
+@@ -881,6 +881,26 @@ |
776 |
+ #define RATOC_PRODUCT_ID_USB60F 0xb020 |
777 |
+ |
778 |
+ /* |
779 |
++ * Atmel STK541 |
780 |
++ */ |
781 |
++#define ATMEL_VID 0x03eb /* Vendor ID */ |
782 |
++#define STK541_PID 0x2109 /* Zigbee Controller */ |
783 |
++ |
784 |
++/* |
785 |
++ * Dresden Elektronic Sensor Terminal Board |
786 |
++ */ |
787 |
++#define DE_VID 0x1cf1 /* Vendor ID */ |
788 |
++#define STB_PID 0x0001 /* Sensor Terminal Board */ |
789 |
++#define WHT_PID 0x0004 /* Wireless Handheld Terminal */ |
790 |
++ |
791 |
++/* |
792 |
++ * Blackfin gnICE JTAG |
793 |
++ * http://docs.blackfin.uclinux.org/doku.php?id=hw:jtag:gnice |
794 |
++ */ |
795 |
++#define ADI_VID 0x0456 |
796 |
++#define ADI_GNICE_PID 0xF000 |
797 |
++ |
798 |
++/* |
799 |
+ * BmRequestType: 1100 0000b |
800 |
+ * bRequest: FTDI_E2_READ |
801 |
+ * wValue: 0 |
802 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
803 |
+index 5c3da3f..be88c84 100644 |
804 |
+--- a/drivers/usb/serial/option.c |
805 |
++++ b/drivers/usb/serial/option.c |
806 |
+@@ -89,6 +89,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
807 |
+ #define OPTION_PRODUCT_ETNA_MODEM_GT 0x7041 |
808 |
+ #define OPTION_PRODUCT_ETNA_MODEM_EX 0x7061 |
809 |
+ #define OPTION_PRODUCT_ETNA_KOI_MODEM 0x7100 |
810 |
++#define OPTION_PRODUCT_GTM380_MODEM 0x7201 |
811 |
+ |
812 |
+ #define HUAWEI_VENDOR_ID 0x12D1 |
813 |
+ #define HUAWEI_PRODUCT_E600 0x1001 |
814 |
+@@ -190,6 +191,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
815 |
+ /* OVATION PRODUCTS */ |
816 |
+ #define NOVATELWIRELESS_PRODUCT_MC727 0x4100 |
817 |
+ #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 |
818 |
++#define NOVATELWIRELESS_PRODUCT_U727 0x5010 |
819 |
+ |
820 |
+ /* FUTURE NOVATEL PRODUCTS */ |
821 |
+ #define NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED 0X6000 |
822 |
+@@ -281,14 +283,11 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
823 |
+ |
824 |
+ /* ZTE PRODUCTS */ |
825 |
+ #define ZTE_VENDOR_ID 0x19d2 |
826 |
++#define ZTE_PRODUCT_MF622 0x0001 |
827 |
+ #define ZTE_PRODUCT_MF628 0x0015 |
828 |
+ #define ZTE_PRODUCT_MF626 0x0031 |
829 |
+ #define ZTE_PRODUCT_CDMA_TECH 0xfffe |
830 |
+ |
831 |
+-/* Ericsson products */ |
832 |
+-#define ERICSSON_VENDOR_ID 0x0bdb |
833 |
+-#define ERICSSON_PRODUCT_F3507G 0x1900 |
834 |
+- |
835 |
+ #define BENQ_VENDOR_ID 0x04a5 |
836 |
+ #define BENQ_PRODUCT_H10 0x4068 |
837 |
+ |
838 |
+@@ -317,6 +316,7 @@ static struct usb_device_id option_ids[] = { |
839 |
+ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_GT) }, |
840 |
+ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_EX) }, |
841 |
+ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, |
842 |
++ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTM380_MODEM) }, |
843 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, |
844 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
845 |
+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
846 |
+@@ -402,6 +402,7 @@ static struct usb_device_id option_ids[] = { |
847 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ |
848 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ |
849 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ |
850 |
++ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */ |
851 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED) }, /* Novatel EVDO product */ |
852 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */ |
853 |
+ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */ |
854 |
+@@ -429,7 +430,6 @@ static struct usb_device_id option_ids[] = { |
855 |
+ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_CINGULAR) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ |
856 |
+ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_L) }, /* Dell Wireless HSDPA 5520 */ |
857 |
+ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_I) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ |
858 |
+- { USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */ |
859 |
+ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
860 |
+ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
861 |
+ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
862 |
+@@ -497,10 +497,10 @@ static struct usb_device_id option_ids[] = { |
863 |
+ { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ |
864 |
+ { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ |
865 |
+ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, |
866 |
++ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622) }, |
867 |
+ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626) }, |
868 |
+ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, |
869 |
+ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, |
870 |
+- { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G) }, |
871 |
+ { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, |
872 |
+ { USB_DEVICE(0x1da5, 0x4515) }, /* BenQ H20 */ |
873 |
+ { } /* Terminating entry */ |
874 |
+diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h |
875 |
+index 781d581..f89549f 100644 |
876 |
+--- a/drivers/usb/storage/unusual_devs.h |
877 |
++++ b/drivers/usb/storage/unusual_devs.h |
878 |
+@@ -219,7 +219,7 @@ UNUSUAL_DEV( 0x0421, 0x047c, 0x0370, 0x0610, |
879 |
+ US_FL_MAX_SECTORS_64 ), |
880 |
+ |
881 |
+ /* Reported by Manuel Osdoba <manuel.osdoba@××××××××××.de> */ |
882 |
+-UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x0452, |
883 |
++UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x9999, |
884 |
+ "Nokia", |
885 |
+ "Nokia 6233", |
886 |
+ US_SC_DEVICE, US_PR_DEVICE, NULL, |
887 |
+@@ -913,7 +913,9 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, |
888 |
+ US_FL_FIX_CAPACITY ), |
889 |
+ |
890 |
+ /* Reported by Richard -=[]=- <micro_flyer@×××××××.com> */ |
891 |
+-UNUSUAL_DEV( 0x067b, 0x2507, 0x0100, 0x0100, |
892 |
++/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by |
893 |
++ * Thomas Bartosik <tbartdev@×××××××××××.de> */ |
894 |
++UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100, |
895 |
+ "Prolific Technology Inc.", |
896 |
+ "Mass Storage Device", |
897 |
+ US_SC_DEVICE, US_PR_DEVICE, NULL, |
898 |
+@@ -1328,6 +1330,16 @@ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0000, |
899 |
+ US_SC_DEVICE, US_PR_DEVICE, NULL, |
900 |
+ 0 ), |
901 |
+ |
902 |
++/* Reported by Jan Dumon <j.dumon@××××××.com> |
903 |
++ * This device (wrongly) has a vendor-specific device descriptor. |
904 |
++ * The entry is needed so usb-storage can bind to it's mass-storage |
905 |
++ * interface as an interface driver */ |
906 |
++UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000, |
907 |
++ "Option", |
908 |
++ "GI 0431 SD-Card", |
909 |
++ US_SC_DEVICE, US_PR_DEVICE, NULL, |
910 |
++ 0 ), |
911 |
++ |
912 |
+ #ifdef CONFIG_USB_STORAGE_ISD200 |
913 |
+ UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110, |
914 |
+ "ATI", |
915 |
+diff --git a/fs/aio.c b/fs/aio.c |
916 |
+index 048648d..c1174b5 100644 |
917 |
+--- a/fs/aio.c |
918 |
++++ b/fs/aio.c |
919 |
+@@ -428,7 +428,7 @@ static struct kiocb *__aio_get_req(struct kioctx *ctx) |
920 |
+ req->private = NULL; |
921 |
+ req->ki_iovec = NULL; |
922 |
+ INIT_LIST_HEAD(&req->ki_run_list); |
923 |
+- req->ki_eventfd = ERR_PTR(-EINVAL); |
924 |
++ req->ki_eventfd = NULL; |
925 |
+ |
926 |
+ /* Check if the completion queue has enough free space to |
927 |
+ * accept an event from this io. |
928 |
+@@ -470,8 +470,6 @@ static inline void really_put_req(struct kioctx *ctx, struct kiocb *req) |
929 |
+ { |
930 |
+ assert_spin_locked(&ctx->ctx_lock); |
931 |
+ |
932 |
+- if (!IS_ERR(req->ki_eventfd)) |
933 |
+- fput(req->ki_eventfd); |
934 |
+ if (req->ki_dtor) |
935 |
+ req->ki_dtor(req); |
936 |
+ if (req->ki_iovec != &req->ki_inline_vec) |
937 |
+@@ -493,8 +491,11 @@ static void aio_fput_routine(struct work_struct *data) |
938 |
+ list_del(&req->ki_list); |
939 |
+ spin_unlock_irq(&fput_lock); |
940 |
+ |
941 |
+- /* Complete the fput */ |
942 |
+- __fput(req->ki_filp); |
943 |
++ /* Complete the fput(s) */ |
944 |
++ if (req->ki_filp != NULL) |
945 |
++ __fput(req->ki_filp); |
946 |
++ if (req->ki_eventfd != NULL) |
947 |
++ __fput(req->ki_eventfd); |
948 |
+ |
949 |
+ /* Link the iocb into the context's free list */ |
950 |
+ spin_lock_irq(&ctx->ctx_lock); |
951 |
+@@ -512,12 +513,14 @@ static void aio_fput_routine(struct work_struct *data) |
952 |
+ */ |
953 |
+ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) |
954 |
+ { |
955 |
++ int schedule_putreq = 0; |
956 |
++ |
957 |
+ dprintk(KERN_DEBUG "aio_put(%p): f_count=%ld\n", |
958 |
+ req, atomic_long_read(&req->ki_filp->f_count)); |
959 |
+ |
960 |
+ assert_spin_locked(&ctx->ctx_lock); |
961 |
+ |
962 |
+- req->ki_users --; |
963 |
++ req->ki_users--; |
964 |
+ BUG_ON(req->ki_users < 0); |
965 |
+ if (likely(req->ki_users)) |
966 |
+ return 0; |
967 |
+@@ -525,10 +528,23 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) |
968 |
+ req->ki_cancel = NULL; |
969 |
+ req->ki_retry = NULL; |
970 |
+ |
971 |
+- /* Must be done under the lock to serialise against cancellation. |
972 |
+- * Call this aio_fput as it duplicates fput via the fput_work. |
973 |
++ /* |
974 |
++ * Try to optimize the aio and eventfd file* puts, by avoiding to |
975 |
++ * schedule work in case it is not __fput() time. In normal cases, |
976 |
++ * we would not be holding the last reference to the file*, so |
977 |
++ * this function will be executed w/out any aio kthread wakeup. |
978 |
+ */ |
979 |
+- if (unlikely(atomic_long_dec_and_test(&req->ki_filp->f_count))) { |
980 |
++ if (unlikely(atomic_long_dec_and_test(&req->ki_filp->f_count))) |
981 |
++ schedule_putreq++; |
982 |
++ else |
983 |
++ req->ki_filp = NULL; |
984 |
++ if (req->ki_eventfd != NULL) { |
985 |
++ if (unlikely(atomic_long_dec_and_test(&req->ki_eventfd->f_count))) |
986 |
++ schedule_putreq++; |
987 |
++ else |
988 |
++ req->ki_eventfd = NULL; |
989 |
++ } |
990 |
++ if (unlikely(schedule_putreq)) { |
991 |
+ get_ioctx(ctx); |
992 |
+ spin_lock(&fput_lock); |
993 |
+ list_add(&req->ki_list, &fput_head); |
994 |
+@@ -992,7 +1008,7 @@ int aio_complete(struct kiocb *iocb, long res, long res2) |
995 |
+ * eventfd. The eventfd_signal() function is safe to be called |
996 |
+ * from IRQ context. |
997 |
+ */ |
998 |
+- if (!IS_ERR(iocb->ki_eventfd)) |
999 |
++ if (iocb->ki_eventfd != NULL) |
1000 |
+ eventfd_signal(iocb->ki_eventfd, 1); |
1001 |
+ |
1002 |
+ put_rq: |
1003 |
+@@ -1596,6 +1612,7 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, |
1004 |
+ req->ki_eventfd = eventfd_fget((int) iocb->aio_resfd); |
1005 |
+ if (IS_ERR(req->ki_eventfd)) { |
1006 |
+ ret = PTR_ERR(req->ki_eventfd); |
1007 |
++ req->ki_eventfd = NULL; |
1008 |
+ goto out_put_req; |
1009 |
+ } |
1010 |
+ } |
1011 |
+diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c |
1012 |
+index 6046239..50b0a30 100644 |
1013 |
+--- a/fs/ecryptfs/crypto.c |
1014 |
++++ b/fs/ecryptfs/crypto.c |
1015 |
+@@ -1310,14 +1310,13 @@ static int ecryptfs_write_headers_virt(char *page_virt, size_t max, |
1016 |
+ } |
1017 |
+ |
1018 |
+ static int |
1019 |
+-ecryptfs_write_metadata_to_contents(struct ecryptfs_crypt_stat *crypt_stat, |
1020 |
+- struct dentry *ecryptfs_dentry, |
1021 |
+- char *virt) |
1022 |
++ecryptfs_write_metadata_to_contents(struct dentry *ecryptfs_dentry, |
1023 |
++ char *virt, size_t virt_len) |
1024 |
+ { |
1025 |
+ int rc; |
1026 |
+ |
1027 |
+ rc = ecryptfs_write_lower(ecryptfs_dentry->d_inode, virt, |
1028 |
+- 0, crypt_stat->num_header_bytes_at_front); |
1029 |
++ 0, virt_len); |
1030 |
+ if (rc) |
1031 |
+ printk(KERN_ERR "%s: Error attempting to write header " |
1032 |
+ "information to lower file; rc = [%d]\n", __func__, |
1033 |
+@@ -1327,7 +1326,6 @@ ecryptfs_write_metadata_to_contents(struct ecryptfs_crypt_stat *crypt_stat, |
1034 |
+ |
1035 |
+ static int |
1036 |
+ ecryptfs_write_metadata_to_xattr(struct dentry *ecryptfs_dentry, |
1037 |
+- struct ecryptfs_crypt_stat *crypt_stat, |
1038 |
+ char *page_virt, size_t size) |
1039 |
+ { |
1040 |
+ int rc; |
1041 |
+@@ -1337,6 +1335,17 @@ ecryptfs_write_metadata_to_xattr(struct dentry *ecryptfs_dentry, |
1042 |
+ return rc; |
1043 |
+ } |
1044 |
+ |
1045 |
++static unsigned long ecryptfs_get_zeroed_pages(gfp_t gfp_mask, |
1046 |
++ unsigned int order) |
1047 |
++{ |
1048 |
++ struct page *page; |
1049 |
++ |
1050 |
++ page = alloc_pages(gfp_mask | __GFP_ZERO, order); |
1051 |
++ if (page) |
1052 |
++ return (unsigned long) page_address(page); |
1053 |
++ return 0; |
1054 |
++} |
1055 |
++ |
1056 |
+ /** |
1057 |
+ * ecryptfs_write_metadata |
1058 |
+ * @ecryptfs_dentry: The eCryptfs dentry |
1059 |
+@@ -1353,7 +1362,9 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry) |
1060 |
+ { |
1061 |
+ struct ecryptfs_crypt_stat *crypt_stat = |
1062 |
+ &ecryptfs_inode_to_private(ecryptfs_dentry->d_inode)->crypt_stat; |
1063 |
++ unsigned int order; |
1064 |
+ char *virt; |
1065 |
++ size_t virt_len; |
1066 |
+ size_t size = 0; |
1067 |
+ int rc = 0; |
1068 |
+ |
1069 |
+@@ -1369,33 +1380,35 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry) |
1070 |
+ rc = -EINVAL; |
1071 |
+ goto out; |
1072 |
+ } |
1073 |
++ virt_len = crypt_stat->num_header_bytes_at_front; |
1074 |
++ order = get_order(virt_len); |
1075 |
+ /* Released in this function */ |
1076 |
+- virt = (char *)get_zeroed_page(GFP_KERNEL); |
1077 |
++ virt = (char *)ecryptfs_get_zeroed_pages(GFP_KERNEL, order); |
1078 |
+ if (!virt) { |
1079 |
+ printk(KERN_ERR "%s: Out of memory\n", __func__); |
1080 |
+ rc = -ENOMEM; |
1081 |
+ goto out; |
1082 |
+ } |
1083 |
+- rc = ecryptfs_write_headers_virt(virt, PAGE_CACHE_SIZE, &size, |
1084 |
+- crypt_stat, ecryptfs_dentry); |
1085 |
++ rc = ecryptfs_write_headers_virt(virt, virt_len, &size, crypt_stat, |
1086 |
++ ecryptfs_dentry); |
1087 |
+ if (unlikely(rc)) { |
1088 |
+ printk(KERN_ERR "%s: Error whilst writing headers; rc = [%d]\n", |
1089 |
+ __func__, rc); |
1090 |
+ goto out_free; |
1091 |
+ } |
1092 |
+ if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) |
1093 |
+- rc = ecryptfs_write_metadata_to_xattr(ecryptfs_dentry, |
1094 |
+- crypt_stat, virt, size); |
1095 |
++ rc = ecryptfs_write_metadata_to_xattr(ecryptfs_dentry, virt, |
1096 |
++ size); |
1097 |
+ else |
1098 |
+- rc = ecryptfs_write_metadata_to_contents(crypt_stat, |
1099 |
+- ecryptfs_dentry, virt); |
1100 |
++ rc = ecryptfs_write_metadata_to_contents(ecryptfs_dentry, virt, |
1101 |
++ virt_len); |
1102 |
+ if (rc) { |
1103 |
+ printk(KERN_ERR "%s: Error writing metadata out to lower file; " |
1104 |
+ "rc = [%d]\n", __func__, rc); |
1105 |
+ goto out_free; |
1106 |
+ } |
1107 |
+ out_free: |
1108 |
+- free_page((unsigned long)virt); |
1109 |
++ free_pages((unsigned long)virt, order); |
1110 |
+ out: |
1111 |
+ return rc; |
1112 |
+ } |
1113 |
+diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c |
1114 |
+index afcdf4b..cc76b64 100644 |
1115 |
+--- a/fs/nfsd/nfs4xdr.c |
1116 |
++++ b/fs/nfsd/nfs4xdr.c |
1117 |
+@@ -2598,6 +2598,7 @@ static nfsd4_enc nfsd4_enc_ops[] = { |
1118 |
+ [OP_LOOKUPP] = (nfsd4_enc)nfsd4_encode_noop, |
1119 |
+ [OP_NVERIFY] = (nfsd4_enc)nfsd4_encode_noop, |
1120 |
+ [OP_OPEN] = (nfsd4_enc)nfsd4_encode_open, |
1121 |
++ [OP_OPENATTR] = (nfsd4_enc)nfsd4_encode_noop, |
1122 |
+ [OP_OPEN_CONFIRM] = (nfsd4_enc)nfsd4_encode_open_confirm, |
1123 |
+ [OP_OPEN_DOWNGRADE] = (nfsd4_enc)nfsd4_encode_open_downgrade, |
1124 |
+ [OP_PUTFH] = (nfsd4_enc)nfsd4_encode_noop, |
1125 |
+diff --git a/include/linux/capability.h b/include/linux/capability.h |
1126 |
+index 9d1fe30..28863f4 100644 |
1127 |
+--- a/include/linux/capability.h |
1128 |
++++ b/include/linux/capability.h |
1129 |
+@@ -382,8 +382,10 @@ typedef struct kernel_cap_struct { |
1130 |
+ # define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) |
1131 |
+ # define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) |
1132 |
+ # define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) |
1133 |
+-# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ |
1134 |
+- CAP_FS_MASK_B1 } }) |
1135 |
++# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ |
1136 |
++ | CAP_TO_MASK(CAP_SYS_RESOURCE) \ |
1137 |
++ | CAP_TO_MASK(CAP_MKNOD), \ |
1138 |
++ CAP_FS_MASK_B1 } }) |
1139 |
+ |
1140 |
+ #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
1141 |
+ |
1142 |
+diff --git a/init/Kconfig b/init/Kconfig |
1143 |
+index f763762..83b6905 100644 |
1144 |
+--- a/init/Kconfig |
1145 |
++++ b/init/Kconfig |
1146 |
+@@ -538,6 +538,9 @@ config CC_OPTIMIZE_FOR_SIZE |
1147 |
+ config SYSCTL |
1148 |
+ bool |
1149 |
+ |
1150 |
++config ANON_INODES |
1151 |
++ bool |
1152 |
++ |
1153 |
+ menuconfig EMBEDDED |
1154 |
+ bool "Configure standard kernel features (for small systems)" |
1155 |
+ help |
1156 |
+@@ -643,18 +646,6 @@ config PCSPKR_PLATFORM |
1157 |
+ This option allows to disable the internal PC-Speaker |
1158 |
+ support, saving some memory. |
1159 |
+ |
1160 |
+-config COMPAT_BRK |
1161 |
+- bool "Disable heap randomization" |
1162 |
+- default y |
1163 |
+- help |
1164 |
+- Randomizing heap placement makes heap exploits harder, but it |
1165 |
+- also breaks ancient binaries (including anything libc5 based). |
1166 |
+- This option changes the bootup default to heap randomization |
1167 |
+- disabled, and can be overriden runtime by setting |
1168 |
+- /proc/sys/kernel/randomize_va_space to 2. |
1169 |
+- |
1170 |
+- On non-ancient distros (post-2000 ones) N is usually a safe choice. |
1171 |
+- |
1172 |
+ config BASE_FULL |
1173 |
+ default y |
1174 |
+ bool "Enable full-sized data structures for core" if EMBEDDED |
1175 |
+@@ -672,9 +663,6 @@ config FUTEX |
1176 |
+ support for "fast userspace mutexes". The resulting kernel may not |
1177 |
+ run glibc-based applications correctly. |
1178 |
+ |
1179 |
+-config ANON_INODES |
1180 |
+- bool |
1181 |
+- |
1182 |
+ config EPOLL |
1183 |
+ bool "Enable eventpoll support" if EMBEDDED |
1184 |
+ default y |
1185 |
+@@ -760,6 +748,18 @@ config SLUB_DEBUG |
1186 |
+ SLUB sysfs support. /sys/slab will not exist and there will be |
1187 |
+ no support for cache validation etc. |
1188 |
+ |
1189 |
++config COMPAT_BRK |
1190 |
++ bool "Disable heap randomization" |
1191 |
++ default y |
1192 |
++ help |
1193 |
++ Randomizing heap placement makes heap exploits harder, but it |
1194 |
++ also breaks ancient binaries (including anything libc5 based). |
1195 |
++ This option changes the bootup default to heap randomization |
1196 |
++ disabled, and can be overriden runtime by setting |
1197 |
++ /proc/sys/kernel/randomize_va_space to 2. |
1198 |
++ |
1199 |
++ On non-ancient distros (post-2000 ones) N is usually a safe choice. |
1200 |
++ |
1201 |
+ choice |
1202 |
+ prompt "Choose SLAB allocator" |
1203 |
+ default SLUB |
1204 |
+diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c |
1205 |
+index e178366..f04ff35 100644 |
1206 |
+--- a/sound/core/oss/pcm_oss.c |
1207 |
++++ b/sound/core/oss/pcm_oss.c |
1208 |
+@@ -2872,7 +2872,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, |
1209 |
+ setup = kmalloc(sizeof(*setup), GFP_KERNEL); |
1210 |
+ if (! setup) { |
1211 |
+ buffer->error = -ENOMEM; |
1212 |
+- mutex_lock(&pstr->oss.setup_mutex); |
1213 |
++ mutex_unlock(&pstr->oss.setup_mutex); |
1214 |
+ return; |
1215 |
+ } |
1216 |
+ if (pstr->oss.setup_list == NULL) |
1217 |
+@@ -2886,7 +2886,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, |
1218 |
+ if (! template.task_name) { |
1219 |
+ kfree(setup); |
1220 |
+ buffer->error = -ENOMEM; |
1221 |
+- mutex_lock(&pstr->oss.setup_mutex); |
1222 |
++ mutex_unlock(&pstr->oss.setup_mutex); |
1223 |
+ return; |
1224 |
+ } |
1225 |
+ } |
1226 |
+diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c |
1227 |
+index d4564ed..4e7ec2b 100644 |
1228 |
+--- a/sound/core/sgbuf.c |
1229 |
++++ b/sound/core/sgbuf.c |
1230 |
+@@ -38,6 +38,10 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) |
1231 |
+ if (! sgbuf) |
1232 |
+ return -EINVAL; |
1233 |
+ |
1234 |
++ if (dmab->area) |
1235 |
++ vunmap(dmab->area); |
1236 |
++ dmab->area = NULL; |
1237 |
++ |
1238 |
+ tmpb.dev.type = SNDRV_DMA_TYPE_DEV; |
1239 |
+ tmpb.dev.dev = sgbuf->dev; |
1240 |
+ for (i = 0; i < sgbuf->pages; i++) { |
1241 |
+@@ -48,9 +52,6 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) |
1242 |
+ tmpb.bytes = (sgbuf->table[i].addr & ~PAGE_MASK) << PAGE_SHIFT; |
1243 |
+ snd_dma_free_pages(&tmpb); |
1244 |
+ } |
1245 |
+- if (dmab->area) |
1246 |
+- vunmap(dmab->area); |
1247 |
+- dmab->area = NULL; |
1248 |
+ |
1249 |
+ kfree(sgbuf->table); |
1250 |
+ kfree(sgbuf->page_table); |
1251 |
+diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c |
1252 |
+index 58c972b..b848d10 100644 |
1253 |
+--- a/sound/isa/opl3sa2.c |
1254 |
++++ b/sound/isa/opl3sa2.c |
1255 |
+@@ -550,21 +550,27 @@ static int __devinit snd_opl3sa2_mixer(struct snd_card *card) |
1256 |
+ #ifdef CONFIG_PM |
1257 |
+ static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) |
1258 |
+ { |
1259 |
+- struct snd_opl3sa2 *chip = card->private_data; |
1260 |
++ if (card) { |
1261 |
++ struct snd_opl3sa2 *chip = card->private_data; |
1262 |
+ |
1263 |
+- snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
1264 |
+- chip->wss->suspend(chip->wss); |
1265 |
+- /* power down */ |
1266 |
+- snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); |
1267 |
++ snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
1268 |
++ chip->wss->suspend(chip->wss); |
1269 |
++ /* power down */ |
1270 |
++ snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); |
1271 |
++ } |
1272 |
+ |
1273 |
+ return 0; |
1274 |
+ } |
1275 |
+ |
1276 |
+ static int snd_opl3sa2_resume(struct snd_card *card) |
1277 |
+ { |
1278 |
+- struct snd_opl3sa2 *chip = card->private_data; |
1279 |
++ struct snd_opl3sa2 *chip; |
1280 |
+ int i; |
1281 |
+ |
1282 |
++ if (!card) |
1283 |
++ return 0; |
1284 |
++ |
1285 |
++ chip = card->private_data; |
1286 |
+ /* power up */ |
1287 |
+ snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); |
1288 |
+ |
1289 |
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c |
1290 |
+index 35722ec..34a5b69 100644 |
1291 |
+--- a/sound/pci/hda/hda_intel.c |
1292 |
++++ b/sound/pci/hda/hda_intel.c |
1293 |
+@@ -2063,26 +2063,31 @@ static int __devinit check_position_fix(struct azx *chip, int fix) |
1294 |
+ { |
1295 |
+ const struct snd_pci_quirk *q; |
1296 |
+ |
1297 |
+- /* Check VIA HD Audio Controller exist */ |
1298 |
+- if (chip->pci->vendor == PCI_VENDOR_ID_VIA && |
1299 |
+- chip->pci->device == VIA_HDAC_DEVICE_ID) { |
1300 |
++ switch (fix) { |
1301 |
++ case POS_FIX_LPIB: |
1302 |
++ case POS_FIX_POSBUF: |
1303 |
++ return fix; |
1304 |
++ } |
1305 |
++ |
1306 |
++ /* Check VIA/ATI HD Audio Controller exist */ |
1307 |
++ switch (chip->driver_type) { |
1308 |
++ case AZX_DRIVER_VIA: |
1309 |
++ case AZX_DRIVER_ATI: |
1310 |
+ chip->via_dmapos_patch = 1; |
1311 |
+ /* Use link position directly, avoid any transfer problem. */ |
1312 |
+ return POS_FIX_LPIB; |
1313 |
+ } |
1314 |
+ chip->via_dmapos_patch = 0; |
1315 |
+ |
1316 |
+- if (fix == POS_FIX_AUTO) { |
1317 |
+- q = snd_pci_quirk_lookup(chip->pci, position_fix_list); |
1318 |
+- if (q) { |
1319 |
+- printk(KERN_INFO |
1320 |
+- "hda_intel: position_fix set to %d " |
1321 |
+- "for device %04x:%04x\n", |
1322 |
+- q->value, q->subvendor, q->subdevice); |
1323 |
+- return q->value; |
1324 |
+- } |
1325 |
++ q = snd_pci_quirk_lookup(chip->pci, position_fix_list); |
1326 |
++ if (q) { |
1327 |
++ printk(KERN_INFO |
1328 |
++ "hda_intel: position_fix set to %d " |
1329 |
++ "for device %04x:%04x\n", |
1330 |
++ q->value, q->subvendor, q->subdevice); |
1331 |
++ return q->value; |
1332 |
+ } |
1333 |
+- return fix; |
1334 |
++ return POS_FIX_AUTO; |
1335 |
+ } |
1336 |
+ |
1337 |
+ /* |
1338 |
+@@ -2208,9 +2213,17 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, |
1339 |
+ gcap = azx_readw(chip, GCAP); |
1340 |
+ snd_printdd("chipset global capabilities = 0x%x\n", gcap); |
1341 |
+ |
1342 |
++ /* ATI chips seems buggy about 64bit DMA addresses */ |
1343 |
++ if (chip->driver_type == AZX_DRIVER_ATI) |
1344 |
++ gcap &= ~0x01; |
1345 |
++ |
1346 |
+ /* allow 64bit DMA address if supported by H/W */ |
1347 |
+ if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) |
1348 |
+ pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); |
1349 |
++ else { |
1350 |
++ pci_set_dma_mask(pci, DMA_32BIT_MASK); |
1351 |
++ pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK); |
1352 |
++ } |
1353 |
+ |
1354 |
+ /* read number of streams from GCAP register instead of using |
1355 |
+ * hardcoded value |
1356 |
+diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c |
1357 |
+index ae7601f..f342def 100644 |
1358 |
+--- a/sound/pci/mixart/mixart.c |
1359 |
++++ b/sound/pci/mixart/mixart.c |
1360 |
+@@ -607,6 +607,7 @@ static int snd_mixart_hw_params(struct snd_pcm_substream *subs, |
1361 |
+ /* set the format to the board */ |
1362 |
+ err = mixart_set_format(stream, format); |
1363 |
+ if(err < 0) { |
1364 |
++ mutex_unlock(&mgr->setup_mutex); |
1365 |
+ return err; |
1366 |
+ } |
1367 |
+ |
1368 |
|
1369 |
Deleted: genpatches-2.6/trunk/2.6.28/2705_i915-no-vblank-on-disabled-pipe.patch |
1370 |
=================================================================== |
1371 |
--- genpatches-2.6/trunk/2.6.28/2705_i915-no-vblank-on-disabled-pipe.patch 2009-03-21 15:32:23 UTC (rev 1531) |
1372 |
+++ genpatches-2.6/trunk/2.6.28/2705_i915-no-vblank-on-disabled-pipe.patch 2009-03-24 02:08:56 UTC (rev 1532) |
1373 |
@@ -1,34 +0,0 @@ |
1374 |
-From: Jesse Barnes <jbarnes@××××××××××××.org> |
1375 |
-Date: Thu, 8 Jan 2009 18:42:15 +0000 (-0800) |
1376 |
-Subject: drm/i915: don't enable vblanks on disabled pipes |
1377 |
-X-Git-Tag: v2.6.29-rc2~7^2~7 |
1378 |
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=71e0ffa599f54058d9b8724b4b14d0486751681d |
1379 |
- |
1380 |
-drm/i915: don't enable vblanks on disabled pipes |
1381 |
- |
1382 |
-In some cases userland may be confused and try to wait on vblank events from |
1383 |
-pipes that aren't actually enabled. We shouldn't allow this, so return |
1384 |
--EINVAL if the pipe isn't on. |
1385 |
- |
1386 |
-Signed-off-by: Jesse Barnes <jbarnes@××××××××××××.org> |
1387 |
-Signed-off-by: Eric Anholt <eric@××××××.net> |
1388 |
-Signed-off-by: Dave Airlie <airlied@×××××.ie> |
1389 |
---- |
1390 |
- |
1391 |
-diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c |
1392 |
-index 0cadafb..6290219 100644 |
1393 |
---- a/drivers/gpu/drm/i915/i915_irq.c |
1394 |
-+++ b/drivers/gpu/drm/i915/i915_irq.c |
1395 |
-@@ -411,6 +411,12 @@ int i915_enable_vblank(struct drm_device *dev, int pipe) |
1396 |
- { |
1397 |
- drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
1398 |
- unsigned long irqflags; |
1399 |
-+ int pipeconf_reg = (pipe == 0) ? PIPEACONF : PIPEBCONF; |
1400 |
-+ u32 pipeconf; |
1401 |
-+ |
1402 |
-+ pipeconf = I915_READ(pipeconf_reg); |
1403 |
-+ if (!(pipeconf & PIPEACONF_ENABLE)) |
1404 |
-+ return -EINVAL; |
1405 |
- |
1406 |
- spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); |
1407 |
- if (IS_I965G(dev)) |
1408 |
|
1409 |
Deleted: genpatches-2.6/trunk/2.6.28/2710_i915-set-vblank-flag-correctly.patch |
1410 |
=================================================================== |
1411 |
--- genpatches-2.6/trunk/2.6.28/2710_i915-set-vblank-flag-correctly.patch 2009-03-21 15:32:23 UTC (rev 1531) |
1412 |
+++ genpatches-2.6/trunk/2.6.28/2710_i915-set-vblank-flag-correctly.patch 2009-03-24 02:08:56 UTC (rev 1532) |
1413 |
@@ -1,69 +0,0 @@ |
1414 |
-From: Jesse Barnes <jbarnes@××××××××××××.org> |
1415 |
-Date: Tue, 6 Jan 2009 18:21:24 +0000 (-0800) |
1416 |
-Subject: drm/i915: set vblank enabled flag correctly across IRQ install/uninstall |
1417 |
-X-Git-Tag: v2.6.29-rc2~7^2~6 |
1418 |
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=dc1336ff4fe08ae7cfe8301bfd7f0b2cfd31d20a |
1419 |
- |
1420 |
-drm/i915: set vblank enabled flag correctly across IRQ install/uninstall |
1421 |
- |
1422 |
-In the absence of kernel mode setting, many drivers disable IRQs across VT |
1423 |
-switch. The core DRM vblank code is missing a check for this case however; |
1424 |
-even after IRQ disable, the vblank code will still have the vblank_enabled |
1425 |
-flag set, so unless we track the fact that they're disabled at IRQ uninstall |
1426 |
-time, when we VT switch back in we won't actually re-enable them, which means |
1427 |
-any apps waiting on vblank before the switch will hang. |
1428 |
- |
1429 |
-This patch does that and also adds a sanity check to the wait condition to |
1430 |
-look for the irq_enabled flag in general, as well as adding a wakeup to the |
1431 |
-IRQ uninstall path. |
1432 |
- |
1433 |
-Fixes fdo bug #18879 with compiz hangs at VT switch. |
1434 |
- |
1435 |
-Signed-off-by: Jesse Barnes <jbarnes@××××××××××××.org> |
1436 |
-Signed-off-by: Eric Anholt <eric@××××××.net> |
1437 |
-Signed-off-by: Dave Airlie <airlied@×××××.ie> |
1438 |
---- |
1439 |
- |
1440 |
-diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c |
1441 |
-index 724e505..477caa1 100644 |
1442 |
---- a/drivers/gpu/drm/drm_irq.c |
1443 |
-+++ b/drivers/gpu/drm/drm_irq.c |
1444 |
-@@ -267,7 +267,8 @@ EXPORT_SYMBOL(drm_irq_install); |
1445 |
- */ |
1446 |
- int drm_irq_uninstall(struct drm_device * dev) |
1447 |
- { |
1448 |
-- int irq_enabled; |
1449 |
-+ unsigned long irqflags; |
1450 |
-+ int irq_enabled, i; |
1451 |
- |
1452 |
- if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) |
1453 |
- return -EINVAL; |
1454 |
-@@ -277,6 +278,16 @@ int drm_irq_uninstall(struct drm_device * dev) |
1455 |
- dev->irq_enabled = 0; |
1456 |
- mutex_unlock(&dev->struct_mutex); |
1457 |
- |
1458 |
-+ /* |
1459 |
-+ * Wake up any waiters so they don't hang. |
1460 |
-+ */ |
1461 |
-+ spin_lock_irqsave(&dev->vbl_lock, irqflags); |
1462 |
-+ for (i = 0; i < dev->num_crtcs; i++) { |
1463 |
-+ DRM_WAKEUP(&dev->vbl_queue[i]); |
1464 |
-+ dev->vblank_enabled[i] = 0; |
1465 |
-+ } |
1466 |
-+ spin_unlock_irqrestore(&dev->vbl_lock, irqflags); |
1467 |
-+ |
1468 |
- if (!irq_enabled) |
1469 |
- return -EINVAL; |
1470 |
- |
1471 |
-@@ -652,8 +663,9 @@ int drm_wait_vblank(struct drm_device *dev, void *data, |
1472 |
- vblwait->request.sequence, crtc); |
1473 |
- dev->last_vblank_wait[crtc] = vblwait->request.sequence; |
1474 |
- DRM_WAIT_ON(ret, dev->vbl_queue[crtc], 3 * DRM_HZ, |
1475 |
-- ((drm_vblank_count(dev, crtc) |
1476 |
-- - vblwait->request.sequence) <= (1 << 23))); |
1477 |
-+ (((drm_vblank_count(dev, crtc) - |
1478 |
-+ vblwait->request.sequence) <= (1 << 23)) || |
1479 |
-+ !dev->irq_enabled)); |
1480 |
- |
1481 |
- if (ret != -EINTR) { |
1482 |
- struct timeval now; |
1483 |
|
1484 |
Added: genpatches-2.6/trunk/2.6.28/2910_makefile-cflags.patch |
1485 |
=================================================================== |
1486 |
--- genpatches-2.6/trunk/2.6.28/2910_makefile-cflags.patch (rev 0) |
1487 |
+++ genpatches-2.6/trunk/2.6.28/2910_makefile-cflags.patch 2009-03-24 02:08:56 UTC (rev 1532) |
1488 |
@@ -0,0 +1,12 @@ |
1489 |
+--- a/Makefile 2009-03-23 21:50:02.000000000 -0400 |
1490 |
++++ b/Makefile 2009-03-23 21:52:02.000000000 -0400 |
1491 |
+@@ -555,6 +555,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wdecl |
1492 |
+ # disable pointer signed / unsigned warnings in gcc 4.0 |
1493 |
+ KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) |
1494 |
+ |
1495 |
++# disable invalid "can't wrap" optimzations for signed / pointers |
1496 |
++KBUILD_CFLAGS += $(call cc-option,-fwrapv) |
1497 |
++ |
1498 |
+ # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments |
1499 |
+ # But warn user when we do so |
1500 |
+ warn-assign = \ |