19 Aug, 2013

1 commit


16 Aug, 2013

4 commits


13 Aug, 2013

3 commits

  • This patch fixes a kernel panic that can occur when disconnecting a
    wireless USB->serial device. When the serial device disconnects, the
    device cleanup procedure ends up calling usb_hcd_disable_endpoint on the
    serial device's endpoints. The wusbcore uses the ABORT_RPIPE command to
    abort all transfers on the given endpoint but it does not properly give
    back the URBs when the transfer results return from the HWA. This patch
    prevents the transfer result processing code from bailing out when it sees
    a WA_XFER_STATUS_ABORTED result code so that these urbs are flushed
    properly by usb_hcd_disable_endpoint. It also updates wa_urb_dequeue to
    handle the case where the endpoint has already been cleaned up when
    usb_kill_urb is called which is where the panic originally occurred.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • wa_urb_enqueue_run locks and unlocks its list lock as it traverses the
    list of queued transfers. This was done to prevent deadlocking due to
    acquiring locks in reverse order in different places. The problem is that
    releasing the lock during the list traversal could allow the dequeue
    routine to corrupt the list while it is being iterated over. This patch
    moves all list entries to a temp list while holding the list lock, then
    traverses the temp list with no lock held.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • The hub_status_data function on the wireless USB root hub controller
    (wusbhc_rh_status_data) always returns a positive value even if no ports
    have changed. This patch updates wusbhc_rh_status_data to only return a
    positive value if the root hub status needs to be queried. The current
    implementation can also leave the upper bits of the port bitmap
    uninitialized if wusbhc->ports_max is not one less than an even multiple
    of 8. This patch fixes that as well by initializing the buffer to 0.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     

25 Jun, 2013

3 commits

  • This patch fixes a race condition that caused the HWA_HC interface probe
    function to occasionally fail. The HWA_HC would attempt to register
    itself with the HWA_RC by searching for a uwb_rc class device with the
    same parent device ptr. If the probe function for the HWA_RC interface
    had yet to run, the uwb_rc class device would not have been created
    causing the look up to fail and the HWA_HC probe function to return an
    error causing the device to be unusable.

    The fix is for the HWA to delay registering with the HWA_RC until
    receiving the command from userspace to start the wireless channel. It
    is the responsibility of userspace to ensure that the uwb_rc class
    device has been created before starting the HWA channel.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • This patch adds a sysfs attribute for the wireless host controller
    transaction retry count. It also changes the default value from 15
    retries to infinite retries because the driver currently does not handle
    retry errors gracefully.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • This patch adds a sysfs attribute for the wireless USB host controller
    device notification transmit slot(DNTS) count and interval. It also
    changes the defaults from 16 slots in every MMC to a more reasonable 4
    slots every 2ms.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     

18 Jun, 2013

1 commit

  • This patch adds support for scatter gather DMA to the wire adapter and
    updates the HWA to advertise support for SG transfers. This allows the
    block layer to submit transfer requests to the HWA HC without first
    breaking them up into PAGE_SIZE requests.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     

07 Jun, 2013

4 commits

  • No action is needed for the HWA_NOTIF_BPST_ADJ event. Ignore it instead
    of printing a warning to the log since these events can happen dozens of
    times per second.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • This patch adds the HWA specific members to struct usb_rpipe_descriptor
    and sets them correctly based on the wireless endpoint compananion
    descriptor.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • Suspend and resume are not currently supported on the wireless root hub.
    Remove the suspend and resume op functions in the host controller driver
    to avoid constant error messages in the system log.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     
  • This patch reduces the keepalive threshold of WUSB host controllers from
    timeout/2 to timeout/3. The keepalive timer fires every timeout/2 ms, but
    due to rounding errors and jitter, the host may decide not to send a
    keepalive at timeout/2. By the time the next timer fires, a full timeout
    period may have expired causing the device to be disconnected without ever
    having been sent a keepalive. Changing the keepalive threshold to
    timeout/3 ensures that at least one keepalive will be sent before a device
    is disconnected. The patch also updates the code to use msecs_to_jiffies
    consistently.

    Signed-off-by: Thomas Pugliese
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pugliese
     

10 Apr, 2013

1 commit

  • This patch removes the depends on USB from all config symbols in
    drivers/usb/host/Kconfig and replace that with an if USB / endif block
    as suggested by Alan Stern. Some source ... Kconfig lines have been
    shuffled around to permit a better regroupment of the Kconfig files
    depending on "config USB" item. No functionnal change is introduced.

    Acked-by: Alan Stern
    Signed-off-by: Florian Fainelli
    Signed-off-by: Greg Kroah-Hartman

    Florian Fainelli
     

07 Feb, 2013

1 commit


23 Oct, 2012

1 commit

  • The "wusb_cap_descr_default" is never used. GCC doesn't complain about
    it because we have that line ".bLength = sizeof(wusb_cap_descr_default)"
    inside the definition itself. Clang complains though.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

18 Sep, 2012

1 commit


16 Aug, 2012

1 commit

  • Convert a 0 error return code to a negative one, as returned elsewhere in the
    function.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    identifier ret;
    expression e,e1,e2,e3,e4,x;
    @@

    (
    if (\(ret != 0\|ret < 0\) || ...) { ... return ...; }
    |
    ret = 0
    )
    ... when != ret = e1
    *x = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\|ioremap\|ioremap_nocache\|devm_ioremap\|devm_ioremap_nocache\)(...);
    ... when != x = e2
    when != ret = e3
    *if (x == NULL || ...)
    {
    ... when != ret = e4
    * return ret;
    }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Greg Kroah-Hartman

    Julia Lawall
     

11 Aug, 2012

1 commit


27 Jan, 2012

1 commit

  • Fix UWB/WUSB kconfig error by changing 'select' to 'depends on'.

    drivers/usb/wusbcore/Kconfig:4:error: recursive dependency detected!
    drivers/usb/wusbcore/Kconfig:4: symbol USB_WUSB is selected by USB_HWA_HCD
    drivers/usb/host/Kconfig:559: symbol USB_HWA_HCD depends on UWB
    drivers/uwb/Kconfig:5: symbol UWB is selected by USB_WUSB

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

    Randy Dunlap
     

10 Jan, 2012

1 commit

  • * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (232 commits)
    USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c
    xhci: Clean up 32-bit build warnings.
    USB: update documentation for usbmon
    usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops
    drivers/usb/class/cdc-acm.c: clear dangling pointer
    drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree
    drivers/usb/host/isp1760-if.c: introduce missing kfree
    usb: option: add ZD Incorporated HSPA modem
    usb: ch9: fix up MaxStreams helper
    USB: usb-skeleton.c: cleanup open_count
    USB: usb-skeleton.c: fix open/disconnect race
    xhci: Properly handle COMP_2ND_BW_ERR
    USB: remove dead code from suspend/resume path
    USB: add quirk for another camera
    drivers: usb: wusbcore: Fix dependency for USB_WUSB
    xhci: Better debugging for critical host errors.
    xhci: Be less verbose during URB cancellation.
    xhci: Remove debugging about ring structure allocation.
    xhci: Remove debugging about toggling cycle bits.
    xhci: Remove debugging for individual transfers.
    ...

    Linus Torvalds
     

04 Jan, 2012

1 commit


10 Dec, 2011

1 commit

  • The advantage of kcalloc is, that will prevent integer overflows which could
    result from the multiplication of number of elements and size and it is also
    a bit nicer to read.

    The semantic patch that makes this change is available
    in https://lkml.org/lkml/2011/11/25/107

    Signed-off-by: Thomas Meyer
    Signed-off-by: Greg Kroah-Hartman

    Thomas Meyer
     

19 Nov, 2011

1 commit

  • This converts the drivers in drivers/usb/* to use the
    module_usb_driver() macro which makes the code smaller and a bit
    simpler.

    Added bonus is that it removes some unneeded kernel log messages about
    drivers loading and/or unloading.

    Cc: Simon Arlott
    Cc: Duncan Sands
    Cc: Matthieu CASTET
    Cc: Stanislaw Gruszka
    Cc: Pete Zaitcev
    Cc: Oliver Neukum
    Cc: Juergen Stuber
    Cc: Cesar Miquel
    Cc: Matthew Dharm
    Cc: Matthew Wilcox
    Cc: Sarah Sharp
    Cc: Kuninori Morimoto
    Cc: Felipe Balbi
    Cc: Lucas De Marchi
    Cc: Michael Hund
    Cc: Zack Parsons
    Cc: Melchior FRANZ
    Cc: Tomoki Sekiyama
    Cc: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

01 Nov, 2011

2 commits


24 Aug, 2011

1 commit

  • Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size
    instead of le16_to_cpu(desc->wMaxPacketSize).
    This patch fix it up

    Cc: Armin Fuerst
    Cc: Pavel Machek
    Cc: Johannes Erdfelt
    Cc: Vojtech Pavlik
    Cc: Oliver Neukum
    Cc: David Kubicek
    Cc: Johan Hovold
    Cc: Brad Hards
    Acked-by: Felipe Balbi
    Cc: Sebastian Andrzej Siewior
    Cc: Thomas Dahlmann
    Cc: David Brownell
    Cc: David Lopo
    Cc: Alan Stern
    Cc: Michal Nazarewicz
    Cc: Xie Xiaobo
    Cc: Li Yang
    Cc: Jiang Bo
    Cc: Yuan-hsin Chen
    Cc: Darius Augulis
    Cc: Xiaochen Shen
    Cc: Yoshihiro Shimoda
    Cc: OKI SEMICONDUCTOR,
    Cc: Robert Jarzmik
    Cc: Ben Dooks
    Cc: Thomas Abraham
    Cc: Herbert Pötzl
    Cc: Arnaud Patard
    Cc: Roman Weissgaerber
    Acked-by: Sarah Sharp
    Cc: Tony Olech
    Cc: Florian Floe Echtler
    Cc: Christian Lucht
    Cc: Juergen Stuber
    Cc: Georges Toth
    Cc: Bill Ryder
    Cc: Kuba Ober
    Cc: Inaky Perez-Gonzalez
    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Greg Kroah-Hartman

    Kuninori Morimoto
     

27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

02 Jul, 2011

1 commit


08 Jun, 2011

1 commit

  • cbaf_cdid_get() is only used in cbaf_wusb_chid_store().

    In the original code cbaf_cdid_get() returns either a negative error
    code or a small positive value on error. I have changed it to
    return -ENOENT if there is not enough data available.

    In the original code the caller changed the negative error codes to
    positive return values. I've changed it to just return the error
    value directly.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

31 Mar, 2011

1 commit


14 Mar, 2011

2 commits

  • Update the USB core to deal with USB 3.0 hubs. These hubs have a slightly
    different hub descriptor than USB 2.0 hubs, with a fixed (rather than
    variable length) size. Change the USB core's hub descriptor to have a
    union for the last fields that differ. Change the host controller drivers
    that access those last fields (DeviceRemovable and PortPowerCtrlMask) to
    use the union.

    Translate the new version of the hub port status field into the old
    version that khubd understands. (Note: we need to fix it to translate the
    roothub's port status once we stop converting it to USB 2.0 hub status
    internally.)

    Add new code to handle link state change status. Send out new control
    messages that are needed for USB 3.0 hubs, like Set Hub Depth.

    This patch is a modified version of the original patch submitted by John
    Youn. It's updated to reflect the removal of the "bitmap" #define, and
    change the hub descriptor accesses of a couple new host controller
    drivers.

    Signed-off-by: John Youn
    Signed-off-by: Sarah Sharp
    Cc: Nobuhiro Iwamatsu
    Cc: Inaky Perez-Gonzalez
    Cc: Tony Olech
    Cc: "Robert P. J. Day"
    Cc: Max Vozeler
    Cc: Tejun Heo
    Cc: Yoshihiro Shimoda
    Cc: Rodolfo Giometti
    Cc: Mike Frysinger
    Cc: Anton Vorontsov
    Cc: Sebastian Siewior
    Cc: Lothar Wassmann
    Cc: Olav Kongas
    Cc: Martin Fuzzey
    Cc: Alan Stern
    Cc: David Brownell

    John Youn
     
  • Using a #define to redefine a common variable name is a bad thing,
    especially when the #define is in a header. include/linux/usb/hcd.h
    redefined bitmap to DeviceRemovable to avoid typing a long field in the
    hub descriptor. This has unintended side effects for files like
    drivers/usb/core/devio.c that include that file, since another header
    included after hcd.h has different variables named bitmap.

    Remove the bitmap #define and replace instances of it in the host
    controller code. Cleanup the spaces around function calls and square
    brackets while we're at it.

    Signed-off-by: Sarah Sharp
    Cc: Nobuhiro Iwamatsu
    Cc: Inaky Perez-Gonzalez
    Cc: Tony Olech
    Cc: "Robert P. J. Day"
    Cc: Max Vozeler
    Cc: Tejun Heo
    Cc: Yoshihiro Shimoda
    Cc: Rodolfo Giometti
    Cc: Mike Frysinger
    Cc: Anton Vorontsov
    Cc: Sebastian Siewior
    Cc: Lothar Wassmann
    Cc: Olav Kongas
    Cc: Martin Fuzzey
    Cc: Alan Stern
    Cc: David Brownell

    Sarah Sharp
     

03 Mar, 2011

1 commit

  • In wusb_cluster_id_get(), if no zero bits exist in wusb_cluster_id_table,
    find_first_zero_bit() returns CLUSTER_IDS.

    But it is impossible to detect that the bitmap is full because there
    is an off-by-one error in the return value check. It will cause
    unexpected memory access by setting bit out of wusb_cluster_id_table
    bitmap, and caller will get wrong cluster id.

    Signed-off-by: Akinobu Mita
    Cc: linux-usb@vger.kernel.org
    Cc: Greg Kroah-Hartman
    Signed-off-by: Greg Kroah-Hartman

    Akinobu Mita
     

26 Feb, 2011

1 commit


23 Jan, 2011

1 commit


02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König