Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r2670 - genpatches-2.6/trunk/3.4
Date: Sun, 09 Feb 2014 21:06:50
Message-Id: 20140209210645.3E2B42004C@flycatcher.gentoo.org
1 Author: mpagano
2 Date: 2014-02-09 21:06:44 +0000 (Sun, 09 Feb 2014)
3 New Revision: 2670
4
5 Added:
6 genpatches-2.6/trunk/3.4/1078_linux-3.4.79.patch
7 Modified:
8 genpatches-2.6/trunk/3.4/0000_README
9 Log:
10 Linux patch 3.4.79
11
12 Modified: genpatches-2.6/trunk/3.4/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/3.4/0000_README 2014-02-07 19:30:34 UTC (rev 2669)
15 +++ genpatches-2.6/trunk/3.4/0000_README 2014-02-09 21:06:44 UTC (rev 2670)
16 @@ -351,6 +351,10 @@
17 From: http://www.kernel.org
18 Desc: Linux 3.4.78
19
20 +Patch: 1078_linux-3.4.79.patch
21 +From: http://www.kernel.org
22 +Desc: Linux 3.4.79
23 +
24 Patch: 1500_XATTR_USER_PREFIX.patch
25 From: https://bugs.gentoo.org/show_bug.cgi?id=470644
26 Desc: Support for namespace user.pax.* on tmpfs.
27
28 Added: genpatches-2.6/trunk/3.4/1078_linux-3.4.79.patch
29 ===================================================================
30 --- genpatches-2.6/trunk/3.4/1078_linux-3.4.79.patch (rev 0)
31 +++ genpatches-2.6/trunk/3.4/1078_linux-3.4.79.patch 2014-02-09 21:06:44 UTC (rev 2670)
32 @@ -0,0 +1,1305 @@
33 +diff --git a/Makefile b/Makefile
34 +index e891990fbf1c..7e9c23f19fe4 100644
35 +--- a/Makefile
36 ++++ b/Makefile
37 +@@ -1,6 +1,6 @@
38 + VERSION = 3
39 + PATCHLEVEL = 4
40 +-SUBLEVEL = 78
41 ++SUBLEVEL = 79
42 + EXTRAVERSION =
43 + NAME = Saber-toothed Squirrel
44 +
45 +diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c
46 +index 99a0a1d2b7dc..b26156bf15db 100644
47 +--- a/arch/arm/mach-at91/sam9_smc.c
48 ++++ b/arch/arm/mach-at91/sam9_smc.c
49 +@@ -101,7 +101,7 @@ static void sam9_smc_cs_read(void __iomem *base,
50 + /* Pulse register */
51 + val = __raw_readl(base + AT91_SMC_PULSE);
52 +
53 +- config->nwe_setup = val & AT91_SMC_NWEPULSE;
54 ++ config->nwe_pulse = val & AT91_SMC_NWEPULSE;
55 + config->ncs_write_pulse = (val & AT91_SMC_NCS_WRPULSE) >> 8;
56 + config->nrd_pulse = (val & AT91_SMC_NRDPULSE) >> 16;
57 + config->ncs_read_pulse = (val & AT91_SMC_NCS_RDPULSE) >> 24;
58 +diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c
59 +index 92c6b008dd2b..b4437e8a7a8f 100644
60 +--- a/arch/powerpc/kernel/cacheinfo.c
61 ++++ b/arch/powerpc/kernel/cacheinfo.c
62 +@@ -788,6 +788,9 @@ static void remove_cache_dir(struct cache_dir *cache_dir)
63 + {
64 + remove_index_dirs(cache_dir);
65 +
66 ++ /* Remove cache dir from sysfs */
67 ++ kobject_del(cache_dir->kobj);
68 ++
69 + kobject_put(cache_dir->kobj);
70 +
71 + kfree(cache_dir);
72 +diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
73 +index 2bf03a99c2f9..578613da251e 100644
74 +--- a/arch/x86/kvm/lapic.c
75 ++++ b/arch/x86/kvm/lapic.c
76 +@@ -538,7 +538,8 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic)
77 + ASSERT(apic != NULL);
78 +
79 + /* if initial count is 0, current count should also be 0 */
80 +- if (apic_get_reg(apic, APIC_TMICT) == 0)
81 ++ if (apic_get_reg(apic, APIC_TMICT) == 0 ||
82 ++ apic->lapic_timer.period == 0)
83 + return 0;
84 +
85 + remaining = hrtimer_get_remaining(&apic->lapic_timer.timer);
86 +diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
87 +index 41223261ede9..b73beba0aa24 100644
88 +--- a/drivers/edac/e752x_edac.c
89 ++++ b/drivers/edac/e752x_edac.c
90 +@@ -1145,9 +1145,11 @@ static int e752x_get_devs(struct pci_dev *pdev, int dev_idx,
91 + pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
92 + pvt->dev_info->err_dev, pvt->bridge_ck);
93 +
94 +- if (pvt->bridge_ck == NULL)
95 ++ if (pvt->bridge_ck == NULL) {
96 + pvt->bridge_ck = pci_scan_single_device(pdev->bus,
97 + PCI_DEVFN(0, 1));
98 ++ pci_dev_get(pvt->bridge_ck);
99 ++ }
100 +
101 + if (pvt->bridge_ck == NULL) {
102 + e752x_printk(KERN_ERR, "error reporting device not found:"
103 +diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
104 +index 6155c8b261a9..3aed841ce84b 100644
105 +--- a/drivers/md/raid5.c
106 ++++ b/drivers/md/raid5.c
107 +@@ -1805,6 +1805,7 @@ static void raid5_end_write_request(struct bio *bi, int error)
108 + set_bit(R5_MadeGoodRepl, &sh->dev[i].flags);
109 + } else {
110 + if (!uptodate) {
111 ++ set_bit(STRIPE_DEGRADED, &sh->state);
112 + set_bit(WriteErrorSeen, &rdev->flags);
113 + set_bit(R5_WriteError, &sh->dev[i].flags);
114 + if (!test_and_set_bit(WantReplacement, &rdev->flags))
115 +diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
116 +index e45b8b6d6848..0f05cef53455 100644
117 +--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
118 ++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
119 +@@ -71,6 +71,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
120 + struct sk_buff *skb = tx_buf->skb;
121 + u16 bd_idx = TX_BD(tx_buf->first_bd), new_cons;
122 + int nbd;
123 ++ u16 split_bd_len = 0;
124 +
125 + /* prefetch skb end pointer to speedup dev_kfree_skb() */
126 + prefetch(&skb->end);
127 +@@ -78,10 +79,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
128 + DP(NETIF_MSG_TX_DONE, "fp[%d]: pkt_idx %d buff @(%p)->skb %p\n",
129 + txdata->txq_index, idx, tx_buf, skb);
130 +
131 +- /* unmap first bd */
132 + tx_start_bd = &txdata->tx_desc_ring[bd_idx].start_bd;
133 +- dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd),
134 +- BD_UNMAP_LEN(tx_start_bd), DMA_TO_DEVICE);
135 +
136 +
137 + nbd = le16_to_cpu(tx_start_bd->nbd) - 1;
138 +@@ -100,12 +98,19 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
139 + --nbd;
140 + bd_idx = TX_BD(NEXT_TX_IDX(bd_idx));
141 +
142 +- /* ...and the TSO split header bd since they have no mapping */
143 ++ /* TSO headers+data bds share a common mapping. See bnx2x_tx_split() */
144 + if (tx_buf->flags & BNX2X_TSO_SPLIT_BD) {
145 ++ tx_data_bd = &txdata->tx_desc_ring[bd_idx].reg_bd;
146 ++ split_bd_len = BD_UNMAP_LEN(tx_data_bd);
147 + --nbd;
148 + bd_idx = TX_BD(NEXT_TX_IDX(bd_idx));
149 + }
150 +
151 ++ /* unmap first bd */
152 ++ dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd),
153 ++ BD_UNMAP_LEN(tx_start_bd) + split_bd_len,
154 ++ DMA_TO_DEVICE);
155 ++
156 + /* now free frags */
157 + while (nbd > 0) {
158 +
159 +diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
160 +index 5fa0880e342e..60f4a51153af 100644
161 +--- a/drivers/net/ethernet/via/via-rhine.c
162 ++++ b/drivers/net/ethernet/via/via-rhine.c
163 +@@ -1601,6 +1601,7 @@ static void rhine_reset_task(struct work_struct *work)
164 + goto out_unlock;
165 +
166 + napi_disable(&rp->napi);
167 ++ netif_tx_disable(dev);
168 + spin_lock_bh(&rp->lock);
169 +
170 + /* clear all descriptors */
171 +diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
172 +index 05cb5f6b8d48..46389a041cee 100644
173 +--- a/drivers/net/wireless/b43/b43.h
174 ++++ b/drivers/net/wireless/b43/b43.h
175 +@@ -719,8 +719,6 @@ enum b43_firmware_file_type {
176 + struct b43_request_fw_context {
177 + /* The device we are requesting the fw for. */
178 + struct b43_wldev *dev;
179 +- /* a completion event structure needed if this call is asynchronous */
180 +- struct completion fw_load_complete;
181 + /* a pointer to the firmware object */
182 + const struct firmware *blob;
183 + /* The type of firmware to request. */
184 +@@ -797,6 +795,8 @@ enum {
185 + struct b43_wldev {
186 + struct b43_bus_dev *dev;
187 + struct b43_wl *wl;
188 ++ /* a completion event structure needed if this call is asynchronous */
189 ++ struct completion fw_load_complete;
190 +
191 + /* The device initialization status.
192 + * Use b43_status() to query. */
193 +diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
194 +index f8c4499cf644..b91f55965b3a 100644
195 +--- a/drivers/net/wireless/b43/main.c
196 ++++ b/drivers/net/wireless/b43/main.c
197 +@@ -2061,6 +2061,7 @@ void b43_do_release_fw(struct b43_firmware_file *fw)
198 +
199 + static void b43_release_firmware(struct b43_wldev *dev)
200 + {
201 ++ complete(&dev->fw_load_complete);
202 + b43_do_release_fw(&dev->fw.ucode);
203 + b43_do_release_fw(&dev->fw.pcm);
204 + b43_do_release_fw(&dev->fw.initvals);
205 +@@ -2086,7 +2087,7 @@ static void b43_fw_cb(const struct firmware *firmware, void *context)
206 + struct b43_request_fw_context *ctx = context;
207 +
208 + ctx->blob = firmware;
209 +- complete(&ctx->fw_load_complete);
210 ++ complete(&ctx->dev->fw_load_complete);
211 + }
212 +
213 + int b43_do_request_fw(struct b43_request_fw_context *ctx,
214 +@@ -2133,7 +2134,7 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx,
215 + }
216 + if (async) {
217 + /* do this part asynchronously */
218 +- init_completion(&ctx->fw_load_complete);
219 ++ init_completion(&ctx->dev->fw_load_complete);
220 + err = request_firmware_nowait(THIS_MODULE, 1, ctx->fwname,
221 + ctx->dev->dev->dev, GFP_KERNEL,
222 + ctx, b43_fw_cb);
223 +@@ -2141,12 +2142,11 @@ int b43_do_request_fw(struct b43_request_fw_context *ctx,
224 + pr_err("Unable to load firmware\n");
225 + return err;
226 + }
227 +- /* stall here until fw ready */
228 +- wait_for_completion(&ctx->fw_load_complete);
229 ++ wait_for_completion(&ctx->dev->fw_load_complete);
230 + if (ctx->blob)
231 + goto fw_ready;
232 + /* On some ARM systems, the async request will fail, but the next sync
233 +- * request works. For this reason, we dall through here
234 ++ * request works. For this reason, we fall through here
235 + */
236 + }
237 + err = request_firmware(&ctx->blob, ctx->fwname,
238 +@@ -2413,6 +2413,7 @@ error:
239 +
240 + static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl);
241 + static void b43_one_core_detach(struct b43_bus_dev *dev);
242 ++static int b43_rng_init(struct b43_wl *wl);
243 +
244 + static void b43_request_firmware(struct work_struct *work)
245 + {
246 +@@ -2459,6 +2460,10 @@ start_ieee80211:
247 + if (err)
248 + goto err_one_core_detach;
249 + b43_leds_register(wl->current_dev);
250 ++
251 ++ /* Register HW RNG driver */
252 ++ b43_rng_init(wl);
253 ++
254 + goto out;
255 +
256 + err_one_core_detach:
257 +@@ -4583,9 +4588,6 @@ static void b43_wireless_core_exit(struct b43_wldev *dev)
258 + if (!dev || b43_status(dev) != B43_STAT_INITIALIZED)
259 + return;
260 +
261 +- /* Unregister HW RNG driver */
262 +- b43_rng_exit(dev->wl);
263 +-
264 + b43_set_status(dev, B43_STAT_UNINIT);
265 +
266 + /* Stop the microcode PSM. */
267 +@@ -4728,9 +4730,6 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
268 +
269 + b43_set_status(dev, B43_STAT_INITIALIZED);
270 +
271 +- /* Register HW RNG driver */
272 +- b43_rng_init(dev->wl);
273 +-
274 + out:
275 + return err;
276 +
277 +@@ -5388,6 +5387,9 @@ static void b43_bcma_remove(struct bcma_device *core)
278 +
279 + b43_one_core_detach(wldev->dev);
280 +
281 ++ /* Unregister HW RNG driver */
282 ++ b43_rng_exit(wl);
283 ++
284 + b43_leds_unregister(wl);
285 +
286 + ieee80211_free_hw(wl->hw);
287 +@@ -5468,6 +5470,9 @@ static void b43_ssb_remove(struct ssb_device *sdev)
288 +
289 + b43_one_core_detach(dev);
290 +
291 ++ /* Unregister HW RNG driver */
292 ++ b43_rng_exit(wl);
293 ++
294 + if (list_empty(&wl->devlist)) {
295 + b43_leds_unregister(wl);
296 + /* Last core on the chip unregistered.
297 +diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
298 +index 2c5367884b3f..9db0f8e132e6 100644
299 +--- a/drivers/net/wireless/b43/xmit.c
300 ++++ b/drivers/net/wireless/b43/xmit.c
301 +@@ -819,10 +819,10 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
302 + * channel number in b43. */
303 + if (chanstat & B43_RX_CHAN_5GHZ) {
304 + status.band = IEEE80211_BAND_5GHZ;
305 +- status.freq = b43_freq_to_channel_5ghz(chanid);
306 ++ status.freq = b43_channel_to_freq_5ghz(chanid);
307 + } else {
308 + status.band = IEEE80211_BAND_2GHZ;
309 +- status.freq = b43_freq_to_channel_2ghz(chanid);
310 ++ status.freq = b43_channel_to_freq_2ghz(chanid);
311 + }
312 + break;
313 + default:
314 +diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
315 +index 53696efbe155..ce7242454e95 100644
316 +--- a/drivers/net/wireless/b43legacy/main.c
317 ++++ b/drivers/net/wireless/b43legacy/main.c
318 +@@ -3915,6 +3915,7 @@ static void b43legacy_remove(struct ssb_device *dev)
319 + * as the ieee80211 unreg will destroy the workqueue. */
320 + cancel_work_sync(&wldev->restart_work);
321 + cancel_work_sync(&wl->firmware_load);
322 ++ complete(&wldev->fw_load_complete);
323 +
324 + B43legacy_WARN_ON(!wl);
325 + if (!wldev->fw.ucode)
326 +diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
327 +index 278e9f957e0d..c3d325823c81 100644
328 +--- a/drivers/net/wireless/rtlwifi/core.c
329 ++++ b/drivers/net/wireless/rtlwifi/core.c
330 +@@ -175,6 +175,7 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw,
331 + rtlpriv->cfg->maps
332 + [RTL_IBSS_INT_MASKS]);
333 + }
334 ++ mac->link_state = MAC80211_LINKED;
335 + break;
336 + case NL80211_IFTYPE_ADHOC:
337 + RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
338 +diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
339 +index 476342647589..bbe9a788c28b 100644
340 +--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
341 ++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
342 +@@ -85,17 +85,15 @@ void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
343 + if (mac->act_scanning) {
344 + tx_agc[RF90_PATH_A] = 0x3f3f3f3f;
345 + tx_agc[RF90_PATH_B] = 0x3f3f3f3f;
346 +- if (turbo_scanoff) {
347 +- for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
348 +- tx_agc[idx1] = ppowerlevel[idx1] |
349 +- (ppowerlevel[idx1] << 8) |
350 +- (ppowerlevel[idx1] << 16) |
351 +- (ppowerlevel[idx1] << 24);
352 +- if (rtlhal->interface == INTF_USB) {
353 +- if (tx_agc[idx1] > 0x20 &&
354 +- rtlefuse->external_pa)
355 +- tx_agc[idx1] = 0x20;
356 +- }
357 ++ for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
358 ++ tx_agc[idx1] = ppowerlevel[idx1] |
359 ++ (ppowerlevel[idx1] << 8) |
360 ++ (ppowerlevel[idx1] << 16) |
361 ++ (ppowerlevel[idx1] << 24);
362 ++ if (rtlhal->interface == INTF_USB) {
363 ++ if (tx_agc[idx1] > 0x20 &&
364 ++ rtlefuse->external_pa)
365 ++ tx_agc[idx1] = 0x20;
366 + }
367 + }
368 + } else {
369 +@@ -107,7 +105,7 @@ void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
370 + TXHIGHPWRLEVEL_LEVEL2) {
371 + tx_agc[RF90_PATH_A] = 0x00000000;
372 + tx_agc[RF90_PATH_B] = 0x00000000;
373 +- } else{
374 ++ } else {
375 + for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
376 + tx_agc[idx1] = ppowerlevel[idx1] |
377 + (ppowerlevel[idx1] << 8) |
378 +@@ -379,7 +377,12 @@ static void _rtl92c_write_ofdm_power_reg(struct ieee80211_hw *hw,
379 + regoffset == RTXAGC_B_MCS07_MCS04)
380 + regoffset = 0xc98;
381 + for (i = 0; i < 3; i++) {
382 +- writeVal = (writeVal > 6) ? (writeVal - 6) : 0;
383 ++ if (i != 2)
384 ++ writeVal = (writeVal > 8) ?
385 ++ (writeVal - 8) : 0;
386 ++ else
387 ++ writeVal = (writeVal > 6) ?
388 ++ (writeVal - 6) : 0;
389 + rtl_write_byte(rtlpriv, (u32)(regoffset + i),
390 + (u8)writeVal);
391 + }
392 +diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
393 +index 3f869c9f71ee..52a9c338fa47 100644
394 +--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
395 ++++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
396 +@@ -306,6 +306,7 @@ static struct usb_device_id rtl8192c_usb_ids[] = {
397 + {RTL_USB_DEVICE(0x0bda, 0x5088, rtl92cu_hal_cfg)}, /*Thinkware-CC&C*/
398 + {RTL_USB_DEVICE(0x0df6, 0x0052, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
399 + {RTL_USB_DEVICE(0x0df6, 0x005c, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
400 ++ {RTL_USB_DEVICE(0x0df6, 0x0077, rtl92cu_hal_cfg)}, /*Sitecom-WLA2100V2*/
401 + {RTL_USB_DEVICE(0x0eb0, 0x9071, rtl92cu_hal_cfg)}, /*NO Brand - Etop*/
402 + {RTL_USB_DEVICE(0x4856, 0x0091, rtl92cu_hal_cfg)}, /*NetweeN - Feixun*/
403 + /* HP - Lite-On ,8188CUS Slim Combo */
404 +diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
405 +index 0cb64f50cecd..a655ae2d80d3 100644
406 +--- a/drivers/parport/parport_pc.c
407 ++++ b/drivers/parport/parport_pc.c
408 +@@ -2875,8 +2875,6 @@ enum parport_pc_pci_cards {
409 + syba_2p_epp,
410 + syba_1p_ecp,
411 + titan_010l,
412 +- titan_1284p1,
413 +- titan_1284p2,
414 + avlab_1p,
415 + avlab_2p,
416 + oxsemi_952,
417 +@@ -2935,8 +2933,6 @@ static struct parport_pc_pci {
418 + /* syba_2p_epp AP138B */ { 2, { { 0, 0x078 }, { 0, 0x178 }, } },
419 + /* syba_1p_ecp W83787 */ { 1, { { 0, 0x078 }, } },
420 + /* titan_010l */ { 1, { { 3, -1 }, } },
421 +- /* titan_1284p1 */ { 1, { { 0, 1 }, } },
422 +- /* titan_1284p2 */ { 2, { { 0, 1 }, { 2, 3 }, } },
423 + /* avlab_1p */ { 1, { { 0, 1}, } },
424 + /* avlab_2p */ { 2, { { 0, 1}, { 2, 3 },} },
425 + /* The Oxford Semi cards are unusual: 954 doesn't support ECP,
426 +@@ -2952,8 +2948,8 @@ static struct parport_pc_pci {
427 + /* netmos_9705 */ { 1, { { 0, -1 }, } },
428 + /* netmos_9715 */ { 2, { { 0, 1 }, { 2, 3 },} },
429 + /* netmos_9755 */ { 2, { { 0, 1 }, { 2, 3 },} },
430 +- /* netmos_9805 */ { 1, { { 0, -1 }, } },
431 +- /* netmos_9815 */ { 2, { { 0, -1 }, { 2, -1 }, } },
432 ++ /* netmos_9805 */ { 1, { { 0, 1 }, } },
433 ++ /* netmos_9815 */ { 2, { { 0, 1 }, { 2, 3 }, } },
434 + /* netmos_9901 */ { 1, { { 0, -1 }, } },
435 + /* netmos_9865 */ { 1, { { 0, -1 }, } },
436 + /* quatech_sppxp100 */ { 1, { { 0, 1 }, } },
437 +@@ -2997,8 +2993,6 @@ static const struct pci_device_id parport_pc_pci_tbl[] = {
438 + PCI_ANY_ID, PCI_ANY_ID, 0, 0, syba_1p_ecp },
439 + { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_010L,
440 + PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_010l },
441 +- { 0x9710, 0x9805, 0x1000, 0x0010, 0, 0, titan_1284p1 },
442 +- { 0x9710, 0x9815, 0x1000, 0x0020, 0, 0, titan_1284p2 },
443 + /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
444 + /* AFAVLAB_TK9902 */
445 + { 0x14db, 0x2120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1p},
446 +diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c
447 +index fdacfcebd175..0076feae0ce3 100644
448 +--- a/drivers/platform/x86/hp_accel.c
449 ++++ b/drivers/platform/x86/hp_accel.c
450 +@@ -77,6 +77,7 @@ static inline void delayed_sysfs_set(struct led_classdev *led_cdev,
451 + static struct acpi_device_id lis3lv02d_device_ids[] = {
452 + {"HPQ0004", 0}, /* HP Mobile Data Protection System PNP */
453 + {"HPQ6000", 0}, /* HP Mobile Data Protection System PNP */
454 ++ {"HPQ6007", 0}, /* HP Mobile Data Protection System PNP */
455 + {"", 0},
456 + };
457 + MODULE_DEVICE_TABLE(acpi, lis3lv02d_device_ids);
458 +diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
459 +index 404fd10ddb21..e991c61eef1d 100644
460 +--- a/drivers/scsi/bfa/bfad.c
461 ++++ b/drivers/scsi/bfa/bfad.c
462 +@@ -1615,7 +1615,7 @@ out:
463 + static u32 *
464 + bfad_load_fwimg(struct pci_dev *pdev)
465 + {
466 +- if (pdev->device == BFA_PCI_DEVICE_ID_CT2) {
467 ++ if (bfa_asic_id_ct2(pdev->device)) {
468 + if (bfi_image_ct2_size == 0)
469 + bfad_read_firmware(pdev, &bfi_image_ct2,
470 + &bfi_image_ct2_size, BFAD_FW_FILE_CT2);
471 +@@ -1625,12 +1625,14 @@ bfad_load_fwimg(struct pci_dev *pdev)
472 + bfad_read_firmware(pdev, &bfi_image_ct,
473 + &bfi_image_ct_size, BFAD_FW_FILE_CT);
474 + return bfi_image_ct;
475 +- } else {
476 ++ } else if (bfa_asic_id_cb(pdev->device)) {
477 + if (bfi_image_cb_size == 0)
478 + bfad_read_firmware(pdev, &bfi_image_cb,
479 + &bfi_image_cb_size, BFAD_FW_FILE_CB);
480 + return bfi_image_cb;
481 + }
482 ++
483 ++ return NULL;
484 + }
485 +
486 + static void
487 +diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c
488 +index 7b3ae00ac54a..1b1bf38e8839 100644
489 +--- a/drivers/staging/rtl8712/usb_intf.c
490 ++++ b/drivers/staging/rtl8712/usb_intf.c
491 +@@ -361,6 +361,10 @@ static u8 key_2char2num(u8 hch, u8 lch)
492 + return (hex_to_bin(hch) << 4) | hex_to_bin(lch);
493 + }
494 +
495 ++static const struct device_type wlan_type = {
496 ++ .name = "wlan",
497 ++};
498 ++
499 + /*
500 + * drv_init() - a device potentially for us
501 + *
502 +@@ -396,6 +400,7 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf,
503 + padapter->pusb_intf = pusb_intf;
504 + usb_set_intfdata(pusb_intf, pnetdev);
505 + SET_NETDEV_DEV(pnetdev, &pusb_intf->dev);
506 ++ pnetdev->dev.type = &wlan_type;
507 + /* step 2. */
508 + padapter->dvobj_init = &r8712_usb_dvobj_init;
509 + padapter->dvobj_deinit = &r8712_usb_dvobj_deinit;
510 +diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
511 +index 858e2a8ee260..4034281efb8e 100644
512 +--- a/drivers/staging/vt6656/baseband.c
513 ++++ b/drivers/staging/vt6656/baseband.c
514 +@@ -1634,7 +1634,6 @@ BBvUpdatePreEDThreshold(
515 +
516 + if( bScanning )
517 + { // need Max sensitivity //RSSI -69, -70,....
518 +- if(pDevice->byBBPreEDIndex == 0) break;
519 + pDevice->byBBPreEDIndex = 0;
520 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xC9, 0x00); //CR201(0xC9)
521 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xCE, 0x30); //CR206(0xCE)
522 +@@ -1777,7 +1776,6 @@ BBvUpdatePreEDThreshold(
523 +
524 + if( bScanning )
525 + { // need Max sensitivity //RSSI -69, -70, ...
526 +- if(pDevice->byBBPreEDIndex == 0) break;
527 + pDevice->byBBPreEDIndex = 0;
528 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xC9, 0x00); //CR201(0xC9)
529 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xCE, 0x24); //CR206(0xCE)
530 +@@ -1929,7 +1927,6 @@ BBvUpdatePreEDThreshold(
531 + case RF_VT3342A0: //RobertYu:20060627, testing table
532 + if( bScanning )
533 + { // need Max sensitivity //RSSI -67, -68, ...
534 +- if(pDevice->byBBPreEDIndex == 0) break;
535 + pDevice->byBBPreEDIndex = 0;
536 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xC9, 0x00); //CR201(0xC9)
537 + ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xCE, 0x38); //CR206(0xCE)
538 +diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
539 +index 486c5dd45016..8d9100321474 100644
540 +--- a/drivers/target/iscsi/iscsi_target.c
541 ++++ b/drivers/target/iscsi/iscsi_target.c
542 +@@ -50,7 +50,7 @@
543 + static LIST_HEAD(g_tiqn_list);
544 + static LIST_HEAD(g_np_list);
545 + static DEFINE_SPINLOCK(tiqn_lock);
546 +-static DEFINE_SPINLOCK(np_lock);
547 ++static DEFINE_MUTEX(np_lock);
548 +
549 + static struct idr tiqn_idr;
550 + struct idr sess_idr;
551 +@@ -262,6 +262,9 @@ int iscsit_deaccess_np(struct iscsi_np *np, struct iscsi_portal_group *tpg)
552 + return 0;
553 + }
554 +
555 ++/*
556 ++ * Called with mutex np_lock held
557 ++ */
558 + static struct iscsi_np *iscsit_get_np(
559 + struct __kernel_sockaddr_storage *sockaddr,
560 + int network_transport)
561 +@@ -272,11 +275,10 @@ static struct iscsi_np *iscsit_get_np(
562 + int ip_match = 0;
563 + u16 port;
564 +
565 +- spin_lock_bh(&np_lock);
566 + list_for_each_entry(np, &g_np_list, np_list) {
567 +- spin_lock(&np->np_thread_lock);
568 ++ spin_lock_bh(&np->np_thread_lock);
569 + if (np->np_thread_state != ISCSI_NP_THREAD_ACTIVE) {
570 +- spin_unlock(&np->np_thread_lock);
571 ++ spin_unlock_bh(&np->np_thread_lock);
572 + continue;
573 + }
574 +
575 +@@ -309,13 +311,11 @@ static struct iscsi_np *iscsit_get_np(
576 + * while iscsi_tpg_add_network_portal() is called.
577 + */
578 + np->np_exports++;
579 +- spin_unlock(&np->np_thread_lock);
580 +- spin_unlock_bh(&np_lock);
581 ++ spin_unlock_bh(&np->np_thread_lock);
582 + return np;
583 + }
584 +- spin_unlock(&np->np_thread_lock);
585 ++ spin_unlock_bh(&np->np_thread_lock);
586 + }
587 +- spin_unlock_bh(&np_lock);
588 +
589 + return NULL;
590 + }
591 +@@ -329,16 +329,22 @@ struct iscsi_np *iscsit_add_np(
592 + struct sockaddr_in6 *sock_in6;
593 + struct iscsi_np *np;
594 + int ret;
595 ++
596 ++ mutex_lock(&np_lock);
597 ++
598 + /*
599 + * Locate the existing struct iscsi_np if already active..
600 + */
601 + np = iscsit_get_np(sockaddr, network_transport);
602 +- if (np)
603 ++ if (np) {
604 ++ mutex_unlock(&np_lock);
605 + return np;
606 ++ }
607 +
608 + np = kzalloc(sizeof(struct iscsi_np), GFP_KERNEL);
609 + if (!np) {
610 + pr_err("Unable to allocate memory for struct iscsi_np\n");
611 ++ mutex_unlock(&np_lock);
612 + return ERR_PTR(-ENOMEM);
613 + }
614 +
615 +@@ -361,6 +367,7 @@ struct iscsi_np *iscsit_add_np(
616 + ret = iscsi_target_setup_login_socket(np, sockaddr);
617 + if (ret != 0) {
618 + kfree(np);
619 ++ mutex_unlock(&np_lock);
620 + return ERR_PTR(ret);
621 + }
622 +
623 +@@ -369,6 +376,7 @@ struct iscsi_np *iscsit_add_np(
624 + pr_err("Unable to create kthread: iscsi_np\n");
625 + ret = PTR_ERR(np->np_thread);
626 + kfree(np);
627 ++ mutex_unlock(&np_lock);
628 + return ERR_PTR(ret);
629 + }
630 + /*
631 +@@ -379,10 +387,10 @@ struct iscsi_np *iscsit_add_np(
632 + * point because iscsi_np has not been added to g_np_list yet.
633 + */
634 + np->np_exports = 1;
635 ++ np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
636 +
637 +- spin_lock_bh(&np_lock);
638 + list_add_tail(&np->np_list, &g_np_list);
639 +- spin_unlock_bh(&np_lock);
640 ++ mutex_unlock(&np_lock);
641 +
642 + pr_debug("CORE[0] - Added Network Portal: %s:%hu on %s\n",
643 + np->np_ip, np->np_port, (np->np_network_transport == ISCSI_TCP) ?
644 +@@ -453,9 +461,9 @@ int iscsit_del_np(struct iscsi_np *np)
645 + }
646 + iscsit_del_np_comm(np);
647 +
648 +- spin_lock_bh(&np_lock);
649 ++ mutex_lock(&np_lock);
650 + list_del(&np->np_list);
651 +- spin_unlock_bh(&np_lock);
652 ++ mutex_unlock(&np_lock);
653 +
654 + pr_debug("CORE[0] - Removed Network Portal: %s:%hu on %s\n",
655 + np->np_ip, np->np_port, (np->np_network_transport == ISCSI_TCP) ?
656 +diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
657 +index 40747feed34c..fdc669cbf7c5 100644
658 +--- a/drivers/tty/serial/8250/8250_pci.c
659 ++++ b/drivers/tty/serial/8250/8250_pci.c
660 +@@ -1142,6 +1142,7 @@ pci_xr17c154_setup(struct serial_private *priv,
661 + #define PCI_DEVICE_ID_TITAN_800E 0xA014
662 + #define PCI_DEVICE_ID_TITAN_200EI 0xA016
663 + #define PCI_DEVICE_ID_TITAN_200EISI 0xA017
664 ++#define PCI_DEVICE_ID_TITAN_200V3 0xA306
665 + #define PCI_DEVICE_ID_TITAN_400V3 0xA310
666 + #define PCI_DEVICE_ID_TITAN_410V3 0xA312
667 + #define PCI_DEVICE_ID_TITAN_800V3 0xA314
668 +@@ -3456,6 +3457,9 @@ static struct pci_device_id serial_pci_tbl[] = {
669 + { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EISI,
670 + PCI_ANY_ID, PCI_ANY_ID, 0, 0,
671 + pbn_oxsemi_2_4000000 },
672 ++ { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200V3,
673 ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
674 ++ pbn_b0_bt_2_921600 },
675 + { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400V3,
676 + PCI_ANY_ID, PCI_ANY_ID, 0, 0,
677 + pbn_b0_4_921600 },
678 +diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
679 +index ed7cd378b838..ff58d288c9c8 100644
680 +--- a/drivers/tty/serial/atmel_serial.c
681 ++++ b/drivers/tty/serial/atmel_serial.c
682 +@@ -1022,12 +1022,24 @@ static int atmel_startup(struct uart_port *port)
683 + static void atmel_shutdown(struct uart_port *port)
684 + {
685 + struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
686 ++
687 + /*
688 +- * Ensure everything is stopped.
689 ++ * Clear out any scheduled tasklets before
690 ++ * we destroy the buffers
691 ++ */
692 ++ tasklet_kill(&atmel_port->tasklet);
693 ++
694 ++ /*
695 ++ * Ensure everything is stopped and
696 ++ * disable all interrupts, port and break condition.
697 + */
698 + atmel_stop_rx(port);
699 + atmel_stop_tx(port);
700 +
701 ++ UART_PUT_CR(port, ATMEL_US_RSTSTA);
702 ++ UART_PUT_IDR(port, -1);
703 ++
704 ++
705 + /*
706 + * Shut-down the DMA.
707 + */
708 +@@ -1054,12 +1066,6 @@ static void atmel_shutdown(struct uart_port *port)
709 + }
710 +
711 + /*
712 +- * Disable all interrupts, port and break condition.
713 +- */
714 +- UART_PUT_CR(port, ATMEL_US_RSTSTA);
715 +- UART_PUT_IDR(port, -1);
716 +-
717 +- /*
718 + * Free the interrupt
719 + */
720 + free_irq(port->irq, port);
721 +diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
722 +index 78609d302625..6ed7e7c787d8 100644
723 +--- a/drivers/usb/core/config.c
724 ++++ b/drivers/usb/core/config.c
725 +@@ -651,10 +651,6 @@ void usb_destroy_configuration(struct usb_device *dev)
726 + *
727 + * hub-only!! ... and only in reset path, or usb_new_device()
728 + * (used by real hubs and virtual root hubs)
729 +- *
730 +- * NOTE: if this is a WUSB device and is not authorized, we skip the
731 +- * whole thing. A non-authorized USB device has no
732 +- * configurations.
733 + */
734 + int usb_get_configuration(struct usb_device *dev)
735 + {
736 +@@ -666,8 +662,6 @@ int usb_get_configuration(struct usb_device *dev)
737 + struct usb_config_descriptor *desc;
738 +
739 + cfgno = 0;
740 +- if (dev->authorized == 0) /* Not really an error */
741 +- goto out_not_authorized;
742 + result = -ENOMEM;
743 + if (ncfg > USB_MAXCONFIG) {
744 + dev_warn(ddev, "too many configurations: %d, "
745 +@@ -749,7 +743,6 @@ int usb_get_configuration(struct usb_device *dev)
746 +
747 + err:
748 + kfree(desc);
749 +-out_not_authorized:
750 + dev->descriptor.bNumConfigurations = cfgno;
751 + err2:
752 + if (result == -ENOMEM)
753 +diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
754 +index 14476faf9a00..609f5a7db3f3 100644
755 +--- a/drivers/usb/core/hub.c
756 ++++ b/drivers/usb/core/hub.c
757 +@@ -1919,18 +1919,13 @@ static int usb_enumerate_device(struct usb_device *udev)
758 + goto fail;
759 + }
760 + }
761 +- if (udev->wusb == 1 && udev->authorized == 0) {
762 +- udev->product = kstrdup("n/a (unauthorized)", GFP_KERNEL);
763 +- udev->manufacturer = kstrdup("n/a (unauthorized)", GFP_KERNEL);
764 +- udev->serial = kstrdup("n/a (unauthorized)", GFP_KERNEL);
765 +- }
766 +- else {
767 +- /* read the standard strings and cache them if present */
768 +- udev->product = usb_cache_string(udev, udev->descriptor.iProduct);
769 +- udev->manufacturer = usb_cache_string(udev,
770 +- udev->descriptor.iManufacturer);
771 +- udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
772 +- }
773 ++
774 ++ /* read the standard strings and cache them if present */
775 ++ udev->product = usb_cache_string(udev, udev->descriptor.iProduct);
776 ++ udev->manufacturer = usb_cache_string(udev,
777 ++ udev->descriptor.iManufacturer);
778 ++ udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
779 ++
780 + err = usb_enumerate_device_otg(udev);
781 + fail:
782 + return err;
783 +@@ -2084,16 +2079,6 @@ int usb_deauthorize_device(struct usb_device *usb_dev)
784 + usb_dev->authorized = 0;
785 + usb_set_configuration(usb_dev, -1);
786 +
787 +- kfree(usb_dev->product);
788 +- usb_dev->product = kstrdup("n/a (unauthorized)", GFP_KERNEL);
789 +- kfree(usb_dev->manufacturer);
790 +- usb_dev->manufacturer = kstrdup("n/a (unauthorized)", GFP_KERNEL);
791 +- kfree(usb_dev->serial);
792 +- usb_dev->serial = kstrdup("n/a (unauthorized)", GFP_KERNEL);
793 +-
794 +- usb_destroy_configuration(usb_dev);
795 +- usb_dev->descriptor.bNumConfigurations = 0;
796 +-
797 + out_unauthorized:
798 + usb_unlock_device(usb_dev);
799 + return 0;
800 +@@ -2121,17 +2106,7 @@ int usb_authorize_device(struct usb_device *usb_dev)
801 + goto error_device_descriptor;
802 + }
803 +
804 +- kfree(usb_dev->product);
805 +- usb_dev->product = NULL;
806 +- kfree(usb_dev->manufacturer);
807 +- usb_dev->manufacturer = NULL;
808 +- kfree(usb_dev->serial);
809 +- usb_dev->serial = NULL;
810 +-
811 + usb_dev->authorized = 1;
812 +- result = usb_enumerate_device(usb_dev);
813 +- if (result < 0)
814 +- goto error_enumerate;
815 + /* Choose and set the configuration. This registers the interfaces
816 + * with the driver core and lets interface drivers bind to them.
817 + */
818 +@@ -2147,7 +2122,6 @@ int usb_authorize_device(struct usb_device *usb_dev)
819 + }
820 + dev_info(&usb_dev->dev, "authorized to connect\n");
821 +
822 +-error_enumerate:
823 + error_device_descriptor:
824 + usb_autosuspend_device(usb_dev);
825 + error_autoresume:
826 +diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
827 +index c8ea954ede9f..b98066887127 100644
828 +--- a/drivers/usb/host/xhci.c
829 ++++ b/drivers/usb/host/xhci.c
830 +@@ -315,6 +315,9 @@ static void xhci_cleanup_msix(struct xhci_hcd *xhci)
831 + struct usb_hcd *hcd = xhci_to_hcd(xhci);
832 + struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
833 +
834 ++ if (xhci->quirks & XHCI_PLAT)
835 ++ return;
836 ++
837 + xhci_free_irq(xhci);
838 +
839 + if (xhci->msix_entries) {
840 +diff --git a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h
841 +index b461311a2ae7..ce13e61b7d55 100644
842 +--- a/drivers/usb/serial/cypress_m8.h
843 ++++ b/drivers/usb/serial/cypress_m8.h
844 +@@ -63,7 +63,7 @@
845 + #define UART_DSR 0x20 /* data set ready - flow control - device to host */
846 + #define CONTROL_RTS 0x10 /* request to send - flow control - host to device */
847 + #define UART_CTS 0x10 /* clear to send - flow control - device to host */
848 +-#define UART_RI 0x10 /* ring indicator - modem - device to host */
849 ++#define UART_RI 0x80 /* ring indicator - modem - device to host */
850 + #define UART_CD 0x40 /* carrier detect - modem - device to host */
851 + #define CYP_ERROR 0x08 /* received from input report - device to host */
852 + /* Note - the below has nothing to do with the "feature report" reset */
853 +diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
854 +index 66f5e5472c17..9d7e865a518f 100644
855 +--- a/drivers/usb/serial/option.c
856 ++++ b/drivers/usb/serial/option.c
857 +@@ -325,6 +325,9 @@ static void option_instat_callback(struct urb *urb);
858 + * It seems to contain a Qualcomm QSC6240/6290 chipset */
859 + #define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603
860 +
861 ++/* iBall 3.5G connect wireless modem */
862 ++#define IBALL_3_5G_CONNECT 0x9605
863 ++
864 + /* Zoom */
865 + #define ZOOM_PRODUCT_4597 0x9607
866 +
867 +@@ -1461,6 +1464,17 @@ static const struct usb_device_id option_ids[] = {
868 + .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
869 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff),
870 + .driver_info = (kernel_ulong_t)&net_intf3_blacklist },
871 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffe9, 0xff, 0xff, 0xff) },
872 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8b, 0xff, 0xff, 0xff) },
873 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8c, 0xff, 0xff, 0xff) },
874 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8d, 0xff, 0xff, 0xff) },
875 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8e, 0xff, 0xff, 0xff) },
876 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8f, 0xff, 0xff, 0xff) },
877 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff90, 0xff, 0xff, 0xff) },
878 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff91, 0xff, 0xff, 0xff) },
879 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff92, 0xff, 0xff, 0xff) },
880 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
881 ++ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },
882 +
883 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
884 + { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
885 +@@ -1509,6 +1523,7 @@ static const struct usb_device_id option_ids[] = {
886 + .driver_info = (kernel_ulong_t)&four_g_w14_blacklist
887 + },
888 + { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
889 ++ { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
890 + { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
891 + /* Pirelli */
892 + { USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1)},
893 +diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
894 +index cf442e012da3..08d69e5fc143 100644
895 +--- a/drivers/usb/storage/unusual_devs.h
896 ++++ b/drivers/usb/storage/unusual_devs.h
897 +@@ -226,6 +226,13 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x0370,
898 + USB_SC_DEVICE, USB_PR_DEVICE, NULL,
899 + US_FL_MAX_SECTORS_64 ),
900 +
901 ++/* Patch submitted by Mikhail Zolotaryov <lebon@×××××××××.ua> */
902 ++UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110,
903 ++ "Nokia",
904 ++ "502",
905 ++ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
906 ++ US_FL_MAX_SECTORS_64 ),
907 ++
908 + #ifdef NO_SDDR09
909 + UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100,
910 + "Microtech",
911 +diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
912 +index c4f0a9936f88..224ce21cc0ac 100644
913 +--- a/fs/btrfs/extent-tree.c
914 ++++ b/fs/btrfs/extent-tree.c
915 +@@ -7033,7 +7033,7 @@ out:
916 + */
917 + if (root_dropped == false)
918 + btrfs_add_dead_root(root);
919 +- if (err)
920 ++ if (err && err != -EAGAIN)
921 + btrfs_std_error(root->fs_info, err);
922 + return err;
923 + }
924 +diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
925 +index 6baa73dcfce1..4f42a9cb5604 100644
926 +--- a/include/linux/hugetlb.h
927 ++++ b/include/linux/hugetlb.h
928 +@@ -24,6 +24,7 @@ struct hugepage_subpool *hugepage_new_subpool(long nr_blocks);
929 + void hugepage_put_subpool(struct hugepage_subpool *spool);
930 +
931 + int PageHuge(struct page *page);
932 ++int PageHeadHuge(struct page *page_head);
933 +
934 + void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
935 + int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
936 +@@ -85,6 +86,11 @@ static inline int PageHuge(struct page *page)
937 + return 0;
938 + }
939 +
940 ++static inline int PageHeadHuge(struct page *page_head)
941 ++{
942 ++ return 0;
943 ++}
944 ++
945 + static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
946 + {
947 + }
948 +diff --git a/mm/hugetlb.c b/mm/hugetlb.c
949 +index af20b77a624a..7111f2f5af68 100644
950 +--- a/mm/hugetlb.c
951 ++++ b/mm/hugetlb.c
952 +@@ -679,6 +679,23 @@ int PageHuge(struct page *page)
953 + }
954 + EXPORT_SYMBOL_GPL(PageHuge);
955 +
956 ++/*
957 ++ * PageHeadHuge() only returns true for hugetlbfs head page, but not for
958 ++ * normal or transparent huge pages.
959 ++ */
960 ++int PageHeadHuge(struct page *page_head)
961 ++{
962 ++ compound_page_dtor *dtor;
963 ++
964 ++ if (!PageHead(page_head))
965 ++ return 0;
966 ++
967 ++ dtor = get_compound_page_dtor(page_head);
968 ++
969 ++ return dtor == free_huge_page;
970 ++}
971 ++EXPORT_SYMBOL_GPL(PageHeadHuge);
972 ++
973 + pgoff_t __basepage_index(struct page *page)
974 + {
975 + struct page *page_head = compound_head(page);
976 +diff --git a/mm/swap.c b/mm/swap.c
977 +index f689e9a03204..a8feea68a606 100644
978 +--- a/mm/swap.c
979 ++++ b/mm/swap.c
980 +@@ -77,18 +77,6 @@ static void __put_compound_page(struct page *page)
981 +
982 + static void put_compound_page(struct page *page)
983 + {
984 +- /*
985 +- * hugetlbfs pages cannot be split from under us. If this is a
986 +- * hugetlbfs page, check refcount on head page and release the page if
987 +- * the refcount becomes zero.
988 +- */
989 +- if (PageHuge(page)) {
990 +- page = compound_head(page);
991 +- if (put_page_testzero(page))
992 +- __put_compound_page(page);
993 +- return;
994 +- }
995 +-
996 + if (unlikely(PageTail(page))) {
997 + /* __split_huge_page_refcount can run under us */
998 + struct page *page_head = compound_trans_head(page);
999 +@@ -96,6 +84,35 @@ static void put_compound_page(struct page *page)
1000 + if (likely(page != page_head &&
1001 + get_page_unless_zero(page_head))) {
1002 + unsigned long flags;
1003 ++
1004 ++ if (PageHeadHuge(page_head)) {
1005 ++ if (likely(PageTail(page))) {
1006 ++ /*
1007 ++ * __split_huge_page_refcount
1008 ++ * cannot race here.
1009 ++ */
1010 ++ VM_BUG_ON(!PageHead(page_head));
1011 ++ atomic_dec(&page->_mapcount);
1012 ++ if (put_page_testzero(page_head))
1013 ++ VM_BUG_ON(1);
1014 ++ if (put_page_testzero(page_head))
1015 ++ __put_compound_page(page_head);
1016 ++ return;
1017 ++ } else {
1018 ++ /*
1019 ++ * __split_huge_page_refcount
1020 ++ * run before us, "page" was a
1021 ++ * THP tail. The split
1022 ++ * page_head has been freed
1023 ++ * and reallocated as slab or
1024 ++ * hugetlbfs page of smaller
1025 ++ * order (only possible if
1026 ++ * reallocated as slab on
1027 ++ * x86).
1028 ++ */
1029 ++ goto skip_lock;
1030 ++ }
1031 ++ }
1032 + /*
1033 + * page_head wasn't a dangling pointer but it
1034 + * may not be a head page anymore by the time
1035 +@@ -107,9 +124,29 @@ static void put_compound_page(struct page *page)
1036 + /* __split_huge_page_refcount run before us */
1037 + compound_unlock_irqrestore(page_head, flags);
1038 + VM_BUG_ON(PageHead(page_head));
1039 +- if (put_page_testzero(page_head))
1040 +- __put_single_page(page_head);
1041 +- out_put_single:
1042 ++skip_lock:
1043 ++ if (put_page_testzero(page_head)) {
1044 ++ /*
1045 ++ * The head page may have been
1046 ++ * freed and reallocated as a
1047 ++ * compound page of smaller
1048 ++ * order and then freed again.
1049 ++ * All we know is that it
1050 ++ * cannot have become: a THP
1051 ++ * page, a compound page of
1052 ++ * higher order, a tail page.
1053 ++ * That is because we still
1054 ++ * hold the refcount of the
1055 ++ * split THP tail and
1056 ++ * page_head was the THP head
1057 ++ * before the split.
1058 ++ */
1059 ++ if (PageHead(page_head))
1060 ++ __put_compound_page(page_head);
1061 ++ else
1062 ++ __put_single_page(page_head);
1063 ++ }
1064 ++out_put_single:
1065 + if (put_page_testzero(page))
1066 + __put_single_page(page);
1067 + return;
1068 +@@ -173,21 +210,34 @@ bool __get_page_tail(struct page *page)
1069 + */
1070 + unsigned long flags;
1071 + bool got = false;
1072 +- struct page *page_head;
1073 ++ struct page *page_head = compound_trans_head(page);
1074 +
1075 +- /*
1076 +- * If this is a hugetlbfs page it cannot be split under us. Simply
1077 +- * increment refcount for the head page.
1078 +- */
1079 +- if (PageHuge(page)) {
1080 +- page_head = compound_head(page);
1081 +- atomic_inc(&page_head->_count);
1082 +- got = true;
1083 +- goto out;
1084 +- }
1085 +-
1086 +- page_head = compound_trans_head(page);
1087 + if (likely(page != page_head && get_page_unless_zero(page_head))) {
1088 ++ /* Ref to put_compound_page() comment. */
1089 ++ if (PageHeadHuge(page_head)) {
1090 ++ if (likely(PageTail(page))) {
1091 ++ /*
1092 ++ * This is a hugetlbfs
1093 ++ * page. __split_huge_page_refcount
1094 ++ * cannot race here.
1095 ++ */
1096 ++ VM_BUG_ON(!PageHead(page_head));
1097 ++ __get_page_tail_foll(page, false);
1098 ++ return true;
1099 ++ } else {
1100 ++ /*
1101 ++ * __split_huge_page_refcount run
1102 ++ * before us, "page" was a THP
1103 ++ * tail. The split page_head has been
1104 ++ * freed and reallocated as slab or
1105 ++ * hugetlbfs page of smaller order
1106 ++ * (only possible if reallocated as
1107 ++ * slab on x86).
1108 ++ */
1109 ++ put_page(page_head);
1110 ++ return false;
1111 ++ }
1112 ++ }
1113 + /*
1114 + * page_head wasn't a dangling pointer but it
1115 + * may not be a head page anymore by the time
1116 +@@ -204,7 +254,6 @@ bool __get_page_tail(struct page *page)
1117 + if (unlikely(!got))
1118 + put_page(page_head);
1119 + }
1120 +-out:
1121 + return got;
1122 + }
1123 + EXPORT_SYMBOL(__get_page_tail);
1124 +diff --git a/net/compat.c b/net/compat.c
1125 +index 17f997e14f63..93f542335e19 100644
1126 +--- a/net/compat.c
1127 ++++ b/net/compat.c
1128 +@@ -789,21 +789,16 @@ asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
1129 + if (flags & MSG_CMSG_COMPAT)
1130 + return -EINVAL;
1131 +
1132 +- if (COMPAT_USE_64BIT_TIME)
1133 +- return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
1134 +- flags | MSG_CMSG_COMPAT,
1135 +- (struct timespec *) timeout);
1136 +-
1137 + if (timeout == NULL)
1138 + return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
1139 + flags | MSG_CMSG_COMPAT, NULL);
1140 +
1141 +- if (get_compat_timespec(&ktspec, timeout))
1142 ++ if (compat_get_timespec(&ktspec, timeout))
1143 + return -EFAULT;
1144 +
1145 + datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
1146 + flags | MSG_CMSG_COMPAT, &ktspec);
1147 +- if (datagrams > 0 && put_compat_timespec(&ktspec, timeout))
1148 ++ if (datagrams > 0 && compat_put_timespec(&ktspec, timeout))
1149 + datagrams = -EFAULT;
1150 +
1151 + return datagrams;
1152 +diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
1153 +index 5fcc8df3f179..8cb3091c8f63 100644
1154 +--- a/net/ipv4/inet_diag.c
1155 ++++ b/net/ipv4/inet_diag.c
1156 +@@ -941,7 +941,7 @@ next_normal:
1157 + ++num;
1158 + }
1159 +
1160 +- if (r->idiag_states & TCPF_TIME_WAIT) {
1161 ++ if (r->idiag_states & (TCPF_TIME_WAIT | TCPF_FIN_WAIT2)) {
1162 + struct inet_timewait_sock *tw;
1163 +
1164 + inet_twsk_for_each(tw, node,
1165 +@@ -949,6 +949,8 @@ next_normal:
1166 +
1167 + if (num < s_num)
1168 + goto next_dying;
1169 ++ if (!(r->idiag_states & (1 << tw->tw_substate)))
1170 ++ goto next_dying;
1171 + if (r->sdiag_family != AF_UNSPEC &&
1172 + tw->tw_family != r->sdiag_family)
1173 + goto next_dying;
1174 +diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
1175 +index a0b7166badb0..94cd1ef1e319 100644
1176 +--- a/net/ipv4/ipmr.c
1177 ++++ b/net/ipv4/ipmr.c
1178 +@@ -154,9 +154,12 @@ static struct mr_table *ipmr_get_table(struct net *net, u32 id)
1179 + static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4,
1180 + struct mr_table **mrt)
1181 + {
1182 +- struct ipmr_result res;
1183 +- struct fib_lookup_arg arg = { .result = &res, };
1184 + int err;
1185 ++ struct ipmr_result res;
1186 ++ struct fib_lookup_arg arg = {
1187 ++ .result = &res,
1188 ++ .flags = FIB_LOOKUP_NOREF,
1189 ++ };
1190 +
1191 + err = fib_rules_lookup(net->ipv4.mr_rules_ops,
1192 + flowi4_to_flowi(flp4), 0, &arg);
1193 +diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
1194 +index d5e4615e52c4..abe1f768b5b6 100644
1195 +--- a/net/ipv6/ip6mr.c
1196 ++++ b/net/ipv6/ip6mr.c
1197 +@@ -138,9 +138,12 @@ static struct mr6_table *ip6mr_get_table(struct net *net, u32 id)
1198 + static int ip6mr_fib_lookup(struct net *net, struct flowi6 *flp6,
1199 + struct mr6_table **mrt)
1200 + {
1201 +- struct ip6mr_result res;
1202 +- struct fib_lookup_arg arg = { .result = &res, };
1203 + int err;
1204 ++ struct ip6mr_result res;
1205 ++ struct fib_lookup_arg arg = {
1206 ++ .result = &res,
1207 ++ .flags = FIB_LOOKUP_NOREF,
1208 ++ };
1209 +
1210 + err = fib_rules_lookup(net->ipv6.mr6_rules_ops,
1211 + flowi6_to_flowi(flp6), 0, &arg);
1212 +diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
1213 +index 5ca0939e4223..cb53e8d97ff1 100644
1214 +--- a/sound/pci/Kconfig
1215 ++++ b/sound/pci/Kconfig
1216 +@@ -30,6 +30,7 @@ config SND_ALS300
1217 + select SND_PCM
1218 + select SND_AC97_CODEC
1219 + select SND_OPL3_LIB
1220 ++ select ZONE_DMA
1221 + help
1222 + Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+
1223 +
1224 +@@ -54,6 +55,7 @@ config SND_ALI5451
1225 + tristate "ALi M5451 PCI Audio Controller"
1226 + select SND_MPU401_UART
1227 + select SND_AC97_CODEC
1228 ++ select ZONE_DMA
1229 + help
1230 + Say Y here to include support for the integrated AC97 sound
1231 + device on motherboards using the ALi M5451 Audio Controller
1232 +@@ -158,6 +160,7 @@ config SND_AZT3328
1233 + select SND_PCM
1234 + select SND_RAWMIDI
1235 + select SND_AC97_CODEC
1236 ++ select ZONE_DMA
1237 + help
1238 + Say Y here to include support for Aztech AZF3328 (PCI168)
1239 + soundcards.
1240 +@@ -463,6 +466,7 @@ config SND_EMU10K1
1241 + select SND_HWDEP
1242 + select SND_RAWMIDI
1243 + select SND_AC97_CODEC
1244 ++ select ZONE_DMA
1245 + help
1246 + Say Y to include support for Sound Blaster PCI 512, Live!,
1247 + Audigy and E-mu APS (partially supported) soundcards.
1248 +@@ -478,6 +482,7 @@ config SND_EMU10K1X
1249 + tristate "Emu10k1X (Dell OEM Version)"
1250 + select SND_AC97_CODEC
1251 + select SND_RAWMIDI
1252 ++ select ZONE_DMA
1253 + help
1254 + Say Y here to include support for the Dell OEM version of the
1255 + Sound Blaster Live!.
1256 +@@ -511,6 +516,7 @@ config SND_ES1938
1257 + select SND_OPL3_LIB
1258 + select SND_MPU401_UART
1259 + select SND_AC97_CODEC
1260 ++ select ZONE_DMA
1261 + help
1262 + Say Y here to include support for soundcards based on ESS Solo-1
1263 + (ES1938, ES1946, ES1969) chips.
1264 +@@ -522,6 +528,7 @@ config SND_ES1968
1265 + tristate "ESS ES1968/1978 (Maestro-1/2/2E)"
1266 + select SND_MPU401_UART
1267 + select SND_AC97_CODEC
1268 ++ select ZONE_DMA
1269 + help
1270 + Say Y here to include support for soundcards based on ESS Maestro
1271 + 1/2/2E chips.
1272 +@@ -602,6 +609,7 @@ config SND_ICE1712
1273 + select SND_MPU401_UART
1274 + select SND_AC97_CODEC
1275 + select BITREVERSE
1276 ++ select ZONE_DMA
1277 + help
1278 + Say Y here to include support for soundcards based on the
1279 + ICE1712 (Envy24) chip.
1280 +@@ -688,6 +696,7 @@ config SND_LX6464ES
1281 + config SND_MAESTRO3
1282 + tristate "ESS Allegro/Maestro3"
1283 + select SND_AC97_CODEC
1284 ++ select ZONE_DMA
1285 + help
1286 + Say Y here to include support for soundcards based on ESS Maestro 3
1287 + (Allegro) chips.
1288 +@@ -782,6 +791,7 @@ config SND_SIS7019
1289 + tristate "SiS 7019 Audio Accelerator"
1290 + depends on X86 && !X86_64
1291 + select SND_AC97_CODEC
1292 ++ select ZONE_DMA
1293 + help
1294 + Say Y here to include support for the SiS 7019 Audio Accelerator.
1295 +
1296 +@@ -793,6 +803,7 @@ config SND_SONICVIBES
1297 + select SND_OPL3_LIB
1298 + select SND_MPU401_UART
1299 + select SND_AC97_CODEC
1300 ++ select ZONE_DMA
1301 + help
1302 + Say Y here to include support for soundcards based on the S3
1303 + SonicVibes chip.
1304 +@@ -804,6 +815,7 @@ config SND_TRIDENT
1305 + tristate "Trident 4D-Wave DX/NX; SiS 7018"
1306 + select SND_MPU401_UART
1307 + select SND_AC97_CODEC
1308 ++ select ZONE_DMA
1309 + help
1310 + Say Y here to include support for soundcards based on Trident
1311 + 4D-Wave DX/NX or SiS 7018 chips.
1312 +diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
1313 +index b737d1619cc7..f466080b8724 100644
1314 +--- a/sound/pci/rme9652/rme9652.c
1315 ++++ b/sound/pci/rme9652/rme9652.c
1316 +@@ -285,7 +285,7 @@ static char channel_map_9636_ds[26] = {
1317 + /* ADAT channels are remapped */
1318 + 1, 3, 5, 7, 9, 11, 13, 15,
1319 + /* channels 8 and 9 are S/PDIF */
1320 +- 24, 25
1321 ++ 24, 25,
1322 + /* others don't exist */
1323 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
1324 + };
1325 +diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
1326 +index 78e9ce48bb99..192fc75f1f20 100644
1327 +--- a/sound/soc/codecs/adau1701.c
1328 ++++ b/sound/soc/codecs/adau1701.c
1329 +@@ -64,7 +64,7 @@
1330 +
1331 + #define ADAU1701_SEROCTL_WORD_LEN_24 0x0000
1332 + #define ADAU1701_SEROCTL_WORD_LEN_20 0x0001
1333 +-#define ADAU1701_SEROCTL_WORD_LEN_16 0x0010
1334 ++#define ADAU1701_SEROCTL_WORD_LEN_16 0x0002
1335 + #define ADAU1701_SEROCTL_WORD_LEN_MASK 0x0003
1336 +
1337 + #define ADAU1701_AUXNPOW_VBPD 0x40