| .. | .. |
|---|
| 9 | 9 | char ixgb_driver_name[] = "ixgb"; |
|---|
| 10 | 10 | static char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; |
|---|
| 11 | 11 | |
|---|
| 12 | | -#define DRIVERNAPI "-NAPI" |
|---|
| 13 | | -#define DRV_VERSION "1.0.135-k2" DRIVERNAPI |
|---|
| 14 | | -const char ixgb_driver_version[] = DRV_VERSION; |
|---|
| 15 | 12 | static const char ixgb_copyright[] = "Copyright (c) 1999-2008 Intel Corporation."; |
|---|
| 16 | 13 | |
|---|
| 17 | 14 | #define IXGB_CB_LENGTH 256 |
|---|
| .. | .. |
|---|
| 70 | 67 | static bool ixgb_clean_rx_irq(struct ixgb_adapter *, int *, int); |
|---|
| 71 | 68 | static void ixgb_alloc_rx_buffers(struct ixgb_adapter *, int); |
|---|
| 72 | 69 | |
|---|
| 73 | | -static void ixgb_tx_timeout(struct net_device *dev); |
|---|
| 70 | +static void ixgb_tx_timeout(struct net_device *dev, unsigned int txqueue); |
|---|
| 74 | 71 | static void ixgb_tx_timeout_task(struct work_struct *work); |
|---|
| 75 | 72 | |
|---|
| 76 | 73 | static void ixgb_vlan_strip_enable(struct ixgb_adapter *adapter); |
|---|
| .. | .. |
|---|
| 82 | 79 | static void ixgb_restore_vlan(struct ixgb_adapter *adapter); |
|---|
| 83 | 80 | |
|---|
| 84 | 81 | static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev, |
|---|
| 85 | | - enum pci_channel_state state); |
|---|
| 82 | + pci_channel_state_t state); |
|---|
| 86 | 83 | static pci_ers_result_t ixgb_io_slot_reset (struct pci_dev *pdev); |
|---|
| 87 | 84 | static void ixgb_io_resume (struct pci_dev *pdev); |
|---|
| 88 | 85 | |
|---|
| .. | .. |
|---|
| 102 | 99 | |
|---|
| 103 | 100 | MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>"); |
|---|
| 104 | 101 | MODULE_DESCRIPTION("Intel(R) PRO/10GbE Network Driver"); |
|---|
| 105 | | -MODULE_LICENSE("GPL"); |
|---|
| 106 | | -MODULE_VERSION(DRV_VERSION); |
|---|
| 102 | +MODULE_LICENSE("GPL v2"); |
|---|
| 107 | 103 | |
|---|
| 108 | 104 | #define DEFAULT_MSG_ENABLE (NETIF_MSG_DRV|NETIF_MSG_PROBE|NETIF_MSG_LINK) |
|---|
| 109 | 105 | static int debug = -1; |
|---|
| .. | .. |
|---|
| 120 | 116 | static int __init |
|---|
| 121 | 117 | ixgb_init_module(void) |
|---|
| 122 | 118 | { |
|---|
| 123 | | - pr_info("%s - version %s\n", ixgb_driver_string, ixgb_driver_version); |
|---|
| 119 | + pr_info("%s\n", ixgb_driver_string); |
|---|
| 124 | 120 | pr_info("%s\n", ixgb_copyright); |
|---|
| 125 | 121 | |
|---|
| 126 | 122 | return pci_register_driver(&ixgb_driver); |
|---|
| .. | .. |
|---|
| 412 | 408 | goto err_ioremap; |
|---|
| 413 | 409 | } |
|---|
| 414 | 410 | |
|---|
| 415 | | - for (i = BAR_1; i <= BAR_5; i++) { |
|---|
| 411 | + for (i = BAR_1; i < PCI_STD_NUM_BARS; i++) { |
|---|
| 416 | 412 | if (pci_resource_len(pdev, i) == 0) |
|---|
| 417 | 413 | continue; |
|---|
| 418 | 414 | if (pci_resource_flags(pdev, i) & IORESOURCE_IO) { |
|---|
| .. | .. |
|---|
| 680 | 676 | txdr->size = txdr->count * sizeof(struct ixgb_tx_desc); |
|---|
| 681 | 677 | txdr->size = ALIGN(txdr->size, 4096); |
|---|
| 682 | 678 | |
|---|
| 683 | | - txdr->desc = dma_zalloc_coherent(&pdev->dev, txdr->size, &txdr->dma, |
|---|
| 684 | | - GFP_KERNEL); |
|---|
| 679 | + txdr->desc = dma_alloc_coherent(&pdev->dev, txdr->size, &txdr->dma, |
|---|
| 680 | + GFP_KERNEL); |
|---|
| 685 | 681 | if (!txdr->desc) { |
|---|
| 686 | 682 | vfree(txdr->buffer_info); |
|---|
| 687 | 683 | return -ENOMEM; |
|---|
| .. | .. |
|---|
| 763 | 759 | rxdr->size = rxdr->count * sizeof(struct ixgb_rx_desc); |
|---|
| 764 | 760 | rxdr->size = ALIGN(rxdr->size, 4096); |
|---|
| 765 | 761 | |
|---|
| 766 | | - rxdr->desc = dma_zalloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma, |
|---|
| 767 | | - GFP_KERNEL); |
|---|
| 762 | + rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma, |
|---|
| 763 | + GFP_KERNEL); |
|---|
| 768 | 764 | |
|---|
| 769 | 765 | if (!rxdr->desc) { |
|---|
| 770 | 766 | vfree(rxdr->buffer_info); |
|---|
| .. | .. |
|---|
| 1113 | 1109 | |
|---|
| 1114 | 1110 | /** |
|---|
| 1115 | 1111 | * ixgb_watchdog - Timer Call-back |
|---|
| 1116 | | - * @data: pointer to netdev cast into an unsigned long |
|---|
| 1112 | + * @t: pointer to timer_list containing our private info pointer |
|---|
| 1117 | 1113 | **/ |
|---|
| 1118 | 1114 | |
|---|
| 1119 | 1115 | static void |
|---|
| .. | .. |
|---|
| 1331 | 1327 | } |
|---|
| 1332 | 1328 | |
|---|
| 1333 | 1329 | for (f = 0; f < nr_frags; f++) { |
|---|
| 1334 | | - const struct skb_frag_struct *frag; |
|---|
| 1335 | | - |
|---|
| 1336 | | - frag = &skb_shinfo(skb)->frags[f]; |
|---|
| 1330 | + const skb_frag_t *frag = &skb_shinfo(skb)->frags[f]; |
|---|
| 1337 | 1331 | len = skb_frag_size(frag); |
|---|
| 1338 | 1332 | offset = 0; |
|---|
| 1339 | 1333 | |
|---|
| .. | .. |
|---|
| 1537 | 1531 | /** |
|---|
| 1538 | 1532 | * ixgb_tx_timeout - Respond to a Tx Hang |
|---|
| 1539 | 1533 | * @netdev: network interface device structure |
|---|
| 1534 | + * @txqueue: queue hanging (unused) |
|---|
| 1540 | 1535 | **/ |
|---|
| 1541 | 1536 | |
|---|
| 1542 | 1537 | static void |
|---|
| 1543 | | -ixgb_tx_timeout(struct net_device *netdev) |
|---|
| 1538 | +ixgb_tx_timeout(struct net_device *netdev, unsigned int __always_unused txqueue) |
|---|
| 1544 | 1539 | { |
|---|
| 1545 | 1540 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
|---|
| 1546 | 1541 | |
|---|
| .. | .. |
|---|
| 1752 | 1747 | |
|---|
| 1753 | 1748 | /** |
|---|
| 1754 | 1749 | * ixgb_clean - NAPI Rx polling callback |
|---|
| 1755 | | - * @adapter: board private structure |
|---|
| 1750 | + * @napi: napi struct pointer |
|---|
| 1751 | + * @budget: max number of receives to clean |
|---|
| 1756 | 1752 | **/ |
|---|
| 1757 | 1753 | |
|---|
| 1758 | 1754 | static int |
|---|
| .. | .. |
|---|
| 1871 | 1867 | * ixgb_rx_checksum - Receive Checksum Offload for 82597. |
|---|
| 1872 | 1868 | * @adapter: board private structure |
|---|
| 1873 | 1869 | * @rx_desc: receive descriptor |
|---|
| 1874 | | - * @sk_buff: socket buffer with received data |
|---|
| 1870 | + * @skb: socket buffer with received data |
|---|
| 1875 | 1871 | **/ |
|---|
| 1876 | 1872 | |
|---|
| 1877 | 1873 | static void |
|---|
| .. | .. |
|---|
| 1929 | 1925 | /** |
|---|
| 1930 | 1926 | * ixgb_clean_rx_irq - Send received data up the network stack, |
|---|
| 1931 | 1927 | * @adapter: board private structure |
|---|
| 1928 | + * @work_done: output pointer to amount of packets cleaned |
|---|
| 1929 | + * @work_to_do: how much work we can complete |
|---|
| 1932 | 1930 | **/ |
|---|
| 1933 | 1931 | |
|---|
| 1934 | 1932 | static bool |
|---|
| .. | .. |
|---|
| 2048 | 2046 | /** |
|---|
| 2049 | 2047 | * ixgb_alloc_rx_buffers - Replace used receive buffers |
|---|
| 2050 | 2048 | * @adapter: address of board private structure |
|---|
| 2049 | + * @cleaned_count: how many buffers to allocate |
|---|
| 2051 | 2050 | **/ |
|---|
| 2052 | 2051 | |
|---|
| 2053 | 2052 | static void |
|---|
| .. | .. |
|---|
| 2196 | 2195 | * a PCI bus error is detected. |
|---|
| 2197 | 2196 | */ |
|---|
| 2198 | 2197 | static pci_ers_result_t ixgb_io_error_detected(struct pci_dev *pdev, |
|---|
| 2199 | | - enum pci_channel_state state) |
|---|
| 2198 | + pci_channel_state_t state) |
|---|
| 2200 | 2199 | { |
|---|
| 2201 | 2200 | struct net_device *netdev = pci_get_drvdata(pdev); |
|---|
| 2202 | 2201 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
|---|
| .. | .. |
|---|
| 2217 | 2216 | |
|---|
| 2218 | 2217 | /** |
|---|
| 2219 | 2218 | * ixgb_io_slot_reset - called after the pci bus has been reset. |
|---|
| 2220 | | - * @pdev pointer to pci device with error |
|---|
| 2219 | + * @pdev: pointer to pci device with error |
|---|
| 2221 | 2220 | * |
|---|
| 2222 | 2221 | * This callback is called after the PCI bus has been reset. |
|---|
| 2223 | 2222 | * Basically, this tries to restart the card from scratch. |
|---|
| .. | .. |
|---|
| 2265 | 2264 | |
|---|
| 2266 | 2265 | /** |
|---|
| 2267 | 2266 | * ixgb_io_resume - called when its OK to resume normal operations |
|---|
| 2268 | | - * @pdev pointer to pci device with error |
|---|
| 2267 | + * @pdev: pointer to pci device with error |
|---|
| 2269 | 2268 | * |
|---|
| 2270 | 2269 | * The error recovery driver tells us that its OK to resume |
|---|
| 2271 | 2270 | * normal operation. Implementation resembles the second-half |
|---|