]> git.baikalelectronics.ru Git - kernel.git/commit
USB: UAS: fix disconnect by unplugging a hub
authorOliver Neukum <oneukum@suse.com>
Wed, 16 Sep 2020 09:40:25 +0000 (11:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Sep 2020 10:43:24 +0000 (12:43 +0200)
commitdbd218288d3c706c3f7ef4e98f1bc3cda8f16c40
tree25b5c6c956f09fe758ca8013c2e6ef8bd984e8eb
parentd3db8ae224d2ef965592748634e7a6759c50bb92
USB: UAS: fix disconnect by unplugging a hub

The SCSI layer can go into an ugly loop if you ignore that a device is
gone. You need to report an error in the command rather than in the
return value of the queue method.

We need to specifically check for ENODEV. The issue goes back to the
introduction of the driver.

Fixes: 455b0db57612a ("USB: Add UAS driver")
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20200916094026.30085-2-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/uas.c