diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-04-19 15:15:48 -0700 |
---|---|---|
committer | Todd Poynor <toddpoynor@google.com> | 2012-04-19 15:20:03 -0700 |
commit | 94225ab0bef6f32108eaa410bb894caa2b4317e2 (patch) | |
tree | 3696c83cc5109c7e439c8228fe6be72a3a4a74fe /drivers/usb/core/hcd.c | |
parent | 801cb6260fb5cae3bbc513927b583447c38d9deb (diff) | |
parent | 0527fde0639955203ad48a9fd83bd6fc35e82e07 (diff) | |
download | kernel_samsung_aries-94225ab0bef6f32108eaa410bb894caa2b4317e2.zip kernel_samsung_aries-94225ab0bef6f32108eaa410bb894caa2b4317e2.tar.gz kernel_samsung_aries-94225ab0bef6f32108eaa410bb894caa2b4317e2.tar.bz2 |
Merge linux-stable 3.0.28 into android-3.0
Change-Id: Iee820738e53627f5d0447a87ceff34443aa72786
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r-- | drivers/usb/core/hcd.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index ace9f84..45e0908 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1387,11 +1387,10 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, ret = -EAGAIN; else urb->transfer_flags |= URB_DMA_MAP_SG; - if (n != urb->num_sgs) { - urb->num_sgs = n; + urb->num_mapped_sgs = n; + if (n != urb->num_sgs) urb->transfer_flags |= URB_DMA_SG_COMBINED; - } } else if (urb->sg) { struct scatterlist *sg = urb->sg; urb->transfer_dma = dma_map_page( @@ -1764,6 +1763,8 @@ int usb_hcd_alloc_bandwidth(struct usb_device *udev, struct usb_interface *iface = usb_ifnum_to_if(udev, cur_alt->desc.bInterfaceNumber); + if (!iface) + return -EINVAL; if (iface->resetting_device) { /* * The USB core just reset the device, so the xHCI host @@ -2434,8 +2435,10 @@ int usb_add_hcd(struct usb_hcd *hcd, && device_can_wakeup(&hcd->self.root_hub->dev)) dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); - /* enable irqs just before we start the controller */ - if (usb_hcd_is_primary_hcd(hcd)) { + /* enable irqs just before we start the controller, + * if the BIOS provides legacy PCI irqs. + */ + if (usb_hcd_is_primary_hcd(hcd) && irqnum) { retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); if (retval) goto err_request_irq; |