Lines Matching +full:pcie +full:- +full:mac
1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved.
36 * 00-0B-6A-F6-00-DC in atl1e_hw_set_mac_addr()
40 value = (((u32)hw->mac_addr[2]) << 24) | in atl1e_hw_set_mac_addr()
41 (((u32)hw->mac_addr[3]) << 16) | in atl1e_hw_set_mac_addr()
42 (((u32)hw->mac_addr[4]) << 8) | in atl1e_hw_set_mac_addr()
43 (((u32)hw->mac_addr[5])) ; in atl1e_hw_set_mac_addr()
46 value = (((u32)hw->mac_addr[0]) << 8) | in atl1e_hw_set_mac_addr()
47 (((u32)hw->mac_addr[1])) ; in atl1e_hw_set_mac_addr()
53 * return 0 if get valid mac address,
62 if (is_valid_ether_addr(hw->perm_mac_addr)) in atl1e_get_permanent_address()
83 /* maybe MAC-address is from BIOS */ in atl1e_get_permanent_address()
90 memcpy(hw->perm_mac_addr, eth_addr, ETH_ALEN); in atl1e_get_permanent_address()
134 * Reads the adapter's MAC address from the EEPROM
136 * hw - Struct containing variables accessed by shared code
145 memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr)); in atl1e_read_mac_addr()
162 value |= (((crc32 >> i) & 1) << (31 - i)); in atl1e_hash_mc_addr()
169 * hw - Struct containing variables accessed by shared code
170 * hash_value - Multicast address hash value
178 * The HASH Table is a register array of 2 32-bit registers. in atl1e_hash_set()
197 * hw - Struct containing variables accessed by shared code
198 * reg_addr - address of the PHY register to read
230 * hw - Struct containing variables accessed by shared code
231 * reg_addr - address of the PHY register to write
232 * data - data to write to the PHY
263 * atl1e_init_pcie - init PCIE module
273 /* pcie flow control mode change */ in atl1e_init_pcie()
281 * hw - Struct containing variables accessed by shared code
289 if (0 != hw->mii_autoneg_adv_reg) in atl1e_phy_setup_autoneg_adv()
291 /* Read the MII Auto-Neg Advertisement Register (Address 4/9). */ in atl1e_phy_setup_autoneg_adv()
304 * First we clear all the 10/100 mb speed bits in the Auto-Neg in atl1e_phy_setup_autoneg_adv()
306 * the 1000Base-T control Register (Address 9). in atl1e_phy_setup_autoneg_adv()
315 switch (hw->media_type) { in atl1e_phy_setup_autoneg_adv()
318 hw->autoneg_advertised = ADVERTISE_ALL; in atl1e_phy_setup_autoneg_adv()
319 if (hw->nic_type == athr_l1e) { in atl1e_phy_setup_autoneg_adv()
321 hw->autoneg_advertised |= ADVERTISE_1000_FULL; in atl1e_phy_setup_autoneg_adv()
327 hw->autoneg_advertised = ADVERTISE_100_FULL; in atl1e_phy_setup_autoneg_adv()
332 hw->autoneg_advertised = ADVERTISE_100_HALF; in atl1e_phy_setup_autoneg_adv()
337 hw->autoneg_advertised = ADVERTISE_10_FULL; in atl1e_phy_setup_autoneg_adv()
342 hw->autoneg_advertised = ADVERTISE_10_HALF; in atl1e_phy_setup_autoneg_adv()
349 hw->mii_autoneg_adv_reg = mii_autoneg_adv_reg; in atl1e_phy_setup_autoneg_adv()
350 hw->mii_1000t_ctrl_reg = mii_1000t_ctrl_reg; in atl1e_phy_setup_autoneg_adv()
356 if (hw->nic_type == athr_l1e || hw->nic_type == athr_l2e_revA) { in atl1e_phy_setup_autoneg_adv()
370 * hw - Struct containing variables accessed by shared code
376 struct atl1e_adapter *adapter = hw->adapter; in atl1e_phy_commit()
387 * pcie serdes link may be down ! in atl1e_phy_commit()
397 netdev_err(adapter->netdev, in atl1e_phy_commit()
398 "pcie linkdown at least for 25ms\n"); in atl1e_phy_commit()
402 netdev_err(adapter->netdev, "pcie linkup after %d ms\n", i); in atl1e_phy_commit()
409 struct atl1e_adapter *adapter = hw->adapter; in atl1e_phy_init()
413 if (hw->phy_configured) { in atl1e_phy_init()
414 if (hw->re_autoneg) { in atl1e_phy_init()
415 hw->re_autoneg = false; in atl1e_phy_init()
442 /* phy_val = hw->emi_ca ? 0x02ef : 0x02df; */ in atl1e_phy_init()
473 netdev_err(adapter->netdev, in atl1e_phy_init()
480 netdev_err(adapter->netdev, in atl1e_phy_init()
481 "Error Setting up Auto-Negotiation\n"); in atl1e_phy_init()
484 /* SW.Reset & En-Auto-Neg to restart Auto-Neg*/ in atl1e_phy_init()
485 netdev_dbg(adapter->netdev, "Restarting Auto-Negotiation\n"); in atl1e_phy_init()
488 netdev_err(adapter->netdev, "Error resetting the phy\n"); in atl1e_phy_init()
492 hw->phy_configured = true; in atl1e_phy_init()
499 * hw - Struct containing variables accessed by shared code
504 struct atl1e_adapter *adapter = hw->adapter; in atl1e_reset_hw()
505 struct pci_dev *pdev = adapter->pdev; in atl1e_reset_hw()
522 * Issue Soft Reset to the MAC. This will reset the chip's in atl1e_reset_hw()
524 * the current PCI configuration. The global reset bit is self- in atl1e_reset_hw()
542 netdev_err(adapter->netdev, in atl1e_reset_hw()
543 "MAC state machine can't be idle since disabled for 10ms second\n"); in atl1e_reset_hw()
554 * hw - Struct containing variables accessed by shared code
556 * post-reset uninitialized state. Initializes multicast table,
579 * hw - Struct containing variables accessed by shared code
580 * speed - Speed of the connection
581 * duplex - Duplex setting of the connection
622 err = atl1e_write_phy_reg(hw, MII_ADVERTISE, hw->mii_autoneg_adv_reg); in atl1e_restart_autoneg()
626 if (hw->nic_type == athr_l1e || hw->nic_type == athr_l2e_revA) { in atl1e_restart_autoneg()
628 hw->mii_1000t_ctrl_reg); in atl1e_restart_autoneg()