17 Dec, 2010

1 commit

  • * usb-next: (132 commits)
    USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path
    USB: uas: Ensure we only bind to a UAS interface
    USB: uas: Rename sense pipe and sense urb to status pipe and status urb
    USB: uas: Use kzalloc instead of kmalloc
    USB: uas: Fix up the Sense IU
    usb: musb: core: kill unneeded #include's
    DA8xx: assign name to MUSB IRQ resource
    usb: gadget: g_ncm added
    usb: gadget: f_ncm.c added
    usb: gadget: u_ether: prepare for NCM
    usb: pch_udc: Fix setup transfers with data out
    usb: pch_udc: Fix compile error, warnings and checkpatch warnings
    usb: add ab8500 usb transceiver driver
    USB: gadget: Implement runtime PM for MSM bus glue driver
    USB: gadget: Implement runtime PM for ci13xxx gadget
    USB: gadget: Add USB controller driver for MSM SoC
    USB: gadget: Introduce ci13xxx_udc_driver struct
    USB: gadget: Initialize ci13xxx gadget device's coherent DMA mask
    USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc
    USB: gadget: Separate out PCI bus code from ci13xxx_udc
    ...

    Greg Kroah-Hartman
     

22 Nov, 2010

1 commit

  • The Inventra DMA engine used with the MUSB controller in many
    SoCs cannot use DMA for control transfers on EP0, but can use
    DMA for all other transfers.

    The USB core maps urbs for DMA if hcd->self.uses_dma is true.
    (hcd->self.uses_dma is true for MUSB as well).

    Split the uses_dma flag into two - one that says if the
    controller needs to use PIO for control transfers, and
    another which says if the controller uses DMA (for all
    other transfers).

    Also, populate this flag for all MUSB by default.

    (Tested on OMAP3 and OMAP4 boards, with EHCI and MUSB HCDs
    simultaneously in use).

    Signed-off-by: Maulik Mankad
    Signed-off-by: Santosh Shilimkar
    Signed-off-by: Anand Gadiyar
    Cc: Oliver Neukum
    Cc: Alan Stern
    Cc: Praveena NADAHALLY
    Cc: Ajay Kumar Gupta
    Signed-off-by: Felipe Balbi

    Anand Gadiyar
     

17 Nov, 2010

2 commits

  • This patch (as1428) converts USB over to the new runtime-PM core
    autosuspend framework. One slightly awkward aspect of the conversion
    is that USB devices will now have two suspend-delay attributes: the
    old power/autosuspend file and the new power/autosuspend_delay_ms
    file. One expresses the delay time in seconds and the other in
    milliseconds, but otherwise they do the same thing. The old attribute
    can be deprecated and then removed eventually.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Since the runtime-PM core already defines a .last_busy field in
    device.power, this patch uses it to replace the .last_busy field
    defined in usb_device and uses pm_runtime_mark_last_busy to implement
    usb_mark_last_busy.

    Signed-off-by: Ming Lei
    Reviewed-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     

09 Nov, 2010

1 commit

  • Fix struct field name, prevent kernel-doc warnings.

    Warning(include/linux/usb.h:865): No description found for parameter 'unlocked_ioctl'
    Warning(include/linux/usb.h:865): Excess struct/union/enum/typedef member 'ioctl' description in 'usb_driver'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

11 Aug, 2010

2 commits


21 May, 2010

13 commits

  • Now that all callers are converted over, remove the compatibility
    functions and all is good.

    Cc: Daniel Mack
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Minor formatting changes to clean up the file.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Now on one uses this function and it seems useless,
    so remove usb_find_device.

    [tom@tom linux-2.6-next]$ grep -r -n -I usb_find_device ./
    drivers/media/dvb/dvb-usb/dvb-usb-init.c:160:static struct
    dvb_usb_device_description * dvb_usb_find_device(struct usb_device
    *udev,struct dvb_usb_device_properties *props, int *cold)

    drivers/media/dvb/dvb-usb/dvb-usb-init.c:230: if ((desc =
    dvb_usb_find_device(udev,props,&cold)) == NULL) {

    drivers/usb/core/usb.c:630: * usb_find_device - find a specific usb device in the system
    drivers/usb/core/usb.c:642:struct usb_device *usb_find_device(u16 vendor_id, u16 product_id)

    Signed-off-by: Ming Lei
    Signed-off-by: Greg Kroah-Hartman

    Ming Lei
     
  • This patch (as1377) simplifies the code in usb_sg_init(), without
    changing its functionality. It also removes a couple of unused fields
    from the usb_sg_request structure.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Change the type of the URB's 'sg' pointer from a usb_sg_request to
    a scatterlist. This allows drivers to submit scatter-gather lists
    without using the usb_sg_wait() interface. It has the added benefit
    of removing the typecasts that were added as part of patch as1368 (and
    slightly decreasing the number of pointer dereferences).

    Signed-off-by: Matthew Wilcox
    Reviewed-by: Alan Stern
    Tested-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Matthew Wilcox
     
  • The stronger type-checking would have prevented a bug I had.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Greg Kroah-Hartman

    Matthew Wilcox
     
  • Converting a pipe number to a struct usb_host_endpoint pointer is a little
    messy. Introduce a new convenience function to hide the mess.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Greg Kroah-Hartman

    Matthew Wilcox
     
  • Now that URB_NO_SETUP_DMA_MAP is no longer in use, this patch (as1376)
    removes all references to it.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1375) eliminates the usb_host_ss_ep_comp structure used
    for storing a dynamically-allocated copy of the SuperSpeed endpoint
    companion descriptor. The SuperSpeed descriptor is placed directly in
    the usb_host_endpoint structure, alongside the standard endpoint
    descriptor.

    Signed-off-by: Alan Stern
    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Bulk endpoint streams were added in the USB 3.0 specification. Streams
    allow a device driver to overload a bulk endpoint so that multiple
    transfers can be queued at once.

    The device then decides which transfer it wants to work on first, and can
    queue part of a transfer before it switches to a new stream. All this
    switching is invisible to the device driver, which just gets a completion
    for the URB. Drivers that use streams must be able to handle URBs
    completing in a different order than they were submitted to the endpoint.

    This requires adding new API to set up xHCI data structures to support
    multiple queues ("stream rings") per endpoint. Drivers will allocate a
    number of stream IDs before enqueueing URBs to the bulk endpoints of the
    device, and free the stream IDs in their disconnect function. See
    Documentation/usb/bulk-streams.txt for details.

    The new mass storage device class, USB Attached SCSI Protocol (UASP), uses
    these streams API.

    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     
  • Bulk endpoint streams were added in the USB 3.0 specification. Streams
    allow a device driver to overload a bulk endpoint so that multiple
    transfers can be queued at once.

    Add a new field, stream_id, to struct urb so that USB 3.0 drivers can
    specify which stream they want the URB to be queued to.

    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     
  • This patch (as1366) replaces the private routines
    usb_enable_autosuspend() and usb_disable_autosuspend() with calls to
    the standard pm_runtime_allow() and pm_runtime_forbid() functions in
    the runtime PM framework. They do the same thing.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1368) fixes a rather obscure bug in usbmon: When tracing
    URBs sent by the scatter-gather library, it accesses the data buffers
    while they are still mapped for DMA.

    The solution is to move the mapping and unmapping out of the s-g
    library and into the usual place in hcd.c. This requires the addition
    of new URB flag bits to describe the kind of mapping needed, since we
    have to call dma_map_sg() if the HCD supports native scatter-gather
    operation and dma_map_page() if it doesn't. The nice thing about
    having the new flags is that they simplify the testing for unmapping.

    The patch removes the only caller of usb_buffer_[un]map_sg(), so those
    functions are #if'ed out. A later patch will remove them entirely.

    As a result of this change, urb->sg will be set in situations where
    it wasn't set previously. Hence the xhci and whci drivers are
    adjusted to test urb->num_sgs instead, which retains its original
    meaning and is nonzero only when the HCD has to handle a scatterlist.

    Finally, even when a submission error occurs we don't want to hand
    URBs to usbmon before they are unmapped. The submission path is
    rearranged so that map_urb_for_dma() is called only for non-root-hub
    URBs and unmap_urb_for_dma() is called immediately after a submission
    error. This simplifies the error handling.

    Signed-off-by: Alan Stern
    CC:
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

01 May, 2010

1 commit

  • For more clearance what the functions actually do,

    usb_buffer_alloc() is renamed to usb_alloc_coherent()
    usb_buffer_free() is renamed to usb_free_coherent()

    They should only be used in code which really needs DMA coherency.

    [added compatibility macros so we can convert things easier - gregkh]

    Signed-off-by: Daniel Mack
    Cc: Alan Stern
    Cc: Pedro Ribeiro
    Signed-off-by: Greg Kroah-Hartman

    Daniel Mack
     

19 Mar, 2010

1 commit

  • USB 3 and Wireless USB specify a logarithmic encoding of the endpoint
    interval that matches the USB 2 specification. usb_fill_int_urb() didn't
    know that and was filling in the interval as if it was USB 1.1. Fix
    usb_fill_int_urb() for SuperSpeed devices, but leave the wireless case
    alone, because David Vrabel wants to keep the old encoding.

    Update the struct urb kernel doc to note that SuperSpeed URBs must have
    urb->interval specified in microframes.

    Add a missing break statement in the usb_submit_urb() interrupt URB
    checking, since wireless USB and SuperSpeed USB encode urb->interval
    differently. This allows xHCI roothubs to actually register with khubd.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Matthew Wilcox
     

08 Mar, 2010

1 commit

  • In the future, we are going to be changing the lock type for struct
    device (once we get the lockdep infrastructure properly worked out) To
    make that changeover easier, and to possibly burry the lock in a
    different part of struct device, let's create some functions to lock and
    unlock a device so that no out-of-core code needs to be changed in the
    future.

    This patch creates the device_lock/unlock/trylock() functions, and
    converts all in-tree users to them.

    Cc: Thomas Gleixner
    Cc: Jean Delvare
    Cc: Dave Young
    Cc: Ming Lei
    Cc: Jiri Kosina
    Cc: Phil Carmody
    Cc: Arjan van de Ven
    Cc: Cornelia Huck
    Cc: Rafael J. Wysocki
    Cc: Pavel Machek
    Cc: Len Brown
    Cc: Magnus Damm
    Cc: Alan Stern
    Cc: Randy Dunlap
    Cc: Stefan Richter
    Cc: David Brownell
    Cc: Vegard Nossum
    Cc: Jesse Barnes
    Cc: Alex Chiang
    Cc: Kenji Kaneshige
    Cc: Andrew Morton
    Cc: Andrew Patterson
    Cc: Yu Zhao
    Cc: Dominik Brodowski
    Cc: Samuel Ortiz
    Cc: Wolfram Sang
    Cc: CHENG Renquan
    Cc: Oliver Neukum
    Cc: Frans Pop
    Cc: David Vrabel
    Cc: Kay Sievers
    Cc: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

03 Mar, 2010

3 commits

  • Add format/argument validation for #ifndef DEBUG dbg macro
    Neaten dbg macro definitions

    Signed-off-by: Joe Perches
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     
  • This patch (as1329) converts the USB stack over to the PM core's
    runtime PM framework. This involves numerous changes throughout
    usbcore, especially to hub.c and driver.c. Perhaps the most notable
    change is that CONFIG_USB_SUSPEND now depends on CONFIG_PM_RUNTIME
    instead of CONFIG_PM.

    Several fields in the usb_device and usb_interface structures are no
    longer needed. Some code which used to depend on CONFIG_USB_PM now
    depends on CONFIG_USB_SUSPEND (requiring some rearrangement of header
    files).

    The only visible change in behavior should be that following a system
    sleep (resume from RAM or resume from hibernation), autosuspended USB
    devices will be resumed just like everything else. They won't remain
    suspended. But if they aren't in use then they will naturally
    autosuspend again in a few seconds.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1326) adds usb_enable_autosuspend() and
    usb_disable_autosuspend() routines for use by drivers. If a driver
    knows that its device can handle suspends and resumes correctly, it
    can enable autosuspend all by itself. This is equivalent to the user
    writing "auto" to the device's power/level attribute.

    The implementation differs slightly from what it used to be. Now
    autosuspend is disabled simply by doing usb_autoresume_device() (to
    increment the usage counter) and enabled by doing
    usb_autosuspend_device() (to decrement the usage counter).

    The set_level() attribute method is updated to use the new routines,
    and the USB Power-Management documentation is updated.

    The patch adds a usb_enable_autosuspend() call to the hub driver's
    probe routine, allowing the special-case code for hubs in quirks.c to
    be removed.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

27 Feb, 2010

1 commit

  • This patch (as1331) adds non-tree ordering constraints needed for
    proper resume of PCI USB host controllers from hibernation. The main
    issue is that non-high-speed devices must not be resumed before the
    high-speed root hub, because it is the ehci_bus_resume() routine which
    takes care of handing the device connection over to the companion
    controller. If the device resume is attempted before the handover
    then the device won't be found and it will be treated as though it had
    disconnected.

    The patch adds a new field to the usb_bus structure; for each
    full/low-speed bus this field will contain a pointer to the companion
    high-speed bus (if one exists). It is used during normal device
    resume; if the hs_companion pointer isn't NULL then we wait for the
    root-hub device on the hs_companion bus.

    A secondary issue is that an EHCI controlller shouldn't be resumed
    before any of its companions. On some machines I have observed
    handovers failing if the companion controller is reinitialized after
    the handover. Thus, the EHCI resume routine must wait for the
    companion controllers to be resumed.

    The patch also fixes a small bug in usb_hcd_pci_probe(); an error path
    jumps to the wrong label, causing a memory leak.

    [rjw: Fixed compilation for CONFIG_PM_SLEEP unset.]

    Signed-off-by: Alan Stern
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Rafael J. Wysocki

    Alan Stern
     

21 Jan, 2010

1 commit

  • Borislav Petkov reports issues with duplicate sysfs endpoint files after a
    resume from a hibernate. It turns out that the code to support alternate
    settings under xHCI has issues when a device with a non-default alternate
    setting is reset during the hibernate:

    [ 427.681810] Restarting tasks ...
    [ 427.681995] hub 1-0:1.0: state 7 ports 6 chg 0004 evt 0000
    [ 427.682019] usb usb3: usb resume
    [ 427.682030] ohci_hcd 0000:00:12.0: wakeup root hub
    [ 427.682191] hub 1-0:1.0: port 2, status 0501, change 0000, 480 Mb/s
    [ 427.682205] usb 1-2: usb wakeup-resume
    [ 427.682226] usb 1-2: finish reset-resume
    [ 427.682886] done.
    [ 427.734658] ehci_hcd 0000:00:12.2: port 2 high speed
    [ 427.734663] ehci_hcd 0000:00:12.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
    [ 427.746682] hub 3-0:1.0: hub_reset_resume
    [ 427.746693] hub 3-0:1.0: trying to enable port power on non-switchable hub
    [ 427.786715] usb 1-2: reset high speed USB device using ehci_hcd and address 2
    [ 427.839653] ehci_hcd 0000:00:12.2: port 2 high speed
    [ 427.839666] ehci_hcd 0000:00:12.2: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
    [ 427.847717] ohci_hcd 0000:00:12.0: GetStatus roothub.portstatus [1] = 0x00010100 CSC PPS
    [ 427.915497] hub 1-2:1.0: remove_intf_ep_devs: if: ffff88022f9e8800 ->ep_devs_created: 1
    [ 427.915774] hub 1-2:1.0: remove_intf_ep_devs: bNumEndpoints: 1
    [ 427.915934] hub 1-2:1.0: if: ffff88022f9e8800: endpoint devs removed.
    [ 427.916158] hub 1-2:1.0: create_intf_ep_devs: if: ffff88022f9e8800 ->ep_devs_created: 0, ->unregistering: 0
    [ 427.916434] hub 1-2:1.0: create_intf_ep_devs: bNumEndpoints: 1
    [ 427.916609] ep_81: create, parent hub
    [ 427.916632] ------------[ cut here ]------------
    [ 427.916644] WARNING: at fs/sysfs/dir.c:477 sysfs_add_one+0x82/0x96()
    [ 427.916649] Hardware name: System Product Name
    [ 427.916653] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2:1.0/ep_81'
    [ 427.916658] Modules linked in: binfmt_misc kvm_amd kvm powernow_k8 cpufreq_ondemand cpufreq_powersave cpufreq_userspace freq_table cpufreq_conservative ipv6 vfat fat
    +8250_pnp 8250 pcspkr ohci_hcd serial_core k10temp edac_core
    [ 427.916694] Pid: 278, comm: khubd Not tainted 2.6.33-rc2-00187-g08d869a-dirty #13
    [ 427.916699] Call Trace:

    The problem is caused by a mismatch between the USB core's view of the
    device state and the USB device and xHCI host's view of the device state.

    After the device reset and re-configuration, the device and the xHCI host
    think they are using alternate setting 0 of all interfaces. However, the
    USB core keeps track of the old state, which may include non-zero
    alternate settings. It uses intf->cur_altsetting to keep the endpoint
    sysfs files for the old state across the reset.

    The bandwidth allocation functions need to know what the xHCI host thinks
    the current alternate settings are, so original patch set
    intf->cur_altsetting to the alternate setting 0. This caused duplicate
    endpoint files to be created.

    The solution is to not set intf->cur_altsetting before calling
    usb_set_interface() in usb_reset_and_verify_device(). Instead, we add a
    new flag to struct usb_interface to tell usb_hcd_alloc_bandwidth() to use
    alternate setting 0 as the currently installed alternate setting.

    Signed-off-by: Sarah Sharp
    Tested-by: Borislav Petkov
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     

12 Dec, 2009

4 commits

  • Refactor out the code to find alternate interface settings into
    usb_find_alt_setting(). Print a debugging message and return null if the
    alt setting is not found.

    While we're at it, correct a bug in the refactored code. The interfaces
    in the configuration's interface cache are not necessarily in numerical
    order, so we can't just use the interface number as an array index. Loop
    through the interface caches, looking for the correct interface.

    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     
  • This patch (as1303) revises the USB Power Management infrastructure to
    make it compatible with the new driver-model Runtime PM framework:

    Drivers are no longer allowed to access intf->pm_usage_cnt
    directly; the PM framework manages its own usage counters.

    usb_autopm_set_interface() is eliminated, because it directly
    sets intf->pm_usage_cnt.

    usb_autopm_enable() and usb_autopm_disable() are eliminated,
    because they call usb_autopm_set_interface().

    usb_autopm_get_interface_no_resume() and
    usb_autopm_put_interface_no_suspend() are added. They
    correspond to pm_runtime_get_noresume() and
    pm_runtime_put_noidle() in the PM framework.

    The power/level attribute no longer accepts "suspend", only
    "on" and "auto". The PM framework doesn't allow devices to be
    forced into a suspended mode.

    The hub driver contains the only code that violates the new
    guidelines. It is updated to use the new interface routines instead.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch (as1302) removes the auto_pm flag from struct usb_device.
    The flag's only purpose was to distinguish between autosuspends and
    external suspends, but that information is now available in the
    pm_message_t argument passed to suspend methods.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • The WHCI HCD will also support urbs with scatter-gather lists. Add a
    usb_bus field to indicated how many sg list elements are supported by
    the HCD. Use this to decide whether to pass the scatter-list to the HCD
    or not.

    Make the usb-storage driver use this new field.

    Signed-off-by: David Vrabel
    Cc: Alan Stern
    Cc: Sarah Sharp
    Cc: Matthew Dharm
    Signed-off-by: Greg Kroah-Hartman

    David Vrabel
     

23 Sep, 2009

2 commits

  • This patch (as1260) changes the pm_usage_cnt field in struct
    usb_interface from an int to an atomic_t. This is so that drivers can
    invoke the usb_autopm_get_interface_async() and
    usb_autopm_put_interface_async() routines without locking and without
    fear of corrupting the pm_usage_cnt value.

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • This patch fixes crashes when usbmon attempts to access GART aperture.
    The old code attempted to take a bus address and convert it into a
    virtual address, which clearly was impossible on systems with actual
    IOMMUs. Let us not persist in this foolishness, and use transfer_buffer
    in all cases instead.

    I think downsides are negligible. The ones I see are:
    - A driver may pass an address of one buffer down as transfer_buffer,
    and entirely different entity mapped for DMA, resulting in misleading
    output of usbmon. Note, however, that PIO based controllers would
    do transfer the same data that usbmon sees here.
    - Out of tree drivers may crash usbmon if they store garbage in
    transfer_buffer. I inspected the in-tree drivers, and clarified
    the documentation in comments.
    - Drivers that use get_user_pages will not be possible to monitor.
    I only found one driver with this problem (drivers/staging/rspiusb).
    - Same happens with with usb_storage transferring from highmem, but
    it works fine on 64-bit systems, so I think it's not a concern.
    At least we don't crash anymore.

    Why didn't we do this in 2.6.10? That's because back in those days
    it was popular not to fill in transfer_buffer, so almost all
    traffic would be invisible (e.g. all of HID was like that).
    But now, the tree is almost 100% PIO friendly, so we can do the
    right thing at last.

    Signed-off-by: Pete Zaitcev
    Signed-off-by: Greg Kroah-Hartman

    Pete Zaitcev
     

21 Sep, 2009

1 commit


20 Sep, 2009

1 commit

  • This allows subsytems to provide devtmpfs with non-default permissions
    for the device node. Instead of the default mode of 0600, null, zero,
    random, urandom, full, tty, ptmx now have a mode of 0666, which allows
    non-privileged processes to access standard device nodes in case no
    other userspace process applies the expected permissions.

    This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain.

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

13 Jul, 2009

1 commit

  • Fix usb.h kernel-doc warnings:

    Warning(include/linux/usb.h:918): Excess struct/union/enum/typedef member 'nodename' description in 'usb_device_driver'
    Warning(include/linux/usb.h:939): No description found for parameter 'nodename'
    Warning(include/linux/usb.h:1219): No description found for parameter 'sg'
    Warning(include/linux/usb.h:1219): No description found for parameter 'num_sgs'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     

17 Jun, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (143 commits)
    USB: xhci depends on PCI.
    USB: xhci: Add Makefile, MAINTAINERS, and Kconfig entries.
    USB: xhci: Respect critical sections.
    USB: xHCI: Fix interrupt moderation.
    USB: xhci: Remove packed attribute from structures.
    usb; xhci: Fix TRB offset calculations.
    USB: xhci: replace if-elseif-else with switch-case
    USB: xhci: Make xhci-mem.c include linux/dmapool.h
    USB: xhci: drop spinlock in xhci_urb_enqueue() error path.
    USB: Change names of SuperSpeed ep companion descriptor structs.
    USB: xhci: Avoid compiler reordering in Link TRB giveback.
    USB: xhci: Clean up xhci_irq() function.
    USB: xhci: Avoid global namespace pollution.
    USB: xhci: Fix Link TRB handoff bit twiddling.
    USB: xhci: Fix register write order.
    USB: xhci: fix some compiler warnings in xhci.h
    USB: xhci: fix lots of compiler warnings.
    USB: xhci: use xhci_handle_event instead of handle_event
    USB: xhci: URB cancellation support.
    USB: xhci: Scatter gather list support for bulk transfers.
    ...

    Linus Torvalds
     

16 Jun, 2009

2 commits

  • Differentiate between SuperSpeed endpoint companion descriptor and the
    wireless USB endpoint companion descriptor. Make all structure names for
    this descriptor have "ss" (SuperSpeed) in them. David Vrabel asked for
    this change in http://marc.info/?l=linux-usb&m=124091465109367&w=2

    Reported-by: David Vrabel
    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp
     
  • This is the original patch I created before David Vrabel posted a better
    patch (http://marc.info/?l=linux-usb&m=123377477209109&w=2) that does
    basically the same thing. This patch will get replaced with his
    (modified) patch later.

    Allow USB device drivers that use usb_sg_init() and usb_sg_wait() to push
    bulk endpoint scatter gather lists down to the host controller drivers.
    This allows host controller drivers to more efficiently enqueue these
    transfers, and allows the xHCI host controller to better take advantage of
    USB 3.0 "bursts" for bulk endpoints.

    This patch currently only enables scatter gather lists for bulk endpoints.
    Other endpoint types that use the usb_sg_* functions will not have their
    scatter gather lists pushed down to the host controller. For periodic
    endpoints, we want each scatterlist entry to be a separate transfer.
    Eventually, HCDs could parse these scatter-gather lists for periodic
    endpoints also. For now, we use the old code and call usb_submit_urb()
    for each scatterlist entry.

    The caller of usb_sg_init() can request that all bytes in the scatter
    gather list be transferred by passing in a length of zero. Handle that
    request for a bulk endpoint under xHCI by walking the scatter gather list
    and calculating the length. We could let the HCD handle a zero length in
    this case, but I'm not sure if the core layers in between will get
    confused by this.

    Signed-off-by: Sarah Sharp
    Signed-off-by: Greg Kroah-Hartman

    Sarah Sharp