• Dhananjay Phadke's avatar
    netxen: firmware hang detection · 6a581e93
    Dhananjay Phadke authored
    Implement state machine to detect firmware hung state
    and recover. Since firmware will be shared by all PCI
    functions that have different class drivers (NIC or
    FCOE or iSCSI), explicit hardware based serialization
    is required for initializing firmware.
    
    o Used global scratchpad register to maintain device
      reference count. Every probed pci function adds to
      ref count.
    
    o Implement timer (delayed work) for each pci func
      that checks firmware heartbit every 5 sec and detaches
      itself if firmware is dead. Last detaching function
      reloads firmware. Other functions wait for firmware
      init, and re-attach themselves.
    
    Heartbit is not supported by NX2031 firmware.
    Signed-off-by: default avatarAmit Kumar Salecha <amit@netxen.com>
    Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6a581e93
netxen_nic_main.c 57.3 KB