1. 16 11月, 2011 2 次提交
  2. 23 1月, 2011 1 次提交
  3. 21 5月, 2010 3 次提交
  4. 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
  5. 03 3月, 2010 1 次提交
    • N
      USB serial: make USB device id constant · 7d40d7e8
      Németh Márton 提交于
      The id_table field of the struct usb_device_id is constant in <linux/usb.h>
      so it is worth to make the initialization data also constant.
      
      The semantic match that finds this kind of pattern is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r@
      disable decl_init,const_decl_init;
      identifier I1, I2, x;
      @@
      	struct I1 {
      	  ...
      	  const struct I2 *x;
      	  ...
      	};
      @s@
      identifier r.I1, y;
      identifier r.x, E;
      @@
      	struct I1 y = {
      	  .x = E,
      	};
      @c@
      identifier r.I2;
      identifier s.E;
      @@
      	const struct I2 E[] = ... ;
      @depends on !c@
      identifier r.I2;
      identifier s.E;
      @@
      +	const
      	struct I2 E[] = ...;
      // </smpl>
      Signed-off-by: NNémeth Márton <nm127@freemail.hu>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: cocci@diku.dk
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7d40d7e8
  6. 20 9月, 2009 1 次提交
  7. 16 6月, 2009 2 次提交
    • J
      USB: serial: usb_debug,usb_generic_serial: implement sysrq and serial break · 98fcb5f7
      Jason Wessel 提交于
      The usb_debug driver was modified to implement serial break handling
      by using a "magic" data packet comprised of the sequence:
      
             0x00 0xff 0x01 0xfe   0x00 0xfe 0x01 0xff
      
      When the tty layer requests a serial break the usb_debug driver sends
      the magic packet.  On the receiving side the magic packet is thrown
      away or a sysrq is activated depending on what kernel .config options
      have been set.
      
      The generic serial driver was modified as well as the usb serial
      headers to generically implement sysrq processing in the same way the
      non usb uart based drivers implement the sysrq handling.  This will
      allow other usb serial devices to implement sysrq handling as desired.
      
      The new usb serial functions are named similarly and implemented
      similarly to the uart functions as follows:
      
      usb_serial_handle_break <-> uart_handle_break
      usb_serial_handle_sysrq_char <-> uart_handle_sysrq_char
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      98fcb5f7
    • J
      USB: usb_debug, usb_generic_serial: implement multi urb write · 715b1dc0
      Jason Wessel 提交于
      The usb_debug driver, when used as the console, will always fail to
      insert the carriage return and new line sequence as well as randomly
      drop console output.  This is a result of only having the single
      write_urb and that the tty layer will have a lock that prevents the
      processing of the back to back urb requests.
      
      The solution is to allow more than one urb to be outstanding and have
      a slightly deeper transmit queue.  The idea and some code is borrowed
      from the ftdi_sio usb driver.
      
      The generic usb serial driver was modified so as to allow the classic
      method of 1 write urb, or a multi write urb scheme with N allowed
      outstanding urbs where N is controlled by max_in_flight_urbs.  When
      max_in_flight_urbs in a "struct usb_serial_driver" is non zero the
      multi write urb scheme will be used.
      
      The size of 4000 was selected for the usb_debug driver so that the
      driver lowers possibility of losing the queued console messages during
      the kernel startup.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      715b1dc0
  8. 08 1月, 2009 1 次提交
  9. 23 7月, 2008 1 次提交
    • A
      usb_serial: API all change · 95da310e
      Alan Cox 提交于
      USB serial likes to use port->tty back pointers for the real work it does and
      to do so without any actual locking. Unfortunately when you consider hangup
      events, hangup/parallel reopen or even worse hangup followed by parallel close
      events the tty->port and port->tty pointers are not guaranteed to be the same
      as port->tty is the active tty while tty->port is the port the tty may or
      may not still be attached to.
      
      So rework the entire API to pass the tty struct. For console cases we need
      to pass both for now. This shows up multiple drivers that immediately crash
      with USB console some of which have been fixed in the process.
      
      Longer term we need a proper tty as console abstraction
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      95da310e
  10. 22 7月, 2008 1 次提交
    • A
      USB: debug port converter does not accept more than 8 byte packets · 71be4f81
      Aleksey Gorelov 提交于
      USB debug port only supports 8 byte rx/tx packets. Although spec implies that
      "if a packet larger than eight bytes is received from the remote computer, the
      device must break the larger packet into eight-byte packets before sending the
      data to the Debug Port", the real PLX NET20DC device does not handle it right -
      data is corrupted on debug port end if serial interface sends >8 byte urbs.
      Patch below fixes the issue by limiting tx urb to 8 byte.
      
      Signed off by: Aleks Gorelov <dared1st@yahoo.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      71be4f81
  11. 25 4月, 2008 1 次提交
  12. 02 12月, 2006 1 次提交
  13. 13 7月, 2006 1 次提交
  14. 15 4月, 2006 1 次提交
  15. 05 1月, 2006 2 次提交
  16. 29 10月, 2005 3 次提交
  17. 22 9月, 2005 1 次提交
  18. 04 5月, 2005 1 次提交