Commit Graph

34 Commits

Author SHA1 Message Date
Mark McLoughlin 163bf3a56d net: convert etrax to NICState
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 09:41:32 -06:00
Mark McLoughlin e13b10be5c net: remove NICInfo::vc
Since 1cc33683, this field is not set for most devices, so just
remove it and its remaining few uses.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03 09:41:28 -06:00
Mark McLoughlin 70783b9c9b net: add receive_raw parameter to qemu_new_vlan_client()
Trivial patch to allow supplying a receive_raw function.

A future cleanup should combine this function pointer parameters into a
table.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:29:01 -05:00
Mark McLoughlin bb6e636443 net: add a client type code
This is so as to allow APIs which operate on specific client types
without having to add a function table entry which is only implemented
by a single client type.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:29:00 -05:00
Mark McLoughlin 283c7c63f5 net: allow NICs to be connected to netdevs
Introduce a 'peer' member to VLANClientState as an alternative
to a vlan. The idea being that packets are transfered directly
from peer clients rather than going through a vlan.

Patchworks-ID: 35516
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-15 09:32:02 -05:00
Anthony Liguori c227f0995e 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
and cope with it.

This reverts commit 99a0949b72.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01 16:12:16 -05:00
malc 99a0949b72 Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <av1474@comtv.ru>
2009-10-01 22:45:02 +04:00
Blue Swirl d60efc6b0d Make CPURead/WriteFunc structure 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-25 18:29:31 +00:00
Mark McLoughlin ae50b2747f Don't leak VLANClientState on PCI hot remove
destroy_nic() requires that NICInfo::private by a PCIDevice pointer,
but then goes on to require that the same pointer matches
VLANClientState::opaque.

That is no longer the case for virtio-net since qdev and wasn't
previously the case for rtl8139, ne2k_pci or eepro100.

Make the situation a lot more clear by maintaining a VLANClientState
pointer in NICInfo.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-09 16:58:07 -05:00
Avi Kivity 1eed09cb4a 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 <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16 15:18:37 -05:00
Edgar E. Iglesias ba494313d3 etrax: Don't pass CPUState to peripherals.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-15 21:00:50 +02:00
Mark McLoughlin 4f1c942b7f 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 <markmc@redhat.com>
2009-06-09 11:38:49 +01:00
Mark McLoughlin e3f5ec2b5e net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09 11:38:49 +01:00
Mark McLoughlin cda9046ba7 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 <markmc@redhat.com>
2009-06-09 11:38:49 +01:00
Mark McLoughlin 463af5349a 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 <markmc@redhat.com>
2009-06-09 11:38:49 +01:00
Edgar E. Iglesias 678fdca87a etrax: Remove unused eth irq line.
The ethernet blocks irq line to report errors is unimplemented in QEMU.
Remove it for now.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-18 21:34:00 +02:00
Edgar E. Iglesias 4af6e404e8 ETRAX: Correct setting of ethernet station address.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-13 10:17:21 +02:00
aliguori b946a15332 Introduce VLANClientState::cleanup() (Mark McLoughlin)
We're currently leaking memory and file descriptors on device
hot-unplug.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
2009-04-17 17:11:08 +00:00
edgar_igl cc53adbca0 CRIS: Fix remaining build warnings.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6638 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-22 11:59:59 +00:00
aliguori 487414f1cb hw: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05 22:06:05 +00:00
aliguori 0ae18ceeaa Check NIC model in some NIC init functions (Mark McLoughlin)
Some NIC init functions are only called when that model is
the only valid model. In that case, it makes sense to use
qemu_check_nic_model() from the NIC init function itself.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6286 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-13 19:39:36 +00:00
edgar_igl 94410b78be ETRAX: Let the ethernet PHY report the current link-state.
* PHY reports correct link-state.
* Allow the board description to assign separate addresses to each PHY.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6255 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-09 00:04:35 +00:00
aliguori 7a9f6e4a8d 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 <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6220 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07 17:48:51 +00:00
aliguori bf38c1a0e1 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().

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6216 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07 17:42:25 +00:00
edgar_igl 35ef81d6d2 ETRAX: Correct size of control-register area.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6209 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07 14:00:33 +00:00
pbrook 8da3ff1809 Change MMIO callbacks to use offsets, not absolute addresses.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-01 18:59:50 +00:00
edgar_igl aa25cf4694 ETRAX-FS: Drop DMA polling for ethernet.
* Drop DMA poll mode. Instead immediately push rx frames straight into the DMA
  without waiting for DMA_run to poll them of the fifo.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5520 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-24 09:18:39 +00:00
edgar_igl c64882682d ETRAX-FS: Correct ethernet PHY diagnostics register reads.
* Correct ethernet PHY diagnostics register reads.
* Add friendly names for the speed/duplex fields.
* Report duplex mismatches between MAC and PHY.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5300 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-22 20:34:18 +00:00
edgar_igl d27b2e5044 Avoid refering to CRIS specific cpu-state to be able to use these blocks with other cores.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4806 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-30 11:51:12 +00:00
edgar_igl d297f464d3 Avoid CRIS related warnings by Jan Kiszka.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4804 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-30 08:59:49 +00:00
edgar_igl 9bcd77d6b1 ETRAX: Avoid compiler warning.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4593 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-27 21:05:21 +00:00
edgar_igl f6953f1345 ETRAX: Add support for the ethernet receivers dest addr filters.
* Support the station address filters MA0 and MA1.
* Model the group address bloom filter.
* Indentation.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4487 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-18 08:50:32 +00:00
edgar_igl 2e56350ef1 ETRAX: Add some kind of support for simulating 802.3 auto-negotiation.
* Add support for link partner ability and diagnostics reg.
* Correct the endianess for MDIO responses.
* Dont trash PHY registers after reads.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4456 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-13 23:51:49 +00:00
edgar_igl a3ea5df588 Add limited support for the etrax ethernet controller.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4429 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-11 15:04:22 +00:00