]> www.infradead.org Git - users/jedix/linux-maple.git/commit
be2net: gather debug info and reset adapter (only for Lancer) on a tx-timeout
authorSuresh Reddy <suresh.reddy@broadcom.com>
Tue, 31 Jul 2018 15:39:42 +0000 (11:39 -0400)
committerBrian Maly <brian.maly@oracle.com>
Sat, 11 May 2019 03:43:40 +0000 (23:43 -0400)
commitd9bcd2c6d4e3b2690ec5c94b648248da510bda77
treed3e2cb76cb6019e82159e70752af5da387c2ca5f
parent2c71f851fd09676754f1363efd5e3aa5049d74fb
be2net: gather debug info and reset adapter (only for Lancer) on a tx-timeout

Orabug: 29475071

This patch handles a TX-timeout as follows:

1) This patch gathers and prints the following info that can
   help in diagnosing the cause of a TX-timeout.
   a) TX queue and completion queue entries.
   b) SKB and TCP/UDP header details.

2) For Lancer NICs (TX-timeout recovery is not supported for
   BE3/Skyhawk-R NICs), it recovers from the TX timeout as follows:

   a) On a TX-timeout, driver sets the PHYSDEV_CONTROL_FW_RESET_MASK
      bit in the PHYSDEV_CONTROL register. Lancer firmware goes into
      an error state and indicates this back to the driver via a bit
      in a doorbell register.
   b) Driver detects this and calls be_err_recover(). DMA is disabled,
      all pending TX skbs are unmapped and freed (be_close()). All rings
      are destroyed (be_clear()).
   c) The driver waits for the FW to re-initialize and re-creates all
      rings along with other data structs (be_resume())

Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: John Donnelly <John.p.donnelly@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/emulex/benet/be_main.c