<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=189491916-04082008>NDIS in some
situations sends CARD_RESET to network adapters.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=189491916-04082008>It was the reason,
that we added to the bus driver Card Soft Reset support.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=189491916-04082008>mlx4_eth driver is
using it now.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=189491916-04082008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=189491916-04082008>The reset mechanism
itself is generic and can be used for IB interface and repeated in
mthca.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=189491916-04082008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=189491916-04082008>Here are some
details.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=189491916-04082008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2>Soft Reset here is HCA re-initialization without
bus driver reloading.<BR>A reset can be initiated by clients (mlx4_eth,
mlx4_hca) and/or driver (mlx4_bus). <BR>Driver issues reset upon card fatal
error, which prevents the following work with the card.<BR>Clients may request
the reset at any moment upon their will. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Clients have to register event callback after
getting bus interface.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>When a reset event comes, the bus driver
will:<BR> - bar the following work with card, returning –EFAULT to
all, but destroy_xx, commands;<BR> - reset the card to stop incoming
traffic (only in case of client-initiated reset);<BR> - notify all
registered clients about pending reset.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Getting this notification clients have to:
<BR> - wait for all issued commands to end;<BR> - reset
its own clients, if any, and bar their work;<BR> - release all the
device resources, they were using till now;<BR> - send “I’m
reset-ready” notification to the bus driver;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Having received this notification, clients have
to:<BR> - dereference the old bus interface;<BR> - get
the new interface from bus driver;<BR> - register new event
handler;<BR> - resume/restart itself;<BR> - wake up its
own clients, if any;</FONT></DIV></BODY></HTML>