[SCSI] fix sign extension with 1.5TB usb-storage LBD=y
authorDave Hansen <dave@linux.vnet.ibm.com>
Tue, 21 Apr 2009 23:43:27 +0000 (16:43 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 27 Apr 2009 15:36:07 +0000 (10:36 -0500)
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: Dave Hansen <dave@linux.vnet.ibm.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

No differences found