Commit Graph

43 Commits

Author SHA1 Message Date
Pierre Beyssac
256de9e9ec Add missing delay after card reset.
This fixes randoms lockups when probing the card at boot time, when
more than 1 similar card is found in the machine.

Reviewed by:	semenu
2000-11-09 17:25:49 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Archie Cobbs
21b8ebd926 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
Semen Ustimenko
afb279b54b Added support for SMC9432BTX cards. 2000-06-21 19:19:49 +00:00
Archie Cobbs
d61b89e4b3 Avoid double-call to bpf_mtap(). This is now handled in ether_input(). 2000-05-24 00:05:44 +00:00
Archie Cobbs
2e2de7f23f 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 Wemm
95a1645553 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
Semen Ustimenko
0f9ee76b22 Driver is now using miibus, and newbus.
PR:		kern/17601
2000-04-12 06:51:43 +00:00
Eivind Eklund
369dc8ceb8 Change incorrect NULLs to 0s 1999-12-21 11:14:12 +00:00
Semen Ustimenko
1d45e38736 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 Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Mike Smith
3ed7a59b07 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
Mike Smith
fcb893a801 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
Dag-Erling Smørgrav
6b5ca0d83e Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
Peter Wemm
9929d2a045 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
Semen Ustimenko
a1684b9830 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 Wemm
94a8ab8acb #if 0 some unused code (debug?) to quiet a warning. 1999-05-10 00:20:46 +00:00
Peter Wemm
579f45fa60 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 Wemm
96b3554e5c 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 Wemm
e91896117b 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
Nick Sayer
4db9b34751 Add support for bridging to if_tx.c
PR:		10534
Submitted by:	nsayer
1999-03-31 13:50:52 +00:00
Semen Ustimenko
29563129dd 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 Klemm
1853e64dca 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
Matthew Dillon
2cbe36f725 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
Eivind Eklund
761d24ba21 Adjust prototype to match definition (by adding a 'const'). 1998-12-09 01:12:18 +00:00
Archie Cobbs
f1d19042b0 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 Wemm
dfab6b6416 ifioctl takes a u_long rather than an int on 3.0 1998-11-09 09:34:00 +00:00
Semen Ustimenko
5fabcd1a00 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 Wemm
05209199cf Minimal change for #if __FreeBSD__ >= 3 to check __FreeBSD_version instead. 1998-09-24 16:00:30 +00:00
Bruce Evans
9bffbcd4f5 Fixed printf format errors (only 1 left in GENERIC now). 1998-07-13 09:53:11 +00:00
Semen Ustimenko
e3e1bee33a 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
Joseph Koshy
59fde8c360 Fix spelling in printf(). 1998-06-08 06:42:34 +00:00
Doug Rabson
ecbb00a262 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
Bruce Evans
c1087c1324 Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
Semen Ustimenko
72a43c1b0a Fixed autonegotiation. Card registers are now accessed via memory
not i/o space.
1998-04-13 14:15:40 +00:00
Jordan K. Hubbard
1fbe7f53e0 Correct minor typo
Confirmed by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-03-05 10:53:26 +00:00
Semen Ustimenko
1b0783ba37 *** empty log message *** 1998-03-04 16:35:05 +00:00
Jordan K. Hubbard
f082783a66 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 Eklund
303b270b0a Staticize. 1998-02-09 06:11:36 +00:00
Jordan K. Hubbard
8fc933e5ae MF22: update to newest version from author. 1998-02-04 15:04:09 +00:00
Bruce Evans
ffbedc02de 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
Jordan K. Hubbard
5f408f2bf2 Update to version stable-165
Submitted by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-01-29 10:31:45 +00:00
Jordan K. Hubbard
0aed583274 Driver for the new SMC 9432TX cards.
Submitted by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-01-21 18:33:00 +00:00