]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more patches added
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Mar 2007 02:13:17 +0000 (18:13 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Mar 2007 02:13:17 +0000 (18:13 -0800)
queue-2.6.20/backport-of-psmouse-suspend-shutdown-cleanups.patch [new file with mode: 0644]
queue-2.6.20/series
queue-2.6.20/usb-usbnet-driver-bugfix.patch [new file with mode: 0644]

diff --git a/queue-2.6.20/backport-of-psmouse-suspend-shutdown-cleanups.patch b/queue-2.6.20/backport-of-psmouse-suspend-shutdown-cleanups.patch
new file mode 100644 (file)
index 0000000..51493d3
--- /dev/null
@@ -0,0 +1,91 @@
+From stable-bounces@linux.kernel.org Thu Feb 22 04:54:02 2007
+From: Thomas Renninger <trenn@suse.de>
+Date: Thu, 22 Feb 2007 13:52:40 +0100
+Subject: Backport of psmouse suspend/shutdown cleanups
+Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Message-ID: <1172148760.10619.197.camel@d36.suse.de>
+
+From: Thomas Renninger <trenn@suse.de>
+
+This patch works back to 2.6.17 (earlier kernels seem to
+need up/down operations on mutex/semaphore).
+
+psmouse - properly reset mouse on shutdown/suspend
+
+Some people report that they need psmouse module unloaded
+for suspend to ram/disk to work properly. Let's make port
+cleanup behave the same way as driver unload.
+
+This fixes "bad state" problem on various HP laptops, such
+as nx7400.
+
+
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/mouse/psmouse-base.c |   28 ++++++++++++++++++++++++++++
+ drivers/input/mouse/psmouse.h      |    1 +
+ drivers/input/mouse/synaptics.c    |    1 +
+ 3 files changed, 30 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/input/mouse/psmouse-base.c
++++ linux-2.6.20.1/drivers/input/mouse/psmouse-base.c
+@@ -987,8 +987,36 @@ static void psmouse_resync(struct work_s
+ static void psmouse_cleanup(struct serio *serio)
+ {
+       struct psmouse *psmouse = serio_get_drvdata(serio);
++      struct psmouse *parent = NULL;
++
++      mutex_lock(&psmouse_mutex);
++
++      if (serio->parent && serio->id.type == SERIO_PS_PSTHRU) {
++              parent = serio_get_drvdata(serio->parent);
++              psmouse_deactivate(parent);
++      }
++
++      psmouse_deactivate(psmouse);
++
++      if (psmouse->cleanup)
++              psmouse->cleanup(psmouse);
+       psmouse_reset(psmouse);
++
++/*
++ * Some boxes, such as HP nx7400, get terribly confused if mouse
++ * is not fully enabled before suspending/shutting down.
++ */
++      ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
++
++      if (parent) {
++              if (parent->pt_deactivate)
++                      parent->pt_deactivate(parent);
++
++              psmouse_activate(parent);
++      }
++
++      mutex_unlock(&psmouse_mutex);
+ }
+ /*
+--- linux-2.6.20.1.orig/drivers/input/mouse/psmouse.h
++++ linux-2.6.20.1/drivers/input/mouse/psmouse.h
+@@ -68,6 +68,7 @@ struct psmouse {
+       int (*reconnect)(struct psmouse *psmouse);
+       void (*disconnect)(struct psmouse *psmouse);
++      void (*cleanup)(struct psmouse *psmouse);
+       int (*poll)(struct psmouse *psmouse);
+       void (*pt_activate)(struct psmouse *psmouse);
+--- linux-2.6.20.1.orig/drivers/input/mouse/synaptics.c
++++ linux-2.6.20.1/drivers/input/mouse/synaptics.c
+@@ -652,6 +652,7 @@ int synaptics_init(struct psmouse *psmou
+       psmouse->set_rate = synaptics_set_rate;
+       psmouse->disconnect = synaptics_disconnect;
+       psmouse->reconnect = synaptics_reconnect;
++      psmouse->cleanup = synaptics_reset;
+       psmouse->pktsize = 6;
+       /* Synaptics can usually stay in sync without extra help */
+       psmouse->resync_time = 0;
index ac1a510c39a8bb30ce6a5ca96056478817b3fbbb..4b877e66363a00bc9d14329fac89289b7282542d 100644 (file)
@@ -75,3 +75,5 @@ jfs_fix_deadlock.patch
 forcedeth-disable-msix.patch
 tty_io-fix-race-in-master-pty-close-slave-pty-close-path.patch
 sched-fix-smt-scheduler-bug.patch
+usb-usbnet-driver-bugfix.patch
+backport-of-psmouse-suspend-shutdown-cleanups.patch
diff --git a/queue-2.6.20/usb-usbnet-driver-bugfix.patch b/queue-2.6.20/usb-usbnet-driver-bugfix.patch
new file mode 100644 (file)
index 0000000..61f6356
--- /dev/null
@@ -0,0 +1,49 @@
+From stable-bounces@linux.kernel.org Wed Feb 21 08:52:24 2007
+From: David Brownell <david-b@pacbell.net>
+Date: Wed, 21 Feb 2007 11:50:33 -0500
+Subject: USB: usbnet driver bugfix
+To: Greg KH <greg@kroah.com>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Message-ID: <45DC7859.7060300@redhat.com>
+
+From: David Brownell <david-b@pacbell.net>
+
+The attached fixes an oops in the usbnet driver. The same patch is
+in 2.6.21-rc1, but that one has many whitespace changes. This is much
+smaller.
+
+
+Signed-off-by: David Brownell <david-b@pacbell.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/net/usbnet.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/usb/net/usbnet.c
++++ linux-2.6.20.1/drivers/usb/net/usbnet.c
+@@ -1182,6 +1182,9 @@ usbnet_probe (struct usb_interface *udev
+       // NOTE net->name still not usable ...
+       if (info->bind) {
+               status = info->bind (dev, udev);
++              if (status < 0)
++                      goto out1;
++
+               // heuristic:  "usb%d" for links we know are two-host,
+               // else "eth%d" when there's reasonable doubt.  userspace
+               // can rename the link if it knows better.
+@@ -1208,12 +1211,12 @@ usbnet_probe (struct usb_interface *udev
+       if (status == 0 && dev->status)
+               status = init_status (dev, udev);
+       if (status < 0)
+-              goto out1;
++              goto out3;
+       if (!dev->rx_urb_size)
+               dev->rx_urb_size = dev->hard_mtu;
+       dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
+-      
++
+       SET_NETDEV_DEV(net, &udev->dev);
+       status = register_netdev (net);
+       if (status)