1. 26 8月, 2021 6 次提交
  2. 24 8月, 2021 3 次提交
    • M
      usb: gadget: f_hid: optional SETUP/SET_REPORT mode · d7428bc2
      Maxim Devaev 提交于
      f_hid provides the OUT Endpoint as only way for receiving reports
      from the host. SETUP/SET_REPORT method is not supported, and this causes
      a number of compatibility problems with various host drivers, especially
      in the case of keyboard emulation using f_hid.
      
        - Some hosts do not support the OUT Endpoint and ignore it,
          so it becomes impossible for the gadget to receive a report
          from the host. In the case of a keyboard, the gadget loses
          the ability to receive the status of the LEDs.
      
        - Some BIOSes/UEFIs can't work with HID devices with the OUT Endpoint
          at all. This may be due to their bugs or incomplete implementation
          of the HID standard.
          For example, absolutely all Apple UEFIs can't handle the OUT Endpoint
          if it goes after IN Endpoint in the descriptor and require the reverse
          order (OUT, IN) which is a violation of the standard.
          Other hosts either do not initialize gadgets with a descriptor
          containing the OUT Endpoint completely (like some HP and DELL BIOSes
          and embedded firmwares like on KVM switches), or initialize them,
          but will not poll the IN Endpoint.
      
      This patch adds configfs option no_out_endpoint=1 to disable
      the OUT Endpoint and allows f_hid to receive reports from the host
      via SETUP/SET_REPORT.
      
      Previously, there was such a feature in f_hid, but it was replaced
      by the OUT Endpoint [1] in the commit 99c51500 ("usb: gadget: hidg:
      register OUT INT endpoint for SET_REPORT"). So this patch actually
      returns the removed functionality while making it optional.
      For backward compatibility reasons, the OUT Endpoint mode remains
      the default behaviour.
      
        - The OUT Endpoint mode provides the report queue and reduces
          USB overhead (eliminating SETUP routine) on transmitting a report
          from the host.
      
        - If the SETUP/SET_REPORT mode is used, there is no report queue,
          so the userspace will only read last report. For classic HID devices
          like keyboards this is not a problem, since it's intended to transmit
          the status of the LEDs and only the last report is important.
          This mode provides better compatibility with strange and buggy
          host drivers.
      
      Both modes passed USBCV tests. Checking with the USB protocol analyzer
      also confirmed that everything is working as it should and the new mode
      ensures operability in all of the described cases.
      
      Link: https://www.spinics.net/lists/linux-usb/msg65494.html [1]
      Reviewed-by: NMaciej Żenczykowski <zenczykowski@gmail.com>
      Acked-by: NFelipe Balbi <balbi@kernel.org>
      Signed-off-by: NMaxim Devaev <mdevaev@gmail.com>
      Link: https://lore.kernel.org/r/20210821134004.363217-1-mdevaev@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d7428bc2
    • G
      Merge tag 'thunderbolt-for-v5.15-rc1' of... · bfa109d7
      Greg Kroah-Hartman 提交于
      Merge tag 'thunderbolt-for-v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next
      
      Mika writes:
      
      thunderbolt: Changes for v5.15 merge window
      
      This includes following Thunderbolt/USB4 changes for the v5.15 merge
      window:
      
        * Include authorized value in the KOBJ_CHANGE event of a device router
        * A couple of improvements to get the driver working also with the AMD
          USB4 host controller.
      
      All these have been in linux-next with no reported issues.
      
      * tag 'thunderbolt-for-v5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt:
        thunderbolt: Fix port linking by checking all adapters
        thunderbolt: Do not read control adapter config space
        thunderbolt: Handle ring interrupt by reading interrupt status register
        thunderbolt: Add vendor specific NHI quirk for auto-clearing interrupt status
        thunderbolt: Add authorized value to the KOBJ_CHANGE uevent
      bfa109d7
    • G
      Merge 5.14-rc7 into usb-next · 85fb1a27
      Greg Kroah-Hartman 提交于
      We need the USB fix in here as well.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      85fb1a27
  3. 23 8月, 2021 2 次提交
  4. 22 8月, 2021 6 次提交
  5. 21 8月, 2021 23 次提交