1. 15 8月, 2013 5 次提交
    • S
      usb: rh_call_control tbuf overflow fix · e57e780b
      Sean O. Stalley 提交于
      rh_call_control() contains a buffer, tbuf, which it uses to hold
      USB descriptors. These discriptors are eventually copied into the
      transfer_buffer in the URB. The buffer in the URB is dynamically
      defined and is always large enough to hold the amount of data it
      requests.
      
      tbuf is currently statically allocated on the stack with a size
      of 15 bytes, regardless of the size specified in the URB.
      This patch dynamically allocates tbuf, and ensures that tbuf is
      at least as big as the buffer in the URB.
      
      If an hcd attempts to write a descriptor containing more than
      15 bytes ( such as the Standard BOS Descriptor for hubs, defined
      in the USB3.0 Spec, section 10.13.1 ) the write would overflow
      the buffer and corrupt the stack. This patch addresses this
      behavior.
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NSean O. Stalley <sean.stalley@intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e57e780b
    • J
      usb: host: add Kconfig option for EHSET · 726a85ca
      Jack Pham 提交于
      commit 9841f37a ("usb: ehci: Add support for SINGLE_STEP_SET_FEATURE
      test of EHSET") added additional code to the EHCI hub driver but it is
      anticipated to only have a limited audience (e.g. embedded silicon
      vendors and integrators). Avoid subjecting all EHCI (and in the future
      maybe xHCI/OHCI, etc.) HCD users to code bloat by conditionally
      compiling the EHSET-specific additions with a new Kconfig option,
      CONFIG_USB_HCD_TEST_MODE.
      Signed-off-by: NJack Pham <jackp@codeaurora.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      726a85ca
    • F
      pl2303: improve the chip type detection/distinction · 034d1527
      Frank Schäfer 提交于
      The driver currently knows about 3 different PL2303 chip types:
      The two legacy chip types type_0 and type_1 (PL2303H ?) and the HX
      type.
      The device distinction is currently completely based on the examination
      of the USB descriptors.
      During the last years, Prolific has introduced further PL2303 chips,
      such as the HXD (HX rev. D), TA (which replaced the X/HX chips), SA,
      RA, EA and TB variants.
      Unfortunately, all these new chips are currently detected as HX chips,
      because they are all using the same bMaxPacketSize0 = 0x40 value in the
      USB device descriptor.
      
      At this point it is not clear if these chips are really working with
      the driver, there are just some positive indicators (like device
      manufacturers claiming Linux support for these devices or commit
      8d48fdf6 "correctly handle baudrates above 115200" which should only
      be necessary for newer devices, ...)
      
      For a complete support of all devices, we need to distinguish between
      them, because they differ in several functional aspects, such  as the
      maximum supported baud rate (HXD, TB, EA: 12Mbps, HX, TA: 6Mbps,
      RA: 1Mbps, SA: 115.2kbps), handshaking line support, RS422/485 and
      GPIO ports support (currently not supported by the driver).
      And there might be further differences that we don't know yet.
      
      This patch improves the chip type detection by evaluating the bcdDevice
      value of the device descriptor. The values are taken from the
      datasheets and are safe to use because manufacturers can't change them:
      
      3.00: X/HX, TA
      4.00: HXD, EA, RA, SA
      5.00: TB
      
      The rest of the device descriptors is completely identical, so no
      further distinction is possible this way.
      Anyway, Prolifics "checkChipVersion.exe"-tool is definitely able to
      distinguish for example between the X/HX and the TA chips, so there
      must be a possibility to improve the distinction further...
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      034d1527
    • F
      pl2303: improve the chip type information output on startup · a77a8c23
      Frank Schäfer 提交于
      The chip type distinction is getting more and more relevant and
      complicating, so always print the chip type.
      Printing a name string is also much better than just printing an
      internal index number.
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a77a8c23
    • F
      pl2303: simplify the else-if contruct for type_1 chips in pl2303_startup() · 73b583af
      Frank Schäfer 提交于
      There is no need for two else-if constructs for the type_1 chip
      detection in pl2303_startup(), so merge them.
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      73b583af
  2. 14 8月, 2013 4 次提交
  3. 13 8月, 2013 31 次提交