.. | .. |
---|
50 | 50 | * Here the io threads are per cpu but the l2 thread is just one |
---|
51 | 51 | */ |
---|
52 | 52 | struct fcoe_percpu_s bnx2fc_global; |
---|
53 | | -DEFINE_SPINLOCK(bnx2fc_global_lock); |
---|
| 53 | +static DEFINE_SPINLOCK(bnx2fc_global_lock); |
---|
54 | 54 | |
---|
55 | 55 | static struct cnic_ulp_ops bnx2fc_cnic_cb; |
---|
56 | 56 | static struct libfc_function_template bnx2fc_libfc_fcn_templ; |
---|
.. | .. |
---|
108 | 108 | "\t\t0x10 - fcoe L2 fame related logs.\n" |
---|
109 | 109 | "\t\t0xff - LOG all messages."); |
---|
110 | 110 | |
---|
111 | | -uint bnx2fc_devloss_tmo; |
---|
| 111 | +static uint bnx2fc_devloss_tmo; |
---|
112 | 112 | module_param_named(devloss_tmo, bnx2fc_devloss_tmo, uint, S_IRUGO); |
---|
113 | 113 | MODULE_PARM_DESC(devloss_tmo, " Change devloss_tmo for the remote ports " |
---|
114 | 114 | "attached via bnx2fc."); |
---|
115 | 115 | |
---|
116 | | -uint bnx2fc_max_luns = BNX2FC_MAX_LUN; |
---|
| 116 | +static uint bnx2fc_max_luns = BNX2FC_MAX_LUN; |
---|
117 | 117 | module_param_named(max_luns, bnx2fc_max_luns, uint, S_IRUGO); |
---|
118 | 118 | MODULE_PARM_DESC(max_luns, " Change the default max_lun per SCSI host. Default " |
---|
119 | 119 | "0xffff."); |
---|
120 | 120 | |
---|
121 | | -uint bnx2fc_queue_depth; |
---|
| 121 | +static uint bnx2fc_queue_depth; |
---|
122 | 122 | module_param_named(queue_depth, bnx2fc_queue_depth, uint, S_IRUGO); |
---|
123 | 123 | MODULE_PARM_DESC(queue_depth, " Change the default queue depth of SCSI devices " |
---|
124 | 124 | "attached via bnx2fc."); |
---|
125 | 125 | |
---|
126 | | -uint bnx2fc_log_fka; |
---|
| 126 | +static uint bnx2fc_log_fka; |
---|
127 | 127 | module_param_named(log_fka, bnx2fc_log_fka, uint, S_IRUGO|S_IWUSR); |
---|
128 | 128 | MODULE_PARM_DESC(log_fka, " Print message to kernel log when fcoe is " |
---|
129 | 129 | "initiating a FIP keep alive when debug logging is enabled."); |
---|
.. | .. |
---|
150 | 150 | struct fcoe_rcv_info *fr; |
---|
151 | 151 | struct sk_buff_head *list; |
---|
152 | 152 | struct sk_buff *skb, *next; |
---|
153 | | - struct sk_buff *head; |
---|
154 | 153 | |
---|
155 | 154 | bg = &bnx2fc_global; |
---|
156 | 155 | spin_lock_bh(&bg->fcoe_rx_list.lock); |
---|
157 | 156 | list = &bg->fcoe_rx_list; |
---|
158 | | - head = list->next; |
---|
159 | | - for (skb = head; skb != (struct sk_buff *)list; |
---|
160 | | - skb = next) { |
---|
161 | | - next = skb->next; |
---|
| 157 | + skb_queue_walk_safe(list, skb, next) { |
---|
162 | 158 | fr = fcoe_dev_from_skb(skb); |
---|
163 | 159 | if (fr->fr_dev == lp) { |
---|
164 | 160 | __skb_unlink(skb, list); |
---|
.. | .. |
---|
350 | 346 | return -ENOMEM; |
---|
351 | 347 | } |
---|
352 | 348 | frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1]; |
---|
353 | | - cp = kmap_atomic(skb_frag_page(frag)) + frag->page_offset; |
---|
| 349 | + cp = kmap_atomic(skb_frag_page(frag)) + skb_frag_off(frag); |
---|
354 | 350 | } else { |
---|
355 | 351 | cp = skb_put(skb, tlen); |
---|
356 | 352 | } |
---|
.. | .. |
---|
432 | 428 | struct fc_lport *lport; |
---|
433 | 429 | struct bnx2fc_interface *interface; |
---|
434 | 430 | struct fcoe_ctlr *ctlr; |
---|
435 | | - struct fc_frame_header *fh; |
---|
436 | 431 | struct fcoe_rcv_info *fr; |
---|
437 | 432 | struct fcoe_percpu_s *bg; |
---|
438 | 433 | struct sk_buff *tmp_skb; |
---|
439 | | - unsigned short oxid; |
---|
440 | 434 | |
---|
441 | 435 | interface = container_of(ptype, struct bnx2fc_interface, |
---|
442 | 436 | fcoe_packet_type); |
---|
.. | .. |
---|
468 | 462 | goto err; |
---|
469 | 463 | |
---|
470 | 464 | skb_set_transport_header(skb, sizeof(struct fcoe_hdr)); |
---|
471 | | - fh = (struct fc_frame_header *) skb_transport_header(skb); |
---|
472 | | - |
---|
473 | | - oxid = ntohs(fh->fh_ox_id); |
---|
474 | 465 | |
---|
475 | 466 | fr = fcoe_dev_from_skb(skb); |
---|
476 | 467 | fr->fr_dev = lport; |
---|
.. | .. |
---|
674 | 665 | |
---|
675 | 666 | list_for_each_entry_safe(work, tmp, &work_list, list) { |
---|
676 | 667 | list_del_init(&work->list); |
---|
677 | | - bnx2fc_process_cq_compl(work->tgt, work->wqe); |
---|
| 668 | + bnx2fc_process_cq_compl(work->tgt, work->wqe, |
---|
| 669 | + work->rq_data, |
---|
| 670 | + work->num_rq, |
---|
| 671 | + work->task); |
---|
678 | 672 | kfree(work); |
---|
679 | 673 | } |
---|
680 | 674 | |
---|
.. | .. |
---|
953 | 947 | */ |
---|
954 | 948 | if (interface->enabled) |
---|
955 | 949 | fcoe_ctlr_link_up(ctlr); |
---|
956 | | - }; |
---|
| 950 | + } |
---|
957 | 951 | } else if (fcoe_ctlr_link_down(ctlr)) { |
---|
958 | 952 | switch (cdev->enabled) { |
---|
959 | 953 | case FCOE_CTLR_DISABLED: |
---|
.. | .. |
---|
973 | 967 | put_cpu(); |
---|
974 | 968 | fcoe_clean_pending_queue(lport); |
---|
975 | 969 | wait_for_upload = 1; |
---|
976 | | - }; |
---|
| 970 | + } |
---|
977 | 971 | } |
---|
978 | 972 | } |
---|
979 | 973 | mutex_unlock(&bnx2fc_dev_lock); |
---|
.. | .. |
---|
1079 | 1073 | /** |
---|
1080 | 1074 | * bnx2fc_update_src_mac - Update Ethernet MAC filters. |
---|
1081 | 1075 | * |
---|
1082 | | - * @fip: FCoE controller. |
---|
1083 | | - * @old: Unicast MAC address to delete if the MAC is non-zero. |
---|
1084 | | - * @new: Unicast MAC address to add. |
---|
| 1076 | + * @lport: The local port |
---|
| 1077 | + * @addr: Location of data to copy |
---|
1085 | 1078 | * |
---|
1086 | 1079 | * Remove any previously-set unicast MAC filter. |
---|
1087 | 1080 | * Add secondary FCoE MAC address filter for our OUI. |
---|
.. | .. |
---|
1666 | 1659 | /** |
---|
1667 | 1660 | * bnx2fc_destroy - Destroy a bnx2fc FCoE interface |
---|
1668 | 1661 | * |
---|
1669 | | - * @buffer: The name of the Ethernet interface to be destroyed |
---|
1670 | | - * @kp: The associated kernel parameter |
---|
| 1662 | + * @netdev: The net device that the FCoE interface is on |
---|
1671 | 1663 | * |
---|
1672 | 1664 | * Called from sysfs. |
---|
1673 | 1665 | * |
---|
.. | .. |
---|
2105 | 2097 | return 0; |
---|
2106 | 2098 | } |
---|
2107 | 2099 | |
---|
2108 | | -/** |
---|
| 2100 | +/* |
---|
2109 | 2101 | * Deperecated: Use bnx2fc_enabled() |
---|
2110 | 2102 | */ |
---|
2111 | 2103 | static int bnx2fc_disable(struct net_device *netdev) |
---|
.. | .. |
---|
2233 | 2225 | return 0; |
---|
2234 | 2226 | } |
---|
2235 | 2227 | |
---|
2236 | | -/** |
---|
| 2228 | +/* |
---|
2237 | 2229 | * Deprecated: Use bnx2fc_enabled() |
---|
2238 | 2230 | */ |
---|
2239 | 2231 | static int bnx2fc_enable(struct net_device *netdev) |
---|
.. | .. |
---|
2527 | 2519 | /** |
---|
2528 | 2520 | * bnx2fc_ulp_exit - shuts down adapter instance and frees all resources |
---|
2529 | 2521 | * |
---|
2530 | | - * @dev cnic device handle |
---|
| 2522 | + * @dev: cnic device handle |
---|
2531 | 2523 | */ |
---|
2532 | 2524 | static void bnx2fc_ulp_exit(struct cnic_dev *dev) |
---|
2533 | 2525 | { |
---|
.. | .. |
---|
2659 | 2651 | /* Free all work in the list */ |
---|
2660 | 2652 | list_for_each_entry_safe(work, tmp, &p->work_list, list) { |
---|
2661 | 2653 | list_del_init(&work->list); |
---|
2662 | | - bnx2fc_process_cq_compl(work->tgt, work->wqe); |
---|
| 2654 | + bnx2fc_process_cq_compl(work->tgt, work->wqe, work->rq_data, |
---|
| 2655 | + work->num_rq, work->task); |
---|
2663 | 2656 | kfree(work); |
---|
2664 | 2657 | } |
---|
2665 | 2658 | |
---|
.. | .. |
---|
2956 | 2949 | NULL, |
---|
2957 | 2950 | }; |
---|
2958 | 2951 | |
---|
2959 | | -/** |
---|
| 2952 | +/* |
---|
2960 | 2953 | * scsi_host_template structure used while registering with SCSI-ml |
---|
2961 | 2954 | */ |
---|
2962 | 2955 | static struct scsi_host_template bnx2fc_shost_template = { |
---|
.. | .. |
---|
2972 | 2965 | .change_queue_depth = scsi_change_queue_depth, |
---|
2973 | 2966 | .this_id = -1, |
---|
2974 | 2967 | .cmd_per_lun = 3, |
---|
2975 | | - .use_clustering = ENABLE_CLUSTERING, |
---|
2976 | 2968 | .sg_tablesize = BNX2FC_MAX_BDS_PER_CMD, |
---|
2977 | | - .max_sectors = 1024, |
---|
| 2969 | + .dma_boundary = 0x7fff, |
---|
| 2970 | + .max_sectors = 0x3fbf, |
---|
2978 | 2971 | .track_queue_depth = 1, |
---|
2979 | 2972 | .slave_configure = bnx2fc_slave_configure, |
---|
2980 | 2973 | .shost_attrs = bnx2fc_host_attrs, |
---|
.. | .. |
---|
2989 | 2982 | .rport_event_callback = bnx2fc_rport_event_handler, |
---|
2990 | 2983 | }; |
---|
2991 | 2984 | |
---|
2992 | | -/** |
---|
| 2985 | +/* |
---|
2993 | 2986 | * bnx2fc_cnic_cb - global template of bnx2fc - cnic driver interface |
---|
2994 | 2987 | * structure carrying callback function pointers |
---|
2995 | 2988 | */ |
---|