summaryrefslogtreecommitdiff
path: root/hw/e1000.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-12-01 07:11:51 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-12-01 07:11:51 +0200
commitc924f36a300cbc54d3cb511116e8e2bae17f5ae6 (patch)
tree04e57676b1db1db7d8b33934b349f8f37780fa2a /hw/e1000.c
parent1abeb5a65d515f8a8a9cfc4a82342f731bd9321f (diff)
parent09fa35e5cdc7d17ed3e1528ca743893ae77a0ea2 (diff)
downloadqemu-c924f36a300cbc54d3cb511116e8e2bae17f5ae6.tar.gz
Merge remote branch 'origin/master' into pci
Conflicts: Makefile.objs hw/virtio.c
Diffstat (limited to 'hw/e1000.c')
-rw-r--r--hw/e1000.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/hw/e1000.c b/hw/e1000.c
index b7f585bc08..57d08cfa35 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -447,9 +447,10 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
// data descriptor
tp->sum_needed = le32_to_cpu(dp->upper.data) >> 8;
tp->cptse = ( txd_lower & E1000_TXD_CMD_TSE ) ? 1 : 0;
- } else
+ } else {
// legacy descriptor
tp->cptse = 0;
+ }
if (vlan_enabled(s) && is_vlan_txd(txd_lower) &&
(tp->cptse || txd_lower & E1000_TXD_CMD_EOP)) {
@@ -685,8 +686,9 @@ e1000_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
(void *)(buf + vlan_offset), size);
desc.length = cpu_to_le16(size + fcs_len(s));
desc.status |= E1000_RXD_STAT_EOP|E1000_RXD_STAT_IXSM;
- } else // as per intel docs; skip descriptors with null buf addr
+ } else { // as per intel docs; skip descriptors with null buf addr
DBGOUT(RX, "Null RX descriptor!!\n");
+ }
cpu_physical_memory_write(base, (void *)&desc, sizeof(desc));
if (++s->mac_reg[RDH] * sizeof(desc) >= s->mac_reg[RDLEN])
@@ -858,13 +860,14 @@ e1000_mmio_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
#ifdef TARGET_WORDS_BIGENDIAN
val = bswap32(val);
#endif
- if (index < NWRITEOPS && macreg_writeops[index])
+ if (index < NWRITEOPS && macreg_writeops[index]) {
macreg_writeops[index](s, index, val);
- else if (index < NREADOPS && macreg_readops[index])
+ } else if (index < NREADOPS && macreg_readops[index]) {
DBGOUT(MMIO, "e1000_mmio_writel RO %x: 0x%04x\n", index<<2, val);
- else
+ } else {
DBGOUT(UNKNOWN, "MMIO unknown write addr=0x%08x,val=0x%08x\n",
index<<2, val);
+ }
}
static void