Commit Graph

190 Commits

Author SHA1 Message Date
jonathan 558e40fb86 Remove duplicate of sys/dev/dec/clockvar.h. 1998-04-19 06:11:55 +00:00
thorpej b9db388b0f don't use variables declared _inside_ DEBUG in code _outside_ DEBUG 1998-03-26 00:49:03 +00:00
mhitch 8adf8abfea Enable another error message before the driver reboots the machine. It was
not being printed if not compiled with DEBUG.  Now all situtiations where
the driver gives up should display a message before the reboot.
1998-03-24 20:49:22 +00:00
thorpej 8354e68508 Remove "class" declarations, and add "devclass" declarations where
appropriate.  Fix several inconsistencies between device class and
attributes.  Mostly from Chris Demetriou.
1998-02-16 22:12:45 +00:00
thorpej cec1781573 Regen. 1998-01-30 02:25:28 +00:00
thorpej 8b75f90a86 Add entries for the PMAZ-DS and PMAZ-FS (Flamingo Turbochannel Dual SCSI
baseboard devices, normal and fast), and the PMAZB-AA and PMAZC-AA
(Turbochannel Dual SCSI option cards, normal and fast).
1998-01-30 02:24:58 +00:00
thorpej 8454673f87 Add "get this slot's DMA tag" function pointer on the Alpha. 1998-01-19 02:51:40 +00:00
thorpej b5d3e43553 On the Alpha, pass down per-slot DMA tags to children. 1998-01-19 02:50:58 +00:00
thorpej 0546538aa8 Don't prototype ioasic_lance_dma_setup() on the Alpha. 1998-01-19 02:50:19 +00:00
thorpej e1fed5afa0 Make sure the LANCE DMA area has been allocated, and don't call
ioasic_lance_dma_setup() on the Alpha; the DMA area is allocated differently
on that platform now.
1998-01-19 02:49:48 +00:00
thorpej 19feaef2b4 Adjust for changes in config. 1998-01-12 09:51:28 +00:00
thorpej 884cc096ca Regen. 1998-01-09 06:56:47 +00:00
thorpej 8735ce36ca Put RCS IDs into generated files, in the correct place. 1998-01-09 06:56:23 +00:00
thorpej 22aef93dcd Regen: back out RCS ID related changes. 1998-01-08 00:36:12 +00:00
thorpej b0a69d357f Back out RCS ID related changes. 1998-01-08 00:35:35 +00:00
perry 736c62507d regened with RCSIDs in place 1998-01-05 19:38:41 +00:00
perry e6fe83471e make script insert RCS ids into generated files 1998-01-05 19:37:08 +00:00
mhitch f018043286 Fix driver bug when using an RZ23 (and very likely any other drive that
does a "restore data pointers" when reselected after disconnecting in
the middle of a DMA transfer).  The driver needs a different way to know
which script to continue the DMA transfer.  The message-in for the "restore
data pointers" loses the original "resume" script, and the driver would
attempt to continue the DMA transfer at the beginning of the current DMA
chunk, rather than at the point the disconnect occured.  The result was a
spurious console message, and a trashed filesystem.
1997-11-28 18:23:38 +00:00
jonathan b8636b832f chipset driver for DEC pixelstamp and STIC (stamp Interface chip). 1997-11-11 04:47:57 +00:00
jonathan 0bdc6f10b9 Commit `pacifier' driver for turbochannel PMAG-C option card:n
just acknowledge interrupts from the PMAG-C.
1997-11-08 07:27:49 +00:00
jonathan 7fb01f01ae Print TC bus speed properly when attaching device, since the SCSI
clock is taken (and computed) from the TC bus clock.  See PR 4380.
1997-10-31 06:29:59 +00:00
enami 0f0563f57f Declare TCVERBOSE by defopt in files.tc. Include opt_tcverbose.h in tc.c. 1997-09-13 08:52:23 +00:00
jonathan f6914cd0c8 Remove '#ifdef alpha' around bus_space_tag_t uses and includes. 1997-09-01 08:09:28 +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
jonathan 752582ba69 Set KERNEL_RCSID to identify previous change. 1997-08-26 02:38:47 +00:00
jonathan 6cd95f2a55 rewrite and hand-tune copy_gap16 loops:
* hoist code to deal with  fragments of a 16-byte chunk outside
    main copy loop.
  * over 98% of dynamic calls are 2-byte-algnied but not 4-byte-aligned
   (due to 14-byte Ether headers).  kernel bcopy is poorly tune for this.
   Replace bcopy() with  inline code tuned to  minimize accesses
   to DMA buffers, which aren't uncached on mips.

Tested on 5000/240 (3MAXPLUS) and 3000/700 (sandpiper) (mjacob@feral.com)
1997-08-26 01:27:12 +00:00
mhitch 0ae3de1a27 Use direct DMA with the IOASIC ASC SCSI interface. DMA buffering can be
re-enabled with ASC_IOASIC_BOUNCE.
All DMA buffered processing is now done in the bus-specific DMA routines
in asc_ioasic.c and asc_tc.c.
Disable several informational messages dealing with non-empty FIFO conditions,
but allow enabling with ASC_DIAGNOSTIC for troubleshooting.
1997-07-28 19:39:22 +00:00
jonathan 787738a4f7 Move sys/dev/tc/mcclockvar.h -> sys/dev/dec/mcclockvar.h.
Update pmax clock code.
1997-07-22 07:51:33 +00:00
jonathan 064c4e515c Create sys/dev/dec and cleanup sys/dev/tc:
* Move clockvar.h (header file for generic clock code) to sys/dev/dec.
* Move if_le_dec.c with DEC padded LANCE-dma (pmax/pmax, ioasic, vax 3400)
  to sys/dev/dec.  Remove from sys/dev/tc.
* Declare attribute le_dec_subr in /sys/dev/dec/files.dec,
  use if_le_dec.c when it's defined.
* Move  IOCTL asic declaration from pmax and Alpha MD machine
  files to sys/dev/tc/files.tc.
* move TurboChannel and ioasic if_le attachments from pmax and Alpha machine
  config files to /sys/dev/tc/files.tc.  Add le_dec_subr attribute.
* Add if_le_dec attribute to if_le_ibus (pmax ds3100 pmax) LANCE attachment.
1997-07-22 04:32:13 +00:00
jonathan 38e9259a81 Garbage-collect __BROKEN_INDIRECT_CONFIG from /sys/dev/tc 1997-07-22 03:44:29 +00:00
jonathan 4631885e91 Kill __BROKEN_INDIRECT_CONFIG on pmax.
Based on a patch from Chris G. Demetriou, December 1996.
1997-07-21 05:39:02 +00:00
pk 7d0e8e2116 config.new => config 1997-07-20 20:32:14 +00:00
jtk a541bca95a use locator defines in "locators.h" to index cf_loc[]
still to be done and/or decided not to be done: replace all
TCCF_*_UNKNOWN uses in tc code with the native names from locators.h
1997-07-17 01:12:41 +00:00
jonathan 046c2a56df Clone Alpha ``cpu-independent'' clock API headers into sys/dev/tc/,
to share them with pmax.
1997-06-22 08:02:18 +00:00
jonathan 1f44934407 * Change Sprite MACH_xxx prefix to MIPS_xxx.
* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
  (more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
1997-06-22 07:42:25 +00:00
mhitch 70590de547 Changes for merged mips1/mips3.
Replace MachHitFlushDCache with mips3_HitFlushDCache.
1997-06-21 04:06:11 +00:00
jonathan 0bca2bff6d include <machine/bus.h>. 1997-06-16 03:46:29 +00:00
mhitch ef2beab3d7 More merged MIPS1/MIPS3 support. 1997-06-15 18:24:05 +00:00
mhitch 0bf6ea4387 DECstation MIPS3 support: wbflush() is cpu-dependent, need declaration from
machine/locore.h.
1997-06-15 18:23:02 +00:00
mhitch c108a0ce0b Fix another weird driver state. After sending the SCSI command to the target
after synch negotation during device probes, the 53C94 stops with the target
reqesting more command data.  The fifo appears to still contain a couple of
bytes, so transfer them.  If the target still wants command data after that,
do a transfer pad.  The target seems to function normally after this.  A
much better solution thant simply rebooting!
Also fix a problem when compiling with DIAGNOSTIC - a mismatch between using
DIAGNOSTIC and MACH_DIAGNOSTIC caused the compile to fail.
Try to start another target and a device disconnects.
1997-06-07 05:10:42 +00:00
jonathan 84f22cdf55 lint: delete unused variables. 1997-05-25 05:48:14 +00:00
jonathan 3bdc896e84 lint: fix %x vs pointer and tyops in error-logging printfs. 1997-05-24 09:48:53 +00:00
jonathan 7fcfe9e0f5 Print explanatory message before each panic, or "goto abort" (which panics). 1997-04-07 03:21:14 +00:00
cgd 2677cb7ed8 clean up NetBSD RCS ID strings 1997-04-07 00:18:51 +00:00
jonathan 2f1aae7d37 Commit message for previous revision (lost due to Ultrix-compat bug):
* Don't print DMA_OUT message in the `normal' case of a 16-byte residual.
* ioasic-connected 53c94 devices are always clocked  at 25MHz even on
  machines with 12.5MHz TurboChannel.
1997-04-06 10:07:54 +00:00
jonathan 055fff0581 *** empty log message *** 1997-04-06 09:58:30 +00:00
mhitch cb3b852a7f A couple of missed boot() -> cpu_reboot() changes. 1997-03-29 05:03:01 +00:00
thorpej 4c03c2945d Resolve conflicts from merge. 1997-03-24 00:35:02 +00:00
thorpej 1d987a161b #include <net/if_media.h> 1997-03-17 03:17:34 +00:00
cgd d611773458 fix botches in is's new ARP changes 1997-03-15 21:06:09 +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
cgd 711939bcf4 add a bunch of commented-out, unconfirmed entries, based on data from
a "Smart Frame Buffer TURBOchannel Module" user's manual(?), and from
some "DECstation 5000 Model 240 Options and Upgrades" guides found
while cleaning out my office.
1997-02-05 22:14:18 +00:00
thorpej 55acc3ffb3 Fill in sc_link.max_target 1996-12-10 21:57:17 +00:00
cgd 197d80c63a update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.
1996-12-05 01:25:23 +00:00
cgd 2f614ee518 update for new bus.h 1996-10-22 21:34:19 +00:00
christos 86373f8cf9 backout kprintf changes 1996-10-13 01:37:04 +00:00
mhitch 184eb4a5e9 Remove extraneous output - ascattach() already did it. 1996-10-12 16:15:34 +00:00
christos b5c4f2fc49 printf -> kprintf, sprintf -> ksprintf 1996-10-10 20:25:34 +00:00
jonathan 9b84ee7f35 Fix data-corruption bug on async targets:
*  When we are transferring in DATA (in asc_dma_in) and the target
  is an async device, there is sometimes an extra byte in the FIFO.
  If so, we need to drain that byte out of the fifo, but if and only
  if the target is async.  See also the comments in asc_dma_in()
  in the related Mach mk84 asc driver (scsi_53C94_hdw.c), which
  has an identical fix but applied in more restrictive conditions
  than we need, with async *disk* targets, as well as async tapes.

* Add a watchdog and timeout active SCSI requests, to eliminate any
  potential for deadlock due to applying the fix above on newer
  silicon versions of the 53c94 which may not have the above problem.
  Should use the MI scsi per-target timeout instead, when available.
1996-09-29 03:02:19 +00:00
jonathan 8eca2b2bb4 * Rewrite asc driver with ``mi'' backend and parent-specific front-end
cfattach code for TC SCSI option cards  and ioasic 53c94 baseboard SCSI.
    ascvar.h:  shared softc  declarations
    asc_ioasic.c: ioasic front-end code.
    asc_tc.c: Turbochannel option (and 5000/200 basebard) front-end code.
* ioasic_attach meeds more work to eliminate pmax_type dependency
   and to verify the clocks speed passed to 53c94.
* Add prototypes for asc script entry points; should compile with
  -Wstrict-prototypes -Wmissing-prototypes.
* Use tcvar.h interface.  The usage of tc_syncbus() and tc_mb() may
  not be quite stylistically on an Alhpa, but it apparently makes no
  difference on the eerly-generation Alpha CPUs in TC Alphas.
1996-09-25 21:07:46 +00:00
cgd 6891e01ba2 add missing underscore to __alpha_, to map interrupt names properly.
It worked right before because of happy coincidence.
1996-09-09 16:39:44 +00:00
cgd 71ad30d0e9 (1) set scsi_link channel to either the appropriate channel (if a
multi-channel driver), or to SCSI_CHANNEL_ONLY_ONE if a
    single-channel driver.
(2) use scsiprint() rather than a locally-defined autoconfig print
    function, and kill any locally-defined print function.
1996-08-28 18:59:15 +00:00
cgd 2a73ef60b7 change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).
1996-08-27 21:53:46 +00:00
cgd d32f475ed4 regen for new tcdevs 1996-08-26 23:41:46 +00:00
cgd 3076d34c84 add entries for DGLTA-FA and OTTO ATM boards, alphabetize and clean up
other entries.
1996-08-26 23:39:34 +00:00
mrg 5abbf990f3 Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models.  It is currently silently ignored on all other
hardware now, however.  The MD function "boot()" has been changed to
also take a char *.
1996-08-09 10:30:23 +00:00
mhitch ebe82deed0 Remove the "goto abort" (which currently reboots the machine) when the
FIFO is non-empty when the message-in phase occurs before the DMA output
starts.  This showed up on a Micropolis drive.
1996-07-30 06:18:40 +00:00
mhitch e4de48ff39 Don't flush the 53C94 fifo when starting dma_in. The fifo data is valid
at that point, and flushing the fifo will hang the system.
1996-07-16 15:20:38 +00:00
mhitch cc47447cfc Try to avoid collisions with reselection when starting a new selection.
Enable reselections as soon as possible after a disconnect - prevents
losing a reselecting device.
Check for and ignore a spurious interrupt during a DMA input (from the
Mach driver).
1996-06-11 05:15:32 +00:00
cgd 825e13fec1 fix bogus comment pointed out by Mike Grupenhoff <kashmir@umiacs.UMD.EDU>.
C-style comments aren't legal in awk (except in gawk, apparently).
1996-06-05 18:32:19 +00:00
mhitch 3a8d18d828 Fix the oversight that the ASC SCSI adapter can also be on the
Turbochannel as well as the IOASIC.  It should now work on the 5000/200.
Removed the "aborts" which could leave the disk trashed when the abort
rebooted the system.  Fix the data corruption problem by clearing the
FIFO before starting a data transfer.
1996-06-04 21:08:24 +00:00
mhitch 40b6370ffb Fix the DECstation ASC SCSI driver autoconfiguration to more closely
match the alpha.  The DS3100 will now configure properly.  Also fix
the name in the cfdriver structure - somewhere it got changed from
"asc" to "as".
1996-05-29 06:32:38 +00:00
jonathan b314e27cfa Add #include of pmax/kn01var.h, remove unused variables, and close
hanging block comment in copyright to satisfy -Wall.
1996-05-20 23:19:16 +00:00
thorpej bc16409b49 Remove some extra printfs, now that Matt has lessened my confusion. 1996-05-20 15:52:32 +00:00
jonathan d1e0e11f70 * Fix formatstr/argument mismatches in diagnostic printf()s.
* Change MachEmptyWriteBuffer() to wbflush(). Should  use TC mi names tc_mb(),
  tc_wmb, tc_syncbus() but I'm not sure which each wbflush() should be.
* Add prototyped forward decl for asc_Dumplog() and add an explicit void
  return type.
* Remove unused variables.
1996-05-20 09:46:21 +00:00
jonathan 4e27f8ef06 Fix braino in initialization of confargs pointer in le_pmax_attach(). 1996-05-20 03:43:15 +00:00
jonathan b3c6ba5b5d Decstation 3100/2100 baseboard configuration stub for the LANCE driver
for DEC  TURBOchannel and IOCTL ASIC machines.
1996-05-20 02:25:08 +00:00
cgd 6793f08d00 regen for new tcdevs file 1996-05-20 01:34:50 +00:00
cgd 014cc0e804 add entry for DEFTA FDDI, clean up entry for DEFZA FDDI. 1996-05-20 01:33:45 +00:00
cgd ac61f1ad21 fix first argument to tc_intr_establish()... it's still the pointer
to the parent device.
1996-05-20 01:31:07 +00:00
thorpej 37b3b8a758 Add the DEFTA FDDI controller. 1996-05-20 00:45:02 +00:00
thorpej 38db93c012 Display model string during attach. 1996-05-20 00:35:16 +00:00
thorpej e5106dfb88 Update to the Digital Equipment PDQ-based FDDI controllers, from
Matt Thomas.  Now includes support for EISA (DEFEA) and first-cut of
support for TurboChannel (DEFTA) cards.
1996-05-20 00:20:39 +00:00
cgd 2872eeccac (on the alpha) pass the bus_chipset_tag_t given to the bus down to the
devices.
1996-05-17 23:39:19 +00:00
cgd af446a907a Update for new includes (<machine/bus.h> & <machine/intr.h>) on the
alpha.  At some point in the future, those headers should be provided
on the pmax, but until then, things are #ifdef'd so that the old
headers and definitions are still used.  Pass a bus_chipset_tag_t
to the TC bus attach code and to devices, on the alpha.
1996-05-17 23:38:16 +00:00
cgd d06c5d12db regen for new tcdevs 1996-05-09 21:44:24 +00:00
cgd 8824617eb3 add some entries for the sfb+ 1996-05-09 21:35:27 +00:00
thorpej 13e808bbd8 Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 02:24:54 +00:00
cgd 48fca88c3a fix printf bogon (need : and space) 1996-04-29 16:06:38 +00:00
christos b57c554d06 Add a hardware dependent initialization function lehwinit() 1996-04-22 02:53:28 +00:00
cgd 720c148692 remove unnecessary header inclusion (machine/autoconf.h) and now-bogus comment.
also, trim spaces at ends of lines, etc.
1996-04-18 01:12:41 +00:00
cgd f8073d3675 restructure to take advantage of config's (relatively) new 'attach'
specifiers.  Many #ifdefs and much other nastiness removed.
1996-04-18 00:50:11 +00:00
cgd d7d306aeb7 change LANCE copy & zero functions' names to start with amd7990_, and
remove their 'integrate' (usually defined to be 'static') keywords.
when lance drivers are split up by attachment, more than one file will
reference the copy/zero functions (i.e. not just the file that pulls in
am7990.c... and eventually inclusion of am7990.c should go away entirely).
1996-04-18 00:25:11 +00:00
cgd 17731baa0d fix copyrights 1996-04-17 22:22:32 +00:00
cgd 71c7924099 clean up clock handling: clock drivers are now seperate from the
chip-independent clock code.  'clock' has been renamed 'mcclock'  'clock'
has been renamed 'mcclock' (since it's a driver for that particular
clock, and since eventually there may be another clock chip driver),
and now attaches via seperate match/attach functions to both TC and ISA.
This removes a whole lot of #ifdefs...
1996-04-17 22:01:16 +00:00
jonathan 57fd0e266b Fixes for -Wall -Wmissing-prototypes:
include <sys/systm.h> to get a prototyped declaration of printf().
	include <machine/autoconf.h> for port-specific typedefs.
	Remove unused variables.
1996-04-09 20:50:06 +00:00
jonathan 45b229da22 fixes for -Wall -Wmissing-prototypes:
prototype the forward declaration of lewritereg().
1996-04-08 20:09:56 +00:00
jonathan 2bd6015194 Fixup after the "New device attachment scheme": change {mainbus,tc,ioasic}cd
to {mainbus,tc,ioasic}_cd.

Change ioasic config name from "lance   " to "lance". Correct for
pmaxes, perhaps not for Alphas.

Boots and runs under load on a 5000/200. Hangs during boot on an ioasic
decstation; pmax  autoconfig needs fixing.

Add Decstation-3100 baseboard support (untested).
1996-03-26 13:44:07 +00:00
jonathan 5bccfd6764 Additional fixes to complete the NetBSD/1.1B config changes:
Add new device-attach struct cfattach asc_ca and struct cfdriver asc_cd.
Change cfdriver references from "XXXcd"  to "XXX_cd".
1996-03-18 01:39:47 +00:00
jonathan 3175cdba0b Additional fixes to complete the NetBSD/1.1B config changes:
change tc_submatch() to compile with the new device-attach scheme:
the TC bus uses a 'submatch' function which checks device locators
and then calls a match function.
Instead of calling cf->cf_driver->cd_match(), we now need to call
cf->cf_attach->ca_match().
1996-03-17 22:09:17 +00:00