diff options
author | Richard Sharpe <rsharpe@richardsharpe.com> | 2007-10-10 13:56:28 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:33 -0400 |
commit | 17f060224fb9f435c6f9306b7b61419d038def13 (patch) | |
tree | 9ea83420b7b7b4143977efc2c303e94a7dde61f7 /drivers/usb | |
parent | eecfb911a03a48ef5f7114246343128bd01c1b5f (diff) |
USB: allow usbstorage to have LUNS greater than 2Tb
Attached is a very small patch (several comment lines) and a one-line
coded change) that allows for USB storage devices that are larger than
2TB.
At the company where I work we need such support, and one of my
co-workers, Jane Liu, pointed out that SCSI low-layer drivers need to
specify what size CDBs they accept. After looking through the code it
became obvious that the current USB Storage code accepted the default of
12-byte CDBs, so I changed it to accept 16-byte CDBs. This allows our
device to work.
Signed-off-by: Richard Sharpe <rsharpe@richardsharpe.com>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/storage/usb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 59181667066c..3451e8d03ab0 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -960,6 +960,10 @@ static int storage_probe(struct usb_interface *intf, | |||
960 | return -ENOMEM; | 960 | return -ENOMEM; |
961 | } | 961 | } |
962 | 962 | ||
963 | /* | ||
964 | * Allow 16-byte CDBs and thus > 2TB | ||
965 | */ | ||
966 | host->max_cmd_len = 16; | ||
963 | us = host_to_us(host); | 967 | us = host_to_us(host); |
964 | memset(us, 0, sizeof(struct us_data)); | 968 | memset(us, 0, sizeof(struct us_data)); |
965 | mutex_init(&(us->dev_mutex)); | 969 | mutex_init(&(us->dev_mutex)); |