diff mbox

[net-next,v1,1/4] bna: Clear Driver Config Flags When HW Resets

Message ID 1369080484-29926-2-git-send-email-rmody@brocade.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Rasesh Mody May 20, 2013, 8:08 p.m. UTC
Driver configuration flags are retained across open/stop operations preventing
configurations to be set in next open/stop. Setting MTU on a 1020 causes
network to fail until a reboot is performed on the host.

Clear the flags when configuration resets in hardware.

Signed-off-by: Rasesh Mody <rmody@brocade.com>
---
 drivers/net/ethernet/brocade/bna/bnad.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index ce4a030..a6c16a2 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -2624,6 +2624,9 @@  bnad_stop(struct net_device *netdev)
 	bnad_destroy_tx(bnad, 0);
 	bnad_destroy_rx(bnad, 0);
 
+	/* These config flags are cleared in the hardware */
+	bnad->cfg_flags &= ~(BNAD_CF_ALLMULTI | BNAD_CF_PROMISC);
+
 	/* Synchronize mailbox IRQ */
 	bnad_mbox_irq_sync(bnad);