[ofw] HCA Soft Reset mechanism
Leonid Keller
leonid at mellanox.co.il
Mon Aug 4 09:44:05 PDT 2008
NDIS in some situations sends CARD_RESET to network adapters.
It was the reason, that we added to the bus driver Card Soft Reset
support.
mlx4_eth driver is using it now.
The reset mechanism itself is generic and can be used for IB interface
and repeated in mthca.
Here are some details.
Soft Reset here is HCA re-initialization without bus driver reloading.
A reset can be initiated by clients (mlx4_eth, mlx4_hca) and/or driver
(mlx4_bus).
Driver issues reset upon card fatal error, which prevents the following
work with the card.
Clients may request the reset at any moment upon their will.
Clients have to register event callback after getting bus interface.
When a reset event comes, the bus driver will:
- bar the following work with card, returning -EFAULT to all, but
destroy_xx, commands;
- reset the card to stop incoming traffic (only in case of
client-initiated reset);
- notify all registered clients about pending reset.
Getting this notification clients have to:
- wait for all issued commands to end;
- reset its own clients, if any, and bar their work;
- release all the device resources, they were using till now;
- send "I'm reset-ready" notification to the bus driver;
The driver starts to perform device reset only after receiving the "I'm
reset-ready" notifications from all the registered clients. It
re-initializes the device and notifies all the clients.
Having received this notification, clients have to:
- dereference the old bus interface;
- get the new interface from bus driver;
- register new event handler;
- resume/restart itself;
- wake up its own clients, if any;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080804/ccb287be/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: soft_reset.patch
Type: application/octet-stream
Size: 54828 bytes
Desc: soft_reset.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080804/ccb287be/attachment.obj>
More information about the ofw
mailing list