diff options
| author | malc <av1474@comtv.ru> | 2011-11-02 02:16:34 +0400 |
|---|---|---|
| committer | malc <av1474@comtv.ru> | 2011-11-02 02:16:34 +0400 |
| commit | ef26ee0e6c67d415f8b22850f9f13a972ada8be1 (patch) | |
| tree | c18a9cc2a9f213c8a37473f9b7aa001a99898547 /hw/pcnet.c | |
| parent | dd7b25b5b47df8aaf5580faaf3f60b2a1b779c37 (diff) | |
| parent | e1c2008af64487e7d3cec615612b7f467ebe9bc8 (diff) | |
| download | focaccia-qemu-ef26ee0e6c67d415f8b22850f9f13a972ada8be1.tar.gz focaccia-qemu-ef26ee0e6c67d415f8b22850f9f13a972ada8be1.zip | |
Merge branch 'master' of git://git.qemu.org/qemu
Diffstat (limited to 'hw/pcnet.c')
| -rw-r--r-- | hw/pcnet.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/hw/pcnet.c b/hw/pcnet.c index cf16fd4d01..cba253ba7b 100644 --- a/hw/pcnet.c +++ b/hw/pcnet.c @@ -58,24 +58,6 @@ struct qemu_ether_header { uint16_t ether_type; }; -/* BUS CONFIGURATION REGISTERS */ -#define BCR_MSRDA 0 -#define BCR_MSWRA 1 -#define BCR_MC 2 -#define BCR_LNKST 4 -#define BCR_LED1 5 -#define BCR_LED2 6 -#define BCR_LED3 7 -#define BCR_FDC 9 -#define BCR_BSBC 18 -#define BCR_EECAS 19 -#define BCR_SWS 20 -#define BCR_PLAT 22 - -#define BCR_DWIO(S) !!((S)->bcr[BCR_BSBC] & 0x0080) -#define BCR_SSIZE32(S) !!((S)->bcr[BCR_SWS ] & 0x0100) -#define BCR_SWSTYLE(S) ((S)->bcr[BCR_SWS ] & 0x00FF) - #define CSR_INIT(S) !!(((S)->csr[0])&0x0001) #define CSR_STRT(S) !!(((S)->csr[0])&0x0002) #define CSR_STOP(S) !!(((S)->csr[0])&0x0004) @@ -1215,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; |