netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] be2net: Revert "make the RX_FILTER command asynchronous" commit
@ 2015-09-03 11:41 Sathya Perla
  2015-09-06  5:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Sathya Perla @ 2015-09-03 11:41 UTC (permalink / raw)
  To: netdev

The be_cmd_rx_filter() routine sends a non-embedded cmd to the FW and used
a pre-allocated dma memory to hold the cmd payload. This worked fine when
this cmd was synchronous. This cmd was changed to asynchronous mode by the
commit 8af65c2f4("make the RX_FILTER command asynchronous"). So now when
there are two quick invocations of this cmd, the 2nd request may end up
overwriting the first request, causing FW cmd corruption.

This patch reverts the offending commit and hence fixes the regression.

Fixes: 8af65c2f4("be2net: make the RX_FILTER command asynchronous")
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
---
David, the culprit commit that this patch is reverting was applied on
the net-next tree. As net-next tree is closed now, I'm assuming you've
merged the net-next tree onto the net tree. Thanks!

 drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 3be1fbd..eb32391 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -1968,7 +1968,7 @@ static int __be_cmd_rx_filter(struct be_adapter *adapter, u32 flags, u32 value)
 			memcpy(req->mcast_mac[i++].byte, ha->addr, ETH_ALEN);
 	}
 
-	status = be_mcc_notify(adapter);
+	status = be_mcc_notify_wait(adapter);
 err:
 	spin_unlock_bh(&adapter->mcc_lock);
 	return status;
-- 
2.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] be2net: Revert "make the RX_FILTER command asynchronous" commit
  2015-09-03 11:41 [PATCH] be2net: Revert "make the RX_FILTER command asynchronous" commit Sathya Perla
@ 2015-09-06  5:01 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-09-06  5:01 UTC (permalink / raw)
  To: sathya.perla; +Cc: netdev

From: Sathya Perla <sathya.perla@avagotech.com>
Date: Thu,  3 Sep 2015 07:41:53 -0400

> The be_cmd_rx_filter() routine sends a non-embedded cmd to the FW and used
> a pre-allocated dma memory to hold the cmd payload. This worked fine when
> this cmd was synchronous. This cmd was changed to asynchronous mode by the
> commit 8af65c2f4("make the RX_FILTER command asynchronous"). So now when
> there are two quick invocations of this cmd, the 2nd request may end up
> overwriting the first request, causing FW cmd corruption.
> 
> This patch reverts the offending commit and hence fixes the regression.
> 
> Fixes: 8af65c2f4("be2net: make the RX_FILTER command asynchronous")
> Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-06  5:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-03 11:41 [PATCH] be2net: Revert "make the RX_FILTER command asynchronous" commit Sathya Perla
2015-09-06  5:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).