28 Apr, 2007

12 commits

  • Don't fail bus_attach_device() if the device cannot be bound.

    If dev->driver has been specified, reset it to NULL if device_bind_driver()
    failed and add the device as an unbound device. As a result,
    bus_attach_device() now cannot fail, and we can remove some checking from
    device_add().

    Also remove an unneeded check in bus_rescan_devices_helper().

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

    Cornelia Huck
     
  • Make multithreaded probing work per subsystem instead of per driver.

    It doesn't make much sense to probe the same device for multiple drivers in
    parallel (after all, only one driver can bind to the device). Instead, create
    a probing thread for each device that probes the drivers one after another.
    Also make the decision to use multi-threaded probe per bus instead of per
    device and adapt the pci code.

    Signed-off-by: Cornelia Huck
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Cornelia Huck
     
  • If "name" of a device_type is specified, the uevent will
    contain the device_type name in the DEVTYPE variable.
    This helps userspace to distingiush between different types
    of devices, belonging to the same subsystem.

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

    Kay Sievers
     
  • Driver core: use attribute groups in struct device_type

    Attribute groups are more flexible than attribute lists
    (an attribute list can be represented by anonymous group)
    so switch struct device_type to use them.

    Also rework attribute creation for devices so that they all
    cleaned up properly in case of errors.

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

    Dmitry Torokhov
     
  • We get two per-bus sysfs files:
    ls-l /sys/subsystem/usb
    drwxr-xr-x 2 root root 0 2007-02-16 16:42 devices
    drwxr-xr-x 7 root root 0 2007-02-16 14:55 drivers
    -rw-r--r-- 1 root root 4096 2007-02-16 16:42 drivers_autoprobe
    --w------- 1 root root 4096 2007-02-16 16:42 drivers_probe

    The flag "drivers_autoprobe" controls the behavior of the bus to bind
    devices by default, or just initialize the device and leave it alone.

    The command "drivers_probe" accepts a bus_id and the bus tries to bind a
    driver to this device.

    Systems who want to control the driver binding with udev, switch off the
    bus initiated probing:
    echo 0 > /sys/subsystem/usb/drivers_autoprobe
    echo 0 > /sys/subsystem/pcmcia/drivers_autoprobe
    ...

    and initiate the probing with udev rules like:
    ACTION=="add", SUBSYSTEM=="usb", ATTR{subsystem/drivers_probe}="$kernel"
    ACTION=="add", SUBSYSTEM=="pcmcia", ATTR{subsystem/drivers_probe}="$kernel"
    ...

    Custom driver binding can happen in earlier rules by something like:
    ACTION=="add", SUBSYSTEM=="usb", \
    ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678" \
    ATTR{subsystem/drivers//bind}="$kernel"

    This is intended to solve the modprobe.conf mess with "install-rules", custom
    bind/unbind-scripts and all the weird things people invented over the years.
    It should also provide the functionality "libusual" was supposed to do.

    With udev, one can just write a udev rule to drive all USB-disks at the
    third port of USB-hub by the "ub" driver, and everything else by
    usb-storage. One can also instruct udev to bind different wireless
    drivers to identical cards - just selected by the pcmcia slot-number, and
    whatever ...

    To use the mentioned rules, it needs udev version 106, to be able to
    write ATTR{}="$kernel" to sysfs files.

    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • As the new-style class devices (as opposed to old-style struct
    class_device) are becoming more widely used, I noticed that the
    dev_printk-based functions are not working properly with these.
    New-style class devices have no driver nor bus, almost by definition,
    and as a result dev_driver_string(), which is used as the first
    parameter of dev_printk, resolves to an empty string. This causes
    entries like the following to show in my logs:

    i2c-2: adapter [SMBus stub driver] registered

    Notice the unaesthetical leading whitespace. In order to fix this
    problem, I suggest that we extend dev_driver_string to deal with
    new-style class devices:

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • - uses a kset in "struct class" to keep track of all directories
    belonging to this class
    - merges with the /sys/devices/virtual logic.
    - removes the namespace-dir if the last member of that class
    leaves the directory.

    There may be locking or refcounting fixes left, I stopped when it seemed
    to work with network and sound modules. :)

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

    Kay Sievers
     
  • - At the moment we jump here device was't added to
    dev->class->devices list yet.

    Signed-off-by: Monakhov Dmitriy
    Signed-off-by: Greg Kroah-Hartman

    Dmitriy Monakhov
     
  • * 'e1000-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
    e1000: FIX: Stop raw interrupts disabled nag from RT
    e1000: FIX: firmware handover bits
    e1000: FIX: be ready for incoming irq at pci_request_irq

    Linus Torvalds
     
  • * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband: (49 commits)
    IB: Set class_dev->dev in core for nice device symlink
    IB/ehca: Implement modify_port
    IB/umad: Clarify documentation of transaction ID
    IPoIB/cm: spin_lock_irqsave() -> spin_lock_irq() replacements
    IB/mad: Change SMI to use enums rather than magic return codes
    IB/umad: Implement GRH handling for sent/received MADs
    IB/ipoib: Use ib_init_ah_from_path to initialize ah_attr
    IB/sa: Set src_path_bits correctly in ib_init_ah_from_path()
    IB/ucm: Simplify ib_ucm_event()
    RDMA/ucma: Simplify ucma_get_event()
    IB/mthca: Simplify CQ cleaning in mthca_free_qp()
    IB/mthca: Fix mthca_write_mtt() on HCAs with hidden memory
    IB/mthca: Update HCA firmware revisions
    IB/ipath: Fix WC format drift between user and kernel space
    IB/ipath: Check that a UD work request's address handle is valid
    IB/ipath: Remove duplicate stuff from ipath_verbs.h
    IB/ipath: Check reserved memory keys
    IB/ipath: Fix unit selection when all CPU affinity bits set
    IB/ipath: Don't allow QPs 0 and 1 to be opened multiple times
    IB/ipath: Disable IB link earlier in shutdown sequence
    ...

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (67 commits)
    [SCSI] SUNESP: Complete driver rewrite to version 2.0
    [SPARC64]: Convert PCI over to generic struct iommu/strbuf.
    [SPARC]: device_node name constification fallout
    [SPARC64]: Convert SBUS over to generic iommu/strbuf structs.
    [SPARC64]: Add generic iommu and strbuf structs to iommu.h
    [SPARC64]: Consolidate {sbus,pci}_iommu_arena.
    [SPARC]: Make device_node name and type const
    [SPARC64]: constify some paramaters of OF routines
    [TIGON3]: of_get_property() returns const.
    [SPARC64]: Fix PCI rework to adhere to of_get_property() const return.
    [SPARC64]: Document and fix calculation of pages_avail.
    [SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.c
    [SPARC64]: Use bootmem_bootmap_pages() in choose_bootmap_pfn().
    [SPARC64]: Add proper header file extern for cmdline_memory_size.
    [SPARC64]: Kill sparc_ultra_dump_{i,d}tlb()
    [SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c
    [SPARC64]: Give move verbose show_mem() output just like i386.
    [SPARC64]: Mark show_mem() printk's with KERN_INFO.
    [SPARC64]: Kill kvaddr_to_phys() and friends.
    [SPARC64]: Privatize sun4u_get_pte() and fix name.
    ...

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (448 commits)
    [IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
    [IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.
    [IPV4]: Add multipath cached to feature-removal-schedule.txt
    [WIRELESS] cfg80211: Clarify locking comment.
    [WIRELESS] cfg80211: Fix locking in wiphy_new.
    [WEXT] net_device: Don't include wext bits if not required.
    [WEXT]: Misc code cleanups.
    [WEXT]: Reduce inline abuse.
    [WEXT]: Move EXPORT_SYMBOL statements where they belong.
    [WEXT]: Cleanup early ioctl call path.
    [WEXT]: Remove options.
    [WEXT]: Remove dead debug code.
    [WEXT]: Clean up how wext is called.
    [WEXT]: Move to net/wireless
    [AFS]: Eliminate cmpxchg() usage in vlocation code.
    [RXRPC]: Fix pointers passed to bitops.
    [RXRPC]: Remove bogus atomic_* overrides.
    [AFS]: Fix u64 printing in debug logging.
    [AFS]: Add "directory write" support.
    [AFS]: Implement the CB.InitCallBackState3 operation.
    ...

    Linus Torvalds
     

27 Apr, 2007

26 commits


26 Apr, 2007

2 commits