Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

e1000: convert uint16_t style integers to u16

Conglomerate from 4 separate patches from Joe.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by

Joe Perches and committed by
Jeff Garzik
406874a7 222441a6

+1128 -1128
+43 -43
drivers/net/e1000/e1000.h
··· 161 161 struct sk_buff *skb; 162 162 dma_addr_t dma; 163 163 unsigned long time_stamp; 164 - uint16_t length; 165 - uint16_t next_to_watch; 164 + u16 length; 165 + u16 next_to_watch; 166 166 }; 167 167 168 168 169 169 struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; 170 - struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; 170 + struct e1000_ps_page_dma { u64 ps_page_dma[PS_PAGE_BUFFERS]; }; 171 171 172 172 struct e1000_tx_ring { 173 173 /* pointer to the descriptor ring memory */ ··· 186 186 struct e1000_buffer *buffer_info; 187 187 188 188 spinlock_t tx_lock; 189 - uint16_t tdh; 190 - uint16_t tdt; 189 + u16 tdh; 190 + u16 tdt; 191 191 bool last_tx_tso; 192 192 }; 193 193 ··· 213 213 /* cpu for rx queue */ 214 214 int cpu; 215 215 216 - uint16_t rdh; 217 - uint16_t rdt; 216 + u16 rdh; 217 + u16 rdt; 218 218 }; 219 219 220 220 #define E1000_DESC_UNUSED(R) \ ··· 237 237 struct timer_list watchdog_timer; 238 238 struct timer_list phy_info_timer; 239 239 struct vlan_group *vlgrp; 240 - uint16_t mng_vlan_id; 241 - uint32_t bd_number; 242 - uint32_t rx_buffer_len; 243 - uint32_t wol; 244 - uint32_t smartspeed; 245 - uint32_t en_mng_pt; 246 - uint16_t link_speed; 247 - uint16_t link_duplex; 240 + u16 mng_vlan_id; 241 + u32 bd_number; 242 + u32 rx_buffer_len; 243 + u32 wol; 244 + u32 smartspeed; 245 + u32 en_mng_pt; 246 + u16 link_speed; 247 + u16 link_duplex; 248 248 spinlock_t stats_lock; 249 249 #ifdef CONFIG_E1000_NAPI 250 250 spinlock_t tx_queue_lock; ··· 254 254 unsigned int total_rx_bytes; 255 255 unsigned int total_rx_packets; 256 256 /* Interrupt Throttle Rate */ 257 - uint32_t itr; 258 - uint32_t itr_setting; 259 - uint16_t tx_itr; 260 - uint16_t rx_itr; 257 + u32 itr; 258 + u32 itr_setting; 259 + u16 tx_itr; 260 + u16 rx_itr; 261 261 262 262 struct work_struct reset_task; 263 - uint8_t fc_autoneg; 263 + u8 fc_autoneg; 264 264 265 265 struct timer_list blink_timer; 266 266 unsigned long led_status; ··· 269 269 struct e1000_tx_ring *tx_ring; /* One per active queue */ 270 270 unsigned int restart_queue; 271 271 unsigned long tx_queue_len; 272 - uint32_t txd_cmd; 273 - uint32_t tx_int_delay; 274 - uint32_t tx_abs_int_delay; 275 - uint32_t gotcl; 276 - uint64_t gotcl_old; 277 - uint64_t tpt_old; 278 - uint64_t colc_old; 279 - uint32_t tx_timeout_count; 280 - uint32_t tx_fifo_head; 281 - uint32_t tx_head_addr; 282 - uint32_t tx_fifo_size; 283 - uint8_t tx_timeout_factor; 272 + u32 txd_cmd; 273 + u32 tx_int_delay; 274 + u32 tx_abs_int_delay; 275 + u32 gotcl; 276 + u64 gotcl_old; 277 + u64 tpt_old; 278 + u64 colc_old; 279 + u32 tx_timeout_count; 280 + u32 tx_fifo_head; 281 + u32 tx_head_addr; 282 + u32 tx_fifo_size; 283 + u8 tx_timeout_factor; 284 284 atomic_t tx_fifo_stall; 285 285 bool pcix_82544; 286 286 bool detect_tx_hung; ··· 305 305 int num_tx_queues; 306 306 int num_rx_queues; 307 307 308 - uint64_t hw_csum_err; 309 - uint64_t hw_csum_good; 310 - uint64_t rx_hdr_split; 311 - uint32_t alloc_rx_buff_failed; 312 - uint32_t rx_int_delay; 313 - uint32_t rx_abs_int_delay; 308 + u64 hw_csum_err; 309 + u64 hw_csum_good; 310 + u64 rx_hdr_split; 311 + u32 alloc_rx_buff_failed; 312 + u32 rx_int_delay; 313 + u32 rx_abs_int_delay; 314 314 bool rx_csum; 315 315 unsigned int rx_ps_pages; 316 - uint32_t gorcl; 317 - uint64_t gorcl_old; 318 - uint16_t rx_ps_bsize0; 316 + u32 gorcl; 317 + u64 gorcl_old; 318 + u16 rx_ps_bsize0; 319 319 320 320 321 321 /* OS defined structs */ ··· 329 329 struct e1000_phy_info phy_info; 330 330 struct e1000_phy_stats phy_stats; 331 331 332 - uint32_t test_icr; 332 + u32 test_icr; 333 333 struct e1000_tx_ring test_tx_ring; 334 334 struct e1000_rx_ring test_rx_ring; 335 335 ··· 341 341 bool smart_power_down; /* phy smart power down */ 342 342 bool quad_port_a; 343 343 unsigned long flags; 344 - uint32_t eeprom_wol; 344 + u32 eeprom_wol; 345 345 }; 346 346 347 347 enum e1000_state_t {
+80 -80
drivers/net/e1000/e1000_ethtool.c
··· 36 36 extern void e1000_down(struct e1000_adapter *adapter); 37 37 extern void e1000_reinit_locked(struct e1000_adapter *adapter); 38 38 extern void e1000_reset(struct e1000_adapter *adapter); 39 - extern int e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx); 39 + extern int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx); 40 40 extern int e1000_setup_all_rx_resources(struct e1000_adapter *adapter); 41 41 extern int e1000_setup_all_tx_resources(struct e1000_adapter *adapter); 42 42 extern void e1000_free_all_rx_resources(struct e1000_adapter *adapter); ··· 289 289 return retval; 290 290 } 291 291 292 - static uint32_t 292 + static u32 293 293 e1000_get_rx_csum(struct net_device *netdev) 294 294 { 295 295 struct e1000_adapter *adapter = netdev_priv(netdev); ··· 297 297 } 298 298 299 299 static int 300 - e1000_set_rx_csum(struct net_device *netdev, uint32_t data) 300 + e1000_set_rx_csum(struct net_device *netdev, u32 data) 301 301 { 302 302 struct e1000_adapter *adapter = netdev_priv(netdev); 303 303 adapter->rx_csum = data; ··· 309 309 return 0; 310 310 } 311 311 312 - static uint32_t 312 + static u32 313 313 e1000_get_tx_csum(struct net_device *netdev) 314 314 { 315 315 return (netdev->features & NETIF_F_HW_CSUM) != 0; 316 316 } 317 317 318 318 static int 319 - e1000_set_tx_csum(struct net_device *netdev, uint32_t data) 319 + e1000_set_tx_csum(struct net_device *netdev, u32 data) 320 320 { 321 321 struct e1000_adapter *adapter = netdev_priv(netdev); 322 322 ··· 335 335 } 336 336 337 337 static int 338 - e1000_set_tso(struct net_device *netdev, uint32_t data) 338 + e1000_set_tso(struct net_device *netdev, u32 data) 339 339 { 340 340 struct e1000_adapter *adapter = netdev_priv(netdev); 341 341 if ((adapter->hw.mac_type < e1000_82544) || ··· 357 357 return 0; 358 358 } 359 359 360 - static uint32_t 360 + static u32 361 361 e1000_get_msglevel(struct net_device *netdev) 362 362 { 363 363 struct e1000_adapter *adapter = netdev_priv(netdev); ··· 365 365 } 366 366 367 367 static void 368 - e1000_set_msglevel(struct net_device *netdev, uint32_t data) 368 + e1000_set_msglevel(struct net_device *netdev, u32 data) 369 369 { 370 370 struct e1000_adapter *adapter = netdev_priv(netdev); 371 371 adapter->msg_enable = data; ··· 375 375 e1000_get_regs_len(struct net_device *netdev) 376 376 { 377 377 #define E1000_REGS_LEN 32 378 - return E1000_REGS_LEN * sizeof(uint32_t); 378 + return E1000_REGS_LEN * sizeof(u32); 379 379 } 380 380 381 381 static void ··· 384 384 { 385 385 struct e1000_adapter *adapter = netdev_priv(netdev); 386 386 struct e1000_hw *hw = &adapter->hw; 387 - uint32_t *regs_buff = p; 388 - uint16_t phy_data; 387 + u32 *regs_buff = p; 388 + u16 phy_data; 389 389 390 - memset(p, 0, E1000_REGS_LEN * sizeof(uint32_t)); 390 + memset(p, 0, E1000_REGS_LEN * sizeof(u32)); 391 391 392 392 regs->version = (1 << 24) | (hw->revision_id << 16) | hw->device_id; 393 393 ··· 412 412 IGP01E1000_PHY_AGC_A); 413 413 e1000_read_phy_reg(hw, IGP01E1000_PHY_AGC_A & 414 414 IGP01E1000_PHY_PAGE_SELECT, &phy_data); 415 - regs_buff[13] = (uint32_t)phy_data; /* cable length */ 415 + regs_buff[13] = (u32)phy_data; /* cable length */ 416 416 e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 417 417 IGP01E1000_PHY_AGC_B); 418 418 e1000_read_phy_reg(hw, IGP01E1000_PHY_AGC_B & 419 419 IGP01E1000_PHY_PAGE_SELECT, &phy_data); 420 - regs_buff[14] = (uint32_t)phy_data; /* cable length */ 420 + regs_buff[14] = (u32)phy_data; /* cable length */ 421 421 e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 422 422 IGP01E1000_PHY_AGC_C); 423 423 e1000_read_phy_reg(hw, IGP01E1000_PHY_AGC_C & 424 424 IGP01E1000_PHY_PAGE_SELECT, &phy_data); 425 - regs_buff[15] = (uint32_t)phy_data; /* cable length */ 425 + regs_buff[15] = (u32)phy_data; /* cable length */ 426 426 e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 427 427 IGP01E1000_PHY_AGC_D); 428 428 e1000_read_phy_reg(hw, IGP01E1000_PHY_AGC_D & 429 429 IGP01E1000_PHY_PAGE_SELECT, &phy_data); 430 - regs_buff[16] = (uint32_t)phy_data; /* cable length */ 430 + regs_buff[16] = (u32)phy_data; /* cable length */ 431 431 regs_buff[17] = 0; /* extended 10bt distance (not needed) */ 432 432 e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 0x0); 433 433 e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_STATUS & 434 434 IGP01E1000_PHY_PAGE_SELECT, &phy_data); 435 - regs_buff[18] = (uint32_t)phy_data; /* cable polarity */ 435 + regs_buff[18] = (u32)phy_data; /* cable polarity */ 436 436 e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 437 437 IGP01E1000_PHY_PCS_INIT_REG); 438 438 e1000_read_phy_reg(hw, IGP01E1000_PHY_PCS_INIT_REG & 439 439 IGP01E1000_PHY_PAGE_SELECT, &phy_data); 440 - regs_buff[19] = (uint32_t)phy_data; /* cable polarity */ 440 + regs_buff[19] = (u32)phy_data; /* cable polarity */ 441 441 regs_buff[20] = 0; /* polarity correction enabled (always) */ 442 442 regs_buff[22] = 0; /* phy receive errors (unavailable) */ 443 443 regs_buff[23] = regs_buff[18]; /* mdix mode */ 444 444 e1000_write_phy_reg(hw, IGP01E1000_PHY_PAGE_SELECT, 0x0); 445 445 } else { 446 446 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data); 447 - regs_buff[13] = (uint32_t)phy_data; /* cable length */ 447 + regs_buff[13] = (u32)phy_data; /* cable length */ 448 448 regs_buff[14] = 0; /* Dummy (to align w/ IGP phy reg dump) */ 449 449 regs_buff[15] = 0; /* Dummy (to align w/ IGP phy reg dump) */ 450 450 regs_buff[16] = 0; /* Dummy (to align w/ IGP phy reg dump) */ 451 451 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_data); 452 - regs_buff[17] = (uint32_t)phy_data; /* extended 10bt distance */ 452 + regs_buff[17] = (u32)phy_data; /* extended 10bt distance */ 453 453 regs_buff[18] = regs_buff[13]; /* cable polarity */ 454 454 regs_buff[19] = 0; /* Dummy (to align w/ IGP phy reg dump) */ 455 455 regs_buff[20] = regs_buff[17]; /* polarity correction */ ··· 459 459 } 460 460 regs_buff[21] = adapter->phy_stats.idle_errors; /* phy idle errors */ 461 461 e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_data); 462 - regs_buff[24] = (uint32_t)phy_data; /* phy local receiver status */ 462 + regs_buff[24] = (u32)phy_data; /* phy local receiver status */ 463 463 regs_buff[25] = regs_buff[24]; /* phy remote receiver status */ 464 464 if (hw->mac_type >= e1000_82540 && 465 465 hw->mac_type < e1000_82571 && ··· 477 477 478 478 static int 479 479 e1000_get_eeprom(struct net_device *netdev, 480 - struct ethtool_eeprom *eeprom, uint8_t *bytes) 480 + struct ethtool_eeprom *eeprom, u8 *bytes) 481 481 { 482 482 struct e1000_adapter *adapter = netdev_priv(netdev); 483 483 struct e1000_hw *hw = &adapter->hw; 484 - uint16_t *eeprom_buff; 484 + u16 *eeprom_buff; 485 485 int first_word, last_word; 486 486 int ret_val = 0; 487 - uint16_t i; 487 + u16 i; 488 488 489 489 if (eeprom->len == 0) 490 490 return -EINVAL; ··· 494 494 first_word = eeprom->offset >> 1; 495 495 last_word = (eeprom->offset + eeprom->len - 1) >> 1; 496 496 497 - eeprom_buff = kmalloc(sizeof(uint16_t) * 497 + eeprom_buff = kmalloc(sizeof(u16) * 498 498 (last_word - first_word + 1), GFP_KERNEL); 499 499 if (!eeprom_buff) 500 500 return -ENOMEM; ··· 514 514 for (i = 0; i < last_word - first_word + 1; i++) 515 515 le16_to_cpus(&eeprom_buff[i]); 516 516 517 - memcpy(bytes, (uint8_t *)eeprom_buff + (eeprom->offset & 1), 517 + memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 1), 518 518 eeprom->len); 519 519 kfree(eeprom_buff); 520 520 ··· 523 523 524 524 static int 525 525 e1000_set_eeprom(struct net_device *netdev, 526 - struct ethtool_eeprom *eeprom, uint8_t *bytes) 526 + struct ethtool_eeprom *eeprom, u8 *bytes) 527 527 { 528 528 struct e1000_adapter *adapter = netdev_priv(netdev); 529 529 struct e1000_hw *hw = &adapter->hw; 530 - uint16_t *eeprom_buff; 530 + u16 *eeprom_buff; 531 531 void *ptr; 532 532 int max_len, first_word, last_word, ret_val = 0; 533 - uint16_t i; 533 + u16 i; 534 534 535 535 if (eeprom->len == 0) 536 536 return -EOPNOTSUPP; ··· 590 590 { 591 591 struct e1000_adapter *adapter = netdev_priv(netdev); 592 592 char firmware_version[32]; 593 - uint16_t eeprom_data; 593 + u16 eeprom_data; 594 594 595 595 strncpy(drvinfo->driver, e1000_driver_name, 32); 596 596 strncpy(drvinfo->version, e1000_driver_version, 32); ··· 674 674 adapter->tx_ring = txdr; 675 675 adapter->rx_ring = rxdr; 676 676 677 - rxdr->count = max(ring->rx_pending,(uint32_t)E1000_MIN_RXD); 678 - rxdr->count = min(rxdr->count,(uint32_t)(mac_type < e1000_82544 ? 677 + rxdr->count = max(ring->rx_pending,(u32)E1000_MIN_RXD); 678 + rxdr->count = min(rxdr->count,(u32)(mac_type < e1000_82544 ? 679 679 E1000_MAX_RXD : E1000_MAX_82544_RXD)); 680 680 rxdr->count = ALIGN(rxdr->count, REQ_RX_DESCRIPTOR_MULTIPLE); 681 681 682 - txdr->count = max(ring->tx_pending,(uint32_t)E1000_MIN_TXD); 683 - txdr->count = min(txdr->count,(uint32_t)(mac_type < e1000_82544 ? 682 + txdr->count = max(ring->tx_pending,(u32)E1000_MIN_TXD); 683 + txdr->count = min(txdr->count,(u32)(mac_type < e1000_82544 ? 684 684 E1000_MAX_TXD : E1000_MAX_82544_TXD)); 685 685 txdr->count = ALIGN(txdr->count, REQ_TX_DESCRIPTOR_MULTIPLE); 686 686 ··· 728 728 return err; 729 729 } 730 730 731 - static bool reg_pattern_test(struct e1000_adapter *adapter, uint64_t *data, 732 - int reg, uint32_t mask, uint32_t write) 731 + static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, 732 + int reg, u32 mask, u32 write) 733 733 { 734 - static const uint32_t test[] = 734 + static const u32 test[] = 735 735 {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; 736 - uint8_t __iomem *address = adapter->hw.hw_addr + reg; 737 - uint32_t read; 736 + u8 __iomem *address = adapter->hw.hw_addr + reg; 737 + u32 read; 738 738 int i; 739 739 740 740 for (i = 0; i < ARRAY_SIZE(test); i++) { ··· 751 751 return false; 752 752 } 753 753 754 - static bool reg_set_and_check(struct e1000_adapter *adapter, uint64_t *data, 755 - int reg, uint32_t mask, uint32_t write) 754 + static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, 755 + int reg, u32 mask, u32 write) 756 756 { 757 - uint8_t __iomem *address = adapter->hw.hw_addr + reg; 758 - uint32_t read; 757 + u8 __iomem *address = adapter->hw.hw_addr + reg; 758 + u32 read; 759 759 760 760 writel(write & mask, address); 761 761 read = readl(address); ··· 788 788 } while (0) 789 789 790 790 static int 791 - e1000_reg_test(struct e1000_adapter *adapter, uint64_t *data) 791 + e1000_reg_test(struct e1000_adapter *adapter, u64 *data) 792 792 { 793 - uint32_t value, before, after; 794 - uint32_t i, toggle; 793 + u32 value, before, after; 794 + u32 i, toggle; 795 795 796 796 /* The status register is Read Only, so a write should fail. 797 797 * Some bits that get toggled are ignored. ··· 884 884 } 885 885 886 886 static int 887 - e1000_eeprom_test(struct e1000_adapter *adapter, uint64_t *data) 887 + e1000_eeprom_test(struct e1000_adapter *adapter, u64 *data) 888 888 { 889 - uint16_t temp; 890 - uint16_t checksum = 0; 891 - uint16_t i; 889 + u16 temp; 890 + u16 checksum = 0; 891 + u16 i; 892 892 893 893 *data = 0; 894 894 /* Read and add up the contents of the EEPROM */ ··· 901 901 } 902 902 903 903 /* If Checksum is not Correct return error else test passed */ 904 - if ((checksum != (uint16_t) EEPROM_SUM) && !(*data)) 904 + if ((checksum != (u16) EEPROM_SUM) && !(*data)) 905 905 *data = 2; 906 906 907 907 return *data; ··· 919 919 } 920 920 921 921 static int 922 - e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data) 922 + e1000_intr_test(struct e1000_adapter *adapter, u64 *data) 923 923 { 924 924 struct net_device *netdev = adapter->netdev; 925 - uint32_t mask, i = 0; 925 + u32 mask, i = 0; 926 926 bool shared_int = true; 927 - uint32_t irq = adapter->pdev->irq; 927 + u32 irq = adapter->pdev->irq; 928 928 929 929 *data = 0; 930 930 ··· 1070 1070 struct e1000_tx_ring *txdr = &adapter->test_tx_ring; 1071 1071 struct e1000_rx_ring *rxdr = &adapter->test_rx_ring; 1072 1072 struct pci_dev *pdev = adapter->pdev; 1073 - uint32_t rctl; 1073 + u32 rctl; 1074 1074 int i, ret_val; 1075 1075 1076 1076 /* Setup Tx descriptor ring and Tx buffers */ ··· 1096 1096 txdr->next_to_use = txdr->next_to_clean = 0; 1097 1097 1098 1098 E1000_WRITE_REG(&adapter->hw, TDBAL, 1099 - ((uint64_t) txdr->dma & 0x00000000FFFFFFFF)); 1100 - E1000_WRITE_REG(&adapter->hw, TDBAH, ((uint64_t) txdr->dma >> 32)); 1099 + ((u64) txdr->dma & 0x00000000FFFFFFFF)); 1100 + E1000_WRITE_REG(&adapter->hw, TDBAH, ((u64) txdr->dma >> 32)); 1101 1101 E1000_WRITE_REG(&adapter->hw, TDLEN, 1102 1102 txdr->count * sizeof(struct e1000_tx_desc)); 1103 1103 E1000_WRITE_REG(&adapter->hw, TDH, 0); ··· 1153 1153 rctl = E1000_READ_REG(&adapter->hw, RCTL); 1154 1154 E1000_WRITE_REG(&adapter->hw, RCTL, rctl & ~E1000_RCTL_EN); 1155 1155 E1000_WRITE_REG(&adapter->hw, RDBAL, 1156 - ((uint64_t) rxdr->dma & 0xFFFFFFFF)); 1157 - E1000_WRITE_REG(&adapter->hw, RDBAH, ((uint64_t) rxdr->dma >> 32)); 1156 + ((u64) rxdr->dma & 0xFFFFFFFF)); 1157 + E1000_WRITE_REG(&adapter->hw, RDBAH, ((u64) rxdr->dma >> 32)); 1158 1158 E1000_WRITE_REG(&adapter->hw, RDLEN, rxdr->size); 1159 1159 E1000_WRITE_REG(&adapter->hw, RDH, 0); 1160 1160 E1000_WRITE_REG(&adapter->hw, RDT, 0); ··· 1202 1202 static void 1203 1203 e1000_phy_reset_clk_and_crs(struct e1000_adapter *adapter) 1204 1204 { 1205 - uint16_t phy_reg; 1205 + u16 phy_reg; 1206 1206 1207 1207 /* Because we reset the PHY above, we need to re-force TX_CLK in the 1208 1208 * Extended PHY Specific Control Register to 25MHz clock. This ··· 1226 1226 static int 1227 1227 e1000_nonintegrated_phy_loopback(struct e1000_adapter *adapter) 1228 1228 { 1229 - uint32_t ctrl_reg; 1230 - uint16_t phy_reg; 1229 + u32 ctrl_reg; 1230 + u16 phy_reg; 1231 1231 1232 1232 /* Setup the Device Control Register for PHY loopback test. */ 1233 1233 ··· 1293 1293 static int 1294 1294 e1000_integrated_phy_loopback(struct e1000_adapter *adapter) 1295 1295 { 1296 - uint32_t ctrl_reg = 0; 1297 - uint32_t stat_reg = 0; 1296 + u32 ctrl_reg = 0; 1297 + u32 stat_reg = 0; 1298 1298 1299 1299 adapter->hw.autoneg = false; 1300 1300 ··· 1363 1363 static int 1364 1364 e1000_set_phy_loopback(struct e1000_adapter *adapter) 1365 1365 { 1366 - uint16_t phy_reg = 0; 1367 - uint16_t count = 0; 1366 + u16 phy_reg = 0; 1367 + u16 count = 0; 1368 1368 1369 1369 switch (adapter->hw.mac_type) { 1370 1370 case e1000_82543: ··· 1416 1416 e1000_setup_loopback_test(struct e1000_adapter *adapter) 1417 1417 { 1418 1418 struct e1000_hw *hw = &adapter->hw; 1419 - uint32_t rctl; 1419 + u32 rctl; 1420 1420 1421 1421 if (hw->media_type == e1000_media_type_fiber || 1422 1422 hw->media_type == e1000_media_type_internal_serdes) { ··· 1451 1451 e1000_loopback_cleanup(struct e1000_adapter *adapter) 1452 1452 { 1453 1453 struct e1000_hw *hw = &adapter->hw; 1454 - uint32_t rctl; 1455 - uint16_t phy_reg; 1454 + u32 rctl; 1455 + u16 phy_reg; 1456 1456 1457 1457 rctl = E1000_READ_REG(hw, RCTL); 1458 1458 rctl &= ~(E1000_RCTL_LBM_TCVR | E1000_RCTL_LBM_MAC); ··· 1578 1578 } 1579 1579 1580 1580 static int 1581 - e1000_loopback_test(struct e1000_adapter *adapter, uint64_t *data) 1581 + e1000_loopback_test(struct e1000_adapter *adapter, u64 *data) 1582 1582 { 1583 1583 /* PHY loopback cannot be performed if SoL/IDER 1584 1584 * sessions are active */ ··· 1603 1603 } 1604 1604 1605 1605 static int 1606 - e1000_link_test(struct e1000_adapter *adapter, uint64_t *data) 1606 + e1000_link_test(struct e1000_adapter *adapter, u64 *data) 1607 1607 { 1608 1608 *data = 0; 1609 1609 if (adapter->hw.media_type == e1000_media_type_internal_serdes) { ··· 1647 1647 1648 1648 static void 1649 1649 e1000_diag_test(struct net_device *netdev, 1650 - struct ethtool_test *eth_test, uint64_t *data) 1650 + struct ethtool_test *eth_test, u64 *data) 1651 1651 { 1652 1652 struct e1000_adapter *adapter = netdev_priv(netdev); 1653 1653 bool if_running = netif_running(netdev); ··· 1657 1657 /* Offline tests */ 1658 1658 1659 1659 /* save speed, duplex, autoneg settings */ 1660 - uint16_t autoneg_advertised = adapter->hw.autoneg_advertised; 1661 - uint8_t forced_speed_duplex = adapter->hw.forced_speed_duplex; 1662 - uint8_t autoneg = adapter->hw.autoneg; 1660 + u16 autoneg_advertised = adapter->hw.autoneg_advertised; 1661 + u8 forced_speed_duplex = adapter->hw.forced_speed_duplex; 1662 + u8 autoneg = adapter->hw.autoneg; 1663 1663 1664 1664 DPRINTK(HW, INFO, "offline testing starting\n"); 1665 1665 ··· 1877 1877 } 1878 1878 1879 1879 static int 1880 - e1000_phys_id(struct net_device *netdev, uint32_t data) 1880 + e1000_phys_id(struct net_device *netdev, u32 data) 1881 1881 { 1882 1882 struct e1000_adapter *adapter = netdev_priv(netdev); 1883 1883 ··· 1927 1927 1928 1928 static void 1929 1929 e1000_get_ethtool_stats(struct net_device *netdev, 1930 - struct ethtool_stats *stats, uint64_t *data) 1930 + struct ethtool_stats *stats, u64 *data) 1931 1931 { 1932 1932 struct e1000_adapter *adapter = netdev_priv(netdev); 1933 1933 int i; ··· 1936 1936 for (i = 0; i < E1000_GLOBAL_STATS_LEN; i++) { 1937 1937 char *p = (char *)adapter+e1000_gstrings_stats[i].stat_offset; 1938 1938 data[i] = (e1000_gstrings_stats[i].sizeof_stat == 1939 - sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; 1939 + sizeof(u64)) ? *(u64 *)p : *(u32 *)p; 1940 1940 } 1941 1941 /* BUG_ON(i != E1000_STATS_LEN); */ 1942 1942 } 1943 1943 1944 1944 static void 1945 - e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) 1945 + e1000_get_strings(struct net_device *netdev, u32 stringset, u8 *data) 1946 1946 { 1947 - uint8_t *p = data; 1947 + u8 *p = data; 1948 1948 int i; 1949 1949 1950 1950 switch (stringset) {
+662 -662
drivers/net/e1000/e1000_hw.c
··· 33 33 34 34 #include "e1000_hw.h" 35 35 36 - static int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask); 37 - static void e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask); 38 - static int32_t e1000_read_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *data); 39 - static int32_t e1000_write_kmrn_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); 40 - static int32_t e1000_get_software_semaphore(struct e1000_hw *hw); 36 + static s32 e1000_swfw_sync_acquire(struct e1000_hw *hw, u16 mask); 37 + static void e1000_swfw_sync_release(struct e1000_hw *hw, u16 mask); 38 + static s32 e1000_read_kmrn_reg(struct e1000_hw *hw, u32 reg_addr, u16 *data); 39 + static s32 e1000_write_kmrn_reg(struct e1000_hw *hw, u32 reg_addr, u16 data); 40 + static s32 e1000_get_software_semaphore(struct e1000_hw *hw); 41 41 static void e1000_release_software_semaphore(struct e1000_hw *hw); 42 42 43 - static uint8_t e1000_arc_subsystem_valid(struct e1000_hw *hw); 44 - static int32_t e1000_check_downshift(struct e1000_hw *hw); 45 - static int32_t e1000_check_polarity(struct e1000_hw *hw, e1000_rev_polarity *polarity); 43 + static u8 e1000_arc_subsystem_valid(struct e1000_hw *hw); 44 + static s32 e1000_check_downshift(struct e1000_hw *hw); 45 + static s32 e1000_check_polarity(struct e1000_hw *hw, e1000_rev_polarity *polarity); 46 46 static void e1000_clear_hw_cntrs(struct e1000_hw *hw); 47 47 static void e1000_clear_vfta(struct e1000_hw *hw); 48 - static int32_t e1000_commit_shadow_ram(struct e1000_hw *hw); 49 - static int32_t e1000_config_dsp_after_link_change(struct e1000_hw *hw, 48 + static s32 e1000_commit_shadow_ram(struct e1000_hw *hw); 49 + static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, 50 50 bool link_up); 51 - static int32_t e1000_config_fc_after_link_up(struct e1000_hw *hw); 52 - static int32_t e1000_detect_gig_phy(struct e1000_hw *hw); 53 - static int32_t e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t bank); 54 - static int32_t e1000_get_auto_rd_done(struct e1000_hw *hw); 55 - static int32_t e1000_get_cable_length(struct e1000_hw *hw, uint16_t *min_length, uint16_t *max_length); 56 - static int32_t e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw); 57 - static int32_t e1000_get_phy_cfg_done(struct e1000_hw *hw); 58 - static int32_t e1000_get_software_flag(struct e1000_hw *hw); 59 - static int32_t e1000_ich8_cycle_init(struct e1000_hw *hw); 60 - static int32_t e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout); 61 - static int32_t e1000_id_led_init(struct e1000_hw *hw); 62 - static int32_t e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, uint32_t cnf_base_addr, uint32_t cnf_size); 63 - static int32_t e1000_init_lcd_from_nvm(struct e1000_hw *hw); 51 + static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw); 52 + static s32 e1000_detect_gig_phy(struct e1000_hw *hw); 53 + static s32 e1000_erase_ich8_4k_segment(struct e1000_hw *hw, u32 bank); 54 + static s32 e1000_get_auto_rd_done(struct e1000_hw *hw); 55 + static s32 e1000_get_cable_length(struct e1000_hw *hw, u16 *min_length, u16 *max_length); 56 + static s32 e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw); 57 + static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw); 58 + static s32 e1000_get_software_flag(struct e1000_hw *hw); 59 + static s32 e1000_ich8_cycle_init(struct e1000_hw *hw); 60 + static s32 e1000_ich8_flash_cycle(struct e1000_hw *hw, u32 timeout); 61 + static s32 e1000_id_led_init(struct e1000_hw *hw); 62 + static s32 e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, u32 cnf_base_addr, u32 cnf_size); 63 + static s32 e1000_init_lcd_from_nvm(struct e1000_hw *hw); 64 64 static void e1000_init_rx_addrs(struct e1000_hw *hw); 65 65 static void e1000_initialize_hardware_bits(struct e1000_hw *hw); 66 66 static bool e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw); 67 - static int32_t e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw); 68 - static int32_t e1000_mng_enable_host_if(struct e1000_hw *hw); 69 - static int32_t e1000_mng_host_if_write(struct e1000_hw *hw, uint8_t *buffer, uint16_t length, uint16_t offset, uint8_t *sum); 70 - static int32_t e1000_mng_write_cmd_header(struct e1000_hw* hw, struct e1000_host_mng_command_header* hdr); 71 - static int32_t e1000_mng_write_commit(struct e1000_hw *hw); 72 - static int32_t e1000_phy_ife_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 73 - static int32_t e1000_phy_igp_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 74 - static int32_t e1000_read_eeprom_eerd(struct e1000_hw *hw, uint16_t offset, uint16_t words, uint16_t *data); 75 - static int32_t e1000_write_eeprom_eewr(struct e1000_hw *hw, uint16_t offset, uint16_t words, uint16_t *data); 76 - static int32_t e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd); 77 - static int32_t e1000_phy_m88_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 67 + static s32 e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw); 68 + static s32 e1000_mng_enable_host_if(struct e1000_hw *hw); 69 + static s32 e1000_mng_host_if_write(struct e1000_hw *hw, u8 *buffer, u16 length, u16 offset, u8 *sum); 70 + static s32 e1000_mng_write_cmd_header(struct e1000_hw* hw, struct e1000_host_mng_command_header* hdr); 71 + static s32 e1000_mng_write_commit(struct e1000_hw *hw); 72 + static s32 e1000_phy_ife_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 73 + static s32 e1000_phy_igp_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 74 + static s32 e1000_read_eeprom_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 75 + static s32 e1000_write_eeprom_eewr(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 76 + static s32 e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd); 77 + static s32 e1000_phy_m88_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 78 78 static void e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw); 79 - static int32_t e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t *data); 80 - static int32_t e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte); 81 - static int32_t e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte); 82 - static int32_t e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data); 83 - static int32_t e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size, uint16_t *data); 84 - static int32_t e1000_write_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size, uint16_t data); 85 - static int32_t e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, uint16_t *data); 86 - static int32_t e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, uint16_t *data); 79 + static s32 e1000_read_ich8_byte(struct e1000_hw *hw, u32 index, u8 *data); 80 + static s32 e1000_verify_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 byte); 81 + static s32 e1000_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 byte); 82 + static s32 e1000_read_ich8_word(struct e1000_hw *hw, u32 index, u16 *data); 83 + static s32 e1000_read_ich8_data(struct e1000_hw *hw, u32 index, u32 size, u16 *data); 84 + static s32 e1000_write_ich8_data(struct e1000_hw *hw, u32 index, u32 size, u16 data); 85 + static s32 e1000_read_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 86 + static s32 e1000_write_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, u16 *data); 87 87 static void e1000_release_software_flag(struct e1000_hw *hw); 88 - static int32_t e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active); 89 - static int32_t e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active); 90 - static int32_t e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop); 88 + static s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active); 89 + static s32 e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active); 90 + static s32 e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, u32 no_snoop); 91 91 static void e1000_set_pci_express_master_disable(struct e1000_hw *hw); 92 - static int32_t e1000_wait_autoneg(struct e1000_hw *hw); 93 - static void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value); 94 - static int32_t e1000_set_phy_type(struct e1000_hw *hw); 92 + static s32 e1000_wait_autoneg(struct e1000_hw *hw); 93 + static void e1000_write_reg_io(struct e1000_hw *hw, u32 offset, u32 value); 94 + static s32 e1000_set_phy_type(struct e1000_hw *hw); 95 95 static void e1000_phy_init_script(struct e1000_hw *hw); 96 - static int32_t e1000_setup_copper_link(struct e1000_hw *hw); 97 - static int32_t e1000_setup_fiber_serdes_link(struct e1000_hw *hw); 98 - static int32_t e1000_adjust_serdes_amplitude(struct e1000_hw *hw); 99 - static int32_t e1000_phy_force_speed_duplex(struct e1000_hw *hw); 100 - static int32_t e1000_config_mac_to_phy(struct e1000_hw *hw); 101 - static void e1000_raise_mdi_clk(struct e1000_hw *hw, uint32_t *ctrl); 102 - static void e1000_lower_mdi_clk(struct e1000_hw *hw, uint32_t *ctrl); 103 - static void e1000_shift_out_mdi_bits(struct e1000_hw *hw, uint32_t data, 104 - uint16_t count); 105 - static uint16_t e1000_shift_in_mdi_bits(struct e1000_hw *hw); 106 - static int32_t e1000_phy_reset_dsp(struct e1000_hw *hw); 107 - static int32_t e1000_write_eeprom_spi(struct e1000_hw *hw, uint16_t offset, 108 - uint16_t words, uint16_t *data); 109 - static int32_t e1000_write_eeprom_microwire(struct e1000_hw *hw, 110 - uint16_t offset, uint16_t words, 111 - uint16_t *data); 112 - static int32_t e1000_spi_eeprom_ready(struct e1000_hw *hw); 113 - static void e1000_raise_ee_clk(struct e1000_hw *hw, uint32_t *eecd); 114 - static void e1000_lower_ee_clk(struct e1000_hw *hw, uint32_t *eecd); 115 - static void e1000_shift_out_ee_bits(struct e1000_hw *hw, uint16_t data, 116 - uint16_t count); 117 - static int32_t e1000_write_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, 118 - uint16_t phy_data); 119 - static int32_t e1000_read_phy_reg_ex(struct e1000_hw *hw,uint32_t reg_addr, 120 - uint16_t *phy_data); 121 - static uint16_t e1000_shift_in_ee_bits(struct e1000_hw *hw, uint16_t count); 122 - static int32_t e1000_acquire_eeprom(struct e1000_hw *hw); 96 + static s32 e1000_setup_copper_link(struct e1000_hw *hw); 97 + static s32 e1000_setup_fiber_serdes_link(struct e1000_hw *hw); 98 + static s32 e1000_adjust_serdes_amplitude(struct e1000_hw *hw); 99 + static s32 e1000_phy_force_speed_duplex(struct e1000_hw *hw); 100 + static s32 e1000_config_mac_to_phy(struct e1000_hw *hw); 101 + static void e1000_raise_mdi_clk(struct e1000_hw *hw, u32 *ctrl); 102 + static void e1000_lower_mdi_clk(struct e1000_hw *hw, u32 *ctrl); 103 + static void e1000_shift_out_mdi_bits(struct e1000_hw *hw, u32 data, 104 + u16 count); 105 + static u16 e1000_shift_in_mdi_bits(struct e1000_hw *hw); 106 + static s32 e1000_phy_reset_dsp(struct e1000_hw *hw); 107 + static s32 e1000_write_eeprom_spi(struct e1000_hw *hw, u16 offset, 108 + u16 words, u16 *data); 109 + static s32 e1000_write_eeprom_microwire(struct e1000_hw *hw, 110 + u16 offset, u16 words, 111 + u16 *data); 112 + static s32 e1000_spi_eeprom_ready(struct e1000_hw *hw); 113 + static void e1000_raise_ee_clk(struct e1000_hw *hw, u32 *eecd); 114 + static void e1000_lower_ee_clk(struct e1000_hw *hw, u32 *eecd); 115 + static void e1000_shift_out_ee_bits(struct e1000_hw *hw, u16 data, 116 + u16 count); 117 + static s32 e1000_write_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr, 118 + u16 phy_data); 119 + static s32 e1000_read_phy_reg_ex(struct e1000_hw *hw,u32 reg_addr, 120 + u16 *phy_data); 121 + static u16 e1000_shift_in_ee_bits(struct e1000_hw *hw, u16 count); 122 + static s32 e1000_acquire_eeprom(struct e1000_hw *hw); 123 123 static void e1000_release_eeprom(struct e1000_hw *hw); 124 124 static void e1000_standby_eeprom(struct e1000_hw *hw); 125 - static int32_t e1000_set_vco_speed(struct e1000_hw *hw); 126 - static int32_t e1000_polarity_reversal_workaround(struct e1000_hw *hw); 127 - static int32_t e1000_set_phy_mode(struct e1000_hw *hw); 128 - static int32_t e1000_host_if_read_cookie(struct e1000_hw *hw, uint8_t *buffer); 129 - static uint8_t e1000_calculate_mng_checksum(char *buffer, uint32_t length); 130 - static int32_t e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, 131 - uint16_t duplex); 132 - static int32_t e1000_configure_kmrn_for_1000(struct e1000_hw *hw); 125 + static s32 e1000_set_vco_speed(struct e1000_hw *hw); 126 + static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw); 127 + static s32 e1000_set_phy_mode(struct e1000_hw *hw); 128 + static s32 e1000_host_if_read_cookie(struct e1000_hw *hw, u8 *buffer); 129 + static u8 e1000_calculate_mng_checksum(char *buffer, u32 length); 130 + static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, 131 + u16 duplex); 132 + static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw); 133 133 134 134 /* IGP cable length table */ 135 135 static const 136 - uint16_t e1000_igp_cable_length_table[IGP01E1000_AGC_LENGTH_TABLE_SIZE] = 136 + u16 e1000_igp_cable_length_table[IGP01E1000_AGC_LENGTH_TABLE_SIZE] = 137 137 { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 138 138 5, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 25, 25, 25, 139 139 25, 25, 25, 25, 30, 30, 30, 30, 40, 40, 40, 40, 40, 40, 40, 40, ··· 144 144 110, 110, 110, 110, 110, 110, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120}; 145 145 146 146 static const 147 - uint16_t e1000_igp_2_cable_length_table[IGP02E1000_AGC_LENGTH_TABLE_SIZE] = 147 + u16 e1000_igp_2_cable_length_table[IGP02E1000_AGC_LENGTH_TABLE_SIZE] = 148 148 { 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 8, 11, 13, 16, 18, 21, 149 149 0, 0, 0, 3, 6, 10, 13, 16, 19, 23, 26, 29, 32, 35, 38, 41, 150 150 6, 10, 14, 18, 22, 26, 30, 33, 37, 41, 44, 48, 51, 54, 58, 61, ··· 159 159 * 160 160 * hw - Struct containing variables accessed by shared code 161 161 *****************************************************************************/ 162 - static int32_t 162 + static s32 163 163 e1000_set_phy_type(struct e1000_hw *hw) 164 164 { 165 165 DEBUGFUNC("e1000_set_phy_type"); ··· 213 213 static void 214 214 e1000_phy_init_script(struct e1000_hw *hw) 215 215 { 216 - uint32_t ret_val; 217 - uint16_t phy_saved_data; 216 + u32 ret_val; 217 + u16 phy_saved_data; 218 218 219 219 DEBUGFUNC("e1000_phy_init_script"); 220 220 ··· 272 272 e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data); 273 273 274 274 if (hw->mac_type == e1000_82547) { 275 - uint16_t fused, fine, coarse; 275 + u16 fused, fine, coarse; 276 276 277 277 /* Move to analog registers page */ 278 278 e1000_read_phy_reg(hw, IGP01E1000_ANALOG_SPARE_FUSE_STATUS, &fused); ··· 306 306 * 307 307 * hw - Struct containing variables accessed by shared code 308 308 *****************************************************************************/ 309 - int32_t 309 + s32 310 310 e1000_set_mac_type(struct e1000_hw *hw) 311 311 { 312 312 DEBUGFUNC("e1000_set_mac_type"); ··· 477 477 void 478 478 e1000_set_media_type(struct e1000_hw *hw) 479 479 { 480 - uint32_t status; 480 + u32 status; 481 481 482 482 DEBUGFUNC("e1000_set_media_type"); 483 483 ··· 528 528 * 529 529 * hw - Struct containing variables accessed by shared code 530 530 *****************************************************************************/ 531 - int32_t 531 + s32 532 532 e1000_reset_hw(struct e1000_hw *hw) 533 533 { 534 - uint32_t ctrl; 535 - uint32_t ctrl_ext; 536 - uint32_t icr; 537 - uint32_t manc; 538 - uint32_t led_ctrl; 539 - uint32_t timeout; 540 - uint32_t extcnf_ctrl; 541 - int32_t ret_val; 534 + u32 ctrl; 535 + u32 ctrl_ext; 536 + u32 icr; 537 + u32 manc; 538 + u32 led_ctrl; 539 + u32 timeout; 540 + u32 extcnf_ctrl; 541 + s32 ret_val; 542 542 543 543 DEBUGFUNC("e1000_reset_hw"); 544 544 ··· 730 730 } 731 731 732 732 if (hw->mac_type == e1000_ich8lan) { 733 - uint32_t kab = E1000_READ_REG(hw, KABGTXD); 733 + u32 kab = E1000_READ_REG(hw, KABGTXD); 734 734 kab |= E1000_KABGTXD_BGSQLBIAS; 735 735 E1000_WRITE_REG(hw, KABGTXD, kab); 736 736 } ··· 752 752 { 753 753 if ((hw->mac_type >= e1000_82571) && (!hw->initialize_hw_bits_disable)) { 754 754 /* Settings common to all PCI-express silicon */ 755 - uint32_t reg_ctrl, reg_ctrl_ext; 756 - uint32_t reg_tarc0, reg_tarc1; 757 - uint32_t reg_tctl; 758 - uint32_t reg_txdctl, reg_txdctl1; 755 + u32 reg_ctrl, reg_ctrl_ext; 756 + u32 reg_tarc0, reg_tarc1; 757 + u32 reg_tctl; 758 + u32 reg_txdctl, reg_txdctl1; 759 759 760 760 /* link autonegotiation/sync workarounds */ 761 761 reg_tarc0 = E1000_READ_REG(hw, TARC0); ··· 866 866 * configuration and flow control settings. Clears all on-chip counters. Leaves 867 867 * the transmit and receive units disabled and uninitialized. 868 868 *****************************************************************************/ 869 - int32_t 869 + s32 870 870 e1000_init_hw(struct e1000_hw *hw) 871 871 { 872 - uint32_t ctrl; 873 - uint32_t i; 874 - int32_t ret_val; 875 - uint32_t mta_size; 876 - uint32_t reg_data; 877 - uint32_t ctrl_ext; 872 + u32 ctrl; 873 + u32 i; 874 + s32 ret_val; 875 + u32 mta_size; 876 + u32 reg_data; 877 + u32 ctrl_ext; 878 878 879 879 DEBUGFUNC("e1000_init_hw"); 880 880 ··· 1020 1020 1021 1021 1022 1022 if (hw->mac_type == e1000_82573) { 1023 - uint32_t gcr = E1000_READ_REG(hw, GCR); 1023 + u32 gcr = E1000_READ_REG(hw, GCR); 1024 1024 gcr |= E1000_GCR_L1_ACT_WITHOUT_L0S_RX; 1025 1025 E1000_WRITE_REG(hw, GCR, gcr); 1026 1026 } ··· 1054 1054 * 1055 1055 * hw - Struct containing variables accessed by shared code. 1056 1056 *****************************************************************************/ 1057 - static int32_t 1057 + static s32 1058 1058 e1000_adjust_serdes_amplitude(struct e1000_hw *hw) 1059 1059 { 1060 - uint16_t eeprom_data; 1061 - int32_t ret_val; 1060 + u16 eeprom_data; 1061 + s32 ret_val; 1062 1062 1063 1063 DEBUGFUNC("e1000_adjust_serdes_amplitude"); 1064 1064 ··· 1100 1100 * established. Assumes the hardware has previously been reset and the 1101 1101 * transmitter and receiver are not enabled. 1102 1102 *****************************************************************************/ 1103 - int32_t 1103 + s32 1104 1104 e1000_setup_link(struct e1000_hw *hw) 1105 1105 { 1106 - uint32_t ctrl_ext; 1107 - int32_t ret_val; 1108 - uint16_t eeprom_data; 1106 + u32 ctrl_ext; 1107 + s32 ret_val; 1108 + u16 eeprom_data; 1109 1109 1110 1110 DEBUGFUNC("e1000_setup_link"); 1111 1111 ··· 1233 1233 * link. Assumes the hardware has been previously reset and the transmitter 1234 1234 * and receiver are not enabled. 1235 1235 *****************************************************************************/ 1236 - static int32_t 1236 + static s32 1237 1237 e1000_setup_fiber_serdes_link(struct e1000_hw *hw) 1238 1238 { 1239 - uint32_t ctrl; 1240 - uint32_t status; 1241 - uint32_t txcw = 0; 1242 - uint32_t i; 1243 - uint32_t signal = 0; 1244 - int32_t ret_val; 1239 + u32 ctrl; 1240 + u32 status; 1241 + u32 txcw = 0; 1242 + u32 i; 1243 + u32 signal = 0; 1244 + s32 ret_val; 1245 1245 1246 1246 DEBUGFUNC("e1000_setup_fiber_serdes_link"); 1247 1247 ··· 1380 1380 * 1381 1381 * hw - Struct containing variables accessed by shared code 1382 1382 ******************************************************************************/ 1383 - static int32_t 1383 + static s32 1384 1384 e1000_copper_link_preconfig(struct e1000_hw *hw) 1385 1385 { 1386 - uint32_t ctrl; 1387 - int32_t ret_val; 1388 - uint16_t phy_data; 1386 + u32 ctrl; 1387 + s32 ret_val; 1388 + u16 phy_data; 1389 1389 1390 1390 DEBUGFUNC("e1000_copper_link_preconfig"); 1391 1391 ··· 1440 1440 * 1441 1441 * hw - Struct containing variables accessed by shared code 1442 1442 *********************************************************************/ 1443 - static int32_t 1443 + static s32 1444 1444 e1000_copper_link_igp_setup(struct e1000_hw *hw) 1445 1445 { 1446 - uint32_t led_ctrl; 1447 - int32_t ret_val; 1448 - uint16_t phy_data; 1446 + u32 led_ctrl; 1447 + s32 ret_val; 1448 + u16 phy_data; 1449 1449 1450 1450 DEBUGFUNC("e1000_copper_link_igp_setup"); 1451 1451 ··· 1587 1587 * 1588 1588 * hw - Struct containing variables accessed by shared code 1589 1589 *********************************************************************/ 1590 - static int32_t 1590 + static s32 1591 1591 e1000_copper_link_ggp_setup(struct e1000_hw *hw) 1592 1592 { 1593 - int32_t ret_val; 1594 - uint16_t phy_data; 1595 - uint32_t reg_data; 1593 + s32 ret_val; 1594 + u16 phy_data; 1595 + u32 reg_data; 1596 1596 1597 1597 DEBUGFUNC("e1000_copper_link_ggp_setup"); 1598 1598 ··· 1735 1735 * 1736 1736 * hw - Struct containing variables accessed by shared code 1737 1737 *********************************************************************/ 1738 - static int32_t 1738 + static s32 1739 1739 e1000_copper_link_mgp_setup(struct e1000_hw *hw) 1740 1740 { 1741 - int32_t ret_val; 1742 - uint16_t phy_data; 1741 + s32 ret_val; 1742 + u16 phy_data; 1743 1743 1744 1744 DEBUGFUNC("e1000_copper_link_mgp_setup"); 1745 1745 ··· 1839 1839 * 1840 1840 * hw - Struct containing variables accessed by shared code 1841 1841 *********************************************************************/ 1842 - static int32_t 1842 + static s32 1843 1843 e1000_copper_link_autoneg(struct e1000_hw *hw) 1844 1844 { 1845 - int32_t ret_val; 1846 - uint16_t phy_data; 1845 + s32 ret_val; 1846 + u16 phy_data; 1847 1847 1848 1848 DEBUGFUNC("e1000_copper_link_autoneg"); 1849 1849 ··· 1910 1910 * 1911 1911 * hw - Struct containing variables accessed by shared code 1912 1912 ******************************************************************************/ 1913 - static int32_t 1913 + static s32 1914 1914 e1000_copper_link_postconfig(struct e1000_hw *hw) 1915 1915 { 1916 - int32_t ret_val; 1916 + s32 ret_val; 1917 1917 DEBUGFUNC("e1000_copper_link_postconfig"); 1918 1918 1919 1919 if (hw->mac_type >= e1000_82544) { ··· 1948 1948 * 1949 1949 * hw - Struct containing variables accessed by shared code 1950 1950 ******************************************************************************/ 1951 - static int32_t 1951 + static s32 1952 1952 e1000_setup_copper_link(struct e1000_hw *hw) 1953 1953 { 1954 - int32_t ret_val; 1955 - uint16_t i; 1956 - uint16_t phy_data; 1957 - uint16_t reg_data; 1954 + s32 ret_val; 1955 + u16 i; 1956 + u16 phy_data; 1957 + u16 reg_data; 1958 1958 1959 1959 DEBUGFUNC("e1000_setup_copper_link"); 1960 1960 ··· 2062 2062 * 2063 2063 * hw - Struct containing variables accessed by shared code 2064 2064 ******************************************************************************/ 2065 - static int32_t 2066 - e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, uint16_t duplex) 2065 + static s32 2066 + e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex) 2067 2067 { 2068 - int32_t ret_val = E1000_SUCCESS; 2069 - uint32_t tipg; 2070 - uint16_t reg_data; 2068 + s32 ret_val = E1000_SUCCESS; 2069 + u32 tipg; 2070 + u16 reg_data; 2071 2071 2072 2072 DEBUGFUNC("e1000_configure_kmrn_for_10_100"); 2073 2073 ··· 2098 2098 return ret_val; 2099 2099 } 2100 2100 2101 - static int32_t 2101 + static s32 2102 2102 e1000_configure_kmrn_for_1000(struct e1000_hw *hw) 2103 2103 { 2104 - int32_t ret_val = E1000_SUCCESS; 2105 - uint16_t reg_data; 2106 - uint32_t tipg; 2104 + s32 ret_val = E1000_SUCCESS; 2105 + u16 reg_data; 2106 + u32 tipg; 2107 2107 2108 2108 DEBUGFUNC("e1000_configure_kmrn_for_1000"); 2109 2109 ··· 2135 2135 * 2136 2136 * hw - Struct containing variables accessed by shared code 2137 2137 ******************************************************************************/ 2138 - int32_t 2138 + s32 2139 2139 e1000_phy_setup_autoneg(struct e1000_hw *hw) 2140 2140 { 2141 - int32_t ret_val; 2142 - uint16_t mii_autoneg_adv_reg; 2143 - uint16_t mii_1000t_ctrl_reg; 2141 + s32 ret_val; 2142 + u16 mii_autoneg_adv_reg; 2143 + u16 mii_1000t_ctrl_reg; 2144 2144 2145 2145 DEBUGFUNC("e1000_phy_setup_autoneg"); 2146 2146 ··· 2284 2284 * 2285 2285 * hw - Struct containing variables accessed by shared code 2286 2286 ******************************************************************************/ 2287 - static int32_t 2287 + static s32 2288 2288 e1000_phy_force_speed_duplex(struct e1000_hw *hw) 2289 2289 { 2290 - uint32_t ctrl; 2291 - int32_t ret_val; 2292 - uint16_t mii_ctrl_reg; 2293 - uint16_t mii_status_reg; 2294 - uint16_t phy_data; 2295 - uint16_t i; 2290 + u32 ctrl; 2291 + s32 ret_val; 2292 + u16 mii_ctrl_reg; 2293 + u16 mii_status_reg; 2294 + u16 phy_data; 2295 + u16 i; 2296 2296 2297 2297 DEBUGFUNC("e1000_phy_force_speed_duplex"); 2298 2298 ··· 2538 2538 void 2539 2539 e1000_config_collision_dist(struct e1000_hw *hw) 2540 2540 { 2541 - uint32_t tctl, coll_dist; 2541 + u32 tctl, coll_dist; 2542 2542 2543 2543 DEBUGFUNC("e1000_config_collision_dist"); 2544 2544 ··· 2565 2565 * The contents of the PHY register containing the needed information need to 2566 2566 * be passed in. 2567 2567 ******************************************************************************/ 2568 - static int32_t 2568 + static s32 2569 2569 e1000_config_mac_to_phy(struct e1000_hw *hw) 2570 2570 { 2571 - uint32_t ctrl; 2572 - int32_t ret_val; 2573 - uint16_t phy_data; 2571 + u32 ctrl; 2572 + s32 ret_val; 2573 + u16 phy_data; 2574 2574 2575 2575 DEBUGFUNC("e1000_config_mac_to_phy"); 2576 2576 ··· 2624 2624 * by the PHY rather than the MAC. Software must also configure these 2625 2625 * bits when link is forced on a fiber connection. 2626 2626 *****************************************************************************/ 2627 - int32_t 2627 + s32 2628 2628 e1000_force_mac_fc(struct e1000_hw *hw) 2629 2629 { 2630 - uint32_t ctrl; 2630 + u32 ctrl; 2631 2631 2632 2632 DEBUGFUNC("e1000_force_mac_fc"); 2633 2633 ··· 2691 2691 * based on the flow control negotiated by the PHY. In TBI mode, the TFCE 2692 2692 * and RFCE bits will be automaticaly set to the negotiated flow control mode. 2693 2693 *****************************************************************************/ 2694 - static int32_t 2694 + static s32 2695 2695 e1000_config_fc_after_link_up(struct e1000_hw *hw) 2696 2696 { 2697 - int32_t ret_val; 2698 - uint16_t mii_status_reg; 2699 - uint16_t mii_nway_adv_reg; 2700 - uint16_t mii_nway_lp_ability_reg; 2701 - uint16_t speed; 2702 - uint16_t duplex; 2697 + s32 ret_val; 2698 + u16 mii_status_reg; 2699 + u16 mii_nway_adv_reg; 2700 + u16 mii_nway_lp_ability_reg; 2701 + u16 speed; 2702 + u16 duplex; 2703 2703 2704 2704 DEBUGFUNC("e1000_config_fc_after_link_up"); 2705 2705 ··· 2896 2896 * 2897 2897 * Called by any function that needs to check the link status of the adapter. 2898 2898 *****************************************************************************/ 2899 - int32_t 2899 + s32 2900 2900 e1000_check_for_link(struct e1000_hw *hw) 2901 2901 { 2902 - uint32_t rxcw = 0; 2903 - uint32_t ctrl; 2904 - uint32_t status; 2905 - uint32_t rctl; 2906 - uint32_t icr; 2907 - uint32_t signal = 0; 2908 - int32_t ret_val; 2909 - uint16_t phy_data; 2902 + u32 rxcw = 0; 2903 + u32 ctrl; 2904 + u32 status; 2905 + u32 rctl; 2906 + u32 icr; 2907 + u32 signal = 0; 2908 + s32 ret_val; 2909 + u16 phy_data; 2910 2910 2911 2911 DEBUGFUNC("e1000_check_for_link"); 2912 2912 ··· 3022 3022 * at gigabit speed, we turn on TBI compatibility. 3023 3023 */ 3024 3024 if (hw->tbi_compatibility_en) { 3025 - uint16_t speed, duplex; 3025 + u16 speed, duplex; 3026 3026 ret_val = e1000_get_speed_and_duplex(hw, &speed, &duplex); 3027 3027 if (ret_val) { 3028 3028 DEBUGOUT("Error getting link speed and duplex\n"); ··· 3132 3132 * speed - Speed of the connection 3133 3133 * duplex - Duplex setting of the connection 3134 3134 *****************************************************************************/ 3135 - int32_t 3135 + s32 3136 3136 e1000_get_speed_and_duplex(struct e1000_hw *hw, 3137 - uint16_t *speed, 3138 - uint16_t *duplex) 3137 + u16 *speed, 3138 + u16 *duplex) 3139 3139 { 3140 - uint32_t status; 3141 - int32_t ret_val; 3142 - uint16_t phy_data; 3140 + u32 status; 3141 + s32 ret_val; 3142 + u16 phy_data; 3143 3143 3144 3144 DEBUGFUNC("e1000_get_speed_and_duplex"); 3145 3145 ··· 3214 3214 * 3215 3215 * hw - Struct containing variables accessed by shared code 3216 3216 ******************************************************************************/ 3217 - static int32_t 3217 + static s32 3218 3218 e1000_wait_autoneg(struct e1000_hw *hw) 3219 3219 { 3220 - int32_t ret_val; 3221 - uint16_t i; 3222 - uint16_t phy_data; 3220 + s32 ret_val; 3221 + u16 i; 3222 + u16 phy_data; 3223 3223 3224 3224 DEBUGFUNC("e1000_wait_autoneg"); 3225 3225 DEBUGOUT("Waiting for Auto-Neg to complete.\n"); ··· 3251 3251 ******************************************************************************/ 3252 3252 static void 3253 3253 e1000_raise_mdi_clk(struct e1000_hw *hw, 3254 - uint32_t *ctrl) 3254 + u32 *ctrl) 3255 3255 { 3256 3256 /* Raise the clock input to the Management Data Clock (by setting the MDC 3257 3257 * bit), and then delay 10 microseconds. ··· 3269 3269 ******************************************************************************/ 3270 3270 static void 3271 3271 e1000_lower_mdi_clk(struct e1000_hw *hw, 3272 - uint32_t *ctrl) 3272 + u32 *ctrl) 3273 3273 { 3274 3274 /* Lower the clock input to the Management Data Clock (by clearing the MDC 3275 3275 * bit), and then delay 10 microseconds. ··· 3290 3290 ******************************************************************************/ 3291 3291 static void 3292 3292 e1000_shift_out_mdi_bits(struct e1000_hw *hw, 3293 - uint32_t data, 3294 - uint16_t count) 3293 + u32 data, 3294 + u16 count) 3295 3295 { 3296 - uint32_t ctrl; 3297 - uint32_t mask; 3296 + u32 ctrl; 3297 + u32 mask; 3298 3298 3299 3299 /* We need to shift "count" number of bits out to the PHY. So, the value 3300 3300 * in the "data" parameter will be shifted out to the PHY one bit at a ··· 3338 3338 * 3339 3339 * Bits are shifted in in MSB to LSB order. 3340 3340 ******************************************************************************/ 3341 - static uint16_t 3341 + static u16 3342 3342 e1000_shift_in_mdi_bits(struct e1000_hw *hw) 3343 3343 { 3344 - uint32_t ctrl; 3345 - uint16_t data = 0; 3346 - uint8_t i; 3344 + u32 ctrl; 3345 + u16 data = 0; 3346 + u8 i; 3347 3347 3348 3348 /* In order to read a register from the PHY, we need to shift in a total 3349 3349 * of 18 bits from the PHY. The first two bit (turnaround) times are used ··· 3384 3384 return data; 3385 3385 } 3386 3386 3387 - static int32_t 3388 - e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask) 3387 + static s32 3388 + e1000_swfw_sync_acquire(struct e1000_hw *hw, u16 mask) 3389 3389 { 3390 - uint32_t swfw_sync = 0; 3391 - uint32_t swmask = mask; 3392 - uint32_t fwmask = mask << 16; 3393 - int32_t timeout = 200; 3390 + u32 swfw_sync = 0; 3391 + u32 swmask = mask; 3392 + u32 fwmask = mask << 16; 3393 + s32 timeout = 200; 3394 3394 3395 3395 DEBUGFUNC("e1000_swfw_sync_acquire"); 3396 3396 ··· 3429 3429 } 3430 3430 3431 3431 static void 3432 - e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask) 3432 + e1000_swfw_sync_release(struct e1000_hw *hw, u16 mask) 3433 3433 { 3434 - uint32_t swfw_sync; 3435 - uint32_t swmask = mask; 3434 + u32 swfw_sync; 3435 + u32 swmask = mask; 3436 3436 3437 3437 DEBUGFUNC("e1000_swfw_sync_release"); 3438 3438 ··· 3464 3464 * hw - Struct containing variables accessed by shared code 3465 3465 * reg_addr - address of the PHY register to read 3466 3466 ******************************************************************************/ 3467 - int32_t 3467 + s32 3468 3468 e1000_read_phy_reg(struct e1000_hw *hw, 3469 - uint32_t reg_addr, 3470 - uint16_t *phy_data) 3469 + u32 reg_addr, 3470 + u16 *phy_data) 3471 3471 { 3472 - uint32_t ret_val; 3473 - uint16_t swfw; 3472 + u32 ret_val; 3473 + u16 swfw; 3474 3474 3475 3475 DEBUGFUNC("e1000_read_phy_reg"); 3476 3476 ··· 3488 3488 hw->phy_type == e1000_phy_igp_2) && 3489 3489 (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { 3490 3490 ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, 3491 - (uint16_t)reg_addr); 3491 + (u16)reg_addr); 3492 3492 if (ret_val) { 3493 3493 e1000_swfw_sync_release(hw, swfw); 3494 3494 return ret_val; ··· 3499 3499 /* Select Configuration Page */ 3500 3500 if ((reg_addr & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) { 3501 3501 ret_val = e1000_write_phy_reg_ex(hw, GG82563_PHY_PAGE_SELECT, 3502 - (uint16_t)((uint16_t)reg_addr >> GG82563_PAGE_SHIFT)); 3502 + (u16)((u16)reg_addr >> GG82563_PAGE_SHIFT)); 3503 3503 } else { 3504 3504 /* Use Alternative Page Select register to access 3505 3505 * registers 30 and 31 3506 3506 */ 3507 3507 ret_val = e1000_write_phy_reg_ex(hw, 3508 3508 GG82563_PHY_PAGE_SELECT_ALT, 3509 - (uint16_t)((uint16_t)reg_addr >> GG82563_PAGE_SHIFT)); 3509 + (u16)((u16)reg_addr >> GG82563_PAGE_SHIFT)); 3510 3510 } 3511 3511 3512 3512 if (ret_val) { ··· 3523 3523 return ret_val; 3524 3524 } 3525 3525 3526 - static int32_t 3527 - e1000_read_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, 3528 - uint16_t *phy_data) 3526 + static s32 3527 + e1000_read_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr, 3528 + u16 *phy_data) 3529 3529 { 3530 - uint32_t i; 3531 - uint32_t mdic = 0; 3532 - const uint32_t phy_addr = 1; 3530 + u32 i; 3531 + u32 mdic = 0; 3532 + const u32 phy_addr = 1; 3533 3533 3534 3534 DEBUGFUNC("e1000_read_phy_reg_ex"); 3535 3535 ··· 3563 3563 DEBUGOUT("MDI Error\n"); 3564 3564 return -E1000_ERR_PHY; 3565 3565 } 3566 - *phy_data = (uint16_t) mdic; 3566 + *phy_data = (u16) mdic; 3567 3567 } else { 3568 3568 /* We must first send a preamble through the MDIO pin to signal the 3569 3569 * beginning of an MII instruction. This is done by sending 32 ··· 3603 3603 * reg_addr - address of the PHY register to write 3604 3604 * data - data to write to the PHY 3605 3605 ******************************************************************************/ 3606 - int32_t 3607 - e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, 3608 - uint16_t phy_data) 3606 + s32 3607 + e1000_write_phy_reg(struct e1000_hw *hw, u32 reg_addr, 3608 + u16 phy_data) 3609 3609 { 3610 - uint32_t ret_val; 3611 - uint16_t swfw; 3610 + u32 ret_val; 3611 + u16 swfw; 3612 3612 3613 3613 DEBUGFUNC("e1000_write_phy_reg"); 3614 3614 ··· 3626 3626 hw->phy_type == e1000_phy_igp_2) && 3627 3627 (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { 3628 3628 ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, 3629 - (uint16_t)reg_addr); 3629 + (u16)reg_addr); 3630 3630 if (ret_val) { 3631 3631 e1000_swfw_sync_release(hw, swfw); 3632 3632 return ret_val; ··· 3637 3637 /* Select Configuration Page */ 3638 3638 if ((reg_addr & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) { 3639 3639 ret_val = e1000_write_phy_reg_ex(hw, GG82563_PHY_PAGE_SELECT, 3640 - (uint16_t)((uint16_t)reg_addr >> GG82563_PAGE_SHIFT)); 3640 + (u16)((u16)reg_addr >> GG82563_PAGE_SHIFT)); 3641 3641 } else { 3642 3642 /* Use Alternative Page Select register to access 3643 3643 * registers 30 and 31 3644 3644 */ 3645 3645 ret_val = e1000_write_phy_reg_ex(hw, 3646 3646 GG82563_PHY_PAGE_SELECT_ALT, 3647 - (uint16_t)((uint16_t)reg_addr >> GG82563_PAGE_SHIFT)); 3647 + (u16)((u16)reg_addr >> GG82563_PAGE_SHIFT)); 3648 3648 } 3649 3649 3650 3650 if (ret_val) { ··· 3661 3661 return ret_val; 3662 3662 } 3663 3663 3664 - static int32_t 3665 - e1000_write_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, 3666 - uint16_t phy_data) 3664 + static s32 3665 + e1000_write_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr, 3666 + u16 phy_data) 3667 3667 { 3668 - uint32_t i; 3669 - uint32_t mdic = 0; 3670 - const uint32_t phy_addr = 1; 3668 + u32 i; 3669 + u32 mdic = 0; 3670 + const u32 phy_addr = 1; 3671 3671 3672 3672 DEBUGFUNC("e1000_write_phy_reg_ex"); 3673 3673 ··· 3681 3681 * for the PHY register in the MDI Control register. The MAC will take 3682 3682 * care of interfacing with the PHY to send the desired data. 3683 3683 */ 3684 - mdic = (((uint32_t) phy_data) | 3684 + mdic = (((u32) phy_data) | 3685 3685 (reg_addr << E1000_MDIC_REG_SHIFT) | 3686 3686 (phy_addr << E1000_MDIC_PHY_SHIFT) | 3687 3687 (E1000_MDIC_OP_WRITE)); ··· 3715 3715 mdic = ((PHY_TURNAROUND) | (reg_addr << 2) | (phy_addr << 7) | 3716 3716 (PHY_OP_WRITE << 12) | (PHY_SOF << 14)); 3717 3717 mdic <<= 16; 3718 - mdic |= (uint32_t) phy_data; 3718 + mdic |= (u32) phy_data; 3719 3719 3720 3720 e1000_shift_out_mdi_bits(hw, mdic, 32); 3721 3721 } ··· 3723 3723 return E1000_SUCCESS; 3724 3724 } 3725 3725 3726 - static int32_t 3726 + static s32 3727 3727 e1000_read_kmrn_reg(struct e1000_hw *hw, 3728 - uint32_t reg_addr, 3729 - uint16_t *data) 3728 + u32 reg_addr, 3729 + u16 *data) 3730 3730 { 3731 - uint32_t reg_val; 3732 - uint16_t swfw; 3731 + u32 reg_val; 3732 + u16 swfw; 3733 3733 DEBUGFUNC("e1000_read_kmrn_reg"); 3734 3734 3735 3735 if ((hw->mac_type == e1000_80003es2lan) && ··· 3750 3750 3751 3751 /* Read the data returned */ 3752 3752 reg_val = E1000_READ_REG(hw, KUMCTRLSTA); 3753 - *data = (uint16_t)reg_val; 3753 + *data = (u16)reg_val; 3754 3754 3755 3755 e1000_swfw_sync_release(hw, swfw); 3756 3756 return E1000_SUCCESS; 3757 3757 } 3758 3758 3759 - static int32_t 3759 + static s32 3760 3760 e1000_write_kmrn_reg(struct e1000_hw *hw, 3761 - uint32_t reg_addr, 3762 - uint16_t data) 3761 + u32 reg_addr, 3762 + u16 data) 3763 3763 { 3764 - uint32_t reg_val; 3765 - uint16_t swfw; 3764 + u32 reg_val; 3765 + u16 swfw; 3766 3766 DEBUGFUNC("e1000_write_kmrn_reg"); 3767 3767 3768 3768 if ((hw->mac_type == e1000_80003es2lan) && ··· 3788 3788 * 3789 3789 * hw - Struct containing variables accessed by shared code 3790 3790 ******************************************************************************/ 3791 - int32_t 3791 + s32 3792 3792 e1000_phy_hw_reset(struct e1000_hw *hw) 3793 3793 { 3794 - uint32_t ctrl, ctrl_ext; 3795 - uint32_t led_ctrl; 3796 - int32_t ret_val; 3797 - uint16_t swfw; 3794 + u32 ctrl, ctrl_ext; 3795 + u32 led_ctrl; 3796 + s32 ret_val; 3797 + u16 swfw; 3798 3798 3799 3799 DEBUGFUNC("e1000_phy_hw_reset"); 3800 3800 ··· 3882 3882 * 3883 3883 * Sets bit 15 of the MII Control register 3884 3884 ******************************************************************************/ 3885 - int32_t 3885 + s32 3886 3886 e1000_phy_reset(struct e1000_hw *hw) 3887 3887 { 3888 - int32_t ret_val; 3889 - uint16_t phy_data; 3888 + s32 ret_val; 3889 + u16 phy_data; 3890 3890 3891 3891 DEBUGFUNC("e1000_phy_reset"); 3892 3892 ··· 3937 3937 void 3938 3938 e1000_phy_powerdown_workaround(struct e1000_hw *hw) 3939 3939 { 3940 - int32_t reg; 3941 - uint16_t phy_data; 3942 - int32_t retry = 0; 3940 + s32 reg; 3941 + u16 phy_data; 3942 + s32 retry = 0; 3943 3943 3944 3944 DEBUGFUNC("e1000_phy_powerdown_workaround"); 3945 3945 ··· 3987 3987 * 3988 3988 * hw - struct containing variables accessed by shared code 3989 3989 ******************************************************************************/ 3990 - static int32_t 3990 + static s32 3991 3991 e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw) 3992 3992 { 3993 - int32_t ret_val; 3994 - int32_t reg; 3995 - int32_t cnt; 3996 - uint16_t phy_data; 3993 + s32 ret_val; 3994 + s32 reg; 3995 + s32 cnt; 3996 + u16 phy_data; 3997 3997 3998 3998 if (hw->kmrn_lock_loss_workaround_disabled) 3999 3999 return E1000_SUCCESS; ··· 4040 4040 * 4041 4041 * hw - Struct containing variables accessed by shared code 4042 4042 ******************************************************************************/ 4043 - static int32_t 4043 + static s32 4044 4044 e1000_detect_gig_phy(struct e1000_hw *hw) 4045 4045 { 4046 - int32_t phy_init_status, ret_val; 4047 - uint16_t phy_id_high, phy_id_low; 4046 + s32 phy_init_status, ret_val; 4047 + u16 phy_id_high, phy_id_low; 4048 4048 bool match = false; 4049 4049 4050 4050 DEBUGFUNC("e1000_detect_gig_phy"); ··· 4076 4076 if (ret_val) 4077 4077 return ret_val; 4078 4078 4079 - hw->phy_id = (uint32_t) (phy_id_high << 16); 4079 + hw->phy_id = (u32) (phy_id_high << 16); 4080 4080 udelay(20); 4081 4081 ret_val = e1000_read_phy_reg(hw, PHY_ID2, &phy_id_low); 4082 4082 if (ret_val) 4083 4083 return ret_val; 4084 4084 4085 - hw->phy_id |= (uint32_t) (phy_id_low & PHY_REVISION_MASK); 4086 - hw->phy_revision = (uint32_t) phy_id_low & ~PHY_REVISION_MASK; 4085 + hw->phy_id |= (u32) (phy_id_low & PHY_REVISION_MASK); 4086 + hw->phy_revision = (u32) phy_id_low & ~PHY_REVISION_MASK; 4087 4087 4088 4088 switch (hw->mac_type) { 4089 4089 case e1000_82543: ··· 4136 4136 * 4137 4137 * hw - Struct containing variables accessed by shared code 4138 4138 ******************************************************************************/ 4139 - static int32_t 4139 + static s32 4140 4140 e1000_phy_reset_dsp(struct e1000_hw *hw) 4141 4141 { 4142 - int32_t ret_val; 4142 + s32 ret_val; 4143 4143 DEBUGFUNC("e1000_phy_reset_dsp"); 4144 4144 4145 4145 do { ··· 4163 4163 * hw - Struct containing variables accessed by shared code 4164 4164 * phy_info - PHY information structure 4165 4165 ******************************************************************************/ 4166 - static int32_t 4166 + static s32 4167 4167 e1000_phy_igp_get_info(struct e1000_hw *hw, 4168 4168 struct e1000_phy_info *phy_info) 4169 4169 { 4170 - int32_t ret_val; 4171 - uint16_t phy_data, min_length, max_length, average; 4170 + s32 ret_val; 4171 + u16 phy_data, min_length, max_length, average; 4172 4172 e1000_rev_polarity polarity; 4173 4173 4174 4174 DEBUGFUNC("e1000_phy_igp_get_info"); ··· 4240 4240 * hw - Struct containing variables accessed by shared code 4241 4241 * phy_info - PHY information structure 4242 4242 ******************************************************************************/ 4243 - static int32_t 4243 + static s32 4244 4244 e1000_phy_ife_get_info(struct e1000_hw *hw, 4245 4245 struct e1000_phy_info *phy_info) 4246 4246 { 4247 - int32_t ret_val; 4248 - uint16_t phy_data; 4247 + s32 ret_val; 4248 + u16 phy_data; 4249 4249 e1000_rev_polarity polarity; 4250 4250 4251 4251 DEBUGFUNC("e1000_phy_ife_get_info"); ··· 4290 4290 * hw - Struct containing variables accessed by shared code 4291 4291 * phy_info - PHY information structure 4292 4292 ******************************************************************************/ 4293 - static int32_t 4293 + static s32 4294 4294 e1000_phy_m88_get_info(struct e1000_hw *hw, 4295 4295 struct e1000_phy_info *phy_info) 4296 4296 { 4297 - int32_t ret_val; 4298 - uint16_t phy_data; 4297 + s32 ret_val; 4298 + u16 phy_data; 4299 4299 e1000_rev_polarity polarity; 4300 4300 4301 4301 DEBUGFUNC("e1000_phy_m88_get_info"); ··· 4369 4369 * hw - Struct containing variables accessed by shared code 4370 4370 * phy_info - PHY information structure 4371 4371 ******************************************************************************/ 4372 - int32_t 4372 + s32 4373 4373 e1000_phy_get_info(struct e1000_hw *hw, 4374 4374 struct e1000_phy_info *phy_info) 4375 4375 { 4376 - int32_t ret_val; 4377 - uint16_t phy_data; 4376 + s32 ret_val; 4377 + u16 phy_data; 4378 4378 4379 4379 DEBUGFUNC("e1000_phy_get_info"); 4380 4380 ··· 4415 4415 return e1000_phy_m88_get_info(hw, phy_info); 4416 4416 } 4417 4417 4418 - int32_t 4418 + s32 4419 4419 e1000_validate_mdi_setting(struct e1000_hw *hw) 4420 4420 { 4421 4421 DEBUGFUNC("e1000_validate_mdi_settings"); ··· 4436 4436 * 4437 4437 * hw - Struct containing variables accessed by shared code 4438 4438 *****************************************************************************/ 4439 - int32_t 4439 + s32 4440 4440 e1000_init_eeprom_params(struct e1000_hw *hw) 4441 4441 { 4442 4442 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4443 - uint32_t eecd = E1000_READ_REG(hw, EECD); 4444 - int32_t ret_val = E1000_SUCCESS; 4445 - uint16_t eeprom_size; 4443 + u32 eecd = E1000_READ_REG(hw, EECD); 4444 + s32 ret_val = E1000_SUCCESS; 4445 + u16 eeprom_size; 4446 4446 4447 4447 DEBUGFUNC("e1000_init_eeprom_params"); 4448 4448 ··· 4561 4561 break; 4562 4562 case e1000_ich8lan: 4563 4563 { 4564 - int32_t i = 0; 4565 - uint32_t flash_size = E1000_READ_ICH_FLASH_REG(hw, ICH_FLASH_GFPREG); 4564 + s32 i = 0; 4565 + u32 flash_size = E1000_READ_ICH_FLASH_REG(hw, ICH_FLASH_GFPREG); 4566 4566 4567 4567 eeprom->type = e1000_eeprom_ich8; 4568 4568 eeprom->use_eerd = false; ··· 4586 4586 4587 4587 hw->flash_bank_size *= ICH_FLASH_SECTOR_SIZE; 4588 4588 4589 - hw->flash_bank_size /= 2 * sizeof(uint16_t); 4589 + hw->flash_bank_size /= 2 * sizeof(u16); 4590 4590 4591 4591 break; 4592 4592 } ··· 4611 4611 if (eeprom_size) 4612 4612 eeprom_size++; 4613 4613 } else { 4614 - eeprom_size = (uint16_t)((eecd & E1000_EECD_SIZE_EX_MASK) >> 4614 + eeprom_size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> 4615 4615 E1000_EECD_SIZE_EX_SHIFT); 4616 4616 } 4617 4617 ··· 4628 4628 *****************************************************************************/ 4629 4629 static void 4630 4630 e1000_raise_ee_clk(struct e1000_hw *hw, 4631 - uint32_t *eecd) 4631 + u32 *eecd) 4632 4632 { 4633 4633 /* Raise the clock input to the EEPROM (by setting the SK bit), and then 4634 4634 * wait <delay> microseconds. ··· 4647 4647 *****************************************************************************/ 4648 4648 static void 4649 4649 e1000_lower_ee_clk(struct e1000_hw *hw, 4650 - uint32_t *eecd) 4650 + u32 *eecd) 4651 4651 { 4652 4652 /* Lower the clock input to the EEPROM (by clearing the SK bit), and then 4653 4653 * wait 50 microseconds. ··· 4667 4667 *****************************************************************************/ 4668 4668 static void 4669 4669 e1000_shift_out_ee_bits(struct e1000_hw *hw, 4670 - uint16_t data, 4671 - uint16_t count) 4670 + u16 data, 4671 + u16 count) 4672 4672 { 4673 4673 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4674 - uint32_t eecd; 4675 - uint32_t mask; 4674 + u32 eecd; 4675 + u32 mask; 4676 4676 4677 4677 /* We need to shift "count" bits out to the EEPROM. So, value in the 4678 4678 * "data" parameter will be shifted out to the EEPROM one bit at a time. ··· 4718 4718 * 4719 4719 * hw - Struct containing variables accessed by shared code 4720 4720 *****************************************************************************/ 4721 - static uint16_t 4721 + static u16 4722 4722 e1000_shift_in_ee_bits(struct e1000_hw *hw, 4723 - uint16_t count) 4723 + u16 count) 4724 4724 { 4725 - uint32_t eecd; 4726 - uint32_t i; 4727 - uint16_t data; 4725 + u32 eecd; 4726 + u32 i; 4727 + u16 data; 4728 4728 4729 4729 /* In order to read a register from the EEPROM, we need to shift 'count' 4730 4730 * bits in from the EEPROM. Bits are "shifted in" by raising the clock ··· 4762 4762 * Lowers EEPROM clock. Clears input pin. Sets the chip select pin. This 4763 4763 * function should be called before issuing a command to the EEPROM. 4764 4764 *****************************************************************************/ 4765 - static int32_t 4765 + static s32 4766 4766 e1000_acquire_eeprom(struct e1000_hw *hw) 4767 4767 { 4768 4768 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4769 - uint32_t eecd, i=0; 4769 + u32 eecd, i=0; 4770 4770 4771 4771 DEBUGFUNC("e1000_acquire_eeprom"); 4772 4772 ··· 4825 4825 e1000_standby_eeprom(struct e1000_hw *hw) 4826 4826 { 4827 4827 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4828 - uint32_t eecd; 4828 + u32 eecd; 4829 4829 4830 4830 eecd = E1000_READ_REG(hw, EECD); 4831 4831 ··· 4873 4873 static void 4874 4874 e1000_release_eeprom(struct e1000_hw *hw) 4875 4875 { 4876 - uint32_t eecd; 4876 + u32 eecd; 4877 4877 4878 4878 DEBUGFUNC("e1000_release_eeprom"); 4879 4879 ··· 4921 4921 * 4922 4922 * hw - Struct containing variables accessed by shared code 4923 4923 *****************************************************************************/ 4924 - static int32_t 4924 + static s32 4925 4925 e1000_spi_eeprom_ready(struct e1000_hw *hw) 4926 4926 { 4927 - uint16_t retry_count = 0; 4928 - uint8_t spi_stat_reg; 4927 + u16 retry_count = 0; 4928 + u8 spi_stat_reg; 4929 4929 4930 4930 DEBUGFUNC("e1000_spi_eeprom_ready"); 4931 4931 ··· 4938 4938 do { 4939 4939 e1000_shift_out_ee_bits(hw, EEPROM_RDSR_OPCODE_SPI, 4940 4940 hw->eeprom.opcode_bits); 4941 - spi_stat_reg = (uint8_t)e1000_shift_in_ee_bits(hw, 8); 4941 + spi_stat_reg = (u8)e1000_shift_in_ee_bits(hw, 8); 4942 4942 if (!(spi_stat_reg & EEPROM_STATUS_RDY_SPI)) 4943 4943 break; 4944 4944 ··· 4967 4967 * data - word read from the EEPROM 4968 4968 * words - number of words to read 4969 4969 *****************************************************************************/ 4970 - int32_t 4970 + s32 4971 4971 e1000_read_eeprom(struct e1000_hw *hw, 4972 - uint16_t offset, 4973 - uint16_t words, 4974 - uint16_t *data) 4972 + u16 offset, 4973 + u16 words, 4974 + u16 *data) 4975 4975 { 4976 4976 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4977 - uint32_t i = 0; 4977 + u32 i = 0; 4978 4978 4979 4979 DEBUGFUNC("e1000_read_eeprom"); 4980 4980 ··· 5012 5012 /* Set up the SPI or Microwire EEPROM for bit-bang reading. We have 5013 5013 * acquired the EEPROM at this point, so any returns should relase it */ 5014 5014 if (eeprom->type == e1000_eeprom_spi) { 5015 - uint16_t word_in; 5016 - uint8_t read_opcode = EEPROM_READ_OPCODE_SPI; 5015 + u16 word_in; 5016 + u8 read_opcode = EEPROM_READ_OPCODE_SPI; 5017 5017 5018 5018 if (e1000_spi_eeprom_ready(hw)) { 5019 5019 e1000_release_eeprom(hw); ··· 5028 5028 5029 5029 /* Send the READ command (opcode + addr) */ 5030 5030 e1000_shift_out_ee_bits(hw, read_opcode, eeprom->opcode_bits); 5031 - e1000_shift_out_ee_bits(hw, (uint16_t)(offset*2), eeprom->address_bits); 5031 + e1000_shift_out_ee_bits(hw, (u16)(offset*2), eeprom->address_bits); 5032 5032 5033 5033 /* Read the data. The address of the eeprom internally increments with 5034 5034 * each byte (spi) being read, saving on the overhead of eeprom setup ··· 5044 5044 /* Send the READ command (opcode + addr) */ 5045 5045 e1000_shift_out_ee_bits(hw, EEPROM_READ_OPCODE_MICROWIRE, 5046 5046 eeprom->opcode_bits); 5047 - e1000_shift_out_ee_bits(hw, (uint16_t)(offset + i), 5047 + e1000_shift_out_ee_bits(hw, (u16)(offset + i), 5048 5048 eeprom->address_bits); 5049 5049 5050 5050 /* Read the data. For microwire, each word requires the overhead ··· 5068 5068 * data - word read from the EEPROM 5069 5069 * words - number of words to read 5070 5070 *****************************************************************************/ 5071 - static int32_t 5071 + static s32 5072 5072 e1000_read_eeprom_eerd(struct e1000_hw *hw, 5073 - uint16_t offset, 5074 - uint16_t words, 5075 - uint16_t *data) 5073 + u16 offset, 5074 + u16 words, 5075 + u16 *data) 5076 5076 { 5077 - uint32_t i, eerd = 0; 5078 - int32_t error = 0; 5077 + u32 i, eerd = 0; 5078 + s32 error = 0; 5079 5079 5080 5080 for (i = 0; i < words; i++) { 5081 5081 eerd = ((offset+i) << E1000_EEPROM_RW_ADDR_SHIFT) + ··· 5102 5102 * data - word read from the EEPROM 5103 5103 * words - number of words to read 5104 5104 *****************************************************************************/ 5105 - static int32_t 5105 + static s32 5106 5106 e1000_write_eeprom_eewr(struct e1000_hw *hw, 5107 - uint16_t offset, 5108 - uint16_t words, 5109 - uint16_t *data) 5107 + u16 offset, 5108 + u16 words, 5109 + u16 *data) 5110 5110 { 5111 - uint32_t register_value = 0; 5112 - uint32_t i = 0; 5113 - int32_t error = 0; 5111 + u32 register_value = 0; 5112 + u32 i = 0; 5113 + s32 error = 0; 5114 5114 5115 5115 if (e1000_swfw_sync_acquire(hw, E1000_SWFW_EEP_SM)) 5116 5116 return -E1000_ERR_SWFW_SYNC; ··· 5143 5143 * 5144 5144 * hw - Struct containing variables accessed by shared code 5145 5145 *****************************************************************************/ 5146 - static int32_t 5146 + static s32 5147 5147 e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd) 5148 5148 { 5149 - uint32_t attempts = 100000; 5150 - uint32_t i, reg = 0; 5151 - int32_t done = E1000_ERR_EEPROM; 5149 + u32 attempts = 100000; 5150 + u32 i, reg = 0; 5151 + s32 done = E1000_ERR_EEPROM; 5152 5152 5153 5153 for (i = 0; i < attempts; i++) { 5154 5154 if (eerd == E1000_EEPROM_POLL_READ) ··· 5174 5174 static bool 5175 5175 e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw) 5176 5176 { 5177 - uint32_t eecd = 0; 5177 + u32 eecd = 0; 5178 5178 5179 5179 DEBUGFUNC("e1000_is_onboard_nvm_eeprom"); 5180 5180 ··· 5204 5204 * If the the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is 5205 5205 * valid. 5206 5206 *****************************************************************************/ 5207 - int32_t 5207 + s32 5208 5208 e1000_validate_eeprom_checksum(struct e1000_hw *hw) 5209 5209 { 5210 - uint16_t checksum = 0; 5211 - uint16_t i, eeprom_data; 5210 + u16 checksum = 0; 5211 + u16 i, eeprom_data; 5212 5212 5213 5213 DEBUGFUNC("e1000_validate_eeprom_checksum"); 5214 5214 ··· 5252 5252 checksum += eeprom_data; 5253 5253 } 5254 5254 5255 - if (checksum == (uint16_t) EEPROM_SUM) 5255 + if (checksum == (u16) EEPROM_SUM) 5256 5256 return E1000_SUCCESS; 5257 5257 else { 5258 5258 DEBUGOUT("EEPROM Checksum Invalid\n"); ··· 5268 5268 * Sums the first 63 16 bit words of the EEPROM. Subtracts the sum from 0xBABA. 5269 5269 * Writes the difference to word offset 63 of the EEPROM. 5270 5270 *****************************************************************************/ 5271 - int32_t 5271 + s32 5272 5272 e1000_update_eeprom_checksum(struct e1000_hw *hw) 5273 5273 { 5274 - uint32_t ctrl_ext; 5275 - uint16_t checksum = 0; 5276 - uint16_t i, eeprom_data; 5274 + u32 ctrl_ext; 5275 + u16 checksum = 0; 5276 + u16 i, eeprom_data; 5277 5277 5278 5278 DEBUGFUNC("e1000_update_eeprom_checksum"); 5279 5279 ··· 5284 5284 } 5285 5285 checksum += eeprom_data; 5286 5286 } 5287 - checksum = (uint16_t) EEPROM_SUM - checksum; 5287 + checksum = (u16) EEPROM_SUM - checksum; 5288 5288 if (e1000_write_eeprom(hw, EEPROM_CHECKSUM_REG, 1, &checksum) < 0) { 5289 5289 DEBUGOUT("EEPROM Write Error\n"); 5290 5290 return -E1000_ERR_EEPROM; ··· 5313 5313 * If e1000_update_eeprom_checksum is not called after this function, the 5314 5314 * EEPROM will most likely contain an invalid checksum. 5315 5315 *****************************************************************************/ 5316 - int32_t 5316 + s32 5317 5317 e1000_write_eeprom(struct e1000_hw *hw, 5318 - uint16_t offset, 5319 - uint16_t words, 5320 - uint16_t *data) 5318 + u16 offset, 5319 + u16 words, 5320 + u16 *data) 5321 5321 { 5322 5322 struct e1000_eeprom_info *eeprom = &hw->eeprom; 5323 - int32_t status = 0; 5323 + s32 status = 0; 5324 5324 5325 5325 DEBUGFUNC("e1000_write_eeprom"); 5326 5326 ··· 5370 5370 * data - pointer to array of 8 bit words to be written to the EEPROM 5371 5371 * 5372 5372 *****************************************************************************/ 5373 - static int32_t 5373 + static s32 5374 5374 e1000_write_eeprom_spi(struct e1000_hw *hw, 5375 - uint16_t offset, 5376 - uint16_t words, 5377 - uint16_t *data) 5375 + u16 offset, 5376 + u16 words, 5377 + u16 *data) 5378 5378 { 5379 5379 struct e1000_eeprom_info *eeprom = &hw->eeprom; 5380 - uint16_t widx = 0; 5380 + u16 widx = 0; 5381 5381 5382 5382 DEBUGFUNC("e1000_write_eeprom_spi"); 5383 5383 5384 5384 while (widx < words) { 5385 - uint8_t write_opcode = EEPROM_WRITE_OPCODE_SPI; 5385 + u8 write_opcode = EEPROM_WRITE_OPCODE_SPI; 5386 5386 5387 5387 if (e1000_spi_eeprom_ready(hw)) return -E1000_ERR_EEPROM; 5388 5388 ··· 5401 5401 /* Send the Write command (8-bit opcode + addr) */ 5402 5402 e1000_shift_out_ee_bits(hw, write_opcode, eeprom->opcode_bits); 5403 5403 5404 - e1000_shift_out_ee_bits(hw, (uint16_t)((offset + widx)*2), 5404 + e1000_shift_out_ee_bits(hw, (u16)((offset + widx)*2), 5405 5405 eeprom->address_bits); 5406 5406 5407 5407 /* Send the data */ 5408 5408 5409 5409 /* Loop to allow for up to whole page write (32 bytes) of eeprom */ 5410 5410 while (widx < words) { 5411 - uint16_t word_out = data[widx]; 5411 + u16 word_out = data[widx]; 5412 5412 word_out = (word_out >> 8) | (word_out << 8); 5413 5413 e1000_shift_out_ee_bits(hw, word_out, 16); 5414 5414 widx++; ··· 5436 5436 * data - pointer to array of 16 bit words to be written to the EEPROM 5437 5437 * 5438 5438 *****************************************************************************/ 5439 - static int32_t 5439 + static s32 5440 5440 e1000_write_eeprom_microwire(struct e1000_hw *hw, 5441 - uint16_t offset, 5442 - uint16_t words, 5443 - uint16_t *data) 5441 + u16 offset, 5442 + u16 words, 5443 + u16 *data) 5444 5444 { 5445 5445 struct e1000_eeprom_info *eeprom = &hw->eeprom; 5446 - uint32_t eecd; 5447 - uint16_t words_written = 0; 5448 - uint16_t i = 0; 5446 + u32 eecd; 5447 + u16 words_written = 0; 5448 + u16 i = 0; 5449 5449 5450 5450 DEBUGFUNC("e1000_write_eeprom_microwire"); 5451 5451 ··· 5456 5456 * EEPROM into write/erase mode. 5457 5457 */ 5458 5458 e1000_shift_out_ee_bits(hw, EEPROM_EWEN_OPCODE_MICROWIRE, 5459 - (uint16_t)(eeprom->opcode_bits + 2)); 5459 + (u16)(eeprom->opcode_bits + 2)); 5460 5460 5461 - e1000_shift_out_ee_bits(hw, 0, (uint16_t)(eeprom->address_bits - 2)); 5461 + e1000_shift_out_ee_bits(hw, 0, (u16)(eeprom->address_bits - 2)); 5462 5462 5463 5463 /* Prepare the EEPROM */ 5464 5464 e1000_standby_eeprom(hw); ··· 5468 5468 e1000_shift_out_ee_bits(hw, EEPROM_WRITE_OPCODE_MICROWIRE, 5469 5469 eeprom->opcode_bits); 5470 5470 5471 - e1000_shift_out_ee_bits(hw, (uint16_t)(offset + words_written), 5471 + e1000_shift_out_ee_bits(hw, (u16)(offset + words_written), 5472 5472 eeprom->address_bits); 5473 5473 5474 5474 /* Send the data */ ··· 5506 5506 * EEPROM out of write/erase mode. 5507 5507 */ 5508 5508 e1000_shift_out_ee_bits(hw, EEPROM_EWDS_OPCODE_MICROWIRE, 5509 - (uint16_t)(eeprom->opcode_bits + 2)); 5509 + (u16)(eeprom->opcode_bits + 2)); 5510 5510 5511 - e1000_shift_out_ee_bits(hw, 0, (uint16_t)(eeprom->address_bits - 2)); 5511 + e1000_shift_out_ee_bits(hw, 0, (u16)(eeprom->address_bits - 2)); 5512 5512 5513 5513 return E1000_SUCCESS; 5514 5514 } ··· 5523 5523 * data - word read from the EEPROM 5524 5524 * words - number of words to read 5525 5525 *****************************************************************************/ 5526 - static int32_t 5526 + static s32 5527 5527 e1000_commit_shadow_ram(struct e1000_hw *hw) 5528 5528 { 5529 - uint32_t attempts = 100000; 5530 - uint32_t eecd = 0; 5531 - uint32_t flop = 0; 5532 - uint32_t i = 0; 5533 - int32_t error = E1000_SUCCESS; 5534 - uint32_t old_bank_offset = 0; 5535 - uint32_t new_bank_offset = 0; 5536 - uint8_t low_byte = 0; 5537 - uint8_t high_byte = 0; 5529 + u32 attempts = 100000; 5530 + u32 eecd = 0; 5531 + u32 flop = 0; 5532 + u32 i = 0; 5533 + s32 error = E1000_SUCCESS; 5534 + u32 old_bank_offset = 0; 5535 + u32 new_bank_offset = 0; 5536 + u8 low_byte = 0; 5537 + u8 high_byte = 0; 5538 5538 bool sector_write_failed = false; 5539 5539 5540 5540 if (hw->mac_type == e1000_82573) { ··· 5595 5595 * in the other NVM bank or a modified value stored 5596 5596 * in the shadow RAM */ 5597 5597 if (hw->eeprom_shadow_ram[i].modified) { 5598 - low_byte = (uint8_t)hw->eeprom_shadow_ram[i].eeprom_word; 5598 + low_byte = (u8)hw->eeprom_shadow_ram[i].eeprom_word; 5599 5599 udelay(100); 5600 5600 error = e1000_verify_write_ich8_byte(hw, 5601 5601 (i << 1) + new_bank_offset, low_byte); ··· 5604 5604 sector_write_failed = true; 5605 5605 else { 5606 5606 high_byte = 5607 - (uint8_t)(hw->eeprom_shadow_ram[i].eeprom_word >> 8); 5607 + (u8)(hw->eeprom_shadow_ram[i].eeprom_word >> 8); 5608 5608 udelay(100); 5609 5609 } 5610 5610 } else { ··· 5687 5687 * 5688 5688 * hw - Struct containing variables accessed by shared code 5689 5689 *****************************************************************************/ 5690 - int32_t 5690 + s32 5691 5691 e1000_read_mac_addr(struct e1000_hw * hw) 5692 5692 { 5693 - uint16_t offset; 5694 - uint16_t eeprom_data, i; 5693 + u16 offset; 5694 + u16 eeprom_data, i; 5695 5695 5696 5696 DEBUGFUNC("e1000_read_mac_addr"); 5697 5697 ··· 5701 5701 DEBUGOUT("EEPROM Read Error\n"); 5702 5702 return -E1000_ERR_EEPROM; 5703 5703 } 5704 - hw->perm_mac_addr[i] = (uint8_t) (eeprom_data & 0x00FF); 5705 - hw->perm_mac_addr[i+1] = (uint8_t) (eeprom_data >> 8); 5704 + hw->perm_mac_addr[i] = (u8) (eeprom_data & 0x00FF); 5705 + hw->perm_mac_addr[i+1] = (u8) (eeprom_data >> 8); 5706 5706 } 5707 5707 5708 5708 switch (hw->mac_type) { ··· 5734 5734 static void 5735 5735 e1000_init_rx_addrs(struct e1000_hw *hw) 5736 5736 { 5737 - uint32_t i; 5738 - uint32_t rar_num; 5737 + u32 i; 5738 + u32 rar_num; 5739 5739 5740 5740 DEBUGFUNC("e1000_init_rx_addrs"); 5741 5741 ··· 5770 5770 * hw - Struct containing variables accessed by shared code 5771 5771 * mc_addr - the multicast address to hash 5772 5772 *****************************************************************************/ 5773 - uint32_t 5773 + u32 5774 5774 e1000_hash_mc_addr(struct e1000_hw *hw, 5775 - uint8_t *mc_addr) 5775 + u8 *mc_addr) 5776 5776 { 5777 - uint32_t hash_value = 0; 5777 + u32 hash_value = 0; 5778 5778 5779 5779 /* The portion of the address that is used for the hash table is 5780 5780 * determined by the mc_filter_type setting. ··· 5787 5787 case 0: 5788 5788 if (hw->mac_type == e1000_ich8lan) { 5789 5789 /* [47:38] i.e. 0x158 for above example address */ 5790 - hash_value = ((mc_addr[4] >> 6) | (((uint16_t) mc_addr[5]) << 2)); 5790 + hash_value = ((mc_addr[4] >> 6) | (((u16) mc_addr[5]) << 2)); 5791 5791 } else { 5792 5792 /* [47:36] i.e. 0x563 for above example address */ 5793 - hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4)); 5793 + hash_value = ((mc_addr[4] >> 4) | (((u16) mc_addr[5]) << 4)); 5794 5794 } 5795 5795 break; 5796 5796 case 1: 5797 5797 if (hw->mac_type == e1000_ich8lan) { 5798 5798 /* [46:37] i.e. 0x2B1 for above example address */ 5799 - hash_value = ((mc_addr[4] >> 5) | (((uint16_t) mc_addr[5]) << 3)); 5799 + hash_value = ((mc_addr[4] >> 5) | (((u16) mc_addr[5]) << 3)); 5800 5800 } else { 5801 5801 /* [46:35] i.e. 0xAC6 for above example address */ 5802 - hash_value = ((mc_addr[4] >> 3) | (((uint16_t) mc_addr[5]) << 5)); 5802 + hash_value = ((mc_addr[4] >> 3) | (((u16) mc_addr[5]) << 5)); 5803 5803 } 5804 5804 break; 5805 5805 case 2: 5806 5806 if (hw->mac_type == e1000_ich8lan) { 5807 5807 /*[45:36] i.e. 0x163 for above example address */ 5808 - hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4)); 5808 + hash_value = ((mc_addr[4] >> 4) | (((u16) mc_addr[5]) << 4)); 5809 5809 } else { 5810 5810 /* [45:34] i.e. 0x5D8 for above example address */ 5811 - hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6)); 5811 + hash_value = ((mc_addr[4] >> 2) | (((u16) mc_addr[5]) << 6)); 5812 5812 } 5813 5813 break; 5814 5814 case 3: 5815 5815 if (hw->mac_type == e1000_ich8lan) { 5816 5816 /* [43:34] i.e. 0x18D for above example address */ 5817 - hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6)); 5817 + hash_value = ((mc_addr[4] >> 2) | (((u16) mc_addr[5]) << 6)); 5818 5818 } else { 5819 5819 /* [43:32] i.e. 0x634 for above example address */ 5820 - hash_value = ((mc_addr[4]) | (((uint16_t) mc_addr[5]) << 8)); 5820 + hash_value = ((mc_addr[4]) | (((u16) mc_addr[5]) << 8)); 5821 5821 } 5822 5822 break; 5823 5823 } ··· 5837 5837 *****************************************************************************/ 5838 5838 void 5839 5839 e1000_mta_set(struct e1000_hw *hw, 5840 - uint32_t hash_value) 5840 + u32 hash_value) 5841 5841 { 5842 - uint32_t hash_bit, hash_reg; 5843 - uint32_t mta; 5844 - uint32_t temp; 5842 + u32 hash_bit, hash_reg; 5843 + u32 mta; 5844 + u32 temp; 5845 5845 5846 5846 /* The MTA is a register array of 128 32-bit registers. 5847 5847 * It is treated like an array of 4096 bits. We want to set ··· 5886 5886 *****************************************************************************/ 5887 5887 void 5888 5888 e1000_rar_set(struct e1000_hw *hw, 5889 - uint8_t *addr, 5890 - uint32_t index) 5889 + u8 *addr, 5890 + u32 index) 5891 5891 { 5892 - uint32_t rar_low, rar_high; 5892 + u32 rar_low, rar_high; 5893 5893 5894 5894 /* HW expects these in little endian so we reverse the byte order 5895 5895 * from network order (big endian) to little endian 5896 5896 */ 5897 - rar_low = ((uint32_t) addr[0] | 5898 - ((uint32_t) addr[1] << 8) | 5899 - ((uint32_t) addr[2] << 16) | ((uint32_t) addr[3] << 24)); 5900 - rar_high = ((uint32_t) addr[4] | ((uint32_t) addr[5] << 8)); 5897 + rar_low = ((u32) addr[0] | 5898 + ((u32) addr[1] << 8) | 5899 + ((u32) addr[2] << 16) | ((u32) addr[3] << 24)); 5900 + rar_high = ((u32) addr[4] | ((u32) addr[5] << 8)); 5901 5901 5902 5902 /* Disable Rx and flush all Rx frames before enabling RSS to avoid Rx 5903 5903 * unit hang. ··· 5944 5944 *****************************************************************************/ 5945 5945 void 5946 5946 e1000_write_vfta(struct e1000_hw *hw, 5947 - uint32_t offset, 5948 - uint32_t value) 5947 + u32 offset, 5948 + u32 value) 5949 5949 { 5950 - uint32_t temp; 5950 + u32 temp; 5951 5951 5952 5952 if (hw->mac_type == e1000_ich8lan) 5953 5953 return; ··· 5972 5972 static void 5973 5973 e1000_clear_vfta(struct e1000_hw *hw) 5974 5974 { 5975 - uint32_t offset; 5976 - uint32_t vfta_value = 0; 5977 - uint32_t vfta_offset = 0; 5978 - uint32_t vfta_bit_in_reg = 0; 5975 + u32 offset; 5976 + u32 vfta_value = 0; 5977 + u32 vfta_offset = 0; 5978 + u32 vfta_bit_in_reg = 0; 5979 5979 5980 5980 if (hw->mac_type == e1000_ich8lan) 5981 5981 return; ··· 6003 6003 } 6004 6004 } 6005 6005 6006 - static int32_t 6006 + static s32 6007 6007 e1000_id_led_init(struct e1000_hw * hw) 6008 6008 { 6009 - uint32_t ledctl; 6010 - const uint32_t ledctl_mask = 0x000000FF; 6011 - const uint32_t ledctl_on = E1000_LEDCTL_MODE_LED_ON; 6012 - const uint32_t ledctl_off = E1000_LEDCTL_MODE_LED_OFF; 6013 - uint16_t eeprom_data, i, temp; 6014 - const uint16_t led_mask = 0x0F; 6009 + u32 ledctl; 6010 + const u32 ledctl_mask = 0x000000FF; 6011 + const u32 ledctl_on = E1000_LEDCTL_MODE_LED_ON; 6012 + const u32 ledctl_off = E1000_LEDCTL_MODE_LED_OFF; 6013 + u16 eeprom_data, i, temp; 6014 + const u16 led_mask = 0x0F; 6015 6015 6016 6016 DEBUGFUNC("e1000_id_led_init"); 6017 6017 ··· 6086 6086 * 6087 6087 * hw - Struct containing variables accessed by shared code 6088 6088 *****************************************************************************/ 6089 - int32_t 6089 + s32 6090 6090 e1000_setup_led(struct e1000_hw *hw) 6091 6091 { 6092 - uint32_t ledctl; 6093 - int32_t ret_val = E1000_SUCCESS; 6092 + u32 ledctl; 6093 + s32 ret_val = E1000_SUCCESS; 6094 6094 6095 6095 DEBUGFUNC("e1000_setup_led"); 6096 6096 ··· 6111 6111 if (ret_val) 6112 6112 return ret_val; 6113 6113 ret_val = e1000_write_phy_reg(hw, IGP01E1000_GMII_FIFO, 6114 - (uint16_t)(hw->phy_spd_default & 6114 + (u16)(hw->phy_spd_default & 6115 6115 ~IGP01E1000_GMII_SPD)); 6116 6116 if (ret_val) 6117 6117 return ret_val; ··· 6145 6145 * 6146 6146 * hw - Struct containing variables accessed by shared code 6147 6147 *****************************************************************************/ 6148 - int32_t 6148 + s32 6149 6149 e1000_blink_led_start(struct e1000_hw *hw) 6150 6150 { 6151 - int16_t i; 6152 - uint32_t ledctl_blink = 0; 6151 + s16 i; 6152 + u32 ledctl_blink = 0; 6153 6153 6154 6154 DEBUGFUNC("e1000_id_led_blink_on"); 6155 6155 ··· 6180 6180 * 6181 6181 * hw - Struct containing variables accessed by shared code 6182 6182 *****************************************************************************/ 6183 - int32_t 6183 + s32 6184 6184 e1000_cleanup_led(struct e1000_hw *hw) 6185 6185 { 6186 - int32_t ret_val = E1000_SUCCESS; 6186 + s32 ret_val = E1000_SUCCESS; 6187 6187 6188 6188 DEBUGFUNC("e1000_cleanup_led"); 6189 6189 ··· 6222 6222 * 6223 6223 * hw - Struct containing variables accessed by shared code 6224 6224 *****************************************************************************/ 6225 - int32_t 6225 + s32 6226 6226 e1000_led_on(struct e1000_hw *hw) 6227 6227 { 6228 - uint32_t ctrl = E1000_READ_REG(hw, CTRL); 6228 + u32 ctrl = E1000_READ_REG(hw, CTRL); 6229 6229 6230 6230 DEBUGFUNC("e1000_led_on"); 6231 6231 ··· 6273 6273 * 6274 6274 * hw - Struct containing variables accessed by shared code 6275 6275 *****************************************************************************/ 6276 - int32_t 6276 + s32 6277 6277 e1000_led_off(struct e1000_hw *hw) 6278 6278 { 6279 - uint32_t ctrl = E1000_READ_REG(hw, CTRL); 6279 + u32 ctrl = E1000_READ_REG(hw, CTRL); 6280 6280 6281 6281 DEBUGFUNC("e1000_led_off"); 6282 6282 ··· 6327 6327 static void 6328 6328 e1000_clear_hw_cntrs(struct e1000_hw *hw) 6329 6329 { 6330 - volatile uint32_t temp; 6330 + volatile u32 temp; 6331 6331 6332 6332 temp = E1000_READ_REG(hw, CRCERRS); 6333 6333 temp = E1000_READ_REG(hw, SYMERRS); ··· 6495 6495 void 6496 6496 e1000_tbi_adjust_stats(struct e1000_hw *hw, 6497 6497 struct e1000_hw_stats *stats, 6498 - uint32_t frame_len, 6499 - uint8_t *mac_addr) 6498 + u32 frame_len, 6499 + u8 *mac_addr) 6500 6500 { 6501 - uint64_t carry_bit; 6501 + u64 carry_bit; 6502 6502 6503 6503 /* First adjust the frame length. */ 6504 6504 frame_len--; ··· 6527 6527 * since the test for a multicast frame will test positive on 6528 6528 * a broadcast frame. 6529 6529 */ 6530 - if ((mac_addr[0] == (uint8_t) 0xff) && (mac_addr[1] == (uint8_t) 0xff)) 6530 + if ((mac_addr[0] == (u8) 0xff) && (mac_addr[1] == (u8) 0xff)) 6531 6531 /* Broadcast packet */ 6532 6532 stats->bprc++; 6533 6533 else if (*mac_addr & 0x01) ··· 6573 6573 void 6574 6574 e1000_get_bus_info(struct e1000_hw *hw) 6575 6575 { 6576 - int32_t ret_val; 6577 - uint16_t pci_ex_link_status; 6578 - uint32_t status; 6576 + s32 ret_val; 6577 + u16 pci_ex_link_status; 6578 + u32 status; 6579 6579 6580 6580 switch (hw->mac_type) { 6581 6581 case e1000_82542_rev2_0: ··· 6647 6647 *****************************************************************************/ 6648 6648 static void 6649 6649 e1000_write_reg_io(struct e1000_hw *hw, 6650 - uint32_t offset, 6651 - uint32_t value) 6650 + u32 offset, 6651 + u32 value) 6652 6652 { 6653 6653 unsigned long io_addr = hw->io_base; 6654 6654 unsigned long io_data = hw->io_base + 4; ··· 6672 6672 * register to the minimum and maximum range. 6673 6673 * For IGP phy's, the function calculates the range by the AGC registers. 6674 6674 *****************************************************************************/ 6675 - static int32_t 6675 + static s32 6676 6676 e1000_get_cable_length(struct e1000_hw *hw, 6677 - uint16_t *min_length, 6678 - uint16_t *max_length) 6677 + u16 *min_length, 6678 + u16 *max_length) 6679 6679 { 6680 - int32_t ret_val; 6681 - uint16_t agc_value = 0; 6682 - uint16_t i, phy_data; 6683 - uint16_t cable_length; 6680 + s32 ret_val; 6681 + u16 agc_value = 0; 6682 + u16 i, phy_data; 6683 + u16 cable_length; 6684 6684 6685 6685 DEBUGFUNC("e1000_get_cable_length"); 6686 6686 ··· 6751 6751 break; 6752 6752 } 6753 6753 } else if (hw->phy_type == e1000_phy_igp) { /* For IGP PHY */ 6754 - uint16_t cur_agc_value; 6755 - uint16_t min_agc_value = IGP01E1000_AGC_LENGTH_TABLE_SIZE; 6756 - uint16_t agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = 6754 + u16 cur_agc_value; 6755 + u16 min_agc_value = IGP01E1000_AGC_LENGTH_TABLE_SIZE; 6756 + u16 agc_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = 6757 6757 {IGP01E1000_PHY_AGC_A, 6758 6758 IGP01E1000_PHY_AGC_B, 6759 6759 IGP01E1000_PHY_AGC_C, ··· 6799 6799 IGP01E1000_AGC_RANGE; 6800 6800 } else if (hw->phy_type == e1000_phy_igp_2 || 6801 6801 hw->phy_type == e1000_phy_igp_3) { 6802 - uint16_t cur_agc_index, max_agc_index = 0; 6803 - uint16_t min_agc_index = IGP02E1000_AGC_LENGTH_TABLE_SIZE - 1; 6804 - uint16_t agc_reg_array[IGP02E1000_PHY_CHANNEL_NUM] = 6802 + u16 cur_agc_index, max_agc_index = 0; 6803 + u16 min_agc_index = IGP02E1000_AGC_LENGTH_TABLE_SIZE - 1; 6804 + u16 agc_reg_array[IGP02E1000_PHY_CHANNEL_NUM] = 6805 6805 {IGP02E1000_PHY_AGC_A, 6806 6806 IGP02E1000_PHY_AGC_B, 6807 6807 IGP02E1000_PHY_AGC_C, ··· 6863 6863 * return 0. If the link speed is 1000 Mbps the polarity status is in the 6864 6864 * IGP01E1000_PHY_PCS_INIT_REG. 6865 6865 *****************************************************************************/ 6866 - static int32_t 6866 + static s32 6867 6867 e1000_check_polarity(struct e1000_hw *hw, 6868 6868 e1000_rev_polarity *polarity) 6869 6869 { 6870 - int32_t ret_val; 6871 - uint16_t phy_data; 6870 + s32 ret_val; 6871 + u16 phy_data; 6872 6872 6873 6873 DEBUGFUNC("e1000_check_polarity"); 6874 6874 ··· 6939 6939 * Link Health register. In IGP this bit is latched high, so the driver must 6940 6940 * read it immediately after link is established. 6941 6941 *****************************************************************************/ 6942 - static int32_t 6942 + static s32 6943 6943 e1000_check_downshift(struct e1000_hw *hw) 6944 6944 { 6945 - int32_t ret_val; 6946 - uint16_t phy_data; 6945 + s32 ret_val; 6946 + u16 phy_data; 6947 6947 6948 6948 DEBUGFUNC("e1000_check_downshift"); 6949 6949 ··· 6985 6985 * 6986 6986 ****************************************************************************/ 6987 6987 6988 - static int32_t 6988 + static s32 6989 6989 e1000_config_dsp_after_link_change(struct e1000_hw *hw, 6990 6990 bool link_up) 6991 6991 { 6992 - int32_t ret_val; 6993 - uint16_t phy_data, phy_saved_data, speed, duplex, i; 6994 - uint16_t dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = 6992 + s32 ret_val; 6993 + u16 phy_data, phy_saved_data, speed, duplex, i; 6994 + u16 dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] = 6995 6995 {IGP01E1000_PHY_AGC_PARAM_A, 6996 6996 IGP01E1000_PHY_AGC_PARAM_B, 6997 6997 IGP01E1000_PHY_AGC_PARAM_C, 6998 6998 IGP01E1000_PHY_AGC_PARAM_D}; 6999 - uint16_t min_length, max_length; 6999 + u16 min_length, max_length; 7000 7000 7001 7001 DEBUGFUNC("e1000_config_dsp_after_link_change"); 7002 7002 ··· 7038 7038 if ((hw->ffe_config_state == e1000_ffe_config_enabled) && 7039 7039 (min_length < e1000_igp_cable_length_50)) { 7040 7040 7041 - uint16_t ffe_idle_err_timeout = FFE_IDLE_ERR_COUNT_TIMEOUT_20; 7042 - uint32_t idle_errs = 0; 7041 + u16 ffe_idle_err_timeout = FFE_IDLE_ERR_COUNT_TIMEOUT_20; 7042 + u32 idle_errs = 0; 7043 7043 7044 7044 /* clear previous idle error counts */ 7045 7045 ret_val = e1000_read_phy_reg(hw, PHY_1000T_STATUS, ··· 7173 7173 * 7174 7174 * hw - Struct containing variables accessed by shared code 7175 7175 ****************************************************************************/ 7176 - static int32_t 7176 + static s32 7177 7177 e1000_set_phy_mode(struct e1000_hw *hw) 7178 7178 { 7179 - int32_t ret_val; 7180 - uint16_t eeprom_data; 7179 + s32 ret_val; 7180 + u16 eeprom_data; 7181 7181 7182 7182 DEBUGFUNC("e1000_set_phy_mode"); 7183 7183 ··· 7218 7218 * 7219 7219 ****************************************************************************/ 7220 7220 7221 - static int32_t 7221 + static s32 7222 7222 e1000_set_d3_lplu_state(struct e1000_hw *hw, 7223 7223 bool active) 7224 7224 { 7225 - uint32_t phy_ctrl = 0; 7226 - int32_t ret_val; 7227 - uint16_t phy_data; 7225 + u32 phy_ctrl = 0; 7226 + s32 ret_val; 7227 + u16 phy_data; 7228 7228 DEBUGFUNC("e1000_set_d3_lplu_state"); 7229 7229 7230 7230 if (hw->phy_type != e1000_phy_igp && hw->phy_type != e1000_phy_igp_2 ··· 7348 7348 * 7349 7349 ****************************************************************************/ 7350 7350 7351 - static int32_t 7351 + static s32 7352 7352 e1000_set_d0_lplu_state(struct e1000_hw *hw, 7353 7353 bool active) 7354 7354 { 7355 - uint32_t phy_ctrl = 0; 7356 - int32_t ret_val; 7357 - uint16_t phy_data; 7355 + u32 phy_ctrl = 0; 7356 + s32 ret_val; 7357 + u16 phy_data; 7358 7358 DEBUGFUNC("e1000_set_d0_lplu_state"); 7359 7359 7360 7360 if (hw->mac_type <= e1000_82547_rev_2) ··· 7439 7439 * 7440 7440 * hw - Struct containing variables accessed by shared code 7441 7441 *****************************************************************************/ 7442 - static int32_t 7442 + static s32 7443 7443 e1000_set_vco_speed(struct e1000_hw *hw) 7444 7444 { 7445 - int32_t ret_val; 7446 - uint16_t default_page = 0; 7447 - uint16_t phy_data; 7445 + s32 ret_val; 7446 + u16 default_page = 0; 7447 + u16 phy_data; 7448 7448 7449 7449 DEBUGFUNC("e1000_set_vco_speed"); 7450 7450 ··· 7503 7503 * 7504 7504 * returns: - E1000_SUCCESS . 7505 7505 ****************************************************************************/ 7506 - static int32_t 7507 - e1000_host_if_read_cookie(struct e1000_hw * hw, uint8_t *buffer) 7506 + static s32 7507 + e1000_host_if_read_cookie(struct e1000_hw * hw, u8 *buffer) 7508 7508 { 7509 - uint8_t i; 7510 - uint32_t offset = E1000_MNG_DHCP_COOKIE_OFFSET; 7511 - uint8_t length = E1000_MNG_DHCP_COOKIE_LENGTH; 7509 + u8 i; 7510 + u32 offset = E1000_MNG_DHCP_COOKIE_OFFSET; 7511 + u8 length = E1000_MNG_DHCP_COOKIE_LENGTH; 7512 7512 7513 7513 length = (length >> 2); 7514 7514 offset = (offset >> 2); 7515 7515 7516 7516 for (i = 0; i < length; i++) { 7517 - *((uint32_t *) buffer + i) = 7517 + *((u32 *) buffer + i) = 7518 7518 E1000_READ_REG_ARRAY_DWORD(hw, HOST_IF, offset + i); 7519 7519 } 7520 7520 return E1000_SUCCESS; ··· 7530 7530 * timeout 7531 7531 * - E1000_SUCCESS for success. 7532 7532 ****************************************************************************/ 7533 - static int32_t 7533 + static s32 7534 7534 e1000_mng_enable_host_if(struct e1000_hw * hw) 7535 7535 { 7536 - uint32_t hicr; 7537 - uint8_t i; 7536 + u32 hicr; 7537 + u8 i; 7538 7538 7539 7539 /* Check that the host interface is enabled. */ 7540 7540 hicr = E1000_READ_REG(hw, HICR); ··· 7564 7564 * 7565 7565 * returns - E1000_SUCCESS for success. 7566 7566 ****************************************************************************/ 7567 - static int32_t 7568 - e1000_mng_host_if_write(struct e1000_hw * hw, uint8_t *buffer, 7569 - uint16_t length, uint16_t offset, uint8_t *sum) 7567 + static s32 7568 + e1000_mng_host_if_write(struct e1000_hw * hw, u8 *buffer, 7569 + u16 length, u16 offset, u8 *sum) 7570 7570 { 7571 - uint8_t *tmp; 7572 - uint8_t *bufptr = buffer; 7573 - uint32_t data = 0; 7574 - uint16_t remaining, i, j, prev_bytes; 7571 + u8 *tmp; 7572 + u8 *bufptr = buffer; 7573 + u32 data = 0; 7574 + u16 remaining, i, j, prev_bytes; 7575 7575 7576 7576 /* sum = only sum of the data and it is not checksum */ 7577 7577 ··· 7579 7579 return -E1000_ERR_PARAM; 7580 7580 } 7581 7581 7582 - tmp = (uint8_t *)&data; 7582 + tmp = (u8 *)&data; 7583 7583 prev_bytes = offset & 0x3; 7584 7584 offset &= 0xFFFC; 7585 7585 offset >>= 2; 7586 7586 7587 7587 if (prev_bytes) { 7588 7588 data = E1000_READ_REG_ARRAY_DWORD(hw, HOST_IF, offset); 7589 - for (j = prev_bytes; j < sizeof(uint32_t); j++) { 7589 + for (j = prev_bytes; j < sizeof(u32); j++) { 7590 7590 *(tmp + j) = *bufptr++; 7591 7591 *sum += *(tmp + j); 7592 7592 } ··· 7604 7604 /* The device driver writes the relevant command block into the 7605 7605 * ram area. */ 7606 7606 for (i = 0; i < length; i++) { 7607 - for (j = 0; j < sizeof(uint32_t); j++) { 7607 + for (j = 0; j < sizeof(u32); j++) { 7608 7608 *(tmp + j) = *bufptr++; 7609 7609 *sum += *(tmp + j); 7610 7610 } ··· 7612 7612 E1000_WRITE_REG_ARRAY_DWORD(hw, HOST_IF, offset + i, data); 7613 7613 } 7614 7614 if (remaining) { 7615 - for (j = 0; j < sizeof(uint32_t); j++) { 7615 + for (j = 0; j < sizeof(u32); j++) { 7616 7616 if (j < remaining) 7617 7617 *(tmp + j) = *bufptr++; 7618 7618 else ··· 7632 7632 * 7633 7633 * returns - E1000_SUCCESS for success. 7634 7634 ****************************************************************************/ 7635 - static int32_t 7635 + static s32 7636 7636 e1000_mng_write_cmd_header(struct e1000_hw * hw, 7637 7637 struct e1000_host_mng_command_header * hdr) 7638 7638 { 7639 - uint16_t i; 7640 - uint8_t sum; 7641 - uint8_t *buffer; 7639 + u16 i; 7640 + u8 sum; 7641 + u8 *buffer; 7642 7642 7643 7643 /* Write the whole command header structure which includes sum of 7644 7644 * the buffer */ 7645 7645 7646 - uint16_t length = sizeof(struct e1000_host_mng_command_header); 7646 + u16 length = sizeof(struct e1000_host_mng_command_header); 7647 7647 7648 7648 sum = hdr->checksum; 7649 7649 hdr->checksum = 0; 7650 7650 7651 - buffer = (uint8_t *) hdr; 7651 + buffer = (u8 *) hdr; 7652 7652 i = length; 7653 7653 while (i--) 7654 7654 sum += buffer[i]; ··· 7658 7658 length >>= 2; 7659 7659 /* The device driver writes the relevant command block into the ram area. */ 7660 7660 for (i = 0; i < length; i++) { 7661 - E1000_WRITE_REG_ARRAY_DWORD(hw, HOST_IF, i, *((uint32_t *) hdr + i)); 7661 + E1000_WRITE_REG_ARRAY_DWORD(hw, HOST_IF, i, *((u32 *) hdr + i)); 7662 7662 E1000_WRITE_FLUSH(hw); 7663 7663 } 7664 7664 ··· 7672 7672 * 7673 7673 * returns - E1000_SUCCESS for success. 7674 7674 ****************************************************************************/ 7675 - static int32_t 7675 + static s32 7676 7676 e1000_mng_write_commit(struct e1000_hw * hw) 7677 7677 { 7678 - uint32_t hicr; 7678 + u32 hicr; 7679 7679 7680 7680 hicr = E1000_READ_REG(hw, HICR); 7681 7681 /* Setting this bit tells the ARC that a new command is pending. */ ··· 7693 7693 bool 7694 7694 e1000_check_mng_mode(struct e1000_hw *hw) 7695 7695 { 7696 - uint32_t fwsm; 7696 + u32 fwsm; 7697 7697 7698 7698 fwsm = E1000_READ_REG(hw, FWSM); 7699 7699 ··· 7712 7712 /***************************************************************************** 7713 7713 * This function writes the dhcp info . 7714 7714 ****************************************************************************/ 7715 - int32_t 7716 - e1000_mng_write_dhcp_info(struct e1000_hw * hw, uint8_t *buffer, 7717 - uint16_t length) 7715 + s32 7716 + e1000_mng_write_dhcp_info(struct e1000_hw * hw, u8 *buffer, 7717 + u16 length) 7718 7718 { 7719 - int32_t ret_val; 7719 + s32 ret_val; 7720 7720 struct e1000_host_mng_command_header hdr; 7721 7721 7722 7722 hdr.command_id = E1000_MNG_DHCP_TX_PAYLOAD_CMD; ··· 7744 7744 * 7745 7745 * returns - checksum of buffer contents. 7746 7746 ****************************************************************************/ 7747 - static uint8_t 7748 - e1000_calculate_mng_checksum(char *buffer, uint32_t length) 7747 + static u8 7748 + e1000_calculate_mng_checksum(char *buffer, u32 length) 7749 7749 { 7750 - uint8_t sum = 0; 7751 - uint32_t i; 7750 + u8 sum = 0; 7751 + u32 i; 7752 7752 7753 7753 if (!buffer) 7754 7754 return 0; ··· 7756 7756 for (i=0; i < length; i++) 7757 7757 sum += buffer[i]; 7758 7758 7759 - return (uint8_t) (0 - sum); 7759 + return (u8) (0 - sum); 7760 7760 } 7761 7761 7762 7762 /***************************************************************************** ··· 7769 7769 { 7770 7770 /* called in init as well as watchdog timer functions */ 7771 7771 7772 - int32_t ret_val, checksum; 7772 + s32 ret_val, checksum; 7773 7773 bool tx_filter = false; 7774 7774 struct e1000_host_mng_dhcp_cookie *hdr = &(hw->mng_cookie); 7775 - uint8_t *buffer = (uint8_t *) &(hw->mng_cookie); 7775 + u8 *buffer = (u8 *) &(hw->mng_cookie); 7776 7776 7777 7777 if (e1000_check_mng_mode(hw)) { 7778 7778 ret_val = e1000_mng_enable_host_if(hw); ··· 7806 7806 * returns: - true/false 7807 7807 * 7808 7808 *****************************************************************************/ 7809 - uint32_t 7809 + u32 7810 7810 e1000_enable_mng_pass_thru(struct e1000_hw *hw) 7811 7811 { 7812 - uint32_t manc; 7813 - uint32_t fwsm, factps; 7812 + u32 manc; 7813 + u32 fwsm, factps; 7814 7814 7815 7815 if (hw->asf_firmware_present) { 7816 7816 manc = E1000_READ_REG(hw, MANC); ··· 7832 7832 return false; 7833 7833 } 7834 7834 7835 - static int32_t 7835 + static s32 7836 7836 e1000_polarity_reversal_workaround(struct e1000_hw *hw) 7837 7837 { 7838 - int32_t ret_val; 7839 - uint16_t mii_status_reg; 7840 - uint16_t i; 7838 + s32 ret_val; 7839 + u16 mii_status_reg; 7840 + u16 i; 7841 7841 7842 7842 /* Polarity reversal workaround for forced 10F/10H links. */ 7843 7843 ··· 7929 7929 static void 7930 7930 e1000_set_pci_express_master_disable(struct e1000_hw *hw) 7931 7931 { 7932 - uint32_t ctrl; 7932 + u32 ctrl; 7933 7933 7934 7934 DEBUGFUNC("e1000_set_pci_express_master_disable"); 7935 7935 ··· 7952 7952 * E1000_SUCCESS master requests disabled. 7953 7953 * 7954 7954 ******************************************************************************/ 7955 - int32_t 7955 + s32 7956 7956 e1000_disable_pciex_master(struct e1000_hw *hw) 7957 7957 { 7958 - int32_t timeout = MASTER_DISABLE_TIMEOUT; /* 80ms */ 7958 + s32 timeout = MASTER_DISABLE_TIMEOUT; /* 80ms */ 7959 7959 7960 7960 DEBUGFUNC("e1000_disable_pciex_master"); 7961 7961 ··· 7990 7990 * E1000_SUCCESS at any other case. 7991 7991 * 7992 7992 ******************************************************************************/ 7993 - static int32_t 7993 + static s32 7994 7994 e1000_get_auto_rd_done(struct e1000_hw *hw) 7995 7995 { 7996 - int32_t timeout = AUTO_READ_DONE_TIMEOUT; 7996 + s32 timeout = AUTO_READ_DONE_TIMEOUT; 7997 7997 7998 7998 DEBUGFUNC("e1000_get_auto_rd_done"); 7999 7999 ··· 8038 8038 * E1000_SUCCESS at any other case. 8039 8039 * 8040 8040 ***************************************************************************/ 8041 - static int32_t 8041 + static s32 8042 8042 e1000_get_phy_cfg_done(struct e1000_hw *hw) 8043 8043 { 8044 - int32_t timeout = PHY_CFG_TIMEOUT; 8045 - uint32_t cfg_mask = E1000_EEPROM_CFG_DONE; 8044 + s32 timeout = PHY_CFG_TIMEOUT; 8045 + u32 cfg_mask = E1000_EEPROM_CFG_DONE; 8046 8046 8047 8047 DEBUGFUNC("e1000_get_phy_cfg_done"); 8048 8048 ··· 8085 8085 * E1000_SUCCESS at any other case. 8086 8086 * 8087 8087 ***************************************************************************/ 8088 - static int32_t 8088 + static s32 8089 8089 e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw) 8090 8090 { 8091 - int32_t timeout; 8092 - uint32_t swsm; 8091 + s32 timeout; 8092 + u32 swsm; 8093 8093 8094 8094 DEBUGFUNC("e1000_get_hw_eeprom_semaphore"); 8095 8095 ··· 8138 8138 static void 8139 8139 e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw) 8140 8140 { 8141 - uint32_t swsm; 8141 + u32 swsm; 8142 8142 8143 8143 DEBUGFUNC("e1000_put_hw_eeprom_semaphore"); 8144 8144 ··· 8164 8164 * E1000_SUCCESS at any other case. 8165 8165 * 8166 8166 ***************************************************************************/ 8167 - static int32_t 8167 + static s32 8168 8168 e1000_get_software_semaphore(struct e1000_hw *hw) 8169 8169 { 8170 - int32_t timeout = hw->eeprom.word_size + 1; 8171 - uint32_t swsm; 8170 + s32 timeout = hw->eeprom.word_size + 1; 8171 + u32 swsm; 8172 8172 8173 8173 DEBUGFUNC("e1000_get_software_semaphore"); 8174 8174 ··· 8203 8203 static void 8204 8204 e1000_release_software_semaphore(struct e1000_hw *hw) 8205 8205 { 8206 - uint32_t swsm; 8206 + u32 swsm; 8207 8207 8208 8208 DEBUGFUNC("e1000_release_software_semaphore"); 8209 8209 ··· 8228 8228 * E1000_SUCCESS 8229 8229 * 8230 8230 *****************************************************************************/ 8231 - int32_t 8231 + s32 8232 8232 e1000_check_phy_reset_block(struct e1000_hw *hw) 8233 8233 { 8234 - uint32_t manc = 0; 8235 - uint32_t fwsm = 0; 8234 + u32 manc = 0; 8235 + u32 fwsm = 0; 8236 8236 8237 8237 if (hw->mac_type == e1000_ich8lan) { 8238 8238 fwsm = E1000_READ_REG(hw, FWSM); ··· 8246 8246 E1000_BLK_PHY_RESET : E1000_SUCCESS; 8247 8247 } 8248 8248 8249 - static uint8_t 8249 + static u8 8250 8250 e1000_arc_subsystem_valid(struct e1000_hw *hw) 8251 8251 { 8252 - uint32_t fwsm; 8252 + u32 fwsm; 8253 8253 8254 8254 /* On 8257x silicon, registers in the range of 0x8800 - 0x8FFC 8255 8255 * may not be provided a DMA clock when no manageability features are ··· 8283 8283 * returns: E1000_SUCCESS 8284 8284 * 8285 8285 *****************************************************************************/ 8286 - static int32_t 8287 - e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, uint32_t no_snoop) 8286 + static s32 8287 + e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, u32 no_snoop) 8288 8288 { 8289 - uint32_t gcr_reg = 0; 8289 + u32 gcr_reg = 0; 8290 8290 8291 8291 DEBUGFUNC("e1000_set_pci_ex_no_snoop"); 8292 8292 ··· 8303 8303 E1000_WRITE_REG(hw, GCR, gcr_reg); 8304 8304 } 8305 8305 if (hw->mac_type == e1000_ich8lan) { 8306 - uint32_t ctrl_ext; 8306 + u32 ctrl_ext; 8307 8307 8308 8308 E1000_WRITE_REG(hw, GCR, PCI_EX_82566_SNOOP_ALL); 8309 8309 ··· 8324 8324 * hw: Struct containing variables accessed by shared code 8325 8325 * 8326 8326 ***************************************************************************/ 8327 - static int32_t 8327 + static s32 8328 8328 e1000_get_software_flag(struct e1000_hw *hw) 8329 8329 { 8330 - int32_t timeout = PHY_CFG_TIMEOUT; 8331 - uint32_t extcnf_ctrl; 8330 + s32 timeout = PHY_CFG_TIMEOUT; 8331 + u32 extcnf_ctrl; 8332 8332 8333 8333 DEBUGFUNC("e1000_get_software_flag"); 8334 8334 ··· 8366 8366 static void 8367 8367 e1000_release_software_flag(struct e1000_hw *hw) 8368 8368 { 8369 - uint32_t extcnf_ctrl; 8369 + u32 extcnf_ctrl; 8370 8370 8371 8371 DEBUGFUNC("e1000_release_software_flag"); 8372 8372 ··· 8388 8388 * data - word read from the EEPROM 8389 8389 * words - number of words to read 8390 8390 *****************************************************************************/ 8391 - static int32_t 8392 - e1000_read_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, 8393 - uint16_t *data) 8391 + static s32 8392 + e1000_read_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, 8393 + u16 *data) 8394 8394 { 8395 - int32_t error = E1000_SUCCESS; 8396 - uint32_t flash_bank = 0; 8397 - uint32_t act_offset = 0; 8398 - uint32_t bank_offset = 0; 8399 - uint16_t word = 0; 8400 - uint16_t i = 0; 8395 + s32 error = E1000_SUCCESS; 8396 + u32 flash_bank = 0; 8397 + u32 act_offset = 0; 8398 + u32 bank_offset = 0; 8399 + u16 word = 0; 8400 + u16 i = 0; 8401 8401 8402 8402 /* We need to know which is the valid flash bank. In the event 8403 8403 * that we didn't allocate eeprom_shadow_ram, we may not be ··· 8444 8444 * words - number of words to write 8445 8445 * data - words to write to the EEPROM 8446 8446 *****************************************************************************/ 8447 - static int32_t 8448 - e1000_write_eeprom_ich8(struct e1000_hw *hw, uint16_t offset, uint16_t words, 8449 - uint16_t *data) 8447 + static s32 8448 + e1000_write_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, 8449 + u16 *data) 8450 8450 { 8451 - uint32_t i = 0; 8452 - int32_t error = E1000_SUCCESS; 8451 + u32 i = 0; 8452 + s32 error = E1000_SUCCESS; 8453 8453 8454 8454 error = e1000_get_software_flag(hw); 8455 8455 if (error != E1000_SUCCESS) ··· 8491 8491 * 8492 8492 * hw - The pointer to the hw structure 8493 8493 ****************************************************************************/ 8494 - static int32_t 8494 + static s32 8495 8495 e1000_ich8_cycle_init(struct e1000_hw *hw) 8496 8496 { 8497 8497 union ich8_hws_flash_status hsfsts; 8498 - int32_t error = E1000_ERR_EEPROM; 8499 - int32_t i = 0; 8498 + s32 error = E1000_ERR_EEPROM; 8499 + s32 i = 0; 8500 8500 8501 8501 DEBUGFUNC("e1000_ich8_cycle_init"); 8502 8502 ··· 8558 8558 * 8559 8559 * hw - The pointer to the hw structure 8560 8560 ****************************************************************************/ 8561 - static int32_t 8562 - e1000_ich8_flash_cycle(struct e1000_hw *hw, uint32_t timeout) 8561 + static s32 8562 + e1000_ich8_flash_cycle(struct e1000_hw *hw, u32 timeout) 8563 8563 { 8564 8564 union ich8_hws_flash_ctrl hsflctl; 8565 8565 union ich8_hws_flash_status hsfsts; 8566 - int32_t error = E1000_ERR_EEPROM; 8567 - uint32_t i = 0; 8566 + s32 error = E1000_ERR_EEPROM; 8567 + u32 i = 0; 8568 8568 8569 8569 /* Start a cycle by writing 1 in Flash Cycle Go in Hw Flash Control */ 8570 8570 hsflctl.regval = E1000_READ_ICH_FLASH_REG16(hw, ICH_FLASH_HSFCTL); ··· 8593 8593 * size - Size of data to read, 1=byte 2=word 8594 8594 * data - Pointer to the word to store the value read. 8595 8595 *****************************************************************************/ 8596 - static int32_t 8597 - e1000_read_ich8_data(struct e1000_hw *hw, uint32_t index, 8598 - uint32_t size, uint16_t* data) 8596 + static s32 8597 + e1000_read_ich8_data(struct e1000_hw *hw, u32 index, 8598 + u32 size, u16* data) 8599 8599 { 8600 8600 union ich8_hws_flash_status hsfsts; 8601 8601 union ich8_hws_flash_ctrl hsflctl; 8602 - uint32_t flash_linear_address; 8603 - uint32_t flash_data = 0; 8604 - int32_t error = -E1000_ERR_EEPROM; 8605 - int32_t count = 0; 8602 + u32 flash_linear_address; 8603 + u32 flash_data = 0; 8604 + s32 error = -E1000_ERR_EEPROM; 8605 + s32 count = 0; 8606 8606 8607 8607 DEBUGFUNC("e1000_read_ich8_data"); 8608 8608 ··· 8640 8640 if (error == E1000_SUCCESS) { 8641 8641 flash_data = E1000_READ_ICH_FLASH_REG(hw, ICH_FLASH_FDATA0); 8642 8642 if (size == 1) { 8643 - *data = (uint8_t)(flash_data & 0x000000FF); 8643 + *data = (u8)(flash_data & 0x000000FF); 8644 8644 } else if (size == 2) { 8645 - *data = (uint16_t)(flash_data & 0x0000FFFF); 8645 + *data = (u16)(flash_data & 0x0000FFFF); 8646 8646 } 8647 8647 break; 8648 8648 } else { ··· 8672 8672 * size - Size of data to read, 1=byte 2=word 8673 8673 * data - The byte(s) to write to the NVM. 8674 8674 *****************************************************************************/ 8675 - static int32_t 8676 - e1000_write_ich8_data(struct e1000_hw *hw, uint32_t index, uint32_t size, 8677 - uint16_t data) 8675 + static s32 8676 + e1000_write_ich8_data(struct e1000_hw *hw, u32 index, u32 size, 8677 + u16 data) 8678 8678 { 8679 8679 union ich8_hws_flash_status hsfsts; 8680 8680 union ich8_hws_flash_ctrl hsflctl; 8681 - uint32_t flash_linear_address; 8682 - uint32_t flash_data = 0; 8683 - int32_t error = -E1000_ERR_EEPROM; 8684 - int32_t count = 0; 8681 + u32 flash_linear_address; 8682 + u32 flash_data = 0; 8683 + s32 error = -E1000_ERR_EEPROM; 8684 + s32 count = 0; 8685 8685 8686 8686 DEBUGFUNC("e1000_write_ich8_data"); 8687 8687 ··· 8710 8710 E1000_WRITE_ICH_FLASH_REG(hw, ICH_FLASH_FADDR, flash_linear_address); 8711 8711 8712 8712 if (size == 1) 8713 - flash_data = (uint32_t)data & 0x00FF; 8713 + flash_data = (u32)data & 0x00FF; 8714 8714 else 8715 - flash_data = (uint32_t)data; 8715 + flash_data = (u32)data; 8716 8716 8717 8717 E1000_WRITE_ICH_FLASH_REG(hw, ICH_FLASH_FDATA0, flash_data); 8718 8718 ··· 8747 8747 * index - The index of the byte to read. 8748 8748 * data - Pointer to a byte to store the value read. 8749 8749 *****************************************************************************/ 8750 - static int32_t 8751 - e1000_read_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t* data) 8750 + static s32 8751 + e1000_read_ich8_byte(struct e1000_hw *hw, u32 index, u8* data) 8752 8752 { 8753 - int32_t status = E1000_SUCCESS; 8754 - uint16_t word = 0; 8753 + s32 status = E1000_SUCCESS; 8754 + u16 word = 0; 8755 8755 8756 8756 status = e1000_read_ich8_data(hw, index, 1, &word); 8757 8757 if (status == E1000_SUCCESS) { 8758 - *data = (uint8_t)word; 8758 + *data = (u8)word; 8759 8759 } 8760 8760 8761 8761 return status; ··· 8770 8770 * index - The index of the byte to write. 8771 8771 * byte - The byte to write to the NVM. 8772 8772 *****************************************************************************/ 8773 - static int32_t 8774 - e1000_verify_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t byte) 8773 + static s32 8774 + e1000_verify_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 byte) 8775 8775 { 8776 - int32_t error = E1000_SUCCESS; 8777 - int32_t program_retries = 0; 8776 + s32 error = E1000_SUCCESS; 8777 + s32 program_retries = 0; 8778 8778 8779 8779 DEBUGOUT2("Byte := %2.2X Offset := %d\n", byte, index); 8780 8780 ··· 8803 8803 * index - The index of the byte to read. 8804 8804 * data - The byte to write to the NVM. 8805 8805 *****************************************************************************/ 8806 - static int32_t 8807 - e1000_write_ich8_byte(struct e1000_hw *hw, uint32_t index, uint8_t data) 8806 + static s32 8807 + e1000_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 data) 8808 8808 { 8809 - int32_t status = E1000_SUCCESS; 8810 - uint16_t word = (uint16_t)data; 8809 + s32 status = E1000_SUCCESS; 8810 + u16 word = (u16)data; 8811 8811 8812 8812 status = e1000_write_ich8_data(hw, index, 1, word); 8813 8813 ··· 8821 8821 * index - The starting byte index of the word to read. 8822 8822 * data - Pointer to a word to store the value read. 8823 8823 *****************************************************************************/ 8824 - static int32_t 8825 - e1000_read_ich8_word(struct e1000_hw *hw, uint32_t index, uint16_t *data) 8824 + static s32 8825 + e1000_read_ich8_word(struct e1000_hw *hw, u32 index, u16 *data) 8826 8826 { 8827 - int32_t status = E1000_SUCCESS; 8827 + s32 status = E1000_SUCCESS; 8828 8828 status = e1000_read_ich8_data(hw, index, 2, data); 8829 8829 return status; 8830 8830 } ··· 8840 8840 * amount of NVM used in each bank is a *minimum* of 4 KBytes, but in fact the 8841 8841 * bank size may be 4, 8 or 64 KBytes 8842 8842 *****************************************************************************/ 8843 - static int32_t 8844 - e1000_erase_ich8_4k_segment(struct e1000_hw *hw, uint32_t bank) 8843 + static s32 8844 + e1000_erase_ich8_4k_segment(struct e1000_hw *hw, u32 bank) 8845 8845 { 8846 8846 union ich8_hws_flash_status hsfsts; 8847 8847 union ich8_hws_flash_ctrl hsflctl; 8848 - uint32_t flash_linear_address; 8849 - int32_t count = 0; 8850 - int32_t error = E1000_ERR_EEPROM; 8851 - int32_t iteration; 8852 - int32_t sub_sector_size = 0; 8853 - int32_t bank_size; 8854 - int32_t j = 0; 8855 - int32_t error_flag = 0; 8848 + u32 flash_linear_address; 8849 + s32 count = 0; 8850 + s32 error = E1000_ERR_EEPROM; 8851 + s32 iteration; 8852 + s32 sub_sector_size = 0; 8853 + s32 bank_size; 8854 + s32 j = 0; 8855 + s32 error_flag = 0; 8856 8856 8857 8857 hsfsts.regval = E1000_READ_ICH_FLASH_REG16(hw, ICH_FLASH_HSFSTS); 8858 8858 ··· 8930 8930 return error; 8931 8931 } 8932 8932 8933 - static int32_t 8933 + static s32 8934 8934 e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, 8935 - uint32_t cnf_base_addr, uint32_t cnf_size) 8935 + u32 cnf_base_addr, u32 cnf_size) 8936 8936 { 8937 - uint32_t ret_val = E1000_SUCCESS; 8938 - uint16_t word_addr, reg_data, reg_addr; 8939 - uint16_t i; 8937 + u32 ret_val = E1000_SUCCESS; 8938 + u16 word_addr, reg_data, reg_addr; 8939 + u16 i; 8940 8940 8941 8941 /* cnf_base_addr is in DWORD */ 8942 - word_addr = (uint16_t)(cnf_base_addr << 1); 8942 + word_addr = (u16)(cnf_base_addr << 1); 8943 8943 8944 8944 /* cnf_size is returned in size of dwords */ 8945 8945 for (i = 0; i < cnf_size; i++) { ··· 8955 8955 if (ret_val != E1000_SUCCESS) 8956 8956 return ret_val; 8957 8957 8958 - ret_val = e1000_write_phy_reg_ex(hw, (uint32_t)reg_addr, reg_data); 8958 + ret_val = e1000_write_phy_reg_ex(hw, (u32)reg_addr, reg_data); 8959 8959 8960 8960 e1000_release_software_flag(hw); 8961 8961 } ··· 8972 8972 * 8973 8973 * hw: Struct containing variables accessed by shared code 8974 8974 *****************************************************************************/ 8975 - static int32_t 8975 + static s32 8976 8976 e1000_init_lcd_from_nvm(struct e1000_hw *hw) 8977 8977 { 8978 - uint32_t reg_data, cnf_base_addr, cnf_size, ret_val, loop; 8978 + u32 reg_data, cnf_base_addr, cnf_size, ret_val, loop; 8979 8979 8980 8980 if (hw->phy_type != e1000_phy_igp_3) 8981 8981 return E1000_SUCCESS;
+256 -256
drivers/net/e1000/e1000_hw.h
··· 100 100 } e1000_fc_type; 101 101 102 102 struct e1000_shadow_ram { 103 - uint16_t eeprom_word; 103 + u16 eeprom_word; 104 104 bool modified; 105 105 }; 106 106 ··· 263 263 }; 264 264 265 265 struct e1000_phy_stats { 266 - uint32_t idle_errors; 267 - uint32_t receive_errors; 266 + u32 idle_errors; 267 + u32 receive_errors; 268 268 }; 269 269 270 270 struct e1000_eeprom_info { 271 271 e1000_eeprom_type type; 272 - uint16_t word_size; 273 - uint16_t opcode_bits; 274 - uint16_t address_bits; 275 - uint16_t delay_usec; 276 - uint16_t page_size; 272 + u16 word_size; 273 + u16 opcode_bits; 274 + u16 address_bits; 275 + u16 delay_usec; 276 + u16 page_size; 277 277 bool use_eerd; 278 278 bool use_eewr; 279 279 }; ··· 308 308 309 309 /* Function prototypes */ 310 310 /* Initialization */ 311 - int32_t e1000_reset_hw(struct e1000_hw *hw); 312 - int32_t e1000_init_hw(struct e1000_hw *hw); 313 - int32_t e1000_set_mac_type(struct e1000_hw *hw); 311 + s32 e1000_reset_hw(struct e1000_hw *hw); 312 + s32 e1000_init_hw(struct e1000_hw *hw); 313 + s32 e1000_set_mac_type(struct e1000_hw *hw); 314 314 void e1000_set_media_type(struct e1000_hw *hw); 315 315 316 316 /* Link Configuration */ 317 - int32_t e1000_setup_link(struct e1000_hw *hw); 318 - int32_t e1000_phy_setup_autoneg(struct e1000_hw *hw); 317 + s32 e1000_setup_link(struct e1000_hw *hw); 318 + s32 e1000_phy_setup_autoneg(struct e1000_hw *hw); 319 319 void e1000_config_collision_dist(struct e1000_hw *hw); 320 - int32_t e1000_check_for_link(struct e1000_hw *hw); 321 - int32_t e1000_get_speed_and_duplex(struct e1000_hw *hw, uint16_t *speed, uint16_t *duplex); 322 - int32_t e1000_force_mac_fc(struct e1000_hw *hw); 320 + s32 e1000_check_for_link(struct e1000_hw *hw); 321 + s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed, u16 *duplex); 322 + s32 e1000_force_mac_fc(struct e1000_hw *hw); 323 323 324 324 /* PHY */ 325 - int32_t e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); 326 - int32_t e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t data); 327 - int32_t e1000_phy_hw_reset(struct e1000_hw *hw); 328 - int32_t e1000_phy_reset(struct e1000_hw *hw); 329 - int32_t e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 330 - int32_t e1000_validate_mdi_setting(struct e1000_hw *hw); 325 + s32 e1000_read_phy_reg(struct e1000_hw *hw, u32 reg_addr, u16 *phy_data); 326 + s32 e1000_write_phy_reg(struct e1000_hw *hw, u32 reg_addr, u16 data); 327 + s32 e1000_phy_hw_reset(struct e1000_hw *hw); 328 + s32 e1000_phy_reset(struct e1000_hw *hw); 329 + s32 e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info); 330 + s32 e1000_validate_mdi_setting(struct e1000_hw *hw); 331 331 332 332 void e1000_phy_powerdown_workaround(struct e1000_hw *hw); 333 333 334 334 /* EEPROM Functions */ 335 - int32_t e1000_init_eeprom_params(struct e1000_hw *hw); 335 + s32 e1000_init_eeprom_params(struct e1000_hw *hw); 336 336 337 337 /* MNG HOST IF functions */ 338 - uint32_t e1000_enable_mng_pass_thru(struct e1000_hw *hw); 338 + u32 e1000_enable_mng_pass_thru(struct e1000_hw *hw); 339 339 340 340 #define E1000_MNG_DHCP_TX_PAYLOAD_CMD 64 341 341 #define E1000_HI_MAX_MNG_DATA_LENGTH 0x6F8 /* Host Interface data length */ ··· 354 354 #define E1000_VFTA_ENTRY_BIT_SHIFT_MASK 0x1F 355 355 356 356 struct e1000_host_mng_command_header { 357 - uint8_t command_id; 358 - uint8_t checksum; 359 - uint16_t reserved1; 360 - uint16_t reserved2; 361 - uint16_t command_length; 357 + u8 command_id; 358 + u8 checksum; 359 + u16 reserved1; 360 + u16 reserved2; 361 + u16 command_length; 362 362 }; 363 363 364 364 struct e1000_host_mng_command_info { 365 365 struct e1000_host_mng_command_header command_header; /* Command Head/Command Result Head has 4 bytes */ 366 - uint8_t command_data[E1000_HI_MAX_MNG_DATA_LENGTH]; /* Command data can length 0..0x658*/ 366 + u8 command_data[E1000_HI_MAX_MNG_DATA_LENGTH]; /* Command data can length 0..0x658*/ 367 367 }; 368 368 #ifdef __BIG_ENDIAN 369 369 struct e1000_host_mng_dhcp_cookie{ 370 - uint32_t signature; 371 - uint16_t vlan_id; 372 - uint8_t reserved0; 373 - uint8_t status; 374 - uint32_t reserved1; 375 - uint8_t checksum; 376 - uint8_t reserved3; 377 - uint16_t reserved2; 370 + u32 signature; 371 + u16 vlan_id; 372 + u8 reserved0; 373 + u8 status; 374 + u32 reserved1; 375 + u8 checksum; 376 + u8 reserved3; 377 + u16 reserved2; 378 378 }; 379 379 #else 380 380 struct e1000_host_mng_dhcp_cookie{ 381 - uint32_t signature; 382 - uint8_t status; 383 - uint8_t reserved0; 384 - uint16_t vlan_id; 385 - uint32_t reserved1; 386 - uint16_t reserved2; 387 - uint8_t reserved3; 388 - uint8_t checksum; 381 + u32 signature; 382 + u8 status; 383 + u8 reserved0; 384 + u16 vlan_id; 385 + u32 reserved1; 386 + u16 reserved2; 387 + u8 reserved3; 388 + u8 checksum; 389 389 }; 390 390 #endif 391 391 392 - int32_t e1000_mng_write_dhcp_info(struct e1000_hw *hw, uint8_t *buffer, 393 - uint16_t length); 392 + s32 e1000_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, 393 + u16 length); 394 394 bool e1000_check_mng_mode(struct e1000_hw *hw); 395 395 bool e1000_enable_tx_pkt_filtering(struct e1000_hw *hw); 396 - int32_t e1000_read_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); 397 - int32_t e1000_validate_eeprom_checksum(struct e1000_hw *hw); 398 - int32_t e1000_update_eeprom_checksum(struct e1000_hw *hw); 399 - int32_t e1000_write_eeprom(struct e1000_hw *hw, uint16_t reg, uint16_t words, uint16_t *data); 400 - int32_t e1000_read_mac_addr(struct e1000_hw * hw); 396 + s32 e1000_read_eeprom(struct e1000_hw *hw, u16 reg, u16 words, u16 *data); 397 + s32 e1000_validate_eeprom_checksum(struct e1000_hw *hw); 398 + s32 e1000_update_eeprom_checksum(struct e1000_hw *hw); 399 + s32 e1000_write_eeprom(struct e1000_hw *hw, u16 reg, u16 words, u16 *data); 400 + s32 e1000_read_mac_addr(struct e1000_hw * hw); 401 401 402 402 /* Filters (multicast, vlan, receive) */ 403 - uint32_t e1000_hash_mc_addr(struct e1000_hw *hw, uint8_t * mc_addr); 404 - void e1000_mta_set(struct e1000_hw *hw, uint32_t hash_value); 405 - void e1000_rar_set(struct e1000_hw *hw, uint8_t * mc_addr, uint32_t rar_index); 406 - void e1000_write_vfta(struct e1000_hw *hw, uint32_t offset, uint32_t value); 403 + u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 * mc_addr); 404 + void e1000_mta_set(struct e1000_hw *hw, u32 hash_value); 405 + void e1000_rar_set(struct e1000_hw *hw, u8 * mc_addr, u32 rar_index); 406 + void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value); 407 407 408 408 /* LED functions */ 409 - int32_t e1000_setup_led(struct e1000_hw *hw); 410 - int32_t e1000_cleanup_led(struct e1000_hw *hw); 411 - int32_t e1000_led_on(struct e1000_hw *hw); 412 - int32_t e1000_led_off(struct e1000_hw *hw); 413 - int32_t e1000_blink_led_start(struct e1000_hw *hw); 409 + s32 e1000_setup_led(struct e1000_hw *hw); 410 + s32 e1000_cleanup_led(struct e1000_hw *hw); 411 + s32 e1000_led_on(struct e1000_hw *hw); 412 + s32 e1000_led_off(struct e1000_hw *hw); 413 + s32 e1000_blink_led_start(struct e1000_hw *hw); 414 414 415 415 /* Adaptive IFS Functions */ 416 416 417 417 /* Everything else */ 418 418 void e1000_reset_adaptive(struct e1000_hw *hw); 419 419 void e1000_update_adaptive(struct e1000_hw *hw); 420 - void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats, uint32_t frame_len, uint8_t * mac_addr); 420 + void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats, u32 frame_len, u8 * mac_addr); 421 421 void e1000_get_bus_info(struct e1000_hw *hw); 422 422 void e1000_pci_set_mwi(struct e1000_hw *hw); 423 423 void e1000_pci_clear_mwi(struct e1000_hw *hw); 424 - int32_t e1000_read_pcie_cap_reg(struct e1000_hw *hw, uint32_t reg, uint16_t *value); 424 + s32 e1000_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value); 425 425 void e1000_pcix_set_mmrbc(struct e1000_hw *hw, int mmrbc); 426 426 int e1000_pcix_get_mmrbc(struct e1000_hw *hw); 427 427 /* Port I/O is only supported on 82544 and newer */ 428 - void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); 429 - int32_t e1000_disable_pciex_master(struct e1000_hw *hw); 430 - int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); 428 + void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value); 429 + s32 e1000_disable_pciex_master(struct e1000_hw *hw); 430 + s32 e1000_check_phy_reset_block(struct e1000_hw *hw); 431 431 432 432 433 433 #define E1000_READ_REG_IO(a, reg) \ ··· 596 596 __le64 buffer_addr; /* Address of the descriptor's data buffer */ 597 597 __le16 length; /* Length of data DMAed into data buffer */ 598 598 __le16 csum; /* Packet checksum */ 599 - uint8_t status; /* Descriptor status */ 600 - uint8_t errors; /* Descriptor Errors */ 599 + u8 status; /* Descriptor status */ 600 + u8 errors; /* Descriptor Errors */ 601 601 __le16 special; 602 602 }; 603 603 ··· 718 718 __le32 data; 719 719 struct { 720 720 __le16 length; /* Data buffer length */ 721 - uint8_t cso; /* Checksum offset */ 722 - uint8_t cmd; /* Descriptor control */ 721 + u8 cso; /* Checksum offset */ 722 + u8 cmd; /* Descriptor control */ 723 723 } flags; 724 724 } lower; 725 725 union { 726 726 __le32 data; 727 727 struct { 728 - uint8_t status; /* Descriptor status */ 729 - uint8_t css; /* Checksum start */ 728 + u8 status; /* Descriptor status */ 729 + u8 css; /* Checksum start */ 730 730 __le16 special; 731 731 } fields; 732 732 } upper; ··· 759 759 union { 760 760 __le32 ip_config; 761 761 struct { 762 - uint8_t ipcss; /* IP checksum start */ 763 - uint8_t ipcso; /* IP checksum offset */ 762 + u8 ipcss; /* IP checksum start */ 763 + u8 ipcso; /* IP checksum offset */ 764 764 __le16 ipcse; /* IP checksum end */ 765 765 } ip_fields; 766 766 } lower_setup; 767 767 union { 768 768 __le32 tcp_config; 769 769 struct { 770 - uint8_t tucss; /* TCP checksum start */ 771 - uint8_t tucso; /* TCP checksum offset */ 770 + u8 tucss; /* TCP checksum start */ 771 + u8 tucso; /* TCP checksum offset */ 772 772 __le16 tucse; /* TCP checksum end */ 773 773 } tcp_fields; 774 774 } upper_setup; ··· 776 776 union { 777 777 __le32 data; 778 778 struct { 779 - uint8_t status; /* Descriptor status */ 780 - uint8_t hdr_len; /* Header length */ 779 + u8 status; /* Descriptor status */ 780 + u8 hdr_len; /* Header length */ 781 781 __le16 mss; /* Maximum segment size */ 782 782 } fields; 783 783 } tcp_seg_setup; ··· 790 790 __le32 data; 791 791 struct { 792 792 __le16 length; /* Data buffer length */ 793 - uint8_t typ_len_ext; /* */ 794 - uint8_t cmd; /* */ 793 + u8 typ_len_ext; /* */ 794 + u8 cmd; /* */ 795 795 } flags; 796 796 } lower; 797 797 union { 798 798 __le32 data; 799 799 struct { 800 - uint8_t status; /* Descriptor status */ 801 - uint8_t popts; /* Packet Options */ 800 + u8 status; /* Descriptor status */ 801 + u8 popts; /* Packet Options */ 802 802 __le16 special; /* */ 803 803 } fields; 804 804 } upper; ··· 825 825 826 826 /* IPv4 Address Table Entry */ 827 827 struct e1000_ipv4_at_entry { 828 - volatile uint32_t ipv4_addr; /* IP Address (RW) */ 829 - volatile uint32_t reserved; 828 + volatile u32 ipv4_addr; /* IP Address (RW) */ 829 + volatile u32 reserved; 830 830 }; 831 831 832 832 /* Four wakeup IP addresses are supported */ ··· 837 837 838 838 /* IPv6 Address Table Entry */ 839 839 struct e1000_ipv6_at_entry { 840 - volatile uint8_t ipv6_addr[16]; 840 + volatile u8 ipv6_addr[16]; 841 841 }; 842 842 843 843 /* Flexible Filter Length Table Entry */ 844 844 struct e1000_fflt_entry { 845 - volatile uint32_t length; /* Flexible Filter Length (RW) */ 846 - volatile uint32_t reserved; 845 + volatile u32 length; /* Flexible Filter Length (RW) */ 846 + volatile u32 reserved; 847 847 }; 848 848 849 849 /* Flexible Filter Mask Table Entry */ 850 850 struct e1000_ffmt_entry { 851 - volatile uint32_t mask; /* Flexible Filter Mask (RW) */ 852 - volatile uint32_t reserved; 851 + volatile u32 mask; /* Flexible Filter Mask (RW) */ 852 + volatile u32 reserved; 853 853 }; 854 854 855 855 /* Flexible Filter Value Table Entry */ 856 856 struct e1000_ffvt_entry { 857 - volatile uint32_t value; /* Flexible Filter Value (RW) */ 858 - volatile uint32_t reserved; 857 + volatile u32 value; /* Flexible Filter Value (RW) */ 858 + volatile u32 reserved; 859 859 }; 860 860 861 861 /* Four Flexible Filters are supported */ ··· 1309 1309 1310 1310 /* Statistics counters collected by the MAC */ 1311 1311 struct e1000_hw_stats { 1312 - uint64_t crcerrs; 1313 - uint64_t algnerrc; 1314 - uint64_t symerrs; 1315 - uint64_t rxerrc; 1316 - uint64_t txerrc; 1317 - uint64_t mpc; 1318 - uint64_t scc; 1319 - uint64_t ecol; 1320 - uint64_t mcc; 1321 - uint64_t latecol; 1322 - uint64_t colc; 1323 - uint64_t dc; 1324 - uint64_t tncrs; 1325 - uint64_t sec; 1326 - uint64_t cexterr; 1327 - uint64_t rlec; 1328 - uint64_t xonrxc; 1329 - uint64_t xontxc; 1330 - uint64_t xoffrxc; 1331 - uint64_t xofftxc; 1332 - uint64_t fcruc; 1333 - uint64_t prc64; 1334 - uint64_t prc127; 1335 - uint64_t prc255; 1336 - uint64_t prc511; 1337 - uint64_t prc1023; 1338 - uint64_t prc1522; 1339 - uint64_t gprc; 1340 - uint64_t bprc; 1341 - uint64_t mprc; 1342 - uint64_t gptc; 1343 - uint64_t gorcl; 1344 - uint64_t gorch; 1345 - uint64_t gotcl; 1346 - uint64_t gotch; 1347 - uint64_t rnbc; 1348 - uint64_t ruc; 1349 - uint64_t rfc; 1350 - uint64_t roc; 1351 - uint64_t rlerrc; 1352 - uint64_t rjc; 1353 - uint64_t mgprc; 1354 - uint64_t mgpdc; 1355 - uint64_t mgptc; 1356 - uint64_t torl; 1357 - uint64_t torh; 1358 - uint64_t totl; 1359 - uint64_t toth; 1360 - uint64_t tpr; 1361 - uint64_t tpt; 1362 - uint64_t ptc64; 1363 - uint64_t ptc127; 1364 - uint64_t ptc255; 1365 - uint64_t ptc511; 1366 - uint64_t ptc1023; 1367 - uint64_t ptc1522; 1368 - uint64_t mptc; 1369 - uint64_t bptc; 1370 - uint64_t tsctc; 1371 - uint64_t tsctfc; 1372 - uint64_t iac; 1373 - uint64_t icrxptc; 1374 - uint64_t icrxatc; 1375 - uint64_t ictxptc; 1376 - uint64_t ictxatc; 1377 - uint64_t ictxqec; 1378 - uint64_t ictxqmtc; 1379 - uint64_t icrxdmtc; 1380 - uint64_t icrxoc; 1312 + u64 crcerrs; 1313 + u64 algnerrc; 1314 + u64 symerrs; 1315 + u64 rxerrc; 1316 + u64 txerrc; 1317 + u64 mpc; 1318 + u64 scc; 1319 + u64 ecol; 1320 + u64 mcc; 1321 + u64 latecol; 1322 + u64 colc; 1323 + u64 dc; 1324 + u64 tncrs; 1325 + u64 sec; 1326 + u64 cexterr; 1327 + u64 rlec; 1328 + u64 xonrxc; 1329 + u64 xontxc; 1330 + u64 xoffrxc; 1331 + u64 xofftxc; 1332 + u64 fcruc; 1333 + u64 prc64; 1334 + u64 prc127; 1335 + u64 prc255; 1336 + u64 prc511; 1337 + u64 prc1023; 1338 + u64 prc1522; 1339 + u64 gprc; 1340 + u64 bprc; 1341 + u64 mprc; 1342 + u64 gptc; 1343 + u64 gorcl; 1344 + u64 gorch; 1345 + u64 gotcl; 1346 + u64 gotch; 1347 + u64 rnbc; 1348 + u64 ruc; 1349 + u64 rfc; 1350 + u64 roc; 1351 + u64 rlerrc; 1352 + u64 rjc; 1353 + u64 mgprc; 1354 + u64 mgpdc; 1355 + u64 mgptc; 1356 + u64 torl; 1357 + u64 torh; 1358 + u64 totl; 1359 + u64 toth; 1360 + u64 tpr; 1361 + u64 tpt; 1362 + u64 ptc64; 1363 + u64 ptc127; 1364 + u64 ptc255; 1365 + u64 ptc511; 1366 + u64 ptc1023; 1367 + u64 ptc1522; 1368 + u64 mptc; 1369 + u64 bptc; 1370 + u64 tsctc; 1371 + u64 tsctfc; 1372 + u64 iac; 1373 + u64 icrxptc; 1374 + u64 icrxatc; 1375 + u64 ictxptc; 1376 + u64 ictxatc; 1377 + u64 ictxqec; 1378 + u64 ictxqmtc; 1379 + u64 icrxdmtc; 1380 + u64 icrxoc; 1381 1381 }; 1382 1382 1383 1383 /* Structure containing variables used by the shared code (e1000_hw.c) */ 1384 1384 struct e1000_hw { 1385 - uint8_t __iomem *hw_addr; 1386 - uint8_t __iomem *flash_address; 1385 + u8 __iomem *hw_addr; 1386 + u8 __iomem *flash_address; 1387 1387 e1000_mac_type mac_type; 1388 1388 e1000_phy_type phy_type; 1389 - uint32_t phy_init_script; 1389 + u32 phy_init_script; 1390 1390 e1000_media_type media_type; 1391 1391 void *back; 1392 1392 struct e1000_shadow_ram *eeprom_shadow_ram; 1393 - uint32_t flash_bank_size; 1394 - uint32_t flash_base_addr; 1393 + u32 flash_bank_size; 1394 + u32 flash_base_addr; 1395 1395 e1000_fc_type fc; 1396 1396 e1000_bus_speed bus_speed; 1397 1397 e1000_bus_width bus_width; ··· 1400 1400 e1000_ms_type master_slave; 1401 1401 e1000_ms_type original_master_slave; 1402 1402 e1000_ffe_config ffe_config_state; 1403 - uint32_t asf_firmware_present; 1404 - uint32_t eeprom_semaphore_present; 1405 - uint32_t swfw_sync_present; 1406 - uint32_t swfwhw_semaphore_present; 1403 + u32 asf_firmware_present; 1404 + u32 eeprom_semaphore_present; 1405 + u32 swfw_sync_present; 1406 + u32 swfwhw_semaphore_present; 1407 1407 unsigned long io_base; 1408 - uint32_t phy_id; 1409 - uint32_t phy_revision; 1410 - uint32_t phy_addr; 1411 - uint32_t original_fc; 1412 - uint32_t txcw; 1413 - uint32_t autoneg_failed; 1414 - uint32_t max_frame_size; 1415 - uint32_t min_frame_size; 1416 - uint32_t mc_filter_type; 1417 - uint32_t num_mc_addrs; 1418 - uint32_t collision_delta; 1419 - uint32_t tx_packet_delta; 1420 - uint32_t ledctl_default; 1421 - uint32_t ledctl_mode1; 1422 - uint32_t ledctl_mode2; 1408 + u32 phy_id; 1409 + u32 phy_revision; 1410 + u32 phy_addr; 1411 + u32 original_fc; 1412 + u32 txcw; 1413 + u32 autoneg_failed; 1414 + u32 max_frame_size; 1415 + u32 min_frame_size; 1416 + u32 mc_filter_type; 1417 + u32 num_mc_addrs; 1418 + u32 collision_delta; 1419 + u32 tx_packet_delta; 1420 + u32 ledctl_default; 1421 + u32 ledctl_mode1; 1422 + u32 ledctl_mode2; 1423 1423 bool tx_pkt_filtering; 1424 1424 struct e1000_host_mng_dhcp_cookie mng_cookie; 1425 - uint16_t phy_spd_default; 1426 - uint16_t autoneg_advertised; 1427 - uint16_t pci_cmd_word; 1428 - uint16_t fc_high_water; 1429 - uint16_t fc_low_water; 1430 - uint16_t fc_pause_time; 1431 - uint16_t current_ifs_val; 1432 - uint16_t ifs_min_val; 1433 - uint16_t ifs_max_val; 1434 - uint16_t ifs_step_size; 1435 - uint16_t ifs_ratio; 1436 - uint16_t device_id; 1437 - uint16_t vendor_id; 1438 - uint16_t subsystem_id; 1439 - uint16_t subsystem_vendor_id; 1440 - uint8_t revision_id; 1441 - uint8_t autoneg; 1442 - uint8_t mdix; 1443 - uint8_t forced_speed_duplex; 1444 - uint8_t wait_autoneg_complete; 1445 - uint8_t dma_fairness; 1446 - uint8_t mac_addr[NODE_ADDRESS_SIZE]; 1447 - uint8_t perm_mac_addr[NODE_ADDRESS_SIZE]; 1425 + u16 phy_spd_default; 1426 + u16 autoneg_advertised; 1427 + u16 pci_cmd_word; 1428 + u16 fc_high_water; 1429 + u16 fc_low_water; 1430 + u16 fc_pause_time; 1431 + u16 current_ifs_val; 1432 + u16 ifs_min_val; 1433 + u16 ifs_max_val; 1434 + u16 ifs_step_size; 1435 + u16 ifs_ratio; 1436 + u16 device_id; 1437 + u16 vendor_id; 1438 + u16 subsystem_id; 1439 + u16 subsystem_vendor_id; 1440 + u8 revision_id; 1441 + u8 autoneg; 1442 + u8 mdix; 1443 + u8 forced_speed_duplex; 1444 + u8 wait_autoneg_complete; 1445 + u8 dma_fairness; 1446 + u8 mac_addr[NODE_ADDRESS_SIZE]; 1447 + u8 perm_mac_addr[NODE_ADDRESS_SIZE]; 1448 1448 bool disable_polarity_correction; 1449 1449 bool speed_downgraded; 1450 1450 e1000_smart_speed smart_speed; ··· 2165 2165 #define E1000_HI_COMMAND_TIMEOUT 500 /* Time in ms to process HI command */ 2166 2166 2167 2167 struct e1000_host_command_header { 2168 - uint8_t command_id; 2169 - uint8_t command_length; 2170 - uint8_t command_options; /* I/F bits for command, status for return */ 2171 - uint8_t checksum; 2168 + u8 command_id; 2169 + u8 command_length; 2170 + u8 command_options; /* I/F bits for command, status for return */ 2171 + u8 checksum; 2172 2172 }; 2173 2173 struct e1000_host_command_info { 2174 2174 struct e1000_host_command_header command_header; /* Command Head/Command Result Head has 4 bytes */ 2175 - uint8_t command_data[E1000_HI_MAX_DATA_LENGTH]; /* Command data can length 0..252 */ 2175 + u8 command_data[E1000_HI_MAX_DATA_LENGTH]; /* Command data can length 0..252 */ 2176 2176 }; 2177 2177 2178 2178 /* Host SMB register #0 */ ··· 2495 2495 /* Number of milliseconds we wait for PHY configuration done after MAC reset */ 2496 2496 #define PHY_CFG_TIMEOUT 100 2497 2497 2498 - #define E1000_TX_BUFFER_SIZE ((uint32_t)1514) 2498 + #define E1000_TX_BUFFER_SIZE ((u32)1514) 2499 2499 2500 2500 /* The carrier extension symbol, as received by the NIC. */ 2501 2501 #define CARRIER_EXTENSION 0x0F ··· 3312 3312 /* Offset 04h HSFSTS */ 3313 3313 union ich8_hws_flash_status { 3314 3314 struct ich8_hsfsts { 3315 - #ifdef E1000_BIG_ENDIAN 3316 - uint16_t reserved2 :6; 3317 - uint16_t fldesvalid :1; 3318 - uint16_t flockdn :1; 3319 - uint16_t flcdone :1; 3320 - uint16_t flcerr :1; 3321 - uint16_t dael :1; 3322 - uint16_t berasesz :2; 3323 - uint16_t flcinprog :1; 3324 - uint16_t reserved1 :2; 3315 + #ifdef __BIG_ENDIAN 3316 + u16 reserved2 :6; 3317 + u16 fldesvalid :1; 3318 + u16 flockdn :1; 3319 + u16 flcdone :1; 3320 + u16 flcerr :1; 3321 + u16 dael :1; 3322 + u16 berasesz :2; 3323 + u16 flcinprog :1; 3324 + u16 reserved1 :2; 3325 3325 #else 3326 - uint16_t flcdone :1; /* bit 0 Flash Cycle Done */ 3327 - uint16_t flcerr :1; /* bit 1 Flash Cycle Error */ 3328 - uint16_t dael :1; /* bit 2 Direct Access error Log */ 3329 - uint16_t berasesz :2; /* bit 4:3 Block/Sector Erase Size */ 3330 - uint16_t flcinprog :1; /* bit 5 flash SPI cycle in Progress */ 3331 - uint16_t reserved1 :2; /* bit 13:6 Reserved */ 3332 - uint16_t reserved2 :6; /* bit 13:6 Reserved */ 3333 - uint16_t fldesvalid :1; /* bit 14 Flash Descriptor Valid */ 3334 - uint16_t flockdn :1; /* bit 15 Flash Configuration Lock-Down */ 3326 + u16 flcdone :1; /* bit 0 Flash Cycle Done */ 3327 + u16 flcerr :1; /* bit 1 Flash Cycle Error */ 3328 + u16 dael :1; /* bit 2 Direct Access error Log */ 3329 + u16 berasesz :2; /* bit 4:3 Block/Sector Erase Size */ 3330 + u16 flcinprog :1; /* bit 5 flash SPI cycle in Progress */ 3331 + u16 reserved1 :2; /* bit 13:6 Reserved */ 3332 + u16 reserved2 :6; /* bit 13:6 Reserved */ 3333 + u16 fldesvalid :1; /* bit 14 Flash Descriptor Valid */ 3334 + u16 flockdn :1; /* bit 15 Flash Configuration Lock-Down */ 3335 3335 #endif 3336 3336 } hsf_status; 3337 - uint16_t regval; 3337 + u16 regval; 3338 3338 }; 3339 3339 3340 3340 /* ICH8 GbE Flash Hardware Sequencing Flash control Register bit breakdown */ 3341 3341 /* Offset 06h FLCTL */ 3342 3342 union ich8_hws_flash_ctrl { 3343 3343 struct ich8_hsflctl { 3344 - #ifdef E1000_BIG_ENDIAN 3345 - uint16_t fldbcount :2; 3346 - uint16_t flockdn :6; 3347 - uint16_t flcgo :1; 3348 - uint16_t flcycle :2; 3349 - uint16_t reserved :5; 3344 + #ifdef __BIG_ENDIAN 3345 + u16 fldbcount :2; 3346 + u16 flockdn :6; 3347 + u16 flcgo :1; 3348 + u16 flcycle :2; 3349 + u16 reserved :5; 3350 3350 #else 3351 - uint16_t flcgo :1; /* 0 Flash Cycle Go */ 3352 - uint16_t flcycle :2; /* 2:1 Flash Cycle */ 3353 - uint16_t reserved :5; /* 7:3 Reserved */ 3354 - uint16_t fldbcount :2; /* 9:8 Flash Data Byte Count */ 3355 - uint16_t flockdn :6; /* 15:10 Reserved */ 3351 + u16 flcgo :1; /* 0 Flash Cycle Go */ 3352 + u16 flcycle :2; /* 2:1 Flash Cycle */ 3353 + u16 reserved :5; /* 7:3 Reserved */ 3354 + u16 fldbcount :2; /* 9:8 Flash Data Byte Count */ 3355 + u16 flockdn :6; /* 15:10 Reserved */ 3356 3356 #endif 3357 3357 } hsf_ctrl; 3358 - uint16_t regval; 3358 + u16 regval; 3359 3359 }; 3360 3360 3361 3361 /* ICH8 Flash Region Access Permissions */ 3362 3362 union ich8_hws_flash_regacc { 3363 3363 struct ich8_flracc { 3364 - #ifdef E1000_BIG_ENDIAN 3365 - uint32_t gmwag :8; 3366 - uint32_t gmrag :8; 3367 - uint32_t grwa :8; 3368 - uint32_t grra :8; 3364 + #ifdef __BIG_ENDIAN 3365 + u32 gmwag :8; 3366 + u32 gmrag :8; 3367 + u32 grwa :8; 3368 + u32 grra :8; 3369 3369 #else 3370 - uint32_t grra :8; /* 0:7 GbE region Read Access */ 3371 - uint32_t grwa :8; /* 8:15 GbE region Write Access */ 3372 - uint32_t gmrag :8; /* 23:16 GbE Master Read Access Grant */ 3373 - uint32_t gmwag :8; /* 31:24 GbE Master Write Access Grant */ 3370 + u32 grra :8; /* 0:7 GbE region Read Access */ 3371 + u32 grwa :8; /* 8:15 GbE region Write Access */ 3372 + u32 gmrag :8; /* 23:16 GbE Master Read Access Grant */ 3373 + u32 gmwag :8; /* 31:24 GbE Master Write Access Grant */ 3374 3374 #endif 3375 3375 } hsf_flregacc; 3376 - uint16_t regval; 3376 + u16 regval; 3377 3377 }; 3378 3378 3379 3379 /* Miscellaneous PHY bit definitions. */
+87 -87
drivers/net/e1000/e1000_main.c
··· 127 127 void e1000_down(struct e1000_adapter *adapter); 128 128 void e1000_reinit_locked(struct e1000_adapter *adapter); 129 129 void e1000_reset(struct e1000_adapter *adapter); 130 - int e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx); 130 + int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx); 131 131 int e1000_setup_all_tx_resources(struct e1000_adapter *adapter); 132 132 int e1000_setup_all_rx_resources(struct e1000_adapter *adapter); 133 133 void e1000_free_all_tx_resources(struct e1000_adapter *adapter); ··· 203 203 struct sk_buff *skb); 204 204 205 205 static void e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp); 206 - static void e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid); 207 - static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); 206 + static void e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid); 207 + static void e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid); 208 208 static void e1000_restore_vlan(struct e1000_adapter *adapter); 209 209 210 210 static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); ··· 368 368 e1000_update_mng_vlan(struct e1000_adapter *adapter) 369 369 { 370 370 struct net_device *netdev = adapter->netdev; 371 - uint16_t vid = adapter->hw.mng_cookie.vlan_id; 372 - uint16_t old_vid = adapter->mng_vlan_id; 371 + u16 vid = adapter->hw.mng_cookie.vlan_id; 372 + u16 old_vid = adapter->mng_vlan_id; 373 373 if (adapter->vlgrp) { 374 374 if (!vlan_group_get_device(adapter->vlgrp, vid)) { 375 375 if (adapter->hw.mng_cookie.status & ··· 379 379 } else 380 380 adapter->mng_vlan_id = E1000_MNG_VLAN_NONE; 381 381 382 - if ((old_vid != (uint16_t)E1000_MNG_VLAN_NONE) && 382 + if ((old_vid != (u16)E1000_MNG_VLAN_NONE) && 383 383 (vid != old_vid) && 384 384 !vlan_group_get_device(adapter->vlgrp, old_vid)) 385 385 e1000_vlan_rx_kill_vid(netdev, old_vid); ··· 402 402 static void 403 403 e1000_release_hw_control(struct e1000_adapter *adapter) 404 404 { 405 - uint32_t ctrl_ext; 406 - uint32_t swsm; 405 + u32 ctrl_ext; 406 + u32 swsm; 407 407 408 408 /* Let firmware taken over control of h/w */ 409 409 switch (adapter->hw.mac_type) { ··· 439 439 static void 440 440 e1000_get_hw_control(struct e1000_adapter *adapter) 441 441 { 442 - uint32_t ctrl_ext; 443 - uint32_t swsm; 442 + u32 ctrl_ext; 443 + u32 swsm; 444 444 445 445 /* Let firmware know the driver has taken over */ 446 446 switch (adapter->hw.mac_type) { ··· 466 466 e1000_init_manageability(struct e1000_adapter *adapter) 467 467 { 468 468 if (adapter->en_mng_pt) { 469 - uint32_t manc = E1000_READ_REG(&adapter->hw, MANC); 469 + u32 manc = E1000_READ_REG(&adapter->hw, MANC); 470 470 471 471 /* disable hardware interception of ARP */ 472 472 manc &= ~(E1000_MANC_ARP_EN); ··· 475 475 /* this will probably generate destination unreachable messages 476 476 * from the host OS, but the packets will be handled on SMBUS */ 477 477 if (adapter->hw.has_manc2h) { 478 - uint32_t manc2h = E1000_READ_REG(&adapter->hw, MANC2H); 478 + u32 manc2h = E1000_READ_REG(&adapter->hw, MANC2H); 479 479 480 480 manc |= E1000_MANC_EN_MNG2HOST; 481 481 #define E1000_MNG2HOST_PORT_623 (1 << 5) ··· 493 493 e1000_release_manageability(struct e1000_adapter *adapter) 494 494 { 495 495 if (adapter->en_mng_pt) { 496 - uint32_t manc = E1000_READ_REG(&adapter->hw, MANC); 496 + u32 manc = E1000_READ_REG(&adapter->hw, MANC); 497 497 498 498 /* re-enable hardware interception of ARP */ 499 499 manc |= E1000_MANC_ARP_EN; ··· 566 566 567 567 void e1000_power_up_phy(struct e1000_adapter *adapter) 568 568 { 569 - uint16_t mii_reg = 0; 569 + u16 mii_reg = 0; 570 570 571 571 /* Just clear the power down bit to wake the phy back up */ 572 572 if (adapter->hw.media_type == e1000_media_type_copper) { ··· 587 587 * (c) SoL/IDER session is active */ 588 588 if (!adapter->wol && adapter->hw.mac_type >= e1000_82540 && 589 589 adapter->hw.media_type == e1000_media_type_copper) { 590 - uint16_t mii_reg = 0; 590 + u16 mii_reg = 0; 591 591 592 592 switch (adapter->hw.mac_type) { 593 593 case e1000_82540: ··· 667 667 void 668 668 e1000_reset(struct e1000_adapter *adapter) 669 669 { 670 - uint32_t pba = 0, tx_space, min_tx_space, min_rx_space; 671 - uint16_t fc_high_water_mark = E1000_FC_HIGH_DIFF; 670 + u32 pba = 0, tx_space, min_tx_space, min_rx_space; 671 + u16 fc_high_water_mark = E1000_FC_HIGH_DIFF; 672 672 bool legacy_pba_adjust = false; 673 673 674 674 /* Repartition Pba for greater than 9k mtu ··· 815 815 adapter->hw.mac_type <= e1000_82547_rev_2 && 816 816 adapter->hw.autoneg == 1 && 817 817 adapter->hw.autoneg_advertised == ADVERTISE_1000_FULL) { 818 - uint32_t ctrl = E1000_READ_REG(&adapter->hw, CTRL); 818 + u32 ctrl = E1000_READ_REG(&adapter->hw, CTRL); 819 819 /* clear phy power management bit if we are in gig only mode, 820 820 * which if enabled will attempt negotiation to 100Mb, which 821 821 * can cause a loss of link at power off or driver unload */ ··· 832 832 if (!adapter->smart_power_down && 833 833 (adapter->hw.mac_type == e1000_82571 || 834 834 adapter->hw.mac_type == e1000_82572)) { 835 - uint16_t phy_data = 0; 835 + u16 phy_data = 0; 836 836 /* speed up time to link by disabling smart power down, ignore 837 837 * the return value of this function because there is nothing 838 838 * different we would do if it failed */ ··· 926 926 static int cards_found = 0; 927 927 static int global_quad_port_a = 0; /* global ksp3 port a indication */ 928 928 int i, err, pci_using_dac; 929 - uint16_t eeprom_data = 0; 930 - uint16_t eeprom_apme_mask = E1000_EEPROM_APME; 929 + u16 eeprom_data = 0; 930 + u16 eeprom_apme_mask = E1000_EEPROM_APME; 931 931 DECLARE_MAC_BUF(mac); 932 932 933 933 if ((err = pci_enable_device(pdev))) ··· 1702 1702 static void 1703 1703 e1000_configure_tx(struct e1000_adapter *adapter) 1704 1704 { 1705 - uint64_t tdba; 1705 + u64 tdba; 1706 1706 struct e1000_hw *hw = &adapter->hw; 1707 - uint32_t tdlen, tctl, tipg, tarc; 1708 - uint32_t ipgr1, ipgr2; 1707 + u32 tdlen, tctl, tipg, tarc; 1708 + u32 ipgr1, ipgr2; 1709 1709 1710 1710 /* Setup the HW Tx Head and Tail descriptor pointers */ 1711 1711 ··· 1947 1947 static void 1948 1948 e1000_setup_rctl(struct e1000_adapter *adapter) 1949 1949 { 1950 - uint32_t rctl, rfctl; 1951 - uint32_t psrctl = 0; 1950 + u32 rctl, rfctl; 1951 + u32 psrctl = 0; 1952 1952 #ifndef CONFIG_E1000_DISABLE_PACKET_SPLIT 1953 - uint32_t pages = 0; 1953 + u32 pages = 0; 1954 1954 #endif 1955 1955 1956 1956 rctl = E1000_READ_REG(&adapter->hw, RCTL); ··· 2065 2065 static void 2066 2066 e1000_configure_rx(struct e1000_adapter *adapter) 2067 2067 { 2068 - uint64_t rdba; 2068 + u64 rdba; 2069 2069 struct e1000_hw *hw = &adapter->hw; 2070 - uint32_t rdlen, rctl, rxcsum, ctrl_ext; 2070 + u32 rdlen, rctl, rxcsum, ctrl_ext; 2071 2071 2072 2072 if (adapter->rx_ps_pages) { 2073 2073 /* this is a 32 byte descriptor */ ··· 2387 2387 e1000_enter_82542_rst(struct e1000_adapter *adapter) 2388 2388 { 2389 2389 struct net_device *netdev = adapter->netdev; 2390 - uint32_t rctl; 2390 + u32 rctl; 2391 2391 2392 2392 e1000_pci_clear_mwi(&adapter->hw); 2393 2393 ··· 2405 2405 e1000_leave_82542_rst(struct e1000_adapter *adapter) 2406 2406 { 2407 2407 struct net_device *netdev = adapter->netdev; 2408 - uint32_t rctl; 2408 + u32 rctl; 2409 2409 2410 2410 rctl = E1000_READ_REG(&adapter->hw, RCTL); 2411 2411 rctl &= ~E1000_RCTL_RST; ··· 2490 2490 struct e1000_hw *hw = &adapter->hw; 2491 2491 struct dev_addr_list *uc_ptr; 2492 2492 struct dev_addr_list *mc_ptr; 2493 - uint32_t rctl; 2494 - uint32_t hash_value; 2493 + u32 rctl; 2494 + u32 hash_value; 2495 2495 int i, rar_entries = E1000_RAR_ENTRIES; 2496 2496 int mta_reg_count = (hw->mac_type == e1000_ich8lan) ? 2497 2497 E1000_NUM_MTA_REGISTERS_ICH8LAN : ··· 2595 2595 { 2596 2596 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 2597 2597 struct net_device *netdev = adapter->netdev; 2598 - uint32_t tctl; 2598 + u32 tctl; 2599 2599 2600 2600 if (atomic_read(&adapter->tx_fifo_stall)) { 2601 2601 if ((E1000_READ_REG(&adapter->hw, TDT) == ··· 2637 2637 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 2638 2638 struct net_device *netdev = adapter->netdev; 2639 2639 struct e1000_tx_ring *txdr = adapter->tx_ring; 2640 - uint32_t link, tctl; 2641 - int32_t ret_val; 2640 + u32 link, tctl; 2641 + s32 ret_val; 2642 2642 2643 2643 ret_val = e1000_check_for_link(&adapter->hw); 2644 2644 if ((ret_val == E1000_ERR_PHY) && ··· 2663 2663 2664 2664 if (link) { 2665 2665 if (!netif_carrier_ok(netdev)) { 2666 - uint32_t ctrl; 2666 + u32 ctrl; 2667 2667 bool txb2b = true; 2668 2668 e1000_get_speed_and_duplex(&adapter->hw, 2669 2669 &adapter->link_speed, ··· 2700 2700 if ((adapter->hw.mac_type == e1000_82571 || 2701 2701 adapter->hw.mac_type == e1000_82572) && 2702 2702 !txb2b) { 2703 - uint32_t tarc0; 2703 + u32 tarc0; 2704 2704 tarc0 = E1000_READ_REG(&adapter->hw, TARC0); 2705 2705 tarc0 &= ~(1 << 21); 2706 2706 E1000_WRITE_REG(&adapter->hw, TARC0, tarc0); ··· 2742 2742 /* make sure the receive unit is started */ 2743 2743 if (adapter->hw.rx_needs_kicking) { 2744 2744 struct e1000_hw *hw = &adapter->hw; 2745 - uint32_t rctl = E1000_READ_REG(hw, RCTL); 2745 + u32 rctl = E1000_READ_REG(hw, RCTL); 2746 2746 E1000_WRITE_REG(hw, RCTL, rctl | E1000_RCTL_EN); 2747 2747 } 2748 2748 } ··· 2832 2832 * @bytes: the number of bytes during this measurement interval 2833 2833 **/ 2834 2834 static unsigned int e1000_update_itr(struct e1000_adapter *adapter, 2835 - uint16_t itr_setting, 2835 + u16 itr_setting, 2836 2836 int packets, 2837 2837 int bytes) 2838 2838 { ··· 2884 2884 static void e1000_set_itr(struct e1000_adapter *adapter) 2885 2885 { 2886 2886 struct e1000_hw *hw = &adapter->hw; 2887 - uint16_t current_itr; 2888 - uint32_t new_itr = adapter->itr; 2887 + u16 current_itr; 2888 + u32 new_itr = adapter->itr; 2889 2889 2890 2890 if (unlikely(hw->mac_type < e1000_82540)) 2891 2891 return; ··· 2959 2959 struct e1000_context_desc *context_desc; 2960 2960 struct e1000_buffer *buffer_info; 2961 2961 unsigned int i; 2962 - uint32_t cmd_length = 0; 2963 - uint16_t ipcse = 0, tucse, mss; 2964 - uint8_t ipcss, ipcso, tucss, tucso, hdr_len; 2962 + u32 cmd_length = 0; 2963 + u16 ipcse = 0, tucse, mss; 2964 + u8 ipcss, ipcso, tucss, tucso, hdr_len; 2965 2965 int err; 2966 2966 2967 2967 if (skb_is_gso(skb)) { ··· 3032 3032 struct e1000_context_desc *context_desc; 3033 3033 struct e1000_buffer *buffer_info; 3034 3034 unsigned int i; 3035 - uint8_t css; 3035 + u8 css; 3036 3036 3037 3037 if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) { 3038 3038 css = skb_transport_offset(skb); ··· 3177 3177 { 3178 3178 struct e1000_tx_desc *tx_desc = NULL; 3179 3179 struct e1000_buffer *buffer_info; 3180 - uint32_t txd_upper = 0, txd_lower = E1000_TXD_CMD_IFCS; 3180 + u32 txd_upper = 0, txd_lower = E1000_TXD_CMD_IFCS; 3181 3181 unsigned int i; 3182 3182 3183 3183 if (likely(tx_flags & E1000_TX_FLAGS_TSO)) { ··· 3241 3241 static int 3242 3242 e1000_82547_fifo_workaround(struct e1000_adapter *adapter, struct sk_buff *skb) 3243 3243 { 3244 - uint32_t fifo_space = adapter->tx_fifo_size - adapter->tx_fifo_head; 3245 - uint32_t skb_fifo_len = skb->len + E1000_FIFO_HDR; 3244 + u32 fifo_space = adapter->tx_fifo_size - adapter->tx_fifo_head; 3245 + u32 skb_fifo_len = skb->len + E1000_FIFO_HDR; 3246 3246 3247 3247 skb_fifo_len = ALIGN(skb_fifo_len, E1000_FIFO_HDR); 3248 3248 ··· 3269 3269 e1000_transfer_dhcp_info(struct e1000_adapter *adapter, struct sk_buff *skb) 3270 3270 { 3271 3271 struct e1000_hw *hw = &adapter->hw; 3272 - uint16_t length, offset; 3272 + u16 length, offset; 3273 3273 if (vlan_tx_tag_present(skb)) { 3274 3274 if (!((vlan_tx_tag_get(skb) == adapter->hw.mng_cookie.vlan_id) && 3275 3275 ( adapter->hw.mng_cookie.status & ··· 3280 3280 struct ethhdr *eth = (struct ethhdr *) skb->data; 3281 3281 if ((htons(ETH_P_IP) == eth->h_proto)) { 3282 3282 const struct iphdr *ip = 3283 - (struct iphdr *)((uint8_t *)skb->data+14); 3283 + (struct iphdr *)((u8 *)skb->data+14); 3284 3284 if (IPPROTO_UDP == ip->protocol) { 3285 3285 struct udphdr *udp = 3286 - (struct udphdr *)((uint8_t *)ip + 3286 + (struct udphdr *)((u8 *)ip + 3287 3287 (ip->ihl << 2)); 3288 3288 if (ntohs(udp->dest) == 67) { 3289 - offset = (uint8_t *)udp + 8 - skb->data; 3289 + offset = (u8 *)udp + 8 - skb->data; 3290 3290 length = skb->len - offset; 3291 3291 3292 3292 return e1000_mng_write_dhcp_info(hw, 3293 - (uint8_t *)udp + 8, 3293 + (u8 *)udp + 8, 3294 3294 length); 3295 3295 } 3296 3296 } ··· 3370 3370 * overrun the FIFO, adjust the max buffer len if mss 3371 3371 * drops. */ 3372 3372 if (mss) { 3373 - uint8_t hdr_len; 3373 + u8 hdr_len; 3374 3374 max_per_txd = min(mss << 2, max_per_txd); 3375 3375 max_txd_pwr = fls(max_per_txd) - 1; 3376 3376 ··· 3557 3557 { 3558 3558 struct e1000_adapter *adapter = netdev_priv(netdev); 3559 3559 int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE; 3560 - uint16_t eeprom_data = 0; 3560 + u16 eeprom_data = 0; 3561 3561 3562 3562 if ((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) || 3563 3563 (max_frame > MAX_JUMBO_FRAME_SIZE)) { ··· 3652 3652 struct e1000_hw *hw = &adapter->hw; 3653 3653 struct pci_dev *pdev = adapter->pdev; 3654 3654 unsigned long flags; 3655 - uint16_t phy_tmp; 3655 + u16 phy_tmp; 3656 3656 3657 3657 #define PHY_IDLE_ERROR_COUNT_MASK 0x00FF 3658 3658 ··· 3829 3829 #ifndef CONFIG_E1000_NAPI 3830 3830 int i; 3831 3831 #endif 3832 - uint32_t icr = E1000_READ_REG(hw, ICR); 3832 + u32 icr = E1000_READ_REG(hw, ICR); 3833 3833 3834 3834 /* in NAPI mode read ICR disables interrupts using IAM */ 3835 3835 ··· 3841 3841 if (netif_carrier_ok(netdev) && 3842 3842 (adapter->hw.mac_type == e1000_80003es2lan)) { 3843 3843 /* disable receives */ 3844 - uint32_t rctl = E1000_READ_REG(hw, RCTL); 3844 + u32 rctl = E1000_READ_REG(hw, RCTL); 3845 3845 E1000_WRITE_REG(hw, RCTL, rctl & ~E1000_RCTL_EN); 3846 3846 } 3847 3847 /* guard against interrupt when we're going down */ ··· 3888 3888 struct net_device *netdev = data; 3889 3889 struct e1000_adapter *adapter = netdev_priv(netdev); 3890 3890 struct e1000_hw *hw = &adapter->hw; 3891 - uint32_t rctl, icr = E1000_READ_REG(hw, ICR); 3891 + u32 rctl, icr = E1000_READ_REG(hw, ICR); 3892 3892 #ifndef CONFIG_E1000_NAPI 3893 3893 int i; 3894 3894 #endif ··· 4139 4139 4140 4140 static void 4141 4141 e1000_rx_checksum(struct e1000_adapter *adapter, 4142 - uint32_t status_err, uint32_t csum, 4142 + u32 status_err, u32 csum, 4143 4143 struct sk_buff *skb) 4144 4144 { 4145 - uint16_t status = (uint16_t)status_err; 4146 - uint8_t errors = (uint8_t)(status_err >> 24); 4145 + u16 status = (u16)status_err; 4146 + u8 errors = (u8)(status_err >> 24); 4147 4147 skb->ip_summed = CHECKSUM_NONE; 4148 4148 4149 4149 /* 82543 or newer only */ ··· 4200 4200 struct e1000_rx_desc *rx_desc, *next_rxd; 4201 4201 struct e1000_buffer *buffer_info, *next_buffer; 4202 4202 unsigned long flags; 4203 - uint32_t length; 4204 - uint8_t last_byte; 4203 + u32 length; 4204 + u8 last_byte; 4205 4205 unsigned int i; 4206 4206 int cleaned_count = 0; 4207 4207 bool cleaned = false; ··· 4301 4301 4302 4302 /* Receive Checksum Offload */ 4303 4303 e1000_rx_checksum(adapter, 4304 - (uint32_t)(status) | 4305 - ((uint32_t)(rx_desc->errors) << 24), 4304 + (u32)(status) | 4305 + ((u32)(rx_desc->errors) << 24), 4306 4306 le16_to_cpu(rx_desc->csum), skb); 4307 4307 4308 4308 skb->protocol = eth_type_trans(skb, netdev); ··· 4376 4376 struct e1000_ps_page_dma *ps_page_dma; 4377 4377 struct sk_buff *skb; 4378 4378 unsigned int i, j; 4379 - uint32_t length, staterr; 4379 + u32 length, staterr; 4380 4380 int cleaned_count = 0; 4381 4381 bool cleaned = false; 4382 4382 unsigned int total_rx_bytes=0, total_rx_packets=0; ··· 4759 4759 static void 4760 4760 e1000_smartspeed(struct e1000_adapter *adapter) 4761 4761 { 4762 - uint16_t phy_status; 4763 - uint16_t phy_ctrl; 4762 + u16 phy_status; 4763 + u16 phy_ctrl; 4764 4764 4765 4765 if ((adapter->hw.phy_type != e1000_phy_igp) || !adapter->hw.autoneg || 4766 4766 !(adapter->hw.autoneg_advertised & ADVERTISE_1000_FULL)) ··· 4839 4839 struct e1000_adapter *adapter = netdev_priv(netdev); 4840 4840 struct mii_ioctl_data *data = if_mii(ifr); 4841 4841 int retval; 4842 - uint16_t mii_reg; 4843 - uint16_t spddplx; 4842 + u16 mii_reg; 4843 + u16 spddplx; 4844 4844 unsigned long flags; 4845 4845 4846 4846 if (adapter->hw.media_type != e1000_media_type_copper) ··· 4959 4959 pcix_set_mmrbc(adapter->pdev, mmrbc); 4960 4960 } 4961 4961 4962 - int32_t 4963 - e1000_read_pcie_cap_reg(struct e1000_hw *hw, uint32_t reg, uint16_t *value) 4962 + s32 4963 + e1000_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value) 4964 4964 { 4965 4965 struct e1000_adapter *adapter = hw->back; 4966 - uint16_t cap_offset; 4966 + u16 cap_offset; 4967 4967 4968 4968 cap_offset = pci_find_capability(adapter->pdev, PCI_CAP_ID_EXP); 4969 4969 if (!cap_offset) ··· 4975 4975 } 4976 4976 4977 4977 void 4978 - e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value) 4978 + e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value) 4979 4979 { 4980 4980 outl(value, port); 4981 4981 } ··· 4984 4984 e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) 4985 4985 { 4986 4986 struct e1000_adapter *adapter = netdev_priv(netdev); 4987 - uint32_t ctrl, rctl; 4987 + u32 ctrl, rctl; 4988 4988 4989 4989 if (!test_bit(__E1000_DOWN, &adapter->flags)) 4990 4990 e1000_irq_disable(adapter); ··· 5016 5016 rctl &= ~E1000_RCTL_VFE; 5017 5017 E1000_WRITE_REG(&adapter->hw, RCTL, rctl); 5018 5018 if (adapter->mng_vlan_id != 5019 - (uint16_t)E1000_MNG_VLAN_NONE) { 5019 + (u16)E1000_MNG_VLAN_NONE) { 5020 5020 e1000_vlan_rx_kill_vid(netdev, 5021 5021 adapter->mng_vlan_id); 5022 5022 adapter->mng_vlan_id = E1000_MNG_VLAN_NONE; ··· 5029 5029 } 5030 5030 5031 5031 static void 5032 - e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid) 5032 + e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid) 5033 5033 { 5034 5034 struct e1000_adapter *adapter = netdev_priv(netdev); 5035 - uint32_t vfta, index; 5035 + u32 vfta, index; 5036 5036 5037 5037 if ((adapter->hw.mng_cookie.status & 5038 5038 E1000_MNG_DHCP_COOKIE_STATUS_VLAN_SUPPORT) && ··· 5046 5046 } 5047 5047 5048 5048 static void 5049 - e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid) 5049 + e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) 5050 5050 { 5051 5051 struct e1000_adapter *adapter = netdev_priv(netdev); 5052 - uint32_t vfta, index; 5052 + u32 vfta, index; 5053 5053 5054 5054 if (!test_bit(__E1000_DOWN, &adapter->flags)) 5055 5055 e1000_irq_disable(adapter); ··· 5078 5078 e1000_vlan_rx_register(adapter->netdev, adapter->vlgrp); 5079 5079 5080 5080 if (adapter->vlgrp) { 5081 - uint16_t vid; 5081 + u16 vid; 5082 5082 for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { 5083 5083 if (!vlan_group_get_device(adapter->vlgrp, vid)) 5084 5084 continue; ··· 5088 5088 } 5089 5089 5090 5090 int 5091 - e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx) 5091 + e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx) 5092 5092 { 5093 5093 adapter->hw.autoneg = 0; 5094 5094 ··· 5129 5129 { 5130 5130 struct net_device *netdev = pci_get_drvdata(pdev); 5131 5131 struct e1000_adapter *adapter = netdev_priv(netdev); 5132 - uint32_t ctrl, ctrl_ext, rctl, status; 5133 - uint32_t wufc = adapter->wol; 5132 + u32 ctrl, ctrl_ext, rctl, status; 5133 + u32 wufc = adapter->wol; 5134 5134 #ifdef CONFIG_PM 5135 5135 int retval = 0; 5136 5136 #endif ··· 5227 5227 { 5228 5228 struct net_device *netdev = pci_get_drvdata(pdev); 5229 5229 struct e1000_adapter *adapter = netdev_priv(netdev); 5230 - uint32_t err; 5230 + u32 err; 5231 5231 5232 5232 pci_set_power_state(pdev, PCI_D0); 5233 5233 pci_restore_state(pdev);