diff options
author | Michael Chan <mchan@broadcom.com> | 2013-07-28 22:03:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-30 01:03:06 -0400 |
commit | 415fb87da80fa45a9cbe820cb2a86e70668688eb (patch) | |
tree | 0f3a425e6c0e63ecbfb39353c492dbb42ff971c4 /drivers/net/ethernet/broadcom/cnic.c | |
parent | fe6f700d6cbb7e8a61711e325f53d9c9e0a42a4c (diff) |
cnic: Simplify netdev events handling.
After this earlier commit to simplify probing:
commit 4bd9b0fffb193d2e288f67f81821af32df8d4349
cnic, bnx2x, bnx2: Simplify cnic probing.
we can now reliably receive netdev events and we can simplify the handling
of these events. We now remove the logic that tries to handle missed
NETDEV_REGISTER events.
This change will allow cleanup to be simplified in the next patch. We can
now rely on the play back of netdev events during
unregister_netdevice_notifier() to cleanup the structures.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/cnic.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index d78d4cf140ed..764bfc158949 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c | |||
@@ -5628,7 +5628,7 @@ static int cnic_netdev_event(struct notifier_block *this, unsigned long event, | |||
5628 | 5628 | ||
5629 | dev = cnic_from_netdev(netdev); | 5629 | dev = cnic_from_netdev(netdev); |
5630 | 5630 | ||
5631 | if (!dev && (event == NETDEV_REGISTER || netif_running(netdev))) { | 5631 | if (!dev && event == NETDEV_REGISTER) { |
5632 | /* Check for the hot-plug device */ | 5632 | /* Check for the hot-plug device */ |
5633 | dev = is_cnic_dev(netdev); | 5633 | dev = is_cnic_dev(netdev); |
5634 | if (dev) { | 5634 | if (dev) { |
@@ -5644,7 +5644,7 @@ static int cnic_netdev_event(struct notifier_block *this, unsigned long event, | |||
5644 | else if (event == NETDEV_UNREGISTER) | 5644 | else if (event == NETDEV_UNREGISTER) |
5645 | cnic_ulp_exit(dev); | 5645 | cnic_ulp_exit(dev); |
5646 | 5646 | ||
5647 | if (event == NETDEV_UP || (new_dev && netif_running(netdev))) { | 5647 | if (event == NETDEV_UP) { |
5648 | if (cnic_register_netdev(dev) != 0) { | 5648 | if (cnic_register_netdev(dev) != 0) { |
5649 | cnic_put(dev); | 5649 | cnic_put(dev); |
5650 | goto done; | 5650 | goto done; |