diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:25:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-23 12:25:16 -0400 |
commit | be90a49ca22a95f184d9f32d35b5247b44032849 (patch) | |
tree | d3c2edc18c003c384366f57901616ac29c80bc27 /drivers/usb/core/usb.c | |
parent | 1f0918d03ff4b5c94540c71ce889672abdbc2f4a (diff) | |
parent | a87371b477774b290c27bc5cb7f4ccc5379574a9 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (142 commits)
USB: Fix sysfs paths in documentation
USB: skeleton: fix coding style issues.
USB: O_NONBLOCK in read path of skeleton
USB: make usb-skeleton honor O_NONBLOCK in write path
USB: skel_read really sucks royally
USB: Add hub descriptor update hook for xHCI
USB: xhci: Support USB hubs.
USB: xhci: Set multi-TT field for LS/FS devices under hubs.
USB: xhci: Set route string for all devices.
USB: xhci: Fix command wait list handling.
USB: xhci: Change how xHCI commands are handled.
USB: xhci: Refactor input device context setup.
USB: xhci: Endpoint representation refactoring.
USB: gadget: ether needs to select CRC32
USB: fix USBTMC get_capabilities success handling
USB: fix missing error check in probing
USB: usbfs: add USBDEVFS_URB_BULK_CONTINUATION flag
USB: support for autosuspend in sierra while online
USB: ehci-dbgp,ehci: Allow dbpg to work with suspend/resume
USB: ehci-dbgp,documentation: Documentation updates for ehci-dbgp
...
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 43ee943d757a..b1b85abb9a2d 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -413,8 +413,13 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, | |||
413 | } else { | 413 | } else { |
414 | snprintf(dev->devpath, sizeof dev->devpath, | 414 | snprintf(dev->devpath, sizeof dev->devpath, |
415 | "%s.%d", parent->devpath, port1); | 415 | "%s.%d", parent->devpath, port1); |
416 | dev->route = parent->route + | 416 | /* Route string assumes hubs have less than 16 ports */ |
417 | (port1 << ((parent->level - 1)*4)); | 417 | if (port1 < 15) |
418 | dev->route = parent->route + | ||
419 | (port1 << ((parent->level - 1)*4)); | ||
420 | else | ||
421 | dev->route = parent->route + | ||
422 | (15 << ((parent->level - 1)*4)); | ||
418 | } | 423 | } |
419 | 424 | ||
420 | dev->dev.parent = &parent->dev; | 425 | dev->dev.parent = &parent->dev; |
@@ -914,11 +919,11 @@ int usb_buffer_map_sg(const struct usb_device *dev, int is_in, | |||
914 | || !(bus = dev->bus) | 919 | || !(bus = dev->bus) |
915 | || !(controller = bus->controller) | 920 | || !(controller = bus->controller) |
916 | || !controller->dma_mask) | 921 | || !controller->dma_mask) |
917 | return -1; | 922 | return -EINVAL; |
918 | 923 | ||
919 | /* FIXME generic api broken like pci, can't report errors */ | 924 | /* FIXME generic api broken like pci, can't report errors */ |
920 | return dma_map_sg(controller, sg, nents, | 925 | return dma_map_sg(controller, sg, nents, |
921 | is_in ? DMA_FROM_DEVICE : DMA_TO_DEVICE); | 926 | is_in ? DMA_FROM_DEVICE : DMA_TO_DEVICE) ? : -ENOMEM; |
922 | } | 927 | } |
923 | EXPORT_SYMBOL_GPL(usb_buffer_map_sg); | 928 | EXPORT_SYMBOL_GPL(usb_buffer_map_sg); |
924 | 929 | ||