Pull mii_readreg fix from FreeBSD if_rl.c rev 1.81:

> When reading PHY regs over the i2c bus, the turnaround ACK bit
> is read one clock edge too late. This bit is driven low by
> slave (as any other input data bits from slave) when the clock
> is LOW. The current code did read the bit after the clock was
> driven high again.
This commit is contained in:
tsutsui 2006-09-29 14:03:07 +00:00
parent a7f43a90fe
commit ebd0b89ad0
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtl81x9.c,v 1.55 2006/09/29 13:59:40 tsutsui Exp $ */
/* $NetBSD: rtl81x9.c,v 1.56 2006/09/29 14:03:07 tsutsui Exp $ */
/*
* Copyright (c) 1997, 1998
@ -86,7 +86,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.55 2006/09/29 13:59:40 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.56 2006/09/29 14:03:07 tsutsui Exp $");
#include "bpfilter.h"
#include "rnd.h"
@ -347,9 +347,9 @@ rtk_mii_readreg(sc, frame)
/* Check for ack */
MII_CLR(RTK_MII_CLK);
DELAY(1);
ack = CSR_READ_2(sc, RTK_MII) & RTK_MII_DATAIN;
MII_SET(RTK_MII_CLK);
DELAY(1);
ack = CSR_READ_2(sc, RTK_MII) & RTK_MII_DATAIN;
/*
* Now try reading data bits. If the ack failed, we still