]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
qede: Fix barrier usage after tx doorbell write.
authorManish Chopra <manish.chopra@cavium.com>
Tue, 27 Mar 2018 13:34:41 +0000 (06:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:21 +0000 (07:52 +0200)
commit0bbd8e2593ad0ce31cf063cc7723d66fae5c31b3
tree701f2f913551659f6aa19c29d92e4c98c67443dd
parent38a85f8214e214600681c5d3f940015be92900a7
qede: Fix barrier usage after tx doorbell write.

[ Upstream commit b9fc828debc8ac2bb21b5819a44d2aea456f1c95 ]

Since commit c5ad119fb6c09b0297446be05bd66602fa564758
("net: sched: pfifo_fast use skb_array") driver is exposed
to an issue where it is hitting NULL skbs while handling TX
completions. Driver uses mmiowb() to flush the writes to the
doorbell bar which is a write-combined bar, however on x86
mmiowb() does not flush the write combined buffer.

This patch fixes this problem by replacing mmiowb() with wmb()
after the write combined doorbell write so that writes are
flushed and synchronized from more than one processor.

V1->V2:
-------
This patch was marked as "superseded" in patchwork.
(Not really sure for what reason).Resending it as v2.

Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
Signed-off-by: Manish Chopra <manish.chopra@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/qlogic/qede/qede_fp.c