Commit Graph

980 Commits

Author SHA1 Message Date
Nate Williams 8ca7c1c4a0 Better code for switching the ethernet transceiver.
My 3C509B-COMBO works fine with the following patch. Switching between
UTP and BNC is quite easy. (Just type 'ifconfig ep0 link1 -link2' or 'ifconifg
ep0 link2 -link1'.)

[ I tested this with the additional PC-CARD patches and it works on both
connectors on my 3C589B and 3C589C ]

Reviewed by:	nate
Submitted by:	Naoki Hamada <nao@sbl.cl.nec.co.jp>
1996-06-14 21:28:35 +00:00
Satoshi Asami ad63a118b2 The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.

Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 11:02:28 +00:00
David Greenman 0648f71275 Updated this driver to a newer version from Matt. This should fix several
bugs related to support of dc21041 chips and other problems.

Submitted by:	Matt Thomas <matt@3am-software.com>
1996-06-14 05:25:32 +00:00
Gary Palmer c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Alexander Langer 7966b47a3e Detach the device at shutdown.
Add a prototype for ed_attach_NE2000_pci (this really belongs somewhere
else, but where?).
1996-06-11 00:51:49 +00:00
Justin T. Gibbs 1ffa43c082 Detect and report dataphase overruns. Put the adapter into 'Bit Bucket'
mode when this occurs and allow the target to complete the transaction.
Force a retry on overruns since they are usually caused by termination or
cable problems.
1996-06-09 17:33:18 +00:00
Satoshi Asami 58e025d580 Scan PCI buses in order the BIOS has assigned them. This is sometimes
necessary to boot from a SCSI disk connected to a twin-channel adapter,
and you have multiple of them (disks and adapters).

Reviewed by:	se
1996-06-09 11:58:19 +00:00
Peter Wemm 80b53b4fd5 Eliminate a struct copy that gcc doesn't inline and ends up as a call to
memset().
1996-06-08 10:18:12 +00:00
Bruce Evans 7dad0d7ef9 Removed recently introduced unnecessary #includes of <machine/cpu.h>
(bootverbose isn't there in -current) and nearby unnecessary #includes.
1996-06-08 09:37:51 +00:00
Bruce Evans e7f1854cb7 Fixed group and permissions for devfs devices (group operator was games;
permissions 0640 was 0600).
1996-06-08 09:18:27 +00:00
Justin T. Gibbs 1d40e2f2c5 Hopefully fix the parity problem and the hang on message reject for good. 1996-06-08 06:54:06 +00:00
Jordan K. Hubbard b3e41931c9 A trailing patch Jim left out of the last commit.
Submitted-by: james
1996-06-07 22:55:14 +00:00
Joerg Wunsch 89cabf8664 Hide the ``wrong signature'' message behind bootverbose. It's
annoying for people who don't have a bus mouse.
1996-06-02 18:57:17 +00:00
Gary Palmer a330e1f1a5 Set ifnet.baudrate for ethernet / FDDI interfaces too. Makes
SNMP slightly more informative

Reviewed by: Garrett Wollman
1996-06-01 23:25:10 +00:00
Justin T. Gibbs e5442bc690 Don't use the auto ATN on parity error feature. It may be the source
of our parity handling problems.
1996-05-31 06:30:15 +00:00
Peter Wemm c15b6c4bc6 When estimating the time (in ms) left to drain the output queue based
on the baud rate, dont get upset if it's been hung up by setting B0.
Instead, sleep for a short time, as the host controller takes a while
to go through the state changes.
1996-05-30 23:41:35 +00:00
Justin T. Gibbs e1ca90bc57 Fix regression. It seems that you need at least one instruction between
seeing SPIORDY and checking for PHASEMIS.  My last change turned out to
be less cosmetic then I thought.

Pointed out by: Satoshi Asami <asami@cs.berkeley.edu>,
		Faried Nawaz <fn@pain.csrv.uidaho.edu
1996-05-30 14:31:08 +00:00
Justin T. Gibbs 56981243dd Merge in changes for NetBSD/OpenBSD.
Cosmetic change to p_mesgout code so that it "looks" the same as what
is done in the inb* routines.
NetBSD/OpenBSD support Submitted by:Noriyuki Soda <soda@sra.co.jp>,
				    Pete Bentley <pete@demon.net>,
				    Charles M. Hannum <mycroft@mit.edu>,
				    Theo de Raadt <deraadt@theos.com>
1996-05-30 07:18:39 +00:00
Justin T. Gibbs 070d32b1a9 Fix a race condition in p_mesgout* and inb* code that could allow a
phasemiss to sneak by without detection.  This should fix the
Wide/Narrow boot problems that have been reported since this bug
caused the driver ignore a narrow target rejecting wide negotiation.
1996-05-27 23:16:55 +00:00
Gary Palmer d9378aac9a Clean up the warnings produced by the recent PCI code. Requested by
SE since he doesn't have good access right now
1996-05-27 22:32:23 +00:00
Peter Wemm d2dc185840 Fix the warnings about "cant inline call to xxx" by reordering two
functions.  It seems gcc wants to have seen the definitions of the
function before it will insert it inline in a caller.
1996-05-27 06:02:52 +00:00
Justin T. Gibbs c6841cd18f Properly determine the offset of the remaining bytes we need to transfer
after outsl'ing all the long words we can during transmission in 32bit mode.

Closes PR:i386/1243
Submitted by:	flash@eru.tubank.msk.su
1996-05-24 15:22:36 +00:00
Justin T. Gibbs 087b79e649 Correct a botched commit from yesturday. It helps to bring over the
right patch file.<sigh>
1996-05-23 15:02:18 +00:00
Garrett Wollman 1608c58429 Let the user know what errors are experienced on received packets.
I spent the better part of a day trying to figure out why my
experiment didn't work the way I expected, only to find out that
the router was dropping huge numbers of packets because of PCI bus
priblems.  This does not fix the bug that errors are counted as
input packets because my patch doesn't apply cleanly.
1996-05-21 19:05:31 +00:00
Justin T. Gibbs 61538c3003 Enable/Disable Ultra mode on a per target basis. This allows the driver
to use the full range of settings from 3.6-20MHz on any target.
1996-05-21 18:32:23 +00:00
Stefan Eßer 8408422768 Add support for NE2000 compatible PCI Ethernet cards. The PCI probe
is enabled by having an "device ed0 at isa? [...]" config line.
The first PCI card will get a unit number one higher than the highest
defined for any ISA card of the ED type, e.g. if ed0 and ed1 are
configured, then the PCI cards will be ed2, ed3, ...

BEWARE: If you have configured your kernel as ed0 with the port address
as assigned by the PCI BIOS, then your card will be found by both the
PCI and ISA probes, and bad things may happen. Make sure to restore
the original port address form the GENERIC kernel for the ed0 device!

Reviewed by:	davidg
1996-05-18 17:56:42 +00:00
Stefan Eßer 4beaf036a6 Fix range check to actually test the variable that will be used as
an index later.

Submitted by:	Erich Stefan Boleyn <erich@uruk.org>
1996-05-18 17:32:20 +00:00
Jordan K. Hubbard 734d08a223 A patch for the meteor device driver. It fixes:
1) A spelling error pointed out by Paco Hope.
       2) A bug in the range checking routing pointed out by Jim Bray.
       3) Enables the setting of frames per second.
Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
1996-05-17 09:43:15 +00:00
Satoshi Asami 1af0e025c9 Add #ifndef/#endif around the "#define CCD_OFFSET 16", so you can override
it in your kernel config file.

Requested (in essence) by:	phk
1996-05-13 09:17:42 +00:00
Satoshi Asami 0d88ef072c Leave 16 lines in front of each component partition. It's now safe to
use sd87a or sd237e even if they start at the beginning of the slice.

You can also use sd85c if you prefer, although you need to change the
type field in the disklabel to "4.2BSD".
1996-05-13 08:38:15 +00:00
Joerg Wunsch 09fdca5394 Fix the "well-known retries bug" (a logic-o). 1996-05-12 12:36:59 +00:00
Joerg Wunsch a9313682fc Give up waiting for a successful keyboard reset after some
unreasonable time.  I've got a PCI mainboard that simply doesn't grok
it, so continuing with a warning (and a keyboard that's working
nevertheless :) seems to be better than spin-looping forever.
1996-05-11 23:16:23 +00:00
Justin T. Gibbs 990f21682c One more linux -> __linux__ 1996-05-10 16:28:00 +00:00
Justin T. Gibbs c2278994ed aic7xxx.seq:
Change #ifdef linux to #ifdef __linux__

aic7xxx_reg.h:
Remove unneeded BOFF_60BCLOCKS
define CHIPRSTACK to be the same as CHIPRST
define RESET_SCSI and CHANNEL_B_PRIMARY bits
All of these aer used during the setup of adapters.
1996-05-10 16:11:03 +00:00
Peter Wemm 809959779f *blush* How did this slip through?
Fix a dynamic initialiser in a static variable, and make sure sysctl.h
is #included.
1996-05-08 04:48:25 +00:00
Peter Wemm 3461d589f2 Change the logic of the interrupt/poll loop. It no longer loops until
it empties all of the 256 byte incoming fifo, as it can spend more time
processing one port than intended, especially if data is streaming in
at 115.2K.  The port fifo will be emptied and dumped into the tty system
and left until next time.  I've been running this for quite some time on
one of my systems here.
Also, if the tty layer is blocked or full it lets the hardware assert the
flow control rather than loosing the data.
1996-05-05 17:35:19 +00:00
Peter Wemm 34914e50d4 Change the compiled-in polling parameters to a sysctl setting. 1996-05-05 17:09:04 +00:00
Poul-Henning Kamp aa8de40ae5 Another sweep over the pmap/vm macros, this time with more focus on
the usage.  I'm not satisfied with the naming, but now at least there is
less bogus stuff around.
1996-05-03 21:01:54 +00:00
Poul-Henning Kamp 14212c9d29 Typo. 1996-05-03 20:15:11 +00:00
Poul-Henning Kamp 0be33caa54 Forget that TAILQ's must be init'ed. 1996-05-03 16:49:14 +00:00
Poul-Henning Kamp 17542807e5 Move from the old buf.b_actf to the new TAILQ(buf.b_act). 1996-05-03 14:57:27 +00:00
Andrey A. Chernov f0478277ba Fix ^[[1K (clear from beginning of line to cursor) and
^[[2K (clear whole line), they not work _initially_
1996-05-02 21:47:50 +00:00
Poul-Henning Kamp e911eafcba removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
        ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
        NPDEPG

Major macro cleanup.
1996-05-02 14:21:14 +00:00
Poul-Henning Kamp a8c5fef5e6 KGDB is dead. It may come back one day if somebody does it. 1996-05-02 09:34:51 +00:00
Bruce Evans b1d3d2ffcf Fixed a race that caused panics in kernel printfs when the screen timeout
routine changed the screen pointers while output was in progress.
1996-05-01 03:58:21 +00:00
Søren Schmidt 03475c250b Removed options MAXCONS & HARDFONT, they are no longer in use
(and havn't been for long, sigh)
1996-04-26 06:45:41 +00:00
Satoshi Asami f8176d838c Fix logic bug in pci bridge code. For a PCI-PCI bridge, secondary
should be <= than subordinate, not the other way around.

They are both true if the bridge is not cascaded (i.e., twin-channel
scsi/e-net adapters won't be affected by this bug), which is probably why
it was unnoticed until today.
1996-04-25 06:04:27 +00:00
Satoshi Asami 52faebb233 Add missing "int" to static var. 1996-04-24 09:42:22 +00:00
Nate Williams e12ac36c96 Format the already applied PCCARD additions to use KNF form. No
functional changes.
1996-04-23 18:36:56 +00:00
Justin T. Gibbs 035de5ccf1 Turn on SCB paging for aic7770 chips rev E or greater.
Update my copyrights.
1996-04-20 21:21:50 +00:00
Justin T. Gibbs 0a44712261 Implement SCB paging. This allows up to 255 active commands on
aic7770 >= Rev E, aic7850, aic7860, aic7870, and ai7880 based controllers.

Make findSCB safer for non-tagged commands when tagged commands are
active on the controller.  The symptoms of this problem were
"Overlapped commands attempted" messages during error recovery
attempts.

Compact scratch ram usage.  This leaves 8 bytes free for future use.

Clean up some comments.

aic7xxx_reg.h:
Update my copyright.
1996-04-20 21:20:31 +00:00
Stefan Eßer 68159c8901 Update PCI bus code from my current sources:
- always use pci_conf_read() and pci_conf_write(). (This is required to
  simulate non-existant devices in my system for PCI bridge code tests.)

- reorder some functions (put the main functions at the end).

- correct off by one bug in the code dealing with unitialized PCI to PCI
  bridge chips. (Bug found by ASAMI Satoshi.)

- print function number for multi-function devices.
1996-04-14 20:14:36 +00:00
Bruce Evans aef18d6ed7 Another try: fixed bogus change of the fifo settings for the non-speed of 0.
rev.1.30 incorrectly changed the behaviour from always disabling the fifo
to always enabling it.
1996-04-13 14:55:18 +00:00
John Hay d80101ee8e Improve the handling of receive errors. Fix a nasty bug in the receive
buffer code.
1996-04-12 19:57:44 +00:00
Bruce Evans 3745f80a48 Moved AUTO_EOI_[12] and most sio and pcvt options out of the makefile. 1996-04-11 21:18:49 +00:00
Marc G. Fournier 6d4bca5b8a removed RS_IBUFSIZE #ifndef - have been informed it was a bad idea 1996-04-10 18:09:58 +00:00
Marc G. Fournier f4f119017f Placed an #ifndef around RS_IBUFSIZE so that it can be changed in the
config file ... PR#528 is reportly fixed by adding 'options RS_IBUFSIZE=1024'
to the config file
1996-04-10 04:18:36 +00:00
Sujal Patel 100f78bbe0 Update drivers to use isa_dma_acquire() and isa_dma_release()
Reviewed by:	bde
1996-04-08 19:40:57 +00:00
David Greenman 58b248e254 Removed sections 3 and 4 from my copyright. 1996-04-08 01:31:42 +00:00
David Greenman d40802692e Killed sections 3 and 4 of my copyright as I think it is unnecessarily
restrictive.
1996-04-08 01:25:22 +00:00
Bruce Evans 5670f8fbd7 Changed #includes of <i386/include/foo.h> to #includes of <machine/foo.h>. 1996-04-07 17:50:10 +00:00
Bruce Evans 3157adc8af Removed now-unused #includes of <machine/cpu.h>. They were for bootverbose
being declared in the wrong place.
1996-04-07 17:32:42 +00:00
Bruce Evans c1263076e3 Removed unused declaration of bootverbose. 1996-04-07 17:03:12 +00:00
Bruce Evans 2151975455 Fixed devfs device names and numbers.
Fixed handling of unknown CMOS types - don't attach unrecognized devices.
1996-04-07 14:46:42 +00:00
Marc G. Fournier ecd87fe6c3 changed from using dev_link() to devfs_link() 1996-04-02 04:52:03 +00:00
Joerg Wunsch 0e317d05cc Fetch the (dummy) READY CHANGED condition interrupt stati that
happen after an FDC reset.

Submitted by:	bde
1996-03-31 18:04:51 +00:00
Joerg Wunsch 4ddc73e65b Fix a bogus message:
ed0: Invalid irq configuration (2) must be 2-5 for 3c503
                                ^          ^
1996-03-31 15:53:19 +00:00
Justin T. Gibbs c2c5fd345d aic7xxx.seq:
Fix support for the aic7850 by looking only at the relavent bits of the
    QINCNT.  The 7850 puts random garbage in the high bits and all my attempts
    to determine the cause of this failed.  This approach does seem to work
    around the problem.

    Don't trust SCSIPERR to tell us when there is a parity error.  On
    some revs of the 7870 and the 7880, this bit follows the parity of
    the current byte.  Instead of using a SEQINT to tell the kernel,
    re-enable the standard parity error interrupt since it seems to pause
    the sequencer right at the time of the error which is the effect we were
    looking for anyway.

aic7xxx_reg.h:
    Remove PARITY_ERROR seqeuncer interrupt type, its no longer used.

    Define QCOUNTMASK as the SRAM location for the mask to use on the
    QINCNT register.  QCOUNTMASK is determined by the number of SCBs
    supported by the device we're working on.

aic7xxx_asm.c
    Properly check the return value of fopen, and define the arg list
    in getopt correctly.
    Submitted by: Pete Bentley <pete@demon.net>
1996-03-31 03:02:37 +00:00
Bruce Evans f85120ac5b Fixed group of some more disk devices.
Fixed devfs function names.
1996-03-29 11:45:12 +00:00
Bruce Evans c9e1c95d1d Fixed missing quote in a devfs string. 1996-03-29 11:39:08 +00:00
Jordan K. Hubbard 2fa43eefcf A bug fix and a couple of new modes for the meteor driver.
Submitted-By: Jim Lowe <james@miller.cs.uwm.edu>
1996-03-28 20:28:14 +00:00
Bruce Evans f953dd01c8 Removed an unused devfs variable again.
Added $Id$.
1996-03-28 15:25:43 +00:00
Marc G. Fournier 734daefc97 Switched from using devfs_add_devsw() to devfs_add_devswf()
Reviewed by:	julian@freebsd.org
1996-03-28 14:31:42 +00:00
Marc G. Fournier 6e18ce4676 Switched from using devfs_add_sw() to using devfs_add_swf()
Reviewed by:	julian@freebsd.org
1996-03-28 14:29:52 +00:00
Marc G. Fournier 14689d6f4f Reviewed by: julian@freebsd.org 1996-03-28 14:26:46 +00:00
Bruce Evans 6c4591a089 Fixed ownerships of callout devices. 1996-03-27 20:03:32 +00:00
Bruce Evans df957ee1b3 Moved the initialization of the devfs devices to after the initialization
of the devswitch so that it actually works.
1996-03-27 19:11:41 +00:00
Bruce Evans 2412bc33ad Fixed name of /dev/speaker (it's not spkr). 1996-03-27 19:07:33 +00:00
Bruce Evans 6ae323519c Fixed group of disk devices (was wheel or games, now operator).
Added scsi control devices.

Converted almost everything that I changed to use devfs_add_devswf()
and verbose id macros.

st.c:
Renamed enrst* to erst* since that's what the current name is (enrst
seems to be an old name).
1996-03-27 18:50:10 +00:00
Satoshi Asami e73228724f Change how mirror writes are handled, according to the discussion on the
mailing list.

When initiating a write, ccdbuffer() returns two "struct ccdbuf *"s
linked together by the cb_mirror field.  "cb_pflags &
CCDPF_MIRROR_DONE" is set to 0 on both of them.

When a component returns to ccdiodone(), it checks if "cb_pflags &
CCDPF_MIRROR_DONE" is set or not.  If not, it sets the partner's
flag and returns.  If it is, it means its partner has already
returned, so it will go to the regular cleanup (which is in the
fallthrough code).

There should be no performance or functionality changes unless the
higher-level scsi driver does something with the resid value.  The change
is purely aesthetical and prepares us for the parity implementation.
1996-03-26 02:29:11 +00:00
Bill Fenner fc99d29b88 Eliminate reference to ac_ipaddr in FreeBSD case. 1996-03-23 19:29:10 +00:00
Satoshi Asami e2a13e8c60 Ported to 2.2-current. Uses [bc]devsw_add(), and is also now a proper
pseudo-device.

Doesn't use devfs correctly yet.
1996-03-21 04:13:25 +00:00
Bruce Evans ede8dc43a2 Fixed unsigned longs that should have been vm_offset_t.
vm_offset_t is currently unsigned long but should probably be plain
unsigned for i386's to match the choice of minimal types to represent
for fixed-width types in Lite2.  Anyway, it shouldn't be assumed
to be unsigned long.

I only fixed the type mismatches that were detected when I changed
vm_offset_t to unsigned.  Only pointer type mismatches were detected.
1996-03-19 15:03:00 +00:00
Poul-Henning Kamp b71daf5456 Always dsgone() slices when we leave. 1996-03-17 20:33:02 +00:00
Andrey A. Chernov e84f22b522 Fix/cleanup raw partition open/close code 1996-03-17 13:33:42 +00:00
Jordan K. Hubbard 2dbb98e0af This is a revised fe, Ethernet driver for MB8696x based adapters. 1996-03-17 08:36:38 +00:00
Peter Wemm fe63158271 Changes to the Digi/Arnet SYNC driver:
1. Create 2 x 8k transmit buffer blocks in place of the 16k block previously.
   With this change the speed as tested with ttcp on a 2Mbit link went up
   from 206kbyte/s to 236kbyte/s.
2. Change the rest of the functions to also have the definition of the
   return value on a sepperate line.
3. Remove some unused variables.
4. Add code to recover from DMA underruns.
5. Reorder ar_get_packets() to handle errors better.
6. Only allocate a mbuf cluster if the data is more than the mbuf.

(and in a second diff in addition to the above)
7. Stops the occasional DMA underruns that occurred when 2 channels
   are running at 2Mbit/s.

Submitted by: John Hay <jhay@mikom.csir.co.za>
1996-03-17 00:29:35 +00:00
Jean-Marc Zucconi 80da27b88c Fix the isa_device table (lkm): id_irq and id_maddr must be 0.
Pointed out by: bde
1996-03-16 01:08:04 +00:00
Jean-Marc Zucconi b1fe5b5c60 Add code to make it a loadable kernel module 1996-03-15 20:35:06 +00:00
Justin T. Gibbs e4f25ddc16 aha1742.c:
Cleanse the SCSI subsystem of its internally defined types
		u_int32, u_int16, u_int8, int32, int16, int8.
		Use the system defined *_t types instead.

eisaconf.c:
	Cosmetic formatting chagnes.
1996-03-10 07:04:27 +00:00
Justin T. Gibbs 75f0b9d070 Reset the DMA control register whenever we reset the sequencer.
Clear LASTPHASE on busfree so the kernel driver can tell that the
   sequencer is idle.
Fix some comments to reflect reality.
1996-03-10 07:02:32 +00:00
Rodney W. Grimes 46ed21d1a7 Convert a timeout loop from 100 iterations of 15uS to 50
iterations of 30uS so that really fast systems stop getting
timeout messages from the Riscom driver.

Reviewed by:	ache, peter@nmti.com (Peter da Silva)
1996-03-09 18:59:00 +00:00
Peter Wemm af6646cdc5 Make the handshake lines do the right thing. This is untested by the author
but others say it's working. (DTR etc)

Closes PR#884

Submitted-by: John Hay <jhay@mikom.csir.co.za>
1996-03-03 08:42:28 +00:00
Peter Wemm 4bd4912865 Add more options into the conf/options and i386/conf/options.i386 files
and the #include hooks so that 'make depend' is more useful.  This
covers most of the options I regularly use (but not all) and some other
easy ones.
1996-03-02 18:24:13 +00:00
Jordan K. Hubbard 6380fb9d12 Hopefully, this will fix the problems that some people have been having with
the S-Video input.  It also has code in the driver for the meteor RGB support
and some other bug fixes.  I don't have a meteor RGB but I have been told
that it works.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-03-02 06:08:53 +00:00
Justin T. Gibbs 6398c75dc7 Fix media type determination. 1996-02-28 17:19:04 +00:00
Andrey A. Chernov 79dd972e3e Fix re-sense code
Remove unused part of close code
1996-02-27 19:08:39 +00:00
Andrey A. Chernov f4cb715ffe rmcd0c: now several ioctls (eject/close/debug/reset/etc.) works
even not CD sensed. Open of this device without CD sensed allowed too.
Other ioctls re-sense CD for this device.
1996-02-27 18:53:50 +00:00
Justin T. Gibbs eea817fc73 Clean up the 3c5x9 driver and add an eisaconf probe to it. This should
prevent it from conflicting with other drivers (like the aic7xxx driver).
Most of the work was in spliting out common portions of the driver and
making them generic enough to be called from the eisaconf probe.
1996-02-26 01:05:36 +00:00
Justin T. Gibbs 76e002c102 3c5x9.c:
The eisaconf probe for the 3Com 3c579 and the 3c509 when in eisa
configuration mode.

aha1742.c aic7770.c bt74x.c:
Only call eisa_registerdev after the probe is successfully.

eisaconf.c:
Increase kdc->kdc_datalen during the eisa_reg* functions instead of
in the eisa_add* functions since eisa_registerdev has already been
called and we have a kdc to manipulate.
1996-02-26 01:01:41 +00:00
Bruce Evans 3b3bedbc0e Added some delays to the probe. This might fix some incompatible UARTs
(the ones that take more than a few hundred nsec and less than 1 msec to
switch their IRQ output).
1996-02-25 21:10:54 +00:00
Bruce Evans 8335c1b8ae Don't turn off the motor on active drives. The motor timeout may
occur while a command is in progress if the system is overloaded
or was stopped at a debugger breakpoint.
1996-02-25 21:01:31 +00:00
Stefan Eßer 8ec7a852b0 Remove limit of port I/O addresses to 65K, since PCI specifies 32 bit
port addresses (even though the PC architecture doesn't support them).

Add code to limit the I/O map size based on the lowest set bit of the
address. This cures the problem with the BT946C only having a 16 bit
map register, in voiolation of the PCI specs, without giving up the
general support of >65K port regions.
1996-02-19 00:30:40 +00:00
Stefan Eßer 07d9d14a55 Add generic PCI to PCI bridge support.
Improve verbose boot messages for unidentified chips.
1996-02-17 23:57:04 +00:00
Justin T. Gibbs 162b7f0ac2 - Properly set the watchdog timer only during transmits.
- Clean up the access to our ifnet structure by caching a pointer
  to it instead of always digging through our softc structure.

Submitted by: Watchdog fixes by Serge A. Babkin <babkin@hq.icb.chel.su>
1996-02-13 15:55:33 +00:00
Poul-Henning Kamp 01a3e1a590 use devfs_add_devswf and avoid local variable. 1996-02-13 14:15:13 +00:00
Andrey A. Chernov 52be2bc34c Implement CDIOCSTART 1996-02-13 02:32:36 +00:00
Paul Traina ab58050112 Close kern/627 - panic if syscons not attached 1996-02-08 06:30:31 +00:00
Garrett Wollman 9b44ff2214 Clean up Ethernet drivers:
- fill in and use ifp->if_softc
	- use if_bpf rather than private cookie variables
	- change bpf interface to take advantage of this
	- call ether_ifattach() directly from Ethernet drivers
	- delete kludge in if_attach() that did this indirectly
1996-02-06 18:51:28 +00:00
Andrey A. Chernov f2b4163c2a Deliver all bells to current console, use different pitch
for non-originating bells.
1996-02-05 14:08:39 +00:00
Andrey A. Chernov 3025715460 Implement CD_MEDIA_CATALOG request for read_subchannel
Obtained from: NetBSD
1996-02-03 14:33:56 +00:00
Andrey A. Chernov 0b2207bcb3 Detect yet one kind of device (taken from NetBSD)
Use more accurate TOC size calculation
1996-02-03 00:06:49 +00:00
Andrey A. Chernov 1cf944e85c Implement PREVENT & CLOSE ioctls 1996-02-02 22:08:28 +00:00
Andrey A. Chernov 8b1448af24 Remove close tray on open - works very bad with xcdplayer 1996-02-02 21:18:02 +00:00
Andrey A. Chernov 4a52a30aff Calculate TOC size to match what scsi cd says.
Exchange control<->addr_type fields
1996-02-02 20:50:04 +00:00
Andrey A. Chernov 108fdb172f Implement PLAYBLOCKS ioctl, add argument checking to other PLAY* ioctls
Obtained from: NetBSD (partially)
1996-02-01 19:15:41 +00:00
Andrey A. Chernov 3a08c9b183 Return to #pragma pack(4) after header is done
Obtained from: NetBSD
1996-02-01 17:19:46 +00:00
Andrey A. Chernov 6495d86b22 Fix TOC size calculation: old code assing volume size here 1996-02-01 16:51:53 +00:00
Jordan K. Hubbard 26a2ebbb95 Sync with latest Meteor and Spigot sources from James.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-02-01 07:36:34 +00:00
Justin T. Gibbs b1cd8af83b Free the externalizing buffer. 1996-01-31 18:46:36 +00:00
Justin T. Gibbs 5ae5e472e2 aha1742.c aic7770.c bt74x.c
- Call eisa_registerdev as soon as we have a device match.  This allows the
   "eisa_add_*" routines to tweak kdc_datalen as the kdc grows and shrinks.

eisaconf.c
 - externalize the linked lists that hold our ioaddrs and maddrs.
1996-01-31 18:02:19 +00:00
Satoshi Asami b8e29b5517 Fix one warning and fix one bug found while looking at another warning (but
caused by a different reason):

. #ifndef __FreeBSD__ around check for negative size, FreeBSD size_t is
  unsigned

. Disable mirror/parity if interleave size is 0 (i.e., serial concatenation).
1996-01-31 11:25:46 +00:00
Satoshi Asami 3bc746be91 Mirror support. When CCDF_MIRROR is set:
(1) The reads are always done from the first n/2 disks.

(2) Each write is done twice, to the "data" disk (in the first half) and
    the "mirror" disk (in the second half).

ccdbuffer() now takes an extra argument (struct ccdbuf **) and stores
the pointer to ccdbuf in there.  In case of a mirrored write, it
allocates and stores two pointers.  The "residual" is also doubled
for mirrored writes so that ccdiodone() can correctly tell when all
the writes are done.
1996-01-31 03:28:21 +00:00
Andrey A. Chernov dff88dc420 Audio part: various improvements from NetBSD driver
Convert LBA to network order now
1996-01-30 23:27:20 +00:00
Mike Pritchard 6c5e9bbdf5 Fix a bunch of spelling errors in the comment fields of
a bunch of system include files.
1996-01-30 23:02:38 +00:00
Satoshi Asami 09b5920411 Prepare for adding mirroring. Check for flags (mirror forces uniform),
reduce the size to half, etc.  Right now it only uses the first n/2 disks
for both read and write.
1996-01-30 22:34:53 +00:00
Andrey A. Chernov e407db3cbc READTOCENTRYS: protect against stack overflow when incorrect data
stored in CD's TOC
1996-01-30 13:15:28 +00:00
Andrey A. Chernov 685a5a0b51 Don't generate EINVAL for data_len too big in READTOCENTRYS, it
reduces automatically to reasonable value in the code below
1996-01-30 12:07:15 +00:00
Andrey A. Chernov bc7805ece3 Fix audio part, especially READTOCENTRYS inspired by NetBSD driver
and my own ideas
1996-01-30 10:31:12 +00:00
David Greenman ab11bf854a Restore my change to the watchdog params that Paul spammed in rev 1.18. 1996-01-30 07:25:44 +00:00
Stefan Eßer dcf289cdb5 Add heuristic to detect multi-function devices that don't announce this
feature in the header type register, though it is required by the PCI spec.
This should correctly probe both functions of the Intel 82371FB chip,
without the need for a special case based on the device ID.
1996-01-30 01:14:29 +00:00
Justin T. Gibbs 4a1e5d799a Finally commit Serge's multicast and "misc other changes" patch. I
don't have a network to test it on here, but it does probe my card okay.

Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
1996-01-29 03:16:14 +00:00
Justin T. Gibbs b18d8f49f2 Another pass through eisaconf. Ioaddrs and Maddrs are link lists now.
The Bt driver is the only one that actually registers multiple addresses.

Probe output is formatted to 80 columns.
1996-01-29 03:13:23 +00:00
Justin T. Gibbs 5327d59536 Performance optimizations. Unroll all bcopies. Use PIO to transfer SCBs
since setting up the DMA is too costly.  Restructure for efficiency.

Pause the sequencer when a parity error occurs so that the kernel driver
knows during which phase the error was encountered.
1996-01-29 03:12:06 +00:00
Garrett Wollman 31c5632840 Decode configuration for the IDE part of the Triton chipset. This
includes a hack in the probe code: the 82371FB is a multifuction
device, but doesn't properly set the configuration bit which
indicates this.  So, we just hard-wire all 82371FBs as multifunction
devices.

This does not actually make the bus-master IDE stuff work, although
if anyone wants to work on that, I have the databooks that tell
how to use it.
1996-01-27 20:14:32 +00:00
Bruce Evans c8f2fe8db8 First attempt at creating devfs entries for sliced devices. Doesn't
quite work yet, so the heart of it is disabled.

Added bdev and cdev args to dsopen().

drivers:
Fixed device names, links, minor numbers and modes.

wd.c:
Started actually supporting devfs.

diskslice.h:
Added devfs tokens to structs (currently 576 of them per disk! :-().

subr_diskslice.c:
Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times.  DEVFS is #undefed at the start so
that this shouldn't cause problems.
1996-01-27 04:18:15 +00:00
Bruce Evans dd87702a51 Allocate DMA bounce buffers only when requested by drivers. Only the
fd and wt drivers need bounce buffers, so this normally saves 32K-1K
of kernel memory.

Keep track of which DMA channels are busy.  isa_dmadone() must now be
called when DMA has finished or been aborted.

Panic for unallocated and too-small (required) bounce buffers.

fd.c:
There will be new warnings about isa_dmadone() not being called after
DMA has been aborted.

sound/dmabuf.c:
isa_dmadone() needs more parameters than are available, so temporarily
use a new interface isa_dmadone_nobounce() to avoid having to worry
about panics for fake parameters.  Untested.
1996-01-27 02:33:48 +00:00
Poul-Henning Kamp 18b7be4064 The last part of the ether_sprint -> %6D change.
Sorry for the delay.
(%D is for hexdumping.)
1996-01-26 09:29:29 +00:00
Stefan Eßer e653d76e96 Add support for multi-function devices. 1996-01-25 18:32:00 +00:00
Andrey A. Chernov 887c00b859 Change RUKEYMAP sligtly 1996-01-25 16:37:20 +00:00
Poul-Henning Kamp e8cbe8fa47 Avoid local sprintfs and other printf'isms. 1996-01-25 07:21:50 +00:00
Poul-Henning Kamp 1ce9bf88c3 Use new printf features rather than local kludges. 1996-01-24 21:12:23 +00:00
Joerg Wunsch 7a8a029a66 Hide the probe warnings behind `bootverbose'. 1996-01-23 22:55:08 +00:00
Stefan Eßer dd7610fca4 Make PCI interrupt handlers return void like everybody else does.
Reviewed by:	davidg
1996-01-23 21:48:28 +00:00
Jordan K. Hubbard f8fbee91ae Newest version of the Matrox Meteor driver. Tested with various MBONE
tools and found to work better with both nv and vic.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1996-01-21 10:26:54 +00:00
Stefan Eßer b23345605d Fix bad typo: > was used instead of >> ...
Submitted by:	Matt Thomas <matt@lkg.dec.com>
1996-01-19 19:03:47 +00:00
Stefan Eßer e66a4e401d Improve PCI probe messages by printing the bus number.
Add missing newline to PCI to PCI bridge message.

Submitted by:	Matt Thomas <matt@lkg.dec.com>
1996-01-19 19:01:19 +00:00
Poul-Henning Kamp 7c145fea92 Use the new & improved printf rather than homegrown kludges.
Proposed by: bde
1996-01-16 18:13:18 +00:00
Poul-Henning Kamp 2898c294f4 Make bin2bcd and bcd2bin global macroes instead of having local
implementations all over the place.
1996-01-15 10:28:44 +00:00
David Greenman ae12cdda30 This driver really is for the Pro/100B and not for the Pro/100 (and in fact
doesn't even work with a Pro/100)...updated to reflect this.
1996-01-15 10:12:41 +00:00