Statistics
| Branch: | Revision:

root / hw / eepro100.c @ c021f8e6

History | View | Annotate | Download (67.6 kB)

# Date Author Comment
7b8737de 01/20/2010 12:31 am Stefan Weil

eepro100: Fix multicast support

  • Handling of multicast list was missing.
  • Multicast all was missing.
  • Promiscuous mode for multicast frames was wrong.

This patch is a step to synchronize my maintainer version
of eepro100.c (git://repo.or.cz/qemu/ar7.git) with the...

f3a52e50 01/20/2010 12:31 am Stefan Weil

eepro100: Restructure code (new function tx_command)

Handling of transmit commands is rather complex,
so about 80 lines of code were moved from function
action_command to the new function tx_command.

The two new values "tx" and "cb_address" in the
eepro100 status structure made this possible without...

938a6324 01/13/2010 02:50 pm Stefan Weil

eepro100: Update ROM file support

Use new way to associate ROM files to devices.

Currently, there is only a ROM file for i82559er
included in QEMU, so the patch does not add
.romfile for the other devices.

When flexible mode is fixed in eepro100, adding...

61702408 01/13/2010 02:28 pm Stefan Weil

eepro100: Fix initial value for PCI_STATUS

The numerical value was wrong (0x2800 instead of 0x0280)
which indeed did not make sense.

Signed-off-by: Stefan Weil <>
Signed-off-by: Michael S. Tsirkin <>

508cc6b4 12/23/2009 04:35 pm Michael S. Tsirkin

eepro100: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change in meaningful ways.

Signed-off-by: Michael S. Tsirkin <>
Acked-by: Juan Quintela <>
Acked-by: Glauber Costa <>

ec169288 12/03/2009 11:26 pm David Benjamin

eepro100: Allocate a larger buffer for regname()

This should avoid truncating the register name when debugging.

Signed-off-by: David Benjamin <>
Signed-off-by: Anthony Liguori <>

b8f6ba0d 12/03/2009 11:26 pm Stefan Weil

eepro100: Improve debug messages

  • buf was too small for longer register names.
  • Use consistent upper case for nouns in register names.
  • Use better name for array with e100 register names.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

e00e365e 12/03/2009 05:41 pm Mark McLoughlin

net: convert eepro100 to NICState

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

4e9df06a 11/12/2009 07:23 pm Stefan Weil

eepro100: Fix boot ROM support

  • Rename pxe-eepro100.bin to pxe-i82559er.bin.
    The other devices supported by eepro100.c need
    additional pxe boot ROM images.
  • Call rom_add_option during initialisation.
    The code won't work with two or more different...
6a90e308 11/12/2009 07:23 pm Stefan Weil

eepro100: Add missing .exit initialisation

Some devices did not have an initialisation value
for entry ".exit". This is fixed here.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

ba42b646 11/09/2009 04:43 pm Stefan Weil

eepro100: Improve support for different devices

  • Add device properties (size of statistical data,
    extended tcb support) to EEPRO100State and set
    these values for the different devices.
  • Fix PCI configuration for existing devices.
  • Add initialisation code for missing devices....
6e355d90 11/09/2009 04:43 pm Isaku Yamahata

pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t

This patch is preliminary for 64 bit BAR support.
Introduce dedicated type, pcibus_t, to represent pci bus address/size
instead of uint32_t.
Later this type will be changed to uint64_t....

89e8b13c 11/09/2009 04:43 pm Isaku Yamahata

pci: introduce FMT_PCIBUS for printf format for pcibus_t.

This patch is preliminary for 64bit BAR.
Later pcibus_t will be changed from uint32_t to uint64_t.
Introduce FMT_PCIBUS for printf format for pcibus_t.

Signed-off-by: Isaku Yamahata <>...

0392a017 11/09/2009 04:43 pm Isaku Yamahata

pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h

make constants for pci base address match pci_regs.h by
renaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.

Signed-off-by: Isaku Yamahata <>
Acked-by: Michael S. Tsirkin <>...

151b2986 10/27/2009 07:28 pm Juan Quintela

eepro100: port to vmstate

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

508ef936 10/27/2009 07:28 pm Gerd Hoffmann

eepro100: use qdev properties for configuration.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

5fa9a0ae 10/27/2009 07:28 pm Stefan Weil

eepro100: Restructure code

This patch only moves about 150 lines of code from
function eepro100_cu_command to a new function action_command.

A goto statement was replaced by a for loop.

There are no functional changes. Nor did I change comments
starting with // (they will be removed by future patches)....

3706c43f 10/15/2009 05:32 pm Stefan Weil

eepro100: Remove unused device status entries

Once upon the time when QEMU hacking was fun
there was a brave knight who wanted to have
a driver for a special intel nic.

So he started by cloning ne2000.c which also
meant that the new born eepro100.c was
immediately three years old....

dbbaaff6 10/06/2009 10:36 pm =?UTF-8?q?Reimar=20D=C3=B6f...

eepro100: support 16 bit read from SCBCmd (== 2)

This is necessary to support OpenBSD 4.2 install, without
this change it triggers an assert.

Signed-off-by: Reimar Döffinger <>
Signed-off-by: Anthony Liguori <>

f4e94dfe 10/05/2009 05:32 pm =?UTF-8?q?Reimar=20D=C3=B6f...

Set revision in eeprom correctly for 82557 versions.

This is necessary to make FreeBSD recognize the device as 82557 - otherwise its
driver will use unsupported features and fail to work.

Signed-off-by: Reimar Döffinger <>
Signed-off-by: Anthony Liguori <>

7f1e9d4e 10/05/2009 05:32 pm Kevin Wolf

eepro100: Don't allow guests to fail assertions

The idea of using assert() for input validation is rather questionable.
Let's remove it from eepro100, so that guests need to find more interesting
ways if they want to crash qemu.

This patch replaces asserts that are directly dependent on guest-accessible...

e3936fa5 10/05/2009 05:32 pm Gerd Hoffmann

pci: move unregister from PCIDevice to PCIDeviceInfo

One more cleanup while being at it ;)

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

4e3db917 10/05/2009 05:29 pm Aurelien Jarno

Revert "eepro100: Remove unused device status entries"

This reverts commit 3031efabd0bb744126a53f32c5426580b5d394d5.

c4c270e2 10/04/2009 03:59 pm Stefan Weil

eepro100: Add more i825xx devices

The new devices added here are still not functional -
partially because some patches are still missing,
partially because I cannot test them. Nevertheless
they belong to the same family and will be supported
by this driver some day....

3031efab 10/04/2009 03:54 pm Stefan Weil

eepro100: Remove unused device status entries

A lot of entries are unused (they were added by copy + paste
from other drivers during development of eepro100.c).

Removing them from nic_save, nic_load makes any
old saved status incompatible, so a new version...

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

067d01de 09/27/2009 12:48 am Stefan Weil

eepro100: Fix format strings in debug messages

size_t arguments need %zu instead of %d.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

41cbc23c 09/27/2009 12:48 am Stefan Weil

eepro100: Replace sprintf by snprintf

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

fd9ae2ec 09/27/2009 12:48 am Stefan Weil

eepro100: Remove unused code

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

aac443e6 09/27/2009 12:48 am Stefan Weil

eepro100: Enhanced logging and comments

  • Use TRACE macro to allow different logging flags.
  • Add new debugging messages and clean existing ones.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

6a0b9cc9 09/12/2009 06:20 pm Reimar Döffinger

Make string arrays used to convert numbers to strings when DEBUG_EEPRO100 is enabled const.

Signed-off-by: Reimar Döffinger <>
Signed-off-by: Blue Swirl <>

d6fd1e66 09/09/2009 10:57 pm Stefan Weil

eepro100: Clean code which sets the PCI device id

  • Use function pci_config_set_device_id
  • Use new macro PCI_DEVICE_ID_INTEL_82557

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

0859df68 09/09/2009 10:57 pm Naphtali Sprei

Fix for commit 3f9cb1c14dc368f41447db5f78d6248c4f100ad4

Here's a patch to fix the issue introduced by me, as Reimar Döffinger pointed out,

Reimar Döffinger wrote:

On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote:

Bug fix for segfault when run as i82551 HW:...

b84a5c6f 09/04/2009 05:37 pm Amit Shah

Remove typedef for bool from eepro100.c

eepro100.c shouldn't have the need to do this in its local header file.

And I recently started getting this:

$ make -j3
...
CC x86_64-softmmu/eepro100.o
/home/amit/src/qemu/hw/eepro100.c:112: error: two or more data types...

d986bd50 08/28/2009 04:46 am Juan Quintela

eepro100: convert casts to DO_UPCAST()

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

769cf7a5 08/28/2009 04:46 am Juan Quintela

eepro100: cast a void * makes no sense

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

273a2142 08/28/2009 04:46 am Juan Quintela

eepro100: Remove unused indirection of PCIDevice

Once there, there is no way that we don't have a PCI Device at save/load time. Remove the check

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

81a322d4 08/28/2009 04:43 am Gerd Hoffmann

qdev: add return value to init() callbacks.

Sorry folks, but it has to be. One more of these invasive qdev patches.

We have a serious design bug in the qdev interface: device init
callbacks can't signal failure because the init() callback has no
return value. This patch fixes it....

24e6f355 08/28/2009 04:35 am Reimar Döffinger

fix stack buffer overflows in eepro100.c tx

Hello,
the real world issue is that the hardware allows sends up to 2600 bytes,
and for some reason FreeBSD sometimes sends frames larger than the
ethernet frame size (102+1460 is the maximum I have seen so far),...

3f9cb1c1 08/28/2009 03:33 am Naphtali Sprei

hw/eepro100.c: Use extended TBD only where applicable

Bug fix for segfault when run as i82551 HW:
Use Extended TBD only when HW supports it (i82558 and up).

Added assertions to guard from such buffer overflow
Introduce the MAX_TCB_BYTE_COUNT macro
Allocate buf big enough as HW needs (MAX_ETH_FRAME_SIZE -> MAX_TCB_BYTE_COUNT)...

d60efc6b 08/25/2009 09:29 pm Blue Swirl

Make CPURead/WriteFunc structure 'const'

Signed-off-by: Blue Swirl <>

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

0aab0d3a 07/09/2009 03:07 pm Gerd Hoffmann

qdev: update pci device registration.

Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunch
of parameters. Also adds config_read and config_write callbacks to
PCIDeviceInfo, so drivers needing these can be converted to the qdev
device API too....

a08d4367 06/29/2009 10:18 pm Jan Kiszka

Revert "Introduce reset notifier order"

This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and
updates later added users of qemu_register_reset), we solved the
problem it originally addressed less invasively.

Signed-off-by: Jan Kiszka <>...

28c2c264 06/16/2009 11:18 pm Avi Kivity

Rename pci_register_io_region() to pci_register_bar()

This function is used to manage a PCI BAR, so make the more generic
pci_register_io_region() available to other uses.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

1eed09cb 06/16/2009 11:18 pm Avi Kivity

Remove io_index argument from cpu_register_io_memory()

The parameter is always zero except when registering the three internal
io regions (ROM, unassigned, notdirty). Remove the parameter to reduce
the API's power, thus facilitating future change.

Signed-off-by: Avi Kivity <>...

463af534 06/09/2009 01:38 pm Mark McLoughlin

net: add fd_readv() handler to qemu_new_vlan_client() args

This, apparently, is the style we prefer - all VLANClientState
should be an argument to qemu_new_vlan_client().

Signed-off-by: Mark McLoughlin <>

cda9046b 06/09/2009 01:38 pm Mark McLoughlin

net: re-name vc->fd_read() to vc->receive()

VLANClientState's fd_read() handler doesn't read from file
descriptors, it adds a buffer to the client's receive queue.

Re-name the handlers to make things a little less confusing.

Signed-off-by: Mark McLoughlin <>

e3f5ec2b 06/09/2009 01:38 pm Mark McLoughlin

net: pass VLANClientState* as first arg to receive handlers

Give static type checking a chance to catch errors.

Signed-off-by: Mark McLoughlin <>

4f1c942b 06/09/2009 01:38 pm Mark McLoughlin

net: add return value to packet receive handler

This allows us to handle queue full conditions rather than dropping
the packet on the floor.

Signed-off-by: Mark McLoughlin <>

8217606e 05/22/2009 06:50 pm Jan Kiszka

Introduce reset notifier order

Add the parameter 'order' to qemu_register_reset and sort callbacks on
registration. On system reset, callbacks with lower order will be
invoked before those with higher order. Update all existing users to the
standard order 0....

9d07d757 05/15/2009 12:35 am Paul Brook

PCI network qdev conversion

Signed-off-by: Paul Brook <>

55616505 05/13/2009 10:54 pm Paul Brook

Include assert.h from qemu-common.h

Include assert.h from qemu-common.h and remove other direct uses.
cpu-all.h still need to include it because of the dyngen-exec.h hacks

Signed-off-by: Paul Brook <>

001faf32 05/13/2009 08:53 pm Blue Swirl

Replace gcc variadic macro extension with C99 version

Signed-off-by: Blue Swirl <>

aff427a1 05/01/2009 05:47 pm Chris Wright

Pci nic: pci_register_device can fail

The pci_register_device() call in PCI nic initialization routines can
fail. Handle this failure and propagate a meaningful error message to
the user instead of generating a SEGV.

Cc: Marcelo Tosatti <>...

b946a153 04/17/2009 08:11 pm aliguori

Introduce VLANClientState::cleanup() (Mark McLoughlin)

We're currently leaking memory and file descriptors on device
hot-unplug.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162

32a8f6ae 04/17/2009 08:11 pm aliguori

Use NICInfo::model for eepro100 savevm ID string (Mark McLoughlin)

NICInfo::model will always be identical to the device name strings
we're currently passing to nic_init(). Just re-use NICInfo::model.

This makes it clear why we use vc->model for unregister_savevm()...

cef3017c 03/28/2009 07:29 pm aliguori

Clean some PCI defines (Stefan Weil)

this patch adds some more defines from linux/pci_regs.h to
hw/pci.h. There is now no longer a need to define them in
eepro100.c, so they were removed there.

Some defines from linux/pci_regs.h had similar, but not
the same defines in hw/pci.h (PCI_REVISION_ID / PCI_REVISION,...

d78f3995 03/16/2009 06:33 pm blueswir1

Delete some unused macros detected with -Wp,-Wunused-macros use

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6856 c046a42c-6fe2-441c-8c8c-71466251a162

a770dc7e 03/13/2009 05:02 pm aliguori

Add and use remaining #defines for PCI device IDs (Stuart Brady)

This patch adds and uses #defines for the remaining hardcoded PCI
device IDs. It also moves definitions taken from linux/pci_ids.h
into a separate header (hw/pci_ids.h), removes the 'RTL' from...

72da4208 02/11/2009 05:19 pm aliguori

qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti)

Change the PCI network drivers init functions to return the PCIDev, to
inform which slot has been hot-plugged.

Also record PCIDevice structure on NICInfo to locate for release on...

173a543b 02/01/2009 09:26 pm blueswir1

Add and use #defines for PCI device classes

This patch adds and uses #defines for PCI device classes and subclases,
using a new pci_config_set_class() function, similar to the recently
added pci_config_set_vendor_id() and pci_config_set_device_id().

Change since v1: fixed compilation of hw/sun4u.c...

deb54399 01/26/2009 05:37 pm aliguori

Define PCI vendor and device IDs in pci.h (Stuart Brady)

This patch defines PCI vendor and device IDs in pci.h (matching those
from Linux's pci_ids.h), and uses those definitions where appropriate.

Change from v1:
Introduces pci_config_set_vendor_id() / pci_config_set_device_id()...

7a9f6e4a 01/07/2009 07:48 pm aliguori

Add a -net name=foo parameter (Mark McLoughlin)

Allow the user to supply a vlan client name on the command line.

This is probably only useful for management tools so that they can
use their own names rather than parsing the output of 'info network'.

Signed-off-by: Mark McLoughlin <>...

7cb7434b 01/07/2009 07:46 pm aliguori

Add qemu_format_nic_info_str() (Mark McLoughlin)

Factor out a simple little function for formatting a NIC's
info_str and make all NICs use it.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6218 c046a42c-6fe2-441c-8c8c-71466251a162

bf38c1a0 01/07/2009 07:42 pm aliguori

Add a model string to VLANClientState (Mark McLoughlin)

Don't lose track of what type/model a vlan client is so that we can
e.g. assign a global per-model id to clients.

The entire patch is basically a tedious excercise in making sure the
type/model string gets propagated down to qemu_new_vlan_client()....

8da3ff18 12/01/2008 08:59 pm pbrook

Change MMIO callbacks to use offsets, not absolute addresses.

Signed-off-by: Paul Brook <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162

18fdb1c5 07/18/2008 09:02 pm ths

Various NICs: Fix suspend/resume of multiple instances, by Jan Kiszka.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4892 c046a42c-6fe2-441c-8c8c-71466251a162

87ecb68b 11/17/2007 07:14 pm pbrook

Break up vl.h.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

3257d2b6 09/15/2007 01:22 am ths

Less magic constants, by Filip Navara.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3170 c046a42c-6fe2-441c-8c8c-71466251a162

bde7600c 09/13/2007 05:22 am ths

Improved EEPRO 100 emulation, by Filip Navara.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3163 c046a42c-6fe2-441c-8c8c-71466251a162

2657c663 07/02/2007 04:38 pm balrog

E100 savevm/loadvm support, patch by Jason Wessel.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3041 c046a42c-6fe2-441c-8c8c-71466251a162

d537cf6c 04/07/2007 09:14 pm pbrook

Unify IRQ handling.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162

663e8e51 04/02/2007 03:35 pm ths

Eepro100 emulation, by Stefan Weil.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2584 c046a42c-6fe2-441c-8c8c-71466251a162