1. 22 7月, 2008 8 次提交
    • D
      sysfs: add /sys/dev/{char,block} to lookup sysfs path by major:minor · e105b8bf
      Dan Williams 提交于
      Why?:
      There are occasions where userspace would like to access sysfs
      attributes for a device but it may not know how sysfs has named the
      device or the path.  For example what is the sysfs path for
      /dev/disk/by-id/ata-ST3160827AS_5MT004CK?  With this change a call to
      stat(2) returns the major:minor then userspace can see that
      /sys/dev/block/8:32 links to /sys/block/sdc.
      
      What are the alternatives?:
      1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce
         the need to proliferate ioctl interfaces into the kernel, so this
         seems counter productive.
      
      2/ Use udev to create these symlinks: Also doable, but it adds a
         udev dependency to utilities that might be running in a limited
         environment like an initramfs.
      
      3/ Do a full-tree search of sysfs.
      
      [kay.sievers@vrfy.org: fix duplicate registrations]
      [kay.sievers@vrfy.org: cleanup suggestions]
      
      Cc: Neil Brown <neilb@suse.de>
      Cc: Tejun Heo <htejun@gmail.com>
      Acked-by: NKay Sievers <kay.sievers@vrfy.org>
      Reviewed-by: NSL Baur <steve@xemacs.org>
      Acked-by: NKay Sievers <kay.sievers@vrfy.org>
      Acked-by: NMark Lord <lkml@rtr.ca>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e105b8bf
    • A
      USB: use reset_resume when normal resume fails · 86c57edf
      Alan Stern 提交于
      This patch (as1109b) makes USB-Persist more resilient to errors.  With
      the current code, if a normal resume fails, it's an unrecoverable
      error.  With the patch, if a normal resume fails (and if the device is
      enabled for USB-Persist) then a reset-resume is tried.
      
      This fixes the problem reported in Bugzilla #10977.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      86c57edf
    • D
      usb gadget serial: split out generic serial function · 61d8baea
      David Brownell 提交于
      Split out the generic serial support into a "function driver".  This
      closely mimics the ACM support, but with a MUCH simpler control model.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      61d8baea
    • D
      usb gadget serial: split out CDC ACM function · 4d5a73dc
      David Brownell 提交于
      Split out CDC ACM parts of "gadget serial" to a "function driver".
      Some key structural differences from the previous ACM support, shared
      with with the generic serial function (next patch):
      
       - As a function driver, it can be combined with other functions.
         One gadget configuration could offer both serial and network
         links, as an example.
      
       - One serial port can be exposed in multiple configurations;
         the /dev/ttyGS0 node could be exposed regardless of which
         config the host selected.
      
       - One configuration can expose multiple serial ports, such as
         ttyGS0, ttyGS1, ttyGS2, and ttyGS3.
      
      This code should be a lot easier to understand than the previous
      all-in-one-big-file version of the driver.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4d5a73dc
    • D
      usb gadget: composite gadget core · 40982be5
      David Brownell 提交于
      Add <linux/usb/composite.h> interfaces for composite gadget drivers, and
      basic implementation support behind it:
      
        - struct usb_function ... groups one or more interfaces into a function
          managed as one unit within a configuration, to which it's added by
          usb_add_function().
      
        - struct usb_configuration ... groups one or more such functions into
          a configuration managed as one unit by a driver, to which it's added
          by usb_add_config().  These operate at either high or full/low speeds
          and at a given bMaxPower.
      
        - struct usb_composite_driver ... groups one or more such configurations
          into a gadget driver, which may be registered or unregistered.
      
        - struct usb_composite_dev ... a usb_composite_driver manages this; it
          wraps the usb_gadget exposed by the controller driver.
      
      This also includes some basic kerneldoc.
      
      How to use it (the short version):  provide a usb_composite_driver with a
      bind() that calls usb_add_config() for each of the needed configurations.
      The configurations in turn have bind() calls, which will usb_add_function()
      for each function required.  Each function's bind() allocates resources
      needed to perform its tasks, like endpoints; sometimes configurations will
      allocate resources too.
      
      Separate patches will convert most gadget drivers to this infrastructure.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      40982be5
    • D
      usb gadget: use new serial core · a7707adf
      David Brownell 提交于
      Teach "gadget serial" to use the new abstracted (and bugfixed) TTY glue,
      and remove all the orignal tangled-up code.  Update the documentation
      accordingly.  This is a net object code shrink and cleanup; it should
      make it a lot easier to see how the TTY glue should accomodate updates
      to the TTY layer, be bugfixed, etc.
      
      Notable behavior changes include:  it can now support getty even when
      there's no USB connection; it fits properly into the mdev/udev world;
      and RX handling is better (throttling works, and low latency).
      
      Configurations with scripts setting up the /dev/ttygserial device node
      (with "experimental" major number) may want to change that to be a
      symlink pointing to the /dev/ttyGS0 file, as a migration aid; else,
      just switch entirely over to mdev/udev.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a7707adf
    • A
      USB: remove Documentation/usb/uhci.txt · baad4119
      Adrian Bunk 提交于
      The driver was removed before kernel 2.6.0
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      baad4119
    • K
      netfilter: accounting rework: ct_extend + 64bit counters (v4) · 58401572
      Krzysztof Piotr Oledzki 提交于
      Initially netfilter has had 64bit counters for conntrack-based accounting, but
      it was changed in 2.6.14 to save memory. Unfortunately in-kernel 64bit counters are
      still required, for example for "connbytes" extension. However, 64bit counters
      waste a lot of memory and it was not possible to enable/disable it runtime.
      
      This patch:
       - reimplements accounting with respect to the extension infrastructure,
       - makes one global version of seq_print_acct() instead of two seq_print_counters(),
       - makes it possible to enable it at boot time (for CONFIG_SYSCTL/CONFIG_SYSFS=n),
       - makes it possible to enable/disable it at runtime by sysctl or sysfs,
       - extends counters from 32bit to 64bit,
       - renames ip_conntrack_counter -> nf_conn_counter,
       - enables accounting code unconditionally (no longer depends on CONFIG_NF_CT_ACCT),
       - set initial accounting enable state based on CONFIG_NF_CT_ACCT
       - removes buggy IPCT_COUNTER_FILLING event handling.
      
      If accounting is enabled newly created connections get additional acct extend.
      Old connections are not changed as it is not possible to add a ct_extend area
      to confirmed conntrack. Accounting is performed for all connections with
      acct extend regardless of a current state of "net.netfilter.nf_conntrack_acct".
      Signed-off-by: NKrzysztof Piotr Oledzki <ole@ans.pl>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58401572
  2. 21 7月, 2008 2 次提交
    • N
      md: Tidy up rdev_size_store a bit: · d7027458
      Neil Brown 提交于
       - used strict_strtoull in place of simple_strtoull
       - use my_mddev in place of rdev->mddev (they have the same value)
      and more significantly,
       - don't adjust mddev->size to fit, rather reject changes which make
         rdev->size smaller than mddev->size
      
      Adjusting mddev->size is a hangover from bind_rdev_to_array which
      does a similar thing.  But it really is a better design to insist that
      mddev->size is set as required, then the rdev->sizes are set to allow
      for that.  The previous way invites confusion.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      d7027458
    • H
      Subject: [PATCH 1/2] serial: Add flush_buffer() operation to uart_ops · 6bb0e3a5
      Haavard Skinnemoen 提交于
      Serial drivers using DMA (like the atmel_serial driver) tend to get very
      confused when the xmit buffer is flushed and nobody told them.  They
      also tend to spew a lot of garbage since the DMA engine keeps running
      after the buffer is flushed and possibly refilled with unrelated data.
      
      This patch adds a new flush_buffer operation to the uart_ops struct,
      along with a call to it from uart_flush_buffer() right after the xmit
      buffer has been cleared. The driver can implement this in order to
      syncronize its internal DMA state with the xmit buffer when the buffer
      is flushed.
      Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6bb0e3a5
  3. 20 7月, 2008 16 次提交
  4. 18 7月, 2008 4 次提交
  5. 17 7月, 2008 10 次提交