summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_vr.c
AgeCommit message (Collapse)Author
2009-11-25Just some minor cleanup. OK deraadt@Claudio Jeker
2009-11-25Consider any tx buffer that is freed in vr_stop() to be an unsentTheo de Raadt
packet, ie. an output error. This way, we'll be able to see if the seized interfaces had tx packets queued. ok claudio
2009-11-25Re-enable the debug messages from bus errors and tx underruns so thatTheo de Raadt
we can dianose if those ever happen. ok claudio
2009-11-25Do not call vr_stop() and vr_reset() before calling vr_init(), becauseTheo de Raadt
the latter does that itself. ok claudio
2009-08-13- consistify cfdriver for the ethernet drivers (0 -> NULL)Jasper Lievisse Adriaanse
ok dlg@
2009-08-10A few more simple cases of shutdown hooks which only call xxstop, whenTheo de Raadt
we now know the interface has already been stopped
2009-08-09MCLGETI() will now allocate a mbuf header if it is not provided, thusTheo de Raadt
reducing the amount of splnet/splx dancing required.. especially in the worst case (of m_cldrop) ok dlg kettenis damien
2009-06-18Remove the if (1) that makes blambert@ cry. Appreciated blambert@Claudio Jeker
2009-06-18MCLGETI support for vr(4) interfaces. This will make the newer soekris andClaudio Jeker
Alix boards suck a little bit less because it will be harder to live lock them with traffic. Diff mostly adapted from sis(4). OK kettenis@, dlg@, sthen@
2009-06-04move redundant bus_dmamap_sync calls outside an if/else block.Stuart Henderson
from Brad; ok chris@
2009-05-29Return the RX descriptor after pointing it to the new mbuf.Marco Pfatschbacher
Otherwise the card can mess with mbufs that have been given to the stack already. Fixes panics seen with a high rate of of small packets and POOL_DEBUG enabled. OK sthen@, chris@
2009-05-21always set VR_RXCFG_RX_MULTI when setting the chip into promiscuousStuart Henderson
mode; VR_RXCFG_RX_PROMISC isn't enough to allow reception of multicast frames. Discussed with Brad, ok dlg@.
2009-05-12cleanup and simplify promiscuous/multicast setup (setmulti -> iff).Stuart Henderson
from Brad; ok dlg.
2009-05-12Fix the URL for datasheets.Stuart Henderson
2009-05-11in the case where mbufs had to be copied _and_ checksums were enabled,Stuart Henderson
m_head could be accessed after it had been freed, so do the access earlier. from chris@.
2009-05-11preliminary parts for hw vlan tag insertion/removal, ideas gleaned fromStuart Henderson
via rhinefet. not yet used, but committing now so it isn't lost. from chris@, ok dlg.
2009-05-11On VT6105M, use hardware IP, TCP and UDP checksums in and out. Tested onStuart Henderson
alix/net5501 with and without software vlan tagging, also with NFS (v2, v3, UDP, TCP). Not used on earlier chips and does not introduce problems on original EPIA board. From chris@, based on enhancements in the FreeBSD driver. "put it in then" dlg@, looks good to claudio@.
2009-05-11Start using VR_RXSTAT_RX_OK instead of VR_RXSTAT_ERR (It existsStuart Henderson
from the oldest vt86c100a datasheet to the newest vt6105m. FreeBSD indicates that it is more reliable than VR_RXSTAT_ERR for detecting error conditions, that its use results in less incorrectly dropped packets). From chris@.
2009-05-10- fix whitespace problems (introduces no change with diff -w)Stuart Henderson
- s/FreeBSD/OpenBSD/ in comment, suggested by mpf no binary change.
2009-05-10- use nitems() rather than handrolled version.Stuart Henderson
- add HWTAG capability to the quirks table. not yet used. from chris@. no functional change.
2009-05-10- change device matching to use a quirks table.Stuart Henderson
- avoid the need for unnecessary mbuf copies on modern vr(4) devices (ancient ones required longword-alignment, but this has not been the case for several generations now). reduces cpu time, particularly for forwarded traffic. from chris@. tested by chris@, myself, Emilio Perea on various devices including original VIA EPIA, Soekris net5501, pcengines.ch ALIX. ok mpf. deraadt and dlg agree with committing at this stage.
2009-04-30The previous change did not always update vr_link on rlphy(4) basedMarco Pfatschbacher
interfaces. Therefore we now always start off with vr_link = 1. Bug found and feedback by Emilio Perea. OK sthen@
2009-04-28The TX engine can get stuck if the interface went through a linkMarco Pfatschbacher
state change. Workaround by resetting the chip if necessary. Also do not try to send packets if our link is down, as this triggers watchdog timeouts. While there correct the VR_RXSTAT_RX_OK define (not used yet). Changes inspired from FreeBSDs overhauled vr(4). Testing, input and OK sthen@
2009-03-29make various strings ("can't map mem space" and similar) more consistentStuart Henderson
between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod.
2008-11-28Eliminate the redundant bits of code for MTU and multicast handlingBrad Smith
from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
2008-10-14Change m_devget()'s outdated and unused "offset" argument: It isChristian Weisgerber
now the offset into the first mbuf of the target chain before copying the source data over. From FreeBSD. Convert drivers' use of m_devget(). Mostly from thib@. Update mbuf(9) man page. ok claudio@, thib@
2008-10-02First step towards cleaning up the Ethernet driver ioctl handling.Brad Smith
Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
2008-09-24Fix a vr(4) panic that occurs under high load.Marco Pfatschbacher
If the RX path runs into an out of mbuf scenario, the code will leave the RX chain with a NULL'd mbuf-slot. We now always reassign a valid mbuf, even if m_devget() fails. OK brad@, thib@
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-07-24dont need malloc.h anymore; plus two tiny whitespace fixesThordur I. Bjornsson
2008-07-18o Use mbufs, for the RX ring, instead of malloc()'ing an MCLBYTES sized buffer.Thordur I. Bjornsson
o On non-strict alignment archs, dont copy the mbuf, every time, unload it, and send it up the stack and just get a new one for the rx ring. We still do the copy on strict alignment archs though... o create a function to handle mbuf allocation for the rx ring, vr_mbuf_alloc(), use it to allocate the mbufs and shuffle the bus dma setup around. ideas/code from vic(4) and sis(4); ok reyk@, brad@, dlg@ tested by many, been in snapshots for a while.
2008-05-22More timeout(9) usage cleaned up.Michael Knudsen
ok claudio
2008-02-07Add the SIOCSIFMTU ioctl to allow ioctl changes;Thordur I. Bjornsson
ok brad@ (w/ comments), reyk@
2007-11-26typos; ok jmc@Martynas Venckus
sys/netinet/in_pcb.c and sys/net/bridgestp.c ok henning@ sys/dev/pci/bktr/* ok jakemsr@
2007-10-02In vr_attach() only touch the VR_STICKHW register if the adapterBrad Smith
is found to have PCI power management capability. It has been found that unconditionally touching this register with the original VIA Rhine chipset, which does not have power management capability, and due to the shorter width of the IO addess space, it is possible for the vr(4) driver to do bad things with hw with IO address space adjacent to a vr(4) adapter. Tested by a few users, brad@ and jmc@. ok dlg@
2007-09-12Remove the old software bit-banging MII interface, we started usingBrad Smith
the Rhine's shift registers four and a half years ago (1.31). From phk@FreeBSD ok dlg@ Tested by brad@ and Jacob Yocom-Piatt.
2007-09-01Add VLAN reception support to vr(4). Diff from Brad.Marcus Glocker
OK claudio@
2006-11-03vr_rxeof(): stick receive error messages under VR_DEBUG.Brad Smith
vr_init(): add debug printfs for some error conditions.
2006-11-03vr_intr(): remove duplicate check for VR_ISR_RX_NOBUF and the "packet lost"Brad Smith
printf which will never be reached.
2006-09-22put a few printf's in the interrupt handler under VR_DEBUG.Brad Smith
2006-06-17add sys/timeout.hBrad Smith
2006-05-28unknown ioctl is ENOTTY not EINVALJason Wright
2006-04-28check for IFF_RUNNING being set before calling vr_init().Brad Smith
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-20de-register.Brad Smith
2006-02-07move the devices list up a bit.Brad Smith
2006-02-06vr_start(): return if IFF_OACTIVE is set.Brad Smith
From FreeBSD via Andrey Matveev
2006-02-05make sure to set or clear the RX mode promiscuous bit.Brad Smith
tested by Andrey Matveev
2006-02-05call vr_setmulti() if adjusting PROMISC or ALLMULTI and do not do a fullBrad Smith
re-init if configuring the IP address. tested by Andrey Matveev
2006-01-14- the allmulti target initially enables all multicast mode so don't botherBrad Smith
checking the IFF_ALLMULTI flag. - clean up vr_encap() a bit. From: Andrey Matveev <evol at online dot ptt dot ru>