Skip to content

Commit

Permalink
USB: allow usbstorage to have LUNS greater than 2Tb
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Matthew Dharm <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Richard Sharpe authored and gregkh committed Oct 12, 2007
1 parent eecfb91 commit 17f0602
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/storage/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 17f0602

Please sign in to comment.