]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
netxen: fix set mac addr
authorAmit Kumar Salecha <amit.salecha@qlogic.com>
Thu, 7 Jan 2010 22:10:16 +0000 (22:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jan 2010 08:35:28 +0000 (00:35 -0800)
o If tx and rx resources are not available, during set mac request.
  Then this request wont be passed to firmware and it will be added to
  driver mac list and will never make it to firmware.
  So if resources are not available, don't add it to driver mac list.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic_hw.c

index 398dfd46b8c18a53d5fc1eb6a8351a2e8cf4d8f0..85e28e60ecf1a43fe9f4b789877994deeaa1f716 100644 (file)
@@ -690,6 +690,9 @@ void netxen_p3_nic_set_multi(struct net_device *netdev)
        struct list_head *head;
        nx_mac_list_t *cur;
 
+       if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC)
+               return;
+
        list_splice_tail_init(&adapter->mac_list, &del_list);
 
        nx_p3_nic_add_mac(adapter, adapter->mac_addr, &del_list);