summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_vr.c
Commit message (Collapse)AuthorAgeFilesLines
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-6/+3
| | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
* Close PR# 19617: add support for VIA VT6102 NICs to VIA Rhine driver.wpaul2000-07-051-0/+2
|
* Use the correct register name. s/PCI_COMMAND_STATUS_REG/PCIR_COMMAND/peter2000-05-281-3/+3
|
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-36/+0
| | | | | | | | | | | | | | | of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
* Depend on miibus.peter2000-04-291-0/+2
| | | | | | | | Note that if_aue doesn't strictly depend on usb because it uses the method interface for calls rather than using internal symbols, and because it's a child driver of usb and therefore will not try and do anything unless the parent usb code is loaded at some point. if_aue does strictly depend on miibus as it will fail to link if it is missing.
* Change contigmalloc() lower memory bound from 1MB to 0 to improvewpaul1999-09-251-1/+1
| | | | | | | chances of allocations succeeding on systems with small amounts of RAM. Pointed out by: bde
* As suggested by phk, unconditionalize BPF support in these drivers. Sincewpaul1999-09-231-10/+2
| | | | | | | there are stubs compiled into the kernel if BPF support is not enabled, there aren't any problems with unresolved symbols. The modules in /modules are compiled with BPF support enabled anyway, so the most this will do is bloat GENERIC a little.
* Tweak these for what I hope is the last time: change the DRIVER_MODULE()wpaul1999-09-221-1/+1
| | | | | | | | | | declaration for the interface driver from "foo" to "if_foo" but leave the declaration for the miibus attached to the interface driver alone. This lets the internal module name be "if_foo" while still allowing the miibus instances to attach to "foo." This should allow ifconfig to autoload driver modules again without breaking the miibus attach.
* Un-do the changes to the DRIVER_MODULE() declarations in these drivers.wpaul1999-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This whole idea isn't going to work until somebody makes the bus/kld code smarter. The idea here is to change the module's internal name from "foo" to "if_foo" so that ifconfig can tell a network driver from a non-network one. However doing this doesn't work correctly no matter how you slice it. For everything to work, you have to change the name in both the driver_t struct and the DRIVER_MODULE() declaration. The problems are: - If you change the name in both places, then the kernel thinks that the device's name is now "if_foo", so you get things like: if_foo0: <FOO ethernet> irq foo at device foo on pcifoo if_foo0: Ethernet address: foo:foo:foo:foo:foo:foo This is bogus. Now the device name doesn't agree with the logical interface name. There's no reason for this, and it violates the principle of least astonishment. - If you leave the name in the driver_t struct as "foo" and only change the names in the DRIVER_MODULE() declaration to "if_foo" then attaching drivers to child devices doesn't work because the names don't agree. This breaks miibus: drivers that need to have miibuses and PHY drivers attached never get them. In other words: damned if you do, damned if you don't. This needs to be thought through some more. Since the drivers that use miibus are broken, I have to change these all back in order to make them work again. Yes this will stop ifconfig from being able to demand load driver modules. On the whole, I'd rather have that than having the drivers not work at all.
* Grrr. Okay, changing the devnames was a bad idea. Put them back the waywpaul1999-09-201-1/+1
| | | | they were.
* Fix the strings in the driver_t structs so that they match the new nameswpaul1999-09-201-1/+1
| | | | in the DRIVER_MODULES() declarations. *sigh*
* Goofed and didn't change the second DRIVER_MODULE() linking these withobrien1999-09-201-1/+1
| | | | | | the miibus. Noticed by: wpaul
* Change the name we register with DRIVER_MODULE() to include the leadingobrien1999-09-201-1/+1
| | | | | | "if_". Reviewed by: msmith, wpaul
* Convert the VIA Rhine driver to miibus.wpaul1999-09-191-497/+111
|
* Patch if_vr to add bridging support.wpaul1999-09-171-1/+20
| | | | | PR: 12385 Submitted by: lyndon@orthanc.ab.ca
* $Id$ -> $FreeBSD$peter1999-08-281-2/+2
|
* Small tweak: remember to free the tx ring data (which is malloc()ed) ifwpaul1999-08-101-2/+3
| | | | we have to bail out of vr_attach().
* Convert the VIA Rhine driver to newbus and set it up to be compiled aswpaul1999-08-101-102/+177
| | | | | | | | | | a module. Also modified the code to work on FreeBSD/alpha and added device vr0 to the alpha GENERIC config. While I was in the neighborhood, I noticed that I was still using #define NFPX 1 in all of the Makefiles that I'd copied from the fxp module. I don't really use #define Nfoo X so it didn't matter, but I decided to customize this correctly anyway.
* Rename bpfilter to bpf.des1999-07-061-7/+7
|
* Change the cast in pci_map_port() from u_short * to pci_port_t * so itpeter1999-07-021-3/+3
| | | | | | | compiles cleanly on the Alpha. (On the alpha, the port type is an int, not a short). Cast a couple of pointers to ints via 'uintptr_t' rather than 'unsigned int' since uintptr_t is long (64 bit) on Alpha, as are pointers.
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:peter1999-05-091-6/+2
| | | | | | | | #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.)
* Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn'tpeter1999-04-241-2/+6
| | | | hurt the driver portability to 3.x too much for where drivers are shared.
* Add support for still more cheapo 10/100 cards: Delta Electronics andwpaul1999-02-231-2/+6
| | | | | | | | | | Addtron appear to have their own VIA Rhine II and RealTek 8139 boards with custom PCI vendor and device IDs. This commit updates the PCI vendor and device lists in the vr and rl drivers so that we can probe the additional devices. Found by: nosing around the PCI vendor and device code list at: http://www.halcyon.com/scripts/jboemler/pci/pcicode
* Remember to initialize ifp->if_snd.ifq_maxlen.wpaul1999-02-011-2/+3
|
* Tweak the vr_start() and vr_rxeof() routines a little to improvewpaul1999-01-101-29/+10
| | | | | | | performance and reliability a little. There was a condition before where transmission would stall during periods of heavy traffic exchange between two hosts. Also set the 'want interrupt' bit in receive descriptor control words.
* Minor bug: in the case where allocating a fresh mbuf for the receive ringwpaul1999-01-031-4/+3
| | | | | | fails, we need to set the descriptor status word so that the 'OWN' bit is set again so that the chip can reuse it. Previously, this wasn't being done.
* The VIA Rhine appears to be yet another chip that always includes thewpaul1998-12-241-2/+11
| | | | | ethernet CRC in received frames and has no option to turn this behavior off. Trim the CRC off manually in vr_rxeof().
* probe function changed from returning char * to const char *.dillon1998-12-141-4/+4
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-3/+3
| | | | and local variables, goto labels, and functions declared but not defined.
* Add sanity check to foo_start() routines: in the unlikely (thoughwpaul1998-12-051-2/+8
| | | | | | apparently possible) event that the transmit start routine is called with and empty if_snd queue, bail out instead of dereferencing unilitialized transmit list pointers and panicking.
* An early Christmas present: add driver support for a whole bunch ofwpaul1998-12-041-0/+1962
PCI fast ethernet adapters, plus man pages. if_pn.c: Netgear FA310TX model D1, LinkSys LNE100TX, Matrox FastNIC 10/100, various other PNIC devices if_mx.c: NDC Communications SOHOware SFA100 (Macronix 98713A), various other boards based on the Macronix 98713, 98713A, 98715, 98715A and 98725 chips if_vr.c: D-Link DFE530-TX, other boards based on the VIA Rhine and Rhine II chips (note: the D-Link and certain other cards that actually use a Rhine II chip still return the PCI device ID of the Rhine I. I don't know why, and it doesn't really matter since the driver treats both chips the same anyway.) if_wb.c: Trendware TE100-PCIE and various other cards based on the Winbond W89C840F chip (the Trendware card is identical to the sample boards Winbond sent me, so who knows how many clones there are running around) All drivers include support for ifmedia, BPF and hardware multicast filtering. Also updated GENERIC, LINT, RELNOTES.TXT, userconfig and sysinstall device list. I also have a driver for the ASIX AX88140A in the works.
OpenPOWER on IntegriCloud