| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 5 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 6 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 9 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 10 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 11 | | - * more details. |
|---|
| 12 | | - * |
|---|
| 13 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 14 | | - * this program; if not, write to the Free Software Foundation, Inc., |
|---|
| 15 | | - * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
|---|
| 16 | 4 | * |
|---|
| 17 | 5 | * Maintained at www.Open-FCoE.org |
|---|
| 18 | 6 | */ |
|---|
| .. | .. |
|---|
| 320 | 308 | u32 fcoe_fc_crc(struct fc_frame *fp) |
|---|
| 321 | 309 | { |
|---|
| 322 | 310 | struct sk_buff *skb = fp_skb(fp); |
|---|
| 323 | | - struct skb_frag_struct *frag; |
|---|
| 311 | + skb_frag_t *frag; |
|---|
| 324 | 312 | unsigned char *data; |
|---|
| 325 | 313 | unsigned long off, len, clen; |
|---|
| 326 | 314 | u32 crc; |
|---|
| .. | .. |
|---|
| 330 | 318 | |
|---|
| 331 | 319 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { |
|---|
| 332 | 320 | frag = &skb_shinfo(skb)->frags[i]; |
|---|
| 333 | | - off = frag->page_offset; |
|---|
| 321 | + off = skb_frag_off(frag); |
|---|
| 334 | 322 | len = skb_frag_size(frag); |
|---|
| 335 | 323 | while (len > 0) { |
|---|
| 336 | 324 | clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK)); |
|---|
| .. | .. |
|---|
| 394 | 382 | /** |
|---|
| 395 | 383 | * fcoe_check_wait_queue() - Attempt to clear the transmit backlog |
|---|
| 396 | 384 | * @lport: The local port whose backlog is to be cleared |
|---|
| 385 | + * @skb: The received FIP packet |
|---|
| 397 | 386 | * |
|---|
| 398 | 387 | * This empties the wait_queue, dequeues the head of the wait_queue queue |
|---|
| 399 | 388 | * and calls fcoe_start_io() for each packet. If all skb have been |
|---|
| .. | .. |
|---|
| 451 | 440 | |
|---|
| 452 | 441 | /** |
|---|
| 453 | 442 | * fcoe_queue_timer() - The fcoe queue timer |
|---|
| 454 | | - * @lport: The local port |
|---|
| 443 | + * @t: Timer context use to obtain the FCoE port |
|---|
| 455 | 444 | * |
|---|
| 456 | 445 | * Calls fcoe_check_wait_queue on timeout |
|---|
| 457 | 446 | */ |
|---|
| .. | .. |
|---|
| 684 | 673 | /** |
|---|
| 685 | 674 | * fcoe_netdev_map_lookup - find the fcoe transport that matches the netdev on which |
|---|
| 686 | 675 | * it was created |
|---|
| 676 | + * @netdev: The net device that the FCoE interface is on |
|---|
| 687 | 677 | * |
|---|
| 688 | 678 | * Returns : ptr to the fcoe transport that supports this netdev or NULL |
|---|
| 689 | 679 | * if not found. |
|---|
| .. | .. |
|---|
| 855 | 845 | mutex_unlock(&ft_mutex); |
|---|
| 856 | 846 | return rc; |
|---|
| 857 | 847 | } |
|---|
| 858 | | -EXPORT_SYMBOL(fcoe_ctlr_destroy_store); |
|---|
| 859 | 848 | |
|---|
| 860 | 849 | /** |
|---|
| 861 | 850 | * fcoe_transport_create() - Create a fcoe interface |
|---|