Skip to content
Commit 8f76d151 authored by Dave Hansen's avatar Dave Hansen Committed by James Bottomley
Browse files

[SCSI] fix sign extension with 1.5TB usb-storage LBD=y



Shifting an unsigned char implicitly casts it to a signed int.  This
caused 'lba' to sign-extend and Linux would then try READ CAPACITY 16
which was not supported by at least one drive.  Using the
get_unaligned_be*() helpers keeps us from having to worry about how the
extension might occur.

Signed-off-by: default avatarDave Hansen <dave@linux.vnet.ibm.com>
Reviewed-by: default avatarMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent dd406ef8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment