1. 10 5月, 2019 1 次提交
  2. 05 9月, 2018 1 次提交
  3. 25 5月, 2018 1 次提交
  4. 07 3月, 2018 1 次提交
  5. 16 1月, 2018 1 次提交
    • O
      usb: uas: unconditionally bring back host after reset · cbeef22f
      Oliver Neukum 提交于
      Quoting Hans:
      
      If we return 1 from our post_reset handler, then our disconnect handler
      will be called immediately afterwards. Since pre_reset blocks all scsi
      requests our disconnect handler will then hang in the scsi_remove_host
      call.
      
      This is esp. bad because our disconnect handler hanging for ever also
      stops the USB subsys from enumerating any new USB devices, causes commands
      like lsusb to hang, etc.
      
      In practice this happens when unplugging some uas devices because the hub
      code may see the device as needing a warm-reset and calls usb_reset_device
      before seeing the disconnect. In this case uas_configure_endpoints fails
      with -ENODEV. We do not want to print an error for this, so this commit
      also silences the shost_printk for -ENODEV.
      
      ENDQUOTE
      
      However, if we do that we better drop any unconditional execution
      and report to the SCSI subsystem that we have undergone a reset
      but we are not operational now.
      Signed-off-by: NOliver Neukum <oneukum@suse.com>
      Reported-by: NHans de Goede <hdegoede@redhat.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cbeef22f
  6. 04 11月, 2017 2 次提交
  7. 02 11月, 2017 1 次提交
  8. 23 9月, 2017 1 次提交
    • A
      USB: uas: fix bug in handling of alternate settings · 786de92b
      Alan Stern 提交于
      The uas driver has a subtle bug in the way it handles alternate
      settings.  The uas_find_uas_alt_setting() routine returns an
      altsetting value (the bAlternateSetting number in the descriptor), but
      uas_use_uas_driver() then treats that value as an index to the
      intf->altsetting array, which it isn't.
      
      Normally this doesn't cause any problems because the various
      alternate settings have bAlternateSetting values 0, 1, 2, ..., so the
      value is equal to the index in the array.  But this is not guaranteed,
      and Andrey Konovalov used the syzkaller fuzzer with KASAN to get a
      slab-out-of-bounds error by violating this assumption.
      
      This patch fixes the bug by making uas_find_uas_alt_setting() return a
      pointer to the altsetting entry rather than either the value or the
      index.  Pointers are less subject to misinterpretation.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Tested-by: NAndrey Konovalov <andreyknvl@google.com>
      CC: Oliver Neukum <oneukum@suse.com>
      CC: <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      786de92b
  9. 26 8月, 2017 1 次提交
  10. 02 6月, 2016 2 次提交
  11. 27 4月, 2016 1 次提交
  12. 14 4月, 2016 2 次提交
  13. 19 3月, 2016 1 次提交
  14. 25 1月, 2016 1 次提交
  15. 02 12月, 2015 3 次提交
  16. 10 11月, 2015 1 次提交
  17. 04 10月, 2015 1 次提交
  18. 01 6月, 2015 1 次提交
  19. 28 4月, 2015 2 次提交
  20. 24 11月, 2014 1 次提交
  21. 12 11月, 2014 4 次提交
  22. 04 11月, 2014 1 次提交
    • H
      uas: Make uas work with blk-mq · e28e2f2f
      Hans de Goede 提交于
      With uas over usb-3 the tags inside the uas iu-s must match the usb-3 stream
      ids, and those go from 1 - qdepth.
      
      Before blk-mq calling scsi_activate_tcq(sdev, qdepth) guaranteed that we would
      only get cmnd->request->tag from 0 - (qdepth - 1), and we used those as
      uas-tags / stream-ids.
      
      With blk-mq however we are guaranteed to never get more then qdepth commands
      queued at the same time, but the cmnd->request->tag values may be much larger,
      which breaks uas.
      
      This commit fixes this by generating uas tags in the 1 - qdepth range ourselves
      instead of using cmnd->request->tag.
      
      While touching all involved code anyways also rename the uas_cmd_info stream
      field to uas_tag, because when using uas over usb-2 streams are not used.
      
      Cc: Christoph Hellwig <hch@infradead.org>
      Reported-by: NDouglas Gilbert <dgilbert@interlog.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      
      --
      Changes in v2:
      -Remove ".disable_blk_mq = true" from uas_host_template
      Changes in v3:
      -Rebased on top of Linus' current master branch
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e28e2f2f
  23. 04 10月, 2014 1 次提交
  24. 03 10月, 2014 1 次提交
  25. 24 9月, 2014 7 次提交