diff options
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 548c248093b8..d9688bbb9292 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -67,7 +67,7 @@ MODULE_DEVICE_TABLE(pci, ixgb_pci_tbl); | |||
67 | /* Local Function Prototypes */ | 67 | /* Local Function Prototypes */ |
68 | 68 | ||
69 | int ixgb_up(struct ixgb_adapter *adapter); | 69 | int ixgb_up(struct ixgb_adapter *adapter); |
70 | void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); | 70 | void ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog); |
71 | void ixgb_reset(struct ixgb_adapter *adapter); | 71 | void ixgb_reset(struct ixgb_adapter *adapter); |
72 | int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); | 72 | int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); |
73 | int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); | 73 | int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); |
@@ -94,14 +94,14 @@ static struct net_device_stats *ixgb_get_stats(struct net_device *netdev); | |||
94 | static int ixgb_change_mtu(struct net_device *netdev, int new_mtu); | 94 | static int ixgb_change_mtu(struct net_device *netdev, int new_mtu); |
95 | static int ixgb_set_mac(struct net_device *netdev, void *p); | 95 | static int ixgb_set_mac(struct net_device *netdev, void *p); |
96 | static irqreturn_t ixgb_intr(int irq, void *data); | 96 | static irqreturn_t ixgb_intr(int irq, void *data); |
97 | static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter); | 97 | static bool ixgb_clean_tx_irq(struct ixgb_adapter *adapter); |
98 | 98 | ||
99 | #ifdef CONFIG_IXGB_NAPI | 99 | #ifdef CONFIG_IXGB_NAPI |
100 | static int ixgb_clean(struct napi_struct *napi, int budget); | 100 | static int ixgb_clean(struct napi_struct *napi, int budget); |
101 | static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter, | 101 | static bool ixgb_clean_rx_irq(struct ixgb_adapter *adapter, |
102 | int *work_done, int work_to_do); | 102 | int *work_done, int work_to_do); |
103 | #else | 103 | #else |
104 | static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter); | 104 | static bool ixgb_clean_rx_irq(struct ixgb_adapter *adapter); |
105 | #endif | 105 | #endif |
106 | static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); | 106 | static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); |
107 | static void ixgb_tx_timeout(struct net_device *dev); | 107 | static void ixgb_tx_timeout(struct net_device *dev); |
@@ -296,7 +296,7 @@ ixgb_up(struct ixgb_adapter *adapter) | |||
296 | } | 296 | } |
297 | 297 | ||
298 | void | 298 | void |
299 | ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog) | 299 | ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog) |
300 | { | 300 | { |
301 | struct net_device *netdev = adapter->netdev; | 301 | struct net_device *netdev = adapter->netdev; |
302 | 302 | ||
@@ -662,7 +662,7 @@ ixgb_close(struct net_device *netdev) | |||
662 | { | 662 | { |
663 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 663 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
664 | 664 | ||
665 | ixgb_down(adapter, TRUE); | 665 | ixgb_down(adapter, true); |
666 | 666 | ||
667 | ixgb_free_tx_resources(adapter); | 667 | ixgb_free_tx_resources(adapter); |
668 | ixgb_free_rx_resources(adapter); | 668 | ixgb_free_rx_resources(adapter); |
@@ -887,7 +887,7 @@ ixgb_configure_rx(struct ixgb_adapter *adapter) | |||
887 | IXGB_WRITE_REG(hw, RXDCTL, rxdctl); | 887 | IXGB_WRITE_REG(hw, RXDCTL, rxdctl); |
888 | 888 | ||
889 | /* Enable Receive Checksum Offload for TCP and UDP */ | 889 | /* Enable Receive Checksum Offload for TCP and UDP */ |
890 | if(adapter->rx_csum == TRUE) { | 890 | if (adapter->rx_csum) { |
891 | rxcsum = IXGB_READ_REG(hw, RXCSUM); | 891 | rxcsum = IXGB_READ_REG(hw, RXCSUM); |
892 | rxcsum |= IXGB_RXCSUM_TUOFL; | 892 | rxcsum |= IXGB_RXCSUM_TUOFL; |
893 | IXGB_WRITE_REG(hw, RXCSUM, rxcsum); | 893 | IXGB_WRITE_REG(hw, RXCSUM, rxcsum); |
@@ -1170,7 +1170,7 @@ ixgb_watchdog(unsigned long data) | |||
1170 | } | 1170 | } |
1171 | 1171 | ||
1172 | /* Force detection of hung controller every watchdog period */ | 1172 | /* Force detection of hung controller every watchdog period */ |
1173 | adapter->detect_tx_hung = TRUE; | 1173 | adapter->detect_tx_hung = true; |
1174 | 1174 | ||
1175 | /* generate an interrupt to force clean up of any stragglers */ | 1175 | /* generate an interrupt to force clean up of any stragglers */ |
1176 | IXGB_WRITE_REG(&adapter->hw, ICS, IXGB_INT_TXDW); | 1176 | IXGB_WRITE_REG(&adapter->hw, ICS, IXGB_INT_TXDW); |
@@ -1249,7 +1249,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) | |||
1249 | return 0; | 1249 | return 0; |
1250 | } | 1250 | } |
1251 | 1251 | ||
1252 | static boolean_t | 1252 | static bool |
1253 | ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb) | 1253 | ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb) |
1254 | { | 1254 | { |
1255 | struct ixgb_context_desc *context_desc; | 1255 | struct ixgb_context_desc *context_desc; |
@@ -1281,10 +1281,10 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb) | |||
1281 | if(++i == adapter->tx_ring.count) i = 0; | 1281 | if(++i == adapter->tx_ring.count) i = 0; |
1282 | adapter->tx_ring.next_to_use = i; | 1282 | adapter->tx_ring.next_to_use = i; |
1283 | 1283 | ||
1284 | return TRUE; | 1284 | return true; |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | return FALSE; | 1287 | return false; |
1288 | } | 1288 | } |
1289 | 1289 | ||
1290 | #define IXGB_MAX_TXD_PWR 14 | 1290 | #define IXGB_MAX_TXD_PWR 14 |
@@ -1558,7 +1558,7 @@ ixgb_tx_timeout_task(struct work_struct *work) | |||
1558 | container_of(work, struct ixgb_adapter, tx_timeout_task); | 1558 | container_of(work, struct ixgb_adapter, tx_timeout_task); |
1559 | 1559 | ||
1560 | adapter->tx_timeout_count++; | 1560 | adapter->tx_timeout_count++; |
1561 | ixgb_down(adapter, TRUE); | 1561 | ixgb_down(adapter, true); |
1562 | ixgb_up(adapter); | 1562 | ixgb_up(adapter); |
1563 | } | 1563 | } |
1564 | 1564 | ||
@@ -1605,7 +1605,7 @@ ixgb_change_mtu(struct net_device *netdev, int new_mtu) | |||
1605 | netdev->mtu = new_mtu; | 1605 | netdev->mtu = new_mtu; |
1606 | 1606 | ||
1607 | if ((old_max_frame != max_frame) && netif_running(netdev)) { | 1607 | if ((old_max_frame != max_frame) && netif_running(netdev)) { |
1608 | ixgb_down(adapter, TRUE); | 1608 | ixgb_down(adapter, true); |
1609 | ixgb_up(adapter); | 1609 | ixgb_up(adapter); |
1610 | } | 1610 | } |
1611 | 1611 | ||
@@ -1822,7 +1822,7 @@ ixgb_clean(struct napi_struct *napi, int budget) | |||
1822 | * @adapter: board private structure | 1822 | * @adapter: board private structure |
1823 | **/ | 1823 | **/ |
1824 | 1824 | ||
1825 | static boolean_t | 1825 | static bool |
1826 | ixgb_clean_tx_irq(struct ixgb_adapter *adapter) | 1826 | ixgb_clean_tx_irq(struct ixgb_adapter *adapter) |
1827 | { | 1827 | { |
1828 | struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; | 1828 | struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; |
@@ -1830,7 +1830,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter) | |||
1830 | struct ixgb_tx_desc *tx_desc, *eop_desc; | 1830 | struct ixgb_tx_desc *tx_desc, *eop_desc; |
1831 | struct ixgb_buffer *buffer_info; | 1831 | struct ixgb_buffer *buffer_info; |
1832 | unsigned int i, eop; | 1832 | unsigned int i, eop; |
1833 | boolean_t cleaned = FALSE; | 1833 | bool cleaned = false; |
1834 | 1834 | ||
1835 | i = tx_ring->next_to_clean; | 1835 | i = tx_ring->next_to_clean; |
1836 | eop = tx_ring->buffer_info[i].next_to_watch; | 1836 | eop = tx_ring->buffer_info[i].next_to_watch; |
@@ -1838,7 +1838,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter) | |||
1838 | 1838 | ||
1839 | while(eop_desc->status & IXGB_TX_DESC_STATUS_DD) { | 1839 | while(eop_desc->status & IXGB_TX_DESC_STATUS_DD) { |
1840 | 1840 | ||
1841 | for(cleaned = FALSE; !cleaned; ) { | 1841 | for (cleaned = false; !cleaned; ) { |
1842 | tx_desc = IXGB_TX_DESC(*tx_ring, i); | 1842 | tx_desc = IXGB_TX_DESC(*tx_ring, i); |
1843 | buffer_info = &tx_ring->buffer_info[i]; | 1843 | buffer_info = &tx_ring->buffer_info[i]; |
1844 | 1844 | ||
@@ -1872,7 +1872,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *adapter) | |||
1872 | if(adapter->detect_tx_hung) { | 1872 | if(adapter->detect_tx_hung) { |
1873 | /* detect a transmit hang in hardware, this serializes the | 1873 | /* detect a transmit hang in hardware, this serializes the |
1874 | * check with the clearing of time_stamp and movement of i */ | 1874 | * check with the clearing of time_stamp and movement of i */ |
1875 | adapter->detect_tx_hung = FALSE; | 1875 | adapter->detect_tx_hung = false; |
1876 | if (tx_ring->buffer_info[eop].dma && | 1876 | if (tx_ring->buffer_info[eop].dma && |
1877 | time_after(jiffies, tx_ring->buffer_info[eop].time_stamp + HZ) | 1877 | time_after(jiffies, tx_ring->buffer_info[eop].time_stamp + HZ) |
1878 | && !(IXGB_READ_REG(&adapter->hw, STATUS) & | 1878 | && !(IXGB_READ_REG(&adapter->hw, STATUS) & |
@@ -1942,7 +1942,7 @@ ixgb_rx_checksum(struct ixgb_adapter *adapter, | |||
1942 | * @adapter: board private structure | 1942 | * @adapter: board private structure |
1943 | **/ | 1943 | **/ |
1944 | 1944 | ||
1945 | static boolean_t | 1945 | static bool |
1946 | #ifdef CONFIG_IXGB_NAPI | 1946 | #ifdef CONFIG_IXGB_NAPI |
1947 | ixgb_clean_rx_irq(struct ixgb_adapter *adapter, int *work_done, int work_to_do) | 1947 | ixgb_clean_rx_irq(struct ixgb_adapter *adapter, int *work_done, int work_to_do) |
1948 | #else | 1948 | #else |
@@ -1956,7 +1956,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter) | |||
1956 | struct ixgb_buffer *buffer_info, *next_buffer, *next2_buffer; | 1956 | struct ixgb_buffer *buffer_info, *next_buffer, *next2_buffer; |
1957 | uint32_t length; | 1957 | uint32_t length; |
1958 | unsigned int i, j; | 1958 | unsigned int i, j; |
1959 | boolean_t cleaned = FALSE; | 1959 | bool cleaned = false; |
1960 | 1960 | ||
1961 | i = rx_ring->next_to_clean; | 1961 | i = rx_ring->next_to_clean; |
1962 | rx_desc = IXGB_RX_DESC(*rx_ring, i); | 1962 | rx_desc = IXGB_RX_DESC(*rx_ring, i); |
@@ -1990,7 +1990,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter) | |||
1990 | next_skb = next_buffer->skb; | 1990 | next_skb = next_buffer->skb; |
1991 | prefetch(next_skb); | 1991 | prefetch(next_skb); |
1992 | 1992 | ||
1993 | cleaned = TRUE; | 1993 | cleaned = true; |
1994 | 1994 | ||
1995 | pci_unmap_single(pdev, | 1995 | pci_unmap_single(pdev, |
1996 | buffer_info->dma, | 1996 | buffer_info->dma, |
@@ -2293,7 +2293,7 @@ static pci_ers_result_t ixgb_io_error_detected (struct pci_dev *pdev, | |||
2293 | struct ixgb_adapter *adapter = netdev_priv(netdev); | 2293 | struct ixgb_adapter *adapter = netdev_priv(netdev); |
2294 | 2294 | ||
2295 | if(netif_running(netdev)) | 2295 | if(netif_running(netdev)) |
2296 | ixgb_down(adapter, TRUE); | 2296 | ixgb_down(adapter, true); |
2297 | 2297 | ||
2298 | pci_disable_device(pdev); | 2298 | pci_disable_device(pdev); |
2299 | 2299 | ||