Skip to content

Commit

Permalink
USB: uas: Fix slave queue_depth not being set
Browse files Browse the repository at this point in the history
Commit 198de51 ("USB: uas: Limit qdepth at the scsi-host level")
removed the scsi_change_queue_depth() call from uas_slave_configure()
assuming that the slave would inherit the host's queue_depth, which
that commit sets to the same value.

This is incorrect, without the scsi_change_queue_depth() call the slave's
queue_depth defaults to 1, introducing a performance regression.

This commit restores the call, fixing the performance regression.

Cc: stable@vger.kernel.org
Fixes: 198de51 ("USB: uas: Limit qdepth at the scsi-host level")
Reported-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Hans de Goede authored and Greg Kroah-Hartman committed Jun 1, 2016
1 parent 5fc3632 commit 593224e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/storage/uas.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ static int uas_slave_configure(struct scsi_device *sdev)
if (devinfo->flags & US_FL_BROKEN_FUA)
sdev->broken_fua = 1;

scsi_change_queue_depth(sdev, devinfo->qdepth - 2);
return 0;
}

Expand Down

0 comments on commit 593224e

Please sign in to comment.