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. From OpenBSD (from FreeBSD). Another small change git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13822 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
63d5a418ab
commit
e4a11b6a77
|
@ -130,9 +130,9 @@ wb_mii_readreg(wb_device *device, wb_mii_frame *frame)
|
|||
/* Check for ack */
|
||||
SIO_CLR(WB_SIO_MII_CLK);
|
||||
MII_DELAY(device);
|
||||
ack = read32(device->reg_base + WB_SIO) & WB_SIO_MII_DATAOUT;
|
||||
SIO_SET(WB_SIO_MII_CLK);
|
||||
MII_DELAY(device);
|
||||
ack = read32(device->reg_base + WB_SIO) & WB_SIO_MII_DATAOUT;
|
||||
SIO_CLR(WB_SIO_MII_CLK);
|
||||
MII_DELAY(device);
|
||||
SIO_SET(WB_SIO_MII_CLK);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2003-2004
|
||||
/* Copyright (c) 2003-2005
|
||||
* Stefano Ceccherini <burton666@libero.it>. All rights reserved.
|
||||
* This file is released under the MIT license
|
||||
*/
|
||||
|
@ -293,9 +293,7 @@ wb_set_rx_filter(wb_device *device)
|
|||
{
|
||||
// TODO: Basically we just config the filter to accept broadcasts
|
||||
// packets. We'll need also to configure it to multicast.
|
||||
int32 rxFilter = read32(device->reg_base + WB_NETCFG);
|
||||
|
||||
write32(device->reg_base + WB_NETCFG, rxFilter | WB_NETCFG_RX_BROAD);
|
||||
WB_SETBIT(device->reg_base + WB_NETCFG, WB_NETCFG_RX_BROAD);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue