Skip to content

Commit

Permalink
rpi_180_105858e4506975bfb3e293f2e815d14eae40958c
Browse files Browse the repository at this point in the history
commit 105858e4506975bfb3e293f2e815d14eae40958c
Author: Bryan Kemp <[email protected]>
Date:   Sat Jul 7 16:24:07 2012 -0500

    Updating dwc_otg driver to fix issue releasing pcm stream see: raspberrypi/firmware#51


Gbp-Pq: Topic rpi
Gbp-Pq: Name rpi_180_105858e4506975bfb3e293f2e815d14eae40958c.patch
  • Loading branch information
Debian Kernel Team authored and raspbian-autopush committed Jul 26, 2013
1 parent 6d68b2a commit 544f43a
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");

Expand All @@ -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");
Expand Down

0 comments on commit 544f43a

Please sign in to comment.