01 Oct, 2005

1 commit


22 Sep, 2005

1 commit


13 Sep, 2005

3 commits

  • This appears to help some folk, please merge.
    This patch relaxes reset timings. There are some reports that it
    helps make enumeration work better on some high speed devices.

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

    David Brownell
     
  • Routine cases like handoff-to-companion shouldn't trigger diagnostics.
    This gets rid of some recently added log spamming. It's routine for
    hub_port_wait_reset() to return -ENOTCONN to indicate handoff from
    highspeed hubs to companions, so an error message is incorrect.

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

    David Brownell
     
  • This patch (as549) introduces two small changes in the HCD glue layer.
    The first simply removes a redundant test. The second allows root-hub
    polling to continue for a single iteration after a host controller dies;
    this is needed for the patch that follows.

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

    Alan Stern
     

09 Sep, 2005

13 commits

  • Linus Torvalds
     
  • This adds think_time to the usb_tt struct and sets it appropriately
    (measured in ns); this can help us implement better split transaction
    scheduling.

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

    david-b@pacbell.net
     
  • Avoid an annoying message that can appear if devices are disconnected
    in the middle of a USB scatterlist operation.

    Message noted in http://bugzilla.kernel.org/show_bug.cgi?id=4373
    (but the real issue there seems to be a SCSI level hang).

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

    david-b@pacbell.net
     
  • Use a more correct calculation for highspeed bit times.

    http://bugzilla.kernel.org/show_bug.cgi?id=3604

    This sort if thing might start to make a difference now that the high
    speed periodic scheduler is more complete -- and even getting used.

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

    david-b@pacbell.net
     
  • This patch (as556) adds support for unbinding the usb_generic "driver".
    That driver only binds to USB devices, as opposed to interfaces, and it
    does nothing much besides marking which struct device's go with an
    overall USB device plus providing suspend/resume methods. Now that
    users can unbind drivers at will using the sysfs "unbind" attribute, we
    need a rational way of dealing with USB devices that are no longer under
    full control of the USB stack. The patch handles this by unconfiguring
    the device, thereby removing all the interfaces and their associated
    drivers and children.

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

    Alan Stern
     
  • This patch (as555) modifies the already-awkward
    usb_lock_device_for_reset routine in usbcore by adding a timeout. The
    whole point of the routine is that the caller wants to acquire some
    semaphores in the wrong order; protecting against the possibility of
    deadlock by timing out seems only prudent.

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

    Alan Stern
     
  • This patch (as554) makes the hub driver disconnect any child USB devices
    when it is unbound from a hub. Normally this will never happen, but
    there are a few oddball ways to unbind the hub driver while leaving the
    children intact. For example, the new "unbind" sysfs attribute can be
    used for this purpose.

    Given that unbinding hubs with children is now safe, the patch also
    removes the code that prevented people from doing so using usbfs.

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

    Alan Stern
     
  • This patch (as553) merely moves some code and deletes an unneeded test in
    the hub driver. This is in preparation for the patch that follows.

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

    Alan Stern
     
  • 29 July 2005, Cambridge, MA:

    This afternoon Alan Stern submitted a patch to remove the URB_ASYNC_UNLINK
    flag from the Linux kernel. Mr. Stern explained, "This flag is a relic
    from an earlier, less-well-designed system. For over a year it hasn't
    been used for anything other than printing warning messages."

    An anonymous spokesman for the Linux kernel development community
    commented, "This is exactly the sort of thing we see happening all the
    time. As the kernel evolves, support for old techniques and old code can
    be jettisoned and replaced by newer, better approaches. Proprietary
    operating systems do not have the freedom or flexibility to change so
    quickly."

    Mr. Stern, a staff member at Harvard University's Rowland Institute who
    works on Linux only as a hobby, noted that the patch (labelled as548) did
    not update two files, keyspan.c and option.c, in the USB drivers' "serial"
    subdirectory. "Those files need more extensive changes," he remarked.
    "They examine the status field of several URBs at times when they're not
    supposed to. That will need to be fixed before the URB_ASYNC_UNLINK flag
    is removed."

    Greg Kroah-Hartman, the kernel maintainer responsible for overseeing all
    of Linux's USB drivers, did not respond to our inquiries or return our
    calls. His only comment was "Applied, thanks."

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

    Alan Stern
     
  • This patch (as551) fixes another little problem recently added to the
    USB core. Someone didn't fix the type of the first argument to
    unregister_chrdev_region.

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

    Alan Stern
     
  • This patch introduces a /sys/class/usb_device/ class
    where every connected usb-device will show up:

    tree /sys/class/usb_device/
    /sys/class/usb_device/
    |-- usb1.1
    | |-- dev
    | `-- device -> ../../../devices/pci0000:00/0000:00:1d.0/usb1
    |-- usb2.1
    | |-- dev
    | `-- device -> ../../../devices/pci0000:00/0000:00:1d.1/usb2
    ...

    The presence of the "dev" file lets udev create real device nodes.
    kay@pim:~/src/linux-2.6> tree /dev/bus/usb/
    /dev/bus/usb/
    |-- 1
    | `-- 1
    |-- 2
    | `-- 1
    ...

    udev rule:
    SUBSYSTEM="usb_device", PROGRAM="/sbin/usb_device %k", NAME="%c"
    (echo $1 | /bin/sed 's/usb\([0-9]*\)\.\([0-9]*\)/bus\/usb\/\1\/\2/')

    This makes libusb pick up the real nodes instead of the mounted usbfs:
    export USB_DEVFS_PATH=/dev/bus/usb

    Background:
    All this makes it possible to manage usb devices with udev instead of
    the devfs solution. We are currently working on a pam_console/resmgr
    replacement driven by udev and a pam-helper. It applies ACL's to device
    nodes, which is required for modern desktop functionalty like
    "Fast User Switching" or multiple local login support.

    New patch with its own major. I've succesfully disabled usbfs and use real
    nodes only on my box. With: "export USB_DEVFS_PATH=/dev/bus/usb" libusb picks
    up the udev managed nodes instead of reading usbfs files.

    This makes udev to provide symlinks for libusb to pick up:
    SUBSYSTEM="usb_device", PROGRAM="/sbin/usbdevice %k", SYMLINK="%c"

    /sbin/usbdevice:
    #!/bin/sh
    echo $1 | /bin/sed 's/usbdev\([0-9]*\)\.\([0-9]*\)/bus\/usb\/\1\/\2/'

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This patch removes CONFIG_PCI_NAMES.

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

    Adrian Bunk
     

08 Sep, 2005

1 commit


06 Sep, 2005

1 commit

  • Driver core: link device and all class devices derived from it.

    To ease the task of locating class devices derived from a certain
    device create symlinks from parent device to its class devices.
    Change USB host class device name from usbX to usb_hostX to avoid
    conflict when creating aforementioned links.

    Tweaked by Greg to have the symlink be "class_name:class_device_name" in
    order to prevent duplicate links.

    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     

05 Sep, 2005

1 commit

  • This adds type-checking to pm_message_t, so that people can't confuse it
    with int or u32. It also allows us to fix "disk yoyo" during suspend (disk
    spinning down/up/down).

    [We've tried that before; since that cpufreq problems were fixed and I've
    tried make allyes config and fixed resulting damage.]

    Signed-off-by: Pavel Machek
    Signed-off-by: Alexander Nyberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     

30 Jul, 2005

3 commits

  • This patch does the same swap, i.e. use the ISO macro if (isoc).
    Additionally, it fixes the return value - the usb_calc_bus_time function
    returns the time in nanoseconds (I didn't notice that before) while the
    HS_USECS and HS_USECS_ISO are microseconds. This fixes the function to
    return nanoseconds always, and adjusts ehci-q.c (the only high-speed
    caller of the function) to wrap the call in NS_TO_US().

    Signed-off-by: Dan Streetman
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Dan Streetman
     
  • This patch handles a rarely-encountered failure mode in usbcore. It's
    legal for device_add to fail (although now it happens even more rarely
    than before since failure to bind a driver is no longer fatal). So when
    we destroy the interfaces in a configuration, we shouldn't try to delete
    ones which weren't successfully registered. Also, failure to register an
    interface shouldn't be fatal either -- I think; you may disagree about
    this part of the patch.

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

    Alan Stern
     
  • This patch fixes an information leak in the usbfs snoop facility:
    uninitialized data from __get_free_page can be returned to userspace and
    written to the system log. It also improves the snoop output by printing
    the wLength value.

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

    Alan Stern
     

13 Jul, 2005

5 commits


12 Jul, 2005

1 commit


28 Jun, 2005

5 commits

  • This one-liner fixes a test for interfaces that are already resumed.

    It would be nice if this could get into 2.6.12, but it's not critical
    since it only affects people doing selective (runtime) suspend/resume.

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

    Alan Stern
     
  • This patch makes usbcore automatically allocate and register the root hub
    device for a new host controller when the controller is registered. This
    way the HCDs don't all have to include the same boilerplate code. As a
    pleasant side benefit, the register_root_hub routine can now be made
    static and not EXPORTed.

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

    Alan Stern
     
  • This patch removes the hub_set_power_budget routine, which was used by a
    couple of HCDs to indicate that the root hub was running on battery power.
    In its place is a new field added to struct usb_hcd, which HCDs can set
    before the root hub is registered. Special-case code in the hub driver
    knows to look at this field when configuring a root hub.

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

    Alan Stern
     
  • This is a revised version of an earlier patch to add support to usbcore
    for driving root hubs by interrupts rather than polling.

    There's a temporary flag added to struct usb_hcd, marking devices whose
    drivers are aware of the new mechanism. By default that flag doesn't get
    set so drivers will continue to see the same polling behavior as before.
    This way we can convert the HCDs one by one to use interrupt-based event
    reporting, and the temporary flag can be removed when they're all done.

    Also included is a small change to the hcd_disable_endpoint routine.
    Although endpoints normally shouldn't be disabled while a controller is
    suspended, it's legal to do so when the controller's driver is being
    rmmod'ed.

    Lastly the patch adds a new callback, .hub_irq_enable, for use by HCDs
    where the root hub's port-change interrupts are level-triggered rather
    than edge-triggered. The callback is invoked each time khubd has finished
    processing a root hub, to let the HCD know that the interrupt can safely
    be re-enabled.

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

    Alan Stern
     
  • This patch turns a user mode driver error into a hard error, and updates
    the relevant diagnostic slightly to help troubleshooting. gphoto was
    known to have this problem, hopefully it is now fixed (they have had
    plenty of warning...)

    This had been left as a soft error to give various user mode drivers a
    change to be properly fixed, with the statement that starting in about
    2.6.10 it would be changed. It had been mostly safe as a soft error ...
    but that can not be guaranteed. Now that a year has passed, it's time to
    really insist that the user mode drivers finally fix their relevant bugs.

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

    David Brownell
     

26 Jun, 2005

1 commit

  • 1. Establish a simple API for process freezing defined in linux/include/sched.h:

    frozen(process) Check for frozen process
    freezing(process) Check if a process is being frozen
    freeze(process) Tell a process to freeze (go to refrigerator)
    thaw_process(process) Restart process
    frozen_process(process) Process is frozen now

    2. Remove all references to PF_FREEZE and PF_FROZEN from all
    kernel sources except sched.h

    3. Fix numerous locations where try_to_freeze is manually done by a driver

    4. Remove the argument that is no longer necessary from two function calls.

    5. Some whitespace cleanup

    6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
    cleared before setting PF_FROZEN, recalc_sigpending does not check
    PF_FROZEN).

    This patch does not address the problem of freeze_processes() violating the rule
    that a task may only modify its own flags by setting PF_FREEZE. This is not clean
    in an SMP environment. freeze(process) is therefore not SMP safe!

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

    Christoph Lameter
     

24 Jun, 2005

2 commits


21 Jun, 2005

2 commits