mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
pcnet: Add link state support
Update lnkst on link state changes so that guests can obtain this information via reading back the LED output pin. Works for Linux but not for guests that depend on the missing PHY. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
7ba7974197
commit
e1c2008af6
4 changed files with 10 additions and 0 deletions
|
@ -1197,6 +1197,13 @@ ssize_t pcnet_receive(VLANClientState *nc, const uint8_t *buf, size_t size_)
|
|||
return size_;
|
||||
}
|
||||
|
||||
void pcnet_set_link_status(VLANClientState *nc)
|
||||
{
|
||||
PCNetState *d = DO_UPCAST(NICState, nc, nc)->opaque;
|
||||
|
||||
d->lnkst = nc->link_down ? 0 : 0x40;
|
||||
}
|
||||
|
||||
static void pcnet_transmit(PCNetState *s)
|
||||
{
|
||||
target_phys_addr_t xmit_cxda = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue