All of lore.kernel.org
 help / color / mirror / Atom feed
* [00/45] 2.6.32.26-stable review
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [01/45] staging: usbip: Notify usb core of port status changes Greg KH
                   ` (44 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan

This is the start of the stable review cycle for the 2.6.32.26 release.
There are @num@ 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 us know.  If anyone is a maintainer of the proper subsystem, and
wants to add a Signed-off-by: line to the patch, please respond with it.

Responses should be made by Monday, November 22, 2010, 12:00:00 UTC
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/v2.6/stable-review/patch-2.6.32.26-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

 Makefile                            |    2 +-
 arch/powerpc/kernel/ppc970-pmu.c    |    2 +
 arch/x86/include/asm/cpufeature.h   |    2 +-
 arch/x86/include/asm/io.h           |    1 +
 arch/x86/include/asm/kvm_host.h     |   24 -------------------
 arch/x86/include/asm/smp.h          |    9 +++++-
 arch/x86/kernel/apic/io_apic.c      |    2 +
 arch/x86/kernel/cpu/mtrr/cleanup.c  |    2 +-
 arch/x86/kernel/crash_dump_64.c     |    3 +-
 arch/x86/kernel/olpc.c              |    5 +++-
 arch/x86/kernel/reboot.c            |    2 +-
 arch/x86/kernel/smp.c               |   15 +++++++----
 arch/x86/kvm/paging_tmpl.h          |   29 +++++++++++++++++++++-
 arch/x86/kvm/svm.c                  |   44 +++++++++++++++++++---------------
 arch/x86/kvm/vmx.c                  |   28 ++++++++++------------
 arch/x86/kvm/x86.c                  |    2 +-
 arch/x86/xen/enlighten.c            |    2 +-
 arch/x86/xen/smp.c                  |    6 ++--
 drivers/bluetooth/hci_ldisc.c       |    7 +++++
 drivers/char/pcmcia/synclink_cs.c   |    2 +
 drivers/misc/sgi-xp/xpc_uv.c        |   17 +++++++++++++
 drivers/net/wireless/p54/eeprom.c   |    4 ++-
 drivers/net/wireless/p54/p54usb.c   |   15 +++++++++++-
 drivers/scsi/gdth.c                 |    8 ++++++
 drivers/scsi/libsas/sas_ata.c       |    1 +
 drivers/scsi/scsi_lib.c             |    3 +-
 drivers/scsi/scsi_sysfs.c           |    3 +-
 drivers/scsi/sd.c                   |   15 ++++++++----
 drivers/staging/usbip/usbip_event.c |   16 ++----------
 drivers/staging/usbip/vhci_hcd.c    |    2 +
 drivers/usb/core/hcd-pci.c          |    4 ++-
 drivers/usb/core/hub.c              |    9 ++++--
 drivers/usb/core/message.c          |   14 +++++-----
 drivers/usb/gadget/atmel_usba_udc.c |    3 ++
 drivers/usb/host/ohci-hcd.c         |    9 ++++++-
 drivers/usb/host/ohci-pci.c         |   18 ++++++++++++++
 drivers/usb/host/ohci.h             |    1 +
 drivers/usb/host/pci-quirks.c       |   18 ++++++++-----
 drivers/usb/musb/blackfin.c         |    4 ++-
 drivers/usb/serial/cp210x.c         |    2 +
 drivers/usb/serial/ftdi_sio.c       |   35 +++++++++++++++++++++++++++-
 drivers/usb/serial/ftdi_sio_ids.h   |   39 ++++++++++++++++++++++++++++++-
 drivers/usb/serial/opticon.c        |    6 ++--
 drivers/usb/serial/option.c         |   23 ++++++++++++++++--
 fs/pipe.c                           |    2 +-
 kernel/futex.c                      |   31 ++++++++++++------------
 kernel/sched.c                      |    7 ++---
 mm/vmalloc.c                        |    9 +++++++
 48 files changed, 358 insertions(+), 149 deletions(-)


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

* [01/45] staging: usbip: Notify usb core of port status changes
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
  2010-11-19 21:42 ` Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [02/45] staging: usbip: Process event flags without delay Greg KH
                   ` (43 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Max Vozeler

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Max Vozeler <mvz@vozeler.com>

commit 0c9a32f0192e656daa2ff3c9149f6d71b4a1b873 upstream.

This patch changes vhci to behave like dummy and
other hcds when disconnecting a device.

Previously detaching a device from the root hub
did not notify the usb core of the disconnect and
left the device visible.

Signed-off-by: Max Vozeler <mvz@vozeler.com>
Reported-by: Marco Lancione <marco@optikam.com>
Tested-by: Luc Jalbert <ljalbert@optikam.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/usbip/vhci_hcd.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -163,6 +163,8 @@ void rh_port_disconnect(int rhport)
 	 * spin_unlock(&vdev->ud.lock); */
 
 	spin_unlock_irqrestore(&the_controller->lock, flags);
+
+	usb_hcd_poll_rh_status(vhci_to_hcd(the_controller));
 }
 
 



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

* [02/45] staging: usbip: Process event flags without delay
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
  2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [01/45] staging: usbip: Notify usb core of port status changes Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [03/45] powerpc/perf: Fix sampling enable for PPC970 Greg KH
                   ` (42 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Max Vozeler

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Max Vozeler <mvz@vozeler.com>

commit 584c5b7cf06194464240280483ee0376cdddbbae upstream.

The way the event handler works can cause it to delay
events until eventual wakeup for another event.

For example, on device detach (vhci):

 - Write to sysfs detach file
    -> usbip_event_add(VDEV_EVENT_DOWN)
      -> wakeup()

#define VDEV_EVENT_DOWN (USBIP_EH_SHUTDOWN | USBIP_EH_RESET).

 - Event thread wakes up and passes the event to
   event_handler() to process.

 - It processes and clears the USBIP_EH_SHUTDOWN
   flag then returns.

 - The outer event loop (event_handler_loop()) calls
   wait_event_interruptible().

The processing of the second flag which is part of
VDEV_EVENT_DOWN (USBIP_EH_RESET) did not happen yet.
It is delayed until the next event.

This means the ->reset callback may not happen for
a long time (if ever), leaving the usbip port in a
weird state which prevents its reuse.

This patch changes the handler to process all flags
before waiting for another wakeup.

I have verified this change to fix a problem which
prevented reattach of a usbip device. It also helps
for socket errors which missed the RESET as well.

The delayed event processing also affects the stub
side of usbip and the error handling there.

Signed-off-by: Max Vozeler <mvz@vozeler.com>
Reported-by: Marco Lancione <marco@optikam.com>
Tested-by: Luc Jalbert <ljalbert@optikam.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/usbip/usbip_event.c |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

--- a/drivers/staging/usbip/usbip_event.c
+++ b/drivers/staging/usbip/usbip_event.c
@@ -38,21 +38,13 @@ static int event_handler(struct usbip_de
 			ud->eh_ops.shutdown(ud);
 
 			ud->event &= ~USBIP_EH_SHUTDOWN;
-
-			break;
 		}
 
-		/* Stop the error handler. */
-		if (ud->event & USBIP_EH_BYE)
-			return -1;
-
 		/* Reset the device. */
 		if (ud->event & USBIP_EH_RESET) {
 			ud->eh_ops.reset(ud);
 
 			ud->event &= ~USBIP_EH_RESET;
-
-			break;
 		}
 
 		/* Mark the device as unusable. */
@@ -60,13 +52,11 @@ static int event_handler(struct usbip_de
 			ud->eh_ops.unusable(ud);
 
 			ud->event &= ~USBIP_EH_UNUSABLE;
-
-			break;
 		}
 
-		/* NOTREACHED */
-		printk(KERN_ERR "%s: unknown event\n", __func__);
-		return -1;
+		/* Stop the error handler. */
+		if (ud->event & USBIP_EH_BYE)
+			return -1;
 	}
 
 	return 0;



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

* [03/45] powerpc/perf: Fix sampling enable for PPC970
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (2 preceding siblings ...)
  2010-11-19 21:42 ` [02/45] staging: usbip: Process event flags without delay Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [04/45] pcmcia: synclink_cs: fix information leak to userland Greg KH
                   ` (41 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Paul Mackerras,
	Benjamin Herrenschmidt

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Paul Mackerras <paulus@samba.org>

commit 9f5f9ffe50e90ed73040d2100db8bfc341cee352 upstream.

The logic to distinguish marked instruction events from ordinary events
on PPC970 and derivatives was flawed.  The result is that instruction
sampling didn't get enabled in the PMU for some marked instruction
events, so they would never trigger.  This fixes it by adding the
appropriate break statements in the switch statement.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/powerpc/kernel/ppc970-pmu.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/powerpc/kernel/ppc970-pmu.c
+++ b/arch/powerpc/kernel/ppc970-pmu.c
@@ -173,9 +173,11 @@ static int p970_marked_instr_event(u64 e
 	switch (unit) {
 	case PM_VPU:
 		mask = 0x4c;		/* byte 0 bits 2,3,6 */
+		break;
 	case PM_LSU0:
 		/* byte 2 bits 0,2,3,4,6; all of byte 1 */
 		mask = 0x085dff00;
+		break;
 	case PM_LSU1L:
 		mask = 0x50 << 24;	/* byte 3 bits 4,6 */
 		break;



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

* [04/45] pcmcia: synclink_cs: fix information leak to userland
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (3 preceding siblings ...)
  2010-11-19 21:42 ` [03/45] powerpc/perf: Fix sampling enable for PPC970 Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [05/45] sched: Fix string comparison in /proc/sched_features Greg KH
                   ` (40 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Vasiliy Kulikov, Dominik Brodowski

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Vasiliy Kulikov <segooon@gmail.com>

commit 5b917a1420d3d1a9c8da49fb0090692dc9aaee86 upstream.

Structure new_line is copied to userland with some padding fields unitialized.
It leads to leaking of stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/char/pcmcia/synclink_cs.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -4164,6 +4164,8 @@ static int hdlcdev_ioctl(struct net_devi
 	if (cmd != SIOCWANDEV)
 		return hdlc_ioctl(dev, ifr, cmd);
 
+	memset(&new_line, 0, size);
+
 	switch(ifr->ifr_settings.type) {
 	case IF_GET_IFACE: /* return current sync_serial_settings */
 



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

* [05/45] sched: Fix string comparison in /proc/sched_features
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (4 preceding siblings ...)
  2010-11-19 21:42 ` [04/45] pcmcia: synclink_cs: fix information leak to userland Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [06/45] bluetooth: Fix missing NULL check Greg KH
                   ` (39 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Mathieu Desnoyers,
	Peter Zijlstra, Tony Lindgren, Ingo Molnar

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

commit 7740191cd909b75d75685fb08a5d1f54b8a9d28b upstream.

Fix incorrect handling of the following case:

 INTERACTIVE
 INTERACTIVE_SOMETHING_ELSE

The comparison only checks up to each element's length.

Changelog since v1:
 - Embellish using some Rostedtisms.
  [ mingo:                 ^^ == smaller and cleaner ]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tony Lindgren <tony@atomide.com>
LKML-Reference: <20100913214700.GB16118@Krystal>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/sched.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -741,7 +741,7 @@ sched_feat_write(struct file *filp, cons
 		size_t cnt, loff_t *ppos)
 {
 	char buf[64];
-	char *cmp = buf;
+	char *cmp;
 	int neg = 0;
 	int i;
 
@@ -752,6 +752,7 @@ sched_feat_write(struct file *filp, cons
 		return -EFAULT;
 
 	buf[cnt] = 0;
+	cmp = strstrip(buf);
 
 	if (strncmp(buf, "NO_", 3) == 0) {
 		neg = 1;
@@ -759,9 +760,7 @@ sched_feat_write(struct file *filp, cons
 	}
 
 	for (i = 0; sched_feat_names[i]; i++) {
-		int len = strlen(sched_feat_names[i]);
-
-		if (strncmp(cmp, sched_feat_names[i], len) == 0) {
+		if (strcmp(cmp, sched_feat_names[i]) == 0) {
 			if (neg)
 				sysctl_sched_features &= ~(1UL << i);
 			else



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

* [06/45] bluetooth: Fix missing NULL check
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (5 preceding siblings ...)
  2010-11-19 21:42 ` [05/45] sched: Fix string comparison in /proc/sched_features Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [07/45] futex: Fix errors in nested key ref-counting Greg KH
                   ` (38 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Cox

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

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

commit c19483cc5e56ac5e22dd19cf25ba210ab1537773 upstream.

Fortunately this is only exploitable on very unusual hardware.

[Reported a while ago but nothing happened so just fixing it]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/bluetooth/hci_ldisc.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -258,9 +258,16 @@ static int hci_uart_tty_open(struct tty_
 
 	BT_DBG("tty %p", tty);
 
+	/* FIXME: This btw is bogus, nothing requires the old ldisc to clear
+	   the pointer */
 	if (hu)
 		return -EEXIST;
 
+	/* Error if the tty has no write op instead of leaving an exploitable
+	   hole */
+	if (tty->ops->write == NULL)
+		return -EOPNOTSUPP;
+
 	if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
 		BT_ERR("Can't allocate control structure");
 		return -ENFILE;



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

* [07/45] futex: Fix errors in nested key ref-counting
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (6 preceding siblings ...)
  2010-11-19 21:42 ` [06/45] bluetooth: Fix missing NULL check Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42   ` Greg KH
                   ` (37 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Darren Hart, Peter Zijlstra,
	Eric Dumazet, John Kacur, Rusty Russell, Thomas Gleixner

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

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Darren Hart <dvhart@linux.intel.com>

commit 7ada876a8703f23befbb20a7465a702ee39b1704 upstream.

futex_wait() is leaking key references due to futex_wait_setup()
acquiring an additional reference via the queue_lock() routine. The
nested key ref-counting has been masking bugs and complicating code
analysis. queue_lock() is only called with a previously ref-counted
key, so remove the additional ref-counting from the queue_(un)lock()
functions.

Also futex_wait_requeue_pi() drops one key reference too many in
unqueue_me_pi(). Remove the key reference handling from
unqueue_me_pi(). This was paired with a queue_lock() in
futex_lock_pi(), so the count remains unchanged.

Document remaining nested key ref-counting sites.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-and-tested-by: Matthieu Fertré<matthieu.fertre@kerlabs.com>
Reported-by: Louis Rilling<louis.rilling@kerlabs.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: John Kacur <jkacur@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
LKML-Reference: <4CBB17A8.70401@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/futex.c |   31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1363,7 +1363,6 @@ static inline struct futex_hash_bucket *
 {
 	struct futex_hash_bucket *hb;
 
-	get_futex_key_refs(&q->key);
 	hb = hash_futex(&q->key);
 	q->lock_ptr = &hb->lock;
 
@@ -1375,7 +1374,6 @@ static inline void
 queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb)
 {
 	spin_unlock(&hb->lock);
-	drop_futex_key_refs(&q->key);
 }
 
 /**
@@ -1480,8 +1478,6 @@ static void unqueue_me_pi(struct futex_q
 	q->pi_state = NULL;
 
 	spin_unlock(q->lock_ptr);
-
-	drop_futex_key_refs(&q->key);
 }
 
 /*
@@ -1812,7 +1808,10 @@ static int futex_wait(u32 __user *uaddr,
 	}
 
 retry:
-	/* Prepare to wait on uaddr. */
+	/*
+	 * Prepare to wait on uaddr. On success, holds hb lock and increments
+	 * q.key refs.
+	 */
 	ret = futex_wait_setup(uaddr, val, fshared, &q, &hb);
 	if (ret)
 		goto out;
@@ -1822,24 +1821,23 @@ retry:
 
 	/* If we were woken (and unqueued), we succeeded, whatever. */
 	ret = 0;
+	/* unqueue_me() drops q.key ref */
 	if (!unqueue_me(&q))
-		goto out_put_key;
+		goto out;
 	ret = -ETIMEDOUT;
 	if (to && !to->task)
-		goto out_put_key;
+		goto out;
 
 	/*
 	 * We expect signal_pending(current), but we might be the
 	 * victim of a spurious wakeup as well.
 	 */
-	if (!signal_pending(current)) {
-		put_futex_key(fshared, &q.key);
+	if (!signal_pending(current))
 		goto retry;
-	}
 
 	ret = -ERESTARTSYS;
 	if (!abs_time)
-		goto out_put_key;
+		goto out;
 
 	restart = &current_thread_info()->restart_block;
 	restart->fn = futex_wait_restart;
@@ -1856,8 +1854,6 @@ retry:
 
 	ret = -ERESTART_RESTARTBLOCK;
 
-out_put_key:
-	put_futex_key(fshared, &q.key);
 out:
 	if (to) {
 		hrtimer_cancel(&to->timer);
@@ -2236,7 +2232,10 @@ static int futex_wait_requeue_pi(u32 __u
 	q.rt_waiter = &rt_waiter;
 	q.requeue_pi_key = &key2;
 
-	/* Prepare to wait on uaddr. */
+	/*
+	 * Prepare to wait on uaddr. On success, increments q.key (key1) ref
+	 * count.
+	 */
 	ret = futex_wait_setup(uaddr, val, fshared, &q, &hb);
 	if (ret)
 		goto out_key2;
@@ -2254,7 +2253,9 @@ static int futex_wait_requeue_pi(u32 __u
 	 * In order for us to be here, we know our q.key == key2, and since
 	 * we took the hb->lock above, we also know that futex_requeue() has
 	 * completed and we no longer have to concern ourselves with a wakeup
-	 * race with the atomic proxy lock acquition by the requeue code.
+	 * race with the atomic proxy lock acquisition by the requeue code. The
+	 * futex_requeue dropped our key1 reference and incremented our key2
+	 * reference count.
 	 */
 
 	/* Check if the requeue code acquired the second futex for us. */



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

* [08/45] mm, x86: Saving vmcore with non-lazy freeing of vmas
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
@ 2010-11-19 21:42   ` Greg KH
  2010-11-19 21:42 ` [01/45] staging: usbip: Notify usb core of port status changes Greg KH
                     ` (44 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Cliff Wickman, kexec, Ingo Molnar

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Cliff Wickman <cpw@sgi.com>

commit 3ee48b6af49cf534ca2f481ecc484b156a41451d upstream.

During the reading of /proc/vmcore the kernel is doing
ioremap()/iounmap() repeatedly. And the buildup of un-flushed
vm_area_struct's is causing a great deal of overhead. (rb_next()
is chewing up most of that time).

This solution is to provide function set_iounmap_nonlazy(). It
causes a subsequent call to iounmap() to immediately purge the
vma area (with try_purge_vmap_area_lazy()).

With this patch we have seen the time for writing a 250MB
compressed dump drop from 71 seconds to 44 seconds.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: kexec@lists.infradead.org
LKML-Reference: <E1OwHZ4-0005WK-Tw@eag09.americas.sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/io.h       |    1 +
 arch/x86/kernel/crash_dump_64.c |    1 +
 mm/vmalloc.c                    |    9 +++++++++
 3 files changed, 11 insertions(+)

--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -172,6 +172,7 @@ static inline void __iomem *ioremap(reso
 
 extern void iounmap(volatile void __iomem *addr);
 
+extern void set_iounmap_nonlazy(void);
 
 #ifdef CONFIG_X86_32
 # include "io_32.h"
--- a/arch/x86/kernel/crash_dump_64.c
+++ b/arch/x86/kernel/crash_dump_64.c
@@ -46,6 +46,7 @@ ssize_t copy_oldmem_page(unsigned long p
 	} else
 		memcpy(buf, vaddr + offset, csize);
 
+	set_iounmap_nonlazy();
 	iounmap(vaddr);
 	return csize;
 }
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -513,6 +513,15 @@ static atomic_t vmap_lazy_nr = ATOMIC_IN
 static void purge_fragmented_blocks_allcpus(void);
 
 /*
+ * called before a call to iounmap() if the caller wants vm_area_struct's
+ * immediately freed.
+ */
+void set_iounmap_nonlazy(void)
+{
+	atomic_set(&vmap_lazy_nr, lazy_max_pages()+1);
+}
+
+/*
  * Purges all lazily-freed vmap areas.
  *
  * If sync is 0 then don't purge if there is already a purge in progress.



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

* [08/45] mm, x86: Saving vmcore with non-lazy freeing of vmas
@ 2010-11-19 21:42   ` Greg KH
  0 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ingo Molnar, kexec, Cliff Wickman, akpm, torvalds, stable-review, alan

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Cliff Wickman <cpw@sgi.com>

commit 3ee48b6af49cf534ca2f481ecc484b156a41451d upstream.

During the reading of /proc/vmcore the kernel is doing
ioremap()/iounmap() repeatedly. And the buildup of un-flushed
vm_area_struct's is causing a great deal of overhead. (rb_next()
is chewing up most of that time).

This solution is to provide function set_iounmap_nonlazy(). It
causes a subsequent call to iounmap() to immediately purge the
vma area (with try_purge_vmap_area_lazy()).

With this patch we have seen the time for writing a 250MB
compressed dump drop from 71 seconds to 44 seconds.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: kexec@lists.infradead.org
LKML-Reference: <E1OwHZ4-0005WK-Tw@eag09.americas.sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/io.h       |    1 +
 arch/x86/kernel/crash_dump_64.c |    1 +
 mm/vmalloc.c                    |    9 +++++++++
 3 files changed, 11 insertions(+)

--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -172,6 +172,7 @@ static inline void __iomem *ioremap(reso
 
 extern void iounmap(volatile void __iomem *addr);
 
+extern void set_iounmap_nonlazy(void);
 
 #ifdef CONFIG_X86_32
 # include "io_32.h"
--- a/arch/x86/kernel/crash_dump_64.c
+++ b/arch/x86/kernel/crash_dump_64.c
@@ -46,6 +46,7 @@ ssize_t copy_oldmem_page(unsigned long p
 	} else
 		memcpy(buf, vaddr + offset, csize);
 
+	set_iounmap_nonlazy();
 	iounmap(vaddr);
 	return csize;
 }
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -513,6 +513,15 @@ static atomic_t vmap_lazy_nr = ATOMIC_IN
 static void purge_fragmented_blocks_allcpus(void);
 
 /*
+ * called before a call to iounmap() if the caller wants vm_area_struct's
+ * immediately freed.
+ */
+void set_iounmap_nonlazy(void)
+{
+	atomic_set(&vmap_lazy_nr, lazy_max_pages()+1);
+}
+
+/*
  * Purges all lazily-freed vmap areas.
  *
  * If sync is 0 then don't purge if there is already a purge in progress.



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* [09/45] x86, cpu: Fix renamed, not-yet-shipping AMD CPUID feature bit
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (8 preceding siblings ...)
  2010-11-19 21:42   ` Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [10/45] x86, kexec: Make sure to stop all CPUs before exiting the kernel Greg KH
                   ` (35 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Andre Przywara, H. Peter Anvin

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

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

commit 7ef8aa72ab176e0288f363d1247079732c5d5792 upstream.

The AMD SSE5 feature set as-it has been replaced by some extensions
to the AVX instruction set. Thus the bit formerly advertised as SSE5
is re-used for one of these extensions (XOP).
Although this changes the /proc/cpuinfo output, it is not user visible, as
there are no CPUs (yet) having this feature.
To avoid confusion this should be added to the stable series, too.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
LKML-Reference: <1283778860-26843-2-git-send-email-andre.przywara@amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/cpufeature.h |    2 +-
 arch/x86/kvm/x86.c                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -150,7 +150,7 @@
 #define X86_FEATURE_3DNOWPREFETCH (6*32+ 8) /* 3DNow prefetch instructions */
 #define X86_FEATURE_OSVW	(6*32+ 9) /* OS Visible Workaround */
 #define X86_FEATURE_IBS		(6*32+10) /* Instruction Based Sampling */
-#define X86_FEATURE_SSE5	(6*32+11) /* SSE-5 */
+#define X86_FEATURE_XOP		(6*32+11) /* extended AVX instructions */
 #define X86_FEATURE_SKINIT	(6*32+12) /* SKINIT/STGI instructions */
 #define X86_FEATURE_WDT		(6*32+13) /* Watchdog timer */
 #define X86_FEATURE_NODEID_MSR	(6*32+19) /* NodeId MSR */
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1485,7 +1485,7 @@ static void do_cpuid_ent(struct kvm_cpui
 	const u32 kvm_supported_word6_x86_features =
 		F(LAHF_LM) | F(CMP_LEGACY) | F(SVM) | 0 /* ExtApicSpace */ |
 		F(CR8_LEGACY) | F(ABM) | F(SSE4A) | F(MISALIGNSSE) |
-		F(3DNOWPREFETCH) | 0 /* OSVW */ | 0 /* IBS */ | F(SSE5) |
+		F(3DNOWPREFETCH) | 0 /* OSVW */ | 0 /* IBS */ | F(XOP) |
 		0 /* SKINIT */ | 0 /* WDT */;
 
 	/* all calls to cpuid_count() should be made on the same cpu */



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

* [10/45] x86, kexec: Make sure to stop all CPUs before exiting the kernel
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (9 preceding siblings ...)
  2010-11-19 21:42 ` [09/45] x86, cpu: Fix renamed, not-yet-shipping AMD CPUID feature bit Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [11/45] x86, olpc: Dont retry EC commands forever Greg KH
                   ` (34 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Alok N Kataria,
	Eric W. Biederman, Jeremy Fitzhardinge, H. Peter Anvin

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Alok Kataria <akataria@vmware.com>

commit 76fac077db6b34e2c6383a7b4f3f4f7b7d06d8ce upstream.

x86 smp_ops now has a new op, stop_other_cpus which takes a parameter
"wait" this allows the caller to specify if it wants to stop until all
the cpus have processed the stop IPI.  This is required specifically
for the kexec case where we should wait for all the cpus to be stopped
before starting the new kernel.  We now wait for the cpus to stop in
all cases except for panic/kdump where we expect things to be broken
and we are doing our best to make things work anyway.

This patch fixes a legitimate regression, which was introduced during
2.6.30, by commit id 4ef702c10b5df18ab04921fc252c26421d4d6c75.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
LKML-Reference: <1286833028.1372.20.camel@ank32.eng.vmware.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/smp.h |    9 +++++++--
 arch/x86/kernel/reboot.c   |    2 +-
 arch/x86/kernel/smp.c      |   15 +++++++++------
 arch/x86/xen/enlighten.c   |    2 +-
 arch/x86/xen/smp.c         |    6 +++---
 5 files changed, 21 insertions(+), 13 deletions(-)

--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -50,7 +50,7 @@ struct smp_ops {
 	void (*smp_prepare_cpus)(unsigned max_cpus);
 	void (*smp_cpus_done)(unsigned max_cpus);
 
-	void (*smp_send_stop)(void);
+	void (*stop_other_cpus)(int wait);
 	void (*smp_send_reschedule)(int cpu);
 
 	int (*cpu_up)(unsigned cpu);
@@ -73,7 +73,12 @@ extern struct smp_ops smp_ops;
 
 static inline void smp_send_stop(void)
 {
-	smp_ops.smp_send_stop();
+	smp_ops.stop_other_cpus(0);
+}
+
+static inline void stop_other_cpus(void)
+{
+	smp_ops.stop_other_cpus(1);
 }
 
 static inline void smp_prepare_boot_cpu(void)
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -633,7 +633,7 @@ void native_machine_shutdown(void)
 	/* O.K Now that I'm on the appropriate processor,
 	 * stop all of the others.
 	 */
-	smp_send_stop();
+	stop_other_cpus();
 #endif
 
 	lapic_shutdown();
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -158,10 +158,10 @@ asmlinkage void smp_reboot_interrupt(voi
 	irq_exit();
 }
 
-static void native_smp_send_stop(void)
+static void native_stop_other_cpus(int wait)
 {
 	unsigned long flags;
-	unsigned long wait;
+	unsigned long timeout;
 
 	if (reboot_force)
 		return;
@@ -178,9 +178,12 @@ static void native_smp_send_stop(void)
 	if (num_online_cpus() > 1) {
 		apic->send_IPI_allbutself(REBOOT_VECTOR);
 
-		/* Don't wait longer than a second */
-		wait = USEC_PER_SEC;
-		while (num_online_cpus() > 1 && wait--)
+		/*
+		 * Don't wait longer than a second if the caller
+		 * didn't ask us to wait.
+		 */
+		timeout = USEC_PER_SEC;
+		while (num_online_cpus() > 1 && (wait || timeout--))
 			udelay(1);
 	}
 
@@ -226,7 +229,7 @@ struct smp_ops smp_ops = {
 	.smp_prepare_cpus	= native_smp_prepare_cpus,
 	.smp_cpus_done		= native_smp_cpus_done,
 
-	.smp_send_stop		= native_smp_send_stop,
+	.stop_other_cpus	= native_stop_other_cpus,
 	.smp_send_reschedule	= native_smp_send_reschedule,
 
 	.cpu_up			= native_cpu_up,
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -998,7 +998,7 @@ static void xen_reboot(int reason)
 	struct sched_shutdown r = { .reason = reason };
 
 #ifdef CONFIG_SMP
-	smp_send_stop();
+	stop_other_cpus();
 #endif
 
 	if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r))
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -396,9 +396,9 @@ static void stop_self(void *v)
 	BUG();
 }
 
-static void xen_smp_send_stop(void)
+static void xen_stop_other_cpus(int wait)
 {
-	smp_call_function(stop_self, NULL, 0);
+	smp_call_function(stop_self, NULL, wait);
 }
 
 static void xen_smp_send_reschedule(int cpu)
@@ -466,7 +466,7 @@ static const struct smp_ops xen_smp_ops
 	.cpu_disable = xen_cpu_disable,
 	.play_dead = xen_play_dead,
 
-	.smp_send_stop = xen_smp_send_stop,
+	.stop_other_cpus = xen_stop_other_cpus,
 	.smp_send_reschedule = xen_smp_send_reschedule,
 
 	.send_call_func_ipi = xen_smp_send_call_function_ipi,



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

* [11/45] x86, olpc: Dont retry EC commands forever
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (10 preceding siblings ...)
  2010-11-19 21:42 ` [10/45] x86, kexec: Make sure to stop all CPUs before exiting the kernel Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [12/45] x86, mtrr: Assume SYS_CFG[Tom2ForceMemTypeWB] exists on all future AMD CPUs Greg KH
                   ` (33 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Daniel Drake, dilinger, Ingo Molnar

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Paul Fox <pgf@laptop.org>

commit 286e5b97eb22baab9d9a41ca76c6b933a484252c upstream.

Avoids a potential infinite loop.

It was observed once, during an EC hacking/debugging
session - not in regular operation.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Cc: dilinger@queued.net
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/olpc.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/arch/x86/kernel/olpc.c
+++ b/arch/x86/kernel/olpc.c
@@ -115,6 +115,7 @@ int olpc_ec_cmd(unsigned char cmd, unsig
 	unsigned long flags;
 	int ret = -EIO;
 	int i;
+	int restarts = 0;
 
 	spin_lock_irqsave(&ec_lock, flags);
 
@@ -171,7 +172,9 @@ restart:
 			if (wait_on_obf(0x6c, 1)) {
 				printk(KERN_ERR "olpc-ec:  timeout waiting for"
 						" EC to provide data!\n");
-				goto restart;
+				if (restarts++ < 10)
+					goto restart;
+				goto err;
 			}
 			outbuf[i] = inb(0x68);
 			printk(KERN_DEBUG "olpc-ec:  received 0x%x\n",



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

* [12/45] x86, mtrr: Assume SYS_CFG[Tom2ForceMemTypeWB] exists on all future AMD CPUs
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (11 preceding siblings ...)
  2010-11-19 21:42 ` [11/45] x86, olpc: Dont retry EC commands forever Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [13/45] x86, intr-remap: Set redirection hint in the IRTE Greg KH
                   ` (32 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Andreas Herrmann, H. Peter Anvin

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Andreas Herrmann <andreas.herrmann3@amd.com>

commit 3fdbf004c1706480a7c7fac3c9d836fa6df20d7d upstream.

Instead of adapting the CPU family check in amd_special_default_mtrr()
for each new CPU family assume that all new AMD CPUs support the
necessary bits in SYS_CFG MSR.

Tom2Enabled is architectural (defined in APM Vol.2).
Tom2ForceMemTypeWB is defined in all BKDGs starting with K8 NPT.
In pre K8-NPT BKDG this bit is reserved (read as zero).

W/o this adaption Linux would unnecessarily complain about bad MTRR
settings on every new AMD CPU family, e.g.

[    0.000000] WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 4863MB of RAM.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100930123235.GB20545@loge.amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/cpu/mtrr/cleanup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/cpu/mtrr/cleanup.c
+++ b/arch/x86/kernel/cpu/mtrr/cleanup.c
@@ -948,7 +948,7 @@ int __init amd_special_default_mtrr(void
 
 	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
 		return 0;
-	if (boot_cpu_data.x86 < 0xf || boot_cpu_data.x86 > 0x11)
+	if (boot_cpu_data.x86 < 0xf)
 		return 0;
 	/* In case some hypervisor doesn't pass SYSCFG through: */
 	if (rdmsr_safe(MSR_K8_SYSCFG, &l, &h) < 0)



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

* [13/45] x86, intr-remap: Set redirection hint in the IRTE
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (12 preceding siblings ...)
  2010-11-19 21:42 ` [12/45] x86, mtrr: Assume SYS_CFG[Tom2ForceMemTypeWB] exists on all future AMD CPUs Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42   ` Greg KH
                   ` (31 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Suresh Siddha, Weidong Han,
	H. Peter Anvin

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Suresh Siddha <suresh.b.siddha@intel.com>

commit 75e3cfbed6f71a8f151dc6e413b6ce3c390030cb upstream.

Currently the redirection hint in the interrupt-remapping table entry
is set to 0, which means the remapped interrupt is directed to the
processors listed in the destination. So in logical flat mode
in the presence of intr-remapping, this results in a single
interrupt multi-casted to multiple cpu's as specified by the destination
bit mask. But what we really want is to send that interrupt to one of the cpus
based on the lowest priority delivery mode.

Set the redirection hint in the IRTE to '1' to indicate that we want
the remapped interrupt to be directed to only one of the processors
listed in the destination.

This fixes the issue of same interrupt getting delivered to multiple cpu's
in the logical flat mode in the presence of interrupt-remapping. While
there is no functional issue observed with this behavior, this will
impact performance of such configurations (<=8 cpu's using logical flat
mode in the presence of interrupt-remapping)

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <20100827181049.013051492@sbsiddha-MOBL3.sc.intel.com>
Cc: Weidong Han <weidong.han@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/apic/io_apic.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1410,6 +1410,7 @@ int setup_ioapic_entry(int apic_id, int
 		irte.dlvry_mode = apic->irq_delivery_mode;
 		irte.vector = vector;
 		irte.dest_id = IRTE_DEST(destination);
+		irte.redir_hint = 1;
 
 		/* Set source-id of interrupt request */
 		set_ioapic_sid(&irte, apic_id);
@@ -3289,6 +3290,7 @@ static int msi_compose_msg(struct pci_de
 		irte.dlvry_mode = apic->irq_delivery_mode;
 		irte.vector = cfg->vector;
 		irte.dest_id = IRTE_DEST(dest);
+		irte.redir_hint = 1;
 
 		/* Set source-id of interrupt request */
 		set_msi_sid(&irte, pdev);



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

* [14/45] x86, kdump: Change copy_oldmem_page() to use cached addressing
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
@ 2010-11-19 21:42   ` Greg KH
  2010-11-19 21:42 ` [01/45] staging: usbip: Notify usb core of port status changes Greg KH
                     ` (44 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Cliff Wickman,
	Eric W. Biederman, kexec, Ingo Molnar

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Cliff Wickman <cpw@sgi.com>

commit 37a2f9f30a360fb03522d15c85c78265ccd80287 upstream.

The copy of /proc/vmcore to a user buffer proceeds much faster
if the kernel addresses memory as cached.

With this patch we have seen an increase in transfer rate from
less than 15MB/s to 80-460MB/s, depending on size of the
transfer. This makes a big difference in time needed to save a
system dump.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: kexec@lists.infradead.org
LKML-Reference: <E1OtMLz-0001yp-Ia@eag09.americas.sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/crash_dump_64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/crash_dump_64.c
+++ b/arch/x86/kernel/crash_dump_64.c
@@ -34,7 +34,7 @@ ssize_t copy_oldmem_page(unsigned long p
 	if (!csize)
 		return 0;
 
-	vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
+	vaddr = ioremap_cache(pfn << PAGE_SHIFT, PAGE_SIZE);
 	if (!vaddr)
 		return -ENOMEM;
 



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

* [14/45] x86, kdump: Change copy_oldmem_page() to use cached addressing
@ 2010-11-19 21:42   ` Greg KH
  0 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ingo Molnar, kexec, Cliff Wickman, Eric W. Biederman, akpm,
	torvalds, stable-review, alan

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Cliff Wickman <cpw@sgi.com>

commit 37a2f9f30a360fb03522d15c85c78265ccd80287 upstream.

The copy of /proc/vmcore to a user buffer proceeds much faster
if the kernel addresses memory as cached.

With this patch we have seen an increase in transfer rate from
less than 15MB/s to 80-460MB/s, depending on size of the
transfer. This makes a big difference in time needed to save a
system dump.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: kexec@lists.infradead.org
LKML-Reference: <E1OtMLz-0001yp-Ia@eag09.americas.sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/crash_dump_64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/crash_dump_64.c
+++ b/arch/x86/kernel/crash_dump_64.c
@@ -34,7 +34,7 @@ ssize_t copy_oldmem_page(unsigned long p
 	if (!csize)
 		return 0;
 
-	vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
+	vaddr = ioremap_cache(pfn << PAGE_SHIFT, PAGE_SIZE);
 	if (!vaddr)
 		return -ENOMEM;
 



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* [15/45] KVM: SVM: Fix wrong intercept masks on 32 bit
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (14 preceding siblings ...)
  2010-11-19 21:42   ` Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [16/45] KVM: MMU: fix direct sps access corrupted Greg KH
                   ` (29 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: stable-review, torvalds, akpm, alan, avi, mtosatti, Jan Kiszka,
	Gleb Natapov, Joerg Roedel

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Joerg Roedel <joerg.roedel@amd.com>

commit 061e2fd16863009c8005b4b5fdfb75c7215c0b99 upstream.

This patch makes KVM on 32 bit SVM working again by
correcting the masks used for iret interception. With the
wrong masks the upper 32 bits of the intercepts are masked
out which leaves vmrun unintercepted. This is not legal on
svm and the vmrun fails.
Bug was introduced by commits 95ba827313 and 3cfc3092.

Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/svm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2111,7 +2111,7 @@ static int cpuid_interception(struct vcp
 static int iret_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run)
 {
 	++svm->vcpu.stat.nmi_window_exits;
-	svm->vmcb->control.intercept &= ~(1UL << INTERCEPT_IRET);
+	svm->vmcb->control.intercept &= ~(1ULL << INTERCEPT_IRET);
 	svm->vcpu.arch.hflags |= HF_IRET_MASK;
 	return 1;
 }
@@ -2506,7 +2506,7 @@ static void svm_inject_nmi(struct kvm_vc
 
 	svm->vmcb->control.event_inj = SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_NMI;
 	vcpu->arch.hflags |= HF_NMI_MASK;
-	svm->vmcb->control.intercept |= (1UL << INTERCEPT_IRET);
+	svm->vmcb->control.intercept |= (1ULL << INTERCEPT_IRET);
 	++vcpu->stat.nmi_injections;
 }
 



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

* [16/45] KVM: MMU: fix direct sps access corrupted
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (15 preceding siblings ...)
  2010-11-19 21:42 ` [15/45] KVM: SVM: Fix wrong intercept masks on 32 bit Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [17/45] KVM: MMU: fix conflict access permissions in direct sp Greg KH
                   ` (28 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: stable-review, torvalds, akpm, alan, Xiao Guangrong, Marcelo Tosatti

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>

commit 9e7b0e7fba45ca3c6357aeb7091ebc281f1de365 upstream.

If the mapping is writable but the dirty flag is not set, we will find
the read-only direct sp and setup the mapping, then if the write #PF
occur, we will mark this mapping writable in the read-only direct sp,
now, other real read-only mapping will happily write it without #PF.

It may hurt guest's COW

Fixed by re-install the mapping when write #PF occur.

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/paging_tmpl.h |   28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -318,8 +318,32 @@ static u64 *FNAME(fetch)(struct kvm_vcpu
 			break;
 		}
 
-		if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep))
-			continue;
+		if (is_shadow_present_pte(*sptep) && !is_large_pte(*sptep)) {
+			struct kvm_mmu_page *child;
+			unsigned direct_access;
+
+			if (level != gw->level)
+				continue;
+
+			/*
+			 * For the direct sp, if the guest pte's dirty bit
+			 * changed form clean to dirty, it will corrupt the
+			 * sp's access: allow writable in the read-only sp,
+			 * so we should update the spte at this point to get
+			 * a new sp with the correct access.
+			 */
+			direct_access = gw->pt_access & gw->pte_access;
+			if (!is_dirty_gpte(gw->ptes[gw->level - 1]))
+				direct_access &= ~ACC_WRITE_MASK;
+
+			child = page_header(*sptep & PT64_BASE_ADDR_MASK);
+			if (child->role.access == direct_access)
+				continue;
+
+			mmu_page_remove_parent_pte(child, sptep);
+			__set_spte(sptep, shadow_trap_nonpresent_pte);
+			kvm_flush_remote_tlbs(vcpu->kvm);
+		}
 
 		if (is_large_pte(*sptep)) {
 			rmap_remove(vcpu->kvm, sptep);



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

* [17/45] KVM: MMU: fix conflict access permissions in direct sp
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (16 preceding siblings ...)
  2010-11-19 21:42 ` [16/45] KVM: MMU: fix direct sps access corrupted Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [18/45] KVM: VMX: Fix host GDT.LIMIT corruption Greg KH
                   ` (27 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: stable-review, torvalds, akpm, alan, avi, mtosatti, Xiao Guangrong

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>

commit 5fd5387c89ec99ff6cb82d2477ffeb7211b781c2 upstream.

In no-direct mapping, we mark sp is 'direct' when we mapping the
guest's larger page, but its access is encoded form upper page-struct
entire not include the last mapping, it will cause access conflict.

For example, have this mapping:
        [W]
      / PDE1 -> |---|
  P[W]          |   | LPA
      \ PDE2 -> |---|
        [R]

P have two children, PDE1 and PDE2, both PDE1 and PDE2 mapping the
same lage page(LPA). The P's access is WR, PDE1's access is WR,
PDE2's access is RO(just consider read-write permissions here)

When guest access PDE1, we will create a direct sp for LPA, the sp's
access is from P, is W, then we will mark the ptes is W in this sp.

Then, guest access PDE2, we will find LPA's shadow page, is the same as
PDE's, and mark the ptes is RO.

So, if guest access PDE1, the incorrect #PF is occured.

Fixed by encode the last mapping access into direct shadow page

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/paging_tmpl.h |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -360,6 +360,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu
 			/* advance table_gfn when emulating 1gb pages with 4k */
 			if (delta == 0)
 				table_gfn += PT_INDEX(addr, level);
+			access &= gw->pte_access;
 		} else {
 			direct = 0;
 			table_gfn = gw->table_gfn[level - 2];



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

* [18/45] KVM: VMX: Fix host GDT.LIMIT corruption
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (17 preceding siblings ...)
  2010-11-19 21:42 ` [17/45] KVM: MMU: fix conflict access permissions in direct sp Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:42 ` [19/45] KVM: SVM: Adjust tsc_offset only if tsc_unstable Greg KH
                   ` (26 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: stable-review, torvalds, akpm, alan, avi, mtosatti

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Avi Kivity <avi@redhat.com>

commit 3444d7da1839b851eefedd372978d8a982316c36 upstream.

vmx does not restore GDT.LIMIT to the host value, instead it sets it to 64KB.
This means host userspace can learn a few bits of host memory.

Fix by reloading GDTR when we load other host state.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/vmx.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -130,6 +130,7 @@ static u64 construct_eptp(unsigned long
 static DEFINE_PER_CPU(struct vmcs *, vmxarea);
 static DEFINE_PER_CPU(struct vmcs *, current_vmcs);
 static DEFINE_PER_CPU(struct list_head, vcpus_on_cpu);
+static DEFINE_PER_CPU(struct desc_ptr, host_gdt);
 
 static unsigned long *vmx_io_bitmap_a;
 static unsigned long *vmx_io_bitmap_b;
@@ -690,6 +691,7 @@ static void __vmx_load_host_state(struct
 	save_msrs(vmx->guest_msrs, vmx->save_nmsrs);
 	load_msrs(vmx->host_msrs, vmx->save_nmsrs);
 	reload_host_efer(vmx);
+	load_gdt(&__get_cpu_var(host_gdt));
 }
 
 static void vmx_load_host_state(struct vcpu_vmx *vmx)
@@ -1176,6 +1178,8 @@ static void hardware_enable(void *garbag
 	asm volatile (ASM_VMX_VMXON_RAX
 		      : : "a"(&phys_addr), "m"(phys_addr)
 		      : "memory", "cc");
+
+	store_gdt(&__get_cpu_var(host_gdt));
 }
 
 static void vmclear_local_vcpus(void)



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

* [19/45] KVM: SVM: Adjust tsc_offset only if tsc_unstable
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (18 preceding siblings ...)
  2010-11-19 21:42 ` [18/45] KVM: VMX: Fix host GDT.LIMIT corruption Greg KH
@ 2010-11-19 21:42 ` Greg KH
  2010-11-19 21:43 ` [20/45] KVM: x86: Fix SVM VMCB reset Greg KH
                   ` (25 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:42 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: stable-review, torvalds, akpm, alan, avi, mtosatti, Joerg Roedel

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Joerg Roedel <joerg.roedel@amd.com>

commit 953899b659adce62cbe83d6a7527550ab8797c48 upstream.

The tsc_offset adjustment in svm_vcpu_load is executed
unconditionally even if Linux considers the host tsc as
stable. This causes a Linux guest detecting an unstable tsc
in any case.
This patch removes the tsc_offset adjustment if the host tsc
is stable. The guest will now get the benefit of a stable
tsc too.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/svm.c |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -795,17 +795,18 @@ static void svm_vcpu_load(struct kvm_vcp
 	int i;
 
 	if (unlikely(cpu != vcpu->cpu)) {
-		u64 tsc_this, delta;
+		u64 delta;
 
-		/*
-		 * Make sure that the guest sees a monotonically
-		 * increasing TSC.
-		 */
-		rdtscll(tsc_this);
-		delta = vcpu->arch.host_tsc - tsc_this;
-		svm->vmcb->control.tsc_offset += delta;
-		if (is_nested(svm))
-			svm->nested.hsave->control.tsc_offset += delta;
+		if (check_tsc_unstable()) {
+			/*
+			 * Make sure that the guest sees a monotonically
+			 * increasing TSC.
+			 */
+			delta = vcpu->arch.host_tsc - native_read_tsc();
+			svm->vmcb->control.tsc_offset += delta;
+			if (is_nested(svm))
+				svm->nested.hsave->control.tsc_offset += delta;
+		}
 		vcpu->cpu = cpu;
 		kvm_migrate_timers(vcpu);
 		svm->asid_generation = 0;



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

* [20/45] KVM: x86: Fix SVM VMCB reset
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (19 preceding siblings ...)
  2010-11-19 21:42 ` [19/45] KVM: SVM: Adjust tsc_offset only if tsc_unstable Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [21/45] [PATCH 7/8] KVM: x86: Move TSC reset out of vmcb_init Greg KH
                   ` (24 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: stable-review, torvalds, akpm, alan, avi, mtosatti, Zachary Amsden

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Zachary Amsden <zamsden@redhat.com>

commit 58877679fd393d3ef71aa383031ac7817561463d upstream.

On reset, VMCB TSC should be set to zero.  Instead, code was setting
tsc_offset to zero, which passes through the underlying TSC.

Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/svm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -621,7 +621,7 @@ static void init_vmcb(struct vcpu_svm *s
 
 	control->iopm_base_pa = iopm_base;
 	control->msrpm_base_pa = __pa(svm->msrpm);
-	control->tsc_offset = 0;
+	control->tsc_offset = 0-native_read_tsc();
 	control->int_ctl = V_INTR_MASKING_MASK;
 
 	init_seg(&save->es);



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

* [21/45] [PATCH 7/8] KVM: x86: Move TSC reset out of vmcb_init
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (20 preceding siblings ...)
  2010-11-19 21:43 ` [20/45] KVM: x86: Fix SVM VMCB reset Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [22/45] KVM: Fix fs/gs reload oops with invalid ldt Greg KH
                   ` (23 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: stable-review, torvalds, akpm, alan, avi, mtosatti, Zachary Amsden

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Zachary Amsden <zamsden@redhat.com>

commit 47008cd887c1836bcadda123ba73e1863de7a6c4 upstream.

The VMCB is reset whenever we receive a startup IPI, so Linux is setting
TSC back to zero happens very late in the boot process and destabilizing
the TSC.  Instead, just set TSC to zero once at VCPU creation time.

Why the separate patch?  So git-bisect is your friend.

Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/svm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -621,7 +621,6 @@ static void init_vmcb(struct vcpu_svm *s
 
 	control->iopm_base_pa = iopm_base;
 	control->msrpm_base_pa = __pa(svm->msrpm);
-	control->tsc_offset = 0-native_read_tsc();
 	control->int_ctl = V_INTR_MASKING_MASK;
 
 	init_seg(&save->es);
@@ -754,6 +753,7 @@ static struct kvm_vcpu *svm_create_vcpu(
 	svm->vmcb_pa = page_to_pfn(page) << PAGE_SHIFT;
 	svm->asid_generation = 0;
 	init_vmcb(svm);
+	svm->vmcb->control.tsc_offset = 0-native_read_tsc();
 
 	fx_init(&svm->vcpu);
 	svm->vcpu.fpu_active = 1;



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

* [22/45] KVM: Fix fs/gs reload oops with invalid ldt
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (21 preceding siblings ...)
  2010-11-19 21:43 ` [21/45] [PATCH 7/8] KVM: x86: Move TSC reset out of vmcb_init Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [23/45] pipe: fix failure to return error code on ->confirm() Greg KH
                   ` (22 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: stable-review, torvalds, akpm, alan, avi, mtosatti

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Avi Kivity <avi@redhat.com>

commit 9581d442b9058d3699b4be568b6e5eae38a41493 upstream

kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.

Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.

This is CVE-2010-3698.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/kvm_host.h |   24 ------------------------
 arch/x86/kvm/svm.c              |   15 ++++++++++-----
 arch/x86/kvm/vmx.c              |   24 +++++++++---------------
 3 files changed, 19 insertions(+), 44 deletions(-)

--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -674,20 +674,6 @@ static inline struct kvm_mmu_page *page_
 	return (struct kvm_mmu_page *)page_private(page);
 }
 
-static inline u16 kvm_read_fs(void)
-{
-	u16 seg;
-	asm("mov %%fs, %0" : "=g"(seg));
-	return seg;
-}
-
-static inline u16 kvm_read_gs(void)
-{
-	u16 seg;
-	asm("mov %%gs, %0" : "=g"(seg));
-	return seg;
-}
-
 static inline u16 kvm_read_ldt(void)
 {
 	u16 ldt;
@@ -695,16 +681,6 @@ static inline u16 kvm_read_ldt(void)
 	return ldt;
 }
 
-static inline void kvm_load_fs(u16 sel)
-{
-	asm("mov %0, %%fs" : : "rm"(sel));
-}
-
-static inline void kvm_load_gs(u16 sel)
-{
-	asm("mov %0, %%gs" : : "rm"(sel));
-}
-
 static inline void kvm_load_ldt(u16 sel)
 {
 	asm("lldt %0" : : "rm"(sel));
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2698,8 +2698,8 @@ static void svm_vcpu_run(struct kvm_vcpu
 	sync_lapic_to_cr8(vcpu);
 
 	save_host_msrs(vcpu);
-	fs_selector = kvm_read_fs();
-	gs_selector = kvm_read_gs();
+	savesegment(fs, fs_selector);
+	savesegment(gs, gs_selector);
 	ldt_selector = kvm_read_ldt();
 	svm->vmcb->save.cr2 = vcpu->arch.cr2;
 	/* required for live migration with NPT */
@@ -2786,10 +2786,15 @@ static void svm_vcpu_run(struct kvm_vcpu
 	vcpu->arch.regs[VCPU_REGS_RSP] = svm->vmcb->save.rsp;
 	vcpu->arch.regs[VCPU_REGS_RIP] = svm->vmcb->save.rip;
 
-	kvm_load_fs(fs_selector);
-	kvm_load_gs(gs_selector);
-	kvm_load_ldt(ldt_selector);
 	load_host_msrs(vcpu);
+	loadsegment(fs, fs_selector);
+#ifdef CONFIG_X86_64
+	load_gs_index(gs_selector);
+	wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs);
+#else
+	loadsegment(gs, gs_selector);
+#endif
+	kvm_load_ldt(ldt_selector);
 
 	reload_tss(vcpu);
 
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -629,7 +629,7 @@ static void vmx_save_host_state(struct k
 	 */
 	vmx->host_state.ldt_sel = kvm_read_ldt();
 	vmx->host_state.gs_ldt_reload_needed = vmx->host_state.ldt_sel;
-	vmx->host_state.fs_sel = kvm_read_fs();
+	savesegment(fs, vmx->host_state.fs_sel);
 	if (!(vmx->host_state.fs_sel & 7)) {
 		vmcs_write16(HOST_FS_SELECTOR, vmx->host_state.fs_sel);
 		vmx->host_state.fs_reload_needed = 0;
@@ -637,7 +637,7 @@ static void vmx_save_host_state(struct k
 		vmcs_write16(HOST_FS_SELECTOR, 0);
 		vmx->host_state.fs_reload_needed = 1;
 	}
-	vmx->host_state.gs_sel = kvm_read_gs();
+	savesegment(gs, vmx->host_state.gs_sel);
 	if (!(vmx->host_state.gs_sel & 7))
 		vmcs_write16(HOST_GS_SELECTOR, vmx->host_state.gs_sel);
 	else {
@@ -665,27 +665,21 @@ static void vmx_save_host_state(struct k
 
 static void __vmx_load_host_state(struct vcpu_vmx *vmx)
 {
-	unsigned long flags;
-
 	if (!vmx->host_state.loaded)
 		return;
 
 	++vmx->vcpu.stat.host_state_reload;
 	vmx->host_state.loaded = 0;
 	if (vmx->host_state.fs_reload_needed)
-		kvm_load_fs(vmx->host_state.fs_sel);
+		loadsegment(fs, vmx->host_state.fs_sel);
 	if (vmx->host_state.gs_ldt_reload_needed) {
 		kvm_load_ldt(vmx->host_state.ldt_sel);
-		/*
-		 * If we have to reload gs, we must take care to
-		 * preserve our gs base.
-		 */
-		local_irq_save(flags);
-		kvm_load_gs(vmx->host_state.gs_sel);
 #ifdef CONFIG_X86_64
-		wrmsrl(MSR_GS_BASE, vmcs_readl(HOST_GS_BASE));
+		load_gs_index(vmx->host_state.gs_sel);
+		wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs);
+#else
+		loadsegment(gs, vmx->host_state.gs_sel);
 #endif
-		local_irq_restore(flags);
 	}
 	reload_tss();
 	save_msrs(vmx->guest_msrs, vmx->save_nmsrs);
@@ -2342,8 +2336,8 @@ static int vmx_vcpu_setup(struct vcpu_vm
 	vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS);  /* 22.2.4 */
 	vmcs_write16(HOST_DS_SELECTOR, __KERNEL_DS);  /* 22.2.4 */
 	vmcs_write16(HOST_ES_SELECTOR, __KERNEL_DS);  /* 22.2.4 */
-	vmcs_write16(HOST_FS_SELECTOR, kvm_read_fs());    /* 22.2.4 */
-	vmcs_write16(HOST_GS_SELECTOR, kvm_read_gs());    /* 22.2.4 */
+	vmcs_write16(HOST_FS_SELECTOR, 0);            /* 22.2.4 */
+	vmcs_write16(HOST_GS_SELECTOR, 0);            /* 22.2.4 */
 	vmcs_write16(HOST_SS_SELECTOR, __KERNEL_DS);  /* 22.2.4 */
 #ifdef CONFIG_X86_64
 	rdmsrl(MSR_FS_BASE, a);



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

* [23/45] pipe: fix failure to return error code on ->confirm()
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (22 preceding siblings ...)
  2010-11-19 21:43 ` [22/45] KVM: Fix fs/gs reload oops with invalid ldt Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [24/45] p54usb: fix off-by-one on !CONFIG_PM Greg KH
                   ` (21 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Nicolas Kaiser, Jens Axboe

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Nicolas Kaiser <nikai@nikai.net>

commit e5953cbdff26f7cbae7eff30cd9b18c4e19b7594 upstream.

The arguments were transposed, we want to assign the error code to
'ret', which is being returned.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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

--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -363,7 +363,7 @@ pipe_read(struct kiocb *iocb, const stru
 			error = ops->confirm(pipe, buf);
 			if (error) {
 				if (!ret)
-					error = ret;
+					ret = error;
 				break;
 			}
 



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

* [24/45] p54usb: fix off-by-one on !CONFIG_PM
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (23 preceding siblings ...)
  2010-11-19 21:43 ` [23/45] pipe: fix failure to return error code on ->confirm() Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [25/45] p54usb: add five more USBIDs Greg KH
                   ` (20 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Christian Lamparter,
	John W. Linville

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Christian Lamparter <chunkeey@googlemail.com>

commit 11791a6f7534906b4a01ffb54ba0b02ca39398ef upstream.

The ISL3887 chip needs a USB reset, whenever the
usb-frontend module "p54usb" is reloaded.

This patch fixes an off-by-one bug, if the user
is running a kernel without the CONFIG_PM option
set and for some reason (e.g.: compat-wireless)
wants to switch between different p54usb modules.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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

--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -929,8 +929,8 @@ static int __devinit p54u_probe(struct u
 #ifdef CONFIG_PM
 		/* ISL3887 needs a full reset on resume */
 		udev->reset_resume = 1;
+#endif /* CONFIG_PM */
 		err = p54u_device_reset(dev);
-#endif
 
 		priv->hw_type = P54U_3887;
 		dev->extra_tx_headroom += sizeof(struct lm87_tx_hdr);



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

* [25/45] p54usb: add five more USBIDs
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (24 preceding siblings ...)
  2010-11-19 21:43 ` [24/45] p54usb: fix off-by-one on !CONFIG_PM Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [26/45] drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure Greg KH
                   ` (19 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Christian Lamparter,
	John W. Linville

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Christian Lamparter <chunkeey@googlemail.com>

commit 1a92795dac419128eb511dce30a6aad672064b88 upstream.

Source:
http://www.wikidevi.com/wiki/Intersil/p54/usb/windows

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/p54/p54usb.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -32,8 +32,17 @@ MODULE_ALIAS("prism54usb");
 MODULE_FIRMWARE("isl3886usb");
 MODULE_FIRMWARE("isl3887usb");
 
+/*
+ * Note:
+ *
+ * Always update our wiki's device list (located at:
+ * http://wireless.kernel.org/en/users/Drivers/p54/devices ),
+ * whenever you add a new device.
+ */
+
 static struct usb_device_id p54u_table[] __devinitdata = {
 	/* Version 1 devices (pci chip + net2280) */
+	{USB_DEVICE(0x045e, 0x00c2)},	/* Microsoft MN-710 */
 	{USB_DEVICE(0x0506, 0x0a11)},	/* 3COM 3CRWE254G72 */
 	{USB_DEVICE(0x0707, 0xee06)},	/* SMC 2862W-G */
 	{USB_DEVICE(0x07aa, 0x001c)},	/* Corega CG-WLUSB2GT */
@@ -45,7 +54,9 @@ static struct usb_device_id p54u_table[]
 	{USB_DEVICE(0x0846, 0x4220)},	/* Netgear WG111 */
 	{USB_DEVICE(0x09aa, 0x1000)},	/* Spinnaker Proto board */
 	{USB_DEVICE(0x0cde, 0x0006)},	/* Medion 40900, Roper Europe */
+	{USB_DEVICE(0x107b, 0x55f2)},	/* Gateway WGU-210 (Gemtek) */
 	{USB_DEVICE(0x124a, 0x4023)},	/* Shuttle PN15, Airvast WM168g, IOGear GWU513 */
+	{USB_DEVICE(0x1630, 0x0005)},	/* 2Wire 802.11g USB (v1) / Z-Com */
 	{USB_DEVICE(0x1915, 0x2234)},	/* Linksys WUSB54G OEM */
 	{USB_DEVICE(0x1915, 0x2235)},	/* Linksys WUSB54G Portable OEM */
 	{USB_DEVICE(0x2001, 0x3701)},	/* DLink DWL-G120 Spinnaker */
@@ -58,6 +69,7 @@ static struct usb_device_id p54u_table[]
 	{USB_DEVICE(0x050d, 0x7050)},	/* Belkin F5D7050 ver 1000 */
 	{USB_DEVICE(0x0572, 0x2000)},	/* Cohiba Proto board */
 	{USB_DEVICE(0x0572, 0x2002)},	/* Cohiba Proto board */
+	{USB_DEVICE(0x06a9, 0x000e)},	/* Westell 802.11g USB (A90-211WG-01) */
 	{USB_DEVICE(0x06b9, 0x0121)},	/* Thomson SpeedTouch 121g */
 	{USB_DEVICE(0x0707, 0xee13)},   /* SMC 2862W-G version 2 */
 	{USB_DEVICE(0x083a, 0x4521)},   /* Siemens Gigaset USB Adapter 54 version 2 */
@@ -77,6 +89,7 @@ static struct usb_device_id p54u_table[]
 	{USB_DEVICE(0x13B1, 0x000C)},	/* Linksys WUSB54AG */
 	{USB_DEVICE(0x1413, 0x5400)},   /* Telsey 802.11g USB2.0 Adapter */
 	{USB_DEVICE(0x1435, 0x0427)},	/* Inventel UR054G */
+	{USB_DEVICE(0x1668, 0x1050)},	/* Actiontec 802UIG-1 */
 	{USB_DEVICE(0x2001, 0x3704)},	/* DLink DWL-G122 rev A2 */
 	{USB_DEVICE(0x413c, 0x5513)},	/* Dell WLA3310 USB Wireless Adapter */
 	{USB_DEVICE(0x413c, 0x8102)},	/* Spinnaker DUT */



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

* [26/45] drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (25 preceding siblings ...)
  2010-11-19 21:43 ` [25/45] p54usb: add five more USBIDs Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [27/45] USB: ftdi_sio: Add PID for accesio products Greg KH
                   ` (18 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Julia Lawall,
	Christian Lamparter, John W. Linville

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Julia Lawall <julia@diku.dk>

commit 0d91f22b75347d9503b17a42b6c74d3f7750acd6 upstream.

In this code, 0 is returned on memory allocation failure, even though other
failures return -ENOMEM or other similar values.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression ret;
expression x,e1,e2,e3;
@@

ret = 0
... when != ret = e1
*x = \(kmalloc\|kcalloc\|kzalloc\)(...)
... when != ret = e2
if (x == NULL) { ... when != ret = e3
  return ret;
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/p54/eeprom.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/net/wireless/p54/eeprom.c
+++ b/drivers/net/wireless/p54/eeprom.c
@@ -261,8 +261,10 @@ static int p54_generate_channel_lists(st
 	list->max_entries = max_channel_num;
 	list->channels = kzalloc(sizeof(struct p54_channel_entry) *
 				 max_channel_num, GFP_KERNEL);
-	if (!list->channels)
+	if (!list->channels) {
+		ret = -ENOMEM;
 		goto free;
+	}
 
 	for (i = 0; i < max_channel_num; i++) {
 		if (i < priv->iq_autocal_len) {



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

* [27/45] USB: ftdi_sio: Add PID for accesio products
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (26 preceding siblings ...)
  2010-11-19 21:43 ` [26/45] drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [28/45] USB: add PID for FTDI based OpenDCC hardware Greg KH
                   ` (17 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Rich Mattes

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Rich Mattes <richmattes@gmail.com>

commit 3126d8236ca6f68eb8292c6af22c2e59afbeef24 upstream.

Adds support for Accesio USB to Serial adapters, which are built around
FTDI FT232 UARTs.  Tested with the Accesio USB-COM-4SM.

Signed-off-by: Rich Mattes <richmattes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c     |    1 +
 drivers/usb/serial/ftdi_sio_ids.h |    6 ++++++
 2 files changed, 7 insertions(+)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -757,6 +757,7 @@ static struct usb_device_id id_table_com
 	{ USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID),
 		.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
 	{ USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) },
+	{ USB_DEVICE(FTDI_VID, ACCESIO_COM4SM_PID) },
 	{ USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID),
 		.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
 	{ USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_24_MASTER_WING_PID) },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1070,3 +1070,9 @@
  * Submitted by John G. Rogers
  */
 #define SEGWAY_RMP200_PID	0xe729
+
+
+/*
+ * Accesio USB Data Acquisition products (http://www.accesio.com/)
+ */
+#define ACCESIO_COM4SM_PID 	0xD578



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

* [28/45] USB: add PID for FTDI based OpenDCC hardware
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (27 preceding siblings ...)
  2010-11-19 21:43 ` [27/45] USB: ftdi_sio: Add PID for accesio products Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [29/45] USB: ftdi_sio: new VID/PIDs for various Papouch devices Greg KH
                   ` (16 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Rainer Keller

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Rainer Keller <mail@rainerkeller.de>

commit 99c1e4f89d1033444ce4d0c064bd2826e81c3775 upstream.

The OpenDCC project is developing a new hardware. This patch adds its
PID to the list of known FTDI devices. The PID can be found at
http://www.opendcc.de/elektronik/usb/opendcc_usb.html

Signed-off-by: Rainer Keller <mail@rainerkeller.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c     |    1 +
 drivers/usb/serial/ftdi_sio_ids.h |    1 +
 2 files changed, 2 insertions(+)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -182,6 +182,7 @@ static struct usb_device_id id_table_com
 	{ USB_DEVICE(FTDI_VID, FTDI_OPENDCC_SNIFFER_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_OPENDCC_THROTTLE_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GATEWAY_PID) },
+	{ USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_PID) },
 	{ USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
 	{ USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -61,6 +61,7 @@
 #define FTDI_OPENDCC_SNIFFER_PID	0xBFD9
 #define FTDI_OPENDCC_THROTTLE_PID	0xBFDA
 #define FTDI_OPENDCC_GATEWAY_PID	0xBFDB
+#define FTDI_OPENDCC_GBM_PID	0xBFDC
 
 /*
  * RR-CirKits LocoBuffer USB (http://www.rr-cirkits.com)



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

* [29/45] USB: ftdi_sio: new VID/PIDs for various Papouch devices
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (28 preceding siblings ...)
  2010-11-19 21:43 ` [28/45] USB: add PID for FTDI based OpenDCC hardware Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [30/45] USB: ftdi_sio: add device ids for ScienceScope Greg KH
                   ` (15 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Daniel Suchy

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Daniel Suchy <danny@danysek.cz>

commit 59c6ccd9f9aecfa59c99ceba6d4d34b180547a05 upstream.

This patch for FTDI USB serial driver ads new VID/PIDs used on various
devices manufactured by Papouch (http://www.papouch.com). These devices
have their own VID/PID, although they're using standard FTDI chip. In
ftdi_sio.c, I also made small cleanup to have declarations for all
Papouch devices together.

Signed-off-by: Daniel Suchy <danny@danysek.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c     |   30 +++++++++++++++++++++++++++++-
 drivers/usb/serial/ftdi_sio_ids.h |   27 ++++++++++++++++++++++++++-
 2 files changed, 55 insertions(+), 2 deletions(-)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -681,7 +681,6 @@ static struct usb_device_id id_table_com
 	{ USB_DEVICE(FTDI_VID, FTDI_RRCIRKITS_LOCOBUFFER_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ASK_RDR400_PID) },
 	{ USB_DEVICE(ICOM_ID1_VID, ICOM_ID1_PID) },
-	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_TMU_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ACG_HFDUAL_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_YEI_SERVOCENTER31_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_THORLABS_PID) },
@@ -722,8 +721,37 @@ static struct usb_device_id id_table_com
 		.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
 	{ USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) },
 	{ USB_DEVICE(FTDI_VID, FTDI_REU_TINY_PID) },
+
+	/* Papouch devices based on FTDI chip */
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_AP485_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB422_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485_2_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_AP485_2_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB422_2_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485S_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB485C_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_LEC_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_SB232_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_TMU_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_IRAMP_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_DRAK5_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO8x8_PID) },
 	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO2x2_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO10x1_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO30x3_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO60x3_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO2x16_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO3x32_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_DRAK6_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_UPSUSB_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_MU_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_SIMUKEY_PID) },
 	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_AD4USB_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_GMUX_PID) },
+	{ USB_DEVICE(PAPOUCH_VID, PAPOUCH_GMSR_PID) },
+
 	{ USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) },
 	{ USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1030,9 +1030,34 @@
  */
 
 #define PAPOUCH_VID			0x5050	/* Vendor ID */
+#define PAPOUCH_SB485_PID		0x0100	/* Papouch SB485 USB-485/422 Converter */
+#define PAPOUCH_AP485_PID		0x0101	/* AP485 USB-RS485 Converter */
+#define PAPOUCH_SB422_PID		0x0102	/* Papouch SB422 USB-RS422 Converter  */
+#define PAPOUCH_SB485_2_PID		0x0103	/* Papouch SB485 USB-485/422 Converter */
+#define PAPOUCH_AP485_2_PID		0x0104	/* AP485 USB-RS485 Converter */
+#define PAPOUCH_SB422_2_PID		0x0105	/* Papouch SB422 USB-RS422 Converter  */
+#define PAPOUCH_SB485S_PID		0x0106	/* Papouch SB485S USB-485/422 Converter */
+#define PAPOUCH_SB485C_PID		0x0107	/* Papouch SB485C USB-485/422 Converter */
+#define PAPOUCH_LEC_PID			0x0300	/* LEC USB Converter */
+#define PAPOUCH_SB232_PID		0x0301	/* Papouch SB232 USB-RS232 Converter */
 #define PAPOUCH_TMU_PID			0x0400	/* TMU USB Thermometer */
-#define PAPOUCH_QUIDO4x4_PID		0x0900	/* Quido 4/4 Module */
+#define PAPOUCH_IRAMP_PID		0x0500	/* Papouch IRAmp Duplex */
+#define PAPOUCH_DRAK5_PID		0x0700	/* Papouch DRAK5 */
+#define PAPOUCH_QUIDO8x8_PID		0x0800	/* Papouch Quido 8/8 Module */
+#define PAPOUCH_QUIDO4x4_PID		0x0900	/* Papouch Quido 4/4 Module */
+#define PAPOUCH_QUIDO2x2_PID		0x0a00	/* Papouch Quido 2/2 Module */
+#define PAPOUCH_QUIDO10x1_PID		0x0b00	/* Papouch Quido 10/1 Module */
+#define PAPOUCH_QUIDO30x3_PID		0x0c00	/* Papouch Quido 30/3 Module */
+#define PAPOUCH_QUIDO60x3_PID		0x0d00	/* Papouch Quido 60(100)/3 Module */
+#define PAPOUCH_QUIDO2x16_PID		0x0e00	/* Papouch Quido 2/16 Module */
+#define PAPOUCH_QUIDO3x32_PID		0x0f00	/* Papouch Quido 3/32 Module */
+#define PAPOUCH_DRAK6_PID		0x1000	/* Papouch DRAK6 */
+#define PAPOUCH_UPSUSB_PID		0x8000	/* Papouch UPS-USB adapter */
+#define PAPOUCH_MU_PID			0x8001	/* MU controller */
+#define PAPOUCH_SIMUKEY_PID		0x8002	/* Papouch SimuKey */
 #define PAPOUCH_AD4USB_PID		0x8003	/* AD4USB Measurement Module */
+#define PAPOUCH_GMUX_PID		0x8004	/* Papouch GOLIATH MUX */
+#define PAPOUCH_GMSR_PID		0x8005	/* Papouch GOLIATH MSR */
 
 /*
  * Marvell SheevaPlug



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

* [30/45] USB: ftdi_sio: add device ids for ScienceScope
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (29 preceding siblings ...)
  2010-11-19 21:43 ` [29/45] USB: ftdi_sio: new VID/PIDs for various Papouch devices Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [31/45] usb: musb: blackfin: call gpio_free() on error path in musb_platform_init() Greg KH
                   ` (14 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Kuba Ober

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Greg Kroah-Hartman <gregkh@suse.de>

commit 0f266abd70cd83571eca019f764b5f1992da7361 upstream.

This adds the requested device ids to the ftdi_sio driver.

Reported-by: Ewan Bingham <ewan@auc.co.uk>
Cc: Kuba Ober <kuba@mareimbrium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c     |    3 +++
 drivers/usb/serial/ftdi_sio_ids.h |    5 +++++
 2 files changed, 8 insertions(+)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -797,6 +797,9 @@ static struct usb_device_id id_table_com
 	{ USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MAXI_WING_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_MEDIA_WING_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_CHAMSYS_WING_PID) },
+	{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) },
+	{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) },
+	{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) },
 	{ },					/* Optional parameter entry */
 	{ }					/* Terminating entry */
 };
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1102,3 +1102,8 @@
  * Accesio USB Data Acquisition products (http://www.accesio.com/)
  */
 #define ACCESIO_COM4SM_PID 	0xD578
+
+/* www.sciencescope.co.uk educational dataloggers */
+#define FTDI_SCIENCESCOPE_LOGBOOKML_PID		0xFF18
+#define FTDI_SCIENCESCOPE_LS_LOGBOOK_PID	0xFF1C
+#define FTDI_SCIENCESCOPE_HS_LOGBOOK_PID	0xFF1D



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

* [31/45] usb: musb: blackfin: call gpio_free() on error path in musb_platform_init()
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (30 preceding siblings ...)
  2010-11-19 21:43 ` [30/45] USB: ftdi_sio: add device ids for ScienceScope Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [32/45] USB: option: Add more ZTE modem USB ids Greg KH
                   ` (13 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Sergei Shtylyov,
	Mike Frysinger, Felipe Balbi

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Sergei Shtylyov <sshtylyov@ru.mvista.com>

commit 00be545e49d83485d49a598d3b7e090088934be8 upstream.

Blackfin's musb_platform_init() needs to call gpio_free() for error cleanup iff
otg_get_transceiver() call returns NULL.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/musb/blackfin.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -248,8 +248,10 @@ int __init musb_platform_init(struct mus
 
 	usb_nop_xceiv_register();
 	musb->xceiv = otg_get_transceiver();
-	if (!musb->xceiv)
+	if (!musb->xceiv) {
+		gpio_free(musb->config->gpio_vrsel);
 		return -ENODEV;
+	}
 
 	if (ANOMALY_05000346) {
 		bfin_write_USB_APHY_CALIB(ANOMALY_05000346_value);



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

* [32/45] USB: option: Add more ZTE modem USB ids
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (31 preceding siblings ...)
  2010-11-19 21:43 ` [31/45] usb: musb: blackfin: call gpio_free() on error path in musb_platform_init() Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [33/45] USB: cp210x: Add Renesas RX-Stick device ID Greg KH
                   ` (12 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Mauro Carvalho Chehab

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Mauro Carvalho Chehab <mchehab@redhat.com>

commit ecfa153ef616b901e86d9a051b329fcda7a6ce7b upstream.

There are lots of ZTE USB id's currently not covered by usb/serial. Adds them,
to allow those devices to work properly on Linux.

While here, put the USB ID's for 0x2002/0x2003 at the sorted order.

This patch is based on zte.c file found on MF645.

PS.: The ZTE driver is commenting the USB ID for 0x0053. It also adds, commented,
an USB ID for 0x0026.

Not sure why, but I think that 0053 is used by their devices in storage mode only.
So, I opted to keep the comment on this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/option.c |   23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -582,6 +582,7 @@ static struct usb_device_id option_ids[]
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0011, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0012, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0013, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0014, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0016, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0017, 0xff, 0xff, 0xff) },
@@ -593,38 +594,52 @@ static struct usb_device_id option_ids[]
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0023, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0024, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0025, 0xff, 0xff, 0xff) },
-	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) },
+	/* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0026, 0xff, 0xff, 0xff) }, */
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0028, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0029, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0030, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0032, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0033, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0034, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0037, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0038, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0039, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0040, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0042, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0043, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0044, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0048, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0049, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0050, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0051, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0052, 0xff, 0xff, 0xff) },
+	/* { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0053, 0xff, 0xff, 0xff) }, */
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0054, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0055, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0056, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0057, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0058, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0059, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0061, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0062, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0063, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0064, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0065, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0066, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0067, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0069, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0070, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0076, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0077, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0078, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0079, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0082, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0083, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0086, 0xff, 0xff, 0xff) },
-	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) },
-	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0087, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0104, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0105, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0106, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0108, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0113, 0xff, 0xff, 0xff) },
@@ -840,6 +855,8 @@ static struct usb_device_id option_ids[]
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0073, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0130, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0141, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2002, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x2003, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC2726, 0xff, 0xff, 0xff) },



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

* [33/45] USB: cp210x: Add Renesas RX-Stick device ID
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (32 preceding siblings ...)
  2010-11-19 21:43 ` [32/45] USB: option: Add more ZTE modem USB ids Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [34/45] USB: cp210x: Add WAGO 750-923 Service Cable " Greg KH
                   ` (11 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, DJ Delorie

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: DJ Delorie <dj@delorie.com>

commit 2f1136d1d08a63dcdbcd462621373f30d8dfe590 upstream.

RX610 development board by Renesas

Bus 001 Device 024: ID 045b:0053 Hitachi, Ltd
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x045b Hitachi, Ltd
  idProduct          0x0053
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 RX-Stick
  iSerial                 3 0001
  . . .

http://am.renesas.com/rx610stick

Signed-off-by: DJ Delorie <dj@delorie.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/cp210x.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -56,6 +56,7 @@ static int cp210x_carrier_raised(struct
 static int debug;
 
 static struct usb_device_id id_table [] = {
+	{ USB_DEVICE(0x045B, 0x0053) }, /* Renesas RX610 RX-Stick */
 	{ USB_DEVICE(0x0471, 0x066A) }, /* AKTAKOM ACE-1001 cable */
 	{ USB_DEVICE(0x0489, 0xE000) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM Mobile */
 	{ USB_DEVICE(0x0745, 0x1000) }, /* CipherLab USB CCD Barcode Scanner 1000 */



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

* [34/45] USB: cp210x: Add WAGO 750-923 Service Cable device ID
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (33 preceding siblings ...)
  2010-11-19 21:43 ` [33/45] USB: cp210x: Add Renesas RX-Stick device ID Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [35/45] USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled Greg KH
                   ` (10 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Anders Larsen

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Anders Larsen <al@alarsen.net>

commit 93ad03d60b5b18897030038234aa2ebae8234748 upstream.

The WAGO 750-923 USB Service Cable is used for configuration and firmware
updates of several industrial automation products from WAGO Kontakttechnik GmbH.

Bus 004 Device 002: ID 1be3:07a6
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1be3
  idProduct          0x07a6
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 WAGO USB Service Cable
  iSerial                 3 1277796751
  . . .

Signed-off-by: Anders Larsen <al@alarsen.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/cp210x.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -134,6 +134,7 @@ static struct usb_device_id id_table []
 	{ USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
 	{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
 	{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
+	{ USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
 	{ USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
 	{ } /* Terminating Entry */
 };



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

* [35/45] USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (34 preceding siblings ...)
  2010-11-19 21:43 ` [34/45] USB: cp210x: Add WAGO 750-923 Service Cable " Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-22  9:08   ` Nicolas Ferre
  2010-11-19 21:43 ` [36/45] USB: disable endpoints after unbinding interfaces, not before Greg KH
                   ` (9 subsequent siblings)
  45 siblings, 1 reply; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Nicolas Ferre,
	Jean-Christophe PLAGNIOL-VILLARD

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

commit 969affff54702785330de553b790372e261e93f9 upstream.

to ensure gpio_is_valid return false

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/gadget/atmel_usba_udc.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -2013,6 +2013,9 @@ static int __init usba_udc_probe(struct
 			} else {
 				disable_irq(gpio_to_irq(udc->vbus_pin));
 			}
+		} else {
+			/* gpio_request fail so use -EINVAL for gpio_is_valid */
+			ubc->vbus_pin = -EINVAL;
 		}
 	}
 



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

* [36/45] USB: disable endpoints after unbinding interfaces, not before
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (35 preceding siblings ...)
  2010-11-19 21:43 ` [35/45] USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [37/45] USB: opticon: Fix long-standing bugs in opticon driver Greg KH
                   ` (8 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Stern

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

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

commit 80f0cf3947889014d3a3dc0ad60fb87cfda4b12a upstream.

This patch (as1430) fixes a bug in usbcore.  When a device
configuration change occurs or a device is removed, the endpoints for
the old config should be completely disabled.  However it turns out
they aren't; this is because usb_unbind_interface() calls
usb_enable_interface() or usb_set_interface() to put interfaces back
in altsetting 0, which re-enables the interfaces' endpoints.

As a result, when a device goes through a config change or is
unconfigured, the ep_in[] and ep_out[] arrays may be left holding old
pointers to usb_host_endpoint structures.  If the device is
deauthorized these structures get freed, and the stale pointers cause
errors when the the device is eventually unplugged.

The solution is to disable the endpoints after unbinding the
interfaces instead of before.  This isn't as large a change as it
sounds, since usb_unbind_interface() disables all the interface's
endpoints anyway before calling the driver's disconnect routine,
unless the driver claims to support "soft" unbind.

This fixes Bugzilla #19192.  Thanks to "Tom" Lei Ming for diagnosing
the underlying cause of the problem.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Carsten Sommer <carsten_sommer@ymail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/message.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1185,13 +1185,6 @@ void usb_disable_device(struct usb_devic
 {
 	int i;
 
-	dev_dbg(&dev->dev, "%s nuking %s URBs\n", __func__,
-		skip_ep0 ? "non-ep0" : "all");
-	for (i = skip_ep0; i < 16; ++i) {
-		usb_disable_endpoint(dev, i, true);
-		usb_disable_endpoint(dev, i + USB_DIR_IN, true);
-	}
-
 	/* getting rid of interfaces will disconnect
 	 * any drivers bound to them (a key side effect)
 	 */
@@ -1221,6 +1214,13 @@ void usb_disable_device(struct usb_devic
 		if (dev->state == USB_STATE_CONFIGURED)
 			usb_set_device_state(dev, USB_STATE_ADDRESS);
 	}
+
+	dev_dbg(&dev->dev, "%s nuking %s URBs\n", __func__,
+		skip_ep0 ? "non-ep0" : "all");
+	for (i = skip_ep0; i < 16; ++i) {
+		usb_disable_endpoint(dev, i, true);
+		usb_disable_endpoint(dev, i + USB_DIR_IN, true);
+	}
 }
 
 /**



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

* [37/45] USB: opticon: Fix long-standing bugs in opticon driver
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (36 preceding siblings ...)
  2010-11-19 21:43 ` [36/45] USB: disable endpoints after unbinding interfaces, not before Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [38/45] USB: accept some invalid ep0-maxpacket values Greg KH
                   ` (7 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alon Ziv

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Alon Ziv <alon+git@nolaviz.org>

commit 97cd8dc4ca9a1a5efb2cc38758e01492e3b013e2 upstream.

The bulk-read callback had two bugs:
a) The bulk-in packet's leading two zeros were returned (and the two last
   bytes truncated)
b) The wrong URB was transmitted for the second (and later) read requests,
   causing further reads to return the entire packet (including leading
   zeros)

Signed-off-by: Alon Ziv <alon-git@nolaviz.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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

--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -99,8 +99,8 @@ static void opticon_bulk_callback(struct
 				available_room = tty_buffer_request_room(tty,
 								data_length);
 				if (available_room) {
-					tty_insert_flip_string(tty, data,
-							       available_room);
+					tty_insert_flip_string(tty, data + 2,
+							       data_length);
 					tty_flip_buffer_push(tty);
 				}
 				tty_kref_put(tty);
@@ -134,7 +134,7 @@ exit:
 						  priv->bulk_address),
 				  priv->bulk_in_buffer, priv->buffer_size,
 				  opticon_bulk_callback, priv);
-		result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
+		result = usb_submit_urb(priv->bulk_read_urb, GFP_ATOMIC);
 		if (result)
 			dev_err(&port->dev,
 			    "%s - failed resubmitting read urb, error %d\n",



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

* [38/45] USB: accept some invalid ep0-maxpacket values
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (37 preceding siblings ...)
  2010-11-19 21:43 ` [37/45] USB: opticon: Fix long-standing bugs in opticon driver Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [39/45] OHCI: work around for nVidia shutdown problem Greg KH
                   ` (6 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Stern

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

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

commit 56626a72a47bf3e50875d960d6b5f17b9bee0ab2 upstream.

A few devices (such as the RCA VR5220 voice recorder) are so
non-compliant with the USB spec that they have invalid maxpacket sizes
for endpoint 0.  Nevertheless, as long as we can safely use them, we
may as well do so.

This patch (as1432) softens our acceptance criterion by allowing
high-speed devices to have ep0-maxpacket sizes other than 64.  A
warning is printed in the system log when this happens, and the
existing error message is clarified.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: James <bjlockie@lockie.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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

--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2821,13 +2821,16 @@ hub_port_init (struct usb_hub *hub, stru
 	else
 		i = udev->descriptor.bMaxPacketSize0;
 	if (le16_to_cpu(udev->ep0.desc.wMaxPacketSize) != i) {
-		if (udev->speed != USB_SPEED_FULL ||
+		if (udev->speed == USB_SPEED_LOW ||
 				!(i == 8 || i == 16 || i == 32 || i == 64)) {
-			dev_err(&udev->dev, "ep0 maxpacket = %d\n", i);
+			dev_err(&udev->dev, "Invalid ep0 maxpacket: %d\n", i);
 			retval = -EMSGSIZE;
 			goto fail;
 		}
-		dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i);
+		if (udev->speed == USB_SPEED_FULL)
+			dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i);
+		else
+			dev_warn(&udev->dev, "Using ep0 maxpacket: %d\n", i);
 		udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i);
 		usb_ep0_reinit(udev);
 	}



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

* [39/45] OHCI: work around for nVidia shutdown problem
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (38 preceding siblings ...)
  2010-11-19 21:43 ` [38/45] USB: accept some invalid ep0-maxpacket values Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-20  2:52   ` [Stable-review] " Ben Hutchings
  2011-03-28 16:13   ` Andre "Osku" Schmidt
  2010-11-19 21:43 ` [40/45] [SCSI] sd name space exhaustion causes system hang Greg KH
                   ` (5 subsequent siblings)
  45 siblings, 2 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Alan Stern, David Brownell

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

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

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

commit 3df7169e73fc1d71a39cffeacc969f6840cdf52b upstream.

This patch (as1417) fixes a problem affecting some (or all) nVidia
chipsets.  When the computer is shut down, the OHCI controllers
continue to power the USB buses and evidently they drive a Reset
signal out all their ports.  This prevents attached devices from going
to low power.  Mouse LEDs stay on, for example, which is disconcerting
for users and a drain on laptop batteries.

The fix involves leaving each OHCI controller in the OPERATIONAL state
during system shutdown rather than putting it in the RESET state.
Although this nominally means the controller is running, in fact it's
not doing very much since all the schedules are all disabled.  However
there is ongoing DMA to the Host Controller Communications Area, so
the patch also disables the bus-master capability of all PCI USB
controllers after the shutdown routine runs.

The fix is applied only to nVidia-based PCI OHCI controllers, so it
shouldn't cause problems on systems using other hardware.  As an added
safety measure, in case the kernel encounters one of these running
controllers during boot, the patch changes quirk_usb_handoff_ohci()
(which runs early on during PCI discovery) to reset the controller
before anything bad can happen.

Reported-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/hcd-pci.c    |    4 +++-
 drivers/usb/host/ohci-hcd.c   |    9 ++++++++-
 drivers/usb/host/ohci-pci.c   |   18 ++++++++++++++++++
 drivers/usb/host/ohci.h       |    1 +
 drivers/usb/host/pci-quirks.c |   18 +++++++++++-------
 5 files changed, 41 insertions(+), 9 deletions(-)

--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -197,8 +197,10 @@ void usb_hcd_pci_shutdown(struct pci_dev
 	if (!hcd)
 		return;
 
-	if (hcd->driver->shutdown)
+	if (hcd->driver->shutdown) {
 		hcd->driver->shutdown(hcd);
+		pci_disable_device(dev);
+	}
 }
 EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown);
 
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -398,7 +398,14 @@ ohci_shutdown (struct usb_hcd *hcd)
 
 	ohci = hcd_to_ohci (hcd);
 	ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
-	ohci_usb_reset (ohci);
+	ohci->hc_control = ohci_readl(ohci, &ohci->regs->control);
+
+	/* If the SHUTDOWN quirk is set, don't put the controller in RESET */
+	ohci->hc_control &= (ohci->flags & OHCI_QUIRK_SHUTDOWN ?
+			OHCI_CTRL_RWC | OHCI_CTRL_HCFS :
+			OHCI_CTRL_RWC);
+	ohci_writel(ohci, ohci->hc_control, &ohci->regs->control);
+
 	/* flush the writes */
 	(void) ohci_readl (ohci, &ohci->regs->control);
 }
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -201,6 +201,20 @@ static int ohci_quirk_amd700(struct usb_
 	return 0;
 }
 
+/* nVidia controllers continue to drive Reset signalling on the bus
+ * even after system shutdown, wasting power.  This flag tells the
+ * shutdown routine to leave the controller OPERATIONAL instead of RESET.
+ */
+static int ohci_quirk_nvidia_shutdown(struct usb_hcd *hcd)
+{
+	struct ohci_hcd	*ohci = hcd_to_ohci(hcd);
+
+	ohci->flags |= OHCI_QUIRK_SHUTDOWN;
+	ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
+
+	return 0;
+}
+
 /*
  * The hardware normally enables the A-link power management feature, which
  * lets the system lower the power consumption in idle states.
@@ -332,6 +346,10 @@ static const struct pci_device_id ohci_p
 		PCI_DEVICE(PCI_VENDOR_ID_ATI, 0x4399),
 		.driver_data = (unsigned long)ohci_quirk_amd700,
 	},
+	{
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID),
+		.driver_data = (unsigned long) ohci_quirk_nvidia_shutdown,
+	},
 
 	/* FIXME for some of the early AMD 760 southbridges, OHCI
 	 * won't work at all.  blacklist them.
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -403,6 +403,7 @@ struct ohci_hcd {
 #define	OHCI_QUIRK_HUB_POWER	0x100			/* distrust firmware power/oc setup */
 #define	OHCI_QUIRK_AMD_ISO	0x200			/* ISO transfers*/
 #define	OHCI_QUIRK_AMD_PREFETCH	0x400			/* pre-fetch for ISO transfer */
+#define	OHCI_QUIRK_SHUTDOWN	0x800			/* nVidia power bug */
 	// there are also chip quirks/bugs in init logic
 
 	struct work_struct	nec_work;	/* Worker for NEC quirk */
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -169,6 +169,7 @@ static int __devinit mmio_resource_enabl
 static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
 {
 	void __iomem *base;
+	u32 control;
 
 	if (!mmio_resource_enabled(pdev, 0))
 		return;
@@ -177,10 +178,14 @@ static void __devinit quirk_usb_handoff_
 	if (base == NULL)
 		return;
 
+	control = readl(base + OHCI_CONTROL);
+
 /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
-#ifndef __hppa__
-{
-	u32 control = readl(base + OHCI_CONTROL);
+#ifdef __hppa__
+#define	OHCI_CTRL_MASK		(OHCI_CTRL_RWC | OHCI_CTRL_IR)
+#else
+#define	OHCI_CTRL_MASK		OHCI_CTRL_RWC
+
 	if (control & OHCI_CTRL_IR) {
 		int wait_time = 500; /* arbitrary; 5 seconds */
 		writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
@@ -194,13 +199,12 @@ static void __devinit quirk_usb_handoff_
 			dev_warn(&pdev->dev, "OHCI: BIOS handoff failed"
 					" (BIOS bug?) %08x\n",
 					readl(base + OHCI_CONTROL));
-
-		/* reset controller, preserving RWC */
-		writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
 	}
-}
 #endif
 
+	/* reset controller, preserving RWC (and possibly IR) */
+	writel(control & OHCI_CTRL_MASK, base + OHCI_CONTROL);
+
 	/*
 	 * disable interrupts
 	 */



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

* [40/45] [SCSI] sd name space exhaustion causes system hang
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (39 preceding siblings ...)
  2010-11-19 21:43 ` [39/45] OHCI: work around for nVidia shutdown problem Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [41/45] [SCSI] libsas: fix NCQ mixing with non-NCQ Greg KH
                   ` (4 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Michael Reed, James Bottomley

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Michael Reed <mdr@sgi.com>

commit 1a03ae0f556a931aa3747b70e44b78308f5b0590 upstream.

Following a site power outage which re-enabled all the ports on my FC
switches, my system subsequently booted with far too many luns!  I had
let it run hoping it would make multi-user.  It didn't.  :(  It hung solid
after exhausting the last sd device, sdzzz, and attempting to create sdaaaa
and beyond.  I was unable to get a dump.

Discovered using a 2.6.32.13 based system.

correct this by detecting when the last index is utilized and failing
the sd probe of the device.  Patch applies to scsi-misc-2.6.

Signed-off-by: Michael Reed <mdr@sgi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/sd.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2049,11 +2049,10 @@ static void sd_probe_async(void *data, a
 	index = sdkp->index;
 	dev = &sdp->sdev_gendev;
 
-	if (index < SD_MAX_DISKS) {
-		gd->major = sd_major((index & 0xf0) >> 4);
-		gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
-		gd->minors = SD_MINORS;
-	}
+	gd->major = sd_major((index & 0xf0) >> 4);
+	gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00);
+	gd->minors = SD_MINORS;
+
 	gd->fops = &sd_fops;
 	gd->private_data = &sdkp->driver;
 	gd->queue = sdkp->device->request_queue;
@@ -2142,6 +2141,12 @@ static int sd_probe(struct device *dev)
 	if (error)
 		goto out_put;
 
+	if (index >= SD_MAX_DISKS) {
+		error = -ENODEV;
+		sdev_printk(KERN_WARNING, sdp, "SCSI disk (sd) name space exhausted.\n");
+		goto out_free_index;
+	}
+
 	error = sd_format_disk_name("sd", index, gd->disk_name, DISK_NAME_LEN);
 	if (error)
 		goto out_free_index;



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

* [41/45] [SCSI] libsas: fix NCQ mixing with non-NCQ
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (40 preceding siblings ...)
  2010-11-19 21:43 ` [40/45] [SCSI] sd name space exhaustion causes system hang Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [42/45] [SCSI] gdth: integer overflow in ioctl Greg KH
                   ` (3 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, James Bottomley

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: David Milburn <dmilburn@redhat.com>

commit f0ad30d3d2dc924decc0e10b1ff6dc32525a5d99 upstream.

Some cards (like mvsas) have issue troubles if non-NCQ commands are
mixed with NCQ ones.  Fix this by using the libata default NCQ check
routine which waits until all NCQ commands are complete before issuing
a non-NCQ one.  The impact to cards (like aic94xx) which don't need
this logic should be minimal

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/libsas/sas_ata.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -346,6 +346,7 @@ static int sas_ata_scr_read(struct ata_l
 static struct ata_port_operations sas_sata_ops = {
 	.phy_reset		= sas_ata_phy_reset,
 	.post_internal_cmd	= sas_ata_post_internal,
+	.qc_defer               = ata_std_qc_defer,
 	.qc_prep		= ata_noop_qc_prep,
 	.qc_issue		= sas_ata_qc_issue,
 	.qc_fill_rtf		= sas_ata_qc_fill_rtf,



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

* [42/45] [SCSI] gdth: integer overflow in ioctl
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (41 preceding siblings ...)
  2010-11-19 21:43 ` [41/45] [SCSI] libsas: fix NCQ mixing with non-NCQ Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [43/45] [SCSI] Fix race when removing SCSI devices Greg KH
                   ` (2 subsequent siblings)
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Dan Carpenter, James Bottomley

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Dan Carpenter <error27@gmail.com>

commit f63ae56e4e97fb12053590e41a4fa59e7daa74a4 upstream.

gdth_ioctl_alloc() takes the size variable as an int.
copy_from_user() takes the size variable as an unsigned long.
gen.data_len and gen.sense_len are unsigned longs.
On x86_64 longs are 64 bit and ints are 32 bit.

We could pass in a very large number and the allocation would truncate
the size to 32 bits and allocate a small buffer.  Then when we do the
copy_from_user(), it would result in a memory corruption.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/gdth.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -4174,6 +4174,14 @@ static int ioc_general(void __user *arg,
     ha = gdth_find_ha(gen.ionode);
     if (!ha)
         return -EFAULT;
+
+    if (gen.data_len > INT_MAX)
+        return -EINVAL;
+    if (gen.sense_len > INT_MAX)
+        return -EINVAL;
+    if (gen.data_len + gen.sense_len > INT_MAX)
+        return -EINVAL;
+
     if (gen.data_len + gen.sense_len != 0) {
         if (!(buf = gdth_ioctl_alloc(ha, gen.data_len + gen.sense_len,
                                      FALSE, &paddr)))



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

* [43/45] [SCSI] Fix race when removing SCSI devices
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (42 preceding siblings ...)
  2010-11-19 21:43 ` [42/45] [SCSI] gdth: integer overflow in ioctl Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [44/45] [SCSI] Fix regressions in scsi_internal_device_block Greg KH
  2010-11-19 21:43 ` [45/45] sgi-xp: incoming XPC channel messages can come in after the channels partition structures have been torn down Greg KH
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Christof Schmitt, James Bottomley

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Christof Schmitt <christof.schmitt@de.ibm.com>

commit 546ae796bfac6399e30da4b5af2cf7a6d0f8a4ec upstream.

Removing SCSI devices through
echo 1 > /sys/bus/scsi/devices/ ... /delete

while the FC transport class removes the SCSI target can lead to an
oops:

Unable to handle kernel pointer dereference at virtual kernel address 00000000b6815000
Oops: 0011 [#1] PREEMPT SMP DEBUG_PAGEALLOC
Modules linked in: sunrpc qeth_l3 binfmt_misc dm_multipath scsi_dh dm_mod ipv6 qeth ccwgroup [last unloaded: scsi_wait_scan]
CPU: 1 Not tainted 2.6.35.5-45.x.20100924-s390xdefault #1
Process fc_wq_0 (pid: 861, task: 00000000b7331240, ksp: 00000000b735bac0)
Krnl PSW : 0704200180000000 00000000003ff6e4 (__scsi_remove_device+0x24/0xd0)
           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
Krnl GPRS: 0000000000000001 0000000000000000 00000000b6815000 00000000bc24a8c0
           00000000003ff7c8 000000000056dbb8 0000000000000002 0000000000835d80
           ffffffff00000000 0000000000001000 00000000b6815000 00000000bc24a7f0
           00000000b68151a0 00000000b6815000 00000000b735bc20 00000000b735bbf8
Krnl Code: 00000000003ff6d6: a7840001            brc 8,3ff6d8
           00000000003ff6da: a7fbffd8            aghi %r15,-40
           00000000003ff6de: e3e0f0980024        stg %r14,152(%r15)
          >00000000003ff6e4: e31021200004        lg %r1,288(%r2)
           00000000003ff6ea: a71f0000            cghi    %r1,0
           00000000003ff6ee: a7a40011            brc 10,3ff710
           00000000003ff6f2: a7390003            lghi    %r3,3
           00000000003ff6f6: c0e5ffffc8b1        brasl %r14,3f8858
Call Trace:
([<0000000000001000>] 0x1000)
 [<00000000003ff7d2>] scsi_remove_device+0x42/0x54
 [<00000000003ff8ba>] __scsi_remove_target+0xca/0xfc
 [<00000000003ff99a>] __remove_child+0x3a/0x48
 [<00000000003e3246>] device_for_each_child+0x72/0xbc
 [<00000000003ff93a>] scsi_remove_target+0x4e/0x74
 [<0000000000406586>] fc_rport_final_delete+0xb2/0x23c
 [<000000000015d080>] worker_thread+0x200/0x344
 [<000000000016330c>] kthread+0xa0/0xa8
 [<0000000000106c1a>] kernel_thread_starter+0x6/0xc
 [<0000000000106c14>] kernel_thread_starter+0x0/0xc
INFO: lockdep is turned off.
Last Breaking-Event-Address:
 [<00000000003ff7cc>] scsi_remove_device+0x3c/0x54

The function __scsi_remove_target iterates through the SCSI devices on
the host, but it drops the host_lock before calling
scsi_remove_device. When the SCSI device is deleted from another
thread, the pointer to the SCSI device in scsi_remove_device can
become invalid. Fix this by getting a reference to the SCSI device
before dropping the host_lock to keep the SCSI device alive for the
call to scsi_remove_device.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/scsi_sysfs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -954,10 +954,11 @@ static void __scsi_remove_target(struct
 	list_for_each_entry(sdev, &shost->__devices, siblings) {
 		if (sdev->channel != starget->channel ||
 		    sdev->id != starget->id ||
-		    sdev->sdev_state == SDEV_DEL)
+		    scsi_device_get(sdev))
 			continue;
 		spin_unlock_irqrestore(shost->host_lock, flags);
 		scsi_remove_device(sdev);
+		scsi_device_put(sdev);
 		spin_lock_irqsave(shost->host_lock, flags);
 		goto restart;
 	}



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

* [44/45] [SCSI] Fix regressions in scsi_internal_device_block
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (43 preceding siblings ...)
  2010-11-19 21:43 ` [43/45] [SCSI] Fix race when removing SCSI devices Greg KH
@ 2010-11-19 21:43 ` Greg KH
  2010-11-19 21:43 ` [45/45] sgi-xp: incoming XPC channel messages can come in after the channels partition structures have been torn down Greg KH
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Christof Schmitt, James Bottomley

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Mike Christie <michaelc@cs.wisc.edu>

commit 986fe6c7f50974e871b8ab5a800f5310ea25b361 upstream.

Deleting a SCSI device on a blocked fc_remote_port (before
fast_io_fail_tmo fires) results in a hanging thread:

  STACK:
  0 schedule+1108 [0x5cac48]
  1 schedule_timeout+528 [0x5cb7fc]
  2 wait_for_common+266 [0x5ca6be]
  3 blk_execute_rq+160 [0x354054]
  4 scsi_execute+324 [0x3b7ef4]
  5 scsi_execute_req+162 [0x3b80ca]
  6 sd_sync_cache+138 [0x3cf662]
  7 sd_shutdown+138 [0x3cf91a]
  8 sd_remove+112 [0x3cfe4c]
  9 __device_release_driver+124 [0x3a08b8]
10 device_release_driver+60 [0x3a0a5c]
11 bus_remove_device+266 [0x39fa76]
12 device_del+340 [0x39d818]
13 __scsi_remove_device+204 [0x3bcc48]
14 scsi_remove_device+66 [0x3bcc8e]
15 sysfs_schedule_callback_work+50 [0x260d66]
16 worker_thread+622 [0x162326]
17 kthread+160 [0x1680b0]
18 kernel_thread_starter+6 [0x10aaea]

During the delete, the SCSI device is in moved to SDEV_CANCEL.  When
the FC transport class later calls scsi_target_unblock, this has no
effect, since scsi_internal_device_unblock ignores SCSI devics in this
state.

It looks like all these are regressions caused by:
5c10e63c943b4c67561ddc6bf61e01d4141f881f
[SCSI] limit state transitions in scsi_internal_device_unblock

Fix by rejecting offline and cancel in the state transition.

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
[jejb: Original patch by Christof Schmitt, modified by Mike Christie]
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/scsi_lib.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2432,7 +2432,8 @@ scsi_internal_device_unblock(struct scsi
 		sdev->sdev_state = SDEV_RUNNING;
 	else if (sdev->sdev_state == SDEV_CREATED_BLOCK)
 		sdev->sdev_state = SDEV_CREATED;
-	else
+	else if (sdev->sdev_state != SDEV_CANCEL &&
+		 sdev->sdev_state != SDEV_OFFLINE)
 		return -EINVAL;
 
 	spin_lock_irqsave(q->queue_lock, flags);



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

* [45/45] sgi-xp: incoming XPC channel messages can come in after the channels partition structures have been torn down
  2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
                   ` (44 preceding siblings ...)
  2010-11-19 21:43 ` [44/45] [SCSI] Fix regressions in scsi_internal_device_block Greg KH
@ 2010-11-19 21:43 ` Greg KH
  45 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:43 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Robin Holt

2.6.32-stable review patch.  If anyone has any objections, please let us know.

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

From: Robin Holt <holt@sgi.com>

commit 09358972bff5ce99de496bbba97c85d417b3c054 upstream.

Under some workloads, some channel messages have been observed being
delayed on the sending side past the point where the receiving side has
been able to tear down its partition structures.

This condition is already detected in xpc_handle_activate_IRQ_uv(), but
that information is not given to xpc_handle_activate_mq_msg_uv().  As a
result, xpc_handle_activate_mq_msg_uv() assumes the structures still exist
and references them, causing a NULL-pointer deref.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/misc/sgi-xp/xpc_uv.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/drivers/misc/sgi-xp/xpc_uv.c
+++ b/drivers/misc/sgi-xp/xpc_uv.c
@@ -409,6 +409,7 @@ xpc_process_activate_IRQ_rcvd_uv(void)
 static void
 xpc_handle_activate_mq_msg_uv(struct xpc_partition *part,
 			      struct xpc_activate_mq_msghdr_uv *msg_hdr,
+			      int part_setup,
 			      int *wakeup_hb_checker)
 {
 	unsigned long irq_flags;
@@ -473,6 +474,9 @@ xpc_handle_activate_mq_msg_uv(struct xpc
 	case XPC_ACTIVATE_MQ_MSG_CHCTL_CLOSEREQUEST_UV: {
 		struct xpc_activate_mq_msg_chctl_closerequest_uv *msg;
 
+		if (!part_setup)
+			break;
+
 		msg = container_of(msg_hdr, struct
 				   xpc_activate_mq_msg_chctl_closerequest_uv,
 				   hdr);
@@ -489,6 +493,9 @@ xpc_handle_activate_mq_msg_uv(struct xpc
 	case XPC_ACTIVATE_MQ_MSG_CHCTL_CLOSEREPLY_UV: {
 		struct xpc_activate_mq_msg_chctl_closereply_uv *msg;
 
+		if (!part_setup)
+			break;
+
 		msg = container_of(msg_hdr, struct
 				   xpc_activate_mq_msg_chctl_closereply_uv,
 				   hdr);
@@ -503,6 +510,9 @@ xpc_handle_activate_mq_msg_uv(struct xpc
 	case XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREQUEST_UV: {
 		struct xpc_activate_mq_msg_chctl_openrequest_uv *msg;
 
+		if (!part_setup)
+			break;
+
 		msg = container_of(msg_hdr, struct
 				   xpc_activate_mq_msg_chctl_openrequest_uv,
 				   hdr);
@@ -520,6 +530,9 @@ xpc_handle_activate_mq_msg_uv(struct xpc
 	case XPC_ACTIVATE_MQ_MSG_CHCTL_OPENREPLY_UV: {
 		struct xpc_activate_mq_msg_chctl_openreply_uv *msg;
 
+		if (!part_setup)
+			break;
+
 		msg = container_of(msg_hdr, struct
 				   xpc_activate_mq_msg_chctl_openreply_uv, hdr);
 		args = &part->remote_openclose_args[msg->ch_number];
@@ -537,6 +550,9 @@ xpc_handle_activate_mq_msg_uv(struct xpc
 	case XPC_ACTIVATE_MQ_MSG_CHCTL_OPENCOMPLETE_UV: {
 		struct xpc_activate_mq_msg_chctl_opencomplete_uv *msg;
 
+		if (!part_setup)
+			break;
+
 		msg = container_of(msg_hdr, struct
 				xpc_activate_mq_msg_chctl_opencomplete_uv, hdr);
 		spin_lock_irqsave(&part->chctl_lock, irq_flags);
@@ -613,6 +629,7 @@ xpc_handle_activate_IRQ_uv(int irq, void
 
 			part_referenced = xpc_part_ref(part);
 			xpc_handle_activate_mq_msg_uv(part, msg_hdr,
+						      part_referenced,
 						      &wakeup_hb_checker);
 			if (part_referenced)
 				xpc_part_deref(part);



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

* [00/45] 2.6.32.26-stable review
@ 2010-11-19 21:44 Greg KH
  2010-11-19 21:42 ` Greg KH
                   ` (45 more replies)
  0 siblings, 46 replies; 62+ messages in thread
From: Greg KH @ 2010-11-19 21:44 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan

This is the start of the stable review cycle for the 2.6.32.26 release.
There are 45 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 us know.  If anyone is a maintainer of the proper subsystem, and
wants to add a Signed-off-by: line to the patch, please respond with it.

Responses should be made by Monday, November 22, 2010, 12:00:00 UTC
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/v2.6/stable-review/patch-2.6.32.26-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

 Makefile                            |    2 +-
 arch/powerpc/kernel/ppc970-pmu.c    |    2 +
 arch/x86/include/asm/cpufeature.h   |    2 +-
 arch/x86/include/asm/io.h           |    1 +
 arch/x86/include/asm/kvm_host.h     |   24 -------------------
 arch/x86/include/asm/smp.h          |    9 +++++-
 arch/x86/kernel/apic/io_apic.c      |    2 +
 arch/x86/kernel/cpu/mtrr/cleanup.c  |    2 +-
 arch/x86/kernel/crash_dump_64.c     |    3 +-
 arch/x86/kernel/olpc.c              |    5 +++-
 arch/x86/kernel/reboot.c            |    2 +-
 arch/x86/kernel/smp.c               |   15 +++++++----
 arch/x86/kvm/paging_tmpl.h          |   29 +++++++++++++++++++++-
 arch/x86/kvm/svm.c                  |   44 +++++++++++++++++++---------------
 arch/x86/kvm/vmx.c                  |   28 ++++++++++------------
 arch/x86/kvm/x86.c                  |    2 +-
 arch/x86/xen/enlighten.c            |    2 +-
 arch/x86/xen/smp.c                  |    6 ++--
 drivers/bluetooth/hci_ldisc.c       |    7 +++++
 drivers/char/pcmcia/synclink_cs.c   |    2 +
 drivers/misc/sgi-xp/xpc_uv.c        |   17 +++++++++++++
 drivers/net/wireless/p54/eeprom.c   |    4 ++-
 drivers/net/wireless/p54/p54usb.c   |   15 +++++++++++-
 drivers/scsi/gdth.c                 |    8 ++++++
 drivers/scsi/libsas/sas_ata.c       |    1 +
 drivers/scsi/scsi_lib.c             |    3 +-
 drivers/scsi/scsi_sysfs.c           |    3 +-
 drivers/scsi/sd.c                   |   15 ++++++++----
 drivers/staging/usbip/usbip_event.c |   16 ++----------
 drivers/staging/usbip/vhci_hcd.c    |    2 +
 drivers/usb/core/hcd-pci.c          |    4 ++-
 drivers/usb/core/hub.c              |    9 ++++--
 drivers/usb/core/message.c          |   14 +++++-----
 drivers/usb/gadget/atmel_usba_udc.c |    3 ++
 drivers/usb/host/ohci-hcd.c         |    9 ++++++-
 drivers/usb/host/ohci-pci.c         |   18 ++++++++++++++
 drivers/usb/host/ohci.h             |    1 +
 drivers/usb/host/pci-quirks.c       |   18 ++++++++-----
 drivers/usb/musb/blackfin.c         |    4 ++-
 drivers/usb/serial/cp210x.c         |    2 +
 drivers/usb/serial/ftdi_sio.c       |   35 +++++++++++++++++++++++++++-
 drivers/usb/serial/ftdi_sio_ids.h   |   39 ++++++++++++++++++++++++++++++-
 drivers/usb/serial/opticon.c        |    6 ++--
 drivers/usb/serial/option.c         |   23 ++++++++++++++++--
 fs/pipe.c                           |    2 +-
 kernel/futex.c                      |   31 ++++++++++++------------
 kernel/sched.c                      |    7 ++---
 mm/vmalloc.c                        |    9 +++++++
 48 files changed, 358 insertions(+), 149 deletions(-)

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

* Re: [Stable-review] [08/45] mm, x86: Saving vmcore with non-lazy freeing of vmas
  2010-11-19 21:42   ` Greg KH
@ 2010-11-20  2:16     ` Ben Hutchings
  -1 siblings, 0 replies; 62+ messages in thread
From: Ben Hutchings @ 2010-11-20  2:16 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Ingo Molnar, kexec, Cliff Wickman, akpm,
	torvalds, stable-review, alan

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On Fri, 2010-11-19 at 13:42 -0800, Greg KH wrote:
> 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> 
> ------------------
> 
> From: Cliff Wickman <cpw@sgi.com>
> 
> commit 3ee48b6af49cf534ca2f481ecc484b156a41451d upstream.
> 
> During the reading of /proc/vmcore the kernel is doing
> ioremap()/iounmap() repeatedly. And the buildup of un-flushed
> vm_area_struct's is causing a great deal of overhead. (rb_next()
> is chewing up most of that time).
> 
> This solution is to provide function set_iounmap_nonlazy(). It
> causes a subsequent call to iounmap() to immediately purge the
> vma area (with try_purge_vmap_area_lazy()).
> 
> With this patch we have seen the time for writing a 250MB
> compressed dump drop from 71 seconds to 44 seconds.
[...]

Useful, but it doesn't seem to meet the criteria for stable updates.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [Stable-review] [08/45] mm, x86: Saving vmcore with non-lazy freeing of vmas
@ 2010-11-20  2:16     ` Ben Hutchings
  0 siblings, 0 replies; 62+ messages in thread
From: Ben Hutchings @ 2010-11-20  2:16 UTC (permalink / raw)
  To: Greg KH
  Cc: akpm, kexec, linux-kernel, stable, stable-review, Ingo Molnar,
	torvalds, Cliff Wickman, alan


[-- Attachment #1.1: Type: text/plain, Size: 979 bytes --]

On Fri, 2010-11-19 at 13:42 -0800, Greg KH wrote:
> 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> 
> ------------------
> 
> From: Cliff Wickman <cpw@sgi.com>
> 
> commit 3ee48b6af49cf534ca2f481ecc484b156a41451d upstream.
> 
> During the reading of /proc/vmcore the kernel is doing
> ioremap()/iounmap() repeatedly. And the buildup of un-flushed
> vm_area_struct's is causing a great deal of overhead. (rb_next()
> is chewing up most of that time).
> 
> This solution is to provide function set_iounmap_nonlazy(). It
> causes a subsequent call to iounmap() to immediately purge the
> vma area (with try_purge_vmap_area_lazy()).
> 
> With this patch we have seen the time for writing a 250MB
> compressed dump drop from 71 seconds to 44 seconds.
[...]

Useful, but it doesn't seem to meet the criteria for stable updates.

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [Stable-review] [39/45] OHCI: work around for nVidia shutdown problem
  2010-11-19 21:43 ` [39/45] OHCI: work around for nVidia shutdown problem Greg KH
@ 2010-11-20  2:52   ` Ben Hutchings
  2010-11-20 16:51     ` Alan Stern
  2011-03-28 16:13   ` Andre "Osku" Schmidt
  1 sibling, 1 reply; 62+ messages in thread
From: Ben Hutchings @ 2010-11-20  2:52 UTC (permalink / raw)
  To: Alan Stern
  Cc: linux-kernel, stable, David Brownell, akpm, torvalds,
	stable-review, alan, Greg KH

[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]

On Fri, 2010-11-19 at 13:43 -0800, Greg KH wrote:
> 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> 
> ------------------
> 
> From: Alan Stern <stern@rowland.harvard.edu>
> 
> commit 3df7169e73fc1d71a39cffeacc969f6840cdf52b upstream.
> 
> This patch (as1417) fixes a problem affecting some (or all) nVidia
> chipsets.  When the computer is shut down, the OHCI controllers
> continue to power the USB buses and evidently they drive a Reset
> signal out all their ports.  This prevents attached devices from going
> to low power.  Mouse LEDs stay on, for example, which is disconcerting
> for users and a drain on laptop batteries.
> 
> The fix involves leaving each OHCI controller in the OPERATIONAL state
> during system shutdown rather than putting it in the RESET state.
> Although this nominally means the controller is running, in fact it's
> not doing very much since all the schedules are all disabled.  However
> there is ongoing DMA to the Host Controller Communications Area, so
> the patch also disables the bus-master capability of all PCI USB
> controllers after the shutdown routine runs.
[...]

This last bit seems like a major change in behaviour, and this commit
has only just gone into the 2.6.37 cycle.  How thoroughly has this been
tested on other OHCI controllers?  Wouldn't it make more sense to use
the same quirk condition?

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [Stable-review] [39/45] OHCI: work around for nVidia shutdown problem
  2010-11-20  2:52   ` [Stable-review] " Ben Hutchings
@ 2010-11-20 16:51     ` Alan Stern
  2010-11-22 17:55       ` Greg KH
  0 siblings, 1 reply; 62+ messages in thread
From: Alan Stern @ 2010-11-20 16:51 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: linux-kernel, stable, David Brownell, akpm, torvalds,
	stable-review, alan, Greg KH

On Sat, 20 Nov 2010, Ben Hutchings wrote:

> On Fri, 2010-11-19 at 13:43 -0800, Greg KH wrote:
> > 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> > 
> > ------------------
> > 
> > From: Alan Stern <stern@rowland.harvard.edu>
> > 
> > commit 3df7169e73fc1d71a39cffeacc969f6840cdf52b upstream.
> > 
> > This patch (as1417) fixes a problem affecting some (or all) nVidia
> > chipsets.  When the computer is shut down, the OHCI controllers
> > continue to power the USB buses and evidently they drive a Reset
> > signal out all their ports.  This prevents attached devices from going
> > to low power.  Mouse LEDs stay on, for example, which is disconcerting
> > for users and a drain on laptop batteries.
> > 
> > The fix involves leaving each OHCI controller in the OPERATIONAL state
> > during system shutdown rather than putting it in the RESET state.
> > Although this nominally means the controller is running, in fact it's
> > not doing very much since all the schedules are all disabled.  However
> > there is ongoing DMA to the Host Controller Communications Area, so
> > the patch also disables the bus-master capability of all PCI USB
> > controllers after the shutdown routine runs.
> [...]
> 
> This last bit seems like a major change in behaviour, and this commit
> has only just gone into the 2.6.37 cycle.  How thoroughly has this been
> tested on other OHCI controllers?  Wouldn't it make more sense to use
> the same quirk condition?

Ben is right; let's hold off on putting this patch into any of the 
stable kernels.  There has been a bug report submitted against it, 
Bugzilla #22562.

Alan Stern


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

* Re: [35/45] USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled
  2010-11-19 21:43 ` [35/45] USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled Greg KH
@ 2010-11-22  9:08   ` Nicolas Ferre
  2010-11-22 21:31     ` Greg KH
  0 siblings, 1 reply; 62+ messages in thread
From: Nicolas Ferre @ 2010-11-22  9:08 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
	Jean-Christophe PLAGNIOL-VILLARD

Le 19/11/2010 22:43, Greg KH :
> 2.6.32-stable review patch.  If anyone has any objections, please let us know.

Hi Greg,

Please also add this typo one (or merge it): 

http://git.kernel.org/?p=linux/kernel/git/gregkh/usb-2.6.git;a=commit;h=b48809518631880207796b4aab0fc39c2f036754

Thanks a lot for monitoring this issue and adding to -stable...

Best regards,
 
> ------------------
> 
> From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> commit 969affff54702785330de553b790372e261e93f9 upstream.
> 
> to ensure gpio_is_valid return false
> 
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  drivers/usb/gadget/atmel_usba_udc.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- a/drivers/usb/gadget/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/atmel_usba_udc.c
> @@ -2013,6 +2013,9 @@ static int __init usba_udc_probe(struct
>  			} else {
>  				disable_irq(gpio_to_irq(udc->vbus_pin));
>  			}
> +		} else {
> +			/* gpio_request fail so use -EINVAL for gpio_is_valid */
> +			ubc->vbus_pin = -EINVAL;
>  		}
>  	}
>  
> 
> 
> 


-- 
Nicolas Ferre


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

* Re: [Stable-review] [39/45] OHCI: work around for nVidia shutdown problem
  2010-11-20 16:51     ` Alan Stern
@ 2010-11-22 17:55       ` Greg KH
  2010-11-22 18:09         ` Alan Stern
  2011-01-19 16:51         ` Alan Stern
  0 siblings, 2 replies; 62+ messages in thread
From: Greg KH @ 2010-11-22 17:55 UTC (permalink / raw)
  To: Alan Stern
  Cc: Ben Hutchings, linux-kernel, stable, David Brownell, akpm,
	torvalds, stable-review, alan

On Sat, Nov 20, 2010 at 11:51:39AM -0500, Alan Stern wrote:
> On Sat, 20 Nov 2010, Ben Hutchings wrote:
> 
> > On Fri, 2010-11-19 at 13:43 -0800, Greg KH wrote:
> > > 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> > > 
> > > ------------------
> > > 
> > > From: Alan Stern <stern@rowland.harvard.edu>
> > > 
> > > commit 3df7169e73fc1d71a39cffeacc969f6840cdf52b upstream.
> > > 
> > > This patch (as1417) fixes a problem affecting some (or all) nVidia
> > > chipsets.  When the computer is shut down, the OHCI controllers
> > > continue to power the USB buses and evidently they drive a Reset
> > > signal out all their ports.  This prevents attached devices from going
> > > to low power.  Mouse LEDs stay on, for example, which is disconcerting
> > > for users and a drain on laptop batteries.
> > > 
> > > The fix involves leaving each OHCI controller in the OPERATIONAL state
> > > during system shutdown rather than putting it in the RESET state.
> > > Although this nominally means the controller is running, in fact it's
> > > not doing very much since all the schedules are all disabled.  However
> > > there is ongoing DMA to the Host Controller Communications Area, so
> > > the patch also disables the bus-master capability of all PCI USB
> > > controllers after the shutdown routine runs.
> > [...]
> > 
> > This last bit seems like a major change in behaviour, and this commit
> > has only just gone into the 2.6.37 cycle.  How thoroughly has this been
> > tested on other OHCI controllers?  Wouldn't it make more sense to use
> > the same quirk condition?
> 
> Ben is right; let's hold off on putting this patch into any of the 
> stable kernels.  There has been a bug report submitted against it, 
> Bugzilla #22562.

Good point, I'll go drop it.

Alan, when it all gets worked out, care to resend it to
stable@kernel.org?

thanks,

greg k-h

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

* Re: [Stable-review] [08/45] mm, x86: Saving vmcore with non-lazy freeing of vmas
  2010-11-20  2:16     ` Ben Hutchings
@ 2010-11-22 17:59       ` Greg KH
  -1 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-22 17:59 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: linux-kernel, stable, Ingo Molnar, kexec, Cliff Wickman, akpm,
	torvalds, stable-review, alan

On Sat, Nov 20, 2010 at 02:16:12AM +0000, Ben Hutchings wrote:
> On Fri, 2010-11-19 at 13:42 -0800, Greg KH wrote:
> > 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> > 
> > ------------------
> > 
> > From: Cliff Wickman <cpw@sgi.com>
> > 
> > commit 3ee48b6af49cf534ca2f481ecc484b156a41451d upstream.
> > 
> > During the reading of /proc/vmcore the kernel is doing
> > ioremap()/iounmap() repeatedly. And the buildup of un-flushed
> > vm_area_struct's is causing a great deal of overhead. (rb_next()
> > is chewing up most of that time).
> > 
> > This solution is to provide function set_iounmap_nonlazy(). It
> > causes a subsequent call to iounmap() to immediately purge the
> > vma area (with try_purge_vmap_area_lazy()).
> > 
> > With this patch we have seen the time for writing a 250MB
> > compressed dump drop from 71 seconds to 44 seconds.
> [...]
> 
> Useful, but it doesn't seem to meet the criteria for stable updates.

I disagree, it's a major speedup, and an obvious bugfix for the problem.

thanks,

greg k-h

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

* Re: [Stable-review] [08/45] mm, x86: Saving vmcore with non-lazy freeing of vmas
@ 2010-11-22 17:59       ` Greg KH
  0 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-22 17:59 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: akpm, kexec, linux-kernel, stable, stable-review, Ingo Molnar,
	torvalds, Cliff Wickman, alan

On Sat, Nov 20, 2010 at 02:16:12AM +0000, Ben Hutchings wrote:
> On Fri, 2010-11-19 at 13:42 -0800, Greg KH wrote:
> > 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> > 
> > ------------------
> > 
> > From: Cliff Wickman <cpw@sgi.com>
> > 
> > commit 3ee48b6af49cf534ca2f481ecc484b156a41451d upstream.
> > 
> > During the reading of /proc/vmcore the kernel is doing
> > ioremap()/iounmap() repeatedly. And the buildup of un-flushed
> > vm_area_struct's is causing a great deal of overhead. (rb_next()
> > is chewing up most of that time).
> > 
> > This solution is to provide function set_iounmap_nonlazy(). It
> > causes a subsequent call to iounmap() to immediately purge the
> > vma area (with try_purge_vmap_area_lazy()).
> > 
> > With this patch we have seen the time for writing a 250MB
> > compressed dump drop from 71 seconds to 44 seconds.
> [...]
> 
> Useful, but it doesn't seem to meet the criteria for stable updates.

I disagree, it's a major speedup, and an obvious bugfix for the problem.

thanks,

greg k-h

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

* Re: [Stable-review] [39/45] OHCI: work around for nVidia shutdown problem
  2010-11-22 17:55       ` Greg KH
@ 2010-11-22 18:09         ` Alan Stern
  2011-01-19 16:51         ` Alan Stern
  1 sibling, 0 replies; 62+ messages in thread
From: Alan Stern @ 2010-11-22 18:09 UTC (permalink / raw)
  To: Greg KH
  Cc: Ben Hutchings, linux-kernel, stable, David Brownell, akpm,
	torvalds, stable-review, alan

On Mon, 22 Nov 2010, Greg KH wrote:

> On Sat, Nov 20, 2010 at 11:51:39AM -0500, Alan Stern wrote:
> > On Sat, 20 Nov 2010, Ben Hutchings wrote:
> > 
> > > On Fri, 2010-11-19 at 13:43 -0800, Greg KH wrote:
> > > > 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> > > > 
> > > > ------------------
> > > > 
> > > > From: Alan Stern <stern@rowland.harvard.edu>
> > > > 
> > > > commit 3df7169e73fc1d71a39cffeacc969f6840cdf52b upstream.
> > > > 
> > > > This patch (as1417) fixes a problem affecting some (or all) nVidia
> > > > chipsets.  When the computer is shut down, the OHCI controllers
> > > > continue to power the USB buses and evidently they drive a Reset
> > > > signal out all their ports.  This prevents attached devices from going
> > > > to low power.  Mouse LEDs stay on, for example, which is disconcerting
> > > > for users and a drain on laptop batteries.
> > > > 
> > > > The fix involves leaving each OHCI controller in the OPERATIONAL state
> > > > during system shutdown rather than putting it in the RESET state.
> > > > Although this nominally means the controller is running, in fact it's
> > > > not doing very much since all the schedules are all disabled.  However
> > > > there is ongoing DMA to the Host Controller Communications Area, so
> > > > the patch also disables the bus-master capability of all PCI USB
> > > > controllers after the shutdown routine runs.
> > > [...]
> > > 
> > > This last bit seems like a major change in behaviour, and this commit
> > > has only just gone into the 2.6.37 cycle.  How thoroughly has this been
> > > tested on other OHCI controllers?  Wouldn't it make more sense to use
> > > the same quirk condition?
> > 
> > Ben is right; let's hold off on putting this patch into any of the 
> > stable kernels.  There has been a bug report submitted against it, 
> > Bugzilla #22562.
> 
> Good point, I'll go drop it.
> 
> Alan, when it all gets worked out, care to resend it to
> stable@kernel.org?

Sure.

Alan Stern


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

* Re: [35/45] USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled
  2010-11-22  9:08   ` Nicolas Ferre
@ 2010-11-22 21:31     ` Greg KH
  0 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2010-11-22 21:31 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
	Jean-Christophe PLAGNIOL-VILLARD

On Mon, Nov 22, 2010 at 10:08:01AM +0100, Nicolas Ferre wrote:
> Le 19/11/2010 22:43, Greg KH :
> > 2.6.32-stable review patch.  If anyone has any objections, please let us know.
> 
> Hi Greg,
> 
> Please also add this typo one (or merge it): 
> 
> http://git.kernel.org/?p=linux/kernel/git/gregkh/usb-2.6.git;a=commit;h=b48809518631880207796b4aab0fc39c2f036754
> 
> Thanks a lot for monitoring this issue and adding to -stable...

I will get it in after it goes to Linus.

thanks,

greg k-h

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

* Re: [Stable-review] [39/45] OHCI: work around for nVidia shutdown problem
  2010-11-22 17:55       ` Greg KH
  2010-11-22 18:09         ` Alan Stern
@ 2011-01-19 16:51         ` Alan Stern
  2011-02-16 21:40           ` [stable] " Greg KH
  1 sibling, 1 reply; 62+ messages in thread
From: Alan Stern @ 2011-01-19 16:51 UTC (permalink / raw)
  To: Greg KH; +Cc: Larry.Finger, Ben Hutchings, Kernel development list, stable

On Mon, 22 Nov 2010, Greg KH wrote:

> On Sat, Nov 20, 2010 at 11:51:39AM -0500, Alan Stern wrote:
> > On Sat, 20 Nov 2010, Ben Hutchings wrote:
...
> > > This last bit seems like a major change in behaviour, and this commit
> > > has only just gone into the 2.6.37 cycle.  How thoroughly has this been
> > > tested on other OHCI controllers?  Wouldn't it make more sense to use
> > > the same quirk condition?
> > 
> > Ben is right; let's hold off on putting this patch into any of the 
> > stable kernels.  There has been a bug report submitted against it, 
> > Bugzilla #22562.
> 
> Good point, I'll go drop it.
> 
> Alan, when it all gets worked out, care to resend it to
> stable@kernel.org?

Okay, I'm resending it now that 2.6.37 has been out for a couple of
weeks.  The Bugzilla report has been resolved; apparently the problem
was a hardware issue in one particular computer and not a fault of the
patch.  Go ahead and add this to the stable kernels.


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

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

commit 3df7169e73fc1d71a39cffeacc969f6840cdf52b upstream.

This patch (as1417) fixes a problem affecting some (or all) nVidia
chipsets.  When the computer is shut down, the OHCI controllers
continue to power the USB buses and evidently they drive a Reset
signal out all their ports.  This prevents attached devices from going
to low power.  Mouse LEDs stay on, for example, which is disconcerting
for users and a drain on laptop batteries.

The fix involves leaving each OHCI controller in the OPERATIONAL state
during system shutdown rather than putting it in the RESET state.
Although this nominally means the controller is running, in fact it's
not doing very much since all the schedules are all disabled.  However
there is ongoing DMA to the Host Controller Communications Area, so
the patch also disables the bus-master capability of all PCI USB
controllers after the shutdown routine runs.

The fix is applied only to nVidia-based PCI OHCI controllers, so it
shouldn't cause problems on systems using other hardware.  As an added
safety measure, in case the kernel encounters one of these running
controllers during boot, the patch changes quirk_usb_handoff_ohci()
(which runs early on during PCI discovery) to reset the controller
before anything bad can happen.

Reported-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/hcd-pci.c    |    4 +++-
 drivers/usb/host/ohci-hcd.c   |    9 ++++++++-
 drivers/usb/host/ohci-pci.c   |   18 ++++++++++++++++++
 drivers/usb/host/ohci.h       |    1 +
 drivers/usb/host/pci-quirks.c |   18 +++++++++++-------
 5 files changed, 41 insertions(+), 9 deletions(-)

--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -329,8 +329,10 @@ void usb_hcd_pci_shutdown(struct pci_dev
 		return;
 
 	if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) &&
-			hcd->driver->shutdown)
+			hcd->driver->shutdown) {
 		hcd->driver->shutdown(hcd);
+		pci_disable_device(dev);
+	}
 }
 EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown);
 
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -398,7 +398,14 @@ ohci_shutdown (struct usb_hcd *hcd)
 
 	ohci = hcd_to_ohci (hcd);
 	ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
-	ohci_usb_reset (ohci);
+	ohci->hc_control = ohci_readl(ohci, &ohci->regs->control);
+
+	/* If the SHUTDOWN quirk is set, don't put the controller in RESET */
+	ohci->hc_control &= (ohci->flags & OHCI_QUIRK_SHUTDOWN ?
+			OHCI_CTRL_RWC | OHCI_CTRL_HCFS :
+			OHCI_CTRL_RWC);
+	ohci_writel(ohci, ohci->hc_control, &ohci->regs->control);
+
 	/* flush the writes */
 	(void) ohci_readl (ohci, &ohci->regs->control);
 }
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -201,6 +201,20 @@ static int ohci_quirk_amd700(struct usb_
 	return 0;
 }
 
+/* nVidia controllers continue to drive Reset signalling on the bus
+ * even after system shutdown, wasting power.  This flag tells the
+ * shutdown routine to leave the controller OPERATIONAL instead of RESET.
+ */
+static int ohci_quirk_nvidia_shutdown(struct usb_hcd *hcd)
+{
+	struct ohci_hcd	*ohci = hcd_to_ohci(hcd);
+
+	ohci->flags |= OHCI_QUIRK_SHUTDOWN;
+	ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
+
+	return 0;
+}
+
 /*
  * The hardware normally enables the A-link power management feature, which
  * lets the system lower the power consumption in idle states.
@@ -332,6 +346,10 @@ static const struct pci_device_id ohci_p
 		PCI_DEVICE(PCI_VENDOR_ID_ATI, 0x4399),
 		.driver_data = (unsigned long)ohci_quirk_amd700,
 	},
+	{
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID),
+		.driver_data = (unsigned long) ohci_quirk_nvidia_shutdown,
+	},
 
 	/* FIXME for some of the early AMD 760 southbridges, OHCI
 	 * won't work at all.  blacklist them.
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -403,6 +403,7 @@ struct ohci_hcd {
 #define	OHCI_QUIRK_HUB_POWER	0x100			/* distrust firmware power/oc setup */
 #define	OHCI_QUIRK_AMD_ISO	0x200			/* ISO transfers*/
 #define	OHCI_QUIRK_AMD_PREFETCH	0x400			/* pre-fetch for ISO transfer */
+#define	OHCI_QUIRK_SHUTDOWN	0x800			/* nVidia power bug */
 	// there are also chip quirks/bugs in init logic
 
 	struct work_struct	nec_work;	/* Worker for NEC quirk */
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -169,6 +169,7 @@ static int __devinit mmio_resource_enabl
 static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
 {
 	void __iomem *base;
+	u32 control;
 
 	if (!mmio_resource_enabled(pdev, 0))
 		return;
@@ -177,10 +178,14 @@ static void __devinit quirk_usb_handoff_
 	if (base == NULL)
 		return;
 
+	control = readl(base + OHCI_CONTROL);
+
 /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
-#ifndef __hppa__
-{
-	u32 control = readl(base + OHCI_CONTROL);
+#ifdef __hppa__
+#define	OHCI_CTRL_MASK		(OHCI_CTRL_RWC | OHCI_CTRL_IR)
+#else
+#define	OHCI_CTRL_MASK		OHCI_CTRL_RWC
+
 	if (control & OHCI_CTRL_IR) {
 		int wait_time = 500; /* arbitrary; 5 seconds */
 		writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
@@ -194,13 +199,12 @@ static void __devinit quirk_usb_handoff_
 			dev_warn(&pdev->dev, "OHCI: BIOS handoff failed"
 					" (BIOS bug?) %08x\n",
 					readl(base + OHCI_CONTROL));
-
-		/* reset controller, preserving RWC */
-		writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
 	}
-}
 #endif
 
+	/* reset controller, preserving RWC (and possibly IR) */
+	writel(control & OHCI_CTRL_MASK, base + OHCI_CONTROL);
+
 	/*
 	 * disable interrupts
 	 */



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

* Re: [stable] [Stable-review] [39/45] OHCI: work around for nVidia shutdown problem
  2011-01-19 16:51         ` Alan Stern
@ 2011-02-16 21:40           ` Greg KH
  0 siblings, 0 replies; 62+ messages in thread
From: Greg KH @ 2011-02-16 21:40 UTC (permalink / raw)
  To: Alan Stern
  Cc: Greg KH, stable, Ben Hutchings, Kernel development list, Larry.Finger

On Wed, Jan 19, 2011 at 11:51:59AM -0500, Alan Stern wrote:
> On Mon, 22 Nov 2010, Greg KH wrote:
> 
> > On Sat, Nov 20, 2010 at 11:51:39AM -0500, Alan Stern wrote:
> > > On Sat, 20 Nov 2010, Ben Hutchings wrote:
> ...
> > > > This last bit seems like a major change in behaviour, and this commit
> > > > has only just gone into the 2.6.37 cycle.  How thoroughly has this been
> > > > tested on other OHCI controllers?  Wouldn't it make more sense to use
> > > > the same quirk condition?
> > > 
> > > Ben is right; let's hold off on putting this patch into any of the 
> > > stable kernels.  There has been a bug report submitted against it, 
> > > Bugzilla #22562.
> > 
> > Good point, I'll go drop it.
> > 
> > Alan, when it all gets worked out, care to resend it to
> > stable@kernel.org?
> 
> Okay, I'm resending it now that 2.6.37 has been out for a couple of
> weeks.  The Bugzilla report has been resolved; apparently the problem
> was a hardware issue in one particular computer and not a fault of the
> patch.  Go ahead and add this to the stable kernels.

Ok, now added to the .32 stable queue.

thanks,

greg k-h

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

* Re: [39/45] OHCI: work around for nVidia shutdown problem
  2010-11-19 21:43 ` [39/45] OHCI: work around for nVidia shutdown problem Greg KH
  2010-11-20  2:52   ` [Stable-review] " Ben Hutchings
@ 2011-03-28 16:13   ` Andre "Osku" Schmidt
  1 sibling, 0 replies; 62+ messages in thread
From: Andre "Osku" Schmidt @ 2011-03-28 16:13 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
	Alan Stern, David Brownell

On Fri, Nov 19, 2010 at 10:43 PM, Greg KH <gregkh@suse.de> wrote:
> 2.6.32-stable review patch.  If anyone has any objections, please let us know.
>
> ------------------
>
> From: Alan Stern <stern@rowland.harvard.edu>
>
> commit 3df7169e73fc1d71a39cffeacc969f6840cdf52b upstream.
>
> This patch (as1417) fixes a problem affecting some (or all) nVidia
> chipsets.  When the computer is shut down, the OHCI controllers
> continue to power the USB buses and evidently they drive a Reset
> signal out all their ports.  This prevents attached devices from going
> to low power.  Mouse LEDs stay on, for example, which is disconcerting
> for users and a drain on laptop batteries.
>
> The fix involves leaving each OHCI controller in the OPERATIONAL state
> during system shutdown rather than putting it in the RESET state.
> Although this nominally means the controller is running, in fact it's
> not doing very much since all the schedules are all disabled.  However
> there is ongoing DMA to the Host Controller Communications Area, so
> the patch also disables the bus-master capability of all PCI USB
> controllers after the shutdown routine runs.
>
> The fix is applied only to nVidia-based PCI OHCI controllers, so it
> shouldn't cause problems on systems using other hardware.  As an added
> safety measure, in case the kernel encounters one of these running
> controllers during boot, the patch changes quirk_usb_handoff_ohci()
> (which runs early on during PCI discovery) to reset the controller
> before anything bad can happen.
>
> Reported-by: Pali Rohár <pali.rohar@gmail.com>
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> CC: David Brownell <david-b@pacbell.net>
> Tested-by: Pali Rohár <pali.rohar@gmail.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
>  drivers/usb/core/hcd-pci.c    |    4 +++-
>  drivers/usb/host/ohci-hcd.c   |    9 ++++++++-
>  drivers/usb/host/ohci-pci.c   |   18 ++++++++++++++++++
>  drivers/usb/host/ohci.h       |    1 +
>  drivers/usb/host/pci-quirks.c |   18 +++++++++++-------
>  5 files changed, 41 insertions(+), 9 deletions(-)
>
> --- a/drivers/usb/core/hcd-pci.c
> +++ b/drivers/usb/core/hcd-pci.c
> @@ -197,8 +197,10 @@ void usb_hcd_pci_shutdown(struct pci_dev
>        if (!hcd)
>                return;
>
> -       if (hcd->driver->shutdown)
> +       if (hcd->driver->shutdown) {
>                hcd->driver->shutdown(hcd);
> +               pci_disable_device(dev);
> +       }
>  }
>  EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown);
>
> --- a/drivers/usb/host/ohci-hcd.c
> +++ b/drivers/usb/host/ohci-hcd.c
> @@ -398,7 +398,14 @@ ohci_shutdown (struct usb_hcd *hcd)
>
>        ohci = hcd_to_ohci (hcd);
>        ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
> -       ohci_usb_reset (ohci);
> +       ohci->hc_control = ohci_readl(ohci, &ohci->regs->control);
> +
> +       /* If the SHUTDOWN quirk is set, don't put the controller in RESET */
> +       ohci->hc_control &= (ohci->flags & OHCI_QUIRK_SHUTDOWN ?
> +                       OHCI_CTRL_RWC | OHCI_CTRL_HCFS :
> +                       OHCI_CTRL_RWC);
> +       ohci_writel(ohci, ohci->hc_control, &ohci->regs->control);
> +
>        /* flush the writes */
>        (void) ohci_readl (ohci, &ohci->regs->control);
>  }
> --- a/drivers/usb/host/ohci-pci.c
> +++ b/drivers/usb/host/ohci-pci.c
> @@ -201,6 +201,20 @@ static int ohci_quirk_amd700(struct usb_
>        return 0;
>  }
>
> +/* nVidia controllers continue to drive Reset signalling on the bus
> + * even after system shutdown, wasting power.  This flag tells the
> + * shutdown routine to leave the controller OPERATIONAL instead of RESET.
> + */
> +static int ohci_quirk_nvidia_shutdown(struct usb_hcd *hcd)
> +{
> +       struct ohci_hcd *ohci = hcd_to_ohci(hcd);
> +
> +       ohci->flags |= OHCI_QUIRK_SHUTDOWN;
> +       ohci_dbg(ohci, "enabled nVidia shutdown quirk\n");
> +
> +       return 0;
> +}
> +
>  /*
>  * The hardware normally enables the A-link power management feature, which
>  * lets the system lower the power consumption in idle states.
> @@ -332,6 +346,10 @@ static const struct pci_device_id ohci_p
>                PCI_DEVICE(PCI_VENDOR_ID_ATI, 0x4399),
>                .driver_data = (unsigned long)ohci_quirk_amd700,
>        },
> +       {
> +               PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID),
> +               .driver_data = (unsigned long) ohci_quirk_nvidia_shutdown,
> +       },
>
>        /* FIXME for some of the early AMD 760 southbridges, OHCI
>         * won't work at all.  blacklist them.
> --- a/drivers/usb/host/ohci.h
> +++ b/drivers/usb/host/ohci.h
> @@ -403,6 +403,7 @@ struct ohci_hcd {
>  #define        OHCI_QUIRK_HUB_POWER    0x100                   /* distrust firmware power/oc setup */
>  #define        OHCI_QUIRK_AMD_ISO      0x200                   /* ISO transfers*/
>  #define        OHCI_QUIRK_AMD_PREFETCH 0x400                   /* pre-fetch for ISO transfer */
> +#define        OHCI_QUIRK_SHUTDOWN     0x800                   /* nVidia power bug */
>        // there are also chip quirks/bugs in init logic
>
>        struct work_struct      nec_work;       /* Worker for NEC quirk */
> --- a/drivers/usb/host/pci-quirks.c
> +++ b/drivers/usb/host/pci-quirks.c
> @@ -169,6 +169,7 @@ static int __devinit mmio_resource_enabl
>  static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
>  {
>        void __iomem *base;
> +       u32 control;
>
>        if (!mmio_resource_enabled(pdev, 0))
>                return;
> @@ -177,10 +178,14 @@ static void __devinit quirk_usb_handoff_
>        if (base == NULL)
>                return;
>
> +       control = readl(base + OHCI_CONTROL);
> +
>  /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
> -#ifndef __hppa__
> -{
> -       u32 control = readl(base + OHCI_CONTROL);
> +#ifdef __hppa__
> +#define        OHCI_CTRL_MASK          (OHCI_CTRL_RWC | OHCI_CTRL_IR)
> +#else
> +#define        OHCI_CTRL_MASK          OHCI_CTRL_RWC
> +
>        if (control & OHCI_CTRL_IR) {
>                int wait_time = 500; /* arbitrary; 5 seconds */
>                writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
> @@ -194,13 +199,12 @@ static void __devinit quirk_usb_handoff_
>                        dev_warn(&pdev->dev, "OHCI: BIOS handoff failed"
>                                        " (BIOS bug?) %08x\n",
>                                        readl(base + OHCI_CONTROL));
> -
> -               /* reset controller, preserving RWC */
> -               writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
>        }
> -}
>  #endif
>
> +       /* reset controller, preserving RWC (and possibly IR) */
> +       writel(control & OHCI_CTRL_MASK, base + OHCI_CONTROL);
> +
>        /*
>         * disable interrupts
>         */
>
>

Hello,

i think it was back when my distro got linux 2.6.37 that i noticed the
usb devices are not powered off anymore during shutdown. i was(/am)
lazy and didn't bother to investigate, until today. i found
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/42149 which
mentioned this patch (and that it was supposedly added in 2.6.37).

i boldly reversed this part for my current kernel (2.6.38.1) and build it*:

--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -398,7 +398,14 @@ ohci_shutdown (struct usb_hcd *hcd)

 	ohci = hcd_to_ohci (hcd);
 	ohci_writel (ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
-	ohci_usb_reset (ohci);
+	ohci->hc_control = ohci_readl(ohci, &ohci->regs->control);
+
+	/* If the SHUTDOWN quirk is set, don't put the controller in RESET */
+	ohci->hc_control &= (ohci->flags & OHCI_QUIRK_SHUTDOWN ?
+			OHCI_CTRL_RWC | OHCI_CTRL_HCFS :
+			OHCI_CTRL_RWC);
+	ohci_writel(ohci, ohci->hc_control, &ohci->regs->control);
+
 	/* flush the writes */
 	(void) ohci_readl (ohci, &ohci->regs->control);
 }

lo and behold, my usb devices are now powered off again at shutdown.

this was my first ever hack on the linux code, and i have no real idea
what i'm doing here...
but if theres anything i can do to help to solve this problem, please
let me know!

lspci -v | grep USB

00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev
a3) (prog-if 10 [OHCI])
00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev
a3) (prog-if 20 [EHCI])

cheers
.andre

* by following this method
https://wiki.archlinux.org/index.php/Kernel_Compilation

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

end of thread, other threads:[~2011-03-28 16:13 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19 21:44 [00/45] 2.6.32.26-stable review Greg KH
2010-11-19 21:42 ` Greg KH
2010-11-19 21:42 ` [01/45] staging: usbip: Notify usb core of port status changes Greg KH
2010-11-19 21:42 ` [02/45] staging: usbip: Process event flags without delay Greg KH
2010-11-19 21:42 ` [03/45] powerpc/perf: Fix sampling enable for PPC970 Greg KH
2010-11-19 21:42 ` [04/45] pcmcia: synclink_cs: fix information leak to userland Greg KH
2010-11-19 21:42 ` [05/45] sched: Fix string comparison in /proc/sched_features Greg KH
2010-11-19 21:42 ` [06/45] bluetooth: Fix missing NULL check Greg KH
2010-11-19 21:42 ` [07/45] futex: Fix errors in nested key ref-counting Greg KH
2010-11-19 21:42 ` [08/45] mm, x86: Saving vmcore with non-lazy freeing of vmas Greg KH
2010-11-19 21:42   ` Greg KH
2010-11-20  2:16   ` [Stable-review] " Ben Hutchings
2010-11-20  2:16     ` Ben Hutchings
2010-11-22 17:59     ` Greg KH
2010-11-22 17:59       ` Greg KH
2010-11-19 21:42 ` [09/45] x86, cpu: Fix renamed, not-yet-shipping AMD CPUID feature bit Greg KH
2010-11-19 21:42 ` [10/45] x86, kexec: Make sure to stop all CPUs before exiting the kernel Greg KH
2010-11-19 21:42 ` [11/45] x86, olpc: Dont retry EC commands forever Greg KH
2010-11-19 21:42 ` [12/45] x86, mtrr: Assume SYS_CFG[Tom2ForceMemTypeWB] exists on all future AMD CPUs Greg KH
2010-11-19 21:42 ` [13/45] x86, intr-remap: Set redirection hint in the IRTE Greg KH
2010-11-19 21:42 ` [14/45] x86, kdump: Change copy_oldmem_page() to use cached addressing Greg KH
2010-11-19 21:42   ` Greg KH
2010-11-19 21:42 ` [15/45] KVM: SVM: Fix wrong intercept masks on 32 bit Greg KH
2010-11-19 21:42 ` [16/45] KVM: MMU: fix direct sps access corrupted Greg KH
2010-11-19 21:42 ` [17/45] KVM: MMU: fix conflict access permissions in direct sp Greg KH
2010-11-19 21:42 ` [18/45] KVM: VMX: Fix host GDT.LIMIT corruption Greg KH
2010-11-19 21:42 ` [19/45] KVM: SVM: Adjust tsc_offset only if tsc_unstable Greg KH
2010-11-19 21:43 ` [20/45] KVM: x86: Fix SVM VMCB reset Greg KH
2010-11-19 21:43 ` [21/45] [PATCH 7/8] KVM: x86: Move TSC reset out of vmcb_init Greg KH
2010-11-19 21:43 ` [22/45] KVM: Fix fs/gs reload oops with invalid ldt Greg KH
2010-11-19 21:43 ` [23/45] pipe: fix failure to return error code on ->confirm() Greg KH
2010-11-19 21:43 ` [24/45] p54usb: fix off-by-one on !CONFIG_PM Greg KH
2010-11-19 21:43 ` [25/45] p54usb: add five more USBIDs Greg KH
2010-11-19 21:43 ` [26/45] drivers/net/wireless/p54/eeprom.c: Return -ENOMEM on memory allocation failure Greg KH
2010-11-19 21:43 ` [27/45] USB: ftdi_sio: Add PID for accesio products Greg KH
2010-11-19 21:43 ` [28/45] USB: add PID for FTDI based OpenDCC hardware Greg KH
2010-11-19 21:43 ` [29/45] USB: ftdi_sio: new VID/PIDs for various Papouch devices Greg KH
2010-11-19 21:43 ` [30/45] USB: ftdi_sio: add device ids for ScienceScope Greg KH
2010-11-19 21:43 ` [31/45] usb: musb: blackfin: call gpio_free() on error path in musb_platform_init() Greg KH
2010-11-19 21:43 ` [32/45] USB: option: Add more ZTE modem USB ids Greg KH
2010-11-19 21:43 ` [33/45] USB: cp210x: Add Renesas RX-Stick device ID Greg KH
2010-11-19 21:43 ` [34/45] USB: cp210x: Add WAGO 750-923 Service Cable " Greg KH
2010-11-19 21:43 ` [35/45] USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled Greg KH
2010-11-22  9:08   ` Nicolas Ferre
2010-11-22 21:31     ` Greg KH
2010-11-19 21:43 ` [36/45] USB: disable endpoints after unbinding interfaces, not before Greg KH
2010-11-19 21:43 ` [37/45] USB: opticon: Fix long-standing bugs in opticon driver Greg KH
2010-11-19 21:43 ` [38/45] USB: accept some invalid ep0-maxpacket values Greg KH
2010-11-19 21:43 ` [39/45] OHCI: work around for nVidia shutdown problem Greg KH
2010-11-20  2:52   ` [Stable-review] " Ben Hutchings
2010-11-20 16:51     ` Alan Stern
2010-11-22 17:55       ` Greg KH
2010-11-22 18:09         ` Alan Stern
2011-01-19 16:51         ` Alan Stern
2011-02-16 21:40           ` [stable] " Greg KH
2011-03-28 16:13   ` Andre "Osku" Schmidt
2010-11-19 21:43 ` [40/45] [SCSI] sd name space exhaustion causes system hang Greg KH
2010-11-19 21:43 ` [41/45] [SCSI] libsas: fix NCQ mixing with non-NCQ Greg KH
2010-11-19 21:43 ` [42/45] [SCSI] gdth: integer overflow in ioctl Greg KH
2010-11-19 21:43 ` [43/45] [SCSI] Fix race when removing SCSI devices Greg KH
2010-11-19 21:43 ` [44/45] [SCSI] Fix regressions in scsi_internal_device_block Greg KH
2010-11-19 21:43 ` [45/45] sgi-xp: incoming XPC channel messages can come in after the channels partition structures have been torn down 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.