PORTS Forum

Ports and Interfaces => USB => Topic started by: nvd on February 08, 2013, 01:30:48 pm

Title: Mass storage class BoT
Post by: nvd on February 08, 2013, 01:30:48 pm
Hi,
 Is there a chance that the Host will start a new transfer with a new command (CBW) before the previous transfer is complete?
 so the requirement on device would be to be prepared to discard the current transfer if the new CBW is received before current command 
 is complete?
 
 Something similar to Control transfers with Setup packet?

Regards,
Nitin
Title: Re: Mass storage class BoT
Post by: Barry Twycross on February 08, 2013, 02:02:07 pm
I would never expect a host to do that. I'm not sure if the host is technically allowed to do that, but it'd be a bad idea.

If the host wants to start a new transfer when one is not finished, it should send the device a mass storage reset. That gets the device into the state expecting to receive a CBW.
Title: Re: Mass storage class BoT
Post by: nvd on February 08, 2013, 10:14:32 pm
Thanks Barry,
 The question I asked because:
 I have Mass storage device with 2 LUNs, It works fine most times, but when i try to do large copy from one LUN to other LUN on my device, at the same time try to read some files on on of the LUNs, my program is failing, when it fails, the data structures show that the last data sent by the host was a CBW, and the previous transaction was not complete. I never receive a reset recovery command though.

Regards,
Nitin
Title: Re: Mass storage class BoT
Post by: nvd on February 10, 2013, 11:38:42 am
Another question is,
I am working on Mass storage Device with BoT. The USB IP supports both HS as well as FS operations.
As of now I am only supporting HS operations with my driver.
Do I need to support MSD at full speed as well? As per the spec looks like yes, I need to. Any comments, especially for BoT MSD?

In general do we find BoT MSD devices in market?

Regards,
Nitin
Title: Re: Mass storage class BoT
Post by: Jan Axelson on February 11, 2013, 12:47:21 am
The device should at least respond to full-speed enumeration requests so it can inform the host that it requires high speed. And if the device can do that, it likely can also support full speed operation.

In practice, the device may rarely need to operate at full speed since USB 1.x hosts and hubs are increasingly uncommon.

Drives use the mass-storage bulk-only transport protocol.
Title: Re: Mass storage class BoT
Post by: nvd on February 11, 2013, 05:00:50 am
Thanks Jan,
 The last line i meant...In general do we find BoT MSD devices running at Full Speed in market?
Title: Re: Mass storage class BoT
Post by: Jan Axelson on February 11, 2013, 11:17:23 am
My guess is yes, but I have no data. You could get a sense of it by attaching random drives to a 1.x hub.
Title: Re: Mass storage class BoT
Post by: Barry Twycross on February 11, 2013, 04:52:34 pm
I have Mass storage device with 2 LUNs, It works fine most times, but when i try to do large copy from one LUN to other LUN on my device, at the same time try to read some files on on of the LUNs, my program is failing, when it fails, the data structures show that the last data sent by the host was a CBW, and the previous transaction was not complete. I never receive a reset recovery command though.
What's the host?

I'd be looking at bus traces of that, and then tieing that up with whatever logs you can get from inside your device. See at what point you diverge in your understanding of what's going on.
Title: Re: Mass storage class BoT
Post by: Barry Twycross on February 11, 2013, 04:55:07 pm
As Jan points out, you don't have to support full speed operation. You do need to support full speed enumeration to the extent that you can pass descriptors that say you can't do anything.

Once you get full speed running to that extent, it usually easier just to let the same code run as runs at high speed, and you'll work as well as you can (and be functional) at full speed. It really is less work to support full speed than to try to not support it (assuming a device hardware which is at all rational.)
Title: Re: Mass storage class BoT
Post by: nvd on February 12, 2013, 08:05:28 am
Thanks Barry, Jan
Title: Re: Mass storage class BoT
Post by: usha on February 22, 2013, 12:51:48 am




hi.,
         I am doing mass storage project i have to appear cd-rom & that must be booted i did that too by transfering (2048 bytes) & i did in single LUN,. But i want to enable TWO LUN one is cd-rom(2048) & another is removable (512 bytes) . plz send steps for enable 2 LUN.Thanks in advance .

 :)
Title: Re: Mass storage class BoT
Post by: Jan Axelson on February 23, 2013, 02:48:47 pm
Response is here:

http://www.lvr.com/forum/index.php?topic=1002.0