mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 03:10:30 -04:00
uas: fail any request submitted while resetting the device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4c456971f8
commit
f8be6bfc5d
@@ -644,6 +644,12 @@ static int uas_queuecommand_lck(struct scsi_cmnd *cmnd,
|
||||
|
||||
BUILD_BUG_ON(sizeof(struct uas_cmd_info) > sizeof(struct scsi_pointer));
|
||||
|
||||
if (devinfo->resetting) {
|
||||
cmnd->result = DID_ERROR << 16;
|
||||
cmnd->scsi_done(cmnd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&devinfo->lock, flags);
|
||||
if (devinfo->cmnd) {
|
||||
spin_unlock_irqrestore(&devinfo->lock, flags);
|
||||
|
||||
Reference in New Issue
Block a user