IOCTL_INTERNAL_USB_GET_PORT_STATUS - which port?

I’m updating my virtual usb hcd + root hub device to work under Windows
7, and notice that I’m getting repeated calls to
IOCTL_INTERNAL_USB_GET_PORT_STATUS. It seems that I’m supposed to set
USBD_PORT_ENABLED if the port is enabled and USBD_PORT_CONNECTED if the
port is connected. I can’t see how to tell which of my hubs port windows
is asking about, or if I’m supposed to set a bit array of the two
USBD_PORT_XXX bits corresponding to each port, or if the call is talking
about my hub’s upstream port (which it doesn’t have as it’s a root hub,
and also virtual).

Thanks

James

I’m using:

*portStatus = USBD_PORT_ENABLED|USBD_PORT_CONNECTED;

in my virtual usb driver and nobody is complaining much, but my design
is somewhat different from yours (every device is connected to its own
one port hub.) The documentation is a bit missing.

Mark Roddy

On Wed, Jun 8, 2011 at 6:23 AM, James Harper
wrote:
> I’m updating my virtual usb hcd + root hub device to work under Windows
> 7, and notice that I’m getting repeated calls to
> IOCTL_INTERNAL_USB_GET_PORT_STATUS. It seems that I’m supposed to set
> USBD_PORT_ENABLED if the port is enabled and USBD_PORT_CONNECTED if the
> port is connected. I can’t see how to tell which of my hubs port windows
> is asking about, or if I’m supposed to set a bit array of the two
> USBD_PORT_XXX bits corresponding to each port, or if the call is talking
> about my hub’s upstream port (which it doesn’t have as it’s a root hub,
> and also virtual).
>
> Thanks
>
> James
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

> I’m using:

*portStatus =
USBD_PORT_ENABLED|USBD_PORT_CONNECTED;

in my virtual usb driver and nobody is complaining much, but my design
is somewhat different from yours (every device is connected to its own
one port hub.) The documentation is a bit missing.

I suspect that the documentation is fine and I’m just a bit thick
tonight :slight_smile:

I am doing the same as you, it just seems to be issuing
IOCTL_INTERNAL_USB_GET_PORT_STATUS every 100ms or so which seems a bit
excessive. It’s also issuing a GET_STATUS URB on my HUB an awful lot
too… (directed at the HUB class)

Thanks

James

James Harper wrote:

I’m updating my virtual usb hcd + root hub device to work under Windows
7, and notice that I’m getting repeated calls to
IOCTL_INTERNAL_USB_GET_PORT_STATUS. It seems that I’m supposed to set
USBD_PORT_ENABLED if the port is enabled and USBD_PORT_CONNECTED if the
port is connected. I can’t see how to tell which of my hubs port windows
is asking about, or if I’m supposed to set a bit array of the two
USBD_PORT_XXX bits corresponding to each port, or if the call is talking
about my hub’s upstream port (which it doesn’t have as it’s a root hub,
and also virtual).

Your bus driver created one PDO for each of its ports. This ioctl will
arrive via one of those PDOs, and is asking for information about the
port associated with that PDO.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>

James Harper wrote:
> I’m updating my virtual usb hcd + root hub device to work under
Windows
> 7, and notice that I’m getting repeated calls to
> IOCTL_INTERNAL_USB_GET_PORT_STATUS. It seems that I’m supposed to
set
> USBD_PORT_ENABLED if the port is enabled and USBD_PORT_CONNECTED if
the
> port is connected. I can’t see how to tell which of my hubs port
windows
> is asking about, or if I’m supposed to set a bit array of the two
> USBD_PORT_XXX bits corresponding to each port, or if the call is
talking
> about my hub’s upstream port (which it doesn’t have as it’s a root
hub,
> and also virtual).

Your bus driver created one PDO for each of its ports. This ioctl
will
arrive via one of those PDOs, and is asking for information about the
port associated with that PDO.

There is nothing plugged in to any of my ports yet, and the IOCTL is
arriving on my hub PDO… I think.

James