Re: Does Linux support more than 2TB on a USB attached device?
"Richard Sharpe" <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 3 Oct 2007 09:06:53 -0700, "Richard Sharpe" <[email protected]> wrote: >> We have tracked down the problem. The USB Mass Storage layer in Linux >> does not support 16-byte CDBs, it seems. They get stamped with a length >> of 12 and are sent as short commands over USB, which we were issuing an >> ABORT to. > >From the perspective of ub, is there a reliable and compatible way to >detect the need to use READ_CAPACITY(16)? If the device returns 0xFFFFFFFF to a READ_CAPACITY(10), then you have to issue a READ_CAPACITY(16). We have found the problem. drivers/usb/storage/usb.c does this: /* * Ask the SCSI layer to allocate a host structure, with extra * space at the end for our private us_data structure. */ host = scsi_host_alloc(&usb_stor_host_template, sizeof(*us)); if (!host) { printk(KERN_WARNING USB_STORAGE "Unable to allocate the scsi host\n"); return -ENOMEM; } us = host_to_us(host); memset(us, 0, sizeof(struct us_data)); mutex_init(&(us->dev_mutex)); init_MUTEX_LOCKED(&(us->sema)); scsi_host_alloc creates a host structure with max_cmd_len set to 12. To allow USB Storage to accept 16-byte CDBs, the following will need to be added: host->max_cmd_len = 16; /* or some symbol */ That should allow for USB storage devices larger than 2TiB. We are busy checking this. ------------------------------------------------------------------------- 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