Commit Graph

1298 Commits

Author SHA1 Message Date
mjacob 7f137a35ff add a few missing mbox commands 1999-05-12 16:45:58 +00:00
thorpej 9c5ccdf883 Don't count deferrals as output errors. It's only a (single) output error
if an excessive number of deferrals causes the transmission to abort.
1999-05-12 15:33:29 +00:00
thorpej 1a1efc6b68 In lance_mediachange(), if there is no callback to the front-end, just
return 0 instead of EINVAL.  In this case, there will only be one media
type, and the upper-level if_media code will ensure that the user is setting
to that type.

In other words, don't require the front-end to provide the no-op.
1999-04-30 18:15:04 +00:00
bad 8fb6c6124b From Onno van der Linden:
Reorganise the driver some what.
Rename tr_reset() to the more appropriate tr_stop().
Create a common tropic reset routine and use it in the frontends.
Move the code in tr_config() which is only used in the card attachment
routines into a new tr_attach() function.
Take adapter off the ring through tr_shutdown() in a shutdown hook.
This simplifies the bus-specific frontend.
1999-04-29 15:47:02 +00:00
jonathan 5847397a4d Add EEPROM_SSI EEPROM field (hardware revision-level info). 1999-04-28 22:47:44 +00:00
dean 188c3f6ae5 Fix for PR kern/7483: ex driver gets bogus MAC address with 3c905B 1999-04-28 17:34:01 +00:00
thorpej 82f0525910 Make the 3Com Etherlink XL driver work on big-endian systems. From
Izumi Tsutsui, PR #7279.
1999-04-26 23:28:31 +00:00
pk c3f1aa0d3e Don't send any data upstream if we're not open yet. 1999-04-22 20:37:37 +00:00
pk d93e27676e Remove splbio()/splserial(), which should not try to protect bus_dma*(9)
internals.
1999-04-20 20:21:04 +00:00
jonathan 055b827e11 Calling DELAY() during polling for command completion of the normal
per-packet discard of every received packet increases latency and
decrease throughput.  INstead, Spin on S_COMMAND_IN_PROGESS for enough
iterations as the expected time to completion.  Only do DELAY()/poll
loops (as suggested by Jason Thorpe) if spinning fails.
Take PCI as fastest case and compute worst-case estimate.

Shorten DELAY() in S_COMMAND_COMPLETE polling-loop up 10, loop-count
down.  to speed up epreset() completion (m/c filter change, ifup/ipdown, etc).
1999-04-20 04:40:24 +00:00
jonathan 07c7535688 * Make doubly sure that the ep shutdownhooks are run at splnet() or above.
* Clear the `enabled' bit in the softc so late hardware interrupts
  (e.g., just after the full reset) done as part of shutdown) are dropped.
* Eliminate loops that  poll forever on S_COMMAND_IN_PROGRESS to complete.
  Add inline function with bounded loopcount plus small delay, to avoid
  bugs in EISA hardware which never sets S_COMMAND_IN_PROGRESS.
  Use for both TX_RESET/RX_RESET/GLOBAL_RESET cmds, and polling for
  discard-Rx completion
1999-04-19 23:26:48 +00:00
ross 4b0326d939 Get rid of delay() in com_common_putc() because the Shark delay() is borked
and can't be called until after the timers are setup. (It should not use
a timer, or it should have a fallback algorithm.)
1999-04-19 19:27:31 +00:00
thorpej 552465011e Revert revision 1.159. The correct answer was not to re-break the
serial console support, but rather to fix the Shark delay().
1999-04-18 22:02:47 +00:00
pk cd6eaa20b1 Print register contents before we modify it. 1999-04-16 13:35:41 +00:00
mjl 6224c1beda Correct wrong board IDs (used ID definition from FreeBSD) 1999-04-15 23:51:44 +00:00
jonathan 0028097812 Fix ex_read_eeprom() for 3c57x. 1999-04-13 23:07:25 +00:00
jonathan 2bf9a70e67 Endian-ness bugfix for elink3 on big-endian hosts.
Big-endian CPUs should use bus_space_{read,write}_multi_stream methods
  to PIO packet data to NIC in 16-bit or 32-bit chunks.
  Make it so.
  Since we don't have stream methods on all ports yet (esp. i386), use
  the bus_space_{read,write}_multi methods if the compile-time
  stream-method feature-test   macro is not set.
Originally from tsubai@netbsd.org, via HAYAKAWA koichi's cardbus patches.
1999-04-13 20:23:52 +00:00
pk b13e5d1469 Quote "AS IS" as in the majority of Carnegy Mellon notices. 1999-04-12 20:38:17 +00:00
bouyer 503de51fdd Fix probe code for IDE devices:
- Don't rely on ATA signature: some ide controllers seems to not transmit it
  properly (SIMIDE on arm32 machines). Instead, when we guess a drive is here
  after reset, just mark it as ATA and OLD is it's not ATAPI.
- at attach time, use IDENTIFY to eliminate ghost from the probe. If the
  drive had the old flag and IDENTIFY failed, issue a WDCC_RECAL command
  to detect a pre-ATA disk. If IDENTIFY succeded, remove the OLD flag,
  it's obviously not a pre-ATA disk.
- add a new controller flag, WDC_CAPABILITY_PREATA, used to shorcut parts
  of the probe (not necessary, but makes the probe/attach faster). This is
  only set by the ISA front-end, all other controllers supported can't have
  pre-ATA drives attached.
The mechanism used are more or less the same as before, they have just been
reordered. Should solve port-arm32/7324 (waiting for feedback).
1999-04-11 20:50:28 +00:00
drochner 2a614bc836 add support for 80x40 screens 1999-04-10 14:02:11 +00:00
dbj 4397d4c1fd convert tabs to spaces in ascii art circuit diagram 1999-04-07 10:21:31 +00:00
pk c40eb1cd97 Fix a pasto in copyright text which has been procreating like rabbits.. 1999-04-06 20:09:18 +00:00
mjacob 2b311c7218 roll internal revs 1999-04-04 02:29:51 +00:00
mjacob a529f8f3b4 firmware revision now a triple 1999-04-04 02:29:34 +00:00
mjacob cd0cf2b5ca Make firmware revision a triple. Clean up some FC init stuff for
board versions with no BIOS. Separate mailbox interrupts from
IOCB interrupts. Read OUTMAILBOX5 while RISC_INT is active- not
after you clear it (potential race condition). Clear out older broken
BIG_ENDIAN goop. Don't negotiate narrow/async for LVD busses at startup
if already in LVD mode. Note usage of presumptive 1040C revision. For
all the LIP, PDB Changed, Loop UP/DOWN async events, mark fw state
as unknown as well as marking the need to do a getpdb on targets- after
a LIP for certain the f/w has to do PRLI/PLOGI for all targets again
and marking f/w state as unknown gives us a fighting chance to (start
to) hold up for that to complete.
1999-04-04 02:28:53 +00:00
mjacob 0fc69df287 Remove incorrect BIG_ENDIAN defines and substitute in the SBus only macros
that will SBusify an isp header or the lun/target portions of a request IOCB-
and have these only valid iff __sparc__ (no non-sparc SBus machine that *I*
know about).
1999-04-04 01:32:44 +00:00
mjacob b7406cc163 Change f/w revision to major,minor,micro version. Add in ISP1040C definition. 1999-04-04 01:27:06 +00:00
scw 9737cf763a Fix a problem where no Tx Empty interrupt ever happened if CTS
was deasserted and we wanted to change parameters to -crtscts
This effectively stalled the transmitter since with TS_BUSY set
we only change parameters during the Tx interrupt handler.
1999-04-03 13:13:19 +00:00
bouyer b43b844f6f - change the interrupt routines to take a 3rd arguments, set to 1 if we
are called from the interrupt or timeout handler, 0 otherwise.
- use this to know if we can busy-wait for wait_for_unbusy or wait_for_ready
This fixes a bug where CDs withot the DRQ_INTR capability would not busy-wait
for the CMDOUT phase.
While I'm there change 2 delay() to DELAY() for consistency, and
garbage-collect some old code from wdcintr() which has been ifdef'd out
for some time now.
1999-04-01 21:46:28 +00:00
drochner 00a4d0521a use defopted WSCONS_SUPPORT_PCVTFONTS, refuse to load pcvt fonts if this
option is not given, suppress complaints in non-debug case
1999-04-01 11:52:42 +00:00
mrg 833fb0ac7f back date this file to version 1.155 which works on the shark. 1999-03-31 12:44:04 +00:00
bouyer bb47e5aecf Increase some DELAY(), this seems required on some hardware (I'm not sure if
the hardware is at fault, or if DELAY(1) waits for less than 1us).
Improve debuging messages for wdcreset_wait().
1999-03-31 11:18:31 +00:00
perry d5a261206d Replace the #ifdef'ed variable DELAYs with a pair of non-ifdefed
DELAY(1)'s. This should fix interrupt driven lpt driver hang and
reboot problems for the group of users who have experienced them, and
shouldn't hurt anyone else.
1999-03-29 21:50:06 +00:00
mycroft f487bc59aa Nuke bogus extra variable, too. 1999-03-29 13:40:41 +00:00
mycroft 85ad0d175c Fix bogons in previous change:
* The fact that IIR_NOPEND was not set on entry does *not* mean that no
  transmission was in progress.  Besides, we don't want to throw away receive
  interrupts either.
* In the !clearirq case, we didn't splx().
1999-03-29 13:21:15 +00:00
fvdl d58a5af79d Fix multicast hashing function. PR 7274, from Izumi Tsutsui 1999-03-29 11:11:34 +00:00
ross 6a228da053 Mods to com_common_putc(). When doing kprintf() or kgdb output:
1. don't clear the irq unless it was clear before transmitting
2. also do various bus_space_barrier() ops
Stops console from freezing when kprintf interrupts tty driver output.
1999-03-29 10:01:39 +00:00
bouyer ad69d389ab Remove the hack to attach devices responding with ATA signatures as atapi if
IDENTIFY said so: it doesn't help for the drive this was supposed helping,
and seems to break another device.
In interrupt routine, don't return 0 if we are polling: this should fix the
"panic: wdc_exec_command: polled command not done" some people reported
(kern/7269).
1999-03-29 08:32:02 +00:00
wrstuden df93e67c02 PPS support. Copied off of com.c support, with changes as DCD interupts
are only enabled if needed and if ok'd by MD layer.
1999-03-27 01:22:36 +00:00
mjacob 99d46bf762 add isp1080 support and some basic PDB change stuff 1999-03-26 22:39:44 +00:00
thorpej 34f3cd7ce9 Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
1999-03-25 23:20:22 +00:00
thorpej 88d8a91205 Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.  Fix a bug where packets wouldn't be padded to the correct
minimum length.
1999-03-25 23:19:59 +00:00
thorpej 9caa955278 Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.  Subtract ETHER_CRC_LEN as necessary to get the same values
for these constants as were previously defined locally.
1999-03-25 23:19:16 +00:00
thorpej ad22c1dd58 Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
1999-03-25 23:16:37 +00:00
bouyer 1ff88ee466 Avoid busy-waiting when possible if we are not polling (real IRQ or timeout
callback). Shared PCI IRQ should now work (but still untested).
1999-03-25 16:17:36 +00:00
perry 8ade3b61ba Add two #ifdef BROKEN_LPT_DELAY's in to the central write byte
& strobe cycle. These bracket DELAY()'s of BROKEN_LPT_DELAY
microseconds. This can be used to kludge around mysterious hangs and
reboots some users experience. The cause of these failures is still
not known, but is conjectured to be hardware bug originated failures
in the bus cycle.
1999-03-25 02:17:38 +00:00
mrg d2397ac5f7 completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
1999-03-24 05:50:49 +00:00
drochner 1c99e4196a Use BUS_SPACE_ALIGNED_POINTER() instead of ALIGNED_POINTER() where the pointer
in not just used to access memory but is bassed to bus_space_xxx_n()
methods. For debugging purposes, bus_space can have additional constraints
which will be properly met by BUS_SPACE_ALIGNED_POINTER().
1999-03-23 21:41:07 +00:00
bad f44fb0d91c A backend for Databook's TCIC family of PCMCIA chips.
Thanks to Andreas Lohrum, O'Reilly Verlag, Terry Moore, and Holger Czukay
for hardware, documentation, and support.
1999-03-23 20:04:14 +00:00
pk c3eb74e089 Check for Sbus slave access errors.
Call bus_dma_load() with elevated priority.
1999-03-23 00:32:27 +00:00
bad a4e508928f Oops. RcsID police. 1999-03-22 23:01:36 +00:00
bad 2c16793ee5 Chipset driver for TROPIC based Token-Ring cards.
Frontends for IBM and 3COM ISA cards.

By Onno van der Linden <onno@simplex.nl>.
1999-03-22 22:21:26 +00:00
drochner b2c812d776 set "fontset" variables to 0 if no appropriate font was found for a
freshly allocated screen, should fix panic if "vga_mapchar()" it
attempted later
1999-03-22 18:24:23 +00:00
erh fc841e81b5 Get the index on the buffer (in addition to the descriptor) correct. 1999-03-19 22:43:11 +00:00
mjacob 008b51d0a6 Update the driver with some infrastructure for the 1080. Fix an embarrassing
clock botch bug. Additional infrastructure for PDB change stuff.
1999-03-17 06:15:47 +00:00
erh f4ccb35266 Add a "+1" in sca_start which should fix the limit of 2 transmit buffers. Also, kill some duplicate code. 1999-03-16 21:29:23 +00:00
jonathan 69d2d27c1b Use bus_space tags and handles, embedded in MD hooks AM7930_{READ_WRITE}_REG
to handle MD delay and bus padding. Tested on sparc2 by David Brownlee.

Should use regmaps, but that breaks sparc pDMA assembly code.
1999-03-14 22:29:00 +00:00
minoura 1ff51fea1a Some x68k conditionals (I don't know why these are needed...). 1999-03-14 16:14:54 +00:00
bouyer a6365676fa Add a new disk flag: DRIVE_OLD for pre-ATA disks. probe routine will now set
DRIVE_OLD, DRIVE_ATA or DRIVE_ATAPI based on register signatures.
The attach routine will issue a IDENTIFY command for ATA/ATAPI disk,
to detect flase matches by the probe routine.
probe/attach should now be fully compliant with ata-4/ata-5. As a side
effect, ATAPI drives which improperly use ATA register signatures should now
be attached as ATAPI.
1999-03-10 13:11:43 +00:00
bouyer ba74f49e60 Keep track of CRC errors in Ultra-DMA mode. If we noticed a CRC error and we
need to downgrade, downgrade to PIO, as it has been shown if we got CRC errors
in Ultra-DMA mode, we will have silent data corruption in multiword DMA mode
(isn't IDE wonderfull ? :).
Set timeout to 1s for "normal" ata I/O, to minimise the effects of missed
interrupts.
1999-03-07 14:02:53 +00:00
dante 199f99d192 fix second level interrupt handler to allow 64 bits pointers 1999-03-04 20:15:53 +00:00
pk 80b321b11a sparc => __sparc__ 1999-03-03 12:58:14 +00:00
explorer 3ebb419571 Update to slightly altered rnd_attach_source() api 1999-02-28 17:08:05 +00:00
dante 198f1f5c48 Fix AdvanSys Narrow driver to work on Alpha 1999-02-25 20:21:33 +00:00
dante eab52d94b3 Fixed AdvanSys Ultra Wide driver to work on Alpha. 1999-02-23 20:18:16 +00:00
scw fc658e2d3e Don't update the CORx registers unless they really have changed.
Also make console Tx handling wait until the Tx FIFO has drained and
the shift-register is empty before sending console characters.
1999-02-21 14:01:50 +00:00
abs b86f85e1cc wdcwait is called initially without any device on my thinkpad.
This breaks the first WDCDEBUG_PRINT. Handle this case.
1999-02-21 02:07:52 +00:00
hubertf 99626f33a3 Only #define WDCDEBUG if it isn't already defined (e.g. by some options
in the kernel config file).
1999-02-20 23:47:52 +00:00
drochner bd047d30a0 complete mapping table for pcvt fonts, make dual-font selection work
as intended
1999-02-20 18:27:53 +00:00
drochner 9ad8930d16 complete mapping tables a bit so that ASCII (ie vt100) art looks better
even without extra fonts loaded
1999-02-20 18:26:13 +00:00
scw 3a5b0d88ca That #define splserial() really didn't want to be there... 1999-02-20 16:23:39 +00:00
scw 0ed9dc11d7 Delay serial port parameter changes until the Tx FIFO has emptied. 1999-02-20 00:27:29 +00:00
leo e54f78017e This one needs <machine/bswap.h> too. 1999-02-19 20:58:51 +00:00
minoura 38803874bb Translated Japanese comments. 1999-02-19 16:19:53 +00:00
mycroft 28bc4dfeca Oops; PCIC_INTR_ENABLE does something *very* different. 1999-02-19 03:14:00 +00:00
mycroft 70d4ac07b6 Yet another path where we need to set PCIC_INTR_ENABLE. 1999-02-19 00:27:45 +00:00
mycroft 18e341a954 Add separate halt_input and halt_output methods in ad1848_isa, which disable
the DMA channel.
1999-02-18 17:27:39 +00:00
bouyer 7e5acb7709 Don't print an extra newline if the controller doesn't support 32 bits access.
Pointed out by Dave Huang.
1999-02-18 14:45:31 +00:00
thorpej cfb2342145 Fix the code in epic_attach() that frees resources when the attach fails. 1999-02-18 02:24:30 +00:00
thorpej 5c457e71fe Only do the multicast filter bug work-around if in 10Mbps mode. Also,
don't reset the interface if the multicast list changes.  Just reprogram
the multicast hash table.
1999-02-18 02:12:09 +00:00
mycroft 27963c294a Use the trigger interface, and clean up a pile of cruft. 1999-02-17 23:05:28 +00:00
mycroft 71105fbda7 Update comments. 1999-02-17 21:44:55 +00:00
thorpej 6d0cb6e410 Change a straggling splimp -> splnet. 1999-02-17 09:11:29 +00:00
thorpej 69a4436f8b Avoid initializing the interface in the SIOCSIFFLAGS if ! UP and ! RUNNING. 1999-02-17 03:40:59 +00:00
mycroft 7741cae143 Fix slight ommission in previous. 1999-02-17 02:43:13 +00:00
mycroft e5f5e628d2 Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.
1999-02-17 02:37:38 +00:00
is 2c7fa23c38 Fix Copyright dates 1999-02-16 23:34:10 +00:00
is dc068e0d1f Assign my files to The NetBSD Foundation, Inc. 1999-02-16 22:46:55 +00:00
bouyer d683e62685 Be less strict on ATAPI signature, at last one CD puts 0x00 in sc instead
of 0x01.
1999-02-15 18:47:59 +00:00
hubertf 56f2d188fc RCS ID police 1999-02-15 04:54:34 +00:00
thorpej e523f4968b Make sure full-duplex is reflected in TXCON, and don't reset the interface
when the media changes.
1999-02-13 21:08:08 +00:00
minoura 4d5a04afc4 MI version of the Fujitsu MB89352 SCSI Protocol Controler (SPC) driver.
Based on experimental NetBSD/pc98 ISA/PISA version, which was derived
from the MD /sys/arch/x68k/dev/spc.c.
1999-02-13 17:33:14 +00:00
scw 94719c7b9a New MI front-end for the Cirrus Logic CD240[01] Multi-protocol
Communications Controller.

This is still a work in progress, but it is functional enough to
be usable.
1999-02-13 17:05:19 +00:00
drochner 960dfa5227 oops - forgot to convert the trivial case (ASCII) to "match levels" 1999-02-12 15:49:43 +00:00
drochner 525932e022 make the probe stricter to catch cases where the chipset doesn't pull
the data lines to "high" for not-existant devices
1999-02-12 12:45:48 +00:00
drochner b515442160 Display the danish o-slash as phi/Theta as proposed by
Soren S. Jorvang <soren@t.dk>, with a lower match level.
Display the other accented characters which are not present in the IBM
character set by their non-accented equivalents, with an even lower
match level.
1999-02-12 11:32:50 +00:00
drochner dbdaf91650 change the "mapchar" interface to return a "quality" or "match level"
arguments which allows to find approximations for characters which are
not present in a font
1999-02-12 11:25:23 +00:00
thorpej e8823cc3f3 Cleanup of the EPIC/100 driver I did while hacking on the Rhine driver:
* Macroize hardware and software descriptor access (much easier to read).
* Simplify and optimize the transmit loop a bit, and use IFF_OACTIVE as
  appropriate.
* Fix a potential race condition in the transmit loop.  This change has
  made the driver significantly more stable (almost completely eliminated
  the "device timeout" errors that have plagued this driver).
* Implement transmit interrupt pacing.
* Add missing bus_dmamap_sync() calls (on transmit and receive descriptors
  and fraglists).  (Draining the write buffer when accessing these structures
  may have also contributed to the increased stability of this driver on
  the Alpha.)
1999-02-12 05:55:27 +00:00
thorpej 873e1d2a51 Fix printf format problems on Alpha. 1999-02-12 01:51:37 +00:00
thorpej 1ab6db8e5f Fix printf format problems on Alpha. 1999-02-12 00:50:09 +00:00
minoura c5847e98a9 void* -> u_int32_t 1999-02-10 16:00:54 +00:00
mjacob 3c21a2493b Roll internal release tag. Print out if we're in a 64 bit PCI slot.
Use fast memory timing NVRAM parameter. Clean up and fix establishment
of default target parameters. Don't use NVRAM if are flagged as not to
do so (I had a busted NVRAM setup which I couldn't edit that enabled SYNC
mode but disabled disconnect/reconnect and wide!!). Fix delays after
resets. BUS resets not done in isp_init anymore- relegated to OS
specific outer layers. Fix a buglet where you can get in a loop for
a NULL xs in the completion list in isp_intr. Add in some defines that
can disable fast posting. Add in code for Loop Up/Loop Down events that
call into the outer layers as to what to do.
1999-02-09 00:52:23 +00:00
mjacob 0cf98e4e12 Roll internal release tag. Roll core version minor. Fix broken DPARM_DEFAULT
define. Add a new config flag param (ISP_CFG_NONVRAM) whose intent it is
to cause NVRAM to be ignored. Add ISPASYNC_LOOP_DOWN and ISPASYNC_LOOP_UP
isp_async enums.
1999-02-09 00:46:25 +00:00
mjacob d8d9458410 fix a couple of NVRAM defines 1999-02-09 00:44:42 +00:00
mjacob c1adc949c2 roll internal release tag 1999-02-09 00:44:06 +00:00
mjacob 6a8ebccd6a Do SCSI Bus resets in this layer (now). Don't do it for Fibre Channel yet
(we get LOOP DOWN events, and we'll hang on that at this time).

Add other isp_async cases- ISPASYNC_LOOP_DOWN and ISPASYNC_LOOP_UP. DOWN
will cause internal queuing until UP, whereupon a timeout will fire up
any pending xfers. It doesn't really keep commands from getting destroyed
by loop down events, but at least minimizes the damage. This was much
easier to implement with CAM.
1999-02-09 00:42:22 +00:00
mjacob ee45547dde Roll platform revision level. Add blocked flag and waitq to osinfo structure. 1999-02-09 00:37:35 +00:00
bouyer 1e0e78854a There's no ATA draft where it is required for the drive to set DRDY | DSC when
the disk is ready to transfer data, and in ATA-5 the DSC has been obsoleted.
So only wait for DRQ to transfer data. This can be made conditional on the
ATA version if it's proven to break with some drives (worked with all the
drives I have access to).
While I'm there correct a few typos.
1999-02-08 15:22:28 +00:00
thorpej 6eedee5c9d Add entropy gathering. 1999-02-07 01:54:50 +00:00
mycroft 0c7afe477d Separate the tiocm code into functions, like the z8530 code, and fix the same
DTR bug.
1999-02-03 23:57:27 +00:00
mycroft 568f4aa704 Minor changes to tiocm code. 1999-02-03 23:51:06 +00:00
mycroft 9be96dda95 Fix an inconsistency: PPS was turned off on first open, but the mode may have
still claimed it was enabled.
1999-02-03 23:22:11 +00:00
mycroft 535f59cc81 Slight redux in PPS code. 1999-02-03 23:20:33 +00:00
mycroft b3a56d0097 Catch up with a change to the stint interface. 1999-02-03 20:22:28 +00:00
mycroft b63b0fd80b Redo the N previous changes, plus a couple of other things:
* Move the printf() delay to just after the printf(), where it actually makes
  sense.
* Use zstty_stint() and zstty_softint() from zsparam(), to force an immediate
  update of the carrier and flow control status.  Abuse this in the attach and
  open functions to defer all of that work.  This insures that we don't lose
  any status updates.
* Don't screw with register 1 when closing the console.
* Fix bugs in TIOCM??? (stay semicolon, clearing DTR while transmitting).
* Add comments in a couple of places.
1999-02-03 20:15:51 +00:00
marc 9231ba8603 - make sure that sc->handle[i].flags is initialized in all cases
- check PCIC_FLAG_SOCKETP before disabling the CSC_INTR.
1999-02-01 22:17:05 +00:00
wrstuden 36c50aaa14 Add the patch I floated on tech-kern. Andreas Eltrich <elchy@dahoam.de>
says it got pppd working for him.
1999-01-31 21:41:00 +00:00
minoura 8ed711f1bc MC68450 DMAC regs. 1999-01-30 14:58:26 +00:00
mjacob 6bcdc2b5d2 Implement and use Fast Posting for both parallel && fibre. Redo a bit of
the startup code. Implement a call to outer framework function so that
asynchronous events can be handled (e.g., speed negotiation, target mode).

Roll internal release tags.
1999-01-30 07:31:50 +00:00
drochner a7f50b8178 Debugger() -> console_debugger() to honour the ddb_fromconsole sysctl 1999-01-26 17:08:37 +00:00
wrstuden ccf442a971 Fix thinko in part of rev 1.53.
Thanks to Scott for pointing this out to me (I got his mail and figured out
this change before seeing the discussion on tech-kern) and to Charles for
the initial explanation.
1999-01-25 17:53:13 +00:00
msaitoh 88176e7d20 Fix about insertion/removal event problem. 1999-01-21 07:43:32 +00:00
bouyer a1471db64a move wd.c:print_wderror() to ata.c:ata_perror().
In wdc_probe_caps() add code to guess the ATA revision supported (if
ATA4 if Ultra-DMA, ATA2 if PIO mode > 2). We can't rely on param.atap_ata_major
here, at last one Ultra-DMA drive claims to support only ATA-3.
Use the ATA version in ata_perror(), and to try a flush cache command
in a shutdown hook for IDE drives.
1999-01-18 20:06:24 +00:00
mjacob 83270f242f If you're BIG_ENDIAN and use bswapXX, pull in the header file that prototypes
these functions.
1999-01-18 19:17:00 +00:00
pk ed55ba4db9 Need <machine/bswap.h> 1999-01-18 11:51:43 +00:00
ross 5709f532d1 Random compile nits in BHADEBUG code. 1999-01-14 04:47:18 +00:00
drochner 23cfea8327 -implement new wscons font handling with separate download and selection
calls
-support use of 2 fonts simultanously; this costs the ability to
"highlight", ie to use the upper 8 colours
-define screen types "80x25bf" and "80x50bf" which use this ability
-add conditional code to deal with the weird mapping of pcvt's
supplemental fonts
1999-01-13 16:48:58 +00:00
christos e79b8222a6 Put back modem control ioctl's 1999-01-13 11:55:20 +00:00
drochner 9b1eddc4f1 - Set up the interface watchdog timer on sends. This fixes the hangups
reported by Matthias Scheler <tron@lyssa.owl.de> in PR kern/6772.
- After receiving, check whether the receive DMA pointer became 0
  what obviously happens if the list runs out of entries. Simply reinit
  in this case. This fixes receive lockups after DDB use observed
  by myself.
  Unstall the receive engine if the ELINK_UPPKTSTATUS indicates that it
  was stalled. (Don't know when this might happen. FreeBSD does so.)
1999-01-10 14:19:46 +00:00
mjacob 9d702f60ed + Some basic deadchip detection.
+ Enable FIFO bursts, but also detect bogus 1040A with busted FIFO.
+ Use new MEMZERO crossplatform define.
+ Handle RQCS_QUEUE_FULL status case and let upper layer parse SCSI ststus
  byte if nonzero (should be 0x28- Queue Full status)
+ Fold ISP_NVRAM_FIFO_THRESHOLD_128 into isp_fifo_threshold tag.
1999-01-10 05:07:53 +00:00
mjacob f1dfa06e13 bump isp_fifo_threshold tag top 3 bits 1999-01-10 05:04:46 +00:00
mjacob b503bb5337 cross platform define MEMZERO added 1999-01-10 05:04:18 +00:00
drochner 98e630dbe0 Allow to deallocate also the currently visible virtual screen (unless
it is the console).
This requires vva_show_screen() to catch the case where it has no screen
to switch from, ie no need to save the current state.
1999-01-09 15:29:26 +00:00
augustss 0d32a9a78b Fix more `void *' arithmetic. 1999-01-08 19:22:34 +00:00
thorpej 71c86e3e92 Changes to NCR53c9x driver necessary to add support for the AMD Am53c974
PCscsi-PCI SCSI controller.  From Izumi Tsutsui, PR #6654.
1999-01-06 19:19:38 +00:00
christos dfd0f0f949 PR/6669: Michael Eriksson: pcic_chip_mem_alloc() can't handle large requests 1999-01-01 14:05:18 +00:00
augustss 44df4dcc85 Add a wscons display type `unknown' that the generic VGA driver can
return until someone fixes it for real.
1998-12-30 13:54:03 +00:00
mjacob e5e787230b clean up headers; move uninit/watch to outer layers 1998-12-28 19:10:43 +00:00
msaitoh 2718914e14 fix incorrect panic message 1998-12-25 16:50:08 +00:00
nathanw 788ff053de Fix up support for PCI attachments of pcic devices on i386 in general,
and the Cirrus Logic CL-PD6729 in particular.

From danw@mit.edu in PR port-i386/6436.
1998-12-20 17:53:28 +00:00
thorpej 92229a04c1 Quiet some diagnostic messages when we might expect them to happen.
PR #6460, Rafal Boni.
1998-12-18 21:50:16 +00:00
bouyer c37bf0ccb4 Keep track of DMA errors, and downgrade the transert mode (UDMA ->DMA,
DMA->PIO) in case of 2 consecutive errors. Don't downgrade if the
PIO/DMA/UDMA modes were forced by a config flag.
1998-12-16 13:02:03 +00:00
bouyer 94f32463dc Add a callback to re-compute the modes used on a channel. 1998-12-16 12:46:47 +00:00
mycroft 95aa0d0b7d Simplify the copy loops a bit. 1998-12-12 16:58:10 +00:00
mycroft 90b7cbc727 Simplify argument to MGET(), to generate better code. 1998-12-12 16:36:24 +00:00
mycroft a6717054a4 Slight simplification to previous. 1998-12-12 16:31:34 +00:00
bad fe3ce4e89a Simplify the code dealing with the mbuf chain in dp8390_get(). 1998-12-11 18:03:55 +00:00
bad ba8bdebedd Change a comment to reflect reality. 1998-12-11 16:01:16 +00:00
tls 2fbbdcc0cb Fix bug that caused all ifp's to have if_xname ntwo0, which was rather inconvenient. Should use config_found on each port instead, but this works for the moment and it's quick. 1998-12-09 23:25:41 +00:00
thorpej 7a9cc5bfbc Update for changed scsipi_xfer struct. 1998-12-09 08:37:50 +00:00
leo 5335909035 BVME410 ethernet driver by 'maximum entropy'. 1998-12-09 07:33:59 +00:00
augustss 1b499d8ce6 Make the OPL information string more informative. 1998-12-08 14:26:56 +00:00
bouyer 997074f17c Add a missing 'return' in an error path; noticed by Matthias Drochner. 1998-12-08 13:29:31 +00:00
mjacob d610e1ad3f Update BA for new max_lun parameter for SCSIbusses. Clearify maximum luns
for FC HB based upon a SCCLUN define (15 for normal- 255 out of a possible
65535 for SCCLUN). Propagate loopid as adapter_target.

Roll minor platform version. Roll core version number.

Update mailbox definitions with cleaner target mode structure definitions.
Clean up some ENDIAN stuff. Correct botched ISP2100_NVRAM_HARDLOOPID offset.
1998-12-05 19:48:23 +00:00
mjacob 74bc9f26d5 Update HBAs to incorporate the new max_lun property. 1998-12-05 19:43:33 +00:00
pk 19f705b094 Cast bus_space_{read,write}_multi arguments. 1998-12-03 23:33:45 +00:00
bouyer 47ab212504 Rename pio_mode, etc ... to PIO_cap, etc ... for consistency with the
ata_drive_datas struct. Suggested by Soren S. Jorvan.
1998-12-03 18:24:30 +00:00
bouyer 71f33dbfa5 UDMA->Ultra-DMA in a printf 1998-12-03 17:30:32 +00:00
bouyer 2b28c858d8 add a udma_mode field to wdc_softc, and use it the same way dma_mode is used
(higthest ultra-dma mode supported). There may be a higther ultra-dma mode
defined ...
1998-12-03 15:38:59 +00:00
bouyer 1d5d5ab40a In struct wdc_xfer, change 'channel' to a pointer to a channel_softc, to avoid
a double-pointer dereference at run-time. Suggested by Matthias Drochner.
1998-12-02 15:53:34 +00:00
bouyer 45675ab14b - change drive_flags from u_int8_t to u_int16_t
- keep the modes supported by the drive in struct ata_drive_datas (will be
  later used for downgrading the DMA/PIO mode on error)
- use config flags to force/disable PIO/DMA/UDMA modes
- For the CMD PCI0643/6 setup DMA mode to DMA Read multiple.
1998-12-02 10:52:24 +00:00
pk adbfb3777a Update previous: we don't have the required information all the time. 1998-11-30 07:54:29 +00:00
pk 0f8cfb66f0 Some more misc. cleanup in the same style as previous. 1998-11-30 07:44:24 +00:00
pk 9860d69b7e Announce negotiation of async mode consistently (Soren Jorvang; PR#6512) 1998-11-30 07:34:06 +00:00
bouyer 5f088e0243 wdcstart(): Re-add support of shared xfer queue across multiple channels
(was lost between 1.44 and 1.45).
1998-11-29 17:34:49 +00:00
thorpej 96da1decd9 Fix media probe on non-MII chips. 1998-11-29 01:40:46 +00:00
thorpej 18e7f69220 Update for new pcmciabus attribute. 1998-11-27 21:59:18 +00:00
augustss 9726cfd1fb Make the copyright header conform to the NetBSD template. 1998-11-25 22:17:06 +00:00
kenh 1f676cda09 Implement the AT_READREG flag. This is needed for the CHECK POWER MODE
ATA command (among others).
1998-11-23 23:02:11 +00:00
wrstuden f0559087e0 Changes to deal with mac serial ports having clock sources on DCD or CTS.
- When doing a first open, don't enable receive & status interupts before
	the MD layer has had a chance to set things up.
- Enable logic to only enable DCD/CTS interupts if we are looking for/
	expecting interupts on those pins. Disable otherwise.
- in zs_param, only pass up the state of ZSRR0_DCD if we have enabled
	interupts on that pin.

Henry Hotz (<hotz@jpl.nasa.gov>) and Greg walsh <gwalsh@artec.com> have
tried these changes to get certain printers from hanging at boot. They
work in a 1.3.2 kernel for Greg.
1998-11-23 22:10:09 +00:00
drochner 3e38051bc5 in wdc_softc: access the per-channel data via a pointer array instead of
an array of fixed-sized channel_softc elements. This way IDE controllers
which more than 1 channel (pciide) can extend the channel data easily
for private needs.
To avoid the double dereference at runtime, change the argument of
wdcstart() to the channel data pointer instead of the array index.
1998-11-21 15:41:41 +00:00
kml ba30effcf8 Changes to support a HIPPI Framing Protocol device, which allows raw
HIPPI packets to be written without having to go through the network
stack.
1998-11-20 04:12:57 +00:00
thorpej 4ba3417429 Implement reference counting for ATA adapters. 1998-11-20 01:22:37 +00:00
kenh 396aa17f77 Sigh, my bad. Check for chp->wdc being NULL before trying to deference it.
(I didn't realize the ISA wdc front-end doesn't fill in chp->wdc).
1998-11-19 22:50:21 +00:00
thorpej 5f0577babc Adapt to the new scsipi_adapter interface. 1998-11-19 21:43:00 +00:00
thorpej afc84158d1 Back out revision 1.40. That change couldn't have POSSIBLY worked, since
when wdcprobe() is called, the wdc_softc pointer in the channel_softc
hasn't even been intialized!
1998-11-19 19:52:42 +00:00
kenh 1461c4fb20 __wdccommand_done() needs to call wdcstart(), otherwise you can run
into deadlocks when using wdc_exec_command().
1998-11-19 04:07:54 +00:00
thorpej 3e086bd63d Add support for detaching "com" instances. 1998-11-18 23:58:52 +00:00
kenh 58932a8415 Quirk out the first test in the beginning of wdcprobe(); the Vaio
CD-ROM drive doesn't like it for some reason.
1998-11-18 19:12:08 +00:00
thorpej 1d0f24882d Now that the *_activate() functions don't do things which are attachment
specific, move them into the chipset drivers.
1998-11-18 18:34:52 +00:00
thorpej dd6750820c Expose the "enable" and "disable" functions so that the front-ends can
access them.
1998-11-17 20:25:00 +00:00
bouyer b64b7c2964 New IDE xfer flag: C_SENSE, set by the ATAPI back-end sense info needs to
be retrieved.
1998-11-17 14:14:52 +00:00
thorpej 0c3ca7b31e Finish implementing interrupt-driven card insertion and removal support.
- Deactivate the card on removal and queue a REMOVAL event for the socket's
event thread to finish the detach.
- Queue an INSERTION event for the socket's event thread on insertion.

Implement a few missing infrastructure pieces to support this.

Hot swapping of PCMCIA cards now "works".  (Not quite; things like network
devices need changes for their respestive subsystems.  These changes are
coming soon...)
1998-11-17 08:49:11 +00:00
thorpej fc44652721 Implement a kernel thread per PCMCIA socket to handle card insertion and
removal events.
1998-11-16 22:41:01 +00:00
thorpej d2afdb5b59 Fix some whitespace lossage, canonicalize some media names. 1998-11-16 19:13:31 +00:00
mycroft 8146c925da If we get a TX interrupt with no packets buffered, ignore it. This can occur
if the chip is reset while transmitting.

XXX
This occurs at boot time because the SIOCADDMULTI always resets the interface
when adding the `all hosts groups' -- usually while the ARP packet is being
transmitted.  All drivers should be fixed to not reset the interface when
changing the multicast filter, if possible.
1998-11-12 13:18:26 +00:00
bouyer 1e71e76d6c - clearify the boot messages (features supported vs features used). Thanks to
Havard Eidnes for his complains about this :)
- fix some typo in comments
- hoppefully better detection of drives reporting bogus PIO modes.
1998-11-11 19:38:27 +00:00
msaitoh 21e1b057bc Sorry, I forgot to revert "#if 0". 1998-11-09 07:01:47 +00:00
veego 2749e8b74a We don't need the pci headers here. 1998-11-08 22:02:25 +00:00
kenh e58cf6b359 Add definitions for the ATA power management commands 1998-11-05 22:49:09 +00:00
msaitoh 37bbf03777 fix pcic_chip_socket_enable() to works on more machines. 1998-11-05 07:55:48 +00:00
fvdl 7b10c3e7e4 Add the 'ex' driver, a DMA driver for 3Com 90x and 90xB cards. Rename
constants from EP_ to ELINK_ since they're now used in the ex driver as well.
1998-11-04 00:29:28 +00:00
thorpej cd7f7eff85 Code common to RealTek 8019 and 8029 NE2000-compatible Ethernet chips.
Includes media selection support and support for Full-duplex.
1998-10-31 00:44:33 +00:00
thorpej fa97a53c11 Multiple inclusion protection. 1998-10-31 00:31:43 +00:00
thorpej 992f2906ba Move the RTL8029 register definitions to <dev/ic/rtl80x9reg.h>, and add
the registers/bits present in the RTL8019 (ISA version).
1998-10-31 00:27:41 +00:00
nisimura 074bc27605 - Add filenames for VDAC/cursor sprite hardware descriptions; bt431reg.h,
bt459reg.h, bt463reg.h and ims332.h as pointed by Klaus Klein.
1998-10-30 00:18:16 +00:00
dante 2cb48d6c4e Add support for macppc.
Very special thanks to Itsumi Tsutsui for his invaluable collaboration.
1998-10-28 20:39:45 +00:00
kleink 026fcd0ce2 RCS Id police, canonicalize multiple-inclusion protection symbol names. 1998-10-28 16:26:01 +00:00
nisimura 675a2afc89 - Brooktree Bt459 135 MHz Monolithic CMOS 256x64 Color Palette RAMDAC.
- Brooktree Bt431 Monolithic CMOS 64x64 Pixel Cursor Generator.
- Inmos IMS G332 Color Video Controller.
1998-10-28 04:10:36 +00:00
thorpej 56066ad5fb Add media list, media list count, and default media arguments to
ne2000_attach().
1998-10-28 00:13:47 +00:00