Magellan Linux

Annotation of /trunk/kernel-lts/patches-3.4/0129-3.4.30-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2083 - (hide annotations) (download)
Wed Feb 20 10:54:38 2013 UTC (11 years, 3 months ago) by niro
File size: 35863 byte(s)
-linux-3.4.30
1 niro 2083 diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
2     index e3e7340..66c4cae 100644
3     --- a/arch/x86/ia32/ia32entry.S
4     +++ b/arch/x86/ia32/ia32entry.S
5     @@ -205,7 +205,7 @@ sysexit_from_sys_call:
6     testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
7     jnz ia32_ret_from_sys_call
8     TRACE_IRQS_ON
9     - sti
10     + ENABLE_INTERRUPTS(CLBR_NONE)
11     movl %eax,%esi /* second arg, syscall return value */
12     cmpl $-MAX_ERRNO,%eax /* is it an error ? */
13     jbe 1f
14     @@ -215,7 +215,7 @@ sysexit_from_sys_call:
15     call __audit_syscall_exit
16     movq RAX-ARGOFFSET(%rsp),%rax /* reload syscall return value */
17     movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
18     - cli
19     + DISABLE_INTERRUPTS(CLBR_NONE)
20     TRACE_IRQS_OFF
21     testl %edi,TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
22     jz \exit
23     diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
24     index 4a1d8f3..c62132c 100644
25     --- a/drivers/gpu/drm/radeon/evergreen.c
26     +++ b/drivers/gpu/drm/radeon/evergreen.c
27     @@ -1147,14 +1147,18 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav
28     if (!(tmp & EVERGREEN_CRTC_BLANK_DATA_EN)) {
29     radeon_wait_for_vblank(rdev, i);
30     tmp |= EVERGREEN_CRTC_BLANK_DATA_EN;
31     + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1);
32     WREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i], tmp);
33     + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0);
34     }
35     } else {
36     tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]);
37     if (!(tmp & EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE)) {
38     radeon_wait_for_vblank(rdev, i);
39     tmp |= EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE;
40     + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1);
41     WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp);
42     + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0);
43     }
44     }
45     /* wait for the next frame */
46     @@ -1179,6 +1183,8 @@ void evergreen_mc_stop(struct radeon_device *rdev, struct evergreen_mc_save *sav
47     blackout &= ~BLACKOUT_MODE_MASK;
48     WREG32(MC_SHARED_BLACKOUT_CNTL, blackout | 1);
49     }
50     + /* wait for the MC to settle */
51     + udelay(100);
52     }
53    
54     void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save)
55     @@ -1212,11 +1218,15 @@ void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *s
56     if (ASIC_IS_DCE6(rdev)) {
57     tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]);
58     tmp |= EVERGREEN_CRTC_BLANK_DATA_EN;
59     + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1);
60     WREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i], tmp);
61     + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0);
62     } else {
63     tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]);
64     tmp &= ~EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE;
65     + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1);
66     WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp);
67     + WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0);
68     }
69     /* wait for the next frame */
70     frame_count = radeon_get_vblank_counter(rdev, i);
71     diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
72     index 2cad9fd..a2470d9 100644
73     --- a/drivers/gpu/drm/radeon/radeon_combios.c
74     +++ b/drivers/gpu/drm/radeon/radeon_combios.c
75     @@ -2338,6 +2338,14 @@ bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev)
76     1),
77     ATOM_DEVICE_CRT1_SUPPORT);
78     }
79     + /* RV100 board with external TDMS bit mis-set.
80     + * Actually uses internal TMDS, clear the bit.
81     + */
82     + if (dev->pdev->device == 0x5159 &&
83     + dev->pdev->subsystem_vendor == 0x1014 &&
84     + dev->pdev->subsystem_device == 0x029A) {
85     + tmp &= ~(1 << 4);
86     + }
87     if ((tmp >> 4) & 0x1) {
88     devices |= ATOM_DEVICE_DFP2_SUPPORT;
89     radeon_add_legacy_encoder(dev,
90     diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
91     index 1f50727..00d9cac 100644
92     --- a/drivers/gpu/drm/radeon/radeon_display.c
93     +++ b/drivers/gpu/drm/radeon/radeon_display.c
94     @@ -1129,8 +1129,10 @@ radeon_user_framebuffer_create(struct drm_device *dev,
95     }
96    
97     radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL);
98     - if (radeon_fb == NULL)
99     + if (radeon_fb == NULL) {
100     + drm_gem_object_unreference_unlocked(obj);
101     return ERR_PTR(-ENOMEM);
102     + }
103    
104     ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
105     if (ret) {
106     diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
107     index cc33b3d..33eff8b 100644
108     --- a/drivers/gpu/drm/radeon/radeon_ring.c
109     +++ b/drivers/gpu/drm/radeon/radeon_ring.c
110     @@ -311,6 +311,9 @@ int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *ring, unsi
111     {
112     int r;
113    
114     + /* make sure we aren't trying to allocate more space than there is on the ring */
115     + if (ndw > (ring->ring_size / 4))
116     + return -ENOMEM;
117     /* Align requested size with padding so unlock_commit can
118     * pad safely */
119     ndw = (ndw + ring->align_mask) & ~ring->align_mask;
120     diff --git a/drivers/gpu/drm/radeon/reg_srcs/cayman b/drivers/gpu/drm/radeon/reg_srcs/cayman
121     index 0f656b1..a072fa8 100644
122     --- a/drivers/gpu/drm/radeon/reg_srcs/cayman
123     +++ b/drivers/gpu/drm/radeon/reg_srcs/cayman
124     @@ -1,5 +1,6 @@
125     cayman 0x9400
126     0x0000802C GRBM_GFX_INDEX
127     +0x00008040 WAIT_UNTIL
128     0x000084FC CP_STRMOUT_CNTL
129     0x000085F0 CP_COHER_CNTL
130     0x000085F4 CP_COHER_SIZE
131     diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c
132     index dd2aeee..8f8c8ae 100644
133     --- a/drivers/rtc/rtc-isl1208.c
134     +++ b/drivers/rtc/rtc-isl1208.c
135     @@ -494,6 +494,7 @@ isl1208_rtc_interrupt(int irq, void *data)
136     {
137     unsigned long timeout = jiffies + msecs_to_jiffies(1000);
138     struct i2c_client *client = data;
139     + struct rtc_device *rtc = i2c_get_clientdata(client);
140     int handled = 0, sr, err;
141    
142     /*
143     @@ -516,6 +517,8 @@ isl1208_rtc_interrupt(int irq, void *data)
144     if (sr & ISL1208_REG_SR_ALM) {
145     dev_dbg(&client->dev, "alarm!\n");
146    
147     + rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);
148     +
149     /* Clear the alarm */
150     sr &= ~ISL1208_REG_SR_ALM;
151     sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, sr);
152     diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
153     index ef8f790..67dda0d 100644
154     --- a/drivers/usb/core/hub.c
155     +++ b/drivers/usb/core/hub.c
156     @@ -2463,6 +2463,23 @@ static int check_port_resume_type(struct usb_device *udev,
157     }
158    
159     #ifdef CONFIG_USB_SUSPEND
160     +/*
161     + * usb_disable_function_remotewakeup - disable usb3.0
162     + * device's function remote wakeup
163     + * @udev: target device
164     + *
165     + * Assume there's only one function on the USB 3.0
166     + * device and disable remote wake for the first
167     + * interface. FIXME if the interface association
168     + * descriptor shows there's more than one function.
169     + */
170     +static int usb_disable_function_remotewakeup(struct usb_device *udev)
171     +{
172     + return usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
173     + USB_REQ_CLEAR_FEATURE, USB_RECIP_INTERFACE,
174     + USB_INTRF_FUNC_SUSPEND, 0, NULL, 0,
175     + USB_CTRL_SET_TIMEOUT);
176     +}
177    
178     /*
179     * usb_port_suspend - suspend a usb device's upstream port
180     @@ -2569,12 +2586,19 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
181     dev_dbg(hub->intfdev, "can't suspend port %d, status %d\n",
182     port1, status);
183     /* paranoia: "should not happen" */
184     - if (udev->do_remote_wakeup)
185     - (void) usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
186     - USB_REQ_CLEAR_FEATURE, USB_RECIP_DEVICE,
187     - USB_DEVICE_REMOTE_WAKEUP, 0,
188     - NULL, 0,
189     - USB_CTRL_SET_TIMEOUT);
190     + if (udev->do_remote_wakeup) {
191     + if (!hub_is_superspeed(hub->hdev)) {
192     + (void) usb_control_msg(udev,
193     + usb_sndctrlpipe(udev, 0),
194     + USB_REQ_CLEAR_FEATURE,
195     + USB_RECIP_DEVICE,
196     + USB_DEVICE_REMOTE_WAKEUP, 0,
197     + NULL, 0,
198     + USB_CTRL_SET_TIMEOUT);
199     + } else
200     + (void) usb_disable_function_remotewakeup(udev);
201     +
202     + }
203    
204     /* Try to enable USB2 hardware LPM again */
205     if (udev->usb2_hw_lpm_capable == 1)
206     @@ -2661,20 +2685,30 @@ static int finish_port_resume(struct usb_device *udev)
207     * udev->reset_resume
208     */
209     } else if (udev->actconfig && !udev->reset_resume) {
210     - le16_to_cpus(&devstatus);
211     - if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) {
212     - status = usb_control_msg(udev,
213     - usb_sndctrlpipe(udev, 0),
214     - USB_REQ_CLEAR_FEATURE,
215     + if (!hub_is_superspeed(udev->parent)) {
216     + le16_to_cpus(&devstatus);
217     + if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP))
218     + status = usb_control_msg(udev,
219     + usb_sndctrlpipe(udev, 0),
220     + USB_REQ_CLEAR_FEATURE,
221     USB_RECIP_DEVICE,
222     - USB_DEVICE_REMOTE_WAKEUP, 0,
223     - NULL, 0,
224     - USB_CTRL_SET_TIMEOUT);
225     - if (status)
226     - dev_dbg(&udev->dev,
227     - "disable remote wakeup, status %d\n",
228     - status);
229     + USB_DEVICE_REMOTE_WAKEUP, 0,
230     + NULL, 0,
231     + USB_CTRL_SET_TIMEOUT);
232     + } else {
233     + status = usb_get_status(udev, USB_RECIP_INTERFACE, 0,
234     + &devstatus);
235     + le16_to_cpus(&devstatus);
236     + if (!status && devstatus & (USB_INTRF_STAT_FUNC_RW_CAP
237     + | USB_INTRF_STAT_FUNC_RW))
238     + status =
239     + usb_disable_function_remotewakeup(udev);
240     }
241     +
242     + if (status)
243     + dev_dbg(&udev->dev,
244     + "disable remote wakeup, status %d\n",
245     + status);
246     status = 0;
247     }
248     return status;
249     diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
250     index 38fe076..3cb52a9 100644
251     --- a/drivers/usb/host/ehci-hub.c
252     +++ b/drivers/usb/host/ehci-hub.c
253     @@ -612,7 +612,11 @@ ehci_hub_status_data (struct usb_hcd *hcd, char *buf)
254     status = STS_PCD;
255     }
256     }
257     - /* FIXME autosuspend idle root hubs */
258     +
259     + /* If a resume is in progress, make sure it can finish */
260     + if (ehci->resuming_ports)
261     + mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(25));
262     +
263     spin_unlock_irqrestore (&ehci->lock, flags);
264     return status ? retval : 0;
265     }
266     diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
267     index a60679c..14d2d71 100644
268     --- a/drivers/usb/host/ehci-sched.c
269     +++ b/drivers/usb/host/ehci-sched.c
270     @@ -236,7 +236,7 @@ static inline unsigned char tt_start_uframe(struct ehci_hcd *ehci, __hc32 mask)
271     }
272    
273     static const unsigned char
274     -max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 30, 0 };
275     +max_tt_usecs[] = { 125, 125, 125, 125, 125, 125, 125, 25 };
276    
277     /* carryover low/fullspeed bandwidth that crosses uframe boundries */
278     static inline void carryover_tt_bandwidth(unsigned short tt_usecs[8])
279     diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
280     index eb5563a..7893351 100644
281     --- a/drivers/usb/host/pci-quirks.c
282     +++ b/drivers/usb/host/pci-quirks.c
283     @@ -780,6 +780,7 @@ void usb_enable_xhci_ports(struct pci_dev *xhci_pdev)
284     "defaulting to EHCI.\n");
285     dev_warn(&xhci_pdev->dev,
286     "USB 3.0 devices will work at USB 2.0 speeds.\n");
287     + usb_disable_xhci_ports(xhci_pdev);
288     return;
289     }
290    
291     diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
292     index 01361f9..87ee86d 100644
293     --- a/drivers/usb/host/xhci-ring.c
294     +++ b/drivers/usb/host/xhci-ring.c
295     @@ -1698,7 +1698,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
296     faked_port_index + 1);
297     if (slot_id && xhci->devs[slot_id])
298     xhci_ring_device(xhci, slot_id);
299     - if (bus_state->port_remote_wakeup && (1 << faked_port_index)) {
300     + if (bus_state->port_remote_wakeup & (1 << faked_port_index)) {
301     bus_state->port_remote_wakeup &=
302     ~(1 << faked_port_index);
303     xhci_test_and_clear_bit(xhci, port_array,
304     @@ -2587,6 +2587,8 @@ cleanup:
305     (trb_comp_code != COMP_STALL &&
306     trb_comp_code != COMP_BABBLE))
307     xhci_urb_free_priv(xhci, urb_priv);
308     + else
309     + kfree(urb_priv);
310    
311     usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb);
312     if ((urb->actual_length != urb->transfer_buffer_length &&
313     @@ -3106,7 +3108,7 @@ static u32 xhci_v1_0_td_remainder(int running_total, int trb_buff_len,
314     * running_total.
315     */
316     packets_transferred = (running_total + trb_buff_len) /
317     - usb_endpoint_maxp(&urb->ep->desc);
318     + GET_MAX_PACKET(usb_endpoint_maxp(&urb->ep->desc));
319    
320     if ((total_packet_count - packets_transferred) > 31)
321     return 31 << 17;
322     @@ -3640,7 +3642,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
323     td_len = urb->iso_frame_desc[i].length;
324     td_remain_len = td_len;
325     total_packet_count = DIV_ROUND_UP(td_len,
326     - usb_endpoint_maxp(&urb->ep->desc));
327     + GET_MAX_PACKET(
328     + usb_endpoint_maxp(&urb->ep->desc)));
329     /* A zero-length transfer still involves at least one packet. */
330     if (total_packet_count == 0)
331     total_packet_count++;
332     @@ -3662,9 +3665,11 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
333     td = urb_priv->td[i];
334     for (j = 0; j < trbs_per_td; j++) {
335     u32 remainder = 0;
336     - field = TRB_TBC(burst_count) | TRB_TLBPC(residue);
337     + field = 0;
338    
339     if (first_trb) {
340     + field = TRB_TBC(burst_count) |
341     + TRB_TLBPC(residue);
342     /* Queue the isoc TRB */
343     field |= TRB_TYPE(TRB_ISOC);
344     /* Assume URB_ISO_ASAP is set */
345     diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
346     index 3fbf39d..7746944 100644
347     --- a/drivers/usb/serial/ftdi_sio.c
348     +++ b/drivers/usb/serial/ftdi_sio.c
349     @@ -590,6 +590,7 @@ static struct usb_device_id id_table_combined [] = {
350     /*
351     * ELV devices:
352     */
353     + { USB_DEVICE(FTDI_ELV_VID, FTDI_ELV_WS300_PID) },
354     { USB_DEVICE(FTDI_VID, FTDI_ELV_USR_PID) },
355     { USB_DEVICE(FTDI_VID, FTDI_ELV_MSM1_PID) },
356     { USB_DEVICE(FTDI_VID, FTDI_ELV_KL100_PID) },
357     @@ -676,6 +677,7 @@ static struct usb_device_id id_table_combined [] = {
358     { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) },
359     { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) },
360     { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_7_PID) },
361     + { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) },
362     { USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) },
363     { USB_DEVICE(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID) },
364     { USB_DEVICE(FTDI_VID, FTDI_MHAM_KW_PID) },
365     diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
366     index fa5d560..9d359e1 100644
367     --- a/drivers/usb/serial/ftdi_sio_ids.h
368     +++ b/drivers/usb/serial/ftdi_sio_ids.h
369     @@ -147,6 +147,11 @@
370     #define XSENS_CONVERTER_6_PID 0xD38E
371     #define XSENS_CONVERTER_7_PID 0xD38F
372    
373     +/**
374     + * Zolix (www.zolix.com.cb) product ids
375     + */
376     +#define FTDI_OMNI1509 0xD491 /* Omni1509 embedded USB-serial */
377     +
378     /*
379     * NDI (www.ndigital.com) product ids
380     */
381     @@ -204,7 +209,7 @@
382    
383     /*
384     * ELV USB devices submitted by Christian Abt of ELV (www.elv.de).
385     - * All of these devices use FTDI's vendor ID (0x0403).
386     + * Almost all of these devices use FTDI's vendor ID (0x0403).
387     * Further IDs taken from ELV Windows .inf file.
388     *
389     * The previously included PID for the UO 100 module was incorrect.
390     @@ -212,6 +217,8 @@
391     *
392     * Armin Laeuger originally sent the PID for the UM 100 module.
393     */
394     +#define FTDI_ELV_VID 0x1B1F /* ELV AG */
395     +#define FTDI_ELV_WS300_PID 0xC006 /* eQ3 WS 300 PC II */
396     #define FTDI_ELV_USR_PID 0xE000 /* ELV Universal-Sound-Recorder */
397     #define FTDI_ELV_MSM1_PID 0xE001 /* ELV Mini-Sound-Modul */
398     #define FTDI_ELV_KL100_PID 0xE002 /* ELV Kfz-Leistungsmesser KL 100 */
399     diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
400     index 0778cd0..6c077a1 100644
401     --- a/drivers/usb/serial/option.c
402     +++ b/drivers/usb/serial/option.c
403     @@ -242,6 +242,7 @@ static void option_instat_callback(struct urb *urb);
404     #define TELIT_PRODUCT_CC864_DUAL 0x1005
405     #define TELIT_PRODUCT_CC864_SINGLE 0x1006
406     #define TELIT_PRODUCT_DE910_DUAL 0x1010
407     +#define TELIT_PRODUCT_LE920 0x1200
408    
409     /* ZTE PRODUCTS */
410     #define ZTE_VENDOR_ID 0x19d2
411     @@ -453,6 +454,10 @@ static void option_instat_callback(struct urb *urb);
412     #define TPLINK_VENDOR_ID 0x2357
413     #define TPLINK_PRODUCT_MA180 0x0201
414    
415     +/* Changhong products */
416     +#define CHANGHONG_VENDOR_ID 0x2077
417     +#define CHANGHONG_PRODUCT_CH690 0x7001
418     +
419     /* some devices interfaces need special handling due to a number of reasons */
420     enum option_blacklist_reason {
421     OPTION_BLACKLIST_NONE = 0,
422     @@ -534,6 +539,11 @@ static const struct option_blacklist_info zte_1255_blacklist = {
423     .reserved = BIT(3) | BIT(4),
424     };
425    
426     +static const struct option_blacklist_info telit_le920_blacklist = {
427     + .sendsetup = BIT(0),
428     + .reserved = BIT(1) | BIT(5),
429     +};
430     +
431     static const struct usb_device_id option_ids[] = {
432     { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
433     { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
434     @@ -784,6 +794,8 @@ static const struct usb_device_id option_ids[] = {
435     { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_DUAL) },
436     { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) },
437     { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) },
438     + { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
439     + .driver_info = (kernel_ulong_t)&telit_le920_blacklist },
440     { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
441     { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff),
442     .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
443     @@ -1318,6 +1330,7 @@ static const struct usb_device_id option_ids[] = {
444     { USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) },
445     { USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
446     .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
447     + { USB_DEVICE(CHANGHONG_VENDOR_ID, CHANGHONG_PRODUCT_CH690) },
448     { } /* Terminating entry */
449     };
450     MODULE_DEVICE_TABLE(usb, option_ids);
451     diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
452     index 50b5371..d46277d 100644
453     --- a/drivers/usb/serial/qcserial.c
454     +++ b/drivers/usb/serial/qcserial.c
455     @@ -55,6 +55,7 @@ static const struct usb_device_id id_table[] = {
456     {DEVICE_G1K(0x05c6, 0x9221)}, /* Generic Gobi QDL device */
457     {DEVICE_G1K(0x05c6, 0x9231)}, /* Generic Gobi QDL device */
458     {DEVICE_G1K(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */
459     + {DEVICE_G1K(0x1bc7, 0x900e)}, /* Telit Gobi QDL device */
460    
461     /* Gobi 2000 devices */
462     {USB_DEVICE(0x1410, 0xa010)}, /* Novatel Gobi 2000 QDL device */
463     diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c
464     index 105d900..16b0bf0 100644
465     --- a/drivers/usb/storage/initializers.c
466     +++ b/drivers/usb/storage/initializers.c
467     @@ -92,8 +92,8 @@ int usb_stor_ucr61s2b_init(struct us_data *us)
468     return 0;
469     }
470    
471     -/* This places the HUAWEI E220 devices in multi-port mode */
472     -int usb_stor_huawei_e220_init(struct us_data *us)
473     +/* This places the HUAWEI usb dongles in multi-port mode */
474     +static int usb_stor_huawei_feature_init(struct us_data *us)
475     {
476     int result;
477    
478     @@ -104,3 +104,75 @@ int usb_stor_huawei_e220_init(struct us_data *us)
479     US_DEBUGP("Huawei mode set result is %d\n", result);
480     return 0;
481     }
482     +
483     +/*
484     + * It will send a scsi switch command called rewind' to huawei dongle.
485     + * When the dongle receives this command at the first time,
486     + * it will reboot immediately. After rebooted, it will ignore this command.
487     + * So it is unnecessary to read its response.
488     + */
489     +static int usb_stor_huawei_scsi_init(struct us_data *us)
490     +{
491     + int result = 0;
492     + int act_len = 0;
493     + struct bulk_cb_wrap *bcbw = (struct bulk_cb_wrap *) us->iobuf;
494     + char rewind_cmd[] = {0x11, 0x06, 0x20, 0x00, 0x00, 0x01, 0x01, 0x00,
495     + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
496     +
497     + bcbw->Signature = cpu_to_le32(US_BULK_CB_SIGN);
498     + bcbw->Tag = 0;
499     + bcbw->DataTransferLength = 0;
500     + bcbw->Flags = bcbw->Lun = 0;
501     + bcbw->Length = sizeof(rewind_cmd);
502     + memset(bcbw->CDB, 0, sizeof(bcbw->CDB));
503     + memcpy(bcbw->CDB, rewind_cmd, sizeof(rewind_cmd));
504     +
505     + result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, bcbw,
506     + US_BULK_CB_WRAP_LEN, &act_len);
507     + US_DEBUGP("transfer actual length=%d, result=%d\n", act_len, result);
508     + return result;
509     +}
510     +
511     +/*
512     + * It tries to find the supported Huawei USB dongles.
513     + * In Huawei, they assign the following product IDs
514     + * for all of their mobile broadband dongles,
515     + * including the new dongles in the future.
516     + * So if the product ID is not included in this list,
517     + * it means it is not Huawei's mobile broadband dongles.
518     + */
519     +static int usb_stor_huawei_dongles_pid(struct us_data *us)
520     +{
521     + struct usb_interface_descriptor *idesc;
522     + int idProduct;
523     +
524     + idesc = &us->pusb_intf->cur_altsetting->desc;
525     + idProduct = us->pusb_dev->descriptor.idProduct;
526     + /* The first port is CDROM,
527     + * means the dongle in the single port mode,
528     + * and a switch command is required to be sent. */
529     + if (idesc && idesc->bInterfaceNumber == 0) {
530     + if ((idProduct == 0x1001)
531     + || (idProduct == 0x1003)
532     + || (idProduct == 0x1004)
533     + || (idProduct >= 0x1401 && idProduct <= 0x1500)
534     + || (idProduct >= 0x1505 && idProduct <= 0x1600)
535     + || (idProduct >= 0x1c02 && idProduct <= 0x2202)) {
536     + return 1;
537     + }
538     + }
539     + return 0;
540     +}
541     +
542     +int usb_stor_huawei_init(struct us_data *us)
543     +{
544     + int result = 0;
545     +
546     + if (usb_stor_huawei_dongles_pid(us)) {
547     + if (us->pusb_dev->descriptor.idProduct >= 0x1446)
548     + result = usb_stor_huawei_scsi_init(us);
549     + else
550     + result = usb_stor_huawei_feature_init(us);
551     + }
552     + return result;
553     +}
554     diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h
555     index 529327f..5376d4f 100644
556     --- a/drivers/usb/storage/initializers.h
557     +++ b/drivers/usb/storage/initializers.h
558     @@ -46,5 +46,5 @@ int usb_stor_euscsi_init(struct us_data *us);
559     * flash reader */
560     int usb_stor_ucr61s2b_init(struct us_data *us);
561    
562     -/* This places the HUAWEI E220 devices in multi-port mode */
563     -int usb_stor_huawei_e220_init(struct us_data *us);
564     +/* This places the HUAWEI usb dongles in multi-port mode */
565     +int usb_stor_huawei_init(struct us_data *us);
566     diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
567     index 5ffa116..27858f9 100644
568     --- a/drivers/usb/storage/unusual_devs.h
569     +++ b/drivers/usb/storage/unusual_devs.h
570     @@ -1515,335 +1515,10 @@ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100,
571     /* Reported by fangxiaozhi <huananhu@huawei.com>
572     * This brings the HUAWEI data card devices into multi-port mode
573     */
574     -UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000,
575     +UNUSUAL_VENDOR_INTF(0x12d1, 0x08, 0x06, 0x50,
576     "HUAWEI MOBILE",
577     "Mass Storage",
578     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
579     - 0),
580     -UNUSUAL_DEV( 0x12d1, 0x1003, 0x0000, 0x0000,
581     - "HUAWEI MOBILE",
582     - "Mass Storage",
583     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
584     - 0),
585     -UNUSUAL_DEV( 0x12d1, 0x1004, 0x0000, 0x0000,
586     - "HUAWEI MOBILE",
587     - "Mass Storage",
588     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
589     - 0),
590     -UNUSUAL_DEV( 0x12d1, 0x1401, 0x0000, 0x0000,
591     - "HUAWEI MOBILE",
592     - "Mass Storage",
593     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
594     - 0),
595     -UNUSUAL_DEV( 0x12d1, 0x1402, 0x0000, 0x0000,
596     - "HUAWEI MOBILE",
597     - "Mass Storage",
598     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
599     - 0),
600     -UNUSUAL_DEV( 0x12d1, 0x1403, 0x0000, 0x0000,
601     - "HUAWEI MOBILE",
602     - "Mass Storage",
603     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
604     - 0),
605     -UNUSUAL_DEV( 0x12d1, 0x1404, 0x0000, 0x0000,
606     - "HUAWEI MOBILE",
607     - "Mass Storage",
608     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
609     - 0),
610     -UNUSUAL_DEV( 0x12d1, 0x1405, 0x0000, 0x0000,
611     - "HUAWEI MOBILE",
612     - "Mass Storage",
613     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
614     - 0),
615     -UNUSUAL_DEV( 0x12d1, 0x1406, 0x0000, 0x0000,
616     - "HUAWEI MOBILE",
617     - "Mass Storage",
618     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
619     - 0),
620     -UNUSUAL_DEV( 0x12d1, 0x1407, 0x0000, 0x0000,
621     - "HUAWEI MOBILE",
622     - "Mass Storage",
623     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
624     - 0),
625     -UNUSUAL_DEV( 0x12d1, 0x1408, 0x0000, 0x0000,
626     - "HUAWEI MOBILE",
627     - "Mass Storage",
628     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
629     - 0),
630     -UNUSUAL_DEV( 0x12d1, 0x1409, 0x0000, 0x0000,
631     - "HUAWEI MOBILE",
632     - "Mass Storage",
633     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
634     - 0),
635     -UNUSUAL_DEV( 0x12d1, 0x140A, 0x0000, 0x0000,
636     - "HUAWEI MOBILE",
637     - "Mass Storage",
638     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
639     - 0),
640     -UNUSUAL_DEV( 0x12d1, 0x140B, 0x0000, 0x0000,
641     - "HUAWEI MOBILE",
642     - "Mass Storage",
643     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
644     - 0),
645     -UNUSUAL_DEV( 0x12d1, 0x140C, 0x0000, 0x0000,
646     - "HUAWEI MOBILE",
647     - "Mass Storage",
648     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
649     - 0),
650     -UNUSUAL_DEV( 0x12d1, 0x140D, 0x0000, 0x0000,
651     - "HUAWEI MOBILE",
652     - "Mass Storage",
653     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
654     - 0),
655     -UNUSUAL_DEV( 0x12d1, 0x140E, 0x0000, 0x0000,
656     - "HUAWEI MOBILE",
657     - "Mass Storage",
658     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
659     - 0),
660     -UNUSUAL_DEV( 0x12d1, 0x140F, 0x0000, 0x0000,
661     - "HUAWEI MOBILE",
662     - "Mass Storage",
663     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
664     - 0),
665     -UNUSUAL_DEV( 0x12d1, 0x1410, 0x0000, 0x0000,
666     - "HUAWEI MOBILE",
667     - "Mass Storage",
668     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
669     - 0),
670     -UNUSUAL_DEV( 0x12d1, 0x1411, 0x0000, 0x0000,
671     - "HUAWEI MOBILE",
672     - "Mass Storage",
673     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
674     - 0),
675     -UNUSUAL_DEV( 0x12d1, 0x1412, 0x0000, 0x0000,
676     - "HUAWEI MOBILE",
677     - "Mass Storage",
678     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
679     - 0),
680     -UNUSUAL_DEV( 0x12d1, 0x1413, 0x0000, 0x0000,
681     - "HUAWEI MOBILE",
682     - "Mass Storage",
683     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
684     - 0),
685     -UNUSUAL_DEV( 0x12d1, 0x1414, 0x0000, 0x0000,
686     - "HUAWEI MOBILE",
687     - "Mass Storage",
688     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
689     - 0),
690     -UNUSUAL_DEV( 0x12d1, 0x1415, 0x0000, 0x0000,
691     - "HUAWEI MOBILE",
692     - "Mass Storage",
693     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
694     - 0),
695     -UNUSUAL_DEV( 0x12d1, 0x1416, 0x0000, 0x0000,
696     - "HUAWEI MOBILE",
697     - "Mass Storage",
698     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
699     - 0),
700     -UNUSUAL_DEV( 0x12d1, 0x1417, 0x0000, 0x0000,
701     - "HUAWEI MOBILE",
702     - "Mass Storage",
703     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
704     - 0),
705     -UNUSUAL_DEV( 0x12d1, 0x1418, 0x0000, 0x0000,
706     - "HUAWEI MOBILE",
707     - "Mass Storage",
708     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
709     - 0),
710     -UNUSUAL_DEV( 0x12d1, 0x1419, 0x0000, 0x0000,
711     - "HUAWEI MOBILE",
712     - "Mass Storage",
713     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
714     - 0),
715     -UNUSUAL_DEV( 0x12d1, 0x141A, 0x0000, 0x0000,
716     - "HUAWEI MOBILE",
717     - "Mass Storage",
718     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
719     - 0),
720     -UNUSUAL_DEV( 0x12d1, 0x141B, 0x0000, 0x0000,
721     - "HUAWEI MOBILE",
722     - "Mass Storage",
723     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
724     - 0),
725     -UNUSUAL_DEV( 0x12d1, 0x141C, 0x0000, 0x0000,
726     - "HUAWEI MOBILE",
727     - "Mass Storage",
728     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
729     - 0),
730     -UNUSUAL_DEV( 0x12d1, 0x141D, 0x0000, 0x0000,
731     - "HUAWEI MOBILE",
732     - "Mass Storage",
733     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
734     - 0),
735     -UNUSUAL_DEV( 0x12d1, 0x141E, 0x0000, 0x0000,
736     - "HUAWEI MOBILE",
737     - "Mass Storage",
738     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
739     - 0),
740     -UNUSUAL_DEV( 0x12d1, 0x141F, 0x0000, 0x0000,
741     - "HUAWEI MOBILE",
742     - "Mass Storage",
743     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
744     - 0),
745     -UNUSUAL_DEV( 0x12d1, 0x1420, 0x0000, 0x0000,
746     - "HUAWEI MOBILE",
747     - "Mass Storage",
748     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
749     - 0),
750     -UNUSUAL_DEV( 0x12d1, 0x1421, 0x0000, 0x0000,
751     - "HUAWEI MOBILE",
752     - "Mass Storage",
753     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
754     - 0),
755     -UNUSUAL_DEV( 0x12d1, 0x1422, 0x0000, 0x0000,
756     - "HUAWEI MOBILE",
757     - "Mass Storage",
758     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
759     - 0),
760     -UNUSUAL_DEV( 0x12d1, 0x1423, 0x0000, 0x0000,
761     - "HUAWEI MOBILE",
762     - "Mass Storage",
763     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
764     - 0),
765     -UNUSUAL_DEV( 0x12d1, 0x1424, 0x0000, 0x0000,
766     - "HUAWEI MOBILE",
767     - "Mass Storage",
768     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
769     - 0),
770     -UNUSUAL_DEV( 0x12d1, 0x1425, 0x0000, 0x0000,
771     - "HUAWEI MOBILE",
772     - "Mass Storage",
773     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
774     - 0),
775     -UNUSUAL_DEV( 0x12d1, 0x1426, 0x0000, 0x0000,
776     - "HUAWEI MOBILE",
777     - "Mass Storage",
778     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
779     - 0),
780     -UNUSUAL_DEV( 0x12d1, 0x1427, 0x0000, 0x0000,
781     - "HUAWEI MOBILE",
782     - "Mass Storage",
783     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
784     - 0),
785     -UNUSUAL_DEV( 0x12d1, 0x1428, 0x0000, 0x0000,
786     - "HUAWEI MOBILE",
787     - "Mass Storage",
788     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
789     - 0),
790     -UNUSUAL_DEV( 0x12d1, 0x1429, 0x0000, 0x0000,
791     - "HUAWEI MOBILE",
792     - "Mass Storage",
793     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
794     - 0),
795     -UNUSUAL_DEV( 0x12d1, 0x142A, 0x0000, 0x0000,
796     - "HUAWEI MOBILE",
797     - "Mass Storage",
798     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
799     - 0),
800     -UNUSUAL_DEV( 0x12d1, 0x142B, 0x0000, 0x0000,
801     - "HUAWEI MOBILE",
802     - "Mass Storage",
803     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
804     - 0),
805     -UNUSUAL_DEV( 0x12d1, 0x142C, 0x0000, 0x0000,
806     - "HUAWEI MOBILE",
807     - "Mass Storage",
808     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
809     - 0),
810     -UNUSUAL_DEV( 0x12d1, 0x142D, 0x0000, 0x0000,
811     - "HUAWEI MOBILE",
812     - "Mass Storage",
813     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
814     - 0),
815     -UNUSUAL_DEV( 0x12d1, 0x142E, 0x0000, 0x0000,
816     - "HUAWEI MOBILE",
817     - "Mass Storage",
818     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
819     - 0),
820     -UNUSUAL_DEV( 0x12d1, 0x142F, 0x0000, 0x0000,
821     - "HUAWEI MOBILE",
822     - "Mass Storage",
823     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
824     - 0),
825     -UNUSUAL_DEV( 0x12d1, 0x1430, 0x0000, 0x0000,
826     - "HUAWEI MOBILE",
827     - "Mass Storage",
828     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
829     - 0),
830     -UNUSUAL_DEV( 0x12d1, 0x1431, 0x0000, 0x0000,
831     - "HUAWEI MOBILE",
832     - "Mass Storage",
833     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
834     - 0),
835     -UNUSUAL_DEV( 0x12d1, 0x1432, 0x0000, 0x0000,
836     - "HUAWEI MOBILE",
837     - "Mass Storage",
838     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
839     - 0),
840     -UNUSUAL_DEV( 0x12d1, 0x1433, 0x0000, 0x0000,
841     - "HUAWEI MOBILE",
842     - "Mass Storage",
843     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
844     - 0),
845     -UNUSUAL_DEV( 0x12d1, 0x1434, 0x0000, 0x0000,
846     - "HUAWEI MOBILE",
847     - "Mass Storage",
848     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
849     - 0),
850     -UNUSUAL_DEV( 0x12d1, 0x1435, 0x0000, 0x0000,
851     - "HUAWEI MOBILE",
852     - "Mass Storage",
853     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
854     - 0),
855     -UNUSUAL_DEV( 0x12d1, 0x1436, 0x0000, 0x0000,
856     - "HUAWEI MOBILE",
857     - "Mass Storage",
858     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
859     - 0),
860     -UNUSUAL_DEV( 0x12d1, 0x1437, 0x0000, 0x0000,
861     - "HUAWEI MOBILE",
862     - "Mass Storage",
863     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
864     - 0),
865     -UNUSUAL_DEV( 0x12d1, 0x1438, 0x0000, 0x0000,
866     - "HUAWEI MOBILE",
867     - "Mass Storage",
868     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
869     - 0),
870     -UNUSUAL_DEV( 0x12d1, 0x1439, 0x0000, 0x0000,
871     - "HUAWEI MOBILE",
872     - "Mass Storage",
873     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
874     - 0),
875     -UNUSUAL_DEV( 0x12d1, 0x143A, 0x0000, 0x0000,
876     - "HUAWEI MOBILE",
877     - "Mass Storage",
878     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
879     - 0),
880     -UNUSUAL_DEV( 0x12d1, 0x143B, 0x0000, 0x0000,
881     - "HUAWEI MOBILE",
882     - "Mass Storage",
883     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
884     - 0),
885     -UNUSUAL_DEV( 0x12d1, 0x143C, 0x0000, 0x0000,
886     - "HUAWEI MOBILE",
887     - "Mass Storage",
888     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
889     - 0),
890     -UNUSUAL_DEV( 0x12d1, 0x143D, 0x0000, 0x0000,
891     - "HUAWEI MOBILE",
892     - "Mass Storage",
893     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
894     - 0),
895     -UNUSUAL_DEV( 0x12d1, 0x143E, 0x0000, 0x0000,
896     - "HUAWEI MOBILE",
897     - "Mass Storage",
898     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
899     - 0),
900     -UNUSUAL_DEV( 0x12d1, 0x143F, 0x0000, 0x0000,
901     - "HUAWEI MOBILE",
902     - "Mass Storage",
903     - USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_e220_init,
904     + USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_huawei_init,
905     0),
906    
907     /* Reported by Vilius Bilinkevicius <vilisas AT xxx DOT lt) */
908     diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
909     index 2653e73..e73cf56 100644
910     --- a/drivers/usb/storage/usb.c
911     +++ b/drivers/usb/storage/usb.c
912     @@ -120,6 +120,17 @@ MODULE_PARM_DESC(quirks, "supplemental list of device IDs and their quirks");
913     .useTransport = use_transport, \
914     }
915    
916     +#define UNUSUAL_VENDOR_INTF(idVendor, cl, sc, pr, \
917     + vendor_name, product_name, use_protocol, use_transport, \
918     + init_function, Flags) \
919     +{ \
920     + .vendorName = vendor_name, \
921     + .productName = product_name, \
922     + .useProtocol = use_protocol, \
923     + .useTransport = use_transport, \
924     + .initFunction = init_function, \
925     +}
926     +
927     static struct us_unusual_dev us_unusual_dev_list[] = {
928     # include "unusual_devs.h"
929     { } /* Terminating entry */
930     @@ -131,6 +142,7 @@ static struct us_unusual_dev for_dynamic_ids =
931     #undef UNUSUAL_DEV
932     #undef COMPLIANT_DEV
933     #undef USUAL_DEV
934     +#undef UNUSUAL_VENDOR_INTF
935    
936     #ifdef CONFIG_LOCKDEP
937    
938     diff --git a/drivers/usb/storage/usual-tables.c b/drivers/usb/storage/usual-tables.c
939     index b969279..a9b5f2e 100644
940     --- a/drivers/usb/storage/usual-tables.c
941     +++ b/drivers/usb/storage/usual-tables.c
942     @@ -46,6 +46,20 @@
943     { USB_INTERFACE_INFO(USB_CLASS_MASS_STORAGE, useProto, useTrans), \
944     .driver_info = ((useType)<<24) }
945    
946     +/* Define the device is matched with Vendor ID and interface descriptors */
947     +#define UNUSUAL_VENDOR_INTF(id_vendor, cl, sc, pr, \
948     + vendorName, productName, useProtocol, useTransport, \
949     + initFunction, flags) \
950     +{ \
951     + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \
952     + | USB_DEVICE_ID_MATCH_VENDOR, \
953     + .idVendor = (id_vendor), \
954     + .bInterfaceClass = (cl), \
955     + .bInterfaceSubClass = (sc), \
956     + .bInterfaceProtocol = (pr), \
957     + .driver_info = (flags) \
958     +}
959     +
960     struct usb_device_id usb_storage_usb_ids[] = {
961     # include "unusual_devs.h"
962     { } /* Terminating entry */
963     @@ -57,6 +71,7 @@ MODULE_DEVICE_TABLE(usb, usb_storage_usb_ids);
964     #undef UNUSUAL_DEV
965     #undef COMPLIANT_DEV
966     #undef USUAL_DEV
967     +#undef UNUSUAL_VENDOR_INTF
968    
969    
970     /*
971     diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
972     index 6fe98ed..3729493 100644
973     --- a/fs/nilfs2/ioctl.c
974     +++ b/fs/nilfs2/ioctl.c
975     @@ -666,8 +666,11 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
976     if (ret < 0)
977     printk(KERN_ERR "NILFS: GC failed during preparation: "
978     "cannot read source blocks: err=%d\n", ret);
979     - else
980     + else {
981     + if (nilfs_sb_need_update(nilfs))
982     + set_nilfs_discontinued(nilfs);
983     ret = nilfs_clean_segments(inode->i_sb, argv, kbufs);
984     + }
985    
986     nilfs_remove_all_gcinodes(nilfs);
987     clear_nilfs_gc_running(nilfs);
988     diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
989     index af21f31..091fdb7 100644
990     --- a/include/linux/usb/ch9.h
991     +++ b/include/linux/usb/ch9.h
992     @@ -150,6 +150,12 @@
993     #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0))
994     #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1))
995    
996     +/*
997     + * Interface status, Figure 9-5 USB 3.0 spec
998     + */
999     +#define USB_INTRF_STAT_FUNC_RW_CAP 1
1000     +#define USB_INTRF_STAT_FUNC_RW 2
1001     +
1002     #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */
1003    
1004     /* Bit array elements as returned by the USB_REQ_GET_STATUS request. */
1005     diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
1006     index 44af55e..ead0336 100644
1007     --- a/kernel/sched/rt.c
1008     +++ b/kernel/sched/rt.c
1009     @@ -560,7 +560,7 @@ static inline struct rt_bandwidth *sched_rt_bandwidth(struct rt_rq *rt_rq)
1010     static int do_balance_runtime(struct rt_rq *rt_rq)
1011     {
1012     struct rt_bandwidth *rt_b = sched_rt_bandwidth(rt_rq);
1013     - struct root_domain *rd = cpu_rq(smp_processor_id())->rd;
1014     + struct root_domain *rd = rq_of_rt_rq(rt_rq)->rd;
1015     int i, weight, more = 0;
1016     u64 rt_period;
1017    
1018     diff --git a/lib/digsig.c b/lib/digsig.c
1019     index 8c0e629..dc2be7e 100644
1020     --- a/lib/digsig.c
1021     +++ b/lib/digsig.c
1022     @@ -162,6 +162,8 @@ static int digsig_verify_rsa(struct key *key,
1023     memset(out1, 0, head);
1024     memcpy(out1 + head, p, l);
1025    
1026     + kfree(p);
1027     +
1028     err = pkcs_1_v1_5_decode_emsa(out1, len, mblen, out2, &len);
1029     if (err)
1030     goto err;