Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r2694 - genpatches-2.6/trunk/3.4
Date: Mon, 24 Feb 2014 23:02:56
Message-Id: 20140224230248.6FFDD2004C@flycatcher.gentoo.org
1 Author: mpagano
2 Date: 2014-02-24 23:02:48 +0000 (Mon, 24 Feb 2014)
3 New Revision: 2694
4
5 Added:
6 genpatches-2.6/trunk/3.4/1081_linux-3.4.82.patch
7 Modified:
8 genpatches-2.6/trunk/3.4/0000_README
9 Log:
10 Linux patch 3.4.82
11
12 Modified: genpatches-2.6/trunk/3.4/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/3.4/0000_README 2014-02-24 20:15:22 UTC (rev 2693)
15 +++ genpatches-2.6/trunk/3.4/0000_README 2014-02-24 23:02:48 UTC (rev 2694)
16 @@ -363,6 +363,10 @@
17 From: http://www.kernel.org
18 Desc: Linux 3.4.81
19
20 +Patch: 1081_linux-3.4.82.patch
21 +From: http://www.kernel.org
22 +Desc: Linux 3.4.82
23 +
24 Patch: 1500_XATTR_USER_PREFIX.patch
25 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
26 Desc: Support for namespace user.pax.* on tmpfs.
27
28 Added: genpatches-2.6/trunk/3.4/1081_linux-3.4.82.patch
29 ===================================================================
30 --- genpatches-2.6/trunk/3.4/1081_linux-3.4.82.patch (rev 0)
31 +++ genpatches-2.6/trunk/3.4/1081_linux-3.4.82.patch 2014-02-24 23:02:48 UTC (rev 2694)
32 @@ -0,0 +1,633 @@
33 +diff --git a/Makefile b/Makefile
34 +index 5e1e1d6e0736..ee80efa38844 100644
35 +--- a/Makefile
36 ++++ b/Makefile
37 +@@ -1,6 +1,6 @@
38 + VERSION = 3
39 + PATCHLEVEL = 4
40 +-SUBLEVEL = 81
41 ++SUBLEVEL = 82
42 + EXTRAVERSION =
43 + NAME = Saber-toothed Squirrel
44 +
45 +diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
46 +index 99348c0eaa41..78be2459c9a1 100644
47 +--- a/arch/s390/kernel/head64.S
48 ++++ b/arch/s390/kernel/head64.S
49 +@@ -61,7 +61,7 @@ ENTRY(startup_continue)
50 + .quad 0 # cr12: tracing off
51 + .quad 0 # cr13: home space segment table
52 + .quad 0xc0000000 # cr14: machine check handling off
53 +- .quad 0 # cr15: linkage stack operations
54 ++ .quad .Llinkage_stack # cr15: linkage stack operations
55 + .Lpcmsk:.quad 0x0000000180000000
56 + .L4malign:.quad 0xffffffffffc00000
57 + .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8
58 +@@ -69,12 +69,15 @@ ENTRY(startup_continue)
59 + .Lparmaddr:
60 + .quad PARMAREA
61 + .align 64
62 +-.Lduct: .long 0,0,0,0,.Lduald,0,0,0
63 ++.Lduct: .long 0,.Laste,.Laste,0,.Lduald,0,0,0
64 + .long 0,0,0,0,0,0,0,0
65 ++.Laste: .quad 0,0xffffffffffffffff,0,0,0,0,0,0
66 + .align 128
67 + .Lduald:.rept 8
68 + .long 0x80000000,0,0,0 # invalid access-list entries
69 + .endr
70 ++.Llinkage_stack:
71 ++ .long 0,0,0x89000000,0,0,0,0x8a000000,0
72 +
73 + ENTRY(_ehead)
74 +
75 +diff --git a/arch/s390/mm/page-states.c b/arch/s390/mm/page-states.c
76 +index a90d45e9dfb0..27c50f4d90cb 100644
77 +--- a/arch/s390/mm/page-states.c
78 ++++ b/arch/s390/mm/page-states.c
79 +@@ -12,6 +12,8 @@
80 + #include <linux/mm.h>
81 + #include <linux/gfp.h>
82 + #include <linux/init.h>
83 ++#include <asm/setup.h>
84 ++#include <asm/ipl.h>
85 +
86 + #define ESSA_SET_STABLE 1
87 + #define ESSA_SET_UNUSED 2
88 +@@ -41,6 +43,14 @@ void __init cmma_init(void)
89 +
90 + if (!cmma_flag)
91 + return;
92 ++ /*
93 ++ * Disable CMM for dump, otherwise the tprot based memory
94 ++ * detection can fail because of unstable pages.
95 ++ */
96 ++ if (OLDMEM_BASE || ipl_info.type == IPL_TYPE_FCP_DUMP) {
97 ++ cmma_flag = 0;
98 ++ return;
99 ++ }
100 + asm volatile(
101 + " .insn rrf,0xb9ab0000,%1,%1,0,0\n"
102 + "0: la %0,0\n"
103 +diff --git a/block/blk-lib.c b/block/blk-lib.c
104 +index 2b461b496a78..36751e211bb8 100644
105 +--- a/block/blk-lib.c
106 ++++ b/block/blk-lib.c
107 +@@ -101,6 +101,14 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
108 +
109 + atomic_inc(&bb.done);
110 + submit_bio(type, bio);
111 ++
112 ++ /*
113 ++ * We can loop for a long time in here, if someone does
114 ++ * full device discards (like mkfs). Be nice and allow
115 ++ * us to schedule out to avoid softlocking if preempt
116 ++ * is disabled.
117 ++ */
118 ++ cond_resched();
119 + }
120 +
121 + /* Wait for bios in-flight */
122 +diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
123 +index 4e86393a09cf..a81cdd7b9d83 100644
124 +--- a/drivers/block/xen-blkfront.c
125 ++++ b/drivers/block/xen-blkfront.c
126 +@@ -1303,13 +1303,16 @@ static void blkback_changed(struct xenbus_device *dev,
127 + case XenbusStateReconfiguring:
128 + case XenbusStateReconfigured:
129 + case XenbusStateUnknown:
130 +- case XenbusStateClosed:
131 + break;
132 +
133 + case XenbusStateConnected:
134 + blkfront_connect(info);
135 + break;
136 +
137 ++ case XenbusStateClosed:
138 ++ if (dev->state == XenbusStateClosed)
139 ++ break;
140 ++ /* Missed the backend's Closing state -- fallthrough */
141 + case XenbusStateClosing:
142 + blkfront_closing(info);
143 + break;
144 +diff --git a/drivers/char/raw.c b/drivers/char/raw.c
145 +index 54a3a6d09819..59596692df3e 100644
146 +--- a/drivers/char/raw.c
147 ++++ b/drivers/char/raw.c
148 +@@ -190,7 +190,7 @@ static int bind_get(int number, dev_t *dev)
149 + struct raw_device_data *rawdev;
150 + struct block_device *bdev;
151 +
152 +- if (number <= 0 || number >= MAX_RAW_MINORS)
153 ++ if (number <= 0 || number >= max_raw_minors)
154 + return -EINVAL;
155 +
156 + rawdev = &raw_devices[number];
157 +diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
158 +index 060b96064469..d25205309d45 100644
159 +--- a/drivers/infiniband/hw/qib/qib_iba7322.c
160 ++++ b/drivers/infiniband/hw/qib/qib_iba7322.c
161 +@@ -2279,6 +2279,11 @@ static int qib_7322_bringup_serdes(struct qib_pportdata *ppd)
162 + qib_write_kreg_port(ppd, krp_ibcctrl_a, ppd->cpspec->ibcctrl_a);
163 + qib_write_kreg(dd, kr_scratch, 0ULL);
164 +
165 ++ /* ensure previous Tx parameters are not still forced */
166 ++ qib_write_kreg_port(ppd, krp_tx_deemph_override,
167 ++ SYM_MASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
168 ++ reset_tx_deemphasis_override));
169 ++
170 + if (qib_compat_ddr_negotiate) {
171 + ppd->cpspec->ibdeltainprog = 1;
172 + ppd->cpspec->ibsymsnap = read_7322_creg32_port(ppd,
173 +diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
174 +index 3aed841ce84b..17b918d3d6b3 100644
175 +--- a/drivers/md/raid5.c
176 ++++ b/drivers/md/raid5.c
177 +@@ -4678,23 +4678,43 @@ raid5_size(struct mddev *mddev, sector_t sectors, int raid_disks)
178 + return sectors * (raid_disks - conf->max_degraded);
179 + }
180 +
181 ++static void free_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu)
182 ++{
183 ++ safe_put_page(percpu->spare_page);
184 ++ kfree(percpu->scribble);
185 ++ percpu->spare_page = NULL;
186 ++ percpu->scribble = NULL;
187 ++}
188 ++
189 ++static int alloc_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu)
190 ++{
191 ++ if (conf->level == 6 && !percpu->spare_page)
192 ++ percpu->spare_page = alloc_page(GFP_KERNEL);
193 ++ if (!percpu->scribble)
194 ++ percpu->scribble = kmalloc(conf->scribble_len, GFP_KERNEL);
195 ++
196 ++ if (!percpu->scribble || (conf->level == 6 && !percpu->spare_page)) {
197 ++ free_scratch_buffer(conf, percpu);
198 ++ return -ENOMEM;
199 ++ }
200 ++
201 ++ return 0;
202 ++}
203 ++
204 + static void raid5_free_percpu(struct r5conf *conf)
205 + {
206 +- struct raid5_percpu *percpu;
207 + unsigned long cpu;
208 +
209 + if (!conf->percpu)
210 + return;
211 +
212 +- get_online_cpus();
213 +- for_each_possible_cpu(cpu) {
214 +- percpu = per_cpu_ptr(conf->percpu, cpu);
215 +- safe_put_page(percpu->spare_page);
216 +- kfree(percpu->scribble);
217 +- }
218 + #ifdef CONFIG_HOTPLUG_CPU
219 + unregister_cpu_notifier(&conf->cpu_notify);
220 + #endif
221 ++
222 ++ get_online_cpus();
223 ++ for_each_possible_cpu(cpu)
224 ++ free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu));
225 + put_online_cpus();
226 +
227 + free_percpu(conf->percpu);
228 +@@ -4720,15 +4740,7 @@ static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action,
229 + switch (action) {
230 + case CPU_UP_PREPARE:
231 + case CPU_UP_PREPARE_FROZEN:
232 +- if (conf->level == 6 && !percpu->spare_page)
233 +- percpu->spare_page = alloc_page(GFP_KERNEL);
234 +- if (!percpu->scribble)
235 +- percpu->scribble = kmalloc(conf->scribble_len, GFP_KERNEL);
236 +-
237 +- if (!percpu->scribble ||
238 +- (conf->level == 6 && !percpu->spare_page)) {
239 +- safe_put_page(percpu->spare_page);
240 +- kfree(percpu->scribble);
241 ++ if (alloc_scratch_buffer(conf, percpu)) {
242 + pr_err("%s: failed memory allocation for cpu%ld\n",
243 + __func__, cpu);
244 + return notifier_from_errno(-ENOMEM);
245 +@@ -4736,10 +4748,7 @@ static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action,
246 + break;
247 + case CPU_DEAD:
248 + case CPU_DEAD_FROZEN:
249 +- safe_put_page(percpu->spare_page);
250 +- kfree(percpu->scribble);
251 +- percpu->spare_page = NULL;
252 +- percpu->scribble = NULL;
253 ++ free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu));
254 + break;
255 + default:
256 + break;
257 +@@ -4751,40 +4760,29 @@ static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action,
258 + static int raid5_alloc_percpu(struct r5conf *conf)
259 + {
260 + unsigned long cpu;
261 +- struct page *spare_page;
262 +- struct raid5_percpu __percpu *allcpus;
263 +- void *scribble;
264 +- int err;
265 ++ int err = 0;
266 +
267 +- allcpus = alloc_percpu(struct raid5_percpu);
268 +- if (!allcpus)
269 ++ conf->percpu = alloc_percpu(struct raid5_percpu);
270 ++ if (!conf->percpu)
271 + return -ENOMEM;
272 +- conf->percpu = allcpus;
273 ++
274 ++#ifdef CONFIG_HOTPLUG_CPU
275 ++ conf->cpu_notify.notifier_call = raid456_cpu_notify;
276 ++ conf->cpu_notify.priority = 0;
277 ++ err = register_cpu_notifier(&conf->cpu_notify);
278 ++ if (err)
279 ++ return err;
280 ++#endif
281 +
282 + get_online_cpus();
283 +- err = 0;
284 + for_each_present_cpu(cpu) {
285 +- if (conf->level == 6) {
286 +- spare_page = alloc_page(GFP_KERNEL);
287 +- if (!spare_page) {
288 +- err = -ENOMEM;
289 +- break;
290 +- }
291 +- per_cpu_ptr(conf->percpu, cpu)->spare_page = spare_page;
292 +- }
293 +- scribble = kmalloc(conf->scribble_len, GFP_KERNEL);
294 +- if (!scribble) {
295 +- err = -ENOMEM;
296 ++ err = alloc_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu));
297 ++ if (err) {
298 ++ pr_err("%s: failed memory allocation for cpu%ld\n",
299 ++ __func__, cpu);
300 + break;
301 + }
302 +- per_cpu_ptr(conf->percpu, cpu)->scribble = scribble;
303 + }
304 +-#ifdef CONFIG_HOTPLUG_CPU
305 +- conf->cpu_notify.notifier_call = raid456_cpu_notify;
306 +- conf->cpu_notify.priority = 0;
307 +- if (err == 0)
308 +- err = register_cpu_notifier(&conf->cpu_notify);
309 +-#endif
310 + put_online_cpus();
311 +
312 + return err;
313 +diff --git a/drivers/power/max17040_battery.c b/drivers/power/max17040_battery.c
314 +index c284143cfcd7..ec8b948eea4d 100644
315 +--- a/drivers/power/max17040_battery.c
316 ++++ b/drivers/power/max17040_battery.c
317 +@@ -148,7 +148,7 @@ static void max17040_get_online(struct i2c_client *client)
318 + {
319 + struct max17040_chip *chip = i2c_get_clientdata(client);
320 +
321 +- if (chip->pdata->battery_online)
322 ++ if (chip->pdata && chip->pdata->battery_online)
323 + chip->online = chip->pdata->battery_online();
324 + else
325 + chip->online = 1;
326 +@@ -158,7 +158,8 @@ static void max17040_get_status(struct i2c_client *client)
327 + {
328 + struct max17040_chip *chip = i2c_get_clientdata(client);
329 +
330 +- if (!chip->pdata->charger_online || !chip->pdata->charger_enable) {
331 ++ if (!chip->pdata || !chip->pdata->charger_online
332 ++ || !chip->pdata->charger_enable) {
333 + chip->status = POWER_SUPPLY_STATUS_UNKNOWN;
334 + return;
335 + }
336 +diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
337 +index b7a034a3259e..3d8f662e4fe9 100644
338 +--- a/drivers/spi/spi.c
339 ++++ b/drivers/spi/spi.c
340 +@@ -572,9 +572,7 @@ static void spi_pump_messages(struct kthread_work *work)
341 + ret = master->transfer_one_message(master, master->cur_msg);
342 + if (ret) {
343 + dev_err(&master->dev,
344 +- "failed to transfer one message from queue: %d\n", ret);
345 +- master->cur_msg->status = ret;
346 +- spi_finalize_current_message(master);
347 ++ "failed to transfer one message from queue\n");
348 + return;
349 + }
350 + }
351 +diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c
352 +index a8458669350f..0cad46751e00 100644
353 +--- a/drivers/staging/iio/adc/ad799x_core.c
354 ++++ b/drivers/staging/iio/adc/ad799x_core.c
355 +@@ -873,7 +873,8 @@ static int __devinit ad799x_probe(struct i2c_client *client,
356 + return 0;
357 +
358 + error_free_irq:
359 +- free_irq(client->irq, indio_dev);
360 ++ if (client->irq > 0)
361 ++ free_irq(client->irq, indio_dev);
362 + error_cleanup_ring:
363 + ad799x_ring_cleanup(indio_dev);
364 + error_disable_reg:
365 +diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
366 +index 4a418e44d562..acc0eab58468 100644
367 +--- a/drivers/tty/n_gsm.c
368 ++++ b/drivers/tty/n_gsm.c
369 +@@ -1091,6 +1091,7 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
370 + {
371 + unsigned int addr = 0;
372 + unsigned int modem = 0;
373 ++ unsigned int brk = 0;
374 + struct gsm_dlci *dlci;
375 + int len = clen;
376 + u8 *dp = data;
377 +@@ -1117,6 +1118,16 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
378 + if (len == 0)
379 + return;
380 + }
381 ++ len--;
382 ++ if (len > 0) {
383 ++ while (gsm_read_ea(&brk, *dp++) == 0) {
384 ++ len--;
385 ++ if (len == 0)
386 ++ return;
387 ++ }
388 ++ modem <<= 7;
389 ++ modem |= (brk & 0x7f);
390 ++ }
391 + tty = tty_port_tty_get(&dlci->port);
392 + gsm_process_modem(tty, dlci, modem, clen);
393 + if (tty) {
394 +diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
395 +index 904e8341b2c9..84bd4593455e 100644
396 +--- a/drivers/usb/serial/ftdi_sio.c
397 ++++ b/drivers/usb/serial/ftdi_sio.c
398 +@@ -165,6 +165,7 @@ static struct usb_device_id id_table_combined [] = {
399 + { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
400 + { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
401 + { USB_DEVICE(FTDI_VID, FTDI_NXTCAM_PID) },
402 ++ { USB_DEVICE(FTDI_VID, FTDI_EV3CON_PID) },
403 + { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
404 + { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) },
405 + { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) },
406 +@@ -204,6 +205,8 @@ static struct usb_device_id id_table_combined [] = {
407 + { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
408 + { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
409 + { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
410 ++ { USB_DEVICE(FTDI_VID, FTDI_TAGSYS_LP101_PID) },
411 ++ { USB_DEVICE(FTDI_VID, FTDI_TAGSYS_P200X_PID) },
412 + { USB_DEVICE(FTDI_VID, FTDI_LENZ_LIUSB_PID) },
413 + { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
414 + { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
415 +diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
416 +index a7019d1e3058..1e2d369df86e 100644
417 +--- a/drivers/usb/serial/ftdi_sio_ids.h
418 ++++ b/drivers/usb/serial/ftdi_sio_ids.h
419 +@@ -50,6 +50,7 @@
420 + #define TI_XDS100V2_PID 0xa6d0
421 +
422 + #define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */
423 ++#define FTDI_EV3CON_PID 0xABB9 /* Mindstorms EV3 Console Adapter */
424 +
425 + /* US Interface Navigator (http://www.usinterface.com/) */
426 + #define FTDI_USINT_CAT_PID 0xb810 /* Navigator CAT and 2nd PTT lines */
427 +@@ -363,6 +364,12 @@
428 + /* Sprog II (Andrew Crosland's SprogII DCC interface) */
429 + #define FTDI_SPROG_II 0xF0C8
430 +
431 ++/*
432 ++ * Two of the Tagsys RFID Readers
433 ++ */
434 ++#define FTDI_TAGSYS_LP101_PID 0xF0E9 /* Tagsys L-P101 RFID*/
435 ++#define FTDI_TAGSYS_P200X_PID 0xF0EE /* Tagsys Medio P200x RFID*/
436 ++
437 + /* an infrared receiver for user access control with IR tags */
438 + #define FTDI_PIEGROUP_PID 0xF208 /* Product Id */
439 +
440 +diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
441 +index 9d7e865a518f..abfb45b3940a 100644
442 +--- a/drivers/usb/serial/option.c
443 ++++ b/drivers/usb/serial/option.c
444 +@@ -1376,7 +1376,8 @@ static const struct usb_device_id option_ids[] = {
445 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1267, 0xff, 0xff, 0xff) },
446 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1268, 0xff, 0xff, 0xff) },
447 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1269, 0xff, 0xff, 0xff) },
448 +- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff) },
449 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1270, 0xff, 0xff, 0xff),
450 ++ .driver_info = (kernel_ulong_t)&net_intf5_blacklist },
451 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1271, 0xff, 0xff, 0xff) },
452 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1272, 0xff, 0xff, 0xff) },
453 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1273, 0xff, 0xff, 0xff) },
454 +diff --git a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig
455 +index 685edc872654..144386bab90b 100644
456 +--- a/drivers/usb/storage/Kconfig
457 ++++ b/drivers/usb/storage/Kconfig
458 +@@ -19,7 +19,9 @@ config USB_STORAGE
459 +
460 + This option depends on 'SCSI' support being enabled, but you
461 + probably also need 'SCSI device support: SCSI disk support'
462 +- (BLK_DEV_SD) for most USB storage devices.
463 ++ (BLK_DEV_SD) for most USB storage devices. Some devices also
464 ++ will require 'Probe all LUNs on each SCSI device'
465 ++ (SCSI_MULTI_LUN).
466 +
467 + To compile this driver as a module, choose M here: the
468 + module will be called usb-storage.
469 +diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
470 +index 11418da9bc09..3a7fd6f6af4f 100644
471 +--- a/drivers/usb/storage/scsiglue.c
472 ++++ b/drivers/usb/storage/scsiglue.c
473 +@@ -78,6 +78,8 @@ static const char* host_info(struct Scsi_Host *host)
474 +
475 + static int slave_alloc (struct scsi_device *sdev)
476 + {
477 ++ struct us_data *us = host_to_us(sdev->host);
478 ++
479 + /*
480 + * Set the INQUIRY transfer length to 36. We don't use any of
481 + * the extra data and many devices choke if asked for more or
482 +@@ -102,6 +104,10 @@ static int slave_alloc (struct scsi_device *sdev)
483 + */
484 + blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
485 +
486 ++ /* Tell the SCSI layer if we know there is more than one LUN */
487 ++ if (us->protocol == USB_PR_BULK && us->max_lun > 0)
488 ++ sdev->sdev_bflags |= BLIST_FORCELUN;
489 ++
490 + return 0;
491 + }
492 +
493 +diff --git a/drivers/usb/storage/unusual_cypress.h b/drivers/usb/storage/unusual_cypress.h
494 +index 65a6a75066a8..82e8ed0324e3 100644
495 +--- a/drivers/usb/storage/unusual_cypress.h
496 ++++ b/drivers/usb/storage/unusual_cypress.h
497 +@@ -31,7 +31,7 @@ UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999,
498 + "Cypress ISD-300LP",
499 + USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
500 +
501 +-UNUSUAL_DEV( 0x14cd, 0x6116, 0x0000, 0x0219,
502 ++UNUSUAL_DEV( 0x14cd, 0x6116, 0x0160, 0x0160,
503 + "Super Top",
504 + "USB 2.0 SATA BRIDGE",
505 + USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
506 +diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
507 +index 08d69e5fc143..bbe9adb0eb66 100644
508 +--- a/drivers/usb/storage/unusual_devs.h
509 ++++ b/drivers/usb/storage/unusual_devs.h
510 +@@ -1441,6 +1441,13 @@ UNUSUAL_DEV( 0x0f88, 0x042e, 0x0100, 0x0100,
511 + USB_SC_DEVICE, USB_PR_DEVICE, NULL,
512 + US_FL_FIX_CAPACITY ),
513 +
514 ++/* Reported by Moritz Moeller-Herrmann <moritz-kernel@××××××××××××××××.de> */
515 ++UNUSUAL_DEV( 0x0fca, 0x8004, 0x0201, 0x0201,
516 ++ "Research In Motion",
517 ++ "BlackBerry Bold 9000",
518 ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
519 ++ US_FL_MAX_SECTORS_64 ),
520 ++
521 + /* Reported by Michael Stattmann <michael@×××××××××.com> */
522 + UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000,
523 + "Sony Ericsson",
524 +diff --git a/fs/file.c b/fs/file.c
525 +index ba3f6053025c..d512ca5ea28f 100644
526 +--- a/fs/file.c
527 ++++ b/fs/file.c
528 +@@ -47,7 +47,7 @@ static void *alloc_fdmem(size_t size)
529 + * vmalloc() if the allocation size will be considered "large" by the VM.
530 + */
531 + if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER)) {
532 +- void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN);
533 ++ void *data = kmalloc(size, GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY);
534 + if (data != NULL)
535 + return data;
536 + }
537 +diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
538 +index aff1c616aedf..43ccfd6150d9 100644
539 +--- a/fs/lockd/svclock.c
540 ++++ b/fs/lockd/svclock.c
541 +@@ -769,6 +769,7 @@ nlmsvc_grant_blocked(struct nlm_block *block)
542 + struct nlm_file *file = block->b_file;
543 + struct nlm_lock *lock = &block->b_call->a_args.lock;
544 + int error;
545 ++ loff_t fl_start, fl_end;
546 +
547 + dprintk("lockd: grant blocked lock %p\n", block);
548 +
549 +@@ -786,9 +787,16 @@ nlmsvc_grant_blocked(struct nlm_block *block)
550 + }
551 +
552 + /* Try the lock operation again */
553 ++ /* vfs_lock_file() can mangle fl_start and fl_end, but we need
554 ++ * them unchanged for the GRANT_MSG
555 ++ */
556 + lock->fl.fl_flags |= FL_SLEEP;
557 ++ fl_start = lock->fl.fl_start;
558 ++ fl_end = lock->fl.fl_end;
559 + error = vfs_lock_file(file->f_file, F_SETLK, &lock->fl, NULL);
560 + lock->fl.fl_flags &= ~FL_SLEEP;
561 ++ lock->fl.fl_start = fl_start;
562 ++ lock->fl.fl_end = fl_end;
563 +
564 + switch (error) {
565 + case 0:
566 +diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
567 +index 192a302d6cfd..8ab8e9390297 100644
568 +--- a/kernel/irq/irqdesc.c
569 ++++ b/kernel/irq/irqdesc.c
570 +@@ -274,6 +274,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
571 + {
572 + return (irq < NR_IRQS) ? irq_desc + irq : NULL;
573 + }
574 ++EXPORT_SYMBOL(irq_to_desc);
575 +
576 + static void free_desc(unsigned int irq)
577 + {
578 +diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
579 +index a470154e0408..955560e25e05 100644
580 +--- a/kernel/time/jiffies.c
581 ++++ b/kernel/time/jiffies.c
582 +@@ -51,7 +51,13 @@
583 + * HZ shrinks, so values greater than 8 overflow 32bits when
584 + * HZ=100.
585 + */
586 ++#if HZ < 34
587 ++#define JIFFIES_SHIFT 6
588 ++#elif HZ < 67
589 ++#define JIFFIES_SHIFT 7
590 ++#else
591 + #define JIFFIES_SHIFT 8
592 ++#endif
593 +
594 + static cycle_t jiffies_read(struct clocksource *cs)
595 + {
596 +diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
597 +index 28667834181e..bd0f1c499e0a 100644
598 +--- a/kernel/trace/ring_buffer.c
599 ++++ b/kernel/trace/ring_buffer.c
600 +@@ -2008,6 +2008,13 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
601 + write &= RB_WRITE_MASK;
602 + tail = write - length;
603 +
604 ++ /*
605 ++ * If this is the first commit on the page, then it has the same
606 ++ * timestamp as the page itself.
607 ++ */
608 ++ if (!tail)
609 ++ delta = 0;
610 ++
611 + /* See if we shot pass the end of this buffer page */
612 + if (unlikely(write > BUF_PAGE_SIZE))
613 + return rb_move_tail(cpu_buffer, length, tail,
614 +diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
615 +index eace7664c805..e4b7188a0572 100644
616 +--- a/net/mac80211/tx.c
617 ++++ b/net/mac80211/tx.c
618 +@@ -907,7 +907,7 @@ static int ieee80211_fragment(struct ieee80211_tx_data *tx,
619 + }
620 +
621 + /* adjust first fragment's length */
622 +- skb->len = hdrlen + per_fragm;
623 ++ skb_trim(skb, hdrlen + per_fragm);
624 + return 0;
625 + }
626 +
627 +diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
628 +index 44ddaa542db6..ea243fef9f02 100644
629 +--- a/scripts/mod/file2alias.c
630 ++++ b/scripts/mod/file2alias.c
631 +@@ -186,8 +186,8 @@ static void do_usb_entry(struct usb_device_id *id,
632 + range_lo < 0x9 ? "[%X-9" : "[%X",
633 + range_lo);
634 + sprintf(alias + strlen(alias),
635 +- range_hi > 0xA ? "a-%X]" : "%X]",
636 +- range_lo);
637 ++ range_hi > 0xA ? "A-%X]" : "%X]",
638 ++ range_hi);
639 + }
640 + }
641 + if (bcdDevice_initial_digits < (sizeof(id->bcdDevice_lo) * 2 - 1))
642 +diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c
643 +index 88b2fe3ddf42..00d86427af0f 100644
644 +--- a/virt/kvm/coalesced_mmio.c
645 ++++ b/virt/kvm/coalesced_mmio.c
646 +@@ -154,17 +154,13 @@ int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm,
647 + list_add_tail(&dev->list, &kvm->coalesced_zones);
648 + mutex_unlock(&kvm->slots_lock);
649 +
650 +- return ret;
651 ++ return 0;
652 +
653 + out_free_dev:
654 + mutex_unlock(&kvm->slots_lock);
655 +-
656 + kfree(dev);
657 +
658 +- if (dev == NULL)
659 +- return -ENXIO;
660 +-
661 +- return 0;
662 ++ return ret;
663 + }
664 +
665 + int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm,