Contents of /trunk/kernel26-alx/patches-2.6.27-r3/0120-2.6.27.21-all-fixes.patch
Parent Directory | Revision Log
Revision 1176 -
(show annotations)
(download)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 31827 byte(s)
Thu Oct 14 15:11:06 2010 UTC (13 years, 11 months ago) by niro
File size: 31827 byte(s)
-2.6.27-alx-r3: new magellan 0.5.2 kernel
1 | diff --git a/Makefile b/Makefile |
2 | index 9f4860d..0664c76 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -555,6 +555,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) |
6 | # disable pointer signed / unsigned warnings in gcc 4.0 |
7 | KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) |
8 | |
9 | +# disable invalid "can't wrap" optimzations for signed / pointers |
10 | +KBUILD_CFLAGS += $(call cc-option,-fwrapv) |
11 | + |
12 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments |
13 | # But warn user when we do so |
14 | warn-assign = \ |
15 | diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig |
16 | index fb7e69c..48dfb6f 100644 |
17 | --- a/arch/ia64/Kconfig |
18 | +++ b/arch/ia64/Kconfig |
19 | @@ -444,8 +444,7 @@ config HOLES_IN_ZONE |
20 | default y if VIRTUAL_MEM_MAP |
21 | |
22 | config HAVE_ARCH_EARLY_PFN_TO_NID |
23 | - def_bool y |
24 | - depends on NEED_MULTIPLE_NODES |
25 | + def_bool NUMA && SPARSEMEM |
26 | |
27 | config HAVE_ARCH_NODEDATA_EXTENSION |
28 | def_bool y |
29 | diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c |
30 | index 214388e..dd1d7ed 100644 |
31 | --- a/arch/powerpc/sysdev/fsl_soc.c |
32 | +++ b/arch/powerpc/sysdev/fsl_soc.c |
33 | @@ -255,7 +255,7 @@ static int __init gfar_mdio_of_init(void) |
34 | gfar_mdio_of_init_one(np); |
35 | |
36 | /* try the deprecated version */ |
37 | - for_each_compatible_node(np, "mdio", "gianfar"); |
38 | + for_each_compatible_node(np, "mdio", "gianfar") |
39 | gfar_mdio_of_init_one(np); |
40 | |
41 | return 0; |
42 | diff --git a/arch/s390/lib/div64.c b/arch/s390/lib/div64.c |
43 | index a5f8300..d9e62c0 100644 |
44 | --- a/arch/s390/lib/div64.c |
45 | +++ b/arch/s390/lib/div64.c |
46 | @@ -61,7 +61,7 @@ static uint32_t __div64_31(uint64_t *n, uint32_t base) |
47 | " clr %0,%3\n" |
48 | " jl 0f\n" |
49 | " slr %0,%3\n" |
50 | - " alr %1,%2\n" |
51 | + " ahi %1,1\n" |
52 | "0:\n" |
53 | : "+d" (reg2), "+d" (reg3), "=d" (tmp) |
54 | : "d" (base), "2" (1UL) : "cc" ); |
55 | diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c |
56 | index b75f256..31027aa 100644 |
57 | --- a/arch/x86/kernel/cpu/intel.c |
58 | +++ b/arch/x86/kernel/cpu/intel.c |
59 | @@ -32,6 +32,19 @@ struct movsl_mask movsl_mask __read_mostly; |
60 | |
61 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) |
62 | { |
63 | + /* Unmask CPUID levels if masked: */ |
64 | + if (c->x86 == 6 && c->x86_model >= 15) { |
65 | + u64 misc_enable; |
66 | + |
67 | + rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
68 | + |
69 | + if (misc_enable & MSR_IA32_MISC_ENABLE_LIMIT_CPUID) { |
70 | + misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID; |
71 | + wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
72 | + c->cpuid_level = cpuid_eax(0); |
73 | + } |
74 | + } |
75 | + |
76 | /* Netburst reports 64 bytes clflush size, but does IO in 128 bytes */ |
77 | if (c->x86 == 15 && c->x86_cache_alignment == 64) |
78 | c->x86_cache_alignment = 128; |
79 | diff --git a/arch/x86/kernel/cpu/intel_64.c b/arch/x86/kernel/cpu/intel_64.c |
80 | index 1019c58..7ccd551 100644 |
81 | --- a/arch/x86/kernel/cpu/intel_64.c |
82 | +++ b/arch/x86/kernel/cpu/intel_64.c |
83 | @@ -9,6 +9,19 @@ |
84 | |
85 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) |
86 | { |
87 | + /* Unmask CPUID levels if masked: */ |
88 | + if (c->x86 == 6 && c->x86_model >= 15) { |
89 | + u64 misc_enable; |
90 | + |
91 | + rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
92 | + |
93 | + if (misc_enable & MSR_IA32_MISC_ENABLE_LIMIT_CPUID) { |
94 | + misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID; |
95 | + wrmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
96 | + c->cpuid_level = cpuid_eax(0); |
97 | + } |
98 | + } |
99 | + |
100 | if ((c->x86 == 0xf && c->x86_model >= 0x03) || |
101 | (c->x86 == 0x6 && c->x86_model >= 0x0e)) |
102 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); |
103 | diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c |
104 | index e6b4606..d78a5b2 100644 |
105 | --- a/drivers/ata/ata_piix.c |
106 | +++ b/drivers/ata/ata_piix.c |
107 | @@ -1363,6 +1363,39 @@ static const int *__devinit piix_init_sata_map(struct pci_dev *pdev, |
108 | return map; |
109 | } |
110 | |
111 | +static bool piix_no_sidpr(struct ata_host *host) |
112 | +{ |
113 | + struct pci_dev *pdev = to_pci_dev(host->dev); |
114 | + |
115 | + /* |
116 | + * Samsung DB-P70 only has three ATA ports exposed and |
117 | + * curiously the unconnected first port reports link online |
118 | + * while not responding to SRST protocol causing excessive |
119 | + * detection delay. |
120 | + * |
121 | + * Unfortunately, the system doesn't carry enough DMI |
122 | + * information to identify the machine but does have subsystem |
123 | + * vendor and device set. As it's unclear whether the |
124 | + * subsystem vendor/device is used only for this specific |
125 | + * board, the port can't be disabled solely with the |
126 | + * information; however, turning off SIDPR access works around |
127 | + * the problem. Turn it off. |
128 | + * |
129 | + * This problem is reported in bnc#441240. |
130 | + * |
131 | + * https://bugzilla.novell.com/show_bug.cgi?id=441420 |
132 | + */ |
133 | + if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x2920 && |
134 | + pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG && |
135 | + pdev->subsystem_device == 0xb049) { |
136 | + dev_printk(KERN_WARNING, host->dev, |
137 | + "Samsung DB-P70 detected, disabling SIDPR\n"); |
138 | + return true; |
139 | + } |
140 | + |
141 | + return false; |
142 | +} |
143 | + |
144 | static void __devinit piix_init_sidpr(struct ata_host *host) |
145 | { |
146 | struct pci_dev *pdev = to_pci_dev(host->dev); |
147 | @@ -1376,6 +1409,10 @@ static void __devinit piix_init_sidpr(struct ata_host *host) |
148 | if (hpriv->map[i] == IDE) |
149 | return; |
150 | |
151 | + /* is it blacklisted? */ |
152 | + if (piix_no_sidpr(host)) |
153 | + return; |
154 | + |
155 | if (!(host->ports[0]->flags & PIIX_FLAG_SIDPR)) |
156 | return; |
157 | |
158 | diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c |
159 | index 1395643..8ac02cf 100644 |
160 | --- a/drivers/md/dm-crypt.c |
161 | +++ b/drivers/md/dm-crypt.c |
162 | @@ -59,6 +59,7 @@ struct dm_crypt_io { |
163 | }; |
164 | |
165 | struct dm_crypt_request { |
166 | + struct convert_context *ctx; |
167 | struct scatterlist sg_in; |
168 | struct scatterlist sg_out; |
169 | }; |
170 | @@ -336,6 +337,18 @@ static void crypt_convert_init(struct crypt_config *cc, |
171 | atomic_set(&ctx->pending, 1); |
172 | } |
173 | |
174 | +static struct dm_crypt_request *dmreq_of_req(struct crypt_config *cc, |
175 | + struct ablkcipher_request *req) |
176 | +{ |
177 | + return (struct dm_crypt_request *)((char *)req + cc->dmreq_start); |
178 | +} |
179 | + |
180 | +static struct ablkcipher_request *req_of_dmreq(struct crypt_config *cc, |
181 | + struct dm_crypt_request *dmreq) |
182 | +{ |
183 | + return (struct ablkcipher_request *)((char *)dmreq - cc->dmreq_start); |
184 | +} |
185 | + |
186 | static int crypt_convert_block(struct crypt_config *cc, |
187 | struct convert_context *ctx, |
188 | struct ablkcipher_request *req) |
189 | @@ -346,10 +359,11 @@ static int crypt_convert_block(struct crypt_config *cc, |
190 | u8 *iv; |
191 | int r = 0; |
192 | |
193 | - dmreq = (struct dm_crypt_request *)((char *)req + cc->dmreq_start); |
194 | + dmreq = dmreq_of_req(cc, req); |
195 | iv = (u8 *)ALIGN((unsigned long)(dmreq + 1), |
196 | crypto_ablkcipher_alignmask(cc->tfm) + 1); |
197 | |
198 | + dmreq->ctx = ctx; |
199 | sg_init_table(&dmreq->sg_in, 1); |
200 | sg_set_page(&dmreq->sg_in, bv_in->bv_page, 1 << SECTOR_SHIFT, |
201 | bv_in->bv_offset + ctx->offset_in); |
202 | @@ -396,8 +410,9 @@ static void crypt_alloc_req(struct crypt_config *cc, |
203 | cc->req = mempool_alloc(cc->req_pool, GFP_NOIO); |
204 | ablkcipher_request_set_tfm(cc->req, cc->tfm); |
205 | ablkcipher_request_set_callback(cc->req, CRYPTO_TFM_REQ_MAY_BACKLOG | |
206 | - CRYPTO_TFM_REQ_MAY_SLEEP, |
207 | - kcryptd_async_done, ctx); |
208 | + CRYPTO_TFM_REQ_MAY_SLEEP, |
209 | + kcryptd_async_done, |
210 | + dmreq_of_req(cc, cc->req)); |
211 | } |
212 | |
213 | /* |
214 | @@ -757,7 +772,8 @@ static void kcryptd_crypt_read_convert(struct dm_crypt_io *io) |
215 | static void kcryptd_async_done(struct crypto_async_request *async_req, |
216 | int error) |
217 | { |
218 | - struct convert_context *ctx = async_req->data; |
219 | + struct dm_crypt_request *dmreq = async_req->data; |
220 | + struct convert_context *ctx = dmreq->ctx; |
221 | struct dm_crypt_io *io = container_of(ctx, struct dm_crypt_io, ctx); |
222 | struct crypt_config *cc = io->target->private; |
223 | |
224 | @@ -766,7 +782,7 @@ static void kcryptd_async_done(struct crypto_async_request *async_req, |
225 | return; |
226 | } |
227 | |
228 | - mempool_free(ablkcipher_request_cast(async_req), cc->req_pool); |
229 | + mempool_free(req_of_dmreq(cc, dmreq), cc->req_pool); |
230 | |
231 | if (!atomic_dec_and_test(&ctx->pending)) |
232 | return; |
233 | diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c |
234 | index 4789c42..427e5ed 100644 |
235 | --- a/drivers/md/dm-io.c |
236 | +++ b/drivers/md/dm-io.c |
237 | @@ -292,6 +292,8 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where, |
238 | (PAGE_SIZE >> SECTOR_SHIFT)); |
239 | num_bvecs = 1 + min_t(int, bio_get_nr_vecs(where->bdev), |
240 | num_bvecs); |
241 | + if (unlikely(num_bvecs > BIO_MAX_PAGES)) |
242 | + num_bvecs = BIO_MAX_PAGES; |
243 | bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios); |
244 | bio->bi_sector = where->sector + (where->count - remaining); |
245 | bio->bi_bdev = where->bdev; |
246 | diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c |
247 | index b262c00..b8ab11f 100644 |
248 | --- a/drivers/md/dm-ioctl.c |
249 | +++ b/drivers/md/dm-ioctl.c |
250 | @@ -704,7 +704,8 @@ static int dev_rename(struct dm_ioctl *param, size_t param_size) |
251 | char *new_name = (char *) param + param->data_start; |
252 | |
253 | if (new_name < param->data || |
254 | - invalid_str(new_name, (void *) param + param_size)) { |
255 | + invalid_str(new_name, (void *) param + param_size) || |
256 | + strlen(new_name) > DM_NAME_LEN - 1) { |
257 | DMWARN("Invalid new logical volume name supplied."); |
258 | return -EINVAL; |
259 | } |
260 | diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c |
261 | index 7b0e8c0..b2c68bc 100644 |
262 | --- a/drivers/media/video/cx23885/cx23885-417.c |
263 | +++ b/drivers/media/video/cx23885/cx23885-417.c |
264 | @@ -1585,7 +1585,8 @@ static int mpeg_open(struct inode *inode, struct file *file) |
265 | |
266 | list_for_each(list, &cx23885_devlist) { |
267 | h = list_entry(list, struct cx23885_dev, devlist); |
268 | - if (h->v4l_device->minor == minor) { |
269 | + if (h->v4l_device && |
270 | + h->v4l_device->minor == minor) { |
271 | dev = h; |
272 | break; |
273 | } |
274 | diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c |
275 | index 6047c78..7d2802a 100644 |
276 | --- a/drivers/media/video/cx23885/cx23885-video.c |
277 | +++ b/drivers/media/video/cx23885/cx23885-video.c |
278 | @@ -733,12 +733,13 @@ static int video_open(struct inode *inode, struct file *file) |
279 | |
280 | list_for_each(list, &cx23885_devlist) { |
281 | h = list_entry(list, struct cx23885_dev, devlist); |
282 | - if (h->video_dev->minor == minor) { |
283 | + if (h->video_dev && |
284 | + h->video_dev->minor == minor) { |
285 | dev = h; |
286 | type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
287 | } |
288 | if (h->vbi_dev && |
289 | - h->vbi_dev->minor == minor) { |
290 | + h->vbi_dev->minor == minor) { |
291 | dev = h; |
292 | type = V4L2_BUF_TYPE_VBI_CAPTURE; |
293 | } |
294 | diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c |
295 | index 6b93007..34bb0e4 100644 |
296 | --- a/drivers/misc/thinkpad_acpi.c |
297 | +++ b/drivers/misc/thinkpad_acpi.c |
298 | @@ -6826,7 +6826,7 @@ MODULE_ALIAS(TPACPI_DRVR_SHORTNAME); |
299 | * if it is not there yet. |
300 | */ |
301 | #define IBM_BIOS_MODULE_ALIAS(__type) \ |
302 | - MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW") |
303 | + MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW*") |
304 | |
305 | /* Non-ancient thinkpads */ |
306 | MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); |
307 | @@ -6835,9 +6835,9 @@ MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*"); |
308 | /* Ancient thinkpad BIOSes have to be identified by |
309 | * BIOS type or model number, and there are far less |
310 | * BIOS types than model numbers... */ |
311 | -IBM_BIOS_MODULE_ALIAS("I[B,D,H,I,M,N,O,T,W,V,Y,Z]"); |
312 | -IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]"); |
313 | -IBM_BIOS_MODULE_ALIAS("K[U,X-Z]"); |
314 | +IBM_BIOS_MODULE_ALIAS("I[BDHIMNOTWVYZ]"); |
315 | +IBM_BIOS_MODULE_ALIAS("1[0368A-GIKM-PST]"); |
316 | +IBM_BIOS_MODULE_ALIAS("K[UX-Z]"); |
317 | |
318 | MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); |
319 | MODULE_DESCRIPTION(TPACPI_DESC); |
320 | diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c |
321 | index e52e54e..8d2d79e 100644 |
322 | --- a/drivers/usb/core/devio.c |
323 | +++ b/drivers/usb/core/devio.c |
324 | @@ -359,11 +359,6 @@ static void destroy_async(struct dev_state *ps, struct list_head *list) |
325 | spin_lock_irqsave(&ps->lock, flags); |
326 | } |
327 | spin_unlock_irqrestore(&ps->lock, flags); |
328 | - as = async_getcompleted(ps); |
329 | - while (as) { |
330 | - free_async(as); |
331 | - as = async_getcompleted(ps); |
332 | - } |
333 | } |
334 | |
335 | static void destroy_async_on_interface(struct dev_state *ps, |
336 | @@ -639,6 +634,7 @@ static int usbdev_release(struct inode *inode, struct file *file) |
337 | struct dev_state *ps = file->private_data; |
338 | struct usb_device *dev = ps->dev; |
339 | unsigned int ifnum; |
340 | + struct async *as; |
341 | |
342 | usb_lock_device(dev); |
343 | |
344 | @@ -657,6 +653,12 @@ static int usbdev_release(struct inode *inode, struct file *file) |
345 | usb_unlock_device(dev); |
346 | usb_put_dev(dev); |
347 | put_pid(ps->disc_pid); |
348 | + |
349 | + as = async_getcompleted(ps); |
350 | + while (as) { |
351 | + free_async(as); |
352 | + as = async_getcompleted(ps); |
353 | + } |
354 | kfree(ps); |
355 | return 0; |
356 | } |
357 | diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c |
358 | index 3712b92..ecc9b66 100644 |
359 | --- a/drivers/usb/host/ehci-q.c |
360 | +++ b/drivers/usb/host/ehci-q.c |
361 | @@ -1095,7 +1095,8 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) |
362 | prev->qh_next = qh->qh_next; |
363 | wmb (); |
364 | |
365 | - if (unlikely (ehci_to_hcd(ehci)->state == HC_STATE_HALT)) { |
366 | + /* If the controller isn't running, we don't have to wait for it */ |
367 | + if (unlikely(!HC_IS_RUNNING(ehci_to_hcd(ehci)->state))) { |
368 | /* if (unlikely (qh->reclaim != 0)) |
369 | * this will recurse, probably not much |
370 | */ |
371 | diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c |
372 | index 07bcb93..1d0b49e 100644 |
373 | --- a/drivers/usb/host/ehci-sched.c |
374 | +++ b/drivers/usb/host/ehci-sched.c |
375 | @@ -1536,7 +1536,7 @@ itd_link_urb ( |
376 | struct ehci_itd, itd_list); |
377 | list_move_tail (&itd->itd_list, &stream->td_list); |
378 | itd->stream = iso_stream_get (stream); |
379 | - itd->urb = usb_get_urb (urb); |
380 | + itd->urb = urb; |
381 | itd_init (ehci, stream, itd); |
382 | } |
383 | |
384 | @@ -1645,7 +1645,7 @@ itd_complete ( |
385 | (void) disable_periodic(ehci); |
386 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; |
387 | |
388 | - if (unlikely (list_empty (&stream->td_list))) { |
389 | + if (unlikely(list_is_singular(&stream->td_list))) { |
390 | ehci_to_hcd(ehci)->self.bandwidth_allocated |
391 | -= stream->bandwidth; |
392 | ehci_vdbg (ehci, |
393 | @@ -1656,7 +1656,6 @@ itd_complete ( |
394 | iso_stream_put (ehci, stream); |
395 | |
396 | done: |
397 | - usb_put_urb(urb); |
398 | itd->urb = NULL; |
399 | if (ehci->clock_frame != itd->frame || itd->index[7] != -1) { |
400 | /* OK to recycle this ITD now. */ |
401 | @@ -1949,7 +1948,7 @@ sitd_link_urb ( |
402 | struct ehci_sitd, sitd_list); |
403 | list_move_tail (&sitd->sitd_list, &stream->td_list); |
404 | sitd->stream = iso_stream_get (stream); |
405 | - sitd->urb = usb_get_urb (urb); |
406 | + sitd->urb = urb; |
407 | |
408 | sitd_patch(ehci, stream, sitd, sched, packet); |
409 | sitd_link (ehci, (next_uframe >> 3) % ehci->periodic_size, |
410 | @@ -2034,7 +2033,7 @@ sitd_complete ( |
411 | (void) disable_periodic(ehci); |
412 | ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; |
413 | |
414 | - if (list_empty (&stream->td_list)) { |
415 | + if (list_is_singular(&stream->td_list)) { |
416 | ehci_to_hcd(ehci)->self.bandwidth_allocated |
417 | -= stream->bandwidth; |
418 | ehci_vdbg (ehci, |
419 | @@ -2045,7 +2044,6 @@ sitd_complete ( |
420 | iso_stream_put (ehci, stream); |
421 | /* OK to recycle this SITD now that its completion callback ran. */ |
422 | done: |
423 | - usb_put_urb(urb); |
424 | sitd->urb = NULL; |
425 | sitd->stream = NULL; |
426 | list_move(&sitd->sitd_list, &stream->free_list); |
427 | diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c |
428 | index 1279553..69e6687 100644 |
429 | --- a/drivers/usb/serial/cp2101.c |
430 | +++ b/drivers/usb/serial/cp2101.c |
431 | @@ -77,6 +77,7 @@ static struct usb_device_id id_table [] = { |
432 | { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ |
433 | { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ |
434 | { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ |
435 | + { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */ |
436 | { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */ |
437 | { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */ |
438 | { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ |
439 | diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c |
440 | index 3dc93b5..2d78712 100644 |
441 | --- a/drivers/usb/serial/ftdi_sio.c |
442 | +++ b/drivers/usb/serial/ftdi_sio.c |
443 | @@ -657,6 +657,11 @@ static struct usb_device_id id_table_combined [] = { |
444 | { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, |
445 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, |
446 | { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, |
447 | + { USB_DEVICE(ATMEL_VID, STK541_PID) }, |
448 | + { USB_DEVICE(DE_VID, STB_PID) }, |
449 | + { USB_DEVICE(DE_VID, WHT_PID) }, |
450 | + { USB_DEVICE(ADI_VID, ADI_GNICE_PID), |
451 | + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
452 | { }, /* Optional parameter entry */ |
453 | { } /* Terminating entry */ |
454 | }; |
455 | diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h |
456 | index 8a5b6df..80fa76e 100644 |
457 | --- a/drivers/usb/serial/ftdi_sio.h |
458 | +++ b/drivers/usb/serial/ftdi_sio.h |
459 | @@ -870,6 +870,26 @@ |
460 | #define RATOC_PRODUCT_ID_USB60F 0xb020 |
461 | |
462 | /* |
463 | + * Atmel STK541 |
464 | + */ |
465 | +#define ATMEL_VID 0x03eb /* Vendor ID */ |
466 | +#define STK541_PID 0x2109 /* Zigbee Controller */ |
467 | + |
468 | +/* |
469 | + * Dresden Elektronic Sensor Terminal Board |
470 | + */ |
471 | +#define DE_VID 0x1cf1 /* Vendor ID */ |
472 | +#define STB_PID 0x0001 /* Sensor Terminal Board */ |
473 | +#define WHT_PID 0x0004 /* Wireless Handheld Terminal */ |
474 | + |
475 | +/* |
476 | + * Blackfin gnICE JTAG |
477 | + * http://docs.blackfin.uclinux.org/doku.php?id=hw:jtag:gnice |
478 | + */ |
479 | +#define ADI_VID 0x0456 |
480 | +#define ADI_GNICE_PID 0xF000 |
481 | + |
482 | +/* |
483 | * BmRequestType: 1100 0000b |
484 | * bRequest: FTDI_E2_READ |
485 | * wValue: 0 |
486 | diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
487 | index 9930150..211cd61 100644 |
488 | --- a/drivers/usb/serial/option.c |
489 | +++ b/drivers/usb/serial/option.c |
490 | @@ -89,6 +89,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
491 | #define OPTION_PRODUCT_ETNA_MODEM_GT 0x7041 |
492 | #define OPTION_PRODUCT_ETNA_MODEM_EX 0x7061 |
493 | #define OPTION_PRODUCT_ETNA_KOI_MODEM 0x7100 |
494 | +#define OPTION_PRODUCT_GTM380_MODEM 0x7201 |
495 | |
496 | #define HUAWEI_VENDOR_ID 0x12D1 |
497 | #define HUAWEI_PRODUCT_E600 0x1001 |
498 | @@ -190,6 +191,7 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
499 | /* OVATION PRODUCTS */ |
500 | #define NOVATELWIRELESS_PRODUCT_MC727 0x4100 |
501 | #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 |
502 | +#define NOVATELWIRELESS_PRODUCT_U727 0x5010 |
503 | |
504 | /* FUTURE NOVATEL PRODUCTS */ |
505 | #define NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED 0X6000 |
506 | @@ -281,14 +283,11 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po |
507 | |
508 | /* ZTE PRODUCTS */ |
509 | #define ZTE_VENDOR_ID 0x19d2 |
510 | +#define ZTE_PRODUCT_MF622 0x0001 |
511 | #define ZTE_PRODUCT_MF628 0x0015 |
512 | #define ZTE_PRODUCT_MF626 0x0031 |
513 | #define ZTE_PRODUCT_CDMA_TECH 0xfffe |
514 | |
515 | -/* Ericsson products */ |
516 | -#define ERICSSON_VENDOR_ID 0x0bdb |
517 | -#define ERICSSON_PRODUCT_F3507G 0x1900 |
518 | - |
519 | #define BENQ_VENDOR_ID 0x04a5 |
520 | #define BENQ_PRODUCT_H10 0x4068 |
521 | |
522 | @@ -317,6 +316,7 @@ static struct usb_device_id option_ids[] = { |
523 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_GT) }, |
524 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_EX) }, |
525 | { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, |
526 | + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTM380_MODEM) }, |
527 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, |
528 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
529 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
530 | @@ -402,6 +402,7 @@ static struct usb_device_id option_ids[] = { |
531 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ |
532 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ |
533 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ |
534 | + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */ |
535 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED) }, /* Novatel EVDO product */ |
536 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */ |
537 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */ |
538 | @@ -429,7 +430,6 @@ static struct usb_device_id option_ids[] = { |
539 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_CINGULAR) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ |
540 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_L) }, /* Dell Wireless HSDPA 5520 */ |
541 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_I) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ |
542 | - { USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */ |
543 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
544 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
545 | { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ |
546 | @@ -497,10 +497,10 @@ static struct usb_device_id option_ids[] = { |
547 | { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ |
548 | { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ |
549 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, |
550 | + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622) }, |
551 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626) }, |
552 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, |
553 | { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, |
554 | - { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G) }, |
555 | { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, |
556 | { USB_DEVICE(0x1da5, 0x4515) }, /* BenQ H20 */ |
557 | { } /* Terminating entry */ |
558 | diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h |
559 | index 019bd62..d21995a 100644 |
560 | --- a/drivers/usb/storage/unusual_devs.h |
561 | +++ b/drivers/usb/storage/unusual_devs.h |
562 | @@ -219,7 +219,7 @@ UNUSUAL_DEV( 0x0421, 0x047c, 0x0370, 0x0610, |
563 | US_FL_MAX_SECTORS_64 ), |
564 | |
565 | /* Reported by Manuel Osdoba <manuel.osdoba@tu-ilmenau.de> */ |
566 | -UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x0452, |
567 | +UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x9999, |
568 | "Nokia", |
569 | "Nokia 6233", |
570 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
571 | @@ -990,7 +990,9 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, |
572 | US_FL_FIX_CAPACITY ), |
573 | |
574 | /* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ |
575 | -UNUSUAL_DEV( 0x067b, 0x2507, 0x0100, 0x0100, |
576 | +/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by |
577 | + * Thomas Bartosik <tbartdev@gmx-topmail.de> */ |
578 | +UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100, |
579 | "Prolific Technology Inc.", |
580 | "Mass Storage Device", |
581 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
582 | @@ -1405,6 +1407,16 @@ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0000, |
583 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
584 | 0 ), |
585 | |
586 | +/* Reported by Jan Dumon <j.dumon@option.com> |
587 | + * This device (wrongly) has a vendor-specific device descriptor. |
588 | + * The entry is needed so usb-storage can bind to it's mass-storage |
589 | + * interface as an interface driver */ |
590 | +UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000, |
591 | + "Option", |
592 | + "GI 0431 SD-Card", |
593 | + US_SC_DEVICE, US_PR_DEVICE, NULL, |
594 | + 0 ), |
595 | + |
596 | #ifdef CONFIG_USB_STORAGE_ISD200 |
597 | UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110, |
598 | "ATI", |
599 | diff --git a/fs/aio.c b/fs/aio.c |
600 | index 048648d..c1174b5 100644 |
601 | --- a/fs/aio.c |
602 | +++ b/fs/aio.c |
603 | @@ -428,7 +428,7 @@ static struct kiocb *__aio_get_req(struct kioctx *ctx) |
604 | req->private = NULL; |
605 | req->ki_iovec = NULL; |
606 | INIT_LIST_HEAD(&req->ki_run_list); |
607 | - req->ki_eventfd = ERR_PTR(-EINVAL); |
608 | + req->ki_eventfd = NULL; |
609 | |
610 | /* Check if the completion queue has enough free space to |
611 | * accept an event from this io. |
612 | @@ -470,8 +470,6 @@ static inline void really_put_req(struct kioctx *ctx, struct kiocb *req) |
613 | { |
614 | assert_spin_locked(&ctx->ctx_lock); |
615 | |
616 | - if (!IS_ERR(req->ki_eventfd)) |
617 | - fput(req->ki_eventfd); |
618 | if (req->ki_dtor) |
619 | req->ki_dtor(req); |
620 | if (req->ki_iovec != &req->ki_inline_vec) |
621 | @@ -493,8 +491,11 @@ static void aio_fput_routine(struct work_struct *data) |
622 | list_del(&req->ki_list); |
623 | spin_unlock_irq(&fput_lock); |
624 | |
625 | - /* Complete the fput */ |
626 | - __fput(req->ki_filp); |
627 | + /* Complete the fput(s) */ |
628 | + if (req->ki_filp != NULL) |
629 | + __fput(req->ki_filp); |
630 | + if (req->ki_eventfd != NULL) |
631 | + __fput(req->ki_eventfd); |
632 | |
633 | /* Link the iocb into the context's free list */ |
634 | spin_lock_irq(&ctx->ctx_lock); |
635 | @@ -512,12 +513,14 @@ static void aio_fput_routine(struct work_struct *data) |
636 | */ |
637 | static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) |
638 | { |
639 | + int schedule_putreq = 0; |
640 | + |
641 | dprintk(KERN_DEBUG "aio_put(%p): f_count=%ld\n", |
642 | req, atomic_long_read(&req->ki_filp->f_count)); |
643 | |
644 | assert_spin_locked(&ctx->ctx_lock); |
645 | |
646 | - req->ki_users --; |
647 | + req->ki_users--; |
648 | BUG_ON(req->ki_users < 0); |
649 | if (likely(req->ki_users)) |
650 | return 0; |
651 | @@ -525,10 +528,23 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) |
652 | req->ki_cancel = NULL; |
653 | req->ki_retry = NULL; |
654 | |
655 | - /* Must be done under the lock to serialise against cancellation. |
656 | - * Call this aio_fput as it duplicates fput via the fput_work. |
657 | + /* |
658 | + * Try to optimize the aio and eventfd file* puts, by avoiding to |
659 | + * schedule work in case it is not __fput() time. In normal cases, |
660 | + * we would not be holding the last reference to the file*, so |
661 | + * this function will be executed w/out any aio kthread wakeup. |
662 | */ |
663 | - if (unlikely(atomic_long_dec_and_test(&req->ki_filp->f_count))) { |
664 | + if (unlikely(atomic_long_dec_and_test(&req->ki_filp->f_count))) |
665 | + schedule_putreq++; |
666 | + else |
667 | + req->ki_filp = NULL; |
668 | + if (req->ki_eventfd != NULL) { |
669 | + if (unlikely(atomic_long_dec_and_test(&req->ki_eventfd->f_count))) |
670 | + schedule_putreq++; |
671 | + else |
672 | + req->ki_eventfd = NULL; |
673 | + } |
674 | + if (unlikely(schedule_putreq)) { |
675 | get_ioctx(ctx); |
676 | spin_lock(&fput_lock); |
677 | list_add(&req->ki_list, &fput_head); |
678 | @@ -992,7 +1008,7 @@ int aio_complete(struct kiocb *iocb, long res, long res2) |
679 | * eventfd. The eventfd_signal() function is safe to be called |
680 | * from IRQ context. |
681 | */ |
682 | - if (!IS_ERR(iocb->ki_eventfd)) |
683 | + if (iocb->ki_eventfd != NULL) |
684 | eventfd_signal(iocb->ki_eventfd, 1); |
685 | |
686 | put_rq: |
687 | @@ -1596,6 +1612,7 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, |
688 | req->ki_eventfd = eventfd_fget((int) iocb->aio_resfd); |
689 | if (IS_ERR(req->ki_eventfd)) { |
690 | ret = PTR_ERR(req->ki_eventfd); |
691 | + req->ki_eventfd = NULL; |
692 | goto out_put_req; |
693 | } |
694 | } |
695 | diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c |
696 | index 14ba4d9..b0b07df 100644 |
697 | --- a/fs/nfsd/nfs4xdr.c |
698 | +++ b/fs/nfsd/nfs4xdr.c |
699 | @@ -2593,6 +2593,7 @@ static nfsd4_enc nfsd4_enc_ops[] = { |
700 | [OP_LOOKUPP] = (nfsd4_enc)nfsd4_encode_noop, |
701 | [OP_NVERIFY] = (nfsd4_enc)nfsd4_encode_noop, |
702 | [OP_OPEN] = (nfsd4_enc)nfsd4_encode_open, |
703 | + [OP_OPENATTR] = (nfsd4_enc)nfsd4_encode_noop, |
704 | [OP_OPEN_CONFIRM] = (nfsd4_enc)nfsd4_encode_open_confirm, |
705 | [OP_OPEN_DOWNGRADE] = (nfsd4_enc)nfsd4_encode_open_downgrade, |
706 | [OP_PUTFH] = (nfsd4_enc)nfsd4_encode_noop, |
707 | diff --git a/include/asm-x86/msr-index.h b/include/asm-x86/msr-index.h |
708 | index 44bce77..d3a20f3 100644 |
709 | --- a/include/asm-x86/msr-index.h |
710 | +++ b/include/asm-x86/msr-index.h |
711 | @@ -196,6 +196,35 @@ |
712 | #define MSR_IA32_THERM_STATUS 0x0000019c |
713 | #define MSR_IA32_MISC_ENABLE 0x000001a0 |
714 | |
715 | +/* MISC_ENABLE bits: architectural */ |
716 | +#define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0) |
717 | +#define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1) |
718 | +#define MSR_IA32_MISC_ENABLE_EMON (1ULL << 7) |
719 | +#define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1ULL << 11) |
720 | +#define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1ULL << 12) |
721 | +#define MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP (1ULL << 16) |
722 | +#define MSR_IA32_MISC_ENABLE_MWAIT (1ULL << 18) |
723 | +#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID (1ULL << 22) |
724 | +#define MSR_IA32_MISC_ENABLE_XTPR_DISABLE (1ULL << 23) |
725 | +#define MSR_IA32_MISC_ENABLE_XD_DISABLE (1ULL << 34) |
726 | + |
727 | +/* MISC_ENABLE bits: model-specific, meaning may vary from core to core */ |
728 | +#define MSR_IA32_MISC_ENABLE_X87_COMPAT (1ULL << 2) |
729 | +#define MSR_IA32_MISC_ENABLE_TM1 (1ULL << 3) |
730 | +#define MSR_IA32_MISC_ENABLE_SPLIT_LOCK_DISABLE (1ULL << 4) |
731 | +#define MSR_IA32_MISC_ENABLE_L3CACHE_DISABLE (1ULL << 6) |
732 | +#define MSR_IA32_MISC_ENABLE_SUPPRESS_LOCK (1ULL << 8) |
733 | +#define MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE (1ULL << 9) |
734 | +#define MSR_IA32_MISC_ENABLE_FERR (1ULL << 10) |
735 | +#define MSR_IA32_MISC_ENABLE_FERR_MULTIPLEX (1ULL << 10) |
736 | +#define MSR_IA32_MISC_ENABLE_TM2 (1ULL << 13) |
737 | +#define MSR_IA32_MISC_ENABLE_ADJ_PREF_DISABLE (1ULL << 19) |
738 | +#define MSR_IA32_MISC_ENABLE_SPEEDSTEP_LOCK (1ULL << 20) |
739 | +#define MSR_IA32_MISC_ENABLE_L1D_CONTEXT (1ULL << 24) |
740 | +#define MSR_IA32_MISC_ENABLE_DCU_PREF_DISABLE (1ULL << 37) |
741 | +#define MSR_IA32_MISC_ENABLE_TURBO_DISABLE (1ULL << 38) |
742 | +#define MSR_IA32_MISC_ENABLE_IP_PREF_DISABLE (1ULL << 39) |
743 | + |
744 | /* Intel Model 6 */ |
745 | #define MSR_P6_EVNTSEL0 0x00000186 |
746 | #define MSR_P6_EVNTSEL1 0x00000187 |
747 | diff --git a/include/linux/capability.h b/include/linux/capability.h |
748 | index 9d1fe30..28863f4 100644 |
749 | --- a/include/linux/capability.h |
750 | +++ b/include/linux/capability.h |
751 | @@ -382,8 +382,10 @@ typedef struct kernel_cap_struct { |
752 | # define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) |
753 | # define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) |
754 | # define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) |
755 | -# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ |
756 | - CAP_FS_MASK_B1 } }) |
757 | +# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ |
758 | + | CAP_TO_MASK(CAP_SYS_RESOURCE) \ |
759 | + | CAP_TO_MASK(CAP_MKNOD), \ |
760 | + CAP_FS_MASK_B1 } }) |
761 | |
762 | #endif /* _KERNEL_CAPABILITY_U32S != 2 */ |
763 | |
764 | diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c |
765 | index 4c601b1..35afb41 100644 |
766 | --- a/sound/core/oss/pcm_oss.c |
767 | +++ b/sound/core/oss/pcm_oss.c |
768 | @@ -2854,7 +2854,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, |
769 | setup = kmalloc(sizeof(*setup), GFP_KERNEL); |
770 | if (! setup) { |
771 | buffer->error = -ENOMEM; |
772 | - mutex_lock(&pstr->oss.setup_mutex); |
773 | + mutex_unlock(&pstr->oss.setup_mutex); |
774 | return; |
775 | } |
776 | if (pstr->oss.setup_list == NULL) |
777 | @@ -2868,7 +2868,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, |
778 | if (! template.task_name) { |
779 | kfree(setup); |
780 | buffer->error = -ENOMEM; |
781 | - mutex_lock(&pstr->oss.setup_mutex); |
782 | + mutex_unlock(&pstr->oss.setup_mutex); |
783 | return; |
784 | } |
785 | } |
786 | diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c |
787 | index cefd228..91f16ac 100644 |
788 | --- a/sound/core/sgbuf.c |
789 | +++ b/sound/core/sgbuf.c |
790 | @@ -38,6 +38,10 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) |
791 | if (! sgbuf) |
792 | return -EINVAL; |
793 | |
794 | + if (dmab->area) |
795 | + vunmap(dmab->area); |
796 | + dmab->area = NULL; |
797 | + |
798 | tmpb.dev.type = SNDRV_DMA_TYPE_DEV; |
799 | tmpb.dev.dev = sgbuf->dev; |
800 | for (i = 0; i < sgbuf->pages; i++) { |
801 | @@ -46,9 +50,6 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) |
802 | tmpb.bytes = PAGE_SIZE; |
803 | snd_dma_free_pages(&tmpb); |
804 | } |
805 | - if (dmab->area) |
806 | - vunmap(dmab->area); |
807 | - dmab->area = NULL; |
808 | |
809 | kfree(sgbuf->table); |
810 | kfree(sgbuf->page_table); |
811 | diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c |
812 | index 0f014b1..0b93ef6 100644 |
813 | --- a/sound/pci/hda/hda_intel.c |
814 | +++ b/sound/pci/hda/hda_intel.c |
815 | @@ -2110,9 +2110,17 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, |
816 | gcap = azx_readw(chip, GCAP); |
817 | snd_printdd("chipset global capabilities = 0x%x\n", gcap); |
818 | |
819 | + /* ATI chips seems buggy about 64bit DMA addresses */ |
820 | + if (chip->driver_type == AZX_DRIVER_ATI) |
821 | + gcap &= ~0x01; |
822 | + |
823 | /* allow 64bit DMA address if supported by H/W */ |
824 | if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) |
825 | pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); |
826 | + else { |
827 | + pci_set_dma_mask(pci, DMA_32BIT_MASK); |
828 | + pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK); |
829 | + } |
830 | |
831 | /* read number of streams from GCAP register instead of using |
832 | * hardcoded value |
833 | diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c |
834 | index 3dd0c79..7e83131 100644 |
835 | --- a/sound/pci/mixart/mixart.c |
836 | +++ b/sound/pci/mixart/mixart.c |
837 | @@ -607,6 +607,7 @@ static int snd_mixart_hw_params(struct snd_pcm_substream *subs, |
838 | /* set the format to the board */ |
839 | err = mixart_set_format(stream, format); |
840 | if(err < 0) { |
841 | + mutex_unlock(&mgr->setup_mutex); |
842 | return err; |
843 | } |
844 |