blob: b73eec14fc8dbe35f1efeabf3d474ef08e7657c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
$NetBSD: patch-eg,v 1.2 2011/07/11 09:57:18 ryoon Exp $
Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
(PR lib/43832: ssp causes common names to be defines)
--- hw/etraxfs_eth.c.orig 2011-05-06 19:01:43.000000000 +0000
+++ hw/etraxfs_eth.c
@@ -184,7 +184,7 @@ static void mdio_read_req(struct qemu_md
phy = bus->devs[bus->addr];
if (phy && phy->read)
- bus->data = phy->read(phy, bus->req);
+ bus->data = (*phy->read)(phy, bus->req);
else
bus->data = 0xffff;
}
@@ -347,7 +347,7 @@ static void eth_validate_duplex(struct f
int new_mm = 0;
phy = eth->mdio_bus.devs[eth->phyaddr];
- phy_duplex = !!(phy->read(phy, 18) & (1 << 11));
+ phy_duplex = !!((*phy->read)(phy, 18) & (1 << 11));
mac_duplex = !!(eth->regs[RW_REC_CTRL] & 128);
if (mac_duplex != phy_duplex)
|