diff options
Diffstat (limited to 'drivers/scsi/fcoe/libfcoe.c')
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 296071043f55..5e68652985b2 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -91,13 +91,13 @@ static struct notifier_block fcoe_cpu_notifier = { | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | /** | 93 | /** |
94 | * fcoe_create_percpu_data - creates the associated cpu data | 94 | * fcoe_create_percpu_data() - creates the associated cpu data |
95 | * @cpu: index for the cpu where fcoe cpu data will be created | 95 | * @cpu: index for the cpu where fcoe cpu data will be created |
96 | * | 96 | * |
97 | * create percpu stats block, from cpu add notifier | 97 | * create percpu stats block, from cpu add notifier |
98 | * | 98 | * |
99 | * Returns: none | 99 | * Returns: none |
100 | **/ | 100 | */ |
101 | static void fcoe_create_percpu_data(int cpu) | 101 | static void fcoe_create_percpu_data(int cpu) |
102 | { | 102 | { |
103 | struct fc_lport *lp; | 103 | struct fc_lport *lp; |
@@ -115,13 +115,13 @@ static void fcoe_create_percpu_data(int cpu) | |||
115 | } | 115 | } |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * fcoe_destroy_percpu_data - destroys the associated cpu data | 118 | * fcoe_destroy_percpu_data() - destroys the associated cpu data |
119 | * @cpu: index for the cpu where fcoe cpu data will destroyed | 119 | * @cpu: index for the cpu where fcoe cpu data will destroyed |
120 | * | 120 | * |
121 | * destroy percpu stats block called by cpu add/remove notifier | 121 | * destroy percpu stats block called by cpu add/remove notifier |
122 | * | 122 | * |
123 | * Retuns: none | 123 | * Retuns: none |
124 | **/ | 124 | */ |
125 | static void fcoe_destroy_percpu_data(int cpu) | 125 | static void fcoe_destroy_percpu_data(int cpu) |
126 | { | 126 | { |
127 | struct fc_lport *lp; | 127 | struct fc_lport *lp; |
@@ -137,7 +137,7 @@ static void fcoe_destroy_percpu_data(int cpu) | |||
137 | } | 137 | } |
138 | 138 | ||
139 | /** | 139 | /** |
140 | * fcoe_cpu_callback - fcoe cpu hotplug event callback | 140 | * fcoe_cpu_callback() - fcoe cpu hotplug event callback |
141 | * @nfb: callback data block | 141 | * @nfb: callback data block |
142 | * @action: event triggering the callback | 142 | * @action: event triggering the callback |
143 | * @hcpu: index for the cpu of this event | 143 | * @hcpu: index for the cpu of this event |
@@ -145,7 +145,7 @@ static void fcoe_destroy_percpu_data(int cpu) | |||
145 | * this creates or destroys per cpu data for fcoe | 145 | * this creates or destroys per cpu data for fcoe |
146 | * | 146 | * |
147 | * Returns NOTIFY_OK always. | 147 | * Returns NOTIFY_OK always. |
148 | **/ | 148 | */ |
149 | static int fcoe_cpu_callback(struct notifier_block *nfb, unsigned long action, | 149 | static int fcoe_cpu_callback(struct notifier_block *nfb, unsigned long action, |
150 | void *hcpu) | 150 | void *hcpu) |
151 | { | 151 | { |
@@ -166,7 +166,7 @@ static int fcoe_cpu_callback(struct notifier_block *nfb, unsigned long action, | |||
166 | #endif /* CONFIG_HOTPLUG_CPU */ | 166 | #endif /* CONFIG_HOTPLUG_CPU */ |
167 | 167 | ||
168 | /** | 168 | /** |
169 | * fcoe_rcv - this is the fcoe receive function called by NET_RX_SOFTIRQ | 169 | * fcoe_rcv() - this is the fcoe receive function called by NET_RX_SOFTIRQ |
170 | * @skb: the receive skb | 170 | * @skb: the receive skb |
171 | * @dev: associated net device | 171 | * @dev: associated net device |
172 | * @ptype: context | 172 | * @ptype: context |
@@ -175,7 +175,7 @@ static int fcoe_cpu_callback(struct notifier_block *nfb, unsigned long action, | |||
175 | * this function will receive the packet and build fc frame and pass it up | 175 | * this function will receive the packet and build fc frame and pass it up |
176 | * | 176 | * |
177 | * Returns: 0 for success | 177 | * Returns: 0 for success |
178 | **/ | 178 | */ |
179 | int fcoe_rcv(struct sk_buff *skb, struct net_device *dev, | 179 | int fcoe_rcv(struct sk_buff *skb, struct net_device *dev, |
180 | struct packet_type *ptype, struct net_device *olddev) | 180 | struct packet_type *ptype, struct net_device *olddev) |
181 | { | 181 | { |
@@ -265,11 +265,11 @@ err2: | |||
265 | EXPORT_SYMBOL_GPL(fcoe_rcv); | 265 | EXPORT_SYMBOL_GPL(fcoe_rcv); |
266 | 266 | ||
267 | /** | 267 | /** |
268 | * fcoe_start_io - pass to netdev to start xmit for fcoe | 268 | * fcoe_start_io() - pass to netdev to start xmit for fcoe |
269 | * @skb: the skb to be xmitted | 269 | * @skb: the skb to be xmitted |
270 | * | 270 | * |
271 | * Returns: 0 for success | 271 | * Returns: 0 for success |
272 | **/ | 272 | */ |
273 | static inline int fcoe_start_io(struct sk_buff *skb) | 273 | static inline int fcoe_start_io(struct sk_buff *skb) |
274 | { | 274 | { |
275 | int rc; | 275 | int rc; |
@@ -283,12 +283,12 @@ static inline int fcoe_start_io(struct sk_buff *skb) | |||
283 | } | 283 | } |
284 | 284 | ||
285 | /** | 285 | /** |
286 | * fcoe_get_paged_crc_eof - in case we need alloc a page for crc_eof | 286 | * fcoe_get_paged_crc_eof() - in case we need alloc a page for crc_eof |
287 | * @skb: the skb to be xmitted | 287 | * @skb: the skb to be xmitted |
288 | * @tlen: total len | 288 | * @tlen: total len |
289 | * | 289 | * |
290 | * Returns: 0 for success | 290 | * Returns: 0 for success |
291 | **/ | 291 | */ |
292 | static int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen) | 292 | static int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen) |
293 | { | 293 | { |
294 | struct fcoe_percpu_s *fps; | 294 | struct fcoe_percpu_s *fps; |
@@ -326,13 +326,12 @@ static int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen) | |||
326 | } | 326 | } |
327 | 327 | ||
328 | /** | 328 | /** |
329 | * fcoe_fc_crc - calculates FC CRC in this fcoe skb | 329 | * fcoe_fc_crc() - calculates FC CRC in this fcoe skb |
330 | * @fp: the fc_frame containg data to be checksummed | 330 | * @fp: the fc_frame containg data to be checksummed |
331 | * | 331 | * |
332 | * This uses crc32() to calculate the crc for fc frame | 332 | * This uses crc32() to calculate the crc for fc frame |
333 | * Return : 32 bit crc | 333 | * Return : 32 bit crc |
334 | * | 334 | */ |
335 | **/ | ||
336 | u32 fcoe_fc_crc(struct fc_frame *fp) | 335 | u32 fcoe_fc_crc(struct fc_frame *fp) |
337 | { | 336 | { |
338 | struct sk_buff *skb = fp_skb(fp); | 337 | struct sk_buff *skb = fp_skb(fp); |
@@ -363,13 +362,12 @@ u32 fcoe_fc_crc(struct fc_frame *fp) | |||
363 | EXPORT_SYMBOL_GPL(fcoe_fc_crc); | 362 | EXPORT_SYMBOL_GPL(fcoe_fc_crc); |
364 | 363 | ||
365 | /** | 364 | /** |
366 | * fcoe_xmit - FCoE frame transmit function | 365 | * fcoe_xmit() - FCoE frame transmit function |
367 | * @lp: the associated local port | 366 | * @lp: the associated local port |
368 | * @fp: the fc_frame to be transmitted | 367 | * @fp: the fc_frame to be transmitted |
369 | * | 368 | * |
370 | * Return : 0 for success | 369 | * Return : 0 for success |
371 | * | 370 | */ |
372 | **/ | ||
373 | int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp) | 371 | int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp) |
374 | { | 372 | { |
375 | int wlen, rc = 0; | 373 | int wlen, rc = 0; |
@@ -511,12 +509,11 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp) | |||
511 | } | 509 | } |
512 | EXPORT_SYMBOL_GPL(fcoe_xmit); | 510 | EXPORT_SYMBOL_GPL(fcoe_xmit); |
513 | 511 | ||
514 | /* | 512 | /** |
515 | * fcoe_percpu_receive_thread - recv thread per cpu | 513 | * fcoe_percpu_receive_thread() - recv thread per cpu |
516 | * @arg: ptr to the fcoe per cpu struct | 514 | * @arg: ptr to the fcoe per cpu struct |
517 | * | 515 | * |
518 | * Return: 0 for success | 516 | * Return: 0 for success |
519 | * | ||
520 | */ | 517 | */ |
521 | int fcoe_percpu_receive_thread(void *arg) | 518 | int fcoe_percpu_receive_thread(void *arg) |
522 | { | 519 | { |
@@ -658,7 +655,7 @@ int fcoe_percpu_receive_thread(void *arg) | |||
658 | } | 655 | } |
659 | 656 | ||
660 | /** | 657 | /** |
661 | * fcoe_recv_flogi - flogi receive function | 658 | * fcoe_recv_flogi() - flogi receive function |
662 | * @fc: associated fcoe_softc | 659 | * @fc: associated fcoe_softc |
663 | * @fp: the recieved frame | 660 | * @fp: the recieved frame |
664 | * @sa: the source address of this flogi | 661 | * @sa: the source address of this flogi |
@@ -667,7 +664,7 @@ int fcoe_percpu_receive_thread(void *arg) | |||
667 | * mac address for the initiator, eitehr OUI based or GW based. | 664 | * mac address for the initiator, eitehr OUI based or GW based. |
668 | * | 665 | * |
669 | * Returns: none | 666 | * Returns: none |
670 | **/ | 667 | */ |
671 | static void fcoe_recv_flogi(struct fcoe_softc *fc, struct fc_frame *fp, u8 *sa) | 668 | static void fcoe_recv_flogi(struct fcoe_softc *fc, struct fc_frame *fp, u8 *sa) |
672 | { | 669 | { |
673 | struct fc_frame_header *fh; | 670 | struct fc_frame_header *fh; |
@@ -715,7 +712,7 @@ static void fcoe_recv_flogi(struct fcoe_softc *fc, struct fc_frame *fp, u8 *sa) | |||
715 | } | 712 | } |
716 | 713 | ||
717 | /** | 714 | /** |
718 | * fcoe_watchdog - fcoe timer callback | 715 | * fcoe_watchdog() - fcoe timer callback |
719 | * @vp: | 716 | * @vp: |
720 | * | 717 | * |
721 | * This checks the pending queue length for fcoe and set lport qfull | 718 | * This checks the pending queue length for fcoe and set lport qfull |
@@ -723,7 +720,7 @@ static void fcoe_recv_flogi(struct fcoe_softc *fc, struct fc_frame *fp, u8 *sa) | |||
723 | * fcoe_hostlist. | 720 | * fcoe_hostlist. |
724 | * | 721 | * |
725 | * Returns: 0 for success | 722 | * Returns: 0 for success |
726 | **/ | 723 | */ |
727 | void fcoe_watchdog(ulong vp) | 724 | void fcoe_watchdog(ulong vp) |
728 | { | 725 | { |
729 | struct fc_lport *lp; | 726 | struct fc_lport *lp; |
@@ -750,7 +747,7 @@ void fcoe_watchdog(ulong vp) | |||
750 | 747 | ||
751 | 748 | ||
752 | /** | 749 | /** |
753 | * fcoe_check_wait_queue - put the skb into fcoe pending xmit queue | 750 | * fcoe_check_wait_queue() - put the skb into fcoe pending xmit queue |
754 | * @lp: the fc_port for this skb | 751 | * @lp: the fc_port for this skb |
755 | * @skb: the associated skb to be xmitted | 752 | * @skb: the associated skb to be xmitted |
756 | * | 753 | * |
@@ -764,7 +761,7 @@ void fcoe_watchdog(ulong vp) | |||
764 | * by the next skb transmit. | 761 | * by the next skb transmit. |
765 | * | 762 | * |
766 | * Returns: 0 for success | 763 | * Returns: 0 for success |
767 | **/ | 764 | */ |
768 | static int fcoe_check_wait_queue(struct fc_lport *lp) | 765 | static int fcoe_check_wait_queue(struct fc_lport *lp) |
769 | { | 766 | { |
770 | int rc; | 767 | int rc; |
@@ -797,12 +794,12 @@ static int fcoe_check_wait_queue(struct fc_lport *lp) | |||
797 | } | 794 | } |
798 | 795 | ||
799 | /** | 796 | /** |
800 | * fcoe_insert_wait_queue_head - puts skb to fcoe pending queue head | 797 | * fcoe_insert_wait_queue_head() - puts skb to fcoe pending queue head |
801 | * @lp: the fc_port for this skb | 798 | * @lp: the fc_port for this skb |
802 | * @skb: the associated skb to be xmitted | 799 | * @skb: the associated skb to be xmitted |
803 | * | 800 | * |
804 | * Returns: none | 801 | * Returns: none |
805 | **/ | 802 | */ |
806 | static void fcoe_insert_wait_queue_head(struct fc_lport *lp, | 803 | static void fcoe_insert_wait_queue_head(struct fc_lport *lp, |
807 | struct sk_buff *skb) | 804 | struct sk_buff *skb) |
808 | { | 805 | { |
@@ -815,12 +812,12 @@ static void fcoe_insert_wait_queue_head(struct fc_lport *lp, | |||
815 | } | 812 | } |
816 | 813 | ||
817 | /** | 814 | /** |
818 | * fcoe_insert_wait_queue - put the skb into fcoe pending queue tail | 815 | * fcoe_insert_wait_queue() - put the skb into fcoe pending queue tail |
819 | * @lp: the fc_port for this skb | 816 | * @lp: the fc_port for this skb |
820 | * @skb: the associated skb to be xmitted | 817 | * @skb: the associated skb to be xmitted |
821 | * | 818 | * |
822 | * Returns: none | 819 | * Returns: none |
823 | **/ | 820 | */ |
824 | static void fcoe_insert_wait_queue(struct fc_lport *lp, | 821 | static void fcoe_insert_wait_queue(struct fc_lport *lp, |
825 | struct sk_buff *skb) | 822 | struct sk_buff *skb) |
826 | { | 823 | { |
@@ -833,10 +830,9 @@ static void fcoe_insert_wait_queue(struct fc_lport *lp, | |||
833 | } | 830 | } |
834 | 831 | ||
835 | /** | 832 | /** |
836 | * fcoe_dev_setup - setup link change notification interface | 833 | * fcoe_dev_setup() - setup link change notification interface |
837 | * | 834 | */ |
838 | **/ | 835 | static void fcoe_dev_setup() |
839 | static void fcoe_dev_setup(void) | ||
840 | { | 836 | { |
841 | /* | 837 | /* |
842 | * here setup a interface specific wd time to | 838 | * here setup a interface specific wd time to |
@@ -846,15 +842,15 @@ static void fcoe_dev_setup(void) | |||
846 | } | 842 | } |
847 | 843 | ||
848 | /** | 844 | /** |
849 | * fcoe_dev_setup - cleanup link change notification interface | 845 | * fcoe_dev_setup() - cleanup link change notification interface |
850 | **/ | 846 | */ |
851 | static void fcoe_dev_cleanup(void) | 847 | static void fcoe_dev_cleanup(void) |
852 | { | 848 | { |
853 | unregister_netdevice_notifier(&fcoe_notifier); | 849 | unregister_netdevice_notifier(&fcoe_notifier); |
854 | } | 850 | } |
855 | 851 | ||
856 | /** | 852 | /** |
857 | * fcoe_device_notification - netdev event notification callback | 853 | * fcoe_device_notification() - netdev event notification callback |
858 | * @notifier: context of the notification | 854 | * @notifier: context of the notification |
859 | * @event: type of event | 855 | * @event: type of event |
860 | * @ptr: fixed array for output parsed ifname | 856 | * @ptr: fixed array for output parsed ifname |
@@ -862,7 +858,7 @@ static void fcoe_dev_cleanup(void) | |||
862 | * This function is called by the ethernet driver in case of link change event | 858 | * This function is called by the ethernet driver in case of link change event |
863 | * | 859 | * |
864 | * Returns: 0 for success | 860 | * Returns: 0 for success |
865 | **/ | 861 | */ |
866 | static int fcoe_device_notification(struct notifier_block *notifier, | 862 | static int fcoe_device_notification(struct notifier_block *notifier, |
867 | ulong event, void *ptr) | 863 | ulong event, void *ptr) |
868 | { | 864 | { |
@@ -926,12 +922,12 @@ out: | |||
926 | } | 922 | } |
927 | 923 | ||
928 | /** | 924 | /** |
929 | * fcoe_if_to_netdev - parse a name buffer to get netdev | 925 | * fcoe_if_to_netdev() - parse a name buffer to get netdev |
930 | * @ifname: fixed array for output parsed ifname | 926 | * @ifname: fixed array for output parsed ifname |
931 | * @buffer: incoming buffer to be copied | 927 | * @buffer: incoming buffer to be copied |
932 | * | 928 | * |
933 | * Returns: NULL or ptr to netdeive | 929 | * Returns: NULL or ptr to netdeive |
934 | **/ | 930 | */ |
935 | static struct net_device *fcoe_if_to_netdev(const char *buffer) | 931 | static struct net_device *fcoe_if_to_netdev(const char *buffer) |
936 | { | 932 | { |
937 | char *cp; | 933 | char *cp; |
@@ -948,11 +944,11 @@ static struct net_device *fcoe_if_to_netdev(const char *buffer) | |||
948 | } | 944 | } |
949 | 945 | ||
950 | /** | 946 | /** |
951 | * fcoe_netdev_to_module_owner - finds out the nic drive moddule of the netdev | 947 | * fcoe_netdev_to_module_owner() - finds out the nic drive moddule of the netdev |
952 | * @netdev: the target netdev | 948 | * @netdev: the target netdev |
953 | * | 949 | * |
954 | * Returns: ptr to the struct module, NULL for failure | 950 | * Returns: ptr to the struct module, NULL for failure |
955 | **/ | 951 | */ |
956 | static struct module *fcoe_netdev_to_module_owner( | 952 | static struct module *fcoe_netdev_to_module_owner( |
957 | const struct net_device *netdev) | 953 | const struct net_device *netdev) |
958 | { | 954 | { |
@@ -972,12 +968,14 @@ static struct module *fcoe_netdev_to_module_owner( | |||
972 | } | 968 | } |
973 | 969 | ||
974 | /** | 970 | /** |
975 | * fcoe_ethdrv_get - holds the nic driver module by try_module_get() for | 971 | * fcoe_ethdrv_get() - Hold the Ethernet driver |
976 | * the corresponding netdev. | ||
977 | * @netdev: the target netdev | 972 | * @netdev: the target netdev |
978 | * | 973 | * |
974 | * Holds the Ethernet driver module by try_module_get() for | ||
975 | * the corresponding netdev. | ||
976 | * | ||
979 | * Returns: 0 for succsss | 977 | * Returns: 0 for succsss |
980 | **/ | 978 | */ |
981 | static int fcoe_ethdrv_get(const struct net_device *netdev) | 979 | static int fcoe_ethdrv_get(const struct net_device *netdev) |
982 | { | 980 | { |
983 | struct module *owner; | 981 | struct module *owner; |
@@ -992,12 +990,14 @@ static int fcoe_ethdrv_get(const struct net_device *netdev) | |||
992 | } | 990 | } |
993 | 991 | ||
994 | /** | 992 | /** |
995 | * fcoe_ethdrv_get - releases the nic driver module by module_put for | 993 | * fcoe_ethdrv_put() - Release the Ethernet driver |
996 | * the corresponding netdev. | ||
997 | * @netdev: the target netdev | 994 | * @netdev: the target netdev |
998 | * | 995 | * |
996 | * Releases the Ethernet driver module by module_put for | ||
997 | * the corresponding netdev. | ||
998 | * | ||
999 | * Returns: 0 for succsss | 999 | * Returns: 0 for succsss |
1000 | **/ | 1000 | */ |
1001 | static int fcoe_ethdrv_put(const struct net_device *netdev) | 1001 | static int fcoe_ethdrv_put(const struct net_device *netdev) |
1002 | { | 1002 | { |
1003 | struct module *owner; | 1003 | struct module *owner; |
@@ -1013,12 +1013,12 @@ static int fcoe_ethdrv_put(const struct net_device *netdev) | |||
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | /** | 1015 | /** |
1016 | * fcoe_destroy- handles the destroy from sysfs | 1016 | * fcoe_destroy() - handles the destroy from sysfs |
1017 | * @buffer: expcted to be a eth if name | 1017 | * @buffer: expcted to be a eth if name |
1018 | * @kp: associated kernel param | 1018 | * @kp: associated kernel param |
1019 | * | 1019 | * |
1020 | * Returns: 0 for success | 1020 | * Returns: 0 for success |
1021 | **/ | 1021 | */ |
1022 | static int fcoe_destroy(const char *buffer, struct kernel_param *kp) | 1022 | static int fcoe_destroy(const char *buffer, struct kernel_param *kp) |
1023 | { | 1023 | { |
1024 | int rc; | 1024 | int rc; |
@@ -1051,12 +1051,12 @@ out_nodev: | |||
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | /** | 1053 | /** |
1054 | * fcoe_create - handles the create call from sysfs | 1054 | * fcoe_create() - Handles the create call from sysfs |
1055 | * @buffer: expcted to be a eth if name | 1055 | * @buffer: expcted to be a eth if name |
1056 | * @kp: associated kernel param | 1056 | * @kp: associated kernel param |
1057 | * | 1057 | * |
1058 | * Returns: 0 for success | 1058 | * Returns: 0 for success |
1059 | **/ | 1059 | */ |
1060 | static int fcoe_create(const char *buffer, struct kernel_param *kp) | 1060 | static int fcoe_create(const char *buffer, struct kernel_param *kp) |
1061 | { | 1061 | { |
1062 | int rc; | 1062 | int rc; |
@@ -1097,8 +1097,8 @@ module_param_call(destroy, fcoe_destroy, NULL, NULL, S_IWUSR); | |||
1097 | __MODULE_PARM_TYPE(destroy, "string"); | 1097 | __MODULE_PARM_TYPE(destroy, "string"); |
1098 | MODULE_PARM_DESC(destroy, "Destroy fcoe port"); | 1098 | MODULE_PARM_DESC(destroy, "Destroy fcoe port"); |
1099 | 1099 | ||
1100 | /* | 1100 | /** |
1101 | * fcoe_link_ok - check if link is ok for the fc_lport | 1101 | * fcoe_link_ok() - Check if link is ok for the fc_lport |
1102 | * @lp: ptr to the fc_lport | 1102 | * @lp: ptr to the fc_lport |
1103 | * | 1103 | * |
1104 | * Any permanently-disqualifying conditions have been previously checked. | 1104 | * Any permanently-disqualifying conditions have been previously checked. |
@@ -1142,9 +1142,8 @@ int fcoe_link_ok(struct fc_lport *lp) | |||
1142 | } | 1142 | } |
1143 | EXPORT_SYMBOL_GPL(fcoe_link_ok); | 1143 | EXPORT_SYMBOL_GPL(fcoe_link_ok); |
1144 | 1144 | ||
1145 | /* | 1145 | /** |
1146 | * fcoe_percpu_clean - frees skb of the corresponding lport from the per | 1146 | * fcoe_percpu_clean() - Clear the pending skbs for an lport |
1147 | * cpu queue. | ||
1148 | * @lp: the fc_lport | 1147 | * @lp: the fc_lport |
1149 | */ | 1148 | */ |
1150 | void fcoe_percpu_clean(struct fc_lport *lp) | 1149 | void fcoe_percpu_clean(struct fc_lport *lp) |
@@ -1178,11 +1177,11 @@ void fcoe_percpu_clean(struct fc_lport *lp) | |||
1178 | EXPORT_SYMBOL_GPL(fcoe_percpu_clean); | 1177 | EXPORT_SYMBOL_GPL(fcoe_percpu_clean); |
1179 | 1178 | ||
1180 | /** | 1179 | /** |
1181 | * fcoe_clean_pending_queue - dequeue skb and free it | 1180 | * fcoe_clean_pending_queue() - Dequeue a skb and free it |
1182 | * @lp: the corresponding fc_lport | 1181 | * @lp: the corresponding fc_lport |
1183 | * | 1182 | * |
1184 | * Returns: none | 1183 | * Returns: none |
1185 | **/ | 1184 | */ |
1186 | void fcoe_clean_pending_queue(struct fc_lport *lp) | 1185 | void fcoe_clean_pending_queue(struct fc_lport *lp) |
1187 | { | 1186 | { |
1188 | struct fcoe_softc *fc = lport_priv(lp); | 1187 | struct fcoe_softc *fc = lport_priv(lp); |
@@ -1199,12 +1198,12 @@ void fcoe_clean_pending_queue(struct fc_lport *lp) | |||
1199 | EXPORT_SYMBOL_GPL(fcoe_clean_pending_queue); | 1198 | EXPORT_SYMBOL_GPL(fcoe_clean_pending_queue); |
1200 | 1199 | ||
1201 | /** | 1200 | /** |
1202 | * libfc_host_alloc - allocate a Scsi_Host with room for the fc_lport | 1201 | * libfc_host_alloc() - Allocate a Scsi_Host with room for the fc_lport |
1203 | * @sht: ptr to the scsi host templ | 1202 | * @sht: ptr to the scsi host templ |
1204 | * @priv_size: size of private data after fc_lport | 1203 | * @priv_size: size of private data after fc_lport |
1205 | * | 1204 | * |
1206 | * Returns: ptr to Scsi_Host | 1205 | * Returns: ptr to Scsi_Host |
1207 | * TODO - to libfc? | 1206 | * TODO: to libfc? |
1208 | */ | 1207 | */ |
1209 | static inline struct Scsi_Host *libfc_host_alloc( | 1208 | static inline struct Scsi_Host *libfc_host_alloc( |
1210 | struct scsi_host_template *sht, int priv_size) | 1209 | struct scsi_host_template *sht, int priv_size) |
@@ -1213,7 +1212,7 @@ static inline struct Scsi_Host *libfc_host_alloc( | |||
1213 | } | 1212 | } |
1214 | 1213 | ||
1215 | /** | 1214 | /** |
1216 | * fcoe_host_alloc - allocate a Scsi_Host with room for the fcoe_softc | 1215 | * fcoe_host_alloc() - Allocate a Scsi_Host with room for the fcoe_softc |
1217 | * @sht: ptr to the scsi host templ | 1216 | * @sht: ptr to the scsi host templ |
1218 | * @priv_size: size of private data after fc_lport | 1217 | * @priv_size: size of private data after fc_lport |
1219 | * | 1218 | * |
@@ -1225,8 +1224,8 @@ struct Scsi_Host *fcoe_host_alloc(struct scsi_host_template *sht, int priv_size) | |||
1225 | } | 1224 | } |
1226 | EXPORT_SYMBOL_GPL(fcoe_host_alloc); | 1225 | EXPORT_SYMBOL_GPL(fcoe_host_alloc); |
1227 | 1226 | ||
1228 | /* | 1227 | /** |
1229 | * fcoe_reset - resets the fcoe | 1228 | * fcoe_reset() - Resets the fcoe |
1230 | * @shost: shost the reset is from | 1229 | * @shost: shost the reset is from |
1231 | * | 1230 | * |
1232 | * Returns: always 0 | 1231 | * Returns: always 0 |
@@ -1239,8 +1238,8 @@ int fcoe_reset(struct Scsi_Host *shost) | |||
1239 | } | 1238 | } |
1240 | EXPORT_SYMBOL_GPL(fcoe_reset); | 1239 | EXPORT_SYMBOL_GPL(fcoe_reset); |
1241 | 1240 | ||
1242 | /* | 1241 | /** |
1243 | * fcoe_wwn_from_mac - converts 48-bit IEEE MAC address to 64-bit FC WWN. | 1242 | * fcoe_wwn_from_mac() - Converts 48-bit IEEE MAC address to 64-bit FC WWN. |
1244 | * @mac: mac address | 1243 | * @mac: mac address |
1245 | * @scheme: check port | 1244 | * @scheme: check port |
1246 | * @port: port indicator for converting | 1245 | * @port: port indicator for converting |
@@ -1279,8 +1278,9 @@ u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN], | |||
1279 | return wwn; | 1278 | return wwn; |
1280 | } | 1279 | } |
1281 | EXPORT_SYMBOL_GPL(fcoe_wwn_from_mac); | 1280 | EXPORT_SYMBOL_GPL(fcoe_wwn_from_mac); |
1282 | /* | 1281 | |
1283 | * fcoe_hostlist_lookup_softc - find the corresponding lport by a given device | 1282 | /** |
1283 | * fcoe_hostlist_lookup_softc() - find the corresponding lport by a given device | ||
1284 | * @device: this is currently ptr to net_device | 1284 | * @device: this is currently ptr to net_device |
1285 | * | 1285 | * |
1286 | * Returns: NULL or the located fcoe_softc | 1286 | * Returns: NULL or the located fcoe_softc |
@@ -1301,8 +1301,8 @@ static struct fcoe_softc *fcoe_hostlist_lookup_softc( | |||
1301 | return NULL; | 1301 | return NULL; |
1302 | } | 1302 | } |
1303 | 1303 | ||
1304 | /* | 1304 | /** |
1305 | * fcoe_hostlist_lookup - find the corresponding lport by netdev | 1305 | * fcoe_hostlist_lookup() - Find the corresponding lport by netdev |
1306 | * @netdev: ptr to net_device | 1306 | * @netdev: ptr to net_device |
1307 | * | 1307 | * |
1308 | * Returns: 0 for success | 1308 | * Returns: 0 for success |
@@ -1317,8 +1317,8 @@ struct fc_lport *fcoe_hostlist_lookup(const struct net_device *netdev) | |||
1317 | } | 1317 | } |
1318 | EXPORT_SYMBOL_GPL(fcoe_hostlist_lookup); | 1318 | EXPORT_SYMBOL_GPL(fcoe_hostlist_lookup); |
1319 | 1319 | ||
1320 | /* | 1320 | /** |
1321 | * fcoe_hostlist_add - add a lport to lports list | 1321 | * fcoe_hostlist_add() - Add a lport to lports list |
1322 | * @lp: ptr to the fc_lport to badded | 1322 | * @lp: ptr to the fc_lport to badded |
1323 | * | 1323 | * |
1324 | * Returns: 0 for success | 1324 | * Returns: 0 for success |
@@ -1338,8 +1338,8 @@ int fcoe_hostlist_add(const struct fc_lport *lp) | |||
1338 | } | 1338 | } |
1339 | EXPORT_SYMBOL_GPL(fcoe_hostlist_add); | 1339 | EXPORT_SYMBOL_GPL(fcoe_hostlist_add); |
1340 | 1340 | ||
1341 | /* | 1341 | /** |
1342 | * fcoe_hostlist_remove - remove a lport from lports list | 1342 | * fcoe_hostlist_remove() - remove a lport from lports list |
1343 | * @lp: ptr to the fc_lport to badded | 1343 | * @lp: ptr to the fc_lport to badded |
1344 | * | 1344 | * |
1345 | * Returns: 0 for success | 1345 | * Returns: 0 for success |
@@ -1359,12 +1359,12 @@ int fcoe_hostlist_remove(const struct fc_lport *lp) | |||
1359 | EXPORT_SYMBOL_GPL(fcoe_hostlist_remove); | 1359 | EXPORT_SYMBOL_GPL(fcoe_hostlist_remove); |
1360 | 1360 | ||
1361 | /** | 1361 | /** |
1362 | * fcoe_libfc_config - sets up libfc related properties for lport | 1362 | * fcoe_libfc_config() - sets up libfc related properties for lport |
1363 | * @lp: ptr to the fc_lport | 1363 | * @lp: ptr to the fc_lport |
1364 | * @tt: libfc function template | 1364 | * @tt: libfc function template |
1365 | * | 1365 | * |
1366 | * Returns : 0 for success | 1366 | * Returns : 0 for success |
1367 | **/ | 1367 | */ |
1368 | int fcoe_libfc_config(struct fc_lport *lp, struct libfc_function_template *tt) | 1368 | int fcoe_libfc_config(struct fc_lport *lp, struct libfc_function_template *tt) |
1369 | { | 1369 | { |
1370 | /* Set the function pointers set by the LLDD */ | 1370 | /* Set the function pointers set by the LLDD */ |
@@ -1382,14 +1382,14 @@ int fcoe_libfc_config(struct fc_lport *lp, struct libfc_function_template *tt) | |||
1382 | EXPORT_SYMBOL_GPL(fcoe_libfc_config); | 1382 | EXPORT_SYMBOL_GPL(fcoe_libfc_config); |
1383 | 1383 | ||
1384 | /** | 1384 | /** |
1385 | * fcoe_init - fcoe module loading initialization | 1385 | * fcoe_init() - fcoe module loading initialization |
1386 | * | 1386 | * |
1387 | * Initialization routine | 1387 | * Initialization routine |
1388 | * 1. Will create fc transport software structure | 1388 | * 1. Will create fc transport software structure |
1389 | * 2. initialize the link list of port information structure | 1389 | * 2. initialize the link list of port information structure |
1390 | * | 1390 | * |
1391 | * Returns 0 on success, negative on failure | 1391 | * Returns 0 on success, negative on failure |
1392 | **/ | 1392 | */ |
1393 | static int __init fcoe_init(void) | 1393 | static int __init fcoe_init(void) |
1394 | { | 1394 | { |
1395 | int cpu; | 1395 | int cpu; |
@@ -1452,10 +1452,10 @@ static int __init fcoe_init(void) | |||
1452 | module_init(fcoe_init); | 1452 | module_init(fcoe_init); |
1453 | 1453 | ||
1454 | /** | 1454 | /** |
1455 | * fcoe_exit - fcoe module unloading cleanup | 1455 | * fcoe_exit() - fcoe module unloading cleanup |
1456 | * | 1456 | * |
1457 | * Returns 0 on success, negative on failure | 1457 | * Returns 0 on success, negative on failure |
1458 | **/ | 1458 | */ |
1459 | static void __exit fcoe_exit(void) | 1459 | static void __exit fcoe_exit(void) |
1460 | { | 1460 | { |
1461 | u32 idx; | 1461 | u32 idx; |