* 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.
- "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.
* 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.
- 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
- 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.
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.
* 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.
* 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.
* 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.
control any more, and the speed of changing DTR isn't really an issue. Also,
the old code created a bug where zsparam() might have failed to set some
registers.
Change the interface to zs_hwiflow(); just have it use zst_rx_blocked.
Make zs_modem() a tiny bit faster.
Do RTS updates immediately; do not allow them to be held.
Stop output as fast as possible when DCD is deasserted.
Do *not* automatically drop DTR when DCD is deasserted.
Only check for rr0 bits that we care about (DTR and DCD).
Make sure we turn on DTR and/or RTS as appropriate during open.
Rearrange close sequence so the tty is flushed before turning off interrupts.
Deal with `softcar' and the console device by silently asserting CLOCAL and
|HUPCL, as in com driver.
Do *not* fiddle with DTR when changing the line speed.
Make sure we update the tty's carrier status when CLOCAL or MDMBUF is changed.
Only change rr1 when we actually need to turn on or off TIE.
things happen if we are the console.
Restore to the prevoius value (not to hardwired 8N1) because this
could be set by the serial console initialization.
Closed PR kern/4373 (Dave Huang)
in the ISR (from the ISA "ed" driver's generic 8390 probe routine).
Also, add a big comment describing exactly what we're checking when
probing for the dp8390 (also lifted from the ISA "ed" driver).
The RST check should help weed-out non-matches before they get to the
fairly invasive memory check.
should creation/initialization of a mscp 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 mscp what we can grab, and continue to hobble along.
Also, fix the mscp freelist fencepost error, similar to aha.c and bha.c
should 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.
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.
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)
- 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.
"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".
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.
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.
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.
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.
> 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[].
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.
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.
[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
* 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
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.
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.
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).
(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.
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.
-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()
-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).
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..
- 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.
- It is now possible to handle devices that want "looping" DMA,
e.g. the SoundBlaster correctly. The WSS and SB drivers use this.
To do this several new methods were introduced in audio_hw_if.
- Different silence handling (forced by previous change).
- The audio driver can now be mmap()-ed, but due to problems in
the VM system only for writing for now.
- The OSS (Linux) audio emulation takes advantage of some of the
new features.
zero. We use this later when the COMPLETE message comes in to set the
final residual count to zero. The flag is reset if the target resumes
a data phase. This obsoletes the `AUTOSAVE' quirk (for this driver).
Also, avoid overwriting the residual count if a SENSE was appended to
the current transaction.
'inline' as well as static. mark prototypes for static inline functions
as possibly unused (with __attribute__ ((unused))), to avoid generating
warnings when compiling without optimization but with most ports'
default warning flags. Clean up prototype list spacing, and make it more
consistent.
connect to their 1-wire bus like the DS2404 "EconoRAM Time Chip"
- and -
* Interface function definitions for this kind of chips. Currently only
low-level byte_read and _write, implenented as inline functions.
This functions take a struct ds_handle * (also defined here), which contains
pointers to bit-read/write and reset functions.
Eventually, prototypes for memory-access functions should go here, and the
1-wire bus should be made a BSD auto-configuration bus.
(a) The interrupt is a RESEL interrupt, and
(b) our state is SELECTING.
This condition can occur in perfectly normal operation if we are using
DMA to select the target and we are interrupted by another target
reselecting us. Per discussion with Paul Krannenburg.
Every ccb locks 64k of memory for dma buffers.
Instead of AHA_CCB_MAX ccbs using 1MByte only sc_link.openings ccbs
per device are allocated. Thus we now use only 128KByte per device present.
clock rate for this board on Alpha/PCI systems. Under x86/PCI, the
board f/w will correctly tell you "I'm running at 60Mhz", so the code
that preserved that across a board reset (which would drop the chip
back to 40Mhz) worked fine. On the 8200, the chip was saying "I'm 40Mhz"-
which wasn't true. This turned out to be okay as long as you didn't have
any FAST or UltraFast targets- In fact, setting the chip to 40Mhz allowed
you to run up to 8Mhz SCSI. Unfortunately you die bigtime on the devices
that go faster than that. The fix here is to only use what the chip tells
you the clock rate is in the cases you don't really know (sbus is the
only case where this could be different, although with 66Mhz PCI coming up,
this may change).
(1) fix a printf format (%x to print int, not %lx).
(2) fix probe of 4th chip/16th channel (used to tell whether or not the
board is a 16- or 32-port board) by removing an incorrect offset so
that the code matched its comments. (!!!)
(3) fix storage of chip number in per-channel structure so that it actually
stores the chip number, rather than the chip offset. This allows the
driver to work with more than the first four channels (i.e. with chips
other than chip number 0, which happens to have an offset of zero). (!!!)
MESSAGE_REJECT in response to SDTR or WDTR. Because of this, the
printfs that indicate refusal of sync/wide negotiation are unneeded
in normal operation. In the __NetBSD__ case, disable them by default.
They, like the other extra-verbose ahc driver boot messages, may be
reenabled with "options DEBUG". The behavior in the !__NetBSD__ case
is unchanged.
Set the encoding parameters slightly differently.
Remove the SW encoding/decodinf functions from this interface
and move them to the audio_parameter struct; this is both more efficient
and flexible.