21 May, 2011

1 commit

  • Commit e66eed651fd1 ("list: remove prefetching from regular list
    iterators") removed the include of prefetch.h from list.h, which
    uncovered several cases that had apparently relied on that rather
    obscure header file dependency.

    So this fixes things up a bit, using

    grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]')
    grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]')

    to guide us in finding files that either need
    inclusion, or have it despite not needing it.

    There are more of them around (mostly network drivers), but this gets
    many core ones.

    Reported-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

31 Mar, 2011

1 commit


25 Oct, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    Update broken web addresses in arch directory.
    Update broken web addresses in the kernel.
    Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget
    Revert "Fix typo: configuation => configuration" partially
    ida: document IDA_BITMAP_LONGS calculation
    ext2: fix a typo on comment in ext2/inode.c
    drivers/scsi: Remove unnecessary casts of private_data
    drivers/s390: Remove unnecessary casts of private_data
    net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
    drivers/infiniband: Remove unnecessary casts of private_data
    drivers/gpu/drm: Remove unnecessary casts of private_data
    kernel/pm_qos_params.c: Remove unnecessary casts of private_data
    fs/ecryptfs: Remove unnecessary casts of private_data
    fs/seq_file.c: Remove unnecessary casts of private_data
    arm: uengine.c: remove C99 comments
    arm: scoop.c: remove C99 comments
    Fix typo configue => configure in comments
    Fix typo: configuation => configuration
    Fix typo interrest[ing|ed] => interest[ing|ed]
    Fix various typos of valid in comments
    ...

    Fix up trivial conflicts in:
    drivers/char/ipmi/ipmi_si_intf.c
    drivers/usb/gadget/rndis.c
    net/irda/irnet/irnet_ppp.c

    Linus Torvalds
     

23 Oct, 2010

1 commit

  • To accomplish this the function to register a gadget driver takes the bind
    function as a second argument. To make things clearer rename the function
    to resemble platform_driver_probe.

    This fixes many section mismatches like

    WARNING: drivers/usb/gadget/g_printer.o(.data+0xc): Section mismatch in
    reference from the variable printer_driver to the function
    .init.text:printer_bind()
    The variable printer_driver references
    the function __init printer_bind()

    All callers are fixed.

    Signed-off-by: Uwe Kleine-König
    [m.nazarewicz@samsung.com: added dbgp]
    Signed-off-by: Michał Nazarewicz
    Signed-off-by: Greg Kroah-Hartman

    Uwe Kleine-König
     

10 Aug, 2010

1 commit


15 Jul, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

03 Mar, 2010

3 commits

  • As reported by Antonio, there are cases where the ep->lock
    can be taken twice, triggering a deadlock.
    The typical sequence is :
    irq_handler
    \
    -> gadget.complete()
    \
    -> pxa27x_udc.pxa_ep_queue() : ep->lock is taken
    \
    -> gadget.complete()
    \
    -> pxa27x_udc.pxa_ep_queue() : ep->lock is taken
    ==> *deadlock*
    The patch fixes this by :
    - releasing the lock each time gadget.complete() is called
    - adding a check in handle_ep() to detect a recursive call,
    in which case the function becomes on no-op.

    The patch is still not good enough for ep0. For this unique
    endpoint, another well thought over patch will be needed.

    Reported-by: Antonio Ospite
    Tested-by: Antonio Ospite
    Signed-off-by: Robert Jarzmik
    Cc: David Brownell
    Cc: Eric Miao
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     
  • Use resource_size().

    Signed-off-by: H Hartley Sweeten
    Cc: David Brownell
    Acked-by: Robert Jarzmik
    Signed-off-by: Greg Kroah-Hartman

    H Hartley Sweeten
     
  • hardware reports wrong interrupt. Although such a situation should not
    happen, the compiler complains about this access.

    This patch adds a sanity check and generates warning to detect such
    issues.

    Signed-off-by: Enrico Scholz
    Acked-by: Robert Jarzmik
    Signed-off-by: Greg Kroah-Hartman

    Enrico Scholz
     

04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

16 Jun, 2009

3 commits

  • Since the PXA 27x UDC automatically ACK's some control
    packets such as SET_INTERFACE, the gadgets may not get a
    chance to process the request before another control packet
    is received. The Linux gadgets do not expect to receive
    setup callbacks out of order. The file storage gadget only
    saves the "highest" priority request.

    The PXA27x UDC driver must make sure it only sends one up at
    a time, allowing the gadget to make changes before
    continuing. In theory, the host would be NACK'd while the
    gadget processes the change but the UDC has already ACK'd
    the request. If another request is sent by the host that is
    not automatically ACK'd by the UDC, then the throttling
    happens properly to regain sync.

    The observed case was the file_storage gadget timing out on
    a BulkReset request because the SET_INTERFACE was being
    processed by the gadget. Since SET_INTERFACE is higher
    priority than BulkReset, the BulkReset was dropped. This
    was exacerbated by turning on the debug which delayed the
    fsg signal processing thread.

    This also fixes the "should never get in
    WAIT_ACK_SET_CONF_INTERF state here!!!" warning.

    Reported-by: Vernon Sauder
    Signed-off-by: Robert Jarzmik
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    index 51790b0..1937d8c 100644

    Robert Jarzmik
     
  • Got pxa27x_udc working on the pxa320 Nomad platform. The
    problem was that the pxa3xx UDC is not quite compatible with
    the pxa27x UDC in how it handles back-to-back control
    packets. The pxa27x probably drops them by default, but the
    pxa320 does not, and you have to detect it and set the OPC
    bit to clear the zero-length packet.

    Signed-off-by: Aric Blumer
    Signed-off-by: Robert Jarzmik
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     
  • Follow pxa27x change in OTGPH handling, and use the newly
    defined pxa27x_clear_otgph().

    Signed-off-by: Robert Jarzmik
    Acked-by: Eric Miao
    Acked-by: David Brownell

    David Brownell
     

25 Mar, 2009

6 commits

  • This patch is a merge of patches :
    - fix function doc and debug
    - cleanup loop count
    - optimize code to remove local variable and extra check
    - init 'req' before use
    - add missing iounmap call

    [dbrownell@users.sourceforge.net: capitalize IN/OUT directions in doc]

    Signed-off-by: Vernon Sauder
    [folded by Robert Jarzmik
    Signed-off-by: Robert Jarzmik
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Vernon Sauder
     
  • priv is checked not to be NULL near the beginning of the function and not
    changed subsequently, making the test redundant.

    A simplified version of the semantic patch that makes this change is as
    follows: (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression x;
    expression E;
    position p1,p2;
    @@

    if (x@p1 == NULL || ...) { ... when forall
    return ...; }
    ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
    (
    x@p2 == NULL
    |
    x@p2 != NULL
    )

    // another path to the test that is not through p1?
    @s exists@
    local idexpression r.x;
    position r.p1,r.p2;
    @@

    ... when != x@p1
    (
    x@p2 == NULL
    |
    x@p2 != NULL
    )

    @fix depends on !s@
    position r.p1,r.p2;
    expression x,E;
    statement S1,S2;
    @@

    (
    - if ((x@p2 != NULL) || ...)
    S1
    |
    - if ((x@p2 == NULL) && ...) S1
    |
    - BUG_ON(x@p2 == NULL);
    )
    //

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

    Julia Lawall
     
  • Add the vbus_draw() callback to inform the transceiver, if
    it exists, how much current may be drawn. The decision is
    taken on gadget driver side using the configuration chosen
    by the host and its bMaxPower field. Some systems can use
    the host's VBUS supply to augment or recharge a battery.
    (There's also a default of 100 mA for unconfigured devices,
    or 8 mA if they're OTG devices.)

    Signed-off-by: Robert Jarzmik
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     
  • When a transceiver driver is used, no automatic udc enable
    is done. The transceiver (OTG or not) should :
    - take care of VBus sensing
    - call usb_gadget_vbus_connect()
    - call usb_gadget_vbus_disconnect()

    The pullup should remain within this driver's management,
    either by gpio_pullup of udc_command() fields.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     
  • On vbus_session() call, optionally activate D+ pullup
    resistor and enable the udc, or deactivate D+ pullup
    resistor and disable the udc.

    It is intentional to not handle any VBus sense related irq.
    An external transceiver driver (like gpio_vbus) should
    catch VBus sense signal, and call usb_gadget_vbus_connect()
    or usb_gadget_vbus_disconnect().

    Signed-off-by: Robert Jarzmik
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     
  • Prepare pxa27x_udc to handle usb D+ pullup properly : it
    should connect the pullup resistor and disconnect it only
    if no external transceiver is handling it.

    [ dbrownell@users.sourceforge.net: kerneldoc and gpio fixes ]

    Signed-off-by: Robert Jarzmik
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     

08 Jan, 2009

1 commit


07 Jan, 2009

1 commit


27 Nov, 2008

1 commit


23 Oct, 2008

1 commit

  • The request allocation code doesn't need to check if the
    endpoint is not NULL, as the only caller in
    include/linux/usb/gadget.h, usb_ep_alloc_request() needs the
    endpoint pointer to have a correct value to trigger the
    allocation code.

    Signed-off-by: Robert Jarzmik
    Acked-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     

18 Oct, 2008

1 commit


22 Aug, 2008

1 commit

  • The new composite framework revealed a weakness in the
    pxa27x_udc driver gadget register function. Instead of
    checking if speed asked for was USB_LOW_SPEED upon
    usb_gadget_register() to deny service, it checked only
    for USB_FULL_SPEED, thus denying service to usb high
    speed capable gadgets (like g_ether).

    Signed-off-by: Robert Jarzmik
    Cc: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     

07 Aug, 2008

2 commits


22 Jul, 2008

1 commit


15 Jul, 2008

1 commit


10 Jul, 2008

1 commit

  • The pxa2xx_udc.c driver is renamed to pxa25x_udc.c (the platform
    driver name changes from pxa2xx-udc to pxa25x-udc) and the
    platform driver name of pxa27x_udc.c is fixed to pxa27x-udc.
    pxa_device_udc in devices.c is split into pxa25x and pxa27x flavors
    and the pxa27x_device_udc is enabled in pxa27x.c.

    Signed-off-by: Philipp Zabel
    Acked-by: Nicolas Pitre
    Acked-by: Eric Miao
    Signed-off-by: Russell King

    Including from Ian Molton:

    Fixes for mistakes left over from the PXA2{5,7}X UDC split.

    Signed-off-by: Ian Molton
    Signed-off-by: Russell King

    Philipp Zabel
     

16 Jun, 2008

1 commit


21 May, 2008

1 commit


15 May, 2008

1 commit

  • Minor fixes to pxa27x udc driver :
    - don't clobber driver model bus_id field
    - wrong endianess fix (no functional change; cpu is little-endian)
    - double udc disable fix
    - resume/suspend fix (OTG hold bit)
    - make driver pxa27x dependant (check cpu at runtime)

    Signed-off-by: Robert Jarzmik
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik
     

03 May, 2008

1 commit

  • Adds pxa27x udc driver to support USB peripherals on pxa27x chips.

    The driver is compatible with: Gadget Zero, the File Storage
    gadget, and the Ethernet gadget (only in CDC subset mode).

    The driver can't properly support multiple interfaces, because
    of hardware bugs without possible workaround. That means no
    RNDIS support from g_ether, and no CDC ACM support in g_serial.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Robert Jarzmik