summaryrefslogtreecommitdiffstats
path: root/patches/linux-3.6.11/0079-Updating-dwc_otg-driver-to-fix-issue-releasing-pcm-s.patch
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2013-01-06 20:43:35 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-04-06 15:02:56 +0200
commite30485e73cae77c4234ac7c3ee9c2ac9d007fe5b (patch)
tree1e5a61a33c0a25545887ec8d4eef860218aee5b5 /patches/linux-3.6.11/0079-Updating-dwc_otg-driver-to-fix-issue-releasing-pcm-s.patch
parent2a29a7c94fec016dd2e9301a783d6cae1f7bbce1 (diff)
downloadplatform-pengutronix-raspberrypi-e30485e73cae77c4234ac7c3ee9c2ac9d007fe5b.tar.gz
platform-pengutronix-raspberrypi-e30485e73cae77c4234ac7c3ee9c2ac9d007fe5b.tar.xz
kernel: update to 3.6.11 and latest patches
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/linux-3.6.11/0079-Updating-dwc_otg-driver-to-fix-issue-releasing-pcm-s.patch')
-rw-r--r--patches/linux-3.6.11/0079-Updating-dwc_otg-driver-to-fix-issue-releasing-pcm-s.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/patches/linux-3.6.11/0079-Updating-dwc_otg-driver-to-fix-issue-releasing-pcm-s.patch b/patches/linux-3.6.11/0079-Updating-dwc_otg-driver-to-fix-issue-releasing-pcm-s.patch
new file mode 100644
index 0000000..f1cc6d7
--- /dev/null
+++ b/patches/linux-3.6.11/0079-Updating-dwc_otg-driver-to-fix-issue-releasing-pcm-s.patch
@@ -0,0 +1,69 @@
+From: Bryan Kemp <bryan@kempville.com>
+Date: Sat, 7 Jul 2012 16:24:07 -0500
+Subject: [PATCH] Updating dwc_otg driver to fix issue releasing pcm stream
+ see: https://github.com/raspberrypi/firmware/issues/51
+
+---
+ drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c | 20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
+index 6a89b1e..68664e5 100644
+--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
++++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
+@@ -70,6 +70,7 @@
+ #include "dwc_otg_hcd_if.h"
+ #include "dwc_otg_dbg.h"
+ #include "dwc_otg_driver.h"
++#include "dwc_otg_hcd.h"
+
+ /**
+ * Gets the endpoint number from a _bEndpointAddress argument. The endpoint is
+@@ -267,6 +268,7 @@ extern unsigned int g_dwc_otg_interrupt_counts[10];
+ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle,
+ dwc_otg_hcd_urb_t * dwc_otg_urb, int32_t status)
+ {
++ uint64_t flags;
+ struct urb *urb = (struct urb *)urb_handle;
+
+ #ifdef DEBUG_SOF_FIX
+@@ -356,7 +358,9 @@ static int _complete(dwc_otg_hcd_t * hcd, void *urb_handle,
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
+ usb_hcd_giveback_urb(dwc_otg_hcd_to_hcd(hcd), urb);
+ #else
++ DWC_SPINLOCK_IRQSAVE(hcd->lock, &flags);
+ usb_hcd_unlink_urb_from_ep(dwc_otg_hcd_to_hcd(hcd), urb);
++ DWC_SPINUNLOCK_IRQRESTORE(hcd->lock, flags);
+ usb_hcd_giveback_urb(dwc_otg_hcd_to_hcd(hcd), urb, status);
+ #endif
+ return 0;
+@@ -767,6 +771,8 @@ static int urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
+ static int urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
+ #endif
+ {
++ int rc;
++ uint64_t flags;
+ dwc_otg_hcd_t *dwc_otg_hcd;
+ DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD URB Dequeue\n");
+
+@@ -788,8 +794,18 @@ static int urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
+ usb_hcd_giveback_urb(hcd, urb);
+ #else
+- usb_hcd_unlink_urb_from_ep(hcd, urb);
+- usb_hcd_giveback_urb(hcd, urb, status);
++ DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &flags);
++ rc = usb_hcd_check_unlink_urb(hcd, urb, status);
++ if(!rc)
++ {
++ usb_hcd_unlink_urb_from_ep(hcd, urb);
++ }
++
++ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags);
++ if (!rc)
++ {
++ usb_hcd_giveback_urb(hcd, urb, status);
++ }
+ #endif
+ if (CHK_DEBUG_LEVEL(DBG_HCDV | DBG_HCD_URB)) {
+ DWC_PRINTF("Called usb_hcd_giveback_urb()\n");