Magellan Linux

Annotation of /trunk/kernel-mcore/patches-3.0-r2/0102-3.0.3-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1560 - (hide annotations) (download)
Thu Nov 10 14:21:33 2011 UTC (12 years, 7 months ago) by niro
File size: 22027 byte(s)
3.0-mcore-r2, updated to linux-3.0.8
1 niro 1560 diff --git a/Documentation/virtual/lguest/lguest.c b/Documentation/virtual/lguest/lguest.c
2     index cd9d6af..aec80e5 100644
3     --- a/Documentation/virtual/lguest/lguest.c
4     +++ b/Documentation/virtual/lguest/lguest.c
5     @@ -2008,6 +2008,9 @@ int main(int argc, char *argv[])
6     /* We use a simple helper to copy the arguments separated by spaces. */
7     concat((char *)(boot + 1), argv+optind+2);
8    
9     + /* Set kernel alignment to 16M (CONFIG_PHYSICAL_ALIGN) */
10     + boot->hdr.kernel_alignment = 0x1000000;
11     +
12     /* Boot protocol version: 2.07 supports the fields for lguest. */
13     boot->hdr.version = 0x207;
14    
15     diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
16     index 645b84b..7ad43c6 100644
17     --- a/drivers/gpu/drm/radeon/atombios_dp.c
18     +++ b/drivers/gpu/drm/radeon/atombios_dp.c
19     @@ -613,6 +613,18 @@ static bool radeon_dp_get_link_status(struct radeon_connector *radeon_connector,
20     return true;
21     }
22    
23     +bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector)
24     +{
25     + u8 link_status[DP_LINK_STATUS_SIZE];
26     + struct radeon_connector_atom_dig *dig = radeon_connector->con_priv;
27     +
28     + if (!radeon_dp_get_link_status(radeon_connector, link_status))
29     + return false;
30     + if (dp_channel_eq_ok(link_status, dig->dp_lane_count))
31     + return false;
32     + return true;
33     +}
34     +
35     struct radeon_dp_link_train_info {
36     struct radeon_device *rdev;
37     struct drm_encoder *encoder;
38     diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
39     index 6d6b5f1..6ab6c41 100644
40     --- a/drivers/gpu/drm/radeon/radeon_connectors.c
41     +++ b/drivers/gpu/drm/radeon/radeon_connectors.c
42     @@ -60,18 +60,20 @@ void radeon_connector_hotplug(struct drm_connector *connector)
43    
44     radeon_hpd_set_polarity(rdev, radeon_connector->hpd.hpd);
45    
46     - /* powering up/down the eDP panel generates hpd events which
47     - * can interfere with modesetting.
48     - */
49     - if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
50     + /* if the connector is already off, don't turn it back on */
51     + if (connector->dpms != DRM_MODE_DPMS_ON)
52     return;
53    
54     - /* pre-r600 did not always have the hpd pins mapped accurately to connectors */
55     - if (rdev->family >= CHIP_R600) {
56     - if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
57     + /* just deal with DP (not eDP) here. */
58     + if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
59     + int saved_dpms = connector->dpms;
60     +
61     + if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd) &&
62     + radeon_dp_needs_link_train(radeon_connector))
63     drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
64     else
65     drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
66     + connector->dpms = saved_dpms;
67     }
68     }
69    
70     diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
71     index b293487..319d85d 100644
72     --- a/drivers/gpu/drm/radeon/radeon_encoders.c
73     +++ b/drivers/gpu/drm/radeon/radeon_encoders.c
74     @@ -2323,6 +2323,9 @@ radeon_add_atom_encoder(struct drm_device *dev,
75     default:
76     encoder->possible_crtcs = 0x3;
77     break;
78     + case 4:
79     + encoder->possible_crtcs = 0xf;
80     + break;
81     case 6:
82     encoder->possible_crtcs = 0x3f;
83     break;
84     diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
85     index d09031c..68820f5 100644
86     --- a/drivers/gpu/drm/radeon/radeon_mode.h
87     +++ b/drivers/gpu/drm/radeon/radeon_mode.h
88     @@ -479,6 +479,7 @@ extern void radeon_dp_set_link_config(struct drm_connector *connector,
89     struct drm_display_mode *mode);
90     extern void radeon_dp_link_train(struct drm_encoder *encoder,
91     struct drm_connector *connector);
92     +extern bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector);
93     extern u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector);
94     extern bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector);
95     extern void atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mode);
96     diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c
97     index 1a409c5..c316294 100644
98     --- a/drivers/hwmon/ibmaem.c
99     +++ b/drivers/hwmon/ibmaem.c
100     @@ -432,13 +432,15 @@ static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg,
101     aem_send_message(ipmi);
102    
103     res = wait_for_completion_timeout(&ipmi->read_complete, IPMI_TIMEOUT);
104     - if (!res)
105     - return -ETIMEDOUT;
106     + if (!res) {
107     + res = -ETIMEDOUT;
108     + goto out;
109     + }
110    
111     if (ipmi->rx_result || ipmi->rx_msg_len != rs_size ||
112     memcmp(&rs_resp->id, &system_x_id, sizeof(system_x_id))) {
113     - kfree(rs_resp);
114     - return -ENOENT;
115     + res = -ENOENT;
116     + goto out;
117     }
118    
119     switch (size) {
120     @@ -463,8 +465,11 @@ static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg,
121     break;
122     }
123     }
124     + res = 0;
125    
126     - return 0;
127     +out:
128     + kfree(rs_resp);
129     + return res;
130     }
131    
132     /* Update AEM energy registers */
133     diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
134     index b6c5d37..1ae8913 100644
135     --- a/drivers/net/wireless/ath/ath5k/base.c
136     +++ b/drivers/net/wireless/ath/ath5k/base.c
137     @@ -1748,6 +1748,8 @@ ath5k_beacon_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
138    
139     if (dma_mapping_error(sc->dev, bf->skbaddr)) {
140     ATH5K_ERR(sc, "beacon DMA mapping failed\n");
141     + dev_kfree_skb_any(skb);
142     + bf->skb = NULL;
143     return -EIO;
144     }
145    
146     @@ -1832,8 +1834,6 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
147     ath5k_txbuf_free_skb(sc, avf->bbuf);
148     avf->bbuf->skb = skb;
149     ret = ath5k_beacon_setup(sc, avf->bbuf);
150     - if (ret)
151     - avf->bbuf->skb = NULL;
152     out:
153     return ret;
154     }
155     @@ -1854,6 +1854,7 @@ ath5k_beacon_send(struct ath5k_softc *sc)
156     struct ath5k_vif *avf;
157     struct ath5k_buf *bf;
158     struct sk_buff *skb;
159     + int err;
160    
161     ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, "in beacon_send\n");
162    
163     @@ -1902,11 +1903,6 @@ ath5k_beacon_send(struct ath5k_softc *sc)
164    
165     avf = (void *)vif->drv_priv;
166     bf = avf->bbuf;
167     - if (unlikely(bf->skb == NULL || sc->opmode == NL80211_IFTYPE_STATION ||
168     - sc->opmode == NL80211_IFTYPE_MONITOR)) {
169     - ATH5K_WARN(sc, "bf=%p bf_skb=%p\n", bf, bf ? bf->skb : NULL);
170     - return;
171     - }
172    
173     /*
174     * Stop any current dma and put the new frame on the queue.
175     @@ -1920,8 +1916,17 @@ ath5k_beacon_send(struct ath5k_softc *sc)
176    
177     /* refresh the beacon for AP or MESH mode */
178     if (sc->opmode == NL80211_IFTYPE_AP ||
179     - sc->opmode == NL80211_IFTYPE_MESH_POINT)
180     - ath5k_beacon_update(sc->hw, vif);
181     + sc->opmode == NL80211_IFTYPE_MESH_POINT) {
182     + err = ath5k_beacon_update(sc->hw, vif);
183     + if (err)
184     + return;
185     + }
186     +
187     + if (unlikely(bf->skb == NULL || sc->opmode == NL80211_IFTYPE_STATION ||
188     + sc->opmode == NL80211_IFTYPE_MONITOR)) {
189     + ATH5K_WARN(sc, "bf=%p bf_skb=%p\n", bf, bf->skb);
190     + return;
191     + }
192    
193     trace_ath5k_tx(sc, bf->skb, &sc->txqs[sc->bhalq]);
194    
195     diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c
196     index 6766f46..4bb5fff 100644
197     --- a/drivers/staging/rtl8192u/r819xU_firmware.c
198     +++ b/drivers/staging/rtl8192u/r819xU_firmware.c
199     @@ -399,10 +399,7 @@ download_firmware_fail:
200    
201     }
202    
203     -
204     -
205     -
206     -
207     -
208     -
209     +MODULE_FIRMWARE("RTL8192U/boot.img");
210     +MODULE_FIRMWARE("RTL8192U/main.img");
211     +MODULE_FIRMWARE("RTL8192U/data.img");
212    
213     diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
214     index 385acb8..3f94ac3 100644
215     --- a/drivers/usb/class/usbtmc.c
216     +++ b/drivers/usb/class/usbtmc.c
217     @@ -268,7 +268,7 @@ usbtmc_abort_bulk_in_status:
218     dev_err(dev, "usb_bulk_msg returned %d\n", rv);
219     goto exit;
220     }
221     - } while ((actual = max_size) &&
222     + } while ((actual == max_size) &&
223     (n < USBTMC_MAX_READS_TO_CLEAR_BULK_IN));
224    
225     if (actual == max_size) {
226     diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
227     index c962608..26678ca 100644
228     --- a/drivers/usb/core/config.c
229     +++ b/drivers/usb/core/config.c
230     @@ -123,10 +123,11 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
231     }
232    
233     if (usb_endpoint_xfer_isoc(&ep->desc))
234     - max_tx = ep->desc.wMaxPacketSize * (desc->bMaxBurst + 1) *
235     - (desc->bmAttributes + 1);
236     + max_tx = (desc->bMaxBurst + 1) * (desc->bmAttributes + 1) *
237     + le16_to_cpu(ep->desc.wMaxPacketSize);
238     else if (usb_endpoint_xfer_int(&ep->desc))
239     - max_tx = ep->desc.wMaxPacketSize * (desc->bMaxBurst + 1);
240     + max_tx = le16_to_cpu(ep->desc.wMaxPacketSize) *
241     + (desc->bMaxBurst + 1);
242     else
243     max_tx = 999999;
244     if (le16_to_cpu(desc->wBytesPerInterval) > max_tx) {
245     @@ -134,10 +135,10 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
246     "config %d interface %d altsetting %d ep %d: "
247     "setting to %d\n",
248     usb_endpoint_xfer_isoc(&ep->desc) ? "Isoc" : "Int",
249     - desc->wBytesPerInterval,
250     + le16_to_cpu(desc->wBytesPerInterval),
251     cfgno, inum, asnum, ep->desc.bEndpointAddress,
252     max_tx);
253     - ep->ss_ep_comp.wBytesPerInterval = max_tx;
254     + ep->ss_ep_comp.wBytesPerInterval = cpu_to_le16(max_tx);
255     }
256     }
257    
258     diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
259     index 04b90ad..e9f004e 100644
260     --- a/drivers/usb/host/pci-quirks.c
261     +++ b/drivers/usb/host/pci-quirks.c
262     @@ -803,7 +803,7 @@ static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
263    
264     /* If the BIOS owns the HC, signal that the OS wants it, and wait */
265     if (val & XHCI_HC_BIOS_OWNED) {
266     - writel(val & XHCI_HC_OS_OWNED, base + ext_cap_offset);
267     + writel(val | XHCI_HC_OS_OWNED, base + ext_cap_offset);
268    
269     /* Wait for 5 seconds with 10 microsecond polling interval */
270     timeout = handshake(base + ext_cap_offset, XHCI_HC_BIOS_OWNED,
271     diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
272     index f5fe1ac..9824761 100644
273     --- a/drivers/usb/host/xhci.c
274     +++ b/drivers/usb/host/xhci.c
275     @@ -345,7 +345,8 @@ static void xhci_event_ring_work(unsigned long arg)
276     spin_lock_irqsave(&xhci->lock, flags);
277     temp = xhci_readl(xhci, &xhci->op_regs->status);
278     xhci_dbg(xhci, "op reg status = 0x%x\n", temp);
279     - if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING)) {
280     + if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) ||
281     + (xhci->xhc_state & XHCI_STATE_HALTED)) {
282     xhci_dbg(xhci, "HW died, polling stopped.\n");
283     spin_unlock_irqrestore(&xhci->lock, flags);
284     return;
285     @@ -939,8 +940,11 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
286     return 0;
287     }
288    
289     + xhci = hcd_to_xhci(hcd);
290     + if (xhci->xhc_state & XHCI_STATE_HALTED)
291     + return -ENODEV;
292     +
293     if (check_virt_dev) {
294     - xhci = hcd_to_xhci(hcd);
295     if (!udev->slot_id || !xhci->devs
296     || !xhci->devs[udev->slot_id]) {
297     printk(KERN_DEBUG "xHCI %s called with unaddressed "
298     @@ -1242,7 +1246,8 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
299     xhci_urb_free_priv(xhci, urb_priv);
300     return ret;
301     }
302     - if (xhci->xhc_state & XHCI_STATE_DYING) {
303     + if ((xhci->xhc_state & XHCI_STATE_DYING) ||
304     + (xhci->xhc_state & XHCI_STATE_HALTED)) {
305     xhci_dbg(xhci, "Ep 0x%x: URB %p to be canceled on "
306     "non-responsive xHCI host.\n",
307     urb->ep->desc.bEndpointAddress, urb);
308     @@ -2667,7 +2672,10 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
309     int i, ret;
310    
311     ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__);
312     - if (ret <= 0)
313     + /* If the host is halted due to driver unload, we still need to free the
314     + * device.
315     + */
316     + if (ret <= 0 && ret != -ENODEV)
317     return;
318    
319     virt_dev = xhci->devs[udev->slot_id];
320     @@ -2681,7 +2689,8 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
321     spin_lock_irqsave(&xhci->lock, flags);
322     /* Don't disable the slot if the host controller is dead. */
323     state = xhci_readl(xhci, &xhci->op_regs->status);
324     - if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING)) {
325     + if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) ||
326     + (xhci->xhc_state & XHCI_STATE_HALTED)) {
327     xhci_free_virt_device(xhci, udev->slot_id);
328     spin_unlock_irqrestore(&xhci->lock, flags);
329     return;
330     diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
331     index 6aeb363..548338c 100644
332     --- a/drivers/usb/musb/musb_gadget.c
333     +++ b/drivers/usb/musb/musb_gadget.c
334     @@ -1698,6 +1698,8 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
335    
336     is_on = !!is_on;
337    
338     + pm_runtime_get_sync(musb->controller);
339     +
340     /* NOTE: this assumes we are sensing vbus; we'd rather
341     * not pullup unless the B-session is active.
342     */
343     @@ -1707,6 +1709,9 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
344     musb_pullup(musb, is_on);
345     }
346     spin_unlock_irqrestore(&musb->lock, flags);
347     +
348     + pm_runtime_put(musb->controller);
349     +
350     return 0;
351     }
352    
353     diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
354     index 2e06b90..9afb361 100644
355     --- a/drivers/usb/serial/ftdi_sio.c
356     +++ b/drivers/usb/serial/ftdi_sio.c
357     @@ -1171,7 +1171,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
358     case FT2232H: /* FT2232H chip */
359     case FT4232H: /* FT4232H chip */
360     case FT232H: /* FT232H chip */
361     - if ((baud <= 12000000) & (baud >= 1200)) {
362     + if ((baud <= 12000000) && (baud >= 1200)) {
363     div_value = ftdi_2232h_baud_to_divisor(baud);
364     } else if (baud < 1200) {
365     div_value = ftdi_232bm_baud_to_divisor(baud);
366     diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
367     index 60b25d8..8156561 100644
368     --- a/drivers/usb/serial/option.c
369     +++ b/drivers/usb/serial/option.c
370     @@ -148,6 +148,10 @@ static void option_instat_callback(struct urb *urb);
371     #define HUAWEI_PRODUCT_K4505 0x1464
372     #define HUAWEI_PRODUCT_K3765 0x1465
373     #define HUAWEI_PRODUCT_E14AC 0x14AC
374     +#define HUAWEI_PRODUCT_K3770 0x14C9
375     +#define HUAWEI_PRODUCT_K3771 0x14CA
376     +#define HUAWEI_PRODUCT_K4510 0x14CB
377     +#define HUAWEI_PRODUCT_K4511 0x14CC
378     #define HUAWEI_PRODUCT_ETS1220 0x1803
379     #define HUAWEI_PRODUCT_E353 0x1506
380    
381     @@ -547,6 +551,14 @@ static const struct usb_device_id option_ids[] = {
382     { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) },
383     { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) },
384     { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) },
385     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) },
386     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) },
387     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) },
388     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x32) },
389     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x31) },
390     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x32) },
391     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x31) },
392     + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x32) },
393     { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x01) },
394     { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) },
395     { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) },
396     diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
397     index 54a9dab..27f9ae4 100644
398     --- a/drivers/usb/serial/qcserial.c
399     +++ b/drivers/usb/serial/qcserial.c
400     @@ -45,6 +45,7 @@ static const struct usb_device_id id_table[] = {
401     {USB_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
402     {USB_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
403     {USB_DEVICE(0x05c6, 0x9008)}, /* Generic Gobi QDL device */
404     + {USB_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
405     {USB_DEVICE(0x05c6, 0x9201)}, /* Generic Gobi QDL device */
406     {USB_DEVICE(0x05c6, 0x9221)}, /* Generic Gobi QDL device */
407     {USB_DEVICE(0x05c6, 0x9231)}, /* Generic Gobi QDL device */
408     diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
409     index ccff348..3041a97 100644
410     --- a/drivers/usb/storage/unusual_devs.h
411     +++ b/drivers/usb/storage/unusual_devs.h
412     @@ -1988,6 +1988,16 @@ UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100,
413     "Micro Mini 1GB",
414     USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ),
415    
416     +/*
417     + * Nick Bowler <nbowler@elliptictech.com>
418     + * SCSI stack spams (otherwise harmless) error messages.
419     + */
420     +UNUSUAL_DEV( 0xc251, 0x4003, 0x0100, 0x0100,
421     + "Keil Software, Inc.",
422     + "V2M MotherBoard",
423     + USB_SC_DEVICE, USB_PR_DEVICE, NULL,
424     + US_FL_NOT_LOCKABLE),
425     +
426     /* Reported by Andrew Simmons <andrew.simmons@gmail.com> */
427     UNUSUAL_DEV( 0xed06, 0x4500, 0x0001, 0x0001,
428     "DataStor",
429     diff --git a/mm/vmalloc.c b/mm/vmalloc.c
430     index 1d34d75..d3d451b 100644
431     --- a/mm/vmalloc.c
432     +++ b/mm/vmalloc.c
433     @@ -732,9 +732,10 @@ static void free_unmap_vmap_area_addr(unsigned long addr)
434     #define VMAP_BBMAP_BITS_MIN (VMAP_MAX_ALLOC*2)
435     #define VMAP_MIN(x, y) ((x) < (y) ? (x) : (y)) /* can't use min() */
436     #define VMAP_MAX(x, y) ((x) > (y) ? (x) : (y)) /* can't use max() */
437     -#define VMAP_BBMAP_BITS VMAP_MIN(VMAP_BBMAP_BITS_MAX, \
438     - VMAP_MAX(VMAP_BBMAP_BITS_MIN, \
439     - VMALLOC_PAGES / NR_CPUS / 16))
440     +#define VMAP_BBMAP_BITS \
441     + VMAP_MIN(VMAP_BBMAP_BITS_MAX, \
442     + VMAP_MAX(VMAP_BBMAP_BITS_MIN, \
443     + VMALLOC_PAGES / roundup_pow_of_two(NR_CPUS) / 16))
444    
445     #define VMAP_BLOCK_SIZE (VMAP_BBMAP_BITS * PAGE_SIZE)
446    
447     diff --git a/net/atm/br2684.c b/net/atm/br2684.c
448     index 2252c20..52cfd0c 100644
449     --- a/net/atm/br2684.c
450     +++ b/net/atm/br2684.c
451     @@ -242,8 +242,6 @@ static int br2684_xmit_vcc(struct sk_buff *skb, struct net_device *dev,
452     if (brdev->payload == p_bridged) {
453     skb_push(skb, 2);
454     memset(skb->data, 0, 2);
455     - } else { /* p_routed */
456     - skb_pull(skb, ETH_HLEN);
457     }
458     }
459     skb_debug(skb);
460     diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c
461     index 3b53ad5..14eb6ea 100644
462     --- a/sound/soc/samsung/jive_wm8750.c
463     +++ b/sound/soc/samsung/jive_wm8750.c
464     @@ -131,7 +131,7 @@ static struct snd_soc_dai_link jive_dai = {
465     .cpu_dai_name = "s3c2412-i2s",
466     .codec_dai_name = "wm8750-hifi",
467     .platform_name = "samsung-audio",
468     - .codec_name = "wm8750-codec.0-0x1a",
469     + .codec_name = "wm8750-codec.0-001a",
470     .init = jive_wm8750_init,
471     .ops = &jive_ops,
472     };
473     diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
474     index 3c271f9..6201710 100644
475     --- a/sound/soc/tegra/tegra_pcm.c
476     +++ b/sound/soc/tegra/tegra_pcm.c
477     @@ -309,9 +309,14 @@ static int tegra_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
478    
479     static void tegra_pcm_deallocate_dma_buffer(struct snd_pcm *pcm, int stream)
480     {
481     - struct snd_pcm_substream *substream = pcm->streams[stream].substream;
482     - struct snd_dma_buffer *buf = &substream->dma_buffer;
483     + struct snd_pcm_substream *substream;
484     + struct snd_dma_buffer *buf;
485     +
486     + substream = pcm->streams[stream].substream;
487     + if (!substream)
488     + return;
489    
490     + buf = &substream->dma_buffer;
491     if (!buf->area)
492     return;
493    
494     diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
495     index 0d6738a..7766478 100644
496     --- a/sound/soc/tegra/tegra_wm8903.c
497     +++ b/sound/soc/tegra/tegra_wm8903.c
498     @@ -56,6 +56,7 @@
499     #define GPIO_HP_MUTE BIT(1)
500     #define GPIO_INT_MIC_EN BIT(2)
501     #define GPIO_EXT_MIC_EN BIT(3)
502     +#define GPIO_HP_DET BIT(4)
503    
504     struct tegra_wm8903 {
505     struct tegra_asoc_utils_data util_data;
506     @@ -304,6 +305,7 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
507     snd_soc_jack_add_gpios(&tegra_wm8903_hp_jack,
508     1,
509     &tegra_wm8903_hp_jack_gpio);
510     + machine->gpio_requested |= GPIO_HP_DET;
511     }
512    
513     snd_soc_jack_new(codec, "Mic Jack", SND_JACK_MICROPHONE,
514     @@ -429,10 +431,10 @@ static int __devexit tegra_wm8903_driver_remove(struct platform_device *pdev)
515     struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
516     struct tegra_wm8903_platform_data *pdata = machine->pdata;
517    
518     - snd_soc_unregister_card(card);
519     -
520     - tegra_asoc_utils_fini(&machine->util_data);
521     -
522     + if (machine->gpio_requested & GPIO_HP_DET)
523     + snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack,
524     + 1,
525     + &tegra_wm8903_hp_jack_gpio);
526     if (machine->gpio_requested & GPIO_EXT_MIC_EN)
527     gpio_free(pdata->gpio_ext_mic_en);
528     if (machine->gpio_requested & GPIO_INT_MIC_EN)
529     @@ -441,6 +443,11 @@ static int __devexit tegra_wm8903_driver_remove(struct platform_device *pdev)
530     gpio_free(pdata->gpio_hp_mute);
531     if (machine->gpio_requested & GPIO_SPKR_EN)
532     gpio_free(pdata->gpio_spkr_en);
533     + machine->gpio_requested = 0;
534     +
535     + snd_soc_unregister_card(card);
536     +
537     + tegra_asoc_utils_fini(&machine->util_data);
538    
539     kfree(machine);
540    
541     diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
542     index d0d493c..aa52b3e 100644
543     --- a/sound/usb/caiaq/audio.c
544     +++ b/sound/usb/caiaq/audio.c
545     @@ -614,6 +614,7 @@ static void read_completed(struct urb *urb)
546     struct snd_usb_caiaqdev *dev;
547     struct urb *out;
548     int frame, len, send_it = 0, outframe = 0;
549     + size_t offset = 0;
550    
551     if (urb->status || !info)
552     return;
553     @@ -634,7 +635,8 @@ static void read_completed(struct urb *urb)
554     len = urb->iso_frame_desc[outframe].actual_length;
555     out->iso_frame_desc[outframe].length = len;
556     out->iso_frame_desc[outframe].actual_length = 0;
557     - out->iso_frame_desc[outframe].offset = BYTES_PER_FRAME * frame;
558     + out->iso_frame_desc[outframe].offset = offset;
559     + offset += len;
560    
561     if (len > 0) {
562     spin_lock(&dev->spinlock);
563     @@ -650,7 +652,7 @@ static void read_completed(struct urb *urb)
564     }
565    
566     if (send_it) {
567     - out->number_of_packets = FRAMES_PER_URB;
568     + out->number_of_packets = outframe;
569     out->transfer_flags = URB_ISO_ASAP;
570     usb_submit_urb(out, GFP_ATOMIC);
571     }
572     diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
573     index e02d78c..6c86eca 100644
574     --- a/tools/perf/util/config.c
575     +++ b/tools/perf/util/config.c
576     @@ -399,7 +399,6 @@ static int perf_config_global(void)
577     int perf_config(config_fn_t fn, void *data)
578     {
579     int ret = 0, found = 0;
580     - char *repo_config = NULL;
581     const char *home = NULL;
582    
583     /* Setting $PERF_CONFIG makes perf read _only_ the given config file. */
584     @@ -421,12 +420,6 @@ int perf_config(config_fn_t fn, void *data)
585     free(user_config);
586     }
587    
588     - repo_config = perf_pathdup("config");
589     - if (!access(repo_config, R_OK)) {
590     - ret += perf_config_from_file(fn, repo_config, data);
591     - found += 1;
592     - }
593     - free(repo_config);
594     if (found == 0)
595     return -1;
596     return ret;