diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ixgb/ixgb.h | 8 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_ee.c | 50 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_ee.h | 2 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_ethtool.c | 10 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_hw.c | 57 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_hw.h | 18 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 44 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_osdep.h | 7 |
8 files changed, 94 insertions, 102 deletions
diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h index 0078136643f3..fad4e9924a8f 100644 --- a/drivers/net/ixgb/ixgb.h +++ b/drivers/net/ixgb/ixgb.h | |||
@@ -173,15 +173,15 @@ struct ixgb_adapter { | |||
173 | uint64_t hw_csum_tx_error; | 173 | uint64_t hw_csum_tx_error; |
174 | uint32_t tx_int_delay; | 174 | uint32_t tx_int_delay; |
175 | uint32_t tx_timeout_count; | 175 | uint32_t tx_timeout_count; |
176 | boolean_t tx_int_delay_enable; | 176 | bool tx_int_delay_enable; |
177 | boolean_t detect_tx_hung; | 177 | bool detect_tx_hung; |
178 | 178 | ||
179 | /* RX */ | 179 | /* RX */ |
180 | struct ixgb_desc_ring rx_ring; | 180 | struct ixgb_desc_ring rx_ring; |
181 | uint64_t hw_csum_rx_error; | 181 | uint64_t hw_csum_rx_error; |
182 | uint64_t hw_csum_rx_good; | 182 | uint64_t hw_csum_rx_good; |
183 | uint32_t rx_int_delay; | 183 | uint32_t rx_int_delay; |
184 | boolean_t rx_csum; | 184 | bool rx_csum; |
185 | 185 | ||
186 | /* OS defined structs */ | 186 | /* OS defined structs */ |
187 | struct napi_struct napi; | 187 | struct napi_struct napi; |
@@ -194,7 +194,7 @@ struct ixgb_adapter { | |||
194 | u16 msg_enable; | 194 | u16 msg_enable; |
195 | struct ixgb_hw_stats stats; | 195 | struct ixgb_hw_stats stats; |
196 | uint32_t alloc_rx_buff_failed; | 196 | uint32_t alloc_rx_buff_failed; |
197 | boolean_t have_msi; | 197 | bool have_msi; |
198 | unsigned long flags; | 198 | unsigned long flags; |
199 | }; | 199 | }; |
200 | 200 | ||
diff --git a/drivers/net/ixgb/ixgb_ee.c b/drivers/net/ixgb/ixgb_ee.c index e8eb0fd6c576..8e9302fc8865 100644 --- a/drivers/net/ixgb/ixgb_ee.c +++ b/drivers/net/ixgb/ixgb_ee.c | |||
@@ -36,7 +36,7 @@ static void ixgb_shift_out_bits(struct ixgb_hw *hw, | |||
36 | uint16_t count); | 36 | uint16_t count); |
37 | static void ixgb_standby_eeprom(struct ixgb_hw *hw); | 37 | static void ixgb_standby_eeprom(struct ixgb_hw *hw); |
38 | 38 | ||
39 | static boolean_t ixgb_wait_eeprom_command(struct ixgb_hw *hw); | 39 | static bool ixgb_wait_eeprom_command(struct ixgb_hw *hw); |
40 | 40 | ||
41 | static void ixgb_cleanup_eeprom(struct ixgb_hw *hw); | 41 | static void ixgb_cleanup_eeprom(struct ixgb_hw *hw); |
42 | 42 | ||
@@ -279,10 +279,10 @@ ixgb_cleanup_eeprom(struct ixgb_hw *hw) | |||
279 | * The command is done when the EEPROM's data out pin goes high. | 279 | * The command is done when the EEPROM's data out pin goes high. |
280 | * | 280 | * |
281 | * Returns: | 281 | * Returns: |
282 | * TRUE: EEPROM data pin is high before timeout. | 282 | * true: EEPROM data pin is high before timeout. |
283 | * FALSE: Time expired. | 283 | * false: Time expired. |
284 | *****************************************************************************/ | 284 | *****************************************************************************/ |
285 | static boolean_t | 285 | static bool |
286 | ixgb_wait_eeprom_command(struct ixgb_hw *hw) | 286 | ixgb_wait_eeprom_command(struct ixgb_hw *hw) |
287 | { | 287 | { |
288 | uint32_t eecd_reg; | 288 | uint32_t eecd_reg; |
@@ -301,12 +301,12 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw) | |||
301 | eecd_reg = IXGB_READ_REG(hw, EECD); | 301 | eecd_reg = IXGB_READ_REG(hw, EECD); |
302 | 302 | ||
303 | if(eecd_reg & IXGB_EECD_DO) | 303 | if(eecd_reg & IXGB_EECD_DO) |
304 | return (TRUE); | 304 | return (true); |
305 | 305 | ||
306 | udelay(50); | 306 | udelay(50); |
307 | } | 307 | } |
308 | ASSERT(0); | 308 | ASSERT(0); |
309 | return (FALSE); | 309 | return (false); |
310 | } | 310 | } |
311 | 311 | ||
312 | /****************************************************************************** | 312 | /****************************************************************************** |
@@ -319,10 +319,10 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw) | |||
319 | * valid. | 319 | * valid. |
320 | * | 320 | * |
321 | * Returns: | 321 | * Returns: |
322 | * TRUE: Checksum is valid | 322 | * true: Checksum is valid |
323 | * FALSE: Checksum is not valid. | 323 | * false: Checksum is not valid. |
324 | *****************************************************************************/ | 324 | *****************************************************************************/ |
325 | boolean_t | 325 | bool |
326 | ixgb_validate_eeprom_checksum(struct ixgb_hw *hw) | 326 | ixgb_validate_eeprom_checksum(struct ixgb_hw *hw) |
327 | { | 327 | { |
328 | uint16_t checksum = 0; | 328 | uint16_t checksum = 0; |
@@ -332,9 +332,9 @@ ixgb_validate_eeprom_checksum(struct ixgb_hw *hw) | |||
332 | checksum += ixgb_read_eeprom(hw, i); | 332 | checksum += ixgb_read_eeprom(hw, i); |
333 | 333 | ||
334 | if(checksum == (uint16_t) EEPROM_SUM) | 334 | if(checksum == (uint16_t) EEPROM_SUM) |
335 | return (TRUE); | 335 | return (true); |
336 | else | 336 | else |
337 | return (FALSE); | 337 | return (false); |
338 | } | 338 | } |
339 | 339 | ||
340 | /****************************************************************************** | 340 | /****************************************************************************** |
@@ -457,10 +457,10 @@ ixgb_read_eeprom(struct ixgb_hw *hw, | |||
457 | * hw - Struct containing variables accessed by shared code | 457 | * hw - Struct containing variables accessed by shared code |
458 | * | 458 | * |
459 | * Returns: | 459 | * Returns: |
460 | * TRUE: if eeprom read is successful | 460 | * true: if eeprom read is successful |
461 | * FALSE: otherwise. | 461 | * false: otherwise. |
462 | *****************************************************************************/ | 462 | *****************************************************************************/ |
463 | boolean_t | 463 | bool |
464 | ixgb_get_eeprom_data(struct ixgb_hw *hw) | 464 | ixgb_get_eeprom_data(struct ixgb_hw *hw) |
465 | { | 465 | { |
466 | uint16_t i; | 466 | uint16_t i; |
@@ -484,16 +484,16 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw) | |||
484 | /* clear the init_ctrl_reg_1 to signify that the cache is | 484 | /* clear the init_ctrl_reg_1 to signify that the cache is |
485 | * invalidated */ | 485 | * invalidated */ |
486 | ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR); | 486 | ee_map->init_ctrl_reg_1 = cpu_to_le16(EEPROM_ICW1_SIGNATURE_CLEAR); |
487 | return (FALSE); | 487 | return (false); |
488 | } | 488 | } |
489 | 489 | ||
490 | if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) | 490 | if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) |
491 | != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { | 491 | != cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { |
492 | DEBUGOUT("ixgb_ee: Signature invalid.\n"); | 492 | DEBUGOUT("ixgb_ee: Signature invalid.\n"); |
493 | return(FALSE); | 493 | return(false); |
494 | } | 494 | } |
495 | 495 | ||
496 | return(TRUE); | 496 | return(true); |
497 | } | 497 | } |
498 | 498 | ||
499 | /****************************************************************************** | 499 | /****************************************************************************** |
@@ -503,17 +503,17 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw) | |||
503 | * hw - Struct containing variables accessed by shared code | 503 | * hw - Struct containing variables accessed by shared code |
504 | * | 504 | * |
505 | * Returns: | 505 | * Returns: |
506 | * TRUE: eeprom signature was good and the eeprom read was successful | 506 | * true: eeprom signature was good and the eeprom read was successful |
507 | * FALSE: otherwise. | 507 | * false: otherwise. |
508 | ******************************************************************************/ | 508 | ******************************************************************************/ |
509 | static boolean_t | 509 | static bool |
510 | ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw) | 510 | ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw) |
511 | { | 511 | { |
512 | struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; | 512 | struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; |
513 | 513 | ||
514 | if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) | 514 | if ((ee_map->init_ctrl_reg_1 & cpu_to_le16(EEPROM_ICW1_SIGNATURE_MASK)) |
515 | == cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { | 515 | == cpu_to_le16(EEPROM_ICW1_SIGNATURE_VALID)) { |
516 | return (TRUE); | 516 | return (true); |
517 | } else { | 517 | } else { |
518 | return ixgb_get_eeprom_data(hw); | 518 | return ixgb_get_eeprom_data(hw); |
519 | } | 519 | } |
@@ -533,7 +533,7 @@ ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index) | |||
533 | { | 533 | { |
534 | 534 | ||
535 | if ((index < IXGB_EEPROM_SIZE) && | 535 | if ((index < IXGB_EEPROM_SIZE) && |
536 | (ixgb_check_and_get_eeprom_data(hw) == TRUE)) { | 536 | (ixgb_check_and_get_eeprom_data(hw) == true)) { |
537 | return(hw->eeprom[index]); | 537 | return(hw->eeprom[index]); |
538 | } | 538 | } |
539 | 539 | ||
@@ -557,7 +557,7 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw, | |||
557 | 557 | ||
558 | DEBUGFUNC("ixgb_get_ee_mac_addr"); | 558 | DEBUGFUNC("ixgb_get_ee_mac_addr"); |
559 | 559 | ||
560 | if (ixgb_check_and_get_eeprom_data(hw) == TRUE) { | 560 | if (ixgb_check_and_get_eeprom_data(hw) == true) { |
561 | for (i = 0; i < IXGB_ETH_LENGTH_OF_ADDRESS; i++) { | 561 | for (i = 0; i < IXGB_ETH_LENGTH_OF_ADDRESS; i++) { |
562 | mac_addr[i] = ee_map->mac_addr[i]; | 562 | mac_addr[i] = ee_map->mac_addr[i]; |
563 | DEBUGOUT2("mac(%d) = %.2X\n", i, mac_addr[i]); | 563 | DEBUGOUT2("mac(%d) = %.2X\n", i, mac_addr[i]); |
@@ -577,7 +577,7 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw, | |||
577 | uint32_t | 577 | uint32_t |
578 | ixgb_get_ee_pba_number(struct ixgb_hw *hw) | 578 | ixgb_get_ee_pba_number(struct ixgb_hw *hw) |
579 | { | 579 | { |
580 | if(ixgb_check_and_get_eeprom_data(hw) == TRUE) | 580 | if (ixgb_check_and_get_eeprom_data(hw) == true) |
581 | return (le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) | 581 | return (le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) |
582 | | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16)); | 582 | | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16)); |
583 | 583 | ||
@@ -598,7 +598,7 @@ ixgb_get_ee_device_id(struct ixgb_hw *hw) | |||
598 | { | 598 | { |
599 | struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; | 599 | struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; |
600 | 600 | ||
601 | if(ixgb_check_and_get_eeprom_data(hw) == TRUE) | 601 | if (ixgb_check_and_get_eeprom_data(hw) == true) |
602 | return (le16_to_cpu(ee_map->device_id)); | 602 | return (le16_to_cpu(ee_map->device_id)); |
603 | 603 | ||
604 | return (0); | 604 | return (0); |
diff --git a/drivers/net/ixgb/ixgb_ee.h b/drivers/net/ixgb/ixgb_ee.h index 7908bf3005ed..da62f58276fa 100644 --- a/drivers/net/ixgb/ixgb_ee.h +++ b/drivers/net/ixgb/ixgb_ee.h | |||
@@ -97,7 +97,7 @@ struct ixgb_ee_map_type { | |||
97 | /* EEPROM Functions */ | 97 | /* EEPROM Functions */ |
98 | uint16_t ixgb_read_eeprom(struct ixgb_hw *hw, uint16_t reg); | 98 | uint16_t ixgb_read_eeprom(struct ixgb_hw *hw, uint16_t reg); |
99 | 99 | ||
100 | boolean_t ixgb_validate_eeprom_checksum(struct ixgb_hw *hw); | 100 | bool ixgb_validate_eeprom_checksum(struct ixgb_hw *hw); |
101 | 101 | ||
102 | void ixgb_update_eeprom_checksum(struct ixgb_hw *hw); | 102 | void ixgb_update_eeprom_checksum(struct ixgb_hw *hw); |
103 | 103 | ||
diff --git a/drivers/net/ixgb/ixgb_ethtool.c b/drivers/net/ixgb/ixgb_ethtool.c index 75f3a68ee354..5d61c2e210fe 100644 --- a/drivers/net/ixgb/ixgb_ethtool.c +++ b/drivers/net/ixgb/ixgb_ethtool.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
34 | 34 | ||
35 | extern int ixgb_up(struct ixgb_adapter *adapter); | 35 | extern int ixgb_up(struct ixgb_adapter *adapter); |
36 | extern void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); | 36 | extern void ixgb_down(struct ixgb_adapter *adapter, bool kill_watchdog); |
37 | extern void ixgb_reset(struct ixgb_adapter *adapter); | 37 | extern void ixgb_reset(struct ixgb_adapter *adapter); |
38 | extern int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); | 38 | extern int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); |
39 | extern int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); | 39 | extern int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); |
@@ -136,7 +136,7 @@ ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) | |||
136 | return -EINVAL; | 136 | return -EINVAL; |
137 | 137 | ||
138 | if(netif_running(adapter->netdev)) { | 138 | if(netif_running(adapter->netdev)) { |
139 | ixgb_down(adapter, TRUE); | 139 | ixgb_down(adapter, true); |
140 | ixgb_reset(adapter); | 140 | ixgb_reset(adapter); |
141 | ixgb_up(adapter); | 141 | ixgb_up(adapter); |
142 | ixgb_set_speed_duplex(netdev); | 142 | ixgb_set_speed_duplex(netdev); |
@@ -185,7 +185,7 @@ ixgb_set_pauseparam(struct net_device *netdev, | |||
185 | hw->fc.type = ixgb_fc_none; | 185 | hw->fc.type = ixgb_fc_none; |
186 | 186 | ||
187 | if(netif_running(adapter->netdev)) { | 187 | if(netif_running(adapter->netdev)) { |
188 | ixgb_down(adapter, TRUE); | 188 | ixgb_down(adapter, true); |
189 | ixgb_up(adapter); | 189 | ixgb_up(adapter); |
190 | ixgb_set_speed_duplex(netdev); | 190 | ixgb_set_speed_duplex(netdev); |
191 | } else | 191 | } else |
@@ -210,7 +210,7 @@ ixgb_set_rx_csum(struct net_device *netdev, uint32_t data) | |||
210 | adapter->rx_csum = data; | 210 | adapter->rx_csum = data; |
211 | 211 | ||
212 | if(netif_running(netdev)) { | 212 | if(netif_running(netdev)) { |
213 | ixgb_down(adapter,TRUE); | 213 | ixgb_down(adapter, true); |
214 | ixgb_up(adapter); | 214 | ixgb_up(adapter); |
215 | ixgb_set_speed_duplex(netdev); | 215 | ixgb_set_speed_duplex(netdev); |
216 | } else | 216 | } else |
@@ -570,7 +570,7 @@ ixgb_set_ringparam(struct net_device *netdev, | |||
570 | return -EINVAL; | 570 | return -EINVAL; |
571 | 571 | ||
572 | if(netif_running(adapter->netdev)) | 572 | if(netif_running(adapter->netdev)) |
573 | ixgb_down(adapter,TRUE); | 573 | ixgb_down(adapter, true); |
574 | 574 | ||
575 | rxdr->count = max(ring->rx_pending,(uint32_t)MIN_RXD); | 575 | rxdr->count = max(ring->rx_pending,(uint32_t)MIN_RXD); |
576 | rxdr->count = min(rxdr->count,(uint32_t)MAX_RXD); | 576 | rxdr->count = min(rxdr->count,(uint32_t)MAX_RXD); |
diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c index 80a8b9888225..8a04bbd258a6 100644 --- a/drivers/net/ixgb/ixgb_hw.c +++ b/drivers/net/ixgb/ixgb_hw.c | |||
@@ -41,7 +41,7 @@ static void ixgb_mta_set(struct ixgb_hw *hw, uint32_t hash_value); | |||
41 | 41 | ||
42 | static void ixgb_get_bus_info(struct ixgb_hw *hw); | 42 | static void ixgb_get_bus_info(struct ixgb_hw *hw); |
43 | 43 | ||
44 | static boolean_t ixgb_link_reset(struct ixgb_hw *hw); | 44 | static bool ixgb_link_reset(struct ixgb_hw *hw); |
45 | 45 | ||
46 | static void ixgb_optics_reset(struct ixgb_hw *hw); | 46 | static void ixgb_optics_reset(struct ixgb_hw *hw); |
47 | 47 | ||
@@ -60,9 +60,9 @@ static uint16_t ixgb_read_phy_reg(struct ixgb_hw *hw, | |||
60 | uint32_t phy_address, | 60 | uint32_t phy_address, |
61 | uint32_t device_type); | 61 | uint32_t device_type); |
62 | 62 | ||
63 | static boolean_t ixgb_setup_fc(struct ixgb_hw *hw); | 63 | static bool ixgb_setup_fc(struct ixgb_hw *hw); |
64 | 64 | ||
65 | static boolean_t mac_addr_valid(uint8_t *mac_addr); | 65 | static bool mac_addr_valid(uint8_t *mac_addr); |
66 | 66 | ||
67 | static uint32_t ixgb_mac_reset(struct ixgb_hw *hw) | 67 | static uint32_t ixgb_mac_reset(struct ixgb_hw *hw) |
68 | { | 68 | { |
@@ -114,7 +114,7 @@ static uint32_t ixgb_mac_reset(struct ixgb_hw *hw) | |||
114 | * | 114 | * |
115 | * hw - Struct containing variables accessed by shared code | 115 | * hw - Struct containing variables accessed by shared code |
116 | *****************************************************************************/ | 116 | *****************************************************************************/ |
117 | boolean_t | 117 | bool |
118 | ixgb_adapter_stop(struct ixgb_hw *hw) | 118 | ixgb_adapter_stop(struct ixgb_hw *hw) |
119 | { | 119 | { |
120 | uint32_t ctrl_reg; | 120 | uint32_t ctrl_reg; |
@@ -127,13 +127,13 @@ ixgb_adapter_stop(struct ixgb_hw *hw) | |||
127 | */ | 127 | */ |
128 | if(hw->adapter_stopped) { | 128 | if(hw->adapter_stopped) { |
129 | DEBUGOUT("Exiting because the adapter is already stopped!!!\n"); | 129 | DEBUGOUT("Exiting because the adapter is already stopped!!!\n"); |
130 | return FALSE; | 130 | return false; |
131 | } | 131 | } |
132 | 132 | ||
133 | /* Set the Adapter Stopped flag so other driver functions stop | 133 | /* Set the Adapter Stopped flag so other driver functions stop |
134 | * touching the Hardware. | 134 | * touching the Hardware. |
135 | */ | 135 | */ |
136 | hw->adapter_stopped = TRUE; | 136 | hw->adapter_stopped = true; |
137 | 137 | ||
138 | /* Clear interrupt mask to stop board from generating interrupts */ | 138 | /* Clear interrupt mask to stop board from generating interrupts */ |
139 | DEBUGOUT("Masking off all interrupts\n"); | 139 | DEBUGOUT("Masking off all interrupts\n"); |
@@ -286,15 +286,15 @@ ixgb_identify_phy(struct ixgb_hw *hw) | |||
286 | * Leaves the transmit and receive units disabled and uninitialized. | 286 | * Leaves the transmit and receive units disabled and uninitialized. |
287 | * | 287 | * |
288 | * Returns: | 288 | * Returns: |
289 | * TRUE if successful, | 289 | * true if successful, |
290 | * FALSE if unrecoverable problems were encountered. | 290 | * false if unrecoverable problems were encountered. |
291 | *****************************************************************************/ | 291 | *****************************************************************************/ |
292 | boolean_t | 292 | bool |
293 | ixgb_init_hw(struct ixgb_hw *hw) | 293 | ixgb_init_hw(struct ixgb_hw *hw) |
294 | { | 294 | { |
295 | uint32_t i; | 295 | uint32_t i; |
296 | uint32_t ctrl_reg; | 296 | uint32_t ctrl_reg; |
297 | boolean_t status; | 297 | bool status; |
298 | 298 | ||
299 | DEBUGFUNC("ixgb_init_hw"); | 299 | DEBUGFUNC("ixgb_init_hw"); |
300 | 300 | ||
@@ -318,9 +318,8 @@ ixgb_init_hw(struct ixgb_hw *hw) | |||
318 | /* Delay a few ms just to allow the reset to complete */ | 318 | /* Delay a few ms just to allow the reset to complete */ |
319 | msleep(IXGB_DELAY_AFTER_EE_RESET); | 319 | msleep(IXGB_DELAY_AFTER_EE_RESET); |
320 | 320 | ||
321 | if (ixgb_get_eeprom_data(hw) == FALSE) { | 321 | if (!ixgb_get_eeprom_data(hw)) |
322 | return(FALSE); | 322 | return false; |
323 | } | ||
324 | 323 | ||
325 | /* Use the device id to determine the type of phy/transceiver. */ | 324 | /* Use the device id to determine the type of phy/transceiver. */ |
326 | hw->device_id = ixgb_get_ee_device_id(hw); | 325 | hw->device_id = ixgb_get_ee_device_id(hw); |
@@ -337,11 +336,11 @@ ixgb_init_hw(struct ixgb_hw *hw) | |||
337 | */ | 336 | */ |
338 | if (!mac_addr_valid(hw->curr_mac_addr)) { | 337 | if (!mac_addr_valid(hw->curr_mac_addr)) { |
339 | DEBUGOUT("MAC address invalid after ixgb_init_rx_addrs\n"); | 338 | DEBUGOUT("MAC address invalid after ixgb_init_rx_addrs\n"); |
340 | return(FALSE); | 339 | return(false); |
341 | } | 340 | } |
342 | 341 | ||
343 | /* tell the routines in this file they can access hardware again */ | 342 | /* tell the routines in this file they can access hardware again */ |
344 | hw->adapter_stopped = FALSE; | 343 | hw->adapter_stopped = false; |
345 | 344 | ||
346 | /* Fill in the bus_info structure */ | 345 | /* Fill in the bus_info structure */ |
347 | ixgb_get_bus_info(hw); | 346 | ixgb_get_bus_info(hw); |
@@ -661,12 +660,12 @@ ixgb_clear_vfta(struct ixgb_hw *hw) | |||
661 | * hw - Struct containing variables accessed by shared code | 660 | * hw - Struct containing variables accessed by shared code |
662 | *****************************************************************************/ | 661 | *****************************************************************************/ |
663 | 662 | ||
664 | static boolean_t | 663 | static bool |
665 | ixgb_setup_fc(struct ixgb_hw *hw) | 664 | ixgb_setup_fc(struct ixgb_hw *hw) |
666 | { | 665 | { |
667 | uint32_t ctrl_reg; | 666 | uint32_t ctrl_reg; |
668 | uint32_t pap_reg = 0; /* by default, assume no pause time */ | 667 | uint32_t pap_reg = 0; /* by default, assume no pause time */ |
669 | boolean_t status = TRUE; | 668 | bool status = true; |
670 | 669 | ||
671 | DEBUGFUNC("ixgb_setup_fc"); | 670 | DEBUGFUNC("ixgb_setup_fc"); |
672 | 671 | ||
@@ -950,7 +949,7 @@ ixgb_check_for_link(struct ixgb_hw *hw) | |||
950 | 949 | ||
951 | if ((xpcss_reg & IXGB_XPCSS_ALIGN_STATUS) && | 950 | if ((xpcss_reg & IXGB_XPCSS_ALIGN_STATUS) && |
952 | (status_reg & IXGB_STATUS_LU)) { | 951 | (status_reg & IXGB_STATUS_LU)) { |
953 | hw->link_up = TRUE; | 952 | hw->link_up = true; |
954 | } else if (!(xpcss_reg & IXGB_XPCSS_ALIGN_STATUS) && | 953 | } else if (!(xpcss_reg & IXGB_XPCSS_ALIGN_STATUS) && |
955 | (status_reg & IXGB_STATUS_LU)) { | 954 | (status_reg & IXGB_STATUS_LU)) { |
956 | DEBUGOUT("XPCSS Not Aligned while Status:LU is set.\n"); | 955 | DEBUGOUT("XPCSS Not Aligned while Status:LU is set.\n"); |
@@ -974,10 +973,10 @@ ixgb_check_for_link(struct ixgb_hw *hw) | |||
974 | * | 973 | * |
975 | * Called by any function that needs to check the link status of the adapter. | 974 | * Called by any function that needs to check the link status of the adapter. |
976 | *****************************************************************************/ | 975 | *****************************************************************************/ |
977 | boolean_t ixgb_check_for_bad_link(struct ixgb_hw *hw) | 976 | bool ixgb_check_for_bad_link(struct ixgb_hw *hw) |
978 | { | 977 | { |
979 | uint32_t newLFC, newRFC; | 978 | uint32_t newLFC, newRFC; |
980 | boolean_t bad_link_returncode = FALSE; | 979 | bool bad_link_returncode = false; |
981 | 980 | ||
982 | if (hw->phy_type == ixgb_phy_type_txn17401) { | 981 | if (hw->phy_type == ixgb_phy_type_txn17401) { |
983 | newLFC = IXGB_READ_REG(hw, LFC); | 982 | newLFC = IXGB_READ_REG(hw, LFC); |
@@ -986,7 +985,7 @@ boolean_t ixgb_check_for_bad_link(struct ixgb_hw *hw) | |||
986 | || (hw->lastRFC + 250 < newRFC)) { | 985 | || (hw->lastRFC + 250 < newRFC)) { |
987 | DEBUGOUT | 986 | DEBUGOUT |
988 | ("BAD LINK! too many LFC/RFC since last check\n"); | 987 | ("BAD LINK! too many LFC/RFC since last check\n"); |
989 | bad_link_returncode = TRUE; | 988 | bad_link_returncode = true; |
990 | } | 989 | } |
991 | hw->lastLFC = newLFC; | 990 | hw->lastLFC = newLFC; |
992 | hw->lastRFC = newRFC; | 991 | hw->lastRFC = newRFC; |
@@ -1155,21 +1154,21 @@ ixgb_get_bus_info(struct ixgb_hw *hw) | |||
1155 | * mac_addr - pointer to MAC address. | 1154 | * mac_addr - pointer to MAC address. |
1156 | * | 1155 | * |
1157 | *****************************************************************************/ | 1156 | *****************************************************************************/ |
1158 | static boolean_t | 1157 | static bool |
1159 | mac_addr_valid(uint8_t *mac_addr) | 1158 | mac_addr_valid(uint8_t *mac_addr) |
1160 | { | 1159 | { |
1161 | boolean_t is_valid = TRUE; | 1160 | bool is_valid = true; |
1162 | DEBUGFUNC("mac_addr_valid"); | 1161 | DEBUGFUNC("mac_addr_valid"); |
1163 | 1162 | ||
1164 | /* Make sure it is not a multicast address */ | 1163 | /* Make sure it is not a multicast address */ |
1165 | if (IS_MULTICAST(mac_addr)) { | 1164 | if (IS_MULTICAST(mac_addr)) { |
1166 | DEBUGOUT("MAC address is multicast\n"); | 1165 | DEBUGOUT("MAC address is multicast\n"); |
1167 | is_valid = FALSE; | 1166 | is_valid = false; |
1168 | } | 1167 | } |
1169 | /* Not a broadcast address */ | 1168 | /* Not a broadcast address */ |
1170 | else if (IS_BROADCAST(mac_addr)) { | 1169 | else if (IS_BROADCAST(mac_addr)) { |
1171 | DEBUGOUT("MAC address is broadcast\n"); | 1170 | DEBUGOUT("MAC address is broadcast\n"); |
1172 | is_valid = FALSE; | 1171 | is_valid = false; |
1173 | } | 1172 | } |
1174 | /* Reject the zero address */ | 1173 | /* Reject the zero address */ |
1175 | else if (mac_addr[0] == 0 && | 1174 | else if (mac_addr[0] == 0 && |
@@ -1179,7 +1178,7 @@ mac_addr_valid(uint8_t *mac_addr) | |||
1179 | mac_addr[4] == 0 && | 1178 | mac_addr[4] == 0 && |
1180 | mac_addr[5] == 0) { | 1179 | mac_addr[5] == 0) { |
1181 | DEBUGOUT("MAC address is all zeros\n"); | 1180 | DEBUGOUT("MAC address is all zeros\n"); |
1182 | is_valid = FALSE; | 1181 | is_valid = false; |
1183 | } | 1182 | } |
1184 | return (is_valid); | 1183 | return (is_valid); |
1185 | } | 1184 | } |
@@ -1190,10 +1189,10 @@ mac_addr_valid(uint8_t *mac_addr) | |||
1190 | * | 1189 | * |
1191 | * hw - Struct containing variables accessed by shared code | 1190 | * hw - Struct containing variables accessed by shared code |
1192 | *****************************************************************************/ | 1191 | *****************************************************************************/ |
1193 | static boolean_t | 1192 | static bool |
1194 | ixgb_link_reset(struct ixgb_hw *hw) | 1193 | ixgb_link_reset(struct ixgb_hw *hw) |
1195 | { | 1194 | { |
1196 | boolean_t link_status = FALSE; | 1195 | bool link_status = false; |
1197 | uint8_t wait_retries = MAX_RESET_ITERATIONS; | 1196 | uint8_t wait_retries = MAX_RESET_ITERATIONS; |
1198 | uint8_t lrst_retries = MAX_RESET_ITERATIONS; | 1197 | uint8_t lrst_retries = MAX_RESET_ITERATIONS; |
1199 | 1198 | ||
@@ -1208,7 +1207,7 @@ ixgb_link_reset(struct ixgb_hw *hw) | |||
1208 | link_status = | 1207 | link_status = |
1209 | ((IXGB_READ_REG(hw, STATUS) & IXGB_STATUS_LU) | 1208 | ((IXGB_READ_REG(hw, STATUS) & IXGB_STATUS_LU) |
1210 | && (IXGB_READ_REG(hw, XPCSS) & | 1209 | && (IXGB_READ_REG(hw, XPCSS) & |
1211 | IXGB_XPCSS_ALIGN_STATUS)) ? TRUE : FALSE; | 1210 | IXGB_XPCSS_ALIGN_STATUS)) ? true : false; |
1212 | } while (!link_status && --wait_retries); | 1211 | } while (!link_status && --wait_retries); |
1213 | 1212 | ||
1214 | } while (!link_status && --lrst_retries); | 1213 | } while (!link_status && --lrst_retries); |
diff --git a/drivers/net/ixgb/ixgb_hw.h b/drivers/net/ixgb/ixgb_hw.h index 4f176ff2b786..d4e95665ce9e 100644 --- a/drivers/net/ixgb/ixgb_hw.h +++ b/drivers/net/ixgb/ixgb_hw.h | |||
@@ -650,7 +650,7 @@ struct ixgb_flash_buffer { | |||
650 | * This is a little-endian specific check. | 650 | * This is a little-endian specific check. |
651 | */ | 651 | */ |
652 | #define IS_MULTICAST(Address) \ | 652 | #define IS_MULTICAST(Address) \ |
653 | (boolean_t)(((uint8_t *)(Address))[0] & ((uint8_t)0x01)) | 653 | (bool)(((uint8_t *)(Address))[0] & ((uint8_t)0x01)) |
654 | 654 | ||
655 | /* | 655 | /* |
656 | * Check whether an address is broadcast. | 656 | * Check whether an address is broadcast. |
@@ -663,7 +663,7 @@ struct ixgb_fc { | |||
663 | uint32_t high_water; /* Flow Control High-water */ | 663 | uint32_t high_water; /* Flow Control High-water */ |
664 | uint32_t low_water; /* Flow Control Low-water */ | 664 | uint32_t low_water; /* Flow Control Low-water */ |
665 | uint16_t pause_time; /* Flow Control Pause timer */ | 665 | uint16_t pause_time; /* Flow Control Pause timer */ |
666 | boolean_t send_xon; /* Flow control send XON */ | 666 | bool send_xon; /* Flow control send XON */ |
667 | ixgb_fc_type type; /* Type of flow control */ | 667 | ixgb_fc_type type; /* Type of flow control */ |
668 | }; | 668 | }; |
669 | 669 | ||
@@ -700,8 +700,8 @@ struct ixgb_hw { | |||
700 | uint32_t num_tx_desc; /* Number of Transmit descriptors */ | 700 | uint32_t num_tx_desc; /* Number of Transmit descriptors */ |
701 | uint32_t num_rx_desc; /* Number of Receive descriptors */ | 701 | uint32_t num_rx_desc; /* Number of Receive descriptors */ |
702 | uint32_t rx_buffer_size; /* Size of Receive buffer */ | 702 | uint32_t rx_buffer_size; /* Size of Receive buffer */ |
703 | boolean_t link_up; /* TRUE if link is valid */ | 703 | bool link_up; /* true if link is valid */ |
704 | boolean_t adapter_stopped; /* State of adapter */ | 704 | bool adapter_stopped; /* State of adapter */ |
705 | uint16_t device_id; /* device id from PCI configuration space */ | 705 | uint16_t device_id; /* device id from PCI configuration space */ |
706 | uint16_t vendor_id; /* vendor id from PCI configuration space */ | 706 | uint16_t vendor_id; /* vendor id from PCI configuration space */ |
707 | uint8_t revision_id; /* revision id from PCI configuration space */ | 707 | uint8_t revision_id; /* revision id from PCI configuration space */ |
@@ -783,11 +783,11 @@ struct ixgb_hw_stats { | |||
783 | }; | 783 | }; |
784 | 784 | ||
785 | /* Function Prototypes */ | 785 | /* Function Prototypes */ |
786 | extern boolean_t ixgb_adapter_stop(struct ixgb_hw *hw); | 786 | extern bool ixgb_adapter_stop(struct ixgb_hw *hw); |
787 | extern boolean_t ixgb_init_hw(struct ixgb_hw *hw); | 787 | extern bool ixgb_init_hw(struct ixgb_hw *hw); |
788 | extern boolean_t ixgb_adapter_start(struct ixgb_hw *hw); | 788 | extern bool ixgb_adapter_start(struct ixgb_hw *hw); |
789 | extern void ixgb_check_for_link(struct ixgb_hw *hw); | 789 | extern void ixgb_check_for_link(struct ixgb_hw *hw); |
790 | extern boolean_t ixgb_check_for_bad_link(struct ixgb_hw *hw); | 790 | extern bool ixgb_check_for_bad_link(struct ixgb_hw *hw); |
791 | 791 | ||
792 | extern void ixgb_rar_set(struct ixgb_hw *hw, | 792 | extern void ixgb_rar_set(struct ixgb_hw *hw, |
793 | uint8_t *addr, | 793 | uint8_t *addr, |
@@ -809,7 +809,7 @@ extern void ixgb_write_vfta(struct ixgb_hw *hw, | |||
809 | void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t *mac_addr); | 809 | void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t *mac_addr); |
810 | uint32_t ixgb_get_ee_pba_number(struct ixgb_hw *hw); | 810 | uint32_t ixgb_get_ee_pba_number(struct ixgb_hw *hw); |
811 | uint16_t ixgb_get_ee_device_id(struct ixgb_hw *hw); | 811 | uint16_t ixgb_get_ee_device_id(struct ixgb_hw *hw); |
812 | boolean_t ixgb_get_eeprom_data(struct ixgb_hw *hw); | 812 | bool ixgb_get_eeprom_data(struct ixgb_hw *hw); |
813 | __le16 ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index); | 813 | __le16 ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index); |
814 | 814 | ||
815 | /* Everything else */ | 815 | /* Everything else */ |
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 | ||
diff --git a/drivers/net/ixgb/ixgb_osdep.h b/drivers/net/ixgb/ixgb_osdep.h index 9e04a6b3ae0d..4be1b273e1b8 100644 --- a/drivers/net/ixgb/ixgb_osdep.h +++ b/drivers/net/ixgb/ixgb_osdep.h | |||
@@ -39,13 +39,6 @@ | |||
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
41 | 41 | ||
42 | typedef enum { | ||
43 | #undef FALSE | ||
44 | FALSE = 0, | ||
45 | #undef TRUE | ||
46 | TRUE = 1 | ||
47 | } boolean_t; | ||
48 | |||
49 | #undef ASSERT | 42 | #undef ASSERT |
50 | #define ASSERT(x) if(!(x)) BUG() | 43 | #define ASSERT(x) if(!(x)) BUG() |
51 | #define MSGOUT(S, A, B) printk(KERN_DEBUG S "\n", A, B) | 44 | #define MSGOUT(S, A, B) printk(KERN_DEBUG S "\n", A, B) |