Title: [9706] trunk: [!no_src_qa!] update to linux-2.6.37.4

Diff

Modified: trunk/Makefile (9705 => 9706)


--- trunk/Makefile	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/Makefile	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 37
-EXTRAVERSION = .3
+EXTRAVERSION = .4
 NAME = Flesh-Eating Bats with Fangs
 
 # *DOCUMENTATION*

Modified: trunk/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c (9705 => 9706)


--- trunk/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -195,7 +195,7 @@
 cmd_incomplete:
 	iowrite16(0, &pcch_hdr->status);
 	spin_unlock(&pcc_lock);
-	return -EINVAL;
+	return 0;
 }
 
 static int pcc_cpufreq_target(struct cpufreq_policy *policy,

Modified: trunk/drivers/char/virtio_console.c (9705 => 9706)


--- trunk/drivers/char/virtio_console.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/char/virtio_console.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -387,6 +387,10 @@
 	unsigned int len;
 	int ret;
 
+	if (!port->portdev) {
+		/* Device has been unplugged.  vqs are already gone. */
+		return;
+	}
 	vq = port->in_vq;
 	if (port->inbuf)
 		buf = port->inbuf;
@@ -469,6 +473,10 @@
 	void *buf;
 	unsigned int len;
 
+	if (!port->portdev) {
+		/* Device has been unplugged.  vqs are already gone. */
+		return;
+	}
 	while ((buf = virtqueue_get_buf(port->out_vq, &len))) {
 		kfree(buf);
 		port->outvq_full = false;

Modified: trunk/drivers/hid/hid-mosart.c (9705 => 9706)


--- trunk/drivers/hid/hid-mosart.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/hid/hid-mosart.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -90,6 +90,10 @@
 	case 0xff000000:
 		/* ignore HID features */
 		return -1;
+
+	case HID_UP_BUTTON:
+		/* ignore buttons */
+		return -1;
 	}
 
 	return 0;

Modified: trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c (9705 => 9706)


--- trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/media/dvb/dvb-usb/dib0700_devices.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -870,6 +870,23 @@
 	return 0;
 }
 
+static int stk7700p_pid_filter(struct dvb_usb_adapter *adapter, int index,
+		u16 pid, int onoff)
+{
+	struct dib0700_state *st = adapter->dev->priv;
+	if (st->is_dib7000pc)
+		return dib7000p_pid_filter(adapter->fe, index, pid, onoff);
+	return dib7000m_pid_filter(adapter->fe, index, pid, onoff);
+}
+
+static int stk7700p_pid_filter_ctrl(struct dvb_usb_adapter *adapter, int onoff)
+{
+	struct dib0700_state *st = adapter->dev->priv;
+	if (st->is_dib7000pc)
+		return dib7000p_pid_filter_ctrl(adapter->fe, onoff);
+	return dib7000m_pid_filter_ctrl(adapter->fe, onoff);
+}
+
 static int stk70x0p_pid_filter(struct dvb_usb_adapter *adapter, int index, u16 pid, int onoff)
 {
     return dib7000p_pid_filter(adapter->fe, index, pid, onoff);
@@ -1875,8 +1892,8 @@
 			{
 				.caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF,
 				.pid_filter_count = 32,
-				.pid_filter       = stk70x0p_pid_filter,
-				.pid_filter_ctrl  = stk70x0p_pid_filter_ctrl,
+				.pid_filter       = stk7700p_pid_filter,
+				.pid_filter_ctrl  = stk7700p_pid_filter_ctrl,
 				.frontend_attach  = stk7700p_frontend_attach,
 				.tuner_attach     = stk7700p_tuner_attach,
 

Modified: trunk/drivers/media/dvb/frontends/dib7000m.c (9705 => 9706)


--- trunk/drivers/media/dvb/frontends/dib7000m.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/media/dvb/frontends/dib7000m.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1285,6 +1285,25 @@
 }
 EXPORT_SYMBOL(dib7000m_get_i2c_master);
 
+int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff)
+{
+	struct dib7000m_state *state = fe->demodulator_priv;
+	u16 val = dib7000m_read_word(state, 294 + state->reg_offs) & 0xffef;
+	val |= (onoff & 0x1) << 4;
+	dprintk("PID filter enabled %d", onoff);
+	return dib7000m_write_word(state, 294 + state->reg_offs, val);
+}
+EXPORT_SYMBOL(dib7000m_pid_filter_ctrl);
+
+int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff)
+{
+	struct dib7000m_state *state = fe->demodulator_priv;
+	dprintk("PID filter: index %x, PID %d, OnOff %d", id, pid, onoff);
+	return dib7000m_write_word(state, 300 + state->reg_offs + id,
+			onoff ? (1 << 13) | pid : 0);
+}
+EXPORT_SYMBOL(dib7000m_pid_filter);
+
 #if 0
 /* used with some prototype boards */
 int dib7000m_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods,

Modified: trunk/drivers/media/dvb/frontends/dib7000m.h (9705 => 9706)


--- trunk/drivers/media/dvb/frontends/dib7000m.h	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/media/dvb/frontends/dib7000m.h	2011-03-14 22:25:35 UTC (rev 9706)
@@ -46,6 +46,8 @@
 extern struct i2c_adapter *dib7000m_get_i2c_master(struct dvb_frontend *,
 						   enum dibx000_i2c_interface,
 						   int);
+extern int dib7000m_pid_filter(struct dvb_frontend *, u8 id, u16 pid, u8 onoff);
+extern int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff);
 #else
 static inline
 struct dvb_frontend *dib7000m_attach(struct i2c_adapter *i2c_adap,
@@ -63,6 +65,19 @@
 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
 	return NULL;
 }
+static inline int dib7000m_pid_filter(struct dvb_frontend *fe, u8 id,
+						u16 pid, u8 onoff)
+{
+	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+	return -ENODEV;
+}
+
+static inline int dib7000m_pid_filter_ctrl(struct dvb_frontend *fe,
+						uint8_t onoff)
+{
+	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
+	return -ENODEV;
+}
 #endif
 
 /* TODO

Modified: trunk/drivers/media/video/cx23885/cx23885-i2c.c (9705 => 9706)


--- trunk/drivers/media/video/cx23885/cx23885-i2c.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/media/video/cx23885/cx23885-i2c.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -122,10 +122,6 @@
 
 	if (!i2c_wait_done(i2c_adap))
 		goto eio;
-	if (!i2c_slave_did_ack(i2c_adap)) {
-		retval = -ENXIO;
-		goto err;
-	}
 	if (i2c_debug) {
 		printk(" <W %02x %02x", msg->addr << 1, msg->buf[0]);
 		if (!(ctrl & I2C_NOSTOP))
@@ -209,10 +205,6 @@
 
 		if (!i2c_wait_done(i2c_adap))
 			goto eio;
-		if (cnt == 0 && !i2c_slave_did_ack(i2c_adap)) {
-			retval = -ENXIO;
-			goto err;
-		}
 		msg->buf[cnt] = cx_read(bus->reg_rdata) & 0xff;
 		if (i2c_debug) {
 			dprintk(1, " %02x", msg->buf[cnt]);

Modified: trunk/drivers/media/video/cx25840/cx25840-core.c (9705 => 9706)


--- trunk/drivers/media/video/cx25840/cx25840-core.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/media/video/cx25840/cx25840-core.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -2031,7 +2031,8 @@
 		kfree(state);
 		return err;
 	}
-	v4l2_ctrl_cluster(2, &state->volume);
+	if (!is_cx2583x(state))
+		v4l2_ctrl_cluster(2, &state->volume);
 	v4l2_ctrl_handler_setup(&state->hdl);
 
 	cx25840_ir_probe(sd);

Modified: trunk/drivers/media/video/ivtv/ivtv-irq.c (9705 => 9706)


--- trunk/drivers/media/video/ivtv/ivtv-irq.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/media/video/ivtv/ivtv-irq.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -628,22 +628,66 @@
 static void ivtv_irq_dma_err(struct ivtv *itv)
 {
 	u32 data[CX2341X_MBOX_MAX_DATA];
+	u32 status;
 
 	del_timer(&itv->dma_timer);
+
 	ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, 2, data);
+	status = read_reg(IVTV_REG_DMASTATUS);
 	IVTV_DEBUG_WARN("DMA ERROR %08x %08x %08x %d\n", data[0], data[1],
-				read_reg(IVTV_REG_DMASTATUS), itv->cur_dma_stream);
-	write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS);
+				status, itv->cur_dma_stream);
+	/*
+	 * We do *not* write back to the IVTV_REG_DMASTATUS register to
+	 * clear the error status, if either the encoder write (0x02) or
+	 * decoder read (0x01) bus master DMA operation do not indicate
+	 * completed.  We can race with the DMA engine, which may have
+	 * transitioned to completed status *after* we read the register.
+	 * Setting a IVTV_REG_DMASTATUS flag back to "busy" status, after the
+	 * DMA engine has completed, will cause the DMA engine to stop working.
+	 */
+	status &= 0x3;
+	if (status == 0x3)
+		write_reg(status, IVTV_REG_DMASTATUS);
+
 	if (!test_bit(IVTV_F_I_UDMA, &itv->i_flags) &&
 	    itv->cur_dma_stream >= 0 && itv->cur_dma_stream < IVTV_MAX_STREAMS) {
 		struct ivtv_stream *s = &itv->streams[itv->cur_dma_stream];
 
-		/* retry */
-		if (s->type >= IVTV_DEC_STREAM_TYPE_MPG)
+		if (s->type >= IVTV_DEC_STREAM_TYPE_MPG) {
+			/* retry */
+			/*
+			 * FIXME - handle cases of DMA error similar to
+			 * encoder below, except conditioned on status & 0x1
+			 */
 			ivtv_dma_dec_start(s);
-		else
-			ivtv_dma_enc_start(s);
-		return;
+			return;
+		} else {
+			if ((status & 0x2) == 0) {
+				/*
+				 * CX2341x Bus Master DMA write is ongoing.
+				 * Reset the timer and let it complete.
+				 */
+				itv->dma_timer.expires =
+						jiffies + msecs_to_jiffies(600);
+				add_timer(&itv->dma_timer);
+				return;
+			}
+
+			if (itv->dma_retries < 3) {
+				/*
+				 * CX2341x Bus Master DMA write has ended.
+				 * Retry the write, starting with the first
+				 * xfer segment. Just retrying the current
+				 * segment is not sufficient.
+				 */
+				s->sg_processed = 0;
+				itv->dma_retries++;
+				ivtv_dma_enc_start_xfer(s);
+				return;
+			}
+			/* Too many retries, give up on this one */
+		}
+
 	}
 	if (test_bit(IVTV_F_I_UDMA, &itv->i_flags)) {
 		ivtv_udma_start(itv);

Modified: trunk/drivers/misc/bmp085.c (9705 => 9706)


--- trunk/drivers/misc/bmp085.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/misc/bmp085.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -449,6 +449,7 @@
 	{ "bmp085", 0 },
 	{ }
 };
+MODULE_DEVICE_TABLE(i2c, bmp085_id);
 
 static struct i2c_driver bmp085_driver = {
 	.driver = {

Modified: trunk/drivers/net/forcedeth.c (9705 => 9706)


--- trunk/drivers/net/forcedeth.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/net/forcedeth.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -5816,6 +5816,8 @@
 		goto out_error;
 	}
 
+	netif_carrier_off(dev);
+
 	dev_printk(KERN_INFO, &pci_dev->dev, "ifname %s, PHY OUI 0x%x @ %d, "
 		   "addr %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n",
 		   dev->name,

Modified: trunk/drivers/net/ixgbe/ixgbe_main.c (9705 => 9706)


--- trunk/drivers/net/ixgbe/ixgbe_main.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/net/ixgbe/ixgbe_main.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -2923,6 +2923,10 @@
 	if (hw->mac.type == ixgbe_mac_82599EB)
 		adapter->flags &= ~IXGBE_FLAG_RX_PS_ENABLED;
 
+	/* Disable packet split due to 82599 erratum #45 */
+	if (hw->mac.type == ixgbe_mac_82599EB)
+		adapter->flags &= ~IXGBE_FLAG_RX_PS_ENABLED;
+
 	/* Set the RX buffer length according to the mode */
 	if (adapter->flags & IXGBE_FLAG_RX_PS_ENABLED) {
 		rx_buf_len = IXGBE_RX_HDR_SIZE;

Modified: trunk/drivers/net/r8169.c (9705 => 9706)


--- trunk/drivers/net/r8169.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/net/r8169.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -758,7 +758,8 @@
 		if (pm)
 			pm_request_resume(&tp->pci_dev->dev);
 		netif_carrier_on(dev);
-		netif_info(tp, ifup, dev, "link up\n");
+		if (net_ratelimit())
+			netif_info(tp, ifup, dev, "link up\n");
 	} else {
 		netif_carrier_off(dev);
 		netif_info(tp, ifdown, dev, "link down\n");
@@ -3235,6 +3236,8 @@
 	if (pci_dev_run_wake(pdev))
 		pm_runtime_put_noidle(&pdev->dev);
 
+	netif_carrier_off(dev);
+
 out:
 	return rc;
 
@@ -3725,7 +3728,8 @@
 	RTL_W16(IntrMitigate, 0x5151);
 
 	/* Work around for RxFIFO overflow. */
-	if (tp->mac_version == RTL_GIGA_MAC_VER_11) {
+	if (tp->mac_version == RTL_GIGA_MAC_VER_11 ||
+	    tp->mac_version == RTL_GIGA_MAC_VER_22) {
 		tp->intr_event |= RxFIFOOver | PCSTimeout;
 		tp->intr_event &= ~RxOverflow;
 	}
@@ -4602,12 +4606,32 @@
 			break;
 		}
 
-		/* Work around for rx fifo overflow */
-		if (unlikely(status & RxFIFOOver) &&
-		(tp->mac_version == RTL_GIGA_MAC_VER_11)) {
-			netif_stop_queue(dev);
-			rtl8169_tx_timeout(dev);
-			break;
+		if (unlikely(status & RxFIFOOver)) {
+			switch (tp->mac_version) {
+			/* Work around for rx fifo overflow */
+			case RTL_GIGA_MAC_VER_11:
+			case RTL_GIGA_MAC_VER_22:
+			case RTL_GIGA_MAC_VER_26:
+				netif_stop_queue(dev);
+				rtl8169_tx_timeout(dev);
+				goto done;
+			/* Testers needed. */
+			case RTL_GIGA_MAC_VER_17:
+			case RTL_GIGA_MAC_VER_19:
+			case RTL_GIGA_MAC_VER_20:
+			case RTL_GIGA_MAC_VER_21:
+			case RTL_GIGA_MAC_VER_23:
+			case RTL_GIGA_MAC_VER_24:
+			case RTL_GIGA_MAC_VER_27:
+			/* Experimental science. Pktgen proof. */
+			case RTL_GIGA_MAC_VER_12:
+			case RTL_GIGA_MAC_VER_25:
+				if (status == RxFIFOOver)
+					goto done;
+				break;
+			default:
+				break;
+			}
 		}
 
 		if (unlikely(status & SYSErr)) {
@@ -4643,7 +4667,7 @@
 			(status & RxFIFOOver) ? (status | RxOverflow) : status);
 		status = RTL_R16(IntrStatus);
 	}
-
+done:
 	return IRQ_RETVAL(handled);
 }
 

Modified: trunk/drivers/net/wireless/ath/ath9k/ath9k.h (9705 => 9706)


--- trunk/drivers/net/wireless/ath/ath9k/ath9k.h	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/net/wireless/ath/ath9k/ath9k.h	2011-03-14 22:25:35 UTC (rev 9706)
@@ -21,7 +21,6 @@
 #include <linux/device.h>
 #include <linux/leds.h>
 #include <linux/completion.h>
-#include <linux/pm_qos_params.h>
 
 #include "debug.h"
 #include "common.h"
@@ -647,8 +646,6 @@
 	struct ath_descdma txsdma;
 
 	struct ath_ant_comb ant_comb;
-
-	struct pm_qos_request_list pm_qos_req;
 };
 
 struct ath_wiphy {

Modified: trunk/drivers/net/wireless/ath/ath9k/init.c (9705 => 9706)


--- trunk/drivers/net/wireless/ath/ath9k/init.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/net/wireless/ath/ath9k/init.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -758,9 +758,6 @@
 	ath_init_leds(sc);
 	ath_start_rfkill_poll(sc);
 
-	pm_qos_add_request(&sc->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
-			   PM_QOS_DEFAULT_VALUE);
-
 	return 0;
 
 error_world:
@@ -829,7 +826,6 @@
 	}
 
 	ieee80211_unregister_hw(hw);
-	pm_qos_remove_request(&sc->pm_qos_req);
 	ath_rx_cleanup(sc);
 	ath_tx_cleanup(sc);
 	ath9k_deinit_softc(sc);

Modified: trunk/drivers/net/wireless/ath/ath9k/main.c (9705 => 9706)


--- trunk/drivers/net/wireless/ath/ath9k/main.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/net/wireless/ath/ath9k/main.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1245,8 +1245,6 @@
 			ath9k_btcoex_timer_resume(sc);
 	}
 
-	pm_qos_update_request(&sc->pm_qos_req, 55);
-
 mutex_unlock:
 	mutex_unlock(&sc->mutex);
 
@@ -1425,8 +1423,6 @@
 
 	sc->sc_flags |= SC_OP_INVALID;
 
-	pm_qos_update_request(&sc->pm_qos_req, PM_QOS_DEFAULT_VALUE);
-
 	mutex_unlock(&sc->mutex);
 
 	ath_print(common, ATH_DBG_CONFIG, "Driver halt\n");

Modified: trunk/drivers/s390/char/keyboard.c (9705 => 9706)


--- trunk/drivers/s390/char/keyboard.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/drivers/s390/char/keyboard.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -460,7 +460,8 @@
 	  unsigned int cmd, unsigned long arg)
 {
 	void __user *argp;
-	int ct, perm;
+	unsigned int ct;
+	int perm;
 
 	argp = (void __user *)arg;
 

Modified: trunk/fs/nfs/nfs4proc.c (9705 => 9706)


--- trunk/fs/nfs/nfs4proc.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/fs/nfs/nfs4proc.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -49,6 +49,7 @@
 #include <linux/mount.h>
 #include <linux/module.h>
 #include <linux/sunrpc/bc_xprt.h>
+#include <linux/mm.h>
 
 #include "nfs4_fs.h"
 #include "delegation.h"
@@ -3216,6 +3217,35 @@
 	}
 }
 
+static int buf_to_pages_noslab(const void *buf, size_t buflen,
+		struct page **pages, unsigned int *pgbase)
+{
+	struct page *newpage, **spages;
+	int rc = 0;
+	size_t len;
+	spages = pages;
+
+	do {
+		len = min(PAGE_CACHE_SIZE, buflen);
+		newpage = alloc_page(GFP_KERNEL);
+
+		if (newpage == NULL)
+			goto unwind;
+		memcpy(page_address(newpage), buf, len);
+                buf += len;
+                buflen -= len;
+		*pages++ = newpage;
+		rc++;
+	} while (buflen != 0);
+
+	return rc;
+
+unwind:
+	for(; rc > 0; rc--)
+		__free_page(spages[rc-1]);
+	return -ENOMEM;
+}
+
 struct nfs4_cached_acl {
 	int cached;
 	size_t len;
@@ -3384,14 +3414,24 @@
 		.rpc_argp	= &arg,
 		.rpc_resp	= &res,
 	};
-	int ret;
+	int ret, i;
 
 	if (!nfs4_server_supports_acls(server))
 		return -EOPNOTSUPP;
+	i = buf_to_pages_noslab(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
+	if (i < 0)
+		return i;
 	nfs_inode_return_delegation(inode);
-	buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
 	ret = nfs4_call_sync(server, &msg, &arg, &res, 1);
+
 	/*
+	 * Free each page after tx, so the only ref left is
+	 * held by the network stack
+	 */
+	for (; i > 0; i--)
+		put_page(pages[i-1]);
+
+	/*
 	 * Acl update can result in inode attribute update.
 	 * so mark the attribute cache invalid.
 	 */

Modified: trunk/fs/nfs/nfs4xdr.c (9705 => 9706)


--- trunk/fs/nfs/nfs4xdr.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/fs/nfs/nfs4xdr.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -6212,9 +6212,6 @@
 	if (entry->fattr->valid & NFS_ATTR_FATTR_TYPE)
 		entry->d_type = nfs_umode_to_dtype(entry->fattr->mode);
 
-	if (verify_attr_len(xdr, p, len) < 0)
-		goto out_overflow;
-
 	return p;
 
 out_overflow:

Modified: trunk/fs/nfsd/nfs4xdr.c (9705 => 9706)


--- trunk/fs/nfsd/nfs4xdr.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/fs/nfsd/nfs4xdr.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1107,7 +1107,7 @@
 
 	u32 dummy;
 	char *machine_name;
-	int i;
+	int i, j;
 	int nr_secflavs;
 
 	READ_BUF(16);
@@ -1180,7 +1180,7 @@
 			READ_BUF(4);
 			READ32(dummy);
 			READ_BUF(dummy * 4);
-			for (i = 0; i < dummy; ++i)
+			for (j = 0; j < dummy; ++j)
 				READ32(dummy);
 			break;
 		case RPC_AUTH_GSS:

Modified: trunk/include/keys/rxrpc-type.h (9705 => 9706)


--- trunk/include/keys/rxrpc-type.h	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/include/keys/rxrpc-type.h	2011-03-14 22:25:35 UTC (rev 9706)
@@ -99,7 +99,6 @@
  * structure of raw payloads passed to add_key() or instantiate key
  */
 struct rxrpc_key_data_v1 {
-	u32		kif_version;		/* 1 */
 	u16		security_index;
 	u16		ticket_length;
 	u32		expiry;			/* time_t */

Modified: trunk/include/linux/netdevice.h (9705 => 9706)


--- trunk/include/linux/netdevice.h	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/include/linux/netdevice.h	2011-03-14 22:25:35 UTC (rev 9706)
@@ -2346,6 +2346,9 @@
 extern int netdev_info(const struct net_device *dev, const char *format, ...)
 	__attribute__ ((format (printf, 2, 3)));
 
+#define MODULE_ALIAS_NETDEV(device) \
+	MODULE_ALIAS("netdev-" device)
+
 #if defined(DEBUG)
 #define netdev_dbg(__dev, format, args...)			\
 	netdev_printk(KERN_DEBUG, __dev, format, ##args)

Modified: trunk/kernel/cpuset.c (9705 => 9706)


--- trunk/kernel/cpuset.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/kernel/cpuset.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1575,8 +1575,10 @@
 		return -ENODEV;
 
 	trialcs = alloc_trial_cpuset(cs);
-	if (!trialcs)
-		return -ENOMEM;
+	if (!trialcs) {
+		retval = -ENOMEM;
+		goto out;
+	}
 
 	switch (cft->private) {
 	case FILE_CPULIST:
@@ -1591,6 +1593,7 @@
 	}
 
 	free_trial_cpuset(trialcs);
+out:
 	cgroup_unlock();
 	return retval;
 }

Modified: trunk/kernel/sched_rt.c (9705 => 9706)


--- trunk/kernel/sched_rt.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/kernel/sched_rt.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -199,12 +199,13 @@
 
 static void sched_rt_rq_enqueue(struct rt_rq *rt_rq)
 {
-	int this_cpu = smp_processor_id();
 	struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;
 	struct sched_rt_entity *rt_se;
 
-	rt_se = rt_rq->tg->rt_se[this_cpu];
+	int cpu = cpu_of(rq_of_rt_rq(rt_rq));
 
+	rt_se = rt_rq->tg->rt_se[cpu];
+
 	if (rt_rq->rt_nr_running) {
 		if (rt_se && !on_rt_rq(rt_se))
 			enqueue_rt_entity(rt_se, false);
@@ -215,10 +216,10 @@
 
 static void sched_rt_rq_dequeue(struct rt_rq *rt_rq)
 {
-	int this_cpu = smp_processor_id();
 	struct sched_rt_entity *rt_se;
+	int cpu = cpu_of(rq_of_rt_rq(rt_rq));
 
-	rt_se = rt_rq->tg->rt_se[this_cpu];
+	rt_se = rt_rq->tg->rt_se[cpu];
 
 	if (rt_se && on_rt_rq(rt_se))
 		dequeue_rt_entity(rt_se);
@@ -546,8 +547,11 @@
 			if (rt_rq->rt_time || rt_rq->rt_nr_running)
 				idle = 0;
 			raw_spin_unlock(&rt_rq->rt_runtime_lock);
-		} else if (rt_rq->rt_nr_running)
+		} else if (rt_rq->rt_nr_running) {
 			idle = 0;
+			if (!rt_rq_throttled(rt_rq))
+				enqueue = 1;
+		}
 
 		if (enqueue)
 			sched_rt_rq_enqueue(rt_rq);

Modified: trunk/mm/mremap.c (9705 => 9706)


--- trunk/mm/mremap.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/mm/mremap.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -91,9 +91,7 @@
 		 */
 		mapping = vma->vm_file->f_mapping;
 		spin_lock(&mapping->i_mmap_lock);
-		if (new_vma->vm_truncate_count &&
-		    new_vma->vm_truncate_count != vma->vm_truncate_count)
-			new_vma->vm_truncate_count = 0;
+		new_vma->vm_truncate_count = 0;
 	}
 
 	/*

Modified: trunk/net/core/dev.c (9705 => 9706)


--- trunk/net/core/dev.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/net/core/dev.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1116,13 +1116,21 @@
 void dev_load(struct net *net, const char *name)
 {
 	struct net_device *dev;
+	int no_module;
 
 	rcu_read_lock();
 	dev = dev_get_by_name_rcu(net, name);
 	rcu_read_unlock();
 
-	if (!dev && capable(CAP_NET_ADMIN))
-		request_module("%s", name);
+	no_module = !dev;
+	if (no_module && capable(CAP_NET_ADMIN))
+		no_module = request_module("netdev-%s", name);
+	if (no_module && capable(CAP_SYS_MODULE)) {
+		if (!request_module("%s", name))
+			pr_err("Loading kernel module for a network device "
+"with CAP_SYS_MODULE (deprecated).  Use CAP_NET_ADMIN and alias netdev-%s "
+"instead\n", name);
+	}
 }
 EXPORT_SYMBOL(dev_load);
 

Modified: trunk/net/ipv4/ip_gre.c (9705 => 9706)


--- trunk/net/ipv4/ip_gre.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/net/ipv4/ip_gre.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1775,3 +1775,4 @@
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_RTNL_LINK("gre");
 MODULE_ALIAS_RTNL_LINK("gretap");
+MODULE_ALIAS_NETDEV("gre0");

Modified: trunk/net/ipv4/ipip.c (9705 => 9706)


--- trunk/net/ipv4/ipip.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/net/ipv4/ipip.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -921,3 +921,4 @@
 module_init(ipip_init);
 module_exit(ipip_fini);
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_NETDEV("tunl0");

Modified: trunk/net/ipv4/netfilter/arpt_mangle.c (9705 => 9706)


--- trunk/net/ipv4/netfilter/arpt_mangle.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/net/ipv4/netfilter/arpt_mangle.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -60,12 +60,12 @@
 
 	if (mangle->flags & ~ARPT_MANGLE_MASK ||
 	    !(mangle->flags & ARPT_MANGLE_MASK))
-		return false;
+		return -EINVAL;
 
 	if (mangle->target != NF_DROP && mangle->target != NF_ACCEPT &&
 	   mangle->target != XT_CONTINUE)
-		return false;
-	return true;
+		return -EINVAL;
+	return 0;
 }
 
 static struct xt_target arpt_mangle_reg __read_mostly = {

Modified: trunk/net/ipv6/ip6_tunnel.c (9705 => 9706)


--- trunk/net/ipv6/ip6_tunnel.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/net/ipv6/ip6_tunnel.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -57,6 +57,7 @@
 MODULE_AUTHOR("Ville Nuorvala");
 MODULE_DESCRIPTION("IPv6 tunneling device");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_NETDEV("ip6tnl0");
 
 #define IPV6_TLV_TEL_DST_SIZE 8
 

Modified: trunk/net/ipv6/sit.c (9705 => 9706)


--- trunk/net/ipv6/sit.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/net/ipv6/sit.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1292,4 +1292,4 @@
 module_init(sit_init);
 module_exit(sit_cleanup);
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("sit0");
+MODULE_ALIAS_NETDEV("sit0");

Modified: trunk/net/netfilter/ipvs/ip_vs_ctl.c (9705 => 9706)


--- trunk/net/netfilter/ipvs/ip_vs_ctl.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/net/netfilter/ipvs/ip_vs_ctl.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -810,9 +810,9 @@
 	dest->u_threshold = udest->u_threshold;
 	dest->l_threshold = udest->l_threshold;
 
-	spin_lock(&dest->dst_lock);
+	spin_lock_bh(&dest->dst_lock);
 	ip_vs_dst_reset(dest);
-	spin_unlock(&dest->dst_lock);
+	spin_unlock_bh(&dest->dst_lock);
 
 	if (add)
 		ip_vs_new_estimator(&dest->stats);

Modified: trunk/net/netfilter/nf_log.c (9705 => 9706)


--- trunk/net/netfilter/nf_log.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/net/netfilter/nf_log.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -85,6 +85,8 @@
 
 int nf_log_bind_pf(u_int8_t pf, const struct nf_logger *logger)
 {
+	if (pf >= ARRAY_SIZE(nf_loggers))
+		return -EINVAL;
 	mutex_lock(&nf_log_mutex);
 	if (__find_logger(pf, logger->name) == NULL) {
 		mutex_unlock(&nf_log_mutex);
@@ -98,6 +100,8 @@
 
 void nf_log_unbind_pf(u_int8_t pf)
 {
+	if (pf >= ARRAY_SIZE(nf_loggers))
+		return;
 	mutex_lock(&nf_log_mutex);
 	rcu_assign_pointer(nf_loggers[pf], NULL);
 	mutex_unlock(&nf_log_mutex);

Modified: trunk/sound/pci/hda/patch_cirrus.c (9705 => 9706)


--- trunk/sound/pci/hda/patch_cirrus.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/sound/pci/hda/patch_cirrus.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1039,9 +1039,11 @@
 	{0x11, AC_VERB_SET_PROC_COEF, 0x0008},
 	{0x11, AC_VERB_SET_PROC_STATE, 0x00},
 
+#if 0 /* Don't to set to D3 as we are in power-up sequence */
 	{0x07, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Rx: D3 */
 	{0x08, AC_VERB_SET_POWER_STATE, 0x03}, /* S/PDIF Tx: D3 */
 	/*{0x01, AC_VERB_SET_POWER_STATE, 0x03},*/ /* AFG: D3 This is already handled */
+#endif
 
 	{} /* terminator */
 };

Modified: trunk/sound/pci/hda/patch_realtek.c (9705 => 9706)


--- trunk/sound/pci/hda/patch_realtek.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/sound/pci/hda/patch_realtek.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -1127,11 +1127,8 @@
 		nid = spec->autocfg.hp_pins[i];
 		if (!nid)
 			break;
-		if (snd_hda_jack_detect(codec, nid)) {
-			spec->jack_present = 1;
-			break;
-		}
-		alc_report_jack(codec, spec->autocfg.hp_pins[i]);
+		alc_report_jack(codec, nid);
+		spec->jack_present |= snd_hda_jack_detect(codec, nid);
 	}
 
 	mute = spec->jack_present ? HDA_AMP_MUTE : 0;

Modified: trunk/sound/soc/codecs/wm9081.c (9705 => 9706)


--- trunk/sound/soc/codecs/wm9081.c	2011-03-14 09:32:24 UTC (rev 9705)
+++ trunk/sound/soc/codecs/wm9081.c	2011-03-14 22:25:35 UTC (rev 9706)
@@ -15,6 +15,7 @@
 #include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/device.h>
 #include <linux/pm.h>
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
@@ -1338,6 +1339,10 @@
 	wm9081->control_type = SND_SOC_I2C;
 	wm9081->control_data = i2c;
 
+	if (dev_get_platdata(&i2c->dev))
+		memcpy(&wm9081->retune, dev_get_platdata(&i2c->dev),
+		       sizeof(wm9081->retune));
+
 	ret = snd_soc_register_codec(&i2c->dev,
 			&soc_codec_dev_wm9081, &wm9081_dai, 1);
 	if (ret < 0)
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to