History | View | Annotate | Download (66.1 kB)
eepro100: Allocate a larger buffer for regname()
This should avoid truncating the register name when debugging.
Signed-off-by: David Benjamin <davidben@mit.edu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
eepro100: Improve debug messages
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: convert eepro100 to NICState
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
eepro100: Fix boot ROM support
eepro100: Add missing .exit initialisation
Some devices did not have an initialisation valuefor entry ".exit". This is fixed here.
eepro100: Improve support for different devices
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/sizeinstead of uint32_t.Later this type will be changed to uint64_t....
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 <yamahata@valinux.co.jp>...
pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h
make constants for pci base address match pci_regs.h byrenaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
eepro100: port to vmstate
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
eepro100: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
eepro100: Restructure code
This patch only moves about 150 lines of code fromfunction 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 commentsstarting with // (they will be removed by future patches)....
eepro100: Remove unused device status entries
Once upon the time when QEMU hacking was funthere was a brave knight who wanted to havea driver for a special intel nic.
So he started by cloning ne2000.c which alsomeant that the new born eepro100.c wasimmediately three years old....
eepro100: support 16 bit read from SCBCmd (== 2)
This is necessary to support OpenBSD 4.2 install, withoutthis change it triggers an assert.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Set revision in eeprom correctly for 82557 versions.
This is necessary to make FreeBSD recognize the device as 82557 - otherwise itsdriver will use unsupported features and fail to work.
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 interestingways if they want to crash qemu.
This patch replaces asserts that are directly dependent on guest-accessible...
pci: move unregister from PCIDevice to PCIDeviceInfo
One more cleanup while being at it ;)
Revert "eepro100: Remove unused device status entries"
This reverts commit 3031efabd0bb744126a53f32c5426580b5d394d5.
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. Neverthelessthey belong to the same family and will be supportedby this driver some day....
A lot of entries are unused (they were added by copy + pastefrom other drivers during development of eepro100.c).
Removing them from nic_save, nic_load makes anyold saved status incompatible, so a new version...
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. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
eepro100: Fix format strings in debug messages
size_t arguments need %zu instead of %d.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
eepro100: Replace sprintf by snprintf
eepro100: Remove unused code
eepro100: Enhanced logging and comments
Make string arrays used to convert numbers to strings when DEBUG_EEPRO100 is enabled const.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
eepro100: Clean code which sets the PCI device id
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:...
On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote:
Bug fix for segfault when run as i82551 HW:...
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...
eepro100: convert casts to DO_UPCAST()
eepro100: cast a void * makes no sense
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
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 initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
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 theethernet frame size (102+1460 is the maximum I have seen so far),...
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 overflowIntroduce the MAX_TCB_BYTE_COUNT macroAllocate buf big enough as HW needs (MAX_ETH_FRAME_SIZE -> MAX_TCB_BYTE_COUNT)...
Make CPURead/WriteFunc structure 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Update to a hopefully more future proof FSF address
qdev: update pci device registration.
Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunchof parameters. Also adds config_read and config_write callbacks toPCIDeviceInfo, so drivers needing these can be converted to the qdevdevice API too....
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Rename pci_register_io_region() to pci_register_bar()
This function is used to manage a PCI BAR, so make the more genericpci_register_io_region() available to other uses.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
net: add fd_readv() handler to qemu_new_vlan_client() args
This, apparently, is the style we prefer - all VLANClientStateshould be an argument to qemu_new_vlan_client().
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
net: re-name vc->fd_read() to vc->receive()
VLANClientState's fd_read() handler doesn't read from filedescriptors, it adds a buffer to the client's receive queue.
Re-name the handlers to make things a little less confusing.
net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors.
net: add return value to packet receive handler
This allows us to handle queue full conditions rather than droppingthe packet on the floor.
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
PCI network qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
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
Replace gcc variadic macro extension with C99 version
Pci nic: pci_register_device can fail
The pci_register_device() call in PCI nic initialization routines canfail. Handle this failure and propagate a meaningful error message tothe user instead of generating a SEGV.
Cc: Marcelo Tosatti <mtosatti@redhat.com>...
Introduce VLANClientState::cleanup() (Mark McLoughlin)
We're currently leaking memory and file descriptors on devicehot-unplug.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
Use NICInfo::model for eepro100 savevm ID string (Mark McLoughlin)
NICInfo::model will always be identical to the device name stringswe're currently passing to nic_init(). Just re-use NICInfo::model.
This makes it clear why we use vc->model for unregister_savevm()...
Clean some PCI defines (Stefan Weil)
this patch adds some more defines from linux/pci_regs.h tohw/pci.h. There is now no longer a need to define them ineepro100.c, so they were removed there.
Some defines from linux/pci_regs.h had similar, but notthe same defines in hw/pci.h (PCI_REVISION_ID / PCI_REVISION,...
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
Add and use remaining #defines for PCI device IDs (Stuart Brady)
This patch adds and uses #defines for the remaining hardcoded PCIdevice IDs. It also moves definitions taken from linux/pci_ids.hinto a separate header (hw/pci_ids.h), removes the 'RTL' from...
qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti)
Change the PCI network drivers init functions to return the PCIDev, toinform which slot has been hot-plugged.
Also record PCIDevice structure on NICInfo to locate for release on...
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 recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom 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()...
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 canuse their own names rather than parsing the output of 'info network'.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
Add qemu_format_nic_info_str() (Mark McLoughlin)
Factor out a simple little function for formatting a NIC'sinfo_str and make all NICs use it.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6218 c046a42c-6fe2-441c-8c8c-71466251a162
Add a model string to VLANClientState (Mark McLoughlin)
Don't lose track of what type/model a vlan client is so that we cane.g. assign a global per-model id to clients.
The entire patch is basically a tedious excercise in making sure thetype/model string gets propagated down to qemu_new_vlan_client()....
Change MMIO callbacks to use offsets, not absolute addresses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
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
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
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
Less magic constants, by Filip Navara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3170 c046a42c-6fe2-441c-8c8c-71466251a162
Improved EEPRO 100 emulation, by Filip Navara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3163 c046a42c-6fe2-441c-8c8c-71466251a162
E100 savevm/loadvm support, patch by Jason Wessel.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3041 c046a42c-6fe2-441c-8c8c-71466251a162
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
Eepro100 emulation, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2584 c046a42c-6fe2-441c-8c8c-71466251a162