MCPcopy Create free account
hub / github.com/F-Stack/f-stack / txgbe_reset_phy

Function txgbe_reset_phy

dpdk/drivers/net/txgbe/base/txgbe_phy.c:271–298  ·  view source on GitHub ↗

* txgbe_reset_phy - Performs a PHY reset * @hw: pointer to hardware structure **/

Source from the content-addressed store, hash-verified

269 * @hw: pointer to hardware structure
270 **/
271s32 txgbe_reset_phy(struct txgbe_hw *hw)
272{
273 s32 err = 0;
274
275 if (hw->phy.type == txgbe_phy_unknown)
276 err = txgbe_identify_phy(hw);
277
278 if (err != 0 || hw->phy.type == txgbe_phy_none)
279 return err;
280
281 /* Don't reset PHY if it's shut down due to overtemp. */
282 if (hw->phy.check_overtemp(hw) == TXGBE_ERR_OVERTEMP)
283 return err;
284
285 /* Blocked by MNG FW so bail */
286 if (txgbe_check_reset_blocked(hw))
287 return err;
288
289 switch (hw->phy.type) {
290 case txgbe_phy_cu_mtd:
291 err = txgbe_reset_extphy(hw);
292 break;
293 default:
294 break;
295 }
296
297 return err;
298}
299
300/**
301 * txgbe_read_phy_mdi - Reads a value from a specified PHY register without

Callers

nothing calls this directly

Calls 3

txgbe_identify_phyFunction · 0.85
txgbe_reset_extphyFunction · 0.85

Tested by

no test coverage detected