mirror of https://github.com/xqemu/xqemu.git
Merge remote-tracking branch 'stefanha/net' into staging
# By Dmitry Fleytman # Via Stefan Hajnoczi * stefanha/net: vmxnet3: const_cpu_to_le64 wrapping for feature bits dropped vmxnet3: iPXE compatibility fixes Message-id: 1365435829-23535-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
commit
1f8010f079
11
hw/vmxnet3.c
11
hw/vmxnet3.c
|
@ -1033,6 +1033,7 @@ vmxnet3_indicate_packet(VMXNET3State *s)
|
||||||
is_head = false;
|
is_head = false;
|
||||||
ready_rxcd_pa = new_rxcd_pa;
|
ready_rxcd_pa = new_rxcd_pa;
|
||||||
new_rxcd_pa = 0;
|
new_rxcd_pa = 0;
|
||||||
|
num_frags++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 != ready_rxcd_pa) {
|
if (0 != ready_rxcd_pa) {
|
||||||
|
@ -1324,6 +1325,10 @@ static void vmxnet3_activate_device(VMXNET3State *s)
|
||||||
s->max_rx_frags =
|
s->max_rx_frags =
|
||||||
VMXNET3_READ_DRV_SHARED16(s->drv_shmem, devRead.misc.maxNumRxSG);
|
VMXNET3_READ_DRV_SHARED16(s->drv_shmem, devRead.misc.maxNumRxSG);
|
||||||
|
|
||||||
|
if (s->max_rx_frags == 0) {
|
||||||
|
s->max_rx_frags = 1;
|
||||||
|
}
|
||||||
|
|
||||||
VMW_CFPRN("Max RX fragments is %u", s->max_rx_frags);
|
VMW_CFPRN("Max RX fragments is %u", s->max_rx_frags);
|
||||||
|
|
||||||
s->event_int_idx =
|
s->event_int_idx =
|
||||||
|
@ -1524,6 +1529,12 @@ static uint64_t vmxnet3_get_command_status(VMXNET3State *s)
|
||||||
VMW_CFPRN("Device active: %" PRIx64, ret);
|
VMW_CFPRN("Device active: %" PRIx64, ret);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VMXNET3_CMD_RESET_DEV:
|
||||||
|
case VMXNET3_CMD_QUIESCE_DEV:
|
||||||
|
case VMXNET3_CMD_GET_QUEUE_STATUS:
|
||||||
|
ret = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case VMXNET3_CMD_GET_LINK:
|
case VMXNET3_CMD_GET_LINK:
|
||||||
ret = s->link_status_and_speed;
|
ret = s->link_status_and_speed;
|
||||||
VMW_CFPRN("Link and speed: %" PRIx64, ret);
|
VMW_CFPRN("Link and speed: %" PRIx64, ret);
|
||||||
|
|
11
hw/vmxnet3.h
11
hw/vmxnet3.h
|
@ -37,10 +37,8 @@
|
||||||
#define __packed QEMU_PACKED
|
#define __packed QEMU_PACKED
|
||||||
|
|
||||||
#if defined(HOST_WORDS_BIGENDIAN)
|
#if defined(HOST_WORDS_BIGENDIAN)
|
||||||
#define const_cpu_to_le64(x) bswap_64(x)
|
|
||||||
#define __BIG_ENDIAN_BITFIELD
|
#define __BIG_ENDIAN_BITFIELD
|
||||||
#else
|
#else
|
||||||
#define const_cpu_to_le64(x) (x)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -137,10 +135,10 @@ struct UPT1_RSSConf {
|
||||||
|
|
||||||
/* features */
|
/* features */
|
||||||
enum {
|
enum {
|
||||||
UPT1_F_RXCSUM = const_cpu_to_le64(0x0001), /* rx csum verification */
|
UPT1_F_RXCSUM = 0x0001, /* rx csum verification */
|
||||||
UPT1_F_RSS = const_cpu_to_le64(0x0002),
|
UPT1_F_RSS = 0x0002,
|
||||||
UPT1_F_RXVLAN = const_cpu_to_le64(0x0004), /* VLAN tag stripping */
|
UPT1_F_RXVLAN = 0x0004, /* VLAN tag stripping */
|
||||||
UPT1_F_LRO = const_cpu_to_le64(0x0008),
|
UPT1_F_LRO = 0x0008,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* all registers are 32 bit wide */
|
/* all registers are 32 bit wide */
|
||||||
|
@ -752,7 +750,6 @@ struct Vmxnet3_DriverShared {
|
||||||
#undef __le32
|
#undef __le32
|
||||||
#undef __le64
|
#undef __le64
|
||||||
#undef __packed
|
#undef __packed
|
||||||
#undef const_cpu_to_le64
|
|
||||||
#if defined(HOST_WORDS_BIGENDIAN)
|
#if defined(HOST_WORDS_BIGENDIAN)
|
||||||
#undef __BIG_ENDIAN_BITFIELD
|
#undef __BIG_ENDIAN_BITFIELD
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue