Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r2720 - genpatches-2.6/trunk/3.10
Date: Mon, 31 Mar 2014 18:42:35
Message-Id: 20140331184220.BBBC42005C@flycatcher.gentoo.org
1 Author: mpagano
2 Date: 2014-03-31 18:42:20 +0000 (Mon, 31 Mar 2014)
3 New Revision: 2720
4
5 Added:
6 genpatches-2.6/trunk/3.10/1034_linux-3.10.35.patch
7 Modified:
8 genpatches-2.6/trunk/3.10/0000_README
9 Log:
10 Linux patch 3.10.35
11
12 Modified: genpatches-2.6/trunk/3.10/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/3.10/0000_README 2014-03-31 17:54:26 UTC (rev 2719)
15 +++ genpatches-2.6/trunk/3.10/0000_README 2014-03-31 18:42:20 UTC (rev 2720)
16 @@ -178,6 +178,10 @@
17 From: http://www.kernel.org
18 Desc: Linux 3.10.34
19
20 +Patch: 1034_linux-3.10.35.patch
21 +From: http://www.kernel.org
22 +Desc: Linux 3.10.35
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.10/1034_linux-3.10.35.patch
29 ===================================================================
30 --- genpatches-2.6/trunk/3.10/1034_linux-3.10.35.patch (rev 0)
31 +++ genpatches-2.6/trunk/3.10/1034_linux-3.10.35.patch 2014-03-31 18:42:20 UTC (rev 2720)
32 @@ -0,0 +1,996 @@
33 +diff --git a/Makefile b/Makefile
34 +index 571a1bf14868..06b31fce1ff5 100644
35 +--- a/Makefile
36 ++++ b/Makefile
37 +@@ -1,6 +1,6 @@
38 + VERSION = 3
39 + PATCHLEVEL = 10
40 +-SUBLEVEL = 34
41 ++SUBLEVEL = 35
42 + EXTRAVERSION =
43 + NAME = TOSSUG Baby Fish
44 +
45 +diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h
46 +index 12f71a190422..f94784f0e3a6 100644
47 +--- a/arch/arm/include/asm/outercache.h
48 ++++ b/arch/arm/include/asm/outercache.h
49 +@@ -37,10 +37,10 @@ struct outer_cache_fns {
50 + void (*resume)(void);
51 + };
52 +
53 +-#ifdef CONFIG_OUTER_CACHE
54 +-
55 + extern struct outer_cache_fns outer_cache;
56 +
57 ++#ifdef CONFIG_OUTER_CACHE
58 ++
59 + static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
60 + {
61 + if (outer_cache.inv_range)
62 +diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
63 +index 5ed19e88874b..35d1029d7c9d 100644
64 +--- a/arch/arm/mach-highbank/highbank.c
65 ++++ b/arch/arm/mach-highbank/highbank.c
66 +@@ -65,14 +65,12 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
67 + HB_JUMP_TABLE_PHYS(cpu) + 15);
68 + }
69 +
70 +-#ifdef CONFIG_CACHE_L2X0
71 + static void highbank_l2x0_disable(void)
72 + {
73 + outer_flush_all();
74 + /* Disable PL310 L2 Cache controller */
75 + highbank_smc1(0x102, 0x0);
76 + }
77 +-#endif
78 +
79 + static void __init highbank_init_irq(void)
80 + {
81 +@@ -81,12 +79,13 @@ static void __init highbank_init_irq(void)
82 + if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
83 + highbank_scu_map_io();
84 +
85 +-#ifdef CONFIG_CACHE_L2X0
86 + /* Enable PL310 L2 Cache controller */
87 +- highbank_smc1(0x102, 0x1);
88 +- l2x0_of_init(0, ~0UL);
89 +- outer_cache.disable = highbank_l2x0_disable;
90 +-#endif
91 ++ if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
92 ++ of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
93 ++ highbank_smc1(0x102, 0x1);
94 ++ l2x0_of_init(0, ~0UL);
95 ++ outer_cache.disable = highbank_l2x0_disable;
96 ++ }
97 + }
98 +
99 + static void __init highbank_timer_init(void)
100 +diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
101 +index 004cc87b781c..711c649f80b7 100644
102 +--- a/arch/x86/kvm/mmu.c
103 ++++ b/arch/x86/kvm/mmu.c
104 +@@ -2585,6 +2585,9 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
105 + int emulate = 0;
106 + gfn_t pseudo_gfn;
107 +
108 ++ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
109 ++ return 0;
110 ++
111 + for_each_shadow_entry(vcpu, (u64)gfn << PAGE_SHIFT, iterator) {
112 + if (iterator.level == level) {
113 + mmu_set_spte(vcpu, iterator.sptep, ACC_ALL,
114 +@@ -2748,6 +2751,9 @@ static bool fast_page_fault(struct kvm_vcpu *vcpu, gva_t gva, int level,
115 + bool ret = false;
116 + u64 spte = 0ull;
117 +
118 ++ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
119 ++ return false;
120 ++
121 + if (!page_fault_can_be_fast(vcpu, error_code))
122 + return false;
123 +
124 +@@ -3139,6 +3145,9 @@ static u64 walk_shadow_page_get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr)
125 + struct kvm_shadow_walk_iterator iterator;
126 + u64 spte = 0ull;
127 +
128 ++ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
129 ++ return spte;
130 ++
131 + walk_shadow_page_lockless_begin(vcpu);
132 + for_each_shadow_entry_lockless(vcpu, addr, iterator, spte)
133 + if (!is_shadow_present_pte(spte))
134 +@@ -4329,6 +4338,9 @@ int kvm_mmu_get_spte_hierarchy(struct kvm_vcpu *vcpu, u64 addr, u64 sptes[4])
135 + u64 spte;
136 + int nr_sptes = 0;
137 +
138 ++ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
139 ++ return nr_sptes;
140 ++
141 + walk_shadow_page_lockless_begin(vcpu);
142 + for_each_shadow_entry_lockless(vcpu, addr, iterator, spte) {
143 + sptes[iterator.level-1] = spte;
144 +diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
145 +index da20860b457a..7e6090e13237 100644
146 +--- a/arch/x86/kvm/paging_tmpl.h
147 ++++ b/arch/x86/kvm/paging_tmpl.h
148 +@@ -423,6 +423,9 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
149 + if (FNAME(gpte_changed)(vcpu, gw, top_level))
150 + goto out_gpte_changed;
151 +
152 ++ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
153 ++ goto out_gpte_changed;
154 ++
155 + for (shadow_walk_init(&it, vcpu, addr);
156 + shadow_walk_okay(&it) && it.level > gw->level;
157 + shadow_walk_next(&it)) {
158 +@@ -671,6 +674,11 @@ static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva)
159 + */
160 + mmu_topup_memory_caches(vcpu);
161 +
162 ++ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa)) {
163 ++ WARN_ON(1);
164 ++ return;
165 ++ }
166 ++
167 + spin_lock(&vcpu->kvm->mmu_lock);
168 + for_each_shadow_entry(vcpu, gva, iterator) {
169 + level = iterator.level;
170 +diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
171 +index 5402c94ab768..7cdafb6dc705 100644
172 +--- a/arch/x86/kvm/vmx.c
173 ++++ b/arch/x86/kvm/vmx.c
174 +@@ -7133,8 +7133,8 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
175 + struct vcpu_vmx *vmx = to_vmx(vcpu);
176 +
177 + free_vpid(vmx);
178 +- free_nested(vmx);
179 + free_loaded_vmcs(vmx->loaded_vmcs);
180 ++ free_nested(vmx);
181 + kfree(vmx->guest_msrs);
182 + kvm_vcpu_uninit(vcpu);
183 + kmem_cache_free(kvm_vcpu_cache, vmx);
184 +diff --git a/arch/x86/net/bpf_jit.S b/arch/x86/net/bpf_jit.S
185 +index 877b9a1b2152..01495755701b 100644
186 +--- a/arch/x86/net/bpf_jit.S
187 ++++ b/arch/x86/net/bpf_jit.S
188 +@@ -140,7 +140,7 @@ bpf_slow_path_byte_msh:
189 + push %r9; \
190 + push SKBDATA; \
191 + /* rsi already has offset */ \
192 +- mov $SIZE,%ecx; /* size */ \
193 ++ mov $SIZE,%edx; /* size */ \
194 + call bpf_internal_load_pointer_neg_helper; \
195 + test %rax,%rax; \
196 + pop SKBDATA; \
197 +diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
198 +index 1e8e42fb03a4..1fb1a7b5a754 100644
199 +--- a/drivers/input/mouse/elantech.c
200 ++++ b/drivers/input/mouse/elantech.c
201 +@@ -486,6 +486,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse)
202 + unsigned char *packet = psmouse->packet;
203 +
204 + input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
205 ++ input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
206 + input_mt_report_pointer_emulation(dev, true);
207 + input_sync(dev);
208 + }
209 +@@ -954,6 +955,44 @@ static int elantech_get_resolution_v4(struct psmouse *psmouse,
210 + }
211 +
212 + /*
213 ++ * Advertise INPUT_PROP_BUTTONPAD for clickpads. The testing of bit 12 in
214 ++ * fw_version for this is based on the following fw_version & caps table:
215 ++ *
216 ++ * Laptop-model: fw_version: caps: buttons:
217 ++ * Acer S3 0x461f00 10, 13, 0e clickpad
218 ++ * Acer S7-392 0x581f01 50, 17, 0d clickpad
219 ++ * Acer V5-131 0x461f02 01, 16, 0c clickpad
220 ++ * Acer V5-551 0x461f00 ? clickpad
221 ++ * Asus K53SV 0x450f01 78, 15, 0c 2 hw buttons
222 ++ * Asus G46VW 0x460f02 00, 18, 0c 2 hw buttons
223 ++ * Asus G750JX 0x360f00 00, 16, 0c 2 hw buttons
224 ++ * Asus UX31 0x361f00 20, 15, 0e clickpad
225 ++ * Asus UX32VD 0x361f02 00, 15, 0e clickpad
226 ++ * Avatar AVIU-145A2 0x361f00 ? clickpad
227 ++ * Gigabyte U2442 0x450f01 58, 17, 0c 2 hw buttons
228 ++ * Lenovo L430 0x350f02 b9, 15, 0c 2 hw buttons (*)
229 ++ * Samsung NF210 0x150b00 78, 14, 0a 2 hw buttons
230 ++ * Samsung NP770Z5E 0x575f01 10, 15, 0f clickpad
231 ++ * Samsung NP700Z5B 0x361f06 21, 15, 0f clickpad
232 ++ * Samsung NP900X3E-A02 0x575f03 ? clickpad
233 ++ * Samsung NP-QX410 0x851b00 19, 14, 0c clickpad
234 ++ * Samsung RC512 0x450f00 08, 15, 0c 2 hw buttons
235 ++ * Samsung RF710 0x450f00 ? 2 hw buttons
236 ++ * System76 Pangolin 0x250f01 ? 2 hw buttons
237 ++ * (*) + 3 trackpoint buttons
238 ++ */
239 ++static void elantech_set_buttonpad_prop(struct psmouse *psmouse)
240 ++{
241 ++ struct input_dev *dev = psmouse->dev;
242 ++ struct elantech_data *etd = psmouse->private;
243 ++
244 ++ if (etd->fw_version & 0x001000) {
245 ++ __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
246 ++ __clear_bit(BTN_RIGHT, dev->keybit);
247 ++ }
248 ++}
249 ++
250 ++/*
251 + * Set the appropriate event bits for the input subsystem
252 + */
253 + static int elantech_set_input_params(struct psmouse *psmouse)
254 +@@ -996,6 +1035,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)
255 + __set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
256 + /* fall through */
257 + case 3:
258 ++ if (etd->hw_version == 3)
259 ++ elantech_set_buttonpad_prop(psmouse);
260 + input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
261 + input_set_abs_params(dev, ABS_Y, y_min, y_max, 0, 0);
262 + if (etd->reports_pressure) {
263 +@@ -1017,9 +1058,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)
264 + */
265 + psmouse_warn(psmouse, "couldn't query resolution data.\n");
266 + }
267 +- /* v4 is clickpad, with only one button. */
268 +- __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
269 +- __clear_bit(BTN_RIGHT, dev->keybit);
270 ++ elantech_set_buttonpad_prop(psmouse);
271 + __set_bit(BTN_TOOL_QUADTAP, dev->keybit);
272 + /* For X to recognize me as touchpad. */
273 + input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
274 +diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
275 +index aaf23aeae2ea..3d838c0b495d 100644
276 +--- a/drivers/input/tablet/wacom_sys.c
277 ++++ b/drivers/input/tablet/wacom_sys.c
278 +@@ -339,7 +339,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
279 + struct usb_device *dev = interface_to_usbdev(intf);
280 + char limit = 0;
281 + /* result has to be defined as int for some devices */
282 +- int result = 0;
283 ++ int result = 0, touch_max = 0;
284 + int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0;
285 + unsigned char *report;
286 +
287 +@@ -386,7 +386,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
288 + if (usage == WCM_DESKTOP) {
289 + if (finger) {
290 + features->device_type = BTN_TOOL_FINGER;
291 +-
292 ++ /* touch device at least supports one touch point */
293 ++ touch_max = 1;
294 + switch (features->type) {
295 + case TABLETPC2FG:
296 + features->pktlen = WACOM_PKGLEN_TPC2FG;
297 +@@ -539,6 +540,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
298 + }
299 +
300 + out:
301 ++ if (!features->touch_max && touch_max)
302 ++ features->touch_max = touch_max;
303 + result = 0;
304 + kfree(report);
305 + return result;
306 +diff --git a/drivers/media/pci/cx18/cx18-driver.c b/drivers/media/pci/cx18/cx18-driver.c
307 +index 13c9718a5ace..16e89f026bca 100644
308 +--- a/drivers/media/pci/cx18/cx18-driver.c
309 ++++ b/drivers/media/pci/cx18/cx18-driver.c
310 +@@ -327,13 +327,16 @@ void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv)
311 + struct i2c_client *c;
312 + u8 eedata[256];
313 +
314 ++ memset(tv, 0, sizeof(*tv));
315 ++
316 + c = kzalloc(sizeof(*c), GFP_KERNEL);
317 ++ if (!c)
318 ++ return;
319 +
320 + strlcpy(c->name, "cx18 tveeprom tmp", sizeof(c->name));
321 + c->adapter = &cx->i2c_adap[0];
322 + c->addr = 0xa0 >> 1;
323 +
324 +- memset(tv, 0, sizeof(*tv));
325 + if (tveeprom_read(c, eedata, sizeof(eedata)))
326 + goto ret;
327 +
328 +diff --git a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c
329 +index 20e345d9fe8f..a1c641e18362 100644
330 +--- a/drivers/media/usb/dvb-usb/cxusb.c
331 ++++ b/drivers/media/usb/dvb-usb/cxusb.c
332 +@@ -149,6 +149,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
333 + int num)
334 + {
335 + struct dvb_usb_device *d = i2c_get_adapdata(adap);
336 ++ int ret;
337 + int i;
338 +
339 + if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
340 +@@ -173,7 +174,8 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
341 + if (1 + msg[i].len > sizeof(ibuf)) {
342 + warn("i2c rd: len=%d is too big!\n",
343 + msg[i].len);
344 +- return -EOPNOTSUPP;
345 ++ ret = -EOPNOTSUPP;
346 ++ goto unlock;
347 + }
348 + obuf[0] = 0;
349 + obuf[1] = msg[i].len;
350 +@@ -193,12 +195,14 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
351 + if (3 + msg[i].len > sizeof(obuf)) {
352 + warn("i2c wr: len=%d is too big!\n",
353 + msg[i].len);
354 +- return -EOPNOTSUPP;
355 ++ ret = -EOPNOTSUPP;
356 ++ goto unlock;
357 + }
358 + if (1 + msg[i + 1].len > sizeof(ibuf)) {
359 + warn("i2c rd: len=%d is too big!\n",
360 + msg[i + 1].len);
361 +- return -EOPNOTSUPP;
362 ++ ret = -EOPNOTSUPP;
363 ++ goto unlock;
364 + }
365 + obuf[0] = msg[i].len;
366 + obuf[1] = msg[i+1].len;
367 +@@ -223,7 +227,8 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
368 + if (2 + msg[i].len > sizeof(obuf)) {
369 + warn("i2c wr: len=%d is too big!\n",
370 + msg[i].len);
371 +- return -EOPNOTSUPP;
372 ++ ret = -EOPNOTSUPP;
373 ++ goto unlock;
374 + }
375 + obuf[0] = msg[i].addr;
376 + obuf[1] = msg[i].len;
377 +@@ -237,8 +242,14 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
378 + }
379 + }
380 +
381 ++ if (i == num)
382 ++ ret = num;
383 ++ else
384 ++ ret = -EREMOTEIO;
385 ++
386 ++unlock:
387 + mutex_unlock(&d->i2c_mutex);
388 +- return i == num ? num : -EREMOTEIO;
389 ++ return ret;
390 + }
391 +
392 + static u32 cxusb_i2c_func(struct i2c_adapter *adapter)
393 +diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
394 +index 71b22f5a05ce..4170a45d17e0 100644
395 +--- a/drivers/media/usb/dvb-usb/dw2102.c
396 ++++ b/drivers/media/usb/dvb-usb/dw2102.c
397 +@@ -301,6 +301,7 @@ static int dw2102_serit_i2c_transfer(struct i2c_adapter *adap,
398 + static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num)
399 + {
400 + struct dvb_usb_device *d = i2c_get_adapdata(adap);
401 ++ int ret;
402 +
403 + if (!d)
404 + return -ENODEV;
405 +@@ -316,7 +317,8 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
406 + if (2 + msg[1].len > sizeof(ibuf)) {
407 + warn("i2c rd: len=%d is too big!\n",
408 + msg[1].len);
409 +- return -EOPNOTSUPP;
410 ++ ret = -EOPNOTSUPP;
411 ++ goto unlock;
412 + }
413 +
414 + obuf[0] = msg[0].addr << 1;
415 +@@ -340,7 +342,8 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
416 + if (2 + msg[0].len > sizeof(obuf)) {
417 + warn("i2c wr: len=%d is too big!\n",
418 + msg[1].len);
419 +- return -EOPNOTSUPP;
420 ++ ret = -EOPNOTSUPP;
421 ++ goto unlock;
422 + }
423 +
424 + obuf[0] = msg[0].addr << 1;
425 +@@ -357,7 +360,8 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
426 + if (2 + msg[0].len > sizeof(obuf)) {
427 + warn("i2c wr: len=%d is too big!\n",
428 + msg[1].len);
429 +- return -EOPNOTSUPP;
430 ++ ret = -EOPNOTSUPP;
431 ++ goto unlock;
432 + }
433 +
434 + obuf[0] = msg[0].addr << 1;
435 +@@ -386,15 +390,17 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
436 +
437 + break;
438 + }
439 ++ ret = num;
440 +
441 ++unlock:
442 + mutex_unlock(&d->i2c_mutex);
443 +- return num;
444 ++ return ret;
445 + }
446 +
447 + static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num)
448 + {
449 + struct dvb_usb_device *d = i2c_get_adapdata(adap);
450 +- int len, i, j;
451 ++ int len, i, j, ret;
452 +
453 + if (!d)
454 + return -ENODEV;
455 +@@ -430,7 +436,8 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
456 + if (2 + msg[j].len > sizeof(ibuf)) {
457 + warn("i2c rd: len=%d is too big!\n",
458 + msg[j].len);
459 +- return -EOPNOTSUPP;
460 ++ ret = -EOPNOTSUPP;
461 ++ goto unlock;
462 + }
463 +
464 + dw210x_op_rw(d->udev, 0xc3,
465 +@@ -466,7 +473,8 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
466 + if (2 + msg[j].len > sizeof(obuf)) {
467 + warn("i2c wr: len=%d is too big!\n",
468 + msg[j].len);
469 +- return -EOPNOTSUPP;
470 ++ ret = -EOPNOTSUPP;
471 ++ goto unlock;
472 + }
473 +
474 + obuf[0] = msg[j].addr << 1;
475 +@@ -481,15 +489,18 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
476 + }
477 +
478 + }
479 ++ ret = num;
480 +
481 ++unlock:
482 + mutex_unlock(&d->i2c_mutex);
483 +- return num;
484 ++ return ret;
485 + }
486 +
487 + static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
488 + int num)
489 + {
490 + struct dvb_usb_device *d = i2c_get_adapdata(adap);
491 ++ int ret;
492 + int i;
493 +
494 + if (!d)
495 +@@ -506,7 +517,8 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
496 + if (2 + msg[1].len > sizeof(ibuf)) {
497 + warn("i2c rd: len=%d is too big!\n",
498 + msg[1].len);
499 +- return -EOPNOTSUPP;
500 ++ ret = -EOPNOTSUPP;
501 ++ goto unlock;
502 + }
503 + obuf[0] = msg[0].addr << 1;
504 + obuf[1] = msg[0].len;
505 +@@ -530,7 +542,8 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
506 + if (2 + msg[0].len > sizeof(obuf)) {
507 + warn("i2c wr: len=%d is too big!\n",
508 + msg[0].len);
509 +- return -EOPNOTSUPP;
510 ++ ret = -EOPNOTSUPP;
511 ++ goto unlock;
512 + }
513 + obuf[0] = msg[0].addr << 1;
514 + obuf[1] = msg[0].len;
515 +@@ -556,9 +569,11 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
516 + msg[i].flags == 0 ? ">>>" : "<<<");
517 + debug_dump(msg[i].buf, msg[i].len, deb_xfer);
518 + }
519 ++ ret = num;
520 +
521 ++unlock:
522 + mutex_unlock(&d->i2c_mutex);
523 +- return num;
524 ++ return ret;
525 + }
526 +
527 + static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
528 +@@ -566,7 +581,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
529 + {
530 + struct dvb_usb_device *d = i2c_get_adapdata(adap);
531 + struct usb_device *udev;
532 +- int len, i, j;
533 ++ int len, i, j, ret;
534 +
535 + if (!d)
536 + return -ENODEV;
537 +@@ -618,7 +633,8 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
538 + if (msg[j].len > sizeof(ibuf)) {
539 + warn("i2c rd: len=%d is too big!\n",
540 + msg[j].len);
541 +- return -EOPNOTSUPP;
542 ++ ret = -EOPNOTSUPP;
543 ++ goto unlock;
544 + }
545 +
546 + dw210x_op_rw(d->udev, 0x91, 0, 0,
547 +@@ -652,7 +668,8 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
548 + if (2 + msg[j].len > sizeof(obuf)) {
549 + warn("i2c wr: len=%d is too big!\n",
550 + msg[j].len);
551 +- return -EOPNOTSUPP;
552 ++ ret = -EOPNOTSUPP;
553 ++ goto unlock;
554 + }
555 +
556 + obuf[0] = msg[j + 1].len;
557 +@@ -671,7 +688,8 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
558 + if (2 + msg[j].len > sizeof(obuf)) {
559 + warn("i2c wr: len=%d is too big!\n",
560 + msg[j].len);
561 +- return -EOPNOTSUPP;
562 ++ ret = -EOPNOTSUPP;
563 ++ goto unlock;
564 + }
565 + obuf[0] = msg[j].len + 1;
566 + obuf[1] = (msg[j].addr << 1);
567 +@@ -685,9 +703,11 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
568 + }
569 + }
570 + }
571 ++ ret = num;
572 +
573 ++unlock:
574 + mutex_unlock(&d->i2c_mutex);
575 +- return num;
576 ++ return ret;
577 + }
578 +
579 + static int su3000_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
580 +diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
581 +index d2bea3f07c73..69d3f59f8728 100644
582 +--- a/drivers/net/ethernet/intel/e100.c
583 ++++ b/drivers/net/ethernet/intel/e100.c
584 +@@ -3039,7 +3039,7 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
585 + *enable_wake = false;
586 + }
587 +
588 +- pci_disable_device(pdev);
589 ++ pci_clear_master(pdev);
590 + }
591 +
592 + static int __e100_power_off(struct pci_dev *pdev, bool wake)
593 +diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
594 +index f95de0d16216..1de59b0f8fa8 100644
595 +--- a/drivers/net/wireless/p54/txrx.c
596 ++++ b/drivers/net/wireless/p54/txrx.c
597 +@@ -587,7 +587,7 @@ static void p54_rx_stats(struct p54_common *priv, struct sk_buff *skb)
598 + chan = priv->curchan;
599 + if (chan) {
600 + struct survey_info *survey = &priv->survey[chan->hw_value];
601 +- survey->noise = clamp_t(s8, priv->noise, -128, 127);
602 ++ survey->noise = clamp(priv->noise, -128, 127);
603 + survey->channel_time = priv->survey_raw.active;
604 + survey->channel_time_tx = priv->survey_raw.tx;
605 + survey->channel_time_busy = priv->survey_raw.tx +
606 +diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
607 +index c59cc6ed7adb..a86d12326137 100644
608 +--- a/drivers/regulator/core.c
609 ++++ b/drivers/regulator/core.c
610 +@@ -1712,8 +1712,6 @@ static int _regulator_do_disable(struct regulator_dev *rdev)
611 +
612 + trace_regulator_disable_complete(rdev_get_name(rdev));
613 +
614 +- _notifier_call_chain(rdev, REGULATOR_EVENT_DISABLE,
615 +- NULL);
616 + return 0;
617 + }
618 +
619 +@@ -1737,6 +1735,8 @@ static int _regulator_disable(struct regulator_dev *rdev)
620 + rdev_err(rdev, "failed to disable\n");
621 + return ret;
622 + }
623 ++ _notifier_call_chain(rdev, REGULATOR_EVENT_DISABLE,
624 ++ NULL);
625 + }
626 +
627 + rdev->use_count = 0;
628 +@@ -1789,20 +1789,16 @@ static int _regulator_force_disable(struct regulator_dev *rdev)
629 + {
630 + int ret = 0;
631 +
632 +- /* force disable */
633 +- if (rdev->desc->ops->disable) {
634 +- /* ah well, who wants to live forever... */
635 +- ret = rdev->desc->ops->disable(rdev);
636 +- if (ret < 0) {
637 +- rdev_err(rdev, "failed to force disable\n");
638 +- return ret;
639 +- }
640 +- /* notify other consumers that power has been forced off */
641 +- _notifier_call_chain(rdev, REGULATOR_EVENT_FORCE_DISABLE |
642 +- REGULATOR_EVENT_DISABLE, NULL);
643 ++ ret = _regulator_do_disable(rdev);
644 ++ if (ret < 0) {
645 ++ rdev_err(rdev, "failed to force disable\n");
646 ++ return ret;
647 + }
648 +
649 +- return ret;
650 ++ _notifier_call_chain(rdev, REGULATOR_EVENT_FORCE_DISABLE |
651 ++ REGULATOR_EVENT_DISABLE, NULL);
652 ++
653 ++ return 0;
654 + }
655 +
656 + /**
657 +@@ -3788,8 +3784,6 @@ int regulator_suspend_finish(void)
658 +
659 + mutex_lock(&regulator_list_mutex);
660 + list_for_each_entry(rdev, &regulator_list, list) {
661 +- struct regulator_ops *ops = rdev->desc->ops;
662 +-
663 + mutex_lock(&rdev->mutex);
664 + if (rdev->use_count > 0 || rdev->constraints->always_on) {
665 + error = _regulator_do_enable(rdev);
666 +@@ -3798,12 +3792,10 @@ int regulator_suspend_finish(void)
667 + } else {
668 + if (!has_full_constraints)
669 + goto unlock;
670 +- if (!ops->disable)
671 +- goto unlock;
672 + if (!_regulator_is_enabled(rdev))
673 + goto unlock;
674 +
675 +- error = ops->disable(rdev);
676 ++ error = _regulator_do_disable(rdev);
677 + if (error)
678 + ret = error;
679 + }
680 +@@ -3993,7 +3985,7 @@ static int __init regulator_init_complete(void)
681 + ops = rdev->desc->ops;
682 + c = rdev->constraints;
683 +
684 +- if (!ops->disable || (c && c->always_on))
685 ++ if (c && c->always_on)
686 + continue;
687 +
688 + mutex_lock(&rdev->mutex);
689 +@@ -4014,7 +4006,7 @@ static int __init regulator_init_complete(void)
690 + /* We log since this may kill the system if it
691 + * goes wrong. */
692 + rdev_info(rdev, "disabling\n");
693 +- ret = ops->disable(rdev);
694 ++ ret = _regulator_do_disable(rdev);
695 + if (ret != 0) {
696 + rdev_err(rdev, "couldn't disable: %d\n", ret);
697 + }
698 +diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
699 +index 159e3c6d92b9..3581416a24d8 100644
700 +--- a/drivers/usb/host/xhci-pci.c
701 ++++ b/drivers/usb/host/xhci-pci.c
702 +@@ -113,6 +113,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
703 + xhci_dbg(xhci, "QUIRK: Resetting on resume\n");
704 + xhci->quirks |= XHCI_TRUST_TX_LENGTH;
705 + }
706 ++ if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
707 ++ pdev->device == 0x0015 &&
708 ++ pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
709 ++ pdev->subsystem_device == 0xc0cd)
710 ++ xhci->quirks |= XHCI_RESET_ON_RESUME;
711 + if (pdev->vendor == PCI_VENDOR_ID_VIA)
712 + xhci->quirks |= XHCI_RESET_ON_RESUME;
713 + }
714 +diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
715 +index 8f47625a0661..4fb6a8938957 100644
716 +--- a/include/linux/ceph/osd_client.h
717 ++++ b/include/linux/ceph/osd_client.h
718 +@@ -138,6 +138,7 @@ struct ceph_osd_request {
719 + __le64 *r_request_pool;
720 + void *r_request_pgid;
721 + __le32 *r_request_attempts;
722 ++ bool r_paused;
723 + struct ceph_eversion *r_request_reassert_version;
724 +
725 + int r_result;
726 +diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
727 +index 120d57a1c3a5..b5e36017acd7 100644
728 +--- a/include/linux/ftrace_event.h
729 ++++ b/include/linux/ftrace_event.h
730 +@@ -325,10 +325,6 @@ enum {
731 + FILTER_TRACE_FN,
732 + };
733 +
734 +-#define EVENT_STORAGE_SIZE 128
735 +-extern struct mutex event_storage_mutex;
736 +-extern char event_storage[EVENT_STORAGE_SIZE];
737 +-
738 + extern int trace_event_raw_init(struct ftrace_event_call *call);
739 + extern int trace_define_field(struct ftrace_event_call *call, const char *type,
740 + const char *name, int offset, int size,
741 +diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
742 +index 66dba42128d7..dbb47418df81 100644
743 +--- a/include/trace/ftrace.h
744 ++++ b/include/trace/ftrace.h
745 +@@ -299,15 +299,12 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \
746 + #undef __array
747 + #define __array(type, item, len) \
748 + do { \
749 +- mutex_lock(&event_storage_mutex); \
750 ++ char *type_str = #type"["__stringify(len)"]"; \
751 + BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \
752 +- snprintf(event_storage, sizeof(event_storage), \
753 +- "%s[%d]", #type, len); \
754 +- ret = trace_define_field(event_call, event_storage, #item, \
755 ++ ret = trace_define_field(event_call, type_str, #item, \
756 + offsetof(typeof(field), item), \
757 + sizeof(field.item), \
758 + is_signed_type(type), FILTER_OTHER); \
759 +- mutex_unlock(&event_storage_mutex); \
760 + if (ret) \
761 + return ret; \
762 + } while (0);
763 +diff --git a/kernel/sched/auto_group.c b/kernel/sched/auto_group.c
764 +index 64de5f8b0c9e..4a073539c58e 100644
765 +--- a/kernel/sched/auto_group.c
766 ++++ b/kernel/sched/auto_group.c
767 +@@ -77,8 +77,6 @@ static inline struct autogroup *autogroup_create(void)
768 + if (IS_ERR(tg))
769 + goto out_free;
770 +
771 +- sched_online_group(tg, &root_task_group);
772 +-
773 + kref_init(&ag->kref);
774 + init_rwsem(&ag->lock);
775 + ag->id = atomic_inc_return(&autogroup_seq_nr);
776 +@@ -98,6 +96,7 @@ static inline struct autogroup *autogroup_create(void)
777 + #endif
778 + tg->autogroup = ag;
779 +
780 ++ sched_online_group(tg, &root_task_group);
781 + return ag;
782 +
783 + out_free:
784 +diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
785 +index 2f4b185bfc23..001b349af939 100644
786 +--- a/kernel/trace/trace_events.c
787 ++++ b/kernel/trace/trace_events.c
788 +@@ -27,12 +27,6 @@
789 +
790 + DEFINE_MUTEX(event_mutex);
791 +
792 +-DEFINE_MUTEX(event_storage_mutex);
793 +-EXPORT_SYMBOL_GPL(event_storage_mutex);
794 +-
795 +-char event_storage[EVENT_STORAGE_SIZE];
796 +-EXPORT_SYMBOL_GPL(event_storage);
797 +-
798 + LIST_HEAD(ftrace_events);
799 + static LIST_HEAD(ftrace_common_fields);
800 +
801 +diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
802 +index d21a74670088..d7d0b50b1b70 100644
803 +--- a/kernel/trace/trace_export.c
804 ++++ b/kernel/trace/trace_export.c
805 +@@ -95,15 +95,12 @@ static void __always_unused ____ftrace_check_##name(void) \
806 + #undef __array
807 + #define __array(type, item, len) \
808 + do { \
809 ++ char *type_str = #type"["__stringify(len)"]"; \
810 + BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \
811 +- mutex_lock(&event_storage_mutex); \
812 +- snprintf(event_storage, sizeof(event_storage), \
813 +- "%s[%d]", #type, len); \
814 +- ret = trace_define_field(event_call, event_storage, #item, \
815 ++ ret = trace_define_field(event_call, type_str, #item, \
816 + offsetof(typeof(field), item), \
817 + sizeof(field.item), \
818 + is_signed_type(type), filter_type); \
819 +- mutex_unlock(&event_storage_mutex); \
820 + if (ret) \
821 + return ret; \
822 + } while (0);
823 +diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
824 +index bc0016e3e5ac..3663a305daf7 100644
825 +--- a/net/ceph/osd_client.c
826 ++++ b/net/ceph/osd_client.c
827 +@@ -1225,6 +1225,22 @@ void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc,
828 + EXPORT_SYMBOL(ceph_osdc_set_request_linger);
829 +
830 + /*
831 ++ * Returns whether a request should be blocked from being sent
832 ++ * based on the current osdmap and osd_client settings.
833 ++ *
834 ++ * Caller should hold map_sem for read.
835 ++ */
836 ++static bool __req_should_be_paused(struct ceph_osd_client *osdc,
837 ++ struct ceph_osd_request *req)
838 ++{
839 ++ bool pauserd = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD);
840 ++ bool pausewr = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR) ||
841 ++ ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL);
842 ++ return (req->r_flags & CEPH_OSD_FLAG_READ && pauserd) ||
843 ++ (req->r_flags & CEPH_OSD_FLAG_WRITE && pausewr);
844 ++}
845 ++
846 ++/*
847 + * Pick an osd (the first 'up' osd in the pg), allocate the osd struct
848 + * (as needed), and set the request r_osd appropriately. If there is
849 + * no up osd, set r_osd to NULL. Move the request to the appropriate list
850 +@@ -1241,6 +1257,7 @@ static int __map_request(struct ceph_osd_client *osdc,
851 + int acting[CEPH_PG_MAX_SIZE];
852 + int o = -1, num = 0;
853 + int err;
854 ++ bool was_paused;
855 +
856 + dout("map_request %p tid %lld\n", req, req->r_tid);
857 + err = ceph_calc_ceph_pg(&pgid, req->r_oid, osdc->osdmap,
858 +@@ -1257,12 +1274,18 @@ static int __map_request(struct ceph_osd_client *osdc,
859 + num = err;
860 + }
861 +
862 ++ was_paused = req->r_paused;
863 ++ req->r_paused = __req_should_be_paused(osdc, req);
864 ++ if (was_paused && !req->r_paused)
865 ++ force_resend = 1;
866 ++
867 + if ((!force_resend &&
868 + req->r_osd && req->r_osd->o_osd == o &&
869 + req->r_sent >= req->r_osd->o_incarnation &&
870 + req->r_num_pg_osds == num &&
871 + memcmp(req->r_pg_osds, acting, sizeof(acting[0])*num) == 0) ||
872 +- (req->r_osd == NULL && o == -1))
873 ++ (req->r_osd == NULL && o == -1) ||
874 ++ req->r_paused)
875 + return 0; /* no change */
876 +
877 + dout("map_request tid %llu pgid %lld.%x osd%d (was osd%d)\n",
878 +@@ -1606,14 +1629,17 @@ static void reset_changed_osds(struct ceph_osd_client *osdc)
879 + *
880 + * Caller should hold map_sem for read.
881 + */
882 +-static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
883 ++static void kick_requests(struct ceph_osd_client *osdc, bool force_resend,
884 ++ bool force_resend_writes)
885 + {
886 + struct ceph_osd_request *req, *nreq;
887 + struct rb_node *p;
888 + int needmap = 0;
889 + int err;
890 ++ bool force_resend_req;
891 +
892 +- dout("kick_requests %s\n", force_resend ? " (force resend)" : "");
893 ++ dout("kick_requests %s %s\n", force_resend ? " (force resend)" : "",
894 ++ force_resend_writes ? " (force resend writes)" : "");
895 + mutex_lock(&osdc->request_mutex);
896 + for (p = rb_first(&osdc->requests); p; ) {
897 + req = rb_entry(p, struct ceph_osd_request, r_node);
898 +@@ -1638,7 +1664,10 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
899 + continue;
900 + }
901 +
902 +- err = __map_request(osdc, req, force_resend);
903 ++ force_resend_req = force_resend ||
904 ++ (force_resend_writes &&
905 ++ req->r_flags & CEPH_OSD_FLAG_WRITE);
906 ++ err = __map_request(osdc, req, force_resend_req);
907 + if (err < 0)
908 + continue; /* error */
909 + if (req->r_osd == NULL) {
910 +@@ -1658,7 +1687,8 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
911 + r_linger_item) {
912 + dout("linger req=%p req->r_osd=%p\n", req, req->r_osd);
913 +
914 +- err = __map_request(osdc, req, force_resend);
915 ++ err = __map_request(osdc, req,
916 ++ force_resend || force_resend_writes);
917 + dout("__map_request returned %d\n", err);
918 + if (err == 0)
919 + continue; /* no change and no osd was specified */
920 +@@ -1700,6 +1730,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
921 + struct ceph_osdmap *newmap = NULL, *oldmap;
922 + int err;
923 + struct ceph_fsid fsid;
924 ++ bool was_full;
925 +
926 + dout("handle_map have %u\n", osdc->osdmap ? osdc->osdmap->epoch : 0);
927 + p = msg->front.iov_base;
928 +@@ -1713,6 +1744,8 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
929 +
930 + down_write(&osdc->map_sem);
931 +
932 ++ was_full = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL);
933 ++
934 + /* incremental maps */
935 + ceph_decode_32_safe(&p, end, nr_maps, bad);
936 + dout(" %d inc maps\n", nr_maps);
937 +@@ -1737,7 +1770,10 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
938 + ceph_osdmap_destroy(osdc->osdmap);
939 + osdc->osdmap = newmap;
940 + }
941 +- kick_requests(osdc, 0);
942 ++ was_full = was_full ||
943 ++ ceph_osdmap_flag(osdc->osdmap,
944 ++ CEPH_OSDMAP_FULL);
945 ++ kick_requests(osdc, 0, was_full);
946 + } else {
947 + dout("ignoring incremental map %u len %d\n",
948 + epoch, maplen);
949 +@@ -1780,7 +1816,10 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
950 + skipped_map = 1;
951 + ceph_osdmap_destroy(oldmap);
952 + }
953 +- kick_requests(osdc, skipped_map);
954 ++ was_full = was_full ||
955 ++ ceph_osdmap_flag(osdc->osdmap,
956 ++ CEPH_OSDMAP_FULL);
957 ++ kick_requests(osdc, skipped_map, was_full);
958 + }
959 + p += maplen;
960 + nr_maps--;
961 +@@ -1797,7 +1836,9 @@ done:
962 + * we find out when we are no longer full and stop returning
963 + * ENOSPC.
964 + */
965 +- if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL))
966 ++ if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL) ||
967 ++ ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD) ||
968 ++ ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR))
969 + ceph_monc_request_next_osdmap(&osdc->client->monc);
970 +
971 + mutex_lock(&osdc->request_mutex);
972 +diff --git a/scripts/package/builddeb b/scripts/package/builddeb
973 +index acb86507828a..3001ec5ae07d 100644
974 +--- a/scripts/package/builddeb
975 ++++ b/scripts/package/builddeb
976 +@@ -62,7 +62,7 @@ create_package() {
977 + fi
978 +
979 + # Create the package
980 +- dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir"
981 ++ dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
982 + dpkg --build "$pdir" ..
983 + }
984 +
985 +@@ -252,15 +252,14 @@ mkdir -p "$destdir"
986 + (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
987 + ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
988 + rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
989 +-arch=$(dpkg --print-architecture)
990 +
991 + cat <<EOF >> debian/control
992 +
993 + Package: $kernel_headers_packagename
994 + Provides: linux-headers, linux-headers-2.6
995 +-Architecture: $arch
996 +-Description: Linux kernel headers for $KERNELRELEASE on $arch
997 +- This package provides kernel header files for $KERNELRELEASE on $arch
998 ++Architecture: any
999 ++Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
1000 ++ This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
1001 + .
1002 + This is useful for people who need to build external modules
1003 + EOF
1004 +diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
1005 +index 19799931c51d..3fdf998ad057 100644
1006 +--- a/sound/core/compress_offload.c
1007 ++++ b/sound/core/compress_offload.c
1008 +@@ -133,7 +133,7 @@ static int snd_compr_open(struct inode *inode, struct file *f)
1009 + kfree(data);
1010 + }
1011 + snd_card_unref(compr->card);
1012 +- return 0;
1013 ++ return ret;
1014 + }
1015 +
1016 + static int snd_compr_free(struct inode *inode, struct file *f)
1017 +diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
1018 +index 819c90fe021f..4fdcc1cefc25 100644
1019 +--- a/sound/soc/codecs/max98090.c
1020 ++++ b/sound/soc/codecs/max98090.c
1021 +@@ -336,6 +336,7 @@ static bool max98090_readable_register(struct device *dev, unsigned int reg)
1022 + case M98090_REG_RECORD_TDM_SLOT:
1023 + case M98090_REG_SAMPLE_RATE:
1024 + case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E:
1025 ++ case M98090_REG_REVISION_ID:
1026 + return true;
1027 + default:
1028 + return false;