On Mon, 19 Jul 2010, loody wrote: > Dear all: > below are my questions about USB: > 1. from the spec, it says when we receive STS_FATAL, we need to reset > the host and re-initial the host. The Note of section 4.15.2.4. You shouldn't mention section numbers like that without also stating the name of the document. Nobody reading your email will know which specification you are talking about. > But from src, I don't see where we initial the host again after we > receive STS_FATAL interrupt. We don't. After STS_FATAL arrives, we can't use the host controller any more. > 2. what are the functions in ehci dbg used for? They are used for debugging. > such as create_debug_files, create_companion_file() create_debug_files creates various files in debugfs, that is, under /sys/kernel/debug/usb/ehci. create_companion_file creates the "companion" attribute file in the controller's sysfs device directory. > 3. how usb device controller driver pass host commands to gadget driver? > Gadget driver will call usb_ep_queue to let usb device controller > know which ep and what data shoud it put in the fifo but how and where > device controller grap the fifo content of ep to let gadget driver > know? Take dummy_hcd and file-backed storeage gadget for example, > file-backed storage fires command by calling start_transfer but how > dummy pass urb information to file-backed storeage? When a transfer is complete, the device controller driver invokes the "complete" callback in struct usb_request. In dummy-hcd this occurs near the end of the transfer() function, where it does: req->req.complete (&ep->ep, &req->req); Alan Stern -- 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