---
name: "mdiobus_scan"
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/mdiobus_scan"
---

# mdiobus\_scan(9)

scan a bus for MDIO devices.

## NAME

mdiobus\_scan - scan a bus for MDIO devices.

## SYNOPSIS

**struct phy\_device \* mdiobus\_scan(struct mii\_bus \*** *bus***, int** *addr***);**

## ARGUMENTS

*bus*

mii\_bus to scan

*addr*

address on bus to scan

## DESCRIPTION

This function scans the MDIO bus, looking for devices which can be identified using a vendor/product ID in registers 2 and 3. Not all MDIO devices have such registers, but PHY devices typically do. Hence this function assumes anything found is a PHY, or can be treated as a PHY. Other MDIO devices, such as switches, will probably not be found during the scan.

## COPYRIGHT
