History log of /netbsd-current/sys/arch/mac68k/obio/esp.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.64 15-Aug-2022 rin

Rework avdma to fix PR port-mac68k/56131 as well as add synchronous
transfer support.

According to analysis by Michael Zucca, PSC (DMAC for Quadra/Centris AV)
seems to require that DMA buffer is
(1) aligned to 16-byte boundaries, and
(2) multiple of 16 bytes in size.
If the buffer does not satisfy these constraints, esp.c rev 1.63 and
prior carry out partial PIO to align or shave off it.

However, partial PIO does not always work correctly for combination of
NCR53C94 and PSC, which results in failures observed as port-mac68k/56131.

Also, PIO spoils synchronous transfer, which is timing critical.

Therefore, for buffers that do not satisfy the boundary conditions,
completely stop using PIO and use DMA with ``bounce'' buffers.

This fixes port-mac68k/56131 and enables sync transfer as a big bonus.

Note that bounce DMA does not hurt performance at all. For filesystem
and swap I/O, buffers always satisfy the constraints above, and bounce
DMA is necessary only
(a) when disk is attached, or
(b) for special utilities like fsck(8) or fdisk(8),
as far as I can tell.

Also:

- Stop providing ``DMA-friendly'' sc_imess and sc_omess; transfer for
MSGIN or MSGOUT does not almost certainly satisfy boundary condition
(2). Again, this does not affect performance at all.

- SCSI bus frequency is 20MHz (i.e., 5MB/s for sync transfer) for AV
models, according to ``Quadra 840AV Service Source''.


# 1.63 15-Aug-2022 rin

Remove stray newline. No binary changes.


# 1.62 15-Aug-2022 rin

For avdma, bus_dmamap_create(9) with nsegments = 1, as PSC supports
only one physically contiguous segment in a single DMA transaction.

Slightly improves performance.


# 1.61 15-Aug-2022 rin

Minor cosmetic changes. NFC.

- Use switch instead of if-else-if chain.
- Dedup codes a bit.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.60 22-Feb-2021 rin

Elucidate why synchronous transfer is disabled for AV Macs.

Sync negotiation times out when drive advertises that capability:

----
sd1 at scsibus0 target 1 lun 0: <codesrc, SCSI2SD, 6.0> disk fixed
sd1: 16384 MB, 2088 cyl, 255 head, 63 sec, 512 bytes/sect x 33554432 sectors
sd1: sync (160.00ns offset 15), 8-bit (6.250MB/s) transfers
...
sd1(esp0:0:1:0): esp0: timed out [ecb 0x9f7fc4 (flags 0x1, dleft 8, stat 0)], <state 5, nexus 0x9f7fc4, phase(l 1, c 1, p 1), resid 8, msg(q 0,o 80) DMA active>
sd1(esp0:0:1:0): sync negotiation disabled
sd1(esp0:0:1:0): esp0: timed out [ecb 0x9f7fc4 (flags 0x41, dleft 8, stat 0)], <state 5, nexus 0x9f7fc4, phase(l 1, c 1, p 1), resid 8, msg(q 20,o 80) DMA active> AGAIN
sd1: async, 8-bit transfers
----

This is observed for real SCSI drives as well as SCSI2SD (rev 6.0).

Note that this is not a fallout from DMA patch for AV Macs; timeout
takes place even if ``avdma'' code is forcibly disabled.

No binary changes.


# 1.59 22-Feb-2021 rin

- Add missing \n's to printf(9).
- Whitespace fixes.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.58 23-Jul-2019 rin

branches: 1.58.10;
PR port-mac68k/24883

Support DMA xfer for SCSI adapter of AV Mac (660/840AV), written by
Michael Zucca.

This improves disk I/O performance by nearly one order of magnitude.
In addition, interrupt storm due to heavy disk PIO is resolved.

I'm deeply grateful to Michael Zucca for his analysis of DMA engine
and submission of PR. I also thank Izumi Tsutsui (useful comments on
port-mac68k@) and Martin Husemann (test on 660AV).


# 1.57 23-Jul-2019 rin

PR port-mac68k/24883

Style-only changes in preparation to import AV DMA code:

- G/C unused from esp_softc
- clean up headers:
- prefer <sys/bus.h> over <machine/bus.h>
- G/C unused
- sort
- staticify private functions and variables
- stop using inline qualifier for functions called via function pointers
- use C99 initializer
- provide bus_space_vaddr(9) and use it, instead of using member of
bus_handle_t directly
- use uint*_t:
- u_char --> uint8_t
- u_int*_t --> uint*_t
- use proper names from ncr53c9xreg.h instead of magic numbers
- and some KNF, and etc.

No functional changes intended.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.56 08-Jan-2019 jdolecek

no need to include <machine/param.h> if <sys/param.h> already included


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3
# 1.55 18-Feb-2012 rmind

branches: 1.55.38; 1.55.40;
Replace few simple_lock(9) cases.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.54 02-Aug-2011 uebayasi

branches: 1.54.2; 1.54.6;
ncr53c9x was converted to use mutex(9), follow that. Fix DEBUG build too.


# 1.53 02-Aug-2011 uebayasi

Include sys/simplelock.h to use simple_lock(); fix build.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 jym-xensuspend-base
# 1.52 23-Nov-2009 rmind

Use lwp_getpcb() on m68k ports, clean from struct user usage.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.51 02-Jun-2008 hauke

esp_quick_dma_go() gets called from the MI ncr53c9x_intr() handler,
which protects itself against multiple invocation with a
simple_lock. Follow the example of ncr53c9x_poll() for servicing an
interrupt that came while we run in splhigh(), and 'manually' unlock
the MI handler for calling ncr53c9x_intr().

Fixes PR mac68k/38758.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base
# 1.50 13-Apr-2008 tsutsui

branches: 1.50.2; 1.50.4; 1.50.6;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.49 17-Oct-2007 garbled

branches: 1.49.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.48 08-Jun-2007 tsutsui

branches: 1.48.10;
On my LC630 64KB DMA xfer causes timeout errors
so limit sc_maxxfer size to 63KB.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.47 07-Mar-2007 tsutsui

branches: 1.47.2; 1.47.4; 1.47.10;
Previous fix is not correct. sc_dmaaddr is actually
pointer against pointer, so just use proper casts
rather than bogus void pointers.


# 1.46 05-Mar-2007 he

Add two instances of an overlooked indirection.


# 1.45 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.44 08-Mar-2006 lukem

branches: 1.44.14; 1.44.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.


Revision tags: yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.43 24-Dec-2005 perry

branches: 1.43.4; 1.43.6; 1.43.8; 1.43.10;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile


# 1.42 24-Dec-2005 perry

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.41 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.40 16-Jun-2005 jmc

branches: 1.40.2;
Fixes for volatile problems


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.39 05-Mar-2005 chs

use attach args instead of dv_unit, just like cf_unit.


Revision tags: yamt-km-base2 yamt-km-base
# 1.38 19-Jan-2005 chs

branches: 1.38.2;
only one of the obio locators was actually used, so get rid of the others
and collapse the two variations of obio into one. use the remaining locator
("addr") to differentiate the two possible esp and sbc devices (instead of
using the unit number).


# 1.37 15-Jan-2005 chs

branches: 1.37.2;
really ansify.


# 1.36 15-Jan-2005 chs

de-__P, remove register, ansify, b* -> mem*.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.35 15-Jul-2003 lukem

__KERNEL_RCSID()


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.34 02-Oct-2002 thorpej

branches: 1.34.6;
Use CFATTACH_DECL().


# 1.33 27-Sep-2002 thorpej

Declare all cfattach structures const.


# 1.32 27-Sep-2002 provos

remove trailing \n in panic(). approved perry.


Revision tags: gehenna-devsw-base
# 1.31 30-May-2002 thorpej

Don't use multi-line string literals.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.30 18-Nov-2001 briggs

branches: 1.30.8;
Correct operation of non-pseudo-DMA mode. Used on 660 & 840 AV models.
From Takeshi Shibagaki<ie9t-sbgk@asahi-net.or.jp>.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.29 25-Apr-2001 bouyer

branches: 1.29.2; 1.29.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.28 18-Jan-2001 briggs

branches: 1.28.2;
Handle the TRPAD case a little better.
Also, if the so-called DMA operation is a write and ends without target-
complete set, count the data in the FIFO as residual and add that to the
amount in the counters. Hauke Fath reports that this passes early testing
on his Quantum Viking.


# 1.27 29-Dec-2000 briggs

Do not try to second-guess the ncr53c9x driver by setting *dmasize to 0
if it is 64k. TCL and TCM will be set properly if we just leave it alone.
Not only that, the ncr53c9x driver issues TRPAD or TRANS based on this
value. We do not want TRPAD in this case!


# 1.26 29-Dec-2000 briggs

Rework the esp driver a little bit to improve performance. This requires
an ugly bit where we record the value of a2 while handling a "nofault" bus
error in locore.s in order to know how far the transaction got before a
disconnect (see esp.c comments for more details on this).
Also get rid of a loop (and delay()!) in the interrupt routine--hinted at
and researched by Chas Williams <chas@cmf.nrl.navy.mil>.


Revision tags: netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.25 05-Jun-2000 nisimura

branches: 1.25.2;
Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.


Revision tags: minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base scottr-mac68k-wscons-base
# 1.24 19-Oct-1999 thorpej

branches: 1.24.4;
Program the 53c96's interrupt routing info into the VIA before doing
anything that might cause an interrupt (e.g. the SCSI bus reset in
ncr53c9x_attach()). If we don't do this, the initial interrupt is
lost, thus causing the state machine to never enter IDLE state, thus
causing SCSI commands to never be executed.

Fixes kern/8544, reported by Erik Bertelsen <erik@mediator.uni-c.dk>.


Revision tags: chs-ubc2-base
# 1.23 27-Jun-1999 briggs

branches: 1.23.2; 1.23.4; 1.23.6;
Undo some of my recent changes that were misguided.


# 1.22 09-Jun-1999 briggs

Remove some register declarations.
Get Q9x0 dual SCSI at least basically working.
Be paranoid about some register reads.


# 1.21 01-Jun-1999 briggs

Raise spl4 to spl6 in quick_go--I am now experimenting with interrupts
at levels 5 (sound) and 6 (via1) on the Q700.
Raise splhigh when reading and writing registers. It's ugly, but it's
possible that we could get an interrupt from a higher-level source,
causing a re-read of a memory location.
This is not good when, e.g., we are reading the interrupt register.
Ideally, we would just raise splhigh() in ncr53c9x_readregs(), but
that's m.i. code, and it may be expensive on other architectures.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.20 22-Dec-1998 scottr

branches: 1.20.2; 1.20.6;
vm_offset_t -> {paddr_t, vaddr_t}


Revision tags: kenh-if-detach-base
# 1.19 19-Nov-1998 thorpej

Adapt to the new scsipi_adapter interface.


Revision tags: chs-ubc-base
# 1.18 10-Oct-1998 thorpej

Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.


# 1.17 05-Sep-1998 pk

Relinquish my copyright claims on this file.


Revision tags: eeh-paddr_t-base
# 1.16 09-May-1998 briggs

Get both SCSI busses operational on the Q900 and Q950.


# 1.15 02-May-1998 scottr

Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.


# 1.14 12-Jan-1998 thorpej

Update for changes to config.


# 1.13 19-Nov-1997 briggs

* Disable parity checking on all devices until we find a better way to
deal with cheap CD-ROMs and other devices that do not appear to have
any way to enable parity generation. In the future, it might be nice
to have this configurable on a per-device basis with back-to-back
parity errors automatically disabling parity for the device. That
would require some MI changes.
* Handle unaligned and odd-length transfers.
This could probably be handled better in the future.


# 1.12 05-Nov-1997 briggs

A first cut at faster SCSI for non-AV quadras. Could probably perform better,
but is a marked improvement. This takes advantage of a pseudo-DMA hardware
hack of Apple's that exposes a 16-bit register that the Apple-designed
memory controller acts like a DMA controller and handshakes into or out
of the FIFO. Wierd.


# 1.11 27-Aug-1997 bouyer

branches: 1.11.4;
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.


# 1.10 05-Mar-1997 briggs

branches: 1.10.2; 1.10.4;
Copyright foo.


# 1.9 01-Mar-1997 scottr

Fix prototype for espmatch()


# 1.8 28-Feb-1997 scottr

Convert to generalized VIA interrupt registration


# 1.7 27-Feb-1997 briggs

mac68k-specific portion of m.i. ncr53c9x driver.


# 1.6 16-Dec-1996 scottr

branches: 1.6.6;
Convert all foo_match() functions to use a `struct cfdata *' for their
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.


# 1.5 10-Dec-1996 thorpej

Fill in sc_link.max_target


# 1.4 04-Nov-1996 briggs

- Move offset for 2nd scsi controller (Q900/Q950/WGS95) to 0x402
instead of 0x400.
- Restructure interrupt handling for more performance--continue to
read/write data as long as the device keeps us in a data xfer phase.
There is still a lot of room for speed improvement here. Perhaps it
lies is speeding up the interrupt path in general?


# 1.3 02-Nov-1996 briggs

Improve reliability on my Q700, at least. Was getting the occasional
glitch--an extra byte on occasion.


# 1.2 30-Oct-1996 briggs

macs with scsibase offset 0x10000 from iobase use a SCSI CLK of 16.5MHz
(off PrimeTime)--all others appear to use 25MHz.


# 1.1 29-Oct-1996 briggs

Interrupt-driven, but slow, NCR 53c96 driver for the 040-based macs. Contains
some guesses for the machines that have two of these buggers (I don't have
such a machine). This driver is a copy of the sparc/alpha esp with a
minimum of changes--after we get it performing a bit more respectably,
we should see about re-normalizing the sources.


# 1.64 15-Aug-2022 rin

Rework avdma to fix PR port-mac68k/56131 as well as add synchronous
transfer support.

According to analysis by Michael Zucca, PSC (DMAC for Quadra/Centris AV)
seems to require that DMA buffer is
(1) aligned to 16-byte boundaries, and
(2) multiple of 16 bytes in size.
If the buffer does not satisfy these constraints, esp.c rev 1.63 and
prior carry out partial PIO to align or shave off it.

However, partial PIO does not always work correctly for combination of
NCR53C94 and PSC, which results in failures observed as port-mac68k/56131.

Also, PIO spoils synchronous transfer, which is timing critical.

Therefore, for buffers that do not satisfy the boundary conditions,
completely stop using PIO and use DMA with ``bounce'' buffers.

This fixes port-mac68k/56131 and enables sync transfer as a big bonus.

Note that bounce DMA does not hurt performance at all. For filesystem
and swap I/O, buffers always satisfy the constraints above, and bounce
DMA is necessary only
(a) when disk is attached, or
(b) for special utilities like fsck(8) or fdisk(8),
as far as I can tell.

Also:

- Stop providing ``DMA-friendly'' sc_imess and sc_omess; transfer for
MSGIN or MSGOUT does not almost certainly satisfy boundary condition
(2). Again, this does not affect performance at all.

- SCSI bus frequency is 20MHz (i.e., 5MB/s for sync transfer) for AV
models, according to ``Quadra 840AV Service Source''.


# 1.63 15-Aug-2022 rin

Remove stray newline. No binary changes.


# 1.62 15-Aug-2022 rin

For avdma, bus_dmamap_create(9) with nsegments = 1, as PSC supports
only one physically contiguous segment in a single DMA transaction.

Slightly improves performance.


# 1.61 15-Aug-2022 rin

Minor cosmetic changes. NFC.

- Use switch instead of if-else-if chain.
- Dedup codes a bit.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.60 22-Feb-2021 rin

Elucidate why synchronous transfer is disabled for AV Macs.

Sync negotiation times out when drive advertises that capability:

----
sd1 at scsibus0 target 1 lun 0: <codesrc, SCSI2SD, 6.0> disk fixed
sd1: 16384 MB, 2088 cyl, 255 head, 63 sec, 512 bytes/sect x 33554432 sectors
sd1: sync (160.00ns offset 15), 8-bit (6.250MB/s) transfers
...
sd1(esp0:0:1:0): esp0: timed out [ecb 0x9f7fc4 (flags 0x1, dleft 8, stat 0)], <state 5, nexus 0x9f7fc4, phase(l 1, c 1, p 1), resid 8, msg(q 0,o 80) DMA active>
sd1(esp0:0:1:0): sync negotiation disabled
sd1(esp0:0:1:0): esp0: timed out [ecb 0x9f7fc4 (flags 0x41, dleft 8, stat 0)], <state 5, nexus 0x9f7fc4, phase(l 1, c 1, p 1), resid 8, msg(q 20,o 80) DMA active> AGAIN
sd1: async, 8-bit transfers
----

This is observed for real SCSI drives as well as SCSI2SD (rev 6.0).

Note that this is not a fallout from DMA patch for AV Macs; timeout
takes place even if ``avdma'' code is forcibly disabled.

No binary changes.


# 1.59 22-Feb-2021 rin

- Add missing \n's to printf(9).
- Whitespace fixes.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.58 23-Jul-2019 rin

branches: 1.58.10;
PR port-mac68k/24883

Support DMA xfer for SCSI adapter of AV Mac (660/840AV), written by
Michael Zucca.

This improves disk I/O performance by nearly one order of magnitude.
In addition, interrupt storm due to heavy disk PIO is resolved.

I'm deeply grateful to Michael Zucca for his analysis of DMA engine
and submission of PR. I also thank Izumi Tsutsui (useful comments on
port-mac68k@) and Martin Husemann (test on 660AV).


# 1.57 23-Jul-2019 rin

PR port-mac68k/24883

Style-only changes in preparation to import AV DMA code:

- G/C unused from esp_softc
- clean up headers:
- prefer <sys/bus.h> over <machine/bus.h>
- G/C unused
- sort
- staticify private functions and variables
- stop using inline qualifier for functions called via function pointers
- use C99 initializer
- provide bus_space_vaddr(9) and use it, instead of using member of
bus_handle_t directly
- use uint*_t:
- u_char --> uint8_t
- u_int*_t --> uint*_t
- use proper names from ncr53c9xreg.h instead of magic numbers
- and some KNF, and etc.

No functional changes intended.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.56 08-Jan-2019 jdolecek

no need to include <machine/param.h> if <sys/param.h> already included


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3
# 1.55 18-Feb-2012 rmind

branches: 1.55.38; 1.55.40;
Replace few simple_lock(9) cases.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.54 02-Aug-2011 uebayasi

branches: 1.54.2; 1.54.6;
ncr53c9x was converted to use mutex(9), follow that. Fix DEBUG build too.


# 1.53 02-Aug-2011 uebayasi

Include sys/simplelock.h to use simple_lock(); fix build.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 jym-xensuspend-base
# 1.52 23-Nov-2009 rmind

Use lwp_getpcb() on m68k ports, clean from struct user usage.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.51 02-Jun-2008 hauke

esp_quick_dma_go() gets called from the MI ncr53c9x_intr() handler,
which protects itself against multiple invocation with a
simple_lock. Follow the example of ncr53c9x_poll() for servicing an
interrupt that came while we run in splhigh(), and 'manually' unlock
the MI handler for calling ncr53c9x_intr().

Fixes PR mac68k/38758.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base
# 1.50 13-Apr-2008 tsutsui

branches: 1.50.2; 1.50.4; 1.50.6;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.49 17-Oct-2007 garbled

branches: 1.49.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.48 08-Jun-2007 tsutsui

branches: 1.48.10;
On my LC630 64KB DMA xfer causes timeout errors
so limit sc_maxxfer size to 63KB.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.47 07-Mar-2007 tsutsui

branches: 1.47.2; 1.47.4; 1.47.10;
Previous fix is not correct. sc_dmaaddr is actually
pointer against pointer, so just use proper casts
rather than bogus void pointers.


# 1.46 05-Mar-2007 he

Add two instances of an overlooked indirection.


# 1.45 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.44 08-Mar-2006 lukem

branches: 1.44.14; 1.44.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.


Revision tags: yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.43 24-Dec-2005 perry

branches: 1.43.4; 1.43.6; 1.43.8; 1.43.10;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile


# 1.42 24-Dec-2005 perry

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.41 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.40 16-Jun-2005 jmc

branches: 1.40.2;
Fixes for volatile problems


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.39 05-Mar-2005 chs

use attach args instead of dv_unit, just like cf_unit.


Revision tags: yamt-km-base2 yamt-km-base
# 1.38 19-Jan-2005 chs

branches: 1.38.2;
only one of the obio locators was actually used, so get rid of the others
and collapse the two variations of obio into one. use the remaining locator
("addr") to differentiate the two possible esp and sbc devices (instead of
using the unit number).


# 1.37 15-Jan-2005 chs

branches: 1.37.2;
really ansify.


# 1.36 15-Jan-2005 chs

de-__P, remove register, ansify, b* -> mem*.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.35 15-Jul-2003 lukem

__KERNEL_RCSID()


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.34 02-Oct-2002 thorpej

branches: 1.34.6;
Use CFATTACH_DECL().


# 1.33 27-Sep-2002 thorpej

Declare all cfattach structures const.


# 1.32 27-Sep-2002 provos

remove trailing \n in panic(). approved perry.


Revision tags: gehenna-devsw-base
# 1.31 30-May-2002 thorpej

Don't use multi-line string literals.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.30 18-Nov-2001 briggs

branches: 1.30.8;
Correct operation of non-pseudo-DMA mode. Used on 660 & 840 AV models.
From Takeshi Shibagaki<ie9t-sbgk@asahi-net.or.jp>.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.29 25-Apr-2001 bouyer

branches: 1.29.2; 1.29.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.28 18-Jan-2001 briggs

branches: 1.28.2;
Handle the TRPAD case a little better.
Also, if the so-called DMA operation is a write and ends without target-
complete set, count the data in the FIFO as residual and add that to the
amount in the counters. Hauke Fath reports that this passes early testing
on his Quantum Viking.


# 1.27 29-Dec-2000 briggs

Do not try to second-guess the ncr53c9x driver by setting *dmasize to 0
if it is 64k. TCL and TCM will be set properly if we just leave it alone.
Not only that, the ncr53c9x driver issues TRPAD or TRANS based on this
value. We do not want TRPAD in this case!


# 1.26 29-Dec-2000 briggs

Rework the esp driver a little bit to improve performance. This requires
an ugly bit where we record the value of a2 while handling a "nofault" bus
error in locore.s in order to know how far the transaction got before a
disconnect (see esp.c comments for more details on this).
Also get rid of a loop (and delay()!) in the interrupt routine--hinted at
and researched by Chas Williams <chas@cmf.nrl.navy.mil>.


Revision tags: netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.25 05-Jun-2000 nisimura

branches: 1.25.2;
Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.


Revision tags: minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base scottr-mac68k-wscons-base
# 1.24 19-Oct-1999 thorpej

branches: 1.24.4;
Program the 53c96's interrupt routing info into the VIA before doing
anything that might cause an interrupt (e.g. the SCSI bus reset in
ncr53c9x_attach()). If we don't do this, the initial interrupt is
lost, thus causing the state machine to never enter IDLE state, thus
causing SCSI commands to never be executed.

Fixes kern/8544, reported by Erik Bertelsen <erik@mediator.uni-c.dk>.


Revision tags: chs-ubc2-base
# 1.23 27-Jun-1999 briggs

branches: 1.23.2; 1.23.4; 1.23.6;
Undo some of my recent changes that were misguided.


# 1.22 09-Jun-1999 briggs

Remove some register declarations.
Get Q9x0 dual SCSI at least basically working.
Be paranoid about some register reads.


# 1.21 01-Jun-1999 briggs

Raise spl4 to spl6 in quick_go--I am now experimenting with interrupts
at levels 5 (sound) and 6 (via1) on the Q700.
Raise splhigh when reading and writing registers. It's ugly, but it's
possible that we could get an interrupt from a higher-level source,
causing a re-read of a memory location.
This is not good when, e.g., we are reading the interrupt register.
Ideally, we would just raise splhigh() in ncr53c9x_readregs(), but
that's m.i. code, and it may be expensive on other architectures.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.20 22-Dec-1998 scottr

branches: 1.20.2; 1.20.6;
vm_offset_t -> {paddr_t, vaddr_t}


Revision tags: kenh-if-detach-base
# 1.19 19-Nov-1998 thorpej

Adapt to the new scsipi_adapter interface.


Revision tags: chs-ubc-base
# 1.18 10-Oct-1998 thorpej

Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.


# 1.17 05-Sep-1998 pk

Relinquish my copyright claims on this file.


Revision tags: eeh-paddr_t-base
# 1.16 09-May-1998 briggs

Get both SCSI busses operational on the Q900 and Q950.


# 1.15 02-May-1998 scottr

Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.


# 1.14 12-Jan-1998 thorpej

Update for changes to config.


# 1.13 19-Nov-1997 briggs

* Disable parity checking on all devices until we find a better way to
deal with cheap CD-ROMs and other devices that do not appear to have
any way to enable parity generation. In the future, it might be nice
to have this configurable on a per-device basis with back-to-back
parity errors automatically disabling parity for the device. That
would require some MI changes.
* Handle unaligned and odd-length transfers.
This could probably be handled better in the future.


# 1.12 05-Nov-1997 briggs

A first cut at faster SCSI for non-AV quadras. Could probably perform better,
but is a marked improvement. This takes advantage of a pseudo-DMA hardware
hack of Apple's that exposes a 16-bit register that the Apple-designed
memory controller acts like a DMA controller and handshakes into or out
of the FIFO. Wierd.


# 1.11 27-Aug-1997 bouyer

branches: 1.11.4;
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.


# 1.10 05-Mar-1997 briggs

branches: 1.10.2; 1.10.4;
Copyright foo.


# 1.9 01-Mar-1997 scottr

Fix prototype for espmatch()


# 1.8 28-Feb-1997 scottr

Convert to generalized VIA interrupt registration


# 1.7 27-Feb-1997 briggs

mac68k-specific portion of m.i. ncr53c9x driver.


# 1.6 16-Dec-1996 scottr

branches: 1.6.6;
Convert all foo_match() functions to use a `struct cfdata *' for their
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.


# 1.5 10-Dec-1996 thorpej

Fill in sc_link.max_target


# 1.4 04-Nov-1996 briggs

- Move offset for 2nd scsi controller (Q900/Q950/WGS95) to 0x402
instead of 0x400.
- Restructure interrupt handling for more performance--continue to
read/write data as long as the device keeps us in a data xfer phase.
There is still a lot of room for speed improvement here. Perhaps it
lies is speeding up the interrupt path in general?


# 1.3 02-Nov-1996 briggs

Improve reliability on my Q700, at least. Was getting the occasional
glitch--an extra byte on occasion.


# 1.2 30-Oct-1996 briggs

macs with scsibase offset 0x10000 from iobase use a SCSI CLK of 16.5MHz
(off PrimeTime)--all others appear to use 25MHz.


# 1.1 29-Oct-1996 briggs

Interrupt-driven, but slow, NCR 53c96 driver for the 040-based macs. Contains
some guesses for the machines that have two of these buggers (I don't have
such a machine). This driver is a copy of the sparc/alpha esp with a
minimum of changes--after we get it performing a bit more respectably,
we should see about re-normalizing the sources.


# 1.60 22-Feb-2021 rin

Elucidate why synchronous transfer is disabled for AV Macs.

Sync negotiation times out when drive advertises that capability:

----
sd1 at scsibus0 target 1 lun 0: <codesrc, SCSI2SD, 6.0> disk fixed
sd1: 16384 MB, 2088 cyl, 255 head, 63 sec, 512 bytes/sect x 33554432 sectors
sd1: sync (160.00ns offset 15), 8-bit (6.250MB/s) transfers
...
sd1(esp0:0:1:0): esp0: timed out [ecb 0x9f7fc4 (flags 0x1, dleft 8, stat 0)], <state 5, nexus 0x9f7fc4, phase(l 1, c 1, p 1), resid 8, msg(q 0,o 80) DMA active>
sd1(esp0:0:1:0): sync negotiation disabled
sd1(esp0:0:1:0): esp0: timed out [ecb 0x9f7fc4 (flags 0x41, dleft 8, stat 0)], <state 5, nexus 0x9f7fc4, phase(l 1, c 1, p 1), resid 8, msg(q 20,o 80) DMA active> AGAIN
sd1: async, 8-bit transfers
----

This is observed for real SCSI drives as well as SCSI2SD (rev 6.0).

Note that this is not a fallout from DMA patch for AV Macs; timeout
takes place even if ``avdma'' code is forcibly disabled.

No binary changes.


# 1.59 22-Feb-2021 rin

- Add missing \n's to printf(9).
- Whitespace fixes.


Revision tags: thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
# 1.58 23-Jul-2019 rin

PR port-mac68k/24883

Support DMA xfer for SCSI adapter of AV Mac (660/840AV), written by
Michael Zucca.

This improves disk I/O performance by nearly one order of magnitude.
In addition, interrupt storm due to heavy disk PIO is resolved.

I'm deeply grateful to Michael Zucca for his analysis of DMA engine
and submission of PR. I also thank Izumi Tsutsui (useful comments on
port-mac68k@) and Martin Husemann (test on 660AV).


# 1.57 23-Jul-2019 rin

PR port-mac68k/24883

Style-only changes in preparation to import AV DMA code:

- G/C unused from esp_softc
- clean up headers:
- prefer <sys/bus.h> over <machine/bus.h>
- G/C unused
- sort
- staticify private functions and variables
- stop using inline qualifier for functions called via function pointers
- use C99 initializer
- provide bus_space_vaddr(9) and use it, instead of using member of
bus_handle_t directly
- use uint*_t:
- u_char --> uint8_t
- u_int*_t --> uint*_t
- use proper names from ncr53c9xreg.h instead of magic numbers
- and some KNF, and etc.

No functional changes intended.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.56 08-Jan-2019 jdolecek

no need to include <machine/param.h> if <sys/param.h> already included


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3
# 1.55 18-Feb-2012 rmind

branches: 1.55.38; 1.55.40;
Replace few simple_lock(9) cases.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.54 02-Aug-2011 uebayasi

branches: 1.54.2; 1.54.6;
ncr53c9x was converted to use mutex(9), follow that. Fix DEBUG build too.


# 1.53 02-Aug-2011 uebayasi

Include sys/simplelock.h to use simple_lock(); fix build.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 jym-xensuspend-base
# 1.52 23-Nov-2009 rmind

Use lwp_getpcb() on m68k ports, clean from struct user usage.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.51 02-Jun-2008 hauke

esp_quick_dma_go() gets called from the MI ncr53c9x_intr() handler,
which protects itself against multiple invocation with a
simple_lock. Follow the example of ncr53c9x_poll() for servicing an
interrupt that came while we run in splhigh(), and 'manually' unlock
the MI handler for calling ncr53c9x_intr().

Fixes PR mac68k/38758.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base
# 1.50 13-Apr-2008 tsutsui

branches: 1.50.2; 1.50.4; 1.50.6;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.49 17-Oct-2007 garbled

branches: 1.49.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.48 08-Jun-2007 tsutsui

branches: 1.48.10;
On my LC630 64KB DMA xfer causes timeout errors
so limit sc_maxxfer size to 63KB.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.47 07-Mar-2007 tsutsui

branches: 1.47.2; 1.47.4; 1.47.10;
Previous fix is not correct. sc_dmaaddr is actually
pointer against pointer, so just use proper casts
rather than bogus void pointers.


# 1.46 05-Mar-2007 he

Add two instances of an overlooked indirection.


# 1.45 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.44 08-Mar-2006 lukem

branches: 1.44.14; 1.44.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.


Revision tags: yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.43 24-Dec-2005 perry

branches: 1.43.4; 1.43.6; 1.43.8; 1.43.10;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile


# 1.42 24-Dec-2005 perry

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.41 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.40 16-Jun-2005 jmc

branches: 1.40.2;
Fixes for volatile problems


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.39 05-Mar-2005 chs

use attach args instead of dv_unit, just like cf_unit.


Revision tags: yamt-km-base2 yamt-km-base
# 1.38 19-Jan-2005 chs

branches: 1.38.2;
only one of the obio locators was actually used, so get rid of the others
and collapse the two variations of obio into one. use the remaining locator
("addr") to differentiate the two possible esp and sbc devices (instead of
using the unit number).


# 1.37 15-Jan-2005 chs

branches: 1.37.2;
really ansify.


# 1.36 15-Jan-2005 chs

de-__P, remove register, ansify, b* -> mem*.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.35 15-Jul-2003 lukem

__KERNEL_RCSID()


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.34 02-Oct-2002 thorpej

branches: 1.34.6;
Use CFATTACH_DECL().


# 1.33 27-Sep-2002 thorpej

Declare all cfattach structures const.


# 1.32 27-Sep-2002 provos

remove trailing \n in panic(). approved perry.


Revision tags: gehenna-devsw-base
# 1.31 30-May-2002 thorpej

Don't use multi-line string literals.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.30 18-Nov-2001 briggs

branches: 1.30.8;
Correct operation of non-pseudo-DMA mode. Used on 660 & 840 AV models.
From Takeshi Shibagaki<ie9t-sbgk@asahi-net.or.jp>.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.29 25-Apr-2001 bouyer

branches: 1.29.2; 1.29.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.28 18-Jan-2001 briggs

branches: 1.28.2;
Handle the TRPAD case a little better.
Also, if the so-called DMA operation is a write and ends without target-
complete set, count the data in the FIFO as residual and add that to the
amount in the counters. Hauke Fath reports that this passes early testing
on his Quantum Viking.


# 1.27 29-Dec-2000 briggs

Do not try to second-guess the ncr53c9x driver by setting *dmasize to 0
if it is 64k. TCL and TCM will be set properly if we just leave it alone.
Not only that, the ncr53c9x driver issues TRPAD or TRANS based on this
value. We do not want TRPAD in this case!


# 1.26 29-Dec-2000 briggs

Rework the esp driver a little bit to improve performance. This requires
an ugly bit where we record the value of a2 while handling a "nofault" bus
error in locore.s in order to know how far the transaction got before a
disconnect (see esp.c comments for more details on this).
Also get rid of a loop (and delay()!) in the interrupt routine--hinted at
and researched by Chas Williams <chas@cmf.nrl.navy.mil>.


Revision tags: netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.25 05-Jun-2000 nisimura

branches: 1.25.2;
Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.


Revision tags: minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base scottr-mac68k-wscons-base
# 1.24 19-Oct-1999 thorpej

branches: 1.24.4;
Program the 53c96's interrupt routing info into the VIA before doing
anything that might cause an interrupt (e.g. the SCSI bus reset in
ncr53c9x_attach()). If we don't do this, the initial interrupt is
lost, thus causing the state machine to never enter IDLE state, thus
causing SCSI commands to never be executed.

Fixes kern/8544, reported by Erik Bertelsen <erik@mediator.uni-c.dk>.


Revision tags: chs-ubc2-base
# 1.23 27-Jun-1999 briggs

branches: 1.23.2; 1.23.4; 1.23.6;
Undo some of my recent changes that were misguided.


# 1.22 09-Jun-1999 briggs

Remove some register declarations.
Get Q9x0 dual SCSI at least basically working.
Be paranoid about some register reads.


# 1.21 01-Jun-1999 briggs

Raise spl4 to spl6 in quick_go--I am now experimenting with interrupts
at levels 5 (sound) and 6 (via1) on the Q700.
Raise splhigh when reading and writing registers. It's ugly, but it's
possible that we could get an interrupt from a higher-level source,
causing a re-read of a memory location.
This is not good when, e.g., we are reading the interrupt register.
Ideally, we would just raise splhigh() in ncr53c9x_readregs(), but
that's m.i. code, and it may be expensive on other architectures.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.20 22-Dec-1998 scottr

branches: 1.20.2; 1.20.6;
vm_offset_t -> {paddr_t, vaddr_t}


Revision tags: kenh-if-detach-base
# 1.19 19-Nov-1998 thorpej

Adapt to the new scsipi_adapter interface.


Revision tags: chs-ubc-base
# 1.18 10-Oct-1998 thorpej

Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.


# 1.17 05-Sep-1998 pk

Relinquish my copyright claims on this file.


Revision tags: eeh-paddr_t-base
# 1.16 09-May-1998 briggs

Get both SCSI busses operational on the Q900 and Q950.


# 1.15 02-May-1998 scottr

Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.


# 1.14 12-Jan-1998 thorpej

Update for changes to config.


# 1.13 19-Nov-1997 briggs

* Disable parity checking on all devices until we find a better way to
deal with cheap CD-ROMs and other devices that do not appear to have
any way to enable parity generation. In the future, it might be nice
to have this configurable on a per-device basis with back-to-back
parity errors automatically disabling parity for the device. That
would require some MI changes.
* Handle unaligned and odd-length transfers.
This could probably be handled better in the future.


# 1.12 05-Nov-1997 briggs

A first cut at faster SCSI for non-AV quadras. Could probably perform better,
but is a marked improvement. This takes advantage of a pseudo-DMA hardware
hack of Apple's that exposes a 16-bit register that the Apple-designed
memory controller acts like a DMA controller and handshakes into or out
of the FIFO. Wierd.


# 1.11 27-Aug-1997 bouyer

branches: 1.11.4;
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.


# 1.10 05-Mar-1997 briggs

branches: 1.10.2; 1.10.4;
Copyright foo.


# 1.9 01-Mar-1997 scottr

Fix prototype for espmatch()


# 1.8 28-Feb-1997 scottr

Convert to generalized VIA interrupt registration


# 1.7 27-Feb-1997 briggs

mac68k-specific portion of m.i. ncr53c9x driver.


# 1.6 16-Dec-1996 scottr

branches: 1.6.6;
Convert all foo_match() functions to use a `struct cfdata *' for their
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.


# 1.5 10-Dec-1996 thorpej

Fill in sc_link.max_target


# 1.4 04-Nov-1996 briggs

- Move offset for 2nd scsi controller (Q900/Q950/WGS95) to 0x402
instead of 0x400.
- Restructure interrupt handling for more performance--continue to
read/write data as long as the device keeps us in a data xfer phase.
There is still a lot of room for speed improvement here. Perhaps it
lies is speeding up the interrupt path in general?


# 1.3 02-Nov-1996 briggs

Improve reliability on my Q700, at least. Was getting the occasional
glitch--an extra byte on occasion.


# 1.2 30-Oct-1996 briggs

macs with scsibase offset 0x10000 from iobase use a SCSI CLK of 16.5MHz
(off PrimeTime)--all others appear to use 25MHz.


# 1.1 29-Oct-1996 briggs

Interrupt-driven, but slow, NCR 53c96 driver for the 040-based macs. Contains
some guesses for the machines that have two of these buggers (I don't have
such a machine). This driver is a copy of the sparc/alpha esp with a
minimum of changes--after we get it performing a bit more respectably,
we should see about re-normalizing the sources.


# 1.58 23-Jul-2019 rin

PR port-mac68k/24883

Support DMA xfer for SCSI adapter of AV Mac (660/840AV), written by
Michael Zucca.

This improves disk I/O performance by nearly one order of magnitude.
In addition, interrupt storm due to heavy disk PIO is resolved.

I'm deeply grateful to Michael Zucca for his analysis of DMA engine
and submission of PR. I also thank Izumi Tsutsui (useful comments on
port-mac68k@) and Martin Husemann (test on 660AV).


# 1.57 23-Jul-2019 rin

PR port-mac68k/24883

Style-only changes in preparation to import AV DMA code:

- G/C unused from esp_softc
- clean up headers:
- prefer <sys/bus.h> over <machine/bus.h>
- G/C unused
- sort
- staticify private functions and variables
- stop using inline qualifier for functions called via function pointers
- use C99 initializer
- provide bus_space_vaddr(9) and use it, instead of using member of
bus_handle_t directly
- use uint*_t:
- u_char --> uint8_t
- u_int*_t --> uint*_t
- use proper names from ncr53c9xreg.h instead of magic numbers
- and some KNF, and etc.

No functional changes intended.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.56 08-Jan-2019 jdolecek

no need to include <machine/param.h> if <sys/param.h> already included


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3
# 1.55 18-Feb-2012 rmind

branches: 1.55.38; 1.55.40;
Replace few simple_lock(9) cases.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.54 02-Aug-2011 uebayasi

branches: 1.54.2; 1.54.6;
ncr53c9x was converted to use mutex(9), follow that. Fix DEBUG build too.


# 1.53 02-Aug-2011 uebayasi

Include sys/simplelock.h to use simple_lock(); fix build.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 jym-xensuspend-base
# 1.52 23-Nov-2009 rmind

Use lwp_getpcb() on m68k ports, clean from struct user usage.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.51 02-Jun-2008 hauke

esp_quick_dma_go() gets called from the MI ncr53c9x_intr() handler,
which protects itself against multiple invocation with a
simple_lock. Follow the example of ncr53c9x_poll() for servicing an
interrupt that came while we run in splhigh(), and 'manually' unlock
the MI handler for calling ncr53c9x_intr().

Fixes PR mac68k/38758.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base
# 1.50 13-Apr-2008 tsutsui

branches: 1.50.2; 1.50.4; 1.50.6;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.49 17-Oct-2007 garbled

branches: 1.49.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.48 08-Jun-2007 tsutsui

branches: 1.48.10;
On my LC630 64KB DMA xfer causes timeout errors
so limit sc_maxxfer size to 63KB.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.47 07-Mar-2007 tsutsui

branches: 1.47.2; 1.47.4; 1.47.10;
Previous fix is not correct. sc_dmaaddr is actually
pointer against pointer, so just use proper casts
rather than bogus void pointers.


# 1.46 05-Mar-2007 he

Add two instances of an overlooked indirection.


# 1.45 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.44 08-Mar-2006 lukem

branches: 1.44.14; 1.44.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.


Revision tags: yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.43 24-Dec-2005 perry

branches: 1.43.4; 1.43.6; 1.43.8; 1.43.10;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile


# 1.42 24-Dec-2005 perry

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.41 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.40 16-Jun-2005 jmc

branches: 1.40.2;
Fixes for volatile problems


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.39 05-Mar-2005 chs

use attach args instead of dv_unit, just like cf_unit.


Revision tags: yamt-km-base2 yamt-km-base
# 1.38 19-Jan-2005 chs

branches: 1.38.2;
only one of the obio locators was actually used, so get rid of the others
and collapse the two variations of obio into one. use the remaining locator
("addr") to differentiate the two possible esp and sbc devices (instead of
using the unit number).


# 1.37 15-Jan-2005 chs

branches: 1.37.2;
really ansify.


# 1.36 15-Jan-2005 chs

de-__P, remove register, ansify, b* -> mem*.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.35 15-Jul-2003 lukem

__KERNEL_RCSID()


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.34 02-Oct-2002 thorpej

branches: 1.34.6;
Use CFATTACH_DECL().


# 1.33 27-Sep-2002 thorpej

Declare all cfattach structures const.


# 1.32 27-Sep-2002 provos

remove trailing \n in panic(). approved perry.


Revision tags: gehenna-devsw-base
# 1.31 30-May-2002 thorpej

Don't use multi-line string literals.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.30 18-Nov-2001 briggs

branches: 1.30.8;
Correct operation of non-pseudo-DMA mode. Used on 660 & 840 AV models.
From Takeshi Shibagaki<ie9t-sbgk@asahi-net.or.jp>.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.29 25-Apr-2001 bouyer

branches: 1.29.2; 1.29.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.28 18-Jan-2001 briggs

branches: 1.28.2;
Handle the TRPAD case a little better.
Also, if the so-called DMA operation is a write and ends without target-
complete set, count the data in the FIFO as residual and add that to the
amount in the counters. Hauke Fath reports that this passes early testing
on his Quantum Viking.


# 1.27 29-Dec-2000 briggs

Do not try to second-guess the ncr53c9x driver by setting *dmasize to 0
if it is 64k. TCL and TCM will be set properly if we just leave it alone.
Not only that, the ncr53c9x driver issues TRPAD or TRANS based on this
value. We do not want TRPAD in this case!


# 1.26 29-Dec-2000 briggs

Rework the esp driver a little bit to improve performance. This requires
an ugly bit where we record the value of a2 while handling a "nofault" bus
error in locore.s in order to know how far the transaction got before a
disconnect (see esp.c comments for more details on this).
Also get rid of a loop (and delay()!) in the interrupt routine--hinted at
and researched by Chas Williams <chas@cmf.nrl.navy.mil>.


Revision tags: netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.25 05-Jun-2000 nisimura

branches: 1.25.2;
Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.


Revision tags: minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base scottr-mac68k-wscons-base
# 1.24 19-Oct-1999 thorpej

branches: 1.24.4;
Program the 53c96's interrupt routing info into the VIA before doing
anything that might cause an interrupt (e.g. the SCSI bus reset in
ncr53c9x_attach()). If we don't do this, the initial interrupt is
lost, thus causing the state machine to never enter IDLE state, thus
causing SCSI commands to never be executed.

Fixes kern/8544, reported by Erik Bertelsen <erik@mediator.uni-c.dk>.


Revision tags: chs-ubc2-base
# 1.23 27-Jun-1999 briggs

branches: 1.23.2; 1.23.4; 1.23.6;
Undo some of my recent changes that were misguided.


# 1.22 09-Jun-1999 briggs

Remove some register declarations.
Get Q9x0 dual SCSI at least basically working.
Be paranoid about some register reads.


# 1.21 01-Jun-1999 briggs

Raise spl4 to spl6 in quick_go--I am now experimenting with interrupts
at levels 5 (sound) and 6 (via1) on the Q700.
Raise splhigh when reading and writing registers. It's ugly, but it's
possible that we could get an interrupt from a higher-level source,
causing a re-read of a memory location.
This is not good when, e.g., we are reading the interrupt register.
Ideally, we would just raise splhigh() in ncr53c9x_readregs(), but
that's m.i. code, and it may be expensive on other architectures.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.20 22-Dec-1998 scottr

branches: 1.20.2; 1.20.6;
vm_offset_t -> {paddr_t, vaddr_t}


Revision tags: kenh-if-detach-base
# 1.19 19-Nov-1998 thorpej

Adapt to the new scsipi_adapter interface.


Revision tags: chs-ubc-base
# 1.18 10-Oct-1998 thorpej

Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.


# 1.17 05-Sep-1998 pk

Relinquish my copyright claims on this file.


Revision tags: eeh-paddr_t-base
# 1.16 09-May-1998 briggs

Get both SCSI busses operational on the Q900 and Q950.


# 1.15 02-May-1998 scottr

Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.


# 1.14 12-Jan-1998 thorpej

Update for changes to config.


# 1.13 19-Nov-1997 briggs

* Disable parity checking on all devices until we find a better way to
deal with cheap CD-ROMs and other devices that do not appear to have
any way to enable parity generation. In the future, it might be nice
to have this configurable on a per-device basis with back-to-back
parity errors automatically disabling parity for the device. That
would require some MI changes.
* Handle unaligned and odd-length transfers.
This could probably be handled better in the future.


# 1.12 05-Nov-1997 briggs

A first cut at faster SCSI for non-AV quadras. Could probably perform better,
but is a marked improvement. This takes advantage of a pseudo-DMA hardware
hack of Apple's that exposes a 16-bit register that the Apple-designed
memory controller acts like a DMA controller and handshakes into or out
of the FIFO. Wierd.


# 1.11 27-Aug-1997 bouyer

branches: 1.11.4;
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.


# 1.10 05-Mar-1997 briggs

branches: 1.10.2; 1.10.4;
Copyright foo.


# 1.9 01-Mar-1997 scottr

Fix prototype for espmatch()


# 1.8 28-Feb-1997 scottr

Convert to generalized VIA interrupt registration


# 1.7 27-Feb-1997 briggs

mac68k-specific portion of m.i. ncr53c9x driver.


# 1.6 16-Dec-1996 scottr

branches: 1.6.6;
Convert all foo_match() functions to use a `struct cfdata *' for their
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.


# 1.5 10-Dec-1996 thorpej

Fill in sc_link.max_target


# 1.4 04-Nov-1996 briggs

- Move offset for 2nd scsi controller (Q900/Q950/WGS95) to 0x402
instead of 0x400.
- Restructure interrupt handling for more performance--continue to
read/write data as long as the device keeps us in a data xfer phase.
There is still a lot of room for speed improvement here. Perhaps it
lies is speeding up the interrupt path in general?


# 1.3 02-Nov-1996 briggs

Improve reliability on my Q700, at least. Was getting the occasional
glitch--an extra byte on occasion.


# 1.2 30-Oct-1996 briggs

macs with scsibase offset 0x10000 from iobase use a SCSI CLK of 16.5MHz
(off PrimeTime)--all others appear to use 25MHz.


# 1.1 29-Oct-1996 briggs

Interrupt-driven, but slow, NCR 53c96 driver for the 040-based macs. Contains
some guesses for the machines that have two of these buggers (I don't have
such a machine). This driver is a copy of the sparc/alpha esp with a
minimum of changes--after we get it performing a bit more respectably,
we should see about re-normalizing the sources.


# 1.57 23-Jul-2019 rin

PR port-mac68k/24883

Style-only changes in preparation to import AV DMA code:

- G/C unused from esp_softc
- clean up headers:
- prefer <sys/bus.h> over <machine/bus.h>
- G/C unused
- sort
- staticify private functions and variables
- stop using inline qualifier for functions called via function pointers
- use C99 initializer
- provide bus_space_vaddr(9) and use it, instead of using member of
bus_handle_t directly
- use uint*_t:
- u_char --> uint8_t
- u_int*_t --> uint*_t
- use proper names from ncr53c9xreg.h instead of magic numbers
- and some KNF, and etc.

No functional changes intended.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.56 08-Jan-2019 jdolecek

no need to include <machine/param.h> if <sys/param.h> already included


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3
# 1.55 18-Feb-2012 rmind

branches: 1.55.38; 1.55.40;
Replace few simple_lock(9) cases.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.54 02-Aug-2011 uebayasi

branches: 1.54.2; 1.54.6;
ncr53c9x was converted to use mutex(9), follow that. Fix DEBUG build too.


# 1.53 02-Aug-2011 uebayasi

Include sys/simplelock.h to use simple_lock(); fix build.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 jym-xensuspend-base
# 1.52 23-Nov-2009 rmind

Use lwp_getpcb() on m68k ports, clean from struct user usage.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.51 02-Jun-2008 hauke

esp_quick_dma_go() gets called from the MI ncr53c9x_intr() handler,
which protects itself against multiple invocation with a
simple_lock. Follow the example of ncr53c9x_poll() for servicing an
interrupt that came while we run in splhigh(), and 'manually' unlock
the MI handler for calling ncr53c9x_intr().

Fixes PR mac68k/38758.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base
# 1.50 13-Apr-2008 tsutsui

branches: 1.50.2; 1.50.4; 1.50.6;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.49 17-Oct-2007 garbled

branches: 1.49.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.48 08-Jun-2007 tsutsui

branches: 1.48.10;
On my LC630 64KB DMA xfer causes timeout errors
so limit sc_maxxfer size to 63KB.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.47 07-Mar-2007 tsutsui

branches: 1.47.2; 1.47.4; 1.47.10;
Previous fix is not correct. sc_dmaaddr is actually
pointer against pointer, so just use proper casts
rather than bogus void pointers.


# 1.46 05-Mar-2007 he

Add two instances of an overlooked indirection.


# 1.45 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.44 08-Mar-2006 lukem

branches: 1.44.14; 1.44.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.


Revision tags: yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.43 24-Dec-2005 perry

branches: 1.43.4; 1.43.6; 1.43.8; 1.43.10;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile


# 1.42 24-Dec-2005 perry

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.41 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.40 16-Jun-2005 jmc

branches: 1.40.2;
Fixes for volatile problems


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.39 05-Mar-2005 chs

use attach args instead of dv_unit, just like cf_unit.


Revision tags: yamt-km-base2 yamt-km-base
# 1.38 19-Jan-2005 chs

branches: 1.38.2;
only one of the obio locators was actually used, so get rid of the others
and collapse the two variations of obio into one. use the remaining locator
("addr") to differentiate the two possible esp and sbc devices (instead of
using the unit number).


# 1.37 15-Jan-2005 chs

branches: 1.37.2;
really ansify.


# 1.36 15-Jan-2005 chs

de-__P, remove register, ansify, b* -> mem*.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.35 15-Jul-2003 lukem

__KERNEL_RCSID()


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.34 02-Oct-2002 thorpej

branches: 1.34.6;
Use CFATTACH_DECL().


# 1.33 27-Sep-2002 thorpej

Declare all cfattach structures const.


# 1.32 27-Sep-2002 provos

remove trailing \n in panic(). approved perry.


Revision tags: gehenna-devsw-base
# 1.31 30-May-2002 thorpej

Don't use multi-line string literals.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.30 18-Nov-2001 briggs

branches: 1.30.8;
Correct operation of non-pseudo-DMA mode. Used on 660 & 840 AV models.
From Takeshi Shibagaki<ie9t-sbgk@asahi-net.or.jp>.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.29 25-Apr-2001 bouyer

branches: 1.29.2; 1.29.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.28 18-Jan-2001 briggs

branches: 1.28.2;
Handle the TRPAD case a little better.
Also, if the so-called DMA operation is a write and ends without target-
complete set, count the data in the FIFO as residual and add that to the
amount in the counters. Hauke Fath reports that this passes early testing
on his Quantum Viking.


# 1.27 29-Dec-2000 briggs

Do not try to second-guess the ncr53c9x driver by setting *dmasize to 0
if it is 64k. TCL and TCM will be set properly if we just leave it alone.
Not only that, the ncr53c9x driver issues TRPAD or TRANS based on this
value. We do not want TRPAD in this case!


# 1.26 29-Dec-2000 briggs

Rework the esp driver a little bit to improve performance. This requires
an ugly bit where we record the value of a2 while handling a "nofault" bus
error in locore.s in order to know how far the transaction got before a
disconnect (see esp.c comments for more details on this).
Also get rid of a loop (and delay()!) in the interrupt routine--hinted at
and researched by Chas Williams <chas@cmf.nrl.navy.mil>.


Revision tags: netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.25 05-Jun-2000 nisimura

branches: 1.25.2;
Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.


Revision tags: minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base scottr-mac68k-wscons-base
# 1.24 19-Oct-1999 thorpej

branches: 1.24.4;
Program the 53c96's interrupt routing info into the VIA before doing
anything that might cause an interrupt (e.g. the SCSI bus reset in
ncr53c9x_attach()). If we don't do this, the initial interrupt is
lost, thus causing the state machine to never enter IDLE state, thus
causing SCSI commands to never be executed.

Fixes kern/8544, reported by Erik Bertelsen <erik@mediator.uni-c.dk>.


Revision tags: chs-ubc2-base
# 1.23 27-Jun-1999 briggs

branches: 1.23.2; 1.23.4; 1.23.6;
Undo some of my recent changes that were misguided.


# 1.22 09-Jun-1999 briggs

Remove some register declarations.
Get Q9x0 dual SCSI at least basically working.
Be paranoid about some register reads.


# 1.21 01-Jun-1999 briggs

Raise spl4 to spl6 in quick_go--I am now experimenting with interrupts
at levels 5 (sound) and 6 (via1) on the Q700.
Raise splhigh when reading and writing registers. It's ugly, but it's
possible that we could get an interrupt from a higher-level source,
causing a re-read of a memory location.
This is not good when, e.g., we are reading the interrupt register.
Ideally, we would just raise splhigh() in ncr53c9x_readregs(), but
that's m.i. code, and it may be expensive on other architectures.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.20 22-Dec-1998 scottr

branches: 1.20.2; 1.20.6;
vm_offset_t -> {paddr_t, vaddr_t}


Revision tags: kenh-if-detach-base
# 1.19 19-Nov-1998 thorpej

Adapt to the new scsipi_adapter interface.


Revision tags: chs-ubc-base
# 1.18 10-Oct-1998 thorpej

Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.


# 1.17 05-Sep-1998 pk

Relinquish my copyright claims on this file.


Revision tags: eeh-paddr_t-base
# 1.16 09-May-1998 briggs

Get both SCSI busses operational on the Q900 and Q950.


# 1.15 02-May-1998 scottr

Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.


# 1.14 12-Jan-1998 thorpej

Update for changes to config.


# 1.13 19-Nov-1997 briggs

* Disable parity checking on all devices until we find a better way to
deal with cheap CD-ROMs and other devices that do not appear to have
any way to enable parity generation. In the future, it might be nice
to have this configurable on a per-device basis with back-to-back
parity errors automatically disabling parity for the device. That
would require some MI changes.
* Handle unaligned and odd-length transfers.
This could probably be handled better in the future.


# 1.12 05-Nov-1997 briggs

A first cut at faster SCSI for non-AV quadras. Could probably perform better,
but is a marked improvement. This takes advantage of a pseudo-DMA hardware
hack of Apple's that exposes a 16-bit register that the Apple-designed
memory controller acts like a DMA controller and handshakes into or out
of the FIFO. Wierd.


# 1.11 27-Aug-1997 bouyer

branches: 1.11.4;
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.


# 1.10 05-Mar-1997 briggs

branches: 1.10.2; 1.10.4;
Copyright foo.


# 1.9 01-Mar-1997 scottr

Fix prototype for espmatch()


# 1.8 28-Feb-1997 scottr

Convert to generalized VIA interrupt registration


# 1.7 27-Feb-1997 briggs

mac68k-specific portion of m.i. ncr53c9x driver.


# 1.6 16-Dec-1996 scottr

branches: 1.6.6;
Convert all foo_match() functions to use a `struct cfdata *' for their
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.


# 1.5 10-Dec-1996 thorpej

Fill in sc_link.max_target


# 1.4 04-Nov-1996 briggs

- Move offset for 2nd scsi controller (Q900/Q950/WGS95) to 0x402
instead of 0x400.
- Restructure interrupt handling for more performance--continue to
read/write data as long as the device keeps us in a data xfer phase.
There is still a lot of room for speed improvement here. Perhaps it
lies is speeding up the interrupt path in general?


# 1.3 02-Nov-1996 briggs

Improve reliability on my Q700, at least. Was getting the occasional
glitch--an extra byte on occasion.


# 1.2 30-Oct-1996 briggs

macs with scsibase offset 0x10000 from iobase use a SCSI CLK of 16.5MHz
(off PrimeTime)--all others appear to use 25MHz.


# 1.1 29-Oct-1996 briggs

Interrupt-driven, but slow, NCR 53c96 driver for the 040-based macs. Contains
some guesses for the machines that have two of these buggers (I don't have
such a machine). This driver is a copy of the sparc/alpha esp with a
minimum of changes--after we get it performing a bit more respectably,
we should see about re-normalizing the sources.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.56 08-Jan-2019 jdolecek

no need to include <machine/param.h> if <sys/param.h> already included


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3
# 1.55 18-Feb-2012 rmind

branches: 1.55.38;
Replace few simple_lock(9) cases.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.54 02-Aug-2011 uebayasi

branches: 1.54.2; 1.54.6;
ncr53c9x was converted to use mutex(9), follow that. Fix DEBUG build too.


# 1.53 02-Aug-2011 uebayasi

Include sys/simplelock.h to use simple_lock(); fix build.


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base jym-xensuspend-nbase uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 jym-xensuspend-base
# 1.52 23-Nov-2009 rmind

Use lwp_getpcb() on m68k ports, clean from struct user usage.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 wrstuden-revivesa-base mjf-devfs2-base
# 1.51 02-Jun-2008 hauke

esp_quick_dma_go() gets called from the MI ncr53c9x_intr() handler,
which protects itself against multiple invocation with a
simple_lock. Follow the example of ncr53c9x_poll() for servicing an
interrupt that came while we run in splhigh(), and 'manually' unlock
the MI handler for calling ncr53c9x_intr().

Fixes PR mac68k/38758.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base
# 1.50 13-Apr-2008 tsutsui

branches: 1.50.2; 1.50.4; 1.50.6;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.


Revision tags: ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase yamt-x86pmap-base4 bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.49 17-Oct-2007 garbled

branches: 1.49.16;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base nick-csl-alignment-base matt-mips64-base ppcoea-renovation-base mjf-ufs-trans-base vmlocking-base
# 1.48 08-Jun-2007 tsutsui

branches: 1.48.10;
On my LC630 64KB DMA xfer causes timeout errors
so limit sc_maxxfer size to 63KB.


Revision tags: yamt-idlelwp-base8 thorpej-atomic-base
# 1.47 07-Mar-2007 tsutsui

branches: 1.47.2; 1.47.4; 1.47.10;
Previous fix is not correct. sc_dmaaddr is actually
pointer against pointer, so just use proper casts
rather than bogus void pointers.


# 1.46 05-Mar-2007 he

Add two instances of an overlooked indirection.


# 1.45 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.44 08-Mar-2006 lukem

branches: 1.44.14; 1.44.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.


Revision tags: yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.43 24-Dec-2005 perry

branches: 1.43.4; 1.43.6; 1.43.8; 1.43.10;
__asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile


# 1.42 24-Dec-2005 perry

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.


# 1.41 11-Dec-2005 christos

merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.40 16-Jun-2005 jmc

branches: 1.40.2;
Fixes for volatile problems


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.39 05-Mar-2005 chs

use attach args instead of dv_unit, just like cf_unit.


Revision tags: yamt-km-base2 yamt-km-base
# 1.38 19-Jan-2005 chs

branches: 1.38.2;
only one of the obio locators was actually used, so get rid of the others
and collapse the two variations of obio into one. use the remaining locator
("addr") to differentiate the two possible esp and sbc devices (instead of
using the unit number).


# 1.37 15-Jan-2005 chs

branches: 1.37.2;
really ansify.


# 1.36 15-Jan-2005 chs

de-__P, remove register, ansify, b* -> mem*.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE kent-audio1-beforemerge netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.35 15-Jul-2003 lukem

__KERNEL_RCSID()


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.34 02-Oct-2002 thorpej

branches: 1.34.6;
Use CFATTACH_DECL().


# 1.33 27-Sep-2002 thorpej

Declare all cfattach structures const.


# 1.32 27-Sep-2002 provos

remove trailing \n in panic(). approved perry.


Revision tags: gehenna-devsw-base
# 1.31 30-May-2002 thorpej

Don't use multi-line string literals.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base
# 1.30 18-Nov-2001 briggs

branches: 1.30.8;
Correct operation of non-pseudo-DMA mode. Used on 660 & 840 AV models.
From Takeshi Shibagaki<ie9t-sbgk@asahi-net.or.jp>.


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.29 25-Apr-2001 bouyer

branches: 1.29.2; 1.29.8;
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.28 18-Jan-2001 briggs

branches: 1.28.2;
Handle the TRPAD case a little better.
Also, if the so-called DMA operation is a write and ends without target-
complete set, count the data in the FIFO as residual and add that to the
amount in the counters. Hauke Fath reports that this passes early testing
on his Quantum Viking.


# 1.27 29-Dec-2000 briggs

Do not try to second-guess the ncr53c9x driver by setting *dmasize to 0
if it is 64k. TCL and TCM will be set properly if we just leave it alone.
Not only that, the ncr53c9x driver issues TRPAD or TRANS based on this
value. We do not want TRPAD in this case!


# 1.26 29-Dec-2000 briggs

Rework the esp driver a little bit to improve performance. This requires
an ugly bit where we record the value of a2 while handling a "nofault" bus
error in locore.s in order to know how far the transaction got before a
disconnect (see esp.c comments for more details on this).
Also get rid of a loop (and delay()!) in the interrupt routine--hinted at
and researched by Chas Williams <chas@cmf.nrl.navy.mil>.


Revision tags: netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.25 05-Jun-2000 nisimura

branches: 1.25.2;
Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.


Revision tags: minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base scottr-mac68k-wscons-base
# 1.24 19-Oct-1999 thorpej

branches: 1.24.4;
Program the 53c96's interrupt routing info into the VIA before doing
anything that might cause an interrupt (e.g. the SCSI bus reset in
ncr53c9x_attach()). If we don't do this, the initial interrupt is
lost, thus causing the state machine to never enter IDLE state, thus
causing SCSI commands to never be executed.

Fixes kern/8544, reported by Erik Bertelsen <erik@mediator.uni-c.dk>.


Revision tags: chs-ubc2-base
# 1.23 27-Jun-1999 briggs

branches: 1.23.2; 1.23.4; 1.23.6;
Undo some of my recent changes that were misguided.


# 1.22 09-Jun-1999 briggs

Remove some register declarations.
Get Q9x0 dual SCSI at least basically working.
Be paranoid about some register reads.


# 1.21 01-Jun-1999 briggs

Raise spl4 to spl6 in quick_go--I am now experimenting with interrupts
at levels 5 (sound) and 6 (via1) on the Q700.
Raise splhigh when reading and writing registers. It's ugly, but it's
possible that we could get an interrupt from a higher-level source,
causing a re-read of a memory location.
This is not good when, e.g., we are reading the interrupt register.
Ideally, we would just raise splhigh() in ncr53c9x_readregs(), but
that's m.i. code, and it may be expensive on other architectures.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.20 22-Dec-1998 scottr

branches: 1.20.2; 1.20.6;
vm_offset_t -> {paddr_t, vaddr_t}


Revision tags: kenh-if-detach-base
# 1.19 19-Nov-1998 thorpej

Adapt to the new scsipi_adapter interface.


Revision tags: chs-ubc-base
# 1.18 10-Oct-1998 thorpej

Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.


# 1.17 05-Sep-1998 pk

Relinquish my copyright claims on this file.


Revision tags: eeh-paddr_t-base
# 1.16 09-May-1998 briggs

Get both SCSI busses operational on the Q900 and Q950.


# 1.15 02-May-1998 scottr

Move on-board I/O and NuBus drivers to their own directories
via repository copy, and make the necessary adjustments to reflect
the moved files.


# 1.14 12-Jan-1998 thorpej

Update for changes to config.


# 1.13 19-Nov-1997 briggs

* Disable parity checking on all devices until we find a better way to
deal with cheap CD-ROMs and other devices that do not appear to have
any way to enable parity generation. In the future, it might be nice
to have this configurable on a per-device basis with back-to-back
parity errors automatically disabling parity for the device. That
would require some MI changes.
* Handle unaligned and odd-length transfers.
This could probably be handled better in the future.


# 1.12 05-Nov-1997 briggs

A first cut at faster SCSI for non-AV quadras. Could probably perform better,
but is a marked improvement. This takes advantage of a pseudo-DMA hardware
hack of Apple's that exposes a 16-bit register that the Apple-designed
memory controller acts like a DMA controller and handshakes into or out
of the FIFO. Wierd.


# 1.11 27-Aug-1997 bouyer

branches: 1.11.4;
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.


# 1.10 05-Mar-1997 briggs

branches: 1.10.2; 1.10.4;
Copyright foo.


# 1.9 01-Mar-1997 scottr

Fix prototype for espmatch()


# 1.8 28-Feb-1997 scottr

Convert to generalized VIA interrupt registration


# 1.7 27-Feb-1997 briggs

mac68k-specific portion of m.i. ncr53c9x driver.


# 1.6 16-Dec-1996 scottr

branches: 1.6.6;
Convert all foo_match() functions to use a `struct cfdata *' for their
second argument. The NuBus autoconfig code had to be reorganized as a
result of this, and looks much more like a directly-attached bus now.
These changes eliminate __BROKEN_INDIRECT_CONFIG.


# 1.5 10-Dec-1996 thorpej

Fill in sc_link.max_target


# 1.4 04-Nov-1996 briggs

- Move offset for 2nd scsi controller (Q900/Q950/WGS95) to 0x402
instead of 0x400.
- Restructure interrupt handling for more performance--continue to
read/write data as long as the device keeps us in a data xfer phase.
There is still a lot of room for speed improvement here. Perhaps it
lies is speeding up the interrupt path in general?


# 1.3 02-Nov-1996 briggs

Improve reliability on my Q700, at least. Was getting the occasional
glitch--an extra byte on occasion.


# 1.2 30-Oct-1996 briggs

macs with scsibase offset 0x10000 from iobase use a SCSI CLK of 16.5MHz
(off PrimeTime)--all others appear to use 25MHz.


# 1.1 29-Oct-1996 briggs

Interrupt-driven, but slow, NCR 53c96 driver for the 040-based macs. Contains
some guesses for the machines that have two of these buggers (I don't have
such a machine). This driver is a copy of the sparc/alpha esp with a
minimum of changes--after we get it performing a bit more respectably,
we should see about re-normalizing the sources.