Contents of /trunk/kernel26-alx/patches-2.6.37/0103-2.6.37.4-all-fixes.patch
Parent Directory | Revision Log
Revision 1714 -
(show annotations)
(download)
Tue Mar 27 14:22:06 2012 UTC (12 years, 6 months ago) by niro
File size: 27766 byte(s)
Tue Mar 27 14:22:06 2012 UTC (12 years, 6 months ago) by niro
File size: 27766 byte(s)
1 | diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c |
2 | index 4f6f679..4a5a42b 100644 |
3 | --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c |
4 | +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c |
5 | @@ -195,7 +195,7 @@ static unsigned int pcc_get_freq(unsigned int cpu) |
6 | cmd_incomplete: |
7 | iowrite16(0, &pcch_hdr->status); |
8 | spin_unlock(&pcc_lock); |
9 | - return -EINVAL; |
10 | + return 0; |
11 | } |
12 | |
13 | static int pcc_cpufreq_target(struct cpufreq_policy *policy, |
14 | diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c |
15 | index ad2520b..e0d9473 100644 |
16 | --- a/drivers/char/virtio_console.c |
17 | +++ b/drivers/char/virtio_console.c |
18 | @@ -387,6 +387,10 @@ static void discard_port_data(struct port *port) |
19 | unsigned int len; |
20 | int ret; |
21 | |
22 | + if (!port->portdev) { |
23 | + /* Device has been unplugged. vqs are already gone. */ |
24 | + return; |
25 | + } |
26 | vq = port->in_vq; |
27 | if (port->inbuf) |
28 | buf = port->inbuf; |
29 | @@ -469,6 +473,10 @@ static void reclaim_consumed_buffers(struct port *port) |
30 | void *buf; |
31 | unsigned int len; |
32 | |
33 | + if (!port->portdev) { |
34 | + /* Device has been unplugged. vqs are already gone. */ |
35 | + return; |
36 | + } |
37 | while ((buf = virtqueue_get_buf(port->out_vq, &len))) { |
38 | kfree(buf); |
39 | port->outvq_full = false; |
40 | diff --git a/drivers/hid/hid-mosart.c b/drivers/hid/hid-mosart.c |
41 | index 251eaa4..eec4c4a 100644 |
42 | --- a/drivers/hid/hid-mosart.c |
43 | +++ b/drivers/hid/hid-mosart.c |
44 | @@ -90,6 +90,10 @@ static int mosart_input_mapping(struct hid_device *hdev, struct hid_input *hi, |
45 | case 0xff000000: |
46 | /* ignore HID features */ |
47 | return -1; |
48 | + |
49 | + case HID_UP_BUTTON: |
50 | + /* ignore buttons */ |
51 | + return -1; |
52 | } |
53 | |
54 | return 0; |
55 | diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c |
56 | index e06acd1..535cc69 100644 |
57 | --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c |
58 | +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c |
59 | @@ -870,6 +870,23 @@ static int dib7070p_tuner_attach(struct dvb_usb_adapter *adap) |
60 | return 0; |
61 | } |
62 | |
63 | +static int stk7700p_pid_filter(struct dvb_usb_adapter *adapter, int index, |
64 | + u16 pid, int onoff) |
65 | +{ |
66 | + struct dib0700_state *st = adapter->dev->priv; |
67 | + if (st->is_dib7000pc) |
68 | + return dib7000p_pid_filter(adapter->fe, index, pid, onoff); |
69 | + return dib7000m_pid_filter(adapter->fe, index, pid, onoff); |
70 | +} |
71 | + |
72 | +static int stk7700p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff) |
73 | +{ |
74 | + struct dib0700_state *st = adapter->dev->priv; |
75 | + if (st->is_dib7000pc) |
76 | + return dib7000p_pid_filter_ctrl(adapter->fe, onoff); |
77 | + return dib7000m_pid_filter_ctrl(adapter->fe, onoff); |
78 | +} |
79 | + |
80 | static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff) |
81 | { |
82 | return dib7000p_pid_filter(adapter->fe, index, pid, onoff); |
83 | @@ -1875,8 +1892,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { |
84 | { |
85 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
86 | .pid_filter_count = 32, |
87 | - .pid_filter = stk70x0p_pid_filter, |
88 | - .pid_filter_ctrl = stk70x0p_pid_filter_ctrl, |
89 | + .pid_filter = stk7700p_pid_filter, |
90 | + .pid_filter_ctrl = stk7700p_pid_filter_ctrl, |
91 | .frontend_attach = stk7700p_frontend_attach, |
92 | .tuner_attach = stk7700p_tuner_attach, |
93 | |
94 | diff --git a/drivers/media/dvb/frontends/dib7000m.c b/drivers/media/dvb/frontends/dib7000m.c |
95 | index 0f09fd3..f01279f 100644 |
96 | --- a/drivers/media/dvb/frontends/dib7000m.c |
97 | +++ b/drivers/media/dvb/frontends/dib7000m.c |
98 | @@ -1285,6 +1285,25 @@ struct i2c_adapter * dib7000m_get_i2c_master(struct dvb_frontend *demod, enum di |
99 | } |
100 | EXPORT_SYMBOL(dib7000m_get_i2c_master); |
101 | |
102 | +int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff) |
103 | +{ |
104 | + struct dib7000m_state *state = fe->demodulator_priv; |
105 | + u16 val = dib7000m_read_word(state, 294 + state->reg_offs) & 0xffef; |
106 | + val |= (onoff & 0x1) << 4; |
107 | + dprintk("PID filter enabled %d", onoff); |
108 | + return dib7000m_write_word(state, 294 + state->reg_offs, val); |
109 | +} |
110 | +EXPORT_SYMBOL(dib7000m_pid_filter_ctrl); |
111 | + |
112 | +int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff) |
113 | +{ |
114 | + struct dib7000m_state *state = fe->demodulator_priv; |
115 | + dprintk("PID filter: index %x, PID %d, OnOff %d", id, pid, onoff); |
116 | + return dib7000m_write_word(state, 300 + state->reg_offs + id, |
117 | + onoff ? (1 << 13) | pid : 0); |
118 | +} |
119 | +EXPORT_SYMBOL(dib7000m_pid_filter); |
120 | + |
121 | #if 0 |
122 | /* used with some prototype boards */ |
123 | int dib7000m_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, |
124 | diff --git a/drivers/media/dvb/frontends/dib7000m.h b/drivers/media/dvb/frontends/dib7000m.h |
125 | index 113819c..81fcf22 100644 |
126 | --- a/drivers/media/dvb/frontends/dib7000m.h |
127 | +++ b/drivers/media/dvb/frontends/dib7000m.h |
128 | @@ -46,6 +46,8 @@ extern struct dvb_frontend *dib7000m_attach(struct i2c_adapter *i2c_adap, |
129 | extern struct i2c_adapter *dib7000m_get_i2c_master(struct dvb_frontend *, |
130 | enum dibx000_i2c_interface, |
131 | int); |
132 | +extern int dib7000m_pid_filter(struct dvb_frontend *, u8 id, u16 pid, u8 onoff); |
133 | +extern int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff); |
134 | #else |
135 | static inline |
136 | struct dvb_frontend *dib7000m_attach(struct i2c_adapter *i2c_adap, |
137 | @@ -63,6 +65,19 @@ struct i2c_adapter *dib7000m_get_i2c_master(struct dvb_frontend *demod, |
138 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
139 | return NULL; |
140 | } |
141 | +static inline int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id, |
142 | + u16 pid, u8 onoff) |
143 | +{ |
144 | + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
145 | + return -ENODEV; |
146 | +} |
147 | + |
148 | +static inline int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, |
149 | + uint8_t onoff) |
150 | +{ |
151 | + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
152 | + return -ENODEV; |
153 | +} |
154 | #endif |
155 | |
156 | /* TODO |
157 | diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c |
158 | index ed3d8f5..1007f80 100644 |
159 | --- a/drivers/media/video/cx23885/cx23885-i2c.c |
160 | +++ b/drivers/media/video/cx23885/cx23885-i2c.c |
161 | @@ -122,10 +122,6 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap, |
162 | |
163 | if (!i2c_wait_done(i2c_adap)) |
164 | goto eio; |
165 | - if (!i2c_slave_did_ack(i2c_adap)) { |
166 | - retval = -ENXIO; |
167 | - goto err; |
168 | - } |
169 | if (i2c_debug) { |
170 | printk(" <W %02x %02x", msg->addr << 1, msg->buf[0]); |
171 | if (!(ctrl & I2C_NOSTOP)) |
172 | @@ -209,10 +205,6 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap, |
173 | |
174 | if (!i2c_wait_done(i2c_adap)) |
175 | goto eio; |
176 | - if (cnt == 0 && !i2c_slave_did_ack(i2c_adap)) { |
177 | - retval = -ENXIO; |
178 | - goto err; |
179 | - } |
180 | msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff; |
181 | if (i2c_debug) { |
182 | dprintk(1, " %02x", msg->buf[cnt]); |
183 | diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c |
184 | index f164618..a201d9c 100644 |
185 | --- a/drivers/media/video/cx25840/cx25840-core.c |
186 | +++ b/drivers/media/video/cx25840/cx25840-core.c |
187 | @@ -2031,7 +2031,8 @@ static int cx25840_probe(struct i2c_client *client, |
188 | kfree(state); |
189 | return err; |
190 | } |
191 | - v4l2_ctrl_cluster(2, &state->volume); |
192 | + if (!is_cx2583x(state)) |
193 | + v4l2_ctrl_cluster(2, &state->volume); |
194 | v4l2_ctrl_handler_setup(&state->hdl); |
195 | |
196 | cx25840_ir_probe(sd); |
197 | diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c |
198 | index 9b4faf0..9c29e96 100644 |
199 | --- a/drivers/media/video/ivtv/ivtv-irq.c |
200 | +++ b/drivers/media/video/ivtv/ivtv-irq.c |
201 | @@ -628,22 +628,66 @@ static void ivtv_irq_enc_pio_complete(struct ivtv *itv) |
202 | static void ivtv_irq_dma_err(struct ivtv *itv) |
203 | { |
204 | u32 data[CX2341X_MBOX_MAX_DATA]; |
205 | + u32 status; |
206 | |
207 | del_timer(&itv->dma_timer); |
208 | + |
209 | ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, 2, data); |
210 | + status = read_reg(IVTV_REG_DMASTATUS); |
211 | IVTV_DEBUG_WARN("DMA ERROR %08x %08x %08x %d\n", data[0], data[1], |
212 | - read_reg(IVTV_REG_DMASTATUS), itv->cur_dma_stream); |
213 | - write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS); |
214 | + status, itv->cur_dma_stream); |
215 | + /* |
216 | + * We do *not* write back to the IVTV_REG_DMASTATUS register to |
217 | + * clear the error status, if either the encoder write (0x02) or |
218 | + * decoder read (0x01) bus master DMA operation do not indicate |
219 | + * completed. We can race with the DMA engine, which may have |
220 | + * transitioned to completed status *after* we read the register. |
221 | + * Setting a IVTV_REG_DMASTATUS flag back to "busy" status, after the |
222 | + * DMA engine has completed, will cause the DMA engine to stop working. |
223 | + */ |
224 | + status &= 0x3; |
225 | + if (status == 0x3) |
226 | + write_reg(status, IVTV_REG_DMASTATUS); |
227 | + |
228 | if (!test_bit(IVTV_F_I_UDMA, &itv->i_flags) && |
229 | itv->cur_dma_stream >= 0 && itv->cur_dma_stream < IVTV_MAX_STREAMS) { |
230 | struct ivtv_stream *s = &itv->streams[itv->cur_dma_stream]; |
231 | |
232 | - /* retry */ |
233 | - if (s->type >= IVTV_DEC_STREAM_TYPE_MPG) |
234 | + if (s->type >= IVTV_DEC_STREAM_TYPE_MPG) { |
235 | + /* retry */ |
236 | + /* |
237 | + * FIXME - handle cases of DMA error similar to |
238 | + * encoder below, except conditioned on status & 0x1 |
239 | + */ |
240 | ivtv_dma_dec_start(s); |
241 | - else |
242 | - ivtv_dma_enc_start(s); |
243 | - return; |
244 | + return; |
245 | + } else { |
246 | + if ((status & 0x2) == 0) { |
247 | + /* |
248 | + * CX2341x Bus Master DMA write is ongoing. |
249 | + * Reset the timer and let it complete. |
250 | + */ |
251 | + itv->dma_timer.expires = |
252 | + jiffies + msecs_to_jiffies(600); |
253 | + add_timer(&itv->dma_timer); |
254 | + return; |
255 | + } |
256 | + |
257 | + if (itv->dma_retries < 3) { |
258 | + /* |
259 | + * CX2341x Bus Master DMA write has ended. |
260 | + * Retry the write, starting with the first |
261 | + * xfer segment. Just retrying the current |
262 | + * segment is not sufficient. |
263 | + */ |
264 | + s->sg_processed = 0; |
265 | + itv->dma_retries++; |
266 | + ivtv_dma_enc_start_xfer(s); |
267 | + return; |
268 | + } |
269 | + /* Too many retries, give up on this one */ |
270 | + } |
271 | + |
272 | } |
273 | if (test_bit(IVTV_F_I_UDMA, &itv->i_flags)) { |
274 | ivtv_udma_start(itv); |
275 | diff --git a/drivers/misc/bmp085.c b/drivers/misc/bmp085.c |
276 | index 63ee4c1..b6e1c9a 100644 |
277 | --- a/drivers/misc/bmp085.c |
278 | +++ b/drivers/misc/bmp085.c |
279 | @@ -449,6 +449,7 @@ static const struct i2c_device_id bmp085_id[] = { |
280 | { "bmp085", 0 }, |
281 | { } |
282 | }; |
283 | +MODULE_DEVICE_TABLE(i2c, bmp085_id); |
284 | |
285 | static struct i2c_driver bmp085_driver = { |
286 | .driver = { |
287 | diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c |
288 | index 0fa1776..4a0762b 100644 |
289 | --- a/drivers/net/forcedeth.c |
290 | +++ b/drivers/net/forcedeth.c |
291 | @@ -5816,6 +5816,8 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i |
292 | goto out_error; |
293 | } |
294 | |
295 | + netif_carrier_off(dev); |
296 | + |
297 | dev_printk(KERN_INFO, &pci_dev->dev, "ifname %s, PHY OUI 0x%x @ %d, " |
298 | "addr %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", |
299 | dev->name, |
300 | diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c |
301 | index 57d747a..1722bcb 100644 |
302 | --- a/drivers/net/ixgbe/ixgbe_main.c |
303 | +++ b/drivers/net/ixgbe/ixgbe_main.c |
304 | @@ -2923,6 +2923,10 @@ static void ixgbe_set_rx_buffer_len(struct ixgbe_adapter *adapter) |
305 | if (hw->mac.type == ixgbe_mac_82599EB) |
306 | adapter->flags &= ~IXGBE_FLAG_RX_PS_ENABLED; |
307 | |
308 | + /* Disable packet split due to 82599 erratum #45 */ |
309 | + if (hw->mac.type == ixgbe_mac_82599EB) |
310 | + adapter->flags &= ~IXGBE_FLAG_RX_PS_ENABLED; |
311 | + |
312 | /* Set the RX buffer length according to the mode */ |
313 | if (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED) { |
314 | rx_buf_len = IXGBE_RX_HDR_SIZE; |
315 | diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c |
316 | index 3f70a2f..b17e356 100644 |
317 | --- a/drivers/net/r8169.c |
318 | +++ b/drivers/net/r8169.c |
319 | @@ -758,7 +758,8 @@ static void __rtl8169_check_link_status(struct net_device *dev, |
320 | if (pm) |
321 | pm_request_resume(&tp->pci_dev->dev); |
322 | netif_carrier_on(dev); |
323 | - netif_info(tp, ifup, dev, "link up\n"); |
324 | + if (net_ratelimit()) |
325 | + netif_info(tp, ifup, dev, "link up\n"); |
326 | } else { |
327 | netif_carrier_off(dev); |
328 | netif_info(tp, ifdown, dev, "link down\n"); |
329 | @@ -3235,6 +3236,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
330 | if (pci_dev_run_wake(pdev)) |
331 | pm_runtime_put_noidle(&pdev->dev); |
332 | |
333 | + netif_carrier_off(dev); |
334 | + |
335 | out: |
336 | return rc; |
337 | |
338 | @@ -3725,7 +3728,8 @@ static void rtl_hw_start_8168(struct net_device *dev) |
339 | RTL_W16(IntrMitigate, 0x5151); |
340 | |
341 | /* Work around for RxFIFO overflow. */ |
342 | - if (tp->mac_version == RTL_GIGA_MAC_VER_11) { |
343 | + if (tp->mac_version == RTL_GIGA_MAC_VER_11 || |
344 | + tp->mac_version == RTL_GIGA_MAC_VER_22) { |
345 | tp->intr_event |= RxFIFOOver | PCSTimeout; |
346 | tp->intr_event &= ~RxOverflow; |
347 | } |
348 | @@ -4602,12 +4606,32 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) |
349 | break; |
350 | } |
351 | |
352 | - /* Work around for rx fifo overflow */ |
353 | - if (unlikely(status & RxFIFOOver) && |
354 | - (tp->mac_version == RTL_GIGA_MAC_VER_11)) { |
355 | - netif_stop_queue(dev); |
356 | - rtl8169_tx_timeout(dev); |
357 | - break; |
358 | + if (unlikely(status & RxFIFOOver)) { |
359 | + switch (tp->mac_version) { |
360 | + /* Work around for rx fifo overflow */ |
361 | + case RTL_GIGA_MAC_VER_11: |
362 | + case RTL_GIGA_MAC_VER_22: |
363 | + case RTL_GIGA_MAC_VER_26: |
364 | + netif_stop_queue(dev); |
365 | + rtl8169_tx_timeout(dev); |
366 | + goto done; |
367 | + /* Testers needed. */ |
368 | + case RTL_GIGA_MAC_VER_17: |
369 | + case RTL_GIGA_MAC_VER_19: |
370 | + case RTL_GIGA_MAC_VER_20: |
371 | + case RTL_GIGA_MAC_VER_21: |
372 | + case RTL_GIGA_MAC_VER_23: |
373 | + case RTL_GIGA_MAC_VER_24: |
374 | + case RTL_GIGA_MAC_VER_27: |
375 | + /* Experimental science. Pktgen proof. */ |
376 | + case RTL_GIGA_MAC_VER_12: |
377 | + case RTL_GIGA_MAC_VER_25: |
378 | + if (status == RxFIFOOver) |
379 | + goto done; |
380 | + break; |
381 | + default: |
382 | + break; |
383 | + } |
384 | } |
385 | |
386 | if (unlikely(status & SYSErr)) { |
387 | @@ -4643,7 +4667,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) |
388 | (status & RxFIFOOver) ? (status | RxOverflow) : status); |
389 | status = RTL_R16(IntrStatus); |
390 | } |
391 | - |
392 | +done: |
393 | return IRQ_RETVAL(handled); |
394 | } |
395 | |
396 | diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h |
397 | index c0b60ce..94bd9bc 100644 |
398 | --- a/drivers/net/wireless/ath/ath9k/ath9k.h |
399 | +++ b/drivers/net/wireless/ath/ath9k/ath9k.h |
400 | @@ -21,7 +21,6 @@ |
401 | #include <linux/device.h> |
402 | #include <linux/leds.h> |
403 | #include <linux/completion.h> |
404 | -#include <linux/pm_qos_params.h> |
405 | |
406 | #include "debug.h" |
407 | #include "common.h" |
408 | @@ -647,8 +646,6 @@ struct ath_softc { |
409 | struct ath_descdma txsdma; |
410 | |
411 | struct ath_ant_comb ant_comb; |
412 | - |
413 | - struct pm_qos_request_list pm_qos_req; |
414 | }; |
415 | |
416 | struct ath_wiphy { |
417 | diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c |
418 | index 14b8ab3..91d9b2a 100644 |
419 | --- a/drivers/net/wireless/ath/ath9k/init.c |
420 | +++ b/drivers/net/wireless/ath/ath9k/init.c |
421 | @@ -758,9 +758,6 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, |
422 | ath_init_leds(sc); |
423 | ath_start_rfkill_poll(sc); |
424 | |
425 | - pm_qos_add_request(&sc->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, |
426 | - PM_QOS_DEFAULT_VALUE); |
427 | - |
428 | return 0; |
429 | |
430 | error_world: |
431 | @@ -829,7 +826,6 @@ void ath9k_deinit_device(struct ath_softc *sc) |
432 | } |
433 | |
434 | ieee80211_unregister_hw(hw); |
435 | - pm_qos_remove_request(&sc->pm_qos_req); |
436 | ath_rx_cleanup(sc); |
437 | ath_tx_cleanup(sc); |
438 | ath9k_deinit_softc(sc); |
439 | diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c |
440 | index d1b0db4..cb0b2b9 100644 |
441 | --- a/drivers/net/wireless/ath/ath9k/main.c |
442 | +++ b/drivers/net/wireless/ath/ath9k/main.c |
443 | @@ -1245,8 +1245,6 @@ static int ath9k_start(struct ieee80211_hw *hw) |
444 | ath9k_btcoex_timer_resume(sc); |
445 | } |
446 | |
447 | - pm_qos_update_request(&sc->pm_qos_req, 55); |
448 | - |
449 | mutex_unlock: |
450 | mutex_unlock(&sc->mutex); |
451 | |
452 | @@ -1425,8 +1423,6 @@ static void ath9k_stop(struct ieee80211_hw *hw) |
453 | |
454 | sc->sc_flags |= SC_OP_INVALID; |
455 | |
456 | - pm_qos_update_request(&sc->pm_qos_req, PM_QOS_DEFAULT_VALUE); |
457 | - |
458 | mutex_unlock(&sc->mutex); |
459 | |
460 | ath_print(common, ATH_DBG_CONFIG, "Driver halt\n"); |
461 | diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c |
462 | index 8cd58e4..5ad44da 100644 |
463 | --- a/drivers/s390/char/keyboard.c |
464 | +++ b/drivers/s390/char/keyboard.c |
465 | @@ -460,7 +460,8 @@ kbd_ioctl(struct kbd_data *kbd, struct file *file, |
466 | unsigned int cmd, unsigned long arg) |
467 | { |
468 | void __user *argp; |
469 | - int ct, perm; |
470 | + unsigned int ct; |
471 | + int perm; |
472 | |
473 | argp = (void __user *)arg; |
474 | |
475 | diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c |
476 | index 4435e5e..c2c7a6b 100644 |
477 | --- a/fs/nfs/nfs4proc.c |
478 | +++ b/fs/nfs/nfs4proc.c |
479 | @@ -49,6 +49,7 @@ |
480 | #include <linux/mount.h> |
481 | #include <linux/module.h> |
482 | #include <linux/sunrpc/bc_xprt.h> |
483 | +#include <linux/mm.h> |
484 | |
485 | #include "nfs4_fs.h" |
486 | #include "delegation.h" |
487 | @@ -3216,6 +3217,35 @@ static void buf_to_pages(const void *buf, size_t buflen, |
488 | } |
489 | } |
490 | |
491 | +static int buf_to_pages_noslab(const void *buf, size_t buflen, |
492 | + struct page **pages, unsigned int *pgbase) |
493 | +{ |
494 | + struct page *newpage, **spages; |
495 | + int rc = 0; |
496 | + size_t len; |
497 | + spages = pages; |
498 | + |
499 | + do { |
500 | + len = min(PAGE_CACHE_SIZE, buflen); |
501 | + newpage = alloc_page(GFP_KERNEL); |
502 | + |
503 | + if (newpage == NULL) |
504 | + goto unwind; |
505 | + memcpy(page_address(newpage), buf, len); |
506 | + buf += len; |
507 | + buflen -= len; |
508 | + *pages++ = newpage; |
509 | + rc++; |
510 | + } while (buflen != 0); |
511 | + |
512 | + return rc; |
513 | + |
514 | +unwind: |
515 | + for(; rc > 0; rc--) |
516 | + __free_page(spages[rc-1]); |
517 | + return -ENOMEM; |
518 | +} |
519 | + |
520 | struct nfs4_cached_acl { |
521 | int cached; |
522 | size_t len; |
523 | @@ -3384,13 +3414,23 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl |
524 | .rpc_argp = &arg, |
525 | .rpc_resp = &res, |
526 | }; |
527 | - int ret; |
528 | + int ret, i; |
529 | |
530 | if (!nfs4_server_supports_acls(server)) |
531 | return -EOPNOTSUPP; |
532 | + i = buf_to_pages_noslab(buf, buflen, arg.acl_pages, &arg.acl_pgbase); |
533 | + if (i < 0) |
534 | + return i; |
535 | nfs_inode_return_delegation(inode); |
536 | - buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase); |
537 | ret = nfs4_call_sync(server, &msg, &arg, &res, 1); |
538 | + |
539 | + /* |
540 | + * Free each page after tx, so the only ref left is |
541 | + * held by the network stack |
542 | + */ |
543 | + for (; i > 0; i--) |
544 | + put_page(pages[i-1]); |
545 | + |
546 | /* |
547 | * Acl update can result in inode attribute update. |
548 | * so mark the attribute cache invalid. |
549 | diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c |
550 | index 0662a98..635f663 100644 |
551 | --- a/fs/nfs/nfs4xdr.c |
552 | +++ b/fs/nfs/nfs4xdr.c |
553 | @@ -6212,9 +6212,6 @@ __be32 *nfs4_decode_dirent(struct xdr_stream *xdr, struct nfs_entry *entry, |
554 | if (entry->fattr->valid & NFS_ATTR_FATTR_TYPE) |
555 | entry->d_type = nfs_umode_to_dtype(entry->fattr->mode); |
556 | |
557 | - if (verify_attr_len(xdr, p, len) < 0) |
558 | - goto out_overflow; |
559 | - |
560 | return p; |
561 | |
562 | out_overflow: |
563 | diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c |
564 | index 67080e4..5cf8fa3 100644 |
565 | --- a/fs/nfsd/nfs4xdr.c |
566 | +++ b/fs/nfsd/nfs4xdr.c |
567 | @@ -1107,7 +1107,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp, |
568 | |
569 | u32 dummy; |
570 | char *machine_name; |
571 | - int i; |
572 | + int i, j; |
573 | int nr_secflavs; |
574 | |
575 | READ_BUF(16); |
576 | @@ -1180,7 +1180,7 @@ nfsd4_decode_create_session(struct nfsd4_compoundargs *argp, |
577 | READ_BUF(4); |
578 | READ32(dummy); |
579 | READ_BUF(dummy * 4); |
580 | - for (i = 0; i < dummy; ++i) |
581 | + for (j = 0; j < dummy; ++j) |
582 | READ32(dummy); |
583 | break; |
584 | case RPC_AUTH_GSS: |
585 | diff --git a/include/keys/rxrpc-type.h b/include/keys/rxrpc-type.h |
586 | index 5cb86c3..fc48754 100644 |
587 | --- a/include/keys/rxrpc-type.h |
588 | +++ b/include/keys/rxrpc-type.h |
589 | @@ -99,7 +99,6 @@ struct rxrpc_key_token { |
590 | * structure of raw payloads passed to add_key() or instantiate key |
591 | */ |
592 | struct rxrpc_key_data_v1 { |
593 | - u32 kif_version; /* 1 */ |
594 | u16 security_index; |
595 | u16 ticket_length; |
596 | u32 expiry; /* time_t */ |
597 | diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h |
598 | index d8fd2c2..e63d08b 100644 |
599 | --- a/include/linux/netdevice.h |
600 | +++ b/include/linux/netdevice.h |
601 | @@ -2336,6 +2336,9 @@ extern int netdev_notice(const struct net_device *dev, const char *format, ...) |
602 | extern int netdev_info(const struct net_device *dev, const char *format, ...) |
603 | __attribute__ ((format (printf, 2, 3))); |
604 | |
605 | +#define MODULE_ALIAS_NETDEV(device) \ |
606 | + MODULE_ALIAS("netdev-" device) |
607 | + |
608 | #if defined(DEBUG) |
609 | #define netdev_dbg(__dev, format, args...) \ |
610 | netdev_printk(KERN_DEBUG, __dev, format, ##args) |
611 | diff --git a/kernel/cpuset.c b/kernel/cpuset.c |
612 | index 4349935..e92e981 100644 |
613 | --- a/kernel/cpuset.c |
614 | +++ b/kernel/cpuset.c |
615 | @@ -1575,8 +1575,10 @@ static int cpuset_write_resmask(struct cgroup *cgrp, struct cftype *cft, |
616 | return -ENODEV; |
617 | |
618 | trialcs = alloc_trial_cpuset(cs); |
619 | - if (!trialcs) |
620 | - return -ENOMEM; |
621 | + if (!trialcs) { |
622 | + retval = -ENOMEM; |
623 | + goto out; |
624 | + } |
625 | |
626 | switch (cft->private) { |
627 | case FILE_CPULIST: |
628 | @@ -1591,6 +1593,7 @@ static int cpuset_write_resmask(struct cgroup *cgrp, struct cftype *cft, |
629 | } |
630 | |
631 | free_trial_cpuset(trialcs); |
632 | +out: |
633 | cgroup_unlock(); |
634 | return retval; |
635 | } |
636 | diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c |
637 | index c5f1d23..acc5b8b 100644 |
638 | --- a/kernel/sched_rt.c |
639 | +++ b/kernel/sched_rt.c |
640 | @@ -199,11 +199,12 @@ static void dequeue_rt_entity(struct sched_rt_entity *rt_se); |
641 | |
642 | static void sched_rt_rq_enqueue(struct rt_rq *rt_rq) |
643 | { |
644 | - int this_cpu = smp_processor_id(); |
645 | struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr; |
646 | struct sched_rt_entity *rt_se; |
647 | |
648 | - rt_se = rt_rq->tg->rt_se[this_cpu]; |
649 | + int cpu = cpu_of(rq_of_rt_rq(rt_rq)); |
650 | + |
651 | + rt_se = rt_rq->tg->rt_se[cpu]; |
652 | |
653 | if (rt_rq->rt_nr_running) { |
654 | if (rt_se && !on_rt_rq(rt_se)) |
655 | @@ -215,10 +216,10 @@ static void sched_rt_rq_enqueue(struct rt_rq *rt_rq) |
656 | |
657 | static void sched_rt_rq_dequeue(struct rt_rq *rt_rq) |
658 | { |
659 | - int this_cpu = smp_processor_id(); |
660 | struct sched_rt_entity *rt_se; |
661 | + int cpu = cpu_of(rq_of_rt_rq(rt_rq)); |
662 | |
663 | - rt_se = rt_rq->tg->rt_se[this_cpu]; |
664 | + rt_se = rt_rq->tg->rt_se[cpu]; |
665 | |
666 | if (rt_se && on_rt_rq(rt_se)) |
667 | dequeue_rt_entity(rt_se); |
668 | @@ -546,8 +547,11 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun) |
669 | if (rt_rq->rt_time || rt_rq->rt_nr_running) |
670 | idle = 0; |
671 | raw_spin_unlock(&rt_rq->rt_runtime_lock); |
672 | - } else if (rt_rq->rt_nr_running) |
673 | + } else if (rt_rq->rt_nr_running) { |
674 | idle = 0; |
675 | + if (!rt_rq_throttled(rt_rq)) |
676 | + enqueue = 1; |
677 | + } |
678 | |
679 | if (enqueue) |
680 | sched_rt_rq_enqueue(rt_rq); |
681 | diff --git a/mm/mremap.c b/mm/mremap.c |
682 | index 563fbdd..e54d2b8 100644 |
683 | --- a/mm/mremap.c |
684 | +++ b/mm/mremap.c |
685 | @@ -91,9 +91,7 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, |
686 | */ |
687 | mapping = vma->vm_file->f_mapping; |
688 | spin_lock(&mapping->i_mmap_lock); |
689 | - if (new_vma->vm_truncate_count && |
690 | - new_vma->vm_truncate_count != vma->vm_truncate_count) |
691 | - new_vma->vm_truncate_count = 0; |
692 | + new_vma->vm_truncate_count = 0; |
693 | } |
694 | |
695 | /* |
696 | diff --git a/net/core/dev.c b/net/core/dev.c |
697 | index c0d3b5f..1f03c4f 100644 |
698 | --- a/net/core/dev.c |
699 | +++ b/net/core/dev.c |
700 | @@ -1116,13 +1116,21 @@ EXPORT_SYMBOL(netdev_bonding_change); |
701 | void dev_load(struct net *net, const char *name) |
702 | { |
703 | struct net_device *dev; |
704 | + int no_module; |
705 | |
706 | rcu_read_lock(); |
707 | dev = dev_get_by_name_rcu(net, name); |
708 | rcu_read_unlock(); |
709 | |
710 | - if (!dev && capable(CAP_NET_ADMIN)) |
711 | - request_module("%s", name); |
712 | + no_module = !dev; |
713 | + if (no_module && capable(CAP_NET_ADMIN)) |
714 | + no_module = request_module("netdev-%s", name); |
715 | + if (no_module && capable(CAP_SYS_MODULE)) { |
716 | + if (!request_module("%s", name)) |
717 | + pr_err("Loading kernel module for a network device " |
718 | +"with CAP_SYS_MODULE (deprecated). Use CAP_NET_ADMIN and alias netdev-%s " |
719 | +"instead\n", name); |
720 | + } |
721 | } |
722 | EXPORT_SYMBOL(dev_load); |
723 | |
724 | diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c |
725 | index 70ff77f..c0bbbc8 100644 |
726 | --- a/net/ipv4/ip_gre.c |
727 | +++ b/net/ipv4/ip_gre.c |
728 | @@ -1775,3 +1775,4 @@ module_exit(ipgre_fini); |
729 | MODULE_LICENSE("GPL"); |
730 | MODULE_ALIAS_RTNL_LINK("gre"); |
731 | MODULE_ALIAS_RTNL_LINK("gretap"); |
732 | +MODULE_ALIAS_NETDEV("gre0"); |
733 | diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c |
734 | index cd300aa..b472da9 100644 |
735 | --- a/net/ipv4/ipip.c |
736 | +++ b/net/ipv4/ipip.c |
737 | @@ -921,3 +921,4 @@ static void __exit ipip_fini(void) |
738 | module_init(ipip_init); |
739 | module_exit(ipip_fini); |
740 | MODULE_LICENSE("GPL"); |
741 | +MODULE_ALIAS_NETDEV("tunl0"); |
742 | diff --git a/net/ipv4/netfilter/arpt_mangle.c b/net/ipv4/netfilter/arpt_mangle.c |
743 | index b8ddcc4..a5e52a9 100644 |
744 | --- a/net/ipv4/netfilter/arpt_mangle.c |
745 | +++ b/net/ipv4/netfilter/arpt_mangle.c |
746 | @@ -60,12 +60,12 @@ static int checkentry(const struct xt_tgchk_param *par) |
747 | |
748 | if (mangle->flags & ~ARPT_MANGLE_MASK || |
749 | !(mangle->flags & ARPT_MANGLE_MASK)) |
750 | - return false; |
751 | + return -EINVAL; |
752 | |
753 | if (mangle->target != NF_DROP && mangle->target != NF_ACCEPT && |
754 | mangle->target != XT_CONTINUE) |
755 | - return false; |
756 | - return true; |
757 | + return -EINVAL; |
758 | + return 0; |
759 | } |
760 | |
761 | static struct xt_target arpt_mangle_reg __read_mostly = { |
762 | diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c |
763 | index 70e891a..fa6f032 100644 |
764 | --- a/net/ipv6/ip6_tunnel.c |
765 | +++ b/net/ipv6/ip6_tunnel.c |
766 | @@ -57,6 +57,7 @@ |
767 | MODULE_AUTHOR("Ville Nuorvala"); |
768 | MODULE_DESCRIPTION("IPv6 tunneling device"); |
769 | MODULE_LICENSE("GPL"); |
770 | +MODULE_ALIAS_NETDEV("ip6tnl0"); |
771 | |
772 | #define IPV6_TLV_TEL_DST_SIZE 8 |
773 | |
774 | diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c |
775 | index 8c4d00c..b770061 100644 |
776 | --- a/net/ipv6/sit.c |
777 | +++ b/net/ipv6/sit.c |
778 | @@ -1292,4 +1292,4 @@ static int __init sit_init(void) |
779 | module_init(sit_init); |
780 | module_exit(sit_cleanup); |
781 | MODULE_LICENSE("GPL"); |
782 | -MODULE_ALIAS("sit0"); |
783 | +MODULE_ALIAS_NETDEV("sit0"); |
784 | diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c |
785 | index 5f5daa3..2a398b0 100644 |
786 | --- a/net/netfilter/ipvs/ip_vs_ctl.c |
787 | +++ b/net/netfilter/ipvs/ip_vs_ctl.c |
788 | @@ -810,9 +810,9 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest, |
789 | dest->u_threshold = udest->u_threshold; |
790 | dest->l_threshold = udest->l_threshold; |
791 | |
792 | - spin_lock(&dest->dst_lock); |
793 | + spin_lock_bh(&dest->dst_lock); |
794 | ip_vs_dst_reset(dest); |
795 | - spin_unlock(&dest->dst_lock); |
796 | + spin_unlock_bh(&dest->dst_lock); |
797 | |
798 | if (add) |
799 | ip_vs_new_estimator(&dest->stats); |
800 | diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c |
801 | index b07393e..9181699 100644 |
802 | --- a/net/netfilter/nf_log.c |
803 | +++ b/net/netfilter/nf_log.c |
804 | @@ -85,6 +85,8 @@ EXPORT_SYMBOL(nf_log_unregister); |
805 | |
806 | int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger) |
807 | { |
808 | + if (pf >= ARRAY_SIZE(nf_loggers)) |
809 | + return -EINVAL; |
810 | mutex_lock(&nf_log_mutex); |
811 | if (__find_logger(pf, logger->name) == NULL) { |
812 | mutex_unlock(&nf_log_mutex); |
813 | @@ -98,6 +100,8 @@ EXPORT_SYMBOL(nf_log_bind_pf); |
814 | |
815 | void nf_log_unbind_pf(u_int8_t pf) |
816 | { |
817 | + if (pf >= ARRAY_SIZE(nf_loggers)) |
818 | + return; |
819 | mutex_lock(&nf_log_mutex); |
820 | rcu_assign_pointer(nf_loggers[pf], NULL); |
821 | mutex_unlock(&nf_log_mutex); |
822 | diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c |
823 | index 18af38e..954b89a 100644 |
824 | --- a/sound/pci/hda/patch_cirrus.c |
825 | +++ b/sound/pci/hda/patch_cirrus.c |
826 | @@ -1039,9 +1039,11 @@ static struct hda_verb cs_errata_init_verbs[] = { |
827 | {0x11, AC_VERB_SET_PROC_COEF, 0x0008}, |
828 | {0x11, AC_VERB_SET_PROC_STATE, 0x00}, |
829 | |
830 | +#if 0 /* Don't to set to D3 as we are in power-up sequence */ |
831 | {0x07, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Rx: D3 */ |
832 | {0x08, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Tx: D3 */ |
833 | /*{0x01, AC_VERB_SET_POWER_STATE, 0x03},*/ /* AFG: D3 This is already handled */ |
834 | +#endif |
835 | |
836 | {} /* terminator */ |
837 | }; |
838 | diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
839 | index 0bc6e4e..e61c87c 100644 |
840 | --- a/sound/pci/hda/patch_realtek.c |
841 | +++ b/sound/pci/hda/patch_realtek.c |
842 | @@ -1127,11 +1127,8 @@ static void alc_automute_speaker(struct hda_codec *codec, int pinctl) |
843 | nid = spec->autocfg.hp_pins[i]; |
844 | if (!nid) |
845 | break; |
846 | - if (snd_hda_jack_detect(codec, nid)) { |
847 | - spec->jack_present = 1; |
848 | - break; |
849 | - } |
850 | - alc_report_jack(codec, spec->autocfg.hp_pins[i]); |
851 | + alc_report_jack(codec, nid); |
852 | + spec->jack_present |= snd_hda_jack_detect(codec, nid); |
853 | } |
854 | |
855 | mute = spec->jack_present ? HDA_AMP_MUTE : 0; |
856 | diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c |
857 | index a486670..1dce6d1 100644 |
858 | --- a/sound/soc/codecs/wm9081.c |
859 | +++ b/sound/soc/codecs/wm9081.c |
860 | @@ -15,6 +15,7 @@ |
861 | #include <linux/moduleparam.h> |
862 | #include <linux/init.h> |
863 | #include <linux/delay.h> |
864 | +#include <linux/device.h> |
865 | #include <linux/pm.h> |
866 | #include <linux/i2c.h> |
867 | #include <linux/platform_device.h> |
868 | @@ -1338,6 +1339,10 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c, |
869 | wm9081->control_type = SND_SOC_I2C; |
870 | wm9081->control_data = i2c; |
871 | |
872 | + if (dev_get_platdata(&i2c->dev)) |
873 | + memcpy(&wm9081->retune, dev_get_platdata(&i2c->dev), |
874 | + sizeof(wm9081->retune)); |
875 | + |
876 | ret = snd_soc_register_codec(&i2c->dev, |
877 | &soc_codec_dev_wm9081, &wm9081_dai, 1); |
878 | if (ret < 0) |