aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-12-03 16:30:50 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-03 16:30:50 -0800
commitbfeb937543cadef89fb696aa1fa1e7e854690714 (patch)
tree3cecd68758be2ccabdebcf77e347b4d9f2b0a4b8
parentc841859556b9313f9f21dfdcace88f8ba29cba10 (diff)
downloadpatches-bfeb937543cadef89fb696aa1fa1e7e854690714.tar.gz
2.6.32 sync
Add samsung-laptop driver remove patches already in Linus's tree
-rw-r--r--series39
-rw-r--r--staging.current/staging-hv-fix-argument-order-in-incorrect-memset-invocations-in-hyperv-driver.patch69
-rw-r--r--staging.current/staging-hv-fix-some-missing-author-names.patch76
-rw-r--r--staging.current/staging-hv-fix-vmbus-event-handler-bug.patch76
-rw-r--r--staging.current/staging-update-todo-files.patch62
-rw-r--r--staging/staging-add-samsung-laptop-driver.patch642
-rw-r--r--staging/staging-samsung-laptop-add-todo-file.patch20
-rw-r--r--staging/staging-samsung-laptop-remove-old-kernel-code.patch78
-rw-r--r--tty.current/bcm63xx_uart-fix-serial-driver-compile-breakage.patch39
-rw-r--r--tty.current/tty-of_serial-add-missing-ns16550a-id.patch35
-rw-r--r--tty.current/tty_port-handle-the-nonblocking-open-of-a-dead-port-corner-case.patch35
-rw-r--r--usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch45
-rw-r--r--usb.current/usb-amd5536udc-fixed-shared-interrupt-bug-and-warning-oops.patch125
-rw-r--r--usb.current/usb-ehci-don-t-send-clear-tt-buffer-following-a-stall.patch72
-rw-r--r--usb.current/usb-ftdi_sio-keep-going-when-write-errors-are-encountered.patch46
-rw-r--r--usb.current/usb-musb-fix-cppi-irqs-not-being-signaled.patch56
-rw-r--r--usb.current/usb-musb-fix-isoc-tx-programming-for-cppi-dmas.patch38
-rw-r--r--usb.current/usb-musb-remove-unwanted-message-in-boot-log.patch47
-rw-r--r--usb.current/usb-musb-respect-usb_request-zero-in-control-requests.patch39
-rw-r--r--usb.current/usb-musb_gadget-fix-stall-handling.patch224
-rw-r--r--usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch101
-rw-r--r--version2
22 files changed, 762 insertions, 1204 deletions
diff --git a/series b/series
index bc3a6fa540dfb2..49fd031ea9b4fe 100644
--- a/series
+++ b/series
@@ -13,31 +13,31 @@ gregkh/gkh-version.patch
#################################
# TTY patches for 2.6.32
#################################
-tty.current/tty_port-handle-the-nonblocking-open-of-a-dead-port-corner-case.patch
-tty.current/bcm63xx_uart-fix-serial-driver-compile-breakage.patch
-tty.current/tty-of_serial-add-missing-ns16550a-id.patch
+#tty.current/tty_port-handle-the-nonblocking-open-of-a-dead-port-corner-case.patch
+#tty.current/bcm63xx_uart-fix-serial-driver-compile-breakage.patch
+#tty.current/tty-of_serial-add-missing-ns16550a-id.patch
#################################
# USB patches for 2.6.32
#################################
-usb.current/usb-ehci-don-t-send-clear-tt-buffer-following-a-stall.patch
-usb.current/usb-musb_gadget-fix-stall-handling.patch
-usb.current/usb-ftdi_sio-keep-going-when-write-errors-are-encountered.patch
-usb.current/usb-amd5536udc-fixed-shared-interrupt-bug-and-warning-oops.patch
-usb.current/usb-musb-remove-unwanted-message-in-boot-log.patch
-usb.current/usb-musb-fix-isoc-tx-programming-for-cppi-dmas.patch
-usb.current/usb-musb-respect-usb_request-zero-in-control-requests.patch
-usb.current/usb-musb-fix-cppi-irqs-not-being-signaled.patch
-usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch
-usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch
+#usb.current/usb-ehci-don-t-send-clear-tt-buffer-following-a-stall.patch
+#usb.current/usb-musb_gadget-fix-stall-handling.patch
+#usb.current/usb-ftdi_sio-keep-going-when-write-errors-are-encountered.patch
+#usb.current/usb-amd5536udc-fixed-shared-interrupt-bug-and-warning-oops.patch
+#usb.current/usb-musb-remove-unwanted-message-in-boot-log.patch
+#usb.current/usb-musb-fix-isoc-tx-programming-for-cppi-dmas.patch
+#usb.current/usb-musb-respect-usb_request-zero-in-control-requests.patch
+#usb.current/usb-musb-fix-cppi-irqs-not-being-signaled.patch
+#usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch
+#usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch
#################################
# Staging patches for 2.6.32
#################################
-staging.current/staging-hv-fix-argument-order-in-incorrect-memset-invocations-in-hyperv-driver.patch
-staging.current/staging-hv-fix-vmbus-event-handler-bug.patch
-staging.current/staging-hv-fix-some-missing-author-names.patch
-staging.current/staging-update-todo-files.patch
+#staging.current/staging-hv-fix-argument-order-in-incorrect-memset-invocations-in-hyperv-driver.patch
+#staging.current/staging-hv-fix-vmbus-event-handler-bug.patch
+#staging.current/staging-hv-fix-some-missing-author-names.patch
+#staging.current/staging-update-todo-files.patch
#####################################################################
@@ -466,6 +466,10 @@ staging/staging-rtl8192u-depends-on-usb.patch
staging/staging-batman-adv-meshing-protocol.patch
+staging/staging-add-samsung-laptop-driver.patch
+staging/staging-samsung-laptop-remove-old-kernel-code.patch
+staging/staging-samsung-laptop-add-todo-file.patch
+
# tty stuff still under work
#tty.work/tty-usb-cleanup-open
#tty.work/serial-extract-portops
@@ -474,4 +478,3 @@ staging/staging-batman-adv-meshing-protocol.patch
#tty.work/serial-core-port-wait
#tty.work/serial-f81216-helper
-
diff --git a/staging.current/staging-hv-fix-argument-order-in-incorrect-memset-invocations-in-hyperv-driver.patch b/staging.current/staging-hv-fix-argument-order-in-incorrect-memset-invocations-in-hyperv-driver.patch
deleted file mode 100644
index 6ffd9be1911849..00000000000000
--- a/staging.current/staging-hv-fix-argument-order-in-incorrect-memset-invocations-in-hyperv-driver.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From davej@redhat.com Thu Nov 19 11:30:16 2009
-From: Dave Jones <davej@redhat.com>
-Date: Wed, 11 Nov 2009 16:57:03 -0500
-Subject: Staging: hv: Fix argument order in incorrect memset invocations in hyperv driver.
-To: Hank Janssen <hjanssen@microsoft.com>
-Cc: Greg Kroah-Hartman <gregkh@suse.de>
-Message-ID: <20091111215703.GA24390@redhat.com>
-Content-Disposition: inline
-
-From: Dave Jones <davej@redhat.com>
-
-Nearly every invocation of memset in drivers/staging/hv/StorVsc.c has
-its arguments the wrong way around.
-
-Signed-off-by: Dave Jones <davej@redhat.com>
-Cc: Hank Janssen <hjanssen@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/staging/hv/StorVsc.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
---- a/drivers/staging/hv/StorVsc.c
-+++ b/drivers/staging/hv/StorVsc.c
-@@ -196,7 +196,7 @@ static int StorVscChannelInit(struct hv_
- * Now, initiate the vsc/vsp initialization protocol on the open
- * channel
- */
-- memset(request, sizeof(struct storvsc_request_extension), 0);
-+ memset(request, 0, sizeof(struct storvsc_request_extension));
- request->WaitEvent = osd_WaitEventCreate();
-
- vstorPacket->Operation = VStorOperationBeginInitialization;
-@@ -233,7 +233,7 @@ static int StorVscChannelInit(struct hv_
- DPRINT_INFO(STORVSC, "QUERY_PROTOCOL_VERSION_OPERATION...");
-
- /* reuse the packet for version range supported */
-- memset(vstorPacket, sizeof(struct vstor_packet), 0);
-+ memset(vstorPacket, 0, sizeof(struct vstor_packet));
- vstorPacket->Operation = VStorOperationQueryProtocolVersion;
- vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
-
-@@ -266,7 +266,7 @@ static int StorVscChannelInit(struct hv_
- /* Query channel properties */
- DPRINT_INFO(STORVSC, "QUERY_PROPERTIES_OPERATION...");
-
-- memset(vstorPacket, sizeof(struct vstor_packet), 0);
-+ memset(vstorPacket, 0, sizeof(struct vstor_packet));
- vstorPacket->Operation = VStorOperationQueryProperties;
- vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
- vstorPacket->StorageChannelProperties.PortNumber =
-@@ -305,7 +305,7 @@ static int StorVscChannelInit(struct hv_
-
- DPRINT_INFO(STORVSC, "END_INITIALIZATION_OPERATION...");
-
-- memset(vstorPacket, sizeof(struct vstor_packet), 0);
-+ memset(vstorPacket, 0, sizeof(struct vstor_packet));
- vstorPacket->Operation = VStorOperationEndInitialization;
- vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
-
-@@ -508,7 +508,7 @@ static int StorVscConnectToVsp(struct hv
- int ret;
-
- storDriver = (struct storvsc_driver_object *)Device->Driver;
-- memset(&props, sizeof(struct vmstorage_channel_properties), 0);
-+ memset(&props, 0, sizeof(struct vmstorage_channel_properties));
-
- /* Open the channel */
- ret = Device->Driver->VmbusChannelInterface.Open(Device,
diff --git a/staging.current/staging-hv-fix-some-missing-author-names.patch b/staging.current/staging-hv-fix-some-missing-author-names.patch
deleted file mode 100644
index a2aa7c96ca96d1..00000000000000
--- a/staging.current/staging-hv-fix-some-missing-author-names.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From haiyangz@microsoft.com Mon Nov 30 14:38:00 2009
-From: Haiyang Zhang <haiyangz@microsoft.com>
-Date: Mon, 23 Nov 2009 17:00:22 +0000
-Subject: Staging: hv: Fix some missing author names
-To: "'gregkh@suse.de'" <gregkh@suse.de>, Hank Janssen <hjanssen@microsoft.com>
-Message-ID: <1FB5E1D5CA062146B38059374562DF7230C8352F@TK5EX14MBXC126.redmond.corp.microsoft.com>
-
-
-From: Haiyang Zhang <haiyangz@microsoft.com>
-
-Fix some missing author names.
-They were accidentally removed by someone within Microsoft before the
-files were sent for inclusion in the kernel.
-
-Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
-Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/staging/hv/BlkVsc.c | 1 +
- drivers/staging/hv/NetVsc.c | 1 +
- drivers/staging/hv/NetVsc.h | 1 +
- drivers/staging/hv/blkvsc_drv.c | 1 +
- drivers/staging/hv/netvsc_drv.c | 1 +
- 5 files changed, 5 insertions(+)
-
---- a/drivers/staging/hv/BlkVsc.c
-+++ b/drivers/staging/hv/BlkVsc.c
-@@ -16,6 +16,7 @@
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
-+ * Haiyang Zhang <haiyangz@microsoft.com>
- * Hank Janssen <hjanssen@microsoft.com>
- *
- */
---- a/drivers/staging/hv/blkvsc_drv.c
-+++ b/drivers/staging/hv/blkvsc_drv.c
-@@ -15,6 +15,7 @@
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
-+ * Haiyang Zhang <haiyangz@microsoft.com>
- * Hank Janssen <hjanssen@microsoft.com>
- */
- #include <linux/init.h>
---- a/drivers/staging/hv/NetVsc.c
-+++ b/drivers/staging/hv/NetVsc.c
-@@ -15,6 +15,7 @@
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
-+ * Haiyang Zhang <haiyangz@microsoft.com>
- * Hank Janssen <hjanssen@microsoft.com>
- */
- #include <linux/kernel.h>
---- a/drivers/staging/hv/netvsc_drv.c
-+++ b/drivers/staging/hv/netvsc_drv.c
-@@ -15,6 +15,7 @@
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
-+ * Haiyang Zhang <haiyangz@microsoft.com>
- * Hank Janssen <hjanssen@microsoft.com>
- */
- #include <linux/init.h>
---- a/drivers/staging/hv/NetVsc.h
-+++ b/drivers/staging/hv/NetVsc.h
-@@ -16,6 +16,7 @@
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
-+ * Haiyang Zhang <haiyangz@microsoft.com>
- * Hank Janssen <hjanssen@microsoft.com>
- *
- */
diff --git a/staging.current/staging-hv-fix-vmbus-event-handler-bug.patch b/staging.current/staging-hv-fix-vmbus-event-handler-bug.patch
deleted file mode 100644
index 1d3f86db86ba57..00000000000000
--- a/staging.current/staging-hv-fix-vmbus-event-handler-bug.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From haiyangz@microsoft.com Fri Nov 20 09:09:04 2009
-From: Haiyang Zhang <haiyangz@microsoft.com>
-Date: Fri, 20 Nov 2009 16:29:17 +0000
-Subject: Staging: hv: Fix vmbus event handler bug
-To: "'gregkh@suse.de'" <gregkh@suse.de>, Hank Janssen <hjanssen@microsoft.com>
-Message-ID: <1FB5E1D5CA062146B38059374562DF721E431CF3@TK5EX14MBXC130.redmond.corp.microsoft.com>
-
-
-From: Haiyang Zhang <haiyangz@microsoft.com>
-
-The flag ENABLE_POLLING is always enabled in original Makefile, but
-accidently removed during porting to mainline kernel. The patch fixes
-this bug which can cause stalled network communication. Credit needs to
-go to Eric Sesterhenn <eric.sesterhenn@lsexperts.de> For pointing out a
-typo in the original code as well.
-
-Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
-Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/staging/hv/Channel.c | 16 ++++------------
- drivers/staging/hv/ChannelMgmt.c | 2 +-
- 2 files changed, 5 insertions(+), 13 deletions(-)
-
---- a/drivers/staging/hv/Channel.c
-+++ b/drivers/staging/hv/Channel.c
-@@ -611,7 +611,7 @@ void VmbusChannelClose(struct vmbus_chan
-
- /* Stop callback and cancel the timer asap */
- Channel->OnChannelCallback = NULL;
-- del_timer(&Channel->poll_timer);
-+ del_timer_sync(&Channel->poll_timer);
-
- /* Send a closing message */
- info = kmalloc(sizeof(*info) +
-@@ -978,14 +978,10 @@ void VmbusChannelOnChannelEvent(struct v
- {
- DumpVmbusChannel(Channel);
- ASSERT(Channel->OnChannelCallback);
--#ifdef ENABLE_POLLING
-- del_timer(&Channel->poll_timer);
-- Channel->OnChannelCallback(Channel->ChannelCallbackContext);
-- channel->poll_timer.expires(jiffies + usecs_to_jiffies(100);
-- add_timer(&channel->poll_timer);
--#else
-+
- Channel->OnChannelCallback(Channel->ChannelCallbackContext);
--#endif
-+
-+ mod_timer(&Channel->poll_timer, jiffies + usecs_to_jiffies(100));
- }
-
- /**
-@@ -997,10 +993,6 @@ void VmbusChannelOnTimer(unsigned long d
-
- if (channel->OnChannelCallback) {
- channel->OnChannelCallback(channel->ChannelCallbackContext);
--#ifdef ENABLE_POLLING
-- channel->poll_timer.expires(jiffies + usecs_to_jiffies(100);
-- add_timer(&channel->poll_timer);
--#endif
- }
- }
-
---- a/drivers/staging/hv/ChannelMgmt.c
-+++ b/drivers/staging/hv/ChannelMgmt.c
-@@ -119,7 +119,7 @@ static inline void ReleaseVmbusChannel(v
- */
- void FreeVmbusChannel(struct vmbus_channel *Channel)
- {
-- del_timer(&Channel->poll_timer);
-+ del_timer_sync(&Channel->poll_timer);
-
- /*
- * We have to release the channel's workqueue/thread in the vmbus's
diff --git a/staging.current/staging-update-todo-files.patch b/staging.current/staging-update-todo-files.patch
deleted file mode 100644
index e3c5041cf149b6..00000000000000
--- a/staging.current/staging-update-todo-files.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From bzolnier@gmail.com Fri Nov 20 09:09:53 2009
-From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-Date: Wed, 21 Oct 2009 14:42:11 +0200
-Subject: Staging: update TODO files
-To: Greg KH <gregkh@suse.de>
-Message-ID: <200910211442.11785.bzolnier@gmail.com>
-
-
-From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-
-Remove my mail address.
-
-Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/staging/rtl8187se/TODO | 3 +--
- drivers/staging/rtl8192su/TODO | 3 +--
- drivers/staging/vt6655/TODO | 5 ++---
- drivers/staging/vt6656/TODO | 5 ++---
- 4 files changed, 6 insertions(+), 10 deletions(-)
-
---- a/drivers/staging/rtl8187se/TODO
-+++ b/drivers/staging/rtl8187se/TODO
-@@ -11,5 +11,4 @@ TODO:
- - sparse fixes
- - integrate with drivers/net/wireless/rtl818x
-
--Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
--Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>.
-+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>.
---- a/drivers/staging/rtl8192su/TODO
-+++ b/drivers/staging/rtl8192su/TODO
-@@ -14,5 +14,4 @@ TODO:
- - sparse fixes
- - integrate with drivers/net/wireless/rtl818x
-
--Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
--Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>.
-+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>.
---- a/drivers/staging/vt6655/TODO
-+++ b/drivers/staging/vt6655/TODO
-@@ -16,6 +16,5 @@ TODO:
- - sparse fixes
- - integrate with drivers/net/wireless
-
--Please send any patches to Greg Kroah-Hartman <greg@kroah.com>,
--Forest Bond <forest@alittletooquiet.net> and Bartlomiej Zolnierkiewicz
--<bzolnier@gmail.com>.
-+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>
-+and Forest Bond <forest@alittletooquiet.net>.
---- a/drivers/staging/vt6656/TODO
-+++ b/drivers/staging/vt6656/TODO
-@@ -15,6 +15,5 @@ TODO:
- - sparse fixes
- - integrate with drivers/net/wireless
-
--Please send any patches to Greg Kroah-Hartman <greg@kroah.com>,
--Forest Bond <forest@alittletooquiet.net> and Bartlomiej Zolnierkiewicz
--<bzolnier@gmail.com>.
-+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>
-+and Forest Bond <forest@alittletooquiet.net>.
diff --git a/staging/staging-add-samsung-laptop-driver.patch b/staging/staging-add-samsung-laptop-driver.patch
new file mode 100644
index 00000000000000..20c4eed8d6b627
--- /dev/null
+++ b/staging/staging-add-samsung-laptop-driver.patch
@@ -0,0 +1,642 @@
+From foo@baz Thu Dec 3 16:19:47 PST 2009
+Date: Thu, 03 Dec 2009 16:19:47 -0800
+To: Greg KH <greg@kroah.com>
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: Staging: add Samsung Laptop driver
+
+This is a drive for the Samsung N128 laptop to control the wireless LED
+and backlight.
+
+Many thanks to Joey Lee for his help in testing and finding all of my
+bugs in the development of this driver, it has been invaluable.
+
+Cc: Joey Lee <jlee@novell.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/Kconfig | 2
+ drivers/staging/Makefile | 1
+ drivers/staging/samsung-laptop/Kconfig | 10
+ drivers/staging/samsung-laptop/Makefile | 1
+ drivers/staging/samsung-laptop/samsung-laptop.c | 582 ++++++++++++++++++++++++
+ 5 files changed, 596 insertions(+)
+
+--- a/drivers/staging/Kconfig
++++ b/drivers/staging/Kconfig
+@@ -129,5 +129,7 @@ source "drivers/staging/wlags49_h25/Kcon
+
+ source "drivers/staging/batman-adv/Kconfig"
+
++source "drivers/staging/samsung-laptop/Kconfig"
++
+ endif # !STAGING_EXCLUDE_BUILD
+ endif # STAGING
+--- a/drivers/staging/Makefile
++++ b/drivers/staging/Makefile
+@@ -46,3 +46,4 @@ obj-$(CONFIG_RAMZSWAP) += ramzswap/
+ obj-$(CONFIG_WLAGS49_H2) += wlags49_h2/
+ obj-$(CONFIG_WLAGS49_H25) += wlags49_h25/
+ obj-$(CONFIG_BATMAN_ADV) += batman-adv/
++obj-$(CONFIG_SAMSUNG_LAPTOP) += samsung-laptop/
+--- /dev/null
++++ b/drivers/staging/samsung-laptop/Kconfig
+@@ -0,0 +1,10 @@
++config SAMSUNG_LAPTOP
++ tristate "Samsung Laptop driver"
++ default n
++ depends on RFKILL && BACKLIGHT_CLASS_DEVICE && X86
++ help
++ This module implements a driver for the N128 Samsung Laptop
++ providing control over the Wireless LED and the LCD backlight
++
++ To compile this driver as a module, choose
++ M here: the module will be called samsung-laptop.
+--- /dev/null
++++ b/drivers/staging/samsung-laptop/Makefile
+@@ -0,0 +1 @@
++obj-$(CONFIG_SAMSUNG_LAPTOP) += samsung-laptop.o
+--- /dev/null
++++ b/drivers/staging/samsung-laptop/samsung-laptop.c
+@@ -0,0 +1,582 @@
++/*
++ * Samsung N130 Laptop driver
++ *
++ * Copyright (C) 2009 Greg Kroah-Hartman (gregkh@suse.de)
++ * Copyright (C) 2009 Novell Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published by
++ * the Free Software Foundation.
++ *
++ */
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/delay.h>
++#include <linux/pci.h>
++#include <linux/backlight.h>
++#include <linux/fb.h>
++#include <linux/dmi.h>
++#include <linux/platform_device.h>
++#include <linux/rfkill.h>
++
++/*
++ * This driver is needed because a number of Samsung laptops do not hook
++ * their control settings through ACPI. So we have to poke around in the
++ * BIOS to do things like brightness values, and "special" key controls.
++ */
++
++/*
++ * We have 0 - 8 as valid brightness levels. The specs say that level 0 should
++ * be reserved by the BIOS (which really doesn't make much sense), we tell
++ * userspace that the value is 0 - 7 and then just tell the hardware 1 - 8
++ */
++#define MAX_BRIGHT 0x07
++
++/* Brightness is 0 - 8, as described above. Value 0 is for the BIOS to use */
++#define GET_BRIGHTNESS 0x00
++#define SET_BRIGHTNESS 0x01
++
++/* first byte:
++ * 0x00 - wireless is off
++ * 0x01 - wireless is on
++ * second byte:
++ * 0x02 - 3G is off
++ * 0x03 - 3G is on
++ * TODO, verify 3G is correct, that doesn't seem right...
++ */
++#define GET_WIRELESS_BUTTON 0x02
++#define SET_WIRELESS_BUTTON 0x03
++
++/* 0 is off, 1 is on */
++#define GET_BACKLIGHT 0x04
++#define SET_BACKLIGHT 0x05
++
++/*
++ * 0x80 or 0x00 - no action
++ * 0x81 - recovery key pressed
++ */
++#define GET_RECOVERY_METHOD 0x06
++#define SET_RECOVERY_METHOD 0x07
++
++/* 0 is low, 1 is high */
++#define GET_PERFORMANCE_LEVEL 0x08
++#define SET_PERFORMANCE_LEVEL 0x09
++
++/*
++ * Tell the BIOS that Linux is running on this machine.
++ * 81 is on, 80 is off
++ */
++#define SET_LINUX 0x0a
++
++
++#define MAIN_FUNCTION 0x4c49
++
++#define SABI_HEADER_PORT 0x00
++#define SABI_HEADER_RE_MEM 0x02
++#define SABI_HEADER_IFACEFUNC 0x03
++#define SABI_HEADER_EN_MEM 0x04
++#define SABI_HEADER_DATA_OFFSET 0x05
++#define SABI_HEADER_DATA_SEGMENT 0x07
++
++#define SABI_IFACE_MAIN 0x00
++#define SABI_IFACE_SUB 0x02
++#define SABI_IFACE_COMPLETE 0x04
++#define SABI_IFACE_DATA 0x05
++
++/* Structure to get data back to the calling function */
++struct sabi_retval {
++ u8 retval[20];
++};
++
++static void __iomem *sabi;
++static void __iomem *sabi_iface;
++static void __iomem *f0000_segment;
++static struct backlight_device *backlight_device;
++static struct mutex sabi_mutex;
++static struct platform_device *sdev;
++static struct rfkill *rfk;
++
++static int force;
++module_param(force, bool, 0);
++MODULE_PARM_DESC(force, "Disable the DMI check and forces the driver to be loaded");
++
++static int debug;
++module_param(debug, bool, S_IRUGO | S_IWUSR);
++MODULE_PARM_DESC(debug, "Debug enabled or not");
++
++static int sabi_get_command(u8 command, struct sabi_retval *sretval)
++{
++ int retval = 0;
++ u16 port = readw(sabi + SABI_HEADER_PORT);
++
++ mutex_lock(&sabi_mutex);
++
++ /* enable memory to be able to write to it */
++ outb(readb(sabi + SABI_HEADER_EN_MEM), port);
++
++ /* write out the command */
++ writew(MAIN_FUNCTION, sabi_iface + SABI_IFACE_MAIN);
++ writew(command, sabi_iface + SABI_IFACE_SUB);
++ writeb(0, sabi_iface + SABI_IFACE_COMPLETE);
++ outb(readb(sabi + SABI_HEADER_IFACEFUNC), port);
++
++ /* write protect memory to make it safe */
++ outb(readb(sabi + SABI_HEADER_RE_MEM), port);
++
++ /* see if the command actually succeeded */
++ if (readb(sabi_iface + SABI_IFACE_COMPLETE) == 0xaa &&
++ readb(sabi_iface + SABI_IFACE_DATA) != 0xff) {
++ /*
++ * It did!
++ * Save off the data into a structure so the caller use it.
++ * Right now we only care about the first 4 bytes,
++ * I suppose there are commands that need more, but I don't
++ * know about them.
++ */
++ sretval->retval[0] = readb(sabi_iface + SABI_IFACE_DATA);
++ sretval->retval[1] = readb(sabi_iface + SABI_IFACE_DATA + 1);
++ sretval->retval[2] = readb(sabi_iface + SABI_IFACE_DATA + 2);
++ sretval->retval[3] = readb(sabi_iface + SABI_IFACE_DATA + 3);
++ goto exit;
++ }
++
++ /* Something bad happened, so report it and error out */
++ printk(KERN_WARNING "SABI command 0x%02x failed with completion flag 0x%02x and output 0x%02x\n",
++ command, readb(sabi_iface + SABI_IFACE_COMPLETE),
++ readb(sabi_iface + SABI_IFACE_DATA));
++ retval = -EINVAL;
++exit:
++ mutex_unlock(&sabi_mutex);
++ return retval;
++
++}
++
++static int sabi_set_command(u8 command, u8 data)
++{
++ int retval = 0;
++ u16 port = readw(sabi + SABI_HEADER_PORT);
++
++ mutex_lock(&sabi_mutex);
++
++ /* enable memory to be able to write to it */
++ outb(readb(sabi + SABI_HEADER_EN_MEM), port);
++
++ /* write out the command */
++ writew(MAIN_FUNCTION, sabi_iface + SABI_IFACE_MAIN);
++ writew(command, sabi_iface + SABI_IFACE_SUB);
++ writeb(0, sabi_iface + SABI_IFACE_COMPLETE);
++ writeb(data, sabi_iface + SABI_IFACE_DATA);
++ outb(readb(sabi + SABI_HEADER_IFACEFUNC), port);
++
++ /* write protect memory to make it safe */
++ outb(readb(sabi + SABI_HEADER_RE_MEM), port);
++
++ /* see if the command actually succeeded */
++ if (readb(sabi_iface + SABI_IFACE_COMPLETE) == 0xaa &&
++ readb(sabi_iface + SABI_IFACE_DATA) != 0xff) {
++ /* it did! */
++ goto exit;
++ }
++
++ /* Something bad happened, so report it and error out */
++ printk(KERN_WARNING "SABI command 0x%02x failed with completion flag 0x%02x and output 0x%02x\n",
++ command, readb(sabi_iface + SABI_IFACE_COMPLETE),
++ readb(sabi_iface + SABI_IFACE_DATA));
++ retval = -EINVAL;
++exit:
++ mutex_unlock(&sabi_mutex);
++ return retval;
++}
++
++static void test_backlight(void)
++{
++ struct sabi_retval sretval;
++
++ sabi_get_command(GET_BACKLIGHT, &sretval);
++ printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]);
++
++ sabi_set_command(SET_BACKLIGHT, 0);
++ printk(KERN_DEBUG "backlight should be off\n");
++
++ sabi_get_command(GET_BACKLIGHT, &sretval);
++ printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]);
++
++ msleep(1000);
++
++ sabi_set_command(SET_BACKLIGHT, 1);
++ printk(KERN_DEBUG "backlight should be on\n");
++
++ sabi_get_command(GET_BACKLIGHT, &sretval);
++ printk(KERN_DEBUG "backlight = 0x%02x\n", sretval.retval[0]);
++}
++
++static void test_wireless(void)
++{
++ struct sabi_retval sretval;
++
++ sabi_get_command(GET_WIRELESS_BUTTON, &sretval);
++ printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]);
++
++ sabi_set_command(SET_WIRELESS_BUTTON, 0);
++ printk(KERN_DEBUG "wireless led should be off\n");
++
++ sabi_get_command(GET_WIRELESS_BUTTON, &sretval);
++ printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]);
++
++ msleep(1000);
++
++ sabi_set_command(SET_WIRELESS_BUTTON, 1);
++ printk(KERN_DEBUG "wireless led should be on\n");
++
++ sabi_get_command(GET_WIRELESS_BUTTON, &sretval);
++ printk(KERN_DEBUG "wireless led = 0x%02x\n", sretval.retval[0]);
++}
++
++static u8 read_brightness(void)
++{
++ struct sabi_retval sretval;
++ int user_brightness = 0;
++ int retval;
++
++ retval = sabi_get_command(GET_BRIGHTNESS, &sretval);
++ if (!retval)
++ user_brightness = sretval.retval[0];
++ if (user_brightness != 0)
++ --user_brightness;
++ return user_brightness;
++}
++
++static void set_brightness(u8 user_brightness)
++{
++ sabi_set_command(SET_BRIGHTNESS, user_brightness + 1);
++}
++
++static int get_brightness(struct backlight_device *bd)
++{
++ return (int)read_brightness();
++}
++
++static int update_status(struct backlight_device *bd)
++{
++ set_brightness(bd->props.brightness);
++
++ if (bd->props.power == FB_BLANK_UNBLANK)
++ sabi_set_command(SET_BACKLIGHT, 1);
++ else
++ sabi_set_command(SET_BACKLIGHT, 0);
++ return 0;
++}
++
++static struct backlight_ops backlight_ops = {
++ .get_brightness = get_brightness,
++ .update_status = update_status,
++};
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
++static int rfkill_set(void *data, bool blocked)
++{
++ /* Do something with blocked...*/
++ /*
++ * blocked == false is on
++ * blocked == true is off
++ */
++ if (blocked)
++ sabi_set_command(SET_WIRELESS_BUTTON, 0);
++ else
++ sabi_set_command(SET_WIRELESS_BUTTON, 1);
++
++ return 0;
++}
++
++static struct rfkill_ops rfkill_ops = {
++ .set_block = rfkill_set,
++};
++
++static int init_wireless(struct platform_device *sdev)
++{
++ int retval;
++
++ rfk = rfkill_alloc("samsung-wifi", &sdev->dev, RFKILL_TYPE_WLAN,
++ &rfkill_ops, NULL);
++ if (!rfk)
++ return -ENOMEM;
++
++ retval = rfkill_register(rfk);
++ if (retval) {
++ rfkill_destroy(rfk);
++ return -ENODEV;
++ }
++
++ return 0;
++}
++
++static void destroy_wireless(void)
++{
++ rfkill_unregister(rfk);
++ rfkill_destroy(rfk);
++}
++
++#else
++
++static int rfkill_set(void *data, enum rfkill_state state)
++{
++ if (state == RFKILL_STATE_UNBLOCKED)
++ sabi_set_command(SET_WIRELESS_BUTTON, 1);
++ else
++ sabi_set_command(SET_WIRELESS_BUTTON, 0);
++
++ return 0;
++}
++
++static int init_wireless(struct platform_device *sdev)
++{
++ int retval;
++
++ rfk = rfkill_allocate(&sdev->dev, RFKILL_TYPE_WLAN);
++ if (!rfk)
++ return -ENOMEM;
++ rfk->toggle_radio = rfkill_set;
++ rfk->name = "samsung-wifi";
++
++ retval = rfkill_register(rfk);
++ if (retval) {
++ rfkill_free(rfk);
++ return -ENODEV;
++ }
++
++ return 0;
++}
++
++static void destroy_wireless(void)
++{
++ rfkill_unregister(rfk);
++}
++
++#endif
++
++static ssize_t get_silent_state(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct sabi_retval sretval;
++ int retval;
++
++ /* Read the state */
++ retval = sabi_get_command(GET_PERFORMANCE_LEVEL, &sretval);
++ if (retval)
++ return retval;
++
++ /* The logic is backwards, yeah, lots of fun... */
++ if (sretval.retval[0] == 0)
++ retval = 1;
++ else
++ retval = 0;
++ return sprintf(buf, "%d\n", retval);
++}
++
++static ssize_t set_silent_state(struct device *dev,
++ struct device_attribute *attr, const char *buf,
++ size_t count)
++{
++ char value;
++
++ if (count >= 1) {
++ value = buf[0];
++ if ((value == '0') || (value == 'n') || (value == 'N')) {
++ /* Turn speed up */
++ sabi_set_command(SET_PERFORMANCE_LEVEL, 0x01);
++ } else if ((value == '1') || (value == 'y') || (value == 'Y')) {
++ /* Turn speed down */
++ sabi_set_command(SET_PERFORMANCE_LEVEL, 0x00);
++ } else {
++ return -EINVAL;
++ }
++ }
++ return count;
++}
++static DEVICE_ATTR(silent, S_IWUGO | S_IRUGO,
++ get_silent_state, set_silent_state);
++
++
++static int __init dmi_check_cb(const struct dmi_system_id *id)
++{
++ printk(KERN_INFO KBUILD_MODNAME ": found laptop model '%s'\n",
++ id->ident);
++ return 0;
++}
++
++static struct dmi_system_id __initdata samsung_dmi_table[] = {
++ {
++ .ident = "N128",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
++ DMI_MATCH(DMI_PRODUCT_NAME, "N128"),
++ DMI_MATCH(DMI_BOARD_NAME, "N128"),
++ },
++ .callback = dmi_check_cb,
++ },
++ {
++ .ident = "N130",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
++ DMI_MATCH(DMI_PRODUCT_NAME, "N130"),
++ DMI_MATCH(DMI_BOARD_NAME, "N130"),
++ },
++ .callback = dmi_check_cb,
++ },
++ { },
++};
++MODULE_DEVICE_TABLE(dmi, samsung_dmi_table);
++
++static int __init samsung_init(void)
++{
++ struct sabi_retval sretval;
++ const char *testStr = "SECLINUX";
++ void __iomem *memcheck;
++ unsigned int ifaceP;
++ int pStr;
++ int loca;
++ int retval;
++
++ mutex_init(&sabi_mutex);
++
++ if (!force && !dmi_check_system(samsung_dmi_table))
++ return -ENODEV;
++
++ f0000_segment = ioremap(0xf0000, 0xffff);
++ if (!f0000_segment) {
++ printk(KERN_ERR "Can't map the segment at 0xf0000\n");
++ return -EINVAL;
++ }
++
++ /* Try to find the signature "SECLINUX" in memory to find the header */
++ pStr = 0;
++ memcheck = f0000_segment;
++ for (loca = 0; loca < 0xffff; loca++) {
++ char temp = readb(memcheck + loca);
++
++ if (temp == testStr[pStr]) {
++ if (pStr == strlen(testStr)-1)
++ break;
++ ++pStr;
++ } else {
++ pStr = 0;
++ }
++ }
++ if (loca == 0xffff) {
++ printk(KERN_ERR "This computer does not support SABI\n");
++ goto error_no_signature;
++ }
++
++ /* point to the SMI port Number */
++ loca += 1;
++ sabi = (memcheck + loca);
++
++ if (debug) {
++ printk(KERN_DEBUG "This computer supports SABI==%x\n",
++ loca + 0xf0000 - 6);
++ printk(KERN_DEBUG "SABI header:\n");
++ printk(KERN_DEBUG " SMI Port Number = 0x%04x\n",
++ readw(sabi + SABI_HEADER_PORT));
++ printk(KERN_DEBUG " SMI Interface Function = 0x%02x\n",
++ readb(sabi + SABI_HEADER_IFACEFUNC));
++ printk(KERN_DEBUG " SMI enable memory buffer = 0x%02x\n",
++ readb(sabi + SABI_HEADER_EN_MEM));
++ printk(KERN_DEBUG " SMI restore memory buffer = 0x%02x\n",
++ readb(sabi + SABI_HEADER_RE_MEM));
++ printk(KERN_DEBUG " SABI data offset = 0x%04x\n",
++ readw(sabi + SABI_HEADER_DATA_OFFSET));
++ printk(KERN_DEBUG " SABI data segment = 0x%04x\n",
++ readw(sabi + SABI_HEADER_DATA_SEGMENT));
++ }
++
++ /* Get a pointer to the SABI Interface */
++ ifaceP = (readw(sabi + SABI_HEADER_DATA_SEGMENT) & 0x0ffff) << 4;
++ ifaceP += readw(sabi + SABI_HEADER_DATA_OFFSET) & 0x0ffff;
++ sabi_iface = ioremap(ifaceP, 16);
++ if (!sabi_iface) {
++ printk(KERN_ERR "Can't remap %x\n", ifaceP);
++ goto exit;
++ }
++ if (debug) {
++ printk(KERN_DEBUG "ifaceP = 0x%08x\n", ifaceP);
++ printk(KERN_DEBUG "sabi_iface = %p\n", sabi_iface);
++
++ test_backlight();
++ test_wireless();
++
++ retval = sabi_get_command(GET_BRIGHTNESS, &sretval);
++ printk(KERN_DEBUG "brightness = 0x%02x\n", sretval.retval[0]);
++ }
++
++ /* Turn on "Linux" mode in the BIOS */
++ retval = sabi_set_command(SET_LINUX, 0x81);
++ if (retval) {
++ printk(KERN_ERR KBUILD_MODNAME ": Linux mode was not set!\n");
++ goto error_no_platform;
++ }
++
++ /* knock up a platform device to hang stuff off of */
++ sdev = platform_device_register_simple("samsung", -1, NULL, 0);
++ if (IS_ERR(sdev))
++ goto error_no_platform;
++
++ /* create a backlight device to talk to this one */
++ backlight_device = backlight_device_register("samsung", &sdev->dev,
++ NULL, &backlight_ops);
++ if (IS_ERR(backlight_device))
++ goto error_no_backlight;
++
++ backlight_device->props.max_brightness = MAX_BRIGHT;
++ backlight_device->props.brightness = read_brightness();
++ backlight_device->props.power = FB_BLANK_UNBLANK;
++ backlight_update_status(backlight_device);
++
++ retval = init_wireless(sdev);
++ if (retval)
++ goto error_no_rfk;
++
++ retval = device_create_file(&sdev->dev, &dev_attr_silent);
++ if (retval)
++ goto error_file_create;
++
++exit:
++ return 0;
++
++error_file_create:
++ destroy_wireless();
++
++error_no_rfk:
++ backlight_device_unregister(backlight_device);
++
++error_no_backlight:
++ platform_device_unregister(sdev);
++
++error_no_platform:
++ iounmap(sabi_iface);
++
++error_no_signature:
++ iounmap(f0000_segment);
++ return -EINVAL;
++}
++
++static void __exit samsung_exit(void)
++{
++ /* Turn off "Linux" mode in the BIOS */
++ sabi_set_command(SET_LINUX, 0x80);
++
++ device_remove_file(&sdev->dev, &dev_attr_silent);
++ backlight_device_unregister(backlight_device);
++ destroy_wireless();
++ iounmap(sabi_iface);
++ iounmap(f0000_segment);
++ platform_device_unregister(sdev);
++}
++
++module_init(samsung_init);
++module_exit(samsung_exit);
++
++MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@suse.de>");
++MODULE_DESCRIPTION("Samsung Backlight driver");
++MODULE_LICENSE("GPL");
diff --git a/staging/staging-samsung-laptop-add-todo-file.patch b/staging/staging-samsung-laptop-add-todo-file.patch
new file mode 100644
index 00000000000000..55ed9671132574
--- /dev/null
+++ b/staging/staging-samsung-laptop-add-todo-file.patch
@@ -0,0 +1,20 @@
+From foo@baz Thu Dec 3 16:27:19 PST 2009
+Date: Thu, 03 Dec 2009 16:27:19 -0800
+To: Greg KH <greg@kroah.com>
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: Staging: samsung-laptop: add TODO file
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/samsung-laptop/TODO | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- /dev/null
++++ b/drivers/staging/samsung-laptop/TODO
+@@ -0,0 +1,5 @@
++TODO:
++ - review from other developers
++ - figure out ACPI video issues
++
++Please send patches to Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/staging/staging-samsung-laptop-remove-old-kernel-code.patch b/staging/staging-samsung-laptop-remove-old-kernel-code.patch
new file mode 100644
index 00000000000000..c510925f8a3343
--- /dev/null
+++ b/staging/staging-samsung-laptop-remove-old-kernel-code.patch
@@ -0,0 +1,78 @@
+From foo@baz Thu Dec 3 16:24:47 PST 2009
+Date: Thu, 03 Dec 2009 16:24:47 -0800
+To: Greg KH <greg@kroah.com>
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Subject: Staging: samsung-laptop: remove old kernel code
+
+Don't test for the kernel version, we know what version we are in,
+the latest.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/samsung-laptop/samsung-laptop.c | 40 ------------------------
+ 1 file changed, 40 deletions(-)
+
+--- a/drivers/staging/samsung-laptop/samsung-laptop.c
++++ b/drivers/staging/samsung-laptop/samsung-laptop.c
+@@ -9,7 +9,6 @@
+ * the Free Software Foundation.
+ *
+ */
+-#include <linux/version.h>
+ #include <linux/kernel.h>
+ #include <linux/init.h>
+ #include <linux/module.h>
+@@ -274,7 +273,6 @@ static struct backlight_ops backlight_op
+ .update_status = update_status,
+ };
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+ static int rfkill_set(void *data, bool blocked)
+ {
+ /* Do something with blocked...*/
+@@ -318,44 +316,6 @@ static void destroy_wireless(void)
+ rfkill_destroy(rfk);
+ }
+
+-#else
+-
+-static int rfkill_set(void *data, enum rfkill_state state)
+-{
+- if (state == RFKILL_STATE_UNBLOCKED)
+- sabi_set_command(SET_WIRELESS_BUTTON, 1);
+- else
+- sabi_set_command(SET_WIRELESS_BUTTON, 0);
+-
+- return 0;
+-}
+-
+-static int init_wireless(struct platform_device *sdev)
+-{
+- int retval;
+-
+- rfk = rfkill_allocate(&sdev->dev, RFKILL_TYPE_WLAN);
+- if (!rfk)
+- return -ENOMEM;
+- rfk->toggle_radio = rfkill_set;
+- rfk->name = "samsung-wifi";
+-
+- retval = rfkill_register(rfk);
+- if (retval) {
+- rfkill_free(rfk);
+- return -ENODEV;
+- }
+-
+- return 0;
+-}
+-
+-static void destroy_wireless(void)
+-{
+- rfkill_unregister(rfk);
+-}
+-
+-#endif
+-
+ static ssize_t get_silent_state(struct device *dev,
+ struct device_attribute *attr, char *buf)
+ {
diff --git a/tty.current/bcm63xx_uart-fix-serial-driver-compile-breakage.patch b/tty.current/bcm63xx_uart-fix-serial-driver-compile-breakage.patch
deleted file mode 100644
index 8b8f256d13eaa2..00000000000000
--- a/tty.current/bcm63xx_uart-fix-serial-driver-compile-breakage.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From mbizon@freebox.fr Fri Nov 20 09:40:18 2009
-From: Maxime Bizon <mbizon@freebox.fr>
-Date: Sun, 15 Nov 2009 05:42:18 +0100
-Subject: bcm63xx_uart: Fix serial driver compile breakage.
-To: Greg KH <gregkh@suse.de>
-Cc: linux-serial@vger.kernel.org
-Message-ID: <1258260138.2422.3.camel@kero>
-
-
-The driver missed a small API change while sitting in Ralf's tree, this
-patch makes it compile again.
-
-Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/serial/bcm63xx_uart.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/serial/bcm63xx_uart.c
-+++ b/drivers/serial/bcm63xx_uart.c
-@@ -242,7 +242,7 @@ static void bcm_uart_do_rx(struct uart_p
- * higher than fifo size anyway since we're much faster than
- * serial port */
- max_count = 32;
-- tty = port->info->port.tty;
-+ tty = port->state->port.tty;
- do {
- unsigned int iestat, c, cstat;
- char flag;
-@@ -318,7 +318,7 @@ static void bcm_uart_do_tx(struct uart_p
- return;
- }
-
-- xmit = &port->info->xmit;
-+ xmit = &port->state->xmit;
- if (uart_circ_empty(xmit))
- goto txq_empty;
-
diff --git a/tty.current/tty-of_serial-add-missing-ns16550a-id.patch b/tty.current/tty-of_serial-add-missing-ns16550a-id.patch
deleted file mode 100644
index e36be32aa7da97..00000000000000
--- a/tty.current/tty-of_serial-add-missing-ns16550a-id.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From arnd@arndb.de Mon Nov 30 14:37:06 2009
-From: Michal Simek <monstr@monstr.eu>
-Date: Tue, 24 Nov 2009 10:22:41 +0000
-Subject: tty/of_serial: add missing ns16550a id
-To: greg@kroah.com, devicetree-discuss@lists.ozlabs.org
-Cc: grant.likely@secretlab.ca, john.williams@petalogix.com, Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
-Message-ID: <200911241022.41078.arnd@arndb.de>
-
-
-From: Michal Simek <monstr@monstr.eu>
-
-Many boards have a bug-free ns16550 compatible serial port, which we should
-register as PORT_16550A. This introduces a new value "ns16550a" for the
-compatible property of of_serial to let a firmware choose that model instead
-of using the crippled PORT_16550 mode.
-
-Reported-by: Alon Ziv <alonz@nolaviz.org>
-Signed-off-by: Michal Simek <monstr@monstr.eu>
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/serial/of_serial.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/serial/of_serial.c
-+++ b/drivers/serial/of_serial.c
-@@ -161,6 +161,7 @@ static int of_platform_serial_remove(str
- static struct of_device_id __devinitdata of_platform_serial_table[] = {
- { .type = "serial", .compatible = "ns8250", .data = (void *)PORT_8250, },
- { .type = "serial", .compatible = "ns16450", .data = (void *)PORT_16450, },
-+ { .type = "serial", .compatible = "ns16550a", .data = (void *)PORT_16550A, },
- { .type = "serial", .compatible = "ns16550", .data = (void *)PORT_16550, },
- { .type = "serial", .compatible = "ns16750", .data = (void *)PORT_16750, },
- { .type = "serial", .compatible = "ns16850", .data = (void *)PORT_16850, },
diff --git a/tty.current/tty_port-handle-the-nonblocking-open-of-a-dead-port-corner-case.patch b/tty.current/tty_port-handle-the-nonblocking-open-of-a-dead-port-corner-case.patch
deleted file mode 100644
index bec2ef12347ba2..00000000000000
--- a/tty.current/tty_port-handle-the-nonblocking-open-of-a-dead-port-corner-case.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From alan@linux.intel.com Fri Nov 20 09:37:41 2009
-From: Alan Cox <alan@linux.intel.com>
-Date: Wed, 18 Nov 2009 14:12:58 +0000
-Subject: tty_port: handle the nonblocking open of a dead port corner case
-To: greg@kroah.com, linux-kernel@vger.kernel.org
-Message-ID: <20091118141254.3304.85805.stgit@localhost.localdomain>
-
-
-Some drivers allow O_NDELAY of a dead port (eg for setserial to work). In that
-situation we must not try to raise the carrier.
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Cc: stable <stable@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/char/tty_port.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
---- a/drivers/char/tty_port.c
-+++ b/drivers/char/tty_port.c
-@@ -219,8 +219,11 @@ int tty_port_block_til_ready(struct tty_
-
- /* if non-blocking mode is set we can pass directly to open unless
- the port has just hung up or is in another error state */
-- if ((filp->f_flags & O_NONBLOCK) ||
-- (tty->flags & (1 << TTY_IO_ERROR))) {
-+ if (tty->flags & (1 << TTY_IO_ERROR)) {
-+ port->flags |= ASYNC_NORMAL_ACTIVE;
-+ return 0;
-+ }
-+ if (filp->f_flags & O_NONBLOCK) {
- /* Indicate we are open */
- if (tty->termios->c_cflag & CBAUD)
- tty_port_raise_dtr_rts(port);
diff --git a/usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch b/usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch
deleted file mode 100644
index 2193c1f49663a7..00000000000000
--- a/usb.current/usb-add-support-for-mobilcom-debitel-usb-umts-surf-stick-to-option-driver.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From gernot@hillier.de Mon Nov 30 14:39:47 2009
-From: Gernot Hillier <gernot@hillier.de>
-Date: Fri, 27 Nov 2009 13:49:23 +0100
-Subject: USB: Add support for Mobilcom Debitel USB UMTS Surf-Stick to option driver
-To: Oliver Neukum <oliver@neukum.org>
-Cc: Matthias Urlichs <smurf@smurf.noris.de>, Greg Kroah-Hartman <gregkh@suse.de>
-Message-ID: <4B0FCAD3.9000801@hillier.de>
-
-From: Gernot Hillier <gernot@hillier.de>
-
-This patch adds the vendor and device id for the Mobilcom Debitel UMTS surf
-stick (a.k.a. 4G Systems XSStick W14, MobiData MBD-200HU, ...).
-
-To see these ids, you need to switch the stick to modem operation first
-with the help of usb_modeswitch. This makes it switch from 1c9e:f000 to
-1c9e:9603 and thus be recognized by the option driver.
-
-Signed-off-by: Gernot Hillier <gernot@hillier.de>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/serial/option.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/drivers/usb/serial/option.c
-+++ b/drivers/usb/serial/option.c
-@@ -336,6 +336,10 @@ static int option_resume(struct usb_ser
- #define AIRPLUS_VENDOR_ID 0x1011
- #define AIRPLUS_PRODUCT_MCD650 0x3198
-
-+/* 4G Systems products */
-+#define FOUR_G_SYSTEMS_VENDOR_ID 0x1c9e
-+#define FOUR_G_SYSTEMS_PRODUCT_W14 0x9603
-+
- static struct usb_device_id option_ids[] = {
- { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
- { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
-@@ -599,6 +603,7 @@ static struct usb_device_id option_ids[]
- { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) },
- { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
- { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
-+ { USB_DEVICE(FOUR_G_SYSTEMS_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14) },
- { } /* Terminating entry */
- };
- MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/usb.current/usb-amd5536udc-fixed-shared-interrupt-bug-and-warning-oops.patch b/usb.current/usb-amd5536udc-fixed-shared-interrupt-bug-and-warning-oops.patch
deleted file mode 100644
index fbcbfd0b4346b0..00000000000000
--- a/usb.current/usb-amd5536udc-fixed-shared-interrupt-bug-and-warning-oops.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From akpm@linux-foundation.org Thu Nov 19 15:42:17 2009
-From: akpm@linux-foundation.org
-Date: Tue, 17 Nov 2009 14:18:27 -0800
-Subject: usb: amd5536udc: fixed shared interrupt bug and warning oops
-To: greg@kroah.com
-Cc: linux-usb@vger.kernel.org, akpm@linux-foundation.org, dahlmann.thomas@arcor.de, david-b@pacbell.net, robert.richter@amd.com, stable@kernel.org
-Message-ID: <200911172218.nAHMIRjZ001534@imap1.linux-foundation.org>
-
-
-From: Thomas Dahlmann <dahlmann.thomas@arcor.de>
-
- - fixed shared interrupt bug reported by Vadim Lobanov
- - fixed possible warning oops on driver unload when connected
- - prevent interrupt flood in PIO mode ("modprobe amd5536udc use_dma=0")
- when using gadget ether
-
-Signed-off-by: Thomas Dahlmann <dahlmann.thomas@arcor.de>
-Cc: Robert Richter <robert.richter@amd.com>
-Cc: David Brownell <david-b@pacbell.net>
-Cc: stable <stable@kernel.org>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/gadget/amd5536udc.c | 49 ++++++++++++++++++++++++----------------
- 1 file changed, 30 insertions(+), 19 deletions(-)
-
---- a/drivers/usb/gadget/amd5536udc.c
-+++ b/drivers/usb/gadget/amd5536udc.c
-@@ -1213,7 +1213,12 @@ udc_queue(struct usb_ep *usbep, struct u
- tmp &= AMD_UNMASK_BIT(ep->num);
- writel(tmp, &dev->regs->ep_irqmsk);
- }
-- }
-+ } else if (ep->in) {
-+ /* enable ep irq */
-+ tmp = readl(&dev->regs->ep_irqmsk);
-+ tmp &= AMD_UNMASK_BIT(ep->num);
-+ writel(tmp, &dev->regs->ep_irqmsk);
-+ }
-
- } else if (ep->dma) {
-
-@@ -2005,18 +2010,17 @@ __acquires(dev->lock)
- {
- int tmp;
-
-- /* empty queues and init hardware */
-- udc_basic_init(dev);
-- for (tmp = 0; tmp < UDC_EP_NUM; tmp++) {
-- empty_req_queue(&dev->ep[tmp]);
-- }
--
- if (dev->gadget.speed != USB_SPEED_UNKNOWN) {
- spin_unlock(&dev->lock);
- driver->disconnect(&dev->gadget);
- spin_lock(&dev->lock);
- }
-- /* init */
-+
-+ /* empty queues and init hardware */
-+ udc_basic_init(dev);
-+ for (tmp = 0; tmp < UDC_EP_NUM; tmp++)
-+ empty_req_queue(&dev->ep[tmp]);
-+
- udc_setup_endpoints(dev);
- }
-
-@@ -2472,6 +2476,13 @@ static irqreturn_t udc_data_in_isr(struc
- }
- }
-
-+ } else if (!use_dma && ep->in) {
-+ /* disable interrupt */
-+ tmp = readl(
-+ &dev->regs->ep_irqmsk);
-+ tmp |= AMD_BIT(ep->num);
-+ writel(tmp,
-+ &dev->regs->ep_irqmsk);
- }
- }
- /* clear status bits */
-@@ -3279,6 +3290,17 @@ static int udc_pci_probe(
- goto finished;
- }
-
-+ spin_lock_init(&dev->lock);
-+ /* udc csr registers base */
-+ dev->csr = dev->virt_addr + UDC_CSR_ADDR;
-+ /* dev registers base */
-+ dev->regs = dev->virt_addr + UDC_DEVCFG_ADDR;
-+ /* ep registers base */
-+ dev->ep_regs = dev->virt_addr + UDC_EPREGS_ADDR;
-+ /* fifo's base */
-+ dev->rxfifo = (u32 __iomem *)(dev->virt_addr + UDC_RXFIFO_ADDR);
-+ dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
-+
- if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) {
- dev_dbg(&dev->pdev->dev, "request_irq(%d) fail\n", pdev->irq);
- kfree(dev);
-@@ -3331,7 +3353,6 @@ static int udc_probe(struct udc *dev)
- udc_pollstall_timer.data = 0;
-
- /* device struct setup */
-- spin_lock_init(&dev->lock);
- dev->gadget.ops = &udc_ops;
-
- dev_set_name(&dev->gadget.dev, "gadget");
-@@ -3340,16 +3361,6 @@ static int udc_probe(struct udc *dev)
- dev->gadget.name = name;
- dev->gadget.is_dualspeed = 1;
-
-- /* udc csr registers base */
-- dev->csr = dev->virt_addr + UDC_CSR_ADDR;
-- /* dev registers base */
-- dev->regs = dev->virt_addr + UDC_DEVCFG_ADDR;
-- /* ep registers base */
-- dev->ep_regs = dev->virt_addr + UDC_EPREGS_ADDR;
-- /* fifo's base */
-- dev->rxfifo = (u32 __iomem *)(dev->virt_addr + UDC_RXFIFO_ADDR);
-- dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
--
- /* init registers, interrupts, ... */
- startup_registers(dev);
-
diff --git a/usb.current/usb-ehci-don-t-send-clear-tt-buffer-following-a-stall.patch b/usb.current/usb-ehci-don-t-send-clear-tt-buffer-following-a-stall.patch
deleted file mode 100644
index 56672d4a28f134..00000000000000
--- a/usb.current/usb-ehci-don-t-send-clear-tt-buffer-following-a-stall.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From stern@rowland.harvard.edu Thu Nov 19 15:36:49 2009
-From: Alan Stern <stern@rowland.harvard.edu>
-Date: Wed, 18 Nov 2009 11:37:15 -0500 (EST)
-Subject: USB: EHCI: don't send Clear-TT-Buffer following a STALL
-To: Greg KH <greg@kroah.com>
-Cc: Javier Kohen <jkohen@users.sourceforge.net>, David Brownell <david-b@pacbell.net>
-Message-ID: <Pine.LNX.4.44L0.0911181134560.3036-100000@iolanthe.rowland.org>
-
-
-This patch (as1304) fixes a regression in ehci-hcd. Evidently some
-hubs don't handle Clear-TT-Buffer requests correctly, so we should
-avoid sending them when they don't appear to be absolutely necessary.
-The reported symptom is that output on a downstream audio device cuts
-out because the hub stops relaying isochronous packets.
-
-The patch prevents Clear-TT-Buffer requests from being sent following
-a STALL handshake. In theory a STALL indicates either that the
-downstream device sent a STALL or that no matching TT buffer could be
-found. In either case, the transfer is completed and the TT buffer
-does not remain busy, so it doesn't need to be cleared.
-
-Also, the patch fixes a minor flaw in the code that actually sends the
-Clear-TT-Buffer requests. Although the pipe direction isn't really
-used for control transfers, it should be a Send rather than a Receive.
-
-Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
-Reported-by: Javier Kohen <jkohen@users.sourceforge.net>
-CC: David Brownell <david-b@pacbell.net>
-Cc: stable <stable@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/core/hub.c | 2 +-
- drivers/usb/host/ehci-q.c | 16 ++++++++++++++--
- 2 files changed, 15 insertions(+), 3 deletions(-)
-
---- a/drivers/usb/core/hub.c
-+++ b/drivers/usb/core/hub.c
-@@ -444,7 +444,7 @@ resubmit:
- static inline int
- hub_clear_tt_buffer (struct usb_device *hdev, u16 devinfo, u16 tt)
- {
-- return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
-+ return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
- HUB_CLEAR_TT_BUFFER, USB_RT_PORT, devinfo,
- tt, NULL, 0, 1000);
- }
---- a/drivers/usb/host/ehci-q.c
-+++ b/drivers/usb/host/ehci-q.c
-@@ -487,8 +487,20 @@ halt:
- * we must clear the TT buffer (11.17.5).
- */
- if (unlikely(last_status != -EINPROGRESS &&
-- last_status != -EREMOTEIO))
-- ehci_clear_tt_buffer(ehci, qh, urb, token);
-+ last_status != -EREMOTEIO)) {
-+ /* The TT's in some hubs malfunction when they
-+ * receive this request following a STALL (they
-+ * stop sending isochronous packets). Since a
-+ * STALL can't leave the TT buffer in a busy
-+ * state (if you believe Figures 11-48 - 11-51
-+ * in the USB 2.0 spec), we won't clear the TT
-+ * buffer in this case. Strictly speaking this
-+ * is a violation of the spec.
-+ */
-+ if (last_status != -EPIPE)
-+ ehci_clear_tt_buffer(ehci, qh, urb,
-+ token);
-+ }
- }
-
- /* if we're removing something not at the queue head,
diff --git a/usb.current/usb-ftdi_sio-keep-going-when-write-errors-are-encountered.patch b/usb.current/usb-ftdi_sio-keep-going-when-write-errors-are-encountered.patch
deleted file mode 100644
index 4bbebaa17bd5e6..00000000000000
--- a/usb.current/usb-ftdi_sio-keep-going-when-write-errors-are-encountered.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From ebiederm@xmission.com Thu Nov 19 15:41:19 2009
-From: ebiederm@xmission.com (Eric W. Biederman)
-Date: Tue, 17 Nov 2009 19:10:48 -0800
-Subject: USB: ftdi_sio: Keep going when write errors are encountered.
-To: "Greg Kroah-Hartman" <gregkh@suse.de>
-Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Johan Hovold <jhovold@gmail.com>, Michael Trimarchi <trimarchi@gandalf.sssup.it>, Andrew Morton <akpm@linux-foundation.org>, Alan Stern <stern@rowland.harvard.edu>, Oliver Neukum <oliver@neukum.org>
-Message-ID: <m1fx8co7d3.fsf_-_@fess.ebiederm.org>
-
-
-The use of urb->actual_length to update tx_outstanding_bytes
-implicitly assumes that the number of bytes actually written is the
-same as the number of bytes we tried to write. On error that
-assumption is violated so just use transfer_buffer_length the number
-of bytes we intended to write to the device.
-
-If an error occurs we need to fall through and call
-usb_serial_port_softint to wake up processes waiting in
-tty_wait_until_sent.
-
-Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
-Cc: stable <stable@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/serial/ftdi_sio.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
---- a/drivers/usb/serial/ftdi_sio.c
-+++ b/drivers/usb/serial/ftdi_sio.c
-@@ -1937,7 +1937,7 @@ static void ftdi_write_bulk_callback(str
- return;
- }
- /* account for transferred data */
-- countback = urb->actual_length;
-+ countback = urb->transfer_buffer_length;
- data_offset = priv->write_offset;
- if (data_offset > 0) {
- /* Subtract the control bytes */
-@@ -1950,7 +1950,6 @@ static void ftdi_write_bulk_callback(str
-
- if (status) {
- dbg("nonzero write bulk status received: %d", status);
-- return;
- }
-
- usb_serial_port_softint(port);
diff --git a/usb.current/usb-musb-fix-cppi-irqs-not-being-signaled.patch b/usb.current/usb-musb-fix-cppi-irqs-not-being-signaled.patch
deleted file mode 100644
index ffcaf6875b281d..00000000000000
--- a/usb.current/usb-musb-fix-cppi-irqs-not-being-signaled.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From ajay.gupta@ti.com Thu Nov 19 15:45:08 2009
-From: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Date: Tue, 17 Nov 2009 15:22:57 +0530
-Subject: USB: musb: Fix CPPI IRQs not being signaled
-Cc: gregkh@suse.de, felipe.balbi@nokia.com, david-b@pacbell.net, gadiyar@ti.com, Daniel Gl�ckner <dg@emlix.com>, Ajay Kumar Gupta <ajay.gupta@ti.com>
-Message-ID: <1258451577-11508-5-git-send-email-ajay.gupta@ti.com>
-
-
-From: Daniel Gl�ckner <dg@emlix.com>
-
-On tx channel abort a cppi interrupt is generated for a short time by
-setting the lowest bit of the TCPPICOMPPTR register. It is then reset
-immediately by clearing the bit. When the interrupt handler is run,
-it does not detect an interrupt in the TCPPIMSKSR or RCPPIMSKSR
-registers and thus exits early without writing the TCPPIEOIR register.
-It appears that this inhibits further cppi interrupts until the handler
-is called by chance, f.ex. from davinci_interrupt().
-
-By moving the unmasking of the interrupt below the writes to
-TCPPICOMPPTR, no interrupt is generated and no write to TCPPIEOIR is
-necessary.
-
-Signed-off-by: Daniel Gl�ckner <dg@emlix.com>
-Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/musb/cppi_dma.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
---- a/drivers/usb/musb/cppi_dma.c
-+++ b/drivers/usb/musb/cppi_dma.c
-@@ -1442,11 +1442,6 @@ static int cppi_channel_abort(struct dma
- musb_writew(regs, MUSB_TXCSR, value);
- musb_writew(regs, MUSB_TXCSR, value);
-
-- /* re-enable interrupt */
-- if (enabled)
-- musb_writel(tibase, DAVINCI_TXCPPI_INTENAB_REG,
-- (1 << cppi_ch->index));
--
- /* While we scrub the TX state RAM, ensure that we clean
- * up any interrupt that's currently asserted:
- * 1. Write to completion Ptr value 0x1(bit 0 set)
-@@ -1459,6 +1454,11 @@ static int cppi_channel_abort(struct dma
- cppi_reset_tx(tx_ram, 1);
- musb_writel(&tx_ram->tx_complete, 0, 0);
-
-+ /* re-enable interrupt */
-+ if (enabled)
-+ musb_writel(tibase, DAVINCI_TXCPPI_INTENAB_REG,
-+ (1 << cppi_ch->index));
-+
- cppi_dump_tx(5, cppi_ch, " (done teardown)");
-
- /* REVISIT tx side _should_ clean up the same way
diff --git a/usb.current/usb-musb-fix-isoc-tx-programming-for-cppi-dmas.patch b/usb.current/usb-musb-fix-isoc-tx-programming-for-cppi-dmas.patch
deleted file mode 100644
index e96b96e7a7fb32..00000000000000
--- a/usb.current/usb-musb-fix-isoc-tx-programming-for-cppi-dmas.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From ajay.gupta@ti.com Thu Nov 19 15:43:58 2009
-From: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Date: Tue, 17 Nov 2009 15:22:55 +0530
-Subject: USB: musb: fix ISOC Tx programming for CPPI DMAs
-To: linux-usb@vger.kernel.org
-Cc: gregkh@suse.de, felipe.balbi@nokia.com, david-b@pacbell.net, gadiyar@ti.com, Ajay Kumar Gupta <ajay.gupta@ti.com>, Swaminathan S <swami.iyer@ti.com>, Babu Ravi <ravibabu@ti.com>
-Message-ID: <1258451577-11508-3-git-send-email-ajay.gupta@ti.com>
-
-
-Isochronous Tx DMA is getting programmed but never getting started
-for CPPI and TUSB DMAs and thus Isochronous Tx doesn't work.
-
-Fixing it by starting DMAs using musb_h_tx_dma_start().
-
-Signed-off-by: Swaminathan S <swami.iyer@ti.com>
-Signed-off-by: Babu Ravi <ravibabu@ti.com>
-Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/musb/musb_host.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/usb/musb/musb_host.c
-+++ b/drivers/usb/musb/musb_host.c
-@@ -1301,8 +1301,11 @@ void musb_host_tx(struct musb *musb, u8
- return;
- } else if (usb_pipeisoc(pipe) && dma) {
- if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb,
-- offset, length))
-+ offset, length)) {
-+ if (is_cppi_enabled() || tusb_dma_omap())
-+ musb_h_tx_dma_start(hw_ep);
- return;
-+ }
- } else if (tx_csr & MUSB_TXCSR_DMAENAB) {
- DBG(1, "not complete, but DMA enabled?\n");
- return;
diff --git a/usb.current/usb-musb-remove-unwanted-message-in-boot-log.patch b/usb.current/usb-musb-remove-unwanted-message-in-boot-log.patch
deleted file mode 100644
index 7a7071672bd8c8..00000000000000
--- a/usb.current/usb-musb-remove-unwanted-message-in-boot-log.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From ajay.gupta@ti.com Thu Nov 19 15:43:16 2009
-From: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Date: Tue, 17 Nov 2009 15:22:54 +0530
-Subject: USB: musb: Remove unwanted message in boot log
-Cc: gregkh@suse.de, felipe.balbi@nokia.com, david-b@pacbell.net, gadiyar@ti.com, Ajay Kumar Gupta <ajay.gupta@ti.com>
-Message-ID: <1258451577-11508-2-git-send-email-ajay.gupta@ti.com>
-
-
-Removes below unnecessary log of almost 28 lines during boot.
-
-musb_hdrc: hw_ep 0shared, max 64
-musb_hdrc: hw_ep 1tx, max 512
-musb_hdrc: hw_ep 1rx, max 512
-...
-...
-musb_hdrc: hw_ep 13shared, max 4096
-musb_hdrc: hw_ep 14shared, max 1024
-musb_hdrc: hw_ep 15shared, max 1024
-
-Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/musb/musb_core.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/usb/musb/musb_core.c
-+++ b/drivers/usb/musb/musb_core.c
-@@ -1450,7 +1450,7 @@ static int __init musb_core_init(u16 mus
- #endif
-
- if (hw_ep->max_packet_sz_tx) {
-- printk(KERN_DEBUG
-+ DBG(1,
- "%s: hw_ep %d%s, %smax %d\n",
- musb_driver_name, i,
- hw_ep->is_shared_fifo ? "shared" : "tx",
-@@ -1459,7 +1459,7 @@ static int __init musb_core_init(u16 mus
- hw_ep->max_packet_sz_tx);
- }
- if (hw_ep->max_packet_sz_rx && !hw_ep->is_shared_fifo) {
-- printk(KERN_DEBUG
-+ DBG(1,
- "%s: hw_ep %d%s, %smax %d\n",
- musb_driver_name, i,
- "rx",
diff --git a/usb.current/usb-musb-respect-usb_request-zero-in-control-requests.patch b/usb.current/usb-musb-respect-usb_request-zero-in-control-requests.patch
deleted file mode 100644
index 78b0de0cf360f2..00000000000000
--- a/usb.current/usb-musb-respect-usb_request-zero-in-control-requests.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From ajay.gupta@ti.com Thu Nov 19 15:44:29 2009
-From: Daniel Gl�ckner <dg@emlix.com>
-Date: Tue, 17 Nov 2009 15:22:56 +0530
-Subject: USB: musb: respect usb_request->zero in control requests
-Cc: gregkh@suse.de, felipe.balbi@nokia.com, david-b@pacbell.net, gadiyar@ti.com, Daniel Gl�ckner <dg@emlix.com>, Ajay Kumar Gupta <ajay.gupta@ti.com>
-Message-ID: <1258451577-11508-4-git-send-email-ajay.gupta@ti.com>
-
-
-From: Daniel Gl�ckner <dg@emlix.com>
-
-In gadget mode the answer to a control request should be followed by
-a zero-length packet if the amount transferred is an exact multiple of
-the endpoint's packet size and the requests has its "zero" flag set.
-
-This patch prevents the request from being immediately removed from the
-queue when a control IN transfer ends on a full packet and "zero" is set.
-The next time ep0_txstate is entered, a zero-length packet is queued and
-the request is removed as fifo_count is 0.
-
-Signed-off-by: Daniel Gl�ckner <dg@emlix.com>
-Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/musb/musb_gadget_ep0.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/usb/musb/musb_gadget_ep0.c
-+++ b/drivers/usb/musb/musb_gadget_ep0.c
-@@ -511,7 +511,8 @@ static void ep0_txstate(struct musb *mus
-
- /* update the flags */
- if (fifo_count < MUSB_MAX_END0_PACKET
-- || request->actual == request->length) {
-+ || (request->actual == request->length
-+ && !request->zero)) {
- musb->ep0_state = MUSB_EP0_STAGE_STATUSOUT;
- csr |= MUSB_CSR0_P_DATAEND;
- } else
diff --git a/usb.current/usb-musb_gadget-fix-stall-handling.patch b/usb.current/usb-musb_gadget-fix-stall-handling.patch
deleted file mode 100644
index 454b1d338e3064..00000000000000
--- a/usb.current/usb-musb_gadget-fix-stall-handling.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From sshtylyov@ru.mvista.com Thu Nov 19 15:37:30 2009
-From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
-Date: Wed, 18 Nov 2009 22:51:18 +0300
-Subject: USB: musb_gadget: fix STALL handling
-To: gregkh@suse.de
-Cc: stable@kernel.org, davinci-linux-open-source@linux.davincidsp.com
-Message-ID: <200911182251.18858.sshtylyov@ru.mvista.com>
-
-
-The driver incorrectly cancels the mass-storage device CSW request
-(which leads to device reset) due to giving back URB at the head of
-endpoint's queue after sending each STALL handshake; stop doing that
-and start checking for the queue being non-empty before stalling an
-endpoint and disallowing stall in such case in musb_gadget_set_halt()
-like the other gadget drivers do.
-
-Moreover, the driver starts Rx request despite of the endpoint being
-halted -- fix this by moving the SendStall bit check from musb_g_rx()
-to rxstate(). And we also sometimes get into rxstate() with DMA still
-active after clearing an endpoint's halt (not clear why), so bail out
-in this case, similarly to what txstate() does...
-
-While at it, also do the following changes :
-
-- in musb_gadget_set_halt(), remove pointless Tx FIFO flushing (the
- driver does not allow stalling with non-empty Tx FIFO anyway);
-
-- in rxstate(), stop pointlessly zeroing the 'csr' variable;
-
-- in musb_gadget_set_halt(), move the 'done' label to a more proper
- place;
-
-- in musb_g_rx(), eliminate the 'done' label completely...
-
-Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
-Cc: <stable@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/usb/musb/musb_gadget.c | 79 +++++++++++++++++------------------------
- 1 file changed, 34 insertions(+), 45 deletions(-)
-
---- a/drivers/usb/musb/musb_gadget.c
-+++ b/drivers/usb/musb/musb_gadget.c
-@@ -4,6 +4,7 @@
- * Copyright 2005 Mentor Graphics Corporation
- * Copyright (C) 2005-2006 by Texas Instruments
- * Copyright (C) 2006-2007 Nokia Corporation
-+ * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
-@@ -436,14 +437,6 @@ void musb_g_tx(struct musb *musb, u8 epn
- csr |= MUSB_TXCSR_P_WZC_BITS;
- csr &= ~MUSB_TXCSR_P_SENTSTALL;
- musb_writew(epio, MUSB_TXCSR, csr);
-- if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) {
-- dma->status = MUSB_DMA_STATUS_CORE_ABORT;
-- musb->dma_controller->channel_abort(dma);
-- }
--
-- if (request)
-- musb_g_giveback(musb_ep, request, -EPIPE);
--
- break;
- }
-
-@@ -582,15 +575,25 @@ void musb_g_tx(struct musb *musb, u8 epn
- */
- static void rxstate(struct musb *musb, struct musb_request *req)
- {
-- u16 csr = 0;
- const u8 epnum = req->epnum;
- struct usb_request *request = &req->request;
- struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_out;
- void __iomem *epio = musb->endpoints[epnum].regs;
- unsigned fifo_count = 0;
- u16 len = musb_ep->packet_sz;
-+ u16 csr = musb_readw(epio, MUSB_RXCSR);
-
-- csr = musb_readw(epio, MUSB_RXCSR);
-+ /* We shouldn't get here while DMA is active, but we do... */
-+ if (dma_channel_status(musb_ep->dma) == MUSB_DMA_STATUS_BUSY) {
-+ DBG(4, "DMA pending...\n");
-+ return;
-+ }
-+
-+ if (csr & MUSB_RXCSR_P_SENDSTALL) {
-+ DBG(5, "%s stalling, RXCSR %04x\n",
-+ musb_ep->end_point.name, csr);
-+ return;
-+ }
-
- if (is_cppi_enabled() && musb_ep->dma) {
- struct dma_controller *c = musb->dma_controller;
-@@ -761,19 +764,10 @@ void musb_g_rx(struct musb *musb, u8 epn
- csr, dma ? " (dma)" : "", request);
-
- if (csr & MUSB_RXCSR_P_SENTSTALL) {
-- if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) {
-- dma->status = MUSB_DMA_STATUS_CORE_ABORT;
-- (void) musb->dma_controller->channel_abort(dma);
-- request->actual += musb_ep->dma->actual_len;
-- }
--
- csr |= MUSB_RXCSR_P_WZC_BITS;
- csr &= ~MUSB_RXCSR_P_SENTSTALL;
- musb_writew(epio, MUSB_RXCSR, csr);
--
-- if (request)
-- musb_g_giveback(musb_ep, request, -EPIPE);
-- goto done;
-+ return;
- }
-
- if (csr & MUSB_RXCSR_P_OVERRUN) {
-@@ -795,7 +789,7 @@ void musb_g_rx(struct musb *musb, u8 epn
- DBG((csr & MUSB_RXCSR_DMAENAB) ? 4 : 1,
- "%s busy, csr %04x\n",
- musb_ep->end_point.name, csr);
-- goto done;
-+ return;
- }
-
- if (dma && (csr & MUSB_RXCSR_DMAENAB)) {
-@@ -826,22 +820,15 @@ void musb_g_rx(struct musb *musb, u8 epn
- if ((request->actual < request->length)
- && (musb_ep->dma->actual_len
- == musb_ep->packet_sz))
-- goto done;
-+ return;
- #endif
- musb_g_giveback(musb_ep, request, 0);
-
- request = next_request(musb_ep);
- if (!request)
-- goto done;
--
-- /* don't start more i/o till the stall clears */
-- musb_ep_select(mbase, epnum);
-- csr = musb_readw(epio, MUSB_RXCSR);
-- if (csr & MUSB_RXCSR_P_SENDSTALL)
-- goto done;
-+ return;
- }
-
--
- /* analyze request if the ep is hot */
- if (request)
- rxstate(musb, to_musb_request(request));
-@@ -849,8 +836,6 @@ void musb_g_rx(struct musb *musb, u8 epn
- DBG(3, "packet waiting for %s%s request\n",
- musb_ep->desc ? "" : "inactive ",
- musb_ep->end_point.name);
--
--done:
- return;
- }
-
-@@ -1244,7 +1229,7 @@ int musb_gadget_set_halt(struct usb_ep *
- void __iomem *mbase;
- unsigned long flags;
- u16 csr;
-- struct musb_request *request = NULL;
-+ struct musb_request *request;
- int status = 0;
-
- if (!ep)
-@@ -1260,24 +1245,29 @@ int musb_gadget_set_halt(struct usb_ep *
-
- musb_ep_select(mbase, epnum);
-
-- /* cannot portably stall with non-empty FIFO */
- request = to_musb_request(next_request(musb_ep));
-- if (value && musb_ep->is_in) {
-- csr = musb_readw(epio, MUSB_TXCSR);
-- if (csr & MUSB_TXCSR_FIFONOTEMPTY) {
-- DBG(3, "%s fifo busy, cannot halt\n", ep->name);
-- spin_unlock_irqrestore(&musb->lock, flags);
-- return -EAGAIN;
-+ if (value) {
-+ if (request) {
-+ DBG(3, "request in progress, cannot halt %s\n",
-+ ep->name);
-+ status = -EAGAIN;
-+ goto done;
-+ }
-+ /* Cannot portably stall with non-empty FIFO */
-+ if (musb_ep->is_in) {
-+ csr = musb_readw(epio, MUSB_TXCSR);
-+ if (csr & MUSB_TXCSR_FIFONOTEMPTY) {
-+ DBG(3, "FIFO busy, cannot halt %s\n", ep->name);
-+ status = -EAGAIN;
-+ goto done;
-+ }
- }
--
- }
-
- /* set/clear the stall and toggle bits */
- DBG(2, "%s: %s stall\n", ep->name, value ? "set" : "clear");
- if (musb_ep->is_in) {
- csr = musb_readw(epio, MUSB_TXCSR);
-- if (csr & MUSB_TXCSR_FIFONOTEMPTY)
-- csr |= MUSB_TXCSR_FLUSHFIFO;
- csr |= MUSB_TXCSR_P_WZC_BITS
- | MUSB_TXCSR_CLRDATATOG;
- if (value)
-@@ -1300,14 +1290,13 @@ int musb_gadget_set_halt(struct usb_ep *
- musb_writew(epio, MUSB_RXCSR, csr);
- }
-
--done:
--
- /* maybe start the first request in the queue */
- if (!musb_ep->busy && !value && request) {
- DBG(3, "restarting the request\n");
- musb_ep_restart(musb, request);
- }
-
-+done:
- spin_unlock_irqrestore(&musb->lock, flags);
- return status;
- }
diff --git a/usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch b/usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch
deleted file mode 100644
index 9be1ebc1849c01..00000000000000
--- a/usb.current/usb-work-around-for-ehci-with-quirky-periodic-schedules.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From oliver@neukum.org Mon Nov 30 14:34:55 2009
-From: Oliver Neukum <oliver@neukum.org>
-Date: Fri, 27 Nov 2009 15:17:59 +0100
-Subject: USB: work around for EHCI with quirky periodic schedules
-To: "Greg Kroah-Hartman" <gregkh@suse.de>, Sarah Sharp <sarah.a.sharp@linux.intel.com>, Stephan Diestelhorst <stephan.diestelhorst@gmail.com>, Alan Stern <stern@rowland.harvard.edu>
-Message-ID: <200911271517.59867.oliver@neukum.org>
-
-
-a quirky chipset needs periodic schedules to run for a minimum
-time before they can be disabled again. This enforces the requirement
-with a time stamp and a calculated delay
-
-Signed-off-by: Oliver Neukum <oliver@neukum.org>
-Cc: stable <stable@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- drivers/usb/host/ehci-hcd.c | 2 ++
- drivers/usb/host/ehci-pci.c | 4 ++++
- drivers/usb/host/ehci-sched.c | 12 ++++++++++++
- drivers/usb/host/ehci.h | 2 ++
- 4 files changed, 20 insertions(+)
-
---- a/drivers/usb/host/ehci.h
-+++ b/drivers/usb/host/ehci.h
-@@ -118,6 +118,7 @@ struct ehci_hcd { /* one per controlle
- unsigned stamp;
- unsigned random_frame;
- unsigned long next_statechange;
-+ ktime_t last_periodic_enable;
- u32 command;
-
- /* SILICON QUIRKS */
-@@ -127,6 +128,7 @@ struct ehci_hcd { /* one per controlle
- unsigned big_endian_desc:1;
- unsigned has_amcc_usb23:1;
- unsigned need_io_watchdog:1;
-+ unsigned broken_periodic:1;
-
- /* required for usb32 quirk */
- #define OHCI_CTRL_HCFS (3 << 6)
---- a/drivers/usb/host/ehci-hcd.c
-+++ b/drivers/usb/host/ehci-hcd.c
-@@ -28,6 +28,7 @@
- #include <linux/errno.h>
- #include <linux/init.h>
- #include <linux/timer.h>
-+#include <linux/ktime.h>
- #include <linux/list.h>
- #include <linux/interrupt.h>
- #include <linux/usb.h>
-@@ -676,6 +677,7 @@ static int ehci_run (struct usb_hcd *hcd
- ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
- msleep(5);
- up_write(&ehci_cf_port_reset_rwsem);
-+ ehci->last_periodic_enable = ktime_get_real();
-
- temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase));
- ehci_info (ehci,
---- a/drivers/usb/host/ehci-pci.c
-+++ b/drivers/usb/host/ehci-pci.c
-@@ -111,6 +111,10 @@ static int ehci_pci_setup(struct usb_hcd
- switch (pdev->vendor) {
- case PCI_VENDOR_ID_INTEL:
- ehci->need_io_watchdog = 0;
-+ if (pdev->device == 0x27cc) {
-+ ehci->broken_periodic = 1;
-+ ehci_info(ehci, "using broken periodic workaround\n");
-+ }
- break;
- case PCI_VENDOR_ID_TDI:
- if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
---- a/drivers/usb/host/ehci-sched.c
-+++ b/drivers/usb/host/ehci-sched.c
-@@ -475,6 +475,8 @@ static int enable_periodic (struct ehci_
- /* make sure ehci_work scans these */
- ehci->next_uframe = ehci_readl(ehci, &ehci->regs->frame_index)
- % (ehci->periodic_size << 3);
-+ if (unlikely(ehci->broken_periodic))
-+ ehci->last_periodic_enable = ktime_get_real();
- return 0;
- }
-
-@@ -486,6 +488,16 @@ static int disable_periodic (struct ehci
- if (--ehci->periodic_sched)
- return 0;
-
-+ if (unlikely(ehci->broken_periodic)) {
-+ /* delay experimentally determined */
-+ ktime_t safe = ktime_add_us(ehci->last_periodic_enable, 1000);
-+ ktime_t now = ktime_get_real();
-+ s64 delay = ktime_us_delta(safe, now);
-+
-+ if (unlikely(delay > 0))
-+ udelay(delay);
-+ }
-+
- /* did setting PSE not take effect yet?
- * takes effect only at frame boundaries...
- */
diff --git a/version b/version
index b327ebc0f62540..2edd3d45983357 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-2.6.32-rc8
+2.6.32