]> git.baikalelectronics.ru Git - kernel.git/commit
liquidio: fix rare pci_driver.probe failure of VF driver
authorPrasad Kanneganti <prasad.kanneganti@cavium.com>
Thu, 25 May 2017 17:42:14 +0000 (10:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 May 2017 18:41:47 +0000 (14:41 -0400)
commit12df36d27e41dec4b5ce723dd91ef21de297f889
tree8be54472c0a9d824312b9a8842f61ad48986b4ea
parent14626070f7e9c179be1ee3f2ed834a94e59dc8c5
liquidio: fix rare pci_driver.probe failure of VF driver

There's a rare pci_driver.probe failure of the VF driver that's caused by
PF/VF handshake going out of sync.  The culprit is octeon_mbox_write() who
ignores an ack timeout condition; it just keeps unconditionally writing all
elements of mbox_cmd->data[] even when the other side is not ready for
them.  Fix it by making each write of mbox_cmd->data[i] conditional to
having previously received an ack.

Also fix the octeon_mbox_state enum such that each state gets a unique
value.  Also add ULL suffix to numeric literals in macro definitions.

Signed-off-by: Prasad Kanneganti <prasad.kanneganti@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.h