Commit Graph

41 Commits

Author SHA1 Message Date
archie
75e32a670a Make all Ethernet drivers attach using ether_ifattach() and detach using
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
2000-07-13 22:54:34 +00:00
semenu
2b0a85ec00 Added support for SMC9432BTX cards. 2000-06-21 19:19:49 +00:00
archie
7e9f06467f Avoid double-call to bpf_mtap(). This is now handled in ether_input(). 2000-05-24 00:05:44 +00:00
archie
ee1bf5d271 Move code to handle BPF and bridging for incoming Ethernet packets out
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
2000-05-14 02:18:43 +00:00
peter
69983f2034 Depend on miibus.
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.
2000-04-29 13:41:57 +00:00
semenu
532087ff15 Driver is now using miibus, and newbus.
PR:		kern/17601
2000-04-12 06:51:43 +00:00
eivind
1955bfe04b Change incorrect NULLs to 0s 1999-12-21 11:14:12 +00:00
semenu
a3be6f74ec Added code to enable BusMaster operations.
Kurt D. Starsinic <kstar@chapin.edu> had reported
this patch fixing strange behaviour (like timeouts
and RX/TX DMAs stopping errors).
1999-10-29 09:56:52 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
msmith
bae14e6d1f Clean up after removing sys/eventhandler.h from sys/systm.h at the last
minute.  This should cover all of the missed cases (and should let LINT
build again).
1999-08-21 22:10:49 +00:00
msmith
c2bc14bbac Implement a new generic mechanism for attaching handler functions to
events, in order to pave the way for removing a number of the ad-hoc
implementations currently in use.

Retire the at_shutdown family of functions and replace them with
new event handler lists.

Rework kern_shutdown.c to take greater advantage of the use of event
handlers.

Reviewed by:	green
1999-08-21 06:24:40 +00:00
des
284ed27f44 Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
peter
69b2430c97 Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entire
files.  config will leave the whole file out if configured to do so.
1999-07-03 20:17:08 +00:00
semenu
2c03d4a57c Move arpcom structure be the first in softc structure. Needed
for ether_ioctl.

PR:   pending/11754
1999-05-22 06:10:14 +00:00
peter
3461a10a5a #if 0 some unused code (debug?) to quiet a warning. 1999-05-10 00:20:46 +00:00
peter
970b6faae9 Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:
#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.)
1999-05-09 17:07:30 +00:00
peter
6b7a3225d7 Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn't
hurt the driver portability to 3.x too much for where drivers are shared.
1999-04-24 20:17:05 +00:00
peter
44d31e635d Well folks, this is it - The second stage of the removal for build support
for LKM's..
1999-04-17 08:36:07 +00:00
nsayer
a319323dd6 Add support for bridging to if_tx.c
PR:		10534
Submitted by:	nsayer
1999-03-31 13:50:52 +00:00
semenu
d1f7b2d7ee Implemented workaround for EPIC's Application Note 7-15 (concerning
chip int. and ext. clock synchronisation). Fixed workaround for
transmit threshold underrun. Added volatile keyword to CSR_READ_* and
CSR_WRITE_* macroses. Added DELAYs to eliminate randomness caused
by processor speed. Fixed all TXCON and RXCON registers to be accessed
only when chip is idle, as manual told. Changed epic_init_phy to
drop link by isolating and going loopback, should should force link
partner to restart autonegotiation.

PR: kern/10535,	kern/9742, kern/10575
Submitted by:	Peter Jeremy, David Greenman
1999-03-14 08:30:23 +00:00
andreas
686c6df99b Fix from author of the driver:
The i++ loop from 1..1000 is too small on very fast machines like
PII 450 MHz. Increasing the loop from 1..100000 lets the machine
access PHY. After this patch it's possible to use a SMC PCI card
on a HP Kayak XA series PC Workstation. Workaround until this fix
was to enable debugging in the driver (#define EPIC_DEBUG 1).

Without that patch you get an undefined state:
while true
do
ifconfig -a | grep status:
done
The status messages flaps between twwo values, but not
"connected".

Obtained from:	Ustimenko Semen <semen@iclub.nsu.ru>
1999-03-09 17:30:12 +00:00
dillon
5fb9bd9c35 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
eivind
a64dec0ab9 Adjust prototype to match definition (by adding a 'const'). 1998-12-09 01:12:18 +00:00
archie
84bd80a4f9 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1998-12-07 21:58:50 +00:00
peter
68c08cdb68 ifioctl takes a u_long rather than an int on 3.0 1998-11-09 09:34:00 +00:00
semenu
fe67d5f800 Ported to OpenBSD. sys/pci/smc83c170.h renamed to sys/pci/if_txvar.h to be
like others.
1998-11-01 07:44:33 +00:00
peter
de8dd063a9 Minimal change for #if __FreeBSD__ >= 3 to check __FreeBSD_version instead. 1998-09-24 16:00:30 +00:00
bde
d404dbc5cf Fixed printf format errors (only 1 left in GENERIC now). 1998-07-13 09:53:11 +00:00
semenu
23081a1d38 Fix some strange errors of shutting transmitter up when start
transmition after software reset with no link estabilished yet.
Fix TX DMA stop method (queue last packet to stop).

PR:		i386/6578
1998-07-04 08:02:46 +00:00
jkoshy
b7b1d88983 Fix spelling in printf(). 1998-06-08 06:42:34 +00:00
dfr
92449ad5fa This commit fixes various 64bit portability problems required for
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.
1998-06-07 17:13:14 +00:00
bde
91b84c654c Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
semenu
eecf753b4f Fixed autonegotiation. Card registers are now accessed via memory
not i/o space.
1998-04-13 14:15:40 +00:00
jkh
df66a3d309 Correct minor typo
Confirmed by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-03-05 10:53:26 +00:00
semenu
247d02f500 *** empty log message *** 1998-03-04 16:35:05 +00:00
jkh
2687e4d97a Update to "stable-167" release; totally reimplements media detection.
Submitted by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-02-20 18:08:46 +00:00
eivind
86354cd8fc Staticize. 1998-02-09 06:11:36 +00:00
jkh
b981031880 MF22: update to newest version from author. 1998-02-04 15:04:09 +00:00
bde
266c4518eb Removed ifdef for <sys/sockio.h> vs <sys/ioctl.h>. <sys/sockio.h> is
a BSD4.4Lite1 feature, not a FreeBSD feature.  <sys/ioctl.h> is a
compatibility misfeature.

Moved NPCI ifdef.  This file didn't compile if NPCI <= 0.  It shouldn't
be configured in that case, but it is easy to support (mis)configuration
of drivers without buses by generating null objects, and many drivers
do it.

Removed unused includes.
1998-02-01 20:25:16 +00:00
jkh
6c64b7138e Update to version stable-165
Submitted by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-01-29 10:31:45 +00:00
jkh
026e5ca648 Driver for the new SMC 9432TX cards.
Submitted by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-01-21 18:33:00 +00:00