Lines Matching +full:auto +full:- +full:detects
1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved.
37 * 00-0B-6A-F6-00-DC in atl1c_hw_set_mac_addr()
78 /* MAC-address from BIOS is the 1st priority */ in atl1c_get_permanent_address()
79 if (atl1c_read_current_addr(hw, hw->perm_mac_addr)) in atl1c_get_permanent_address()
85 if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c) { in atl1c_get_permanent_address()
95 if (hw->nic_type == athr_l2c_b || hw->nic_type == athr_l2c_b2) { in atl1c_get_permanent_address()
116 return -1; in atl1c_get_permanent_address()
119 if ((hw->nic_type == athr_l1c || hw->nic_type == athr_l2c)) { in atl1c_get_permanent_address()
134 if (atl1c_read_current_addr(hw, hw->perm_mac_addr)) in atl1c_get_permanent_address()
137 return -1; in atl1c_get_permanent_address()
181 * hw - Struct containing variables accessed by shared code
189 eth_random_addr(hw->perm_mac_addr); in atl1c_read_mac_addr()
191 memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr)); in atl1c_read_mac_addr()
211 value |= (((crc32 >> i) & 1) << (31 - i)); in atl1c_hash_mc_addr()
218 * hw - Struct containing variables accessed by shared code
219 * hash_value - Multicast address hash value
227 * The HASH Table is a register array of 2 32-bit registers. in atl1c_hash_set()
267 if (!(hw->ctrl_flags & ATL1C_FPGA_VERSION)) in atl1c_stop_phy_polling()
278 if (!(hw->ctrl_flags & ATL1C_FPGA_VERSION)) in atl1c_start_phy_polling()
313 if ((hw->nic_type == athr_l2c_b2 || hw->nic_type == athr_l1d_2) && in atl1c_read_phy_core()
314 hw->hibernate) in atl1c_read_phy_core()
334 return -1; in atl1c_read_phy_core()
361 if ((hw->nic_type == athr_l2c_b2 || hw->nic_type == athr_l1d_2) && in atl1c_write_phy_core()
362 hw->hibernate) in atl1c_write_phy_core()
383 return -1; in atl1c_write_phy_core()
392 * hw - Struct containing variables accessed by shared code
393 * reg_addr - address of the PHY register to read
402 * hw - Struct containing variables accessed by shared code
403 * reg_addr - address of the PHY register to write
404 * data - data to write to the PHY
454 * hw - Struct containing variables accessed by shared code
462 if (hw->autoneg_advertised & ADVERTISED_10baseT_Half) in atl1c_phy_setup_adv()
464 if (hw->autoneg_advertised & ADVERTISED_10baseT_Full) in atl1c_phy_setup_adv()
466 if (hw->autoneg_advertised & ADVERTISED_100baseT_Half) in atl1c_phy_setup_adv()
468 if (hw->autoneg_advertised & ADVERTISED_100baseT_Full) in atl1c_phy_setup_adv()
471 if (hw->autoneg_advertised & ADVERTISED_Autoneg) in atl1c_phy_setup_adv()
475 if (hw->link_cap_flags & ATL1C_LINK_CAP_1000M) { in atl1c_phy_setup_adv()
476 if (hw->autoneg_advertised & ADVERTISED_1000baseT_Half) in atl1c_phy_setup_adv()
478 if (hw->autoneg_advertised & ADVERTISED_1000baseT_Full) in atl1c_phy_setup_adv()
480 if (hw->autoneg_advertised & ADVERTISED_Autoneg) in atl1c_phy_setup_adv()
487 return -1; in atl1c_phy_setup_adv()
499 struct atl1c_adapter *adapter = hw->adapter; in atl1c_phy_reset()
500 struct pci_dev *pdev = adapter->pdev; in atl1c_phy_reset()
510 if (!(hw->ctrl_flags & ATL1C_HIB_DISABLE)) in atl1c_phy_reset()
522 if (hw->nic_type == athr_l2c_b) { in atl1c_phy_reset()
528 /* tx-half amplitude issue fix */ in atl1c_phy_reset()
529 if (hw->nic_type == athr_l2c_b || hw->nic_type == athr_l2c_b2) { in atl1c_phy_reset()
536 if (!(hw->ctrl_flags & ATL1C_HIB_DISABLE)) { in atl1c_phy_reset()
537 if (hw->nic_type == athr_l2c_b || hw->nic_type == athr_l2c_b2) { in atl1c_phy_reset()
544 hw->nic_type == athr_l1d || hw->nic_type == athr_l1d_2 ? in atl1c_phy_reset()
561 if (hw->nic_type == athr_l1d || hw->nic_type == athr_l1d_2 || in atl1c_phy_reset()
562 hw->nic_type == athr_l2c_b2) { in atl1c_phy_reset()
574 /* UNH-IOL test issue, set bit7 */ in atl1c_phy_reset()
583 dev_err(&pdev->dev, in atl1c_phy_reset()
592 struct atl1c_adapter *adapter = hw->adapter; in atl1c_phy_init()
593 struct pci_dev *pdev = adapter->pdev; in atl1c_phy_init()
597 if (hw->nic_type == athr_mt) { in atl1c_phy_init()
598 hw->phy_configured = true; in atl1c_phy_init()
602 if ((atl1c_read_phy_reg(hw, MII_PHYSID1, &hw->phy_id1) != 0) || in atl1c_phy_init()
603 (atl1c_read_phy_reg(hw, MII_PHYSID2, &hw->phy_id2) != 0)) { in atl1c_phy_init()
604 dev_err(&pdev->dev, "Error get phy ID\n"); in atl1c_phy_init()
605 return -1; in atl1c_phy_init()
607 switch (hw->media_type) { in atl1c_phy_init()
612 dev_err(&pdev->dev, in atl1c_phy_init()
613 "Error Setting up Auto-Negotiation\n"); in atl1c_phy_init()
631 dev_err(&pdev->dev, "Wrong Media type %d\n", in atl1c_phy_init()
632 hw->media_type); in atl1c_phy_init()
633 return -1; in atl1c_phy_init()
639 hw->phy_configured = true; in atl1c_phy_init()
648 if (hw->nic_type == athr_mt) { in atl1c_get_link_status()
662 * Detects the current speed and duplex settings of the hardware.
664 * hw - Struct containing variables accessed by shared code
665 * speed - Speed of the connection
666 * duplex - Duplex setting of the connection
673 if (hw->nic_type == athr_mt) { in atl1c_get_speed_and_duplex()
688 return -1; in atl1c_get_speed_and_duplex()
701 return -1; in atl1c_get_speed_and_duplex()
715 struct atl1c_adapter *adapter = hw->adapter; in atl1c_phy_to_ps_link()
716 struct pci_dev *pdev = adapter->pdev; in atl1c_phy_to_ps_link()
736 save_autoneg_advertised = hw->autoneg_advertised; in atl1c_phy_to_ps_link()
737 hw->phy_configured = false; in atl1c_phy_to_ps_link()
738 hw->autoneg_advertised = autoneg_advertised; in atl1c_phy_to_ps_link()
740 dev_dbg(&pdev->dev, "phy autoneg failed\n"); in atl1c_phy_to_ps_link()
741 ret = -1; in atl1c_phy_to_ps_link()
743 hw->autoneg_advertised = save_autoneg_advertised; in atl1c_phy_to_ps_link()
751 dev_dbg(&pdev->dev, in atl1c_phy_to_ps_link()
761 adapter->link_speed = speed; in atl1c_phy_to_ps_link()
762 adapter->link_duplex = duplex; in atl1c_phy_to_ps_link()
782 struct atl1c_adapter *adapter = hw->adapter; in atl1c_power_saving()
783 struct pci_dev *pdev = adapter->pdev; in atl1c_power_saving()
789 speed = adapter->link_speed == SPEED_1000 ? in atl1c_power_saving()
799 if (adapter->link_duplex == FULL_DUPLEX) in atl1c_power_saving()
811 hw->phy_configured = false; /* re-init PHY when resume */ in atl1c_power_saving()
818 if (hw->nic_type == athr_l2c_b && hw->revision_id == L2CB_V11) in atl1c_power_saving()
824 dev_dbg(&pdev->dev, "%s: write phy MII_IER failed.\n", in atl1c_power_saving()
831 dev_dbg(&pdev->dev, "%s: suspend MAC=%x,MASTER=%x,PHY=0x%x,WOL=%x\n", in atl1c_power_saving()
848 if (hw->nic_type == athr_l2c_b || hw->nic_type == athr_l2c_b2 || in atl1c_post_phy_linkchg()
849 hw->nic_type == athr_l1d || hw->nic_type == athr_l1d_2) in atl1c_post_phy_linkchg()
853 /* az with brcm, half-amp */ in atl1c_post_phy_linkchg()
854 if (hw->nic_type == athr_l1d_2) { in atl1c_post_phy_linkchg()
863 if (adj_thresh && link_speed == SPEED_100 && hw->msi_lnkpatch) { in atl1c_post_phy_linkchg()
869 if (adj_thresh && hw->msi_lnkpatch) { in atl1c_post_phy_linkchg()