summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
Commit message (Collapse)AuthorAgeFilesLines
* Make usual 1-line cardbus support modification.imp2000-10-221-0/+1
| | | | I'm committing this over an Intel PRO-100 CardBus II card.
* Catch up to moving headers:jhb2000-10-201-1/+1
| | | | | - machine/ipl.h -> sys/ipl.h - machine/mutex.h -> sys/mutex.h
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Make mutex name reflect device driver name.cp2000-10-131-1/+2
| | | | | Destroy mutex when detaching the device. Submitted by: John Baldwin <jhb@FreeBSD.ORG>
* Don't #include <sys/proc.h>, since machine/mutex.h does it now.jasone2000-09-231-1/+0
|
* Add the PCI device ID for the on-board ethernet controllers on thewpaul2000-09-212-0/+4
| | | | | Intel 815E motherboard, which I believe is an i82562. Seems to work just fine with the fxp driver.
* Removed NetBSD support, which bit-rotted long ago.dg2000-09-182-363/+41
| | | | Changed new SMP locking macros given the new situation.
* Added a couple more missing FXP_SPLVAR()'s.dg2000-09-171-0/+2
|
* As a minor optimization, do suspended checking more like it was originallydg2000-09-171-1/+6
| | | | in the PR - before the while loop.
* Added missing FXP_SPLVAR() to fxp_intr().dg2000-09-171-2/+2
|
* Attempt to replicate the new fxp SMP locking in the changes committeddg2000-09-171-6/+8
| | | | in the previous (APM suspend/resume) commit.
* Added support for APM suspend/resume.dg2000-09-172-7/+111
| | | | | PR: 18756 Submitted by: mike ryan <msr@elision.org>, with modifications by me.
* Add include of proc.h to make compile without SMP defined. Thiscp2000-09-171-0/+1
| | | | | | | change is likely interm, the include happens automagically when SMP is defined. Obtained from: Jason Evans.
* Add locking to make able to run without the Giant lock being held. Thiscp2000-09-172-17/+51
| | | | | | | | is enabling as all entries are still called with Giant being held. Maintaining compatability with NetBSD makes what should be very simple kinda ugly. Reviewed by: Jason Evans
* Fix a bug brought to light by the people working on SMPng. I don't quitewpaul2000-08-111-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | understand exactly what it is about SMPng that tickles this bug. What I do know is that the foo_init() routine in most drivers is often called twice when an interface is brought up. One time is due to the ifconfig(8) command calling the SIOCSIFFLAGS ioctl to set the IFF_UP flag, and another is probably due to the kernel calling ifp->if_init at some point. In any case, the SMPng changes seem to affect the timing of these two events in such a way that there is a significant delay before any packets are sent onto the wire after the interface is first brought up. This manifested itself locally as an SMPng test machine which failed to obtain an address via DHCP when booting up. It looks like the second call to fxp_init() is happening faster now than it did before, and I think it catches the chip while it's in the process of dealing with the configuration command from the first call. Whatever the case, a FXP_CSR_SCB_CNA interrupt event is now generated shortly after the second fxp_init() call. (This interrupt is apparently never generated by a non-SMPng kernel, so nobody noticed.) There are two problems with this: first, fxp_intr() does not handle the FXP_CSR_SCB_CNA interrupt event (it never tests for it or does anything to deal with it), and second, the meaning of FXP_CSR_SCB_CNA is not documented in the driver. (Apparently it means "command unit not active.") Bad coder. No biscuit. The fix is to have the FXP_CSR_SCB_CNA interrupt handled just like the FXP_SCB_STATACK_CXTNO interrupt. This prevents the state machine for the configuration/RX filter programming stuff from getting wedged for several seconds and preventing packet transmission. Noticed by: jhb
* "Fix" cast qualifier warnings using the uintptr_t intermediate trick.peter2000-07-281-3/+6
|
* Fix an alpha-only race which causes the transmit side of the chip togallatin2000-07-191-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | lock up under moderate to heavy load. The status & command fields share a 32-bit longword. The programming API of the eepro apparently requires that you update the command field of a transmit slot that you've already given to the card. This means the card could be updating the status field of the same longword at the same time. Since alphas can only operate on 32-bit chunks of memory, both the status & command fields are loaded from memory & operated on in registers when the following line of C is executed: sc->cbl_last->cb_command &= ~FXP_CB_COMMAND_S; The race is caused by the card DMA'ing up the status at just the wrong time -- after it has been loaded into a register & before it has been written back. The old value of the status is written back, clobbering the status the card just DMA'ed up. The fact that the card has sent this frame is missed & the transmit engine appears to hang. Luckily, as numerous people on the freebsd-alpha list pointed out, the load-locked/store-conditional instructions used by the atomic functions work with respect changes in memory due to I/O devices. We now use them to safely update the command field. Tested by: Bernd Walter <ticso@mail.cicely.de>
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-4/+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
* Implemented some optimizations which result in 14 fewer instructions in thedg2000-06-191-2/+6
| | | | receive path.
* Added support for the i82559ER (10/100Mbps NIC for embedded applications).dg2000-06-182-9/+16
| | | | Product device ID provided by: Les Biffle <les@ns3.safety.net>
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-49/+2
| | | | | | | | | | | | | | | 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
* Added support for cards and on-motherboard NICs that use an SEEPROMdg2000-03-282-1/+78
| | | | | | | | | | | | address size that is different than the standard 6bits. This fixes support for the Compaq NC3121 card, certain newer Intel Pro/100+ cards, and should also fix integrated NICs on SuperMicro and Compaq motherboards. The auto-sizing algorithm was taken from NetBSD (thanks!), which I think got it from Linux originally. Thanks also to Andrew Sparrow <spadger@best.com> and Joe Moore <jomor@ahpcns.com> for supplying me with unworking Compaq and Intel cards to develop and test the fixes with.
* Make the fxp driver work on alpha, rather than panic the machine on bootgallatin1999-09-303-30/+19
| | | | | | | | | | | | | | | | | | | and/or when using the card. o Convert the driver to using bus_space. This allows alphas with fxp's to boot, rather than panic'ing because rman_get_virtual() doesn't really return a virtual address on alphas. o Fix an alpha unaligned access error caused by some misfeature of gcc/egcs: if link_addr & rbd_addr in the fxp_rfa struct are 32 bit quantities, egcs will assume they are naturally aligned. So it will do a ldl & some shifty/masky to twiddle 16 bit values in fxp_lwcopy(). However, if they are 16-bit aligned, the ldl will actually be done on a 16-bit aligned value & we will panic with an unaligned access error... Changing their definition to an array of chars seems to fix this. I obtained this from NetBSD. I've tested this on both i386 & alpha.
* Remove NBPF conditionality of bpf calls in most of our network drivers.phk1999-09-251-12/+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.
* 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Change the name we register with DRIVER_MODULE() to include the leadingobrien1999-09-201-1/+1
| | | | | | "if_". Reviewed by: msmith, wpaul
* Recognise the new 82559 chip id as used on the InBusiness 10/100 adapter.peter1999-09-062-1/+7
| | | | | | | | I have an 82559 card with the same id as the other 8255[78] chips, but that was made with a date code of 0699 (June 99). The submitter shows this working with the probe etc, but doesn't actually say it works as on the ethernet. :-) Assuming it does, this is a RELENG_3 merge candidate. Submitted by: Steven E Lumos <slumos@sam.ISRI.UNLV.EDU>
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* Rename bpfilter to bpf.des1999-07-061-8/+8
|
* Fix two warnings.peter1999-05-091-1/+5
|
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-3/+3
| | | | to the BUS_SETUP_INTR call.
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-162-59/+132
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* Turn on PCI bus mastering in driver attach routinewes1999-03-201-1/+10
| | | | | | | | to avoid hanging the system if the BIOS has not initialized the interface. PR: 10150 Reviewed by: dg
* MF22... add bridging support to the device drivers. Without thisluigi1999-03-171-18/+43
| | | | bridging cannot work on -current/releng3!
* Improved reporting of autodetected speed and duplex.julian1999-02-121-21/+48
| | | | | | | | Now should be able to report speed for cards using NatSemi PHY. (if you have one please let me know if it works as I only have the Intel version) Reviewed by: David Greenman <dg@root.com>
* Define more registers and fix incorrect (but unused) register bit definitions.julian1999-02-111-10/+29
|
* Define more registers in the PHY unit and use them to report backjulian1999-02-112-9/+82
| | | | | | the result of the media auto negotiation. Reviewed by: David Greenman <dg@freebsd.org>
* Fix warnings related to -Wall -Wcast-qualdillon1999-01-281-2/+2
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-3/+3
| | | | kernel compile
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-3/+3
| | | | | | | kernel compile. This commit includes significant work to proper handle const arguments for the DDB symbol routines.
* pci_device pd_probe function changed from returning char * to returningdillon1998-12-141-3/+3
| | | | | | const char *. Originally I was going to add casts from const char * to char * in some of the pci device drivers, but the reality is that the pci device probes return constant quoted strings.
* Defer rundown (m_freem) of completed transmit buffers for no longerdg1998-10-221-1/+22
| | | | than 1 second.
* Clear out transmit descriptor memory in fxp_attach when it's malloced.dg1998-10-111-1/+2
| | | | | | | fxp_stop is called as the first thing in fxp_init, and if the tx desc list has junk in it, the system may panic. This bug showed up as a side effect of the changes in rev 1.56, but has been in the code since the beginning.
* Fixed mbuf leak in fxp_stop().dg1998-10-101-5/+9
|
* Implemented a more sophisticated mechanism for handling transmitterdg1998-08-041-45/+103
| | | | | | | | interrupts which now defers them until the transmit queue if filled up with completed buffers. This has two advantages: first, it reduces the number of transmitter interrupts to just 1/120th of the rate that they occured previously, and two, running down many buffers at once has much improved cache effects.
* Added 82555B support for media status.dg1998-08-021-1/+2
|
* Reordered fxp_softc for optimal cacheline behavior.dg1998-08-021-8/+10
|
* Killed unused variable/assignment.dg1998-08-021-2/+1
|
* Fixed pedantic semantics errors (bitfields not of type int, signed intbde1998-06-081-22/+22
| | | | | | | or unsigned int (this doesn't change the struct layout, size or alignment in any of the files changed in this commit, at least for gcc on i386's. Using bitfields of type u_char may affect size and alignment but not packing)).
OpenPOWER on IntegriCloud