summaryrefslogtreecommitdiffstats
path: root/hw/etraxfs_eth.c
Commit message (Collapse)AuthorAgeFilesLines
* Add endianness as io mem parameterAlexander Graf2010-12-111-1/+2
| | | | | | | | | | | | | As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* etraxfs_eth: correct use of ! and &Blue Swirl2010-08-261-1/+1
| | | | | | | | | | | | | | | | | Combining bitwise AND and logical NOT is suspicious. Fixed by this Coccinelle script: // From http://article.gmane.org/gmane.linux.kernel/646367 @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* etrax: Update ethernet mgm-ctrl reg on writesEdgar E. Iglesias2010-07-251-0/+1
| | | | | | | | Some SW drivers dont keep track of what they've written and depend on the HW latching write contents for later read+modify+write sequences. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* cris: remove dead assignments, spotted by clang analyzerBlue Swirl2010-04-251-1/+1
| | | | | | Value stored is never read. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* net: convert etrax to NICStateMark McLoughlin2009-12-031-18/+27
| | | | | Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: remove NICInfo::vcMark McLoughlin2009-12-031-5/+5
| | | | | | | | 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>
* net: add receive_raw parameter to qemu_new_vlan_client()Mark McLoughlin2009-10-271-1/+1
| | | | | | | | | | 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>
* net: add a client type codeMark McLoughlin2009-10-271-1/+2
| | | | | | | | | 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>
* net: allow NICs to be connected to netdevsMark McLoughlin2009-10-151-1/+2
| | | | | | | | | | 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>
* Revert "Get rid of _t suffix"Anthony Liguori2009-10-011-3/+3
| | | | | | | | | | | | 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 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Get rid of _t suffixmalc2009-10-011-3/+3
| | | | | | | Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
* Make CPURead/WriteFunc structure 'const'Blue Swirl2009-08-251-2/+2
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Don't leak VLANClientState on PCI hot removeMark McLoughlin2009-07-091-3/+3
| | | | | | | | | | | | | | | 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>
* Remove io_index argument from cpu_register_io_memory()Avi Kivity2009-06-161-1/+1
| | | | | | | | | 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>
* etrax: Don't pass CPUState to peripherals.Edgar E. Iglesias2009-06-151-5/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* net: add return value to packet receive handlerMark McLoughlin2009-06-091-3/+5
| | | | | | | This allows us to handle queue full conditions rather than dropping the packet on the floor. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* net: pass VLANClientState* as first arg to receive handlersMark McLoughlin2009-06-091-3/+3
| | | | | | Give static type checking a chance to catch errors. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
* net: re-name vc->fd_read() to vc->receive()Mark McLoughlin2009-06-091-1/+1
| | | | | | | | | 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>
* net: add fd_readv() handler to qemu_new_vlan_client() argsMark McLoughlin2009-06-091-1/+1
| | | | | | | 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>
* etrax: Remove unused eth irq line.Edgar E. Iglesias2009-05-181-3/+1
| | | | | | | 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>
* ETRAX: Correct setting of ethernet station address.Edgar E. Iglesias2009-05-131-2/+2
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Introduce VLANClientState::cleanup() (Mark McLoughlin)aliguori2009-04-171-1/+12
| | | | | | | | | | | 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
* CRIS: Fix remaining build warnings.edgar_igl2009-02-221-2/+1
| | | | | | | | 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
* hw: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori2009-02-051-8/+0
| | | | | | | | 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
* Check NIC model in some NIC init functions (Mark McLoughlin)aliguori2009-01-131-0/+2
| | | | | | | | | | | | | 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
* ETRAX: Let the ethernet PHY report the current link-state.edgar_igl2009-01-091-3/+20
| | | | | | | | | | * 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
* Add a -net name=foo parameter (Mark McLoughlin)aliguori2009-01-071-1/+1
| | | | | | | | | | | | | | 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
* Add a model string to VLANClientState (Mark McLoughlin)aliguori2009-01-071-1/+1
| | | | | | | | | | | | | | | 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
* ETRAX: Correct size of control-register area.edgar_igl2009-01-071-42/+18
| | | | | | | 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
* Change MMIO callbacks to use offsets, not absolute addresses.pbrook2008-12-011-6/+0
| | | | | | | Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX-FS: Drop DMA polling for ethernet.edgar_igl2008-10-241-46/+4
| | | | | | | | | | | * 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
* ETRAX-FS: Correct ethernet PHY diagnostics register reads.edgar_igl2008-09-221-4/+51
| | | | | | | | | * 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
* Avoid refering to CRIS specific cpu-state to be able to use these blocks ↵edgar_igl2008-06-301-6/+5
| | | | | | with other cores. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4806 c046a42c-6fe2-441c-8c8c-71466251a162
* Avoid CRIS related warnings by Jan Kiszka.edgar_igl2008-06-301-4/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4804 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX: Avoid compiler warning.edgar_igl2008-05-271-3/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4593 c046a42c-6fe2-441c-8c8c-71466251a162
* ETRAX: Add support for the ethernet receivers dest addr filters.edgar_igl2008-05-181-45/+162
| | | | | | | | | * 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
* ETRAX: Add some kind of support for simulating 802.3 auto-negotiation.edgar_igl2008-05-131-17/+55
| | | | | | | | | * 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
* Add limited support for the etrax ethernet controller.edgar_igl2008-05-111-0/+453
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4429 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud