Commit Graph

669 Commits

Author SHA1 Message Date
thorpej 711fc71012 When creating ccbs, be a little more informative about why we couldn't
shoud creation/initialization of a ccb fail.  Also, don't panic in
these situations.  Instead, simply return an error condition and allow
the caller to deal with it.  It may be the case that we were able to
create one ccb what we can grab, and continue to hobble along.
1997-10-28 23:06:21 +00:00
thorpej d1bfbc66c6 Syncronize with changes to aha.c:
Adjust the number of ccbs allocated during initialization.
Every ccb could potentially lock 64k of memory for dma buffers if bounce
buffers are used.  Instead of BHA_CCB_MAX ccbs using 2MByte, only
sc_link.openings ccbs per device are allocated.  Thus we now use only
256KByte per device present.
(hannken)

Fix a couple of errors in bha_create_ccbs():
- Don't ever let the number of CCBs be creater than BHA_CCB_MAX.
- Fix a fencepost that caused the last CCB allocated to never be put
  on the freelist.
(thorpej)
1997-10-28 19:13:36 +00:00
thorpej 1dfae448cd Reply from an INQUIRE DEVICES is a lun map. 1997-10-28 19:08:26 +00:00
thorpej 1bfea0bd23 Fix a couple of errors in aha_create_ccbs():
- Don't ever let the number of CCBs be creater than AHA_CCB_MAX.
- Fix a fencepost that caused the last CCB allocated to never be put
  on the freelist.
1997-10-28 18:40:07 +00:00
bouyer 917389821c Changes to the probe and attach routine:
- at end of attach, explicitely select an existing drive. This fixes hangs
  some users reported (such as the one reported in port-i386/4247).
- Some atapi cdrom drives (e.g. Nec 24x) don't enables their registers before
  a controller reset is issued. The controller probe routine is changed as
  follow: issue a controller reset. If fail, test atapi signature on slave.
  If fail, wait 5s and retry a reset. If the second reset fail, return(0).
  If the first reset succeed, test presence of a master drive:
  atapi signature, and if this fail RO/RW registers test. If no master, test
  atapi signature on slave. If no slave, return 0.
1997-10-27 14:09:23 +00:00
pk 233c534958 Apply patch from Michael L. Hitch (PR#4318):
"A sequence step of 0 after a select with ATN can be a selection
 timeout, or it can also indicate the target did not respond with
 a message out phase.  The latter will occur on very old SCSI
 devices which do not respond to the ATN signal and go directly to
 the command phase".
1997-10-26 16:45:24 +00:00
fvdl 37e4eea4a4 Make 16650 probe optional on COM16650 define. It breaks on some
multiport Startech chips.
1997-10-21 01:25:41 +00:00
is 4a8fcf4aed Dont waste time in delay()s... else we won't finish in time to get our first
lowwatermark interupt for AUDIO_BYPASS data.
1997-10-20 19:07:59 +00:00
is b266316bea Fix pasto in symbolic name for string 1997-10-19 20:46:32 +00:00
christos 7507e6a5e9 Make this compile again. 1997-10-19 20:34:54 +00:00
is eb1b51cac1 tav_write_word -> tav_write_short 1997-10-19 20:21:49 +00:00
mycroft 1bb75c1efa Initialize the IER to 0 in com_attach_subr(). 1997-10-19 20:01:08 +00:00
fvdl ab36c13e4b Add 16650 hardware flowcontrol support. Basically PR 3844 from
Dave Huang <khym@bga.com>, with added check for broken early versions
of the 16650, taken from the Linux driver.

This should be extended to use, for example, higher trigger levels for
the bigger 16650 FIFO, and its capability for using a smaller divisor
and thus higher speeds. But this patch is very useful for 16650 users
already.
1997-10-19 14:26:25 +00:00
fvdl 961e39030d Add 16650 hardware flowcontrol support. Basically PR 3844 from
Dave Huang <khym@bga.com>, with added check for broken early versions
of the 16650, taken from the Linux driver.

This should be extended to use, for example, higher trigger levels for
the bigger 16650 FIFO, and its capability for using a smaller divisor
and thus higher speeds. But this patch is very useful for 16650 users
already.
1997-10-19 14:26:16 +00:00
enami fe0c14e139 Fix typo; hang binary operator at the end of previous line. 1997-10-19 14:10:11 +00:00
enami 5c1050e68f Include locators.h and use symbolic name comes from it. 1997-10-19 14:07:19 +00:00
explorer ebf03fd00c Add hooks for entropy collection. Right now, you must place
options RND_COM
in your kernel config file (along with the
	pseudo-device rnd
line) to enable this.  If results are positive, I will make this enabled
by default.
1997-10-19 11:45:33 +00:00
augustss e7029fc0da Make the audio API (almost) SunOS compatible.
The changes is to allow some limited mixer manipulation through
the audio device (instead of the mixer device).
This rendered 4 methods in audio_hw_if unused so garbage collect these.
1997-10-19 07:41:33 +00:00
is 1083b2ab71 Use long long in bitrate tolerance computation, else we'll overflow for
higher than standard-pc chip clocks.
1997-10-18 23:11:45 +00:00
jonathan 8bb9a1ccb2 Protect #ifdef DEBUG printfs with a run-time teson a patchable variable
(epdebug), as per Jason Thorpe's comments.
1997-10-18 00:15:02 +00:00
gwr b4e346f85d Rename cs_pad to cs_spare1 (for future use by Bill Studenmund). 1997-10-17 23:02:37 +00:00
gwr b69fc1a7cf Move the ttychars() call below the if-not-raw block.
(from Bill Studenmund)
1997-10-17 22:55:09 +00:00
enami 801620373d Define width_names[] only when PCICDEBUG is defined. 1997-10-17 09:37:12 +00:00
matt 54a45a47c8 EN1207 definitions 1997-10-17 09:26:58 +00:00
enami 4eef29b72f No need to cast a generic pointer. 1997-10-17 07:59:39 +00:00
is 11446b9b6e TMS320AV110 (mpeg layer 2 decoder chip) and ZBUS Melody board, which uses it.
No optionboards yet for Melody, only audio driver.
MPEG data types for audio.c
1997-10-16 23:58:10 +00:00
thorpej 5345a8bef9 Pull marc-pcmcia branch down to trunk. 1997-10-16 23:21:46 +00:00
thorpej b3620a0f8d Pull marc-pcmcia branch down to trunk. 1997-10-16 23:18:18 +00:00
enami 12e22025c4 Remove interrupt handler cookie from aic_softc. 1997-10-16 22:57:02 +00:00
matt 9d865fc8f0 Fix a misspelling of slave in a comment. 1997-10-16 15:16:34 +00:00
thorpej 1ccf0984c2 "com" driver files copied by repository copy magick to sys/dev/ic, and
adjusted for their new home.
1997-10-16 00:01:00 +00:00
thorpej 9ba1ceb091 Pulldown from marc-pcmcia branch. 1997-10-15 22:00:10 +00:00
thorpej 2939780605 Garbage-collect some old i386 console stuff that is no longer used, and
add a comment about something to be fixed later.
1997-10-15 21:13:36 +00:00
matt 2a5a426a31 Some changes to get the 21142/21143 to work in 10Mb/s mode. 1997-10-15 18:51:00 +00:00
thorpej b1ba3c5488 Pulldown from marc-pcmcia branch: minor tweaks to make this a completely
bus-independent driver, and garbage collect a few unnecessary things
from the softc.
1997-10-15 16:54:39 +00:00
gwr 44365b6619 Bring back the optimized ether_cmp() that was lost when the
LLADDR() changes went in.  Mainly relevant on the Sun3/50,
where LANCE_REVC_BUG has to be defined.  Tested on sparc.
1997-10-15 16:34:10 +00:00
explorer 66f8a19d70 back out previous change (committed in error) 1997-10-15 06:08:27 +00:00
explorer f9370ddc7a Add and/or update rnd_*() hooks 1997-10-15 05:55:13 +00:00
explorer 1d74fdb6a3 minor formatting change 1997-10-15 05:48:56 +00:00
enami 4321b83ee2 Pull following change from marc-pcmcia branch:
> revision 1.1.2.4
> date: 1997/10/15 01:01:57;  author: enami;  state: Exp;  lines: +10 -8
> Use bus_space_write_1() directly instead of NIC_PUT(), since
> - same io port is accessed by bus_space_read_1() in the same function, and
> - can bypass sc_reg_map[].
1997-10-15 01:15:51 +00:00
thorpej 457454d81f Pull down from marc-pcmcia branch: Common code used by NE2000 and compatible
ethernet cards.
1997-10-14 22:54:09 +00:00
thorpej 768cd3034d Pull down from marc-pcmcia branch:
Add support for power management.
1997-10-14 21:41:00 +00:00
thorpej 10708da893 Pull down from marc-pcmcia branch:
Minor tweaks to deal with PCMCIA differences, and support for power
management.
1997-10-14 21:28:37 +00:00
is 59129515bb Finalize the isa/lpt.c split:
The isa attachment code is in isa/lpt_isa.c now, which attaches to the
already created ic/lpt* files.
You don't need to change your config files, but you need to re-"config" if
using lpt at isa.
XXX The "lpt" device definition should be in sys/conf/files instead, but to
my knowledge, there are some ports which have private copies of lpt, and would
choke on that. No need to make people unhappy 7 days before release branching.
1997-10-14 15:50:15 +00:00
explorer 80513cb5ae o Make usage of /dev/random dependant on
pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
  that this code is derived in part from Ted Tyso's linux code.
1997-10-13 00:46:08 +00:00
mycroft 3081c6f8cf AudioC[A-Z] -> AudioC[a-z]
AudioElinear -> AudioEslinear
1997-10-11 12:43:51 +00:00
mycroft b551325998 AudioElinear -> AudioEslinear 1997-10-11 12:36:04 +00:00
mycroft 2d019e5efd AudioC[A-Z] -> AudioC[a-z] 1997-10-11 11:28:49 +00:00
explorer b5feb41072 Add hooks to insert timing info into the random system 1997-10-10 01:09:03 +00:00
jtc d6ae2cd7fd Fix tipo inherited from old version of TNF copyright template. 1997-10-09 08:03:42 +00:00
jtk 827918e4ab fix warnings when -DAHC_DEBUG 1997-10-09 02:17:36 +00:00
christos 64ff55911c From Enami Tsugutomo: Busify and split the aic6360 driver. 1997-10-06 19:49:17 +00:00
augustss 72251c67c9 Driver for the Interwave audio chip used in the GUS PnP sound card. 1997-10-06 16:03:34 +00:00
thorpej 616e0b7e33 Copyright assigned to The NetBSD Foundation. 1997-10-05 18:26:38 +00:00
gwr 4371d4ef78 Remove the while loop from zsc_intr_hard(). It caused problems on
some machines, and those that really want to can just call this
function in a loop until it returns zero.
1997-10-04 22:30:30 +00:00
mhitch d2f48f6b3e Add yet another chip variant: FAS216, used by the amiga Phase5 SCSI boards. 1997-10-04 03:59:00 +00:00
enami 7376003aeb Cosmetic change; delete one space character. 1997-10-03 16:40:35 +00:00
mikel 20cf0e1cc1 fix missing com_kgdb_attached() argdecl, from Michael C. Richardson in PR 4196 1997-10-03 06:11:35 +00:00
christos a2512e8ec5 Add TIOCM{BI{C,S},{S,G}ET} from revision 1.98. As Charles says these
interfaces are slightly broken and should be obsoleted, but some programs
are using them and also they are useful for debugging.
1997-09-30 21:51:43 +00:00
chuck d3a7613827 midway update:
[1] add EN_ENIDMAFIX - the byte-aligner on the ENI version of the card
	appears to lose under heavy load so avoid using it.  see comment
	in midway.c for full details.

	note that the Adaptec version of the card works properly under
	load.

	detected by Kenjiro Cho <kjc@csl.sony.co.jp> [confirmed by chuck]
	fix by chuck & kjc

[2] update some freebsd specific code [from kjc]

[3] for circular buffers: ensure there is always one free slot so
	that we can easily tell the difference between a full and
	empty list.   re-structure a few loops to reflect this.
	fixes a problem with mbufs being free'd while still in DMA,
	and makes drive a bit more robust.

	detected and fixed by kjc
1997-09-29 17:40:38 +00:00
mjacob 6716542383 A little cleanup and print more error messages. 1997-09-29 01:41:30 +00:00
is 3ad599d701 First part of splitting lpt.c, and the NetBSD/Amiga "supio" frontend. Needs
a bit more work to allow an ISA frontend.
1997-09-27 22:44:11 +00:00
bouyer a2f2e87677 Return the rigth value in the interrupt handler. This change the semantic
of wdc_atapi_intr, so we check for ITSDONE rather than the return value for
a pooled command.
1997-09-24 17:00:55 +00:00
enami 82625dc61e Cosmetic Changes; make coding style closer to other part of this file.
(This version is identical with version 1.109 except whitespace changes.)
1997-09-19 01:17:37 +00:00
is 718fb97e11 Support for the upcoming NetBSD/Amiga Hypercom driver family:
* support chip clocks != COM_FREQ, by introducing sc_frequency (for the
  mainline code) and adding a frequency parameter right after the rate
  parameter to comcnattach() and com_kgdb_attach().
- Make com_isa and com_multi initialize sc_frequency to COM_FREQ.
- Make i386/machdep.c and alpha/dec_xxx.c call com*attach() with the freq.
  parameter.
* supio_attach_args get two more fields: a sc_ipl and a sc_arg, both ints.
- com_supio uses the first for interupt establishment (all childs will, as
  soon as they exist) and the 2nd for sc_frequency.
- drsupio passes sc_ipl alway as 5, and for the "com"s, sc_arg as 16*115200
- hyper will pass sc_ipl as 6, and sc_arg as 16 * 460800
1997-09-16 20:34:23 +00:00
mjacob f762783999 Wierd- well, what isn't with devices? Anyway, the type code for the ISP
chip on AlphaStation 500 is 2- which wasn't handled, and bad things happened
because the default case wasn't sane. Both are corrected now.
1997-09-13 05:18:30 +00:00
mjacob acd1b90617 Some formatting cleanup, and for the ISP2100, the flags hadn't being set
quite right, but things worked okay anyhow.
1997-09-10 02:18:19 +00:00
mjacob 3772f94daf (for the 2100) The flags weren't set in the right place, but things worked
anyway. Wierd. Also, a bit of cleanup.
1997-09-10 02:17:22 +00:00
mycroft fa0b187898 Make `hashkey' unsigned. 1997-09-09 18:56:15 +00:00
scottr 1acea33632 Fix a couple of field references missed during the scsipi merge. 1997-09-05 17:57:19 +00:00
bouyer 702b60b0c1 Add a map to wdc_softc to track the already known devices to prevent them to
be probed several times. This fixes the "ATAPI CD probed as wd drive" problem.
Thanks to Geoff Wing <mason@primenet.com.au> for testing this on his hardware.
1997-09-03 07:57:51 +00:00
mikel 06ecebc8c0 add missing argument to LPRINTF() declaration; from Geoff Wing in PR 4072.
I also made inclusion of LPRINTF() dependent solely on the symbol
  LPTDEBUG, initialized lptdebug variable to 0 instead of 1, and
  matched arguments to format strings in LPRINTF() calls.
1997-09-02 01:37:19 +00:00
thorpej e531f18c8b Pull the SMC91Cxx single-chip Ethernet driver core down from the marc-pcmcia
branch.  It is also needed by and ISA front-end.
1997-09-02 00:10:55 +00:00
pk d4afe94f7c Finish work-around for the re-select bug on ESP100s by dealing with
"illegal command" interrupt apparently caused by writing to the chip
while a re-selection is in progress.
1997-08-31 23:09:58 +00:00
bouyer 9f3695bff9 Change an ATAPI_DEBUG2->ATAPI_DEBUG. This debug message is needed when
looking what's the autoconfig do on strange harware, and ATAPI_DEBUG2 is
for debuging data transfers (and is really verbose once the machine has booted
from an IDE disk).
1997-08-28 11:05:01 +00:00
augustss a79408b6c7 Change match routine to use "audio" as the ROM name. 1997-08-27 22:42:23 +00:00
augustss c58d387b0f Fix prototype for amd7930_set_params. 1997-08-27 22:33:59 +00:00
is 25c05417ed Make this work with __GENERIC_SOFT_INTERRUPTS. 1997-08-27 18:00:13 +00:00
bouyer 6f3bab1f59 Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
1997-08-27 11:22:52 +00:00
augustss 6616d47838 - Change audio_hw_if a little: set_param now sets the play and record modes
at the same time instead by using two different calls.  This enables
  it to check more easily if the combined mode is all right.
- Improve the error checking in audio.c.
- Add a new audio property, AUDIO_PROP_INDEPENDENT, show if the
  play and record settings are independent.
- Fix some buglets in audio.c.
1997-08-24 22:31:23 +00:00
scottr 27f30774af Conditionalize DEBUG printf on dp8390_debug. Pointed out by Jonathan
Stone.
1997-08-24 15:22:28 +00:00
drochner 8188be767e Check for KGDB port == console port in a consistent way. 1997-08-24 09:40:16 +00:00
drochner d36e668737 clean up the serial console / KGDB attachment:
-put all early console / KGDB initialization into 1 exported function
  (com_*_attach()) each, dont use global variables anymore
-use the passed tcflag_t for port settings instead of hardwiring 8N1
-at autoconfiguration attach time, decide if the attaching device is
  already console / KGDB by comparing bus tag and base addr (cgd's wish)
-export a function "com_is_console()" for use by driver frontends for
  this comparision
-delay setting of cn_tab->cn_dev until autoconfiguration attach
  to get the minor number right
-delete unused comcnprobe() and comcninit()
1997-08-23 14:01:32 +00:00
augustss 332ad95e76 Change the MI audio driver so it attaches to the MD driver in the
normal way.  This requires adding a line to the config files to
get audio to work again.
1997-08-19 23:49:33 +00:00
drochner 570688abef Bring back the "comconsattached" flag. It is necessary for starred
com devices (on non "__BROKEN_INDIRECT_CONFIG" ISA).
1997-08-16 08:33:08 +00:00
mjacob 50d4bdf35c Merge foo. 1997-08-16 00:56:52 +00:00
mjacob 14a7730c16 *Major* differences to support the Qlogic 2100 (Fibre Channel PCI), as well
as being able to do microdifferentiation of the ISP SCSI chip; a couple of
bug fixes, and the beginnings of some watchdog support.
1997-08-16 00:22:11 +00:00
mjacob 7540ed1699 Differences necessary to support the Qlogic 2100 (Fibre Channel PCI
Card)
1997-08-16 00:20:28 +00:00
mjacob 49d40727ff Defines and structures necessary to support the Qlogic 2100 (Fibre Channel
PCI card); Some additional defines to try and manage various flavors of
the SCSI host adapters (parameters for various SYNC modes).
1997-08-16 00:18:36 +00:00
mjacob 2c7696de16 Additional defines and structures necessary to support the Qlogic ISP 2100
Fibre Channel PCI card.
1997-08-16 00:16:40 +00:00
drochner b426bd9be3 -Export variables needed for system console initialization.
-Enable line break interrupt for DDB on a serial console.
-Share initialization code between DDB and KGDB.
1997-08-14 16:15:15 +00:00
drochner d5998780c0 KGDB improvements:
-Separate KGDB port initialization and softc related stuff to allow
 KGDB to be attached in early system startup, before autoconfiguration.
-Export the variables needed by md code to hand-craft bus tag/handle.
-Fix initialization to enable interrupt by line break.
-Call DDB/KGDB at line break (move DDB call from the softirq handler
 to the hard handler because it should work without a tty attached too).
1997-08-12 17:25:43 +00:00
scottr 6b1b87f213 spltty() does not drop the SPL; use splx() instead. 1997-08-07 19:22:45 +00:00
fair 623ad5f899 trivial change for PR#3815 1997-08-04 08:16:49 +00:00
pk cf02802b04 Add `nop' commands to chain with the `xmit's. 1997-08-01 20:33:03 +00:00
pk 4fea3b463a Provide an alternative method of transmitting frames that avoids sending
a command to the 82586 for every frame to be transmitted. Instead, a
single command sets off the execution of a chain of commands consisting
of alternate XMITs and NO-OPs, where the link fields in the NO-OPs are
set to loop back onto themselves until the next XMIT is ready to go.
This trick found on a Linux WEB page.

All this induces reasonable transmission performance in my old multibus
adapter. The receiver performance is still abysmal..
1997-08-01 20:04:40 +00:00
augustss 658656bb99 Audio changes:
- Change the way attach and open works to allow multiple audio
	  devices.
	- Split the mulaw.c file into two to avoid dragging in mulaw
	  convertsion when they are not needed.  Add 16 bit alaw/mulaw tables.
	- Change the way audio properties are gotten.
	- Recognize more versions os SoundBlaster.
1997-07-31 22:33:08 +00:00
matt f80c1355fe The bus-independent parts needed to support the DEC
EtherWORKS III cards (LEMAC): the DE203/DE204/DE205
1997-07-31 21:54:58 +00:00
jonathan 2f459bf1d8 Initialize local variable 'j' in eeprombusy() to pacify gcc -O (not -O2)
on i386.
1997-07-30 18:26:23 +00:00
pk c589871dc6 Arrange to turn off future sync-mode negotiation after experiencing a
timeout while in a data phase.

Replace XS_STUFFUP with XS_TIMEOUT, so we get a second chance after
recovering.
1997-07-30 12:01:53 +00:00