On Fri, 17 Dec 2004, li xinyi wrote:

> Hi, all
> 
> Here is two questions about USB drvier in kernel 2.4.20
> 
> 1. In the usb-ohci.c, buffer for TD is allocated as below:

It isn't allocated. It is mapped into the hci's space.
 
>                 data = pci_map_single (ohci->ohci_dev,
>                         urb->transfer_buffer, data_len,
>                         usb_pipeout (urb->pipe)
>                                 ? PCI_DMA_TODEVICE
>                                 : PCI_DMA_FROMDEVICE
>                         );
> 
> and then td is filled in to the corresponding place. My question is 1)
> how DMA is actually performed? I didnt see any code to perform the

The hci walks its lists on its own. DMA is initiated once and then
the hci works on its schedule which is described by descriptors in ram
which is read by DMA.

> DMA. 2) How DMA controller is physically connected to the USB OHCI
> host controller. Since I am working for non-pci host controller, I am
> not familiar with PCI.

PCI devices implement DMA on their own. Their is no equivalent to
the ISA DMA controller.

> 2) Both usb.c and usb-skeleton.c register their drivers(more specificly,
> fops) with USB_MAJOR major nuber, which is
> 180. When a process open the device, e.g. /usb/skelx, Which open(),
> usb_open() or skel_open(), is actually called? I can guess that would
> be usb_open(), but dont know why. Can anyone give the answer and tell
> why it works like this way.

The open() defined in the fops for a certain major:minor is called.

        HTH
                Oliver



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to