OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 6:24 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8
Author Message
 Post subject: Re: USB on real hw
PostPosted: Sat Oct 14, 2023 10:18 am 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
Bonfra wrote:
I'm sorry I'm still not that proficient with SCSI I mistakenly assumed it was the same from the USB descriptor. So this is a specific length for SCSI, how do I get it? is it in the inquiry result or another specific command I must send?

Don't be confused here, I think nullplan is trying to tell you that the MPS you get from the DEVICE DESCRIPTOR is the MPS for the Control Pipe only. The Endpoints have their own MPS, usually 512 for full-speed MSD devices.
The MPS for the endpoint has nothing to do with the SCSI layer, it just so happens that the MPS is 512, the size of a standard sector.

However, don't assume the MPS is 512. You need to get this from the Endpoint Descriptor.

Ben


Top
 Profile  
 
 Post subject: Re: USB on real hw
PostPosted: Sat Oct 14, 2023 11:12 am 
Offline
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 3195
I use read10 and write10 in my USB mass storage drivers. I don't think there is any reason to issue larger requests than can be handled by those. A typical caching scheme will seldom or never issue requests for larger blocks, and the advantage of reading more blocks in the same request is insignificant. I think mainstream OSes probably use read10/write10, and then USB mass storage manifacturers don't see the point in implementing support for read12/write12, or other odd formats that re not used.


Top
 Profile  
 
 Post subject: Re: USB on real hw
PostPosted: Sat Oct 14, 2023 3:59 pm 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
rdos wrote:
I think mainstream OSes probably use read10/write10, and then USB mass storage manifacturers don't see the point in implementing support for read12/write12, or other odd formats that re not used.

To second that thought, I can confirm that Win95 through Win10 use Read10/Write10. I tested with a 40Meg drive and a 2.0Gig drive.
For now, I think a 32-bit LBA is sufficient for any USB at this point in time. However, USB sticks with Terabytes of data may be just over the horizon.
Of course this doesn't include USB hard drives, etc., which if I remember correctly, one of these devices I have actually is a USB hard drive with Terabytes of data... :-)
Though If it is less than 2Tb, I guess it still would use Read10/Write10...

Ben
- https://www.fysnet.net/the_universal_serial_bus.htm


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group