[ofw] IB Bus driver simplification for PNP events

Smith, Stan stan.smith at intel.com
Thu Mar 19 16:56:38 PDT 2009


Hello,
  While looking at ibbus.sys the realization hit me that we could simplify the bus driver by propagating the scope of ib_reg_pnp() calls made by the port manager and iou manager.

Management synopsis: piggyback PNP event reg/dereg on top of ibal init/cleanup.

First off there is only a single ib_reg_pnp()/ib_dereg_pnp() call required for all (port & iou) managers; there exists a port and iou manager for each HCA, hence serialization to check if 1st manager instance.

When I was converting the bus driver to a filter driver I failed to see the trees for the forest and retained the original code design to register port PNP events on a per manager instance. The functional implication is only the 1st manager instance of port and/or iou actually make the ib_reg_pnp() call, the creation of each manager instance is required to serialize and check if it's the 1st instance or not. The serialization code is functional although a bit clumsy.

The simplification is in fdo_start() the code serializes to check if IBAL needs to be initialized. Why not move the ib_reg_pnp() calls for port and iou immediately after the successful return from al_initialize()?
Now the port and iou manager creation can remove the pnp serialization calls & checks.
Additionally, the ib_dereg_pnp() calls and tracking, if it's time to deregister PNP, can be moved from manager modules in fdo_release_resources() just prior to where al_deregister() call is made.
All-in-all we piggyback PNP event reg/dereg on top of ibal init/cleanup.

Thoughts?

Stan.





More information about the ofw mailing list