04 Jul, 2008

1 commit

  • If the SM501 and another platform driver, such as the SM501
    then we end up defining PLATFORM_DRIVER twice. This patch
    seperated the SM501 onto a seperate define of SM501_OHCI_DRIVER
    so that it can be selected without overwriting the original
    definition.

    Signed-off-by: Ben Dooks
    Acked-by: David Brownell
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Ben Dooks
     

03 Apr, 2008

1 commit

  • Code inspection discovered in 2 places timers were being incorrectly setup
    using round_jiffies_relative(HZ). The timer would then fire at time (0 <
    HZ).

    Fix them to use round_jiffies(jiffies + HZ);

    Signed-off-by: Richard Kennedy
    Cc: Alan Stern
    Cc: David Brownell
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Richard Kennedy
     

02 Feb, 2008

4 commits

  • usb: ohci-sm501 driver V2

    This patch adds sm501 ohci support. It's all very straightforward with the
    exception of dma_declare_coherent_memory() and HCD_LOCAL_MEM. Together they
    are used to ensure that usb data is allocated using dma_alloc_coherent(),
    and that only valid dma memory is used to allocate from. This driver is
    a platform device, and the mfd driver sm501.c is already creating one
    usb host controller instance per sm501.

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

    Magnus Damm
     
  • add support for SuperH OHCI.

    supported CPU are:
    - SH7720
    - SH7721
    - SH7763

    Signed-off-by: Yoshihiro Shimoda
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Yoshihiro Shimoda
     
  • The OHCI driver's IRQ handler, while processing a WDH interrupt, masks
    and unmasks it. I believe this is both broken (the write may still be
    posted during the donelist processing it's trying to safeguard) and
    useless as this IRQ may not be reissued until it's acked (unless this
    legacy code is an uncommented workaround for some chip erratum).

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

    Benjamin Herrenschmidt
     
  • We should not have multiple line files in sysfs, this moves the data to
    debugfs instead, like the UHCI driver.

    Signed-off-by: Tony Jones
    Cc: Kay Sievers
    Cc: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Tony Jones
     

26 Jan, 2008

1 commit


18 Dec, 2007

1 commit

  • The OHCI IRQ handler has an optimisation that avoids reading some
    chip registers when the controller reports that the interrupt was
    triggered *only* because completed requests were written into the
    controller's "done list" and handed to the host.

    This mechanism can't be used on some controllers. Among others, it
    fails for the SA1111 and the AMCC 440EP PowerPC processor.

    This patch removes the optimisation and makes the code clearer.

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

    Benjamin Herrenschmidt
     

26 Oct, 2007

1 commit


13 Oct, 2007

4 commits

  • This adds SSB bus glue for the USB OHCI HCD.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville
    Signed-off-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Michael Buesch
     
  • This patch (as975) reorganizes the way ohci-hcd sets urb->status. It
    now keeps the information in a local variable until the last moment.

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

    Alan Stern
     
  • This patch (as954) implements a suggestion of David Brownell's. Now
    the host controller drivers are responsible for linking and unlinking
    URBs to/from their endpoint queues. This eliminates the possiblity of
    strange situations where usbcore thinks an URB is linked but the HCD
    thinks it isn't. It also means HCDs no longer have to check for URBs
    being dequeued before they were fully enqueued.

    In addition to the core changes, this requires changing every host
    controller driver and the root-hub URB handler. For the most part the
    required changes are fairly small; drivers have to call
    usb_hcd_link_urb_to_ep() in their urb_enqueue method,
    usb_hcd_check_unlink_urb() in their urb_dequeue method, and
    usb_hcd_unlink_urb_from_ep() before giving URBs back. A few HCDs make
    matters more complicated by the way they split up the flow of control.

    In addition some method interfaces get changed. The endpoint argument
    for urb_enqueue is now redundant so it is removed. The unlink status
    is required by usb_hcd_check_unlink_urb(), so it has been added to
    urb_dequeue.

    Signed-off-by: Alan Stern
    CC: David Brownell
    CC: Olav Kongas
    CC: Tony Olech
    CC: Yoshihiro Shimoda
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • The ZF Micro OHCI controller exhibits unexpected behavior that seems to be
    related to high load. Under certain conditions, the controller will
    complete a TD, remove it from the endpoint's queue, and fail to add it to
    the donelist. This causes the endpoint to appear to stop responding. Worse,
    if the device is removed while in that state, OHCI will hang while waiting
    for the orphaned TD to complete. The situation is not recoverable without
    rebooting.

    This fix enhances the scope of the existing OHCI_QUIRK_ZFMICRO flag:

    1. A watchdog routine periodically scans the OHCI structures to check
    for orphaned TDs. In these cases the TD is taken back from the
    controller and completed normally.

    2. If a device is removed while the endpoint is hung but before the
    watchdog catches the situation, any outstanding TDs are taken back
    from the controller in the 'sanitize' phase.

    The ohci-hcd driver used to print "INTR_SF lossage" in this situation;
    this changes it to the universally accurate "ED unlink timeout". Other
    instances of this message presumably have different root causes.

    Both this Compaq quirk and a NEC quirk are now properly compiled out for
    non-PCI builds of this driver.

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

    Mike Nuss
     

20 Jul, 2007

1 commit

  • Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).

    Here is a short excerpt of the semantic patch performing
    this transformation:

    @@
    type T2;
    expression x;
    identifier f,fld;
    expression E;
    expression E1,E2;
    expression e1,e2,e3,y;
    statement S;
    @@

    x =
    - kmalloc
    + kzalloc
    (E1,E2)
    ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
    - memset((T2)x,0,E1);

    @@
    expression E1,E2,E3;
    @@

    - kzalloc(E1 * E2,E3)
    + kcalloc(E1,E2,E3)

    [akpm@linux-foundation.org: get kcalloc args the right way around]
    Signed-off-by: Yoann Padioleau
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Acked-by: Russell King
    Cc: Bryan Wu
    Acked-by: Jiri Slaby
    Cc: Dave Airlie
    Acked-by: Roland Dreier
    Cc: Jiri Kosina
    Acked-by: Dmitry Torokhov
    Cc: Benjamin Herrenschmidt
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Pierre Ossman
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Acked-by: Greg KH
    Cc: James Bottomley
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

13 Jul, 2007

3 commits

  • USB HCD glue updates to reflect the new PS3 unifed device support.
    - Fixed remove() routine.
    - Added shutdown() routine.
    - Added request_mem_region() call.
    - Fixed MODULE_ALIAS().
    - Made a proper fix for the hack done to support muti-platform in commit
    48fda45120a819ca40cadc50144b55bff1c4c78d.

    Signed-off-by: Geoff Levand
    Cc: Paul Mackerras
    Signed-off-by: Greg Kroah-Hartman

    Geoff Levand
     
  • This patch fixes a silicon bug in some NEC OHCI chips. The bug appears
    at random times and is very, very difficult to reproduce. Without the
    following patch, Linux would shut the chip and its associated devices
    down. In Apple PowerBooks this leads to an unusable keyboard and mouse
    (SSH still working). The idea of restarting the chip is taken from
    public Darwin code.

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

    Michael Hanselmann
     
  • This patch (as887) changes the way ehci-hcd and ohci-hcd handle a loss
    of VBUS power during suspend. In order for the USB-persist facility
    to work correctly, it is necessary for low- and full-speed devices
    attached to a high-speed port to be handed back to the companion
    controller during resume processing.

    This entails three changes: adding code to ehci-hcd to perform the
    handover, removing code from ohci-hcd to turn off ports during
    root-hub reinit, and adding code to ohci-hcd to turn on ports during
    PCI controller resume. (Other bus glue resume methods for platforms
    supporting high-speed controllers would need a similar change, if any
    existed.)

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

    Alan Stern
     

09 May, 2007

1 commit


28 Apr, 2007

1 commit

  • Duplicate what Zach Brown did for pr_debug in commit
    8b2a1fd1b394c60eaa2587716102dd5e9b4e5990

    [akpm@linux-foundation.org: fix a couple of things which broke]
    Signed-off-by: Dan Williams
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     

17 Feb, 2007

1 commit


08 Feb, 2007

4 commits

  • USB OHCI driver bus glue for the PS3 game console.

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

    Geoff Levand
     
  • Restructure the ohci_hcd_mod_init error handling code in to better support
    the multiple platform drivers. This does not change the functionality.

    Signed-off-by: Benjamin Herrenschmidt
    Cc: David Brownell
    Signed-off-by: Geoff Levand
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     
  • PPC embedded systems can have a ohci controller builtin. In the
    new model, it will end up as a driver on the of_platform bus,
    this patches takes care of them.

    Signed-off-by: Sylvain Munaut
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Sylvain Munaut
     
  • The previous model had the module_init & module_exit function in the
    bus glue .c files themselves. That's a problem if several glues need
    to be selected at once and the driver is built has module. This case
    is quite common in embedded system where you want to handle both the
    integrated ohci controller and some extra controller on PCI.

    The ohci-hcd.c file now provide the module_init & module_exit and
    appropriate driver registering/unregistering is done conditionally,
    using #ifdefs.

    Signed-off-by: Sylvain Munaut
    Acked-by: David Brownell
    Signed-off-by: Greg Kroah-Hartman

    Sylvain Munaut
     

21 Dec, 2006

2 commits


08 Dec, 2006

1 commit

  • * '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
     

02 Dec, 2006

2 commits

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

17 Nov, 2006

1 commit

  • 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
     

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
     

29 Sep, 2006

1 commit

  • 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
     

28 Sep, 2006

5 commits

  • 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
     
  • If some problem occurs during ehci startup, for instance, request_irq fails,
    echi hcd driver tries it best to cleanup, but fails to unregister reboot
    notifier, which in turn leads to crash on reboot/poweroff.

    The following patch resolves this problem by not using reboot notifiers
    anymore, but instead making ehci/ohci driver get its own shutdown method. For
    PCI, it is done through pci glue, for everything else through platform driver
    glue.

    One downside: sa1111 does not use platform driver stuff, and does not have its
    own shutdown hook, so no 'shutdown' is called for it now. I'm not sure if it
    is really necessary on that platform, though.

    Signed-off-by: Aleks Gorelov
    Cc: Alan Stern
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Aleksey Gorelov
     
  • Move to .

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

    David Brownell
     
  • inlined is the patch that adds basic support for USB OHCI controller
    support for PNX4008 Philips PNX4008 ARM board. Due to HW design, it
    depends on I2C driver for PNX4008 which I've recetnly posted to LKML and
    i2c at lm-sensors.

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

    Vitaly Wool
     
  • This teaches OHCI to use the root hub status change (RHSC) IRQ, bypassing
    root hub timers most of the time and switching over to the "new" root hub
    polling scheme. It's complicated by the fact that implementations of OHCI
    trigger and ack that IRQ differently (the spec is vague there).

    Avoiding root hub timers helps mechanisms like "dynamic tick" leave the
    CPU in lowpower modes for longer intervals.

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

    David Brownell
     

03 Aug, 2006

1 commit

  • OHCI updates for AT91 series processors:

    - Get ready for at91sam926x processors (ARMv5tej not ARMv4t)

    - Suspend/resume support now behaves properly

    - In "standby" mode, OHCI can be a source of system wakeup events
    (remote wakeup, device connect/disconnect, etc)

    And minor cleanups.

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

    David Brownell
     

13 Jul, 2006

1 commit


01 Jul, 2006

1 commit