bnx2i_init.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. /* bnx2i.c: QLogic NetXtreme II iSCSI driver.
  2. *
  3. * Copyright (c) 2006 - 2013 Broadcom Corporation
  4. * Copyright (c) 2007, 2008 Red Hat, Inc. All rights reserved.
  5. * Copyright (c) 2007, 2008 Mike Christie
  6. * Copyright (c) 2014, QLogic Corporation
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation.
  11. *
  12. * Written by: Anil Veerabhadrappa (anilgv@broadcom.com)
  13. * Previously Maintained by: Eddie Wai (eddie.wai@broadcom.com)
  14. * Maintained by: QLogic-Storage-Upstream@qlogic.com
  15. */
  16. #include "bnx2i.h"
  17. static struct list_head adapter_list = LIST_HEAD_INIT(adapter_list);
  18. static u32 adapter_count;
  19. #define DRV_MODULE_NAME "bnx2i"
  20. #define DRV_MODULE_VERSION "2.7.10.1"
  21. #define DRV_MODULE_RELDATE "Jul 16, 2014"
  22. static char version[] =
  23. "QLogic NetXtreme II iSCSI Driver " DRV_MODULE_NAME \
  24. " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
  25. MODULE_AUTHOR("Anil Veerabhadrappa <anilgv@broadcom.com> and "
  26. "Eddie Wai <eddie.wai@broadcom.com>");
  27. MODULE_DESCRIPTION("QLogic NetXtreme II BCM5706/5708/5709/57710/57711/57712"
  28. "/57800/57810/57840 iSCSI Driver");
  29. MODULE_LICENSE("GPL");
  30. MODULE_VERSION(DRV_MODULE_VERSION);
  31. static DEFINE_MUTEX(bnx2i_dev_lock);
  32. unsigned int event_coal_min = 24;
  33. module_param(event_coal_min, int, 0664);
  34. MODULE_PARM_DESC(event_coal_min, "Event Coalescing Minimum Commands");
  35. unsigned int event_coal_div = 2;
  36. module_param(event_coal_div, int, 0664);
  37. MODULE_PARM_DESC(event_coal_div, "Event Coalescing Divide Factor");
  38. unsigned int en_tcp_dack = 1;
  39. module_param(en_tcp_dack, int, 0664);
  40. MODULE_PARM_DESC(en_tcp_dack, "Enable TCP Delayed ACK");
  41. unsigned int error_mask1 = 0x00;
  42. module_param(error_mask1, uint, 0664);
  43. MODULE_PARM_DESC(error_mask1, "Config FW iSCSI Error Mask #1");
  44. unsigned int error_mask2 = 0x00;
  45. module_param(error_mask2, uint, 0664);
  46. MODULE_PARM_DESC(error_mask2, "Config FW iSCSI Error Mask #2");
  47. unsigned int sq_size;
  48. module_param(sq_size, int, 0664);
  49. MODULE_PARM_DESC(sq_size, "Configure SQ size");
  50. unsigned int rq_size = BNX2I_RQ_WQES_DEFAULT;
  51. module_param(rq_size, int, 0664);
  52. MODULE_PARM_DESC(rq_size, "Configure RQ size");
  53. u64 iscsi_error_mask = 0x00;
  54. DEFINE_PER_CPU(struct bnx2i_percpu_s, bnx2i_percpu);
  55. static int bnx2i_cpu_callback(struct notifier_block *nfb,
  56. unsigned long action, void *hcpu);
  57. /* notification function for CPU hotplug events */
  58. static struct notifier_block bnx2i_cpu_notifier = {
  59. .notifier_call = bnx2i_cpu_callback,
  60. };
  61. /**
  62. * bnx2i_identify_device - identifies NetXtreme II device type
  63. * @hba: Adapter structure pointer
  64. * @cnic: Corresponding cnic device
  65. *
  66. * This function identifies the NX2 device type and sets appropriate
  67. * queue mailbox register access method, 5709 requires driver to
  68. * access MBOX regs using *bin* mode
  69. */
  70. void bnx2i_identify_device(struct bnx2i_hba *hba, struct cnic_dev *dev)
  71. {
  72. hba->cnic_dev_type = 0;
  73. if (test_bit(CNIC_F_BNX2_CLASS, &dev->flags)) {
  74. if (hba->pci_did == PCI_DEVICE_ID_NX2_5706 ||
  75. hba->pci_did == PCI_DEVICE_ID_NX2_5706S) {
  76. set_bit(BNX2I_NX2_DEV_5706, &hba->cnic_dev_type);
  77. } else if (hba->pci_did == PCI_DEVICE_ID_NX2_5708 ||
  78. hba->pci_did == PCI_DEVICE_ID_NX2_5708S) {
  79. set_bit(BNX2I_NX2_DEV_5708, &hba->cnic_dev_type);
  80. } else if (hba->pci_did == PCI_DEVICE_ID_NX2_5709 ||
  81. hba->pci_did == PCI_DEVICE_ID_NX2_5709S) {
  82. set_bit(BNX2I_NX2_DEV_5709, &hba->cnic_dev_type);
  83. hba->mail_queue_access = BNX2I_MQ_BIN_MODE;
  84. }
  85. } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
  86. set_bit(BNX2I_NX2_DEV_57710, &hba->cnic_dev_type);
  87. } else {
  88. printk(KERN_ALERT "bnx2i: unknown device, 0x%x\n",
  89. hba->pci_did);
  90. }
  91. }
  92. /**
  93. * get_adapter_list_head - returns head of adapter list
  94. */
  95. struct bnx2i_hba *get_adapter_list_head(void)
  96. {
  97. struct bnx2i_hba *hba = NULL;
  98. struct bnx2i_hba *tmp_hba;
  99. if (!adapter_count)
  100. goto hba_not_found;
  101. mutex_lock(&bnx2i_dev_lock);
  102. list_for_each_entry(tmp_hba, &adapter_list, link) {
  103. if (tmp_hba->cnic && tmp_hba->cnic->cm_select_dev) {
  104. hba = tmp_hba;
  105. break;
  106. }
  107. }
  108. mutex_unlock(&bnx2i_dev_lock);
  109. hba_not_found:
  110. return hba;
  111. }
  112. /**
  113. * bnx2i_find_hba_for_cnic - maps cnic device instance to bnx2i adapter instance
  114. * @cnic: pointer to cnic device instance
  115. *
  116. */
  117. struct bnx2i_hba *bnx2i_find_hba_for_cnic(struct cnic_dev *cnic)
  118. {
  119. struct bnx2i_hba *hba, *temp;
  120. mutex_lock(&bnx2i_dev_lock);
  121. list_for_each_entry_safe(hba, temp, &adapter_list, link) {
  122. if (hba->cnic == cnic) {
  123. mutex_unlock(&bnx2i_dev_lock);
  124. return hba;
  125. }
  126. }
  127. mutex_unlock(&bnx2i_dev_lock);
  128. return NULL;
  129. }
  130. /**
  131. * bnx2i_start - cnic callback to initialize & start adapter instance
  132. * @handle: transparent handle pointing to adapter structure
  133. *
  134. * This function maps adapter structure to pcidev structure and initiates
  135. * firmware handshake to enable/initialize on chip iscsi components
  136. * This bnx2i - cnic interface api callback is issued after following
  137. * 2 conditions are met -
  138. * a) underlying network interface is up (marked by event 'NETDEV_UP'
  139. * from netdev
  140. * b) bnx2i adapter instance is registered
  141. */
  142. void bnx2i_start(void *handle)
  143. {
  144. #define BNX2I_INIT_POLL_TIME (1000 / HZ)
  145. struct bnx2i_hba *hba = handle;
  146. int i = HZ;
  147. /* On some bnx2x devices, it is possible that iSCSI is no
  148. * longer supported after firmware is downloaded. In that
  149. * case, the iscsi_init_msg will return failure.
  150. */
  151. bnx2i_send_fw_iscsi_init_msg(hba);
  152. while (!test_bit(ADAPTER_STATE_UP, &hba->adapter_state) &&
  153. !test_bit(ADAPTER_STATE_INIT_FAILED, &hba->adapter_state) && i--)
  154. msleep(BNX2I_INIT_POLL_TIME);
  155. }
  156. /**
  157. * bnx2i_chip_cleanup - local routine to handle chip cleanup
  158. * @hba: Adapter instance to register
  159. *
  160. * Driver checks if adapter still has any active connections before
  161. * executing the cleanup process
  162. */
  163. static void bnx2i_chip_cleanup(struct bnx2i_hba *hba)
  164. {
  165. struct bnx2i_endpoint *bnx2i_ep;
  166. struct list_head *pos, *tmp;
  167. if (hba->ofld_conns_active) {
  168. /* Stage to force the disconnection
  169. * This is the case where the daemon is either slow or
  170. * not present
  171. */
  172. printk(KERN_ALERT "bnx2i: (%s) chip cleanup for %d active "
  173. "connections\n", hba->netdev->name,
  174. hba->ofld_conns_active);
  175. mutex_lock(&hba->net_dev_lock);
  176. list_for_each_safe(pos, tmp, &hba->ep_active_list) {
  177. bnx2i_ep = list_entry(pos, struct bnx2i_endpoint, link);
  178. /* Clean up the chip only */
  179. bnx2i_hw_ep_disconnect(bnx2i_ep);
  180. bnx2i_ep->cm_sk = NULL;
  181. }
  182. mutex_unlock(&hba->net_dev_lock);
  183. }
  184. }
  185. /**
  186. * bnx2i_stop - cnic callback to shutdown adapter instance
  187. * @handle: transparent handle pointing to adapter structure
  188. *
  189. * driver checks if adapter is already in shutdown mode, if not start
  190. * the shutdown process
  191. */
  192. void bnx2i_stop(void *handle)
  193. {
  194. struct bnx2i_hba *hba = handle;
  195. int conns_active;
  196. int wait_delay = 1 * HZ;
  197. /* check if cleanup happened in GOING_DOWN context */
  198. if (!test_and_set_bit(ADAPTER_STATE_GOING_DOWN,
  199. &hba->adapter_state)) {
  200. iscsi_host_for_each_session(hba->shost,
  201. bnx2i_drop_session);
  202. wait_delay = hba->hba_shutdown_tmo;
  203. }
  204. /* Wait for inflight offload connection tasks to complete before
  205. * proceeding. Forcefully terminate all connection recovery in
  206. * progress at the earliest, either in bind(), send_pdu(LOGIN),
  207. * or conn_start()
  208. */
  209. wait_event_interruptible_timeout(hba->eh_wait,
  210. (list_empty(&hba->ep_ofld_list) &&
  211. list_empty(&hba->ep_destroy_list)),
  212. 2 * HZ);
  213. /* Wait for all endpoints to be torn down, Chip will be reset once
  214. * control returns to network driver. So it is required to cleanup and
  215. * release all connection resources before returning from this routine.
  216. */
  217. while (hba->ofld_conns_active) {
  218. conns_active = hba->ofld_conns_active;
  219. wait_event_interruptible_timeout(hba->eh_wait,
  220. (hba->ofld_conns_active != conns_active),
  221. wait_delay);
  222. if (hba->ofld_conns_active == conns_active)
  223. break;
  224. }
  225. bnx2i_chip_cleanup(hba);
  226. /* This flag should be cleared last so that ep_disconnect() gracefully
  227. * cleans up connection context
  228. */
  229. clear_bit(ADAPTER_STATE_GOING_DOWN, &hba->adapter_state);
  230. clear_bit(ADAPTER_STATE_UP, &hba->adapter_state);
  231. }
  232. /**
  233. * bnx2i_init_one - initialize an adapter instance and allocate memory resources
  234. * @hba: bnx2i adapter instance
  235. * @cnic: cnic device handle
  236. *
  237. * Global resource lock is held during critical sections below. This routine is
  238. * called from either cnic_register_driver() or device hot plug context and
  239. * and does majority of device specific initialization
  240. */
  241. static int bnx2i_init_one(struct bnx2i_hba *hba, struct cnic_dev *cnic)
  242. {
  243. int rc;
  244. mutex_lock(&bnx2i_dev_lock);
  245. if (!cnic->max_iscsi_conn) {
  246. printk(KERN_ALERT "bnx2i: dev %s does not support "
  247. "iSCSI\n", hba->netdev->name);
  248. rc = -EOPNOTSUPP;
  249. goto out;
  250. }
  251. hba->cnic = cnic;
  252. rc = cnic->register_device(cnic, CNIC_ULP_ISCSI, hba);
  253. if (!rc) {
  254. hba->age++;
  255. set_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic);
  256. list_add_tail(&hba->link, &adapter_list);
  257. adapter_count++;
  258. } else if (rc == -EBUSY) /* duplicate registration */
  259. printk(KERN_ALERT "bnx2i, duplicate registration"
  260. "hba=%p, cnic=%p\n", hba, cnic);
  261. else if (rc == -EAGAIN)
  262. printk(KERN_ERR "bnx2i, driver not registered\n");
  263. else if (rc == -EINVAL)
  264. printk(KERN_ERR "bnx2i, invalid type %d\n", CNIC_ULP_ISCSI);
  265. else
  266. printk(KERN_ERR "bnx2i dev reg, unknown error, %d\n", rc);
  267. out:
  268. mutex_unlock(&bnx2i_dev_lock);
  269. return rc;
  270. }
  271. /**
  272. * bnx2i_ulp_init - initialize an adapter instance
  273. * @dev: cnic device handle
  274. *
  275. * Called from cnic_register_driver() context to initialize all enumerated
  276. * cnic devices. This routine allocate adapter structure and other
  277. * device specific resources.
  278. */
  279. void bnx2i_ulp_init(struct cnic_dev *dev)
  280. {
  281. struct bnx2i_hba *hba;
  282. /* Allocate a HBA structure for this device */
  283. hba = bnx2i_alloc_hba(dev);
  284. if (!hba) {
  285. printk(KERN_ERR "bnx2i init: hba initialization failed\n");
  286. return;
  287. }
  288. /* Get PCI related information and update hba struct members */
  289. clear_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic);
  290. if (bnx2i_init_one(hba, dev)) {
  291. printk(KERN_ERR "bnx2i - hba %p init failed\n", hba);
  292. bnx2i_free_hba(hba);
  293. }
  294. }
  295. /**
  296. * bnx2i_ulp_exit - shuts down adapter instance and frees all resources
  297. * @dev: cnic device handle
  298. *
  299. */
  300. void bnx2i_ulp_exit(struct cnic_dev *dev)
  301. {
  302. struct bnx2i_hba *hba;
  303. hba = bnx2i_find_hba_for_cnic(dev);
  304. if (!hba) {
  305. printk(KERN_INFO "bnx2i_ulp_exit: hba not "
  306. "found, dev 0x%p\n", dev);
  307. return;
  308. }
  309. mutex_lock(&bnx2i_dev_lock);
  310. list_del_init(&hba->link);
  311. adapter_count--;
  312. if (test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic)) {
  313. hba->cnic->unregister_device(hba->cnic, CNIC_ULP_ISCSI);
  314. clear_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic);
  315. }
  316. mutex_unlock(&bnx2i_dev_lock);
  317. bnx2i_free_hba(hba);
  318. }
  319. /**
  320. * bnx2i_get_stats - Retrieve various statistic from iSCSI offload
  321. * @handle: bnx2i_hba
  322. *
  323. * function callback exported via bnx2i - cnic driver interface to
  324. * retrieve various iSCSI offload related statistics.
  325. */
  326. int bnx2i_get_stats(void *handle)
  327. {
  328. struct bnx2i_hba *hba = handle;
  329. struct iscsi_stats_info *stats;
  330. if (!hba)
  331. return -EINVAL;
  332. stats = (struct iscsi_stats_info *)hba->cnic->stats_addr;
  333. if (!stats)
  334. return -ENOMEM;
  335. strlcpy(stats->version, DRV_MODULE_VERSION, sizeof(stats->version));
  336. memcpy(stats->mac_add1 + 2, hba->cnic->mac_addr, ETH_ALEN);
  337. stats->max_frame_size = hba->netdev->mtu;
  338. stats->txq_size = hba->max_sqes;
  339. stats->rxq_size = hba->max_cqes;
  340. stats->txq_avg_depth = 0;
  341. stats->rxq_avg_depth = 0;
  342. GET_STATS_64(hba, stats, rx_pdus);
  343. GET_STATS_64(hba, stats, rx_bytes);
  344. GET_STATS_64(hba, stats, tx_pdus);
  345. GET_STATS_64(hba, stats, tx_bytes);
  346. return 0;
  347. }
  348. /**
  349. * bnx2i_percpu_thread_create - Create a receive thread for an
  350. * online CPU
  351. *
  352. * @cpu: cpu index for the online cpu
  353. */
  354. static void bnx2i_percpu_thread_create(unsigned int cpu)
  355. {
  356. struct bnx2i_percpu_s *p;
  357. struct task_struct *thread;
  358. p = &per_cpu(bnx2i_percpu, cpu);
  359. thread = kthread_create_on_node(bnx2i_percpu_io_thread, (void *)p,
  360. cpu_to_node(cpu),
  361. "bnx2i_thread/%d", cpu);
  362. /* bind thread to the cpu */
  363. if (likely(!IS_ERR(thread))) {
  364. kthread_bind(thread, cpu);
  365. p->iothread = thread;
  366. wake_up_process(thread);
  367. }
  368. }
  369. static void bnx2i_percpu_thread_destroy(unsigned int cpu)
  370. {
  371. struct bnx2i_percpu_s *p;
  372. struct task_struct *thread;
  373. struct bnx2i_work *work, *tmp;
  374. /* Prevent any new work from being queued for this CPU */
  375. p = &per_cpu(bnx2i_percpu, cpu);
  376. spin_lock_bh(&p->p_work_lock);
  377. thread = p->iothread;
  378. p->iothread = NULL;
  379. /* Free all work in the list */
  380. list_for_each_entry_safe(work, tmp, &p->work_list, list) {
  381. list_del_init(&work->list);
  382. bnx2i_process_scsi_cmd_resp(work->session,
  383. work->bnx2i_conn, &work->cqe);
  384. kfree(work);
  385. }
  386. spin_unlock_bh(&p->p_work_lock);
  387. if (thread)
  388. kthread_stop(thread);
  389. }
  390. /**
  391. * bnx2i_cpu_callback - Handler for CPU hotplug events
  392. *
  393. * @nfb: The callback data block
  394. * @action: The event triggering the callback
  395. * @hcpu: The index of the CPU that the event is for
  396. *
  397. * This creates or destroys per-CPU data for iSCSI
  398. *
  399. * Returns NOTIFY_OK always.
  400. */
  401. static int bnx2i_cpu_callback(struct notifier_block *nfb,
  402. unsigned long action, void *hcpu)
  403. {
  404. unsigned cpu = (unsigned long)hcpu;
  405. switch (action) {
  406. case CPU_ONLINE:
  407. case CPU_ONLINE_FROZEN:
  408. printk(KERN_INFO "bnx2i: CPU %x online: Create Rx thread\n",
  409. cpu);
  410. bnx2i_percpu_thread_create(cpu);
  411. break;
  412. case CPU_DEAD:
  413. case CPU_DEAD_FROZEN:
  414. printk(KERN_INFO "CPU %x offline: Remove Rx thread\n", cpu);
  415. bnx2i_percpu_thread_destroy(cpu);
  416. break;
  417. default:
  418. break;
  419. }
  420. return NOTIFY_OK;
  421. }
  422. /**
  423. * bnx2i_mod_init - module init entry point
  424. *
  425. * initialize any driver wide global data structures such as endpoint pool,
  426. * tcp port manager/queue, sysfs. finally driver will register itself
  427. * with the cnic module
  428. */
  429. static int __init bnx2i_mod_init(void)
  430. {
  431. int err;
  432. unsigned cpu = 0;
  433. struct bnx2i_percpu_s *p;
  434. printk(KERN_INFO "%s", version);
  435. if (sq_size && !is_power_of_2(sq_size))
  436. sq_size = roundup_pow_of_two(sq_size);
  437. mutex_init(&bnx2i_dev_lock);
  438. bnx2i_scsi_xport_template =
  439. iscsi_register_transport(&bnx2i_iscsi_transport);
  440. if (!bnx2i_scsi_xport_template) {
  441. printk(KERN_ERR "Could not register bnx2i transport.\n");
  442. err = -ENOMEM;
  443. goto out;
  444. }
  445. err = cnic_register_driver(CNIC_ULP_ISCSI, &bnx2i_cnic_cb);
  446. if (err) {
  447. printk(KERN_ERR "Could not register bnx2i cnic driver.\n");
  448. goto unreg_xport;
  449. }
  450. /* Create percpu kernel threads to handle iSCSI I/O completions */
  451. for_each_possible_cpu(cpu) {
  452. p = &per_cpu(bnx2i_percpu, cpu);
  453. INIT_LIST_HEAD(&p->work_list);
  454. spin_lock_init(&p->p_work_lock);
  455. p->iothread = NULL;
  456. }
  457. cpu_notifier_register_begin();
  458. for_each_online_cpu(cpu)
  459. bnx2i_percpu_thread_create(cpu);
  460. /* Initialize per CPU interrupt thread */
  461. __register_hotcpu_notifier(&bnx2i_cpu_notifier);
  462. cpu_notifier_register_done();
  463. return 0;
  464. unreg_xport:
  465. iscsi_unregister_transport(&bnx2i_iscsi_transport);
  466. out:
  467. return err;
  468. }
  469. /**
  470. * bnx2i_mod_exit - module cleanup/exit entry point
  471. *
  472. * Global resource lock and host adapter lock is held during critical sections
  473. * in this function. Driver will browse through the adapter list, cleans-up
  474. * each instance, unregisters iscsi transport name and finally driver will
  475. * unregister itself with the cnic module
  476. */
  477. static void __exit bnx2i_mod_exit(void)
  478. {
  479. struct bnx2i_hba *hba;
  480. unsigned cpu = 0;
  481. mutex_lock(&bnx2i_dev_lock);
  482. while (!list_empty(&adapter_list)) {
  483. hba = list_entry(adapter_list.next, struct bnx2i_hba, link);
  484. list_del(&hba->link);
  485. adapter_count--;
  486. if (test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic)) {
  487. bnx2i_chip_cleanup(hba);
  488. hba->cnic->unregister_device(hba->cnic, CNIC_ULP_ISCSI);
  489. clear_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic);
  490. }
  491. bnx2i_free_hba(hba);
  492. }
  493. mutex_unlock(&bnx2i_dev_lock);
  494. cpu_notifier_register_begin();
  495. for_each_online_cpu(cpu)
  496. bnx2i_percpu_thread_destroy(cpu);
  497. __unregister_hotcpu_notifier(&bnx2i_cpu_notifier);
  498. cpu_notifier_register_done();
  499. iscsi_unregister_transport(&bnx2i_iscsi_transport);
  500. cnic_unregister_driver(CNIC_ULP_ISCSI);
  501. }
  502. module_init(bnx2i_mod_init);
  503. module_exit(bnx2i_mod_exit);