]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fm10k: create "correct" header for the remote end on connect
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 26 Jun 2015 15:54:06 +0000 (08:54 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:03:17 +0000 (22:03 -0800)
commitca57adefc9e6b2fdbfad2b0997af9e5ebd4207f9
tree7d15a4b975cc5f7563dd3b236a5a3c7395125c87
parentc668b922469c90a4bc5b2010d0c644ef7c355923
fm10k: create "correct" header for the remote end on connect

When we connect to the mailbox, we insert a fake disconnect header so
that the code does not see an invalid header and thus instantly error
every time we bring up the mailbox. However, we incorrectly record the
tail and head from the local perspective. Since the remote end shouldn't
have anything for us, add a "create_fake_disconnect_hdr" function which
inverts the TAIL and HEAD fields. This enables us to connect without any
errors of either TAIL or HEAD incorrectness, and prevents creating
extraneous error messages. This is necessary now since mbx_reset_work
does not actually reset the Tx FIFO head and tail pointers, thus head
and tail might not be equivalent on a reconnect.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 25394529
(cherry picked from commit afadfd224f53106e4fd52f3b6885a93431a5a6f5)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k_mbx.c