10 Jan, 2015

1 commit


19 Dec, 2013

1 commit


09 Dec, 2013

1 commit

  • Individual controller driver has different requirement for wakeup
    setting, so move it from core to itself. In order to align with
    current etting the default wakeup setting is enabled (except for
    chipidea host).

    Pass compile test with below commands:
    make O=outout/all allmodconfig
    make -j$CPU_NUM O=outout/all drivers/usb

    Signed-off-by: Peter Chen
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Peter Chen
     

12 Nov, 2013

1 commit

  • Pull devicetree updates from Rob Herring:
    "DeviceTree updates for 3.13. This is a bit larger pull request than
    usual for this cycle with lots of clean-up.

    - Cross arch clean-up and consolidation of early DT scanning code.
    - Clean-up and removal of arch prom.h headers. Makes arch specific
    prom.h optional on all but Sparc.
    - Addition of interrupts-extended property for devices connected to
    multiple interrupt controllers.
    - Refactoring of DT interrupt parsing code in preparation for
    deferred probe of interrupts.
    - ARM cpu and cpu topology bindings documentation.
    - Various DT vendor binding documentation updates"

    * tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits)
    powerpc: add missing explicit OF includes for ppc
    dt/irq: add empty of_irq_count for !OF_IRQ
    dt: disable self-tests for !OF_IRQ
    of: irq: Fix interrupt-map entry matching
    MIPS: Netlogic: replace early_init_devtree() call
    of: Add Panasonic Corporation vendor prefix
    of: Add Chunghwa Picture Tubes Ltd. vendor prefix
    of: Add AU Optronics Corporation vendor prefix
    of/irq: Fix potential buffer overflow
    of/irq: Fix bug in interrupt parsing refactor.
    of: set dma_mask to point to coherent_dma_mask
    of: add vendor prefix for PHYTEC Messtechnik GmbH
    DT: sort vendor-prefixes.txt
    of: Add vendor prefix for Cadence
    of: Add empty for_each_available_child_of_node() macro definition
    arm/versatile: Fix versatile irq specifications.
    of/irq: create interrupts-extended property
    microblaze/pci: Drop PowerPC-ism from irq parsing
    of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
    of/irq: Use irq_of_parse_and_map()
    ...

    Linus Torvalds
     

10 Oct, 2013

1 commit


24 Sep, 2013

1 commit


18 Sep, 2013

1 commit


13 Aug, 2013

1 commit

  • All 4 transfer types can work well on EHCI HCD after switching to run
    URB giveback in tasklet context, so mark all HCD drivers to support
    it.

    Also we don't need to release ehci->lock during URB giveback any more.

    >From below test results on 3 machines(2 ARM and one x86), time
    consumed by EHCI interrupt handler droped much without performance
    loss.

    1 test description
    1.1 mass storage performance test:
    - run below command 10 times and compute the average performance

    dd if=/dev/sdN iflag=direct of=/dev/null bs=200M count=1

    - two usb mass storage device:
    A: sandisk extreme USB 3.0 16G(used in test case 1 & case 2)
    B: kingston DataTraveler G2 4GB(only used in test case 2)

    1.2 uvc function test:
    - run one simple capture program in the below link

    http://kernel.ubuntu.com/~ming/up/capture.c

    - capture format 640*480 and results in High Bandwidth mode on the
    uvc device: Z-Star 0x0ac8/0x3450

    - on T410(x86) laptop, also use guvcview to watch video capture/playback

    1.3 about test2 and test4
    - both two devices involved are tested concurrently by above test items

    1.4 how to compute irq time(the time consumed by ehci_irq)
    - use trace points of irq:irq_handler_entry and irq:irq_handler_exit

    1.5 kernel
    3.10.0-rc3-next-20130528

    1.6 test machines
    Pandaboard A1: ARM CortexA9 dural core
    Arndale board: ARM CortexA15 dural core
    T410: i5 CPU 2.67GHz quad core

    2 test result
    2.1 test case1: single mass storage device performance test
    --------------------------------------------------------------------
    upstream | patched
    perf(MB/s)+irq time(us) | perf(MB/s)+irq time(us)
    --------------------------------------------------------------------
    Pandaboard A1: 25.280(avg:145,max:772) | 25.540(avg:14, max:75)
    Arndale board: 29.700(avg:33, max:129) | 29.700(avg:10, max:50)
    T410: 34.430(avg:17, max:154*)| 34.660(avg:12, max:155)
    ---------------------------------------------------------------------

    2.2 test case2: two mass storage devices' performance test
    --------------------------------------------------------------------
    upstream | patched
    perf(MB/s)+irq time(us) | perf(MB/s)+irq time(us)
    --------------------------------------------------------------------
    Pandaboard A1: 15.840/15.580(avg:158,max:1216) | 16.500/16.160(avg:15,max:139)
    Arndale board: 17.370/16.220(avg:33 max:234) | 17.480/16.200(avg:11, max:91)
    T410: 21.180/19.820(avg:18 max:160) | 21.220/19.880(avg:11, max:149)
    ---------------------------------------------------------------------

    2.3 test case3: one uvc streaming test
    - uvc device works well(on x86, luvcview can be used too and has
    same result with uvc capture)
    --------------------------------------------------------------------
    upstream | patched
    irq time(us) | irq time(us)
    --------------------------------------------------------------------
    Pandaboard A1: (avg:445, max:873) | (avg:33, max:44)
    Arndale board: (avg:316, max:630) | (avg:20, max:27)
    T410: (avg:39, max:107) | (avg:10, max:65)
    ---------------------------------------------------------------------

    2.4 test case4: one uvc streaming plus one mass storage device test
    --------------------------------------------------------------------
    upstream | patched
    perf(MB/s)+irq time(us) | perf(MB/s)+irq time(us)
    --------------------------------------------------------------------
    Pandaboard A1: 20.340(avg:259,max:1704)| 20.390(avg:24, max:101)
    Arndale board: 23.460(avg:124,max:726) | 23.370(avg:15, max:52)
    T410: 28.520(avg:27, max:169) | 28.630(avg:13, max:160)
    ---------------------------------------------------------------------

    2.5 test case5: read single mass storage device with small transfer
    - run below command 10 times and compute the average speed

    dd if=/dev/sdN iflag=direct of=/dev/null bs=4K count=4000

    1), test device A:
    --------------------------------------------------------------------
    upstream | patched
    perf(MB/s)+irq time(us) | perf(MB/s)+irq time(us)
    --------------------------------------------------------------------
    Pandaboard A1: 6.5(avg:21, max:64) | 6.5(avg:10, max:24)
    Arndale board: 8.13(avg:12, max:23) | 8.06(avg:7, max:17)
    T410: 6.66(avg:13, max:131) | 6.84(avg:11, max:149)
    ---------------------------------------------------------------------

    2), test device B:
    --------------------------------------------------------------------
    upstream | patched
    perf(MB/s)+irq time(us) | perf(MB/s)+irq time(us)
    --------------------------------------------------------------------
    Pandaboard A1: 5.5(avg:21,max:43) | 5.49(avg:10, max:24)
    Arndale board: 5.9(avg:12, max:22) | 5.9(avg:7, max:17)
    T410: 5.48(avg:13, max:155) | 5.48(avg:7, max:140)
    ---------------------------------------------------------------------

    * On T410, sometimes read ehci status register in ehci_irq takes more
    than 100us, and the problem has been reported on the link:

    http://marc.info/?t=137065867300001&r=1&w=2

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

    Ming Lei
     

26 Jul, 2013

1 commit


30 May, 2013

1 commit

  • Use the wrapper functions for getting and setting the driver data using
    platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
    so we can directly pass a struct platform_device.

    Also, unnecessary dev_set_drvdata() is removed, because the driver core
    clears the driver data to NULL after device_release or on probe failure.

    Signed-off-by: Jingoo Han
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Jingoo Han
     

23 Jan, 2013

1 commit

  • Convert all uses of devm_request_and_ioremap() to the newly introduced
    devm_ioremap_resource() which provides more consistent error handling.

    devm_ioremap_resource() provides its own error messages so all explicit
    error messages can be removed from the failure code paths.

    Signed-off-by: Thierry Reding
    Acked-by: Alan Stern
    Acked-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Thierry Reding
     

22 Nov, 2012

1 commit

  • CONFIG_HOTPLUG is going away as an option so __devinit is no longer
    needed.

    Signed-off-by: Bill Pemberton
    Cc: Peter Korsgaard
    Cc: Alexander Shishkin
    Acked-by: Felipe Balbi
    Cc: Li Yang
    Acked-by: Alan Stern
    Cc: Geoff Levand
    Cc: Wan ZongShun
    Cc: Olav Kongas
    Cc: Lennert Buytenhek
    Cc: Ben Dooks
    Cc: Kukjin Kim
    Acked-by: Nicolas Ferre
    Signed-off-by: Greg Kroah-Hartman

    Bill Pemberton
     

11 Aug, 2012

1 commit

  • The various devm_ functions allocate memory that is released when a driver
    detaches. This patch uses these functions for data that is allocated in
    the probe function of a platform device and is only freed in the remove
    function.

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

    Julia Lawall
     

10 Jul, 2012

1 commit

  • This patch (as1564c) converts the EHCI platform drivers to use the
    central ehci_setup() routine for generic controller initialization
    rather than each having its own idiosyncratic approach.

    The major point of difficulty lies in ehci-pci's many vendor- and
    device-specific workarounds. Some of them have to be applied before
    calling ehci_setup() and some after, which necessitates a fair amount
    of code motion. The other platform drivers require much smaller
    changes.

    One point not addressed by the patch is whether ports should be
    powered on or off following initialization. The different drivers
    appear to handle this pretty much at random. In fact it shouldn't
    matter, because the hub driver turns on power to all ports when it
    binds to the root hub. Straightening that out will be left for
    another day.

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

    Alan Stern
     

10 Jun, 2011

1 commit


04 May, 2011

1 commit

  • 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
     

01 Mar, 2011

1 commit


04 Sep, 2010

1 commit

  • The iounmap(ehci->ohci_hcctrl_reg); should be the first thing we do
    because the ioremap() was the last thing we did. Also if we hit any of
    the goto statements in the original code then it would have led to a
    NULL dereference of "ehci". This bug was introduced in: 796bcae7361c
    "USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]"

    I modified the few lines in front a little so that my code didn't
    obscure the return success code path.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Grant Likely
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     

06 Aug, 2010

1 commit

  • of_device is just an alias for platform_device, so remove it entirely. Also
    replace to_of_device() with to_platform_device() and update comment blocks.

    This patch was initially generated from the following semantic patch, and then
    edited by hand to pick up the bits that coccinelle didn't catch.

    @@
    @@
    -struct of_device
    +struct platform_device

    Signed-off-by: Grant Likely
    Reviewed-by: David S. Miller

    Grant Likely
     

22 May, 2010

1 commit

  • .name, .match_table and .owner are duplicated in both of_platform_driver
    and device_driver. This patch is a removes the extra copies from struct
    of_platform_driver and converts all users to the device_driver members.

    This patch is a pretty mechanical change. The usage model doesn't change
    and if any drivers have been missed, or if anything has been fixed up
    incorrectly, then it will fail with a compile time error, and the fixup
    will be trivial. This patch looks big and scary because it touches so
    many files, but it should be pretty safe.

    Signed-off-by: Grant Likely
    Acked-by: Sean MacLennan

    Grant Likely
     

19 May, 2010

1 commit


03 Mar, 2010

2 commits

  • Reduces string space a bit
    Neaten a macro redefine of dbg

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

    Joe Perches
     
  • The match_table field of the struct of_device_id is constant in
    so it is worth to make the initialization data also constant.

    The semantic match that finds this kind of pattern is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    disable decl_init,const_decl_init;
    identifier I1, I2, x;
    @@
    struct I1 {
    ...
    const struct I2 *x;
    ...
    };
    @s@
    identifier r.I1, y;
    identifier r.x, E;
    @@
    struct I1 y = {
    .x = E,
    };
    @c@
    identifier r.I2;
    identifier s.E;
    @@
    const struct I2 E[] = ... ;
    @depends on !c@
    identifier r.I2;
    identifier s.E;
    @@
    + const
    struct I2 E[] = ...;
    //

    Signed-off-by: Németh Márton
    Cc: Julia Lawall
    Cc: cocci@diku.dk
    Signed-off-by: Greg Kroah-Hartman

    Németh Márton
     

13 Jul, 2009

1 commit

  • This patch (as1256) changes ehci-hcd and all the other drivers in the
    EHCI family to make use of the new clear_tt_buffer callbacks. When a
    Clear-TT-Buffer request is in progress for a QH, the QH is not allowed
    to be linked into the async schedule until the request is finished.
    At that time, if there are any URBs queued for the QH, it is linked
    into the async schedule.

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

    Alan Stern
     

16 Jun, 2009

1 commit

  • This patch (as1245) fixes a bug in ehci-hcd. When an URB is queued
    for an endpoint whose QH is already in the LINKED state, the QH
    doesn't get refreshed. As a result, if usb_clear_halt() was called
    during the time that the QH was linked but idle, the data toggle value
    in the QH doesn't get reset.

    The symptom is that after a clear_halt, data gets lost and transfers
    time out. This problem is starting to show up now because the
    "ehci-hcd unlink speedups" patch causes QHs with no queued URBs to
    remain linked for a suitable time.

    The patch utilizes the new endpoint_reset mechanism to fix the
    problem. When an endpoint is reset, the new method forcibly unlinks
    the QH (if necessary) and safely updates the toggle value. This
    allows qh_update() to be simplified and avoids using usb_device's
    toggle bits in a rather unintuitive way.

    Signed-off-by: Alan Stern
    CC: David Brownell
    Tested-by: David
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     

08 Jan, 2009

1 commit

  • A published errata for ppc440epx states, that when running Linux with
    both EHCI and OHCI modules loaded, the EHCI module experiences a fatal
    error when a high-speed device is connected to the USB2.0, and
    functions normally if OHCI module is not loaded.

    There used to be recommendation to use only hi-speed or full-speed
    devices with specific conditions, when respective module was unloaded.
    Later, it was observed that ohci suspend is enough to keep things
    going, and it was turned into workaround, as explained below.

    Quote from original descriprion:

    The 440EPx USB 2.0 Host controller is an EHCI compliant controller. In
    USB 2.0 Host controllers, each EHCI controller has one or more companion
    controllers, which may be OHCI or UHCI. An USB 2.0 Host controller will
    contain one or more ports. For each port, only one of the controllers
    is connected at any one time. In the 440EPx, there is only one OHCI
    companion controller, and only one USB 2.0 Host port.
    All ports on an USB 2.0 controller default to the companion
    controller. If you load only an ohci driver, it will have control of
    the ports and any deviceplugged in will operate, although high speed
    devices will be forced to operate at full speed. When an ehci driver
    is loaded, it explicitly takes control of the ports. If there is a
    device connected, and / or every time there is a new device connected,
    the ehci driver determines if the device is high speed or not. If it
    is high speed, the driver retains control of the port. If it is not,
    the driver explicitly gives the companion controller control of the
    port.

    The is a software workaround that uses
    Initial version of the software workaround was posted to
    linux-usb-devel:

    http://www.mail-archive.com/linux-usb-devel@lists.sourceforge.net/msg54019.html

    and later available from amcc.com:
    http://www.amcc.com/Embedded/Downloads/download.html?cat=1&family=15&ins=2

    The patch below is generally based on the latter, but reworked to
    powerpc/of_device USB drivers, and uses a few devicetree inquiries to
    get rid of (some) hardcoded defines.

    Signed-off-by: Vitaly Bordug
    Signed-off-by: Stefan Roese
    Cc: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Vitaly Bordug
     

30 May, 2008

2 commits

  • This patch (as1096) fixes an annoying problem: When a full-speed or
    low-speed device is plugged into an EHCI controller, it fails to
    enumerate at high speed and then is handed over to the companion
    controller. But usbcore logs a misleading and unwanted error message
    when the high-speed enumeration fails.

    The patch adds a new HCD method, port_handed_over, which asks whether
    a port has been handed over to a companion controller. If it has, the
    error message is suppressed.

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

    Alan Stern
     
  • This patch (as1095) cleans up the HCD glue and several of the EHCI
    bus-glue files. The ehci->is_tdi_rh_tt flag is redundant, since it
    means the same thing as the hcd->has_tt flag, so it is removed and the
    other flag used in its place.

    Some of the bus-glue files didn't get the relinquish_port method added
    to their hc_driver structures. Although that routine currently
    doesn't do anything for controllers with an integrated TT, in the
    future it might. So the patch adds it where it is missing.

    Lastly, some of the bus-glue files have erroneous entries for their
    hc_driver's suspend and resume methods. These method pointers are
    specific to PCI and shouldn't be used otherwise.

    (The patch also includes an invisible whitespace fix.)

    Signed-off-by: Alan Stern
    Acked-by: David Brownell

    Alan Stern
     

02 Feb, 2008

1 commit