Re: about usb

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

 



On Thu, Nov 02, 2006 at 06:29:02PM +0200, Constantine Kousoulos wrote:
> Hello,
> 
> I have a few questions regarding the usb drivers on the linux-2.6 
> kernel.

Try reading the USB chapter in the book, Linux Device Drivers, third
edition (free online), as may of these questions should be answered
there.

> First of all, in order for a usb device to work, we need a host 
> controller. Linux has 3 host controller drivers (ohci, uhci, 
> ehci). Does it use only one of them or all three depending the 
> speed of the data transfer?

It all depends on the USB host controller hardware.  And we really have
more than just 3, we have a lot of embedded controllers too that don't
always follow the ohci/uhci/ehci model due to hardware issues.

> Second, can the host controller talk directly to a usb device (eg 
> flash memory) or it has to cooperate with an appropriate driver 
> (eg mass-storage driver)?

The host controller is dumb, it only handles sending USB "packets" to
and from devices.

> The point of all these is the following. In order to port linux's 
> usb support for, let's say, mass storage devices to another 
> system, what are the least needed parts for usb to work? Do i need 
> to just implement a host controller (eg ehci)? Or do i need to 
> port usb core + usb host + storage code from linux source?

Just the host controller needs to work, once you have that up and
running, all of the usb device drivers should work with no changes
needed at all.

Might I ask which hardware are you looking to get USB working on?  There
are lots of USB controllers already included in mainline, and others
floating around in different trees.  Perhaps your work is already done
for you.

Hope this helps,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux