1. 28 9月, 2006 6 次提交
    • A
      usbcore: move code among source files · 36e56a34
      Alan Stern 提交于
      This revised patch (as713b) moves a few routines among source files in
      usbcore.  Some driver-related code in usb.c (claiming interfaces and
      matching IDs) is moved to driver.c, where it belongs.  Also the
      usb_generic stuff in driver.c is moved to a new source file: generic.c.
      (That's the reason for revising the patch.)  Although not very big now,
      it will get bigger in a later patch.
      
      None of the code has been changed; it has only been re-arranged.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      36e56a34
    • A
      usbcore: rename usb_suspend_device to usb_port_suspend · 140d8f68
      Alan Stern 提交于
      This revised patch (as715b) renames usb_suspend_device to
      usb_port_suspend, usb_resume_device to usb_port_resume, and
      finish_device_resume to finish_port_resume.  There was no objection to
      the original version of the patch so this should be okay to apply.
      
      The revision was needed only because I have re-arranged the order of the
      earlier patches.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      140d8f68
    • A
      usbfs: detect device unregistration · 349710c3
      Alan Stern 提交于
      This patch (as711b) is a revised version of an earlier submission.  It
      modifies the usbfs code to detect when a device has been unregistered from
      usbfs, even if the device is still connected.  Although this can't happen
      now, it will be able to happen after the upcoming changes to usb_generic.
      
      Nobody objected to this patch when it was submitted before, so it should
      be okay to apply this version.  The revision is merely to take into
      account the changes introduced by as723, which touches the same driver.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      349710c3
    • A
      usbfs: private mutex for open, release, and remove · 4a2a8a2c
      Alan Stern 提交于
      The usbfs code doesn't provide sufficient mutual exclusion among open,
      release, and remove.  Release vs. remove is okay because they both
      acquire the device lock, but open is not exclusive with either one.  All
      three routines modify the udev->filelist linked list, so they must not
      run concurrently.
      
      Apparently someone gave this a minimum amount of thought in the past by
      explicitly acquiring the BKL at the start of the usbdev_open routine.
      Oddly enough, there's a comment pointing out that locking is unnecessary
      because chrdev_open already has acquired the BKL.
      
      But this ignores the point that the files in /proc/bus/usb/* are not
      char device files; they are regular files and so they don't get any
      special locking.  Furthermore it's necessary to acquire the same lock in
      the release and remove routines, which the code does not do.
      
      Yet another problem arises because the same file_operations structure is
      accessible through both the /proc/bus/usb/* and /dev/usb/usbdev* file
      nodes.  Even when one of them has been removed, it's still possible for
      userspace to open the other.  So simple locking around the individual
      remove routines is insufficient; we need to lock the entire
      usb_notify_remove_device notifier chain.
      
      Rather than rely on the BKL, this patch (as723) introduces a new private
      mutex for the purpose.  Holding the BKL while invoking a notifier chain
      doesn't seem like a good idea.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4a2a8a2c
    • A
      usbcore: add configuration_string to attribute group · b6eb2d84
      Alan Stern 提交于
      This patch (as737b) does a very small cleanup of core/sysfs.c by adding
      the configuration_string attribute file to the existing attribute group
      instead of treating it separately.  It doesn't need this separate
      treatment because unlike the other device string attributes, it changes
      along with the active configuration.
      
      The patch also fixes a simple typo (which, oddly enough, doesn't seem to
      bother the compiler).
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b6eb2d84
    • D
      USB: Make usb_buffer_free() NULL-safe · b94badbb
      Dmitry Torokhov 提交于
      kfree() handles NULL arguments which is handy in error handling paths as one
      does need to  insert bunch of ifs. How about making usb_buffer_free() do the
      same?
      Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b94badbb
  2. 27 9月, 2006 2 次提交
    • T
      [PATCH] inode-diet: Eliminate i_blksize from the inode structure · ba52de12
      Theodore Ts'o 提交于
      This eliminates the i_blksize field from struct inode.  Filesystems that want
      to provide a per-inode st_blksize can do so by providing their own getattr
      routine instead of using the generic_fillattr() function.
      
      Note that some filesystems were providing pretty much random (and incorrect)
      values for i_blksize.
      
      [bunk@stusta.de: cleanup]
      [akpm@osdl.org: generic_fillattr() fix]
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ba52de12
    • T
      [PATCH] inode_diet: Replace inode.u.generic_ip with inode.i_private · 8e18e294
      Theodore Ts'o 提交于
      The following patches reduce the size of the VFS inode structure by 28 bytes
      on a UP x86.  (It would be more on an x86_64 system).  This is a 10% reduction
      in the inode size on a UP kernel that is configured in a production mode
      (i.e., with no spinlock or other debugging functions enabled; if you want to
      save memory taken up by in-core inodes, the first thing you should do is
      disable the debugging options; they are responsible for a huge amount of bloat
      in the VFS inode structure).
      
      This patch:
      
      The filesystem or device-specific pointer in the inode is inside a union,
      which is pretty pointless given that all 30+ users of this field have been
      using the void pointer.  Get rid of the union and rename it to i_private, with
      a comment to explain who is allowed to use the void pointer.  This is just a
      cleanup, but it allows us to reuse the union 'u' for something something where
      the union will actually be used.
      
      [judith@osdl.org: powerpc build fix]
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Signed-off-by: NJudith Lebzelter <judith@osdl.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8e18e294
  3. 26 9月, 2006 1 次提交
  4. 03 8月, 2006 2 次提交
  5. 13 7月, 2006 4 次提交
  6. 04 7月, 2006 2 次提交
  7. 03 7月, 2006 1 次提交
  8. 01 7月, 2006 2 次提交
  9. 25 6月, 2006 1 次提交
  10. 23 6月, 2006 2 次提交
    • D
      [PATCH] VFS: Permit filesystem to override root dentry on mount · 454e2398
      David Howells 提交于
      Extend the get_sb() filesystem operation to take an extra argument that
      permits the VFS to pass in the target vfsmount that defines the mountpoint.
      
      The filesystem is then required to manually set the superblock and root dentry
      pointers.  For most filesystems, this should be done with simple_set_mnt()
      which will set the superblock pointer and then set the root dentry to the
      superblock's s_root (as per the old default behaviour).
      
      The get_sb() op now returns an integer as there's now no need to return the
      superblock pointer.
      
      This patch permits a superblock to be implicitly shared amongst several mount
      points, such as can be done with NFS to avoid potential inode aliasing.  In
      such a case, simple_set_mnt() would not be called, and instead the mnt_root
      and mnt_sb would be set directly.
      
      The patch also makes the following changes:
      
       (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
           pointer argument and return an integer, so most filesystems have to change
           very little.
      
       (*) If one of the convenience function is not used, then get_sb() should
           normally call simple_set_mnt() to instantiate the vfsmount. This will
           always return 0, and so can be tail-called from get_sb().
      
       (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
           dcache upon superblock destruction rather than shrink_dcache_anon().
      
           This is required because the superblock may now have multiple trees that
           aren't actually bound to s_root, but that still need to be cleaned up. The
           currently called functions assume that the whole tree is rooted at s_root,
           and that anonymous dentries are not the roots of trees which results in
           dentries being left unculled.
      
           However, with the way NFS superblock sharing are currently set to be
           implemented, these assumptions are violated: the root of the filesystem is
           simply a dummy dentry and inode (the real inode for '/' may well be
           inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
           with child trees.
      
           [*] Anonymous until discovered from another tree.
      
       (*) The documentation has been adjusted, including the additional bit of
           changing ext2_* into foo_* in the documentation.
      
      [akpm@osdl.org: convert ipath_fs, do other stuff]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      454e2398
    • G
      [PATCH] USB: get USB suspend to work again · 0517587e
      Greg Kroah-Hartman 提交于
      Yeah, it's a hack, but it is only temporary until Alan's patches
      reworking this area make it in.  We really should not care what devices
      below us are doing, especially when we do not really know what type of
      devices they are.  This patch relies on the fact that the endpoint
      devices do not have a driver assigned to us.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0517587e
  11. 22 6月, 2006 16 次提交
  12. 20 6月, 2006 1 次提交
    • D
      [SPARC]: Kill __irq_itoa(). · c6387a48
      David S. Miller 提交于
      This ugly hack was long overdue to die.
      
      It was a way to print out Sparc interrupts in a more freindly format,
      since IRQ numbers were arbitrary opaque 32-bit integers which vectored
      into PIL levels.  These 32-bit integers were not necessarily in the
      0-->NR_IRQS range, but the PILs they vectored to were.
      
      The idea now is that we will increase NR_IRQS a little bit and use a
      virtual<-->real IRQ number mapping scheme similar to PowerPC.
      
      That makes this IRQ printing hack irrelevant, and furthermore only a
      handful of drivers actually used __irq_itoa() making it even less
      useful.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6387a48