Commit Graph

1197 Commits

Author SHA1 Message Date
Bill Paul
23e4757cd7 This commit adds device driver support for the Sundance Technologies ST201
PCI fast ethernet controller. Currently, the only card I know that uses
this chip is the D-Link DFE-550TX. (Don't ask me where to buy these: the
only cards I have are samples sent to me by D-Link.)

This driver is the first to make use of the miibus code once I'm sure
it all works together nicely, I'll start converting the other drivers.

The Sundance chip is a clone of the 3Com 3c90x Etherlink XL design
only with its own register layout. Support is provided for ifmedia,
hardware multicast filtering, bridging and promiscuous mode.
1999-08-21 18:34:58 +00:00
Bill Paul
d00275330d This commit adds support for the NetBSD MII abstraction layer and
MII-compliant PHY drivers. Many 10/100 ethernet NICs available today
either use an MII transceiver or have built-in transceivers that can
be programmed using an MII interface. It makes sense then to separate
this support out into common code instead of duplicating it in all
of the NIC drivers. The mii code also handles all of the media
detection, selection and reporting via the ifmedia interface.

This is basically the same code from NetBSD's /sys/dev/mii, except
it's been adapted to FreeBSD's bus architecture. The advantage to this
is that it automatically allows everything to be turned into a
loadable module. There are some common functions for use in drivers
once an miibus has been attached (mii_mediachg(), mii_pollstat(),
mii_tick()) as well as individual PHY drivers. There is also a
generic driver for all PHYs that aren't handled by a specific driver.
It's possible to do this because all 10/100 PHYs implement the same
general register set in addition to their vendor-specific register
sets, so for the most part you can use one driver for pretty much
any PHY. There are a couple of oddball exceptions though, hence
the need to have specific drivers.

There are two layers: the generic "miibus" layer and the PHY driver
layer. The drivers are child devices of "miibus" and the "miibus" is
a child of a given NIC driver. The "miibus" code and the PHY drivers
can actually be compiled and kldoaded as completely separate modules
or compiled together into one module. For the moment I'm using the
latter approach since the code is relatively small.

Currently there are only three PHY drivers here: the generic driver,
the built-in 3Com XL driver and the NS DP83840 driver. I'll be adding
others later as I convert various NIC drivers to use this code.

I realize that I'm cvs adding this stuff instead of importing it
onto a separate vendor branch, but in my opinion the import approach
doesn't really offer any significant advantage: I'm going to be
maintaining this stuff and writing my own PHY drivers one way or
the other.
1999-08-21 17:40:53 +00:00
Kenneth D. Merry
3ece1bd296 Fix short timeout problems with the pt(4) driver:
- increase the default timeout from 10 seconds to 60 seconds
- add a new kernel option, SCSI_PT_DEFAULT_TIMEOUT, that lets users specify
  the default timeout for the pt driver to use
- add two new ioctls, one to get the timeout for a given pt device, the
  other to set the timeout for a given pt device.  The idea is that
  userland applications using the device can set the timeout to suit their
  purposes.  The ioctls are defined in a new header file, sys/ptio.h

PR:		10266
Reviewed by:	gibbs, joerg
1999-08-20 03:48:11 +00:00
Peter Wemm
e8ebc7f504 The "LINUX" option isn't actually used or referenced anywhere. The stuff
that goes to opt_dontuse.h is so an opt_*.h file doesn't get created even
though an option may be used for bringing stuff in via files[.*].

Pointed out by: bde
1999-08-18 11:28:36 +00:00
Alan Cox
08c40841d8 Create callable (non-inline) versions of the atomic_OP_TYPE functions
that are linked into the kernel.  The KLD compilation options are
changed to call these functions, rather than in-lining the
atomic operations.

This approach makes atomic operations from KLDs significantly
faster on UP systems (though somewhat slower on SMP systems).

PR:		i386/13111
Submitted by:	peter.jeremy@alcatel.com.au
1999-08-18 04:08:31 +00:00
Poul-Henning Kamp
c6ba8fec16 Give if_tun the "almost clone" makeover. 1999-08-15 09:54:57 +00:00
Poul-Henning Kamp
bd3a53203f Give BPF the "almost-clone" update. If you need more of them, make
more entries in /dev and be happy you don't need to recompile your
kernel.
1999-08-15 09:38:21 +00:00
Jordan K. Hubbard
8b67cbda75 Reserve bdev/cdev entries for i2o driver.
Requested by:	Simon Shapiro
1999-08-11 05:28:06 +00:00
Poul-Henning Kamp
ce9edcf5b5 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
Poul-Henning Kamp
ef40c56108 Make the pty driver as close to a cloning device as we can get for now,
we create the pty on the fly when it is first opened.

If you run out of ptys now, just MAKEDEV some more.

This also demonstrate the use of dev_t->si_tty_tty and dev_t->si_drv1
in a device driver.
1999-08-08 19:28:59 +00:00
Chris Costello
5f3136d4ea Fix a reference to st' by replacing it with sa'. 1999-08-08 16:27:17 +00:00
Peter Wemm
307fae6b6c Re-delete the (meaningless) device-driver tokens that came back in 1.256
after having been removed in 1.253 and turned into a warning.

Noticed by: bde
1999-08-07 12:19:41 +00:00
Jordan K. Hubbard
0a729622af Enable bpf by default. There was no significant dissention to my proposal
of 2 weeks ago that this be done, and anyone who wishes to make bpf more
selective according to securelevel or compile-time options is more
than free to do so.
1999-08-07 01:42:08 +00:00
Poul-Henning Kamp
d4ebee28d2 Add driver support for M-systems DiskOnChip Products.
Sponsored by:	M-systems Inc.	http://www.m-sys.com
1999-08-06 15:59:07 +00:00
Hellmuth Michaelis
0df6adec74 updating isdn4bsd to beta version 0.83 1999-08-06 14:05:10 +00:00
Jordan K. Hubbard
a116586012 The ARLA folks don't need a bdev after all - remove it. 1999-08-04 19:55:37 +00:00
Brian Feldman
e4484d02ad Correction: "ans" -> "and." 1999-08-04 17:29:33 +00:00
Jordan K. Hubbard
c2da60f083 Reserve majors for arla. 1999-07-31 09:32:28 +00:00
Mike Smith
496027bf08 Major update to the kernel's BIOS-calling ability.
- Add support for calling 32-bit code in other segments
 - Add support for calling 16-bit protected mode code

Update APM to use this facility.

Submitted by:	jlemon
1999-07-29 01:49:19 +00:00
Poul-Henning Kamp
8343d904fd Pave the way for the fla driver. 1999-07-26 07:43:26 +00:00
Martin Cracauer
784648c675 Various formatting fixes on my FPE trapcode commit.
Submitted by:	BDE
1999-07-26 05:47:31 +00:00
Martin Cracauer
a7674320e9 On FPU exceptions, pass a useful error code (one of the FPE_...
macros) to the signal handler, for old-style BSD signal handlers as
the second (int) argument, for SA_SIGINFO signal handlers as
siginfo_t->si_code. This is source-compatible with Solaris, except
that we have no <siginfo.h> (which isn't even mentioned in POSIX
1003.1b).

An rather complete example program is at
  http://www3.cons.org/cracauer/freebsd-signal.c
This will be added to the regression tests in src/.

This commit also adds code to disable the (hardware) FPU from
userconfig, so that you can use a software FP emulator on a machine
that has hardware floating point. See LINT.
1999-07-25 13:16:09 +00:00
Bill Paul
691c152864 This commit adds device driver support for Adaptec Duralink PCI fast
ethernet controllers based on the AIC-6915 "Starfire" controller chip.
There are single port, dual port and quad port cards, plus one 100baseFX
card. All are 64-bit PCI devices, except one single port model.

The Starfire would be a very nice chip were it not for the fact that
receive buffers have to be longword aligned. This requires buffer
copying in order to achieve proper payload alignment on the alpha.
Payload alignment is enforced on both the alpha and x86 platforms.
The Starfire has several different DMA descriptor formats and transfer
mechanisms. This driver uses frame descriptors for transmission which
can address up to 14 packet fragments, and a single fragment descriptor
for receive. It also uses the producer/consumer model and completion
queues for both transmit and receive. The transmit ring has 128
descriptors and the receive ring has 256.

This driver supports both FreeBSD/i386 and FreeBSD/alpha, and uses newbus
so that it can be compiled as a loadable kernel module. Support for BPF
and hardware multicast filtering is included.
1999-07-25 04:32:50 +00:00
Tatsumi Hosokawa
18200ad993 Sync with GENERIC (place of xe0 driver) 1999-07-19 15:18:21 +00:00
David E. O'Brien
a6c6cfcddf Move the xe0 driver back where it was. It was misleading where it was as it
does not take over the PCIC, it does require PCCARD support, and it doesn't
replace any existing driver.
1999-07-13 08:08:20 +00:00
Bill Paul
3ebb090530 This commit adds driver support for the SysKonnect SK-984x series
gigabit ethernet adapters. This includes two single port cards
(single mode and multimode fiber) and two dual port cards (also single
mode and multimode fiber). SysKonnect is currently the only
vendor with a dual port gigabit ethernet NIC.

The ports on dual port adapters are treated as separate network
interfaces. Thus, if you have an SK-9844 dual port SX card, you
should have both sk0 and sk1 interfaces attached. Dual port cards
are implemented using two XMAC II chips connected to a single
SysKonnect GEnesis controller. Hence, dual port cards are really
one PCI device, as opposed to two separate PCI devices connected
through a PCI to PCI bridge. Note that SysKonnect's drivers use
the two ports for failover purposes rather that as two separate
interfaces, plus they don't support jumbo frames. This applies to
their Linux driver too. :)

Support is provided for hardware multicast filtering, BPF and
jumbo frames. The SysKonnect cards support TCP checksum offload
however this feature is not currently enabled (hopefully it will
be once we get checksum offload support).

There are still a few things that need to be implemeted, like
the ability to communicate with the on-board LM80 voltage/temperature
monitor, but I wanted to get the driver under CVS control and into
-current so people could bang on it.

A big thanks for SysKonnect for making all their programming info
for these cards (and for their FDDI and token ring cards) available
without NDA (see www.syskonnect.com).
1999-07-09 04:30:09 +00:00
Dag-Erling Smørgrav
6b5ca0d83e Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
Mike Smith
693a01d8a1 The IDA driver is 'ida', not 'id' 1999-07-05 09:09:09 +00:00
John Polstra
8b7c163daf Update comment for new location of soft-updates sources. 1999-07-03 21:31:00 +00:00
Peter Wemm
6c205e59db Delete the 'device-driver' suffix. It's been meaningless for a long time.
On the VAX, it used to be used for special compilation to avoid the
optimizer which would mess with memory mapped devices etc.  These days
we use 'volatile'.
1999-07-03 19:19:34 +00:00
Peter Wemm
0634d7115f Only have the pci component compiled if pci is specified at config.
Remove #if NPCI > 0 as a result.
1999-07-03 18:34:04 +00:00
Peter Wemm
dae36f142b Move bt_isa.c to the cpu-independent isa section. 1999-07-03 18:26:25 +00:00
Peter Wemm
e9bc23571b Sync with GENERIC.. (Gee, this is a useful file..) 1999-07-02 04:36:48 +00:00
Jordan K. Hubbard
93740fb962 Working kernel tags!
Submitted by:	Craig Leres <leres@ee.lbl.gov>
PR:		2806
1999-07-02 04:00:01 +00:00
Jordan K. Hubbard
739e3bdcf8 127 fire Firewire driver <ikob@koganei.wide.ad.jp> 1999-07-02 02:49:24 +00:00
Jordan K. Hubbard
4f018929d4 Remove the now-bogus comment about using iosiz with npx0 for memory
sizing - environment does this properly  now.  Thanks, Peter!
1999-07-01 18:39:23 +00:00
Peter Wemm
28e1b413d8 sscape_mss is supposed to work.. 1999-06-29 21:53:59 +00:00
Peter Wemm
9fefb84af6 Drop old-scsi drivers (was commented out) od0 and (not commented) sctarg0 1999-06-29 21:52:07 +00:00
Matthew Hunt
ba965cf7cc Correct spelling of NMBCLUSTERS in a comment.
Submitted by:	Peter Radcliffe <pir@pir.net>
1999-06-29 19:06:16 +00:00
Peter Wemm
cc6c2ad06f With asbestos suit on, make the options indenting a little more consistant
so that it doesn't screw up the alignment when commenting out an entry.
Also dequote two entries that do not need it.
1999-06-29 18:58:27 +00:00
Peter Wemm
1f06573d89 Put on my asbestos suit and attempt to tidy up and add some simple docs
or notes to make it much more obvious what things are for people who
have not committed LINT to memory yet.
1999-06-29 18:55:53 +00:00
Peter Wemm
aa653b8fdd (mostly) fix ordering. 1999-06-29 16:14:20 +00:00
Peter Wemm
320138da4c Use the same -UKERNEL strategy as the alpha to avoid the inlines etc. 1999-06-28 09:21:41 +00:00
Poul-Henning Kamp
46d2febf9d Hmm, might as well make all of BEFORE_DEPEND first in case make depend
wasn't run.
1999-06-28 07:19:51 +00:00
Poul-Henning Kamp
d86578de9d Also make pci_if.h early if make depend wasn't run. 1999-06-28 07:10:55 +00:00
Poul-Henning Kamp
85a96bc645 Make bus_if.h and device_if.h as early as possible if make depend hasn't
been run.
1999-06-28 07:06:21 +00:00
Matt Jacob
b5f3861b6f add description of Qlogic ISP FC Full Duplex option 1999-06-27 19:35:23 +00:00
Jonathan Lemon
13066c5f3b Add ida/id lines 1999-06-24 03:54:54 +00:00
Kazutaka YOKOTA
6e8394b8ba The second phase of syscons reorganization.
- Split syscons source code into manageable chunks and reorganize
  some of complicated functions.

- Many static variables are moved to the softc structure.

- Added a new key function, PREV.  When this key is pressed, the vty
  immediately before the current vty will become foreground.  Analogue
  to PREV, which is usually assigned to the PrntScrn key.
  PR: kern/10113
  Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>

- Modified the kernel console input function sccngetc() so that it
  handles function keys properly.

- Reorganized the screen update routine.

- VT switching code is reorganized.  It now should be slightly more
  robust than before.

- Added the DEVICE_RESUME function so that syscons no longer hooks the
  APM resume event directly.

- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING,
  SC_NO_HISTORY and SC_NO_SYSMOUSE.
  Various parts of syscons can be omitted so that the kernel size is
  reduced.

  SC_PIXEL_MODE
  Made the VESA 800x600 mode an option, rather than a standard part of
  syscons.

  SC_DISABLE_DDBKEY
  Disables the `debug' key combination.

  SC_ALT_MOUSE_IMAGE
  Inverse the character cell at the mouse cursor position in the text
  console, rather than drawing an arrow on the screen.
  Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)

  SC_DFLT_FONT
  makeoptions "SC_DFLT_FONT=_font_name_"
  Include the named font as the default font of syscons.  16-line,
  14-line and 8-line font data will be compiled in.  This option replaces
  the existing STD8X16FONT option, which loads 16-line font data only.

- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.

- The video driver provides a set of ioctl commands to manipulate the
  frame buffer.

- New kernel configuration option: VGA_WIDTH90
  Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60.  These
  modes are mot always supported by the video card.
  PR: i386/7510
  Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.

- The header file machine/console.h is reorganized; its contents is now
  split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h
  (another new file).  machine/console.h is still maintained for
  compatibility reasons.

- Kernel console selection/installation routines are fixed and
  slightly rebumped so that it should now be possible to switch between
  the interanl kernel console (sc or vt) and a remote kernel console
  (sio) again, as it was in 2.x, 3.0 and 3.1.

- Screen savers and splash screen decoders
  Because of the header file reorganization described above, screen
  savers and splash screen decoders are slightly modified.  After this
  update, /sys/modules/syscons/saver.h is no longer necessary and is
  removed.
1999-06-22 14:14:06 +00:00
Greg Lehey
12a7982c45 Correct description of Vinum. 1999-06-20 04:35:22 +00:00