[PATCH] miidev: allow read/write of all registers

Baruch Siach baruch at tkos.co.il
Tue Jan 18 09:59:12 EST 2011


Ethernet PHY devices have 32 registers, each 16 bits wide. Thus, the size of
the phy device should be 64 bytes.

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 drivers/net/miidev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/miidev.c b/drivers/net/miidev.c
index 343eb40..b4c6948 100644
--- a/drivers/net/miidev.c
+++ b/drivers/net/miidev.c
@@ -183,7 +183,7 @@ static int miidev_probe(struct device_d *dev)
 	struct mii_device *mdev = dev->priv;
 
 	mdev->cdev.name = asprintf("phy%d", dev->id);
-	mdev->cdev.size = 32;
+	mdev->cdev.size = 64;
 	mdev->cdev.ops = &miidev_ops;
 	mdev->cdev.priv = mdev;
 	mdev->cdev.dev = dev;
-- 
1.7.2.3




More information about the barebox mailing list