Skip to content

Commit

Permalink
USB: uas: honor flag to avoid CAPACITY16
Browse files Browse the repository at this point in the history
Copy the support over from usb-storage to get feature parity

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191114112758.32747-2-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Nov 18, 2019
1 parent 6351653 commit bff000c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/storage/uas.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,10 @@ static int uas_slave_configure(struct scsi_device *sdev)
sdev->wce_default_on = 1;
}

/* Some disks cannot handle READ_CAPACITY_16 */
if (devinfo->flags & US_FL_NO_READ_CAPACITY_16)
sdev->no_read_capacity_16 = 1;

/*
* Some disks return the total number of blocks in response
* to READ CAPACITY rather than the highest block number.
Expand Down

0 comments on commit bff000c

Please sign in to comment.