diff options
author | Anthony Liguori | 2012-04-10 15:21:58 +0200 |
---|---|---|
committer | Anthony Liguori | 2012-04-10 15:21:58 +0200 |
commit | 4e1957acc854b2f3f3068c75cef2a429f9b97011 (patch) | |
tree | cab3ca24ed0fc963cb693c0d440a9495a2cc47eb /hw/eepro100.c | |
parent | Merge remote-tracking branch 'qmp/queue/qmp' into staging (diff) | |
parent | rtl8139: do the network/host communication only in normal operating mode (diff) | |
download | qemu-4e1957acc854b2f3f3068c75cef2a429f9b97011.tar.gz qemu-4e1957acc854b2f3f3068c75cef2a429f9b97011.tar.xz qemu-4e1957acc854b2f3f3068c75cef2a429f9b97011.zip |
Merge commit 'ff71f2e8cacefae99179993204172bc65e4303df' into staging
* commit 'ff71f2e8cacefae99179993204172bc65e4303df': (21 commits)
rtl8139: do the network/host communication only in normal operating mode
rtl8139: correctly check the opmode
net: move compute_mcast_idx() to net.h
rtl8139: support byte read to TxStatus registers
rtl8139: remove unused marco
rtl8139: limit transmission buffer size in c+ mode
pci_regs: Add PCI_EXP_TYPE_PCIE_BRIDGE
virtio-net: add DATA_VALID flag
pci_bridge: upper 32 bit are long registers
pci: fix bridge IO/BASE
pcie: drop functionality moved to core
pci: set memory type for memory behind the bridge
pci: add standard bridge device
slotid: add slot id capability
shpc: standard hot plug controller
pci_bridge: user-friendly default bus name
pci: make another unused extern function static
pci: don't export an internal function
pci_regs: Fix value of PCI_EXP_TYPE_RC_EC.
pci: Do not check if a bus exist in pci_parse_devaddr.
...
Diffstat (limited to 'hw/eepro100.c')
-rw-r--r-- | hw/eepro100.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c index e3ba71974e..02e6f7ef31 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -322,33 +322,8 @@ static const uint16_t eepro100_mdi_mask[] = { 0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, }; -#define POLYNOMIAL 0x04c11db6 - static E100PCIDeviceInfo *eepro100_get_class(EEPRO100State *s); -/* From FreeBSD */ -/* XXX: optimize */ -static unsigned compute_mcast_idx(const uint8_t * ep) -{ - uint32_t crc; - int carry, i, j; - uint8_t b; - - crc = 0xffffffff; - for (i = 0; i < 6; i++) { - b = *ep++; - for (j = 0; j < 8; j++) { - carry = ((crc & 0x80000000L) ? 1 : 0) ^ (b & 0x01); - crc <<= 1; - b >>= 1; - if (carry) { - crc = ((crc ^ POLYNOMIAL) | carry); - } - } - } - return (crc & BITS(7, 2)) >> 2; -} - /* Read a 16 bit control/status (CSR) register. */ static uint16_t e100_read_reg2(EEPRO100State *s, E100RegisterOffset addr) { |