---
name: "get_phy_id"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/get_phy_id"
---

# get\_phy\_id(9)

reads the specified addr for its ID.

## NAME

get\_phy\_id - reads the specified addr for its ID.

## SYNOPSIS

**int get\_phy\_id(struct mii\_bus \*** *bus***, int** *addr***, u32 \*** *phy\_id***, bool** *is\_c45***, struct phy\_c45\_device\_ids \*** *c45\_ids***);**

## ARGUMENTS

*bus*

the target MII bus

*addr*

PHY address on the MII bus

*phy\_id*

where to store the ID retrieved.

*is\_c45*

If true the PHY uses the 802.3 clause 45 protocol

*c45\_ids*

where to store the c45 ID information.

## DESCRIPTION

In the case of a 802.3-c22 PHY, reads the ID registers of the PHY at *addr* on the *bus*, stores it in *phy\_id* and returns zero on success.

In the case of a 802.3-c45 PHY, **get\_phy\_c45\_ids** is invoked, and its return value is in turn returned.

## COPYRIGHT
