[ofw] mthca driver during shutdown - *dev == NULL ?

Smith, Stan stan.smith at intel.com
Fri Mar 20 16:32:42 PDT 2009


Hello,
  A couple of weeks ago you dropped in some mthca & ibbus changes which allowed ibbus to call down to mthca for it's Verbs/RDMA interface. Every since then I have been seeing, in DEBUG situations, the case of mthca routines [mthca_device_query() & mthca_alloc_mailbox()] being called with or m_to_dev() returning a <NULL> *dev pointer?

Since the mthca code has no protection for use of a <null> *dev, and the code has been around for awhile, I can only assume *dev should never be null?
So I'm curious as to how it is we now have *dev == <null> during system shutdown?

Last week I pushed a change to mthca_provider.c to err out on <null> *dev. This was only a temp hack until someone figures out the story on <null> *dev.

One can reproduce this by running a debug version of ibbus, connected to windbg, on top of a free build mthca.sys driver. The <null> *dev shows up during system shutdown.
>From the usage of mthca_alloc_mailbox(), it seems commands are being issued to the HCA while, I'm guessing here, the HCA has raced ahead and is partially shutdown; hence the <null> *dev?

Can you provide some insights as to when during the shutdown process *dev would be <null> and how it is that HCA commands are not rejected when the device is shutting down?

Stan.



More information about the ofw mailing list