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 ((atl1c_read_phy_reg(hw, MII_PHYSID1, &hw->phy_id1) != 0) || in atl1c_phy_init()
598 (atl1c_read_phy_reg(hw, MII_PHYSID2, &hw->phy_id2) != 0)) { in atl1c_phy_init()
599 dev_err(&pdev->dev, "Error get phy ID\n"); in atl1c_phy_init()
600 return -1; in atl1c_phy_init()
602 switch (hw->media_type) { in atl1c_phy_init()
607 dev_err(&pdev->dev, in atl1c_phy_init()
608 "Error Setting up Auto-Negotiation\n"); in atl1c_phy_init()
626 dev_err(&pdev->dev, "Wrong Media type %d\n", in atl1c_phy_init()
627 hw->media_type); in atl1c_phy_init()
628 return -1; in atl1c_phy_init()
634 hw->phy_configured = true; in atl1c_phy_init()
640 * Detects the current speed and duplex settings of the hardware.
642 * hw - Struct containing variables accessed by shared code
643 * speed - Speed of the connection
644 * duplex - Duplex setting of the connection
657 return -1; in atl1c_get_speed_and_duplex()
670 return -1; in atl1c_get_speed_and_duplex()
684 struct atl1c_adapter *adapter = hw->adapter; in atl1c_phy_to_ps_link()
685 struct pci_dev *pdev = adapter->pdev; in atl1c_phy_to_ps_link()
708 save_autoneg_advertised = hw->autoneg_advertised; in atl1c_phy_to_ps_link()
709 hw->phy_configured = false; in atl1c_phy_to_ps_link()
710 hw->autoneg_advertised = autoneg_advertised; in atl1c_phy_to_ps_link()
712 dev_dbg(&pdev->dev, "phy autoneg failed\n"); in atl1c_phy_to_ps_link()
713 ret = -1; in atl1c_phy_to_ps_link()
715 hw->autoneg_advertised = save_autoneg_advertised; in atl1c_phy_to_ps_link()
725 dev_dbg(&pdev->dev, in atl1c_phy_to_ps_link()
735 adapter->link_speed = speed; in atl1c_phy_to_ps_link()
736 adapter->link_duplex = duplex; in atl1c_phy_to_ps_link()
756 struct atl1c_adapter *adapter = hw->adapter; in atl1c_power_saving()
757 struct pci_dev *pdev = adapter->pdev; in atl1c_power_saving()
763 speed = adapter->link_speed == SPEED_1000 ? in atl1c_power_saving()
773 if (adapter->link_duplex == FULL_DUPLEX) in atl1c_power_saving()
785 hw->phy_configured = false; /* re-init PHY when resume */ in atl1c_power_saving()
792 if (hw->nic_type == athr_l2c_b && hw->revision_id == L2CB_V11) in atl1c_power_saving()
798 dev_dbg(&pdev->dev, "%s: write phy MII_IER failed.\n", in atl1c_power_saving()
805 dev_dbg(&pdev->dev, "%s: suspend MAC=%x,MASTER=%x,PHY=0x%x,WOL=%x\n", in atl1c_power_saving()
822 if (hw->nic_type == athr_l2c_b || hw->nic_type == athr_l2c_b2 || in atl1c_post_phy_linkchg()
823 hw->nic_type == athr_l1d || hw->nic_type == athr_l1d_2) in atl1c_post_phy_linkchg()
827 /* az with brcm, half-amp */ in atl1c_post_phy_linkchg()
828 if (hw->nic_type == athr_l1d_2) { in atl1c_post_phy_linkchg()
837 if (adj_thresh && link_speed == SPEED_100 && hw->msi_lnkpatch) { in atl1c_post_phy_linkchg()
843 if (adj_thresh && hw->msi_lnkpatch) { in atl1c_post_phy_linkchg()