24 May, 2011

1 commit

  • * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (205 commits)
    USB: EHCI: Remove SPARC_LEON {read,write}_be definitions from ehci.h
    USB: UHCI: Support big endian GRUSBHC HC
    sparc: add {read,write}*_be routines
    USB: UHCI: Add support for big endian descriptors
    USB: UHCI: Use ACCESS_ONCE rather than using a full compiler barrier
    USB: UHCI: Add support for big endian mmio
    usb-storage: Correct adjust_quirks to include latest flags
    usb/isp1760: Fix possible unlink problems
    usb/isp1760: Move function isp1760_endpoint_disable() within file.
    USB: remove remaining usages of hcd->state from usbcore and fix regression
    usb: musb: ux500: add configuration and build options for ux500 dma
    usb: musb: ux500: add dma glue layer for ux500
    usb: musb: ux500: add dma name for ux500
    usb: musb: ux500: add ux500 specific code for gadget side
    usb: musb: fix compile error
    usb-storage: fix up the unusual_realtek device list
    USB: gadget: f_audio: Fix invalid dereference of initdata
    EHCI: don't rescan interrupt QHs needlessly
    OHCI: fix regression caused by nVidia shutdown workaround
    USB: OTG: msm: Free VCCCX regulator even if we can't set the voltage
    ...

    Linus Torvalds
     

11 May, 2011

2 commits

  • Some USB function drivers (e.g. f_mass_storage.c) need to delay or defer the
    data/status stages of standard control requests like SET_CONFIGURATION or
    SET_INTERFACE till they are done with their bookkeeping and are actually ready
    for accepting new commands to their interface.

    They can now achieve this functionality by returning USB_GADGET_DELAYED_STATUS
    in their setup handlers (e.g. set_alt()). The composite framework will then
    defer completion of the control transfer by not completing the data/status stages.

    This ensures that the host does not send new packets to the interface till the
    function driver is ready to take them.

    When the function driver that requested for USB_GADGET_DELAYED_STATUS is done
    with its bookkeeping, it should signal the composite framework to continue with
    the data/status stages of the control transfer. It can do so by invoking
    the new API usb_composite_setup_continue(). This is where the control transfer's
    data/status stages are completed and host can initiate new transfers.

    The DELAYED_STATUS mechanism is currently only supported if the expected data phase
    is 0 bytes (i.e. w_length == 0). Since SET_CONFIGURATION and SET_INTERFACE are the
    only cases that will use this mechanism, this is not a limitation.

    Signed-off-by: Roger Quadros
    Signed-off-by: Greg Kroah-Hartman

    Roger Quadros
     
  • This was needed to resolve a conflict in:
    drivers/usb/host/isp1760-hcd.c

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

07 May, 2011

4 commits

  • Signed-off-by: Pavankumar Kondeti
    Signed-off-by: Greg Kroah-Hartman

    Pavankumar Kondeti
     
  • Implement good battery algorithm defined in the battery charging V1.2 spec
    for detecting different charging ports. USB hardware is put into low power
    mode when connected to a dedicated charging port. vbus_draw and set_power
    methods are implemented for determining the allowed current from Host in
    different states (un-configured/suspend/configured).

    The charger block is implemented using vendor specific registers and the
    PHY used in MSM8960(28nm PHY) different from older targets like MSM8x60
    and MSM7x30(45nm PHY). The PHY vendor and product id registers are not
    implemented in the above chipsets. Hence PHY type is passed via platform
    data.

    Signed-off-by: Pavankumar Kondeti
    Signed-off-by: Greg Kroah-Hartman

    Pavankumar Kondeti
     
  • HSUSB core clock is derived from daytona fabric clock and for
    HSUSB operational require minimum core clock at 55MHz. Since, HSUSB
    cannot tolerate daytona fabric clock change in the middle of HSUSB
    operational, vote for maximum Daytona fabric clock
    while usb is operational

    Signed-off-by: Anji jonnala
    Signed-off-by: Pavankumar Kondeti
    Signed-off-by: Greg Kroah-Hartman

    Anji jonnala
     
  • Commit 3dacdf11 "usb: factor out state_string() on otg drivers"
    broke building musb drivers since there is already another
    otg_state_string() function in musb drivers, but with different
    prototype. Fix musb drivers to use common otg_state_string(), too.

    Also provide a nop for otg_state_string() if CONFIG_USB_OTG_UTILS
    is not defined.

    Signed-off-by: Anatolij Gustschin
    Signed-off-by: Greg Kroah-Hartman

    Anatolij Gustschin
     

06 May, 2011

1 commit


04 May, 2011

2 commits

  • The two first HC capability registers (CAPLENGTH and HCIVERSION)
    are defined as one 8-bit and one 16-bit register. Most HC
    implementations have selected to treat these registers as part
    of a 32-bit register, giving the same layout for both big and
    small endian systems.

    This patch adds a new quirk, big_endian_capbase, to support
    controllers with big endian register interfaces that treat
    HCIVERSION and CAPLENGTH as individual registers.

    Signed-off-by: Jan Andersson
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Jan Andersson
     
  • As pointed out by Arnd Bergmann, in include/linux/usb/ehci_def.h, struct
    ehci_caps is defined with __attribute__((packed)) for no good reason,
    and this triggers undefined behaviour when using ARM's readl() on
    pointers to elements of this structure:

    http://lkml.kernel.org/r/201102021700.20683.arnd@arndb.de

    The same problem exists with the other two structures in ehci_def.h too,
    so remove the __attribute__((packed)) from all of them.

    Cc: Arnd Bergmann
    Signed-off-by: Rabin Vincent
    Signed-off-by: Greg Kroah-Hartman

    Rabin Vincent
     

03 May, 2011

3 commits

  • …git/sarah/xhci into usb-next

    * 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci:
    xhci 1.0: Set transfer burst last packet count field.
    xhci 1.0: Set transfer burst count field.
    xhci 1.0: Update TD size field format.
    xhci 1.0: Only interrupt on short packet for IN EPs.
    xhci: Remove sparse warning about cmd_status.
    usbcore: warm reset USB3 port in SS.Inactive state
    usbcore: Refine USB3.0 device suspend and resume
    xHCI: report USB3.0 portstatus comply with USB3.0 specification
    xHCI: Set link state support
    xHCI: Clear link state change support
    xHCI: warm reset support
    usb/ch9: use proper endianess for wBytesPerInterval
    xhci: Remove recursive call to xhci_handle_event
    xhci: Add an assertion to check for virt_dev=0 bug.
    xhci: Add rmb() between reading event validity & event data access.
    xhci: Make xHCI driver endian-safe

    Greg Kroah-Hartman
     
  • while going through Tatyana's changes for the gadget framework I noticed
    that this type is not defined as __le16.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Sarah Sharp

    Sebastian Andrzej Siewior
     
  • Provide common otg_state_string() and use
    it in drivers.

    Signed-off-by: Anatolij Gustschin
    Signed-off-by: Greg Kroah-Hartman

    Anatolij Gustschin
     

30 Apr, 2011

2 commits


29 Apr, 2011

1 commit

  • Resubmit interrupt URB if device is open. Use a flag set in
    usbnet_open() to determine this state. Also kill and free
    interrupt URB in usbnet_disconnect().

    [Rebased off git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git]

    Signed-off-by: Paul Stewart
    Signed-off-by: David S. Miller

    Paul Stewart
     

19 Apr, 2011

1 commit


14 Apr, 2011

4 commits

  • USB tethering does not work anymore since 2.6.39-rc2, but it's okay in
    -rc1. The root cause is the new added mask code 'FLAG_POINTTOPOINT'
    overlaps 'FLAG_MULTI_PACKET' in include/linux/usb/usbnet.h, this
    causes logic issue in rx_process(). This patch cleans up the overlap.

    Reported-and-Tested-by: Gottfried Haider
    Signed-off-by: Huajun Li
    Signed-off-by: David S. Miller

    huajun li
     
  • Fix 41 occurrences of this type of Section mismatch warning
    in g_mass_storage, g_serial, g_cdc, g_multi, g_nokia, g_ether, g_ffs:
    (the 75 number reported earlier contained some duplicates.)

    WARNING: drivers/usb/gadget/g_mass_storage.o(.text+0x687a): Section mismatch in reference from the function fsg_bind() to the function .devinit.text:usb_ep_autoconfig()
    The function fsg_bind() references
    the function __devinit usb_ep_autoconfig().
    This is often because fsg_bind lacks a __devinit
    annotation or the annotation of usb_ep_autoconfig is wrong.

    Also remove __devinit from usb_ep_autoconfig_reset() to prevent
    possible section mismatch problems with it.

    Signed-off-by: Randy Dunlap
    Cc: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     
  • Renesas SuperH has USBHS IP which can switch Host / Function.
    This driver is designed so that Host / Function may dynamically change.
    This patch add usb/renesas_usbhs and common code for SuperH USBHS.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Greg Kroah-Hartman

    Kuninori Morimoto
     
  • Some RNDIS devices don't respond on the control channel until polled
    on the status channel. In particular, this was reported to be the
    case for the 2Wire HomePortal 1000SW and for some Windows Mobile
    devices.

    This is roughly based on a patch by John Carr
    which is currently applied by Mandriva.

    Reported-by: Mark Glassberg
    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

08 Apr, 2011

1 commit


02 Apr, 2011

1 commit

  • The documentation for the USB ethernet devices suggests that
    only some devices are supposed to use usb0 as the network interface
    name instead of eth0. The logic used there, and documented in
    Kconfig for CDC is that eth0 will be used when the mac address
    is a globally assigned one, but usb0 is used for the locally
    managed range that is typically used on point-to-point links.

    Unfortunately, this has caused a lot of pain on the smsc95xx
    device that is used on the popular pandaboard without an
    EEPROM to store the MAC address, which causes the driver to
    call random_ether_address().

    Obviously, there should be a proper MAC addressed assigned to
    the device, and discussions are ongoing about how to solve
    this, but this patch at least makes sure that the default
    interface naming gets a little saner and matches what the
    user can expect based on the documentation, including for
    new devices.

    The approach taken here is to flag whether a device might be a
    point-to-point link with the new FLAG_POINTTOPOINT setting in
    the usbnet driver_info. A driver can set both FLAG_POINTTOPOINT
    and FLAG_ETHER if it is not sure (e.g. cdc_ether), or just one
    of the two. The usbnet framework only looks at the MAC address
    for device naming if both flags are set, otherwise it trusts the
    flag.

    Signed-off-by: Arnd Bergmann
    Tested-by: Andy Green
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

31 Mar, 2011

1 commit


30 Mar, 2011

1 commit

  • This adds a driver for the CDC Ethernet part of this modem. The
    device's ID is blacklisted in cdc_ether.c and is white-listed in
    this new driver because of the quirks needed to make it useful.
    The modem's firmware exposes a CDC ACM port for modem control and a
    CDC Ethernet port for network data. The descriptors look fine but
    both ports actually are some sort of multiplexers requiring non-
    standard headers added/removed from every packet or they get
    ignored. All information is based on a usb traffic log from a
    Windows machine.

    On the Verizon 4G network I've seen speeds up to 1.1MB/s so far with
    this driver, a speed-o-meter site reports 16.2Mbps/10.5Mbps.
    Userspace scripts are required to talk to the CDC ACM port.

    Signed-off-by: Andrzej Zaborowski
    Signed-off-by: David S. Miller

    Andrzej Zaborowski
     

17 Mar, 2011

1 commit

  • * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (76 commits)
    pch_uart: reference clock on CM-iTC
    pch_phub: add new device ML7213
    n_gsm: fix UIH control byte : P bit should be 0
    n_gsm: add a documentation
    serial: msm_serial_hs: Add MSM high speed UART driver
    tty_audit: fix tty_audit_add_data live lock on audit disabled
    tty: move cd1865.h to drivers/staging/tty/
    Staging: tty: fix build with epca.c driver
    pcmcia: synclink_cs: fix prototype for mgslpc_ioctl()
    Staging: generic_serial: fix double locking bug
    nozomi: don't use flush_scheduled_work()
    tty/serial: Relax the device_type restriction from of_serial
    MAINTAINERS: Update HVC file patterns
    tty: phase out of ioctl file pointer for tty3270 as well
    tty: forgot to remove ipwireless from drivers/char/pcmcia/Makefile
    pch_uart: Fix DMA channel miss-setting issue.
    pch_uart: fix exclusive access issue
    pch_uart: fix auto flow control miss-setting issue
    pch_uart: fix uart clock setting issue
    pch_uart : Use dev_xxx not pr_xxx
    ...

    Fix up trivial conflicts in drivers/misc/pch_phub.c (same patch applied
    twice, then changes to the same area in one branch)

    Linus Torvalds
     

14 Mar, 2011

7 commits

  • Use the Mult and bMaxBurst values from the endpoint companion
    descriptor to calculate the max length of an isoc transfer.

    Add USB_SS_MULT macro to access Mult field of bmAttributes, at
    Sarah's suggestion.

    This patch should be queued for the 2.6.36 and 2.6.37 stable trees, since
    those were the first kernels to have isochronous support for SuperSpeed
    devices.

    Signed-off-by: Paul Zimmerman
    Signed-off-by: Sarah Sharp
    Cc: stable@kernel.org

    Paul Zimmerman
     
  • USB_PORT_STAT_SUPER_SPEED is a made up symbol that the USB core used to
    track whether USB ports had a SuperSpeed device attached. This is a
    linux-internal symbol that was used when SuperSpeed and non-SuperSpeed
    devices would show up under the same xHCI roothub. This particular
    port status is never returned by external USB 3.0 hubs. (Instead they
    have a USB_PORT_STAT_SPEED_5GBPS that uses a completely different speed
    mask.)

    Now that the xHCI driver registers two roothubs, USB 3.0 devices will only
    show up under USB 3.0 hubs. Rip out USB_PORT_STAT_SUPER_SPEED and replace
    it with calls to hub_is_superspeed().

    Signed-off-by: Sarah Sharp

    Sarah Sharp
     
  • Introduce the notion of a PCI device that may be associated with more than
    one USB host controller driver (struct usb_hcd). This patch is the start
    of the work to separate the xHCI host controller into two roothubs: a USB
    3.0 roothub with SuperSpeed-only ports, and a USB 2.0 roothub with
    HS/FS/LS ports.

    One usb_hcd structure is designated to be the "primary HCD", and a pointer
    is added to the usb_hcd structure to keep track of that. A new function
    call, usb_hcd_is_primary_hcd() is added to check whether the USB hcd is
    marked as the primary HCD (or if it is not part of a roothub pair). To
    allow the USB core and xHCI driver to access either roothub in a pair, a
    "shared_hcd" pointer is added to the usb_hcd structure.

    Add a new function, usb_create_shared_hcd(), that does roothub allocation
    for paired roothubs. It will act just like usb_create_hcd() did if the
    primary_hcd pointer argument is NULL. If it is passed a non-NULL
    primary_hcd pointer, it sets usb_hcd->shared_hcd and usb_hcd->primary_hcd
    fields. It will also skip the bandwidth_mutex allocation, and set the
    secondary hcd's bandwidth_mutex pointer to the primary HCD's mutex.

    IRQs are only allocated once for the primary roothub.

    Introduce a new usb_hcd driver flag that indicates the host controller
    driver wants to create two roothubs. If the HCD_SHARED flag is set, then
    the USB core PCI probe methods will allocate a second roothub, and make
    sure that second roothub gets freed during rmmod and in initialization
    error paths.

    When usb_hc_died() is called with the primary HCD, make sure that any
    roothubs that share that host controller are also marked as being dead.

    Signed-off-by: Sarah Sharp

    Sarah Sharp
     
  • The xHCI driver essentially has both a USB 2.0 and a USB 3.0 roothub. So
    setting the HCD_USB3 bits in the hcd->driver->flags is a bit misleading.
    Add a new field to usb_hcd, bcdUSB. Store the result of
    hcd->driver->flags & HCD_MASK in it. Later, when we have the xHCI driver
    register the two roothubs, we'll set the usb_hcd->bcdUSB field to HCD_USB2
    for the USB 2.0 roothub, and HCD_USB3 for the USB 3.0 roothub.

    Signed-off-by: Sarah Sharp

    Sarah Sharp
     
  • Change the bandwith_mutex in struct usb_hcd to a pointer. This will allow
    the pointer to be shared across usb_hcds for the upcoming work to split
    the xHCI driver roothub into a USB 2.0/1.1 and a USB 3.0 bus.

    Signed-off-by: Sarah Sharp

    Sarah Sharp
     
  • 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
     

12 Mar, 2011

2 commits

  • The Tegra 2 SoC has 3 EHCI compatible USB controllers. This patch adds
    the necessary glue to allow the ehci-hcd driver to work on Tegra 2
    SoCs.

    The platform data is used to configure board-specific phy settings and
    to configure the operating mode, as one of the ports may be used as a otg
    port. For additional power saving, the driver supports powering down the
    phy on bus suspend when it is used, for example, to connect an internal
    device that use an out-of-band remote wakeup mechanism (e.g. a gpio).

    Signed-off-by: Benoit Goby
    Signed-off-by: Greg Kroah-Hartman

    Benoit Goby
     
  • Add generic access ops for controllers with a ulpi viewport register
    (e.g. Chipidea/ARC based controllers).

    Signed-off-by: Benoit Goby
    Signed-off-by: Greg Kroah-Hartman

    Benoit Goby
     

08 Mar, 2011

2 commits

  • This driver is used across all MSM SoCs. Hence give a generic name.
    All Functions and strutures are also using "msm_otg" as prefix.

    Signed-off-by: Pavankumar Kondeti
    Signed-off-by: Greg Kroah-Hartman

    Pavankumar Kondeti
     
  • The hcd->state variable is a disaster. It's not clearly owned by
    either usbcore or the host controller drivers, and they both change it
    from time to time, potentially stepping on each other's toes. It's
    not protected by any locks. And there's no mechanism to prevent it
    from going through an invalid transition.

    This patch (as1451) takes a first step toward fixing these problems.
    As it turns out, usbcore uses hcd->state for essentially only two
    things: checking whether the controller's root hub is running and
    checking whether the controller has died. Therefore the patch adds
    two new atomic bitflags to the hcd structure, to store these pieces of
    information. The new flags are used only by usbcore, and a private
    spinlock prevents invalid combinations (a dead controller's root hub
    cannot be running).

    The patch does not change the places where usbcore sets hcd->state,
    since HCDs may depend on them. Furthermore, there is one place in
    usb_hcd_irq() where usbcore still must use hcd->state: An HCD's
    interrupt handler can implicitly indicate that the controller died by
    setting hcd->state to HC_STATE_HALT. Nevertheless, the new code is a
    big improvement over the current code.

    The patch makes one other change. The hcd_bus_suspend() and
    hcd_bus_resume() routines now check first whether the host controller
    has died; if it has then they return immediately without calling the
    HCD's bus_suspend or bus_resume methods.

    This fixes the major problem reported in Bugzilla #29902: The system
    fails to suspend after a host controller dies during system resume.

    Signed-off-by: Alan Stern
    Tested-by: Alex Terekhov
    CC:
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

26 Feb, 2011

2 commits

  • Macro arguments used in expressions need to be enclosed in parenthesis
    to avoid unpleasant surprises.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • When a driver doesn't know how much data a device is going to send,
    the buffer size should be at least as big as the endpoint's maxpacket
    value. The serial drivers don't follow this rule; many of them
    request only 256-byte bulk-in buffers. As a result, they suffer
    overflow errors if a high-speed device wants to send a lot of data,
    because high-speed bulk endpoints are required to have a maxpacket
    size of 512.

    This patch (as1450) fixes the problem by using the driver's
    bulk_in_size value as a minimum, always allocating buffers no smaller
    than the endpoint's maxpacket size.

    Signed-off-by: Alan Stern
    Tested-by: Flynn Marquardt
    CC: [after .39-rc1 is out]
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

25 Feb, 2011

1 commit