aboutsummaryrefslogtreecommitdiffstats
path: root/hw/pcnet.c
AgeCommit message (Collapse)AuthorFilesLines
2009-05-22Fix lance segfaultsPaul Brook1-3/+6
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-14PCI network qdev conversionPaul Brook1-69/+64
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-03use PCI_HEADER_TYPE.Isaku Yamahata1-1/+1
use symbolic value instead of 0x0e and related value. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-05-01Pci nic: pci_register_device can failChris Wright1-0/+4
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 <mtosatti@redhat.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-04-17Introduce VLANClientState::cleanup() (Mark McLoughlin)aliguori1-9/+49
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-08pcnet: Avoid double conversion via PHYSADDRaurel321-10/+10
rdra and tdra are already kept converted in the pcnet state structure. Avoid converting derivatives a second time. The same case with the local variable xmit_cxda: it already contains a converted cxda address. This issue only causes troubles when using the pcnet in 16-bit legacy mode. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7049 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti)aliguori1-1/+2
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 hot-removal. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6593 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05hw: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori1-2/+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
2009-02-01Add and use #defines for PCI device classesblueswir11-2/+1
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 Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6491 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-26Define PCI vendor and device IDs in pci.h (Stuart Brady)aliguori1-2/+2
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() accessors as suggested by Anthony Liguori. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6442 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-17Remove unused info_str parameter to pcnet_common_init()blueswir11-3/+3
I noticed that pcnet_common_init() takes an unused 'info_str' parameter, added in r2142. Since then, we always pass "pcnet" to register_savevm() (and never "lance"). Note that r6218 changed vc->info_str to "lance" for sun4m emulation. On the assumption that it's not needed, this patch removes the parameter. If reverting the change in r2142, and registering with "lance" would be preferable, I can submit a patch to do so. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6362 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-13Check NIC model in some NIC init functions (Mark McLoughlin)aliguori1-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
2009-01-07Add a -net name=foo parameter (Mark McLoughlin)aliguori1-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
2009-01-07Add qemu_format_nic_info_str() (Mark McLoughlin)aliguori1-8/+1
Factor out a simple little function for formatting a NIC's info_str and make all NICs use it. 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@6218 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-07Add a model string to VLANClientState (Mark McLoughlin)aliguori1-2/+2
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
2008-12-02Remove address maskingblueswir11-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5853 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02Resurrect the safe part of r5274blueswir11-12/+12
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5401 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-25Revert r5274 which breaks savevm/loadvmblueswir11-12/+12
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5321 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-20Add signed versions of save/load functionsblueswir11-12/+12
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5274 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-04hw/pcnet: use qemu_socket.haurel321-6/+1
(Jan Kiszka) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5149 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-02hw/pcnet.c: windows compile fixaurel321-0/+4
(Eduardo Felipe) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5140 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-02pcnet: add loopback mode emulationaurel321-30/+59
This patch enhances the pcnet NIC emulation with better loopback mode support, including CRC generation for looped-back packets in "raw" mode. The patch has practically no impact on the normal RX and TX path. Successfully tested against an ancient proprietary pcnet driver that does a lot of hardware checks on boot-up and now works fine over qemu as well. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5135 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-20Fix debug message address formatsblueswir11-8/+15
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4910 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-20Fix wrong function names in debug messages (Stefan Weil)blueswir11-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4909 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-18Various NICs: Fix suspend/resume of multiple instances, by Jan Kiszka.ths1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4892 c046a42c-6fe2-441c-8c8c-71466251a162
2008-04-20PCnet: Allow more then two TMDs (Jan Kiszka)blueswir11-7/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4225 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-01 Register only valid register access widthsblueswir11-4/+4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3881 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-17Fix miscellaneous minor things, by Andre Przywara.ths1-4/+4
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3826 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-16qemu_put signedness fixes, by Andre Przywara.ths1-12/+12
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3824 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17Break up vl.h.pbrook1-1/+5
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-17find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in ↵ths1-35/+35
the regex. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-16find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths1-74/+74
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
2007-08-18Remove obsolete comment.ths1-2/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3122 c046a42c-6fe2-441c-8c8c-71466251a162
2007-08-16 Use qemu_irq for a reset signal between DMA and ESP/Lanceblueswir11-2/+9
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3120 c046a42c-6fe2-441c-8c8c-71466251a162
2007-06-28 Fix Lance on 32-bit hostsblueswir11-6/+29
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3033 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-27Handle unconnected vlan case in lanceblueswir11-14/+19
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2878 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-27Use qemu_irqs between dma controllers and esp, lanceblueswir11-4/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2873 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-26Split DMA controller in twoblueswir11-1/+3
Fix register size related bugs git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2869 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-19Use full 36-bit physical address space on SS10blueswir11-1/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2830 c046a42c-6fe2-441c-8c8c-71466251a162
2007-04-07Unify IRQ handling.pbrook1-19/+5
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
2007-03-06Fix unportable bitfields use which broke pcnet for big endian hosts.ths1-269/+339
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2469 c046a42c-6fe2-441c-8c8c-71466251a162
2007-01-10Devfn number for network PCI cards, by Aurelien Jarno.ths1-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2314 c046a42c-6fe2-441c-8c8c-71466251a162
2006-09-03better PCNET endianness supportbellard1-149/+74
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2147 c046a42c-6fe2-441c-8c8c-71466251a162
2006-09-03endianness fixesbellard1-96/+157
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2144 c046a42c-6fe2-441c-8c8c-71466251a162
2006-09-03initial sparc32 lance and pcnet mergebellard1-114/+327
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2142 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-14win32 compilation fixesbellard1-25/+27
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2052 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-13avoid recursive txbellard1-1/+14
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2050 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-04avoid unneeded dependenciesbellard1-18/+21
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2041 c046a42c-6fe2-441c-8c8c-71466251a162
2006-07-04pcnet nic support (Antony T Curtis)bellard1-0/+1771
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2036 c046a42c-6fe2-441c-8c8c-71466251a162