Commit Graph

1155 Commits

Author SHA1 Message Date
Roger Hardiman
e503a07843 Identify Intel 440 LX chipset motherboards 1999-05-26 13:14:24 +00:00
Justin T. Gibbs
f40c8d7155 All cards using aic789X chips use the new eeprom format.
Corrects bogus negotiation values on aic7890 based controllers.

PR: 11872
1999-05-25 20:12:32 +00:00
Roger Hardiman
ceed656248 Add OPTi 82c822 host to PCI bridge
This is an old OPTi chipset.
If you use a Bt878 card with this chipset, be sure to enable
the SIS/VIA chipset compatiblity mode workaround.

Tested By: Ben Laurie <ben@algroup.co.uk>
1999-05-25 15:56:10 +00:00
Roger Hardiman
8fa3a2e7ed Rename 849 to 849A (the correct name for the IC) 1999-05-25 12:44:40 +00:00
Roger Hardiman
ec3a598be7 Add support for the Bt878/Bt879's Intel 430 FX and
SIS/VIA/ OPTi chipset PCI bus workarounds.

These make the Bt878/879 chips stabler on certain
older and non-intel motherboards.

Use options BKTR_430_FX_MODE
or  options BKTR_SIS_VIA_MODE
to enable these modes.

Also rename 849 to 849A
1999-05-25 12:43:40 +00:00
Bill Paul
497760a16a Fix bug that can cause transmit corruption. There are actually two 'rings'
in the transmit code: the TX descriptor ring, and a 'shadow' ring of mbuf
pointers, one for each TX descriptor. When transmitting a packet that
consists of several fragments in an mbuf chain, we link each fragment
to a descriptor in the TX ring, but we only save a pointer to the mbuf
chain. This pointer is saved in the shadow ring entry which corresponds
to the first fragment in the packet. Later, ti_txeof() can release the
whole chain with a single m_freem() call. (We need the second ring to
keep track of the virtual addresses of the mbuf chains.)

The problem with this is that the Tigon isn't actually through with the
mbuf chain until it reaches the last fragment (which has the TI_BDFLAG_END
bit set), however the current scheme releases the mbuf chain as soon as
the first fragment is consumed. This is wrong, since the mbufs can then
be yanked out from under the Tigon and modified before the other fragments
can be transmitted.

The fix is to make a one line change to ti_encap() so that it saves the
mbuf chain pointer in the shadow ring entry that corresponds to the last
fragment in TX ring instead of the first. This prevents the mbufs from
being released until the last fragment is transmitted.

Painstakingly diagnosed and fixed by: Robert Picco <picco@mail.wevinc.com>
Brought to my attention by: dg
1999-05-24 14:56:55 +00:00
Roger Hardiman
ab27fe4452 Added rgb_vbi_prog() to capture VBI data and video at the
same time. To capture VBI data, /dev/vbi must be opened
before starting video capture.
A partly on code from Hiroki Mori <mori@infocity.co.jp>
1999-05-23 21:40:51 +00:00
Justin T. Gibbs
1723e869c1 First cut at a driver for the amd53c974 PCI SCSI host adapter. This
driver lacks error recovery and still needs more testing, but it's
about time I got it under revision control.

Submitted by:	 Tekram Inc.
Bus Space/DMA and cleanup: gibbs
1999-05-22 21:50:40 +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
Bruce Evans
1979249db2 Restored rev.1.76 which was clobbered by rev.1.77. 1999-05-22 04:34:59 +00:00
Bill Paul
333c864f90 Remove some #ifdef'ed code. The ADMtek doesn't have a 'enable reception of
broadcast frames' bit, so we don't need any code in al_init() to set/clear
it.
1999-05-21 23:58:12 +00:00
Kenneth D. Merry
0d0fb9ffeb Fix a memory leak and a double free that could happen in certain error
cases.  These were unlikely to happen in normal operation.

Noticed by:	"Christopher R. Bowman" <crb@ChrisBowman.com>
1999-05-21 22:02:02 +00:00
Bill Paul
405b45954e Ack! Cut & paste-o: xl -> al 1999-05-21 04:42:36 +00:00
Bill Paul
ab431312b4 This commit adds driver support for PCI fast ethernet cards based on the
ADMtek AL981 "Comet" chipset. The AL981 is yet another DEC tulip clone,
except with simpler receive filter options. The AL981 has a built-in
transceiver, power management support, wake on LAN and flow control.
This chip performs extremely well; it's on par with the ASIX chipset
in terms of speed, which is pretty good (it can do 11.5MB/sec with TCP
easily).

I would have committed this driver sooner, except I ran into one problem
with the AL981 that required a workaround. When the chip is transmitting
at full speed, it will sometimes wedge if you queue a series of packets
that wrap from the end of the transmit descriptor list back to the
beginning. I can't explain why this happens, and none of the other tulip
clones behave this way. The workaround this is to just watch for the end
of the transmit ring and make sure that al_start() breaks out of its
packet queuing loop and waiting until the current batch of transmissions
completes before wrapping back to the start of the ring. Fortunately, this
does not significantly impact transmit performance.

This is one of those things that takes weeks of analysis just to come
up with two or three lines of code changes.
1999-05-21 04:37:48 +00:00
Nick Hibma
91ea20f498 Add comment about split in driver 1999-05-20 19:52:04 +00:00
Andrew Gallatin
aa6de8e012 Add support for multiple PCI "hoses" used on various alpha platforms.
The specific intent of this commit is to pave the way for importing
Compaq XP1000 support.  These changes should not affect the i386 port.

Reviewed by: Doug Rabson <dfr@nlsystems.com>
(actually, he walked me through most of it & deserves more than reviewd-by
credit )
1999-05-20 15:33:33 +00:00
Roger Hardiman
d3a26f0c62 Updated Australian channel frequencies
Submitted by: Ivan Brawley <brawley@internode.com.au>
1999-05-19 22:04:21 +00:00
Peter Wemm
8dc26439da Move pcibus (host -> pci bus) probe/attach routines from nexus
to pcibus.c.  pci_cfgopen() becomes static and there are no more
bus #ifdef's in nexus.c.
1999-05-18 20:48:43 +00:00
Roger Hardiman
ec5d7ef31d Bt848 driver release 1.65
Change Intel GPIO mask to hopefully stop turning the Intel Camera off
Fixed tuner selection on Hauppauge card with tuner 0x0a
Replaced none tuner with no tuner for Theo de Raadt <deraadt@openbsd.org>.

Ivan Brawley <brawley@internode.com.au> added
the Australian channel frequencies.
1999-05-18 12:16:15 +00:00
Justin T. Gibbs
923dc21bfe Add a masking scheme to allow for detection of unknown cards using a
chip we think we understand.

Correct identification entry for the AHA2950U2.
1999-05-17 21:53:09 +00:00
Justin T. Gibbs
168d6886b8 Use a lookup table for device matching instead of a switch on a 64bit
value.  EGCS generates poor code for sparse switch statements on 64bit
values.

Requested by: bde
1999-05-14 17:38:07 +00:00
Justin T. Gibbs
f3da2c5d80 Take the subvendor and subdevice ids into account during device probe.
Sync up device Ids with the master Adaptec list.

Add probe support for the 2940 Pro although it isn't obvious that
all of the termination support is correct for this adapter yet.
1999-05-14 05:09:24 +00:00
Bill Paul
fb212aff15 Remove unneeded line of code that got left behind when I converted this
driver to use bus_space_read_foo()/bus_space_write_foo(). The line is not
visible unless you compile the driver to use PCI memory mapped mode, which
not done by default, but it should be fixed anyway.
1999-05-13 20:36:00 +00:00
Bruce Evans
a8481cfc72 memcmp -> bcmp. memcmp doesn't exist in the kernel, but unfortunately
it exists as a gcc builtin provided the kernel is not compiled with
-O0 or -fno-builtin.
1999-05-13 07:54:24 +00:00
Peter Wemm
221752dfcc Take a shot at handling INTR_FAST and INTR_EXCL for CY_PCI_FASTINTR.
Bruce suggested a patch before but that was based on the old DRIVER_TYPE_*
interfaces.
1999-05-11 15:28:38 +00:00
Peter Wemm
49e5f1b929 Use the probe priority mechanism to make sure the chip* probes do not
displace a real driver.
Revert rev 1.109.
Pick up a few things from elsewhere (a couple of SiS id's).

As an *experiment*, have the chip* driver claim (for reporting purposes)
IDE controllers if there isn't another PCI-aware ide or ata driver to
grab them.  I've exported the match function since it could be used from
the ata-all.c code replacing ata_pcimatch() - but I have not touched the
ata code.  I'd like to catch a few more devices this way, including USB
and other bridges etc.
1999-05-11 07:55:32 +00:00
Matt Jacob
c6608df332 Clean up 2.2.X support (which might have to be cleaned up again
after some of the previous commits). Add in support for the 1240
dual channel ISP card. Try the dance of unmapping a PCI interrupt
if we don't configure (if that ever works it'll be helpful).
1999-05-11 04:53:57 +00:00
Paul Richards
9adcb188e5 Set the bus master bit.
Submitted by:	Ted Faber
1999-05-10 22:39:37 +00:00
Doug Rabson
41787a353d Add missing suspend/resume methods. 1999-05-10 17:56:23 +00:00
Peter Wemm
3ec911d1bd Fix 'assignment used as truth value' on alpha. 1999-05-10 16:06:32 +00:00
Peter Wemm
8dbdf6eec6 #include "pci.h" for the build dir, not <pci.h> 1999-05-10 14:12:26 +00:00
Nick Hibma
4be5179ace Remove VIA USB controller (was '#if 0' out), to make sure
no one adds it back. Chip handled by uhci_pci.c .
1999-05-10 14:07:14 +00:00
Bruce Evans
7a9757f3a5 Detect PCI device IDs for latest boards. Simplified the ID comparisons.
Submitted by:	Ivan Passos <ivan@cyclades.com> (rewritten by me)
1999-05-10 10:23:40 +00:00
Roger Hardiman
458b25e55b Support LifeView FlyVideo 98 cards. Use EEPROM for card autodetection.Use
bttv's audio mux values.

Automatically locate the EEPROM i2c address and read the subsystem_vendor_id
from EEPROM and not the PCI registers.

Add NSMBUS checks around smbus/iicbus i2c bus code

Add GPIO mask for the audio mux to each card type.
Add CARD_ZOLTRIX and CARD_KISS from mailing list searches.

Tested by: Paul Reece <paul@fastlane.net.au>,
           Ivan Brawley <brawley@internode.com.au> and
           Gilad Rom <rom_glsa@ein-hashofet.co.il>
1999-05-10 10:10:13 +00:00
Roger Hardiman
af36b88b1b Update card type to support GPIO mask
Add NSMBUS checks around smbus/iicbus i2c bus code.
1999-05-10 10:08:50 +00:00
Roger Hardiman
2a3fb485f9 Add #if (NSMBUS>0) checks around smbus/iicbus i2c bus code. 1999-05-10 10:08:05 +00:00
Peter Wemm
94a8ab8acb #if 0 some unused code (debug?) to quiet a warning. 1999-05-10 00:20:46 +00:00
Stefan Eßer
de649cc42c Really support Ultra-2 chips. Symbios redefined a register that
was available to the programmer to hold chip state information:

Use the SDID register instead of CTEST3. This change actually
simplifies the SCRIPTS code, but I'm not absolutely sure, that
it is OK for all variants of NCR chips around and all device
combinations. I have had this code running on several systems
with 53c810, 875 and 895 controllers for several months.

Suggested by:	Gerard Roudier <groudier@club-internet.fr>
1999-05-09 22:44:42 +00:00
Peter Wemm
cc97c921ab For the ioctl that reads the pci configuration, look up the name and unit
on the fly so that we can see the driver assignment of new pci devices
as well in the 'pciconf -l' display.
1999-05-09 20:27:26 +00:00
Peter Wemm
c09634ba71 GC unused variable in struct. 1999-05-09 20:25:01 +00:00
Peter Wemm
35ce6c413e Missing revision markers. 1999-05-09 17:12:25 +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
edc2e3366d Make the pci vga detection work so that the card is claimed and it's
interrupt configuration reported.  (I just discovered my vga card is
being configured for irq 5... :-)  This is just reporting.  The vga_isa
driver does the real work using the isa compat mappings.
1999-05-09 16:32:00 +00:00
Peter Wemm
c0ccf7c6b6 Argh, don't clobber the pci device list if there are multiple busses!
(An AGP counts as a PCI bus, it seems...)
This stopped 'pciconf -l' from working on AGP or PCI->PCI bridge systems.
1999-05-09 15:54:04 +00:00
Peter Wemm
3f74540725 Fix two warnings. 1999-05-09 10:45:54 +00:00
Peter Wemm
a924771339 Fix warnings. 1999-05-09 10:43:54 +00:00
Poul-Henning Kamp
0510491458 fix some DRIVER_TYPE / INTR_TYPE confusions. 1999-05-09 09:56:52 +00:00
Doug Rabson
566643e39e Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +00:00
Peter Wemm
208e16e3af Fix a typo (eisa<->isa) and some minor cosmetics. 1999-05-08 21:30:38 +00:00
Peter Wemm
141ed0620b Print 'irq nn' on the device attach line like the old pci code did.
However, we are not printing 'int a/b/c/d' yet, is it worth it on non-SMP
systems?  (It's useful when tracing PCI->IO-APIC routing on SMP systems)
1999-05-08 20:28:01 +00:00
Peter Wemm
31c82d832c GC pci_bushigh() - no longer used. 1999-05-08 18:09:53 +00:00
Peter Wemm
77b0c7599a Oops, committed wrong version.. 1999-05-08 15:45:25 +00:00
Peter Wemm
c036f5cfa9 Fix a couple of newbus merge problems:
Restore 0x710110b9 ("AcerLabs M15x3 Power Management Unit") - but only
if NALPM == 0.
Restore 0x00051166 ("Ross (?) host to PCI bridge") so that
fixbushigh_Ross() gets called.
Delete generic_pci_bridge(), it's been replaced by other mechanisms (see
the isab and pcib match/probes and the pci_bridge_type() function)
1999-05-08 14:55:18 +00:00
Peter Wemm
b2dd339fdc Update intpm driver.
PR:		11531
Submitted by:	Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
1999-05-07 18:03:27 +00:00
Peter Wemm
250f167fe8 Minor style nit (this minor style.9 violation caused a grep miss here) 1999-05-07 16:33:08 +00:00
Julian Elischer
5422ed753b My 5520 turned out to be a 5510 in disguise.. correct the probe message. 1999-05-07 04:04:42 +00:00
Peter Wemm
2850fee53f Fix a goof on my part; s/struct moduledata */struct module */ 1999-05-06 22:05:39 +00:00
Peter Wemm
481d658f1e Fix some variable naming confusion 1999-05-06 22:04:21 +00:00
Julian Elischer
d4439333ff Add Cyrix (NatSemi) 5520 and 5530 PCI-ISA bridges. 1999-05-06 21:21:30 +00:00
Kenneth D. Merry
9deea8574e Add a number of interrelated CAM feature enhancements and bug fixes.
NOTE:  These changes will require recompilation of any userland
applications, like cdrecord, xmcd, etc., that use the CAM passthrough
interface.  A make world is recommended.

camcontrol.[c8]:
 - We now support two new commands, "tags" and "negotiate".

	- The tags commands allows users to view the number of tagged
	  openings for a device as well as a number of other related
	  parameters, and it allows users to set tagged openings for
	  a device.

	- The negotiate command allows users to enable and disable
	  disconnection and tagged queueing, set sync rates, offsets
	  and bus width.  Note that not all of those features are
	  available for all controllers.  Only the adv, ahc, and ncr
	  drivers fully support all of the features at this point.
	  Some cards do not allow the setting of sync rates, offsets and
	  the like, and some of the drivers don't have any facilities to
	  do so.  Some drivers, like the adw driver, only support enabling
	  or disabling sync negotiation, but do not support setting sync
	  rates.

 - new description in the camcontrol man page of how to format a disk
 - cleanup of the camcontrol inquiry command
 - add support in the 'devlist' command for skipping unconfigured devices if
   -v was not specified on the command line.
 - make use of the new base_transfer_speed in the path inquiry CCB.
 - fix CCB bzero cases

cam_xpt.c, cam_sim.[ch], cam_ccb.h:

 - new flags on many CCB function codes to designate whether they're
   non-immediate, use a user-supplied CCB, and can only be passed from
   userland programs via the xpt device.  Use these flags in the transport
   layer and pass driver to categorize CCBs.

 - new flag in the transport layer device matching code for device nodes
   that indicates whether a device is unconfigured

 - bump the CAM version from 0x10 to 0x11

 - Change the CAM ioctls to use the version as their group code, so we can
   force users to recompile code even when the CCB size doesn't change.

 - add + fill in a new value in the path inquiry CCB, base_transfer_speed.
   Remove a corresponding field from the cam_sim structure, and add code to
   every SIM to set this field to the proper value.

 - Fix the set transfer settings code in the transport layer.

scsi_cd.c:

 - make some variables volatile instead of just casting them in various
   places
 - fix a race condition in the changer code
 - attach unless we get a "logical unit not supported" error.  This should
   fix all of the cases where people have devices that return weird errors
   when they don't have media in the drive.

scsi_da.c:

 - attach unless we get a "logical unit not supported" error

scsi_pass.c:

 - for immediate CCBs, just malloc a CCB to send the user request in.  This
   gets rid of the 'held' count problem in camcontrol tags.

scsi_pass.h:

 - change the CAM ioctls to use the CAM version as their group code.

adv driver:

 - Allow changing the sync rate and offset separately.

adw driver

 - Allow changing the sync rate and offset separately.

aha driver:

 - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.

ahc driver:

 - Allow setting offset and sync rate separately

bt driver:

 - Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.

NCR driver:

 - Fix the ultra/ultra 2 negotiation bug
 - allow setting both the sync rate and offset separately

Other HBA drivers:
 - Put code in to set the base_transfer_speed field for
   XPT_GET_TRAN_SETTINGS CCBs.

Reviewed by:	gibbs, mjacob (isp), imp (aha)
1999-05-06 20:16:39 +00:00
Peter Wemm
c41dbe5cc4 Missing 'int' in declaration of variables. 1999-05-06 18:54:19 +00:00
Peter Wemm
dfd5dee1b0 Add sufficient braces to keep egcs happy about potentially ambiguous
if/else nesting.
1999-05-06 18:13:11 +00:00
Bill Paul
727c88e9da Tweak the Macronix driver to hopefully make it more reliable:
- Change to the same transmit scheme as the PNIC driver.
- Dynamically set the cache alignment, and set burst size the same as
  the PNIC driver in mx_init().
- Enable 'store and forward' mode by default. This is the slowest option
  and it does reduce 100Mbps performance somewhat, but it's the most
  reliable setting I can find. I'm more interested in having the driver
  work reliably than trying to squeeze the best performance out of it.
  The reason I'm doing this is that on *some* systems you may see a lot
  of transmit underruns (which I can't explain: these are *fast* test
  systems) and these errors seem to cause unusual and decidedly
  non-tulip-like behavior. In normal 10Mbps mode, performance is fine
  (you can easily saturate a 10Mbps link).

Also tweak some of the other drivers:

- Increase the size of the TX ring for the Winbond, ASIX, VIA Rhine
  and PNIC drivers.
- Set a larger value for ifq_maxlen in the ThunderLAN driver. The setting
  of TL_TX_LIST_CNT - 1 is too low (the ThunderLAN driver only allocates
  20 transmit descriptors, and I don't want to fiddle with that now
  because the ThunderLAN's descriptor structure is an oddball size
  compared to the others).
1999-05-06 15:32:52 +00:00
Bill Paul
b346e4e2e4 Dynamically increase TX start threshold if TX underruns are detected. 1999-05-05 17:05:07 +00:00
Bill Paul
36d3e45587 Fix the media selection for the 3c900B-FL 10baseFL adapter. It actually
uses the AUI port with an on-board AUI to 10baseFL transceiver, not the
10baseT port like I had earlier suspected. The 3c900B-FL should be properly
supported now.
1999-05-04 20:52:30 +00:00
Bill Paul
6263933e7a Upgrade firmware images Alteon's latest release (12.3.10). This fixes a
bug in the stats accounting (nicSendBDs counter was bogus when TX ring was
configured to be in host memory).

Update if_tireg.h to look for new firmware fix level.
1999-05-03 17:44:53 +00:00
Doug Rabson
84b399de51 Changes to support diskless booting on the alpha:
* Make the network code in the bootstrap more chatty (helps debugging)
* Add nfs root stuff to cpu_rootconf(). I also added a check to make sure
  it really was netbooting which allows the use of the same kernel for local
  and network boots.
* Tweak the de driver so that it takes the speed setting from the console
  for the alpha (some PWSs have broken de chipsets). This is the same
  behaviour as NetBSD/alpha.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1999-05-03 09:36:29 +00:00
Peter Wemm
dacc95aa33 Make this compile with CY_PCI_FASTINTR again. 1999-05-02 20:42:13 +00:00
Nate Williams
4be290acd4 - Added PCI identification support for the TI1251 PCI/CardBus bridge.
With this addition my ThinkPad 600E works with the stock FreeBSD
  PCMCIA code.
1999-05-02 05:53:50 +00:00
Nick Hibma
1a7cfd07a3 Move the disabling of interrupts right before the allocation of the
resource. Avoids useless interrupts occurring between the allocation
of the interrupt resource and the final initialisation of the
kernel. Cause of these interrupts is unknown (a resuming device?).
1999-05-01 23:30:09 +00:00
Bill Paul
0a9766ee3a Bunch of updates:
- Try to unbreak what I broke by screwing with the tx queuing again.
  I'm waiting for a few more people to test out this code and report back
  before I move it into current. Hopefully it will be soon. Basically I
  reverted to the old TX queuing strategy.

- Add experimental support for the 3c900B-FL (10mbps ST fiber). The card
  should be detected properly and the 10baseFL mode supported, but again
  I'm still waiting for word from a tester to see if this actually works.
  It shouldn't affect the other cards though; all the differences are in
  media selection.

- Set the TX start threshold register to get better performance.

- Increase the size of the RX and TX rings. UDP performance was pretty
  bad because the TX ring was too small. Should be substantially better
  now (I can saturate the link with either TCP or UDP now).

- Change some of the #defines to reflect proper 3Com ASIC names (boomerang,
  cyclone, krakatoa, hurricane).

- Simplify and reorganize interrupt handler; ack all interrupts right
  away and then process them. This avoids a potential race condition.
  (Noted by Matt Dillon.)

- Reorganize the bridging code to eliminate using a goto to jump into
  the middle of an if() {} clause. Sorry, that just made my brain itch.

- Use m_adj() in xl_rxeof().

- Make the payload alignment in xl_newbuf() the default (instead of
  just conditionally defined for the alpha) to improve NFS performance
  (avoids need for nfs_realign()).
1999-04-30 16:15:43 +00:00
Roger Hardiman
541157e3ac My last commit accidentally undid the changes made in rev 1.68
regarding COMPAT_PCI_DRIVER. Put them back.
1999-04-30 11:16:30 +00:00
Bill Paul
737267b891 Add a test to ti_encap() to try and prevent the transmit producer index
from ever catching up to the transmit consumer index. We can't let this
happen because ti_txeof() depends on the assumption that producer == consumer
means the ring is empty, and producer != consumer means the ring has some
number of active descriptors in it.
1999-04-29 16:27:51 +00:00
Roger Hardiman
f677e15fe8 Added initial code for VBI capture based on work by
Hiroki Mori <mori@infocity.co.jp> and reworked by myself.
This allows software decoding of teletext, intercast and
subtitles via /dev/vbi.
1999-04-29 10:15:55 +00:00
Roger Hardiman
26da6e9453 Add support for VBI capture from /dev/vbi.
This will allow software teletext/intercast/subtitles decoding
while watching a TV station.

Based on code from Hiroki Mori <mori@infocity.co.jp> but reworked by
myself.
1999-04-29 10:01:28 +00:00
Roger Hardiman
ea2052d226 Added new cards: NEC PK-UG-X017 and I/O DATA GV-BCTV2/PCI
Added new tuner: ALPS_TSBH1 (plus FM Radio for ALPS_TSCH5)
Added support for BCTV audio mux.

Submitted by Hiroki Mori <mori@infocity.co.jp>
1999-04-29 09:57:47 +00:00
Roger Hardiman
c8f810a76e Fix crashes caused by rows=0 or columns=0.
Add new #ifdef. By defining BKTR_NO_MSP_RESET you can prevent the
MSP34xx being reset by the bt848 driver. This is handy
if you pre-initialise the MSP34xx stereo audio chip in another
operating system first (eg MS Windows).
Suggested by:  Randal Hopper<aa8vb@ipass.net>
Suggested by:  Yuri Gindin <yuri@xpert.com>
1999-04-29 05:48:32 +00:00
Dmitrij Tejblum
604359cf9b s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/.
(Edited automatically)
1999-04-28 10:54:24 +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
46f40af052 Replace the pcidevice_set linker set based configuration mechanism for old
style pci drivers with a simple one-line change to use a module that
registers itself under new-bus and should in theory enable just about all
of the pci drivers to be loadable (kldload and loader(8)) but without
having the impact of converting the APIs yet.

This also fixes the problem of having undefined variables when only
new-style pci drivers are present.
1999-04-24 19:59:20 +00:00
Peter Wemm
96e2f2b27d Zap some #if 0 code for wired PCI devices. This will look quite different
under new-bus.
1999-04-24 19:55:41 +00:00
Justin T. Gibbs
1d28309371 ahc_pci.c:
Convert to new bus and bus dma.
	Use latest PCI API.

bt_pci.c:
	Fix a few bugs in how resourses are released left over from
	when this driver was converted to new bus.
1999-04-23 23:30:22 +00:00
Peter Wemm
54a8c69347 Stage 1 of a cleanup of the i386 interrupt registration mechanism.
Interrupts under the new scheme are managed by the i386 nexus with the
awareness of the resource manager.  There is further room for optimizing
the interfaces still.  All the users of register_intr()/intr_create()
should be gone, with the exception of pcic and i386/isa/clock.c.
1999-04-21 07:26:30 +00:00
KATO Takenori
275d4ec481 Recognize PC-98 16-bits bus (C-bus) as ISA bus. Because class number
of the C-bus is not assigned, PCI to C-bus bridges were recognized as
generic PCI bridges.
1999-04-20 11:36:36 +00:00
Jordan K. Hubbard
f3d2c3fd5c Add entries for Intel 82443GX chipset.
Submitted by:           Steinar Haug <sthaug@nethelp.no>
1999-04-18 18:44:21 +00:00
Peter Wemm
a49a3d4433 Implement an EISA new-bus framework. The old driver probe mechanism
had a quirk that made a shim rather hard to implement properly and it was
just easier to convert the drivers in one go.  The changes to the
buslogic driver go beyond just this - the whole driver was new-bus'ed
including pci and isa.  I have only tested the EISA part of this so far.

Submitted by:	 Doug Rabson <dfr@nlsystems.com>
1999-04-18 15:50:35 +00:00
Doug Rabson
a4a02ac46a Probe the SiS 85c503 as a PCI-ISA bridge. 1999-04-17 19:48:45 +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
Peter Wemm
6182fdbda8 Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition.  eisa, isapnp and pccard* are
not yet using the new resource manager.  Once fully converted, all drivers
will be loadable, including PCI and ISA.

(Some other changes appear to have snuck in, including a port of Soren's
 ATA driver to the Alpha.  Soren, back this out if you need to.)

This is a checkpoint of work-in-progress, but is quite functional.

The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.

Approved by:	core
1999-04-16 21:22:55 +00:00
Guy Helmer
93c0b05959 Add bridging support (tested in 3.1-RELEASE by Steven Vetzal
<svetzal@icom.ca>).
1999-04-16 01:56:06 +00:00
Bill Paul
ae1a2d45d9 - Close PR #11136: add PCI ID for another new cyclone device: the
3c900B-TPC (twisted pair and coax). Treated similarly to the
  3c900B-COMBO, except no AUI port.

- Fix media selection so that it's possible to select the AUI and BNC
  ports on the 3c905B-COMBO. This board is now fully supported.

- Change TX queueing strategy to hopefully be more efficient by avoiding
  register accesses in xl_start(). Should provide small performance
  improvement and a little better reliability.
1999-04-15 03:18:33 +00:00
Alexander Langer
9b0f83b7fb Added missing newline to "no ports found!" message. 1999-04-15 00:13:20 +00:00
Bill Paul
bd43efdba2 Grrr. Make all modes work properly with the 82c168 chip and built-in
transceiver. Note in the manual page that autoselection doesn't
work on the 82c168 because the built-in NWAY support is horribly
broken. Manual mode selection works fine, but autoneg is broken for
everything except maybe 10Mbps half-duplex. There's no simple way
to fix this at the moment, so I have to settle for documenting the
bug for now. Fortunately, there aren't anywhere near as many 82c168
boards around as there are 82c169s.
1999-04-14 19:40:08 +00:00
Peter Wemm
b9da114482 Build the functionality of the wdc_p hack into the ide_pci.c code.
All it did was match a specific device ID and turn on a quirk for
the wdc driver.

Incidently, at line 1462 there is a return that prevents the generic
ide_pci code from trying to look at the device.  I'd be interested
to know if we can take out the return and let the generic code "see" it.
I've left the return in because that's the way it worked before.

(Be sure to rerun config after cvsup or you'll get undefined files!)
1999-04-13 20:22:34 +00:00
Peter Wemm
3e3e4375c8 Shoot the LKM support in the old wd/wdc/atapi driver set in the head and
perform a cleanup/unifdef sweep over it to tidy things up.  The atapi
code is permanently attached to the wd driver and is always probed.

I will add an extra option bit in the flags to disable an atapi probe on
either the master or slave if needed, if people want this.

Remember, this driver is destined to die some time.  It's possible that
it will loose all atapi support down the track and only be used for
dumb non-ATA disks and all ata/atapi devices will be handled by the new
ata system.

ATAPI, ATAPI_STATIC and CMD640 are no longer options, all are implicit.

Previously discussed with:  sos
1999-04-13 19:38:12 +00:00
Bill Paul
ca31683853 Some more fixes:
- It turns out that the 'promiscuous mode' bug what I discovered with the
  PNIC is not restricted to promiscuous mode. I've been doing some remote
  debugging for someone with a P75 system, and at 100Mbps, the receiver
  screws up even when the NIC is in normal mode. Thus, enable the workaround
  for this bug all the time. Note that the workaround is still not enabled
  for the PNIC II, since I haven't tested one yet.

- Set the 'arbitration' bit in the bus configuration register and set the
  maximum burst size to 16 longwords. This seems to fix problems with
  transmit corruption on the P75 system mentioned above. (It probably hurts
  performance a bit too, but I've given up trying to make the PNIC perform
  well.)
1999-04-13 17:29:55 +00:00
Bill Paul
ea716519f5 Merge in some updates for the RealTek driver, mainly:
- Rewrite the transmit section to be a little less bogus.
- Set ifq_maxlen correctly. RL_TX_LIST_CNT - 1 is wrong, because for the
  RealTek, RL_TX_LIST_CNT is 4. Set it to IFQ_MAXLEN instead.
1999-04-12 21:37:00 +00:00
Bill Paul
d90ce12302 Grr... don't touch the PN_GEN (general purpose) register in pn_setcfg()
unless this is a NIC without an MII-based PHY (i.e. an older LinkSys
LNE100TX).
1999-04-12 21:13:12 +00:00
Bill Paul
980e28f69a Add support for the 3cSOHO100-TX, which is a "hurricane" chipset
(cut-down version of the "cyclone" for the small office/home office
"cheap bastard" market). Basically the same as a 3c905B but without
Wake-on-LAN, ROM socket, etc...
1999-04-12 20:38:45 +00:00
Bill Paul
90ccde293e Minor tweak: move initialiation of busctl register to before setting of
the cache alignment bits.
1999-04-12 02:47:20 +00:00
Bill Paul
863e79b09e Some small updates:
- Wait longer for the reset to complete in xl_attach() to try and avoid
  'command never completed' warnings.

- Clean up a few odds and ends in xl_attach().

- Add PCI ID for the 3c905B-COMBO (a new card). Right now this is
  treated as a 3c905B; I need to dig up one of these cards for testing
  before I can make the AUI and BNC ports work.

- Add a hack to force reading the I/O address directly from the PCI
  registers if pci_map_port() fails. I SHOULD NOT HAVE TO DO THIS:
  SOMEBODY WITH MORE PCI CLUES THAN I SHOULD INVESTIGATE WHY THIS
  HAPPENS.
1999-04-11 17:44:44 +00:00
Nick Hibma
5e36e2fe52 Changed pci_config_read() to pci_map_port(). Pointed out by Doug Rabson. 1999-04-11 14:24:20 +00:00
Bill Paul
41e70f38d2 Enable the promiscuous mode workaround for the PNIC 82c168 chip, which
appears to need it.
1999-04-11 05:15:26 +00:00
Eivind Eklund
66235db57f Staticize. 1999-04-11 02:50:42 +00:00
Eivind Eklund
1025c39862 pci_register_lkm can fail gracefully, so let it do that when there is
no more memory (M_WAITOK -> M_NOWAIT).  It may be called early enough
during boot that M_WAITOK isn't OK.  (In theory - right now it isn't called
from anywhere).
1999-04-11 02:46:20 +00:00
Bill Paul
326acf4d96 Finally add support for the older 82c168 PNIC chip with the built-in
transceiver. Thanks to Brian Walenze for donating a NIC with this chip
on it (LinkSys didn't really sell that many of them and they're not
in production anymore). The driver now distinguishes between the
82c168 and 82c169 when probing. If no MII transceiver is detected,
it switches over to using the internal one.
1999-04-10 18:44:53 +00:00
Bill Paul
4473c5ec86 Make ASIX driver work on FreeBSD/alpha, add to GENERIC. 1999-04-08 17:42:48 +00:00
Bill Paul
e31c685452 Add PCI IDs for the Compex RL100-TX, which uses the Macronix 98713 chip. 1999-04-08 17:38:05 +00:00
Mike Smith
facdaf9e33 Remove inactive pmap_setdevram()/pmap_setvidram consumer code. 1999-04-07 03:59:13 +00:00
Nick Hibma
61f973056b fix typo 1999-04-06 23:09:58 +00:00
Bill Paul
2075407db2 Remove teensy-weensy bit of debug code that crept in.
Oh, I forgot to mention: this driver also works on FreeBSD/alpha (big
thanks to Andrew Gallatin). And there is a 2.2.x version available for
those who stubbornly refuse to upgrade.
1999-04-06 22:56:21 +00:00
Bill Paul
d02c233129 Add driver support for gigabit ethernet adapters based on the Alteon
Networks Tigon 1 and Tigon 2 chipsets. There are a _lot_ of OEM'ed
gigabit ethernet adapters out there which use the Alteon chipset so
this driver covers a fair amount of hardware. I know that it works with
the Alteon AceNIC, 3Com 3c985 and Netgear GA620, however it should also
work with the DEC/Compaq EtherWORKS 1000, Silicon Graphics Gigabit
ethernet board, NEC Gigabit Ethernet board and maybe even the IBM and
and Sun boards. The Netgear board is the cheapest (~$350US) but still
yields fairly good performance.

Support is provided for jumbo frames with all adapters (just set the
MTU to something larger than 1500 bytes), as well as hardware multicast
filtering and vlan tagging (in conjunction with the vlan support in
-current, which I should merge into -stable soon). There are some hooks
for checksum offload support, but they're turned off for now since
FreeBSD doesn't have an officially sanctioned way to support checksum
offloading (yet).

I have not added the 'device ti0' entry to GENERIC since the driver
with all the firmware compiled in is quite large, and it doesn't really
fit into the category of generic hardware.
1999-04-06 17:08:31 +00:00
Matt Jacob
ab6d004056 Read the board revision and trim cache line size back from 16 to 1
for early revision 2100 boards. Make sure to turn ROM off for these
boards.
1999-04-04 01:14:02 +00:00
Nick Sayer
db49f041ae Import PCI pccard bridge chip probing from PAO. Hopeful prelude for
broadening chipset support in -current.

Reviewed by:	joerg
Obtained from:	PAO
1999-04-01 15:28:10 +00:00
Bill Paul
8919d7d4e7 Make the Macronix driver work on FreeBSD/alpha and add to GENERIC.
Like the PNIC, we have to copy packet headers in the receive handler
because the chip will only DMA to longword aligned buffers.

Also do some mindor cleanups.
1999-04-01 02:09:37 +00:00
Bill Paul
11ebc6f0fa Shorten device names so that the pci probe lines don't exceed 80 chars
and wrap to a second line.

Put 'command never completed' message inside #ifdef DIAGNOSTIC/#endif to
stop people worrying about it (it's harmless).
1999-03-31 15:45:15 +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
Bill Paul
25223996f1 Insert ifmedia_set() that I forgot and put in the vtophys() hack for
the alpha. Now the ThunderLAN driver works on the alpha (both my
sample cards check out.) Update the alpha GENERIC config to include
ThunderLAN driver now that I've tested it.
1999-03-31 04:04:14 +00:00
Bill Paul
5563ee5462 Fix a line wrap bogon. 1999-03-30 19:33:47 +00:00
Bill Paul
85c47a212e Various updates for the ThunderLAN driver:
- When trying to map ports, if mapping TL_PCI_LOIO or TL_PCI_LOMEM fails,
  try mapping the other one. Apparently, some ThunderLAN parts swap these
  two registers while others don't.

- Add support for bitrate (non-MII) PHYs. If no MII-based PHY is found,
  program the chip for bitrate mode. This is required for the TNETE110
  part, which doesn't have MII support. (It's also obsolete, but there
  are still some people out there who have them.) With this change and the
  change above, the Compaq Netflex-3/P 10baseT/BNC board works correctly.
  (Thanks to Matthew Dodd for getting me one of these cards.)

- Convert to bus_space_foo() for register accesses.

- Add changes to support FreeBSD/Alpha. I still have to actually test
  this in my Alpha box so I'm not going to update /sys/alpha/conf/GENERIC
  yet.
1999-03-30 17:07:20 +00:00
Greg Lehey
89d8b5e853 Add support for SiS 5591/5595 chipset.
Contributed-by: "Richard Seaman, Jr." <dick@tar.com>

Tested-by:	Chris Piazza <cpiazza@home.net>
		Tugrul Galatali <tugrul@ianai.BlackSun.org>
		grog

This code includes lots of stuff for verbose probing.  I'm not 100%
sure that the output of the verbose probe is correct, but everything
else works fine, and -CURRENT was broken for the 5591 before, so I'm
committing it anyway.
1999-03-28 05:05:12 +00:00
Nick Hibma
e1c81f1d94 Cleaning up of code, remove unneeded cruft and make
code more compact.
1999-03-27 23:08:44 +00:00
Bill Paul
8fe2c75e31 Make the xl and pn drivers work on FreeBSD/alpha and add them to
sys/alpha/conf/GENERIC.

Note: the PNIC ignores the lower few bits of the RX buffer DMA address,
which means we have to add yet another kludge to make it happy. Since
we can't offset the packet data, we copy the first few bytes of the
received data into a separate mbuf with proper alignment. This puts
the IP header where it needs to be to prevent unaligned accesses.

Also modified the PNIC driver to use a non-interrupt driven TX
strategy. This improves performance somewhat on x86/SMP systems where
interrupt delivery doesn't seem to be as fast with an SMP kernel as
with a UP kernel.
1999-03-27 20:41:25 +00:00
Matt Jacob
92c49d78da enable 1080 LVD support 1999-03-25 22:53:56 +00:00
Nick Hibma
d0ef08ba15 Check whether the PIRQD enable bit is set in LegSup and if not, set it.
On my PIIX4 chip rev 1 this is required. Have not had any complaints from
other people so it might be a problem with this stepping.
1999-03-23 21:37:45 +00:00
Justin T. Gibbs
73c9c6dd62 Add support for the 3950U2B controller.
Recognize aic7895 controllers that have been "acquired" by a RAIDPort
card as normal aic7895s.

Recognize the aic7815 Raid Parity/Memory controller chip and notify
the user that it's RAID functionality will be ignored.
1999-03-23 07:26:41 +00:00
Wes Peters
df373873b5 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 Rizzo
ab090e5b4e MF22... add bridging support to the device drivers. Without this
bridging cannot work on -current/releng3!
1999-03-17 16:44:53 +00:00
Matt Jacob
d59bd46908 Prep for 1080/1240 support. Those fine h/w engineers at Qlogic
gave yet another internal register layout model for what is
*still* the same architecture. I hope they saved billyuns of gates
'coz otherwise this is *really* annoying.
1999-03-17 05:07:18 +00:00
Peter Wemm
ac3101276b Merge NetBSD 1.80->1.82 changes from vendor branch into mainline. 1999-03-14 08:32: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
Peter Wemm
3b419f5843 set if_snd.ifq_maxlen to something reasonable - note that if_de.c has
a wierd double-queue arrangement..  It always empties the if_snd queue
then puts the transmit packets into a different queue that is limited
by the number of TX descriptors and does it's own discards...
This should stop the boot-time XXX warning anyway.
1999-03-13 09:21:27 +00:00
Poul-Henning Kamp
68f6066e6b Fix Typo. 1999-03-12 11:09:18 +00:00
Poul-Henning Kamp
32c203577a Make even more of the PPSAPI implementations generic.
FLL support in hardpps()

Various magic shuffles and improved comments

Style fixes from Bruce.
1999-03-11 15:09:51 +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
Justin T. Gibbs
b08ce6a386 Add untested code to support the aha2930U2W.
Modify to deal with changes in the storage of user negotiation settings.
1999-03-05 23:28:36 +00:00
Luigi Rizzo
d560f7208b Fix handling of IFF_ALLMULTI. The code did not call
tulip_addr_filter() on SIOCSIFFLAGS, and was nuking the IFF_ALLMULTI
on entering tulip_addr_filter(). As a result it was impossible to run
a multicast router on a machine with a "de" interface.
1999-03-01 16:54:28 +00:00
Bill Paul
69807449d7 Remove call to DELAY() from xl_wait(), since xl_wait() is in the
interrupt handler codepath. Having the delay there didn't really
accomplish much anyway.
1999-02-26 08:39:24 +00:00
Bill Paul
46d13fc612 Add PCI device ID for the PNIC II. 1999-02-26 07:50:53 +00:00
Roger Hardiman
efe3a31e73 My changes:
Added autodetection of MMAC Osprey 100 card for
Jan Schmidt <mmedia@rz.uni-greifswald.de>. The MMAC card has an EEPROM
which contains an ASCII string beginning with "MMAC".
Corrected Hauppauge Audio Mux Mute value from 0x01 to 0x04.
Fixed a typo.

Sumitted change:
Added ALPS Tuner Type submitted by Hiroki Mori <mori@infocity.co.jp>

Submitted by:	Roger Hardiman and Hiroki Mori <mori@infocity.co.jp>
1999-02-25 07:45:47 +00:00
Bill Paul
141ae16656 Add support for still more cheapo 10/100 cards: Delta Electronics and
Addtron appear to have their own VIA Rhine II and RealTek 8139 boards
with custom PCI vendor and device IDs. This commit updates the PCI
vendor and device lists in the vr and rl drivers so that we can probe
the additional devices.

Found by: nosing around the PCI vendor and device code list at:
	http://www.halcyon.com/scripts/jboemler/pci/pcicode
1999-02-23 15:38:25 +00:00
Bill Paul
e945f65af7 Dangit... made a typo in the NEXPTR register definition (0x55 -> 0x45). 1999-02-23 02:00:06 +00:00
Bill Paul
4bfc6cc972 Minor updates for the ASIX AX88141, which is a newer version of the
AX88140A with power management and magic packet support. Correct the
addresses of the PCI power management registers and add some code to
detect the revision ID of the AX88141 and identify it in the probe
messages.

No other changes are needed since the AX88141 is functionally
identical to the AX88140A.
1999-02-23 01:52:42 +00:00
Doug Rabson
7845080b68 Add support for Compaq ProLiant 1200 host to PCI bridge.
Obtained from: 2.2 branch
Reviewed by: Benjamin Lewis <bhlewis@gte.net>
1999-02-21 11:39:37 +00:00
Nick Hibma
fe5ba84529 Moved [uo]hci_pci.c from /sys/dev/pci to /sys/pci after Soren
threatened to send Bruce. These files are no longer shared
   with NetBSD anyway.

   Requires a config and make depend.
1999-02-18 21:42:19 +00:00
Nick Hibma
47fd282734 Undo Nicolas' changes (1.91->1.92, added USB controller in pcisupport.c).
Please don't.
1999-02-18 18:48:01 +00:00
Nicolas Souchu
5ca2e94010 Add alpm.c, Aladdin Power Management SMBus support for the SMBus framework.
Update pcisupport.c with NALPM and Aladdin USB detection printf.
1999-02-13 17:51:46 +00:00
Julian Elischer
a728078455 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
Bill Paul
021f8bcb89 Do not issue RX and TX reset commands in xl_stop() and xl_init(). On the
3c905B, the RX and TX reset commands also reset the cyclone chip's internal
PHY, which causes it to restart its autonegotiation session. This takes a
second or two to complete, which makes the interface seem to stop responding
for a few seconds every time you do something that reinitializes it.

Issuing the RX and TX resets on the older 3c905 boomerang adapters doesn't
cause any delay because the boomerang chip requires an external PHY.

This should fix the problem where people doing network installs via 3c905B
cards experience a delay after the interface is first initialized, among
other things.
1999-02-11 23:59:29 +00:00
Julian Elischer
da15ec8bf7 Define more registers and fix incorrect (but unused) register bit definitions. 1999-02-11 23:41:21 +00:00
Julian Elischer
f1bf08c22e 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
Roger Hardiman
f02529f9b2 Added ioctl REMOTE_GETKEY for Hauppauge Infra-Red Remote Control.
Submitted by Roger Hardiman.

Added ioctl TVTUNER_GETCHANSET to discover which regions the bktr driver
supports. Submitted by Vsevolod Lobko <seva@alex-ua.com>

Added BT848_GPIO_SET_EN,BT848_GPIO_SET_DATA (and GETs) to allow user land
control of the GPIO pins. This allows a Radio module on the GPIO port
to be controlled. Submitted by Vsevolod Lobko <seva@alex-ua.com>
The kernel option BKTR_GPIO_ACCESS must be used to enable the GPIO ioctls.

Submitted by:	Roger Hardiman and Vsevolod Lobko <seva@alex-ua.com>
1999-02-11 10:22:30 +00:00
Justin T. Gibbs
957fea92f0 Set the ultra enable bits in the adaptor's scratch ram area only after
we finish modifying our in kernel version during seeprom configuration.
1999-02-11 07:12:16 +00:00
Matt Jacob
d951bbca48 Cleanup. Set all PCI parameters of importance. Set a define that will
allow us via config options prefer mem space to I/O space.
1999-02-09 01:12:52 +00:00
Roger Hardiman
08d8a5b841 Added detection for bt848a chips 1999-02-08 11:55:30 +00:00
Roger Hardiman
a3869d3479 Added check to bktr_mmap() from OpenBSD driver.
Improved MSP34xx reset for bt848 Hauppauge boards.
Added detection for Bt848a.
Vsevolod Lobko<seva@sevasoft.alex-ua.com> added more XUSSR channels.
Submitted by:	parts from Vsevolod Lobko<seva@sevasoft.alex-ua.com>
Obtained from:  parts from OpenBSD
1999-02-08 11:53:05 +00:00
Peter Wemm
811d024014 Back out rev 1.89. The #include is necessary for the #if that tests
the value that config(8) provides when intpm is configured.  It seems
that somebody forgot to rerun config at the time and commented this out
instead.
1999-02-06 02:28:52 +00:00
Bill Paul
e8354668bd Remember to initialize ifp->if_snd.ifq_maxlen. 1999-02-01 21:25:52 +00:00
Matt Jacob
1d74fa4ca5 roll internal release tag 1999-01-30 07:08:55 +00:00
Bruce Evans
d12895f90b Removed a bogus cast to v_caddr_t. This is part of terminating
v_caddr_t with extreme prejudice.  Here the bogons were originally
the same as for c_caddr_t (half-baked K&R support), but rev.1.95
changed one wrong cast and one harmless cast to 2 wrong casts,
and rev.1.96 only fixed the originally wrong cast.
1999-01-29 11:31:45 +00:00
Bruce Evans
9e26dd2a54 Removed bogus casts to c_caddr_t. This is part of terminating
c_caddr_t with extreme prejudice.  Here the original casts to
caddr_t were to support K&R compilers (or missing prototypes),
but the relevant source files require an ANSI compiler.
1999-01-29 08:29:05 +00:00
Roger Hardiman
f60cbfffac Support for MSP3410D / MSP3415D Stereo/Mono audio using the audio format
Auto Detection Mode. This leaves MSP3400C owners still unsupported.
Thanks to Gerd Knorr <kraxel@cs.tu-berlin.de> for providing some early
assistance and sample code in the linux bttv driver.
Nicolas Souchu <nsouch@freebsd.org> ported the msp_read/write/reset
functions to smbus/iicbus.

METEOR_INPUT_DEV2 now selects a composite camera on the SVIDEO port.
For true SVIDEO, use METEOR_INPUT_DEV_SVIDEO.
If you get a monochrome image from the SVIDEO port, you have
seleted the wrong input type.

Tested by:      Johan Larsson<gozer@ludd.luth.se>
1999-01-28 17:47:47 +00:00
Matthew Dillon
697457a133 Fix warnings related to -Wall -Wcast-qual 1999-01-28 17:32:05 +00:00
Matthew Dillon
8aef171243 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile
1999-01-28 00:57:57 +00:00
Matthew Dillon
fe08c21a53 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
Matthew Dillon
b4e36adf1c Fix warnings preparing for -Wall -Wcast-qual
Also disable one usb module in LINT due to fatal compilation errors,
    temporary.
1999-01-27 20:09:21 +00:00
Matthew Dillon
cc6e054933 Add missing declarations to fix error with LINT compile 1999-01-27 18:36:49 +00:00
Bill Paul
d5901891f4 When selecting the correct EEPROM offset to use for probing the station
address, account for cards which report the Texas Instruments PCI vendor ID
in addition to Compaq and Olicom. (I don't actually have a card that
reports the TI vendor/device ID, but it appears that some Racore adapters
work this way, and failing to account for it when we have the ID listed
in the supported devices list is a bug.)
1999-01-26 15:18:26 +00:00
Peter Wemm
5581e43bbf Check if the intpm controller is configured first before stopping
recognition of the 82371AB device.
1999-01-26 04:54:38 +00:00
Nicolas Souchu
04fb1490a0 Terminate commit for the Intel PIIX4 SMBus support. Already committed files
are sys/pci/intpm*

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
1999-01-25 19:34:27 +00:00
Torsten Blum
de6f543955 Identify the TI1250 PCMCIA/CardBus bridge. It seems that it's compatible
to the TI1131. At least it works in my Compaq Armada 7800.
1999-01-25 12:59:31 +00:00
Nicolas Souchu
7c7545e182 SMBus support for the Intel PIIX4 power management unit. See smbus(4),
iicbus(4) and smb(4).

User programs are available to retrieve SDRAM and sensor info, contact
the author.

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Reviewed by: Mike Smith <msmith@freebsd.org>
1999-01-24 18:13:31 +00:00
Roger Hardiman
2c401a831e Added detection of Hauppauge IR remote control.
and MSP34xx Audio chip. Fixed i2c read error.
Hauppauge supplied details of new Tuner Types.
Added tuner type 0x1a.
Danny Braniss <danny@cs.huji.ac.il> submitted Bt878
AverMedia detection with PCI subsystem vendor id.
1999-01-23 11:32:06 +00:00
Roger Hardiman
d3697a3ac3 Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
Updated to support Hauppauge IR Remote Control
1999-01-23 11:28:16 +00:00
Bill Paul
2008c8087c Multicast code isn't quite correct. The RealTek wants the upper six bits
of the CRC as the multicast hash table bit, not the lower six bits. Plus
we have to flip on all bits in the table for multicast mode.

Pointed out by: Kazushi SUGYO <k-sugyou@nwsl.mesh.ad.jp>
1999-01-22 15:25:04 +00:00
Stefan Eßer
441e39d74a Fix problem with zero valued map registers followed by valid map entries.
The previous code just ignored the invalid map register, but this gave
surprising results because of the way pci_map_port() associated the map
register offset supplied with a map entry in the map array.
1999-01-19 23:29:20 +00:00
Bruce Evans
555421cf40 Pass the unit number to the DMA cookie lookup routine and use it
to look up cookies properly, at least for standard controllers.
Cookies are used so that we don't have to pass around lots of args.
All of the dmainit functions use the unit number so it is essential
that we pass them a cookie with the correct unit number.

This may break working configurations if there are bugs in the
dmainit functions like the ones I just fixed for VIA chipsets.

Broken in:	rev 1.4 of ide_pci.c and rev.1.139 of wd.c.
1999-01-17 05:46:25 +00:00
Bruce Evans
0abd520152 Fixed a 2-bit error in initializing MWDMA mode for VIA chipsets.
Prefetch/postwrite was enabled for the wrong controller.  (VIA
is bitwise big endian and we confused ourself by shifting left
instead of right.)

Extracted from:	last set of patches from the author
		(john hood <cgull@smoke.marlboro.vt.us>) on 7 Feb 1998
1999-01-17 05:18:54 +00:00
Bill Paul
d4a2465595 Small cosmetic tweak: in rl_rxeof(), use the constant RX_CMD_EMPTY_RXBUF
instead of the magic number 1.
1999-01-16 21:03:57 +00:00
Bill Paul
1851594ca0 Remove the code that manually pads frames to at least 60 bytes;
the ASIX chip supports auto-padding.
1999-01-16 20:40:52 +00:00
Bruce Evans
0c63b25bd1 Fixed a 1-bit error in initializing UDMA mode for VIA chipsets.
Instead of initializing UDMA mode, we turned it off and made sure that
it stays off by turning on the "UDMA enable by SET FEATURES" disable.

The damage was limited by bugs in cookie lookup, and suitable
initialization by some BIOSes.  The cookie list has slaves before
masters, and the unit number is ignored when cookies are looked up,
so cookie lookup always finds cookies for slaves and the bug only
clobbers slaves, so the bug was harmless for common configurations
with no slaves or only non-UDMA slaves.  UDMA initialization for
masters actually worked if the BIOS turns on the UDMA mode bit and
turns off the "UDMA enable by SET FEATURES" disable.
1999-01-16 19:48:01 +00:00
Bill Paul
e4d0044c3a Stability fixes:
- In wb_rxeof(), if the received packet is less than MINCLSIZE bytes,
  copy it to an mbuf chain so as to be more frugal in our use of mbuf
  clusters.

- The Winbond chip, like the ASIX, wants the 'TX interrupt request'
  bit set in the _first_ fragment of a transmitted frame, not the
  last. (At least the Winbond manual states this unambiguously; too
  bad I wasn't paying attention when I read it the first time.)

- Turn off the transmit threshold mechanism (initialize the threshold
  to 0). This effectively puts the chip in 'store and forward' mode
  which seems to cut down on transmit errors a little. It may also
  reduce transmit performace a bit, but I'm willing to do that if it
  means better reliability.
1999-01-16 06:25:59 +00:00
Bill Paul
51b875b355 Fix some stability problems:
- Normally, the driver allocates an mbuf cluster for each receive
  descriptor. This is because we have to be prepared to accomodate up to
  1500 bytes (a cluster buffer can hold up to 2K). However, using up a
  whole cluster buffer for a tiny packet is a bit of a waste. Also,
  it seems to me that sometimes mbufs will linger in the kernel for
  a while after being passed out of the driver, which means we might
  drain the mbuf cluster pool. The cluster pool is smaller than the
  mbuf pool in general, so we do the following: if the packet is less
  that MINCLSIZE bytes, then we copy it into a small mbuf chain and
  leave the mbuf cluster in place for another go-round. This saves
  mbuf clusters in some cases while still allowing them to be used
  for heavy traffic exchanges with lots of full-sized frames.

- The transmit descriptor has a bit in the control word which allows
  the driver to request that a 'TX OK' interrupt be generated when
  a frame has been completed. Sometimes, a frame can be fragmented
  across several descriptors. The manual for the real DEC 21140A says
  that if this happens, the 'TX interrupt request' bit is only valid
  in the descriptor of the last fragment. With the ASIX chip, it seems
  the 'TX interrupt request' bit is only valid in the descriptor of
  the _first_ fragment. Actually, the manual contains conflicting
  information, but I think it's supposed to be the first fragment.
  To play it safe, set the bit in both the first and last fragment to
  be sure that we get a TX OK interrupt. Without this fix, the driver
  can sometimes be late in releasing mbufs from the transmit queue
  after transmission.
1999-01-16 06:19:38 +00:00
Mike Smith
d387675c42 Spell "ctlr" consistently. 1999-01-16 03:55:46 +00:00
Mike Smith
38c9282d5c Fix breakage in rev 1.19; the second argument to ide_pci_candma is a
controller number, not a unit number.  Make this clear.
1999-01-16 00:36:53 +00:00
Bruce Evans
b8cf6ea776 Use a fast interrupt handler for the PCI version of the cy driver
if option CY_PCI_FASTINTR is configured and mapping the irq to a
fastintr is possible.  Unfortunately, this has to be optional because
pci_map_int_right() doesn't handle the INTR_EXCL flag right --
INTR_EXCL is honoured even if the interrupt needs to be non-exclusive
for other devices to work.
1999-01-15 10:00:12 +00:00
John Polstra
0ec81012da Replace includes of <sys/kernel.h> with includes of
<sys/linker_set.h> in those files that use only the linker set
definitions.
1999-01-14 06:22:10 +00:00
Bruce Evans
92e81ca475 Let drivers specify interrupt flags (INTR_EXCL and/or INTR_FAST)
using the new pci_map_int_right() variant of pci_map_int().  Fast
interrupts work for PCI devices if and only if they are exclusive.
(The PCI interrupt mux doesn't support fast interrupts and can't
support a mixture of fast and slow interrupts even in principle.)

Don't assume that intrmask_t == unsigned in pci_map_int().
1999-01-13 04:59:19 +00:00
Julian Elischer
38ffc07d37 Add support for the ACER LABS Aladin chipset UDMA controller.
Submitted by: Lee Cremeans <lee@st-lcremean.tidalwave.net>
1999-01-13 04:40:50 +00:00
Eivind Eklund
685df2085d Switch type of vxintr instead of using the previous casts.
Requested by:	bde
1999-01-12 02:09:33 +00:00
Eivind Eklund
44b74eef5c Remove 'pci_bridgeto' - it was just an empty placeholder. 1999-01-12 01:44:42 +00:00
Eivind Eklund
06abe70e82 Remove unused variable. 1999-01-12 01:42:43 +00:00
Eivind Eklund
e7ece43271 Silence warning by casting vxintr to correct type 1999-01-12 01:42:01 +00:00
Eivind Eklund
38acda90ba Clean out warnings introduced in last commit. 1999-01-12 01:36:46 +00:00
Bruce Evans
8ff0acffb3 Fixed minor style bugs in previous commit. 1999-01-11 23:43:54 +00:00
Bruce Evans
443f91618b Updated for not-so-new version of Cyclom-Y PCI boards (with a custom
register for the PLX id).  Merge the vendor's modification of the 2.2.*
release version into -current for reference.  Will be cleaned up in next
commit.

Obtained from:	ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/3.0/cyy30.tar.gz
1999-01-11 23:35:01 +00:00
Julian Elischer
29a32fb6de remove some unused variables 1999-01-11 22:49:16 +00:00
Julian Elischer
8cc777e336 Add support for the Cyrix Cx5530 PCI/ISA bridge which also includes
a PCI UDMA IDE controller.
1999-01-11 22:14:23 +00:00
Bill Paul
6c70e5b472 Tweak the vr_start() and vr_rxeof() routines a little to improve
performance and reliability a little. There was a condition before
where transmission would stall during periods of heavy traffic
exchange between two hosts. Also set the 'want interrupt' bit in
receive descriptor control words.
1999-01-10 18:51:49 +00:00
Matt Jacob
285e230daf Amazingly stupid forgetfullness had me forgetting to turn on FIFO bursts
for the 1XX0 cards. That cost > 50% performance.
1999-01-10 02:45:51 +00:00
Bill Paul
31188d61c1 Add driver support (and man page) for PCI fast ethernet cards based
on the ASIX AX88140A chip. Update /sys/conf/files, RELNOTES.TXT,
/sys/i388/i386/userconfig.c, sysinstall/devices.c, GENERIC and LINT
accordingly.

For now, the only board that I know of that uses this chip is the
Alfa Inc. GFC2204. (Its predecessor, the GFC2202, was a DEC tulip card.)
Thanks again to Ulf for obtaining the board for me. If anyone runs
across another, please feel free to update the man page and/or the
release notes. (The same applies for the other drivers.)

FreeBSD should now have support for all of the DEC tulip workalike
chipsets currently on the market (Macronix, Lite-On, Winbond, ASIX).
And unless I'm mistaken, it should also have support for all PCI fast
ethernet chipsets in general (except maybe the SMC FEAST chip, which
nobody seems to ever use, including SMC). Now if only we could convince
3Com, Intel or whoever to cough up some documentation for gigabit
ethernet hardware.

Also updated RELNOTEX.TXT to mention that the SVEC PN102TX is supported
by the Macronix driver (assuming you actually have an SVEC PN102TX with
a Macronix chip on it; I tried to order a PN102TX once and got a box
labeled 'Hawking Technology PN102TX' that had a VIA Rhine board inside
it).
1999-01-09 18:12:08 +00:00
Kenjiro Cho
1e7bb3a362 cleanup: remove part of the code for 2.1.
add two functions to get the MAC address of the card.

Obtained from: ALTQ
1999-01-09 12:56:17 +00:00
Bill Paul
fae0c289fb Add some tweaks to mx_mii_readreg(), mx_phy_readreg(), mx_phy_writereg()
and mx_setcfg() so that we can read the internal MII registers on the
MX98713 chip correctly. With these changes, media autoselection now
works correctly on the original 98713. All Macronix chips should now
be properly supported (unless there's a surprise waiting in the 98725).

Thanks to Ulf Zimmermann for providing a 98713 board.
1999-01-06 17:30:06 +00:00
Bill Paul
6985d23298 GRRRR! Apparently, the promiscuous mode chip bug which I thought was
isolated to revision 33 PNIC chips is also present in revision 32 chips.
Cards with rev. 32 chips include the LinkSys LNE100TX and the Matrox
FastNIC 10/100. This accounts for all the cards that I have to test
with.

(I was never able to personally trip the bug on this chip rev, but today
one of the guys in the lab did it with the software they're working on
for their cellular IP project, which uses BPF and promiscuous mode
extensively.)

This commit enables the promiscuous mode software workaround code for
both revison 32 and revision 33 chips. It's possible all of the PNIC
chips suffer from this bug, but these are the only two revs where I
know for a fact it exists.
1999-01-05 00:59:08 +00:00
Bill Paul
57ff492d3e Minor bug: in the case where allocating a fresh mbuf for the receive ring
fails, we need to set the descriptor status word so that the 'OWN' bit
is set again so that the chip can reuse it. Previously, this wasn't being
done.
1999-01-03 02:05:21 +00:00
Bill Paul
d1b5b058f7 This commit adds a software workaround for a hardware bug in certain PNIC
chip revisions. (A buggy taiwanese chip? I'm just shocked; shocked I tell
you.) So far I have only observed the anomalous behavior on board with
PCI revision 33 chips. At the moment, this seems to include only the
Netgear FA310-TX rev D1 boards with chips labeled NGMC169B. (Possibly this
means it's an 82c169B part from Lite-On.)

The bug only manifests itself in promiscuous mode, and usually only at
10Mbps half-duplex. (I have not observed the problem in full-duplex mode,
and I don't think it ever happens at 100Mbps.) The bug appears to be in
the receiver DMA engine. Normally, the chip is programmed with a linked
list of receiver descriptors, each with a receive buffer capable of holding
a complete full-sized ethernet frame. During periods of heavy traffic
(i.e. ping -c 100 -f 8100 <otherhost>), the receiver will sometimes appear
to upload its entire FIFO memory contents instead of just uploading the
desired received frame. The uploaded data will span several receive
buffers, in spite of the fact that the chip has been told to only use
one descriptor per frame, and appears to consist of previously transmitted
frames with the correct received frame appended to the end.

Unfortunately, there is no way to determine exactly how much data is
uploaded when this happens; the chip doesn't tell you anything except the
size of the desired received frame, and the amount of bogus data varies.
Sometimes, the desired frame is also split across multiple buffers.

The workaround is ugly and nasty. The driver assembles all of the data
from the bogus frames into a single buffer. The receive buffers are always
zeroed out, and we program the chip to always include the receive CRC
at the end of each frame. We therefore know that we can start from the
end of the buffer and scan back until we encounter a non-zero data byte,
and say conclusively that this is the end of the desired frame. We can
then subtract the frame length from this address to determine the real
start of the frame, and copy it into an mbuf and pass it on.

This is kludgy and time consuming, but it's better than dropping frames.
It's not too bad since the problem only happens at 10Mbps.

The workaround is only enabled for chips with PCI revision == 33. The
LinkSys LNE100TX and Matrox FastNIC 10/100 cards use a revision 32 chip
and work fine in promiscuous mode. Netgear support has confirmed that
they "have some previous knowledge of problems in promiscuous mode" but
didn't have a workaround. The people at Lite-On who would be able to
suggest a possible fix are on vacation. So, I decided to implement a
workaround of my own until I hear from them. I suppose this problem made
it through Netgear's QA department since Windows doesn't normally use
promiscuous mode, and if Windows doesn't need the feature than it can't
possibly be important, right? Grrr.
1998-12-31 17:19:21 +00:00
Luigi Rizzo
e987b015bd Add Joachim Kuebart's ES1370 driver. With my Shuttle HOT-255 card,
this has a problem with capture but i am not sure if it is related
to the mixer or what else.
But in the meantime, this is ok to listen to mpegs.

I also have a much simpler version of the driver in the works which
reuses a lot more of the existing "pcm" routines.  Next year...
1998-12-31 08:14:27 +00:00
Tim Vanderhoek
dea9268b70 Silence -Wtrigraph.
Submitted by:	Bradley Dunn <bradley@dunn.org>  (pr: kern/8817)
1998-12-30 00:37:44 +00:00
Bill Paul
8964eeb288 Fix the tl_start() routine; sometimes the tl_tx_tail pointer was not
being updated correctly.
1998-12-29 15:39:35 +00:00
Matt Jacob
17e318c604 clarify headers;ansify 1998-12-28 19:24:23 +00:00
Foxfair Hu
c78e2203d9 Turn the VIA chipset ,<<IDE/USB>> controller probing off.
It might cause some problem and something like USB has its
own driver.
1998-12-27 07:59:25 +00:00
Bill Paul
d2555c56aa One more time: another case where we need to trim the CRC manually. 1998-12-24 19:10:05 +00:00
Bill Paul
1b2d762ecc Grrrr... The RealTek 8139 is yet another chip that includes the ethernet
CRC in received frames, which we need to trim manually.
1998-12-24 18:39:48 +00:00
Bill Paul
d482d37e81 The VIA Rhine appears to be yet another chip that always includes the
ethernet CRC in received frames and has no option to turn this behavior
off. Trim the CRC off manually in vr_rxeof().
1998-12-24 18:03:17 +00:00
Bill Paul
7ceecbe4ef Fix a small bug in xl_start(): when queuing a packet onto the end of
an existing chain, don't forget to move xl_tx_tail to point to the new
tail end.
1998-12-24 17:50:34 +00:00
Foxfair Hu
b7f854eed2 Add Matrox Mystique 1064/1164SG chips info. By the datasheet from Matrox,
they use the same value in the VID register.

PR		kern/9137: Matrox Mystique chip name typo error
Submitted by:	Alex D. Chen <dhchen@Canvas.dorm7.nccu.edu.tw>
1998-12-23 14:28:37 +00:00
Justin T. Gibbs
b2608b2c73 Staticize the overrun buffer so that they are not shared between
cards of different bus types as each bus type may have a different
bus mapping.

Submitted by:	Eivind Eklund <eivind@yes.no>
1998-12-22 18:14:15 +00:00
Mike Smith
fc28edf53e Check for DMA capbility is against unit,not controller.
Submitted by:	Lee Cremeans <lee@st-lcremean.tidalwave.net>
1998-12-21 08:55:56 +00:00
Bruce Evans
16cb3b5e57 Remove a vestige of the amd driver.
Forgotten by:	msmith
1998-12-20 15:26:02 +00:00
Foxfair Hu
dc0ba36f4d Add more non-Intel family ((new)) chipset, just like VIA technology MVP3
AcerLabs Aladdin-V. It makes the PCI probing work when system booting. I
will try to merge some additional funtion(i.e. wdc1 problem cause tons of
PR appear :<) ASAP if I could.

Remind me if something wrong after committing, thanks!
1998-12-19 16:05:19 +00:00
Julian Elischer
57b59a8762 Remove the bogus charracters "42" from the beginning of the first line.
looks like "editor turd".
1998-12-19 08:35:30 +00:00
Bill Paul
368a6b0214 Trim the ethernet CRC from received frames manually in wb_rxeof().
The Winbond chip always includes the CRC with every received frame,
and I can't find anything in the Winbond manual that indicates you can
program it not to do this.
1998-12-19 04:19:44 +00:00
Mike Smith
6417da252f Fix for bogus BIOS configuration of the 450NX PCI interface on some
systems (eg. Dell 6300).

PR:		kern/8928
Submitted by:	David Malone <dwmalone@maths.tcd.ie>
1998-12-19 02:58:29 +00:00
Mike Smith
02489dd737 Support for Intel 450NX-based systems with more than one PCI bus (ie.
most of them).

Many thanks to Kevin Van Maren for the work here, Intel for lending us
a 450NX system to work this out on, and several other folks for testing
the patches.  See the PR for an extensive discussion of the nature of
the problem and resolution.

PR:		kern/8928
Submitted by:	Kevin Van Maren <vanmaren@fast.cs.utah.edu>
1998-12-19 02:51:22 +00:00
Bill Paul
f52393a257 Correct the definition for PN_NETCFG_NO_RXCRC: it's 0x20000000, not
0x02000000. This error was causing the chip to always include the
ethernet CRC along with every received frame (the driver turns on
PN_NETCFG_NO_RXCRC, but it was frobbing the wrong bit).
1998-12-18 18:31:34 +00:00
Eivind Eklund
fcfdc24dd2 vxalloc() can return NULL. Deal with it. 1998-12-16 00:38:57 +00:00
Justin T. Gibbs
41faa7d374 Pull in new ccb_hdr list types. 1998-12-15 08:24:45 +00:00
Nick Hibma
527e2883c3 Removed probe for VIA 82C586B OHCI controller (is done in ohci_pci.c now) 1998-12-14 09:46:31 +00:00
Matthew Dillon
2cbe36f725 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
Matthew Dillon
9334c514ff Fix uninitialized variable warning by preinitializing 'class' to 0. This
wasn't a bug, just added to silence a warning.
1998-12-14 05:49:04 +00:00
Matthew Dillon
35f069d08b 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
Bill Paul
a43b75fe5e Silence gcc -Wall -ansi -pedantic.
Pointed out by: Eivind
1998-12-10 19:02:07 +00:00
Bill Paul
6ab0ab275d Silence gcc -Wall -ansi -pedantic and fix minor bug in xl_txeof().
Pointed out by: Eivind
1998-12-10 16:18:43 +00:00
Archie Cobbs
ec42b6caff Eliminate compiler warning. 1998-12-10 02:02:30 +00:00
Archie Cobbs
bd3d61e39f Eliminate compiler warning. 1998-12-10 01:52:16 +00:00
Eivind Eklund
cd0f360aeb Check return value of malloc. 1998-12-09 01:33:03 +00:00
Eivind Eklund
626bfed6f6 Bailing out when malloc returns != NULL will not help anybody. 1998-12-09 01:27:29 +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
Bill Paul
989c9647f2 if_rl.c: make a small tweak to properly handle the Accton MPX 5030/5038
as a RealTek 8139
if_rlreg.h: use bus_space_read_X() in CSR_READ_X() macros instead of
            directly calling inb()/outb() etc...
rl.4 + RELNOTES.TXT: mention that SMC EtherEZ PCI 1211-TX is supported
                     by the RealTek driver
1998-12-07 00:35:06 +00:00
Bill Paul
f5c444e19e Add sanity check to foo_start() routines: in the unlikely (though
apparently possible) event that the transmit start routine is
called with and empty if_snd queue, bail out instead of dereferencing
unilitialized transmit list pointers and panicking.
1998-12-05 02:21:44 +00:00
Matt Jacob
2fa86a2b83 trivial header fix 1998-12-05 00:07:04 +00:00
Archie Cobbs
2127f26023 Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
Bill Paul
c13be48aee Put back some missing chip identification code that got lost somehow
during a trek through RCS. The Macronix 98713 and 98713A both have the
same PCI device ID but different revision numbers, and we need to be
able to tell one from the other. The 98715 and 98715A chips have the
same device ID as the 98725 chip but different revision numbers, however
we lump them into the same category except when identifying them during
the PCI probe output.

The main reason we need tell the chips apart is that the Macronix app
notes say you have to write a special magic number into one of the
registers in order to put the chip in normal operating mode. The 98713
requires one magic value, while all the others require a different one.
1998-12-04 21:48:12 +00:00
Archie Cobbs
03ba67cd99 Fix typo: expression needs parentheses
PR:             8280 (3/3 patches contained in this PR)
Submitted by:   Sakari Jalovaara <sja@tekla.fi>
1998-12-04 21:41:18 +00:00
Bill Paul
726ff6a158 An early Christmas present: add driver support for a whole bunch of
PCI fast ethernet adapters, plus man pages.

if_pn.c: Netgear FA310TX model D1, LinkSys LNE100TX, Matrox FastNIC 10/100,
         various other PNIC devices

if_mx.c: NDC Communications SOHOware SFA100 (Macronix 98713A), various
         other boards based on the Macronix 98713, 98713A, 98715, 98715A
         and 98725 chips

if_vr.c: D-Link DFE530-TX, other boards based on the VIA Rhine and
         Rhine II chips (note: the D-Link and certain other cards
         that actually use a Rhine II chip still return the PCI
         device ID of the Rhine I. I don't know why, and it doesn't
         really matter since the driver treats both chips the same
         anyway.)

if_wb.c: Trendware TE100-PCIE and various other cards based on the
         Winbond W89C840F chip (the Trendware card is identical to
         the sample boards Winbond sent me, so who knows how many
         clones there are running around)

All drivers include support for ifmedia, BPF and hardware multicast
filtering.

Also updated GENERIC, LINT, RELNOTES.TXT, userconfig and
sysinstall device list.

I also have a driver for the ASIX AX88140A in the works.
1998-12-04 18:01:24 +00:00
Søren Schmidt
e4ef2ec1ed The Neomagic chip is a 2160 not a 3160. 1998-12-01 21:50:58 +00:00
Mike Smith
49b41a660f Alias Adaptec as a vendor of Cogent NICs. 1998-11-28 00:25:32 +00:00
Nick Hibma
48ecb15bdc Removed probes for USB chips 82371xB (done in dev/pci/uhci_pci.c) 1998-11-26 21:57:52 +00:00
Bill Paul
36c84dd2b3 Add missing return statement to rl_phy_writereg(). This bug didn't actually
hurt anything, but it's still a bug.

Pointed out by: Jason Wright <jason@thought.net>
1998-11-20 19:26:37 +00:00