1. 21 5月, 2010 19 次提交
  2. 19 3月, 2010 3 次提交
  3. 03 3月, 2010 3 次提交
  4. 21 1月, 2010 2 次提交
  5. 24 12月, 2009 1 次提交
  6. 23 12月, 2009 3 次提交
  7. 10 10月, 2009 1 次提交
  8. 23 9月, 2009 1 次提交
    • D
      USB: use kfifo to buffer usb-generic serial writes · 8e8dce06
      David VomLehn 提交于
      When do_output_char() attempts to write a carriage return/line feed sequence,
      it first checks to see how much buffer room is available. If there are at least
      two characters free, it will write the carriage return/line feed with two calls
      to tty_put_char(). It calls the tty_operation functions write() for devices that
      don't support the tty_operations function put_char(). If the USB generic serial
      device's write URB is not in use, it will return the buffer size when asked how
      much room is available. The write() of the carriage return will cause it to mark
      the write URB busy, so the subsequent write() of the line feed will be ignored.
      
      This patch uses the kfifo infrastructure to implement a write FIFO that
      accurately returns the amount of space available in the buffer.
      Signed-off-by: NDavid VomLehn <dvomlehn@cisco.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8e8dce06
  9. 20 9月, 2009 1 次提交
  10. 11 7月, 2009 2 次提交
  11. 16 6月, 2009 4 次提交
    • A
      USB: usb-serial: replace shutdown with disconnect, release · f9c99bb8
      Alan Stern 提交于
      This patch (as1254) splits up the shutdown method of usb_serial_driver
      into a disconnect and a release method.
      
      The problem is that the usb-serial core was calling shutdown during
      disconnect handling, but drivers didn't expect it to be called until
      after all the open file references had been closed.  The result was an
      oops when the close method tried to use memory that had been
      deallocated by shutdown.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      f9c99bb8
    • J
      USB: usb_serial: only allow sysrq on a console port · 568d422e
      Jason Wessel 提交于
      The only time a sysrq should get processed is if the attached device
      is a console.  This is intended to protect sysrq execution on a host
      connected with a terminal program.
      
      Here is the problem scenario:
      
      host A <-- rs232 link --> host B
      
      Host A is using mincom and a usb pl2303 device to connect to host b
      which is a linux system with a usb pl2303 device acting as the serial
      console.  When host B is rebooted the pl2303 emits random junk
      characters on reset.  These character sequences contain serial break
      signals most of the time and when translated to a sysrq have caused
      host A to get random processes killed, reboots or power down.
      
      It is true that in this setup with this patch host B might still have
      the same problem as host A if you reboot host A.  In most cases host A
      is a development host which seldom gets rebooted, and you could turn
      off sysrq temporarily on host B if you need to reboot host A.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      568d422e
    • 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