diff options
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r-- | drivers/net/cnic.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 41957fa2d010..6dfa56440ac0 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c | |||
@@ -426,19 +426,6 @@ static int cnic_abort_prep(struct cnic_sock *csk) | |||
426 | return 0; | 426 | return 0; |
427 | } | 427 | } |
428 | 428 | ||
429 | static void cnic_uio_stop(void) | ||
430 | { | ||
431 | struct cnic_dev *dev; | ||
432 | |||
433 | read_lock(&cnic_dev_lock); | ||
434 | list_for_each_entry(dev, &cnic_dev_list, list) { | ||
435 | struct cnic_local *cp = dev->cnic_priv; | ||
436 | |||
437 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); | ||
438 | } | ||
439 | read_unlock(&cnic_dev_lock); | ||
440 | } | ||
441 | |||
442 | int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops) | 429 | int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops) |
443 | { | 430 | { |
444 | struct cnic_dev *dev; | 431 | struct cnic_dev *dev; |
@@ -510,9 +497,6 @@ int cnic_unregister_driver(int ulp_type) | |||
510 | } | 497 | } |
511 | read_unlock(&cnic_dev_lock); | 498 | read_unlock(&cnic_dev_lock); |
512 | 499 | ||
513 | if (ulp_type == CNIC_ULP_ISCSI) | ||
514 | cnic_uio_stop(); | ||
515 | |||
516 | rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL); | 500 | rcu_assign_pointer(cnic_ulp_tbl[ulp_type], NULL); |
517 | 501 | ||
518 | mutex_unlock(&cnic_lock); | 502 | mutex_unlock(&cnic_lock); |
@@ -596,6 +580,9 @@ static int cnic_unregister_device(struct cnic_dev *dev, int ulp_type) | |||
596 | } | 580 | } |
597 | mutex_unlock(&cnic_lock); | 581 | mutex_unlock(&cnic_lock); |
598 | 582 | ||
583 | if (ulp_type == CNIC_ULP_ISCSI) | ||
584 | cnic_send_nlmsg(cp, ISCSI_KEVENT_IF_DOWN, NULL); | ||
585 | |||
599 | synchronize_rcu(); | 586 | synchronize_rcu(); |
600 | 587 | ||
601 | while (test_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[ulp_type]) && | 588 | while (test_bit(ULP_F_CALL_PENDING, &cp->ulp_flags[ulp_type]) && |