All of lore.kernel.org
 help / color / mirror / Atom feed
* [ 01/42] Perf: fix build breakage
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
@ 2012-04-24 22:32 ` Greg KH
  2012-04-24 22:32   ` Greg KH
                   ` (40 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:32 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Zeev Tarantov,
	Signed-off-by: David S. Miller, Arnaldo Carvalho de Melo

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------


From: Zeev Tarantov <zeev.tarantov@gmail.com>

[Patch not needed upstream as this is a backport build bugfix - gregkh

gcc correctly complains:

util/hist.c: In function ‘__hists__add_entry’:
util/hist.c:240:27: error: invalid type argument of ‘->’ (have ‘struct hist_entry’)
util/hist.c:241:23: error: invalid type argument of ‘->’ (have ‘struct hist_entry’)

for this new code:

+                       if (he->ms.map != entry->ms.map) {
+                               he->ms.map = entry->ms.map;
+                               if (he->ms.map)
+                                       he->ms.map->referenced = true;
+                       }

because "entry" is a "struct hist_entry", not a pointer to a struct.

In mainline, "entry" is a pointer to struct passed as argument to the function.
So this is broken during backporting. But obviously not compile tested.

Signed-off-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Cc: Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/perf/util/hist.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -165,8 +165,8 @@ struct hist_entry *__hists__add_entry(st
 			 * mis-adjust symbol addresses when computing
 			 * the history counter to increment.
 			 */
-			if (he->ms.map != entry->ms.map) {
-				he->ms.map = entry->ms.map;
+			if (he->ms.map != entry.ms.map) {
+				he->ms.map = entry.ms.map;
 				if (he->ms.map)
 					he->ms.map->referenced = true;
 			}



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 02/42] crypto: sha512 - Fix byte counter overflow in SHA-512
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
@ 2012-04-24 22:32   ` Greg KH
  2012-04-24 22:32   ` Greg KH
                     ` (40 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:32 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Kent Yoder, Herbert Xu

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kent Yoder <key@linux.vnet.ibm.com>

commit 25c3d30c918207556ae1d6e663150ebdf902186b upstream.

The current code only increments the upper 64 bits of the SHA-512 byte
counter when the number of bytes hashed happens to hit 2^64 exactly.

This patch increments the upper 64 bits whenever the lower 64 bits
overflows.

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/sha512_generic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, c
 	index = sctx->count[0] & 0x7f;
 
 	/* Update number of bytes */
-	if (!(sctx->count[0] += len))
+	if ((sctx->count[0] += len) < len)
 		sctx->count[1]++;
 
         part_len = 128 - index;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 02/42] crypto: sha512 - Fix byte counter overflow in SHA-512
@ 2012-04-24 22:32   ` Greg KH
  0 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:32 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Kent Yoder, Herbert Xu

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kent Yoder <key@linux.vnet.ibm.com>

commit 25c3d30c918207556ae1d6e663150ebdf902186b upstream.

The current code only increments the upper 64 bits of the SHA-512 byte
counter when the number of bytes hashed happens to hit 2^64 exactly.

This patch increments the upper 64 bits whenever the lower 64 bits
overflows.

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/sha512_generic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, c
 	index = sctx->count[0] & 0x7f;
 
 	/* Update number of bytes */
-	if (!(sctx->count[0] += len))
+	if ((sctx->count[0] += len) < len)
 		sctx->count[1]++;
 
         part_len = 128 - index;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 03/42] hwmon: fam15h_power: fix bogus values with current BIOSes
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
  2012-04-24 22:32 ` [ 01/42] Perf: fix build breakage Greg KH
  2012-04-24 22:32   ` Greg KH
@ 2012-04-24 22:32 ` Greg KH
  2012-04-25 19:46   ` Ben Hutchings
  2012-04-24 22:32 ` [ 04/42] ALSA: hda/conexant - Dont set HP pin-control bit unconditionally Greg KH
                   ` (38 subsequent siblings)
  41 siblings, 1 reply; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:32 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Andre Przywara, Jean Delvare, Guenter Roeck

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Andre Przywara <andre.przywara@amd.com>

commit 00250ec90963b7ef6678438888f3244985ecde14 upstream.

Newer BKDG[1] versions recommend a different initialization value for
the running average range register in the northbridge. This improves
the power reading by avoiding counter saturations resulting in bogus
values for anything below about 80% of TDP power consumption.
Updated BIOSes will have this new value set up from the beginning,
but meanwhile we correct this value ourselves.
This needs to be done on all northbridges, even on those where the
driver itself does not register at.

This fixes the driver on all current machines to provide proper
values for idle load.

[1]
http://support.amd.com/us/Processor_TechDocs/42301_15h_Mod_00h-0Fh_BKDG.pdf
Chapter 3.8: D18F5xE0 Processor TDP Running Average (p. 452)

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
[guenter.roeck@ericsson.com: Removed unnecessary return statement]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hwmon/fam15h_power.c |   39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

--- a/drivers/hwmon/fam15h_power.c
+++ b/drivers/hwmon/fam15h_power.c
@@ -122,6 +122,38 @@ static bool __devinit fam15h_power_is_in
 	return true;
 }
 
+/*
+ * Newer BKDG versions have an updated recommendation on how to properly
+ * initialize the running average range (was: 0xE, now: 0x9). This avoids
+ * counter saturations resulting in bogus power readings.
+ * We correct this value ourselves to cope with older BIOSes.
+ */
+static void __devinit tweak_runavg_range(struct pci_dev *pdev)
+{
+	u32 val;
+	const struct pci_device_id affected_device = {
+		PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) };
+
+	/*
+	 * let this quirk apply only to the current version of the
+	 * northbridge, since future versions may change the behavior
+	 */
+	if (!pci_match_id(&affected_device, pdev))
+		return;
+
+	pci_bus_read_config_dword(pdev->bus,
+		PCI_DEVFN(PCI_SLOT(pdev->devfn), 5),
+		REG_TDP_RUNNING_AVERAGE, &val);
+	if ((val & 0xf) != 0xe)
+		return;
+
+	val &= ~0xf;
+	val |=  0x9;
+	pci_bus_write_config_dword(pdev->bus,
+		PCI_DEVFN(PCI_SLOT(pdev->devfn), 5),
+		REG_TDP_RUNNING_AVERAGE, val);
+}
+
 static void __devinit fam15h_power_init_data(struct pci_dev *f4,
 					     struct fam15h_power_data *data)
 {
@@ -155,6 +187,13 @@ static int __devinit fam15h_power_probe(
 	struct device *dev;
 	int err;
 
+	/*
+	 * though we ignore every other northbridge, we still have to
+	 * do the tweaking on _each_ node in MCM processors as the counters
+	 * are working hand-in-hand
+	 */
+	tweak_runavg_range(pdev);
+
 	if (!fam15h_power_is_internal_node0(pdev)) {
 		err = -ENODEV;
 		goto exit;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 04/42] ALSA: hda/conexant - Dont set HP pin-control bit unconditionally
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (2 preceding siblings ...)
  2012-04-24 22:32 ` [ 03/42] hwmon: fam15h_power: fix bogus values with current BIOSes Greg KH
@ 2012-04-24 22:32 ` Greg KH
  2012-04-24 22:32 ` [ 05/42] ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR Greg KH
                   ` (37 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:32 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Takashi Iwai

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Takashi Iwai <tiwai@suse.de>

commit ca3649de026ff95c6f2847e8d096cf2f411c02b3 upstream.

Some output pins on Conexant chips have no HP control bit, but the
auto-parser initializes these pins unconditionally with PIN_HP.

Check the pin-capability and avoid the HP bit if not supported.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_conexant.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -4003,9 +4003,14 @@ static void cx_auto_init_output(struct h
 	int i;
 
 	mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids);
-	for (i = 0; i < cfg->hp_outs; i++)
+	for (i = 0; i < cfg->hp_outs; i++) {
+		unsigned int val = PIN_OUT;
+		if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) &
+		    AC_PINCAP_HP_DRV)
+			val |= AC_PINCTL_HP_EN;
 		snd_hda_codec_write(codec, cfg->hp_pins[i], 0,
-				    AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP);
+				    AC_VERB_SET_PIN_WIDGET_CONTROL, val);
+	}
 	mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
 	mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
 	mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 05/42] ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (3 preceding siblings ...)
  2012-04-24 22:32 ` [ 04/42] ALSA: hda/conexant - Dont set HP pin-control bit unconditionally Greg KH
@ 2012-04-24 22:32 ` Greg KH
  2012-04-24 22:32 ` [ 06/42] xen/gntdev: do not set VM_PFNMAP Greg KH
                   ` (36 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:32 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Alexander Shiyan

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alexander Shiyan <shc_work@mail.ru>

commit 7a6fbc9a887193a1e9f8658703881c528040afbc upstream.

Since 2.6.30-rc1 clps711x serial driver hungs system. This is a result
of call disable_irq from ISR. synchronize_irq waits for end of interrupt
and goes to infinite loop. This patch fix this problem.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/clps711x.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

--- a/drivers/tty/serial/clps711x.c
+++ b/drivers/tty/serial/clps711x.c
@@ -154,10 +154,9 @@ static irqreturn_t clps711xuart_int_tx(i
 		port->x_char = 0;
 		return IRQ_HANDLED;
 	}
-	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
-		clps711xuart_stop_tx(port);
-		return IRQ_HANDLED;
-	}
+
+	if (uart_circ_empty(xmit) || uart_tx_stopped(port))
+		goto disable_tx_irq;
 
 	count = port->fifosize >> 1;
 	do {
@@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(i
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(port);
 
-	if (uart_circ_empty(xmit))
-		clps711xuart_stop_tx(port);
+	if (uart_circ_empty(xmit)) {
+	disable_tx_irq:
+		disable_irq_nosync(TX_IRQ(port));
+		tx_enabled(port) = 0;
+	}
 
 	return IRQ_HANDLED;
 }



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 06/42] xen/gntdev: do not set VM_PFNMAP
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (4 preceding siblings ...)
  2012-04-24 22:32 ` [ 05/42] ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR Greg KH
@ 2012-04-24 22:32 ` Greg KH
  2012-04-24 22:33 ` [ 07/42] xen/xenbus: Add quirk to deal with misconfigured backends Greg KH
                   ` (35 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:32 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Stefano Stabellini, Konrad Rzeszutek Wilk

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

commit e8e937be971d706061dc56220ff3605ab77622a7 upstream.

Since we are using the m2p_override we do have struct pages
corresponding to the user vma mmap'ed by gntdev.

Removing the VM_PFNMAP flag makes get_user_pages work on that vma.
An example test case would be using a Xen userspace block backend
(QDISK) on a file on NFS using O_DIRECT.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/xen/gntdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -664,7 +664,7 @@ static int gntdev_mmap(struct file *flip
 	vma->vm_flags |= VM_RESERVED|VM_DONTEXPAND;
 
 	if (use_ptemod)
-		vma->vm_flags |= VM_DONTCOPY|VM_PFNMAP;
+		vma->vm_flags |= VM_DONTCOPY;
 
 	vma->vm_private_data = map;
 



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 07/42] xen/xenbus: Add quirk to deal with misconfigured backends.
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (5 preceding siblings ...)
  2012-04-24 22:32 ` [ 06/42] xen/gntdev: do not set VM_PFNMAP Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 08/42] USB: yurex: Remove allocation of coherent buffer for setup-packet buffer Greg KH
                   ` (34 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Stefano Stabellini, Konrad Rzeszutek Wilk

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

commit 3066616ce23aad5719c23a0f21f32676402cb44b upstream.

A rather annoying and common case is when booting a PVonHVM guest
and exposing the PV KBD and PV VFB - as broken toolstacks don't
always initialize the backends correctly.

Normally The HVM guest is using the VGA driver and the emulated
keyboard for this (though upstream version of QEMU implements
PV KBD, but still uses a VGA driver). We provide a very basic
two-stage wait mechanism - where we wait for 30 seconds for all
devices, and then for 270 for all them except the two mentioned.

That allows us to wait for the essential devices, like network
or disk for the full 6 minutes.

To trigger this, put this in your guest config:

vfb = [ 'vnc=1, vnclisten=0.0.0.0 ,vncunused=1']

instead of this:
vnc=1
vnclisten="0.0.0.0"

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
[v3: Split delay in non-essential (30 seconds) and essential
 devices per Ian and Stefano suggestion]
[v4: Added comments per Stefano suggestion]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/xen/xenbus/xenbus_probe_frontend.c |   69 ++++++++++++++++++++++-------
 1 file changed, 53 insertions(+), 16 deletions(-)

--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
@@ -132,7 +132,7 @@ static int read_backend_details(struct x
 	return xenbus_read_otherend_details(xendev, "backend-id", "backend");
 }
 
-static int is_device_connecting(struct device *dev, void *data)
+static int is_device_connecting(struct device *dev, void *data, bool ignore_nonessential)
 {
 	struct xenbus_device *xendev = to_xenbus_device(dev);
 	struct device_driver *drv = data;
@@ -149,16 +149,41 @@ static int is_device_connecting(struct d
 	if (drv && (dev->driver != drv))
 		return 0;
 
+	if (ignore_nonessential) {
+		/* With older QEMU, for PVonHVM guests the guest config files
+		 * could contain: vfb = [ 'vnc=1, vnclisten=0.0.0.0']
+		 * which is nonsensical as there is no PV FB (there can be
+		 * a PVKB) running as HVM guest. */
+
+		if ((strncmp(xendev->nodename, "device/vkbd", 11) == 0))
+			return 0;
+
+		if ((strncmp(xendev->nodename, "device/vfb", 10) == 0))
+			return 0;
+	}
 	xendrv = to_xenbus_driver(dev->driver);
 	return (xendev->state < XenbusStateConnected ||
 		(xendev->state == XenbusStateConnected &&
 		 xendrv->is_ready && !xendrv->is_ready(xendev)));
 }
+static int essential_device_connecting(struct device *dev, void *data)
+{
+	return is_device_connecting(dev, data, true /* ignore PV[KBB+FB] */);
+}
+static int non_essential_device_connecting(struct device *dev, void *data)
+{
+	return is_device_connecting(dev, data, false);
+}
 
-static int exists_connecting_device(struct device_driver *drv)
+static int exists_essential_connecting_device(struct device_driver *drv)
 {
 	return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
-				is_device_connecting);
+				essential_device_connecting);
+}
+static int exists_non_essential_connecting_device(struct device_driver *drv)
+{
+	return bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
+				non_essential_device_connecting);
 }
 
 static int print_device_status(struct device *dev, void *data)
@@ -189,6 +214,23 @@ static int print_device_status(struct de
 /* We only wait for device setup after most initcalls have run. */
 static int ready_to_wait_for_devices;
 
+static bool wait_loop(unsigned long start, unsigned int max_delay,
+		     unsigned int *seconds_waited)
+{
+	if (time_after(jiffies, start + (*seconds_waited+5)*HZ)) {
+		if (!*seconds_waited)
+			printk(KERN_WARNING "XENBUS: Waiting for "
+			       "devices to initialise: ");
+		*seconds_waited += 5;
+		printk("%us...", max_delay - *seconds_waited);
+		if (*seconds_waited == max_delay)
+			return true;
+	}
+
+	schedule_timeout_interruptible(HZ/10);
+
+	return false;
+}
 /*
  * On a 5-minute timeout, wait for all devices currently configured.  We need
  * to do this to guarantee that the filesystems and / or network devices
@@ -212,19 +254,14 @@ static void wait_for_devices(struct xenb
 	if (!ready_to_wait_for_devices || !xen_domain())
 		return;
 
-	while (exists_connecting_device(drv)) {
-		if (time_after(jiffies, start + (seconds_waited+5)*HZ)) {
-			if (!seconds_waited)
-				printk(KERN_WARNING "XENBUS: Waiting for "
-				       "devices to initialise: ");
-			seconds_waited += 5;
-			printk("%us...", 300 - seconds_waited);
-			if (seconds_waited == 300)
-				break;
-		}
-
-		schedule_timeout_interruptible(HZ/10);
-	}
+	while (exists_non_essential_connecting_device(drv))
+		if (wait_loop(start, 30, &seconds_waited))
+			break;
+
+	/* Skips PVKB and PVFB check.*/
+	while (exists_essential_connecting_device(drv))
+		if (wait_loop(start, 270, &seconds_waited))
+			break;
 
 	if (seconds_waited)
 		printk("\n");



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 08/42] USB: yurex: Remove allocation of coherent buffer for setup-packet buffer
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (6 preceding siblings ...)
  2012-04-24 22:33 ` [ 07/42] xen/xenbus: Add quirk to deal with misconfigured backends Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 09/42] USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb Greg KH
                   ` (33 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Tomoki Sekiyama

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>

commit 523fc5c14f6cad283e5a266eba0e343aed6e73d5 upstream.

Removes allocation of coherent buffer for the control-request setup-packet
buffer from the yurex driver. Using coherent buffers for setup-packet is
obsolete and does not work with some USB host implementations.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/misc/yurex.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

--- a/drivers/usb/misc/yurex.c
+++ b/drivers/usb/misc/yurex.c
@@ -99,9 +99,7 @@ static void yurex_delete(struct kref *kr
 	usb_put_dev(dev->udev);
 	if (dev->cntl_urb) {
 		usb_kill_urb(dev->cntl_urb);
-		if (dev->cntl_req)
-			usb_free_coherent(dev->udev, YUREX_BUF_SIZE,
-				dev->cntl_req, dev->cntl_urb->setup_dma);
+		kfree(dev->cntl_req);
 		if (dev->cntl_buffer)
 			usb_free_coherent(dev->udev, YUREX_BUF_SIZE,
 				dev->cntl_buffer, dev->cntl_urb->transfer_dma);
@@ -234,9 +232,7 @@ static int yurex_probe(struct usb_interf
 	}
 
 	/* allocate buffer for control req */
-	dev->cntl_req = usb_alloc_coherent(dev->udev, YUREX_BUF_SIZE,
-					   GFP_KERNEL,
-					   &dev->cntl_urb->setup_dma);
+	dev->cntl_req = kmalloc(YUREX_BUF_SIZE, GFP_KERNEL);
 	if (!dev->cntl_req) {
 		err("Could not allocate cntl_req");
 		goto error;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 09/42] USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (7 preceding siblings ...)
  2012-04-24 22:33 ` [ 08/42] USB: yurex: Remove allocation of coherent buffer for setup-packet buffer Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 10/42] uwb: fix use of del_timer_sync() in interrupt Greg KH
                   ` (32 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Tomoki Sekiyama

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>

commit 532f17b5d59bf0deb6f1ff9bc1fb27d5b5011c09 upstream.

Current probing code is setting URB_NO_TRANSFER_DMA_MAP flag into a wrong urb
structure, and this causes BUG_ON with some USB host implementations.
This patch fixes the issue.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/misc/yurex.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/misc/yurex.c
+++ b/drivers/usb/misc/yurex.c
@@ -282,7 +282,7 @@ static int yurex_probe(struct usb_interf
 			 usb_rcvintpipe(dev->udev, dev->int_in_endpointAddr),
 			 dev->int_buffer, YUREX_BUF_SIZE, yurex_interrupt,
 			 dev, 1);
-	dev->cntl_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+	dev->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
 	if (usb_submit_urb(dev->urb, GFP_KERNEL)) {
 		retval = -EIO;
 		err("Could not submitting URB");



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 10/42] uwb: fix use of del_timer_sync() in interrupt
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (8 preceding siblings ...)
  2012-04-24 22:33 ` [ 09/42] USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 11/42] uwb: fix error handling Greg KH
                   ` (31 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Oliver Neukum

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Oliver Neukum <oliver@neukum.org>

commit 9426cd05682745d1024dbabdec5631309bd2f480 upstream.

del_timer_sync() cannot be used in interrupt.
Replace it with del_timer() and a flag

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/uwb/neh.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

--- a/drivers/uwb/neh.c
+++ b/drivers/uwb/neh.c
@@ -106,6 +106,7 @@ struct uwb_rc_neh {
 	u8 evt_type;
 	__le16 evt;
 	u8 context;
+	u8 completed;
 	uwb_rc_cmd_cb_f cb;
 	void *arg;
 
@@ -408,6 +409,7 @@ static void uwb_rc_neh_grok_event(struct
 	struct device *dev = &rc->uwb_dev.dev;
 	struct uwb_rc_neh *neh;
 	struct uwb_rceb *notif;
+	unsigned long flags;
 
 	if (rceb->bEventContext == 0) {
 		notif = kmalloc(size, GFP_ATOMIC);
@@ -421,7 +423,11 @@ static void uwb_rc_neh_grok_event(struct
 	} else {
 		neh = uwb_rc_neh_lookup(rc, rceb);
 		if (neh) {
-			del_timer_sync(&neh->timer);
+			spin_lock_irqsave(&rc->neh_lock, flags);
+			/* to guard against a timeout */
+			neh->completed = 1;
+			del_timer(&neh->timer);
+			spin_unlock_irqrestore(&rc->neh_lock, flags);
 			uwb_rc_neh_cb(neh, rceb, size);
 		} else
 			dev_warn(dev, "event 0x%02x/%04x/%02x (%zu bytes): nobody cared\n",
@@ -567,6 +573,10 @@ static void uwb_rc_neh_timer(unsigned lo
 	unsigned long flags;
 
 	spin_lock_irqsave(&rc->neh_lock, flags);
+	if (neh->completed) {
+		spin_unlock_irqrestore(&rc->neh_lock, flags);
+		return;
+	}
 	if (neh->context)
 		__uwb_rc_neh_rm(rc, neh);
 	else



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 11/42] uwb: fix error handling
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (9 preceding siblings ...)
  2012-04-24 22:33 ` [ 10/42] uwb: fix use of del_timer_sync() in interrupt Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 12/42] davinci_mdio: Fix MDIO timeout check Greg KH
                   ` (30 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Oliver Neukum

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Oliver Neukum <oliver@neukum.org>

commit 5bd7b419ef2eb4989b207753e088c3437159618a upstream.

Fatal errors such as a device disconnect must not trigger
error handling. The error returns must be checked.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/uwb/hwa-rc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/uwb/hwa-rc.c
+++ b/drivers/uwb/hwa-rc.c
@@ -645,7 +645,8 @@ void hwarc_neep_cb(struct urb *urb)
 		dev_err(dev, "NEEP: URB error %d\n", urb->status);
 	}
 	result = usb_submit_urb(urb, GFP_ATOMIC);
-	if (result < 0) {
+	if (result < 0 && result != -ENODEV && result != -EPERM) {
+		/* ignoring unrecoverable errors */
 		dev_err(dev, "NEEP: Can't resubmit URB (%d) resetting device\n",
 			result);
 		goto error;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 12/42] davinci_mdio: Fix MDIO timeout check
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (10 preceding siblings ...)
  2012-04-24 22:33 ` [ 11/42] uwb: fix error handling Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 13/42] media: rc-core: set mode for winbond-cir Greg KH
                   ` (29 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Christian Riesch, Cyril Chemparathy,
	David S. Miller

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Christian Riesch <christian.riesch@omicron.at>

commit 5b76d0600b2b08eef77f8e9226938b7b6bde3099 upstream.

Under heavy load (flood ping) it is possible for the MDIO timeout to
expire before the loop checks the GO bit again. This patch adds an
additional check whether the operation was done before actually
returning -ETIMEDOUT.

To reproduce this bug, flood ping the device, e.g., ping -f -l 1000
After some time, a "timed out waiting for user access" warning
may appear. And even worse, link may go down since the PHY reported a
timeout.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/davinci_mdio.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/net/davinci_mdio.c
+++ b/drivers/net/davinci_mdio.c
@@ -181,6 +181,11 @@ static inline int wait_for_user_access(s
 		__davinci_mdio_reset(data);
 		return -EAGAIN;
 	}
+
+	reg = __raw_readl(&regs->user[0].access);
+	if ((reg & USERACCESS_GO) == 0)
+		return 0;
+
 	dev_err(data->dev, "timed out waiting for user access\n");
 	return -ETIMEDOUT;
 }



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 13/42] media: rc-core: set mode for winbond-cir
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (11 preceding siblings ...)
  2012-04-24 22:33 ` [ 12/42] davinci_mdio: Fix MDIO timeout check Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 14/42] cfg80211: fix interface combinations check Greg KH
                   ` (28 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, David Härdeman, Mauro Carvalho Chehab

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: David Härdeman <david@hardeman.nu>

commit d9b786955f80fb306471fdb9ea24c6d03af6ca36 upstream.

Setting the correct mode is required by rc-core or scancodes won't be
generated (which isn't very user-friendly).

This one-line fix should be suitable for 3.4-rc2.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/rc/winbond-cir.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -1058,6 +1058,7 @@ wbcir_probe(struct pnp_dev *device, cons
 		goto exit_unregister_led;
 	}
 
+	data->dev->driver_type = RC_DRIVER_IR_RAW;
 	data->dev->driver_name = WBCIR_NAME;
 	data->dev->input_name = WBCIR_NAME;
 	data->dev->input_phys = "wbcir/cir0";



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 14/42] cfg80211: fix interface combinations check.
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (12 preceding siblings ...)
  2012-04-24 22:33 ` [ 13/42] media: rc-core: set mode for winbond-cir Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 15/42] mm: fix s390 BUG by __set_page_dirty_no_writeback on swap Greg KH
                   ` (27 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Lukasz Kucharczyk, John W. Linville

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Lukasz Kucharczyk <lukasz.kucharczyk@tieto.com>

commit e55a4046dab28c440c96890bdddcf02dc8981f2d upstream.

Signed-off-by: Lukasz Kucharczyk <lukasz.kucharczyk@tieto.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/wireless/util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -990,7 +990,7 @@ int cfg80211_can_change_interface(struct
 			if (rdev->wiphy.software_iftypes & BIT(iftype))
 				continue;
 			for (j = 0; j < c->n_limits; j++) {
-				if (!(limits[j].types & iftype))
+				if (!(limits[j].types & BIT(iftype)))
 					continue;
 				if (limits[j].max < num[iftype])
 					goto cont;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 15/42] mm: fix s390 BUG by __set_page_dirty_no_writeback on swap
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (13 preceding siblings ...)
  2012-04-24 22:33 ` [ 14/42] cfg80211: fix interface combinations check Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 16/42] jbd2: use GFP_NOFS for blkdev_issue_flush Greg KH
                   ` (26 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Mel Gorman, Hugh Dickins,
	Martin Schwidefsky, Heiko Carstens, Rik van Riel, Ken Chen

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hugh Dickins <hughd@google.com>

commit aca50bd3b4c4bb5528a1878158ba7abce41de534 upstream.

Mel reports a BUG_ON(slot == NULL) in radix_tree_tag_set() on s390
3.0.13: called from __set_page_dirty_nobuffers() when page_remove_rmap()
tries to transfer dirty flag from s390 storage key to struct page and
radix_tree.

That would be because of reclaim's shrink_page_list() calling
add_to_swap() on this page at the same time: first PageSwapCache is set
(causing page_mapping(page) to appear as &swapper_space), then
page->private set, then tree_lock taken, then page inserted into
radix_tree - so there's an interval before taking the lock when the
radix_tree slot is empty.

We could fix this by moving __add_to_swap_cache()'s spin_lock_irq up
before the SetPageSwapCache.  But a better fix is simply to do what's
five years overdue: Ken Chen introduced __set_page_dirty_no_writeback()
(if !PageDirty TestSetPageDirty) for tmpfs to skip all the radix_tree
overhead, and swap is just the same - it ignores the radix_tree tag, and
does not participate in dirty page accounting, so should be using
__set_page_dirty_no_writeback() too.

s390 testing now confirms that this does indeed fix the problem.

Reported-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Ken Chen <kenchen@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/swap_state.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -28,7 +28,7 @@
  */
 static const struct address_space_operations swap_aops = {
 	.writepage	= swap_writepage,
-	.set_page_dirty	= __set_page_dirty_nobuffers,
+	.set_page_dirty	= __set_page_dirty_no_writeback,
 	.migratepage	= migrate_page,
 };
 



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 16/42] jbd2: use GFP_NOFS for blkdev_issue_flush
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (14 preceding siblings ...)
  2012-04-24 22:33 ` [ 15/42] mm: fix s390 BUG by __set_page_dirty_no_writeback on swap Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 17/42] USB: serial: cp210x: Fixed usb_control_msg timeout values Greg KH
                   ` (25 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Shaohua Li, Theodore Tso, Jan Kara

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shaohua Li <shli@kernel.org>

commit 99aa78466777083255b876293e9e83dec7cd809a upstream.

flush request is issued in transaction commit code path, so looks using
GFP_KERNEL to allocate memory for flush request bio falls into the classic
deadlock issue.  I saw btrfs and dm get it right, but ext4, xfs and md are
using GFP.

Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/jbd2/commit.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -683,7 +683,7 @@ start_journal_io:
 	if (commit_transaction->t_need_data_flush &&
 	    (journal->j_fs_dev != journal->j_dev) &&
 	    (journal->j_flags & JBD2_BARRIER))
-		blkdev_issue_flush(journal->j_fs_dev, GFP_KERNEL, NULL);
+		blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS, NULL);
 
 	/* Done it all: now write the commit record asynchronously. */
 	if (JBD2_HAS_INCOMPAT_FEATURE(journal,
@@ -819,7 +819,7 @@ wait_for_iobuf:
 	if (JBD2_HAS_INCOMPAT_FEATURE(journal,
 				      JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) &&
 	    journal->j_flags & JBD2_BARRIER) {
-		blkdev_issue_flush(journal->j_dev, GFP_KERNEL, NULL);
+		blkdev_issue_flush(journal->j_dev, GFP_NOFS, NULL);
 	}
 
 	if (err)



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 17/42] USB: serial: cp210x: Fixed usb_control_msg timeout values
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (15 preceding siblings ...)
  2012-04-24 22:33 ` [ 16/42] jbd2: use GFP_NOFS for blkdev_issue_flush Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 18/42] pch_uart: Fix dma channel unallocated issue Greg KH
                   ` (24 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Yuri Matylitski, Kirill A. Shutemov

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Yuri Matylitski <ym@tekinsoft.com>

commit 2d5733fcd33dd451022d197cb6b476e970519ca7 upstream.

Fixed too small hardcoded timeout values for usb_control_msg
in driver for SiliconLabs cp210x-based usb-to-serial adapters.
Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT.

Signed-off-by: Yuri Matylitski <ym@tekinsoft.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/cp210x.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -285,7 +285,8 @@ static int cp210x_get_config(struct usb_
 	/* Issue the request, attempting to read 'size' bytes */
 	result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
 				request, REQTYPE_DEVICE_TO_HOST, 0x0000,
-				port_priv->bInterfaceNumber, buf, size, 300);
+				port_priv->bInterfaceNumber, buf, size,
+				USB_CTRL_GET_TIMEOUT);
 
 	/* Convert data into an array of integers */
 	for (i = 0; i < length; i++)
@@ -335,12 +336,14 @@ static int cp210x_set_config(struct usb_
 		result = usb_control_msg(serial->dev,
 				usb_sndctrlpipe(serial->dev, 0),
 				request, REQTYPE_HOST_TO_DEVICE, 0x0000,
-				port_priv->bInterfaceNumber, buf, size, 300);
+				port_priv->bInterfaceNumber, buf, size,
+				USB_CTRL_SET_TIMEOUT);
 	} else {
 		result = usb_control_msg(serial->dev,
 				usb_sndctrlpipe(serial->dev, 0),
 				request, REQTYPE_HOST_TO_DEVICE, data[0],
-				port_priv->bInterfaceNumber, NULL, 0, 300);
+				port_priv->bInterfaceNumber, NULL, 0,
+				USB_CTRL_SET_TIMEOUT);
 	}
 
 	kfree(buf);



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 00/42] 3.0.30-stable review
@ 2012-04-24 22:33 Greg KH
  2012-04-24 22:32 ` [ 01/42] Perf: fix build breakage Greg KH
                   ` (41 more replies)
  0 siblings, 42 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan

This is the start of the stable review cycle for the 3.0.30 release.
There are 42 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Thu Apr 26 22:32:52 UTC 2012.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.0.30-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

-------------
 Makefile                                   |    4 +-
 crypto/sha512_generic.c                    |    2 +-
 drivers/bluetooth/ath3k.c                  |    2 +
 drivers/bluetooth/btusb.c                  |    1 +
 drivers/hwmon/fam15h_power.c               |   39 ++++++++++++++++
 drivers/media/rc/winbond-cir.c             |    1 +
 drivers/net/davinci_mdio.c                 |    5 ++
 drivers/net/wireless/rt2x00/rt2800usb.c    |   35 +++++++-------
 drivers/pci/quirks.c                       |   34 ++++++++++++++
 drivers/spi/spi.c                          |    2 +-
 drivers/tty/amiserial.c                    |    4 +-
 drivers/tty/serial/clps711x.c              |   14 +++---
 drivers/tty/serial/pch_uart.c              |    4 +-
 drivers/usb/core/hub.c                     |    3 --
 drivers/usb/core/message.c                 |    6 +--
 drivers/usb/gadget/f_fs.c                  |    2 +-
 drivers/usb/host/ehci-hcd.c                |    7 ++-
 drivers/usb/misc/yurex.c                   |   10 ++--
 drivers/usb/musb/omap2430.c                |    9 ++--
 drivers/usb/serial/cp210x.c                |    9 ++--
 drivers/usb/serial/sierra.c                |    6 ++-
 drivers/uwb/hwa-rc.c                       |    3 +-
 drivers/uwb/neh.c                          |   12 ++++-
 drivers/xen/gntdev.c                       |    2 +-
 drivers/xen/xenbus/xenbus_probe_frontend.c |   69 +++++++++++++++++++++-------
 fs/btrfs/ctree.h                           |    2 +-
 fs/eventpoll.c                             |    4 ++
 fs/ext4/extents.c                          |    2 +-
 fs/jbd2/commit.c                           |    4 +-
 fs/lockd/clnt4xdr.c                        |    2 +-
 fs/lockd/clntxdr.c                         |    2 +-
 fs/nfsd/nfs3xdr.c                          |   22 ++++-----
 fs/ocfs2/alloc.c                           |    2 +-
 fs/ocfs2/refcounttree.c                    |   12 ++---
 fs/ocfs2/suballoc.c                        |    4 +-
 mm/swap_state.c                            |    2 +-
 net/wireless/util.c                        |    2 +-
 sound/pci/hda/patch_conexant.c             |    9 +++-
 tools/perf/util/hist.c                     |    4 +-
 39 files changed, 252 insertions(+), 106 deletions(-)


^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 18/42] pch_uart: Fix dma channel unallocated issue
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (16 preceding siblings ...)
  2012-04-24 22:33 ` [ 17/42] USB: serial: cp210x: Fixed usb_control_msg timeout values Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 19/42] drivers/tty/amiserial.c: add missing tty_unlock Greg KH
                   ` (23 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Tomoya MORINAGA

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Tomoya MORINAGA <tomoya.rohm@gmail.com>

commit af6d17cdc8c89aeb3101f0d27cd32fc0592b40b2 upstream.

This driver anticipates pch_uart_verify_port() is not called
during installation.
However, actually pch_uart_verify_port() is called during
installation.
As a result, memory access violation occurs like below.

0. initial value: use_dma=0
1. starup()
    - dma channel is not allocated because use_dma=0
2. pch_uart_verify_port()
    - Set use_dma=1
3. UART processing acts DMA mode because use_dma=1
     - memory access violation occurs!

This patch fixes the issue.

Solution:
Whenever pch_uart_verify_port() is called and then
dma channel is not allocated, the channel should be allocated.

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/pch_uart.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -1354,9 +1354,11 @@ static int pch_uart_verify_port(struct u
 			__func__);
 		return -EOPNOTSUPP;
 #endif
-		priv->use_dma = 1;
 		priv->use_dma_flag = 1;
 		dev_info(priv->port.dev, "PCH UART : Use DMA Mode\n");
+		if (!priv->use_dma)
+			pch_request_dma(port);
+		priv->use_dma = 1;
 	}
 
 	return 0;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 19/42] drivers/tty/amiserial.c: add missing tty_unlock
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (17 preceding siblings ...)
  2012-04-24 22:33 ` [ 18/42] pch_uart: Fix dma channel unallocated issue Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 20/42] USB: sierra: avoid QMI/wwan interface on MC77xx Greg KH
                   ` (22 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Julia Lawall, Jiri Slaby

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Julia Lawall <Julia.Lawall@lip6.fr>

commit d3a7b83f865b46bb7b5e1ed18a129ce1af349db4 upstream.

tty_unlock is used on all other exits from the function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/amiserial.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1113,8 +1113,10 @@ static int set_serial_info(struct async_
 		    (new_serial.close_delay != state->close_delay) ||
 		    (new_serial.xmit_fifo_size != state->xmit_fifo_size) ||
 		    ((new_serial.flags & ~ASYNC_USR_MASK) !=
-		     (state->flags & ~ASYNC_USR_MASK)))
+		     (state->flags & ~ASYNC_USR_MASK))) {
+			tty_unlock();
 			return -EPERM;
+		}
 		state->flags = ((state->flags & ~ASYNC_USR_MASK) |
 			       (new_serial.flags & ASYNC_USR_MASK));
 		info->flags = ((info->flags & ~ASYNC_USR_MASK) |



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 20/42] USB: sierra: avoid QMI/wwan interface on MC77xx
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (18 preceding siblings ...)
  2012-04-24 22:33 ` [ 19/42] drivers/tty/amiserial.c: add missing tty_unlock Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 21/42] EHCI: always clear the STS_FLR status bit Greg KH
                   ` (21 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Bjørn Mork

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2317 bytes --]

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bjørn Mork <bjorn@mork.no>

commit 749541d19e70905e3971f2a08335a206a98e4d0c upstream.

These devices have a number of non serial interfaces as well.  Use
the existing "Direct IP" blacklist to prevent binding to interfaces
which are handled by other drivers.

We also extend the "Direct IP" blacklist with with interfaces only
seen in "QMI" mode, assuming that these devices use the same
interface numbers for serial interfaces both in "Direct IP" and in
"QMI" mode.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/sierra.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -221,7 +221,7 @@ static const struct sierra_iface_info ty
 };
 
 /* 'blacklist' of interfaces not served by this driver */
-static const u8 direct_ip_non_serial_ifaces[] = { 7, 8, 9, 10, 11 };
+static const u8 direct_ip_non_serial_ifaces[] = { 7, 8, 9, 10, 11, 19, 20 };
 static const struct sierra_iface_info direct_ip_interface_blacklist = {
 	.infolen = ARRAY_SIZE(direct_ip_non_serial_ifaces),
 	.ifaceinfo = direct_ip_non_serial_ifaces,
@@ -289,7 +289,6 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x1199, 0x6856) },	/* Sierra Wireless AirCard 881 U */
 	{ USB_DEVICE(0x1199, 0x6859) },	/* Sierra Wireless AirCard 885 E */
 	{ USB_DEVICE(0x1199, 0x685A) },	/* Sierra Wireless AirCard 885 E */
-	{ USB_DEVICE(0x1199, 0x68A2) }, /* Sierra Wireless MC7710 */
 	/* Sierra Wireless C885 */
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6880, 0xFF, 0xFF, 0xFF)},
 	/* Sierra Wireless C888, Air Card 501, USB 303, USB 304 */
@@ -299,6 +298,9 @@ static const struct usb_device_id id_tab
 	/* Sierra Wireless HSPA Non-Composite Device */
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x6892, 0xFF, 0xFF, 0xFF)},
 	{ USB_DEVICE(0x1199, 0x6893) },	/* Sierra Wireless Device */
+	{ USB_DEVICE(0x1199, 0x68A2),   /* Sierra Wireless MC77xx in QMI mode */
+	  .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
+	},
 	{ USB_DEVICE(0x1199, 0x68A3), 	/* Sierra Wireless Direct IP modems */
 	  .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist
 	},



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 21/42] EHCI: always clear the STS_FLR status bit
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (19 preceding siblings ...)
  2012-04-24 22:33 ` [ 20/42] USB: sierra: avoid QMI/wwan interface on MC77xx Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 22/42] USB: fix deadlock in bConfigurationValue attribute method Greg KH
                   ` (20 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Alan Stern

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alan Stern <stern@rowland.harvard.edu>

commit 2fbe2bf1fd37f9d99950bd8d8093623cf22cf08b upstream.

This patch (as1544) fixes a problem affecting some EHCI controllers.
They can generate interrupts whenever the STS_FLR status bit is turned
on, even though that bit is masked out in the Interrupt Enable
register.

Since the driver doesn't use STS_FLR anyway, the patch changes the
interrupt routine to clear that bit whenever it is set, rather than
leaving it alone.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/host/ehci-hcd.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -808,8 +808,13 @@ static irqreturn_t ehci_irq (struct usb_
 		goto dead;
 	}
 
+	/*
+	 * We don't use STS_FLR, but some controllers don't like it to
+	 * remain on, so mask it out along with the other status bits.
+	 */
+	masked_status = status & (INTR_MASK | STS_FLR);
+
 	/* Shared IRQ? */
-	masked_status = status & INTR_MASK;
 	if (!masked_status || unlikely(hcd->state == HC_STATE_HALT)) {
 		spin_unlock(&ehci->lock);
 		return IRQ_NONE;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 22/42] USB: fix deadlock in bConfigurationValue attribute method
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (20 preceding siblings ...)
  2012-04-24 22:33 ` [ 21/42] EHCI: always clear the STS_FLR status bit Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 23/42] usb: gadget: eliminate NULL pointer dereference (bugfix) Greg KH
                   ` (19 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Alan Stern, Sarah Sharp

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alan Stern <stern@rowland.harvard.edu>

commit 8963c487a80b4688c9e68dcc504a90074aacc145 upstream.

This patch (as154) fixes a self-deadlock that occurs when userspace
writes to the bConfigurationValue sysfs attribute for a hub with
children.  The task tries to lock the bandwidth_mutex at a time when
it already owns the lock:

	The attribute's method calls usb_set_configuration(),
	which calls usb_disable_device() with the bandwidth_mutex
	held.

	usb_disable_device() unregisters the existing interfaces,
	which causes the hub driver to be unbound.

	The hub_disconnect() routine calls hub_quiesce(), which
	calls usb_disconnect() for each of the hub's children.

	usb_disconnect() attempts to acquire the bandwidth_mutex
	around a call to usb_disable_device().

The solution is to make usb_disable_device() acquire the mutex for
itself instead of requiring the caller to hold it.  Then the mutex can
cover only the bandwidth deallocation operation and not the region
where the interfaces are unregistered.

This has the potential to change system behavior slightly when a
config change races with another config or altsetting change.  Some of
the bandwidth released from the old config might get claimed by the
other config or altsetting, make it impossible to restore the old
config in case of a failure.  But since we don't try to recover from
config-change failures anyway, this doesn't matter.

[This should be marked for stable kernels that contain the commit
fccf4e86200b8f5edd9a65da26f150e32ba79808 "USB: Free bandwidth when
usb_disable_device is called."
That commit was marked for stable kernels as old as 2.6.32.]

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/hub.c     |    3 ---
 drivers/usb/core/message.c |    6 +++---
 2 files changed, 3 insertions(+), 6 deletions(-)

--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1644,7 +1644,6 @@ void usb_disconnect(struct usb_device **
 {
 	struct usb_device	*udev = *pdev;
 	int			i;
-	struct usb_hcd		*hcd = bus_to_hcd(udev->bus);
 
 	if (!udev) {
 		pr_debug ("%s nodev\n", __func__);
@@ -1672,9 +1671,7 @@ void usb_disconnect(struct usb_device **
 	 * so that the hardware is now fully quiesced.
 	 */
 	dev_dbg (&udev->dev, "unregistering device\n");
-	mutex_lock(hcd->bandwidth_mutex);
 	usb_disable_device(udev, 0);
-	mutex_unlock(hcd->bandwidth_mutex);
 	usb_hcd_synchronize_unlinks(udev);
 
 	usb_remove_ep_devs(&udev->ep0);
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1136,8 +1136,6 @@ void usb_disable_interface(struct usb_de
  * Deallocates hcd/hardware state for the endpoints (nuking all or most
  * pending urbs) and usbcore state for the interfaces, so that usbcore
  * must usb_set_configuration() before any interfaces could be used.
- *
- * Must be called with hcd->bandwidth_mutex held.
  */
 void usb_disable_device(struct usb_device *dev, int skip_ep0)
 {
@@ -1190,7 +1188,9 @@ void usb_disable_device(struct usb_devic
 			usb_disable_endpoint(dev, i + USB_DIR_IN, false);
 		}
 		/* Remove endpoints from the host controller internal state */
+		mutex_lock(hcd->bandwidth_mutex);
 		usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL);
+		mutex_unlock(hcd->bandwidth_mutex);
 		/* Second pass: remove endpoint pointers */
 	}
 	for (i = skip_ep0; i < 16; ++i) {
@@ -1750,7 +1750,6 @@ free_interfaces:
 	/* if it's already configured, clear out old state first.
 	 * getting rid of old interfaces means unbinding their drivers.
 	 */
-	mutex_lock(hcd->bandwidth_mutex);
 	if (dev->state != USB_STATE_ADDRESS)
 		usb_disable_device(dev, 1);	/* Skip ep0 */
 
@@ -1763,6 +1762,7 @@ free_interfaces:
 	 * host controller will not allow submissions to dropped endpoints.  If
 	 * this call fails, the device state is unchanged.
 	 */
+	mutex_lock(hcd->bandwidth_mutex);
 	ret = usb_hcd_alloc_bandwidth(dev, cp, NULL, NULL);
 	if (ret < 0) {
 		mutex_unlock(hcd->bandwidth_mutex);



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 23/42] usb: gadget: eliminate NULL pointer dereference (bugfix)
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (21 preceding siblings ...)
  2012-04-24 22:33 ` [ 22/42] USB: fix deadlock in bConfigurationValue attribute method Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 24/42] usb: musb: omap: fix crash when musb glue (omap) gets initialized Greg KH
                   ` (18 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Andrzej Pietrasiewicz, Kyungmin Park, Felipe Balbi

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>

commit 92b0abf80c5c5f0e0d71d1309688a330fd74731b upstream.

usb: gadget: eliminate NULL pointer dereference (bugfix)

This patch fixes a bug which causes NULL pointer dereference in
ffs_ep0_ioctl. The bug happens when the FunctionFS is not bound (either
has not been bound yet or has been bound and then unbound) and can be
reproduced with running the following commands:

$ insmod g_ffs.ko
$ mount -t functionfs func /dev/usbgadget
$ ./null

where null.c is:

#include <fcntl.h>
#include <linux/usb/functionfs.h>

int main(void)
{
	int fd = open("/dev/usbgadget/ep0", O_RDWR);
	ioctl(fd, FUNCTIONFS_CLEAR_HALT);

	return 0;
}

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/gadget/f_fs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -720,7 +720,7 @@ static long ffs_ep0_ioctl(struct file *f
 	if (code == FUNCTIONFS_INTERFACE_REVMAP) {
 		struct ffs_function *func = ffs->func;
 		ret = func ? ffs_func_revmap_intf(func, value) : -ENODEV;
-	} else if (gadget->ops->ioctl) {
+	} else if (gadget && gadget->ops->ioctl) {
 		ret = gadget->ops->ioctl(gadget, code, value);
 	} else {
 		ret = -ENOTTY;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 24/42] usb: musb: omap: fix crash when musb glue (omap) gets initialized
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (22 preceding siblings ...)
  2012-04-24 22:33 ` [ 23/42] usb: gadget: eliminate NULL pointer dereference (bugfix) Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 25/42] usb: musb: omap: fix the error check for pm_runtime_get_sync Greg KH
                   ` (17 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Kishon Vijay Abraham I, Felipe Balbi

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kishon Vijay Abraham I <kishon@ti.com>

commit 3006dc8c627d738693e910c159630e4368c9e86c upstream.

pm_runtime_enable is being called after omap2430_musb_init. Hence
pm_runtime_get_sync in omap2430_musb_init does not have any effect (does
not enable clocks) resulting in a crash during register access. It is
fixed here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/musb/omap2430.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -464,14 +464,14 @@ static int __init omap2430_probe(struct
 		goto err2;
 	}
 
+	pm_runtime_enable(&pdev->dev);
+
 	ret = platform_device_add(musb);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to register musb device\n");
 		goto err2;
 	}
 
-	pm_runtime_enable(&pdev->dev);
-
 	return 0;
 
 err2:



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 25/42] usb: musb: omap: fix the error check for pm_runtime_get_sync
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (23 preceding siblings ...)
  2012-04-24 22:33 ` [ 24/42] usb: musb: omap: fix crash when musb glue (omap) gets initialized Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 26/42] PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs Greg KH
                   ` (16 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Kishon Vijay Abraham I, Shubhrajyoti D,
	Felipe Balbi

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Shubhrajyoti D <shubhrajyoti@ti.com>

commit ad579699c4f0274bf522a9252ff9b20c72197e48 upstream.

pm_runtime_get_sync returns a signed integer. In case of errors
it returns a negative value. This patch fixes the error check
by making it signed instead of unsigned thus preventing register
access if get_sync_fails. Also passes the error cause to the
debug message.

Cc:  Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/musb/omap2430.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -295,7 +295,8 @@ static int musb_otg_notifications(struct
 
 static int omap2430_musb_init(struct musb *musb)
 {
-	u32 l, status = 0;
+	u32 l;
+	int status = 0;
 	struct device *dev = musb->controller;
 	struct musb_hdrc_platform_data *plat = dev->platform_data;
 	struct omap_musb_board_data *data = plat->board_data;
@@ -312,7 +313,7 @@ static int omap2430_musb_init(struct mus
 
 	status = pm_runtime_get_sync(dev);
 	if (status < 0) {
-		dev_err(dev, "pm_runtime_get_sync FAILED");
+		dev_err(dev, "pm_runtime_get_sync FAILED %d\n", status);
 		goto err1;
 	}
 



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 26/42] PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (24 preceding siblings ...)
  2012-04-24 22:33 ` [ 25/42] usb: musb: omap: fix the error check for pm_runtime_get_sync Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 27/42] ext4: fix endianness breakage in ext4_split_extent_at() Greg KH
                   ` (15 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Thomas Jarosch, Charlie Suffin, Jesse Barnes

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Jarosch <thomas.jarosch@intra2net.com>

commit f67fd55fa96f7d7295b43ffbc4a97d8f55e473aa upstream.

Some BIOS implementations leave the Intel GPU interrupts enabled,
even though no one is handling them (f.e. i915 driver is never loaded).
Additionally the interrupt destination is not set up properly
and the interrupt ends up -somewhere-.

These spurious interrupts are "sticky" and the kernel disables
the (shared) interrupt line after 100.000+ generated interrupts.

Fix it by disabling the still enabled interrupts.
This resolves crashes often seen on monitor unplug.

Tested on the following boards:
- Intel DH61CR: Affected
- Intel DH67BL: Affected
- Intel S1200KP server board: Affected
- Asus P8H61-M LE: Affected, but system does not crash.
  Probably the IRQ ends up somewhere unnoticed.

According to reports on the net, the Intel DH61WW board is also affected.

Many thanks to Jesse Barnes from Intel for helping
with the register configuration and to Intel in general
for providing public hardware documentation.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Tested-by: Charlie Suffin <charlie.suffin@stratus.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pci/quirks.c |   34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2822,6 +2822,40 @@ static void __devinit fixup_ti816x_class
 }
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_TI, 0xb800, fixup_ti816x_class);
 
+/*
+ * Some BIOS implementations leave the Intel GPU interrupts enabled,
+ * even though no one is handling them (f.e. i915 driver is never loaded).
+ * Additionally the interrupt destination is not set up properly
+ * and the interrupt ends up -somewhere-.
+ *
+ * These spurious interrupts are "sticky" and the kernel disables
+ * the (shared) interrupt line after 100.000+ generated interrupts.
+ *
+ * Fix it by disabling the still enabled interrupts.
+ * This resolves crashes often seen on monitor unplug.
+ */
+#define I915_DEIER_REG 0x4400c
+static void __devinit disable_igfx_irq(struct pci_dev *dev)
+{
+	void __iomem *regs = pci_iomap(dev, 0, 0);
+	if (regs == NULL) {
+		dev_warn(&dev->dev, "igfx quirk: Can't iomap PCI device\n");
+		return;
+	}
+
+	/* Check if any interrupt line is still enabled */
+	if (readl(regs + I915_DEIER_REG) != 0) {
+		dev_warn(&dev->dev, "BIOS left Intel GPU interrupts enabled; "
+			"disabling\n");
+
+		writel(0, regs + I915_DEIER_REG);
+	}
+
+	pci_iounmap(dev, regs);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
+
 static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
 			  struct pci_fixup *end)
 {



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 27/42] ext4: fix endianness breakage in ext4_split_extent_at()
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (25 preceding siblings ...)
  2012-04-24 22:33 ` [ 26/42] PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 28/42] Bluetooth: Add support for Atheros [04ca:3005] Greg KH
                   ` (14 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Al Viro, Ted Tso

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit af1584f570b19b0285e4402a0b54731495d31784 upstream.

->ee_len is __le16, so assigning cpu_to_le32() to it is going to do
Bad Things(tm) on big-endian hosts...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ted Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ext4/extents.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2846,7 +2846,7 @@ static int ext4_split_extent_at(handle_t
 		if (err)
 			goto fix_extent_len;
 		/* update the extent length and mark as initialized */
-		ex->ee_len = cpu_to_le32(ee_len);
+		ex->ee_len = cpu_to_le16(ee_len);
 		ext4_ext_try_to_merge(inode, path, ex);
 		err = ext4_ext_dirty(handle, inode, path + depth);
 		goto out;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 28/42] Bluetooth: Add support for Atheros [04ca:3005]
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (26 preceding siblings ...)
  2012-04-24 22:33 ` [ 27/42] ext4: fix endianness breakage in ext4_split_extent_at() Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 29/42] Dont limit non-nested epoll paths Greg KH
                   ` (13 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, AceLan Kao, Gustavo Padovan

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: AceLan Kao <acelan.kao@canonical.com>

commit 55ed7d4d1469eafbe3ad7e8fcd44f5af27845a81 upstream.

Add another vendor specific ID for Atheros AR3012 device.
This chip is wrapped by Lite-On Technology Corp.

output of usb-devices:
T:  Bus=04 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=04ca ProdID=3005 Rev=00.02
S:  Manufacturer=Atheros Communications
S:  Product=Bluetooth USB Host Controller
S:  SerialNumber=Alaska Day 2006
C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/bluetooth/ath3k.c |    2 ++
 drivers/bluetooth/btusb.c |    1 +
 2 files changed, 3 insertions(+)

--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -73,6 +73,7 @@ static struct usb_device_id ath3k_table[
 	{ USB_DEVICE(0x0CF3, 0x3004) },
 	{ USB_DEVICE(0x0CF3, 0x311D) },
 	{ USB_DEVICE(0x13d3, 0x3375) },
+	{ USB_DEVICE(0x04CA, 0x3005) },
 
 	/* Atheros AR5BBU12 with sflash firmware */
 	{ USB_DEVICE(0x0489, 0xE02C) },
@@ -91,6 +92,7 @@ static struct usb_device_id ath3k_blist_
 	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0x311D), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
+	{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
 
 	{ }	/* Terminating entry */
 };
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -125,6 +125,7 @@ static struct usb_device_id blacklist_ta
 	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0x311d), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3375), .driver_info = BTUSB_ATH3012 },
+	{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
 
 	/* Atheros AR5BBU12 with sflash firmware */
 	{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 29/42] Dont limit non-nested epoll paths
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (27 preceding siblings ...)
  2012-04-24 22:33 ` [ 28/42] Bluetooth: Add support for Atheros [04ca:3005] Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 30/42] spi: Fix device unregistration when unregistering the bus master Greg KH
                   ` (12 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Jason Baron

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jason Baron <jbaron@redhat.com>

commit 93dc6107a76daed81c07f50215fa6ae77691634f upstream.

Commit 28d82dc1c4ed ("epoll: limit paths") that I did to limit the
number of possible wakeup paths in epoll is causing a few applications
to longer work (dovecot for one).

The original patch is really about limiting the amount of epoll nesting
(since epoll fds can be attached to other fds). Thus, we probably can
allow an unlimited number of paths of depth 1. My current patch limits
it at 1000. And enforce the limits on paths that have a greater depth.

This is captured in: https://bugzilla.redhat.com/show_bug.cgi?id=681578

Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/eventpoll.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -988,6 +988,10 @@ static int path_count[PATH_ARR_SIZE];
 
 static int path_count_inc(int nests)
 {
+	/* Allow an arbitrary number of depth 1 paths */
+	if (nests == 0)
+		return 0;
+
 	if (++path_count[nests] > path_limits[nests])
 		return -1;
 	return 0;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 30/42] spi: Fix device unregistration when unregistering the bus master
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (28 preceding siblings ...)
  2012-04-24 22:33 ` [ 29/42] Dont limit non-nested epoll paths Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 31/42] rt2x00: Properly identify rt2800usb devices Greg KH
                   ` (11 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Laurent Pinchart, Grant Likely, Takahiro AKASHI

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

commit 178db7d30f94707efca1a189753c105ef69942ed upstream.

Device are added as children of the bus master's parent device, but
spi_unregister_master() looks for devices to unregister in the bus
master's children. This results in the child devices not being
unregistered.

Fix this by registering devices as direct children of the bus master.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Takahiro AKASHI <akashi@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/spi/spi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -318,7 +318,7 @@ struct spi_device *spi_alloc_device(stru
 	}
 
 	spi->master = master;
-	spi->dev.parent = dev;
+	spi->dev.parent = &master->dev;
 	spi->dev.bus = &spi_bus_type;
 	spi->dev.release = spidev_release;
 	device_initialize(&spi->dev);



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 31/42] rt2x00: Properly identify rt2800usb devices.
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (29 preceding siblings ...)
  2012-04-24 22:33 ` [ 30/42] spi: Fix device unregistration when unregistering the bus master Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 32/42] rt2800usb: Add new device ID for Belkin Greg KH
                   ` (10 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Gertjan van Wingerde, Ivo van Doorn,
	John W. Linville, Ben Hutchings

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gertjan van Wingerde <gwingerde@gmail.com>

commit acb56120d2c386d6dd104a6515c1a15dabc1ef87 upstream.

Sitecom WLA4000 (USB ID 0x0df6:0x0060) is an RT3072 chipset.
Sitecom WLA5000 (USB ID 0x0df6:0x0062) is an RT3572 chipset.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rt2x00/rt2800usb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -943,6 +943,7 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x0df6, 0x0048) },
 	{ USB_DEVICE(0x0df6, 0x0051) },
 	{ USB_DEVICE(0x0df6, 0x005f) },
+	{ USB_DEVICE(0x0df6, 0x0060) },
 	/* SMC */
 	{ USB_DEVICE(0x083a, 0x6618) },
 	{ USB_DEVICE(0x083a, 0x7511) },
@@ -999,6 +1000,7 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x148f, 0x3572) },
 	/* Sitecom */
 	{ USB_DEVICE(0x0df6, 0x0041) },
+	{ USB_DEVICE(0x0df6, 0x0062) },
 	/* Toshiba */
 	{ USB_DEVICE(0x0930, 0x0a07) },
 	/* Zinwell */
@@ -1096,8 +1098,6 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x0df6, 0x004a) },
 	{ USB_DEVICE(0x0df6, 0x004d) },
 	{ USB_DEVICE(0x0df6, 0x0053) },
-	{ USB_DEVICE(0x0df6, 0x0060) },
-	{ USB_DEVICE(0x0df6, 0x0062) },
 	/* SMC */
 	{ USB_DEVICE(0x083a, 0xa512) },
 	{ USB_DEVICE(0x083a, 0xc522) },



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 32/42] rt2800usb: Add new device ID for Belkin
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (30 preceding siblings ...)
  2012-04-24 22:33 ` [ 31/42] rt2x00: Properly identify rt2800usb devices Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 33/42] rt2x00: Add USB device ID of Buffalo WLI-UC-GNHP Greg KH
                   ` (9 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Eduardo Bacchi Kienetz,
	Gertjan van Wingerde, Ivo van Doorn, John W. Linville,
	Ben Hutchings

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Eduardo Bacchi Kienetz <eduardo@kienetz.com>

commit 43bf8c245237b8309153aa39d4e8f1586cf56af0 upstream.

Belkin's Connect N150 Wireless USB Adapter, model F7D1101 version 2, uses ID 0x945b.
Chipset info: rt: 3390, rf: 000b, rev: 3213.
I have just bought one, which started to work perfectly after the ID was added through this patch.

Signed-off-by: Eduardo Bacchi Kienetz <eduardo@kienetz.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rt2x00/rt2800usb.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -976,6 +976,8 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x0586, 0x341e) },
 	{ USB_DEVICE(0x0586, 0x343e) },
 #ifdef CONFIG_RT2800USB_RT33XX
+	/* Belkin */
+	{ USB_DEVICE(0x050d, 0x945b) },
 	/* Ralink */
 	{ USB_DEVICE(0x148f, 0x3370) },
 	{ USB_DEVICE(0x148f, 0x8070) },



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 33/42] rt2x00: Add USB device ID of Buffalo WLI-UC-GNHP.
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (31 preceding siblings ...)
  2012-04-24 22:33 ` [ 32/42] rt2800usb: Add new device ID for Belkin Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 34/42] rt2800: Add support for the Fujitsu Stylistic Q550 Greg KH
                   ` (8 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Teika Kazura, Gertjan van Wingerde,
	Ivo van Doorn, John W. Linville, Ben Hutchings

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gertjan van Wingerde <gwingerde@gmail.com>

commit c18b7806e4f3373b2f296a65fb19251a3b49a532 upstream.

This is reported to be an RT3070 based device.

Reported-by: Teika Kazura <teika@lavabit.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rt2x00/rt2800usb.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -824,6 +824,7 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x050d, 0x935b) },
 	/* Buffalo */
 	{ USB_DEVICE(0x0411, 0x00e8) },
+	{ USB_DEVICE(0x0411, 0x0158) },
 	{ USB_DEVICE(0x0411, 0x016f) },
 	{ USB_DEVICE(0x0411, 0x01a2) },
 	/* Corega */



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 34/42] rt2800: Add support for the Fujitsu Stylistic Q550
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (32 preceding siblings ...)
  2012-04-24 22:33 ` [ 33/42] rt2x00: Add USB device ID of Buffalo WLI-UC-GNHP Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 35/42] rt2x00: Identify rt2800usb chipsets Greg KH
                   ` (7 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Alan Cox, Gertjan van Wingerde,
	John W. Linville, Ben Hutchings

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alan Cox <alan@linux.intel.com>

commit 3ac44670ad0fca8b6c43b3e4d8494c67c419f494 upstream.

Just another USB identifier.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rt2x00/rt2800usb.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1064,6 +1064,8 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x7392, 0x7722) },
 	/* Encore */
 	{ USB_DEVICE(0x203d, 0x14a1) },
+	/* Fujitsu Stylistic 550 */
+	{ USB_DEVICE(0x1690, 0x0761) },
 	/* Gemtek */
 	{ USB_DEVICE(0x15a9, 0x0010) },
 	/* Gigabyte */



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 35/42] rt2x00: Identify rt2800usb chipsets.
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (33 preceding siblings ...)
  2012-04-24 22:33 ` [ 34/42] rt2800: Add support for the Fujitsu Stylistic Q550 Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 36/42] nfsd: fix compose_entry_fh() failure exits Greg KH
                   ` (6 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Gertjan van Wingerde, Ivo van Doorn,
	John W. Linville, Ben Hutchings

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Gertjan van Wingerde <gwingerde@gmail.com>

commit bc93eda7e903ff75cefcb6e247ed9b8e9f8e9783 upstream.

According to the latest USB ID database these are all RT2770 / RT2870 / RT307x
devices.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rt2x00/rt2800usb.c |   26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -819,12 +819,14 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x050d, 0x8053) },
 	{ USB_DEVICE(0x050d, 0x805c) },
 	{ USB_DEVICE(0x050d, 0x815c) },
+	{ USB_DEVICE(0x050d, 0x825a) },
 	{ USB_DEVICE(0x050d, 0x825b) },
 	{ USB_DEVICE(0x050d, 0x935a) },
 	{ USB_DEVICE(0x050d, 0x935b) },
 	/* Buffalo */
 	{ USB_DEVICE(0x0411, 0x00e8) },
 	{ USB_DEVICE(0x0411, 0x0158) },
+	{ USB_DEVICE(0x0411, 0x015d) },
 	{ USB_DEVICE(0x0411, 0x016f) },
 	{ USB_DEVICE(0x0411, 0x01a2) },
 	/* Corega */
@@ -839,6 +841,8 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x07d1, 0x3c0e) },
 	{ USB_DEVICE(0x07d1, 0x3c0f) },
 	{ USB_DEVICE(0x07d1, 0x3c11) },
+	{ USB_DEVICE(0x07d1, 0x3c13) },
+	{ USB_DEVICE(0x07d1, 0x3c15) },
 	{ USB_DEVICE(0x07d1, 0x3c16) },
 	{ USB_DEVICE(0x2001, 0x3c1b) },
 	/* Draytek */
@@ -847,6 +851,7 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x7392, 0x7711) },
 	{ USB_DEVICE(0x7392, 0x7717) },
 	{ USB_DEVICE(0x7392, 0x7718) },
+	{ USB_DEVICE(0x7392, 0x7722) },
 	/* Encore */
 	{ USB_DEVICE(0x203d, 0x1480) },
 	{ USB_DEVICE(0x203d, 0x14a9) },
@@ -881,6 +886,7 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x1737, 0x0070) },
 	{ USB_DEVICE(0x1737, 0x0071) },
 	{ USB_DEVICE(0x1737, 0x0077) },
+	{ USB_DEVICE(0x1737, 0x0078) },
 	/* Logitec */
 	{ USB_DEVICE(0x0789, 0x0162) },
 	{ USB_DEVICE(0x0789, 0x0163) },
@@ -904,9 +910,13 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x0db0, 0x871b) },
 	{ USB_DEVICE(0x0db0, 0x871c) },
 	{ USB_DEVICE(0x0db0, 0x899a) },
+	/* Ovislink */
+	{ USB_DEVICE(0x1b75, 0x3071) },
+	{ USB_DEVICE(0x1b75, 0x3072) },
 	/* Para */
 	{ USB_DEVICE(0x20b8, 0x8888) },
 	/* Pegatron */
+	{ USB_DEVICE(0x1d4d, 0x0002) },
 	{ USB_DEVICE(0x1d4d, 0x000c) },
 	{ USB_DEVICE(0x1d4d, 0x000e) },
 	{ USB_DEVICE(0x1d4d, 0x0011) },
@@ -959,7 +969,9 @@ static struct usb_device_id rt2800usb_de
 	/* Sparklan */
 	{ USB_DEVICE(0x15a9, 0x0006) },
 	/* Sweex */
+	{ USB_DEVICE(0x177f, 0x0153) },
 	{ USB_DEVICE(0x177f, 0x0302) },
+	{ USB_DEVICE(0x177f, 0x0313) },
 	/* U-Media */
 	{ USB_DEVICE(0x157e, 0x300e) },
 	{ USB_DEVICE(0x157e, 0x3013) },
@@ -1043,25 +1055,20 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x13d3, 0x3322) },
 	/* Belkin */
 	{ USB_DEVICE(0x050d, 0x1003) },
-	{ USB_DEVICE(0x050d, 0x825a) },
 	/* Buffalo */
 	{ USB_DEVICE(0x0411, 0x012e) },
 	{ USB_DEVICE(0x0411, 0x0148) },
 	{ USB_DEVICE(0x0411, 0x0150) },
-	{ USB_DEVICE(0x0411, 0x015d) },
 	/* Corega */
 	{ USB_DEVICE(0x07aa, 0x0041) },
 	{ USB_DEVICE(0x07aa, 0x0042) },
 	{ USB_DEVICE(0x18c5, 0x0008) },
 	/* D-Link */
 	{ USB_DEVICE(0x07d1, 0x3c0b) },
-	{ USB_DEVICE(0x07d1, 0x3c13) },
-	{ USB_DEVICE(0x07d1, 0x3c15) },
 	{ USB_DEVICE(0x07d1, 0x3c17) },
 	{ USB_DEVICE(0x2001, 0x3c17) },
 	/* Edimax */
 	{ USB_DEVICE(0x7392, 0x4085) },
-	{ USB_DEVICE(0x7392, 0x7722) },
 	/* Encore */
 	{ USB_DEVICE(0x203d, 0x14a1) },
 	/* Fujitsu Stylistic 550 */
@@ -1077,19 +1084,13 @@ static struct usb_device_id rt2800usb_de
 	/* LevelOne */
 	{ USB_DEVICE(0x1740, 0x0605) },
 	{ USB_DEVICE(0x1740, 0x0615) },
-	/* Linksys */
-	{ USB_DEVICE(0x1737, 0x0078) },
 	/* Logitec */
 	{ USB_DEVICE(0x0789, 0x0168) },
 	{ USB_DEVICE(0x0789, 0x0169) },
 	/* Motorola */
 	{ USB_DEVICE(0x100d, 0x9032) },
-	/* Ovislink */
-	{ USB_DEVICE(0x1b75, 0x3071) },
-	{ USB_DEVICE(0x1b75, 0x3072) },
 	/* Pegatron */
 	{ USB_DEVICE(0x05a6, 0x0101) },
-	{ USB_DEVICE(0x1d4d, 0x0002) },
 	{ USB_DEVICE(0x1d4d, 0x0010) },
 	/* Planex */
 	{ USB_DEVICE(0x2019, 0x5201) },
@@ -1108,9 +1109,6 @@ static struct usb_device_id rt2800usb_de
 	{ USB_DEVICE(0x083a, 0xc522) },
 	{ USB_DEVICE(0x083a, 0xd522) },
 	{ USB_DEVICE(0x083a, 0xf511) },
-	/* Sweex */
-	{ USB_DEVICE(0x177f, 0x0153) },
-	{ USB_DEVICE(0x177f, 0x0313) },
 	/* Zyxel */
 	{ USB_DEVICE(0x0586, 0x341a) },
 #endif



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 36/42] nfsd: fix compose_entry_fh() failure exits
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (34 preceding siblings ...)
  2012-04-24 22:33 ` [ 35/42] rt2x00: Identify rt2800usb chipsets Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 37/42] btrfs: btrfs_root_readonly() broken on big-endian Greg KH
                   ` (5 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Al Viro, J. Bruce Fields

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit efe39651f08813180f37dc508d950fc7d92b29a8 upstream.

Restore the original logics ("fail on mountpoints, negatives and in
case of fh_compose() failures").  Since commit 8177e (nfsd: clean up
readdirplus encoding) that got broken -
	rv = fh_compose(fhp, exp, dchild, &cd->fh);
	if (rv)
	       goto out;
	if (!dchild->d_inode)
		goto out;
	rv = 0;
out:
is equivalent to
	rv = fh_compose(fhp, exp, dchild, &cd->fh);
out:
and the second check has no effect whatsoever...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfsd/nfs3xdr.c |   22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -803,13 +803,13 @@ encode_entry_baggage(struct nfsd3_readdi
 	return p;
 }
 
-static int
+static __be32
 compose_entry_fh(struct nfsd3_readdirres *cd, struct svc_fh *fhp,
 		const char *name, int namlen)
 {
 	struct svc_export	*exp;
 	struct dentry		*dparent, *dchild;
-	int rv = 0;
+	__be32 rv = nfserr_noent;
 
 	dparent = cd->fh.fh_dentry;
 	exp  = cd->fh.fh_export;
@@ -817,26 +817,20 @@ compose_entry_fh(struct nfsd3_readdirres
 	if (isdotent(name, namlen)) {
 		if (namlen == 2) {
 			dchild = dget_parent(dparent);
-			if (dchild == dparent) {
-				/* filesystem root - cannot return filehandle for ".." */
-				dput(dchild);
-				return -ENOENT;
-			}
+			/* filesystem root - cannot return filehandle for ".." */
+			if (dchild == dparent)
+				goto out;
 		} else
 			dchild = dget(dparent);
 	} else
 		dchild = lookup_one_len(name, dparent, namlen);
 	if (IS_ERR(dchild))
-		return -ENOENT;
-	rv = -ENOENT;
+		return rv;
 	if (d_mountpoint(dchild))
 		goto out;
-	rv = fh_compose(fhp, exp, dchild, &cd->fh);
-	if (rv)
-		goto out;
 	if (!dchild->d_inode)
 		goto out;
-	rv = 0;
+	rv = fh_compose(fhp, exp, dchild, &cd->fh);
 out:
 	dput(dchild);
 	return rv;
@@ -845,7 +839,7 @@ out:
 static __be32 *encode_entryplus_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name, int namlen)
 {
 	struct svc_fh	fh;
-	int err;
+	__be32 err;
 
 	fh_init(&fh, NFS3_FHSIZE);
 	err = compose_entry_fh(cd, &fh, name, namlen);



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 37/42] btrfs: btrfs_root_readonly() broken on big-endian
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (35 preceding siblings ...)
  2012-04-24 22:33 ` [ 36/42] nfsd: fix compose_entry_fh() failure exits Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 38/42] ocfs2: ->l_next_free_req breakage " Greg KH
                   ` (4 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Al Viro, Chris Mason

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit 6ed3cf2cdfce4c9f1d73171bd3f27d9cb77b734e upstream.

->root_flags is __le64 and all accesses to it go through the helpers
that do proper conversions.  Except for btrfs_root_readonly(), which
checks bit 0 as in host-endian...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/btrfs/ctree.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1972,7 +1972,7 @@ BTRFS_SETGET_STACK_FUNCS(root_last_snaps
 
 static inline bool btrfs_root_readonly(struct btrfs_root *root)
 {
-	return root->root_item.flags & BTRFS_ROOT_SUBVOL_RDONLY;
+	return (root->root_item.flags & cpu_to_le64(BTRFS_ROOT_SUBVOL_RDONLY)) != 0;
 }
 
 /* struct btrfs_super_block */



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 38/42] ocfs2: ->l_next_free_req breakage on big-endian
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (36 preceding siblings ...)
  2012-04-24 22:33 ` [ 37/42] btrfs: btrfs_root_readonly() broken on big-endian Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 39/42] ocfs: ->rl_used " Greg KH
                   ` (3 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Al Viro, Mark Fasheh, Joel Becker

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit 3a251f04fe97c3d335b745c98e4b377e3c3899f2 upstream.

It's le16, not le32...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ocfs2/alloc.c        |    2 +-
 fs/ocfs2/refcounttree.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -1134,7 +1134,7 @@ static int ocfs2_adjust_rightmost_branch
 	}
 
 	el = path_leaf_el(path);
-	rec = &el->l_recs[le32_to_cpu(el->l_next_free_rec) - 1];
+	rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec) - 1];
 
 	ocfs2_adjust_rightmost_records(handle, et, path, rec);
 
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -1036,14 +1036,14 @@ static int ocfs2_get_refcount_cpos_end(s
 
 	tmp_el = left_path->p_node[subtree_root].el;
 	blkno = left_path->p_node[subtree_root+1].bh->b_blocknr;
-	for (i = 0; i < le32_to_cpu(tmp_el->l_next_free_rec); i++) {
+	for (i = 0; i < le16_to_cpu(tmp_el->l_next_free_rec); i++) {
 		if (le64_to_cpu(tmp_el->l_recs[i].e_blkno) == blkno) {
 			*cpos_end = le32_to_cpu(tmp_el->l_recs[i+1].e_cpos);
 			break;
 		}
 	}
 
-	BUG_ON(i == le32_to_cpu(tmp_el->l_next_free_rec));
+	BUG_ON(i == le16_to_cpu(tmp_el->l_next_free_rec));
 
 out:
 	ocfs2_free_path(left_path);



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 39/42] ocfs: ->rl_used breakage on big-endian
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (37 preceding siblings ...)
  2012-04-24 22:33 ` [ 38/42] ocfs2: ->l_next_free_req breakage " Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 40/42] ocfs2: ->rl_count endianness breakage Greg KH
                   ` (2 subsequent siblings)
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Al Viro, Mark Fasheh, Joel Becker

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit e1bf4cc620fd143766ddfcee3b004a1d1bb34fd0 upstream.

it's le16, not le32 or le64...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ocfs2/refcounttree.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -1468,7 +1468,7 @@ static int ocfs2_divide_leaf_refcount_bl
 
 	trace_ocfs2_divide_leaf_refcount_block(
 		(unsigned long long)ref_leaf_bh->b_blocknr,
-		le32_to_cpu(rl->rl_count), le32_to_cpu(rl->rl_used));
+		le32_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used));
 
 	/*
 	 * XXX: Improvement later.
@@ -2411,7 +2411,7 @@ static int ocfs2_calc_refcount_meta_cred
 				rb = (struct ocfs2_refcount_block *)
 							prev_bh->b_data;
 
-				if (le64_to_cpu(rb->rf_records.rl_used) +
+				if (le16_to_cpu(rb->rf_records.rl_used) +
 				    recs_add >
 				    le16_to_cpu(rb->rf_records.rl_count))
 					ref_blocks++;
@@ -2476,7 +2476,7 @@ static int ocfs2_calc_refcount_meta_cred
 	if (prev_bh) {
 		rb = (struct ocfs2_refcount_block *)prev_bh->b_data;
 
-		if (le64_to_cpu(rb->rf_records.rl_used) + recs_add >
+		if (le16_to_cpu(rb->rf_records.rl_used) + recs_add >
 		    le16_to_cpu(rb->rf_records.rl_count))
 			ref_blocks++;
 
@@ -3629,7 +3629,7 @@ int ocfs2_refcounted_xattr_delete_need(s
 			 * one will split a refcount rec, so totally we need
 			 * clusters * 2 new refcount rec.
 			 */
-			if (le64_to_cpu(rb->rf_records.rl_used) + clusters * 2 >
+			if (le16_to_cpu(rb->rf_records.rl_used) + clusters * 2 >
 			    le16_to_cpu(rb->rf_records.rl_count))
 				ref_blocks++;
 



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 40/42] ocfs2: ->rl_count endianness breakage
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (38 preceding siblings ...)
  2012-04-24 22:33 ` [ 39/42] ocfs: ->rl_used " Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 41/42] ocfs2: ->e_leaf_clusters " Greg KH
  2012-04-24 22:33 ` [ 42/42] lockd: fix the endianness bug Greg KH
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Al Viro, Mark Fasheh, Joel Becker

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit 28748b325dc2d730ccc312830a91c4ae0c0d9379 upstream.

le16, not le32...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ocfs2/refcounttree.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -1468,7 +1468,7 @@ static int ocfs2_divide_leaf_refcount_bl
 
 	trace_ocfs2_divide_leaf_refcount_block(
 		(unsigned long long)ref_leaf_bh->b_blocknr,
-		le32_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used));
+		le16_to_cpu(rl->rl_count), le16_to_cpu(rl->rl_used));
 
 	/*
 	 * XXX: Improvement later.



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 41/42] ocfs2: ->e_leaf_clusters endianness breakage
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (39 preceding siblings ...)
  2012-04-24 22:33 ` [ 40/42] ocfs2: ->rl_count endianness breakage Greg KH
@ 2012-04-24 22:33 ` Greg KH
  2012-04-24 22:33 ` [ 42/42] lockd: fix the endianness bug Greg KH
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Al Viro, Mark Fasheh, Joel Becker

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit 72094e43e3af5020510f920321d71f1798fa896d upstream.

le16, not le32...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ocfs2/suballoc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/fs/ocfs2/suballoc.c
+++ b/fs/ocfs2/suballoc.c
@@ -600,7 +600,7 @@ static void ocfs2_bg_alloc_cleanup(handl
 		ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode,
 					  cluster_ac->ac_bh,
 					  le64_to_cpu(rec->e_blkno),
-					  le32_to_cpu(rec->e_leaf_clusters));
+					  le16_to_cpu(rec->e_leaf_clusters));
 		if (ret)
 			mlog_errno(ret);
 		/* Try all the clusters to free */
@@ -1628,7 +1628,7 @@ static int ocfs2_bg_discontig_fix_by_rec
 {
 	unsigned int bpc = le16_to_cpu(cl->cl_bpc);
 	unsigned int bitoff = le32_to_cpu(rec->e_cpos) * bpc;
-	unsigned int bitcount = le32_to_cpu(rec->e_leaf_clusters) * bpc;
+	unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc;
 
 	if (res->sr_bit_offset < bitoff)
 		return 0;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* [ 42/42] lockd: fix the endianness bug
  2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
                   ` (40 preceding siblings ...)
  2012-04-24 22:33 ` [ 41/42] ocfs2: ->e_leaf_clusters " Greg KH
@ 2012-04-24 22:33 ` Greg KH
  41 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-24 22:33 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: torvalds, akpm, alan, Al Viro, J. Bruce Fields, Trond Myklebust

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Al Viro <viro@zeniv.linux.org.uk>

commit e847469bf77a1d339274074ed068d461f0c872bc upstream.

comparing be32 values for < is not doing the right thing...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/lockd/clnt4xdr.c |    2 +-
 fs/lockd/clntxdr.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/fs/lockd/clnt4xdr.c
+++ b/fs/lockd/clnt4xdr.c
@@ -241,7 +241,7 @@ static int decode_nlm4_stat(struct xdr_s
 	p = xdr_inline_decode(xdr, 4);
 	if (unlikely(p == NULL))
 		goto out_overflow;
-	if (unlikely(*p > nlm4_failed))
+	if (unlikely(ntohl(*p) > ntohl(nlm4_failed)))
 		goto out_bad_xdr;
 	*stat = *p;
 	return 0;
--- a/fs/lockd/clntxdr.c
+++ b/fs/lockd/clntxdr.c
@@ -236,7 +236,7 @@ static int decode_nlm_stat(struct xdr_st
 	p = xdr_inline_decode(xdr, 4);
 	if (unlikely(p == NULL))
 		goto out_overflow;
-	if (unlikely(*p > nlm_lck_denied_grace_period))
+	if (unlikely(ntohl(*p) > ntohl(nlm_lck_denied_grace_period)))
 		goto out_enum;
 	*stat = *p;
 	return 0;



^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [ 03/42] hwmon: fam15h_power: fix bogus values with current BIOSes
  2012-04-24 22:32 ` [ 03/42] hwmon: fam15h_power: fix bogus values with current BIOSes Greg KH
@ 2012-04-25 19:46   ` Ben Hutchings
  2012-04-26 21:16     ` Greg KH
  0 siblings, 1 reply; 46+ messages in thread
From: Ben Hutchings @ 2012-04-25 19:46 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, torvalds, akpm, alan, Andre Przywara,
	Jean Delvare, Guenter Roeck

On Tue, Apr 24, 2012 at 03:32:56PM -0700, Greg KH wrote:
> 3.0-stable review patch.  If anyone has any objections, please let me know.
[...]

This should also be droped from the 3.0-stable queue for now.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert Camus

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [ 03/42] hwmon: fam15h_power: fix bogus values with current BIOSes
  2012-04-25 19:46   ` Ben Hutchings
@ 2012-04-26 21:16     ` Greg KH
  0 siblings, 0 replies; 46+ messages in thread
From: Greg KH @ 2012-04-26 21:16 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: linux-kernel, stable, torvalds, akpm, alan, Andre Przywara,
	Jean Delvare, Guenter Roeck

On Wed, Apr 25, 2012 at 08:46:15PM +0100, Ben Hutchings wrote:
> On Tue, Apr 24, 2012 at 03:32:56PM -0700, Greg KH wrote:
> > 3.0-stable review patch.  If anyone has any objections, please let me know.
> [...]
> 
> This should also be droped from the 3.0-stable queue for now.

Now dropped, thanks for finding this.

greg k-h

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2012-04-26 21:16 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-24 22:33 [ 00/42] 3.0.30-stable review Greg KH
2012-04-24 22:32 ` [ 01/42] Perf: fix build breakage Greg KH
2012-04-24 22:32 ` [ 02/42] crypto: sha512 - Fix byte counter overflow in SHA-512 Greg KH
2012-04-24 22:32   ` Greg KH
2012-04-24 22:32 ` [ 03/42] hwmon: fam15h_power: fix bogus values with current BIOSes Greg KH
2012-04-25 19:46   ` Ben Hutchings
2012-04-26 21:16     ` Greg KH
2012-04-24 22:32 ` [ 04/42] ALSA: hda/conexant - Dont set HP pin-control bit unconditionally Greg KH
2012-04-24 22:32 ` [ 05/42] ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR Greg KH
2012-04-24 22:32 ` [ 06/42] xen/gntdev: do not set VM_PFNMAP Greg KH
2012-04-24 22:33 ` [ 07/42] xen/xenbus: Add quirk to deal with misconfigured backends Greg KH
2012-04-24 22:33 ` [ 08/42] USB: yurex: Remove allocation of coherent buffer for setup-packet buffer Greg KH
2012-04-24 22:33 ` [ 09/42] USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb Greg KH
2012-04-24 22:33 ` [ 10/42] uwb: fix use of del_timer_sync() in interrupt Greg KH
2012-04-24 22:33 ` [ 11/42] uwb: fix error handling Greg KH
2012-04-24 22:33 ` [ 12/42] davinci_mdio: Fix MDIO timeout check Greg KH
2012-04-24 22:33 ` [ 13/42] media: rc-core: set mode for winbond-cir Greg KH
2012-04-24 22:33 ` [ 14/42] cfg80211: fix interface combinations check Greg KH
2012-04-24 22:33 ` [ 15/42] mm: fix s390 BUG by __set_page_dirty_no_writeback on swap Greg KH
2012-04-24 22:33 ` [ 16/42] jbd2: use GFP_NOFS for blkdev_issue_flush Greg KH
2012-04-24 22:33 ` [ 17/42] USB: serial: cp210x: Fixed usb_control_msg timeout values Greg KH
2012-04-24 22:33 ` [ 18/42] pch_uart: Fix dma channel unallocated issue Greg KH
2012-04-24 22:33 ` [ 19/42] drivers/tty/amiserial.c: add missing tty_unlock Greg KH
2012-04-24 22:33 ` [ 20/42] USB: sierra: avoid QMI/wwan interface on MC77xx Greg KH
2012-04-24 22:33 ` [ 21/42] EHCI: always clear the STS_FLR status bit Greg KH
2012-04-24 22:33 ` [ 22/42] USB: fix deadlock in bConfigurationValue attribute method Greg KH
2012-04-24 22:33 ` [ 23/42] usb: gadget: eliminate NULL pointer dereference (bugfix) Greg KH
2012-04-24 22:33 ` [ 24/42] usb: musb: omap: fix crash when musb glue (omap) gets initialized Greg KH
2012-04-24 22:33 ` [ 25/42] usb: musb: omap: fix the error check for pm_runtime_get_sync Greg KH
2012-04-24 22:33 ` [ 26/42] PCI: Add quirk for still enabled interrupts on Intel Sandy Bridge GPUs Greg KH
2012-04-24 22:33 ` [ 27/42] ext4: fix endianness breakage in ext4_split_extent_at() Greg KH
2012-04-24 22:33 ` [ 28/42] Bluetooth: Add support for Atheros [04ca:3005] Greg KH
2012-04-24 22:33 ` [ 29/42] Dont limit non-nested epoll paths Greg KH
2012-04-24 22:33 ` [ 30/42] spi: Fix device unregistration when unregistering the bus master Greg KH
2012-04-24 22:33 ` [ 31/42] rt2x00: Properly identify rt2800usb devices Greg KH
2012-04-24 22:33 ` [ 32/42] rt2800usb: Add new device ID for Belkin Greg KH
2012-04-24 22:33 ` [ 33/42] rt2x00: Add USB device ID of Buffalo WLI-UC-GNHP Greg KH
2012-04-24 22:33 ` [ 34/42] rt2800: Add support for the Fujitsu Stylistic Q550 Greg KH
2012-04-24 22:33 ` [ 35/42] rt2x00: Identify rt2800usb chipsets Greg KH
2012-04-24 22:33 ` [ 36/42] nfsd: fix compose_entry_fh() failure exits Greg KH
2012-04-24 22:33 ` [ 37/42] btrfs: btrfs_root_readonly() broken on big-endian Greg KH
2012-04-24 22:33 ` [ 38/42] ocfs2: ->l_next_free_req breakage " Greg KH
2012-04-24 22:33 ` [ 39/42] ocfs: ->rl_used " Greg KH
2012-04-24 22:33 ` [ 40/42] ocfs2: ->rl_count endianness breakage Greg KH
2012-04-24 22:33 ` [ 41/42] ocfs2: ->e_leaf_clusters " Greg KH
2012-04-24 22:33 ` [ 42/42] lockd: fix the endianness bug Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.