14 Dec, 2006

1 commit

  • Run this:

    #!/bin/sh
    for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
    echo "De-casting $f..."
    perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
    done

    And then go through and reinstate those cases where code is casting pointers
    to non-pointers.

    And then drop a few hunks which conflicted with outstanding work.

    Cc: Russell King , Ian Molton
    Cc: Mikael Starvik
    Cc: Yoshinori Sato
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Greg KH
    Cc: Jens Axboe
    Cc: Paul Fulghum
    Cc: Alan Cox
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Ian Kent
    Cc: Steven French
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

08 Dec, 2006

4 commits

  • * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (76 commits)
    [ARM] 4002/1: S3C24XX: leave parent IRQs unmasked
    [ARM] 4001/1: S3C24XX: shorten reboot time
    [ARM] 3983/2: remove unused argument to __bug()
    [ARM] 4000/1: Osiris: add third serial port in
    [ARM] 3999/1: RX3715: suspend to RAM support
    [ARM] 3998/1: VR1000: LED platform devices
    [ARM] 3995/1: iop13xx: add iop13xx support
    [ARM] 3968/1: iop13xx: add iop13xx_defconfig
    [ARM] Update mach-types
    [ARM] Allow gcc to optimise arm_add_memory a little more
    [ARM] 3991/1: i.MX/MX1 high resolution time source
    [ARM] 3990/1: i.MX/MX1 more precise PLL decode
    [ARM] 3986/1: H1940: suspend to RAM support
    [ARM] 3985/1: ixp4xx clocksource cleanup
    [ARM] 3984/1: ixp4xx/nslu2: Fix disk LED numbering (take 2)
    [ARM] 3994/1: ixp23xx: fix handling of pci master aborts
    [ARM] 3981/1: sched_clock for PXA2xx
    [ARM] 3980/1: extend the ARM Versatile sched_clock implementation from 32 to 63 bit
    [ARM] 3979/1: extend the SA11x0 sched_clock implementation from 32 to 63 bit period
    [ARM] 3978/1: macro to provide a 63-bit value from a 32-bit hardware counter
    ...

    Linus Torvalds
     
  • Replace all uses of kmem_cache_t with struct kmem_cache.

    The patch was generated using the following script:

    #!/bin/sh
    #
    # Replace one string by another in all the kernel sources.
    #

    set -e

    for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
    quilt add $file
    sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
    mv /tmp/$$ $file
    quilt refresh
    done

    The script was run like this

    sh replace kmem_cache_t "struct kmem_cache"

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • SLAB_KERNEL is an alias of GFP_KERNEL.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • SLAB_ATOMIC is an alias of GFP_ATOMIC

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

06 Dec, 2006

1 commit


05 Dec, 2006

2 commits


02 Dec, 2006

12 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (103 commits)
    usbcore: remove unused argument in autosuspend
    USB: keep count of unsuspended children
    USB hub: simplify remote-wakeup handling
    USB: struct usb_device: change flag to bitflag
    OHCI: make autostop conditional on CONFIG_PM
    USB: Add autosuspend support to the hub driver
    EHCI: Fix root-hub and port suspend/resume problems
    USB: create a new thread for every USB device found during the probe sequence
    USB: add driver for the USB debug devices
    USB: added dynamic major number for USB endpoints
    USB: pegasus error path not resetting task's state
    USB: endianness fix for asix.c
    USB: build the appledisplay driver
    USB serial: replace kmalloc+memset with kzalloc
    USB: hid-core: canonical defines for Apple USB device IDs
    USB: idmouse cleanup
    USB: make drivers/usb/core/driver.c:usb_device_match() static
    USB: lh7a40x_udc remove double declaration
    USB: pxa2xx_udc recognizes ixp425 rev b0 chip
    usbtouchscreen: add support for DMC TSC-10/25 devices
    ...

    Linus Torvalds
     
  • Unlike UHCI, OHCI does not exert any DMA load on the system when no
    devices are connected. Consequently there is no advantage to doing
    an autostop other than the power savings, so we shouldn't compile the
    necessary code unless CONFIG_PM is enabled.

    This patch (as820) makes the root-hub suspend and resume routines
    conditional on CONFIG_PM. It also prevents autostop from activating
    if the device_may_wakeup flag isn't set; some people use this flag to
    alert the driver about Resume-Detect bugs in the hardware.

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

    Alan Stern
     
  • This patch (as738b) fixes numerous problems in the controller/root-hub
    suspend/resume/remote-wakeup support in ehci-hcd:

    The bus_resume() routine should wake up only the ports that
    were suspended by bus_suspend(). Ports that were already
    suspended should remain that way.

    The interrupt mask is used to detect loss of power in the
    bus_resume() routine (if the mask is 0 then power was lost).
    However bus_suspend() always sets the mask to 0. Instead the
    mask should retain its normal value, with port-change-detect
    interrupts disabled if remote wakeup is turned off.

    The interrupt mask should be reset to its correct value at the
    end of bus_resume() regardless of whether power was lost.

    bus_resume() reinitializes the operational registers if power
    was lost. However those registers are not in the aux power
    well, hence they can lose their values whenever the controller
    is put into D3. They should always be reinitialized.

    When a port-change interrupt occurs and the root hub is
    suspended, the interrupt handler should request a root-hub
    resume instead of starting up the controller all by itself.

    There's no need for the interrupt handler to request a
    root-hub resume every time a suspended port sends a
    remote-wakeup request.

    The pci_resume() method doesn't need to check for connected
    ports when deciding whether or not to reset the controller.
    It can make that decision based on whether Vaux power was
    maintained.

    Even when the controller does not need to be reset,
    pci_resume() must undo the effect of pci_suspend() by
    re-enabling the interrupt mask.

    If power was lost, pci_resume() must not call ehci_run().
    At this point the root hub is still supposed to be suspended,
    not running. It's enough to rewrite the command register and
    set the configured_flag.

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

    Alan Stern
     
  • This patch contains the following possible cleanups:
    - make the needlessly global ftdi_release_platform_dev() static
    - remove the unused usb_ftdi_elan_read_reg()
    - proper prototypes for the following functions:
    - usb_ftdi_elan_read_pcimem()
    - usb_ftdi_elan_write_pcimem()

    Note that the misplaced prototypes for the latter ones in
    drivers/usb/host/u132-hcd.c were buggy. Depending on the calling
    convention of the architecture calling one of them could have turned
    your stack into garbage.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • This patch makes the needlessly global "u132_hcd_wait" static.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Greg Kroah-Hartman

    Adrian Bunk
     
  • Certain boards seem to like to issue false overcurrent notifications, for
    example on ports that don't have anything connected to them. This looks
    like a hardware error, at the level of noise to those ports' overcurrent
    input signals (or non-debounced VBUS comparators). This surfaces to users
    as truly massive amounts of syslog spam from khubd (which is appropriate
    for real hardware problems, except for the volume from multiple ports).

    Using this new "ignore_oc" flag helps such systems work more sanely, by
    preventing such indications from getting to khubd (and spam syslog). The
    downside is of course that true overcurrent errors will be masked; they'll
    appear as spontaneous disconnects, without the diagnostics that will let
    users troubleshoot issues like short circuited cables.

    Note that the bulk of these reports seem to be with VIA southbridges, but
    I think some were with Intel ones.

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

    David Brownell
     
  • EHCI hooks for high speed electrical tests of the root hub ports.

    The expectation is that a usermode program actually triggers the test,
    making the same control request it would make for an external hub.
    Tests for peripheral upstream ports would issue a different request.
    In all cases, the hardware needs re-initialization before it could
    be used "normally" again (e.g. unplug/replug, rmmod/modprobe).

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

    David Brownell
     
  • All the other root-hub suspend or resume log messages, in ohci-hcd or
    any of the other host controller drivers, use the debug priority
    level. This patch (as815) makes the one single exception behave like
    all the rest.

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

    Alan Stern
     
  • This patch (as811) removes some stale testing code from the root-hub
    resume routine in ohci-hcd. It also adds a spin_lock_irq() call that
    inadvertently got left out of an error pathway.

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

    Alan Stern
     
  • This patch (as808b) moves the Root Hub Status Change interrupt-disable
    code in ohci-hcd back into the interrupt handler proper, to avoid the
    chance of adverse interactions with mediocre hardware implementations.

    It also deletes the root-hub status timer from within the interrupt-enable
    routine. There's no need to poll for status any more once interrupts are
    re-enabled.

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

    Alan Stern
     
  • This patch (as806) fixes a compiler warning when ohci-hcd is built
    with CONFIG_PM turned off.

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

    Alan Stern
     
  • A number of configuration file changes.

    These are mainly to replace references to ARCH_AT91RM9200 and
    ARCH_AT91SAM9261 with the common/generic ARCH_AT91. That way we don't
    need to mention every specific AT91 processor explicitly.

    Also adds the configuration option for AT91SAM9260-EK and AT91SAM9261-EK
    boards.

    Signed-off-by: Andrew Victor
    Signed-off-by: Russell King

    Andrew Victor
     

30 Nov, 2006

2 commits


22 Nov, 2006

1 commit


17 Nov, 2006

2 commits

  • When a suspended OHCI controller sees a port's status change, it sets
    both the Root-Hub-Status-Change and the Resume-Detect bits in the
    Interrupt Status register. Processing both these bits, the driver
    tries to resume the root hub twice!

    This patch (as807) fixes the bug by ignoring RD if RHSC is set. It
    also prints a slightly more informative log message when a
    remote-wakeup event occurs.

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

    Alan Stern
     
  • This patch (as822) prevents the OHCI autostop mechanism from kicking in
    if the root hub is not able or not allowed to issue wakeup requests.

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

    Alan Stern
     

18 Oct, 2006

3 commits

  • This patch (as798) adds a workaround to uhci-hcd. At least one Asus
    motherboard is wired in such a way that any device attached to a
    suspended UHCI controller will prevent the system from entering
    suspend-to-RAM by immediately waking it up. The only way around the
    problem is to turn the controller off instead of suspending it.

    This fixes Bugzilla #6193.

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

    Alan Stern
     
  • The OHCI bus glue for the Philips PNX chips is missing a few calls.

    - Bus suspend/resume were wrongly omitted in the original submission.
    - Two new calls were added since that glue was submitted:
    * Root hub irq enable call
    * Shutdown hook for usbcore

    Plus usb_bus.hcpriv has now been removed from usbcore.

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

    David Brownell
     
  • This reverts 26f953fd884ea4879585287917f855c63c6b2666 which caused
    resume problems on the mac mini.

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

    Greg Kroah-Hartman
     

06 Oct, 2006

1 commit


05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

04 Oct, 2006

1 commit


29 Sep, 2006

4 commits

  • Thanks to Andrew for the original patch for this.
    I need to upgrade my version of gcc to catch these things...

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This patch (as790b) adds "autostop" support to ohci-hcd: the driver
    will automatically stop the host controller when no devices have been
    connected for at least one second. This feature is useful when the
    USB autosuspend facility isn't available, such as when
    CONFIG_USB_SUSPEND hasn't been set.

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

    Alan Stern
     
  • The autosuspend technique used by ohci-hcd doesn't mesh well with the
    newer USB core autosuspend code. This patch (as789) removes ohci-hcd's
    autosuspend support. Now the driver will be usable, but it won't
    automatically go into a low-power state when no devices are connected.
    That's for a later patch.

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

    Alan Stern
     
  • We want to avoid legacy APIs like pci_find_slot().

    Signed-off-by: Alan Cox
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

28 Sep, 2006

5 commits

  • This revamps handling of the hardware "async advance" IRQ, and its watchdog
    timer. Basically it dis-entangles that important timeout from the others,
    simplifying the associated state and code to make it more robust.

    This reportedly improves behavior of EHCI on some systems with VIA chips,
    and AFAIK won't affect non-VIA hardware. VIA systems need this code to
    recover from silcon bugs whereby the "async advance" IRQ isn't issued.

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

    David Brownell
     
  • When ohci-hcd is shutting down (for rmmod or PC-card removal), there is
    a window when the device is shut down, HC communication area (->hcca)
    is freed, but the core has not called "free_irq" yet. If another device
    triggers a shared interrupt in this window, we oops when trying to
    access the freed ->hcca.

    This patch removes the window by calling free_irq before ->hcca is freed.

    The patch is tested at the PC hotplug test rig at Stratus, and with
    rmmod by Rafael Wysocki.

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

    Pete Zaitcev
     
  • The purpose of this patch is to split off the case when a device does
    not reply on the lower level (which is reported by HC hardware), and
    a case when the device accepted the request, but does not reply at
    upper level. This redefinition allows to diagnose issues easier,
    without asking the user if the -110 happened "immediately".

    The usbmon splits such cases already thanks to its timestamp, but
    it's not always available.

    I adjusted all drivers which I found affected (by searching for "urb").
    Out of tree drivers may suffer a little bit, but I do not expect much
    breakage. At worst they may print a few messages.

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

    Pete Zaitcev
     
  • This "u132-hcd" module is one half of the "driver" for
    ELAN's U132 which is a USB to CardBus OHCI controller
    adapter. This module needs the "ftdi-elan" module in
    order to communicate to CardBus OHCI controller inserted
    into the U132 adapter.

    When the "ftdi-elan" module detects a supported CardBus
    OHCI controller in the U132 adapter it loads this "u132-hcd"
    module.

    Upon a successful device probe() the single workqueue
    is started up which does all the processing of commands
    from the USB core that implement the host controller.

    The workqueue maintains the urb queues and issues commands
    via the functions exported by the "ftdi-elan" module. Each
    such command will result in a callback.

    Note that the "ftdi-elan" module is a USB client driver.

    Note that this "u132-hcd" module is a (cut-down OHCI)
    host controller.

    Thus we have a topology with the parent of a host controller
    being a USB client! This really stresses the USB subsystem
    semaphore/mutex handling in the module removal.

    Signed-off-by: Tony Olech
    Signed-off-by: Greg Kroah-Hartman

    Tony Olech
     
  • Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman