bna: Clear Driver Config Flags When HW Resets
authorRasesh Mody <rmody@brocade.com>
Mon, 20 May 2013 10:08:01 +0000 (10:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 May 2013 21:07:59 +0000 (14:07 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/brocade/bna/bnad.c

index 07f7ef05c3f20b00b3b3f287b412deb1ff747b35..b78e69e0e52a291047e72c222530a1500e4ac003 100644 (file)
@@ -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);