blob: 902cf53b2491dd007051d57b3d15c405186c1544 (
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.6 2013/06/16 18:27:25 tsutsui 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 2013-05-24 13:37:57.000000000 +0000
+++ hw/etraxfs_eth.c
@@ -185,7 +185,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;
}
@@ -359,7 +359,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) {
|