net: ena: unmask MSI-X only after device initialization is completed
authorNetanel Belgazal <netanel@amazon.com>
Wed, 3 Jan 2018 06:17:29 +0000 (06:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Mar 2018 09:24:34 +0000 (10:24 +0100)
commitd66a35c2a1fa519467e9406be41451e997bbd2d1
treeb8e9ef84bdfa8340c99b5b09662d260a912c1355
parentaae87222cc9c0b059b1f748c26f1f7482a6e21c6
net: ena: unmask MSI-X only after device initialization is completed

[ Upstream commit 7853b49ce8e0ef6364d24512b287463841d71bd3 ]

Under certain conditions MSI-X interrupt might arrive right after it
was unmasked in ena_up(). There is a chance it would be processed by
the driver before device ENA_FLAG_DEV_UP flag is set. In such a case
the interrupt is ignored.
ENA device operates in auto-masked mode, therefore ignoring
interrupt leaves it masked for good.
Moving unmask of interrupt to be the last step in ena_up().

Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/amazon/ena/ena_netdev.c