1. 22 7月, 2008 17 次提交
    • J
      remove CONFIG_KMOD from core kernel code · a1ef5adb
      Johannes Berg 提交于
      Always compile request_module when the kernel allows modules.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      a1ef5adb
    • J
      rework try_then_request_module to do less in non-modular kernels · df648c9f
      Johannes Berg 提交于
      This reworks try_then_request_module to only invoke the "lookup"
      function "x" once when the kernel is not modular.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      df648c9f
    • D
      module: turn longs into ints for module sizes · 2f0f2a33
      Denys Vlasenko 提交于
      This shrinks module.o and each *.ko file.
      
      And finally, structure members which hold length of module
      code (four such members there) and count of symbols
      are converted from longs to ints.
      
      We cannot possibly have a module where 32 bits won't
      be enough to hold such counts.
      
      For one, module loading checks module size for sanity
      before loading, so such insanely big module will fail
      that test first.
      Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      2f0f2a33
    • D
      Shrink struct module: CONFIG_UNUSED_SYMBOLS ifdefs · f7f5b675
      Denys Vlasenko 提交于
      module.c and module.h conatains code for finding
      exported symbols which are declared with EXPORT_UNUSED_SYMBOL,
      and this code is compiled in even if CONFIG_UNUSED_SYMBOLS is not set
      and thus there can be no EXPORT_UNUSED_SYMBOLs in modules anyway
      (because EXPORT_UNUSED_SYMBOL(x) are compiled out to nothing then).
      
      This patch adds required #ifdefs.
      Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      f7f5b675
    • R
      module: reorder struct module to save space on 64 bit builds · af540689
      Richard Kennedy 提交于
      reorder struct module to save space on 64 bit builds.
      saves 1 cacheline_size  (128 on default x86_64 & 64 on AMD
      Opteron/athlon) when CONFIG_MODULE_UNLOAD=y.
      Signed-off-by: NRichard Kennedy <richard@rsk.demon.co.uk>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      af540689
    • A
      USB: Force unbinding of drivers lacking reset_resume or other methods · 78d9a487
      Alan Stern 提交于
      This patch (as1024) takes care of a FIXME issue: Drivers that don't
      have the necessary suspend, resume, reset_resume, pre_reset, or
      post_reset methods will be unbound and their interface reprobed when
      one of the unsupported events occurs.
      
      This is made slightly more difficult by the fact that bind operations
      won't work during a system sleep transition.  So instead the code has
      to defer the operation until the transition ends.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      78d9a487
    • M
      USB: fix usb_reset_device and usb_reset_composite_device(take 3) · 742120c6
      Ming Lei 提交于
      This patch renames the existing usb_reset_device in hub.c to
      usb_reset_and_verify_device and renames the existing
      usb_reset_composite_device to usb_reset_device. Also the new
      usb_reset_and_verify_device does't need to be EXPORTED .
      
      The idea of the patch is that external interface driver
      should warn the other interfaces' driver of the same
      device before and after reseting the usb device. One interface
      driver shoud call _old_ usb_reset_composite_device instead of
      _old_ usb_reset_device since it can't assume the device contains
      only one interface. The _old_ usb_reset_composite_device
      is safe for single interface device also. we rename the two
      functions to make the change easily.
      
      This patch is under guideline from Alan Stern.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      742120c6
    • M
      USB: remove interface parameter of usb_reset_composite_device · 625f6949
      Ming Lei 提交于
      From the current implementation of usb_reset_composite_device
      function, the iface parameter is no longer useful. This function
      doesn't do something special for the iface usb_interface,compared
      with other interfaces in the usb_device. So remove the parameter
      and fix the related caller.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      625f6949
    • A
      USB Gadget: documentation update · f579c2b4
      Alan Stern 提交于
      This patch (as1102) clarifies two points in the USB Gadget kerneldoc:
      
      	Request completion callbacks are always made with interrupts
      	disabled;
      
      	Device controllers may not support STALLing the status stage
      	of a control transfer after the data stage is over.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f579c2b4
    • F
      usb: irda: cleanup on ir-usb module · e0d795e4
      Felipe Balbi 提交于
      General cleanup on ir-usb module. Introduced
      a common header that could be used also on
      usb gadget framework.
      
      Lot's of cleanups and now using macros from the header
      file.
      Signed-off-by: NFelipe Balbi <me@felipebalbi.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e0d795e4
    • 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: descriptor copying support · a4c39c41
      David Brownell 提交于
      Define three new descriptor manipulation utilities, for use when
      setting up functions that may have multiple instances:
      
      	usb_copy_descriptors() to copy a vector of descriptors
      	usb_free_descriptors() to free the copy
      	usb_find_endpoint() to find a copied version
      
      These will be used as follows.  Functions will continue to have static
      tables of descriptors they update, now used as __initdata templates.
      
      When a function creates a new instance, it patches those tables with
      relevant interface and string IDs, plus endpoint assignments.  Then it
      copies those morphed descriptors, associates the copies with the new
      function instance, and records the endpoint descriptors to use when
      activating the endpoints.  When initialization is done, only the copies
      remain in memory.  The copies are freed on driver removal.
      
      This ensures that each instance has descriptors which hold the right
      instance-specific data.  Two instances in the same configuration will
      obviously never share the same interface IDs or use the same endpoints.
      Instances in different configurations won't do so either, which means
      this is slightly less memory-efficient in some cases.
      
      This also includes a bugfix to the epautoconf code that shows up with
      this usage model.  It must replace the previous endpoint number when
      updating the template descriptors, not just mask in a few more bits.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a4c39c41
    • A
      USB: remove CVS keywords · ea05af61
      Adrian Bunk 提交于
      This patch removes CVS keywords that weren't updated for a long time
      from comments.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ea05af61
    • A
      USB: implement "soft" unbinding · 9da82bd4
      Alan Stern 提交于
      This patch (as1091) changes the way usbcore handles interface
      unbinding.  If the interface's driver supports "soft" unbinding (a new
      flag in the driver structure) then in-flight URBs are not cancelled
      and endpoints are not disabled.  Instead the driver is allowed to
      continue communicating with the device (although of course it should
      stop before its disconnect routine returns).
      
      The purpose of this change is to allow drivers to do a clean shutdown
      when they get unbound from a device that is still plugged in.  Killing
      all the URBs and disabling the endpoints before calling the driver's
      disconnect method doesn't give the driver any control over what
      happens, and it can leave devices in indeterminate states.  For
      example, when usb-storage unbinds it doesn't want to stop while in the
      middle of transmitting a SCSI command.
      
      The soft_unbind flag is added because in the past, a number of drivers
      have experienced problems related to ongoing I/O after their disconnect
      routine returned.  Hence "soft" unbinding is made available only to
      drivers that claim to support it.
      
      The patch also replaces "interface_to_usbdev(intf)" with "udev" in a
      couple of places, a minor simplification.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9da82bd4
    • G
      USB: handle pci_name() being const · 1b26da15
      Greg Kroah-Hartman 提交于
      This changes usb_create_hcd() to be able to handle the fact that
      pci_name() has changed to a constant string.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1b26da15
    • E
      netfilter: nfnetlink_log: send complete hardware header · 72961ecf
      Eric Leblond 提交于
      This patch adds some fields to NFLOG to be able to send the complete
      hardware header with all necessary informations.
      It sends to userspace:
       * the type of hardware link
       * the lenght of hardware header
       * the hardware header
      Signed-off-by: NEric Leblond <eric@inl.fr>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72961ecf
    • 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 23 次提交