Re: Blocking the submission on urbs to usb core

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.usb.general
Message-ID <[email protected]>
On Wed, 19 Dec 2007, ashish mahamuni wrote:

> Hello Everybody,
> 
> I've implemented my own usb filter. (same like usbmon)

usbmon is not a filter.  It is a communications channel from the kernel 
to userspace.

> I am able to capture all urbs that are generated in
> host controller.

That makes no sense.  URBs are not generated in the host controller; 
they are generated by drivers.

> But problem is those urbs get submitted to usb core
> automatically.

What do you mean by "automatically"?  No URBs are submitted manually 
(that is, by a human being) -- they are all submitted by drivers, and 
all drivers run automatically.

> I don't want this. In fact I want this submission
> under my control.

URB submission is not under your control.  You cannot prevent URBs from
being submitted.  The most you can do is force submissions to fail.

> How should I do it?
> I've my own functions as submit, complete and
> submit_error.
> I want my code in this functions such that I can pass
> those urbs to core or hcd from this place.

That is impossible.  The submit, submit_error, and complete routines 
are called by the core, so they can't pass URBs to the core.  And since 
the core passes URBs to the HCD, your routines cannot also pass the 
URBs to the HCD.

You need to rethink your strategy.  I don't know what you are trying to 
accomplish, but whatever it is, you are using a bad approach.

Alan Stern


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.