1. 28 4月, 2007 26 次提交
    • J
      Kobject: kobject_uevent.c: Collapse unnecessary loop nesting (top_kobj) · 14193fb9
      John Anthony Kazos Jr 提交于
      Collapses a do..while() loop within an if() to a simple while() loop for 
      simplicity and readability.
      Signed-off-by: NJohn Anthony Kazos Jr. <jakj@j-a-k-j.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      14193fb9
    • D
      Driver core: add suspend() and resume() to struct device_type · f89cbc39
      Dmitry Torokhov 提交于
      Driver core: add suspend() and resume() to struct device_type
      
      In cases when there are devices of different types in the same class
      we can't use class's implementation of suspend and resume methods and
      we need to add them to struct device_type instead.
      
      Also fix error handling in resume code (we should not try to call
      class's resume method iof bus's resume method for the device failed.
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f89cbc39
    • E
      uevent: use add_uevent_var() instead of open coding it · bf62456e
      Eric Rannaud 提交于
      Make use of add_uevent_var() instead of (often incorrectly) open coding it.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NEric Rannaud <eric.rannaud@gmail.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bf62456e
    • C
      Driver core: switch firmware_class to uevent_suppress. · bdc4960a
      Cornelia Huck 提交于
      Use uevent_suppress instead of returning an error code in
      firmware_uevent(). Get rid of the now unneeded FW_STATUS_READY
      and FW_STATUS_READY_NOHOTPLUG.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      bdc4960a
    • C
      Driver core: suppress uevents via filter · 83b5fb4c
      Cornelia Huck 提交于
      Suppress uevents for devices if uevent_suppress is set via
      dev_uevent_filter(). This makes the driver core suppress all device
      uevents, not just the add event in device_add().
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      83b5fb4c
    • J
      Driver core: notify userspace of network device renames · ca2f37db
      Jean Tourrilhes 提交于
      Provide rename event for when we rename network devices.
      Signed-off-by: NJean Tourrilhes <jt@hpl.hp.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       
      ca2f37db
    • O
      kref: fix CPU ordering with respect to krefs · 1b0b3b99
      Oliver Neukum 提交于
      some atomic operations are only atomic, not ordered. Thus a CPU is allowed
      to reorder memory references to an object to before the reference is
      obtained. This fixes it.
      Signed-off-by: NOliver Neukum <oneukum@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1b0b3b99
    • G
      Driver core: remove unneeded completion from driver release path · 74e9f5fa
      Greg Kroah-Hartman 提交于
      The completion in the driver release path is due to ancient history in
      the _very_ early 2.5 days when we were not tracking the module reference
      count of attributes.  It is not needed at all and can be removed.
      
      Note, we now have an empty release function for the driver structure.
      This is due to the fact that drivers are statically allocated in the
      system at this point in time, something which I want to change in the
      future.  But remember, drivers are really code, which is reference
      counted by the module, unlike devices, which are data and _must_ be
      reference counted properly in order to work correctly.
      
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      74e9f5fa
    • C
      driver core: don't fail attaching the device if it cannot be bound · c6a46696
      Cornelia Huck 提交于
      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: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c6a46696
    • A
      powerpc: make it compile for multithread change · eed40d3a
      Andrew Morton 提交于
      arch/powerpc/kernel/of_platform.c:479: error: unknown field `multithread_probe' specified in initializer
      
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      eed40d3a
    • C
      driver core: per-subsystem multithreaded probing · 21c7f30b
      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: NCornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      21c7f30b
    • D
      kobject: kobject_shadow_add cleanup · 460f7e9a
      Dmitriy Monakhov 提交于
       - correct function name in comments
       - parrent assignment does metter only inside "if" block, 
         so move it inside this block.
      Signed-off-by: NMonakhov Dmitriy <dmonakhov@openvz.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      460f7e9a
    • K
      Driver core: add name to device_type · 414264f9
      Kay Sievers 提交于
      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: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      414264f9
    • D
      driver core: Use attribute groups in struct device_type · 621a1672
      Dmitry Torokhov 提交于
      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: NDmitry Torokhov <dtor@mail.ru>
      Cc: Kay Sievers <kay.sievers@novell.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      621a1672
    • K
      Driver core: udev triggered device-<>driver binding · b8c5cec2
      Kay Sievers 提交于
      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/<custom-driver>/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: NGreg Kroah-Hartman <gregkh@suse.de>
      b8c5cec2
    • J
      dev_printk and new-style class devices · a456b702
      Jean Delvare 提交于
      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: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a456b702
    • K
      driver core: fix namespace issue with devices assigned to classes · 86406245
      Kay Sievers 提交于
        - 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 <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      86406245
    • D
      driver core: fix device_add error path · 00ed8e3d
      Dmitriy Monakhov 提交于
       - At the moment we jump here device was't added to
         dev->class->devices list yet.
      Signed-off-by: NMonakhov Dmitriy <dmonakhov@openvz.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      00ed8e3d
    • L
      Merge branch 'e1000-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 · c58b8e4a
      Linus Torvalds 提交于
      * '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
      c58b8e4a
    • L
      Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband · afc2e82c
      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
        ...
      afc2e82c
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 · 0278ef8b
      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.
        ...
      0278ef8b
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · 15c54033
      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.
        ...
      15c54033
    • L
      Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus · ad5da3cf
      Linus Torvalds 提交于
      * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (22 commits)
        [MIPS] Don't force frame pointers for lockdep on MIPS
        [MIPS] update vr41xx Kconfig
        [MIPS] remove 2 select entries for VR41xx
        [MIPS] rename VR41XX to VR4100 series
        [MIPS] Use DEFINE_SPINLOCK instead of SPIN_LOCK_UNLOCKED.
        [MIPS] Replace old fashioned "__typeof" with "__typeof__".
        [MIPS] Remove unused _THREAD_SIZE_ORDER from asm-offset.c.
        [MIPS] Change PCI host bridge setup/resources
        [MIPS] Register PCI host bridge resource earlier
        [MIPS] Remove pnx8550-v2pci_defconfig
        [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
        [MIPS] Updated Sibyte headers
        [MIPS] Remove unused argument from kunmap_coherent().
        [MIPS] Malta: Delete unused prototype of mips_timer_interrupt.
        [MIPS] Select ZONE_DMA only if GENERIC_ISA_DMA selected
        [MIPS] MIPS Tech: Get rid of volatile in core code.
        [MIPS] IP22: Get rid of volatile in IP22 core code.
        [MIPS] JMR3927 cleanup
        [MIPS] merge GT64111 PCI routines and GT64120 PCI_0 routines
        [MIPS] Cobalt: Split PCI codes from setup.c
        ...
      ad5da3cf
    • L
      Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 · da8ac5e0
      Linus Torvalds 提交于
      * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (38 commits)
        [S390] SPIN_LOCK_UNLOCKED cleanup in drivers/s390
        [S390] Clean up smp code in preparation for some larger changes.
        [S390] Remove debugging junk.
        [S390] Switch etr from tasklet to workqueue.
        [S390] split page_test_and_clear_dirty.
        [S390] Processor degradation notification.
        [S390] vtime: cleanup per_cpu usage.
        [S390] crypto: cleanup.
        [S390] sclp: fix coding style.
        [S390] vmlogrdr: stop IUCV connection in vmlogrdr_release.
        [S390] sclp: initialize early.
        [S390] ctc: kmalloc->kzalloc/casting cleanups.
        [S390] zfcpdump support.
        [S390] dasd: Add ipldev parameter.
        [S390] dasd: Add sysfs attribute status and generate uevents.
        [S390] Improved kernel stack overflow checking.
        [S390] Get rid of console setup functions.
        [S390] No execute support cleanup.
        [S390] Minor fault path optimization.
        [S390] Use generic bug.
        ...
      da8ac5e0
    • L
      Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32 · 32f15dc5
      Linus Torvalds 提交于
      * 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32: (21 commits)
        [AVR32] Fix compile error with gcc 4.1
        avr32: remove unneeded cast in atomic.h
        AVR32: Remove useless config option "GENERIC_BUST_SPINLOCK".
        [AVR32] Optimize the TLB miss handler
        [AVR32] Board code for ATNGW100
        [AVR32] Use memcpy/memset in memcpy_{from,to}_io and memset_io
        [AVR32] Get rid of board_setup_fbmem()
        [AVR32] Reserve framebuffer memory in early_parse_fbmem()
        [AVR32] Simplify early handling of memory regions
        [AVR32] Move setup_bootmem() from mm/init.c to kernel/setup.c
        [AVR32] Make I/O access macros work with external devices
        [AVR32] Fix NMI handler
        [AVR32] Clean up exception handling code
        [AVR32] Clean up cpu identification and add features bitmap
        [AVR32] Clean up asm/sysreg.h
        [AVR32] Don't enable clocks with no users
        [AVR32] Put cpu in sleep 0 when idle.
        [AVR32] Change system timer from count-compare to Timer/Counter 0
        [AVR32] Add mach-specific Kconfig
        [AVR32] Add nwait and tdf parameters to SMC configuration
        ...
      32f15dc5
    • L
      Change default dirty-writeback limits · 07db59bd
      Linus Torvalds 提交于
      Do this really early in the 2.6.22-rc series, so that we'll get
      feedback.  And don't change by half measures.  Just cut the default
      dirty limit to a quarter of what it was, and see if anybody even
      notices.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      07db59bd
  2. 27 4月, 2007 14 次提交