diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-05 11:35:40 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-05 11:35:40 -0700 |
| commit | a6375a8286f9c53fd8abf6e78e7da76a2cb1dad6 (patch) | |
| tree | 16e7d5cceb87f4ad6e562b849898f3e69509bde5 /usb | |
| parent | 18de23399a851aae665fdd7911ba9f16c38ff1d1 (diff) | |
| download | patches-a6375a8286f9c53fd8abf6e78e7da76a2cb1dad6.tar.gz | |
minor fixes
Diffstat (limited to 'usb')
| -rw-r--r-- | usb/usb-atmel_usba_udc-change-way-of-specifying-bias-function.patch | 55 | ||||
| -rw-r--r-- | usb/usb-usbtest-fix-endless-loop-in-unlink-tests.patch | 70 |
2 files changed, 125 insertions, 0 deletions
diff --git a/usb/usb-atmel_usba_udc-change-way-of-specifying-bias-function.patch b/usb/usb-atmel_usba_udc-change-way-of-specifying-bias-function.patch new file mode 100644 index 00000000000000..9bdab993a6b2b7 --- /dev/null +++ b/usb/usb-atmel_usba_udc-change-way-of-specifying-bias-function.patch @@ -0,0 +1,55 @@ +From nicolas.ferre@atmel.com Fri Jun 5 11:16:16 2009 +From: Nicolas Ferre <nicolas.ferre@atmel.com> +Date: Fri, 5 Jun 2009 17:46:16 +0200 +Subject: USB: atmel_usba_udc: change way of specifying bias function +Cc: david-b@pacbell.net, haavard.skinnemoen@atmel.com, patrice.vilchez@atmel.com, Nicolas Ferre <nicolas.ferre@atmel.com> +Message-ID: <1244216776-22760-1-git-send-email-nicolas.ferre@atmel.com> + +From: Nicolas Ferre <nicolas.ferre@atmel.com> + +The toggle_bias() function was specified differently for avr32 and at91 +architectures. Now, new at91 have the same behavior as avr32. +Consequently, we change to a particular chip function definition: only for +at91sam9rl. + +Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> +Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> +Acked-by: David Brownell <dbrownell@users.sourceforge.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/gadget/atmel_usba_udc.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/drivers/usb/gadget/atmel_usba_udc.c ++++ b/drivers/usb/gadget/atmel_usba_udc.c +@@ -326,13 +326,7 @@ static int vbus_is_present(struct usba_u + return 1; + } + +-#if defined(CONFIG_AVR32) +- +-static void toggle_bias(int is_on) +-{ +-} +- +-#elif defined(CONFIG_ARCH_AT91) ++#if defined(CONFIG_ARCH_AT91SAM9RL) + + #include <mach/at91_pmc.h> + +@@ -346,7 +340,13 @@ static void toggle_bias(int is_on) + at91_sys_write(AT91_CKGR_UCKR, uckr & ~(AT91_PMC_BIASEN)); + } + +-#endif /* CONFIG_ARCH_AT91 */ ++#else ++ ++static void toggle_bias(int is_on) ++{ ++} ++ ++#endif /* CONFIG_ARCH_AT91SAM9RL */ + + static void next_fifo_transaction(struct usba_ep *ep, struct usba_request *req) + { diff --git a/usb/usb-usbtest-fix-endless-loop-in-unlink-tests.patch b/usb/usb-usbtest-fix-endless-loop-in-unlink-tests.patch new file mode 100644 index 00000000000000..a7c5193e279da9 --- /dev/null +++ b/usb/usb-usbtest-fix-endless-loop-in-unlink-tests.patch @@ -0,0 +1,70 @@ +From mfuzzey@gmail.com Fri Jun 5 11:17:20 2009 +From: Martin Fuzzey <mfuzzey@gmail.com> +Date: Thu, 04 Jun 2009 23:20:38 +0200 +Subject: USB: usbtest fix endless loop in unlink tests. +Message-ID: <20090604212038.19162.36564.stgit@srv002.fuzzey.net> + + +In tests 11 and 12 if the URB completes with an error status (eg babble) +the asynchrous unlink entered an endless loop trying to unlink +a non resubmitted URB. + +Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com> +Acked-by: David Brownell <david-b@pacbell.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/misc/usbtest.c | 39 +++++++++++++++++++++++++-------------- + 1 file changed, 25 insertions(+), 14 deletions(-) + +--- a/drivers/usb/misc/usbtest.c ++++ b/drivers/usb/misc/usbtest.c +@@ -1072,23 +1072,34 @@ static int unlink1 (struct usbtest_dev * + */ + msleep (jiffies % (2 * INTERRUPT_RATE)); + if (async) { +-retry: +- retval = usb_unlink_urb (urb); +- if (retval == -EBUSY || retval == -EIDRM) { +- /* we can't unlink urbs while they're completing. +- * or if they've completed, and we haven't resubmitted. +- * "normal" drivers would prevent resubmission, but +- * since we're testing unlink paths, we can't. +- */ +- ERROR(dev, "unlink retry\n"); +- goto retry; ++ while (!completion_done(&completion)) { ++ retval = usb_unlink_urb(urb); ++ ++ switch (retval) { ++ case -EBUSY: ++ case -EIDRM: ++ /* we can't unlink urbs while they're completing ++ * or if they've completed, and we haven't ++ * resubmitted. "normal" drivers would prevent ++ * resubmission, but since we're testing unlink ++ * paths, we can't. ++ */ ++ ERROR(dev, "unlink retry\n"); ++ continue; ++ case 0: ++ case -EINPROGRESS: ++ break; ++ ++ default: ++ dev_err(&dev->intf->dev, ++ "unlink fail %d\n", retval); ++ return retval; ++ } ++ ++ break; + } + } else + usb_kill_urb (urb); +- if (!(retval == 0 || retval == -EINPROGRESS)) { +- dev_err(&dev->intf->dev, "unlink fail %d\n", retval); +- return retval; +- } + + wait_for_completion (&completion); + retval = urb->status; |
