1. 23 6月, 2006 18 次提交
    • H
      [NET]: Add software TSOv4 · f4c50d99
      Herbert Xu 提交于
      This patch adds the GSO implementation for IPv4 TCP.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4c50d99
    • H
      [NET]: Add generic segmentation offload · f6a78bfc
      Herbert Xu 提交于
      This patch adds the infrastructure for generic segmentation offload.
      The idea is to tap into the potential savings of TSO without hardware
      support by postponing the allocation of segmented skb's until just
      before the entry point into the NIC driver.
      
      The same structure can be used to support software IPv6 TSO, as well as
      UFO and segmentation offload for other relevant protocols, e.g., DCCP.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6a78bfc
    • H
      [NET]: Merge TSO/UFO fields in sk_buff · 7967168c
      Herbert Xu 提交于
      Having separate fields in sk_buff for TSO/UFO (tso_size/ufo_size) is not
      going to scale if we add any more segmentation methods (e.g., DCCP).  So
      let's merge them.
      
      They were used to tell the protocol of a packet.  This function has been
      subsumed by the new gso_type field.  This is essentially a set of netdev
      feature bits (shifted by 16 bits) that are required to process a specific
      skb.  As such it's easy to tell whether a given device can process a GSO
      skb: you just have to and the gso_type field and the netdev's features
      field.
      
      I've made gso_type a conjunction.  The idea is that you have a base type
      (e.g., SKB_GSO_TCPV4) that can be modified further to support new features.
      For example, if we add a hardware TSO type that supports ECN, they would
      declare NETIF_F_TSO | NETIF_F_TSO_ECN.  All TSO packets with CWR set would
      have a gso_type of SKB_GSO_TCPV4 | SKB_GSO_TCPV4_ECN while all other TSO
      packets would be SKB_GSO_TCPV4.  This means that only the CWR packets need
      to be emulated in software.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7967168c
    • H
      [NET]: Avoid allocating skb in skb_pad · 5b057c6b
      Herbert Xu 提交于
      First of all it is unnecessary to allocate a new skb in skb_pad since
      the existing one is not shared.  More importantly, our hard_start_xmit
      interface does not allow a new skb to be allocated since that breaks
      requeueing.
      
      This patch uses pskb_expand_head to expand the existing skb and linearize
      it if needed.  Actually, someone should sift through every instance of
      skb_pad on a non-linear skb as they do not fit the reasons why this was
      originally created.
      
      Incidentally, this fixes a minor bug when the skb is cloned (tcpdump,
      TCP, etc.).  As it is skb_pad will simply write over a cloned skb.  Because
      of the position of the write it is unlikely to cause problems but still
      it's best if we don't do it.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b057c6b
    • K
      [PATCH] WAN: register_hdlc_device() doesn't need dev_alloc_name() · 4a31e348
      Krzysztof Halasa 提交于
      David Boggs noticed that register_hdlc_device() no longer needs
      to call dev_alloc_name() as it's called by register_netdev().
      register_hdlc_device() is currently equivalent to register_netdev().
      
      hdlc_setup() is now EXPORTed as per David's request.
      Signed-off-by: NKrzysztof Halasa <khc@pm.waw.pl>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      4a31e348
    • R
      [PATCH] zlib_inflate: Upgrade library code to a recent version · 4f3865fb
      Richard Purdie 提交于
      Upgrade the zlib_inflate implementation in the kernel from a patched
      version 1.1.3/4 to a patched 1.2.3.
      
      The code in the kernel is about seven years old and I noticed that the
      external zlib library's inflate performance was significantly faster (~50%)
      than the code in the kernel on ARM (and faster again on x86_32).
      
      For comparison the newer deflate code is 20% slower on ARM and 50% slower
      on x86_32 but gives an approx 1% compression ratio improvement.  I don't
      consider this to be an improvement for kernel use so have no plans to
      change the zlib_deflate code.
      
      Various changes have been made to the zlib code in the kernel, the most
      significant being the extra functions/flush option used by ppp_deflate.
      This update reimplements the features PPP needs to ensure it continues to
      work.
      
      This code has been tested on ARM under both JFFS2 (with zlib compression
      enabled) and ppp_deflate and on x86_32.  JFFS2 sees an approx.  10% real
      world file read speed improvement.
      
      This patch also removes ZLIB_VERSION as it no longer has a correct value.
      We don't need version checks anyway as the kernel's module handling will
      take care of that for us.  This removal is also more in keeping with the
      zlib author's wishes (http://www.zlib.net/zlib_faq.html#faq24) and I've
      added something to the zlib.h header to note its a modified version.
      Signed-off-by: NRichard Purdie <rpurdie@rpsys.net>
      Acked-by: NJoern Engel <joern@wh.fh-wedel.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4f3865fb
    • N
      [PATCH] Fix dcache race during umount · 0feae5c4
      NeilBrown 提交于
      The race is that the shrink_dcache_memory shrinker could get called while a
      filesystem is being unmounted, and could try to prune a dentry belonging to
      that filesystem.
      
      If it does, then it will call in to iput on the inode while the dentry is
      no longer able to be found by the umounting process.  If iput takes a
      while, generic_shutdown_super could get all the way though
      shrink_dcache_parent and shrink_dcache_anon and invalidate_inodes without
      ever waiting on this particular inode.
      
      Eventually the superblock gets freed anyway and if the iput tried to touch
      it (which some filesystems certainly do), it will lose.  The promised
      "Self-destruct in 5 seconds" doesn't lead to a nice day.
      
      The race is closed by holding s_umount while calling prune_one_dentry on
      someone else's dentry.  As a down_read_trylock is used,
      shrink_dcache_memory will no longer try to prune the dentry of a filesystem
      that is being unmounted, and unmount will not be able to start until any
      such active prune_one_dentry completes.
      
      This requires that prune_dcache *knows* which filesystem (if any) it is
      doing the prune on behalf of so that it can be careful of other
      filesystems.  shrink_dcache_memory isn't called it on behalf of any
      filesystem, and so is careful of everything.
      
      shrink_dcache_anon is now passed a super_block rather than the s_anon list
      out of the superblock, so it can get the s_anon list itself, and can pass
      the superblock down to prune_dcache.
      
      If prune_dcache finds a dentry that it cannot free, it leaves it where it
      is (at the tail of the list) and exits, on the assumption that some other
      thread will be removing that dentry soon.  To try to make sure that some
      work gets done, a limited number of dnetries which are untouchable are
      skipped over while choosing the dentry to work on.
      
      I believe this race was first found by Kirill Korotaev.
      
      Cc: Jan Blunck <jblunck@suse.de>
      Acked-by: NKirill Korotaev <dev@openvz.org>
      Cc: Olaf Hering <olh@suse.de>
      Acked-by: NBalbir Singh <balbir@in.ibm.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NBalbir Singh <balbir@in.ibm.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0feae5c4
    • M
      [PATCH] remove steal_locks() · c89681ed
      Miklos Szeredi 提交于
      This patch removes the steal_locks() function.
      
      steal_locks() doesn't work correctly with any filesystem that does it's own
      lock management, including NFS, CIFS, etc.
      
      In addition it has weird semantics on local filesystems in case tasks
      sharing file-descriptor tables are doing POSIX locking operations in
      parallel to execve().
      
      The steal_locks() function has an effect on applications doing:
      
      clone(CLONE_FILES)
        /* in child */
        lock
        execve
        lock
      
      POSIX locks acquired before execve (by "child", "parent" or any further
      task sharing files_struct) will after the execve be owned exclusively by
      "child".
      
      According to Chris Wright some LSB/LTP kind of suite triggers without the
      stealing behavior, but there's no known real-world application that would
      also fail.
      
      Apps using NPTL are not affected, since all other threads are killed before
      execve.
      
      Apps using LinuxThreads are only affected if they
      
        - have multiple threads during exec (LinuxThreads doesn't kill other
          threads, the app may do it with pthread_kill_other_threads_np())
        - rely on POSIX locks being inherited across exec
      
      Both conditions are documented, but not their interaction.
      
      Apps using clone() natively are affected if they
      
        - use clone(CLONE_FILES)
        - rely on POSIX locks being inherited across exec
      
      The above scenarios are unlikely, but possible.
      
      If the patch is vetoed, there's a plan B, that involves mostly keeping the
      weird stealing semantics, but changing the way lock ownership is handled so
      that network and local filesystems work consistently.
      
      That would add more complexity though, so this solution seems to be
      preferred by most people.
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Matthew Wilcox <willy@debian.org>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Steven French <sfrench@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c89681ed
    • B
      [PATCH] PCI: Add PCI_CAP_ID_VNDR · 0e5b3781
      Brice Goglin 提交于
      Add the vendor-specific extended capability PCI_CAP_ID_VNDR.  It is required
      by the Myri-10G Ethernet driver.
      Signed-off-by: NBrice Goglin <brice@myri.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0e5b3781
    • D
      [PATCH] Keys: Fix race between two instantiators of a key · 04c567d9
      David Howells 提交于
      Add a revocation notification method to the key type and calls it whilst
      the key's semaphore is still write-locked after setting the revocation
      flag.
      
      The patch then uses this to maintain a reference on the task_struct of the
      process that calls request_key() for as long as the authorisation key
      remains unrevoked.
      
      This fixes a potential race between two processes both of which have
      assumed the authority to instantiate a key (one may have forked the other
      for example).  The problem is that there's no locking around the check for
      revocation of the auth key and the use of the task_struct it points to, nor
      does the auth key keep a reference on the task_struct.
      
      Access to the "context" pointer in the auth key must thenceforth be done
      with the auth key semaphore held.  The revocation method is called with the
      target key semaphore held write-locked and the search of the context
      process's keyrings is done with the auth key semaphore read-locked.
      
      The check for the revocation state of the auth key just prior to searching
      it is done after the auth key is read-locked for the search.  This ensures
      that the auth key can't be revoked between the check and the search.
      
      The revocation notification method is added so that the context task_struct
      can be released as soon as instantiation happens rather than waiting for
      the auth key to be destroyed, thus avoiding the unnecessary pinning of the
      requesting process.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      04c567d9
    • M
      [PATCH] selinux: add hooks for key subsystem · d720024e
      Michael LeMay 提交于
      Introduce SELinux hooks to support the access key retention subsystem
      within the kernel.  Incorporate new flask headers from a modified version
      of the SELinux reference policy, with support for the new security class
      representing retained keys.  Extend the "key_alloc" security hook with a
      task parameter representing the intended ownership context for the key
      being allocated.  Attach security information to root's default keyrings
      within the SELinux initialization routine.
      
      Has passed David's testsuite.
      Signed-off-by: NMichael LeMay <mdlemay@epoch.ncsc.mil>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      Acked-by: NChris Wright <chrisw@sous-sol.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d720024e
    • E
      [PATCH] w1: netlink: Mark netlink group 1 as unused. · bb5427b5
      Evgeniy Polyakov 提交于
      netlink_w1 was moved to connector.
      Signed-off-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bb5427b5
    • E
    • K
      [PATCH] i2c: Mark block write buffers as const · 46f5ed75
      Krzysztof Halasa 提交于
      The attached patch marks i2c_smbus_write_block_data() and
      i2c_smbus_write_i2c_block_data() buffers as const.
      Signed-off-by: NKrzysztof Halasa <khc@pm.waw.pl>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      46f5ed75
    • P
      [PATCH] i2c: New bus driver for the OpenCores I2C controller · 18f98b1e
      Peter Korsgaard 提交于
      The following patch adds support for the OpenCores I2C controller IP
      core (See http://www.opencores.org/projects.cgi/web/i2c/overview).
      Signed-off-by: NPeter Korsgaard <jacmet@sunsite.dk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      18f98b1e
    • J
      [PATCH] I2C: i2c-nforce2: Add support for the nForce4 MCP51 and MCP55 · 5c7ae658
      Jean Delvare 提交于
      Add support for the new nForce4 MCP51 (also known as nForce 410 or
      430) and nForce4 MCP55 to the i2c-nforce2 driver. Some code changes
      were required because the base I/O address registers have changed in
      these versions. Standard BARs are now being used, while the original
      nForce2 chips used non-standard ones.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5c7ae658
    • M
      [PATCH] I2C: m41t00: Add support for the ST M41T81 and M41T85 · 5e9f4f2e
      Mark A. Greer 提交于
      This patch adds support for the ST m41t81 and m41t85 i2c rtc chips
      to the existing m41t00 driver.
      
      Since there is no way to reliably determine what type of rtc chip
      is in use, the chip type is passed in via platform_data.  The i2c
      address and square wave frequency are passed in via platform_data
      as well.  To accommodate the use of platform_data, a new header
      file include/linux/m41t00.h has been added.
      
      The m41t81 and m41t85 chips halt the updating of their time registers
      while they are being accessed.  They resume when a stop condition
      exists on the i2c bus or when non-time related regs are accessed.
      To make the best use of that facility and to make more efficient
      use of the i2c bus, this patch replaces multiple i2c_smbus_xxx calls
      with a single i2c_transfer call.
      Signed-off-by: NMark A. Greer <mgreer@mvista.com>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5e9f4f2e
    • R
      [PATCH] i2c-piix4: Add ATI IXP200/300/400 support · 02e0c5d5
      Rudolf Marek 提交于
      This patch adds the ATI IXP southbridges support to i2c-piix4,
      as it turned out those chips are compatible with it.
      Signed-off-by: NRudolf Marek <r.marek@sh.cvut.cz>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      02e0c5d5
  2. 22 6月, 2006 21 次提交
    • G
      bd009496
    • G
      [PATCH] USB: move usb_device_class class devices to be real devices · c182274f
      Greg Kroah-Hartman 提交于
      This moves the usb class devices that control the usbfs nodes to show up
      in the proper place in the larger device tree.
      
      No userspace changes is needed, this is compatible due to the symlinks
      generated by the driver core.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c182274f
    • G
      [PATCH] USB: make endpoints real struct devices · 9bde7497
      Greg Kroah-Hartman 提交于
      This will allow for us to give endpoints a major/minor to create a
      "usbfs2-like" way to access endpoints directly from userspace in an
      easier manner than the current usbfs provides us.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9bde7497
    • D
      [PATCH] USB: move <linux/usb_input.h> to <linux/usb/input.h> · ae0dadcf
      David Brownell 提交于
      Move <linux/usb_input.h> to <linux/usb/input.h> and remove some
      redundant includes.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ae0dadcf
    • D
      [PATCH] USB: move hardware-specific <linux/usb_*.h> to <linux/usb/*.h> · 325a4af6
      David Brownell 提交于
      This moves header files for controller-specific platform data
      from <linux/usb_XXX.h> to <linux/usb/XXX.h> to start reducing
      some clutter.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      325a4af6
    • D
      [PATCH] USB: move <linux/usb_cdc.h> to <linux/usb/cdc.h> · a8c28f23
      David Brownell 提交于
      This moves <linux/usb_cdc.h> to <linux/usb/cdc.h> to reduce some of the
      clutter of usb header files.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a8c28f23
    • A
      [PATCH] usbcore: port reset for composite devices · 79efa097
      Alan Stern 提交于
      This patch (as699) adds usb_reset_composite_device(), a routine for
      sending a USB port reset to a device with multiple interfaces owned by
      different drivers.  Drivers are notified about impending and completed
      resets through two new methods in the usb_driver structure.
      
      The patch modifieds the usbfs ioctl code to make it use the new routine
      instead of usb_reset_device().  Follow-up patches will modify the hub,
      usb-storage, and usbhid drivers so they can utilize this new API.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      79efa097
    • G
      [PATCH] USB: add usb_interrupt_msg() function for api completeness. · 782a7a63
      Greg Kroah-Hartman 提交于
      Really just a wrapper around usb_bulk_msg() but now it's documented
      much better.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      782a7a63
    • R
      [PATCH] Driver model: add ISA bus · a5117ba7
      Rene Herman 提交于
      During the recent "isa drivers using platform devices" discussion it was
      pointed out that (ALSA) ISA drivers ran into the problem of not having
      the option to fail driver load (device registration rather) upon not
      finding their hardware due to a probe() error not being passed up
      through the driver model. In the course of that, I suggested a seperate
      ISA bus might be best; Russell King agreed and suggested this bus could
      use the .match() method for the actual device discovery.
      
      The attached does this. For this old non (generically) discoverable ISA
      hardware only the driver itself can do discovery so as a difference with
      the platform_bus, this isa_bus also distributes match() up to the driver.
      
      As another difference: these devices only exist in the driver model due
      to the driver creating them because it might want to drive them, meaning
      that all device creation has been made internal as well.
      
      The usage model this provides is nice, and has been acked from the ALSA
      side by Takashi Iwai and Jaroslav Kysela. The ALSA driver module_init's
      now (for oldisa-only drivers) become:
      
      static int __init alsa_card_foo_init(void)
      {
      	return isa_register_driver(&snd_foo_isa_driver, SNDRV_CARDS);
      }
      
      static void __exit alsa_card_foo_exit(void)
      {
      	isa_unregister_driver(&snd_foo_isa_driver);
      }
      
      Quite like the other bus models therefore. This removes a lot of
      duplicated init code from the ALSA ISA drivers.
      
      The passed in isa_driver struct is the regular driver struct embedding a
      struct device_driver, the normal probe/remove/shutdown/suspend/resume
      callbacks, and as indicated that .match callback.
      
      The "SNDRV_CARDS" you see being passed in is a "unsigned int ndev"
      parameter, indicating how many devices to create and call our methods with.
      
      The platform_driver callbacks are called with a platform_device param;
      the isa_driver callbacks are being called with a "struct device *dev,
      unsigned int id" pair directly -- with the device creation completely
      internal to the bus it's much cleaner to not leak isa_dev's by passing
      them in at all. The id is the only thing we ever want other then the
      struct device * anyways, and it makes for nicer code in the callbacks as
      well.
      
      With this additional .match() callback ISA drivers have all options. If
      ALSA would want to keep the old non-load behaviour, it could stick all
      of the old .probe in .match, which would only keep them registered after
      everything was found to be present and accounted for. If it wanted the
      behaviour of always loading as it inadvertently did for a bit after the
      changeover to platform devices, it could just not provide a .match() and
      do everything in .probe() as before.
      
      If it, as Takashi Iwai already suggested earlier as a way of following
      the model from saner buses more closely, wants to load when a later bind
      could conceivably succeed, it could use .match() for the prerequisites
      (such as checking the user wants the card enabled and that port/irq/dma
      values have been passed in) and .probe() for everything else. This is
      the nicest model.
      
      To the code...
      
      This exports only two functions; isa_{,un}register_driver().
      
      isa_register_driver() register's the struct device_driver, and then
      loops over the passed in ndev creating devices and registering them.
      This causes the bus match method to be called for them, which is:
      
      int isa_bus_match(struct device *dev, struct device_driver *driver)
      {
                struct isa_driver *isa_driver = to_isa_driver(driver);
      
                if (dev->platform_data == isa_driver) {
                        if (!isa_driver->match ||
                                isa_driver->match(dev, to_isa_dev(dev)->id))
                                return 1;
                        dev->platform_data = NULL;
                }
                return 0;
      }
      
      The first thing this does is check if this device is in fact one of this
      driver's devices by seeing if the device's platform_data pointer is set
      to this driver. Platform devices compare strings, but we don't need to
      do that with everything being internal, so isa_register_driver() abuses
      dev->platform_data as a isa_driver pointer which we can then check here.
      I believe platform_data is available for this, but if rather not, moving
      the isa_driver pointer to the private struct isa_dev is ofcourse fine as
      well.
      
      Then, if the the driver did not provide a .match, it matches. If it did,
      the driver match() method is called to determine a match.
      
      If it did _not_ match, dev->platform_data is reset to indicate this to
      isa_register_driver which can then unregister the device again.
      
      If during all this, there's any error, or no devices matched at all
      everything is backed out again and the error, or -ENODEV, is returned.
      
      isa_unregister_driver() just unregisters the matched devices and the
      driver itself.
      
      More global points/questions...
      
      - I'm introducing include/linux/isa.h. It was available but is ofcourse
      a somewhat generic name. Moving more isa stuff over to it in time is
      ofcourse fine, so can I have it please? :)
      
      - I'm using device_initcall() and added the isa.o (dependent on
      CONFIG_ISA) after the base driver model things in the Makefile. Will
      this do, or I really need to stick it in drivers/base/init.c, inside
      #ifdef CONFIG_ISA? It's working fine.
      
      Lastly -- I also looked, a bit, into integrating with PnP. "Old ISA"
      could be another pnp_protocol, but this does not seem to be a good
      match, largely due to the same reason platform_devices weren't -- the
      devices do not have a life of their own outside the driver, meaning the
      pnp_protocol {get,set}_resources callbacks would need to callback into
      driver -- which again means you first need to _have_ that driver. Even
      if there's clean way around that, you only end up inventing fake but
      valid-form PnP IDs and generally catering to the PnP layer without any
      practical advantages over this very simple isa_bus. The thing I also
      suggested earlier about the user echoing values into /sys to set up the
      hardware from userspace first is... well, cute, but a horrible idea from
      a user standpoint.
      
      Comments ofcourse appreciated. Hope it's okay. As said, the usage model
      is nice at least.
      Signed-off-by: NRene Herman <rene.herman@keyaccess.nl>
      a5117ba7
    • A
      [PATCH] Driver Core: Make dev_info and friends print the bus name if there is no driver · 3e95637a
      Alan Stern 提交于
      This patch (as721) makes dev_info and related macros print the device's
      bus name if the device doesn't have a driver, instead of printing just a
      blank.  If the device isn't on a bus either... well, then it does leave
      a blank space.  But it will be easier for someone else to change if they
      want.
      
      Cc: Matthew Wilcox <matthew@wil.cx>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3e95637a
    • G
      [PATCH] Driver core: allow struct device to have a dev_t · 23681e47
      Greg Kroah-Hartman 提交于
      This is the first step in moving class_device to being replaced by
      struct device.  It allows struct device to export a dev_t and makes it
      easy to dynamically create and destroy struct device as long as they are
      associated with a specific class.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      23681e47
    • M
      [PATCH] Driver Core: Add /sys/hypervisor when needed · 4039483f
      Michael Holzheu 提交于
      To have a home for all hypervisors, this patch creates /sys/hypervisor.
      A new config option SYS_HYPERVISOR is introduced, which should to be set
      by architecture dependent hypervisors (e.g. s390 or Xen).
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NMichael Holzheu <holzheu@de.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4039483f
    • S
      [PATCH] Driver Core: Allow sysdev_class have attributes · 670dd90d
      Shaohua Li 提交于
      allow sysdev_class adding attribute. Next patch will use the new API to
      add an attribute under /sys/device/system/cpu/.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      670dd90d
    • G
      [PATCH] Driver Core: remove unused exports · 1740757e
      Greg Kroah-Hartman 提交于
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1740757e
    • H
      [PATCH] TTY: return class device pointer from tty_register_device() · 1cdcb6b4
      Hansjoerg Lipp 提交于
      Let tty_register_device() return a pointer to the class device it creates.
      This allows registrants to add their own sysfs files under the class
      device node.
      Signed-off-by: NHansjoerg Lipp <hjlipp@web.de>
      Signed-off-by: NTilman Schmidt <tilman@imap.cc>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1cdcb6b4
    • B
      [PATCH] PCI: nVidia quirk to make AER PCI-E extended capability visible · cf34a8e0
      Brice Goglin 提交于
      The nVidia CK804 PCI-E chipset supports the AER extended capability
      but sometimes fails to link it (with some BIOS or after a warm reboot).
      It makes the AER cap invisible to pci_find_ext_capability().
      
      The patch adds a quirk to set the missing bit that controls the
      linking of the capability.
      By the way, it removes the corresponding code in the myri10ge driver.
      Signed-off-by: NBrice Goglin <brice@myri.com>
      Signed-off-by: NLoic Prylli <loic@myri.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cf34a8e0
    • S
      [PATCH] PCI: disable msi mode in pci_disable_device · 99dc804d
      Shaohua Li 提交于
      Brice said the pci_save_msi_state breaks his driver in his special usage
      (not in suspend/resume), as pci_save_msi_state will disable msi mode. In
      his usage, pci_save_state will be called at runtime, and later (after
      the device operates for some time and has an error) pci_restore_state
      will be called.
      In another hand, suspend/resume needs disable msi mode, as device should
      stop working completely. This patch try to workaround this issue.
      Drivers are expected call pci_disable_device in suspend time after
      pci_save_state.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      99dc804d
    • B
      [PATCH] PCI: Move various PCI IDs to header file · 74d0a988
      Brent Casavant 提交于
      Move various QLogic, Vitesse, and Intel storage controller PCI IDs to the
      main header file.
      Signed-off-by: NBrent Casavant <bcasavan@sgi.com>
      Acked-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      74d0a988
    • D
      [PATCH] PCI Bus Parity Status-broken hardware attribute, EDAC foundation · bd8481e1
      Doug Thompson 提交于
      Currently, the EDAC (error detection and correction) modules that are in
      the kernel contain some features that need to be moved. After some good
      feedback on the PCI Parity detection code and interface
      (http://www.ussg.iu.edu/hypermail/linux/kernel/0603.1/0897.html) this
      patch ADDs an new attribute to the pci_dev structure: Namely the
      'broken_parity_status' bit.
      
      When set this indicates that the respective hardware generates false
      positives of Parity errors.
      
      The EDAC "blacklist" solution was inferior and will be removed in a
      future patch.
      
      Also in this patch is a PCI quirk.c entry for an Infiniband PCI-X card
      which generates false positive parity errors.
      
      I am requesting comments on this AND on the possibility of a exposing
      this 'broken_parity_status' bit to userland via the PCI device sysfs
      directory for devices. This access would allow for enabling of this
      feature on new devices and for old devices that have their drivers
      updated. (SLES 9 SP3 did this on an ATI motherboard video device). There
      is a need to update such a PCI attribute between kernel releases.
      
      This patch just adds a storage place for the attribute and a quirk entry
      for a known bad PCI device. PCI Parity reaper/harvestor operations are
      in EDAC itself and will be refactored to use this PCI attribute instead
      of its own mechanisms (which are currently disabled) in the future.
      Signed-off-by: NDoug Thompson <norsk5@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bd8481e1
    • K
      [PATCH] PCI: Add pci_assign_resource_fixed -- allow fixed address assignments · 75acfeca
      Kumar Gala 提交于
      PCI: Add pci_assign_resource_fixed -- allow fixed address assignments
      
      On some embedded systems the PCI address for hotplug devices are not only
      known a priori but are required to be at a given PCI address for other
      master in the system to be able to access.
      
      An example of such a system would be an FPGA which is setup from user space
      after the system has booted.  The FPGA may be access by DSPs in the system
      and those DSPs expect the FPGA at a fixed PCI address.
      
      Added pci_assign_resource_fixed() as a way to allow assignment of the PCI
      devices's BARs at fixed PCI addresses.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      75acfeca
    • B
      [PATCH] PCI: Add PCI_CAP_ID_VNDR · c34b4c73
      Brice Goglin 提交于
      Add the vendor-specific extended capability PCI_CAP_ID_VNDR.  It will be
      used by the Myri-10G Ethernet driver (will be submitted soon).
      Signed-off-by: NBrice Goglin <brice@myri.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c34b4c73
  3. 21 6月, 2006 1 次提交
    • A
      [POWERPC] Fix mdelay badness on shared processor partitions · 1e92a550
      Anton Blanchard 提交于
      On partitioned PPC64 systems where a partition is given 1/10 of a
      processor, we have seen mdelay() delaying for 10 times longer than it
      should.  The reason is that the generic mdelay(n) does n delays of 1
      millisecond each.  However, with 1/10 of a processor, we only get a
      one-millisecond timeslice every 10ms.  Thus each 1 millisecond delay
      loop ends up taking 10ms elapsed time.
      
      The solution is just to use the PPC64 udelay function, which uses the
      timebase to ensure that the delay is based on elapsed time rather than
      how much processing time the partition has been given.  (Yes, the
      generic mdelay uses the PPC64 udelay, but the problem is that the
      start time gets reset every millisecond, and each time it gets reset
      we lose another 9ms.)
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NAndrew Morton <akpm@osdl.org>
      1e92a550