Revision 7f23f812 hw/rtl8139.c
b/hw/rtl8139.c | ||
---|---|---|
1173 | 1173 |
s->RxBufAddr = 0; |
1174 | 1174 |
} |
1175 | 1175 |
|
1176 |
static void rtl8139_reset(void *opaque)
|
|
1176 |
static void rtl8139_reset(DeviceState *d)
|
|
1177 | 1177 |
{ |
1178 |
RTL8139State *s = opaque;
|
|
1178 |
RTL8139State *s = container_of(d, RTL8139State, dev.qdev);
|
|
1179 | 1179 |
int i; |
1180 | 1180 |
|
1181 | 1181 |
/* restore MAC address */ |
... | ... | |
1371 | 1371 |
if (val & CmdReset) |
1372 | 1372 |
{ |
1373 | 1373 |
DEBUG_PRINT(("RTL8139: ChipCmd reset\n")); |
1374 |
rtl8139_reset(s);
|
|
1374 |
rtl8139_reset(&s->dev.qdev);
|
|
1375 | 1375 |
} |
1376 | 1376 |
if (val & CmdRxEnb) |
1377 | 1377 |
{ |
... | ... | |
1544 | 1544 |
} else if (opmode == 0x40) { |
1545 | 1545 |
/* Reset. */ |
1546 | 1546 |
val = 0; |
1547 |
rtl8139_reset(s);
|
|
1547 |
rtl8139_reset(&s->dev.qdev);
|
|
1548 | 1548 |
} |
1549 | 1549 |
|
1550 | 1550 |
s->Cfg9346 = val; |
... | ... | |
3464 | 3464 |
PCI_ADDRESS_SPACE_MEM, rtl8139_mmio_map); |
3465 | 3465 |
|
3466 | 3466 |
qdev_get_macaddr(&dev->qdev, s->macaddr); |
3467 |
rtl8139_reset(s);
|
|
3467 |
rtl8139_reset(&s->dev.qdev);
|
|
3468 | 3468 |
s->vc = qdev_get_vlan_client(&dev->qdev, |
3469 | 3469 |
rtl8139_can_receive, rtl8139_receive, NULL, |
3470 | 3470 |
rtl8139_cleanup, s); |
Also available in: Unified diff