aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/libfcoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/fcoe/libfcoe.c')
-rw-r--r--drivers/scsi/fcoe/libfcoe.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 951d2448ad61..334db95f36af 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -44,7 +44,6 @@
44#include <scsi/libfc.h> 44#include <scsi/libfc.h>
45#include <scsi/fc_frame.h> 45#include <scsi/fc_frame.h>
46#include <scsi/libfcoe.h> 46#include <scsi/libfcoe.h>
47#include <scsi/fc_transport_fcoe.h>
48 47
49static int debug_fcoe; 48static int debug_fcoe;
50 49
@@ -1081,10 +1080,9 @@ static int fcoe_destroy(const char *buffer, struct kernel_param *kp)
1081 rc = -ENODEV; 1080 rc = -ENODEV;
1082 goto out_putdev; 1081 goto out_putdev;
1083 } 1082 }
1084 /* pass to transport */ 1083 rc = fcoe_sw_destroy(netdev);
1085 rc = fcoe_transport_release(netdev);
1086 if (rc) { 1084 if (rc) {
1087 printk(KERN_ERR "fcoe: fcoe_transport_release(%s) failed\n", 1085 printk(KERN_ERR "fcoe: fcoe_sw_destroy(%s) failed\n",
1088 netdev->name); 1086 netdev->name);
1089 rc = -EIO; 1087 rc = -EIO;
1090 goto out_putdev; 1088 goto out_putdev;
@@ -1121,10 +1119,9 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp)
1121 } 1119 }
1122 fcoe_ethdrv_get(netdev); 1120 fcoe_ethdrv_get(netdev);
1123 1121
1124 /* pass to transport */ 1122 rc = fcoe_sw_create(netdev);
1125 rc = fcoe_transport_attach(netdev);
1126 if (rc) { 1123 if (rc) {
1127 printk(KERN_ERR "fcoe: fcoe_transport_attach(%s) failed\n", 1124 printk(KERN_ERR "fcoe: fcoe_sw_create(%s) failed\n",
1128 netdev->name); 1125 netdev->name);
1129 fcoe_ethdrv_put(netdev); 1126 fcoe_ethdrv_put(netdev);
1130 rc = -EIO; 1127 rc = -EIO;
@@ -1429,10 +1426,6 @@ EXPORT_SYMBOL_GPL(fcoe_libfc_config);
1429/** 1426/**
1430 * fcoe_init() - fcoe module loading initialization 1427 * fcoe_init() - fcoe module loading initialization
1431 * 1428 *
1432 * Initialization routine
1433 * 1. Will create fc transport software structure
1434 * 2. initialize the link list of port information structure
1435 *
1436 * Returns 0 on success, negative on failure 1429 * Returns 0 on success, negative on failure
1437 */ 1430 */
1438static int __init fcoe_init(void) 1431static int __init fcoe_init(void)
@@ -1464,9 +1457,6 @@ static int __init fcoe_init(void)
1464 1457
1465 mod_timer(&fcoe_timer, jiffies + (10 * HZ)); 1458 mod_timer(&fcoe_timer, jiffies + (10 * HZ));
1466 1459
1467 /* initiatlize the fcoe transport */
1468 fcoe_transport_init();
1469
1470 fcoe_sw_init(); 1460 fcoe_sw_init();
1471 1461
1472 return 0; 1462 return 0;
@@ -1495,9 +1485,9 @@ static void __exit fcoe_exit(void)
1495 /* Stop the timer */ 1485 /* Stop the timer */
1496 del_timer_sync(&fcoe_timer); 1486 del_timer_sync(&fcoe_timer);
1497 1487
1498 /* releases the associated fcoe transport for each lport */ 1488 /* releases the associated fcoe hosts */
1499 list_for_each_entry_safe(fc, tmp, &fcoe_hostlist, list) 1489 list_for_each_entry_safe(fc, tmp, &fcoe_hostlist, list)
1500 fcoe_transport_release(fc->real_dev); 1490 fcoe_sw_destroy(fc->real_dev);
1501 1491
1502 unregister_hotcpu_notifier(&fcoe_cpu_notifier); 1492 unregister_hotcpu_notifier(&fcoe_cpu_notifier);
1503 1493
@@ -1507,8 +1497,5 @@ static void __exit fcoe_exit(void)
1507 1497
1508 /* remove sw trasnport */ 1498 /* remove sw trasnport */
1509 fcoe_sw_exit(); 1499 fcoe_sw_exit();
1510
1511 /* detach the transport */
1512 fcoe_transport_exit();
1513} 1500}
1514module_exit(fcoe_exit); 1501module_exit(fcoe_exit);