From: Richard Sharpe Date: Wed, 10 Oct 2007 17:56:28 +0000 (-0700) Subject: USB: allow usbstorage to have LUNS greater than 2Tb X-Git-Tag: v2.6.24-rc1~1395^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17f060224fb9f435c6f9306b7b61419d038def13;p=platform%2Fkernel%2Flinux-3.10.git 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 Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 5918166..3451e8d0 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, return -ENOMEM; } + /* + * Allow 16-byte CDBs and thus > 2TB + */ + host->max_cmd_len = 16; us = host_to_us(host); memset(us, 0, sizeof(struct us_data)); mutex_init(&(us->dev_mutex));