02 Dec, 2006

36 commits

  • On some controllers (ICHs in piix mode), there is *NO* reliable way to
    determine device presence other than issuing IDENTIFY and see how the
    transaction proceeds by watching the TF status register.

    libata acted this way before irq-pio and phantom devices caused very
    little problem but now that IDENTIFY is performed using IRQ drive PIO,
    such phantom devices now result in multiple 30sec timeouts during
    boot.

    This patch implements ATA_FLAG_DETECT_POLLING. If a LLD sets this
    flag, libata core issues the initial IDENTIFY in polling mode and if
    the initial data transfer fails w/ HSM violation, the port is
    considered to be empty thus replicating the old libata and IDE
    behavior.

    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Many drives support LBA48 even when its capacity is smaller than
    1<<
    Cc: Danny Kukawka
    Cc: Stefan Seyfried
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • libata EH used to perform ata_set_mode() iff the EH session performed
    reset as indicated by ATA_EHI_DID_RESET. This is incorrect because
    ->dev_config() called by revalidation is allowed to modify transfer
    mode which ata_set_mode() should take care of. This patch implements
    the following two flags.

    * ATA_EHI_SETMODE: set during EH to schedule ata_set_mode(). Both new
    device attachment and revalidation set this flag.

    * ATA_EHI_POST_SETMODE: set while the device is revalidated after
    ata_set_mode(). Post-setmode revalidation is different from initial
    configuaration and EH revalidation in that ->dev_config() is not
    allowed tune transfer mode. LLD can use this flag to determine
    whether it's allowed to tune transfer mode. Note that POST_SETMODE
    ->dev_config() is guaranteed to be preceded by non-POST_SETMODE
    ->dev_config().

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Implement ehi flag ATA_EHI_PRINTINFO. This flag is set when device
    configuration needs to print out device info. This used to be handled
    by @print_info argument to ata_dev_configure() but LLDs also need to
    know about it in ->dev_config() callback.

    This patch replaces @print_info w/ ATA_EHI_PRINTINFO and make sata_sil
    print workaround messages only on the initial configuration.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Separate out sata_port_hardreset() from sata_std_hardreset(). This
    will be used by LLD hardreset implementation and later by PMP.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • ata_irq_on() isn't used outside of libata core layer. The function is
    TF/SFF interface specific but currently used by core path with some
    hack too. Move it from include/linux/libata.h to
    drivers/ata/libata-sff.c.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • libata waits for !BSY even when the status register reports 0xff.
    This causes long boot delays when D8 isn't pulled down properly. This
    patch does the followings.

    * don't wait if status register is 0xff in all wait functions

    * make ata_busy_sleep() return 0 on success and -errno on failure.
    -ENODEV is returned on 0xff status and -EBUSY on other failures.

    * make ata_bus_softreset() succeed on 0xff status. 0xff status is not
    reset failure. It indicates no device. This removes unnecessary
    retries on such ports. Note that the code change assumes unoccupied
    port reporting 0xff status does not produce valid device signature.

    Signed-off-by: Tejun Heo
    Cc: Joe Jin
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • needs a changelog

    Signed-off-by: Paul Mundt
    Acked-by: Russell King
    Cc: Jeff Garzik
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Paul Mundt
     
  • Signed-off-by: Alan Cox
    Cc: Jeff Garzik
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • [deweerdt@free.fr: build fix]
    Signed-off-by: Alan Cox
    Signed-off-by: Frederik Deweerdt
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (31 commits)
    [MIPS] Remove duplicate ISA DMA code for 0 DMA channel case.
    [MIPS] Remove unused definition of cpu_to_lelongp()
    [MIPS] Remove userspace proofing from .
    [MIPS] Remove old junk left from old atomic_lock.
    [MIPS] Use conditional traps for BUG_ON on MIPS II and better.
    [MIPS] mips HPT cleanup: make clocksource_mips public
    [MIPS] do_IRQ cleanup
    [MIPS] Avoid dupliate D-cache flush on R400C / R4400 SC and MC variants.
    [MIPS] Remove redundant r4k_blast_icache() calls
    [MIPS] Work around bogus gcc warnings.
    [MIPS] Fix double inclusions
    [MIPS] use generic_handle_irq, handle_level_irq, handle_percpu_irq
    [MIPS] IRQ cleanups
    [MIPS] mips hpt cleanup: get rid of mips_hpt_init
    [MIPS] PB1200: Remove duplicate definitions
    [MIPS] Fix alignment hole in struct cache_desc; shrink struct.
    [MIPS] Oprofile: kernel support for the R10000.
    [MIPS] Remove unused R10000 performance counter definitions.
    [MIPS] Add support for kexec
    [MIPS] Don't print presence of WAIT instruction on bootup.
    ...

    Linus Torvalds
     
  • * 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
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (28 commits)
    PCI: make arch/i386/pci/common.c:pci_bf_sort static
    PCI: ibmphp_pci.c: fix NULL dereference
    pciehp: remove unnecessary pci_disable_msi
    pciehp: remove unnecessary free_irq
    PCI: rpaphp: change device tree examination
    PCI: Change memory allocation for acpiphp slots
    i2c-i801: SMBus patch for Intel ICH9
    PCI: irq: irq and pci_ids patch for Intel ICH9
    PCI: pci_{enable,disable}_device() nestable ports
    PCI: switch pci_{enable,disable}_device() to be nestable
    PCI: arch/i386/kernel/pci-dma.c: ioremap balanced with iounmap
    pci/i386: style cleanups
    PCI: Block on access to temporarily unavailable pci device
    pci: fix __pci_register_driver error handling
    pci: clear osc support flags if no _OSC method
    acpiphp: fix missing acpiphp_glue_exit()
    acpiphp: fix use of list_for_each macro
    Altix: Initial ACPI support - ROM shadowing.
    Altix: SN ACPI hotplug support.
    Altix: Add initial ACPI IO support
    ...

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
    Driver core: show drivers in /sys/module/
    Documentation/driver-model/platform.txt update/rewrite
    Driver core: platform_driver_probe(), can save codespace
    driver core: Use klist_remove() in device_move()
    driver core: Introduce device_move(): move a device to a new parent.
    Driver core: make drivers/base/core.c:setup_parent() static
    driver core: Introduce device_find_child().
    sysfs: sysfs_write_file() writes zero terminated data
    cpu topology: consider sysfs_create_group return value
    Driver core: Call platform_notify_remove later
    ACPI: Change ACPI to use dev_archdata instead of firmware_data
    Driver core: add dev_archdata to struct device
    Driver core: convert sound core to use struct device
    Driver core: change mem class_devices to be real devices
    Driver core: convert fb code to use struct device
    Driver core: convert firmware code to use struct device
    Driver core: convert mmc code to use struct device
    Driver core: convert ppdev code to use struct device
    Driver core: convert PPP code to use struct device
    Driver core: convert cpuid code to use struct device
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial:
    Fix typos in drivers/isdn/hisax/isdnl2.c
    Fix typos in doc and comments
    BUG_ON conversion for fs/aio.c
    BUG_ON conversion for drivers/mmc/omap.c
    BUG_ON conversion for drivers/media/video/pwc/pwc-if.c
    Fix misc .c/.h comment typos
    Fix misc Kconfig typos
    Fix typos in /Documentation : Misc
    Fix typos in /Documentation : 'U-Z'
    Fix typos in /Documentation : 'T''
    Fix jiffies.h comment
    tabify MAINTAINERS
    fix spelling error in include/linux/kernel.h
    mqueue.h: don't include linux/types.h

    Linus Torvalds
     
  • Show the drivers, which belong to the module:
    $ ls -l /sys/module/usbcore/drivers/
    hub -> ../../../bus/usb/drivers/hub
    usb -> ../../../bus/usb/drivers/usb
    usbfs -> ../../../bus/usb/drivers/usbfs

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

    Kay Sievers
     
  • This defines a new platform_driver_probe() method allowing the driver's
    probe() method, and its support code+data, to safely live in __init
    sections for typical system configurations.

    Many system-on-chip processors could benefit from this API, to the tune
    of recovering hundreds to thousands of bytes per driver. That's memory
    which is currently wasted holding code which can never be called after
    system startup, yet can not be removed. It can't be removed because of
    the linkage requirement that pointers to init section code (like, ideally,
    probe support) must not live in other sections (like driver method tables)
    after those pointers would be invalid.

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

    David Brownell
     
  • Provide a function device_move() to move a device to a new parent device. Add
    auxilliary functions kobject_move() and sysfs_move_dir().
    kobject_move() generates a new uevent of type KOBJ_MOVE, containing the
    previous path (DEVPATH_OLD) in addition to the usual values. For this, a new
    interface kobject_uevent_env() is created that allows to add further
    environmental data to the uevent at the kobject layer.

    Signed-off-by: Cornelia Huck
    Acked-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     
  • Introduce device_find_child() to match device_for_each_child().

    Signed-off-by: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     
  • Change ACPI to use dev_archdata instead of firmware_data

    This patch changes ACPI to use the new dev_archdata on i386, x86_64
    and ia64 (is there any other arch using ACPI ?) to store it's
    acpi_handle.

    It also removes the firmware_data field from struct device as this
    was the only user.

    Only build-tested on x86

    Signed-off-by: Benjamin Herrenschmidt
    Cc: Len Brown
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     
  • Add arch specific dev_archdata to struct device

    Adds an arch specific struct dev_arch to struct device. This enables
    architecture to add specific fields to every device in the system, like
    DMA operation pointers, NUMA node ID, firmware specific data, etc...

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Andi Kleen
    Acked-By: David Howells
    Signed-off-by: Greg Kroah-Hartman

    Benjamin Herrenschmidt
     
  • Converts from using struct "class_device" to "struct device" making
    everything show up properly in /sys/devices/ with symlinks from the
    /sys/class directory.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Converts from using struct "class_device" to "struct device" making
    everything show up properly in /sys/devices/ with symlinks from the
    /sys/class directory.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Converts from using struct "class_device" to "struct device" making
    everything show up properly in /sys/devices/ with symlinks from the
    /sys/class directory.

    Also fixes up the isdn drivers that were putting something in the class
    device's directory.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This also ment that some of the misc drivers had to also be fixed
    up as they were assuming the device was a class_device.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • It doesn't need to be global or in device.h

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

    Greg Kroah-Hartman
     
  • I finally did as you suggested and added the notifier to the struct
    bus_type itself. There are still problems to be expected is something
    attaches to a bus type where the code can hook in different struct
    device sub-classes (which is imho a big bogosity but I won't even try to
    argue that case now) but it will solve nicely a number of issues I've
    had so far.

    That also means that clients interested in registering for such
    notifications have to do it before devices are added and after bus types
    are registered. Fortunately, most bus types that matter for the various
    usage scenarios I have in mind are registerd at postcore_initcall time,
    which means I have a really nice spot at arch_initcall time to add my
    notifiers.

    There are 4 notifications provided. Device being added (before hooked to
    the bus) and removed (failure of previous case or after being unhooked
    from the bus), along with driver being bound to a device and about to be
    unbound.

    The usage I have for these are:

    - The 2 first ones are used to maintain a struct device_ext that is
    hooked to struct device.firmware_data. This structure contains for now a
    pointer to the Open Firmware node related to the device (if any), the
    NUMA node ID (for quick access to it) and the DMA operations pointers &
    iommu table instance for DMA to/from this device. For bus types I own
    (like IBM VIO or EBUS), I just maintain that structure directly from the
    bus code when creating the devices. But for bus types managed by generic
    code like PCI or platform (actually, of_platform which is a variation of
    platform linked to Open Firmware device-tree), I need this notifier.

    - The other two ones have a completely different usage scenario. I have
    cases where multiple devices and their drivers depend on each other. For
    example, the IBM EMAC network driver needs to attach to a MAL DMA engine
    which is a separate device, and a PHY interface which is also a separate
    device. They are all of_platform_device's (well, about to be with my
    upcoming patches) but there is no say in what precise order the core
    will "probe" them and instanciate the various modules. The solution I
    found for that is to have the drivers for emac to use multithread_probe,
    and wait for a driver to be bound to the target MAL and PHY control
    devices (the device-tree contains reference to the MAL and PHY interface
    nodes, which I can then match to of_platform_devices). Right now, I've
    been polling, but with that notifier, I can more cleanly wait (with a
    timeout of course).

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

    Benjamin Herrenschmidt
     
  • This updated patch adds the Intel ICH9 LPC and SMBus Controller DID's.

    Signed-off-by: Jason Gaston
    Signed-off-by: Greg Kroah-Hartman

    Jason Gaston
     
  • Changes the pci_{enable,disable}_device() functions to work in a
    nested basis, so that eg, three calls to enable_device() require three
    calls to disable_device().

    The reason for this is to simplify PCI drivers for
    multi-interface/capability devices. These are devices that cram more
    than one interface in a single function. A relevant example of that is
    the Wireless [USB] Host Controller Interface (similar to EHCI) [see
    http://www.intel.com/technology/comms/wusb/whci.htm].

    In these kind of devices, multiple interfaces are accessed through a
    single bar and IRQ line. For that, the drivers map only the smallest
    area of the bar to access their register banks and use shared IRQ
    handlers.

    However, because the order at which those drivers load cannot be known
    ahead of time, the sequence in which the calls to pci_enable_device()
    and pci_disable_device() cannot be predicted. Thus:

    1. driverA starts pci_enable_device()
    2. driverB starts pci_enable_device()
    3. driverA shutdown pci_disable_device()
    4. driverB shutdown pci_disable_device()

    between steps 3 and 4, driver B would loose access to it's device,
    even if it didn't intend to.

    By using this modification, the device won't be disabled until all the
    callers to enable() have called disable().

    This is implemented by replacing 'struct pci_dev->is_enabled' from a
    bitfield to an atomic use count. Each caller to enable increments it,
    each caller to disable decrements it. When the count increments from 0
    to 1, __pci_enable_device() is called to actually enable the
    device. When it drops to zero, pci_disable_device() actually does the
    disabling.

    We keep the backend __pci_enable_device() for pci_default_resume() to
    use and also change the sysfs method implementation, so that userspace
    enabling/disabling the device doesn't disable it one time too much.

    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: Greg Kroah-Hartman

    Inaky Perez-Gonzalez
     
  • Support a shadowed ROM when running with an ACPI capable PROM.

    Define a new dev.resource flag IORESOURCE_ROM_BIOS_COPY to
    describe the case of a BIOS shadowed ROM, which can then
    be used to avoid pci_map_rom() making an unneeded call to
    pci_enable_rom().

    Signed-off-by: John Keller
    Signed-off-by: Greg Kroah-Hartman

    John Keller
     
  • Move some MSI-X #defines into pci_regs.h so they can be used
    outside of drivers/pci.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Greg Kroah-Hartman

    Michael Ellerman
     
  • This patch (as818b) simplifies autosuspend processing by keeping track
    of the number of unsuspended children of each USB hub. This will
    permit us to avoid a good deal of unnecessary work all the time; we
    will no longer have to create a bunch of workqueue entries to carry
    out autosuspend requests, only to have them fail because one of the
    hub's children isn't suspended.

    The basic idea is simple. There already is a usage counter in the
    usb_device structure for preventing autosuspends. The patch just
    increments that counter for every unsuspended child. There's only one
    tricky part: When a device disconnects we need to remember whether it
    was suspended at the time (leave the counter alone) or not (decrement
    the counter).

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

    Alan Stern
     
  • This patch (as816) changes an existing flag in the usb_device
    structure to a bitflag, preparing the way for more bitflags to come
    in the future.

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

    Alan Stern
     
  • This patch (as814) adds usb_autopm_set_interface() to the autosuspend
    API. It also provides convenient wrapper routines,
    usb_autopm_enable() and usb_autopm_disable(), for drivers that want
    to specify directly whether autosuspend should be allowed.

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

    Alan Stern
     
  • We have no benefits of having the usb_endpoint_* functions as functions,
    but making them inline saves text and data segment sizes:

    text data bss dec hex filename
    14893634 3108770 1108840 19111244 1239d4c vmlinux.func
    14893185 3108566 1108840 19110591 1239abf vmlinux.inline

    This is the result of a 2.6.19-rc3 kernel compiled with GCC 4.1.1 without
    CONFIG_MODULES, CONFIG_CC_OPTIMIZE_FOR_SIZE, CONFIG_REGPARM options set.
    USB support is fully enabled (while most of the other drivers are not),
    and that kernel has most of the USB code ported to use the endpoint
    functions.

    That happens because a call to those functions are expensive (in terms
    of bytes), while the function's size is smaller or have the same 'size' of
    the call.

    Signed-off-by: Luiz Fernando N. Capitulino
    Signed-off-by: Greg Kroah-Hartman

    Luiz Fernando N. Capitulino
     
  • Current Wireless USB host hardware (Intel i1480 for example) allows up
    to 22 devices to connect, thus bringing up the max number of children
    in the WUSB Host Controller to 22 'fake' ports. Upcoming hardware
    might raise that limit.

    Makes almost no difference to go to 31, as the bit arrays are
    byte-aligned (plus an extra bit in general), so 22 bits fit in 4 bytes
    as 31 do.

    As well, the only other array that depends on USB_MAXCHILDREN is
    'struct usb_hub->indicator'. By declaring it 'u8' instead of 'enum
    hub_led_mode', we reduce the size of each entry from 4 bytes (in i386)
    to 1, which will add as we when are doubling USB_MAXCHILDREN
    (with 16 the size of that array is 64 bytes, with 31 would be 128; by
    using u8 that goes down to 31 bytes).

    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: Greg Kroah-Hartman

    inaky@linux.intel.com
     

01 Dec, 2006

3 commits

  • - ->init_queue() does not need the elevator passed in
    - ->put_request() is a hot path and need not have the queue passed in
    - cfq_update_io_seektime() does not need cfqd passed in

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • This patch modifies blk_rq_map/unmap_user() and the cdrom and scsi_ioctl.c
    users so that it supports requests larger than bio by chaining them together.

    Signed-off-by: Mike Christie
    Signed-off-by: Jens Axboe

    Mike Christie
     
  • This adds a new timestamp message to blktrace, giving the timeofday when
    we starting tracing. This helps user space correlate block trace events
    with eg an application strace.

    This requires a (compatible) update to blkparse. The changed blkparse
    is still able to process traces generated by older kernels, and older
    versions of blkparse should silently ignore the new records (because
    they have a pid of 0).

    Signed-off-by: Olaf Kirch
    Signed-off-by: Jens Axboe

    Olaf Kirch
     

30 Nov, 2006

1 commit

  • Changes persistant -> persistent. www.dictionary.com does not know
    persistant (with an A), but should it be one of those things you can
    spell in more than one correct way, let me know.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Adrian Bunk

    Jan Engelhardt