• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/e1000/

Lines Matching refs:hw

221 struct net_device *e1000_get_hw_dev(struct e1000_hw *hw)
223 struct e1000_adapter *adapter = hw->back;
298 struct e1000_hw *hw = &adapter->hw;
312 struct e1000_hw *hw = &adapter->hw;
320 struct e1000_hw *hw = &adapter->hw;
322 u16 vid = hw->mng_cookie.vlan_id;
326 if (hw->mng_cookie.status &
344 struct e1000_hw *hw = &adapter->hw;
358 struct e1000_hw *hw = &adapter->hw;
399 struct e1000_hw *hw = &adapter->hw;
429 struct e1000_hw *hw = &adapter->hw;
433 if (hw->media_type == e1000_media_type_copper) {
436 e1000_read_phy_reg(hw, PHY_CTRL, &mii_reg);
438 e1000_write_phy_reg(hw, PHY_CTRL, mii_reg);
444 struct e1000_hw *hw = &adapter->hw;
451 if (!adapter->wol && hw->mac_type >= e1000_82540 &&
452 hw->media_type == e1000_media_type_copper) {
455 switch (hw->mac_type) {
471 e1000_read_phy_reg(hw, PHY_CTRL, &mii_reg);
473 e1000_write_phy_reg(hw, PHY_CTRL, mii_reg);
482 struct e1000_hw *hw = &adapter->hw;
538 struct e1000_hw *hw = &adapter->hw;
547 switch (hw->mac_type) {
575 if (hw->max_frame_size > E1000_RXBUFFER_8192)
578 if (hw->mac_type == e1000_82547) {
585 } else if (hw->max_frame_size > ETH_FRAME_LEN + ETH_FCS_LEN) {
604 min_tx_space = (hw->max_frame_size +
610 min_rx_space = hw->max_frame_size;
622 switch (hw->mac_type) {
650 ((pba << 10) - hw->max_frame_size));
652 hw->fc_high_water = hwm & 0xFFF8; /* 8-byte granularity */
653 hw->fc_low_water = hw->fc_high_water - 8;
654 hw->fc_pause_time = E1000_FC_PAUSE_TIME;
655 hw->fc_send_xon = 1;
656 hw->fc = hw->original_fc;
659 e1000_reset_hw(hw);
660 if (hw->mac_type >= e1000_82544)
663 if (e1000_init_hw(hw))
668 if (hw->mac_type >= e1000_82544 &&
669 hw->autoneg == 1 &&
670 hw->autoneg_advertised == ADVERTISE_1000_FULL) {
682 e1000_reset_adaptive(hw);
683 e1000_phy_get_info(hw, &adapter->phy_info);
812 struct e1000_hw *hw;
873 hw = &adapter->hw;
874 hw->back = adapter;
877 hw->hw_addr = pci_ioremap_bar(pdev, BAR_0);
878 if (!hw->hw_addr)
886 hw->io_base = pci_resource_start(pdev, i);
909 if (hw->mac_type >= e1000_82543) {
917 if ((hw->mac_type >= e1000_82544) &&
918 (hw->mac_type != e1000_82547))
928 adapter->en_mng_pt = e1000_enable_mng_pass_thru(hw);
931 if (e1000_init_eeprom_params(hw)) {
939 e1000_reset_hw(hw);
942 if (e1000_validate_eeprom_checksum(hw) < 0) {
950 * interface after manually setting a hw addr using
953 memset(hw->mac_addr, 0, netdev->addr_len);
956 if (e1000_read_mac_addr(hw))
960 memcpy(netdev->dev_addr, hw->mac_addr, netdev->addr_len);
961 memcpy(netdev->perm_addr, hw->mac_addr, netdev->addr_len);
966 e1000_get_bus_info(hw);
989 switch (hw->mac_type) {
995 e1000_read_eeprom(hw,
1002 e1000_read_eeprom(hw,
1008 e1000_read_eeprom(hw,
1055 ((hw->bus_type == e1000_bus_type_pcix) ? "-X" : ""),
1056 ((hw->bus_speed == e1000_bus_speed_133) ? 133 :
1057 (hw->bus_speed == e1000_bus_speed_120) ? 120 :
1058 (hw->bus_speed == e1000_bus_speed_100) ? 100 :
1059 (hw->bus_speed == e1000_bus_speed_66) ? 66 : 33),
1060 ((hw->bus_width == e1000_bus_width_64) ? 64 : 32),
1073 e1000_phy_hw_reset(hw);
1075 if (hw->flash_address)
1076 iounmap(hw->flash_address);
1080 iounmap(hw->hw_addr);
1105 struct e1000_hw *hw = &adapter->hw;
1118 e1000_phy_hw_reset(hw);
1123 iounmap(hw->hw_addr);
1124 if (hw->flash_address)
1125 iounmap(hw->flash_address);
1144 struct e1000_hw *hw = &adapter->hw;
1150 hw->vendor_id = pdev->vendor;
1151 hw->device_id = pdev->device;
1152 hw->subsystem_vendor_id = pdev->subsystem_vendor;
1153 hw->subsystem_id = pdev->subsystem_device;
1154 hw->revision_id = pdev->revision;
1156 pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word);
1159 hw->max_frame_size = netdev->mtu +
1161 hw->min_frame_size = MINIMUM_ETHERNET_FRAME_SIZE;
1165 if (e1000_set_mac_type(hw)) {
1170 switch (hw->mac_type) {
1177 hw->phy_init_script = 1;
1181 e1000_set_media_type(hw);
1183 hw->wait_autoneg_complete = false;
1184 hw->tbi_compatibility_en = true;
1185 hw->adaptive_ifs = true;
1189 if (hw->media_type == e1000_media_type_copper) {
1190 hw->mdix = AUTO_ALL_MODES;
1191 hw->disable_polarity_correction = false;
1192 hw->master_slave = E1000_MASTER_SLAVE;
1254 struct e1000_hw *hw = &adapter->hw;
1276 if ((hw->mng_cookie.status &
1331 struct e1000_hw *hw = &adapter->hw;
1343 if ((hw->mng_cookie.status &
1362 struct e1000_hw *hw = &adapter->hw;
1368 if (hw->mac_type == e1000_82545 ||
1369 hw->mac_type == e1000_82546) {
1490 struct e1000_hw *hw = &adapter->hw;
1507 adapter->tx_ring[0].tdh = ((hw->mac_type >= e1000_82543) ? E1000_TDH : E1000_82542_TDH);
1508 adapter->tx_ring[0].tdt = ((hw->mac_type >= e1000_82543) ? E1000_TDT : E1000_82542_TDT);
1513 if ((hw->media_type == e1000_media_type_fiber ||
1514 hw->media_type == e1000_media_type_internal_serdes))
1519 switch (hw->mac_type) {
1538 if (hw->mac_type >= e1000_82540)
1548 e1000_config_collision_dist(hw);
1557 if (hw->mac_type < e1000_82543)
1562 if (hw->mac_type == e1000_82544 &&
1563 hw->bus_type == e1000_bus_type_pcix)
1685 struct e1000_hw *hw = &adapter->hw;
1694 (hw->mc_filter_type << E1000_RCTL_MO_SHIFT);
1696 if (hw->tbi_compatibility_on == 1)
1739 struct e1000_hw *hw = &adapter->hw;
1761 if (hw->mac_type >= e1000_82540) {
1778 adapter->rx_ring[0].rdh = ((hw->mac_type >= e1000_82543) ? E1000_RDH : E1000_82542_RDH);
1779 adapter->rx_ring[0].rdt = ((hw->mac_type >= e1000_82543) ? E1000_RDT : E1000_82542_RDT);
1784 if (hw->mac_type >= e1000_82543) {
1867 struct e1000_hw *hw = &adapter->hw;
1890 writel(0, hw->hw_addr + tx_ring->tdh);
1891 writel(0, hw->hw_addr + tx_ring->tdt);
1955 struct e1000_hw *hw = &adapter->hw;
2002 writel(0, hw->hw_addr + rx_ring->rdh);
2003 writel(0, hw->hw_addr + rx_ring->rdt);
2024 struct e1000_hw *hw = &adapter->hw;
2028 e1000_pci_clear_mwi(hw);
2042 struct e1000_hw *hw = &adapter->hw;
2052 if (hw->pci_cmd_word & PCI_COMMAND_INVALIDATE)
2053 e1000_pci_set_mwi(hw);
2074 struct e1000_hw *hw = &adapter->hw;
2082 if (hw->mac_type == e1000_82542_rev2_0)
2086 memcpy(hw->mac_addr, addr->sa_data, netdev->addr_len);
2088 e1000_rar_set(hw, hw->mac_addr, 0);
2090 if (hw->mac_type == e1000_82542_rev2_0)
2109 struct e1000_hw *hw = &adapter->hw;
2151 if (hw->mac_type == e1000_82542_rev2_0)
2166 e1000_rar_set(hw, ha->addr, i++);
2173 hash_value = e1000_hash_mc_addr(hw, ha->addr);
2179 e1000_rar_set(hw, ha->addr, i++);
2184 E1000_WRITE_REG_ARRAY(hw, RA, i << 1, 0);
2186 E1000_WRITE_REG_ARRAY(hw, RA, (i << 1) + 1, 0);
2199 E1000_WRITE_REG_ARRAY(hw, MTA, i, mcarray[i]);
2203 if (hw->mac_type == e1000_82542_rev2_0)
2215 struct e1000_hw *hw = &adapter->hw;
2216 e1000_phy_get_info(hw, &adapter->phy_info);
2227 struct e1000_hw *hw = &adapter->hw;
2255 struct e1000_hw *hw = &adapter->hw;
2263 switch (hw->media_type) {
2265 if (hw->get_link_status) {
2266 e1000_check_for_link(hw);
2267 link_active = !hw->get_link_status;
2273 e1000_check_for_link(hw);
2277 e1000_check_for_link(hw);
2278 link_active = hw->serdes_has_link;
2294 struct e1000_hw *hw = &adapter->hw;
2308 e1000_get_speed_and_duplex(hw,
2367 hw->tx_packet_delta = adapter->stats.tpt - adapter->tpt_old;
2369 hw->collision_delta = adapter->stats.colc - adapter->colc_old;
2377 e1000_update_adaptive(hw);
2393 if (hw->mac_type >= e1000_82540 && adapter->itr_setting == 4) {
2448 struct e1000_hw *hw = &adapter->hw;
2450 if (unlikely(hw->mac_type < e1000_82540))
2494 struct e1000_hw *hw = &adapter->hw;
2498 if (unlikely(hw->mac_type < e1000_82540))
2693 struct e1000_hw *hw = &adapter->hw;
2713 if (unlikely((hw->bus_type == e1000_bus_type_pcix) &&
2807 struct e1000_hw *hw = &adapter->hw;
2853 writel(i, hw->hw_addr + tx_ring->tdt);
2924 struct e1000_hw *hw = &adapter->hw;
2961 switch (hw->mac_type) {
2996 if (unlikely((hw->bus_type == e1000_bus_type_pcix) &&
3012 if (unlikely(hw->mac_type == e1000_82547)) {
3036 if (likely(hw->mac_type != e1000_82544))
3109 struct e1000_hw *hw = &adapter->hw;
3119 switch (hw->mac_type) {
3134 hw->max_frame_size = max_frame;
3155 if (!hw->tbi_compatibility_on &&
3182 struct e1000_hw *hw = &adapter->hw;
3259 hw->tx_packet_delta = er32(TPT);
3260 adapter->stats.tpt += hw->tx_packet_delta;
3261 hw->collision_delta = er32(COLC);
3262 adapter->stats.colc += hw->collision_delta;
3264 if (hw->mac_type >= e1000_82543) {
3297 if (hw->bad_tx_carr_stats_fd &&
3306 if (hw->media_type == e1000_media_type_copper) {
3308 (!e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_tmp))) {
3313 if ((hw->mac_type <= e1000_82546) &&
3314 (hw->phy_type == e1000_phy_m88) &&
3315 !e1000_read_phy_reg(hw, M88E1000_RX_ERR_CNTR, &phy_tmp))
3320 if (hw->has_smbus) {
3339 struct e1000_hw *hw = &adapter->hw;
3346 hw->get_link_status = 1;
3407 struct e1000_hw *hw = &adapter->hw;
3488 readl(hw->hw_addr + tx_ring->tdh),
3489 readl(hw->hw_addr + tx_ring->tdt),
3517 struct e1000_hw *hw = &adapter->hw;
3523 if (unlikely(hw->mac_type < e1000_82543)) return;
3589 struct e1000_hw *hw = &adapter->hw;
3636 if (TBI_ACCEPT(hw, status, rx_desc->errors, length,
3640 e1000_tbi_adjust_stats(hw, &adapter->stats,
3795 struct e1000_hw *hw = &adapter->hw;
3860 if (TBI_ACCEPT(hw, status, rx_desc->errors, length,
3863 e1000_tbi_adjust_stats(hw, &adapter->stats,
4027 writel(i, adapter->hw.hw_addr + rx_ring->rdt);
4040 struct e1000_hw *hw = &adapter->hw;
4143 writel(i, hw->hw_addr + rx_ring->rdt);
4150 struct e1000_hw *hw = &adapter->hw;
4154 if ((hw->phy_type != e1000_phy_igp) || !hw->autoneg ||
4155 !(hw->autoneg_advertised & ADVERTISE_1000_FULL))
4161 e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_status);
4163 e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_status);
4165 e1000_read_phy_reg(hw, PHY_1000T_CTRL, &phy_ctrl);
4168 e1000_write_phy_reg(hw, PHY_1000T_CTRL,
4171 if (!e1000_phy_setup_autoneg(hw) &&
4172 !e1000_read_phy_reg(hw, PHY_CTRL,
4176 e1000_write_phy_reg(hw, PHY_CTRL,
4183 e1000_read_phy_reg(hw, PHY_1000T_CTRL, &phy_ctrl);
4185 e1000_write_phy_reg(hw, PHY_1000T_CTRL, phy_ctrl);
4186 if (!e1000_phy_setup_autoneg(hw) &&
4187 !e1000_read_phy_reg(hw, PHY_CTRL, &phy_ctrl)) {
4190 e1000_write_phy_reg(hw, PHY_CTRL, phy_ctrl);
4228 struct e1000_hw *hw = &adapter->hw;
4235 if (hw->media_type != e1000_media_type_copper)
4240 data->phy_id = hw->phy_addr;
4244 if (e1000_read_phy_reg(hw, data->reg_num & 0x1F,
4256 if (e1000_write_phy_reg(hw, data->reg_num,
4262 if (hw->media_type == e1000_media_type_copper) {
4268 hw->autoneg = 1;
4269 hw->autoneg_advertised = 0x2F;
4292 if (e1000_phy_reset(hw))
4315 void e1000_pci_set_mwi(struct e1000_hw *hw)
4317 struct e1000_adapter *adapter = hw->back;
4324 void e1000_pci_clear_mwi(struct e1000_hw *hw)
4326 struct e1000_adapter *adapter = hw->back;
4331 int e1000_pcix_get_mmrbc(struct e1000_hw *hw)
4333 struct e1000_adapter *adapter = hw->back;
4337 void e1000_pcix_set_mmrbc(struct e1000_hw *hw, int mmrbc)
4339 struct e1000_adapter *adapter = hw->back;
4343 void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value)
4352 struct e1000_hw *hw = &adapter->hw;
4396 struct e1000_hw *hw = &adapter->hw;
4399 if ((hw->mng_cookie.status &
4405 vfta = E1000_READ_REG_ARRAY(hw, VFTA, index);
4407 e1000_write_vfta(hw, index, vfta);
4413 struct e1000_hw *hw = &adapter->hw;
4424 vfta = E1000_READ_REG_ARRAY(hw, VFTA, index);
4426 e1000_write_vfta(hw, index, vfta);
4445 struct e1000_hw *hw = &adapter->hw;
4447 hw->autoneg = 0;
4450 if ((hw->media_type == e1000_media_type_fiber) &&
4458 hw->forced_speed_duplex = e1000_10_half;
4461 hw->forced_speed_duplex = e1000_10_full;
4464 hw->forced_speed_duplex = e1000_100_half;
4467 hw->forced_speed_duplex = e1000_100_full;
4470 hw->autoneg = 1;
4471 hw->autoneg_advertised = ADVERTISE_1000_FULL;
4485 struct e1000_hw *hw = &adapter->hw;
4520 if (hw->mac_type >= e1000_82540) {
4531 if (hw->media_type == e1000_media_type_fiber ||
4532 hw->media_type == e1000_media_type_internal_serdes) {
4586 struct e1000_hw *hw = &adapter->hw;
4693 struct e1000_hw *hw = &adapter->hw;