NO:
W90P710 Programming Guide
VERSION:
2.1
PAGE:
93
The above information is the exclusive intellectual property of Winbond Electronics and shall not be disclosed,
distributed or reproduced without permission from Winbond.
Table No.: 1200-0003-07-A
be able to determine the standard request to
Root Hub
and reply the request to make the upper layer
software feel like that they are communicating with a real hub device.
First, the standard request to the
Root Hub
must be intercepted. Refer to the following code :
static INT sohci_submit_urb(URB_T * urb)
{
/* some code assertted here */
... ... ...
... ... ...
/* handle a request to the virtual root hub */
if (usb_pipedevice(pipe) == ohci->rh.devnum)
return rh_submit_urb(urb);
/* some code assertted here */
... ... ...
... ... ...
}
As it illustrated, all
IRP
s are forwarded to
HCD
’s
sohci_submit_urb( )
routine. This routine will
further translate
IRP
s into
Transfer Descriptor
s, which finally make
Host Controller
issue transactions
on USB bus. But
Root Hub
is not a real device on USB bus, it’s embedded in
Host Controller
itself.
So, in the previous program segment, the requests to the
Root Hub
must be intercepted and
forwarded them to the dedicated routine
rh_submit_urb( )
.