[ofw] [RFC] [PATCH 2/4] mthca: respond to query interface IOCTL

Sean Hefty sean.hefty at intel.com
Tue Apr 22 16:54:48 PDT 2008


>>+       p_ifc->InterfaceHeader.InterfaceReference = __hca_noop;
>>+       p_ifc->InterfaceHeader.InterfaceDereference = __hca_noop;
>
>Why isn't this ObReferenceObject and ObDereferenceObject?  You should make sure
>that you can't go away while someone has your interface.  If you change it to
>ObReferenceObject you need to take a reference before returning the interface.

>From the WDK documentation:

The reference and dereference functions for most interfaces can be no-op
functions that do nothing...

The only time that drivers must keep track of an interface's reference count,
and provide real reference and dereference functions, is when driver A requests
an interface from a remote I/O target (that is, a driver that is in a different
driver stack).

We shouldn't need to support interface requests from a different device stack.

- Sean




More information about the ofw mailing list