/[linux-patches]/genpatches-2.6/trunk/3.0/1059_linux-3.0.60.patch
Gentoo

Contents of /genpatches-2.6/trunk/3.0/1059_linux-3.0.60.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2267 - (show annotations) (download)
Tue Jan 29 00:51:38 2013 UTC (21 months ago) by mpagano
File size: 19928 byte(s)
Linux patches 3.0.58, 3.0.59, 3.0.60 and 3.0.61
1 diff --git a/Makefile b/Makefile
2 index d1b37fc..3359fcf 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 0
8 -SUBLEVEL = 59
9 +SUBLEVEL = 60
10 EXTRAVERSION =
11 NAME = Sneaky Weasel
12
13 diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c
14 index 1b5dc1a..daf793b 100644
15 --- a/arch/powerpc/platforms/embedded6xx/wii.c
16 +++ b/arch/powerpc/platforms/embedded6xx/wii.c
17 @@ -85,9 +85,11 @@ void __init wii_memory_fixups(void)
18 wii_hole_start = p[0].base + p[0].size;
19 wii_hole_size = p[1].base - wii_hole_start;
20
21 - pr_info("MEM1: <%08llx %08llx>\n", p[0].base, p[0].size);
22 + pr_info("MEM1: <%08llx %08llx>\n",
23 + (unsigned long long) p[0].base, (unsigned long long) p[0].size);
24 pr_info("HOLE: <%08lx %08lx>\n", wii_hole_start, wii_hole_size);
25 - pr_info("MEM2: <%08llx %08llx>\n", p[1].base, p[1].size);
26 + pr_info("MEM2: <%08llx %08llx>\n",
27 + (unsigned long long) p[1].base, (unsigned long long) p[1].size);
28
29 p[0].size += wii_hole_size + p[1].size;
30
31 diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h
32 index 88829a4..a4b8f60 100644
33 --- a/arch/s390/include/asm/timex.h
34 +++ b/arch/s390/include/asm/timex.h
35 @@ -126,4 +126,32 @@ static inline unsigned long long get_clock_monotonic(void)
36 return get_clock_xt() - sched_clock_base_cc;
37 }
38
39 +/**
40 + * tod_to_ns - convert a TOD format value to nanoseconds
41 + * @todval: to be converted TOD format value
42 + * Returns: number of nanoseconds that correspond to the TOD format value
43 + *
44 + * Converting a 64 Bit TOD format value to nanoseconds means that the value
45 + * must be divided by 4.096. In order to achieve that we multiply with 125
46 + * and divide by 512:
47 + *
48 + * ns = (todval * 125) >> 9;
49 + *
50 + * In order to avoid an overflow with the multiplication we can rewrite this.
51 + * With a split todval == 2^32 * th + tl (th upper 32 bits, tl lower 32 bits)
52 + * we end up with
53 + *
54 + * ns = ((2^32 * th + tl) * 125 ) >> 9;
55 + * -> ns = (2^23 * th * 125) + ((tl * 125) >> 9);
56 + *
57 + */
58 +static inline unsigned long long tod_to_ns(unsigned long long todval)
59 +{
60 + unsigned long long ns;
61 +
62 + ns = ((todval >> 32) << 23) * 125;
63 + ns += ((todval & 0xffffffff) * 125) >> 9;
64 + return ns;
65 +}
66 +
67 #endif
68 diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
69 index dff9330..943ea0e 100644
70 --- a/arch/s390/kernel/time.c
71 +++ b/arch/s390/kernel/time.c
72 @@ -63,7 +63,7 @@ static DEFINE_PER_CPU(struct clock_event_device, comparators);
73 */
74 unsigned long long notrace __kprobes sched_clock(void)
75 {
76 - return (get_clock_monotonic() * 125) >> 9;
77 + return tod_to_ns(get_clock_monotonic());
78 }
79
80 /*
81 diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
82 index 35c21bf..a3db4c8 100644
83 --- a/arch/s390/kvm/interrupt.c
84 +++ b/arch/s390/kvm/interrupt.c
85 @@ -358,7 +358,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
86 return 0;
87 }
88
89 - sltime = ((vcpu->arch.sie_block->ckc - now)*125)>>9;
90 + sltime = tod_to_ns(vcpu->arch.sie_block->ckc - now);
91
92 hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL);
93 VCPU_EVENT(vcpu, 5, "enabled wait via clock comparator: %llx ns", sltime);
94 diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
95 index f38112b..978b7fd 100644
96 --- a/arch/sh/include/asm/elf.h
97 +++ b/arch/sh/include/asm/elf.h
98 @@ -202,9 +202,9 @@ extern void __kernel_vsyscall;
99 if (vdso_enabled) \
100 NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \
101 else \
102 - NEW_AUX_ENT(AT_IGNORE, 0);
103 + NEW_AUX_ENT(AT_IGNORE, 0)
104 #else
105 -#define VSYSCALL_AUX_ENT
106 +#define VSYSCALL_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0)
107 #endif /* CONFIG_VSYSCALL */
108
109 #ifdef CONFIG_SH_FPU
110 diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
111 index 268b40d..2df1252 100644
112 --- a/arch/x86/kernel/entry_32.S
113 +++ b/arch/x86/kernel/entry_32.S
114 @@ -1078,7 +1078,6 @@ ENTRY(xen_failsafe_callback)
115 lea 16(%esp),%esp
116 CFI_ADJUST_CFA_OFFSET -16
117 jz 5f
118 - addl $16,%esp
119 jmp iret_exc
120 5: pushl_cfi $-1 /* orig_ax = -1 => not a system call */
121 SAVE_ALL
122 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
123 index af19a61..eb9eb8b 100644
124 --- a/arch/x86/kernel/setup.c
125 +++ b/arch/x86/kernel/setup.c
126 @@ -631,6 +631,81 @@ static __init void reserve_ibft_region(void)
127
128 static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;
129
130 +static bool __init snb_gfx_workaround_needed(void)
131 +{
132 + int i;
133 + u16 vendor, devid;
134 + static const u16 snb_ids[] = {
135 + 0x0102,
136 + 0x0112,
137 + 0x0122,
138 + 0x0106,
139 + 0x0116,
140 + 0x0126,
141 + 0x010a,
142 + };
143 +
144 + /* Assume no if something weird is going on with PCI */
145 + if (!early_pci_allowed())
146 + return false;
147 +
148 + vendor = read_pci_config_16(0, 2, 0, PCI_VENDOR_ID);
149 + if (vendor != 0x8086)
150 + return false;
151 +
152 + devid = read_pci_config_16(0, 2, 0, PCI_DEVICE_ID);
153 + for (i = 0; i < ARRAY_SIZE(snb_ids); i++)
154 + if (devid == snb_ids[i])
155 + return true;
156 +
157 + return false;
158 +}
159 +
160 +/*
161 + * Sandy Bridge graphics has trouble with certain ranges, exclude
162 + * them from allocation.
163 + */
164 +static void __init trim_snb_memory(void)
165 +{
166 + static const unsigned long bad_pages[] = {
167 + 0x20050000,
168 + 0x20110000,
169 + 0x20130000,
170 + 0x20138000,
171 + 0x40004000,
172 + };
173 + int i;
174 +
175 + if (!snb_gfx_workaround_needed())
176 + return;
177 +
178 + printk(KERN_DEBUG "reserving inaccessible SNB gfx pages\n");
179 +
180 + /*
181 + * Reserve all memory below the 1 MB mark that has not
182 + * already been reserved.
183 + */
184 + memblock_reserve(0, 1<<20);
185 +
186 + for (i = 0; i < ARRAY_SIZE(bad_pages); i++) {
187 + if (memblock_reserve(bad_pages[i], PAGE_SIZE))
188 + printk(KERN_WARNING "failed to reserve 0x%08lx\n",
189 + bad_pages[i]);
190 + }
191 +}
192 +
193 +/*
194 + * Here we put platform-specific memory range workarounds, i.e.
195 + * memory known to be corrupt or otherwise in need to be reserved on
196 + * specific platforms.
197 + *
198 + * If this gets used more widely it could use a real dispatch mechanism.
199 + */
200 +static void __init trim_platform_memory_ranges(void)
201 +{
202 + trim_snb_memory();
203 +}
204 +
205 static void __init trim_bios_range(void)
206 {
207 /*
208 @@ -651,6 +726,7 @@ static void __init trim_bios_range(void)
209 * take them out.
210 */
211 e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1);
212 +
213 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
214 }
215
216 @@ -929,6 +1005,8 @@ void __init setup_arch(char **cmdline_p)
217
218 setup_trampolines();
219
220 + trim_platform_memory_ranges();
221 +
222 init_gbpages();
223
224 /* max_pfn_mapped is updated here */
225 diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
226 index 3424d67..e59f536 100644
227 --- a/drivers/block/drbd/drbd_req.c
228 +++ b/drivers/block/drbd/drbd_req.c
229 @@ -37,6 +37,7 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req
230 const int rw = bio_data_dir(bio);
231 int cpu;
232 cpu = part_stat_lock();
233 + part_round_stats(cpu, &mdev->vdisk->part0);
234 part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]);
235 part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], bio_sectors(bio));
236 part_inc_in_flight(&mdev->vdisk->part0, rw);
237 diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
238 index 3f9a891..ae762ec 100644
239 --- a/drivers/pci/intel-iommu.c
240 +++ b/drivers/pci/intel-iommu.c
241 @@ -2289,8 +2289,39 @@ static int domain_add_dev_info(struct dmar_domain *domain,
242 return 0;
243 }
244
245 +static bool device_has_rmrr(struct pci_dev *dev)
246 +{
247 + struct dmar_rmrr_unit *rmrr;
248 + int i;
249 +
250 + for_each_rmrr_units(rmrr) {
251 + for (i = 0; i < rmrr->devices_cnt; i++) {
252 + /*
253 + * Return TRUE if this RMRR contains the device that
254 + * is passed in.
255 + */
256 + if (rmrr->devices[i] == dev)
257 + return true;
258 + }
259 + }
260 + return false;
261 +}
262 +
263 static int iommu_should_identity_map(struct pci_dev *pdev, int startup)
264 {
265 +
266 + /*
267 + * We want to prevent any device associated with an RMRR from
268 + * getting placed into the SI Domain. This is done because
269 + * problems exist when devices are moved in and out of domains
270 + * and their respective RMRR info is lost. We exempt USB devices
271 + * from this process due to their usage of RMRRs that are known
272 + * to not be needed after BIOS hand-off to OS.
273 + */
274 + if (device_has_rmrr(pdev) &&
275 + (pdev->class >> 8) != PCI_CLASS_SERIAL_USB)
276 + return 0;
277 +
278 if ((iommu_identity_mapping & IDENTMAP_AZALIA) && IS_AZALIA(pdev))
279 return 1;
280
281 diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h
282 index a8f97eb..991ce3e 100644
283 --- a/drivers/staging/vt6656/bssdb.h
284 +++ b/drivers/staging/vt6656/bssdb.h
285 @@ -92,7 +92,6 @@ typedef struct tagSRSNCapObject {
286 } SRSNCapObject, *PSRSNCapObject;
287
288 // BSS info(AP)
289 -#pragma pack(1)
290 typedef struct tagKnownBSS {
291 // BSS info
292 BOOL bActive;
293 diff --git a/drivers/staging/vt6656/int.h b/drivers/staging/vt6656/int.h
294 index 3176c8d..c731b12 100644
295 --- a/drivers/staging/vt6656/int.h
296 +++ b/drivers/staging/vt6656/int.h
297 @@ -34,7 +34,6 @@
298 #include "device.h"
299
300 /*--------------------- Export Definitions -------------------------*/
301 -#pragma pack(1)
302 typedef struct tagSINTData {
303 BYTE byTSR0;
304 BYTE byPkt0;
305 diff --git a/drivers/staging/vt6656/iocmd.h b/drivers/staging/vt6656/iocmd.h
306 index 22710ce..ae6e2d2 100644
307 --- a/drivers/staging/vt6656/iocmd.h
308 +++ b/drivers/staging/vt6656/iocmd.h
309 @@ -95,13 +95,12 @@ typedef enum tagWZONETYPE {
310 // Ioctl interface structure
311 // Command structure
312 //
313 -#pragma pack(1)
314 typedef struct tagSCmdRequest {
315 u8 name[16];
316 void *data;
317 u16 wResult;
318 u16 wCmdCode;
319 -} SCmdRequest, *PSCmdRequest;
320 +} __packed SCmdRequest, *PSCmdRequest;
321
322 //
323 // Scan
324 @@ -111,7 +110,7 @@ typedef struct tagSCmdScan {
325
326 u8 ssid[SSID_MAXLEN + 2];
327
328 -} SCmdScan, *PSCmdScan;
329 +} __packed SCmdScan, *PSCmdScan;
330
331 //
332 // BSS Join
333 @@ -126,7 +125,7 @@ typedef struct tagSCmdBSSJoin {
334 BOOL bPSEnable;
335 BOOL bShareKeyAuth;
336
337 -} SCmdBSSJoin, *PSCmdBSSJoin;
338 +} __packed SCmdBSSJoin, *PSCmdBSSJoin;
339
340 //
341 // Zonetype Setting
342 @@ -137,7 +136,7 @@ typedef struct tagSCmdZoneTypeSet {
343 BOOL bWrite;
344 WZONETYPE ZoneType;
345
346 -} SCmdZoneTypeSet, *PSCmdZoneTypeSet;
347 +} __packed SCmdZoneTypeSet, *PSCmdZoneTypeSet;
348
349 typedef struct tagSWPAResult {
350 char ifname[100];
351 @@ -145,7 +144,7 @@ typedef struct tagSWPAResult {
352 u8 key_mgmt;
353 u8 eap_type;
354 BOOL authenticated;
355 -} SWPAResult, *PSWPAResult;
356 +} __packed SWPAResult, *PSWPAResult;
357
358 typedef struct tagSCmdStartAP {
359
360 @@ -157,7 +156,7 @@ typedef struct tagSCmdStartAP {
361 BOOL bShareKeyAuth;
362 u8 byBasicRate;
363
364 -} SCmdStartAP, *PSCmdStartAP;
365 +} __packed SCmdStartAP, *PSCmdStartAP;
366
367 typedef struct tagSCmdSetWEP {
368
369 @@ -167,7 +166,7 @@ typedef struct tagSCmdSetWEP {
370 BOOL bWepKeyAvailable[WEP_NKEYS];
371 u32 auWepKeyLength[WEP_NKEYS];
372
373 -} SCmdSetWEP, *PSCmdSetWEP;
374 +} __packed SCmdSetWEP, *PSCmdSetWEP;
375
376 typedef struct tagSBSSIDItem {
377
378 @@ -180,14 +179,14 @@ typedef struct tagSBSSIDItem {
379 BOOL bWEPOn;
380 u32 uRSSI;
381
382 -} SBSSIDItem;
383 +} __packed SBSSIDItem;
384
385
386 typedef struct tagSBSSIDList {
387
388 u32 uItem;
389 SBSSIDItem sBSSIDList[0];
390 -} SBSSIDList, *PSBSSIDList;
391 +} __packed SBSSIDList, *PSBSSIDList;
392
393
394 typedef struct tagSNodeItem {
395 @@ -208,7 +207,7 @@ typedef struct tagSNodeItem {
396 u32 uTxAttempts;
397 u16 wFailureRatio;
398
399 -} SNodeItem;
400 +} __packed SNodeItem;
401
402
403 typedef struct tagSNodeList {
404 @@ -216,7 +215,7 @@ typedef struct tagSNodeList {
405 u32 uItem;
406 SNodeItem sNodeList[0];
407
408 -} SNodeList, *PSNodeList;
409 +} __packed SNodeList, *PSNodeList;
410
411
412 typedef struct tagSCmdLinkStatus {
413 @@ -229,7 +228,7 @@ typedef struct tagSCmdLinkStatus {
414 u32 uChannel;
415 u32 uLinkRate;
416
417 -} SCmdLinkStatus, *PSCmdLinkStatus;
418 +} __packed SCmdLinkStatus, *PSCmdLinkStatus;
419
420 //
421 // 802.11 counter
422 @@ -247,7 +246,7 @@ typedef struct tagSDot11MIBCount {
423 u32 ReceivedFragmentCount;
424 u32 MulticastReceivedFrameCount;
425 u32 FCSErrorCount;
426 -} SDot11MIBCount, *PSDot11MIBCount;
427 +} __packed SDot11MIBCount, *PSDot11MIBCount;
428
429
430
431 @@ -355,13 +354,13 @@ typedef struct tagSStatMIBCount {
432 u32 ullTxBroadcastBytes[2];
433 u32 ullTxMulticastBytes[2];
434 u32 ullTxDirectedBytes[2];
435 -} SStatMIBCount, *PSStatMIBCount;
436 +} __packed SStatMIBCount, *PSStatMIBCount;
437
438 typedef struct tagSCmdValue {
439
440 u32 dwValue;
441
442 -} SCmdValue, *PSCmdValue;
443 +} __packed SCmdValue, *PSCmdValue;
444
445 //
446 // hostapd & viawget ioctl related
447 @@ -431,7 +430,7 @@ struct viawget_hostapd_param {
448 u8 ssid[32];
449 } scan_req;
450 } u;
451 -};
452 +} __packed;
453
454 /*--------------------- Export Classes ----------------------------*/
455
456 diff --git a/drivers/staging/vt6656/iowpa.h b/drivers/staging/vt6656/iowpa.h
457 index 959c886..2522dde 100644
458 --- a/drivers/staging/vt6656/iowpa.h
459 +++ b/drivers/staging/vt6656/iowpa.h
460 @@ -67,12 +67,11 @@ enum {
461
462
463
464 -#pragma pack(1)
465 typedef struct viawget_wpa_header {
466 u8 type;
467 u16 req_ie_len;
468 u16 resp_ie_len;
469 -} viawget_wpa_header;
470 +} __packed viawget_wpa_header;
471
472 struct viawget_wpa_param {
473 u32 cmd;
474 @@ -113,9 +112,8 @@ struct viawget_wpa_param {
475 u8 *buf;
476 } scan_results;
477 } u;
478 -};
479 +} __packed;
480
481 -#pragma pack(1)
482 struct viawget_scan_result {
483 u8 bssid[6];
484 u8 ssid[32];
485 @@ -130,7 +128,7 @@ struct viawget_scan_result {
486 int noise;
487 int level;
488 int maxrate;
489 -};
490 +} __packed;
491
492 /*--------------------- Export Classes ----------------------------*/
493
494 diff --git a/drivers/target/tcm_fc/tfc_sess.c b/drivers/target/tcm_fc/tfc_sess.c
495 index 087af19..9a084b8 100644
496 --- a/drivers/target/tcm_fc/tfc_sess.c
497 +++ b/drivers/target/tcm_fc/tfc_sess.c
498 @@ -393,11 +393,11 @@ static int ft_prli_locked(struct fc_rport_priv *rdata, u32 spp_len,
499
500 tport = ft_tport_create(rdata->local_port);
501 if (!tport)
502 - return 0; /* not a target for this local port */
503 + goto not_target; /* not a target for this local port */
504
505 acl = ft_acl_get(tport->tpg, rdata);
506 if (!acl)
507 - return 0;
508 + goto not_target; /* no target for this remote */
509
510 if (!rspp)
511 goto fill;
512 @@ -434,12 +434,18 @@ static int ft_prli_locked(struct fc_rport_priv *rdata, u32 spp_len,
513
514 /*
515 * OR in our service parameters with other provider (initiator), if any.
516 - * TBD XXX - indicate RETRY capability?
517 */
518 fill:
519 fcp_parm = ntohl(spp->spp_params);
520 + fcp_parm &= ~FCP_SPPF_RETRY;
521 spp->spp_params = htonl(fcp_parm | FCP_SPPF_TARG_FCN);
522 return FC_SPP_RESP_ACK;
523 +
524 +not_target:
525 + fcp_parm = ntohl(spp->spp_params);
526 + fcp_parm &= ~FCP_SPPF_TARG_FCN;
527 + spp->spp_params = htonl(fcp_parm);
528 + return 0;
529 }
530
531 /**
532 diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
533 index 5315525..5d0d4f6 100644
534 --- a/drivers/tty/serial/ifx6x60.c
535 +++ b/drivers/tty/serial/ifx6x60.c
536 @@ -551,6 +551,7 @@ static void ifx_port_shutdown(struct tty_port *port)
537 container_of(port, struct ifx_spi_device, tty_port);
538
539 mrdy_set_low(ifx_dev);
540 + del_timer(&ifx_dev->spi_timer);
541 clear_bit(IFX_SPI_STATE_TIMER_PENDING, &ifx_dev->flags);
542 tasklet_kill(&ifx_dev->io_work_tasklet);
543 }
544 diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
545 index 806060c..3c84a03 100644
546 --- a/drivers/usb/core/message.c
547 +++ b/drivers/usb/core/message.c
548 @@ -1770,28 +1770,8 @@ free_interfaces:
549 goto free_interfaces;
550 }
551
552 - ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
553 - USB_REQ_SET_CONFIGURATION, 0, configuration, 0,
554 - NULL, 0, USB_CTRL_SET_TIMEOUT);
555 - if (ret < 0) {
556 - /* All the old state is gone, so what else can we do?
557 - * The device is probably useless now anyway.
558 - */
559 - cp = NULL;
560 - }
561 -
562 - dev->actconfig = cp;
563 - if (!cp) {
564 - usb_set_device_state(dev, USB_STATE_ADDRESS);
565 - usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL);
566 - mutex_unlock(hcd->bandwidth_mutex);
567 - usb_autosuspend_device(dev);
568 - goto free_interfaces;
569 - }
570 - mutex_unlock(hcd->bandwidth_mutex);
571 - usb_set_device_state(dev, USB_STATE_CONFIGURED);
572 -
573 - /* Initialize the new interface structures and the
574 + /*
575 + * Initialize the new interface structures and the
576 * hc/hcd/usbcore interface/endpoint state.
577 */
578 for (i = 0; i < nintf; ++i) {
579 @@ -1835,6 +1815,35 @@ free_interfaces:
580 }
581 kfree(new_interfaces);
582
583 + ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
584 + USB_REQ_SET_CONFIGURATION, 0, configuration, 0,
585 + NULL, 0, USB_CTRL_SET_TIMEOUT);
586 + if (ret < 0 && cp) {
587 + /*
588 + * All the old state is gone, so what else can we do?
589 + * The device is probably useless now anyway.
590 + */
591 + usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL);
592 + for (i = 0; i < nintf; ++i) {
593 + usb_disable_interface(dev, cp->interface[i], true);
594 + put_device(&cp->interface[i]->dev);
595 + cp->interface[i] = NULL;
596 + }
597 + cp = NULL;
598 + }
599 +
600 + dev->actconfig = cp;
601 + mutex_unlock(hcd->bandwidth_mutex);
602 +
603 + if (!cp) {
604 + usb_set_device_state(dev, USB_STATE_ADDRESS);
605 +
606 + /* Leave LPM disabled while the device is unconfigured. */
607 + usb_autosuspend_device(dev);
608 + return ret;
609 + }
610 + usb_set_device_state(dev, USB_STATE_CONFIGURED);
611 +
612 if (cp->string == NULL &&
613 !(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
614 cp->string = usb_cache_string(dev, cp->desc.iConfiguration);
615 diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
616 index a2b20fe..af65322 100644
617 --- a/drivers/usb/host/xhci-mem.c
618 +++ b/drivers/usb/host/xhci-mem.c
619 @@ -180,8 +180,15 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,
620 struct xhci_segment *next;
621
622 next = xhci_segment_alloc(xhci, flags);
623 - if (!next)
624 + if (!next) {
625 + prev = ring->first_seg;
626 + while (prev) {
627 + next = prev->next;
628 + xhci_segment_free(xhci, prev);
629 + prev = next;
630 + }
631 goto fail;
632 + }
633 xhci_link_segments(xhci, prev, next, link_trbs, isoc);
634
635 prev = next;
636 @@ -201,7 +208,7 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,
637 return ring;
638
639 fail:
640 - xhci_ring_free(xhci, ring);
641 + kfree(ring);
642 return NULL;
643 }
644
645 diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
646 index f233bbb..9db3e23 100644
647 --- a/drivers/usb/serial/option.c
648 +++ b/drivers/usb/serial/option.c
649 @@ -449,6 +449,10 @@ static void option_instat_callback(struct urb *urb);
650 #define PETATEL_VENDOR_ID 0x1ff4
651 #define PETATEL_PRODUCT_NP10T 0x600e
652
653 +/* TP-LINK Incorporated products */
654 +#define TPLINK_VENDOR_ID 0x2357
655 +#define TPLINK_PRODUCT_MA180 0x0201
656 +
657 /* some devices interfaces need special handling due to a number of reasons */
658 enum option_blacklist_reason {
659 OPTION_BLACKLIST_NONE = 0,
660 @@ -930,7 +934,8 @@ static const struct usb_device_id option_ids[] = {
661 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0254, 0xff, 0xff, 0xff) },
662 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */
663 .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
664 - { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff) },
665 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff), /* ONDA MT8205 */
666 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
667 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff), /* ZTE MF880 */
668 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
669 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) },
670 @@ -1311,6 +1316,8 @@ static const struct usb_device_id option_ids[] = {
671 { USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
672 { USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
673 { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) },
674 + { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
675 + .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
676 { } /* Terminating entry */
677 };
678 MODULE_DEVICE_TABLE(usb, option_ids);
679 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
680 index 1dbf758..7e56946 100644
681 --- a/fs/ext4/inode.c
682 +++ b/fs/ext4/inode.c
683 @@ -2199,6 +2199,8 @@ static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd)
684
685 index = mpd->first_page;
686 end = mpd->next_page - 1;
687 +
688 + pagevec_init(&pvec, 0);
689 while (index <= end) {
690 nr_pages = pagevec_lookup(&pvec, mapping, index, PAGEVEC_SIZE);
691 if (nr_pages == 0)

  ViewVC Help
Powered by ViewVC 1.1.20