Re: USB 3.0 in Linux main stream kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 09, 2009 at 10:01:21AM +0800, Kawshol Devilal SHARMA wrote:
> Hello Sarah,
> 
> Great to see the USB 3.0, I read your blog and see that you got ~125MB of
> transfer speed. 
> 
> Did you do any modification to SCSI storage portion? I see the URB in Linux
> if you do scatter-gather are very small in buffer size.

I didn't modify the SCSI storage driver.  I did modify the USB mass storage
device driver and the USB core a little, in order to push the scatter gather
lists down to the host controller driver, instead of having the USB core remap
them.  I'm sorry I can't share my scatter gather list patch yet; I'm still
working around some legal issues.

I didn't need to make many changes to the USB MSD driver because the USB 3.0
device was using bulk only transport (BOT), rather than the new USB Mass
Storage device class, USB Attached SCSI Protocol (UASP), that is still under
draft spec in the USB-IF.  The new UASP class will need a new USB device
driver.

One of the questions that came up when looking into a UASP driver was whether
the USB core API to submit scatter gather requests was adequate.  My
understanding was that the driver would call usb_sg_init() and then call
usb_sg_wait(), thus blocking on the request.

The new USB 3.0 MSD device class is looking at asynchronous command queueing
over USB using bulk endpoint "stream IDs".  (You can read about stream IDs in
section 4.4.6.4 of the USB 3.0 spec.)  The details aren't hammered out yet, but
the new USB 3.0 MSD command queueing should be very similar to SCSI command
queueing.  The basic idea is to have the USB MSD driver queue multiple commands
to the USB 3.0 device and have the device notify the host when any of the
commands are done.

If the driver is blocked waiting on the scatter gather transfer by calling
usb_sg_wait(), it obviously can't queue any other commands.  The question is,
should the driver spawn a kernel thread or a work queue or something, so that
each instance can call usb_sg_init() and usb_sg_wait()?  Or should the USB core
API be changed so that the driver can submit multiple URBs with scatter gather
list pointers in them?

A more important question is will the SCSI layer can support command queueing
to the USB MSD driver, or will there need to be changes there also?

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux