Commit Graph

657 Commits

Author SHA1 Message Date
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
pk 09109c38a1 Maintain a copy of the configuration flags in our `softc'. 1997-07-30 11:48:32 +00:00
pk 2c3cf06107 If state is NCR_CLEANING, do not schedule commands until reset is complete. 1997-07-29 22:26:01 +00:00
pk 7250d56f4a Some more cleanup and synchronization with ISA version.
Also make a start at using bus_* macros (just bus_barrier() for now).
1997-07-29 20:24:46 +00:00
pk 8c535d8cfe No need to send two copies to the bpf tap when sending. 1997-07-28 22:35:49 +00:00
pk a07a88cdcb Bring over assorted changes applied to the ISA ie driver over time.
Fix some inaccuracies in the ring-scan code.
1997-07-28 22:26:12 +00:00
augustss a63034762b Audio: Remove the machine dependant code I put in audio.c by mistake.
This adds another method to audio_hw_if.  Also remove a field from
audio_hw_if that was not read-only.
1997-07-28 20:56:05 +00:00
mjacob 002c218565 Kudos and thanks to Mark Brinicombe (mark@causality.com): bug in waiting for
RISC_INT to be set after stuffing a mailbox.
1997-07-28 18:56:36 +00:00
augustss d58bc6796f audio: Simplify handling of AUDIO_SETFD and committing of encoding mode. 1997-07-27 23:51:48 +00:00
augustss 9745684ebe Changes to the sudio system:
- 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.
1997-07-27 01:16:32 +00:00
pk 4459db6815 Kill a bogon in timeout loop. 1997-07-23 12:00:12 +00:00
pk 32aa713950 First cut at a MI i82586 chip driver. 1997-07-22 23:31:58 +00:00
pk 1e39126631 Relax `DMA terminal count' check to exclude any selection state to avoid
triggering the message when merely probing targets.
1997-07-22 18:55:20 +00:00
pk e1616d211e While processing DISCONNECTs, take note of the transfer count reaching
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.
1997-07-20 16:46:17 +00:00
pk a4ae679706 Declare `ncr53c9x_dmaselect'. 1997-07-20 16:24:00 +00:00
pk 2b8fb4cacd Propagate SCSI status byte back to higher levels. 1997-07-19 21:54:16 +00:00
jtk 37f9c6bd88 use locator defines in "locators.h" to index cf_loc[] 1997-07-17 01:17:45 +00:00
cgd 5c2a76b304 fix static inline functions' prototypes so they're correctly marked
'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.
1997-07-07 22:52:17 +00:00
is 3040e9247c * Command code definitions for the Dallas Semiconductor series of chips which
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.
1997-07-06 22:22:01 +00:00
thorpej 2252d1317b Add support for remote serial KGDB. 1997-07-05 20:52:40 +00:00
thorpej 2eaa922149 Do not print "esp0: !TC [intr ...]" messages if:
(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.
1997-06-26 00:27:25 +00:00
hannken 5d4f988920 Adjust the number of ccbs allocated during initialization.
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.
1997-06-25 13:30:59 +00:00
mjacob 68d184dc19 Hmm- seriously funny and sad bug: you need to directly establish the
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).
1997-06-22 19:57:06 +00:00
cgd 57f46a9e4a fix several bugs pointed out by Jarkko Torppa <torppa@cute.fi> in PR 3753:
(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). (!!!)
1997-06-17 05:38:10 +00:00
cgd 6b78891053 the port number is the low 5 bits of the minor. That means that it should
be masked with 0x1f (the low 5 bits), rather than 0x0f (the low four bits).
Pointed out by Jarkko Torppa <torppa@cute.fi> in PR 3753.
1997-06-17 05:32:46 +00:00
mycroft 09cad93ce8 Implement a better backpressure mechanism so that data is collected
in the driver's buffer if the tty buffer is full.  If the driver's buffer
becomes full, turn off receive interrupts until it drains a bit.
1997-06-15 11:18:59 +00:00
thorpej da1b5f9021 It's perfectly normal for an older (e.g. pre SCSI-2) device to send
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.
1997-06-09 01:51:03 +00:00
thorpej 6bf33a7fe3 Merge pdq-970604 update. 1997-06-08 19:47:13 +00:00
thorpej cd4fc920b0 Put back Matt Thomas's revision ID, per PR 3723, submitted by
enami tsugutomo <enami@ba2.so-net.or.jp>.
1997-06-08 18:44:02 +00:00
thorpej b937ee4745 - Simplify mailbox DMA setup, allowing the front-ends to allocate the
mailbox storage in a way they see fit.
- Define macros to index and size the request and result queue entries.
1997-06-08 06:31:52 +00:00
thorpej fbc0df0a1a Pull thorpej-bus-dma branch into mainline. 1997-06-06 23:30:02 +00:00
mellon 4f4f344f71 Clean up conflicts during merge (thomas de-970603) 1997-06-06 23:14:19 +00:00
mjacob 62b3daa7d2 Finally found the cause of that nagging 'lost command' (for the first
command) bug: the initial response queue index is take from mbox 5,
not mbox 4, and mbox 5 wasn't getting initialized to zero.
1997-06-01 23:42:04 +00:00
mycroft cf09974361 Add DMA37MD_DEMAND and DMA37MD_BLOCK. 1997-05-29 21:42:28 +00:00
mycroft 6bfd7b7d45 Remove unneeded call to comstop() in commsrint(). This fixes a problem
where the driver would sometimes retransmit bytes.
1997-05-26 14:54:46 +00:00
pk c6a933f6ea Remove all `bustype' arguments from map[io]dev() and REG2PHYS(). 1997-05-24 20:15:59 +00:00
thorpej 97c6a307e3 Where _is_ that brick when you need it?! 1997-05-24 03:45:40 +00:00
mrg ac74fdbb9c KNF. 1997-05-19 04:01:16 +00:00
pk 990857fe21 Mods for ESP406/FAS408 SCSI driver (from Eric S. Hvozda; PR#3581) 1997-05-17 20:56:55 +00:00
pk 72d640a497 Tweak gain curve (from nsayer@kfu.com; PR#2909) 1997-05-15 22:32:56 +00:00
thorpej 151926da32 Make sure we're in register window 0 before attempting EEPROM access,
pointed out by Matthias Drochner.
1997-05-14 00:22:00 +00:00
jonathan fac2cd30a0 Set TX-available threshhold in epinit() just before enabling interrupts,
so TX_AVAIL intrs are enabled for root-on-NFS kernels.
Tested (and required) on 3c595TX with root-on-NFS kernel booted from floppy.
1997-05-11 05:47:08 +00:00
augustss e63a553175 Change the interface between high and lowlevel audio drivers again:
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.
1997-05-09 22:16:27 +00:00
augustss 07cf0ea21d Oops, forgot this in previous commit. 1997-05-07 20:23:53 +00:00
augustss c4a52794f1 Convert to new orthogonal audio encoding scheme and implement
some of the new encodings.  The change to ioctl AUDIO_GETENC is
NOT backwards compatible.
1997-05-07 18:51:31 +00:00
jeremy 3aa6ce0369 Moved from arch/sun3/sun3 and changed according to implied references
in recent commits to sun3/clock.c and sun3x/clock.c by Gordon Ross.
1997-05-02 06:15:28 +00:00
pk 31b943b8ac Preliminary support for ESP406 and FAS408 variants (from Eric Hvodza; PR#3559) 1997-05-01 22:16:24 +00:00
scottr cd3abdf098 Fix typo in last change. 1997-04-30 19:16:23 +00:00
scottr c0d7fd03ae Remove the use16bit softc field, replacing the functionality with dcr_reg.
This allows the front end to override the default DCR (byte-wide DMA,
x86 byte order, 8-byte FIFO) with different transfer size, byte order, DMA
parameters, and FIFO threshhold.  If the loopback select bit is not set for
normal operation, the default is used instead.

Inspired by thoughts from Bernd Ernesti.
1997-04-30 18:09:14 +00:00
augustss 526ef2f618 Change the interface between the high and low level audio drivers
so that all audio encoding parameters are set at once.  This simplifies
the interface and make error checking easier.
1997-04-29 21:01:33 +00:00
scottr ad24724cbc Machine-independent driver for DP8390/WD83C690-based Ethernet controller.
Derived from the ISA if_ed driver and the mac68k if_ae driver.
1997-04-29 04:32:07 +00:00
mycroft 103c7d360d Oops; forgot to GC the last mbuf allocated when out of clusters. 1997-04-28 17:03:58 +00:00
mjacob ac6fbba3ac On alpha size_t is not an int, ergo last argument to dma setup glue
function can't be a pointer to an int.
1997-04-28 15:43:47 +00:00
pk 94eaf1bb04 Implement target selection using DMA.
To allow a period of testing the variable `ncr53c9x_dmaselect' is used to
enable this feature (default is 0, i.e. the old behaviour).
1997-04-27 22:08:51 +00:00
jonathan dbf4f7b71f * Tidy PHY [sic] selection code in epsetmedia().
* epinit() had both explicit xcvr selection for 3c589 and a call
  to epsetmedia().  The first is redundant; delete it, and EP_COAX_DEFAULT.

* Update comments to reflect 3c589 and 3c509B fixes.  Fix typos.
1997-04-27 21:09:56 +00:00
veego bf37fc50d0 Rename the PROD_ID to PROD_ID_3C509 to make it possible to add other
product id's, e.g. for the 3c515.
1997-04-27 09:42:34 +00:00
veego a2e1f15ba7 - Replace the check for EP_BUS_PCMCIA in epsetmedia with a check for
EP_CHIPSET_3C509 and change it a bit so it works now with the 3c509
  and still works with the 3c589.
- KNF
1997-04-27 09:38:50 +00:00
jonathan 593e5dd8e1 Pad of first mbuf in chain, even if it's a cluster (pr 3536).
Garbage-collect padding of header mbuf.
1997-04-25 20:14:37 +00:00
mycroft 91a808523c Fix typo in previous. 1997-04-24 08:05:13 +00:00
mycroft 68258fba20 Do not force the initial part of a packet into a separate mbuf. 1997-04-24 02:25:36 +00:00
mycroft 581399fc4c If we fail to allocate a cluster to hold a large packet, simply
drop it rather than using a chain of tiny mbufs.
1997-04-24 02:24:04 +00:00
cjs 9be8b65e23 Smaller, cleaner code for aligning struct ip on receipt. 1997-04-23 08:15:03 +00:00
cjs 5c8bf48817 Align struct ip on incoming packets for all types of cards, not just
32-bit ones.
1997-04-22 21:19:11 +00:00
cgd dcd9b58489 don't bother keeping around the i/o tag. It's useless by itself, and
without other significant changes to this driver wouldn't be particularly
useful to keep around permanently anyway.
1997-04-13 20:02:11 +00:00
cgd 04e7505aaa clean up an autoconfiguration printf. Much more should be done 1997-04-13 20:00:29 +00:00
thorpej c0c810cbe0 Initialize the scsi_link before calling bha_init(), since that is how
we check for "wide controller" now.
1997-04-11 01:34:25 +00:00
cgd db0f072019 clean these up (mostly rename bus_space_{tag,handle}_t variables) so that
this code makes equal sense for memory and I/O space, prefer to map
the PCI front end via memory space (conditionalized on a patchable kernel
variable), and do a bit of other random NetBSD-specific cleanup.  (These
changes were sent to Justin Gibbs on March 28.)
1997-04-10 02:48:38 +00:00
jonathan f11d74c508 Remove IFF_LINK[01] "connector" support.
Add if_media support.   Still missing a software autosense FSM.
1997-04-07 23:49:47 +00:00
scottr d7a6762ae8 Fix a debugging printf() format. 1997-04-07 16:28:26 +00:00
mjacob 6d4d1f8852 Okay, Charles convinced me that XS_DRIVER_STUFFUP is better than XS_SELTIMEOUT. 1997-04-05 22:36:56 +00:00
mjacob ddc693c299 A) Attempt to get clock rate from ISP chip prior to bashing it over the head
in reset. If none there, try and get from the bus/platform specific code.
If a nonzero value for either, set the clock rate. This is why the PCI
card versions weren't working- they need to be set at 60MHZ, rather than
the default 40MHZ (which worked fine for the internal ISP chips on the
Alpha 8X00).

B) If a isp_poll returns failure (command never completed) to the caller
and no error is set in the xs struct, set XS_SELTIMEOUT. And then call...

C) Added isp_lostcmd function to try and ask the ISP chip about it's current
state as well as the state of commands for a particular target/lun. This is
going along to try and figure out why the very first command to the ISP always
seems to get swallowed up.
1997-04-05 02:53:22 +00:00
mjacob 8f28eaab67 Need a bus/platform specific clock speed variable. 1997-04-05 02:48:36 +00:00
pk c59dd873f4 Remove alignment requirement of ether_cmp(): turn it into a series of
byte comparisons. Compare the ethernet addresses backwards on the
assumption that address number byte 6 has the most random distribution,
so packets not for us spend the least time in here.
1997-04-04 22:35:36 +00:00
mycroft 9448a01404 New version of com driver. Uses a different queueing mechanism and a split
hardware/software interrupt mechanism for improved performance.  Many odd
protocols bugs also fixed.
1997-04-04 20:56:34 +00:00
mycroft 232ade1b2b comdefaultrate -> comconsrate
comconsbah -> comconsioh
Only use comconsrate on the console.
1997-04-04 20:49:49 +00:00
gwr 1614a8ad2e Always schedule a timeout before the first occasion where
we return from the driver expecting to come back due to an
interrupt, because the interrupt might not happen...
Do the untimeout in ncr53c9x_done instead of just before
almost every call to ncr53c9x_done as was done previously.
Make ncr53c9x_sense schedule its own timeout for the new
command it is starting (request sense), separate from the
timeout for the command that just completed.
1997-04-01 22:10:04 +00:00
gwr 50b0bafbbb Allow separate control over the "per-target trace" feature
via the NCR53C9X_DEBUG value.  Add some padding for m68k.
1997-04-01 22:08:18 +00:00
jonathan c1f72bba37 Add ifmedia hooks: include <ifmedia.h> and add sc_media to softc. 1997-03-30 22:47:05 +00:00
mycroft 11117540d2 Use a temporary data structure for holding probe information, rather than a
full softc.
1997-03-29 02:32:30 +00:00
mycroft 080350dc0d Use a temporary data structure for holding probe information, rather than a
full softc.
1997-03-28 23:47:08 +00:00
veego 7ae296c7de - new hardware reset hook, mainly for PCnet-ISA cards (79c960)
- new MD variable: sc_initmodemedia, 79c960 cards can select
  between two ports, but this needs to be done in the MI init mode page
- new defines for PCnet-ISA cards (79c960)
1997-03-27 21:01:50 +00:00
veego 5aa9546783 - new hardware reset hook, mainly for PCnet-ISA cards (79c960)
- new MD variable: sc_initmodemedia, 79c960 cards can select
  between two ports, but this needs to be done in the MI init mode page
- new defines for PCnet-ISA cards (79c960)
1997-03-27 21:01:49 +00:00
veego a715085e43 - new hardware reset hook, mainly for PCnet-ISA cards (79c960)
- new MD variable: sc_initmodemedia, 79c960 cards can select
  between two ports, but this needs to be done in the MI init mode page
- new defines for PCnet-ISA cards (79c960)
1997-03-27 21:01:47 +00:00
scottr b316767c92 Work around an ambiguity in the SCSI spec. Some implementations,
particularly older ones, don't do a SAVE DATA POINTER before disconnecting.
When the driver reconnects, it does an implicit RESTORE POINTERS, and
restores the data pointer from *before* the last transfer.  If the driver
calculates the residual using the data pointer and doesn't account for
this, the residual will be wrong.

What we do is test for the SDEV_AUTOSAVE quirk when we see a disconnect
message, falling through to do a SAVE DATA POINTER if the quirk applies
to this target.

The workaround was suggested by Mycroft, who also provided the explanation
of the problem.  Actual code was (mostly) ripped off from the 53C9x driver.
1997-03-27 07:30:40 +00:00
gwr 8be7d1ef9e No longer need the hack that forced SCSI_POLL when cold. 1997-03-27 01:16:01 +00:00
pk c5d5c54038 Add workaround for the "extraneous bytes after re-select" problem that
ESP100 chips may exhibit.
1997-03-27 00:29:57 +00:00
thorpej 66908db327 Resolve conflicts from merge. 1997-03-26 02:08:07 +00:00
gwr 5c88d15269 When cold!=0 force SCSI_POLL (otherwise swapconf will hang) 1997-03-24 17:16:45 +00:00
thorpej 4c03c2945d Resolve conflicts from merge. 1997-03-24 00:35:02 +00:00
cgd da14b3d856 clean up isp_poll() so that it works more correctly. (Modeled on the version
in the BusLogic driver.)
1997-03-23 00:50:07 +00:00
chuck 63c14f2d75 MAJOR CHANGES: [contributed by Chuck Cranor <chuck@ccrc.wustl.edu> and
Anne Hutton <hutton@isi.edu>]:
   - add support for Adaptec 155 PCI ATM cards (e.g. ANA-5940)
          - add sc->is_adaptec to handle differences between cards.
          - break out MID_MK_TXQ/MID_MK_RXQ seperate macros to handle
                  the new Adaptec format TXQ/RXQ.
          - adjust en_dqneed to return 1 on ADP (since the Adaptec can
                  DMA anything in one DRQ/DTQ!)
          - add hook for a bus specific reset function (adaptec has
                  a seperate reset register that needs to be hit when
                  resettting the midway).
          - adjust DMA test to not worry about burst sizes on the
                  adaptec (since it handles it all for us!) and to handle
                  the new DTQ/DRQ format.
          - add Adaptec DMA support to en_txlaunch() and en_service()


BUG FIXES:
   - fixed receiver panic under heavy load ("lost mbuf in slot 0!").
          when the reassembly buffer overflows, the T-bit is set in
          the RDB and the data field is empty.  en_service() sets up
          a 4-byte (RDB size) dummy DMA without IF_ENQUEUE.  but the
          recv intr handling in en_intr() always does IF_DEQUEUE.
          as a result, a successive recv intr loses its mbuf and
          leads to a panic.  the solution is to only IF_DEQUEUE if
          the interrupt has non-zero length (indicating that there
          is an mbuf to get).   in order for this to work, EN_DQ_MK
          must always be non-zero.   we do this by or'ing in an unused
          bit (0x80000).
                  reported by: Kenjiro Cho <kjc@csl.sony.co.jp>

   - fix setting of transmit channel when txspeed[] is non-zero
          (e.g. traffic shaping).    the old scheme didn't work
          properly (it allowed the same VCI to use multiple tx channels
          thus defeating the txspeed[] parameter).   the new scheme
          statically assigns a VC to a channel when txspeed[] is set.
          [note that the code to set txspeed[] isn't in the driver right
          now since a MI interface to do this hasn't been made yet]
          we add sc->txvc2slot[] and sc->txslot[n].nref for this.
                  reported by: Kenjiro Cho <kjc@csl.sony.co.jp>,
                                  Milind M Buddihikot <milind@ccrc.wustl.edu>,
                                  Dong Lin <dong@eecs.harvard.edu>

   - when doing SRAM copies, be sure to round up the length to the next
          largest word (otherwise the driver will try to do a byte clean
          up DMA and then get an ID error interrupt).


MINOR CLEANUPS:
   - clean up loops in DMA test
                  contributed by: Kenjiro Cho <kjc@csl.sony.co.jp>

   - restructure and cleanup of en_read/en_write macros/inlines

   - clean up some byte ordering stuff so that we are consistant throughout
          the driver
1997-03-20 21:34:42 +00:00
mycroft 7a55cafeeb Implement set_format. 1997-03-20 16:51:38 +00:00
mikel 80a8a81608 normalize off-by-four ad1848 register offsets. 1997-03-19 06:45:21 +00:00
is bde018355f Signed shifts are evil.
Thanks to Michael Smith for reporting, Jason Thorpe for pointing to the
report, doing a quick workaround which pointed me to the right code part and
for testing the final fix.
1997-03-17 18:29:56 +00:00
thorpej 0398318515 Resolve conflicts from merge. 1997-03-17 03:44:49 +00:00
thorpej 80e6765189 - Add support for media selection via if_media. If the front-end
does not supply media types, default to the "manual" type.
- Clean up the ETHER_CMP stuff slightly.
- Keep track of our carrier status, for media status requests.
1997-03-17 03:14:03 +00:00
is 07b064e02e New ARP system, supports IPv4 over any hardware link.
Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
1997-03-15 18:09:08 +00:00
mikel 8147d1718f fix various AD1848/PSS misfeatures; from Jason Baker in PR kern/2045.
also did some misc cleanup of my own.
1997-03-13 08:34:49 +00:00
mycroft 919efaeb60 Make the microcode table const. 1997-03-13 03:33:03 +00:00
mycroft ac3b8b13b7 Don't share the silence block between devices. Make silence filling work for
more encodings, and make it device-independent.  From Lennart Augustsson, in
PR kern/3305.
1997-03-13 02:19:32 +00:00
cgd 4c654c0acf fixes from Matt Jacob so that these can compile and run on the Alpha.
(aic7xxx has been tested and works on the Alpha, bha has not yet been
tested on thne Alpha.)
1997-03-13 00:38:48 +00:00
cgd cf26d31ad2 NetBSD RCS ID tweaks, a few comment block tweaks. Also, make copyright
notices consistent (per Matt Jacob).
1997-03-12 21:06:41 +00:00
cgd 099e30a322 ISP 10x0 driver from Matthew Jacob of NASA Ames Research Center.
(March 12, 1997 version).
1997-03-12 20:44:50 +00:00
cgd 9753d8f7a5 properly #define MC_REGB_SQWE. From Matt Jacob 1997-03-12 06:53:42 +00:00
chuck 7df0dbdd33 minor fixes to freebsd code sections from Kenjiro Cho <kjc@csl.sony.co.jp>
get ready to add support for adaptec version of midway card (which
has a different DMA interface).
1997-03-11 23:30:19 +00:00
leo 3d849b9429 - Turn the sc_[tr]bufaddr fields into arrays of addresses instead of just
the base address. This allows for a more flexible layout of buffers
  in the Lance's memory.
- Add a new element 'sc_saved_csr0' to am7990_softc. It's value is or-ed
  with the current csr0 value in the am7990_intr() function. This allowes
  for a 'deferred' interrupt sceme.
1997-03-09 21:12:39 +00:00
mikel a71e39e5d5 fix some spelling errors noticed by Charles Kane <ckane@mipos2.intel.com>.
fix some more noticed by myself; all are in comments or strings.
1997-03-09 06:10:32 +00:00
mycroft e481e52aa9 Fix a couple of splhigh()s that should be splbio(). 1997-03-04 21:42:32 +00:00
briggs 2163898eeb Add the 53c96 variant. 1997-02-27 13:59:32 +00:00
thorpej dd89d8fd78 Machine-independent NCR 53c9x SCSI driver, derived from the SPARC/Alpha
versions.  Thanks to Chris Demetrious and Paul Krannenburg for the
initial work towards merging the two.
1997-02-27 01:12:07 +00:00
gwr 9f53f9825f Use sc_no_disconnect (per-target) instead of NCR5380_PERMIT_RESELECT. 1997-02-26 22:23:48 +00:00
gwr 07378343ed Add the new member "sc_no_disconnect" to ncr5380_softc, and
remove NCR5380_PERMIT_RESELECT.
1997-02-26 22:22:13 +00:00
gwr 4dd31a28f0 Integrate fix for rude targets that transfer more data than requested.
(From Matthias Pfaller).
1997-02-26 20:31:16 +00:00