scsi: Advertise limits by blocksize, not 512
commit44152ece75c5d5631349e44fbd8defe9ef0b3769
authorEric Blake <eblake@redhat.com>
Thu, 23 Jun 2016 22:37:11 +0000 (23 16:37 -0600)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 5 Aug 2016 20:09:13 +0000 (5 15:09 -0500)
treea857813f83d8f67d7d2d47242ea37c5b7ddb5c47
parentc9fb07ba56ae4d8f4eaa6e461179017624b23355
scsi: Advertise limits by blocksize, not 512

s->blocksize may be larger than 512, in which case our
tweaks to max_xfer_len and opt_xfer_len must be scaled
appropriately.

CC: qemu-stable@nongnu.org
Reported-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit efaf4781a995aacd22b1dd521b14e4644bafae14)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/scsi/scsi-generic.c