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

e1000: neaten function declarations

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by

Joe Perches and committed by
Jeff Garzik
64798845 cdc18a67

+385 -671
+68 -107
drivers/net/e1000/e1000_ethtool.c
··· 112 112 }; 113 113 #define E1000_TEST_LEN ARRAY_SIZE(e1000_gstrings_test) 114 114 115 - static int 116 - e1000_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) 115 + static int e1000_get_settings(struct net_device *netdev, 116 + struct ethtool_cmd *ecmd) 117 117 { 118 118 struct e1000_adapter *adapter = netdev_priv(netdev); 119 119 struct e1000_hw *hw = &adapter->hw; ··· 185 185 return 0; 186 186 } 187 187 188 - static int 189 - e1000_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) 188 + static int e1000_set_settings(struct net_device *netdev, 189 + struct ethtool_cmd *ecmd) 190 190 { 191 191 struct e1000_adapter *adapter = netdev_priv(netdev); 192 192 struct e1000_hw *hw = &adapter->hw; ··· 231 231 return 0; 232 232 } 233 233 234 - static void 235 - e1000_get_pauseparam(struct net_device *netdev, 236 - struct ethtool_pauseparam *pause) 234 + static void e1000_get_pauseparam(struct net_device *netdev, 235 + struct ethtool_pauseparam *pause) 237 236 { 238 237 struct e1000_adapter *adapter = netdev_priv(netdev); 239 238 struct e1000_hw *hw = &adapter->hw; ··· 250 251 } 251 252 } 252 253 253 - static int 254 - e1000_set_pauseparam(struct net_device *netdev, 255 - struct ethtool_pauseparam *pause) 254 + static int e1000_set_pauseparam(struct net_device *netdev, 255 + struct ethtool_pauseparam *pause) 256 256 { 257 257 struct e1000_adapter *adapter = netdev_priv(netdev); 258 258 struct e1000_hw *hw = &adapter->hw; ··· 287 289 return retval; 288 290 } 289 291 290 - static u32 291 - e1000_get_rx_csum(struct net_device *netdev) 292 + static u32 e1000_get_rx_csum(struct net_device *netdev) 292 293 { 293 294 struct e1000_adapter *adapter = netdev_priv(netdev); 294 295 return adapter->rx_csum; 295 296 } 296 297 297 - static int 298 - e1000_set_rx_csum(struct net_device *netdev, u32 data) 298 + static int e1000_set_rx_csum(struct net_device *netdev, u32 data) 299 299 { 300 300 struct e1000_adapter *adapter = netdev_priv(netdev); 301 301 adapter->rx_csum = data; ··· 305 309 return 0; 306 310 } 307 311 308 - static u32 309 - e1000_get_tx_csum(struct net_device *netdev) 312 + static u32 e1000_get_tx_csum(struct net_device *netdev) 310 313 { 311 314 return (netdev->features & NETIF_F_HW_CSUM) != 0; 312 315 } 313 316 314 - static int 315 - e1000_set_tx_csum(struct net_device *netdev, u32 data) 317 + static int e1000_set_tx_csum(struct net_device *netdev, u32 data) 316 318 { 317 319 struct e1000_adapter *adapter = netdev_priv(netdev); 318 320 ··· 328 334 return 0; 329 335 } 330 336 331 - static int 332 - e1000_set_tso(struct net_device *netdev, u32 data) 337 + static int e1000_set_tso(struct net_device *netdev, u32 data) 333 338 { 334 339 struct e1000_adapter *adapter = netdev_priv(netdev); 335 340 if ((adapter->hw.mac_type < e1000_82544) || ··· 350 357 return 0; 351 358 } 352 359 353 - static u32 354 - e1000_get_msglevel(struct net_device *netdev) 360 + static u32 e1000_get_msglevel(struct net_device *netdev) 355 361 { 356 362 struct e1000_adapter *adapter = netdev_priv(netdev); 357 363 return adapter->msg_enable; 358 364 } 359 365 360 - static void 361 - e1000_set_msglevel(struct net_device *netdev, u32 data) 366 + static void e1000_set_msglevel(struct net_device *netdev, u32 data) 362 367 { 363 368 struct e1000_adapter *adapter = netdev_priv(netdev); 364 369 adapter->msg_enable = data; 365 370 } 366 371 367 - static int 368 - e1000_get_regs_len(struct net_device *netdev) 372 + static int e1000_get_regs_len(struct net_device *netdev) 369 373 { 370 374 #define E1000_REGS_LEN 32 371 375 return E1000_REGS_LEN * sizeof(u32); 372 376 } 373 377 374 - static void 375 - e1000_get_regs(struct net_device *netdev, 376 - struct ethtool_regs *regs, void *p) 378 + static void e1000_get_regs(struct net_device *netdev, struct ethtool_regs *regs, 379 + void *p) 377 380 { 378 381 struct e1000_adapter *adapter = netdev_priv(netdev); 379 382 struct e1000_hw *hw = &adapter->hw; ··· 457 468 } 458 469 } 459 470 460 - static int 461 - e1000_get_eeprom_len(struct net_device *netdev) 471 + static int e1000_get_eeprom_len(struct net_device *netdev) 462 472 { 463 473 struct e1000_adapter *adapter = netdev_priv(netdev); 464 474 return adapter->hw.eeprom.word_size * 2; 465 475 } 466 476 467 - static int 468 - e1000_get_eeprom(struct net_device *netdev, 469 - struct ethtool_eeprom *eeprom, u8 *bytes) 477 + static int e1000_get_eeprom(struct net_device *netdev, 478 + struct ethtool_eeprom *eeprom, u8 *bytes) 470 479 { 471 480 struct e1000_adapter *adapter = netdev_priv(netdev); 472 481 struct e1000_hw *hw = &adapter->hw; ··· 508 521 return ret_val; 509 522 } 510 523 511 - static int 512 - e1000_set_eeprom(struct net_device *netdev, 513 - struct ethtool_eeprom *eeprom, u8 *bytes) 524 + static int e1000_set_eeprom(struct net_device *netdev, 525 + struct ethtool_eeprom *eeprom, u8 *bytes) 514 526 { 515 527 struct e1000_adapter *adapter = netdev_priv(netdev); 516 528 struct e1000_hw *hw = &adapter->hw; ··· 570 584 return ret_val; 571 585 } 572 586 573 - static void 574 - e1000_get_drvinfo(struct net_device *netdev, 575 - struct ethtool_drvinfo *drvinfo) 587 + static void e1000_get_drvinfo(struct net_device *netdev, 588 + struct ethtool_drvinfo *drvinfo) 576 589 { 577 590 struct e1000_adapter *adapter = netdev_priv(netdev); 578 591 char firmware_version[32]; ··· 604 619 drvinfo->eedump_len = e1000_get_eeprom_len(netdev); 605 620 } 606 621 607 - static void 608 - e1000_get_ringparam(struct net_device *netdev, 609 - struct ethtool_ringparam *ring) 622 + static void e1000_get_ringparam(struct net_device *netdev, 623 + struct ethtool_ringparam *ring) 610 624 { 611 625 struct e1000_adapter *adapter = netdev_priv(netdev); 612 626 e1000_mac_type mac_type = adapter->hw.mac_type; ··· 624 640 ring->rx_jumbo_pending = 0; 625 641 } 626 642 627 - static int 628 - e1000_set_ringparam(struct net_device *netdev, 629 - struct ethtool_ringparam *ring) 643 + static int e1000_set_ringparam(struct net_device *netdev, 644 + struct ethtool_ringparam *ring) 630 645 { 631 646 struct e1000_adapter *adapter = netdev_priv(netdev); 632 647 e1000_mac_type mac_type = adapter->hw.mac_type; ··· 711 728 return err; 712 729 } 713 730 714 - static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, 715 - int reg, u32 mask, u32 write) 731 + static bool reg_pattern_test(struct e1000_adapter *adapter, u64 *data, int reg, 732 + u32 mask, u32 write) 716 733 { 717 734 static const u32 test[] = 718 735 {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; ··· 734 751 return false; 735 752 } 736 753 737 - static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, 738 - int reg, u32 mask, u32 write) 754 + static bool reg_set_and_check(struct e1000_adapter *adapter, u64 *data, int reg, 755 + u32 mask, u32 write) 739 756 { 740 757 u8 __iomem *address = adapter->hw.hw_addr + reg; 741 758 u32 read; ··· 770 787 return 1; \ 771 788 } while (0) 772 789 773 - static int 774 - e1000_reg_test(struct e1000_adapter *adapter, u64 *data) 790 + static int e1000_reg_test(struct e1000_adapter *adapter, u64 *data) 775 791 { 776 792 u32 value, before, after; 777 793 u32 i, toggle; ··· 865 883 return 0; 866 884 } 867 885 868 - static int 869 - e1000_eeprom_test(struct e1000_adapter *adapter, u64 *data) 886 + static int e1000_eeprom_test(struct e1000_adapter *adapter, u64 *data) 870 887 { 871 888 u16 temp; 872 889 u16 checksum = 0; ··· 888 907 return *data; 889 908 } 890 909 891 - static irqreturn_t 892 - e1000_test_intr(int irq, void *data) 910 + static irqreturn_t e1000_test_intr(int irq, void *data) 893 911 { 894 912 struct net_device *netdev = (struct net_device *) data; 895 913 struct e1000_adapter *adapter = netdev_priv(netdev); ··· 898 918 return IRQ_HANDLED; 899 919 } 900 920 901 - static int 902 - e1000_intr_test(struct e1000_adapter *adapter, u64 *data) 921 + static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data) 903 922 { 904 923 struct net_device *netdev = adapter->netdev; 905 924 u32 mask, i = 0; ··· 996 1017 return *data; 997 1018 } 998 1019 999 - static void 1000 - e1000_free_desc_rings(struct e1000_adapter *adapter) 1020 + static void e1000_free_desc_rings(struct e1000_adapter *adapter) 1001 1021 { 1002 1022 struct e1000_tx_ring *txdr = &adapter->test_tx_ring; 1003 1023 struct e1000_rx_ring *rxdr = &adapter->test_rx_ring; ··· 1042 1064 return; 1043 1065 } 1044 1066 1045 - static int 1046 - e1000_setup_desc_rings(struct e1000_adapter *adapter) 1067 + static int e1000_setup_desc_rings(struct e1000_adapter *adapter) 1047 1068 { 1048 1069 struct e1000_tx_ring *txdr = &adapter->test_tx_ring; 1049 1070 struct e1000_rx_ring *rxdr = &adapter->test_rx_ring; ··· 1166 1189 return ret_val; 1167 1190 } 1168 1191 1169 - static void 1170 - e1000_phy_disable_receiver(struct e1000_adapter *adapter) 1192 + static void e1000_phy_disable_receiver(struct e1000_adapter *adapter) 1171 1193 { 1172 1194 /* Write out to PHY registers 29 and 30 to disable the Receiver. */ 1173 1195 e1000_write_phy_reg(&adapter->hw, 29, 0x001F); ··· 1175 1199 e1000_write_phy_reg(&adapter->hw, 30, 0x8FF0); 1176 1200 } 1177 1201 1178 - static void 1179 - e1000_phy_reset_clk_and_crs(struct e1000_adapter *adapter) 1202 + static void e1000_phy_reset_clk_and_crs(struct e1000_adapter *adapter) 1180 1203 { 1181 1204 u16 phy_reg; 1182 1205 ··· 1198 1223 M88E1000_PHY_SPEC_CTRL, phy_reg); 1199 1224 } 1200 1225 1201 - static int 1202 - e1000_nonintegrated_phy_loopback(struct e1000_adapter *adapter) 1226 + static int e1000_nonintegrated_phy_loopback(struct e1000_adapter *adapter) 1203 1227 { 1204 1228 u32 ctrl_reg; 1205 1229 u16 phy_reg; ··· 1264 1290 return 0; 1265 1291 } 1266 1292 1267 - static int 1268 - e1000_integrated_phy_loopback(struct e1000_adapter *adapter) 1293 + static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter) 1269 1294 { 1270 1295 u32 ctrl_reg = 0; 1271 1296 u32 stat_reg = 0; ··· 1333 1360 return 0; 1334 1361 } 1335 1362 1336 - static int 1337 - e1000_set_phy_loopback(struct e1000_adapter *adapter) 1363 + static int e1000_set_phy_loopback(struct e1000_adapter *adapter) 1338 1364 { 1339 1365 u16 phy_reg = 0; 1340 1366 u16 count = 0; ··· 1384 1412 return 8; 1385 1413 } 1386 1414 1387 - static int 1388 - e1000_setup_loopback_test(struct e1000_adapter *adapter) 1415 + static int e1000_setup_loopback_test(struct e1000_adapter *adapter) 1389 1416 { 1390 1417 struct e1000_hw *hw = &adapter->hw; 1391 1418 u32 rctl; ··· 1418 1447 return 7; 1419 1448 } 1420 1449 1421 - static void 1422 - e1000_loopback_cleanup(struct e1000_adapter *adapter) 1450 + static void e1000_loopback_cleanup(struct e1000_adapter *adapter) 1423 1451 { 1424 1452 struct e1000_hw *hw = &adapter->hw; 1425 1453 u32 rctl; ··· 1459 1489 } 1460 1490 } 1461 1491 1462 - static void 1463 - e1000_create_lbtest_frame(struct sk_buff *skb, unsigned int frame_size) 1492 + static void e1000_create_lbtest_frame(struct sk_buff *skb, 1493 + unsigned int frame_size) 1464 1494 { 1465 1495 memset(skb->data, 0xFF, frame_size); 1466 1496 frame_size &= ~1; ··· 1469 1499 memset(&skb->data[frame_size / 2 + 12], 0xAF, 1); 1470 1500 } 1471 1501 1472 - static int 1473 - e1000_check_lbtest_frame(struct sk_buff *skb, unsigned int frame_size) 1502 + static int e1000_check_lbtest_frame(struct sk_buff *skb, 1503 + unsigned int frame_size) 1474 1504 { 1475 1505 frame_size &= ~1; 1476 1506 if (*(skb->data + 3) == 0xFF) { ··· 1482 1512 return 13; 1483 1513 } 1484 1514 1485 - static int 1486 - e1000_run_loopback_test(struct e1000_adapter *adapter) 1515 + static int e1000_run_loopback_test(struct e1000_adapter *adapter) 1487 1516 { 1488 1517 struct e1000_tx_ring *txdr = &adapter->test_tx_ring; 1489 1518 struct e1000_rx_ring *rxdr = &adapter->test_rx_ring; ··· 1546 1577 return ret_val; 1547 1578 } 1548 1579 1549 - static int 1550 - e1000_loopback_test(struct e1000_adapter *adapter, u64 *data) 1580 + static int e1000_loopback_test(struct e1000_adapter *adapter, u64 *data) 1551 1581 { 1552 1582 /* PHY loopback cannot be performed if SoL/IDER 1553 1583 * sessions are active */ ··· 1570 1602 return *data; 1571 1603 } 1572 1604 1573 - static int 1574 - e1000_link_test(struct e1000_adapter *adapter, u64 *data) 1605 + static int e1000_link_test(struct e1000_adapter *adapter, u64 *data) 1575 1606 { 1576 1607 *data = 0; 1577 1608 if (adapter->hw.media_type == e1000_media_type_internal_serdes) { ··· 1599 1632 return *data; 1600 1633 } 1601 1634 1602 - static int 1603 - e1000_get_sset_count(struct net_device *netdev, int sset) 1635 + static int e1000_get_sset_count(struct net_device *netdev, int sset) 1604 1636 { 1605 1637 switch (sset) { 1606 1638 case ETH_SS_TEST: ··· 1611 1645 } 1612 1646 } 1613 1647 1614 - static void 1615 - e1000_diag_test(struct net_device *netdev, 1616 - struct ethtool_test *eth_test, u64 *data) 1648 + static void e1000_diag_test(struct net_device *netdev, 1649 + struct ethtool_test *eth_test, u64 *data) 1617 1650 { 1618 1651 struct e1000_adapter *adapter = netdev_priv(netdev); 1619 1652 bool if_running = netif_running(netdev); ··· 1682 1717 msleep_interruptible(4 * 1000); 1683 1718 } 1684 1719 1685 - static int e1000_wol_exclusion(struct e1000_adapter *adapter, struct ethtool_wolinfo *wol) 1720 + static int e1000_wol_exclusion(struct e1000_adapter *adapter, 1721 + struct ethtool_wolinfo *wol) 1686 1722 { 1687 1723 struct e1000_hw *hw = &adapter->hw; 1688 1724 int retval = 1; /* fail by default */ ··· 1744 1778 return retval; 1745 1779 } 1746 1780 1747 - static void 1748 - e1000_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) 1781 + static void e1000_get_wol(struct net_device *netdev, 1782 + struct ethtool_wolinfo *wol) 1749 1783 { 1750 1784 struct e1000_adapter *adapter = netdev_priv(netdev); 1751 1785 ··· 1784 1818 return; 1785 1819 } 1786 1820 1787 - static int 1788 - e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) 1821 + static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) 1789 1822 { 1790 1823 struct e1000_adapter *adapter = netdev_priv(netdev); 1791 1824 struct e1000_hw *hw = &adapter->hw; ··· 1828 1863 /* bit defines for adapter->led_status */ 1829 1864 #define E1000_LED_ON 0 1830 1865 1831 - static void 1832 - e1000_led_blink_callback(unsigned long data) 1866 + static void e1000_led_blink_callback(unsigned long data) 1833 1867 { 1834 1868 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 1835 1869 ··· 1840 1876 mod_timer(&adapter->blink_timer, jiffies + E1000_ID_INTERVAL); 1841 1877 } 1842 1878 1843 - static int 1844 - e1000_phys_id(struct net_device *netdev, u32 data) 1879 + static int e1000_phys_id(struct net_device *netdev, u32 data) 1845 1880 { 1846 1881 struct e1000_adapter *adapter = netdev_priv(netdev); 1847 1882 ··· 1879 1916 return 0; 1880 1917 } 1881 1918 1882 - static int 1883 - e1000_nway_reset(struct net_device *netdev) 1919 + static int e1000_nway_reset(struct net_device *netdev) 1884 1920 { 1885 1921 struct e1000_adapter *adapter = netdev_priv(netdev); 1886 1922 if (netif_running(netdev)) ··· 1887 1925 return 0; 1888 1926 } 1889 1927 1890 - static void 1891 - e1000_get_ethtool_stats(struct net_device *netdev, 1892 - struct ethtool_stats *stats, u64 *data) 1928 + static void e1000_get_ethtool_stats(struct net_device *netdev, 1929 + struct ethtool_stats *stats, u64 *data) 1893 1930 { 1894 1931 struct e1000_adapter *adapter = netdev_priv(netdev); 1895 1932 int i; ··· 1902 1941 /* BUG_ON(i != E1000_STATS_LEN); */ 1903 1942 } 1904 1943 1905 - static void 1906 - e1000_get_strings(struct net_device *netdev, u32 stringset, u8 *data) 1944 + static void e1000_get_strings(struct net_device *netdev, u32 stringset, 1945 + u8 *data) 1907 1946 { 1908 1947 u8 *p = data; 1909 1948 int i;
+195 -363
drivers/net/e1000/e1000_hw.c
··· 42 42 43 43 static u8 e1000_arc_subsystem_valid(struct e1000_hw *hw); 44 44 static s32 e1000_check_downshift(struct e1000_hw *hw); 45 - static s32 e1000_check_polarity(struct e1000_hw *hw, e1000_rev_polarity *polarity); 45 + static s32 e1000_check_polarity(struct e1000_hw *hw, 46 + e1000_rev_polarity *polarity); 46 47 static void e1000_clear_hw_cntrs(struct e1000_hw *hw); 47 48 static void e1000_clear_vfta(struct e1000_hw *hw); 48 49 static s32 e1000_commit_shadow_ram(struct e1000_hw *hw); 49 50 static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, 50 - bool link_up); 51 + bool link_up); 51 52 static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw); 52 53 static s32 e1000_detect_gig_phy(struct e1000_hw *hw); 53 54 static s32 e1000_erase_ich8_4k_segment(struct e1000_hw *hw, u32 bank); 54 55 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_cable_length(struct e1000_hw *hw, u16 *min_length, 57 + u16 *max_length); 56 58 static s32 e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw); 57 59 static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw); 58 60 static s32 e1000_get_software_flag(struct e1000_hw *hw); 59 61 static s32 e1000_ich8_cycle_init(struct e1000_hw *hw); 60 62 static s32 e1000_ich8_flash_cycle(struct e1000_hw *hw, u32 timeout); 61 63 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); 64 + static s32 e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, 65 + u32 cnf_base_addr, 66 + u32 cnf_size); 63 67 static s32 e1000_init_lcd_from_nvm(struct e1000_hw *hw); 64 68 static void e1000_init_rx_addrs(struct e1000_hw *hw); 65 69 static void e1000_initialize_hardware_bits(struct e1000_hw *hw); 66 70 static bool e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw); 67 71 static s32 e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw); 68 72 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); 73 + static s32 e1000_mng_host_if_write(struct e1000_hw *hw, u8 *buffer, u16 length, 74 + u16 offset, u8 *sum); 75 + static s32 e1000_mng_write_cmd_header(struct e1000_hw* hw, 76 + struct e1000_host_mng_command_header 77 + *hdr); 71 78 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); 79 + static s32 e1000_phy_ife_get_info(struct e1000_hw *hw, 80 + struct e1000_phy_info *phy_info); 81 + static s32 e1000_phy_igp_get_info(struct e1000_hw *hw, 82 + struct e1000_phy_info *phy_info); 83 + static s32 e1000_read_eeprom_eerd(struct e1000_hw *hw, u16 offset, u16 words, 84 + u16 *data); 85 + static s32 e1000_write_eeprom_eewr(struct e1000_hw *hw, u16 offset, u16 words, 86 + u16 *data); 76 87 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); 88 + static s32 e1000_phy_m88_get_info(struct e1000_hw *hw, 89 + struct e1000_phy_info *phy_info); 78 90 static void e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw); 79 91 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); 92 + static s32 e1000_verify_write_ich8_byte(struct e1000_hw *hw, u32 index, 93 + u8 byte); 81 94 static s32 e1000_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 byte); 82 95 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); 96 + static s32 e1000_read_ich8_data(struct e1000_hw *hw, u32 index, u32 size, 97 + u16 *data); 98 + static s32 e1000_write_ich8_data(struct e1000_hw *hw, u32 index, u32 size, 99 + u16 data); 100 + static s32 e1000_read_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, 101 + u16 *data); 102 + static s32 e1000_write_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, 103 + u16 *data); 87 104 static void e1000_release_software_flag(struct e1000_hw *hw); 88 105 static s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active); 89 106 static s32 e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active); ··· 118 101 static void e1000_raise_mdi_clk(struct e1000_hw *hw, u32 *ctrl); 119 102 static void e1000_lower_mdi_clk(struct e1000_hw *hw, u32 *ctrl); 120 103 static void e1000_shift_out_mdi_bits(struct e1000_hw *hw, u32 data, 121 - u16 count); 104 + u16 count); 122 105 static u16 e1000_shift_in_mdi_bits(struct e1000_hw *hw); 123 106 static s32 e1000_phy_reset_dsp(struct e1000_hw *hw); 124 107 static s32 e1000_write_eeprom_spi(struct e1000_hw *hw, u16 offset, 125 108 u16 words, u16 *data); 126 - static s32 e1000_write_eeprom_microwire(struct e1000_hw *hw, 127 - u16 offset, u16 words, 128 - u16 *data); 109 + static s32 e1000_write_eeprom_microwire(struct e1000_hw *hw, u16 offset, 110 + u16 words, u16 *data); 129 111 static s32 e1000_spi_eeprom_ready(struct e1000_hw *hw); 130 112 static void e1000_raise_ee_clk(struct e1000_hw *hw, u32 *eecd); 131 113 static void e1000_lower_ee_clk(struct e1000_hw *hw, u32 *eecd); 132 - static void e1000_shift_out_ee_bits(struct e1000_hw *hw, u16 data, 133 - u16 count); 114 + static void e1000_shift_out_ee_bits(struct e1000_hw *hw, u16 data, u16 count); 134 115 static s32 e1000_write_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr, 135 - u16 phy_data); 116 + u16 phy_data); 136 117 static s32 e1000_read_phy_reg_ex(struct e1000_hw *hw,u32 reg_addr, 137 - u16 *phy_data); 118 + u16 *phy_data); 138 119 static u16 e1000_shift_in_ee_bits(struct e1000_hw *hw, u16 count); 139 120 static s32 e1000_acquire_eeprom(struct e1000_hw *hw); 140 121 static void e1000_release_eeprom(struct e1000_hw *hw); ··· 142 127 static s32 e1000_set_phy_mode(struct e1000_hw *hw); 143 128 static s32 e1000_host_if_read_cookie(struct e1000_hw *hw, u8 *buffer); 144 129 static u8 e1000_calculate_mng_checksum(char *buffer, u32 length); 145 - static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, 146 - u16 duplex); 130 + static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex); 147 131 static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw); 148 132 149 133 /* IGP cable length table */ ··· 173 159 * 174 160 * hw - Struct containing variables accessed by shared code 175 161 *****************************************************************************/ 176 - static s32 177 - e1000_set_phy_type(struct e1000_hw *hw) 162 + static s32 e1000_set_phy_type(struct e1000_hw *hw) 178 163 { 179 164 DEBUGFUNC("e1000_set_phy_type"); 180 165 ··· 223 210 * 224 211 * hw - Struct containing variables accessed by shared code 225 212 *****************************************************************************/ 226 - static void 227 - e1000_phy_init_script(struct e1000_hw *hw) 213 + static void e1000_phy_init_script(struct e1000_hw *hw) 228 214 { 229 215 u32 ret_val; 230 216 u16 phy_saved_data; ··· 318 306 * 319 307 * hw - Struct containing variables accessed by shared code 320 308 *****************************************************************************/ 321 - s32 322 - e1000_set_mac_type(struct e1000_hw *hw) 309 + s32 e1000_set_mac_type(struct e1000_hw *hw) 323 310 { 324 311 DEBUGFUNC("e1000_set_mac_type"); 325 312 ··· 485 474 * 486 475 * hw - Struct containing variables accessed by shared code 487 476 * **************************************************************************/ 488 - void 489 - e1000_set_media_type(struct e1000_hw *hw) 477 + void e1000_set_media_type(struct e1000_hw *hw) 490 478 { 491 479 u32 status; 492 480 ··· 538 528 * 539 529 * hw - Struct containing variables accessed by shared code 540 530 *****************************************************************************/ 541 - s32 542 - e1000_reset_hw(struct e1000_hw *hw) 531 + s32 e1000_reset_hw(struct e1000_hw *hw) 543 532 { 544 533 u32 ctrl; 545 534 u32 ctrl_ext; ··· 756 747 * This function contains hardware limitation workarounds for PCI-E adapters 757 748 * 758 749 *****************************************************************************/ 759 - static void 760 - e1000_initialize_hardware_bits(struct e1000_hw *hw) 750 + static void e1000_initialize_hardware_bits(struct e1000_hw *hw) 761 751 { 762 752 if ((hw->mac_type >= e1000_82571) && (!hw->initialize_hw_bits_disable)) { 763 753 /* Settings common to all PCI-express silicon */ ··· 874 866 * configuration and flow control settings. Clears all on-chip counters. Leaves 875 867 * the transmit and receive units disabled and uninitialized. 876 868 *****************************************************************************/ 877 - s32 878 - e1000_init_hw(struct e1000_hw *hw) 869 + s32 e1000_init_hw(struct e1000_hw *hw) 879 870 { 880 871 u32 ctrl; 881 872 u32 i; ··· 1061 1054 * 1062 1055 * hw - Struct containing variables accessed by shared code. 1063 1056 *****************************************************************************/ 1064 - static s32 1065 - e1000_adjust_serdes_amplitude(struct e1000_hw *hw) 1057 + static s32 e1000_adjust_serdes_amplitude(struct e1000_hw *hw) 1066 1058 { 1067 1059 u16 eeprom_data; 1068 1060 s32 ret_val; ··· 1106 1100 * established. Assumes the hardware has previously been reset and the 1107 1101 * transmitter and receiver are not enabled. 1108 1102 *****************************************************************************/ 1109 - s32 1110 - e1000_setup_link(struct e1000_hw *hw) 1103 + s32 e1000_setup_link(struct e1000_hw *hw) 1111 1104 { 1112 1105 u32 ctrl_ext; 1113 1106 s32 ret_val; ··· 1238 1233 * link. Assumes the hardware has been previously reset and the transmitter 1239 1234 * and receiver are not enabled. 1240 1235 *****************************************************************************/ 1241 - static s32 1242 - e1000_setup_fiber_serdes_link(struct e1000_hw *hw) 1236 + static s32 e1000_setup_fiber_serdes_link(struct e1000_hw *hw) 1243 1237 { 1244 1238 u32 ctrl; 1245 1239 u32 status; ··· 1384 1380 * 1385 1381 * hw - Struct containing variables accessed by shared code 1386 1382 ******************************************************************************/ 1387 - static s32 1388 - e1000_copper_link_preconfig(struct e1000_hw *hw) 1383 + static s32 e1000_copper_link_preconfig(struct e1000_hw *hw) 1389 1384 { 1390 1385 u32 ctrl; 1391 1386 s32 ret_val; ··· 1443 1440 * 1444 1441 * hw - Struct containing variables accessed by shared code 1445 1442 *********************************************************************/ 1446 - static s32 1447 - e1000_copper_link_igp_setup(struct e1000_hw *hw) 1443 + static s32 e1000_copper_link_igp_setup(struct e1000_hw *hw) 1448 1444 { 1449 1445 u32 led_ctrl; 1450 1446 s32 ret_val; ··· 1589 1587 * 1590 1588 * hw - Struct containing variables accessed by shared code 1591 1589 *********************************************************************/ 1592 - static s32 1593 - e1000_copper_link_ggp_setup(struct e1000_hw *hw) 1590 + static s32 e1000_copper_link_ggp_setup(struct e1000_hw *hw) 1594 1591 { 1595 1592 s32 ret_val; 1596 1593 u16 phy_data; ··· 1736 1735 * 1737 1736 * hw - Struct containing variables accessed by shared code 1738 1737 *********************************************************************/ 1739 - static s32 1740 - e1000_copper_link_mgp_setup(struct e1000_hw *hw) 1738 + static s32 e1000_copper_link_mgp_setup(struct e1000_hw *hw) 1741 1739 { 1742 1740 s32 ret_val; 1743 1741 u16 phy_data; ··· 1839 1839 * 1840 1840 * hw - Struct containing variables accessed by shared code 1841 1841 *********************************************************************/ 1842 - static s32 1843 - e1000_copper_link_autoneg(struct e1000_hw *hw) 1842 + static s32 e1000_copper_link_autoneg(struct e1000_hw *hw) 1844 1843 { 1845 1844 s32 ret_val; 1846 1845 u16 phy_data; ··· 1909 1910 * 1910 1911 * hw - Struct containing variables accessed by shared code 1911 1912 ******************************************************************************/ 1912 - static s32 1913 - e1000_copper_link_postconfig(struct e1000_hw *hw) 1913 + static s32 e1000_copper_link_postconfig(struct e1000_hw *hw) 1914 1914 { 1915 1915 s32 ret_val; 1916 1916 DEBUGFUNC("e1000_copper_link_postconfig"); ··· 1946 1948 * 1947 1949 * hw - Struct containing variables accessed by shared code 1948 1950 ******************************************************************************/ 1949 - static s32 1950 - e1000_setup_copper_link(struct e1000_hw *hw) 1951 + static s32 e1000_setup_copper_link(struct e1000_hw *hw) 1951 1952 { 1952 1953 s32 ret_val; 1953 1954 u16 i; ··· 2059 2062 * 2060 2063 * hw - Struct containing variables accessed by shared code 2061 2064 ******************************************************************************/ 2062 - static s32 2063 - e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex) 2065 + static s32 e1000_configure_kmrn_for_10_100(struct e1000_hw *hw, u16 duplex) 2064 2066 { 2065 2067 s32 ret_val = E1000_SUCCESS; 2066 2068 u32 tipg; ··· 2094 2098 return ret_val; 2095 2099 } 2096 2100 2097 - static s32 2098 - e1000_configure_kmrn_for_1000(struct e1000_hw *hw) 2101 + static s32 e1000_configure_kmrn_for_1000(struct e1000_hw *hw) 2099 2102 { 2100 2103 s32 ret_val = E1000_SUCCESS; 2101 2104 u16 reg_data; ··· 2130 2135 * 2131 2136 * hw - Struct containing variables accessed by shared code 2132 2137 ******************************************************************************/ 2133 - s32 2134 - e1000_phy_setup_autoneg(struct e1000_hw *hw) 2138 + s32 e1000_phy_setup_autoneg(struct e1000_hw *hw) 2135 2139 { 2136 2140 s32 ret_val; 2137 2141 u16 mii_autoneg_adv_reg; ··· 2278 2284 * 2279 2285 * hw - Struct containing variables accessed by shared code 2280 2286 ******************************************************************************/ 2281 - static s32 2282 - e1000_phy_force_speed_duplex(struct e1000_hw *hw) 2287 + static s32 e1000_phy_force_speed_duplex(struct e1000_hw *hw) 2283 2288 { 2284 2289 u32 ctrl; 2285 2290 s32 ret_val; ··· 2528 2535 * Link should have been established previously. Reads the speed and duplex 2529 2536 * information from the Device Status register. 2530 2537 ******************************************************************************/ 2531 - void 2532 - e1000_config_collision_dist(struct e1000_hw *hw) 2538 + void e1000_config_collision_dist(struct e1000_hw *hw) 2533 2539 { 2534 2540 u32 tctl, coll_dist; 2535 2541 ··· 2557 2565 * The contents of the PHY register containing the needed information need to 2558 2566 * be passed in. 2559 2567 ******************************************************************************/ 2560 - static s32 2561 - e1000_config_mac_to_phy(struct e1000_hw *hw) 2568 + static s32 e1000_config_mac_to_phy(struct e1000_hw *hw) 2562 2569 { 2563 2570 u32 ctrl; 2564 2571 s32 ret_val; ··· 2615 2624 * by the PHY rather than the MAC. Software must also configure these 2616 2625 * bits when link is forced on a fiber connection. 2617 2626 *****************************************************************************/ 2618 - s32 2619 - e1000_force_mac_fc(struct e1000_hw *hw) 2627 + s32 e1000_force_mac_fc(struct e1000_hw *hw) 2620 2628 { 2621 2629 u32 ctrl; 2622 2630 ··· 2681 2691 * based on the flow control negotiated by the PHY. In TBI mode, the TFCE 2682 2692 * and RFCE bits will be automaticaly set to the negotiated flow control mode. 2683 2693 *****************************************************************************/ 2684 - static s32 2685 - e1000_config_fc_after_link_up(struct e1000_hw *hw) 2694 + static s32 e1000_config_fc_after_link_up(struct e1000_hw *hw) 2686 2695 { 2687 2696 s32 ret_val; 2688 2697 u16 mii_status_reg; ··· 2885 2896 * 2886 2897 * Called by any function that needs to check the link status of the adapter. 2887 2898 *****************************************************************************/ 2888 - s32 2889 - e1000_check_for_link(struct e1000_hw *hw) 2899 + s32 e1000_check_for_link(struct e1000_hw *hw) 2890 2900 { 2891 2901 u32 rxcw = 0; 2892 2902 u32 ctrl; ··· 3120 3132 * speed - Speed of the connection 3121 3133 * duplex - Duplex setting of the connection 3122 3134 *****************************************************************************/ 3123 - s32 3124 - e1000_get_speed_and_duplex(struct e1000_hw *hw, 3125 - u16 *speed, 3126 - u16 *duplex) 3135 + s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed, u16 *duplex) 3127 3136 { 3128 3137 u32 status; 3129 3138 s32 ret_val; ··· 3199 3214 * 3200 3215 * hw - Struct containing variables accessed by shared code 3201 3216 ******************************************************************************/ 3202 - static s32 3203 - e1000_wait_autoneg(struct e1000_hw *hw) 3217 + static s32 e1000_wait_autoneg(struct e1000_hw *hw) 3204 3218 { 3205 3219 s32 ret_val; 3206 3220 u16 i; ··· 3233 3249 * hw - Struct containing variables accessed by shared code 3234 3250 * ctrl - Device control register's current value 3235 3251 ******************************************************************************/ 3236 - static void 3237 - e1000_raise_mdi_clk(struct e1000_hw *hw, 3238 - u32 *ctrl) 3252 + static void e1000_raise_mdi_clk(struct e1000_hw *hw, u32 *ctrl) 3239 3253 { 3240 3254 /* Raise the clock input to the Management Data Clock (by setting the MDC 3241 3255 * bit), and then delay 10 microseconds. ··· 3249 3267 * hw - Struct containing variables accessed by shared code 3250 3268 * ctrl - Device control register's current value 3251 3269 ******************************************************************************/ 3252 - static void 3253 - e1000_lower_mdi_clk(struct e1000_hw *hw, 3254 - u32 *ctrl) 3270 + static void e1000_lower_mdi_clk(struct e1000_hw *hw, u32 *ctrl) 3255 3271 { 3256 3272 /* Lower the clock input to the Management Data Clock (by clearing the MDC 3257 3273 * bit), and then delay 10 microseconds. ··· 3268 3288 * 3269 3289 * Bits are shifted out in MSB to LSB order. 3270 3290 ******************************************************************************/ 3271 - static void 3272 - e1000_shift_out_mdi_bits(struct e1000_hw *hw, 3273 - u32 data, 3274 - u16 count) 3291 + static void e1000_shift_out_mdi_bits(struct e1000_hw *hw, u32 data, u16 count) 3275 3292 { 3276 3293 u32 ctrl; 3277 3294 u32 mask; ··· 3315 3338 * 3316 3339 * Bits are shifted in in MSB to LSB order. 3317 3340 ******************************************************************************/ 3318 - static u16 3319 - e1000_shift_in_mdi_bits(struct e1000_hw *hw) 3341 + static u16 e1000_shift_in_mdi_bits(struct e1000_hw *hw) 3320 3342 { 3321 3343 u32 ctrl; 3322 3344 u16 data = 0; ··· 3360 3384 return data; 3361 3385 } 3362 3386 3363 - static s32 3364 - e1000_swfw_sync_acquire(struct e1000_hw *hw, u16 mask) 3387 + static s32 e1000_swfw_sync_acquire(struct e1000_hw *hw, u16 mask) 3365 3388 { 3366 3389 u32 swfw_sync = 0; 3367 3390 u32 swmask = mask; ··· 3403 3428 return E1000_SUCCESS; 3404 3429 } 3405 3430 3406 - static void 3407 - e1000_swfw_sync_release(struct e1000_hw *hw, u16 mask) 3431 + static void e1000_swfw_sync_release(struct e1000_hw *hw, u16 mask) 3408 3432 { 3409 3433 u32 swfw_sync; 3410 3434 u32 swmask = mask; ··· 3438 3464 * hw - Struct containing variables accessed by shared code 3439 3465 * reg_addr - address of the PHY register to read 3440 3466 ******************************************************************************/ 3441 - s32 3442 - e1000_read_phy_reg(struct e1000_hw *hw, 3443 - u32 reg_addr, 3444 - u16 *phy_data) 3467 + s32 e1000_read_phy_reg(struct e1000_hw *hw, u32 reg_addr, u16 *phy_data) 3445 3468 { 3446 3469 u32 ret_val; 3447 3470 u16 swfw; ··· 3494 3523 return ret_val; 3495 3524 } 3496 3525 3497 - static s32 3498 - e1000_read_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr, 3499 - u16 *phy_data) 3526 + static s32 e1000_read_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr, 3527 + u16 *phy_data) 3500 3528 { 3501 3529 u32 i; 3502 3530 u32 mdic = 0; ··· 3573 3603 * reg_addr - address of the PHY register to write 3574 3604 * data - data to write to the PHY 3575 3605 ******************************************************************************/ 3576 - s32 3577 - e1000_write_phy_reg(struct e1000_hw *hw, u32 reg_addr, 3578 - u16 phy_data) 3606 + s32 e1000_write_phy_reg(struct e1000_hw *hw, u32 reg_addr, u16 phy_data) 3579 3607 { 3580 3608 u32 ret_val; 3581 3609 u16 swfw; ··· 3629 3661 return ret_val; 3630 3662 } 3631 3663 3632 - static s32 3633 - e1000_write_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr, 3634 - u16 phy_data) 3664 + static s32 e1000_write_phy_reg_ex(struct e1000_hw *hw, u32 reg_addr, 3665 + u16 phy_data) 3635 3666 { 3636 3667 u32 i; 3637 3668 u32 mdic = 0; ··· 3690 3723 return E1000_SUCCESS; 3691 3724 } 3692 3725 3693 - static s32 3694 - e1000_read_kmrn_reg(struct e1000_hw *hw, 3695 - u32 reg_addr, 3696 - u16 *data) 3726 + static s32 e1000_read_kmrn_reg(struct e1000_hw *hw, u32 reg_addr, u16 *data) 3697 3727 { 3698 3728 u32 reg_val; 3699 3729 u16 swfw; ··· 3720 3756 return E1000_SUCCESS; 3721 3757 } 3722 3758 3723 - static s32 3724 - e1000_write_kmrn_reg(struct e1000_hw *hw, 3725 - u32 reg_addr, 3726 - u16 data) 3759 + static s32 e1000_write_kmrn_reg(struct e1000_hw *hw, u32 reg_addr, u16 data) 3727 3760 { 3728 3761 u32 reg_val; 3729 3762 u16 swfw; ··· 3749 3788 * 3750 3789 * hw - Struct containing variables accessed by shared code 3751 3790 ******************************************************************************/ 3752 - s32 3753 - e1000_phy_hw_reset(struct e1000_hw *hw) 3791 + s32 e1000_phy_hw_reset(struct e1000_hw *hw) 3754 3792 { 3755 3793 u32 ctrl, ctrl_ext; 3756 3794 u32 led_ctrl; ··· 3842 3882 * 3843 3883 * Sets bit 15 of the MII Control register 3844 3884 ******************************************************************************/ 3845 - s32 3846 - e1000_phy_reset(struct e1000_hw *hw) 3885 + s32 e1000_phy_reset(struct e1000_hw *hw) 3847 3886 { 3848 3887 s32 ret_val; 3849 3888 u16 phy_data; ··· 3893 3934 * 3894 3935 * hw - struct containing variables accessed by shared code 3895 3936 ******************************************************************************/ 3896 - void 3897 - e1000_phy_powerdown_workaround(struct e1000_hw *hw) 3937 + void e1000_phy_powerdown_workaround(struct e1000_hw *hw) 3898 3938 { 3899 3939 s32 reg; 3900 3940 u16 phy_data; ··· 3945 3987 * 3946 3988 * hw - struct containing variables accessed by shared code 3947 3989 ******************************************************************************/ 3948 - static s32 3949 - e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw) 3990 + static s32 e1000_kumeran_lock_loss_workaround(struct e1000_hw *hw) 3950 3991 { 3951 3992 s32 ret_val; 3952 3993 s32 reg; ··· 3997 4040 * 3998 4041 * hw - Struct containing variables accessed by shared code 3999 4042 ******************************************************************************/ 4000 - static s32 4001 - e1000_detect_gig_phy(struct e1000_hw *hw) 4043 + static s32 e1000_detect_gig_phy(struct e1000_hw *hw) 4002 4044 { 4003 4045 s32 phy_init_status, ret_val; 4004 4046 u16 phy_id_high, phy_id_low; ··· 4092 4136 * 4093 4137 * hw - Struct containing variables accessed by shared code 4094 4138 ******************************************************************************/ 4095 - static s32 4096 - e1000_phy_reset_dsp(struct e1000_hw *hw) 4139 + static s32 e1000_phy_reset_dsp(struct e1000_hw *hw) 4097 4140 { 4098 4141 s32 ret_val; 4099 4142 DEBUGFUNC("e1000_phy_reset_dsp"); ··· 4118 4163 * hw - Struct containing variables accessed by shared code 4119 4164 * phy_info - PHY information structure 4120 4165 ******************************************************************************/ 4121 - static s32 4122 - e1000_phy_igp_get_info(struct e1000_hw *hw, 4123 - struct e1000_phy_info *phy_info) 4166 + static s32 e1000_phy_igp_get_info(struct e1000_hw *hw, 4167 + struct e1000_phy_info *phy_info) 4124 4168 { 4125 4169 s32 ret_val; 4126 4170 u16 phy_data, min_length, max_length, average; ··· 4194 4240 * hw - Struct containing variables accessed by shared code 4195 4241 * phy_info - PHY information structure 4196 4242 ******************************************************************************/ 4197 - static s32 4198 - e1000_phy_ife_get_info(struct e1000_hw *hw, 4199 - struct e1000_phy_info *phy_info) 4243 + static s32 e1000_phy_ife_get_info(struct e1000_hw *hw, 4244 + struct e1000_phy_info *phy_info) 4200 4245 { 4201 4246 s32 ret_val; 4202 4247 u16 phy_data; ··· 4243 4290 * hw - Struct containing variables accessed by shared code 4244 4291 * phy_info - PHY information structure 4245 4292 ******************************************************************************/ 4246 - static s32 4247 - e1000_phy_m88_get_info(struct e1000_hw *hw, 4248 - struct e1000_phy_info *phy_info) 4293 + static s32 e1000_phy_m88_get_info(struct e1000_hw *hw, 4294 + struct e1000_phy_info *phy_info) 4249 4295 { 4250 4296 s32 ret_val; 4251 4297 u16 phy_data; ··· 4321 4369 * hw - Struct containing variables accessed by shared code 4322 4370 * phy_info - PHY information structure 4323 4371 ******************************************************************************/ 4324 - s32 4325 - e1000_phy_get_info(struct e1000_hw *hw, 4326 - struct e1000_phy_info *phy_info) 4372 + s32 e1000_phy_get_info(struct e1000_hw *hw, struct e1000_phy_info *phy_info) 4327 4373 { 4328 4374 s32 ret_val; 4329 4375 u16 phy_data; ··· 4365 4415 return e1000_phy_m88_get_info(hw, phy_info); 4366 4416 } 4367 4417 4368 - s32 4369 - e1000_validate_mdi_setting(struct e1000_hw *hw) 4418 + s32 e1000_validate_mdi_setting(struct e1000_hw *hw) 4370 4419 { 4371 4420 DEBUGFUNC("e1000_validate_mdi_settings"); 4372 4421 ··· 4385 4436 * 4386 4437 * hw - Struct containing variables accessed by shared code 4387 4438 *****************************************************************************/ 4388 - s32 4389 - e1000_init_eeprom_params(struct e1000_hw *hw) 4439 + s32 e1000_init_eeprom_params(struct e1000_hw *hw) 4390 4440 { 4391 4441 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4392 4442 u32 eecd = E1000_READ_REG(hw, EECD); ··· 4574 4626 * hw - Struct containing variables accessed by shared code 4575 4627 * eecd - EECD's current value 4576 4628 *****************************************************************************/ 4577 - static void 4578 - e1000_raise_ee_clk(struct e1000_hw *hw, 4579 - u32 *eecd) 4629 + static void e1000_raise_ee_clk(struct e1000_hw *hw, u32 *eecd) 4580 4630 { 4581 4631 /* Raise the clock input to the EEPROM (by setting the SK bit), and then 4582 4632 * wait <delay> microseconds. ··· 4591 4645 * hw - Struct containing variables accessed by shared code 4592 4646 * eecd - EECD's current value 4593 4647 *****************************************************************************/ 4594 - static void 4595 - e1000_lower_ee_clk(struct e1000_hw *hw, 4596 - u32 *eecd) 4648 + static void e1000_lower_ee_clk(struct e1000_hw *hw, u32 *eecd) 4597 4649 { 4598 4650 /* Lower the clock input to the EEPROM (by clearing the SK bit), and then 4599 4651 * wait 50 microseconds. ··· 4609 4665 * data - data to send to the EEPROM 4610 4666 * count - number of bits to shift out 4611 4667 *****************************************************************************/ 4612 - static void 4613 - e1000_shift_out_ee_bits(struct e1000_hw *hw, 4614 - u16 data, 4615 - u16 count) 4668 + static void e1000_shift_out_ee_bits(struct e1000_hw *hw, u16 data, u16 count) 4616 4669 { 4617 4670 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4618 4671 u32 eecd; ··· 4659 4718 * 4660 4719 * hw - Struct containing variables accessed by shared code 4661 4720 *****************************************************************************/ 4662 - static u16 4663 - e1000_shift_in_ee_bits(struct e1000_hw *hw, 4664 - u16 count) 4721 + static u16 e1000_shift_in_ee_bits(struct e1000_hw *hw, u16 count) 4665 4722 { 4666 4723 u32 eecd; 4667 4724 u32 i; ··· 4701 4762 * Lowers EEPROM clock. Clears input pin. Sets the chip select pin. This 4702 4763 * function should be called before issuing a command to the EEPROM. 4703 4764 *****************************************************************************/ 4704 - static s32 4705 - e1000_acquire_eeprom(struct e1000_hw *hw) 4765 + static s32 e1000_acquire_eeprom(struct e1000_hw *hw) 4706 4766 { 4707 4767 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4708 4768 u32 eecd, i=0; ··· 4759 4821 * 4760 4822 * hw - Struct containing variables accessed by shared code 4761 4823 *****************************************************************************/ 4762 - static void 4763 - e1000_standby_eeprom(struct e1000_hw *hw) 4824 + static void e1000_standby_eeprom(struct e1000_hw *hw) 4764 4825 { 4765 4826 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4766 4827 u32 eecd; ··· 4807 4870 * 4808 4871 * hw - Struct containing variables accessed by shared code 4809 4872 *****************************************************************************/ 4810 - static void 4811 - e1000_release_eeprom(struct e1000_hw *hw) 4873 + static void e1000_release_eeprom(struct e1000_hw *hw) 4812 4874 { 4813 4875 u32 eecd; 4814 4876 ··· 4857 4921 * 4858 4922 * hw - Struct containing variables accessed by shared code 4859 4923 *****************************************************************************/ 4860 - static s32 4861 - e1000_spi_eeprom_ready(struct e1000_hw *hw) 4924 + static s32 e1000_spi_eeprom_ready(struct e1000_hw *hw) 4862 4925 { 4863 4926 u16 retry_count = 0; 4864 4927 u8 spi_stat_reg; ··· 4902 4967 * data - word read from the EEPROM 4903 4968 * words - number of words to read 4904 4969 *****************************************************************************/ 4905 - s32 4906 - e1000_read_eeprom(struct e1000_hw *hw, 4907 - u16 offset, 4908 - u16 words, 4909 - u16 *data) 4970 + s32 e1000_read_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) 4910 4971 { 4911 4972 struct e1000_eeprom_info *eeprom = &hw->eeprom; 4912 4973 u32 i = 0; ··· 4999 5068 * data - word read from the EEPROM 5000 5069 * words - number of words to read 5001 5070 *****************************************************************************/ 5002 - static s32 5003 - e1000_read_eeprom_eerd(struct e1000_hw *hw, 5004 - u16 offset, 5005 - u16 words, 5006 - u16 *data) 5071 + static s32 e1000_read_eeprom_eerd(struct e1000_hw *hw, u16 offset, u16 words, 5072 + u16 *data) 5007 5073 { 5008 5074 u32 i, eerd = 0; 5009 5075 s32 error = 0; ··· 5030 5102 * data - word read from the EEPROM 5031 5103 * words - number of words to read 5032 5104 *****************************************************************************/ 5033 - static s32 5034 - e1000_write_eeprom_eewr(struct e1000_hw *hw, 5035 - u16 offset, 5036 - u16 words, 5037 - u16 *data) 5105 + static s32 e1000_write_eeprom_eewr(struct e1000_hw *hw, u16 offset, u16 words, 5106 + u16 *data) 5038 5107 { 5039 5108 u32 register_value = 0; 5040 5109 u32 i = 0; ··· 5068 5143 * 5069 5144 * hw - Struct containing variables accessed by shared code 5070 5145 *****************************************************************************/ 5071 - static s32 5072 - e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd) 5146 + static s32 e1000_poll_eerd_eewr_done(struct e1000_hw *hw, int eerd) 5073 5147 { 5074 5148 u32 attempts = 100000; 5075 5149 u32 i, reg = 0; ··· 5095 5171 * 5096 5172 * hw - Struct containing variables accessed by shared code 5097 5173 ****************************************************************************/ 5098 - static bool 5099 - e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw) 5174 + static bool e1000_is_onboard_nvm_eeprom(struct e1000_hw *hw) 5100 5175 { 5101 5176 u32 eecd = 0; 5102 5177 ··· 5127 5204 * If the the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is 5128 5205 * valid. 5129 5206 *****************************************************************************/ 5130 - s32 5131 - e1000_validate_eeprom_checksum(struct e1000_hw *hw) 5207 + s32 e1000_validate_eeprom_checksum(struct e1000_hw *hw) 5132 5208 { 5133 5209 u16 checksum = 0; 5134 5210 u16 i, eeprom_data; ··· 5190 5268 * Sums the first 63 16 bit words of the EEPROM. Subtracts the sum from 0xBABA. 5191 5269 * Writes the difference to word offset 63 of the EEPROM. 5192 5270 *****************************************************************************/ 5193 - s32 5194 - e1000_update_eeprom_checksum(struct e1000_hw *hw) 5271 + s32 e1000_update_eeprom_checksum(struct e1000_hw *hw) 5195 5272 { 5196 5273 u32 ctrl_ext; 5197 5274 u16 checksum = 0; ··· 5234 5313 * If e1000_update_eeprom_checksum is not called after this function, the 5235 5314 * EEPROM will most likely contain an invalid checksum. 5236 5315 *****************************************************************************/ 5237 - s32 5238 - e1000_write_eeprom(struct e1000_hw *hw, 5239 - u16 offset, 5240 - u16 words, 5241 - u16 *data) 5316 + s32 e1000_write_eeprom(struct e1000_hw *hw, u16 offset, u16 words, u16 *data) 5242 5317 { 5243 5318 struct e1000_eeprom_info *eeprom = &hw->eeprom; 5244 5319 s32 status = 0; ··· 5287 5370 * data - pointer to array of 8 bit words to be written to the EEPROM 5288 5371 * 5289 5372 *****************************************************************************/ 5290 - static s32 5291 - e1000_write_eeprom_spi(struct e1000_hw *hw, 5292 - u16 offset, 5293 - u16 words, 5294 - u16 *data) 5373 + static s32 e1000_write_eeprom_spi(struct e1000_hw *hw, u16 offset, u16 words, 5374 + u16 *data) 5295 5375 { 5296 5376 struct e1000_eeprom_info *eeprom = &hw->eeprom; 5297 5377 u16 widx = 0; ··· 5350 5436 * data - pointer to array of 16 bit words to be written to the EEPROM 5351 5437 * 5352 5438 *****************************************************************************/ 5353 - static s32 5354 - e1000_write_eeprom_microwire(struct e1000_hw *hw, 5355 - u16 offset, 5356 - u16 words, 5357 - u16 *data) 5439 + static s32 e1000_write_eeprom_microwire(struct e1000_hw *hw, u16 offset, 5440 + u16 words, u16 *data) 5358 5441 { 5359 5442 struct e1000_eeprom_info *eeprom = &hw->eeprom; 5360 5443 u32 eecd; ··· 5434 5523 * data - word read from the EEPROM 5435 5524 * words - number of words to read 5436 5525 *****************************************************************************/ 5437 - static s32 5438 - e1000_commit_shadow_ram(struct e1000_hw *hw) 5526 + static s32 e1000_commit_shadow_ram(struct e1000_hw *hw) 5439 5527 { 5440 5528 u32 attempts = 100000; 5441 5529 u32 eecd = 0; ··· 5597 5687 * 5598 5688 * hw - Struct containing variables accessed by shared code 5599 5689 *****************************************************************************/ 5600 - s32 5601 - e1000_read_mac_addr(struct e1000_hw * hw) 5690 + s32 e1000_read_mac_addr(struct e1000_hw *hw) 5602 5691 { 5603 5692 u16 offset; 5604 5693 u16 eeprom_data, i; ··· 5640 5731 * of the receive addresss registers. Clears the multicast table. Assumes 5641 5732 * the receiver is in reset when the routine is called. 5642 5733 *****************************************************************************/ 5643 - static void 5644 - e1000_init_rx_addrs(struct e1000_hw *hw) 5734 + static void e1000_init_rx_addrs(struct e1000_hw *hw) 5645 5735 { 5646 5736 u32 i; 5647 5737 u32 rar_num; ··· 5678 5770 * hw - Struct containing variables accessed by shared code 5679 5771 * mc_addr - the multicast address to hash 5680 5772 *****************************************************************************/ 5681 - u32 5682 - e1000_hash_mc_addr(struct e1000_hw *hw, 5683 - u8 *mc_addr) 5773 + u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr) 5684 5774 { 5685 5775 u32 hash_value = 0; 5686 5776 ··· 5741 5835 * hw - Struct containing variables accessed by shared code 5742 5836 * hash_value - Multicast address hash value 5743 5837 *****************************************************************************/ 5744 - void 5745 - e1000_mta_set(struct e1000_hw *hw, 5746 - u32 hash_value) 5838 + void e1000_mta_set(struct e1000_hw *hw, u32 hash_value) 5747 5839 { 5748 5840 u32 hash_bit, hash_reg; 5749 5841 u32 mta; ··· 5788 5884 * addr - Address to put into receive address register 5789 5885 * index - Receive address register to write 5790 5886 *****************************************************************************/ 5791 - void 5792 - e1000_rar_set(struct e1000_hw *hw, 5793 - u8 *addr, 5794 - u32 index) 5887 + void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index) 5795 5888 { 5796 5889 u32 rar_low, rar_high; 5797 5890 ··· 5843 5942 * offset - Offset in VLAN filer table to write 5844 5943 * value - Value to write into VLAN filter table 5845 5944 *****************************************************************************/ 5846 - void 5847 - e1000_write_vfta(struct e1000_hw *hw, 5848 - u32 offset, 5849 - u32 value) 5945 + void e1000_write_vfta(struct e1000_hw *hw, u32 offset, u32 value) 5850 5946 { 5851 5947 u32 temp; 5852 5948 ··· 5867 5969 * 5868 5970 * hw - Struct containing variables accessed by shared code 5869 5971 *****************************************************************************/ 5870 - static void 5871 - e1000_clear_vfta(struct e1000_hw *hw) 5972 + static void e1000_clear_vfta(struct e1000_hw *hw) 5872 5973 { 5873 5974 u32 offset; 5874 5975 u32 vfta_value = 0; ··· 5900 6003 } 5901 6004 } 5902 6005 5903 - static s32 5904 - e1000_id_led_init(struct e1000_hw * hw) 6006 + static s32 e1000_id_led_init(struct e1000_hw *hw) 5905 6007 { 5906 6008 u32 ledctl; 5907 6009 const u32 ledctl_mask = 0x000000FF; ··· 5982 6086 * 5983 6087 * hw - Struct containing variables accessed by shared code 5984 6088 *****************************************************************************/ 5985 - s32 5986 - e1000_setup_led(struct e1000_hw *hw) 6089 + s32 e1000_setup_led(struct e1000_hw *hw) 5987 6090 { 5988 6091 u32 ledctl; 5989 6092 s32 ret_val = E1000_SUCCESS; ··· 6040 6145 * 6041 6146 * hw - Struct containing variables accessed by shared code 6042 6147 *****************************************************************************/ 6043 - s32 6044 - e1000_blink_led_start(struct e1000_hw *hw) 6148 + s32 e1000_blink_led_start(struct e1000_hw *hw) 6045 6149 { 6046 6150 s16 i; 6047 6151 u32 ledctl_blink = 0; ··· 6074 6180 * 6075 6181 * hw - Struct containing variables accessed by shared code 6076 6182 *****************************************************************************/ 6077 - s32 6078 - e1000_cleanup_led(struct e1000_hw *hw) 6183 + s32 e1000_cleanup_led(struct e1000_hw *hw) 6079 6184 { 6080 6185 s32 ret_val = E1000_SUCCESS; 6081 6186 ··· 6115 6222 * 6116 6223 * hw - Struct containing variables accessed by shared code 6117 6224 *****************************************************************************/ 6118 - s32 6119 - e1000_led_on(struct e1000_hw *hw) 6225 + s32 e1000_led_on(struct e1000_hw *hw) 6120 6226 { 6121 6227 u32 ctrl = E1000_READ_REG(hw, CTRL); 6122 6228 ··· 6165 6273 * 6166 6274 * hw - Struct containing variables accessed by shared code 6167 6275 *****************************************************************************/ 6168 - s32 6169 - e1000_led_off(struct e1000_hw *hw) 6276 + s32 e1000_led_off(struct e1000_hw *hw) 6170 6277 { 6171 6278 u32 ctrl = E1000_READ_REG(hw, CTRL); 6172 6279 ··· 6215 6324 * 6216 6325 * hw - Struct containing variables accessed by shared code 6217 6326 *****************************************************************************/ 6218 - static void 6219 - e1000_clear_hw_cntrs(struct e1000_hw *hw) 6327 + static void e1000_clear_hw_cntrs(struct e1000_hw *hw) 6220 6328 { 6221 6329 volatile u32 temp; 6222 6330 ··· 6318 6428 * current_ifs_val, ifs_min_val, ifs_max_val, ifs_step_size, and ifs_ratio 6319 6429 * before calling this function. 6320 6430 *****************************************************************************/ 6321 - void 6322 - e1000_reset_adaptive(struct e1000_hw *hw) 6431 + void e1000_reset_adaptive(struct e1000_hw *hw) 6323 6432 { 6324 6433 DEBUGFUNC("e1000_reset_adaptive"); 6325 6434 ··· 6345 6456 * tx_packets - Number of transmits since last callback 6346 6457 * total_collisions - Number of collisions since last callback 6347 6458 *****************************************************************************/ 6348 - void 6349 - e1000_update_adaptive(struct e1000_hw *hw) 6459 + void e1000_update_adaptive(struct e1000_hw *hw) 6350 6460 { 6351 6461 DEBUGFUNC("e1000_update_adaptive"); 6352 6462 ··· 6380 6492 * frame_len - The length of the frame in question 6381 6493 * mac_addr - The Ethernet destination address of the frame in question 6382 6494 *****************************************************************************/ 6383 - void 6384 - e1000_tbi_adjust_stats(struct e1000_hw *hw, 6385 - struct e1000_hw_stats *stats, 6386 - u32 frame_len, 6387 - u8 *mac_addr) 6495 + void e1000_tbi_adjust_stats(struct e1000_hw *hw, struct e1000_hw_stats *stats, 6496 + u32 frame_len, u8 *mac_addr) 6388 6497 { 6389 6498 u64 carry_bit; 6390 6499 ··· 6455 6570 * 6456 6571 * hw - Struct containing variables accessed by shared code 6457 6572 *****************************************************************************/ 6458 - void 6459 - e1000_get_bus_info(struct e1000_hw *hw) 6573 + void e1000_get_bus_info(struct e1000_hw *hw) 6460 6574 { 6461 6575 s32 ret_val; 6462 6576 u16 pci_ex_link_status; ··· 6529 6645 * offset - offset to write to 6530 6646 * value - value to write 6531 6647 *****************************************************************************/ 6532 - static void 6533 - e1000_write_reg_io(struct e1000_hw *hw, 6534 - u32 offset, 6535 - u32 value) 6648 + static void e1000_write_reg_io(struct e1000_hw *hw, u32 offset, u32 value) 6536 6649 { 6537 6650 unsigned long io_addr = hw->io_base; 6538 6651 unsigned long io_data = hw->io_base + 4; ··· 6553 6672 * register to the minimum and maximum range. 6554 6673 * For IGP phy's, the function calculates the range by the AGC registers. 6555 6674 *****************************************************************************/ 6556 - static s32 6557 - e1000_get_cable_length(struct e1000_hw *hw, 6558 - u16 *min_length, 6559 - u16 *max_length) 6675 + static s32 e1000_get_cable_length(struct e1000_hw *hw, u16 *min_length, 6676 + u16 *max_length) 6560 6677 { 6561 6678 s32 ret_val; 6562 6679 u16 agc_value = 0; ··· 6742 6863 * return 0. If the link speed is 1000 Mbps the polarity status is in the 6743 6864 * IGP01E1000_PHY_PCS_INIT_REG. 6744 6865 *****************************************************************************/ 6745 - static s32 6746 - e1000_check_polarity(struct e1000_hw *hw, 6747 - e1000_rev_polarity *polarity) 6866 + static s32 e1000_check_polarity(struct e1000_hw *hw, 6867 + e1000_rev_polarity *polarity) 6748 6868 { 6749 6869 s32 ret_val; 6750 6870 u16 phy_data; ··· 6817 6939 * Link Health register. In IGP this bit is latched high, so the driver must 6818 6940 * read it immediately after link is established. 6819 6941 *****************************************************************************/ 6820 - static s32 6821 - e1000_check_downshift(struct e1000_hw *hw) 6942 + static s32 e1000_check_downshift(struct e1000_hw *hw) 6822 6943 { 6823 6944 s32 ret_val; 6824 6945 u16 phy_data; ··· 6862 6985 * 6863 6986 ****************************************************************************/ 6864 6987 6865 - static s32 6866 - e1000_config_dsp_after_link_change(struct e1000_hw *hw, 6867 - bool link_up) 6988 + static s32 e1000_config_dsp_after_link_change(struct e1000_hw *hw, bool link_up) 6868 6989 { 6869 6990 s32 ret_val; 6870 6991 u16 phy_data, phy_saved_data, speed, duplex, i; ··· 7048 7173 * 7049 7174 * hw - Struct containing variables accessed by shared code 7050 7175 ****************************************************************************/ 7051 - static s32 7052 - e1000_set_phy_mode(struct e1000_hw *hw) 7176 + static s32 e1000_set_phy_mode(struct e1000_hw *hw) 7053 7177 { 7054 7178 s32 ret_val; 7055 7179 u16 eeprom_data; ··· 7092 7218 * 7093 7219 ****************************************************************************/ 7094 7220 7095 - static s32 7096 - e1000_set_d3_lplu_state(struct e1000_hw *hw, 7097 - bool active) 7221 + static s32 e1000_set_d3_lplu_state(struct e1000_hw *hw, bool active) 7098 7222 { 7099 7223 u32 phy_ctrl = 0; 7100 7224 s32 ret_val; ··· 7220 7348 * 7221 7349 ****************************************************************************/ 7222 7350 7223 - static s32 7224 - e1000_set_d0_lplu_state(struct e1000_hw *hw, 7225 - bool active) 7351 + static s32 e1000_set_d0_lplu_state(struct e1000_hw *hw, bool active) 7226 7352 { 7227 7353 u32 phy_ctrl = 0; 7228 7354 s32 ret_val; ··· 7309 7439 * 7310 7440 * hw - Struct containing variables accessed by shared code 7311 7441 *****************************************************************************/ 7312 - static s32 7313 - e1000_set_vco_speed(struct e1000_hw *hw) 7442 + static s32 e1000_set_vco_speed(struct e1000_hw *hw) 7314 7443 { 7315 7444 s32 ret_val; 7316 7445 u16 default_page = 0; ··· 7372 7503 * 7373 7504 * returns: - E1000_SUCCESS . 7374 7505 ****************************************************************************/ 7375 - static s32 7376 - e1000_host_if_read_cookie(struct e1000_hw * hw, u8 *buffer) 7506 + static s32 e1000_host_if_read_cookie(struct e1000_hw *hw, u8 *buffer) 7377 7507 { 7378 7508 u8 i; 7379 7509 u32 offset = E1000_MNG_DHCP_COOKIE_OFFSET; ··· 7398 7530 * timeout 7399 7531 * - E1000_SUCCESS for success. 7400 7532 ****************************************************************************/ 7401 - static s32 7402 - e1000_mng_enable_host_if(struct e1000_hw * hw) 7533 + static s32 e1000_mng_enable_host_if(struct e1000_hw *hw) 7403 7534 { 7404 7535 u32 hicr; 7405 7536 u8 i; ··· 7431 7564 * 7432 7565 * returns - E1000_SUCCESS for success. 7433 7566 ****************************************************************************/ 7434 - static s32 7435 - e1000_mng_host_if_write(struct e1000_hw * hw, u8 *buffer, 7436 - u16 length, u16 offset, u8 *sum) 7567 + static s32 e1000_mng_host_if_write(struct e1000_hw *hw, u8 *buffer, u16 length, 7568 + u16 offset, u8 *sum) 7437 7569 { 7438 7570 u8 *tmp; 7439 7571 u8 *bufptr = buffer; ··· 7498 7632 * 7499 7633 * returns - E1000_SUCCESS for success. 7500 7634 ****************************************************************************/ 7501 - static s32 7502 - e1000_mng_write_cmd_header(struct e1000_hw * hw, 7503 - struct e1000_host_mng_command_header * hdr) 7635 + static s32 e1000_mng_write_cmd_header(struct e1000_hw *hw, 7636 + struct e1000_host_mng_command_header *hdr) 7504 7637 { 7505 7638 u16 i; 7506 7639 u8 sum; ··· 7537 7672 * 7538 7673 * returns - E1000_SUCCESS for success. 7539 7674 ****************************************************************************/ 7540 - static s32 7541 - e1000_mng_write_commit(struct e1000_hw * hw) 7675 + static s32 e1000_mng_write_commit(struct e1000_hw *hw) 7542 7676 { 7543 7677 u32 hicr; 7544 7678 ··· 7554 7690 * 7555 7691 * returns - true when the mode is IAMT or false. 7556 7692 ****************************************************************************/ 7557 - bool 7558 - e1000_check_mng_mode(struct e1000_hw *hw) 7693 + bool e1000_check_mng_mode(struct e1000_hw *hw) 7559 7694 { 7560 7695 u32 fwsm; 7561 7696 ··· 7575 7712 /***************************************************************************** 7576 7713 * This function writes the dhcp info . 7577 7714 ****************************************************************************/ 7578 - s32 7579 - e1000_mng_write_dhcp_info(struct e1000_hw * hw, u8 *buffer, 7580 - u16 length) 7715 + s32 e1000_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length) 7581 7716 { 7582 7717 s32 ret_val; 7583 7718 struct e1000_host_mng_command_header hdr; ··· 7605 7744 * 7606 7745 * returns - checksum of buffer contents. 7607 7746 ****************************************************************************/ 7608 - static u8 7609 - e1000_calculate_mng_checksum(char *buffer, u32 length) 7747 + static u8 e1000_calculate_mng_checksum(char *buffer, u32 length) 7610 7748 { 7611 7749 u8 sum = 0; 7612 7750 u32 i; ··· 7624 7764 * 7625 7765 * returns - true for packet filtering or false. 7626 7766 ****************************************************************************/ 7627 - bool 7628 - e1000_enable_tx_pkt_filtering(struct e1000_hw *hw) 7767 + bool e1000_enable_tx_pkt_filtering(struct e1000_hw *hw) 7629 7768 { 7630 7769 /* called in init as well as watchdog timer functions */ 7631 7770 ··· 7665 7806 * returns: - true/false 7666 7807 * 7667 7808 *****************************************************************************/ 7668 - u32 7669 - e1000_enable_mng_pass_thru(struct e1000_hw *hw) 7809 + u32 e1000_enable_mng_pass_thru(struct e1000_hw *hw) 7670 7810 { 7671 7811 u32 manc; 7672 7812 u32 fwsm, factps; ··· 7690 7832 return false; 7691 7833 } 7692 7834 7693 - static s32 7694 - e1000_polarity_reversal_workaround(struct e1000_hw *hw) 7835 + static s32 e1000_polarity_reversal_workaround(struct e1000_hw *hw) 7695 7836 { 7696 7837 s32 ret_val; 7697 7838 u16 mii_status_reg; ··· 7783 7926 * returns: - none. 7784 7927 * 7785 7928 ***************************************************************************/ 7786 - static void 7787 - e1000_set_pci_express_master_disable(struct e1000_hw *hw) 7929 + static void e1000_set_pci_express_master_disable(struct e1000_hw *hw) 7788 7930 { 7789 7931 u32 ctrl; 7790 7932 ··· 7808 7952 * E1000_SUCCESS master requests disabled. 7809 7953 * 7810 7954 ******************************************************************************/ 7811 - s32 7812 - e1000_disable_pciex_master(struct e1000_hw *hw) 7955 + s32 e1000_disable_pciex_master(struct e1000_hw *hw) 7813 7956 { 7814 7957 s32 timeout = MASTER_DISABLE_TIMEOUT; /* 80ms */ 7815 7958 ··· 7845 7990 * E1000_SUCCESS at any other case. 7846 7991 * 7847 7992 ******************************************************************************/ 7848 - static s32 7849 - e1000_get_auto_rd_done(struct e1000_hw *hw) 7993 + static s32 e1000_get_auto_rd_done(struct e1000_hw *hw) 7850 7994 { 7851 7995 s32 timeout = AUTO_READ_DONE_TIMEOUT; 7852 7996 ··· 7892 8038 * E1000_SUCCESS at any other case. 7893 8039 * 7894 8040 ***************************************************************************/ 7895 - static s32 7896 - e1000_get_phy_cfg_done(struct e1000_hw *hw) 8041 + static s32 e1000_get_phy_cfg_done(struct e1000_hw *hw) 7897 8042 { 7898 8043 s32 timeout = PHY_CFG_TIMEOUT; 7899 8044 u32 cfg_mask = E1000_EEPROM_CFG_DONE; ··· 7938 8085 * E1000_SUCCESS at any other case. 7939 8086 * 7940 8087 ***************************************************************************/ 7941 - static s32 7942 - e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw) 8088 + static s32 e1000_get_hw_eeprom_semaphore(struct e1000_hw *hw) 7943 8089 { 7944 8090 s32 timeout; 7945 8091 u32 swsm; ··· 7987 8135 * returns: - None. 7988 8136 * 7989 8137 ***************************************************************************/ 7990 - static void 7991 - e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw) 8138 + static void e1000_put_hw_eeprom_semaphore(struct e1000_hw *hw) 7992 8139 { 7993 8140 u32 swsm; 7994 8141 ··· 8015 8164 * E1000_SUCCESS at any other case. 8016 8165 * 8017 8166 ***************************************************************************/ 8018 - static s32 8019 - e1000_get_software_semaphore(struct e1000_hw *hw) 8167 + static s32 e1000_get_software_semaphore(struct e1000_hw *hw) 8020 8168 { 8021 8169 s32 timeout = hw->eeprom.word_size + 1; 8022 8170 u32 swsm; ··· 8050 8200 * hw: Struct containing variables accessed by shared code 8051 8201 * 8052 8202 ***************************************************************************/ 8053 - static void 8054 - e1000_release_software_semaphore(struct e1000_hw *hw) 8203 + static void e1000_release_software_semaphore(struct e1000_hw *hw) 8055 8204 { 8056 8205 u32 swsm; 8057 8206 ··· 8077 8228 * E1000_SUCCESS 8078 8229 * 8079 8230 *****************************************************************************/ 8080 - s32 8081 - e1000_check_phy_reset_block(struct e1000_hw *hw) 8231 + s32 e1000_check_phy_reset_block(struct e1000_hw *hw) 8082 8232 { 8083 8233 u32 manc = 0; 8084 8234 u32 fwsm = 0; ··· 8094 8246 E1000_BLK_PHY_RESET : E1000_SUCCESS; 8095 8247 } 8096 8248 8097 - static u8 8098 - e1000_arc_subsystem_valid(struct e1000_hw *hw) 8249 + static u8 e1000_arc_subsystem_valid(struct e1000_hw *hw) 8099 8250 { 8100 8251 u32 fwsm; 8101 8252 ··· 8130 8283 * returns: E1000_SUCCESS 8131 8284 * 8132 8285 *****************************************************************************/ 8133 - static s32 8134 - e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, u32 no_snoop) 8286 + static s32 e1000_set_pci_ex_no_snoop(struct e1000_hw *hw, u32 no_snoop) 8135 8287 { 8136 8288 u32 gcr_reg = 0; 8137 8289 ··· 8170 8324 * hw: Struct containing variables accessed by shared code 8171 8325 * 8172 8326 ***************************************************************************/ 8173 - static s32 8174 - e1000_get_software_flag(struct e1000_hw *hw) 8327 + static s32 e1000_get_software_flag(struct e1000_hw *hw) 8175 8328 { 8176 8329 s32 timeout = PHY_CFG_TIMEOUT; 8177 8330 u32 extcnf_ctrl; ··· 8208 8363 * hw: Struct containing variables accessed by shared code 8209 8364 * 8210 8365 ***************************************************************************/ 8211 - static void 8212 - e1000_release_software_flag(struct e1000_hw *hw) 8366 + static void e1000_release_software_flag(struct e1000_hw *hw) 8213 8367 { 8214 8368 u32 extcnf_ctrl; 8215 8369 ··· 8232 8388 * data - word read from the EEPROM 8233 8389 * words - number of words to read 8234 8390 *****************************************************************************/ 8235 - static s32 8236 - e1000_read_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, 8237 - u16 *data) 8391 + static s32 e1000_read_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, 8392 + u16 *data) 8238 8393 { 8239 8394 s32 error = E1000_SUCCESS; 8240 8395 u32 flash_bank = 0; ··· 8287 8444 * words - number of words to write 8288 8445 * data - words to write to the EEPROM 8289 8446 *****************************************************************************/ 8290 - static s32 8291 - e1000_write_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, 8292 - u16 *data) 8447 + static s32 e1000_write_eeprom_ich8(struct e1000_hw *hw, u16 offset, u16 words, 8448 + u16 *data) 8293 8449 { 8294 8450 u32 i = 0; 8295 8451 s32 error = E1000_SUCCESS; ··· 8333 8491 * 8334 8492 * hw - The pointer to the hw structure 8335 8493 ****************************************************************************/ 8336 - static s32 8337 - e1000_ich8_cycle_init(struct e1000_hw *hw) 8494 + static s32 e1000_ich8_cycle_init(struct e1000_hw *hw) 8338 8495 { 8339 8496 union ich8_hws_flash_status hsfsts; 8340 8497 s32 error = E1000_ERR_EEPROM; ··· 8399 8558 * 8400 8559 * hw - The pointer to the hw structure 8401 8560 ****************************************************************************/ 8402 - static s32 8403 - e1000_ich8_flash_cycle(struct e1000_hw *hw, u32 timeout) 8561 + static s32 e1000_ich8_flash_cycle(struct e1000_hw *hw, u32 timeout) 8404 8562 { 8405 8563 union ich8_hws_flash_ctrl hsflctl; 8406 8564 union ich8_hws_flash_status hsfsts; ··· 8433 8593 * size - Size of data to read, 1=byte 2=word 8434 8594 * data - Pointer to the word to store the value read. 8435 8595 *****************************************************************************/ 8436 - static s32 8437 - e1000_read_ich8_data(struct e1000_hw *hw, u32 index, 8438 - u32 size, u16* data) 8596 + static s32 e1000_read_ich8_data(struct e1000_hw *hw, u32 index, u32 size, 8597 + u16 *data) 8439 8598 { 8440 8599 union ich8_hws_flash_status hsfsts; 8441 8600 union ich8_hws_flash_ctrl hsflctl; ··· 8511 8672 * size - Size of data to read, 1=byte 2=word 8512 8673 * data - The byte(s) to write to the NVM. 8513 8674 *****************************************************************************/ 8514 - static s32 8515 - e1000_write_ich8_data(struct e1000_hw *hw, u32 index, u32 size, 8516 - u16 data) 8675 + static s32 e1000_write_ich8_data(struct e1000_hw *hw, u32 index, u32 size, 8676 + u16 data) 8517 8677 { 8518 8678 union ich8_hws_flash_status hsfsts; 8519 8679 union ich8_hws_flash_ctrl hsflctl; ··· 8585 8747 * index - The index of the byte to read. 8586 8748 * data - Pointer to a byte to store the value read. 8587 8749 *****************************************************************************/ 8588 - static s32 8589 - e1000_read_ich8_byte(struct e1000_hw *hw, u32 index, u8* data) 8750 + static s32 e1000_read_ich8_byte(struct e1000_hw *hw, u32 index, u8 *data) 8590 8751 { 8591 8752 s32 status = E1000_SUCCESS; 8592 8753 u16 word = 0; ··· 8607 8770 * index - The index of the byte to write. 8608 8771 * byte - The byte to write to the NVM. 8609 8772 *****************************************************************************/ 8610 - static s32 8611 - e1000_verify_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 byte) 8773 + static s32 e1000_verify_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 byte) 8612 8774 { 8613 8775 s32 error = E1000_SUCCESS; 8614 8776 s32 program_retries = 0; ··· 8639 8803 * index - The index of the byte to read. 8640 8804 * data - The byte to write to the NVM. 8641 8805 *****************************************************************************/ 8642 - static s32 8643 - e1000_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 data) 8806 + static s32 e1000_write_ich8_byte(struct e1000_hw *hw, u32 index, u8 data) 8644 8807 { 8645 8808 s32 status = E1000_SUCCESS; 8646 8809 u16 word = (u16)data; ··· 8656 8821 * index - The starting byte index of the word to read. 8657 8822 * data - Pointer to a word to store the value read. 8658 8823 *****************************************************************************/ 8659 - static s32 8660 - e1000_read_ich8_word(struct e1000_hw *hw, u32 index, u16 *data) 8824 + static s32 e1000_read_ich8_word(struct e1000_hw *hw, u32 index, u16 *data) 8661 8825 { 8662 8826 s32 status = E1000_SUCCESS; 8663 8827 status = e1000_read_ich8_data(hw, index, 2, data); ··· 8674 8840 * amount of NVM used in each bank is a *minimum* of 4 KBytes, but in fact the 8675 8841 * bank size may be 4, 8 or 64 KBytes 8676 8842 *****************************************************************************/ 8677 - static s32 8678 - e1000_erase_ich8_4k_segment(struct e1000_hw *hw, u32 bank) 8843 + static s32 e1000_erase_ich8_4k_segment(struct e1000_hw *hw, u32 bank) 8679 8844 { 8680 8845 union ich8_hws_flash_status hsfsts; 8681 8846 union ich8_hws_flash_ctrl hsflctl; ··· 8763 8930 return error; 8764 8931 } 8765 8932 8766 - static s32 8767 - e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, 8768 - u32 cnf_base_addr, u32 cnf_size) 8933 + static s32 e1000_init_lcd_from_nvm_config_region(struct e1000_hw *hw, 8934 + u32 cnf_base_addr, 8935 + u32 cnf_size) 8769 8936 { 8770 8937 u32 ret_val = E1000_SUCCESS; 8771 8938 u16 word_addr, reg_data, reg_addr; ··· 8805 8972 * 8806 8973 * hw: Struct containing variables accessed by shared code 8807 8974 *****************************************************************************/ 8808 - static s32 8809 - e1000_init_lcd_from_nvm(struct e1000_hw *hw) 8975 + static s32 e1000_init_lcd_from_nvm(struct e1000_hw *hw) 8810 8976 { 8811 8977 u32 reg_data, cnf_base_addr, cnf_size, ret_val, loop; 8812 8978
+116 -191
drivers/net/e1000/e1000_main.c
··· 232 232 * loaded. All it does is register with the PCI subsystem. 233 233 **/ 234 234 235 - static int __init 236 - e1000_init_module(void) 235 + static int __init e1000_init_module(void) 237 236 { 238 237 int ret; 239 238 printk(KERN_INFO "%s - version %s\n", ··· 260 261 * from memory. 261 262 **/ 262 263 263 - static void __exit 264 - e1000_exit_module(void) 264 + static void __exit e1000_exit_module(void) 265 265 { 266 266 pci_unregister_driver(&e1000_driver); 267 267 } ··· 309 311 * @adapter: board private structure 310 312 **/ 311 313 312 - static void 313 - e1000_irq_disable(struct e1000_adapter *adapter) 314 + static void e1000_irq_disable(struct e1000_adapter *adapter) 314 315 { 315 316 E1000_WRITE_REG(&adapter->hw, IMC, ~0); 316 317 E1000_WRITE_FLUSH(&adapter->hw); ··· 321 324 * @adapter: board private structure 322 325 **/ 323 326 324 - static void 325 - e1000_irq_enable(struct e1000_adapter *adapter) 327 + static void e1000_irq_enable(struct e1000_adapter *adapter) 326 328 { 327 329 E1000_WRITE_REG(&adapter->hw, IMS, IMS_ENABLE_MASK); 328 330 E1000_WRITE_FLUSH(&adapter->hw); 329 331 } 330 332 331 - static void 332 - e1000_update_mng_vlan(struct e1000_adapter *adapter) 333 + static void e1000_update_mng_vlan(struct e1000_adapter *adapter) 333 334 { 334 335 struct net_device *netdev = adapter->netdev; 335 336 u16 vid = adapter->hw.mng_cookie.vlan_id; ··· 361 366 * 362 367 **/ 363 368 364 - static void 365 - e1000_release_hw_control(struct e1000_adapter *adapter) 369 + static void e1000_release_hw_control(struct e1000_adapter *adapter) 366 370 { 367 371 u32 ctrl_ext; 368 372 u32 swsm; ··· 397 403 * 398 404 **/ 399 405 400 - static void 401 - e1000_get_hw_control(struct e1000_adapter *adapter) 406 + static void e1000_get_hw_control(struct e1000_adapter *adapter) 402 407 { 403 408 u32 ctrl_ext; 404 409 u32 swsm; ··· 422 429 } 423 430 } 424 431 425 - static void 426 - e1000_init_manageability(struct e1000_adapter *adapter) 432 + static void e1000_init_manageability(struct e1000_adapter *adapter) 427 433 { 428 434 if (adapter->en_mng_pt) { 429 435 u32 manc = E1000_READ_REG(&adapter->hw, MANC); ··· 448 456 } 449 457 } 450 458 451 - static void 452 - e1000_release_manageability(struct e1000_adapter *adapter) 459 + static void e1000_release_manageability(struct e1000_adapter *adapter) 453 460 { 454 461 if (adapter->en_mng_pt) { 455 462 u32 manc = E1000_READ_REG(&adapter->hw, MANC); ··· 582 591 return; 583 592 } 584 593 585 - void 586 - e1000_down(struct e1000_adapter *adapter) 594 + void e1000_down(struct e1000_adapter *adapter) 587 595 { 588 596 struct net_device *netdev = adapter->netdev; 589 597 ··· 610 620 e1000_clean_all_rx_rings(adapter); 611 621 } 612 622 613 - void 614 - e1000_reinit_locked(struct e1000_adapter *adapter) 623 + void e1000_reinit_locked(struct e1000_adapter *adapter) 615 624 { 616 625 WARN_ON(in_interrupt()); 617 626 while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) ··· 620 631 clear_bit(__E1000_RESETTING, &adapter->flags); 621 632 } 622 633 623 - void 624 - e1000_reset(struct e1000_adapter *adapter) 634 + void e1000_reset(struct e1000_adapter *adapter) 625 635 { 626 636 u32 pba = 0, tx_space, min_tx_space, min_rx_space; 627 637 u16 fc_high_water_mark = E1000_FC_HIGH_DIFF; ··· 1219 1231 * memory. 1220 1232 **/ 1221 1233 1222 - static void __devexit 1223 - e1000_remove(struct pci_dev *pdev) 1234 + static void __devexit e1000_remove(struct pci_dev *pdev) 1224 1235 { 1225 1236 struct net_device *netdev = pci_get_drvdata(pdev); 1226 1237 struct e1000_adapter *adapter = netdev_priv(netdev); ··· 1270 1283 * OS network device settings (MTU size). 1271 1284 **/ 1272 1285 1273 - static int __devinit 1274 - e1000_sw_init(struct e1000_adapter *adapter) 1286 + static int __devinit e1000_sw_init(struct e1000_adapter *adapter) 1275 1287 { 1276 1288 struct e1000_hw *hw = &adapter->hw; 1277 1289 struct net_device *netdev = adapter->netdev; ··· 1363 1377 * intended for Multiqueue, but should work fine with a single queue. 1364 1378 **/ 1365 1379 1366 - static int __devinit 1367 - e1000_alloc_queues(struct e1000_adapter *adapter) 1380 + static int __devinit e1000_alloc_queues(struct e1000_adapter *adapter) 1368 1381 { 1369 1382 adapter->tx_ring = kcalloc(adapter->num_tx_queues, 1370 1383 sizeof(struct e1000_tx_ring), GFP_KERNEL); ··· 1404 1419 * and the stack is notified that the interface is ready. 1405 1420 **/ 1406 1421 1407 - static int 1408 - e1000_open(struct net_device *netdev) 1422 + static int e1000_open(struct net_device *netdev) 1409 1423 { 1410 1424 struct e1000_adapter *adapter = netdev_priv(netdev); 1411 1425 int err; ··· 1487 1503 * hardware, and all transmit and receive resources are freed. 1488 1504 **/ 1489 1505 1490 - static int 1491 - e1000_close(struct net_device *netdev) 1506 + static int e1000_close(struct net_device *netdev) 1492 1507 { 1493 1508 struct e1000_adapter *adapter = netdev_priv(netdev); 1494 1509 ··· 1523 1540 * @start: address of beginning of memory 1524 1541 * @len: length of memory 1525 1542 **/ 1526 - static bool 1527 - e1000_check_64k_bound(struct e1000_adapter *adapter, 1528 - void *start, unsigned long len) 1543 + static bool e1000_check_64k_bound(struct e1000_adapter *adapter, void *start, 1544 + unsigned long len) 1529 1545 { 1530 1546 unsigned long begin = (unsigned long) start; 1531 1547 unsigned long end = begin + len; ··· 1547 1565 * Return 0 on success, negative on failure 1548 1566 **/ 1549 1567 1550 - static int 1551 - e1000_setup_tx_resources(struct e1000_adapter *adapter, 1552 - struct e1000_tx_ring *txdr) 1568 + static int e1000_setup_tx_resources(struct e1000_adapter *adapter, 1569 + struct e1000_tx_ring *txdr) 1553 1570 { 1554 1571 struct pci_dev *pdev = adapter->pdev; 1555 1572 int size; ··· 1622 1641 * Return 0 on success, negative on failure 1623 1642 **/ 1624 1643 1625 - int 1626 - e1000_setup_all_tx_resources(struct e1000_adapter *adapter) 1644 + int e1000_setup_all_tx_resources(struct e1000_adapter *adapter) 1627 1645 { 1628 1646 int i, err = 0; 1629 1647 ··· 1648 1668 * Configure the Tx unit of the MAC after a reset. 1649 1669 **/ 1650 1670 1651 - static void 1652 - e1000_configure_tx(struct e1000_adapter *adapter) 1671 + static void e1000_configure_tx(struct e1000_adapter *adapter) 1653 1672 { 1654 1673 u64 tdba; 1655 1674 struct e1000_hw *hw = &adapter->hw; ··· 1761 1782 * Returns 0 on success, negative on failure 1762 1783 **/ 1763 1784 1764 - static int 1765 - e1000_setup_rx_resources(struct e1000_adapter *adapter, 1766 - struct e1000_rx_ring *rxdr) 1785 + static int e1000_setup_rx_resources(struct e1000_adapter *adapter, 1786 + struct e1000_rx_ring *rxdr) 1767 1787 { 1768 1788 struct pci_dev *pdev = adapter->pdev; 1769 1789 int size, desc_len; ··· 1865 1887 * Return 0 on success, negative on failure 1866 1888 **/ 1867 1889 1868 - int 1869 - e1000_setup_all_rx_resources(struct e1000_adapter *adapter) 1890 + int e1000_setup_all_rx_resources(struct e1000_adapter *adapter) 1870 1891 { 1871 1892 int i, err = 0; 1872 1893 ··· 1890 1913 **/ 1891 1914 #define PAGE_USE_COUNT(S) (((S) >> PAGE_SHIFT) + \ 1892 1915 (((S) & (PAGE_SIZE - 1)) ? 1 : 0)) 1893 - static void 1894 - e1000_setup_rctl(struct e1000_adapter *adapter) 1916 + static void e1000_setup_rctl(struct e1000_adapter *adapter) 1895 1917 { 1896 1918 u32 rctl, rfctl; 1897 1919 u32 psrctl = 0; ··· 2007 2031 * Configure the Rx unit of the MAC after a reset. 2008 2032 **/ 2009 2033 2010 - static void 2011 - e1000_configure_rx(struct e1000_adapter *adapter) 2034 + static void e1000_configure_rx(struct e1000_adapter *adapter) 2012 2035 { 2013 2036 u64 rdba; 2014 2037 struct e1000_hw *hw = &adapter->hw; ··· 2106 2131 * Free all transmit software resources 2107 2132 **/ 2108 2133 2109 - static void 2110 - e1000_free_tx_resources(struct e1000_adapter *adapter, 2111 - struct e1000_tx_ring *tx_ring) 2134 + static void e1000_free_tx_resources(struct e1000_adapter *adapter, 2135 + struct e1000_tx_ring *tx_ring) 2112 2136 { 2113 2137 struct pci_dev *pdev = adapter->pdev; 2114 2138 ··· 2128 2154 * Free all transmit software resources 2129 2155 **/ 2130 2156 2131 - void 2132 - e1000_free_all_tx_resources(struct e1000_adapter *adapter) 2157 + void e1000_free_all_tx_resources(struct e1000_adapter *adapter) 2133 2158 { 2134 2159 int i; 2135 2160 ··· 2136 2163 e1000_free_tx_resources(adapter, &adapter->tx_ring[i]); 2137 2164 } 2138 2165 2139 - static void 2140 - e1000_unmap_and_free_tx_resource(struct e1000_adapter *adapter, 2141 - struct e1000_buffer *buffer_info) 2166 + static void e1000_unmap_and_free_tx_resource(struct e1000_adapter *adapter, 2167 + struct e1000_buffer *buffer_info) 2142 2168 { 2143 2169 if (buffer_info->dma) { 2144 2170 pci_unmap_page(adapter->pdev, ··· 2159 2187 * @tx_ring: ring to be cleaned 2160 2188 **/ 2161 2189 2162 - static void 2163 - e1000_clean_tx_ring(struct e1000_adapter *adapter, 2164 - struct e1000_tx_ring *tx_ring) 2190 + static void e1000_clean_tx_ring(struct e1000_adapter *adapter, 2191 + struct e1000_tx_ring *tx_ring) 2165 2192 { 2166 2193 struct e1000_buffer *buffer_info; 2167 2194 unsigned long size; ··· 2193 2222 * @adapter: board private structure 2194 2223 **/ 2195 2224 2196 - static void 2197 - e1000_clean_all_tx_rings(struct e1000_adapter *adapter) 2225 + static void e1000_clean_all_tx_rings(struct e1000_adapter *adapter) 2198 2226 { 2199 2227 int i; 2200 2228 ··· 2209 2239 * Free all receive software resources 2210 2240 **/ 2211 2241 2212 - static void 2213 - e1000_free_rx_resources(struct e1000_adapter *adapter, 2214 - struct e1000_rx_ring *rx_ring) 2242 + static void e1000_free_rx_resources(struct e1000_adapter *adapter, 2243 + struct e1000_rx_ring *rx_ring) 2215 2244 { 2216 2245 struct pci_dev *pdev = adapter->pdev; 2217 2246 ··· 2235 2266 * Free all receive software resources 2236 2267 **/ 2237 2268 2238 - void 2239 - e1000_free_all_rx_resources(struct e1000_adapter *adapter) 2269 + void e1000_free_all_rx_resources(struct e1000_adapter *adapter) 2240 2270 { 2241 2271 int i; 2242 2272 ··· 2249 2281 * @rx_ring: ring to free buffers from 2250 2282 **/ 2251 2283 2252 - static void 2253 - e1000_clean_rx_ring(struct e1000_adapter *adapter, 2254 - struct e1000_rx_ring *rx_ring) 2284 + static void e1000_clean_rx_ring(struct e1000_adapter *adapter, 2285 + struct e1000_rx_ring *rx_ring) 2255 2286 { 2256 2287 struct e1000_buffer *buffer_info; 2257 2288 struct e1000_ps_page *ps_page; ··· 2307 2340 * @adapter: board private structure 2308 2341 **/ 2309 2342 2310 - static void 2311 - e1000_clean_all_rx_rings(struct e1000_adapter *adapter) 2343 + static void e1000_clean_all_rx_rings(struct e1000_adapter *adapter) 2312 2344 { 2313 2345 int i; 2314 2346 ··· 2318 2352 /* The 82542 2.0 (revision 2) needs to have the receive unit in reset 2319 2353 * and memory write and invalidate disabled for certain operations 2320 2354 */ 2321 - static void 2322 - e1000_enter_82542_rst(struct e1000_adapter *adapter) 2355 + static void e1000_enter_82542_rst(struct e1000_adapter *adapter) 2323 2356 { 2324 2357 struct net_device *netdev = adapter->netdev; 2325 2358 u32 rctl; ··· 2335 2370 e1000_clean_all_rx_rings(adapter); 2336 2371 } 2337 2372 2338 - static void 2339 - e1000_leave_82542_rst(struct e1000_adapter *adapter) 2373 + static void e1000_leave_82542_rst(struct e1000_adapter *adapter) 2340 2374 { 2341 2375 struct net_device *netdev = adapter->netdev; 2342 2376 u32 rctl; ··· 2365 2401 * Returns 0 on success, negative on failure 2366 2402 **/ 2367 2403 2368 - static int 2369 - e1000_set_mac(struct net_device *netdev, void *p) 2404 + static int e1000_set_mac(struct net_device *netdev, void *p) 2370 2405 { 2371 2406 struct e1000_adapter *adapter = netdev_priv(netdev); 2372 2407 struct sockaddr *addr = p; ··· 2415 2452 * promiscuous mode, and all-multi behavior. 2416 2453 **/ 2417 2454 2418 - static void 2419 - e1000_set_rx_mode(struct net_device *netdev) 2455 + static void e1000_set_rx_mode(struct net_device *netdev) 2420 2456 { 2421 2457 struct e1000_adapter *adapter = netdev_priv(netdev); 2422 2458 struct e1000_hw *hw = &adapter->hw; ··· 2514 2552 /* Need to wait a few seconds after link up to get diagnostic information from 2515 2553 * the phy */ 2516 2554 2517 - static void 2518 - e1000_update_phy_info(unsigned long data) 2555 + static void e1000_update_phy_info(unsigned long data) 2519 2556 { 2520 2557 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 2521 2558 e1000_phy_get_info(&adapter->hw, &adapter->phy_info); ··· 2525 2564 * @data: pointer to adapter cast into an unsigned long 2526 2565 **/ 2527 2566 2528 - static void 2529 - e1000_82547_tx_fifo_stall(unsigned long data) 2567 + static void e1000_82547_tx_fifo_stall(unsigned long data) 2530 2568 { 2531 2569 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 2532 2570 struct net_device *netdev = adapter->netdev; ··· 2565 2605 * e1000_watchdog - Timer Call-back 2566 2606 * @data: pointer to adapter cast into an unsigned long 2567 2607 **/ 2568 - static void 2569 - e1000_watchdog(unsigned long data) 2608 + static void e1000_watchdog(unsigned long data) 2570 2609 { 2571 2610 struct e1000_adapter *adapter = (struct e1000_adapter *) data; 2572 2611 struct net_device *netdev = adapter->netdev; ··· 2765 2806 * @bytes: the number of bytes during this measurement interval 2766 2807 **/ 2767 2808 static unsigned int e1000_update_itr(struct e1000_adapter *adapter, 2768 - u16 itr_setting, 2769 - int packets, 2770 - int bytes) 2809 + u16 itr_setting, int packets, int bytes) 2771 2810 { 2772 2811 unsigned int retval = itr_setting; 2773 2812 struct e1000_hw *hw = &adapter->hw; ··· 2883 2926 #define E1000_TX_FLAGS_VLAN_MASK 0xffff0000 2884 2927 #define E1000_TX_FLAGS_VLAN_SHIFT 16 2885 2928 2886 - static int 2887 - e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, 2888 - struct sk_buff *skb) 2929 + static int e1000_tso(struct e1000_adapter *adapter, 2930 + struct e1000_tx_ring *tx_ring, struct sk_buff *skb) 2889 2931 { 2890 2932 struct e1000_context_desc *context_desc; 2891 2933 struct e1000_buffer *buffer_info; ··· 2955 2999 return false; 2956 3000 } 2957 3001 2958 - static bool 2959 - e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, 2960 - struct sk_buff *skb) 3002 + static bool e1000_tx_csum(struct e1000_adapter *adapter, 3003 + struct e1000_tx_ring *tx_ring, struct sk_buff *skb) 2961 3004 { 2962 3005 struct e1000_context_desc *context_desc; 2963 3006 struct e1000_buffer *buffer_info; ··· 2993 3038 #define E1000_MAX_TXD_PWR 12 2994 3039 #define E1000_MAX_DATA_PER_TXD (1<<E1000_MAX_TXD_PWR) 2995 3040 2996 - static int 2997 - e1000_tx_map(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, 2998 - struct sk_buff *skb, unsigned int first, unsigned int max_per_txd, 2999 - unsigned int nr_frags, unsigned int mss) 3041 + static int e1000_tx_map(struct e1000_adapter *adapter, 3042 + struct e1000_tx_ring *tx_ring, 3043 + struct sk_buff *skb, unsigned int first, 3044 + unsigned int max_per_txd, unsigned int nr_frags, 3045 + unsigned int mss) 3000 3046 { 3001 3047 struct e1000_buffer *buffer_info; 3002 3048 unsigned int len = skb->len; ··· 3101 3145 return count; 3102 3146 } 3103 3147 3104 - static void 3105 - e1000_tx_queue(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, 3106 - int tx_flags, int count) 3148 + static void e1000_tx_queue(struct e1000_adapter *adapter, 3149 + struct e1000_tx_ring *tx_ring, int tx_flags, 3150 + int count) 3107 3151 { 3108 3152 struct e1000_tx_desc *tx_desc = NULL; 3109 3153 struct e1000_buffer *buffer_info; ··· 3168 3212 #define E1000_FIFO_HDR 0x10 3169 3213 #define E1000_82547_PAD_LEN 0x3E0 3170 3214 3171 - static int 3172 - e1000_82547_fifo_workaround(struct e1000_adapter *adapter, struct sk_buff *skb) 3215 + static int e1000_82547_fifo_workaround(struct e1000_adapter *adapter, 3216 + struct sk_buff *skb) 3173 3217 { 3174 3218 u32 fifo_space = adapter->tx_fifo_size - adapter->tx_fifo_head; 3175 3219 u32 skb_fifo_len = skb->len + E1000_FIFO_HDR; ··· 3195 3239 } 3196 3240 3197 3241 #define MINIMUM_DHCP_PACKET_SIZE 282 3198 - static int 3199 - e1000_transfer_dhcp_info(struct e1000_adapter *adapter, struct sk_buff *skb) 3242 + static int e1000_transfer_dhcp_info(struct e1000_adapter *adapter, 3243 + struct sk_buff *skb) 3200 3244 { 3201 3245 struct e1000_hw *hw = &adapter->hw; 3202 3246 u16 length, offset; ··· 3260 3304 } 3261 3305 3262 3306 #define TXD_USE_COUNT(S, X) (((S) >> (X)) + 1 ) 3263 - static int 3264 - e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) 3307 + static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) 3265 3308 { 3266 3309 struct e1000_adapter *adapter = netdev_priv(netdev); 3267 3310 struct e1000_tx_ring *tx_ring; ··· 3437 3482 * @netdev: network interface device structure 3438 3483 **/ 3439 3484 3440 - static void 3441 - e1000_tx_timeout(struct net_device *netdev) 3485 + static void e1000_tx_timeout(struct net_device *netdev) 3442 3486 { 3443 3487 struct e1000_adapter *adapter = netdev_priv(netdev); 3444 3488 ··· 3446 3492 schedule_work(&adapter->reset_task); 3447 3493 } 3448 3494 3449 - static void 3450 - e1000_reset_task(struct work_struct *work) 3495 + static void e1000_reset_task(struct work_struct *work) 3451 3496 { 3452 3497 struct e1000_adapter *adapter = 3453 3498 container_of(work, struct e1000_adapter, reset_task); ··· 3462 3509 * The statistics are actually updated from the timer callback. 3463 3510 **/ 3464 3511 3465 - static struct net_device_stats * 3466 - e1000_get_stats(struct net_device *netdev) 3512 + static struct net_device_stats *e1000_get_stats(struct net_device *netdev) 3467 3513 { 3468 3514 struct e1000_adapter *adapter = netdev_priv(netdev); 3469 3515 ··· 3478 3526 * Returns 0 on success, negative on failure 3479 3527 **/ 3480 3528 3481 - static int 3482 - e1000_change_mtu(struct net_device *netdev, int new_mtu) 3529 + static int e1000_change_mtu(struct net_device *netdev, int new_mtu) 3483 3530 { 3484 3531 struct e1000_adapter *adapter = netdev_priv(netdev); 3485 3532 int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE; ··· 3571 3620 * @adapter: board private structure 3572 3621 **/ 3573 3622 3574 - void 3575 - e1000_update_stats(struct e1000_adapter *adapter) 3623 + void e1000_update_stats(struct e1000_adapter *adapter) 3576 3624 { 3577 3625 struct e1000_hw *hw = &adapter->hw; 3578 3626 struct pci_dev *pdev = adapter->pdev; ··· 3744 3794 * @data: pointer to a network interface device structure 3745 3795 **/ 3746 3796 3747 - static irqreturn_t 3748 - e1000_intr_msi(int irq, void *data) 3797 + static irqreturn_t e1000_intr_msi(int irq, void *data) 3749 3798 { 3750 3799 struct net_device *netdev = data; 3751 3800 struct e1000_adapter *adapter = netdev_priv(netdev); ··· 3805 3856 * @data: pointer to a network interface device structure 3806 3857 **/ 3807 3858 3808 - static irqreturn_t 3809 - e1000_intr(int irq, void *data) 3859 + static irqreturn_t e1000_intr(int irq, void *data) 3810 3860 { 3811 3861 struct net_device *netdev = data; 3812 3862 struct e1000_adapter *adapter = netdev_priv(netdev); ··· 3902 3954 * @adapter: board private structure 3903 3955 **/ 3904 3956 3905 - static int 3906 - e1000_clean(struct napi_struct *napi, int budget) 3957 + static int e1000_clean(struct napi_struct *napi, int budget) 3907 3958 { 3908 3959 struct e1000_adapter *adapter = container_of(napi, struct e1000_adapter, napi); 3909 3960 struct net_device *poll_dev = adapter->netdev; ··· 3944 3997 * @adapter: board private structure 3945 3998 **/ 3946 3999 3947 - static bool 3948 - e1000_clean_tx_irq(struct e1000_adapter *adapter, 3949 - struct e1000_tx_ring *tx_ring) 4000 + static bool e1000_clean_tx_irq(struct e1000_adapter *adapter, 4001 + struct e1000_tx_ring *tx_ring) 3950 4002 { 3951 4003 struct net_device *netdev = adapter->netdev; 3952 4004 struct e1000_tx_desc *tx_desc, *eop_desc; ··· 4057 4111 * @sk_buff: socket buffer with received data 4058 4112 **/ 4059 4113 4060 - static void 4061 - e1000_rx_checksum(struct e1000_adapter *adapter, 4062 - u32 status_err, u32 csum, 4063 - struct sk_buff *skb) 4114 + static void e1000_rx_checksum(struct e1000_adapter *adapter, u32 status_err, 4115 + u32 csum, struct sk_buff *skb) 4064 4116 { 4065 4117 u16 status = (u16)status_err; 4066 4118 u8 errors = (u8)(status_err >> 24); ··· 4102 4158 * e1000_clean_rx_irq - Send received data up the network stack; legacy 4103 4159 * @adapter: board private structure 4104 4160 **/ 4105 - 4106 - static bool 4107 4161 #ifdef CONFIG_E1000_NAPI 4108 - e1000_clean_rx_irq(struct e1000_adapter *adapter, 4109 - struct e1000_rx_ring *rx_ring, 4110 - int *work_done, int work_to_do) 4162 + static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, 4163 + struct e1000_rx_ring *rx_ring, 4164 + int *work_done, int work_to_do) 4111 4165 #else 4112 - e1000_clean_rx_irq(struct e1000_adapter *adapter, 4113 - struct e1000_rx_ring *rx_ring) 4166 + static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, 4167 + struct e1000_rx_ring *rx_ring) 4114 4168 #endif 4115 4169 { 4116 4170 struct net_device *netdev = adapter->netdev; ··· 4272 4330 * @adapter: board private structure 4273 4331 **/ 4274 4332 4275 - static bool 4276 4333 #ifdef CONFIG_E1000_NAPI 4277 - e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, 4278 - struct e1000_rx_ring *rx_ring, 4279 - int *work_done, int work_to_do) 4334 + static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, 4335 + struct e1000_rx_ring *rx_ring, 4336 + int *work_done, int work_to_do) 4280 4337 #else 4281 - e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, 4282 - struct e1000_rx_ring *rx_ring) 4338 + static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, 4339 + struct e1000_rx_ring *rx_ring) 4283 4340 #endif 4284 4341 { 4285 4342 union e1000_rx_desc_packet_split *rx_desc, *next_rxd; ··· 4458 4517 * @adapter: address of board private structure 4459 4518 **/ 4460 4519 4461 - static void 4462 - e1000_alloc_rx_buffers(struct e1000_adapter *adapter, 4463 - struct e1000_rx_ring *rx_ring, 4464 - int cleaned_count) 4520 + static void e1000_alloc_rx_buffers(struct e1000_adapter *adapter, 4521 + struct e1000_rx_ring *rx_ring, 4522 + int cleaned_count) 4465 4523 { 4466 4524 struct net_device *netdev = adapter->netdev; 4467 4525 struct pci_dev *pdev = adapter->pdev; ··· 4568 4628 * @adapter: address of board private structure 4569 4629 **/ 4570 4630 4571 - static void 4572 - e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, 4573 - struct e1000_rx_ring *rx_ring, 4574 - int cleaned_count) 4631 + static void e1000_alloc_rx_buffers_ps(struct e1000_adapter *adapter, 4632 + struct e1000_rx_ring *rx_ring, 4633 + int cleaned_count) 4575 4634 { 4576 4635 struct net_device *netdev = adapter->netdev; 4577 4636 struct pci_dev *pdev = adapter->pdev; ··· 4665 4726 * @adapter: 4666 4727 **/ 4667 4728 4668 - static void 4669 - e1000_smartspeed(struct e1000_adapter *adapter) 4729 + static void e1000_smartspeed(struct e1000_adapter *adapter) 4670 4730 { 4671 4731 u16 phy_status; 4672 4732 u16 phy_ctrl; ··· 4721 4783 * @cmd: 4722 4784 **/ 4723 4785 4724 - static int 4725 - e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) 4786 + static int e1000_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) 4726 4787 { 4727 4788 switch (cmd) { 4728 4789 case SIOCGMIIPHY: ··· 4740 4803 * @cmd: 4741 4804 **/ 4742 4805 4743 - static int 4744 - e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) 4806 + static int e1000_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, 4807 + int cmd) 4745 4808 { 4746 4809 struct e1000_adapter *adapter = netdev_priv(netdev); 4747 4810 struct mii_ioctl_data *data = if_mii(ifr); ··· 4834 4897 return E1000_SUCCESS; 4835 4898 } 4836 4899 4837 - void 4838 - e1000_pci_set_mwi(struct e1000_hw *hw) 4900 + void e1000_pci_set_mwi(struct e1000_hw *hw) 4839 4901 { 4840 4902 struct e1000_adapter *adapter = hw->back; 4841 4903 int ret_val = pci_set_mwi(adapter->pdev); ··· 4843 4907 DPRINTK(PROBE, ERR, "Error in setting MWI\n"); 4844 4908 } 4845 4909 4846 - void 4847 - e1000_pci_clear_mwi(struct e1000_hw *hw) 4910 + void e1000_pci_clear_mwi(struct e1000_hw *hw) 4848 4911 { 4849 4912 struct e1000_adapter *adapter = hw->back; 4850 4913 4851 4914 pci_clear_mwi(adapter->pdev); 4852 4915 } 4853 4916 4854 - int 4855 - e1000_pcix_get_mmrbc(struct e1000_hw *hw) 4917 + int e1000_pcix_get_mmrbc(struct e1000_hw *hw) 4856 4918 { 4857 4919 struct e1000_adapter *adapter = hw->back; 4858 4920 return pcix_get_mmrbc(adapter->pdev); 4859 4921 } 4860 4922 4861 - void 4862 - e1000_pcix_set_mmrbc(struct e1000_hw *hw, int mmrbc) 4923 + void e1000_pcix_set_mmrbc(struct e1000_hw *hw, int mmrbc) 4863 4924 { 4864 4925 struct e1000_adapter *adapter = hw->back; 4865 4926 pcix_set_mmrbc(adapter->pdev, mmrbc); 4866 4927 } 4867 4928 4868 - s32 4869 - e1000_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value) 4929 + s32 e1000_read_pcie_cap_reg(struct e1000_hw *hw, u32 reg, u16 *value) 4870 4930 { 4871 4931 struct e1000_adapter *adapter = hw->back; 4872 4932 u16 cap_offset; ··· 4876 4944 return E1000_SUCCESS; 4877 4945 } 4878 4946 4879 - void 4880 - e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value) 4947 + void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value) 4881 4948 { 4882 4949 outl(value, port); 4883 4950 } 4884 4951 4885 - static void 4886 - e1000_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) 4952 + static void e1000_vlan_rx_register(struct net_device *netdev, 4953 + struct vlan_group *grp) 4887 4954 { 4888 4955 struct e1000_adapter *adapter = netdev_priv(netdev); 4889 4956 u32 ctrl, rctl; ··· 4924 4993 e1000_irq_enable(adapter); 4925 4994 } 4926 4995 4927 - static void 4928 - e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid) 4996 + static void e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid) 4929 4997 { 4930 4998 struct e1000_adapter *adapter = netdev_priv(netdev); 4931 4999 u32 vfta, index; ··· 4940 5010 e1000_write_vfta(&adapter->hw, index, vfta); 4941 5011 } 4942 5012 4943 - static void 4944 - e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) 5013 + static void e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) 4945 5014 { 4946 5015 struct e1000_adapter *adapter = netdev_priv(netdev); 4947 5016 u32 vfta, index; ··· 4966 5037 e1000_write_vfta(&adapter->hw, index, vfta); 4967 5038 } 4968 5039 4969 - static void 4970 - e1000_restore_vlan(struct e1000_adapter *adapter) 5040 + static void e1000_restore_vlan(struct e1000_adapter *adapter) 4971 5041 { 4972 5042 e1000_vlan_rx_register(adapter->netdev, adapter->vlgrp); 4973 5043 ··· 4980 5052 } 4981 5053 } 4982 5054 4983 - int 4984 - e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx) 5055 + int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx) 4985 5056 { 4986 5057 adapter->hw.autoneg = 0; 4987 5058 ··· 5016 5089 return 0; 5017 5090 } 5018 5091 5019 - static int 5020 - e1000_suspend(struct pci_dev *pdev, pm_message_t state) 5092 + static int e1000_suspend(struct pci_dev *pdev, pm_message_t state) 5021 5093 { 5022 5094 struct net_device *netdev = pci_get_drvdata(pdev); 5023 5095 struct e1000_adapter *adapter = netdev_priv(netdev); ··· 5113 5187 } 5114 5188 5115 5189 #ifdef CONFIG_PM 5116 - static int 5117 - e1000_resume(struct pci_dev *pdev) 5190 + static int e1000_resume(struct pci_dev *pdev) 5118 5191 { 5119 5192 struct net_device *netdev = pci_get_drvdata(pdev); 5120 5193 struct e1000_adapter *adapter = netdev_priv(netdev); ··· 5167 5242 * without having to re-enable interrupts. It's not called while 5168 5243 * the interrupt routine is executing. 5169 5244 */ 5170 - static void 5171 - e1000_netpoll(struct net_device *netdev) 5245 + static void e1000_netpoll(struct net_device *netdev) 5172 5246 { 5173 5247 struct e1000_adapter *adapter = netdev_priv(netdev); 5174 5248 ··· 5188 5264 * This function is called after a PCI bus error affecting 5189 5265 * this device has been detected. 5190 5266 */ 5191 - static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) 5267 + static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, 5268 + pci_channel_state_t state) 5192 5269 { 5193 5270 struct net_device *netdev = pci_get_drvdata(pdev); 5194 5271 struct e1000_adapter *adapter = netdev->priv;
+6 -10
drivers/net/e1000/e1000_param.c
··· 213 213 } arg; 214 214 }; 215 215 216 - static int __devinit 217 - e1000_validate_option(unsigned int *value, 218 - const struct e1000_option *opt, 219 - struct e1000_adapter *adapter) 216 + static int __devinit e1000_validate_option(unsigned int *value, 217 + const struct e1000_option *opt, 218 + struct e1000_adapter *adapter) 220 219 { 221 220 if (*value == OPTION_UNSET) { 222 221 *value = opt->def; ··· 277 278 * in a variable in the adapter structure. 278 279 **/ 279 280 280 - void __devinit 281 - e1000_check_options(struct e1000_adapter *adapter) 281 + void __devinit e1000_check_options(struct e1000_adapter *adapter) 282 282 { 283 283 int bd = adapter->bd_number; 284 284 if (bd >= E1000_MAX_NIC) { ··· 549 551 * Handles speed and duplex options on fiber adapters 550 552 **/ 551 553 552 - static void __devinit 553 - e1000_check_fiber_options(struct e1000_adapter *adapter) 554 + static void __devinit e1000_check_fiber_options(struct e1000_adapter *adapter) 554 555 { 555 556 int bd = adapter->bd_number; 556 557 if (num_Speed > bd) { ··· 576 579 * Handles speed and duplex options on copper adapters 577 580 **/ 578 581 579 - static void __devinit 580 - e1000_check_copper_options(struct e1000_adapter *adapter) 582 + static void __devinit e1000_check_copper_options(struct e1000_adapter *adapter) 581 583 { 582 584 unsigned int speed, dplx, an; 583 585 int bd = adapter->bd_number;