Commit Graph

868 Commits

Author SHA1 Message Date
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
Bill Paul
552a0ec7c3 The Accton 1207D adapter uses a chip called the MXP 5030 (or 5038)
which is either a RealTek 8139 in disguise or a RealTek workalike.
This commit fixes the PCI vendor/device ID for this device
and updates the description string to reflect the actual identity
of the device.

I also changed the transmit encapsulation routine to always to
buffer copies on transmit. We end up doing this 99% of the time
anyway. I also tweaked the code that pads packets out to the minimum
length (60) bytes. I was fixing up the m_pkthdr.len value but not
m_len. I don't think this makes that much difference in the grand
scheme of things, but it makes me feel better.
1998-11-18 21:03:58 +00:00
Bill Paul
eb90b606c2 Fix a minor bug in xl_attach() where the list buffer region is rounded
to a longword boundary.

Noticed by: Jason Wright <jason@thought.net>
1998-11-18 16:46:53 +00:00
Mike Smith
aafbf5d3c5 Consign the 'amd' driver to the Attic. 1998-11-11 21:32:56 +00:00
Justin T. Gibbs
4ff057c7b0 Convert to change in ISA compatiblity port handling in the base bt driver. 1998-11-10 06:45:14 +00:00
Peter Wemm
dfab6b6416 ifioctl takes a u_long rather than an int on 3.0 1998-11-09 09:34:00 +00:00
Peter Wemm
96fca41fcf s/%#p/%p/ to fix a warning. This looks like a leftover of once being
%#x, which causes a leading 0x to be prepended. %p has this by default
and the '#' is ignored by the kernel prinf code for %p.
1998-11-09 08:08:06 +00:00
Peter Wemm
dd31125d72 Fix a warning (#include the apic_next_irq() prototype for APIC_IO) 1998-11-09 08:03:01 +00:00
Doug Rabson
7095ee912b * Fix a couple of places in the device pager where an address was
truncated to 32 bits.
* Change the calling convention of the device mmap entry point to
  pass a vm_offset_t instead of an int for the offset allowing
  devices with a larger memory map than (1<<32) to be supported
  on the alpha (/dev/mem is one such).

These changes are required to allow the X server to mmap the various
I/O regions used for device port and memory access on the alpha.
1998-11-08 12:39:07 +00:00
Nicolas Souchu
dec0ec9e81 Return to previous check_for_i2c_devices() behaviour.
Cast the cmd parameter to unsigned char in every smbus call.

Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
1998-11-07 14:30:48 +00:00
Peter Wemm
cf3e757633 If this is going to have checks for kernel versions, it might as well
do it so that it works.  This code should run on 2.2.x now.
1998-11-06 02:13:14 +00:00
Julian Elischer
cd8ab93c90 In the cyrix Cx5530, there are null (empty) Base address registers before the
base register that controls Ultra-DMA, so we need to examine all possible
base registers instead of just giving up at the first empty one.
Also, looking at the source code to the BIOS, I see that they are also
checking for 0xffffffff as an invalid value so do the same. Stefan may like
to clean this up, but at least now I can find my PCI IDE registers.
1998-11-03 08:47:29 +00:00
Semen Ustimenko
5fabcd1a00 Ported to OpenBSD. sys/pci/smc83c170.h renamed to sys/pci/if_txvar.h to be
like others.
1998-11-01 07:44:33 +00:00
Bill Paul
1b2451269c Increase the size of the tx and rx rings from 10 to 20 descriptors
and increase the tx interrupt threshold to 4. This fixes performance
problems on slower systems.

Also fix a mind-o in the rx ring init routine: I used the TX
constant instead of the RX. This isn't a problem as long as the
rings are the same size, but if they aren't hijinx will ensue.
1998-10-31 17:23:48 +00:00
Nicolas Souchu
fbd78b40dd Brooktree driver ported to the new I2C framework. See iicbus(4) for more info. 1998-10-31 11:26:38 +00:00
Doug Rabson
57250ffb42 * Fix vga_probe() so that it doesn't report a non-vga display adapter as
a vga.
* Fix broken logic in syscons for a failed probe.
* Fix AlphaStation 500/600 so that non-serial consoles are supported.

Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu> (vga bits),
	      Andrew Gallatin <gallatin@cs.duke.edu> (AS500/AS600)
1998-10-31 10:35:24 +00:00
Justin T. Gibbs
400ea5dc6a Do not disable the ISA compatibility window if it is the same value as
that set for our PCI IO address space.  This can happen on the BT-946.
1998-10-30 02:06:44 +00:00
Poul-Henning Kamp
842426555a Update and add timekeeping code. 1998-10-24 19:47:42 +00:00
Bill Paul
c044afa986 Close PR #8409:
Fix syntax errors inside #ifdef FORCE_AUTONEG_TFOUR.
1998-10-22 16:46:26 +00:00
Bill Paul
447c20659b Close PR #8384:
Revert the transmission packet queueing strategy changes. Clearly I missed
something while debugging this, although I never encountered any problems
on my test machines.

Also make one other minor change: jack up the TX reclaim threshold for
3c90xB adapters in order to stave off 'transmission error: 82' errors.

Document the existence of the tx reclaim register (for inspecting the
current reclaim threshold) in register window 5 (if_xlreg.h).
1998-10-22 15:52:25 +00:00
David Greenman
c8cc6fca3c Defer rundown (m_freem) of completed transmit buffers for no longer
than 1 second.
1998-10-22 02:00:49 +00:00
Bill Paul
1c403cb2b6 Modify the transmit packet queuing strategy a bit to be a little less
agressive. With the old code, if a descriptor chain was already on its
way to the chip, xl_start() would try to splice new chains onto the end
of the current chain by stopping the transmitter, modifying the tail
pointer of the current chain to point to the head of the new chain, then
restart the transmitter. The manual says you're allowed to do this and
it works, but I'm not too keen on it anymore.

The new code waits until the eixsting chain has been sent and then
queues the next waiting chain in the 'transmit ok' handler.

Performance still looks good one way or the other.
1998-10-19 22:08:56 +00:00
Bill Paul
589e38a609 Add driver support for PCI fast ethernet adapters based on the
RealTek 8129/8139 chipset like I've been threatening. Update kernel
configs, userconfig.c, relnotes and sysinstall. No man page yet;
comming soon.

I consider this driver stable enough that I want to give it some
exposure in -current.
1998-10-18 16:24:34 +00:00
Justin T. Gibbs
0a42741c4a Honor CAM_TAG_ACTION_NONE. 1998-10-15 23:17:58 +00:00
Peter Wemm
4650c37fce Revert part of previous commit. vaddr_t doesn't exist on FreeBSD. This
didn't affect the x86 kernel due to #ifdefs.  It broke FreeBSD/Alpha
kernel compiles though.
1998-10-14 08:31:27 +00:00
Peter Wemm
38c2b6942a Update from NetBSD if_de.c 1.72 to 1.80. This is mostly bugfixes, and
looks like it will have most effect on decoding device capabilities and
configuration.

Approved by: jkh
1998-10-13 09:05:58 +00:00
David Greenman
91aa9f9055 Clear out transmit descriptor memory in fxp_attach when it's malloced.
fxp_stop is called as the first thing in fxp_init, and if the tx desc
list has junk in it, the system may panic. This bug showed up as a side
effect of the changes in rev 1.56, but has been in the code since the
beginning.
1998-10-11 06:28:54 +00:00
David Greenman
da91462d5e Fixed mbuf leak in fxp_stop(). 1998-10-10 19:26:40 +00:00
Peter Wemm
c9a5e21100 Attempt to work around the page fault in tulip_txput(). I've been running
this myself for ages, but wasn't able to get any feedback from the people
that I sent it to for testing.

Guy Helmer <ghelmer@scl.ameslab.gov> has given it a shot (before getting on
a plane, thanks!) and it appears to stop his reproducable page fault panic
in the testing he was able to do.
1998-10-10 02:44:53 +00:00
Bill Paul
62034864f7 Add support for yet another "cyclone" board, with PCI device id 0x905A.
This is a 100BaseFX board with SC fiber media connectors. I don't actually
have one of these but I've been told it works with the xl driver.

Submitted by: Jason Wright from the openbsd group
1998-10-09 03:59:24 +00:00
Bill Paul
3aff6980c6 Correctly update the tail pointer of the transmit queue in tl_start()
(one-liner). I have yet to actually encounter any problems due to this
bug, but why take chances.
1998-10-08 15:45:36 +00:00
Justin T. Gibbs
6405ed07d7 ahc_pci.c:
Disable DPARCKEN in the DSCOMMAND0 register on the aic7890/91/96/97.
	Parity checking is broken for some chip/MB combinations and this
	is the work around recommended by Adaptec.

dpt_pci.c:
	Remove a superflous '{' that prevented DPT_ALLOW_MEMIO from working.

pcireg.h:
	Add a definition for Parity Error Reponse bit in the PCI Space
	command register.
1998-10-07 03:40:51 +00:00
Justin T. Gibbs
85186e4602 Add support for the ASC3550 AdvanSys SCSI Host Controller (aka 940UW). 1998-10-07 03:20:52 +00:00
Doug Rabson
a0ab71761c Add functions for accessing dense and bwx memory for pci devices. These
routines are necessary to allow the use of certain types of hardware on
the alpha, particularly a Myrinet card.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-10-06 14:18:40 +00:00
Bill Paul
9624d2cdc2 Force the ThunderLAN driver to use PIO mode by default instead of
memory mapped mode. There are some laptop docking stations with
built-in tlan chips where memory mapped mode doesn't work correctly.

Pointed out by: jmb
1998-10-04 18:47:38 +00:00
Søren Schmidt
6f83a5f331 Oops, forgot /* */ around Id string 1998-10-01 09:35:48 +00:00
Søren Schmidt
2a4070eb7c Hauppauge Tech Support confirmed all Hauppauge 878 PAL/SECAM boards
will use PLL mode.  Added to card probe. Thanks to Ken and Fred.

Submitted by:   Roger Hardiman <roger@cs.strath.ac.uk>
1998-09-30 21:06:55 +00:00
Søren Schmidt
dd32a6ad67 Hauppauge Tech Support confirmed all Hauppauge 878 PAL/SECAM boards
will use PLL mode.  Added to card probe. Thanks to Ken and Fred.

Submitted by:   Roger Hardiman <roger@cs.strath.ac.uk>
1998-09-30 20:58:09 +00:00
Søren Schmidt
ff2c4726bc Changed tuner code to autodetect tuner i2c address.
Addresses were incorrectly hardcoded.

Submitted by:   Roger Hardiman <roger@cs.strath.ac.uk>
1998-09-30 20:43:25 +00:00
Bruce Evans
894e2bd49e FIxed printf format errors (an new one that is only detected on systems
with pointers smaller than u_longs, and 2 possibly-truncating casts in
the same printf).
1998-09-29 09:14:52 +00:00
Doug Rabson
63bbbfc70e Update SimOS scsi driver to use CAM. 1998-09-26 14:49:26 +00:00
Doug Rabson
e37c045536 Add hooks so that the alpha can detect which disk has the root partition. 1998-09-26 14:37:49 +00:00
Doug Rabson
fb44081bd0 Don't set script to vaddr2 on the alpha - it can't access scripts in device
memory using simple pointers.
1998-09-26 14:29:59 +00:00
Bill Paul
97e28a9d67 Apply patch graciously provided by Jason Wright <jason@thought.net> from
the OpenBSD group to fix a problem with the default ifmedia not being
set properly in some cases with a 3c905B, leading to a panic in ifmedia_set().

Also apply a patch to force the transmit start routine to check the
transmitter to make sure it isn't wedged if the outbound tx queue appears
full. This seems to cure some problems with 'watchdog timeout' errors
cropping up in some cases. I tried to do this before by checking for the
IFF_OACTIVE flag on entry to xl_start(), but if the IFF_OACTIVE flag is
set, ether_output() won't even call xl_start(). It should work now.

Lastly, increase the size of the TX queue from 10 descriptors to 16 to
hopefully make it less likely that the TX queue will fill up.
1998-09-25 17:34:19 +00:00
Bill Paul
9460731153 Small tweak: force another reset of the adapter after probing for all the
PHYs in tl_attach(). This is mainly to suck away any possible stray
interrupts.

This prevents an intermittent problem on some systems where the adapter
probes correctly but yields a device timeout (and possible subsequent adapter
check) when configured. When I originally tested the driver, I ifconfig'ed
the interface after the system had already been booted and didn't notice
any problems, but when configuring the interface immediately at startup,
it would occasionally timeout and hang, until an adapter check interrupt
came along and reset things again. I'm not exactly sure if this is a
general problem of just something peculiar to this hardware (there are
three devices, including the tlan, all on IRQ 11) but the extra reset
shouldn't hurt anything. (It works fine with my 100Mbps Olicom adapter too.)

Thanks to Mark Taylor from Cybernet (mtaylor@cybernet.com) for allowing
me remote access to a Compaq system for debugging purposes.
1998-09-24 17:14:23 +00:00
Peter Wemm
05209199cf Minimal change for #if __FreeBSD__ >= 3 to check __FreeBSD_version instead. 1998-09-24 16:00:30 +00:00
Peter Wemm
de77c42832 Change #if __FreeBSD__ >= 3 to #if __FreeBSD_version >= 300000 to aid
bootstrapping from a 2.2.x system.
1998-09-24 13:31:01 +00:00
Bill Paul
b078a935b6 Overhaul the ThunderLAN driver. This update includes the following
changes:

- Cleaned up register access macros so that they work like the XL
  driver macros (you can switch from PIO to memory-mapped mode
  using a single #define -- default is still memory mapped mode).
  The old 'struct overlayed onto the memory mapped register space'
  cruft has been removed.

- Improved multicast filter code. The ThunderLAN has four entry
  perfect filter table in addition to the 64-bit hash table: we need
  one of the perfect filter entries for the station address, but we
  can use the other three for multicast filtering. We arrange to put
  the first three multicast group addresses in the perfect filter
  slots so that commonly joined groups like the all hosts group and
  the all routers group can be filtered without using up bits in the
  hash table.

  Note: in FreeBSD 3.0, multicast groups are stored in a doubly
  linked list, however new entries are added at the head of the list
  (thereby pushing existing entries down towards the tail). We want
  to update the filter starting from the oldest entry to the newest
  since the all hosts group is always joined first. This means we
  really want to start from the tail of the list, not the head, but
  to find the tail we first have to traverse the list all the way to
  the end and then add entries working backwards. This is a bit of a
  kludge and could be inefficient if the list is long.

- Cleaned up autonegotiation code: tl_autoneg() wasn't always setting
  modes correctly.

- Cleaned up ifmedia update and status routines as well.

- Added tl_hardreset() routine to initialize the internal PHY according
  to the ThunderLAN manual.

- Did away with the kludge where PHYs were treated as separate logical
  interfaces. This didn't really work, especially in the case of the
  newer Olicom 2326 adapters which use a Micro Linear ML6692 PHY which
  provides only 100Mbps support, relying on the internal PHY for 10Mbps
  support (both PHYs share the RJ45 port, with the 6692 doing all the
  autonegotiation work). This kludge resulted from my misunderstanding
  of the operation of the Compaq Netelligent Dual Port card (the tlan
  manual mentions multiple channels, but in a different context; this
  got me a little confused). The driver has been reported to work
  correctly with the dual port card.

- Added dio_getbit/dio_setbit/dio_read/dio_write functions which carefully
  set the ThunderLAN's indirectly accessed internal registers. This makes
  the EEPROM reading code more reliable.

Hopefully I won't have to touch this again before 3.0 goes out the door.
I plan to import the 2.2.x version sometime this week.

Approved-by: jkh
1998-09-23 05:08:54 +00:00
Kenneth D. Merry
aec4b791c5 A fix from Justin for the NCR bug that caused panics on 875 (and possibly
other) chips.

The script pointer was getting set to NULL instead of the right value.

Submitted by:	gibbs
1998-09-22 21:42:46 +00:00
Justin T. Gibbs
6d21c6f373 Bring back the cleanups from revs 1.121 and rev.1.122 of ncr.c.
Noticed by: bde
1998-09-22 04:56:08 +00:00
Kenneth D. Merry
8dc6f245bc Alpha patches for the NCR driver from Doug Rabson. I've tested these on an
NCR 810a, and they seem to work fine on the i386 as well.

Reviewed by:	gibbs
Submitted by:	dfr
1998-09-20 22:54:28 +00:00
Justin T. Gibbs
0532933e60 Set QUIRK_NOMSG for all devices as was the case in the non-CAM version
of the driver.  Why this is necessary (and how identify message handling
is performed when this is set) I don't comprehend...
1998-09-18 22:41:12 +00:00
Matt Jacob
3dd37e4387 (requested by gibbs) Remove the SCSI_CAM option (and rework the isp driver
that had depended on it for compilation within or without CAM to use
__FreeBSD_version instead).
1998-09-18 00:46:42 +00:00
Justin T. Gibbs
761fe626ea Really correct ncr_freeze_devq now. We scan backwards from the current
insertion point into the start queue looking for entries to remove and
mark them with the 'skip' address, recording the entry furthest from the
insertion point that needs to be removed.  We then go through a second
loop starting at the furthest entry to be removed and compress the start
queue.  The old algorithm started at (old insert point + 1) and wrapped
through the whole queue which would end up moving the start position in
the queue out from under the nose of the scrip processor.
1998-09-17 22:29:02 +00:00
Matt Jacob
4873663cf8 A major amount of cleaning up:
+ Change some messages about CCB memory allocation
	+ Turn a failure to DMA map all of a transaction due to lack of
	  ISP queue entries into a requeue operation (instead of the
	  case where it had been treated the same as a DMA too big
	  operation).
	+ put back splsoftvm around bus_dmamap_load calls.
	+ cleanup (and fix a glaring bug) in the and of the dma setup
	  routine. Also, the dma setup routines either return CMD_QUEUED
	  (for success) or CMD_COMPLETE (for failure) or CMD_EAGAIN
	  (for requeuing for resource shortage reasons).
1998-09-17 21:11:21 +00:00
Justin T. Gibbs
c2921d36a9 Use %p with (void *) casts to print pointers with printf. 1998-09-17 00:08:29 +00:00
Justin T. Gibbs
fb268fece4 Fix a regression that caused the script to spam itself by copying something
of size sizeof(struct timeval) that is really of size sizeof(ticks).

Make another attempt at fixing the queue full case.
1998-09-16 22:46:04 +00:00
Mike Smith
85dc1320dc Add 450NX chipset components. 1998-09-16 20:29:22 +00:00
Justin T. Gibbs
348811e078 Fix a bug in ncr_freeze_devq() which is called when we see a queue
full condition or other error which requires us to purge the
controller's start queue of transactions for a particular device.
We were relying on the NCR CCB's program address to cause the
script engine to skip to the next entry in the queue even though
the CCB is freed (and its program address switched to the idle
loop) by this action.  We now set the address in the start queue
to be the "skip" function directly.
1998-09-16 17:11:59 +00:00
Matt Jacob
a185f9b1c3 Alpha port related fixes from Doug Rabson.
Submitted by:	dfr
1998-09-16 16:43:17 +00:00
Doug Rabson
98ffb0c4f2 Some workarounds for a common DEC pci-pci bridge found on alphas.
Fix printf format errors which show up on the alpha.
1998-09-16 08:28:11 +00:00
Doug Rabson
88f92aec2c Port de driver to alpha. 1998-09-16 08:27:07 +00:00
Justin T. Gibbs
5ee58402df Correct printf format bugs. 1998-09-15 22:05:44 +00:00
Justin T. Gibbs
bd9d336e40 Obsoleted by CAM. 1998-09-15 10:40:55 +00:00
Justin T. Gibbs
d720e6d5de Convert ISP pci front end to CAM/bus space/dma.
Convert ncr driver to CAM.
1998-09-15 10:06:23 +00:00
Justin T. Gibbs
83cf1450a1 Conver the DPT driver to CAM. The dpt_control interface is not yet
functional, but will be in another day or so.
1998-09-15 08:33:38 +00:00
Justin T. Gibbs
06915ea69a Revive PCIConf.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
1998-09-15 08:21:13 +00:00
Justin T. Gibbs
532abf3b7a Mylex/Buslogic MultiMaster SCSI-Host Adapter Driver for CAM. 1998-09-15 07:32:57 +00:00
Justin T. Gibbs
4530878e33 Move to new name, convert to CAM, add support for new chips, and
correct lots of eeprom/auto-termination bugs.
1998-09-15 07:25:33 +00:00
Justin T. Gibbs
a5a2d1bfe9 Advance Systems SCSI Host Adapter driver for CAM. Currently only support
the 8bit SCSI AdvanSys products.
1998-09-15 07:03:43 +00:00
Søren Schmidt
d32ef285bc Changed METEORSINPUT for Hauppauge cards with bt878.
Also fixed video_open defines and 878 support.

Submitted by: Fred Templin <templin@erg.sri.com>
1998-09-10 08:01:10 +00:00
Søren Schmidt
11e29cc90f Correct SECAM B-Delay and add XUSSR channel set.
Submitted by: Vsevolod Lobko <seva@alex-ua.com>
1998-09-10 07:52:30 +00:00
Bill Paul
9daef026b1 - If the OACTIVE flag is set on entry to xl_start(), check to see if the
transmitter is wedged. If so, try to unwedge it, process any descriptors
  that might need to be free()d, then proceed.

- Disable the 'background' autonegotiation performed during bootstrap.
  What happens currently is that the driver starts an autoneg session,
  the sets a timeout in the ifnet structure and returns. Later, when the
  timer expires, the watchdog routine calls the autoneg handler to check
  the results of the session. The problem with this is that the session
  may not complete until some point after we have started to mount NFS
  filesystems, which can cause the mounts to fail. This is especially
  troublesome if booting with an NFS rootfs: we need the interface up
  and running before reaching the mountroot() code.

  The default behavior now is to do the autoneg synchronously, i.e. wait
  5 seconds for the autoneg to complete before exiting the driver attach
  routine. People who want the old behavior can compile the driver with
  XL_BACKGROUND_AUTONEG #defined. This has no effect on autoneg sessions
  initiated by 'ifconfig xl0 media autoselect.'

  This slows the probe down a little, but it's either that or botching
  NFS mounts at bootup.

- If xl_setmode_mii() is called and there's an autoneg session in progress,
  cancel it, _then_ set the modes.
1998-09-08 23:42:10 +00:00
Tor Egge
572d053e17 Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts.

Maintain a mapping from (iopaic number, int pin) tuple to irq number,
and use this when configuring devices and programming the ioapics.

Previous code assumed that irq number was equal to int pin number, and
that the ioapic number was 0.

Don't let an AP enter _cpu_switch before all local apics are initialized.
1998-09-06 22:41:42 +00:00
Bill Paul
7c76d5ca4e Patch the transmit error handler to avoid following NULL pointers and
generating a trap 12 panic. The code blindly assumed that in the event
of a transmit error, the packet that caused the error would still be
at the head of the driver's transmit queue (sc->xl_cdata.xl_tx_head).
However in the case of error 82 (which indicates that a transmit error
occurred after part of the transmit FIFO memory has been reclaimed)
this is not true: the TX queue has already been flushed, and the
pointer to the head of the queue is NULL, so trying to dereference
the pointer to find the transmit descriptor address causes a crash.

The code now checks for a NULL pointer before trying to reload the
chip's download pointer register. There may still be error messages
printed warning of the transmit error, but no panic should occur.

Note that this eror code is only generated with "cyclone" chipsets
(3c900B, 3c905B, and presumeably the 3c980 server adapter). It should
only appear during periods of heavy traffic, probably only on
non-switched networks.

Problem reported by: Darcy Buskermolen <darcy@ok-connect.com>
1998-09-06 14:58:46 +00:00
Bill Paul
7d8b3c341b Modify the xl_mediacheck() routine to also test for the case where the
XCVR value read from the EEPROM is completely wrong. I've had one report
of a 3c900 card that returns an xcvr value of 14, which is impossible
(the manual states that all vales above 8 are reserved). If the value
is out of the expe

Add PCI vendor ID for the 3c980-TX server adapter card, which apparently
also uses the cyclone chip. Graciously supplied Mats O Jansson
<maja@cntw.com>.

Also noted by Mats, the 10mpbs cyclone adapters should be named 3c900B,
not 3c905B. I haven't actually encountered a 10mbps only cyclone adapter
yet, nor anybody who has one, but this makes sense given the naming
scheme used for the older boomerang adapters.
1998-09-04 16:22:15 +00:00
Bill Paul
5ca6331a4c "xl%d: chip is is in D%d power mode " -> "xl%d: chip is in D%d power mode " 1998-09-01 21:32:04 +00:00
Søren Schmidt
f90ea9ee53 Fixed bug in Miro Tuner detection. Missing Goto.
Removed Hauppauge EEPROM 0x10 detection as I think 0x10 should be a
PAL tuner, not NTSC.
Reinstated some Tuner Guesswork code from 1.27

Submitted by:	Roger Hardiman <roger@cs.strath.ac.uk>
1998-08-31 18:37:19 +00:00
Søren Schmidt
58dde31aeb Renamed BT848[SG]CAPAREA to BT848_[SG]CAPAREA.
Added PR kern/7177 for SECAM Video Highway Xtreme with single crystal
PLL configuration submitted by Vsevolod Lobko <seva@alex-ua.com>.
In kernel configuration file add
options OVERRIDE_CARD=2
options OVERRIDE_TUNER=11
options BKTR_USE_PLL

Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
1998-08-31 18:35:06 +00:00
Søren Schmidt
5d0c8abac1 Added Capture Area ioctl - BT848[SG]CAPAREA.
Normally the full 640x480 (768x576 PAL) image is grabbed. This ioctl
allows a smaller area  from anywhere within the video image to be
grabbed, eg a 400x300 image from (50,10).
See restrictions in BT848SCAPAREA.

Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
1998-08-31 18:31:36 +00:00
Bill Paul
cdb5ef5fba Fix handling of ENOBUFS condition. During reception, the filled mbuf
cluster from the RX descriptor is passed up to the higher layers and
replaced with an empty buffer for the next time the descriptor comes
up in the RX ring. The xl_newbuf() routine returns ENOBUFS if it can't
obtain a new mbuf cluster, but this return value was being ignored.
Now, if buffer allocation fails, we leave the old one in place and
drop the packet. This is rude, but there's not much else that can be
done in this situation.

Without this, the driver can cause a panic if the system runs out of
MBUF clusters. Now it will complain loudly, but it shouldn't cause a
panic.

Also added another pair of missing newlines to some printf()s.
1998-08-31 15:26:09 +00:00
Bill Paul
11f73a416e Change the autonegotiation waiting period from 3 seconds to 5. This
delay controls how long the driver waits for autonegotiation to
complete after setting the 'autoneg restart bit' in a PHY. In some
cases, it seems 3 seconds is not long enough: with 3c905-TX cards
(external PHY), you sometimes see 'autoneg not complete; no carrier'
errors due to the timeout being too short. (3c905B adapters seem to
be happy with 3 seconds though.)
1998-08-30 22:24:18 +00:00
Bill Paul
128a646cd1 - #define mask of enabled interrupts/indications in if_xlreg.h instead of
constructing local copy in xl_init()
- disable interrupts on entry to xl_intr(), re-enable them on exit.
- fix a few typos in some comments
1998-08-24 17:51:38 +00:00
Bill Paul
ea9c501856 Increase the number of descriptors (and, as a consequence, the number
of associated mbuf clusters) in the RX ring from 4 to 16. On my
really fast PI 400Mhz test machines, 4 descriptors (and associated
mbuf clusters) is enough to achieve decent performance without any
RX overruns. However, one person reported problems with the following
scenario:

- P90 system running FreeBSD with a 3c905B-TX adapter, slow IDE hard
  disk (Quantum Bigfoot?)
- PII 266 with SCSI disks running LoseNT and also with a 3c905B-TX
- Both machines connected together via crossover cable at 100Mbps
  full-duplex
- LoseNT machine writing largs amounts of data (2.5 GB work of
  files each in the neighborhood of 1 to 2 MB in size) via samba to
  the FreeBSD machine

In this case, the LoseNT machine is sending data very fast. Apparently
there weren't any problems initially because the user was writing to
one particular disk which was relatively fast, however after this disk
filled up and the user started writing to the second slower disk, RX
overruns would occur and sometimes the RX DMA engine would stall after
a 100 to 500MB had been transfered. The xl_rxeof() handler is supposed
to detect this condition and restart the upload engine; I'm not sure
why it doesn't, unless interrupts are being lost and the rx handler
isn't getting called.

This is still an improvement over the Linux driver, which uses 32
descriptors in its receive ring. :)

Problem reported by: Heiko Schaefer <hschaefer@fto.de>
1998-08-21 16:58:48 +00:00
Bill Paul
98fd9b6126 Fix small printf() bogon (forgot newline, and the message was longer that
80 cols).
1998-08-20 14:48:58 +00:00
Bill Paul
4b5709adb1 Make two changes:
If I'm reading the manual correctly, the 3c905B actually loses its
PCI configuration during the transition from D3(hot) back to D0, not
during the transition from D0 to D3(hot). This means it should be possible
to save the existing PCI settings, restet the power state, then restore
the PCI settings afterwards. Changed xl_attach() to attempt this first
thing before the normal PCI setup. I'm not certain this will work correctly,
but it shouldn't hurt.

If xl_init() is called while an autoneg session is in progress, the
autoneg timeout and chip state will get clobbered. Try to avoid this
by checking sc->xl_autoneg at the start of xl_init() and defer
the initialization until later if it's set. (xl_init() is always called
at the end of an autoneg session by xl_autoneg_mii().)

Problem pointed out by: Larry Baird <lab@gta.com>
1998-08-19 15:07:46 +00:00
Bruce Evans
18df27bda2 Fixed printf format errors. 1998-08-18 00:32:50 +00:00
Bruce Evans
bbd6948a3c Fixed printf format errors (none detected in GENERIC again). 1998-08-17 19:06:47 +00:00
Bill Paul
e30938ce3a Import the (Fast) Etherlink XL driver. I'm reasonally confident in its
stability now. ALso modify /sys/conf/files, /sys/i386/conf/GENERIC
and /sys/i386/conf/LINT to add entries for the XL driver. Deactivate
support for the XL adapters in the vortex driver. LAstly, add a man
page.

(Also added an MLINKS entry for the ThunderLAN man page which I forgot
previously.)
1998-08-16 17:14:59 +00:00
Bruce Evans
86a14a7a0a Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
Justin T. Gibbs
188fafbc3f Use "baseclass" instead of "class" for storing the contents of PCI register
0xB so that C++ programs can use the PCI conf interface.
1998-08-13 19:12:20 +00:00
Bruce Evans
b97fc94873 Use [u]intptr_t instead of [unsigned] long to convert and/or represent
pointers.

This finishes fixing conversions between pointers and integers of
possibly different sizes in GENERIC.
1998-08-10 17:21:49 +00:00
Bruce Evans
c41141b002 Fixed the formatting of some tables (mainly the one produced by ps
in ddb) which I broke by changing %8[l]x to %8p.  Hacked the central
printf routine to not add an "0x" prefix for %p formats if the field
width is nonzero.  The tables are still horribly misformatted on
64-bit machines.

Use %p instead of %8p to print pointers when the field width isn't
important.
1998-08-10 14:27:34 +00:00
Søren Schmidt
1ae0c4bba2 Support the PAL version of the BT878 based Haupauge WinTV/PCI.
Submitted by: Matthias Scheler <tron@netbsd.org>
1998-08-10 06:39:33 +00:00
Jordan K. Hubbard
afc2d1c74e A few misc changes to get the spigot and meteor board working in 3.0.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1998-08-08 19:26:08 +00:00
Søren Schmidt
4c6d55f0fb Updated Hauppauge detection code for Tuner ID 0x0a for newer NTSC
WinCastTV 404 with Bt878 chipset.  Tidied up PAL default in video_open()

Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
1998-08-08 07:15:16 +00:00
Doug Rabson
8b761c8004 Remove a stupid hack of mine which prevented PCI io memory access on the alpha. 1998-08-07 08:20:36 +00:00
Eivind Eklund
b755b88510 Update DPT driver from 1.4.3 to 1.4.5
Submitted by: Simon Shapiro <shimon@simon-shapiro.org>
1998-08-05 00:54:38 +00:00
David Greenman
3114fdb4c0 Implemented a more sophisticated mechanism for handling transmitter
interrupts which now defers them until the transmit queue if filled
up with completed buffers. This has two advantages: first, it reduces
the number of transmitter interrupts to just 1/120th of the rate
that they occured previously, and two, running down many buffers
at once has much improved cache effects.
1998-08-04 08:53:12 +00:00
Bill Paul
33e929e1c4 Fix this thing to work properly with multiple tlan adapters; increment
unit count correctly.

Problem reported by Larry Baird <lab@gta.com>.
1998-08-04 01:38:52 +00:00
Bill Paul
c3ed41584c Updates for the ThunderLAN driver:
- probe for PHYs by checking the BMSR (phy status) register instead
  of the vendor ID register.

- fix the autonegotiation routine so that it figures out the autonegotiated
  modes correctly.

- add tweaks to support the Olicom OC-2326 now that I've actually had
  a chance to test one

	o Olicom appears to encode the ethernet address in the EEPROM
	  in 16-bit chunks in network byte order. If we detect an
	  Olicom card (based on the PCI vendor ID), byte-swap the station
	  address accordingly.

	  XXX The Linux driver does not do this. I find this odd since
	  the README from the Linux driver indicates that patches to
	  support the Olicom cards came from somebody at Olicom; you'd
	  think if anyone would get that right, it'd be them. Regardless,
	  I accepted the word of the disgnoatic program that came bundled
	  with the card as gospel and fixed the attach routine to make
	  the station address match what it says.

	o The version of the 2326 card that I got for testing is a
	  strange beast: the card does not look like the picture on
	  the box in which it was packed. For one thing, the picture
	  shows what looks like an external NS 83840A PHY, but the
	  actual card doesn't have one. The card has a TNETE100APCM
	  chip, which appears to have not only the usual internal
	  tlan 10Mbps PHY at MII address 32, but also a 10/100 PHY
	  at MII address 0. Curiously, this PHY's vendor and device ID
	  registers always return 0x0000. I suspect that this is
	  a mutant version of the ThunderLAN chip with 100Mbps support.
	  This combination behaves a little strangely and required the
	  following changes:

		- The internal PHY has to be enabled in tl_softreset().
		- The internal PHY doesn't seem to come to life after
		  detecting the 100Mbps PHY unless it's reset twice.
		- If you want to use 100Mbps modes, you have to isolate
		  the internal PHY.
		- If you want to use 10Mbps modes, you have to un-isolate
		  the internal PHY.

	The latter two changes are handled at the end of tl_init(): if
	the PHY vendor ID is 0x0000 (which should not be possible if we
	have a real external PHY), then tl_init() forces the internal
	PHY's BMCR register to the proper values.
1998-08-03 01:33:12 +00:00
David Greenman
35517ab7e8 Added 82555B support for media status. 1998-08-02 00:33:38 +00:00
David Greenman
3614387536 Reordered fxp_softc for optimal cacheline behavior. 1998-08-02 00:29:15 +00:00
David Greenman
b63e51cae4 Killed unused variable/assignment. 1998-08-02 00:28:45 +00:00
Doug Rabson
e8669bcd43 Add a call to a platform-specific irq remapping function for alpha platforms
which don't record the correct irqs in PCI config space.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:40:46 +00:00
Doug Rabson
df9efa9a8b On the alpha, ports may be allocated above 64k.
Change the port address argument to pci_map_port to pci_port_t* which is
defined as u_int on the alpha, u_short on i386.  This is a stopgap with a
hopefully limited lifetime.

Discussed with: Stefan Esser <se@freebsd.org>
1998-07-22 08:39:08 +00:00
Mike Smith
2512c3e67b Add support for PCNet PCI chips that only work when we talk to them as ISA
devices. Specifically fix the case for the Hitachi version as used in
their VisionBook models.

Submitted by:	Ted Faber <faber@isi.edu>
1998-07-20 17:33:01 +00:00
Justin T. Gibbs
47402bab91 Correct SEEPROM checksum calculation when multiple checksum attemps are made.
Pointed out by:	"Jose M. Alcaide" <jose@we.lc.ehu.es>
1998-07-16 19:33:43 +00:00
Bruce Evans
a23d65bfc8 Cast pointers to uintptr_t/intptr_t instead of to u_long/long,
respectively.  Most of the longs should probably have been
u_longs, but this changes is just to prevent warnings about
casts between pointers and integers of different sizes, not
to fix poorly chosen types.
1998-07-15 02:32:35 +00:00
Søren Schmidt
aad7cac45a Add support for the AVer Media range of cards. 1998-07-14 21:19:58 +00:00
Bruce Evans
88472e74e8 Avoid some casts of pointers to integers (of possibly different sizes). 1998-07-14 11:19:32 +00:00
Amancio Hasty
596e9516c8 I checked in the wrong version yesterday . The correct version is 1.38
Amancio
1998-07-14 07:11:20 +00:00
Bill Paul
fb1305c426 Declare pointers to CSR register space to be volatile. This seems to
cure the problems I was having with interrupts not being acknowledged
on time. This fixes a problem I observed where starting two ping -f
processes at 10Mbps would cause an adapter check due to TX GO commands
being issued before TXEOC interrupts were being acked.

Also fix a small problem with tl_start(): the mechanism I was using
to queue new packets onto the TX chain was bogus.

Change adapter check handler so that it resets card state after
tl_softreset() is stored.

Moved all EEPROM-related macro definitions into if_tlreg.h.

Don't allow an autoneg session to start until after the TX queue has
been drained, and don't transmit anything until after the autoneg
session is complete.

Also add support for two more Compaq ThunderLAN-based cards, and three
cards from Olicom which also use the ThunderLAN chip. The only thing
different about the Olicom cards is that they store the station address
at a different location within the EEPROM.
1998-07-13 18:15:48 +00:00
Bruce Evans
9bffbcd4f5 Fixed printf format errors (only 1 left in GENERIC now). 1998-07-13 09:53:11 +00:00
Amancio Hasty
63ca8cabf9 Improved Hauppauge's tuner detection and bt878 support
Amancio
1998-07-13 02:16:34 +00:00
Stefan Eßer
e1b7cfe2bf Remove unused member reselet from struct tstamp. 1998-07-12 20:32:52 +00:00
Stefan Eßer
e275daef22 Fix size of time stamps (had been time_t before the variable "time" was
hidden). Now "ticks" are used, which are 4 byte, not 8 byte in size.
The size mismatch did not matter due to sufficient padding at the end
of the structure that holds time stamps (there is an unused member).

The fix suggested by Bruce Evans used "sizeof (ticks_t)", but I prefer
to use "sizeof ticks", and didn't seem to object in his last mail on
this topic.

Submitted by:	bde
1998-07-12 20:26:45 +00:00
Bruce Evans
ac1e407b32 Fixed printf format errors. 1998-07-11 07:46:16 +00:00
Peter Wemm
e77902181c Merge changes from vendor branch. 1998-07-08 01:24:37 +00:00
Bruce Evans
6aa42d9a4e Changed #if defined(i386)' to #ifdef __i386__'.
`#if defined(ONE_THING)' is a style bug, and i386 instead of __i386__
is a bug, since i386 is never defined when the kernel is compiled
by with the default flags (`gcc -ansi ...').  Here the bug disabled
the call to pmap_setvidram(), so ISA video memory was not mapped
WC on 686's.  The bug may have been masked by bugs in the committer's
version of gcc - `gcc -ansi' incorrectly defines i386 for gcc = the
version of egcs on the 2.2.6 cdrom.
1998-07-07 05:00:09 +00:00
Justin T. Gibbs
2f333cd887 Attempt to load serial eeprom contents in both 93c46 and 93c56/66 mode before
giving up.

PR: 6966
1998-07-06 18:38:57 +00:00
Semen Ustimenko
e3e1bee33a Fix some strange errors of shutting transmitter up when start
transmition after software reset with no link estabilished yet.
Fix TX DMA stop method (queue last packet to stop).

PR:		i386/6578
1998-07-04 08:02:46 +00:00
John-Mark Gurney
e261d589ff document PCI_QUIET that prevents pci from compiling in so many strings 1998-06-30 08:13:27 +00:00
Bruce Evans
be160d60ab Removed unused includes. 1998-06-21 18:02:50 +00:00
Bruce Evans
e5b19842ef Removed unused includes. 1998-06-21 14:53:44 +00:00
Bruce Evans
084d9853ca Don't declare isa device structs or isa interrupt handlers in <sys/conf>,
and don't depend on them being declared there.  This will cause lots of
warnings for a few minutes until config is updated.  Interrupt handlers
should never have been configured by config, and the machine generated
declarations get in the way of changing the arg type from int to void *.
1998-06-17 14:58:04 +00:00
Bruce Evans
a249e02605 Fixed a misdeclaration. This unhides type mismatches which will be
fixed soon.
1998-06-17 12:14:55 +00:00
Peter Wemm
12b77dc845 Merge changes from vendor branch;
- connector selection values (should fix aui/bnc),
- non-shifting version of crc calculation using a table,
- interrupt mask adjustments,
- add some brackets where a #ifdef could break an if(),
- don't reset the card unless it's up.
1998-06-13 17:20:03 +00:00
Doug Rabson
897cd717a5 Add initial support for the FreeBSD/alpha kernel. This is very much a
work in progress and has never booted a real machine.  Initial
development and testing was done using SimOS (see
http://simos.stanford.edu for details).  On the SimOS simulator, this
port successfully reaches single-user mode and has been tested with
loads as high as one copy of /bin/ls :-).

Obtained from: partly from NetBSD/alpha
1998-06-10 10:57:29 +00:00
Bruce Evans
a09bee1aa8 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's.  Using bitfields of type u_char may affect size and
alignment but not packing)).
1998-06-08 09:47:47 +00:00
Joseph Koshy
59fde8c360 Fix spelling in printf(). 1998-06-08 06:42:34 +00:00
John Dyson
7ebee558ec Disable attempted write combining support. This probably
causes more trouble than help (for now.)
1998-06-08 04:07:51 +00:00
Doug Rabson
ecbb00a262 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
Amancio Hasty
630f3e5d9e Reviewed by: hasty@star-gate.com
Submitted by:	 Roger Hardiman <roger@cs.strath.ac.uk>

I left out a line of code  from Roger's last patch :(
1998-06-05 08:59:11 +00:00
Eivind Eklund
e448e98a36 o Return error when the controller can't accept commands.
o Make driver less chatty on boot (only announce version under
  bootverbose)

Submitted by:	Simon Shapiro <shimon@simon-shapiro.org>
1998-06-02 00:32:38 +00:00
Bill Paul
07997d60e7 Add a short delay in the read loop in tl_eeprom_getbyte(). On some
systems, you have to allow the delay or else you end up misreading
some of the bits.

Patch provided by: Yoshihiko Someya <zb9y-smy@asahi-net.or.jp>
1998-05-31 16:59:39 +00:00
Poul-Henning Kamp
5db3b83128 Add minimum driver for XC6200 based cards. Currently it knows about
the HOT1 from www.vcc.com.
1998-05-30 18:28:12 +00:00
Bill Paul
d8710fd422 Don't program the antonegotiation advertisement register in tl_setmode().
I had a reason for doing this, but it violates the principle of least
astonishment. (At some point I may put this back but attach it to one of
the LINK flags so the behavior can be toggled on and off.)

Also replace my tl_calchash() with a much less disgusting and substantially
smaller one supplied by Bill Fenner.
1998-05-29 16:58:46 +00:00
Bill Paul
d31f26f41e Ignore 'invalid' interrupts that occur while the interface is down.
These are probably generated by other PCI devices sharing the TLAN's
interrupt. The programmer's guide says to simply re-enable interrupts
and return if one of these is detected.

Prompted by bug report from: Bill Fenner
1998-05-26 23:42:24 +00:00
Amancio Hasty
0b9f580d2c Reviewed by: hasty@freebsd.org
Submitted by:	hasty@star-gate.com

Eliminate NTSC default setting if user choses a different video format.
1998-05-24 18:29:20 +00:00
Bill Paul
29b86d94dc Fix a mind-o in tl_setmulti(): when setting a bit in the upper
32 bits of the 64-bit hash table, we have to use a 32-bit shift,
not 31.

Pointed out by: Bill Fenner
1998-05-24 00:56:49 +00:00
Bill Paul
7e15fd7974 Remove 2.2.x compatibility code and #ifdefs. Once the shakedown period
in -current is over, I'll put a 2.2.x specific version in the RELENG_2_2
branch. If somebody wants a 2.2 version of this driver now, they can check
out the previous version from CVS or ask me via e-mail.

Gee people, I didn't mean to stir up such a controversy. I just wanted
to make sure I could get this thing to work with both kernel versions
and didn't want to have to maintain two separate copies. All ya hadda
do was ask. :)
1998-05-22 15:32:22 +00:00
Jordan K. Hubbard
0f96936284 Yeargh! After all that, I forgot to remove the #include. 1998-05-21 17:05:32 +00:00
Jordan K. Hubbard
a185a42f91 Don't use __FreeBSD_version explicitly - none of the other
drivers here do and it also blows up in building GENERIC during
a release build if you try and include <osreldate.h> (which shot
my SNAP dead - argh!).  Use __FreeBSD__ instead.
1998-05-21 16:24:05 +00:00
Bill Paul
13c92998a9 Add Texas Instruments TNET100 'ThunderLAN' PCI NIC driver to the tree.
This driver supports the following cards/integrated ethernet controllers:

Compaq Netelligent 10, Compaq Netelligent 10/100, Compaq Netelligent 10/100,
Compaq Netelligent 10/100 Proliant, Compaq Netelligent 10/100 Dual Port,
Compaq NetFlex-3/P Integrated, Compaq NetFlex-3/P Integrated,
Compaq NetFlex 3/P w/ BNC, Compaq Deskpro 4000 5233MMX.

It should also support Texas Instruments NICs that use the ThunderLAN
chip, though I don't have any to test. If you've got a card that uses
the ThunderLAN chip but isn't listed in the PCI vendor/product list in
if_tl.c, try adding it and see what happens.

The driver supports any MII compliant PHY at 10 or 100Mbps speeds in
full or half duplex. (Those I've personally tested are the National
Semiconductor DP83840A (Prosignia server), the Level 1 LXT970 (Deskpro
desktop), and the ThunderLAN's internal 10baseT PHY.) Autonegotiation,
hardware multicast filtering, BPF and ifmedia support are included.

This chip is pretty fast; Prosignia servers with NCR SCSI, ThunderLAN
ethernet and FreeBSD make for a nice combination.
1998-05-21 03:19:56 +00:00
Amancio Hasty
647c4178bd Reviewed by: ahasty@freebsd.org
Submitted by:	Roger Hardiman <roger@cs.strath.ac.uk>
options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_PAL
in the kernel config file makes the driver's video_open() function
select PAL rather than NTSC. This fixed all the hangs on my
Dual Crystal card when using a PAL video signal.

As a result, you can loose the tsleep (of 2 seconds - now 0.25!!)
which I previously added. (Unless someone else wanted the 0.25
second tsleep).
1998-05-19 03:38:31 +00:00
Amancio Hasty
c1224bb717 1.31 Randall Hopper <rhh@ct.picker.com>
submitted ioctl to clear the video buffer
                           prior to starting video capture
			   Amancio : clean up yuv12 so that it does not
                           affect rgb capture. Basically, fxtv after
                           capturing in yuv12 mode , switching to rgb
                           would cause the video capture to be too bright.
1.32                       disable inverse gamma function for rgb and yuv
                           capture. fixed meteor brightness ioctl it now
                           converts the brightness value from unsigned to
                           signed.
1.33                       added sysctl: hw.bt848.tuner, hw.bt848.reverse_mute,
                           hw.bt848.card
			   card takes a value from 0 to bt848_max_card
                           tuner takes a value from 0 to bt848_max_tuner
                           reverse_mute : 0 no effect, 1 reverse tuner
                           mute function some tuners are wired reversed :(
1998-05-16 07:07:10 +00:00
John Dyson
f0175db1ee Attempt to set write combining mode for graphics devices. 1998-05-11 01:06:08 +00:00
Bruce Evans
53a867d577 Translated to C (parameters in a function definition have the same scope
as variables declared in the main block in the function, so shadowing
of parameters by variables declared in the main block is not just an
obfuscation).

Found by:	lint
1998-05-08 07:56:48 +00:00
KATO Takenori
841691ff66 Added another PCI to C-bus (ISA bus like 16 bit bus of PC-98) bridge. 1998-05-04 08:16:03 +00:00
KATO Takenori
b6f8b29d08 Add NEC PC-98 chipsets. 1998-05-04 01:39:48 +00:00
Poul-Henning Kamp
b24afdcba1 Patches are given here for pcisupport.c to recognise most of VIA
Technologies' Socket 7 chipsets. This covers all of the Apollo chipsets
except the Master (82C570) and the MVP3, and it also covers the cheap
VXPro and VXTWO knockoffs of the VP1 and VPX.

PR:		6481
Reviewed by:	phk
Submitted by:	Lee Cremeans <lcremean@tidalwave.net>
1998-05-03 08:35:05 +00:00
Stefan Eßer
fabdb7f671 Add PCI device IDs for Intel BX PCI chip-set components.
Submitted by:	Steinar Haug <sthaug@nethelp.no>
1998-05-02 22:19:33 +00:00
Matt Jacob
65adb54cf1 Add support for the Qlogic ISP SCSI && FC/AL Adapters 1998-04-22 18:12:29 +00:00
Amancio Hasty
6493d9f3bb Forgot to add opt_bktr.h 1998-04-19 19:12:49 +00:00
Amancio Hasty
9ff07e3256 Reviewed by: Amancio
Submitted by:	Roger Hardiman <roger@cs.strath.ac.uk>
Roger Hardiman <roger@cs.strath.ac.uk> :
	Revised autodetection code to correctly handle both
	old and new VideoLogic Captivator PCI cards.
	Added tsleep of 2 seconds to initialistion code for PAL users.
	Corrected clock selection code on format change.

--- Amancio
1998-04-18 04:58:33 +00:00
Dag-Erling Smørgrav
dc73342347 Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
Bruce Evans
c1087c1324 Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
Semen Ustimenko
72a43c1b0a Fixed autonegotiation. Card registers are now accessed via memory
not i/o space.
1998-04-13 14:15:40 +00:00
Amancio Hasty
e248ae96af take out opt_bktr.h from brooktree848.c 1998-04-06 07:57:55 +00:00
Amancio Hasty
f7c015e72e Reviewed by: Amancio
Submitted by:	Frank Nobis  <fn@Radio-do.de>

Mods to view german cable tv and minor fix to correctly identify bt849.
1998-04-05 20:57:46 +00:00
Tor Egge
5758c2de94 Add two workarounds for broken MP tables:
- Attempt to handle PCI devices where the interrupt is
	  an ISA/EISA interrupt according to the mp table.

	- Attempt to handle multiple IO APIC pins connected to
	  the same PCI or ISA/EISA interrupt source.  Print a
	  warning if this happens, since performance is suboptimal.
	  This workaround is only used for PCI devices.

With these two workarounds, the -SMP kernel is capable of running on
my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
1998-04-01 21:07:37 +00:00
Poul-Henning Kamp
227ee8a188 Eradicate the variable "time" from the kernel, using various measures.
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.

Most uses of time.tv_sec now uses the new variable time_second instead.

gettime() changed to getmicrotime(0.

Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).

A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.

Add a new nfs_curusec() function.

Mark a couple of bogosities involving the now disappeard time variable.

Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.

Change profiling in ncr.c to use ticks instead of time.  Resolution is
the same.

Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.

Reviewed by:	bde
1998-03-30 09:56:58 +00:00
Bruce Evans
08637435f2 Moved some #includes from <sys/param.h> nearer to where they are actually
used.
1998-03-28 10:33:27 +00:00
Stefan Eßer
a0f4d79940 Add two VLSI chip set components: 82C592 and 82C593
Submitted by:	Warner Losh <imp@village.org>
1998-03-27 20:36:54 +00:00
Daniel O'Callaghan
b9e8979b7b PR: i386/6040
Submitted by:	nakagawa@jp.freebsd.org
Add new PCI NE2000 (VIA VT86C926)
1998-03-17 10:54:23 +00:00
Julian Elischer
fdc021ba7f Add EISA support for DPT drivers
Submitted by: Matthew Dodd
Reviewd by:	shimon@simon-shapiro.org (DPT author)
1998-03-11 00:30:16 +00:00
Peter Wemm
5921df6791 merge benfor branch changes onto mainline. 1998-03-08 16:54:00 +00:00
Julian Elischer
b1897c197c Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)
Submitted by:	Kirk McKusick (mcKusick@mckusick.com)
Obtained from:  WHistle development tree
1998-03-08 09:59:44 +00:00
Jordan K. Hubbard
1fbe7f53e0 Correct minor typo
Confirmed by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-03-05 10:53:26 +00:00
Semen Ustimenko
1b0783ba37 *** empty log message *** 1998-03-04 16:35:05 +00:00
David Greenman
9292429115 Added support for the 82553 and 'B' 82555 PHY. 1998-03-03 14:19:09 +00:00
Jordan K. Hubbard
b42ae45d15 Update the information in this file slightly. 1998-03-02 07:35:48 +00:00
Søren Schmidt
ff86df5bb2 Undo the previous commit which was NOT for -current.
Rearrange a few lines for better order.
1998-03-01 17:29:25 +00:00
Satoshi Asami
fc6ffbcae9 Add Intel 430TX chipset, namely 82439TX system controller and four
incarnations of 82371AB (P/I bridge, IDE, USB and power management).

Tested by:	jkh
1998-03-01 10:10:31 +00:00
Bruce Evans
b0a76e6a69 Restored half of the ANSI semantic errors fix which was clobbered
by the previous commit.
1998-03-01 06:06:20 +00:00
Stefan Eßer
ebef4c231e Add PCI device ID of Surecom NE-34 1998-02-27 22:30:36 +00:00
Amancio Hasty
d7ef1f6051 Radio support for bt848 cards from Flemming Jacobsen <fj@trw.nl>
Amancio
1998-02-26 08:19:14 +00:00
Bruce Evans
e978f41536 Added missing #include of "opt_devfs.h".
Fixed pedantic semantics errors (in ANSI C, static arrays must have
a size, and static objects should be consistently declared as static
unless you know more than anyone should have to know about the
linkage rules).
1998-02-25 07:12:17 +00:00
Søren Schmidt
fffdf6c1e0 Add the Intel 82371SB USB host controller to the known list. 1998-02-24 12:15:34 +00:00
Jordan K. Hubbard
f082783a66 Update to "stable-167" release; totally reimplements media detection.
Submitted by:	Ustimenko Semen <semen@iclub.nsu.ru>
1998-02-20 18:08:46 +00:00
Bruce Evans
39e4376ba7 Removed unused #includes. 1998-02-20 13:11:54 +00:00
Amancio Hasty
1735805c3a Move Luigi's I2CWR ioctl from the video_ioctl section to the
tuner_ioctl section. Changed Major device from 79 to 92 and reserved
our Major device number -- hasty@star-gate.com
1998-02-20 03:55:17 +00:00
Eivind Eklund
2f83bdb269 Staticize. (Diffs by me & and Simon in cooperation.) 1998-02-10 17:36:44 +00:00
Eivind Eklund
303b270b0a Staticize. 1998-02-09 06:11:36 +00:00
Eivind Eklund
f4002e8278 Add #include "opt_devfs.h". 1998-02-09 02:31:47 +00:00
Nate Williams
9dda04f1e2 - Removed typo in Copyright and added Id. 1998-02-07 20:41:20 +00:00
Eivind Eklund
0b08f5f737 Back out DIAGNOSTIC changes. 1998-02-06 12:14:30 +00:00