diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-24 16:44:03 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-24 16:44:03 -0700 |
| commit | dcf49f00a8e3c08f6484ba259e8d524aaac97881 (patch) | |
| tree | 4012d2ce78a3361245ff65b97f8beb86d23a1e31 | |
| parent | 520ae0f9cfcfa5be2bd040820690cef41e9ce8ff (diff) | |
| download | patches-dcf49f00a8e3c08f6484ba259e8d524aaac97881.tar.gz | |
patches are now in Linus's tree.
12 files changed, 0 insertions, 910 deletions
@@ -18,22 +18,11 @@ gregkh/gkh-version.patch ################################# # USB patches for 2.6.36 ################################# -usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch -usb.current/usb-musb-gadget-fix-kernel-panic-if-using-out-ep-with-fifo_txrx-style.patch -usb.current/usb-musb-gadget-fix-bulk-in-infinit-hangs-in-double-buffer-case.patch -usb.current/usb-musb-gadget-enable-autoclear-for-out-transfer-in-both-dma-0-and-dma-1.patch -usb.current/usb-musb-gadget-fix-dma-length-for-out-transfer.patch -usb.current/usb-musb-gadget-complete-request-only-if-data-is-transfered-over.patch -usb.current/usb-musb-gadget-fix-dma-length-in-txstate.patch -usb.current/usb-musb-host-issue-a-memory-barrier-before-starting-dma.patch -usb.current/usb-musb-gadget-restart-request-on-clearing-endpoint-halt.patch -usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch ################################# # Staging patches for 2.6.36 ################################# -staging.current/staging-ti-st-remove-st_get_plat_device.patch ##################################################################### diff --git a/staging.current/staging-ti-st-remove-st_get_plat_device.patch b/staging.current/staging-ti-st-remove-st_get_plat_device.patch deleted file mode 100644 index 58e702545ae52f..00000000000000 --- a/staging.current/staging-ti-st-remove-st_get_plat_device.patch +++ /dev/null @@ -1,154 +0,0 @@ -From dbd3a8709560365ff9b1e5eca263f608877a8a89 Mon Sep 17 00:00:00 2001 -From: Pavan Savoy <pavan_savoy@ti.com> -Date: Thu, 19 Aug 2010 14:08:51 -0400 -Subject: Staging: ti-st: remove st_get_plat_device - -In order to support multiple ST platform devices, a new symbol -'st_get_plat_device' earlier needed to be exported by the arch/XX/brd-XX.c -file which intends to add the ST platform device. - -On removing this dependency, now inside ST driver maintain the array of -ST platform devices that would be registered. -As of now let id=0, as and when we end up having such platforms -where mutliple ST devices can exist, id would come from -protocol drivers (BT, FM and GPS) as to on which platform device -they want to register to. - -Signed-off-by: Pavan Savoy <pavan_savoy@ti.com> -Acked-by: Randy Dunlap <randy.dunlap@oracle.com> -Cc: Anca Emanuel <anca.emanuel@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/staging/ti-st/st.h | 1 - - drivers/staging/ti-st/st_core.c | 9 ++++----- - drivers/staging/ti-st/st_core.h | 2 +- - drivers/staging/ti-st/st_kim.c | 22 +++++++++++++++++++--- - 4 files changed, 24 insertions(+), 10 deletions(-) - ---- a/drivers/staging/ti-st/st.h -+++ b/drivers/staging/ti-st/st.h -@@ -80,5 +80,4 @@ struct st_proto_s { - extern long st_register(struct st_proto_s *); - extern long st_unregister(enum proto_type); - --extern struct platform_device *st_get_plat_device(void); - #endif /* ST_H */ ---- a/drivers/staging/ti-st/st_core.c -+++ b/drivers/staging/ti-st/st_core.c -@@ -38,7 +38,6 @@ - #include "st_ll.h" - #include "st.h" - --#define VERBOSE - /* strings to be used for rfkill entries and by - * ST Core to be used for sysfs debug entry - */ -@@ -581,7 +580,7 @@ long st_register(struct st_proto_s *new_ - long err = 0; - unsigned long flags = 0; - -- st_kim_ref(&st_gdata); -+ st_kim_ref(&st_gdata, 0); - pr_info("%s(%d) ", __func__, new_proto->type); - if (st_gdata == NULL || new_proto == NULL || new_proto->recv == NULL - || new_proto->reg_complete_cb == NULL) { -@@ -713,7 +712,7 @@ long st_unregister(enum proto_type type) - - pr_debug("%s: %d ", __func__, type); - -- st_kim_ref(&st_gdata); -+ st_kim_ref(&st_gdata, 0); - if (type < ST_BT || type >= ST_MAX) { - pr_err(" protocol %d not supported", type); - return -EPROTONOSUPPORT; -@@ -767,7 +766,7 @@ long st_write(struct sk_buff *skb) - #endif - long len; - -- st_kim_ref(&st_gdata); -+ st_kim_ref(&st_gdata, 0); - if (unlikely(skb == NULL || st_gdata == NULL - || st_gdata->tty == NULL)) { - pr_err("data/tty unavailable to perform write"); -@@ -818,7 +817,7 @@ static int st_tty_open(struct tty_struct - struct st_data_s *st_gdata; - pr_info("%s ", __func__); - -- st_kim_ref(&st_gdata); -+ st_kim_ref(&st_gdata, 0); - st_gdata->tty = tty; - tty->disc_data = st_gdata; - ---- a/drivers/staging/ti-st/st_core.h -+++ b/drivers/staging/ti-st/st_core.h -@@ -117,7 +117,7 @@ int st_core_init(struct st_data_s **); - void st_core_exit(struct st_data_s *); - - /* ask for reference from KIM */ --void st_kim_ref(struct st_data_s **); -+void st_kim_ref(struct st_data_s **, int); - - #define GPS_STUB_TEST - #ifdef GPS_STUB_TEST ---- a/drivers/staging/ti-st/st_kim.c -+++ b/drivers/staging/ti-st/st_kim.c -@@ -72,11 +72,26 @@ const unsigned char *protocol_names[] = - PROTO_ENTRY(ST_GPS, "GPS"), - }; - -+#define MAX_ST_DEVICES 3 /* Imagine 1 on each UART for now */ -+struct platform_device *st_kim_devices[MAX_ST_DEVICES]; - - /**********************************************************************/ - /* internal functions */ - - /** -+ * st_get_plat_device - -+ * function which returns the reference to the platform device -+ * requested by id. As of now only 1 such device exists (id=0) -+ * the context requesting for reference can get the id to be -+ * requested by a. The protocol driver which is registering or -+ * b. the tty device which is opened. -+ */ -+static struct platform_device *st_get_plat_device(int id) -+{ -+ return st_kim_devices[id]; -+} -+ -+/** - * validate_firmware_response - - * function to return whether the firmware response was proper - * in case of error don't complete so that waiting for proper -@@ -353,7 +368,7 @@ void st_kim_chip_toggle(enum proto_type - struct kim_data_s *kim_gdata; - pr_info(" %s ", __func__); - -- kim_pdev = st_get_plat_device(); -+ kim_pdev = st_get_plat_device(0); - kim_gdata = dev_get_drvdata(&kim_pdev->dev); - - if (kim_gdata->gpios[type] == -1) { -@@ -574,12 +589,12 @@ static int kim_toggle_radio(void *data, - * This would enable multiple such platform devices to exist - * on a given platform - */ --void st_kim_ref(struct st_data_s **core_data) -+void st_kim_ref(struct st_data_s **core_data, int id) - { - struct platform_device *pdev; - struct kim_data_s *kim_gdata; - /* get kim_gdata reference from platform device */ -- pdev = st_get_plat_device(); -+ pdev = st_get_plat_device(id); - kim_gdata = dev_get_drvdata(&pdev->dev); - *core_data = kim_gdata->core_data; - } -@@ -623,6 +638,7 @@ static int kim_probe(struct platform_dev - long *gpios = pdev->dev.platform_data; - struct kim_data_s *kim_gdata; - -+ st_kim_devices[pdev->id] = pdev; - kim_gdata = kzalloc(sizeof(struct kim_data_s), GFP_ATOMIC); - if (!kim_gdata) { - pr_err("no mem to allocate"); diff --git a/usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch b/usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch deleted file mode 100644 index 2a6707ea411f8a..00000000000000 --- a/usb.current/usb-fix-bug-in-initialization-of-interface-minor-numbers.patch +++ /dev/null @@ -1,121 +0,0 @@ -From stern+4c863d94@rowland.harvard.edu Tue Sep 21 13:01:42 2010 -Date: Tue, 21 Sep 2010 15:01:53 -0400 (EDT) -From: Alan Stern <stern@rowland.harvard.edu> -To: Greg KH <greg@kroah.com> -cc: Jiri Kosina <jkosina@suse.cz>, Phil Turmel <philip@turmel.org>, - Mat <jackdachef@gmail.com>, Guillaume Chazarain <guichaz@gmail.com>, - Andreas Bombe <aeb@debian.org>, - Alex Riesen <raa.lkml@gmail.com>, Gabriel C <nix.or.die@googlemail.com> -Subject: USB: fix bug in initialization of interface minor numbers -Message-ID: <Pine.LNX.4.44L0.1009211458000.1644-100000@iolanthe.rowland.org> - -Recent changes in the usbhid layer exposed a bug in usbcore. If -CONFIG_USB_DYNAMIC_MINORS is enabled then an interface may be assigned -a minor number of 0. However interfaces that aren't registered as USB -class devices also have their minor number set to 0, during -initialization. As a result usb_find_interface() may return the -wrong interface, leading to a crash. - -This patch (as1418) fixes the problem by initializing every -interface's minor number to -1. It also cleans up the -usb_register_dev() function, which besides being somewhat awkwardly -written, does not unwind completely on all its error paths. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Tested-by: Philip J. Turmel <philip@turmel.org> -Tested-by: Gabriel Craciunescu <nix.or.die@googlemail.com> -Tested-by: Alex Riesen <raa.lkml@gmail.com> -Tested-by: Matthias Bayer <jackdachef@gmail.com> -CC: Jiri Kosina <jkosina@suse.cz> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/file.c | 35 ++++++++++++++++------------------- - drivers/usb/core/message.c | 1 + - 2 files changed, 17 insertions(+), 19 deletions(-) - ---- a/drivers/usb/core/file.c -+++ b/drivers/usb/core/file.c -@@ -159,9 +159,9 @@ void usb_major_cleanup(void) - int usb_register_dev(struct usb_interface *intf, - struct usb_class_driver *class_driver) - { -- int retval = -EINVAL; -+ int retval; - int minor_base = class_driver->minor_base; -- int minor = 0; -+ int minor; - char name[20]; - char *temp; - -@@ -173,12 +173,17 @@ int usb_register_dev(struct usb_interfac - */ - minor_base = 0; - #endif -- intf->minor = -1; -- -- dbg ("looking for a minor, starting at %d", minor_base); - - if (class_driver->fops == NULL) -- goto exit; -+ return -EINVAL; -+ if (intf->minor >= 0) -+ return -EADDRINUSE; -+ -+ retval = init_usb_class(); -+ if (retval) -+ return retval; -+ -+ dev_dbg(&intf->dev, "looking for a minor, starting at %d", minor_base); - - down_write(&minor_rwsem); - for (minor = minor_base; minor < MAX_USB_MINORS; ++minor) { -@@ -186,20 +191,12 @@ int usb_register_dev(struct usb_interfac - continue; - - usb_minors[minor] = class_driver->fops; -- -- retval = 0; -+ intf->minor = minor; - break; - } - up_write(&minor_rwsem); -- -- if (retval) -- goto exit; -- -- retval = init_usb_class(); -- if (retval) -- goto exit; -- -- intf->minor = minor; -+ if (intf->minor < 0) -+ return -EXFULL; - - /* create a usb class device for this usb interface */ - snprintf(name, sizeof(name), class_driver->name, minor - minor_base); -@@ -213,11 +210,11 @@ int usb_register_dev(struct usb_interfac - "%s", temp); - if (IS_ERR(intf->usb_dev)) { - down_write(&minor_rwsem); -- usb_minors[intf->minor] = NULL; -+ usb_minors[minor] = NULL; -+ intf->minor = -1; - up_write(&minor_rwsem); - retval = PTR_ERR(intf->usb_dev); - } --exit: - return retval; - } - EXPORT_SYMBOL_GPL(usb_register_dev); ---- a/drivers/usb/core/message.c -+++ b/drivers/usb/core/message.c -@@ -1802,6 +1802,7 @@ free_interfaces: - intf->dev.groups = usb_interface_groups; - intf->dev.dma_mask = dev->dev.dma_mask; - INIT_WORK(&intf->reset_ws, __usb_queue_reset_device); -+ intf->minor = -1; - device_initialize(&intf->dev); - dev_set_name(&intf->dev, "%d-%s:%d.%d", - dev->bus->busnum, dev->devpath, diff --git a/usb.current/usb-musb-gadget-complete-request-only-if-data-is-transfered-over.patch b/usb.current/usb-musb-gadget-complete-request-only-if-data-is-transfered-over.patch deleted file mode 100644 index 426849b372af00..00000000000000 --- a/usb.current/usb-musb-gadget-complete-request-only-if-data-is-transfered-over.patch +++ /dev/null @@ -1,52 +0,0 @@ -From balbi@ti.com Tue Sep 21 14:15:18 2010 -From: Ming Lei <tom.leiming@gmail.com> -To: Greg KH <greg@kroah.com> -Cc: Ming Lei <tom.leiming@gmail.com>, - David Brownell <dbrownell@users.sourceforge.net>, - Anand Gadiyar <gadiyar@ti.com>, Mike Frysinger <vapier@gentoo.org>, - Sergei Shtylyov <sshtylyov@ru.mvista.com>, Felipe Balbi <balbi@ti.com> -Subject: usb: musb: gadget: complete request only if data is transfered over -Date: Mon, 20 Sep 2010 10:32:05 +0300 -Message-Id: <1284967927-7163-6-git-send-email-balbi@ti.com> - -From: Ming Lei <tom.leiming@gmail.com> - -Complete the current request only if the data transfer is over. - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Cc: David Brownell <dbrownell@users.sourceforge.net> -Cc: Anand Gadiyar <gadiyar@ti.com> -Cc: Mike Frysinger <vapier@gentoo.org> -Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_gadget.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - ---- a/drivers/usb/musb/musb_gadget.c -+++ b/drivers/usb/musb/musb_gadget.c -@@ -501,14 +501,14 @@ void musb_g_tx(struct musb *musb, u8 epn - request->zero = 0; - } - -- /* ... or if not, then complete it. */ -- musb_g_giveback(musb_ep, request, 0); -- -- request = musb_ep->desc ? next_request(musb_ep) : NULL; -- if (!request) { -- DBG(4, "%s idle now\n", -- musb_ep->end_point.name); -- return; -+ if (request->actual == request->length) { -+ musb_g_giveback(musb_ep, request, 0); -+ request = musb_ep->desc ? next_request(musb_ep) : NULL; -+ if (!request) { -+ DBG(4, "%s idle now\n", -+ musb_ep->end_point.name); -+ return; -+ } - } - } - diff --git a/usb.current/usb-musb-gadget-enable-autoclear-for-out-transfer-in-both-dma-0-and-dma-1.patch b/usb.current/usb-musb-gadget-enable-autoclear-for-out-transfer-in-both-dma-0-and-dma-1.patch deleted file mode 100644 index ef0c63ceb1c5cb..00000000000000 --- a/usb.current/usb-musb-gadget-enable-autoclear-for-out-transfer-in-both-dma-0-and-dma-1.patch +++ /dev/null @@ -1,58 +0,0 @@ -From balbi@ti.com Tue Sep 21 14:14:42 2010 -From: Ming Lei <tom.leiming@gmail.com> -To: Greg KH <greg@kroah.com> -Cc: Ming Lei <tom.leiming@gmail.com>, - David Brownell <dbrownell@users.sourceforge.net>, - Anand Gadiyar <gadiyar@ti.com>, Mike Frysinger <vapier@gentoo.org>, - Sergei Shtylyov <sshtylyov@ru.mvista.com>, Felipe Balbi <balbi@ti.com> -Subject: usb: musb: gadget: enable autoclear for OUT transfer in both DMA 0 and DMA 1 -Date: Mon, 20 Sep 2010 10:32:03 +0300 -Message-Id: <1284967927-7163-4-git-send-email-balbi@ti.com> - -From: Ming Lei <tom.leiming@gmail.com> - -This patch fixes one bugs of OUT transfer in double buffer case: - - -the current code only enable autoclear for dma mode 1, and not - for dma mode 0 - -Without this patch, test #5 of usbtest can't be passed if we -configure musb as g_zero and use fifo mode 3 to enable double -buffer mode. - -With this patch and the following patch(fix dma length), -on my beagle B5, test#5(queued bulk out) may go beyond -18Mbyte/s(seems dma mode 0 is quicker in double buffer case) -if musb is configured as g_zero and fifo mode 3 is taken, follows -the test command: - - #./testusb -D DEV_NAME -c 1024 -t 5 -s 32768 -g 8 [1] - -Also I have tested this patch can't make g_ether broken. - -[1],source of testusb : tools/usb/testusb.c under linux kernel; - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Cc: David Brownell <dbrownell@users.sourceforge.net> -Cc: Anand Gadiyar <gadiyar@ti.com> -Cc: Mike Frysinger <vapier@gentoo.org> -Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_gadget.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/musb/musb_gadget.c -+++ b/drivers/usb/musb/musb_gadget.c -@@ -643,8 +643,8 @@ static void rxstate(struct musb *musb, s - */ - - csr |= MUSB_RXCSR_DMAENAB; --#ifdef USE_MODE1 - csr |= MUSB_RXCSR_AUTOCLEAR; -+#ifdef USE_MODE1 - /* csr |= MUSB_RXCSR_DMAMODE; */ - - /* this special sequence (enabling and then diff --git a/usb.current/usb-musb-gadget-fix-bulk-in-infinit-hangs-in-double-buffer-case.patch b/usb.current/usb-musb-gadget-fix-bulk-in-infinit-hangs-in-double-buffer-case.patch deleted file mode 100644 index 7266a7f0477347..00000000000000 --- a/usb.current/usb-musb-gadget-fix-bulk-in-infinit-hangs-in-double-buffer-case.patch +++ /dev/null @@ -1,73 +0,0 @@ -From balbi@ti.com Tue Sep 21 14:13:45 2010 -From: Ming Lei <tom.leiming@gmail.com> -To: Greg KH <greg@kroah.com> -Cc: Ming Lei <tom.leiming@gmail.com>, - David Brownell <dbrownell@users.sourceforge.net>, - Anand Gadiyar <gadiyar@ti.com>, Mike Frysinger <vapier@gentoo.org>, - Sergei Shtylyov <sshtylyov@ru.mvista.com>, Felipe Balbi <balbi@ti.com> -Subject: usb: musb: gadget: fix bulk IN infinit hangs in double buffer case -Date: Mon, 20 Sep 2010 10:32:02 +0300 -Message-Id: <1284967927-7163-3-git-send-email-balbi@ti.com> - -From: Ming Lei <tom.leiming@gmail.com> - -This patch fixes one infinite hang of bulk IN transfer in double buffer -case, the hang can be observed easily by test #6 of usbtest if musb is -configured as g_zero and fifo mode 3 is taken to enable double fifo. - -In fact, the patch only removes the check for non-empty fifo before -loading data from new request into fifo since the check is not correct: - - -in double buffer case, fifo may accommodate more than one packet, - even though it has contained one packet already and is non-empty - - -since last DMA is completed before calling musb_g_tx, it is sure - that fifo may accommodate at least one packet - -Without applying the patch, new requst enqueued from .complte may not -have a chance to be loaded into fifo, then will never be completed and -cause infinite hangs. - -With the patch, on my beagle B5, test#6(queued bulk in) can be passed and -test result may go beyond 33Mbyte/s if musb is configured as g_zero and -fifo mode 3 is taken, follows the test command: - - #testusb -D DEV_NAME -c 1024 -t 6 -s 32768 -g 8 [1] - -[1], - -source of testusb : tools/usb/testusb.c under linux kernel; - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Acked-by: Anand Gadiyar <gadiyar@ti.com> -Cc: David Brownell <dbrownell@users.sourceforge.net> -Cc: Anand Gadiyar <gadiyar@ti.com> -Cc: Mike Frysinger <vapier@gentoo.org> -Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_gadget.c | 12 ------------ - 1 file changed, 12 deletions(-) - ---- a/drivers/usb/musb/musb_gadget.c -+++ b/drivers/usb/musb/musb_gadget.c -@@ -504,18 +504,6 @@ void musb_g_tx(struct musb *musb, u8 epn - /* ... or if not, then complete it. */ - musb_g_giveback(musb_ep, request, 0); - -- /* -- * Kickstart next transfer if appropriate; -- * the packet that just completed might not -- * be transmitted for hours or days. -- * REVISIT for double buffering... -- * FIXME revisit for stalls too... -- */ -- musb_ep_select(mbase, epnum); -- csr = musb_readw(epio, MUSB_TXCSR); -- if (csr & MUSB_TXCSR_FIFONOTEMPTY) -- return; -- - request = musb_ep->desc ? next_request(musb_ep) : NULL; - if (!request) { - DBG(4, "%s idle now\n", diff --git a/usb.current/usb-musb-gadget-fix-dma-length-for-out-transfer.patch b/usb.current/usb-musb-gadget-fix-dma-length-for-out-transfer.patch deleted file mode 100644 index c84bbc7d6e4dc7..00000000000000 --- a/usb.current/usb-musb-gadget-fix-dma-length-for-out-transfer.patch +++ /dev/null @@ -1,45 +0,0 @@ -From balbi@ti.com Tue Sep 21 14:15:02 2010 -From: Ming Lei <tom.leiming@gmail.com> -To: Greg KH <greg@kroah.com> -Cc: Ming Lei <tom.leiming@gmail.com>, - David Brownell <dbrownell@users.sourceforge.net>, - Anand Gadiyar <gadiyar@ti.com>, Mike Frysinger <vapier@gentoo.org>, - Sergei Shtylyov <sshtylyov@ru.mvista.com>, Felipe Balbi <balbi@ti.com> -Subject: usb: musb: gadget: fix DMA length for OUT transfer -Date: Mon, 20 Sep 2010 10:32:04 +0300 -Message-Id: <1284967927-7163-5-git-send-email-balbi@ti.com> - -From: Ming Lei <tom.leiming@gmail.com> - -DMA length should not go beyond the availabe space of request buffer, -so fix it. - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Acked-by: Anand Gadiyar <gadiyar@ti.com> -Cc: David Brownell <dbrownell@users.sourceforge.net> -Cc: Anand Gadiyar <gadiyar@ti.com> -Cc: Mike Frysinger <vapier@gentoo.org> -Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_gadget.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/drivers/usb/musb/musb_gadget.c -+++ b/drivers/usb/musb/musb_gadget.c -@@ -659,10 +659,11 @@ static void rxstate(struct musb *musb, s - if (request->actual < request->length) { - int transfer_size = 0; - #ifdef USE_MODE1 -- transfer_size = min(request->length, -+ transfer_size = min(request->length - request->actual, - channel->max_len); - #else -- transfer_size = len; -+ transfer_size = min(request->length - request->actual, -+ (unsigned)len); - #endif - if (transfer_size <= musb_ep->packet_sz) - musb_ep->dma->desired_mode = 0; diff --git a/usb.current/usb-musb-gadget-fix-dma-length-in-txstate.patch b/usb.current/usb-musb-gadget-fix-dma-length-in-txstate.patch deleted file mode 100644 index dbab9c2b61da1c..00000000000000 --- a/usb.current/usb-musb-gadget-fix-dma-length-in-txstate.patch +++ /dev/null @@ -1,90 +0,0 @@ -From balbi@ti.com Tue Sep 21 14:15:40 2010 -From: Ming Lei <tom.leiming@gmail.com> -To: Greg KH <greg@kroah.com> -Cc: Ming Lei <tom.leiming@gmail.com>, - David Brownell <dbrownell@users.sourceforge.net>, - Anand Gadiyar <gadiyar@ti.com>, Mike Frysinger <vapier@gentoo.org>, - Sergei Shtylyov <sshtylyov@ru.mvista.com>, Felipe Balbi <balbi@ti.com> -Subject: usb: musb: gadget: fix dma length in txstate -Date: Mon, 20 Sep 2010 10:32:06 +0300 -Message-Id: <1284967927-7163-7-git-send-email-balbi@ti.com> - -From: Ming Lei <tom.leiming@gmail.com> - -DMA length should not go beyond the availabe space -of request buffer, so fix it. - -Also set max_len of cppi dma channel as max size of -int type, so make musb dma handling happier. - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Cc: David Brownell <dbrownell@users.sourceforge.net> -Cc: Anand Gadiyar <gadiyar@ti.com> -Cc: Mike Frysinger <vapier@gentoo.org> -Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/cppi_dma.c | 1 + - drivers/usb/musb/musb_gadget.c | 18 +++++++++--------- - 2 files changed, 10 insertions(+), 9 deletions(-) - ---- a/drivers/usb/musb/cppi_dma.c -+++ b/drivers/usb/musb/cppi_dma.c -@@ -322,6 +322,7 @@ cppi_channel_allocate(struct dma_control - index, transmit ? 'T' : 'R', cppi_ch); - cppi_ch->hw_ep = ep; - cppi_ch->channel.status = MUSB_DMA_STATUS_FREE; -+ cppi_ch->channel.max_len = 0x7fffffff; - - DBG(4, "Allocate CPPI%d %cX\n", index, transmit ? 'T' : 'R'); - return &cppi_ch->channel; ---- a/drivers/usb/musb/musb_gadget.c -+++ b/drivers/usb/musb/musb_gadget.c -@@ -300,6 +300,11 @@ static void txstate(struct musb *musb, s - #ifndef CONFIG_MUSB_PIO_ONLY - if (is_dma_capable() && musb_ep->dma) { - struct dma_controller *c = musb->dma_controller; -+ size_t request_size; -+ -+ /* setup DMA, then program endpoint CSR */ -+ request_size = min_t(size_t, request->length - request->actual, -+ musb_ep->dma->max_len); - - use_dma = (request->dma != DMA_ADDR_INVALID); - -@@ -307,11 +312,6 @@ static void txstate(struct musb *musb, s - - #ifdef CONFIG_USB_INVENTRA_DMA - { -- size_t request_size; -- -- /* setup DMA, then program endpoint CSR */ -- request_size = min_t(size_t, request->length, -- musb_ep->dma->max_len); - if (request_size < musb_ep->packet_sz) - musb_ep->dma->desired_mode = 0; - else -@@ -373,8 +373,8 @@ static void txstate(struct musb *musb, s - use_dma = use_dma && c->channel_program( - musb_ep->dma, musb_ep->packet_sz, - 0, -- request->dma, -- request->length); -+ request->dma + request->actual, -+ request_size); - if (!use_dma) { - c->channel_release(musb_ep->dma); - musb_ep->dma = NULL; -@@ -386,8 +386,8 @@ static void txstate(struct musb *musb, s - use_dma = use_dma && c->channel_program( - musb_ep->dma, musb_ep->packet_sz, - request->zero, -- request->dma, -- request->length); -+ request->dma + request->actual, -+ request_size); - #endif - } - #endif diff --git a/usb.current/usb-musb-gadget-fix-kernel-panic-if-using-out-ep-with-fifo_txrx-style.patch b/usb.current/usb-musb-gadget-fix-kernel-panic-if-using-out-ep-with-fifo_txrx-style.patch deleted file mode 100644 index 989e68fcc738bf..00000000000000 --- a/usb.current/usb-musb-gadget-fix-kernel-panic-if-using-out-ep-with-fifo_txrx-style.patch +++ /dev/null @@ -1,152 +0,0 @@ -From balbi@ti.com Tue Sep 21 14:13:17 2010 -From: Ming Lei <tom.leiming@gmail.com> -To: Greg KH <greg@kroah.com> -Cc: Ming Lei <tom.leiming@gmail.com>, - David Brownell <dbrownell@users.sourceforge.net>, - Anand Gadiyar <gadiyar@ti.com>, Mike Frysinger <vapier@gentoo.org>, - Sergei Shtylyov <sshtylyov@ru.mvista.com>, stable <stable@kernel.org>, - Felipe Balbi <balbi@ti.com> -Subject: usb: musb: gadget: fix kernel panic if using out ep with FIFO_TXRX style -Date: Mon, 20 Sep 2010 10:32:01 +0300 -Message-Id: <1284967927-7163-2-git-send-email-balbi@ti.com> - -From: Ming Lei <tom.leiming@gmail.com> - -For shared fifo hw endpoint(with FIFO_TXRX style), only ep_in -field of musb_hw_ep is intialized in musb_g_init_endpoints, and -ep_out is not initialized, but musb_g_rx and rxstate may access -ep_out field of musb_hw_ep by the method below: - - musb_ep = &musb->endpoints[epnum].ep_out - -which can cause the kernel panic[1] below, this patch fixes the issue -by getting 'musb_ep' from '&musb->endpoints[epnum].ep_in' for shared fifo -endpoint. - -[1], kernel panic -[root@OMAP3EVM /]# musb_interrupt 1583: ** IRQ peripheral usb0008 tx0000 rx4000 -musb_stage0_irq 460: <== Power=f0, DevCtl=99, int_usb=0x8 -musb_g_rx 772: <== (null), rxcsr 4007 ffffffe8 -musb_g_rx 786: iso overrun on ffffffe8 -Unable to handle kernel NULL pointer dereference at virtual address 00000008 -pgd = c0004000 -[00000008] *pgd=00000000 -Internal error: Oops: 17 [#1] PREEMPT -last sysfs file: /sys/devices/platform/musb_hdrc/usb1/usb_device/usbdev1.1/dev -Modules linked in: g_zero -CPU: 0 Tainted: G W (2.6.35-rc6-gkh-wl+ #92) -PC is at musb_g_rx+0xfc/0x2ec -LR is at vprintk+0x3f4/0x458 -pc : [<c02c07a4>] lr : [<c006ccb0>] psr: 20000193 -sp : c760bd78 ip : c03c9d70 fp : c760bdbc -r10: 00000000 r9 : fa0ab1e0 r8 : 0000000e -r7 : c7e80158 r6 : ffffffe8 r5 : 00000001 r4 : 00004003 -r3 : 00010003 r2 : c760bcd8 r1 : c03cd030 r0 : 0000002e -Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel -Control: 10c5387d Table: 8778c019 DAC: 00000017 -Process kmemleak (pid: 421, stack limit = 0xc760a2e8) -Stack: (0xc760bd78 to 0xc760c000) -bd60: ffffffe8 c04b1b58 -bd80: ffffffe8 c7c01ac0 00000000 c7e80d24 c0084238 00000001 00000001 c7e80158 -bda0: 0000000e 00000008 00000099 000000f0 c760be04 c760bdc0 c02bcd68 c02c06b4 -bdc0: 00000099 00000008 00004000 c760bdd8 c03cc4f8 00000000 00000002 c7e80158 -bde0: c7d2e300 60000193 c760a000 0000005c 00000000 00000000 c760be24 c760be08 -be00: c02bcecc c02bc1ac c7d2e300 c7d2e300 0000005c c760a000 c760be54 c760be28 -be20: c00ad698 c02bce6c 00000000 c7d2e300 c067c258 0000005c c067c294 00000001 -be40: c760a000 00000000 c760be74 c760be58 c00af984 c00ad5fc 0000005c 00000000 -be60: 00000000 00000002 c760be8c c760be78 c0039080 c00af8d0 ffffffff fa200000 -be80: c760beec c760be90 c0039b6c c003900c 00000001 00000000 c7d1e240 00000000 -bea0: 00000000 c068bae8 00000000 60000013 00000001 00000000 00000000 c760beec -bec0: c0064ecc c760bed8 c00ff7d0 c003a0a8 60000013 ffffffff 00000000 c068bae8 -bee0: c760bf24 c760bef0 c00ff7d0 c0064ec4 00000001 00000000 c00ff700 00000000 -bf00: c0087f00 00000000 60000013 c0d76a70 c0e23795 00000001 c760bf4c c760bf28 -bf20: c00ffdd8 c00ff70c c068bb08 c068bae8 60000013 c0100938 c068bb30 00000000 -bf40: c760bf84 c760bf50 c010014c c00ffd84 00000001 00000000 c010000c 00012c00 -bf60: c7c33f04 00012c00 c7c33f04 00000000 c0100938 00000000 c760bf9c c760bf88 -bf80: c01009a8 c0100018 c760bfa8 c7c33f04 c760bff4 c760bfa0 c0088000 c0100944 -bfa0: c760bf98 00000000 00000000 00000001 dead4ead ffffffff ffffffff c08ba2bc -bfc0: 00000000 c049e7fa 00000000 c0087f70 c760bfd0 c760bfd0 c7c33f04 c0087f70 -bfe0: c006f5e8 00000013 00000000 c760bff8 c006f5e8 c0087f7c 7f0004ff df2000ff -Backtrace: -[<c02c06a8>] (musb_g_rx+0x0/0x2ec) from [<c02bcd68>] (musb_interrupt+0xbc8/0xcc0) -[<c02bc1a0>] (musb_interrupt+0x0/0xcc0) from [<c02bcecc>] (generic_interrupt+0x6c/0x84) -[<c02bce60>] (generic_interrupt+0x0/0x84) from [<c00ad698>] (handle_IRQ_event+0xa8/0x1ec) - r7:c760a000 r6:0000005c r5:c7d2e300 r4:c7d2e300 -[<c00ad5f0>] (handle_IRQ_event+0x0/0x1ec) from [<c00af984>] (handle_level_irq+0xc0/0x13c) -[<c00af8c4>] (handle_level_irq+0x0/0x13c) from [<c0039080>] (asm_do_IRQ+0x80/0xa0) - r7:00000002 r6:00000000 r5:00000000 r4:0000005c -[<c0039000>] (asm_do_IRQ+0x0/0xa0) from [<c0039b6c>] (__irq_svc+0x4c/0xb4) -Exception stack(0xc760be90 to 0xc760bed8) -be80: 00000001 00000000 c7d1e240 00000000 -bea0: 00000000 c068bae8 00000000 60000013 00000001 00000000 00000000 c760beec -bec0: c0064ecc c760bed8 c00ff7d0 c003a0a8 60000013 ffffffff - r5:fa200000 r4:ffffffff -[<c0064eb8>] (sub_preempt_count+0x0/0x100) from [<c00ff7d0>] (find_and_get_object+0xd0/0x110) - r5:c068bae8 r4:00000000 -[<c00ff700>] (find_and_get_object+0x0/0x110) from [<c00ffdd8>] (scan_block+0x60/0x104) - r8:00000001 r7:c0e23795 r6:c0d76a70 r5:60000013 r4:00000000 -[<c00ffd78>] (scan_block+0x0/0x104) from [<c010014c>] (kmemleak_scan+0x140/0x484) -[<c010000c>] (kmemleak_scan+0x0/0x484) from [<c01009a8>] (kmemleak_scan_thread+0x70/0xcc) - r8:00000000 r7:c0100938 r6:00000000 r5:c7c33f04 r4:00012c00 -[<c0100938>] (kmemleak_scan_thread+0x0/0xcc) from [<c0088000>] (kthread+0x90/0x98) - r5:c7c33f04 r4:c760bfa8 -[<c0087f70>] (kthread+0x0/0x98) from [<c006f5e8>] (do_exit+0x0/0x684) - r7:00000013 r6:c006f5e8 r5:c0087f70 r4:c7c33f04 -Code: e3002312 e58d6000 e2833e16 eb0422d5 (e5963020) ----[ end trace f3d5e96f75c297b7 ]--- - -Signed-off-by: Ming Lei <tom.leiming@gmail.com> -Reviewed-by: Sergei Shtylyov <sshtylyov@mvista.com> -Cc: David Brownell <dbrownell@users.sourceforge.net> -Cc: Anand Gadiyar <gadiyar@ti.com> -Cc: Mike Frysinger <vapier@gentoo.org> -Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Cc: stable <stable@kernel.org> -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_gadget.c | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - ---- a/drivers/usb/musb/musb_gadget.c -+++ b/drivers/usb/musb/musb_gadget.c -@@ -568,11 +568,19 @@ static void rxstate(struct musb *musb, s - { - const u8 epnum = req->epnum; - struct usb_request *request = &req->request; -- struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_out; -+ struct musb_ep *musb_ep; - void __iomem *epio = musb->endpoints[epnum].regs; - unsigned fifo_count = 0; -- u16 len = musb_ep->packet_sz; -+ u16 len; - u16 csr = musb_readw(epio, MUSB_RXCSR); -+ struct musb_hw_ep *hw_ep = &musb->endpoints[epnum]; -+ -+ if (hw_ep->is_shared_fifo) -+ musb_ep = &hw_ep->ep_in; -+ else -+ musb_ep = &hw_ep->ep_out; -+ -+ len = musb_ep->packet_sz; - - /* We shouldn't get here while DMA is active, but we do... */ - if (dma_channel_status(musb_ep->dma) == MUSB_DMA_STATUS_BUSY) { -@@ -740,9 +748,15 @@ void musb_g_rx(struct musb *musb, u8 epn - u16 csr; - struct usb_request *request; - void __iomem *mbase = musb->mregs; -- struct musb_ep *musb_ep = &musb->endpoints[epnum].ep_out; -+ struct musb_ep *musb_ep; - void __iomem *epio = musb->endpoints[epnum].regs; - struct dma_channel *dma; -+ struct musb_hw_ep *hw_ep = &musb->endpoints[epnum]; -+ -+ if (hw_ep->is_shared_fifo) -+ musb_ep = &hw_ep->ep_in; -+ else -+ musb_ep = &hw_ep->ep_out; - - musb_ep_select(mbase, epnum); - diff --git a/usb.current/usb-musb-gadget-restart-request-on-clearing-endpoint-halt.patch b/usb.current/usb-musb-gadget-restart-request-on-clearing-endpoint-halt.patch deleted file mode 100644 index 4a011b07b3fbe0..00000000000000 --- a/usb.current/usb-musb-gadget-restart-request-on-clearing-endpoint-halt.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 2f3bd798c231e982cc98d38abbda8fe5b2905ced Mon Sep 17 00:00:00 2001 -From: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Date: Sat, 11 Sep 2010 13:23:12 -0500 -Subject: usb: musb: gadget: restart request on clearing endpoint halt - -Commit 46034dca515bc4ddca0399ae58106d1f5f0d809f (USB: musb_gadget_ep0: stop -abusing musb_gadget_set_halt()) forgot to restart a queued request after -clearing the endpoint halt feature. This results in a couple of USB resets -while enumerating the file-backed storage gadget due to CSW packet not being -sent for the MODE SENSE(10) command. - -Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> -Cc: stable@kernel.org -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_gadget.c | 2 +- - drivers/usb/musb/musb_gadget.h | 2 ++ - drivers/usb/musb/musb_gadget_ep0.c | 9 +++++++++ - 3 files changed, 12 insertions(+), 1 deletion(-) - ---- a/drivers/usb/musb/musb_gadget.c -+++ b/drivers/usb/musb/musb_gadget.c -@@ -1084,7 +1084,7 @@ struct free_record { - /* - * Context: controller locked, IRQs blocked. - */ --static void musb_ep_restart(struct musb *musb, struct musb_request *req) -+void musb_ep_restart(struct musb *musb, struct musb_request *req) - { - DBG(3, "<== %s request %p len %u on hw_ep%d\n", - req->tx ? "TX/IN" : "RX/OUT", ---- a/drivers/usb/musb/musb_gadget.h -+++ b/drivers/usb/musb/musb_gadget.h -@@ -105,4 +105,6 @@ extern void musb_gadget_cleanup(struct m - - extern void musb_g_giveback(struct musb_ep *, struct usb_request *, int); - -+extern void musb_ep_restart(struct musb *, struct musb_request *); -+ - #endif /* __MUSB_GADGET_H */ ---- a/drivers/usb/musb/musb_gadget_ep0.c -+++ b/drivers/usb/musb/musb_gadget_ep0.c -@@ -261,6 +261,7 @@ __acquires(musb->lock) - ctrlrequest->wIndex & 0x0f; - struct musb_ep *musb_ep; - struct musb_hw_ep *ep; -+ struct musb_request *request; - void __iomem *regs; - int is_in; - u16 csr; -@@ -302,6 +303,14 @@ __acquires(musb->lock) - musb_writew(regs, MUSB_RXCSR, csr); - } - -+ /* Maybe start the first request in the queue */ -+ request = to_musb_request( -+ next_request(musb_ep)); -+ if (!musb_ep->busy && request) { -+ DBG(3, "restarting the request\n"); -+ musb_ep_restart(musb, request); -+ } -+ - /* select ep0 again */ - musb_ep_select(mbase, 0); - } break; diff --git a/usb.current/usb-musb-host-issue-a-memory-barrier-before-starting-dma.patch b/usb.current/usb-musb-host-issue-a-memory-barrier-before-starting-dma.patch deleted file mode 100644 index cdeb2fb176eb65..00000000000000 --- a/usb.current/usb-musb-host-issue-a-memory-barrier-before-starting-dma.patch +++ /dev/null @@ -1,51 +0,0 @@ -From balbi@ti.com Tue Sep 21 14:16:02 2010 -From: Santosh Shilimkar <santosh.shilimkar@ti.com> -To: Greg KH <greg@kroah.com> -Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>, - Maulik Mankad <x0082077@ti.com>, - Russell King <rmk+kernel@arm.linux.org.uk>, - Felipe Balbi <balbi@ti.com> -Subject: usb: musb: host: Issue a memory barrier before starting DMA -Date: Mon, 20 Sep 2010 10:32:07 +0300 -Message-Id: <1284967927-7163-8-git-send-email-balbi@ti.com> - -From: Santosh Shilimkar <santosh.shilimkar@ti.com> - -This patch fixes the issue which was observed while transfering -a large file ( > 20MB) over USB (OMAP MUSB controller acts as USB host) -to an attached USB thumb drive. - -It was found that CDB field of CBW packet was set to 0x0. This was -due to missing a barrier before DMA engine starts transfer. -This buffer is allocated using dma_alloc_coherent which gives -non-cacheble but bufferable memory and hence needed a write -memory barrier to flush the write buffer. - -More info on this thread is here: - http://www.spinics.net/lists/linux-omap/msg33987.html - -Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> -Signed-off-by: Maulik Mankad <x0082077@ti.com> -Cc: Russell King <rmk+kernel@arm.linux.org.uk> -Signed-off-by: Felipe Balbi <balbi@ti.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_host.c | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/drivers/usb/musb/musb_host.c -+++ b/drivers/usb/musb/musb_host.c -@@ -660,6 +660,12 @@ static bool musb_tx_dma_program(struct d - - qh->segsize = length; - -+ /* -+ * Ensure the data reaches to main memory before starting -+ * DMA transfer -+ */ -+ wmb(); -+ - if (!dma->channel_program(channel, pkt_size, mode, - urb->transfer_dma + offset, length)) { - dma->channel_release(channel); diff --git a/usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch b/usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch deleted file mode 100644 index 4fa12c0ba435a0..00000000000000 --- a/usb.current/usb-update-kconfig-help-text-for-config_usb_suspend.patch +++ /dev/null @@ -1,36 +0,0 @@ -From stern+4c863d94@rowland.harvard.edu Fri Sep 24 09:41:42 2010 -Date: Fri, 24 Sep 2010 11:41:46 -0400 (EDT) -From: Alan Stern <stern@rowland.harvard.edu> -To: Greg KH <greg@kroah.com> -Subject: USB: update Kconfig help text for CONFIG_USB_SUSPEND -Message-ID: <Pine.LNX.4.44L0.1009241127590.1744-100000@iolanthe.rowland.org> - -This patch (as1429) updates the Kconfig help text for -CONFIG_USB_SUSPEND. The power/level file is now deprecated; we should -tell people to use power/control instead. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/Kconfig | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/usb/core/Kconfig -+++ b/drivers/usb/core/Kconfig -@@ -91,12 +91,12 @@ config USB_DYNAMIC_MINORS - If you are unsure about this, say N here. - - config USB_SUSPEND -- bool "USB runtime power management (suspend/resume and wakeup)" -+ bool "USB runtime power management (autosuspend) and wakeup" - depends on USB && PM_RUNTIME - help - If you say Y here, you can use driver calls or the sysfs -- "power/level" file to suspend or resume individual USB -- peripherals and to enable or disable autosuspend (see -+ "power/control" file to enable or disable autosuspend for -+ individual USB peripherals (see - Documentation/usb/power-management.txt for more details). - - Also, USB "remote wakeup" signaling is supported, whereby some |
