Commit Graph

71 Commits

Author SHA1 Message Date
wes
04cf1f5338 Turn on PCI bus mastering in driver attach routine
to avoid hanging the system if the BIOS has not
initialized the interface.

PR:		10150
Reviewed by:	dg
1999-03-20 04:51:25 +00:00
luigi
be6e5ad345 MF22... add bridging support to the device drivers. Without this
bridging cannot work on -current/releng3!
1999-03-17 16:44:53 +00:00
julian
5183d5dae0 Improved reporting of autodetected speed and duplex.
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>
1999-02-12 17:56:23 +00:00
julian
805f407e70 Define more registers and fix incorrect (but unused) register bit definitions. 1999-02-11 23:41:21 +00:00
julian
0ddaf7283c Define more registers in the PHY unit and use them to report back
the result of the media auto negotiation.

Reviewed by: David Greenman <dg@freebsd.org>
1999-02-11 21:47:10 +00:00
dillon
b9b2a8a056 Fix warnings related to -Wall -Wcast-qual 1999-01-28 17:32:05 +00:00
dillon
4089ccceff Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 00:57:57 +00:00
dillon
8cb46d86ba Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile.

    This commit includes significant work to proper handle const arguments
    for the DDB symbol routines.
1999-01-27 23:45:44 +00:00
dillon
1de643f504 pci_device pd_probe function changed from returning char * to returning
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.
1998-12-14 05:47:29 +00:00
dg
c12b623399 Defer rundown (m_freem) of completed transmit buffers for no longer
than 1 second.
1998-10-22 02:00:49 +00:00
dg
bd5a4d6a5b Clear out transmit descriptor memory in fxp_attach when it's malloced.
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.
1998-10-11 06:28:54 +00:00
dg
a328f6a25e Fixed mbuf leak in fxp_stop(). 1998-10-10 19:26:40 +00:00
dg
e842a9d036 Implemented a more sophisticated mechanism for handling transmitter
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.
1998-08-04 08:53:12 +00:00
dg
0f58ebf56f Added 82555B support for media status. 1998-08-02 00:33:38 +00:00
dg
bd52d7a037 Reordered fxp_softc for optimal cacheline behavior. 1998-08-02 00:29:15 +00:00
dg
24f7d40335 Killed unused variable/assignment. 1998-08-02 00:28:45 +00:00
bde
2fe18afefc Fixed pedantic semantics errors (bitfields not of type int, signed int
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)).
1998-06-08 09:47:47 +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
des
31722e83fd Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
bde
91b84c654c Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
dg
e396423a5e Added support for the 82553 and 'B' 82555 PHY. 1998-03-03 14:19:09 +00:00
bde
d30d9168f9 Removed unused #includes. 1998-02-20 13:11:54 +00:00
eivind
86354cd8fc Staticize. 1998-02-09 06:11:36 +00:00
eivind
15cd3046e2 Make INET a proper option.
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>.
1998-01-08 23:42:31 +00:00
dg
6f55024e27 Shuffle things a bit for better cacheline behavior. 1997-11-29 08:11:01 +00:00
bde
0ba390293e Removed unused #includes. 1997-10-28 15:59:26 +00:00
dg
8e5911dae9 Rewrote fxp_start() for better clarity and efficiency. 1997-10-23 01:45:15 +00:00
dg
129f47fffb Fixed a bug where input packets were counted twice - messing up the
stats.
1997-10-17 06:27:44 +00:00
dg
aa15642355 Killed a gratuitous assignment in a NetBSD case. 1997-09-30 11:28:24 +00:00
dg
7a6c332784 Two changes which should make the system less suseptible to receiver
overruns (not that it was a problem, but it could be):

1) Doubled the number of receive buffers in the DMA chain to 64.
2) Do packet receive processing before transmit in the interrupt routine.
1997-09-30 10:50:45 +00:00
dg
d04bf38292 Work around a bug in the 82557 NIC where the receiver will lock up
if it is in 10Mbps mode and gets certain types of garbage prior to
the packet header. The work-around involves reprogramming the
multicast filter if nothing is received in some number of seconds
(currently set at 15). As a side effect, implemented complete support
for multicasting rather than the previous 'receive all multicasts'
hack, since we now have the ability to program the filter table.
Fixed a serious bug which crept in with the timeout() changes;
the cookie was only saved on the first timeout() call in fxp_init()
and wasn't updated in the most common place in fxp_stats_update()
when the timeout was rescheduled. This bug would have resulted in
an eventual panic if fxp_stop() was called (which happens when any
interface flags are changed, for example).
Fixed a bug in Alpha support that would have caused the TxCB
descriptor chain to span a page boundry, causing serious problems
if the pages didn't happen to be contiguous.
Removed some gratuitous bit masking that was left over from an
older implementation.
Fixed a bug where too much was copied from the configuration
template, spilling over into memory that followed it.
Fixed handling of if_timer...it was cleared too early in some cases.
1997-09-29 11:27:43 +00:00
gibbs
30cd24efde Update for new callout interface. 1997-09-21 22:02:25 +00:00
dg
40720db40b Changes to support NetBSD and the new ifmedia extensions.
Submitted by:	Jason Thorpe <thorpej@netbsd.org>
1997-09-05 10:23:58 +00:00
bde
2b60d80b5b Removed unused #includes. 1997-08-02 14:33:27 +00:00
dg
cb7c6f09f7 Added support for the Seeq 80c24 PHY; does nothing except disable the
unsupported warning message for it.
1997-07-25 23:41:12 +00:00
dg
30839eee83 Minor optimization in fxp_intr. 1997-06-16 04:45:57 +00:00
dg
0ebd78f8f7 Added support for the Intel 82555 PHY chip which is being used on newer
Pro/100B cards. Full duplex should work now, although it hasn't been
tested.
1997-06-13 22:34:52 +00:00
dg
161870216c Check that the received packet length indicated by the card is at least
large enough to contain the ethernet header. There appears to be a
condition where the card can return "0" in some failure cases, and this
causes bad things to happen (a panic).
1997-04-23 01:44:30 +00:00
dg
ccc1de7a19 Made a couple of minor optimizations that improve performance of the
common case of the interrupt routine by about 20%.
1997-03-25 14:54:38 +00:00
bde
c9a2e7db06 Don't include <sys/ioctl.h> in the kernel. Stage 2: include
<sys/sockio.h> instead of <sys/ioctl.h> in network files.
1997-03-24 11:33:46 +00:00
dg
012b0dc0be Added support for newer cards that have the DP83840A PHY chip.
Fixed a bug in fxp_mdi_write - a hex number was missing a preceding 0x
and this was causing the routine to not wait for a PHY write to complete.
Added support for link0, link1, and link2 flags to toggle auto-
negotiation, 10/100, and half/full duplex:

link0	disable auto-negotiation

	When set, these flags then have meaning:

	-link1	10Mbps
	link1	100Mbps
	-link2	half duplex
	link2	full duplex

...needs a manual page.
1997-03-21 08:00:13 +00:00
dg
936b1abc7f Fixed two deficiencies in the driver that have existed since it was
written:

1) Full duplex mode is now supported (and works!)
2) The 10Mbps-only PCI Pro/10 should now work (untested, however)

Thanks to Justin Gibbs for providing a PCI bus analyzer trace while the
Intel Windows driver was configuring the board...this made it possible
to figure out the mystery bit that I wasn't setting in the PHY for full
duplex to work.
1997-03-17 11:08:16 +00:00
peter
c8dcd04895 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
dg
5625270415 Changed several configuration options:
Disabled the DMA byte counters - I had it this way originally and this is
the recommended setting.
Set crscdt to CRS only (0) since this is what it should be for an MII PHY.
Also fixed some comments.
1997-02-04 11:44:15 +00:00
dg
92ce23e27e Do "selective" reset rather than full reset...the manual specifically
says not to do the full reset because it can lock up the PCI bus if the
chip is active. Added various PORT command definitions to facilitate
this.
1997-02-04 10:53:12 +00:00
dg
cc264d42c5 Don't include the short-frames counter in with the input errors. This
counter is incremented on all short frames, including those that are
the result of collisions.
1997-02-04 07:39:28 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
wollman
42c104fc53 Use the new if_multiaddrs list for multicast addresses rather than the
previous hackery involving struct in_ifaddr and arpcom.  Get rid of the
abominable multi_kludge.  Update all network interfaces to use the
new machanism.  Distressingly few Ethernet drivers program the multicast
filter properly (assuming the hardware has one, which it usually does).
1997-01-13 21:26:53 +00:00
dg
477ebebce0 1) Implement SIOCSIFMTU in ether_ioctl(), and change ether_ioctl's return
type to be int so that errors can be returned.
2) Use the new SIOCSIFMTU ether_ioctl support in the few drivers that are
   using ether_ioctl().
3) In if_fxp.c: treat if_bpf as a token, not as a pointer. Don't bother
   testing for FXP_NTXSEG being reached in fxp_start()...just check for
   non-NULL 'm'. Change fxp_ioctl() to use ether_ioctl().
1996-12-10 07:29:50 +00:00
dg
b7de342449 Fixed obsolete comment. 1996-11-18 02:45:46 +00:00