/[linux-patches]/genpatches-2.6/tags/3.0-30/1041_linux-3.0.42.patch
Gentoo

Contents of /genpatches-2.6/tags/3.0-30/1041_linux-3.0.42.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2206 - (show annotations) (download)
Mon Sep 17 18:58:14 2012 UTC (2 years, 3 months ago) by mpagano
File size: 45658 byte(s)
3.0-30 release
1 diff --git a/Makefile b/Makefile
2 index 2cbfd97..d863aa0 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 0
8 -SUBLEVEL = 41
9 +SUBLEVEL = 42
10 EXTRAVERSION =
11 NAME = Sneaky Weasel
12
13 diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
14 index 53acaa8..f98af03 100644
15 --- a/arch/s390/kernel/compat_linux.c
16 +++ b/arch/s390/kernel/compat_linux.c
17 @@ -631,7 +631,6 @@ asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg)
18 return -EFAULT;
19 if (a.offset & ~PAGE_MASK)
20 return -EINVAL;
21 - a.addr = (unsigned long) compat_ptr(a.addr);
22 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
23 a.offset >> PAGE_SHIFT);
24 }
25 @@ -642,7 +641,6 @@ asmlinkage long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg)
26
27 if (copy_from_user(&a, arg, sizeof(a)))
28 return -EFAULT;
29 - a.addr = (unsigned long) compat_ptr(a.addr);
30 return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset);
31 }
32
33 diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
34 index 58efeb9..2f7847d 100644
35 --- a/arch/x86/xen/p2m.c
36 +++ b/arch/x86/xen/p2m.c
37 @@ -683,6 +683,7 @@ int m2p_add_override(unsigned long mfn, struct page *page, bool clear_pte)
38 unsigned long uninitialized_var(address);
39 unsigned level;
40 pte_t *ptep = NULL;
41 + int ret = 0;
42
43 pfn = page_to_pfn(page);
44 if (!PageHighMem(page)) {
45 @@ -706,6 +707,24 @@ int m2p_add_override(unsigned long mfn, struct page *page, bool clear_pte)
46 list_add(&page->lru, &m2p_overrides[mfn_hash(mfn)]);
47 spin_unlock_irqrestore(&m2p_override_lock, flags);
48
49 + /* p2m(m2p(mfn)) == mfn: the mfn is already present somewhere in
50 + * this domain. Set the FOREIGN_FRAME_BIT in the p2m for the other
51 + * pfn so that the following mfn_to_pfn(mfn) calls will return the
52 + * pfn from the m2p_override (the backend pfn) instead.
53 + * We need to do this because the pages shared by the frontend
54 + * (xen-blkfront) can be already locked (lock_page, called by
55 + * do_read_cache_page); when the userspace backend tries to use them
56 + * with direct_IO, mfn_to_pfn returns the pfn of the frontend, so
57 + * do_blockdev_direct_IO is going to try to lock the same pages
58 + * again resulting in a deadlock.
59 + * As a side effect get_user_pages_fast might not be safe on the
60 + * frontend pages while they are being shared with the backend,
61 + * because mfn_to_pfn (that ends up being called by GUPF) will
62 + * return the backend pfn rather than the frontend pfn. */
63 + ret = __get_user(pfn, &machine_to_phys_mapping[mfn]);
64 + if (ret == 0 && get_phys_to_machine(pfn) == mfn)
65 + set_phys_to_machine(pfn, FOREIGN_FRAME(mfn));
66 +
67 return 0;
68 }
69 EXPORT_SYMBOL_GPL(m2p_add_override);
70 @@ -717,6 +736,7 @@ int m2p_remove_override(struct page *page, bool clear_pte)
71 unsigned long uninitialized_var(address);
72 unsigned level;
73 pte_t *ptep = NULL;
74 + int ret = 0;
75
76 pfn = page_to_pfn(page);
77 mfn = get_phys_to_machine(pfn);
78 @@ -743,6 +763,22 @@ int m2p_remove_override(struct page *page, bool clear_pte)
79 /* No tlb flush necessary because the caller already
80 * left the pte unmapped. */
81
82 + /* p2m(m2p(mfn)) == FOREIGN_FRAME(mfn): the mfn is already present
83 + * somewhere in this domain, even before being added to the
84 + * m2p_override (see comment above in m2p_add_override).
85 + * If there are no other entries in the m2p_override corresponding
86 + * to this mfn, then remove the FOREIGN_FRAME_BIT from the p2m for
87 + * the original pfn (the one shared by the frontend): the backend
88 + * cannot do any IO on this page anymore because it has been
89 + * unshared. Removing the FOREIGN_FRAME_BIT from the p2m entry of
90 + * the original pfn causes mfn_to_pfn(mfn) to return the frontend
91 + * pfn again. */
92 + mfn &= ~FOREIGN_FRAME_BIT;
93 + ret = __get_user(pfn, &machine_to_phys_mapping[mfn]);
94 + if (ret == 0 && get_phys_to_machine(pfn) == FOREIGN_FRAME(mfn) &&
95 + m2p_find_override(mfn) == NULL)
96 + set_phys_to_machine(pfn, mfn);
97 +
98 return 0;
99 }
100 EXPORT_SYMBOL_GPL(m2p_remove_override);
101 diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
102 index 2d6039b..3bd85f7 100644
103 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
104 +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
105 @@ -150,8 +150,6 @@ static int init_ring_common(struct intel_ring_buffer *ring)
106 I915_WRITE_HEAD(ring, 0);
107 ring->write_tail(ring, 0);
108
109 - /* Initialize the ring. */
110 - I915_WRITE_START(ring, obj->gtt_offset);
111 head = I915_READ_HEAD(ring) & HEAD_ADDR;
112
113 /* G45 ring initialization fails to reset head to zero */
114 @@ -177,6 +175,11 @@ static int init_ring_common(struct intel_ring_buffer *ring)
115 }
116 }
117
118 + /* Initialize the ring. This must happen _after_ we've cleared the ring
119 + * registers with the above sequence (the readback of the HEAD registers
120 + * also enforces ordering), otherwise the hw might lose the new ring
121 + * register values. */
122 + I915_WRITE_START(ring, obj->gtt_offset);
123 I915_WRITE_CTL(ring,
124 ((ring->size - PAGE_SIZE) & RING_NR_PAGES)
125 | RING_REPORT_64K | RING_VALID);
126 diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
127 index 8846bad..314e217 100644
128 --- a/drivers/gpu/drm/radeon/evergreen.c
129 +++ b/drivers/gpu/drm/radeon/evergreen.c
130 @@ -1019,24 +1019,8 @@ void evergreen_agp_enable(struct radeon_device *rdev)
131
132 void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *save)
133 {
134 - save->vga_control[0] = RREG32(D1VGA_CONTROL);
135 - save->vga_control[1] = RREG32(D2VGA_CONTROL);
136 save->vga_render_control = RREG32(VGA_RENDER_CONTROL);
137 save->vga_hdp_control = RREG32(VGA_HDP_CONTROL);
138 - save->crtc_control[0] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET);
139 - save->crtc_control[1] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET);
140 - if (rdev->num_crtc >= 4) {
141 - save->vga_control[2] = RREG32(EVERGREEN_D3VGA_CONTROL);
142 - save->vga_control[3] = RREG32(EVERGREEN_D4VGA_CONTROL);
143 - save->crtc_control[2] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET);
144 - save->crtc_control[3] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET);
145 - }
146 - if (rdev->num_crtc >= 6) {
147 - save->vga_control[4] = RREG32(EVERGREEN_D5VGA_CONTROL);
148 - save->vga_control[5] = RREG32(EVERGREEN_D6VGA_CONTROL);
149 - save->crtc_control[4] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET);
150 - save->crtc_control[5] = RREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET);
151 - }
152
153 /* Stop all video */
154 WREG32(VGA_RENDER_CONTROL, 0);
155 @@ -1147,47 +1131,6 @@ void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *s
156 /* Unlock host access */
157 WREG32(VGA_HDP_CONTROL, save->vga_hdp_control);
158 mdelay(1);
159 - /* Restore video state */
160 - WREG32(D1VGA_CONTROL, save->vga_control[0]);
161 - WREG32(D2VGA_CONTROL, save->vga_control[1]);
162 - if (rdev->num_crtc >= 4) {
163 - WREG32(EVERGREEN_D3VGA_CONTROL, save->vga_control[2]);
164 - WREG32(EVERGREEN_D4VGA_CONTROL, save->vga_control[3]);
165 - }
166 - if (rdev->num_crtc >= 6) {
167 - WREG32(EVERGREEN_D5VGA_CONTROL, save->vga_control[4]);
168 - WREG32(EVERGREEN_D6VGA_CONTROL, save->vga_control[5]);
169 - }
170 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 1);
171 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 1);
172 - if (rdev->num_crtc >= 4) {
173 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 1);
174 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 1);
175 - }
176 - if (rdev->num_crtc >= 6) {
177 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 1);
178 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 1);
179 - }
180 - WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC0_REGISTER_OFFSET, save->crtc_control[0]);
181 - WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC1_REGISTER_OFFSET, save->crtc_control[1]);
182 - if (rdev->num_crtc >= 4) {
183 - WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC2_REGISTER_OFFSET, save->crtc_control[2]);
184 - WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC3_REGISTER_OFFSET, save->crtc_control[3]);
185 - }
186 - if (rdev->num_crtc >= 6) {
187 - WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC4_REGISTER_OFFSET, save->crtc_control[4]);
188 - WREG32(EVERGREEN_CRTC_CONTROL + EVERGREEN_CRTC5_REGISTER_OFFSET, save->crtc_control[5]);
189 - }
190 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC0_REGISTER_OFFSET, 0);
191 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC1_REGISTER_OFFSET, 0);
192 - if (rdev->num_crtc >= 4) {
193 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC2_REGISTER_OFFSET, 0);
194 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC3_REGISTER_OFFSET, 0);
195 - }
196 - if (rdev->num_crtc >= 6) {
197 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC4_REGISTER_OFFSET, 0);
198 - WREG32(EVERGREEN_CRTC_UPDATE_LOCK + EVERGREEN_CRTC5_REGISTER_OFFSET, 0);
199 - }
200 WREG32(VGA_RENDER_CONTROL, save->vga_render_control);
201 }
202
203 diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
204 index 3dedaa0..4d81e96 100644
205 --- a/drivers/gpu/drm/radeon/radeon_asic.h
206 +++ b/drivers/gpu/drm/radeon/radeon_asic.h
207 @@ -253,13 +253,10 @@ void rs690_line_buffer_adjust(struct radeon_device *rdev,
208 * rv515
209 */
210 struct rv515_mc_save {
211 - u32 d1vga_control;
212 - u32 d2vga_control;
213 u32 vga_render_control;
214 u32 vga_hdp_control;
215 - u32 d1crtc_control;
216 - u32 d2crtc_control;
217 };
218 +
219 int rv515_init(struct radeon_device *rdev);
220 void rv515_fini(struct radeon_device *rdev);
221 uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg);
222 @@ -387,11 +384,10 @@ void r700_cp_fini(struct radeon_device *rdev);
223 * evergreen
224 */
225 struct evergreen_mc_save {
226 - u32 vga_control[6];
227 u32 vga_render_control;
228 u32 vga_hdp_control;
229 - u32 crtc_control[6];
230 };
231 +
232 void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev);
233 int evergreen_init(struct radeon_device *rdev);
234 void evergreen_fini(struct radeon_device *rdev);
235 diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c
236 index 6613ee9..d5f45b4 100644
237 --- a/drivers/gpu/drm/radeon/rv515.c
238 +++ b/drivers/gpu/drm/radeon/rv515.c
239 @@ -281,12 +281,8 @@ int rv515_debugfs_ga_info_init(struct radeon_device *rdev)
240
241 void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save)
242 {
243 - save->d1vga_control = RREG32(R_000330_D1VGA_CONTROL);
244 - save->d2vga_control = RREG32(R_000338_D2VGA_CONTROL);
245 save->vga_render_control = RREG32(R_000300_VGA_RENDER_CONTROL);
246 save->vga_hdp_control = RREG32(R_000328_VGA_HDP_CONTROL);
247 - save->d1crtc_control = RREG32(R_006080_D1CRTC_CONTROL);
248 - save->d2crtc_control = RREG32(R_006880_D2CRTC_CONTROL);
249
250 /* Stop all video */
251 WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 0);
252 @@ -311,15 +307,6 @@ void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save)
253 /* Unlock host access */
254 WREG32(R_000328_VGA_HDP_CONTROL, save->vga_hdp_control);
255 mdelay(1);
256 - /* Restore video state */
257 - WREG32(R_000330_D1VGA_CONTROL, save->d1vga_control);
258 - WREG32(R_000338_D2VGA_CONTROL, save->d2vga_control);
259 - WREG32(R_0060E8_D1CRTC_UPDATE_LOCK, 1);
260 - WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 1);
261 - WREG32(R_006080_D1CRTC_CONTROL, save->d1crtc_control);
262 - WREG32(R_006880_D2CRTC_CONTROL, save->d2crtc_control);
263 - WREG32(R_0060E8_D1CRTC_UPDATE_LOCK, 0);
264 - WREG32(R_0068E8_D2CRTC_UPDATE_LOCK, 0);
265 WREG32(R_000300_VGA_RENDER_CONTROL, save->vga_render_control);
266 }
267
268 diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
269 index 7d5109b..e763e30 100644
270 --- a/drivers/infiniband/ulp/srp/ib_srp.c
271 +++ b/drivers/infiniband/ulp/srp/ib_srp.c
272 @@ -568,24 +568,62 @@ static void srp_unmap_data(struct scsi_cmnd *scmnd,
273 scmnd->sc_data_direction);
274 }
275
276 -static void srp_remove_req(struct srp_target_port *target,
277 - struct srp_request *req, s32 req_lim_delta)
278 +/**
279 + * srp_claim_req - Take ownership of the scmnd associated with a request.
280 + * @target: SRP target port.
281 + * @req: SRP request.
282 + * @scmnd: If NULL, take ownership of @req->scmnd. If not NULL, only take
283 + * ownership of @req->scmnd if it equals @scmnd.
284 + *
285 + * Return value:
286 + * Either NULL or a pointer to the SCSI command the caller became owner of.
287 + */
288 +static struct scsi_cmnd *srp_claim_req(struct srp_target_port *target,
289 + struct srp_request *req,
290 + struct scsi_cmnd *scmnd)
291 {
292 unsigned long flags;
293
294 - srp_unmap_data(req->scmnd, target, req);
295 + spin_lock_irqsave(&target->lock, flags);
296 + if (!scmnd) {
297 + scmnd = req->scmnd;
298 + req->scmnd = NULL;
299 + } else if (req->scmnd == scmnd) {
300 + req->scmnd = NULL;
301 + } else {
302 + scmnd = NULL;
303 + }
304 + spin_unlock_irqrestore(&target->lock, flags);
305 +
306 + return scmnd;
307 +}
308 +
309 +/**
310 + * srp_free_req() - Unmap data and add request to the free request list.
311 + */
312 +static void srp_free_req(struct srp_target_port *target,
313 + struct srp_request *req, struct scsi_cmnd *scmnd,
314 + s32 req_lim_delta)
315 +{
316 + unsigned long flags;
317 +
318 + srp_unmap_data(scmnd, target, req);
319 +
320 spin_lock_irqsave(&target->lock, flags);
321 target->req_lim += req_lim_delta;
322 - req->scmnd = NULL;
323 list_add_tail(&req->list, &target->free_reqs);
324 spin_unlock_irqrestore(&target->lock, flags);
325 }
326
327 static void srp_reset_req(struct srp_target_port *target, struct srp_request *req)
328 {
329 - req->scmnd->result = DID_RESET << 16;
330 - req->scmnd->scsi_done(req->scmnd);
331 - srp_remove_req(target, req, 0);
332 + struct scsi_cmnd *scmnd = srp_claim_req(target, req, NULL);
333 +
334 + if (scmnd) {
335 + scmnd->result = DID_RESET << 16;
336 + scmnd->scsi_done(scmnd);
337 + srp_free_req(target, req, scmnd, 0);
338 + }
339 }
340
341 static int srp_reconnect_target(struct srp_target_port *target)
342 @@ -1055,11 +1093,18 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
343 complete(&target->tsk_mgmt_done);
344 } else {
345 req = &target->req_ring[rsp->tag];
346 - scmnd = req->scmnd;
347 - if (!scmnd)
348 + scmnd = srp_claim_req(target, req, NULL);
349 + if (!scmnd) {
350 shost_printk(KERN_ERR, target->scsi_host,
351 "Null scmnd for RSP w/tag %016llx\n",
352 (unsigned long long) rsp->tag);
353 +
354 + spin_lock_irqsave(&target->lock, flags);
355 + target->req_lim += be32_to_cpu(rsp->req_lim_delta);
356 + spin_unlock_irqrestore(&target->lock, flags);
357 +
358 + return;
359 + }
360 scmnd->result = rsp->status;
361
362 if (rsp->flags & SRP_RSP_FLAG_SNSVALID) {
363 @@ -1074,7 +1119,9 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
364 else if (rsp->flags & (SRP_RSP_FLAG_DIOVER | SRP_RSP_FLAG_DIUNDER))
365 scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt));
366
367 - srp_remove_req(target, req, be32_to_cpu(rsp->req_lim_delta));
368 + srp_free_req(target, req, scmnd,
369 + be32_to_cpu(rsp->req_lim_delta));
370 +
371 scmnd->host_scribble = NULL;
372 scmnd->scsi_done(scmnd);
373 }
374 @@ -1613,25 +1660,17 @@ static int srp_abort(struct scsi_cmnd *scmnd)
375 {
376 struct srp_target_port *target = host_to_target(scmnd->device->host);
377 struct srp_request *req = (struct srp_request *) scmnd->host_scribble;
378 - int ret = SUCCESS;
379
380 shost_printk(KERN_ERR, target->scsi_host, "SRP abort called\n");
381
382 - if (!req || target->qp_in_error)
383 - return FAILED;
384 - if (srp_send_tsk_mgmt(target, req->index, scmnd->device->lun,
385 - SRP_TSK_ABORT_TASK))
386 + if (!req || target->qp_in_error || !srp_claim_req(target, req, scmnd))
387 return FAILED;
388 + srp_send_tsk_mgmt(target, req->index, scmnd->device->lun,
389 + SRP_TSK_ABORT_TASK);
390 + srp_free_req(target, req, scmnd, 0);
391 + scmnd->result = DID_ABORT << 16;
392
393 - if (req->scmnd) {
394 - if (!target->tsk_mgmt_status) {
395 - srp_remove_req(target, req, 0);
396 - scmnd->result = DID_ABORT << 16;
397 - } else
398 - ret = FAILED;
399 - }
400 -
401 - return ret;
402 + return SUCCESS;
403 }
404
405 static int srp_reset_device(struct scsi_cmnd *scmnd)
406 diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
407 index 0781fb0..39ebf9f 100644
408 --- a/drivers/net/wireless/rt2x00/rt2800usb.c
409 +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
410 @@ -829,6 +829,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
411 { USB_DEVICE(0x0411, 0x015d) },
412 { USB_DEVICE(0x0411, 0x016f) },
413 { USB_DEVICE(0x0411, 0x01a2) },
414 + { USB_DEVICE(0x0411, 0x01ee) },
415 /* Corega */
416 { USB_DEVICE(0x07aa, 0x002f) },
417 { USB_DEVICE(0x07aa, 0x003c) },
418 diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
419 index 9ab094c..efba0188 100644
420 --- a/drivers/usb/host/pci-quirks.c
421 +++ b/drivers/usb/host/pci-quirks.c
422 @@ -798,6 +798,13 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
423 }
424 EXPORT_SYMBOL_GPL(usb_enable_xhci_ports);
425
426 +void usb_disable_xhci_ports(struct pci_dev *xhci_pdev)
427 +{
428 + pci_write_config_dword(xhci_pdev, USB_INTEL_USB3_PSSEN, 0x0);
429 + pci_write_config_dword(xhci_pdev, USB_INTEL_XUSB2PR, 0x0);
430 +}
431 +EXPORT_SYMBOL_GPL(usb_disable_xhci_ports);
432 +
433 /**
434 * PCI Quirks for xHCI.
435 *
436 diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h
437 index b1002a8..ef004a5 100644
438 --- a/drivers/usb/host/pci-quirks.h
439 +++ b/drivers/usb/host/pci-quirks.h
440 @@ -10,6 +10,7 @@ void usb_amd_quirk_pll_disable(void);
441 void usb_amd_quirk_pll_enable(void);
442 bool usb_is_intel_switchable_xhci(struct pci_dev *pdev);
443 void usb_enable_xhci_ports(struct pci_dev *xhci_pdev);
444 +void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
445 #else
446 static inline void usb_amd_quirk_pll_disable(void) {}
447 static inline void usb_amd_quirk_pll_enable(void) {}
448 diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
449 index 39e230f..b047458 100644
450 --- a/drivers/usb/host/xhci-pci.c
451 +++ b/drivers/usb/host/xhci-pci.c
452 @@ -140,11 +140,21 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
453 xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
454 xhci->quirks |= XHCI_EP_LIMIT_QUIRK;
455 xhci->limit_active_eps = 64;
456 + /*
457 + * PPT desktop boards DH77EB and DH77DF will power back on after
458 + * a few seconds of being shutdown. The fix for this is to
459 + * switch the ports from xHCI to EHCI on shutdown. We can't use
460 + * DMI information to find those particular boards (since each
461 + * vendor will change the board name), so we have to key off all
462 + * PPT chipsets.
463 + */
464 + xhci->quirks |= XHCI_SPURIOUS_REBOOT;
465 }
466 if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
467 pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
468 xhci->quirks |= XHCI_RESET_ON_RESUME;
469 xhci_dbg(xhci, "QUIRK: Resetting on resume\n");
470 + xhci->quirks |= XHCI_TRUST_TX_LENGTH;
471 }
472 if (pdev->vendor == PCI_VENDOR_ID_VIA)
473 xhci->quirks |= XHCI_RESET_ON_RESUME;
474 diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
475 index 16ec4d3..1f9602a 100644
476 --- a/drivers/usb/host/xhci.c
477 +++ b/drivers/usb/host/xhci.c
478 @@ -163,7 +163,7 @@ int xhci_reset(struct xhci_hcd *xhci)
479 xhci_writel(xhci, command, &xhci->op_regs->command);
480
481 ret = handshake(xhci, &xhci->op_regs->command,
482 - CMD_RESET, 0, 250 * 1000);
483 + CMD_RESET, 0, 10 * 1000 * 1000);
484 if (ret)
485 return ret;
486
487 @@ -172,7 +172,8 @@ int xhci_reset(struct xhci_hcd *xhci)
488 * xHCI cannot write to any doorbells or operational registers other
489 * than status until the "Controller Not Ready" flag is cleared.
490 */
491 - return handshake(xhci, &xhci->op_regs->status, STS_CNR, 0, 250 * 1000);
492 + return handshake(xhci, &xhci->op_regs->status,
493 + STS_CNR, 0, 10 * 1000 * 1000);
494 }
495
496 /*
497 @@ -593,6 +594,9 @@ void xhci_shutdown(struct usb_hcd *hcd)
498 {
499 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
500
501 + if (xhci->quirks && XHCI_SPURIOUS_REBOOT)
502 + usb_disable_xhci_ports(to_pci_dev(hcd->self.controller));
503 +
504 spin_lock_irq(&xhci->lock);
505 xhci_halt(xhci);
506 spin_unlock_irq(&xhci->lock);
507 diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
508 index 25c3e26..d88644d 100644
509 --- a/drivers/usb/host/xhci.h
510 +++ b/drivers/usb/host/xhci.h
511 @@ -1316,6 +1316,7 @@ struct xhci_hcd {
512 #define XHCI_RESET_ON_RESUME (1 << 7)
513 #define XHCI_AMD_0x96_HOST (1 << 9)
514 #define XHCI_TRUST_TX_LENGTH (1 << 10)
515 +#define XHCI_SPURIOUS_REBOOT (1 << 13)
516 unsigned int num_active_eps;
517 unsigned int limit_active_eps;
518 /* There are two roothubs to keep track of bus suspend info for */
519 diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
520 index 86fc8fc..535a307 100644
521 --- a/drivers/usb/serial/ftdi_sio.c
522 +++ b/drivers/usb/serial/ftdi_sio.c
523 @@ -809,6 +809,7 @@ static struct usb_device_id id_table_combined [] = {
524 { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) },
525 { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) },
526 { USB_DEVICE(PI_VID, PI_E861_PID) },
527 + { USB_DEVICE(KONDO_VID, KONDO_USB_SERIAL_PID) },
528 { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
529 { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
530 .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
531 diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
532 index d27d7d7..54b4258 100644
533 --- a/drivers/usb/serial/ftdi_sio_ids.h
534 +++ b/drivers/usb/serial/ftdi_sio_ids.h
535 @@ -795,6 +795,13 @@
536 #define PI_E861_PID 0x1008 /* E-861 piezo controller USB connection */
537
538 /*
539 + * Kondo Kagaku Co.Ltd.
540 + * http://www.kondo-robot.com/EN
541 + */
542 +#define KONDO_VID 0x165c
543 +#define KONDO_USB_SERIAL_PID 0x0002
544 +
545 +/*
546 * Bayer Ascensia Contour blood glucose meter USB-converter cable.
547 * http://winglucofacts.com/cables/
548 */
549 diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
550 index fdbeb6a..fd2463e 100644
551 --- a/drivers/usb/serial/mos7840.c
552 +++ b/drivers/usb/serial/mos7840.c
553 @@ -1191,9 +1191,12 @@ static int mos7840_chars_in_buffer(struct tty_struct *tty)
554 }
555
556 spin_lock_irqsave(&mos7840_port->pool_lock, flags);
557 - for (i = 0; i < NUM_URBS; ++i)
558 - if (mos7840_port->busy[i])
559 - chars += URB_TRANSFER_BUFFER_SIZE;
560 + for (i = 0; i < NUM_URBS; ++i) {
561 + if (mos7840_port->busy[i]) {
562 + struct urb *urb = mos7840_port->write_urb_pool[i];
563 + chars += urb->transfer_buffer_length;
564 + }
565 + }
566 spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
567 dbg("%s - returns %d", __func__, chars);
568 return chars;
569 diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
570 index d232623..d8851d0 100644
571 --- a/drivers/usb/serial/option.c
572 +++ b/drivers/usb/serial/option.c
573 @@ -80,85 +80,9 @@ static void option_instat_callback(struct urb *urb);
574 #define OPTION_PRODUCT_GTM380_MODEM 0x7201
575
576 #define HUAWEI_VENDOR_ID 0x12D1
577 -#define HUAWEI_PRODUCT_E600 0x1001
578 -#define HUAWEI_PRODUCT_E220 0x1003
579 -#define HUAWEI_PRODUCT_E220BIS 0x1004
580 -#define HUAWEI_PRODUCT_E1401 0x1401
581 -#define HUAWEI_PRODUCT_E1402 0x1402
582 -#define HUAWEI_PRODUCT_E1403 0x1403
583 -#define HUAWEI_PRODUCT_E1404 0x1404
584 -#define HUAWEI_PRODUCT_E1405 0x1405
585 -#define HUAWEI_PRODUCT_E1406 0x1406
586 -#define HUAWEI_PRODUCT_E1407 0x1407
587 -#define HUAWEI_PRODUCT_E1408 0x1408
588 -#define HUAWEI_PRODUCT_E1409 0x1409
589 -#define HUAWEI_PRODUCT_E140A 0x140A
590 -#define HUAWEI_PRODUCT_E140B 0x140B
591 -#define HUAWEI_PRODUCT_E140C 0x140C
592 -#define HUAWEI_PRODUCT_E140D 0x140D
593 -#define HUAWEI_PRODUCT_E140E 0x140E
594 -#define HUAWEI_PRODUCT_E140F 0x140F
595 -#define HUAWEI_PRODUCT_E1410 0x1410
596 -#define HUAWEI_PRODUCT_E1411 0x1411
597 -#define HUAWEI_PRODUCT_E1412 0x1412
598 -#define HUAWEI_PRODUCT_E1413 0x1413
599 -#define HUAWEI_PRODUCT_E1414 0x1414
600 -#define HUAWEI_PRODUCT_E1415 0x1415
601 -#define HUAWEI_PRODUCT_E1416 0x1416
602 -#define HUAWEI_PRODUCT_E1417 0x1417
603 -#define HUAWEI_PRODUCT_E1418 0x1418
604 -#define HUAWEI_PRODUCT_E1419 0x1419
605 -#define HUAWEI_PRODUCT_E141A 0x141A
606 -#define HUAWEI_PRODUCT_E141B 0x141B
607 -#define HUAWEI_PRODUCT_E141C 0x141C
608 -#define HUAWEI_PRODUCT_E141D 0x141D
609 -#define HUAWEI_PRODUCT_E141E 0x141E
610 -#define HUAWEI_PRODUCT_E141F 0x141F
611 -#define HUAWEI_PRODUCT_E1420 0x1420
612 -#define HUAWEI_PRODUCT_E1421 0x1421
613 -#define HUAWEI_PRODUCT_E1422 0x1422
614 -#define HUAWEI_PRODUCT_E1423 0x1423
615 -#define HUAWEI_PRODUCT_E1424 0x1424
616 -#define HUAWEI_PRODUCT_E1425 0x1425
617 -#define HUAWEI_PRODUCT_E1426 0x1426
618 -#define HUAWEI_PRODUCT_E1427 0x1427
619 -#define HUAWEI_PRODUCT_E1428 0x1428
620 -#define HUAWEI_PRODUCT_E1429 0x1429
621 -#define HUAWEI_PRODUCT_E142A 0x142A
622 -#define HUAWEI_PRODUCT_E142B 0x142B
623 -#define HUAWEI_PRODUCT_E142C 0x142C
624 -#define HUAWEI_PRODUCT_E142D 0x142D
625 -#define HUAWEI_PRODUCT_E142E 0x142E
626 -#define HUAWEI_PRODUCT_E142F 0x142F
627 -#define HUAWEI_PRODUCT_E1430 0x1430
628 -#define HUAWEI_PRODUCT_E1431 0x1431
629 -#define HUAWEI_PRODUCT_E1432 0x1432
630 -#define HUAWEI_PRODUCT_E1433 0x1433
631 -#define HUAWEI_PRODUCT_E1434 0x1434
632 -#define HUAWEI_PRODUCT_E1435 0x1435
633 -#define HUAWEI_PRODUCT_E1436 0x1436
634 -#define HUAWEI_PRODUCT_E1437 0x1437
635 -#define HUAWEI_PRODUCT_E1438 0x1438
636 -#define HUAWEI_PRODUCT_E1439 0x1439
637 -#define HUAWEI_PRODUCT_E143A 0x143A
638 -#define HUAWEI_PRODUCT_E143B 0x143B
639 -#define HUAWEI_PRODUCT_E143C 0x143C
640 -#define HUAWEI_PRODUCT_E143D 0x143D
641 -#define HUAWEI_PRODUCT_E143E 0x143E
642 -#define HUAWEI_PRODUCT_E143F 0x143F
643 #define HUAWEI_PRODUCT_K4505 0x1464
644 #define HUAWEI_PRODUCT_K3765 0x1465
645 -#define HUAWEI_PRODUCT_E14AC 0x14AC
646 -#define HUAWEI_PRODUCT_K3806 0x14AE
647 #define HUAWEI_PRODUCT_K4605 0x14C6
648 -#define HUAWEI_PRODUCT_K5005 0x14C8
649 -#define HUAWEI_PRODUCT_K3770 0x14C9
650 -#define HUAWEI_PRODUCT_K3771 0x14CA
651 -#define HUAWEI_PRODUCT_K4510 0x14CB
652 -#define HUAWEI_PRODUCT_K4511 0x14CC
653 -#define HUAWEI_PRODUCT_ETS1220 0x1803
654 -#define HUAWEI_PRODUCT_E353 0x1506
655 -#define HUAWEI_PRODUCT_E173S 0x1C05
656
657 #define QUANTA_VENDOR_ID 0x0408
658 #define QUANTA_PRODUCT_Q101 0xEA02
659 @@ -615,104 +539,123 @@ static const struct usb_device_id option_ids[] = {
660 { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLX) },
661 { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GKE) },
662 { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLE) },
663 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) },
664 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) },
665 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },
666 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401, 0xff, 0xff, 0xff) },
667 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1402, 0xff, 0xff, 0xff) },
668 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403, 0xff, 0xff, 0xff) },
669 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1404, 0xff, 0xff, 0xff) },
670 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405, 0xff, 0xff, 0xff) },
671 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406, 0xff, 0xff, 0xff) },
672 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1407, 0xff, 0xff, 0xff) },
673 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408, 0xff, 0xff, 0xff) },
674 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409, 0xff, 0xff, 0xff) },
675 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140A, 0xff, 0xff, 0xff) },
676 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140B, 0xff, 0xff, 0xff) },
677 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140C, 0xff, 0xff, 0xff) },
678 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140D, 0xff, 0xff, 0xff) },
679 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140E, 0xff, 0xff, 0xff) },
680 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E140F, 0xff, 0xff, 0xff) },
681 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) },
682 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) },
683 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) },
684 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413, 0xff, 0xff, 0xff) },
685 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414, 0xff, 0xff, 0xff) },
686 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415, 0xff, 0xff, 0xff) },
687 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416, 0xff, 0xff, 0xff) },
688 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) },
689 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) },
690 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) },
691 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141A, 0xff, 0xff, 0xff) },
692 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141B, 0xff, 0xff, 0xff) },
693 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141C, 0xff, 0xff, 0xff) },
694 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141D, 0xff, 0xff, 0xff) },
695 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141E, 0xff, 0xff, 0xff) },
696 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E141F, 0xff, 0xff, 0xff) },
697 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1420, 0xff, 0xff, 0xff) },
698 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1421, 0xff, 0xff, 0xff) },
699 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1422, 0xff, 0xff, 0xff) },
700 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1423, 0xff, 0xff, 0xff) },
701 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1424, 0xff, 0xff, 0xff) },
702 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1425, 0xff, 0xff, 0xff) },
703 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1426, 0xff, 0xff, 0xff) },
704 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1427, 0xff, 0xff, 0xff) },
705 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1428, 0xff, 0xff, 0xff) },
706 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1429, 0xff, 0xff, 0xff) },
707 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142A, 0xff, 0xff, 0xff) },
708 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142B, 0xff, 0xff, 0xff) },
709 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142C, 0xff, 0xff, 0xff) },
710 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142D, 0xff, 0xff, 0xff) },
711 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142E, 0xff, 0xff, 0xff) },
712 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E142F, 0xff, 0xff, 0xff) },
713 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1430, 0xff, 0xff, 0xff) },
714 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1431, 0xff, 0xff, 0xff) },
715 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1432, 0xff, 0xff, 0xff) },
716 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1433, 0xff, 0xff, 0xff) },
717 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1434, 0xff, 0xff, 0xff) },
718 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1435, 0xff, 0xff, 0xff) },
719 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1436, 0xff, 0xff, 0xff) },
720 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1437, 0xff, 0xff, 0xff) },
721 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1438, 0xff, 0xff, 0xff) },
722 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1439, 0xff, 0xff, 0xff) },
723 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143A, 0xff, 0xff, 0xff) },
724 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143B, 0xff, 0xff, 0xff) },
725 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143C, 0xff, 0xff, 0xff) },
726 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143D, 0xff, 0xff, 0xff) },
727 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143E, 0xff, 0xff, 0xff) },
728 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E143F, 0xff, 0xff, 0xff) },
729 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E173S, 0xff, 0xff, 0xff) },
730 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4505, 0xff, 0xff, 0xff),
731 .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
732 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff),
733 .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
734 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) },
735 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) },
736 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) },
737 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff),
738 .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist },
739 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x31) },
740 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x32) },
741 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) },
742 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) },
743 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) },
744 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) },
745 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) },
746 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) },
747 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x32) },
748 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x31) },
749 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x32) },
750 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x31) },
751 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x32) },
752 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x01) },
753 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x02) },
754 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x03) },
755 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x10) },
756 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x12) },
757 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x13) },
758 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x01) }, /* E398 3G Modem */
759 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x02) }, /* E398 3G PC UI Interface */
760 - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x02, 0x03) }, /* E398 3G Application Interface */
761 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0xff, 0xff) },
762 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x01) },
763 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x02) },
764 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x03) },
765 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x04) },
766 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x05) },
767 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x06) },
768 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0A) },
769 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0B) },
770 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0D) },
771 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0E) },
772 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x0F) },
773 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x10) },
774 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x12) },
775 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x13) },
776 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x14) },
777 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x15) },
778 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x17) },
779 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x18) },
780 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x19) },
781 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1A) },
782 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1B) },
783 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x1C) },
784 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x31) },
785 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x32) },
786 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x33) },
787 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x34) },
788 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x35) },
789 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x36) },
790 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3A) },
791 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3B) },
792 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3D) },
793 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3E) },
794 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x3F) },
795 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x48) },
796 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x49) },
797 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4A) },
798 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4B) },
799 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x4C) },
800 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x61) },
801 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x62) },
802 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x63) },
803 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x64) },
804 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x65) },
805 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x66) },
806 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6A) },
807 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6B) },
808 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6D) },
809 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6E) },
810 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x6F) },
811 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x78) },
812 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x79) },
813 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7A) },
814 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7B) },
815 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x01, 0x7C) },
816 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x01) },
817 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x02) },
818 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x03) },
819 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x04) },
820 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x05) },
821 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x06) },
822 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0A) },
823 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0B) },
824 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0D) },
825 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0E) },
826 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x0F) },
827 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x10) },
828 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x12) },
829 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x13) },
830 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x14) },
831 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x15) },
832 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x17) },
833 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x18) },
834 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x19) },
835 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1A) },
836 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1B) },
837 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x1C) },
838 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x31) },
839 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x32) },
840 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x33) },
841 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x34) },
842 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x35) },
843 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x36) },
844 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3A) },
845 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3B) },
846 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3D) },
847 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3E) },
848 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x3F) },
849 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x48) },
850 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x49) },
851 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4A) },
852 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4B) },
853 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x4C) },
854 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x61) },
855 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x62) },
856 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x63) },
857 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x64) },
858 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x65) },
859 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x66) },
860 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6A) },
861 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6B) },
862 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6D) },
863 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6E) },
864 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x6F) },
865 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x78) },
866 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x79) },
867 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7A) },
868 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7B) },
869 + { USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0xff, 0x02, 0x7C) },
870 +
871 +
872 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) },
873 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) },
874 { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) },
875 @@ -939,6 +882,8 @@ static const struct usb_device_id option_ids[] = {
876 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff) },
877 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff) },
878 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1012, 0xff, 0xff, 0xff) },
879 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1018, 0xff, 0xff, 0xff),
880 + .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
881 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1057, 0xff, 0xff, 0xff) },
882 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1058, 0xff, 0xff, 0xff) },
883 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1059, 0xff, 0xff, 0xff) },
884 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
885 index 113b107..489d406 100644
886 --- a/fs/ext4/super.c
887 +++ b/fs/ext4/super.c
888 @@ -860,6 +860,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
889 ei->i_reserved_meta_blocks = 0;
890 ei->i_allocated_meta_blocks = 0;
891 ei->i_da_metadata_calc_len = 0;
892 + ei->i_da_metadata_calc_last_lblock = 0;
893 spin_lock_init(&(ei->i_block_reservation_lock));
894 #ifdef CONFIG_QUOTA
895 ei->i_reserved_quota = 0;
896 diff --git a/fs/fuse/file.c b/fs/fuse/file.c
897 index 82a6646..79fca8d 100644
898 --- a/fs/fuse/file.c
899 +++ b/fs/fuse/file.c
900 @@ -1710,7 +1710,7 @@ static int fuse_verify_ioctl_iov(struct iovec *iov, size_t count)
901 size_t n;
902 u32 max = FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT;
903
904 - for (n = 0; n < count; n++) {
905 + for (n = 0; n < count; n++, iov++) {
906 if (iov->iov_len > (size_t) max)
907 return -ENOMEM;
908 max -= iov->iov_len;
909 diff --git a/include/linux/usb.h b/include/linux/usb.h
910 index b08e04c..6cd1576 100644
911 --- a/include/linux/usb.h
912 +++ b/include/linux/usb.h
913 @@ -757,6 +757,27 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size)
914 .bInterfaceSubClass = (sc), \
915 .bInterfaceProtocol = (pr)
916
917 +/**
918 + * USB_VENDOR_AND_INTERFACE_INFO - describe a specific usb vendor with a class of usb interfaces
919 + * @vend: the 16 bit USB Vendor ID
920 + * @cl: bInterfaceClass value
921 + * @sc: bInterfaceSubClass value
922 + * @pr: bInterfaceProtocol value
923 + *
924 + * This macro is used to create a struct usb_device_id that matches a
925 + * specific vendor with a specific class of interfaces.
926 + *
927 + * This is especially useful when explicitly matching devices that have
928 + * vendor specific bDeviceClass values, but standards-compliant interfaces.
929 + */
930 +#define USB_VENDOR_AND_INTERFACE_INFO(vend, cl, sc, pr) \
931 + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
932 + | USB_DEVICE_ID_MATCH_VENDOR, \
933 + .idVendor = (vend), \
934 + .bInterfaceClass = (cl), \
935 + .bInterfaceSubClass = (sc), \
936 + .bInterfaceProtocol = (pr)
937 +
938 /* ----------------------------------------------------------------------- */
939
940 /* Stuff for dynamic usb ids */

  ViewVC Help
Powered by ViewVC 1.1.20