Commit Graph

1017 Commits

Author SHA1 Message Date
Bill Paul
ab03d8e65f Make a few other cleanups while I'm in the area. Typo in comment, unused
structure members, etc. No functional changes.
1999-07-14 21:53:11 +00:00
Bill Paul
b31b2566e0 Revert some changes I had made to try and cut down on the number of TX EOF
interrupts that were scheduled. Testing shows it didn't really do very much
and it makes the code a little more complicated (which is never a good thing).

Also fix the rambuffer offset initialization for the 512K/64K SRAM case
(512K total using 64K chips). It should be 0. The only case with a
non-standard rambuffer offset address is 1024K/64K according to the
SysKonnect manual. (My card has the 1024/64 configuration and I don't know
which card uses the 512/64 configuration, if any, so I'm not sure that
this was really a problem for anyone.)
1999-07-14 18:57:32 +00:00
Poul-Henning Kamp
ea7583a110 dont allow open if no device was found. 1999-07-13 08:15:22 +00:00
Roger Hardiman
4efbc31757 Bug fixes
Change number of VBI lines from 16 to 12 for NTSC formats.
 Juha.Nurmela@quicknet.inet.fi found/fixed bug in VBI_SLEEP.

New features
 MSP3430G DBX initialisation from Matt Brown <matt@dqc.org>
 STB Bt878 card identification.
 Hauppauge Model Number identification.
 Changes to probeCard() for better eeprom identification.
 Experimental TDA9850 initialisation code, from Linux bttv.

Cross Platform Changes
 The driver has been reorgainsed based ideas from Brad Parker's port to Linux
 to seperate OS Dependant and Independant sections.
 I have backends for FreeBSD 2.2.x/3.x and 4.x newbus, BSDI, OpenBSD and NetBSD.

This commit has FreeBSD 2.2.8/2.2-stable/3.x and FreeBSD 4.x newbus backends.

Some code submitted by: Juha.Nurmela@quicknet.inet.fi
                        Matt Brown <matt@dqc.org>
                        Brad Parker <brad@parker.boston.ma.us>

Some code obtained from:        Linux bttv driver
1999-07-12 15:51:50 +00:00
Bill Paul
3d13ca80ea Make the Winbond ethernet driver work on FreeBSD/alpha. Also added
bridging support while I was in the area.
1999-07-11 00:56:07 +00:00
Bill Paul
05919c5b73 if_sk.c: use pci_port_t instead of u_short
if_skreg.h: use alpha_XXX_dmamap() instead of pmap_kextract hackery on
alpha platform
1999-07-09 17:36:23 +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
Bill Paul
bedf427650 Grrr.... forgot one line from the previous fix. 1999-07-08 00:42:02 +00:00
Bill Paul
24e82101e0 Fix a potential race condition that can occur in xl_start(). If the NIC
clears out the transmit queue and zeroes the downlist pointer register,
but xl_txeof() isn't called before xl_start() tries to queue more packets,
xl_start() will think that the DMA is still in progress and not update
the downlist register again, thus causing packets to sit in the transmit
queue forever.

Patch provided by: Russell T Hunt <alaric@MIT.EDU>
1999-07-07 21:49:14 +00:00
Dag-Erling Smørgrav
6b5ca0d83e Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
Matt Jacob
9ba8673786 add in a boot environment isp_disable flag 1999-07-06 01:24:20 +00:00
Matt Jacob
100f099ba4 Wow- too much breakage..wait until you compile it, buckwheat... 1999-07-05 22:04:08 +00:00
Matt Jacob
86cb5d6b95 Oops- got sense of ifdef wrong 1999-07-05 22:01:48 +00:00
Matt Jacob
5542fe4b1a add ISP_DISABLE_2200_SUPPORT defines; Add reference to 2200 F/W 1999-07-05 20:24:46 +00:00
Bill Paul
7f971fc2ca Remove ti_refill_rx_rings() and associated stuff; replace dirty RX buffers
in ti_rxeof() instead. This doesn't really seem to provide much in the
way of a performance boost, and I'm pretty sure it can cause mbuf leakage
in some extreme cases.
1999-07-05 20:19:41 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
Peter Wemm
260c6dbfb9 Minor nit - pn_cachesize is not a PN_RX_BUG_WAR varible.
Also, a minor tweak to get better struct packing.
1999-07-04 04:21:29 +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
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
Poul-Henning Kamp
e366aade76 Bail after 5 attempts to read very noisy signals. 1999-07-03 08:23:00 +00:00
Matt Jacob
222bb54266 Remove pre-CAM code. Add in getenv_int calls for variables isp_mem_map,
isp_io_map, isp_no_fwload, isp_fwload, isp_no_nvram, isp_fcduplex
which are all bitmaps of isp instances that should or shouldn't
map memory space, I/O space, not load f/w, load f/w, ignore nvram,
not ignore nvarm, set full duplex mode. Also have an isp_seed value
that we can use to generate a pseudo seed for a synthetic WWN.
Other minor cosmetic cleanup. Add in support for the Qlogic ISP
2200. Very important change where we actually check now to see
whether we were successful in mapping request and response queues
(and fibre channel scratch space).
1999-07-02 23:18:03 +00:00
Peter Wemm
820f359d7e Change the cast in pci_map_port() from u_short * to pci_port_t * so it
compiles cleanly on the Alpha.  (On the alpha, the port type is an int,
not a short).
Cast a couple of pointers to ints via 'uintptr_t' rather than 'unsigned
int' since uintptr_t is long (64 bit) on Alpha, as are pointers.
1999-07-02 04:17:16 +00:00
Peter Wemm
f078b1e075 #include <machine/md_var.h> to bring the prototype for
alpha_platform_assign_pciintr() into scope (!).
1999-07-01 22:58:03 +00:00
Peter Wemm
be30a0cc53 #include <machine/md_var.h> to get prototype for alpha_register_pci_scsi(). 1999-07-01 22:00:12 +00:00
Roger Hardiman
812ca14c4b Stop signals being generated after meteor_close.
Update METEORSSIGNAL to disable signals by setting the signal to 0.

PR:		i386/10533
Submitted by:	Frode Vatvedt Fjeld <frodef@dslab7.cs.uit.no>
1999-06-29 16:45:51 +00:00
Matt Jacob
ec69779604 (corrections for type change in softc) 1999-06-24 16:42:33 +00:00
Jonathan Lemon
2d2ae58ae5 Allow the Ross host to PCI bridge to appear as a PCI bus. This permits
my Compaq 3000 to recognize the secondary bus.
1999-06-24 04:06:26 +00:00
Jonathan Lemon
db57feb70b Compaq Smart RAID driver for -current. Based on the original ida.c
driver by Mark Dawson.  This probably needs some work, but is stable
enough to boot a RAID-only configuration, and survive `make world'.
1999-06-24 03:33:30 +00:00
Poul-Henning Kamp
378d10a91d Pass the current timecounter to pps_event(). 1999-06-22 10:31:30 +00:00
Bill Paul
c9c4bee48c Tweak FIFO and DMA thresholds to improve performance and reduce likelyhood
of RX FIFO overruns.

Submitted by: bde
1999-06-20 18:56:09 +00:00
Bill Paul
19e7516669 Fix up the RealTek 8139 driver to work on FreeBSD/alpha. This involves a
few changes:

- there was a bug in rl_list_tx_init(): it was calculating the registers
  to initialize incorrectly. Not a problem on the x86 where unaligned
  access are allowed, but a problem on the alpha.

- set rl_btag accordingly depending on the machine type

- rl_rxeof() needs to be sure to longword-align the packet data. This
  is a little tricky since we copy the data out of the receive buffer
  using m_devget(), however there's no way to tell m_devget() to fill
  in the mbufs starting at a particular offset. To get around this,
  we tell m_devget to copy bytes+2 bytes starting at offset offset-2. This
  results in the proper alignment, and we can trim off the two leading
  bytes afterwards with m_adj(). We also allocate some extra space before
  the start of the receive buffer so that we don't get into trouble in
  the case where offset == 0.

- redefine vtophys() in if_rlreg.h for the alpha.

Making this chipset work on the alpha is sort of the inverse of putting
a jet engine on a rowboat (putting a propeller on a 747?) but when
you can get these things for $5 a pop, it's hard to stop people from
buying them.
1999-06-19 20:17:38 +00:00
Bill Paul
274342303b Add a transmit descriptor usage counter and use it to absolutely,
positively not let ti_encap() fill up the TX ring all the way and wrap
around. This fixes a potential transmit lockup where a really fast
machine (or particular TX traffic pattern) can overrun the end of the
ring.

Reported by: John Plevyak <jplevyak@inktomi.com>
1999-06-19 00:36:56 +00:00
Nick Hibma
f06b2abff3 Remove option USBVERBOSE
Add the options for debugging used in dev/usb/*.c

Submitted by:	Kazu
1999-06-16 17:34:36 +00:00
Bill Paul
05222a2c7d Grrr! The PNIC II's multicast hash table is only 128 bits wide, not 512
like the original PNIC and the MX98715A (from which the PNIC II is derived).
This requires special handling. Save the card type, and in mx_calchash(),
if we see that the card is a PNIC, return only the low 7 bits of the
hash instead of the low 9 bits.
1999-06-16 16:27:30 +00:00
Bill Fumerola
73568d2bf1 Fix non-benign typo.
Submitted by:	Daniel Baker <dbaker@cuckoo.com>
1999-06-16 12:26:40 +00:00
Dag-Erling Smørgrav
9b953cf681 Kill option FAILSAFE.
PR:		i386/12187
Approved by:	bde
1999-06-15 13:14:56 +00:00
Roger Hardiman
69be7dc19e Add VIA Apollo Master VT82c570 chipset. (I have 2 of these)
Also, Apollo IDE controller has device ID of 1571 and 0571
1999-06-15 12:01:26 +00:00
Mark Newton
009b52bf57 Ensoniq AudioPCI sound cards haven't worked since the newbus integration
because they haven't been able to attach.  Now fixed.

Submitted by:	Christian Weisgerber <naddy@mips.rhein-neckar.de>
1999-06-15 00:00:10 +00:00
Nick Hibma
680514601e 1) Add the USB controllers (will now print pretty strings when no usb
support is compiled in)
2) Add probing for generic USB host controllers as well so we get them all
3) make the returned strings look alike in the whole file
1999-06-13 20:48:29 +00:00
Nick Hibma
b24ecce39c Shorten the strings a bit (remove 'Host') 1999-06-13 20:46:10 +00:00
Roger Hardiman
3d68f363a4 Removed checking for unit>NBKTR.
No longer need when using device_get_softc.
(also fixed bug where loadable bktr module could only access 1st device)
1999-06-13 16:05:00 +00:00
Roger Hardiman
5a2f31f0fb Updated to use the new 4.x newbus API
Also removed the BSDI support (for now)
This allows the driver to be loaded/unloaded as a KLD
and loaded in the boot loader phase whithout making a custom kernel.
1999-06-12 14:54:56 +00:00
Andrey A. Chernov
97a83933e5 Add detection code for NVidia Riva 128,TNT,TNT2
(TNT2 from me)

PR: 12094
Submitted by: Ilya Naumov camel@avias.com
1999-06-09 11:46:43 +00:00
Roger Hardiman
2dc6d34fac Fix the cdevsw_add change made by PHK.
(It was accidentally added to the BSDI bktr_probe and not the
 FreeBSD bktr_probe)
1999-06-04 13:24:54 +00:00
Michael Haro
1f5abee8bd Add the 3Dfx Voodoo Banshee 1999-06-04 02:38:18 +00:00
Bill Paul
7ac97baa2c Change the warning message issued if pci_map_port() fails. I think this
happens if you have a BIOS with a 'Plug & Play OS' setting and you leave
it set to 'Yes.' This is wrong for FreeBSD (and LoseNT): it should be set
to 'No.' Apparently it's still possible to map the iobase of the NIC and
have the card work by reading the config space manually (which is what
the driver does if pci_map_port() fails) but we need to warn the user to
do fix their machine anyway. Anyway, warn the user to check the 'Plug &
Play OS' setting in their BIOS if mapping the io space fails.
1999-06-01 19:04:23 +00:00
Roger Hardiman
de9f1beee4 Updated to support new Meteor/PPB cards (PCI-PCI Bridge).
The driver now identifies the IBM PCI-PCI Bridge fitted to newer
Matrox cards and initialises it.

Sumitted by: Anton Berezin <tobez@plab.ku.dk>
The Protein Laboratory, University of Copenhagen
1999-06-01 17:30:08 +00:00
Roger Hardiman
153eb46fb6 On the new Meteor cards, the Philips SAA 7116 is connected to the PCI bus
via an IBM PCI-PCI bridge (82351 or 82352 or 82353)

The driver must identify if it is on a secondary PCI bus, which is
created via the IBM PCI-PCI bridge. If it is, then it must initialise
the IBM PCI-PCI bridge correctly.

To do this, the following new functions are added.
Because they use the pcici_t tag, they are considered 2.2 compatibility APIs
  pcici_t * pci_get_parent_from_tag(pcici_t tag);
  int       pci_get_bus_from_tag(pcici_t tag);

(The _from_tag suffix is used to prevent clashes with similarly named
 newbus PCI API functions)

Submitted by: Anton Berezin <tobez@plab.ku.dk>
Reviewed by:  Doug Rabson <dfr@nlsystems.com>
Reworked by:  Me (roger)
1999-05-31 22:13:37 +00:00
Poul-Henning Kamp
2447bec829 Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it.  cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.

cdevsw_add() will print an message if the d_maj field looks bogus.

Remove nblkdev and nchrdev variables.  Most places they were used
bogusly.  Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.

Move bdevsw() and devsw() functions to kern/kern_conf.c

Bump __FreeBSD_version to 400006

This commit removes:
        72 bogus makedev() calls
        26 bogus SYSINIT functions

if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.

I4b and vinum not changed.  Patches emailed to authors.  LINT
probably broken until they catch up.
1999-05-31 11:29:30 +00:00
Bill Paul
c008dec8df Add support for SiS 900 chipset (PCI ID 0x1039/0x0900), which appears to
be yet another rebadged RealTek 8139.
1999-05-30 18:55:20 +00:00