Commit Graph

681 Commits

Author SHA1 Message Date
drochner
94343e637a define offsets into "register window" instead of absolute ISA addresses
for better use in a bus-ified environment
1998-01-19 11:38:00 +00:00
drochner
2562f77567 Don't define absolute ISA addresses here but offsets into the
"controller window".
1998-01-18 14:41:37 +00:00
pk
94072e56f6 Move "async command" state in here. 1998-01-15 16:08:32 +00:00
pk
47505a3b6f Elaborate on "receiver not ready" conditions; we don't need a full reset
in most cases.

Move "async command" state into the softc structure.
1998-01-15 16:07:34 +00:00
cgd
24972c51a4 #include a just-added scsipi header. 1998-01-15 02:23:43 +00:00
cgd
8540a31ee3 kill a couple of unnecessary #ifs 1998-01-15 01:26:13 +00:00
cgd
aaede4d8d8 Various cleanups and bug fixes to the wdc/wd code:
* Fix bug in wdc that would overflow ATAPI transfer length.
* Improve wdc probe code so that 'wdc' is probed in if present
  even if there are no drives attached, and so that it works
  properly even if the only device is an ATAPI slave.
* bus_space-ify.
* split the ISA attachment from the wdc driver, and remove
  ISA dependencies from non-ISA files.
* claim that wd and wdc are now machine-independent (probably not
  completely true, but mostly so; they at least work on arm32 and
  i386).
* Various other minor fixups and cleanups, some of which were pointed
  out by Kazuki Sakamoto.
1998-01-14 23:41:59 +00:00
enami
4b62270f85 Don't include <machine/pio.h> and <dev/isa/isavar.h>. Instead,
include <machine/bus.h> directly.
1998-01-13 03:31:42 +00:00
thorpej
1adb4489a6 Update for changes to config. 1998-01-12 20:23:38 +00:00
thorpej
06ce220790 Update for config changes. 1998-01-12 09:39:57 +00:00
thorpej
095c4c092d Adjust for config changes. 1998-01-12 09:23:08 +00:00
pk
69487f1532 * Fix a train-load of bugs, mostly present in one of these categories:
- "out of resource" errors cause receive buffer chain corruption
	- resets can confuse the interrupt handler
	- multi-cast setup causes receive buffer chain corruption
	- shared memory setup incomplete

* Enhance effiency by avoiding unnecessary shared memory access,
  improved handling of receive frame & buffer descriptors, and
  introducing an `asynchronous' option when issuing 82586 commands.

* Exclusively use offsets relative to the bus handle representing the shared
  memory area to formulate accesses to the chip's data-structures.  The
  front-ends provide glue functions that cater to the chip's endian-
  sensitivity, to perform the actual device access (note: single-byte
  accesses are done here using `bus_space_{read,write}_1()').
  This concludes the transformation into a bus-independent driver module.
1998-01-10 02:35:31 +00:00
pk
f041e52c7e * Rename a bunch of chip definitions for consistency.
* Abolish C structures to access chip data-structures; instead use macros
  that take indices and offsets relative to the bus handle representing
  the chip's resources.

* Include the old version of this file wholesale, until all drivers
  have been updated to use the MI 82586 code.
1998-01-10 01:46:32 +00:00
mikel
c0d8293951 fix some typos in error messages & comments 1998-01-07 08:47:54 +00:00
perry
8a98e23a48 RCSID Police. 1998-01-06 04:55:52 +00:00
perry
fff05a68ab RCSID Police. 1998-01-05 07:31:05 +00:00
fvdl
ffb3eaa5ea Add extra delay after wdcreset() call in wdcprobe. Needed by at least
one controller, where registers otherwise will still be inaccesible
(even though the busy bit has been reset), making the probe fail.
1997-12-24 02:01:00 +00:00
mycroft
f1170022ce Don't do anything in comparam() if the line speed and flags are the same. 1997-12-16 22:52:37 +00:00
pk
a8c268918b Changes from Rafal Boni to accommodate ISA driver front-ends. 1997-12-13 21:18:01 +00:00
scottr
dc89550a55 Fix typo in a trace message expression. 1997-12-12 22:44:26 +00:00
thorpej
0ac93f48ea Use malloc()/free(), not geteblk()/brelse(), for the device buffer. 1997-12-07 16:09:36 +00:00
chuck
d76941843e fix mixer code that was clearly untested:
- allow get/set of enums SUNAUDIO_SOURCE and SUNAUDIO_OUTPUT rather
	than returning EINVAL
 - add missing SUNAUDIO_MONITOR_CLASS case in query_devinfo
 - convert SUNAUDIO_MONITOR case from a MIXER_CLASS to a MIXER_VALUE
	like it is supposed to be
 - the labels for outputs/record class were swapped: fix it

this patch allows "mixerctl" to work properly on a sparc
1997-12-06 03:20:56 +00:00
mjacob
5ff1a34bba Add a new async notification, and also fix a bug where the queue entry
wasn't getting fully zeroed as it should be.
1997-12-05 19:41:49 +00:00
mjacob
62ac2ff851 new async code defined 1997-12-05 19:40:35 +00:00
pk
39879b883e Use a 1-character queue so polled console output can be deferred if
regular I/O has been scheduled.
1997-11-12 22:17:07 +00:00
bouyer
f7c6e141e6 Various bug fixes for atapi part:
- clean up debug code
- Don't check ATAPI signature when probing ATA drives, ATAPI devices were
  detected before
- Reset controller after disks probes. The probe, with some combinations of
  ATA/ATAPI device keep it in a mostly working, but strange state (with busy
  led on)
- The WDCF_IRQ_WAIT flag is now cleared by wdc_ata_intr and wdc_atapi_intr
  when appropriate (helps recover from failure conditions)
- In wdcunwedge, send ATAPI_SOFT_RESET to non-ata drives
  (helps recover from failure conditions)
- in wdctimeout be a bit more verbose when we missed an interrupt
- Always Increment xfer->c_skip where it should be
- Set the ITSDONE flag when a polled command completed.
1997-11-05 22:19:07 +00:00
thorpej
1713a9fb07 is790 u_char -> int. 1997-11-05 07:15:42 +00:00
thorpej
03a0c2d900 Implement a simple queueing mechanism that makes these drivers much
more robust in resource shortage situations, basically identical to
code I added to the "ahc" driver some time ago.

Thanks to Brad Spencer for the testing help.
1997-11-04 05:58:22 +00:00
mycroft
47c2d7502f Actually use TIOCFLAG_CDTRCTS. 1997-11-03 16:30:54 +00:00
mycroft
0e16ca013b Always leave DCD_IE and CTS_IE on for now. Needs more work in zsparam() to
make the optimization actually work right.
1997-11-03 16:15:47 +00:00
mycroft
37e260f4a6 Leave the console running with or without DDB. 1997-11-03 15:35:42 +00:00
mycroft
13e9b38191 Slight optimization in soft input routine. 1997-11-03 08:20:35 +00:00
mycroft
ce29cdf2e7 Set the ring size back to 2k. 1997-11-03 06:56:28 +00:00
mycroft
9b9cce6084 Mostly cosmetic and performance changes:
* Make the ring buffer size and water marks patchable, and allocate the buffer
  separately.
* Do the ttymalloc() at attach time.
* Reorganize the receive buffer so the status and data pair are next to each
  other.  This is slightly faster.
* Make sure we actually do turn off interrupts in comclose() if we have DDB
  configured and it's not the console.  (D'oh!!!!)
* When we exhaust the current transmit run, turn off transmit interrupts in
  comintr(), so we're fairly sure we don't get another one.
* Nuke the silly lsrmap[] idea; it's slower in the normal case.
* Cache the l_rint pointer in the soft interrupt routine.
1997-11-03 06:55:54 +00:00
mycroft
7d7ecb9200 Bug fixes:
* Carrier detect (TS_CARR_ON) is based on the actual DCD bit, even if it's
  being ignored.
* Set TS_WOPEN early on in zsopen().
* Don't disable interrupts on the console during close if we have DDB.

Inert changes:
* Don't handle ZS_HWFLAG_NO_DCD here; the frontend does it.
* Deprecate `register'.
* Use SET(), CLR(), and ISSET().

More performance changes:
* Rototill receive handling; use a backpressure mechanism to prevent livelock.
* Output silo/ibuf overflow warnings at most once per minute, from a callout.
* When we exhaust the current transmit run, turn off transmit interrupts in
  zstty_txint(), so we're fairly sure we don't get another one.
1997-11-03 06:16:43 +00:00
mycroft
067898abb8 Mostly cosmetic and performance changes:
* Make the ring buffer size and water marks patchable, and allocate the buffer
  separately.
* Do the ttymalloc() at attach time.
* Reorganize the receive buffer so the status and data pair are next to each
  other.  This is slightly faster.
* Make sure we actually do turn off interrupts in comclose() if we have DDB
  configured and it's not the console.  (D'oh!!!!)
* When we exhaust the current transmit run, turn off transmit interrupts in
  comintr(), so we're fairly sure we don't get another one.
* Nuke the silly lsrmap[] idea; it's slower in the normal case.
* Cache the l_rint pointer in the soft interrupt routine.
1997-11-03 06:12:02 +00:00
gwr
762cc5a0fc Fix serial console support (did not turn on CLOCAL). 1997-11-03 04:34:18 +00:00
thorpej
e7044069f6 Fix a think'o in ifmedia initialization. 1997-11-03 00:19:41 +00:00
mycroft
61bf289f3e Slight code rearrangement. 1997-11-02 09:31:49 +00:00
mycroft
acb27fb42a Slight code rearrangement. 1997-11-02 09:24:51 +00:00
mycroft
5869b743c7 Rearrange *param() slightly to eliminate a spl.
Also fix another comment regarding DTR.
1997-11-02 09:15:41 +00:00
mycroft
76b7dd52df Add another splserial()/splzs(). 1997-11-02 08:55:52 +00:00
mycroft
acd97c6676 Minimize some spl regions slightly. 1997-11-02 08:50:31 +00:00
mycroft
8914537568 If we lose HFC, assert RTS. 1997-11-02 08:29:51 +00:00
mycroft
b000ee5105 Set the state of DCD_IE and CTS_IE based on what's in rr0_mask. 1997-11-02 08:02:40 +00:00
scottr
c35524f0a1 Fix a serious problem in dp8390_write_mbuf(), noticed by Jason Thorpe:
after we've written out the contents of the mbuf, increment the transmit
buffer offset by m->m_len.
1997-11-02 06:18:27 +00:00
thorpej
7438e6c882 Adjust for ifmedia-related changes to dp8390 driver. 1997-11-02 00:25:11 +00:00
thorpej
18636a8934 Add ifmedia support via callbacks to the front-end. 1997-11-02 00:23:54 +00:00
mycroft
74df2cee60 Correct a comment regarding our behaviour with DTR. 1997-11-01 20:40:36 +00:00
mycroft
d0df1f96f4 Add additional splserial()s in comopen() and comclose(). These are not
necessary on the i386 port, but may be on others.
1997-11-01 20:31:57 +00:00