1. 13 5月, 2012 3 次提交
    • L
      usb/net: rndis: merge media type definitions · 17c51b6c
      Linus Walleij 提交于
      Let's have a unified table of RNDIS media. We used to have a similar
      table with NDIS_* prefix from the gadget driver, but since we're only
      using RNDIS in the kernel (IIRC NDIS, non-remote, is for the windows-
      internal network drivers so what do we care) let's prefix everything
      with RNDIS. Some of the definitions were conflicting, in one of the
      defines 0x0B is bearer "CO WAN" and in two others "BPC". Well I took
      the majority vote. Two definition of medium 0x09 calls it "wireless
      WAN" but one vote for "wireless LAN" but in this case I am sticking
      with the minority, "Wide Area Network" does not make much sense in
      this case as far as I can tell.
      
      NOTE: latin singular and plural is so screwed up in these defines
      that it makes my eyes bleed. But I will not attempt to submit a
      patch converting all use of _MEDIA_ to _MEDIUM_ while I can probably
      tell from the semantics of the code that RNDIS_MEDIA_STATE_CONNECTED
      is most probably (erroneously) referring to a singular, unless it
      can return an array of connected media. I suspect these erroneous
      plurals are used in documentation and such so I don't want to
      mess around with things for no functional change.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      17c51b6c
    • L
      usb/net: rndis: merge duplicate 802_* OIDs · 4cc6c4d5
      Linus Walleij 提交于
      The 802_* network OIDs were duplicated, so let's merge them and
      use the RNDIS_* prefixed definitions from the hyperV driver.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cc6c4d5
    • L
      usb/net: rndis: eliminate first set of duplicate OIDs · 8cdddc3f
      Linus Walleij 提交于
      The RNDIS protocol contains a vast number of Object ID:s (OIDs).
      The current definitions had multiple definitions of these ID:s,
      let's use the nicely RNDIS_*-prefixed defines from the HyperV
      implementation, rename everywhere they're used, and copy+rename
      the few that were missing from this list of objects.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8cdddc3f
  2. 29 3月, 2012 1 次提交
  3. 23 10月, 2010 1 次提交
  4. 04 9月, 2010 2 次提交
  5. 10 8月, 2010 1 次提交
  6. 08 7月, 2010 1 次提交
    • E
      net: fix 64 bit counters on 32 bit arches · 28172739
      Eric Dumazet 提交于
      There is a small possibility that a reader gets incorrect values on 32
      bit arches. SNMP applications could catch incorrect counters when a
      32bit high part is changed by another stats consumer/provider.
      
      One way to solve this is to add a rtnl_link_stats64 param to all
      ndo_get_stats64() methods, and also add such a parameter to
      dev_get_stats().
      
      Rule is that we are not allowed to use dev->stats64 as a temporary
      storage for 64bit stats, but a caller provided area (usually on stack)
      
      Old drivers (only providing get_stats() method) need no changes.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28172739
  7. 16 6月, 2010 1 次提交
  8. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  9. 23 9月, 2009 1 次提交
    • B
      USB: gadget: Add EEM gadget driver · 9b39e9dd
      Brian Niebuhr 提交于
      This patch adds a CDC EEM ethernet gadget driver.  CDC EEM is a newer
      USB ethernet specification that uses a simpler interface than the older
      CDC ECM.  This makes CDC EEM usable by a wider set of USB hardware.
      By default the ethernet gadget will still use CDC ECM/Subset, but kernel
      configuration and/or a module parameter will allow alternative use of
      the CDC EEM protocol.
      
      Changes since last version:
      	- Brought in missing RNDIS changes that caused compile error
      	- Modified 'sentinel CRC' checking to match EEM host driver
      Signed-off-by: NBrian Niebuhr <bniebuhr@efjohnson.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9b39e9dd
  10. 13 7月, 2009 1 次提交
  11. 22 3月, 2009 1 次提交
  12. 15 2月, 2009 1 次提交
  13. 17 10月, 2008 1 次提交
  14. 22 7月, 2008 3 次提交
    • D
      usb gadget: RNDIS cleanups · 15b2d2b5
      David Brownell 提交于
      Some cleanup to the RNDIS code:
      
       - Minor bugfix:  rndis_unit() is supposed to put the link into the
         RNDIS_UNINITIALIZED state, which does not mean "unused".  There's
         a separate method to stop using the link.  (Bug doesn't affect
         anything right now because of how the code is used.)
      
       - Reduce coupling between RNDIS code and its user(s), in preparation
         for updates in that code:
      
          * Decouple RNDIS_RESPONSE_AVAILABLE notifications from net_device
            by passing just a void* handle.  (Also, remove the unused return
            value of the notification callback.)
          * When it needs a copy of net_device stats, just ask for it
      
       - Remove unused/untested code backing various never-used OIDs:
      
          * RNDIS_PM, RNDIS_WAKEUP ... "should" get implemented, but the
            relevant docs were unclear, ambguous, and incomplete.  Someone
            with access to the Hidden Gospels (maybe in the EU?) might be
            able to figure out what this should do.
          * RNDIS_OPTIONAL_STATS ... as the name suggests, optional.  Never
            implemented in part because not all the semantics were clear.
          * OID_GEN_RNDIS_CONFIG_PARAMETER, which has been #if 0 forever.
      
       - A few small whitespace fixes
      
      Plus switch the VERBOSE symbol over to the newer VERBOSE_DEBUG style.
      
      There should be no functional changes because of this patch; it's a
      net source code shrink (because of the dead/unused code removal) and
      a small object code shrink (a couple hundred bytes on ARMv5).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      15b2d2b5
    • A
      USB: rndis: switch to seq_files · e184d5fc
      Alexey Dobriyan 提交于
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e184d5fc
    • 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
  15. 29 4月, 2008 1 次提交
  16. 25 4月, 2008 2 次提交
  17. 02 2月, 2008 1 次提交
  18. 13 7月, 2007 1 次提交
  19. 09 6月, 2007 1 次提交
    • D
      USB: usb gadgets avoid le{16,32}_to_cpup() · 01ee7d70
      David Brownell 提交于
      It turns out that le16_to_cpup() and le32_to_cpup() aren't always safe
      to call with pointers into packed structures, since those are inlined
      functions and GCC may lose the "packed" attribute.  So those references
      can become unaligned kernel accesses, which are evil on some hardware.
      
      This patch updates uses of those routines in the gadget stack.  The
      references into packed structures can just use leXX_to_cpu(*x), which
      in most cases is more natural.  Some other uses in RNDIS, mostly in
      debug code, were wrong in the first place; those use get_unaligned().
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      01ee7d70
  20. 12 2月, 2007 1 次提交
  21. 13 7月, 2006 1 次提交
    • D
      [PATCH] USB: gadget section fixups · a353678d
      David Brownell 提交于
      Recent section changes broke gadget builds on some platforms.  This patch
      is the best fix that's available until better section markings exist:
      
       - There's a lot of cleanup code that gets used in both init and exit paths;
         stop marking it as "__exit".
      
         (Best fix for this would be an "__init_or_exit" section marking, putting
         the cleanup in __init when __exit sections get discarded else in __exit.)
      
       - Stop marking the use-once probe routines as "__init" since references
         to those routines are not allowed from driver structures.  They're now
         marked "__devinit", which in practice is a net lose.
      
         (Best fix for this is likely to separate such use-once probe routines
         from the driver structure ... but in general, all busses that aren't
         hotpluggable will be forced to waste memory for all probe-only code.)
      
      In general these broken section rules waste an average of two to four kBytes
      per driver of code bloat ... because none of the relevant code can ever be
      reused after module initialization.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a353678d
  22. 01 7月, 2006 1 次提交
  23. 22 6月, 2006 1 次提交
  24. 01 3月, 2006 1 次提交
  25. 09 11月, 2005 1 次提交
    • O
      [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason · 733482e4
      Olaf Hering 提交于
      This patch removes almost all inclusions of linux/version.h.  The 3
      #defines are unused in most of the touched files.
      
      A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
      unfortunatly in linux/version.h.
      
      There are also lots of #ifdef for long obsolete kernels, this was not
      touched.  In a few places, the linux/version.h include was move to where
      the LINUX_VERSION_CODE was used.
      
      quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`
      
      search pattern:
      /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h
      Signed-off-by: NOlaf Hering <olh@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      733482e4
  26. 28 6月, 2005 2 次提交
  27. 19 4月, 2005 1 次提交
    • D
      [PATCH] usb gadget: ethernet/rndis updates · 6cdee106
      David Brownell 提交于
      Updates to the Ethernet/RNDIS gadget driver (mostly for RNDIS):
      
        - Fix brown-paper bag goof with RNDIS packet TX ... the wrong length
          field got set, so Windows would ignore data packets it received.
      
        - More consistent handling of CDC output filters (but not yet hooking
          things up so RNDIS uses the mechanism).
      
        - Zerocopy RX for RNDIS packets too (saving CPU cycles).
      
        - Use the pre-allocated interrupt/status request and buffer, rather
          than allocating and freeing one of each every few seconds (which
          could fail).
      
        - Some more "sparse" tweaks, making both dual-speed and single-speed
          configurations happier.
      
        - RNDIS speeds are reported in units of 100bps, not bps.
      
      Plus two minor cleanups (whitespace, messaging).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6cdee106
  28. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4