[[email protected]: Patch to USB Storage to allow for LUNs greater than 2TB]
Matthew Dharm <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | One Eyed Alien Networks |
| Message-ID | <[email protected]> |
The message below implements a recently discussed patch to allow 16-byte CDBs through usb-storage, which allows device support up to 2Tb. I didn't see a patch come from anywhere else, so I'm forwarding this one. Then again, I just got back from vacation 9 timezones away, so I'm still catching up... Signed-off-by: Matthew Dharm <[email protected]> Greg, please apply. Matt ----- Forwarded message from Richard Sharpe <[email protected]> ----- Date: Fri, 5 Oct 2007 06:27:43 -0700 (PDT) From: Richard Sharpe <[email protected]> Subject: Patch to USB Storage to allow for LUNs greater than 2TB To: Matthew Dharm <[email protected]> X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.9 X-Virus-Status: Clean Hi, 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. I this helps other people. Signed-off-by: Richard Sharpe <[email protected]> Regards ------- Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org, sharpe[at]ethereal.com, http://www.richardsharpe.com Content-Description: USB Storage GT 2TB --- linux-2.6.22/drivers/usb/storage/usb.orig.c 2007-10-03 22:26:59.000000000 -0700 +++ linux-2.6.22/drivers/usb/storage/usb.c 2007-10-03 22:29:05.000000000 -0700 @@ -967,6 +967,10 @@ static int storage_probe(struct usb_inte 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)); ----- End forwarded message ----- -- Matthew Dharm Home: [email protected] Maintainer, Linux USB Mass Storage Driver Hi. I have my back hairs caught in my computer fan. -- Customer User Friendly, 8/20/1998 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHDRJMHL9iwnUZqnkRAlz1AKCI/i5jfht3Ur57DqYA5bGx4IQa0ACeOkwE yhC6LP3hsPK2F7FkVZmj/nw= =AX5E -----END PGP SIGNATURE-----