aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ep/if_ep.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Other minor style nits I missed in ep_if_start() in my previousMaxime Henrion2003-06-261-3/+4
| | | | | | | commit. Notes: svn path=/head/; revision=116887
* Make if_ep_start() look a bit more like other if_start() functions,Maxime Henrion2003-06-261-18/+13
| | | | | | | | by calling the first mbuf in the chain m0 and fixing a few nearby style bugs, mostly s/0/NULL/. Notes: svn path=/head/; revision=116884
* Fix a race condition that was introduced since pccbb interrupts areMaxime Henrion2003-06-261-7/+5
| | | | | | | | | | | | | | | | flag'ed INTR_MPSAFE. In ep_if_start(), use the IF_DEQUEUE macro to grab the next mbuf to send, and use IF_PREPEND if the card is busy and we actually can't handle it right now. The old code was first getting the mbuf by taking it from the queue without using the macros, thus without locking, and without removing it from the queue either. It was later assuming that IF_DEQUEUE would give him this same mbuf. Tested by: mich Notes: svn path=/head/; revision=116883
* - Free interrupt handler in ep_free().Matthew N. Dodd2003-03-291-0/+27
| | | | | | | | - Move ep_pccard_detach() to if_ep.c and rename to ep_detach() - Specify detach methods for all bus frontends. Notes: svn path=/head/; revision=112829
* - Return error status instead of value in get_e().Matthew N. Dodd2003-03-291-18/+44
| | | | | | | | - Modify ep_get_macaddr() to return an error status. - Reverse the return value logic of eeprom_rdy(). Notes: svn path=/head/; revision=112822
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-4/+4
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-4/+4
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* network interface driver changes:Sam Leffler2002-11-141-15/+4
| | | | | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106937
* Remove __P.Alfred Perlstein2002-03-201-9/+9
| | | | Notes: svn path=/head/; revision=92739
* Two fixes from Jonathan Hanna:Warner Losh2002-02-121-6/+4
| | | | | | | | | | | | 1) We shouldn't continue when we get a RX complete because we ack it and the TX complete. 2) Fix a couple of spl leaks (why splbio is needed in ISR, I cannot understand). MFC after: 3 days Notes: svn path=/head/; revision=90561
* Commit part of the patch that I have for card eject problems with theWarner Losh2001-06-051-0/+5
| | | | | | | | | | | ep driver. The rest of the patch will wait until I can put the time into it to get it righter than the kludge it is. This protects us against card eject problems at all times,e xecpt when we're in the epintr ISR. Notes: svn path=/head/; revision=77792
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Remove 7 unnecessary includes frmo phk's scriptWarner Losh2000-09-201-5/+0
| | | | Notes: svn path=/head/; revision=66137
* Make all Ethernet drivers attach using ether_ifattach() and detach usingArchie Cobbs2000-07-131-5/+2
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=63090
* Move code to handle BPF and bridging for incoming Ethernet packets outArchie Cobbs2000-05-141-33/+3
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=60536
* Remove unneeded #include <sys/kernel.h>Poul-Henning Kamp2000-04-291-1/+0
| | | | Notes: svn path=/head/; revision=59760
* Remove ~25 unneeded #include <sys/conf.h>Poul-Henning Kamp2000-04-191-1/+0
| | | | | | | Remove ~60 unneeded #include <sys/malloc.h> Notes: svn path=/head/; revision=59391
* Fix a problem that caused TCP fragments to be lost (among other things.)Matthew N. Dodd2000-03-241-1/+1
| | | | Notes: svn path=/head/; revision=58539
* Copy how everyone else is doing packet transmission. (NetBSD mostly)Matthew N. Dodd2000-03-131-6/+8
| | | | | | | | I've been running this for a month or so and have had no problems with it and if I recall it was my last speed tweak. Holler if this breaks anything. Notes: svn path=/head/; revision=57984
* Follow the docs a bit more in epstop() with respect to delays.Matthew N. Dodd2000-03-131-0/+5
| | | | | | | Trivial formatting. Notes: svn path=/head/; revision=57983
* Get rid of table lookup in favor of just subtracting. Everyone elseMatthew N. Dodd2000-03-131-3/+1
| | | | | | | does it like this and I see no point in being different. Notes: svn path=/head/; revision=57982
* Call epstop() in ep_attach(). While this shouldn't be necessary we'llMatthew N. Dodd2000-03-131-0/+2
| | | | | | | | do it just in case. (Actually, with PCMCIA cards we can get in a state where it may be required.) Notes: svn path=/head/; revision=57981
* Fix driver to restore function on 3c574 adapters. The panic onMatthew N. Dodd2000-01-151-9/+16
| | | | | | | | | | ifconfig and bogus ethernet address (4b:57:4b:57:4b:57) has been hacked around. I'll revisit this when I have a clue whats going on. Reviewed by: obrien Notes: svn path=/head/; revision=56017
* Remove a stray splx(s) call. This fixes the compiler warning.Matthew N. Dodd2000-01-121-1/+0
| | | | | | | Submitted by: gibbs Notes: svn path=/head/; revision=55864
* Speedup if_start routine a little. TX threshold logic needs some moreMatthew N. Dodd2000-01-121-10/+17
| | | | | | | kicking but these changes get me around 1000 KB/sec. Notes: svn path=/head/; revision=55834
* Fix the performance problems I caused by setting ifq_maxlen to 8.Matthew N. Dodd2000-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use IFQ_MAXLEN instead. This seemed like a good idea at the time since most 3c509s have all of 2k for their TX fifo. My intention was to revisit ifq_maxlen and auto-scale it or something. ttcp-t: 16777216 bytes in 21.53 real seconds = 761.07 KB/sec +++ ttcp-t: 2771 I/O calls, msec/call = 7.96, calls/sec = 128.72 ttcp-t: 0.0user 2.9sys 0:21real 13% 20i+280d 222maxrss 0+2pf 717+0csw ttcp-r: 16777216 bytes in 14.11 real seconds = 1161.48 KB/sec +++ ttcp-r: 2050 I/O calls, msec/call = 7.05, calls/sec = 145.33 ttcp-r: 0.0user 1.4sys 0:14real 10% 87i+1198d 196maxrss 0+1pf 1949+186csw I've got some tweaks that move the TX speed up to the RX speed but I've got to groom them from the mess I've made of my source tree. Yelled at by: wpaul Notes: svn path=/head/; revision=55833
* HEADS UP! All 3c5x9 users!Matthew N. Dodd1999-10-271-223/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rip out all the static softc stuff and do softc allocation the right way. - Rewrite most of the ISA code so that it provides a DEVICE_IDENTIFY method to enumerate all non-PnP ISA devices. This has the following consequences: - No 'ep' devices may be hardwired. - All hardwired devices will probably be detected twice. By hardwired I mean: device ep0 at isa? port 0x300 irq 10 - 'ep' devices are ordered by bus, slot, and then MAC address. - Make 3c509B cards work in PnP mode. Yes, they really work. - Convert over to using ifmedia for media selection. No more of this lame 'linkX' stuff. - Consolidate a lot of duplicated code. - Make a stab at not breaking MII based PCCARD devices. I doubt that the PCCARD stuff works any more than it did before my changes but theres hope. My PCCARD hardware should arrive in a week or so. - Retreive the media settings from the card EEPROM rather than guessing. I've got a 3c509-TPO that thinks its got an AUI port and if others can report similar problems I'll write a bit of clever code that will fix this but right now it works correctly on all but 1 card. - Clean up a few things and make some cosmetic changes. - Add myself as the MAINTAINER since nobody else wants to. I'm in the best position to do this as I've got an example of most of the cards: EISA 3c579 bnc/aui MCA 3c529 tp/aui ISA 3c509 tpo ISA-PnP 3c509B combo If someone wants to send me a any cards I don't have I'd appriciate it. Also welcome are 3c59x boards since I'll be folding if_vx and if_ep at some point. Notes: svn path=/head/; revision=52549
* Add newbus attachment for pccard driver. Heavily tested by me, andWarner Losh1999-10-251-0/+5
| | | | | | | | | | | | | | I'm committing this from a laptop running this driver. Have only one devclass for all ep devices (at least for pccard and eisa) so unit numbering is sane. Might not work with both isa and non-isa devices on the same system until ep is updated (Matt has some patches in the pipeline which should resolve this, he wanted me to commit this so he can resolve any conflicts against cvs rather than my patches). Reviewed by: Matt Dodd <mdodd@freebsd.org> Notes: svn path=/head/; revision=52472
* - Split out the ISA and PCCARD specific code.Matthew N. Dodd1999-09-261-528/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split out the prototypes, externs and struct decls from if_epreg.h into if_epvar.h. - Add support for MCA based Etherlink III (3c529) devices. None of this code is used right now; the old if_ep driver is still in place and used. I will eventually get around to converting if_ep_isa.c to newbus once I've had a talk with Peter and DFR about the DEVICE_IDENTIFY() method. I have tested this code on my PS/2. It works. I would like EISA and ISA testers since my example hardware hasn't arrived yet. Add: dev/ep/if_ep.c optional ep dev/ep/if_ep_isa.c optional ep isa dev/ep/if_ep_eisa.c optional ep eisa dev/ep/if_ep_mca.c optional ep mca dev/ep/if_ep_pccard.c optional ep card to sys/conf/files Remove: i386/eisa/3c5x9.c optional ep i386/isa/if_ep.c optional ep from sys/i386/conf/files.i386 PCCARD testers wanted! I will switch off and cvs rm the old driver in favor of this copy once I've had positive feedback or have the hardware to verify that it works. Notes: svn path=/head/; revision=51673
* Remove NBPF conditionality of bpf calls in most of our network drivers.Poul-Henning Kamp1999-09-251-9/+0
| | | | | | | | | | | | | | | This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags. Notes: svn path=/head/; revision=51646
* Switch the order of a two tests so that the error actually has to occurDavid E. O'Brien1999-09-241-1/+1
| | | | | | | | | | | for you to be told there was an error [during verbose boot]. I poked him for the fix, he poked me to get it committed. Submitted by: Jason Young <doogie@anet-stl.com> Notes: svn path=/head/; revision=51630
* This adds support for the 3Com Megahertz 574B ethernet 16-bit PC-Card.David E. O'Brien1999-09-191-19/+54
| | | | | | | | | | | 1) Reworked the probe routine 2) Addition of the 574B's product ID. 3) Added useful info when booting verbosely. Submitted by: Jason Young <doogie@anet-stl.com> Notes: svn path=/head/; revision=51387
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Set ifp->if_init to the right function.Matthew N. Dodd1999-08-201-4/+6
| | | | | | | | | | | | | | | if_init_f_t is passed void * containing the address of ifp->if_softc not the unit number. Someone tell me if these things don't work as I don't have the hardware needed to test them. (thats a first.) I'll get if_ze and if_zp later. Pointed out by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> Notes: svn path=/head/; revision=50084
* Make these actually compile. I got a little delete happy pruning includesMatthew N. Dodd1999-08-181-3/+6
| | | | | | | | | | and used 'command' instead of 'cmd' in a few cases. Also clear up some unused variables. Pointed out by: phk Notes: svn path=/head/; revision=50026
* SIOCSIFADDR, SIOCGIFADDR, and SIOCSIFMTU are implemented inMatthew N. Dodd1999-08-181-88/+5
| | | | | | | | | | | sys/net/if_ethersubr.c:ether_ioctl(). Drivers need not implement generic behavior. PR: kern/12126 Submitted by: in part by Boris Popov <bp@butya.kz> Notes: svn path=/head/; revision=50002
* 3C574TX 16bit FastEtherlink PC-card support.Tatsumi Hosokawa1999-07-251-5/+31
| | | | | | | | Reviewed by: HAMADA Naoki <nao@tom-yam.or.jp> Submitted by: Osamu MIHARA <mihara@prd.fc.nec.co.jp> Notes: svn path=/head/; revision=49070
* Rename bpfilter to bpf.Dag-Erling Smørgrav1999-07-061-6/+6
| | | | Notes: svn path=/head/; revision=48645
* Move the "fetch serial data" delay so that it is an inter-bit delay.Peter Dufault1999-01-311-5/+13
| | | | | | | | | | | | | | Increase the overall length of the delay by 10. Without this a 3C509 card on my MediaGX crash box can't be reliably read. With this it is solid. I've left a delay multiplier in instead of just changing the base delay because I'm surprised I had to increase it so much and expect there may be another problem. Notes: svn path=/head/; revision=43487
* Update the pccard hooks to use a module style declaration instead.Peter Wemm1999-01-191-11/+3
| | | | Notes: svn path=/head/; revision=42820
* Initialize isa_devtab entries for interrupt handlers in individualBruce Evans1998-10-221-2/+4
| | | | | | | | | | device drivers, not in ioconf.c. Use a different hack in isa_device.h so that a new config(8) is not required yet. pc98 parts approved by: kato Notes: svn path=/head/; revision=40565
* Removed unused includes.Bruce Evans1998-06-211-2/+1
| | | | Notes: svn path=/head/; revision=37101
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-3/+3
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Removed unused #includes.Bruce Evans1998-03-281-6/+1
| | | | Notes: svn path=/head/; revision=34928
* Fix some style nits and remove an unused header.Mike Smith1998-02-271-2/+1
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=33860
* Back out DIAGNOSTIC changes.Eivind Eklund1998-02-061-2/+1
| | | | Notes: svn path=/head/; revision=33134
* Turn DIAGNOSTIC into a new-style option.Eivind Eklund1998-02-041-1/+2
| | | | Notes: svn path=/head/; revision=33108
* Make INET a proper option.Eivind Eklund1998-01-081-1/+7
| | | | | | | | | | | | | | | This will not make any of object files that LINT create change; there might be differences with INET disabled, but hardly anything compiled before without INET anyway. Now the 'obvious' things will give a proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The only thing that _should_ work (but can't be made to compile reasonably easily) is sppp :-( This commit move struct arpcom from <netinet/if_ether.h> to <net/if_arp.h>. Notes: svn path=/head/; revision=32350
* Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.Eivind Eklund1997-12-151-1/+2
| | | | | | | | | | | The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and ifconfig.c only). I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code inside, as it never could have compiled - doh.) Notes: svn path=/head/; revision=31742
* Recognize 3C569 network interface when `PC98' is defined.KATO Takenori1997-11-271-2/+7
| | | | | | | Submitted by: HAMADA Naoki <hamada@astec.co.jp> Notes: svn path=/head/; revision=31430