summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_vic.c
AgeCommit message (Collapse)Author
2008-07-07tweak the alignment of the rx buffers so the headers in the frame areDavid Gwynne
better aligned for fast access. i didnt bench, so maybe this does nothing.
2007-11-28use correct data type for the pci address (bus_addr_t)Reyk Floeter
From mickey
2007-10-28let vic attach to the virtual pcnet hardware in vmware.David Gwynne
tested on real hardware by jsing@ to ensure pcn(4) isnt affected in the real world. ok jsing@
2007-10-23shrink dmesg output to one line that shows irq and the ethernet address.David Gwynne
the vmxnet id never changes. ok reyk@
2007-06-15the multicast filter is operated on as an array of u_int16_t's, not theDavid Gwynne
u_int32_t's like its described as in the chip descriptors. fixing this stops the driver from overwriting the field next to the multicast filter that specifies the number of tx descriptors we give the nic. we were accidentally telling the chip we had 32 thousand tx descriptors when we only have 100. trying to complete the 101th tx descriptor causes panics.
2007-05-26one extern seems to be better than 20 for ifqmaxlen; ok krwJason Wright
2007-05-04when it does not compile we KNOW it was not tested. come onTheo de Raadt
2007-05-04do not call vic_init() on ENETRESET in the ioctl handler, useReyk Floeter
vic_iff() instead. vic_init() calls vic_init_data() which sets up the rings and allocates the dma maps. it could happen that vic_init() was called for multiple times without releasing them first by calling vic_uninit_data(). ouch! this may have caused some problems related to dmamap corruption but we'll do further investigation. ok dlg@
2007-04-22this is my previous commit again, but this time it was tested.David Gwynne
dma sync the rx mbuf before we push it to the hardware. technically this isnt necessary cos bus_dmamap_sync is a nop on i386 and amd64. but i like to be correct, and someone might read this as an example of how to write a driver.
2007-04-21backout: compile before you commit, pleaseTheo de Raadt
2007-04-21when allocating a new mbuf for rx, do a dmamap_sync before handing it toDavid Gwynne
the hardware. oops.
2007-04-17a break in the default case, while unnecessary, is still nice.David Gwynne
2007-04-17point ifreq in the ioctl path at something, so we can void dereferencingDavid Gwynne
random memory.
2007-04-14replace IPL_BIO with IPL_NET. vic(4) is a networking driver, not blockReyk Floeter
I/O... ;) ok dlg@
2007-01-30update vic(4) to use the LINK_STATE_IS_UP() macroReyk Floeter
2006-12-14remove an ugly macro that made claudio sad. luckily it wasnt being used.David Gwynne
2006-12-03always assume full duplex state if the interface is up... what doesReyk Floeter
full duplex mean for a virtual interface?
2006-12-03re-add a tiny little #ifdef VIC_DEBUG, used to compare the vic(4)Reyk Floeter
features and capabilities on different vmware platforms.
2006-11-09no need to check for IFF_ALLMULTI when we just removed the flag...Reyk Floeter
2006-11-09knfReyk Floeter
2006-11-09add multicast filter support instead of using ALLMULTI all the timeReyk Floeter
2006-11-06set the rx filters after setting the shared data address.Reyk Floeter
this fixes a crash of old vmware versions (like workstation 4.5.2) when bringing the interface up. it didn't crash the openbsd kernel running as a guest system, it did crash the complete vmware host application. that's why i dislike VMs, they're so buggy and insecure... ok dlg@ fkr@
2006-11-02if the hardware doesnt say it can do scatter gather lists for tx, thenDavid Gwynne
limit it to one dma segment so it only fills one scatter gather entry.
2006-11-02comments like "schedule timeout" before going timeout_add are dumb. learnDavid Gwynne
to read the code.
2006-11-02dont set tx_stopped when we actually want to do tx.David Gwynne
2006-11-02pointers in hardware structures are stupid. shame on you vmware.David Gwynne
this should have a chance at running on amd64 now. can anyone test?
2006-11-02reyk said i can put my copyright on this file too.David Gwynne
2006-11-02merge the register description into the c file. nothing else will everDavid Gwynne
use the reg descriptions, so why pollute the tree with it?
2006-11-02set up a tick to check the link state every second.David Gwynne
2006-11-02remove cruftDavid Gwynne
2006-11-02split the initialisation of the dma area up between the attach path and theDavid Gwynne
interface init path. the init path now does the allocation of the dmamaps for both tx and rx, and allocates the mbufs for the rx ring. the interface stop is now uncommented. it waits for the hardware to stop working, and cleans up the bits allocated in the init path. ifconfig vic0 up and ifconfig vic0 down both work now.
2006-11-02set the proper maximum queue length.Brad Smith
2006-11-02we sync regions in the dma area anymore, we just sync the whole thing. thisDavid Gwynne
means the insane macro used to calculate the offset for syncing can go away.
2006-11-02VIC_DEBUG is useless, so it goes awayDavid Gwynne
2006-11-02more whitespace fixesDavid Gwynne
2006-11-02rewrite the tx path so it doesnt feel so lopsided.David Gwynne
now i can have coffee!
2006-11-02whitespaces cleanup, no functional changeFelix Kronlage
ok dlg@
2006-11-01Use correct error message as return value. OK dlg@Claudio Jeker
2006-11-01fix the tx path so it can use more than one scatter gather entry whenDavid Gwynne
sending the packet. this makes it less likely that we'll have to repack fragmented packets for transmission.
2006-11-01let the tx completion path clean up by recording which mbuf we'reDavid Gwynne
sending in the tx forward path. gotta love one line fixes... committed over vic
2006-11-01vmware frames are slightly short, but that is ok. done with clues fromDavid Gwynne
brad@
2006-11-01fix the barriers in setlladdr.David Gwynne
2006-10-31we're passing physical addresses to the adapter, so say so. add some magicDavid Gwynne
that lets me see packets coming out of the box.
2006-10-31absolutely huge reworking on this driver (sorry reyk). so far attach,David Gwynne
resource mapping, mem allocation, init, and rx is working. the tx path needs work, but that can happen in tree. overall it's closer to working than the old code. if_vicvar.h goes away since nothing else uses it. im getting this in so other people can play with it too. ok brad@
2006-05-31- stop counting input/output bytes in the driver as this is taken care ofBrad Smith
in ether_input/ether_output. - only count input packets when sure the packet can be received as opposed to counting it unconditionally, then potentially running into an error and then dropping the packet. ok reyk@
2006-05-28- remove ETHER_MAX_LEN_JUMBO and ETHERMTU_JUMBO.Brad Smith
- use if_hardmtu for MTU ioctl handlers. ok reyk@
2006-05-28unknown ioctl is ENOTTY not EINVALJason Wright
2006-03-25allow bpf(4) to ignore packets based on their direction (inbound orDamien Miller
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
2006-03-04- Use sc->sc_dev.dv_xname everywhere.Brad Smith
- Always set IFCAP_VLAN_MTU. - Remove some printf's from the error paths in vic_alloc_mbuf(). - Move the device struct up to the top of the softc struct so the driver will actually attach.. sometimes, still issues to resolve.
2006-02-26clean up if there is a failure to attach.Brad Smith