13 Oct, 2007

7 commits

  • This patch (as979) removes the last vestiges of urb->status from the
    host controller drivers and the root-hub emulator. Now the field
    doesn't get set until just before the URB's completion routine is
    called.

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

    Alan Stern
     
  • 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 (as972) changes ohci-hcd so that after an error occurs, the
    remaining TDs for the URB will be skipped over entirely instead of
    going through the donelist. This enables the driver to give back the
    URB as soon as the error is detected, avoiding the need to store the
    error status in urb->status.

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

    Alan Stern
     
  • This patch (as970) adds a new urb->unlinked field, which is used to
    store the status of unlinked URBs since we can't use urb->status for
    that purpose any more. To help simplify the HCDs, usbcore will check
    urb->unlinked before calling the completion handler; if the value is
    set it will automatically override the status reported by the HCD.

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

    Alan Stern
     
  • This patch (as969) continues the ongoing changes to the way HCDs
    report URB statuses. The programming interface has been simplified by
    making usbcore responsible for clearing urb->hcpriv and for setting
    -EREMOTEIO status when an URB with the URB_SHORT_NOT_OK flag ends up
    as a short transfer.

    By moving the work out of the HCDs, this removes a fair amount of
    repeated code.

    Signed-off-by: Alan Stern
    CC: David Brownell
    CC: Olav Kongas
    CC: Yoshihiro Shimoda
    CC: Tony Olech
    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
     

21 Dec, 2006

1 commit


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
     

19 Apr, 2005

1 commit

  • This adds a quirk to the OHCI driver that lets it work with an old
    Compaq implementation. It also removes some needless strings from
    the non-debug version of the driver.

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

    David Brownell
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds