---
name: "mdiobus_write"
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_write"
---

# mdiobus\_write(9)

Convenience function for writing a given MII mgmt register

## NAME

mdiobus\_write - Convenience function for writing a given MII mgmt register

## SYNOPSIS

**int mdiobus\_write(struct mii\_bus \*** *bus***, int** *addr***, u32** *regnum***, u16** *val***);**

## ARGUMENTS

*bus*

the mii\_bus struct

*addr*

the phy address

*regnum*

register number to write

*val*

value to write to *regnum*

## NOTE

MUST NOT be called from interrupt context, because the bus read/write functions may wait for an interrupt to conclude the operation.

## COPYRIGHT
