Home | History | Annotate | Download | only in vsa
History log of /src/sys/arch/vax/vsa/asc_vsbus.c
RevisionDateAuthorComments
 1.45  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.44  07-Jul-2016  msaitoh branches: 1.44.16; 1.44.18;
KNF. Remove extra spaces. No functional change.
 1.43  27-Oct-2012  chs branches: 1.43.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.42  14-Dec-2010  matt branches: 1.42.8; 1.42.18;
Cleanup includes. Switch from <machine/XXX.h> to <sys/XXX.h> from
bus, cpu, and intr. Remove unneeded includes.
 1.41  21-Nov-2009  rmind branches: 1.41.4;
- Use lwp_getpcb() on VAX, clean from struct user usage.
- Include sys/user.h in MD proc.h .
 1.40  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.39  13-Apr-2008  tsutsui branches: 1.39.2; 1.39.4;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.38  11-Mar-2008  matt Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.
 1.37  07-Mar-2008  christos Allow KA53 to link, from Hans Rosenfeld. clk_page is used only if VAX46, VAX48
or VAX49 are defined.
 1.36  03-Feb-2008  matt branches: 1.36.2; 1.36.6;
Reorganize a bit to be able to support multiple sgmaps.
 1.35  04-Mar-2007  christos branches: 1.35.20; 1.35.26;
Fix caddr_t fallout.
 1.34  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.33  08-Mar-2006  lukem branches: 1.33.16;
Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
 1.32  11-Dec-2005  christos branches: 1.32.4; 1.32.6; 1.32.8; 1.32.10;
merge ktrace-lwp.
 1.31  14-Dec-2004  chs branches: 1.31.10;
use the generated macros in locators.h rather than hard-coded numbers
to index the cf_loc[] array. reviewed by allen briggs.
 1.30  19-Oct-2003  ragge Fetch SCSI controller ID from nvram for VS4k90 also.
 1.29  03-May-2003  wiz branches: 1.29.2;
DMA, not dma nor Dma.
 1.28  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.27  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.26  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.25  13-Sep-2002  chuck increase sc_maxxfer from 63K to 64K. otherwise fsck fails for
file systems with larger block sizes.
 1.24  16-May-2001  matt branches: 1.24.2; 1.24.8; 1.24.18;
Add a VAXANY type. Eventually to used in INSTALL / GENERIC to easily
include support for all VAX platforms
 1.23  25-Apr-2001  bouyer 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
 1.22  04-Feb-2001  ragge branches: 1.22.2;
Giant update from Michael Kukat (michael@unixiron.org).
Fixes support for:
MicroVAX 3100m90
MicroVAX 3100m95
VAX 4000/100 (tested)
VAX 4000/105A (tested)
VAX 4000/108
VAX 4000/400 (tested)
VAX 4000/500 (tested)
VAX 4000/600
 1.21  16-Nov-2000  matt branches: 1.21.2;
Commit changes to SCSI working on the VS4000/9x. "Don't overthink the
plumbing! Duh!".
 1.20  26-Jul-2000  matt Un __P.
 1.19  19-Jul-2000  matt More ELF changes (a.out still works).
 1.18  18-Jun-2000  matt branches: 1.18.2;
We use opt_cputype.h now.
 1.17  05-Jun-2000  nisimura 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.
 1.16  05-Jun-2000  matt Adjust to new evcnt stuff.
 1.15  04-Jun-2000  matt Add extra argument to scb_vecalloc (a struct evcnt *)
Move ivec_dsp from trap.h to scb.h
Add interrupt counting to asc, le, ze, ncr, dz interrupts.
add common support for counting interrupts to cnm_idisp so
it can be done very efficiently.
 1.14  23-May-2000  matt branches: 1.14.2;
Add some debug stuff. Disable SCSI on KA49 for now until I can figure out
why it doesn't work.
 1.13  17-May-2000  matt Preliminary support for the VS4000/90 SGMAP. Needed for SCSI. Does not
quite work right yet.
 1.12  24-Apr-2000  matt be a bit more defensive in the probe routines. only allow one attachment.
 1.11  23-Apr-2000  matt Extend asc driver to include support for the VS400/9x.
Add VS4000/9x support vsbus_dma.c
 1.10  18-Apr-2000  matt Remove autconf stuff. not needed and wrong.
 1.9  17-Apr-2000  ragge Fetch the SCSI ID out of NVRAM instead, if possible.
 1.8  17-Apr-2000  ragge DEC have the internal SCSI controller as ID6, and CDROM as ID7.
 1.7  10-Apr-2000  matt Add fix for VS4000 SCSI hangs on disk writes. Add a VAX_BUS_DMA_SPILLPAGE
and use it in the asc_vsbus driver.
 1.6  09-Mar-2000  matt disable scsi for ka49 until sgmap is adapted to it.
 1.5  07-Mar-2000  matt Chnage chip freq to 25MHZ. panic if dmaaddr is not in the kernel's
address space. fix some printfs. (reads now work!)
 1.4  05-Mar-2000  matt it is pretty close to working. the scsibus probes now.
 1.3  04-Mar-2000  matt it's closer to working now.
 1.2  04-Mar-2000  matt expunge vm_offset_t and vm_size_t.
add bus_dma support for the vs4000 dma translation map (sgmap).
enhance the vsbus for the lance to work with it.
remove the sgmap init code from ka46/48/49.c
 1.1  04-Mar-2000  matt First pass at NCR53c9x attachment for VS4000. It doesn't work yet.
But I want to save the work.
 1.14.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.18.2.1  16-Nov-2000  tv Pullup 1.21 [matt]:
Commit changes to SCSI working on the VS4000/9x. "Don't overthink the
plumbing! Duh!".
 1.21.2.5  29-Mar-2001  bouyer Make this compile.
 1.21.2.4  11-Feb-2001  bouyer Sync with HEAD.
 1.21.2.3  22-Nov-2000  bouyer Sync with HEAD.
 1.21.2.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.21.2.1  16-Nov-2000  bouyer file asc_vsbus.c was added on branch thorpej_scsipi on 2000-11-20 20:33:37 +0000
 1.22.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.24.18.1  18-Sep-2002  thorpej pullup-1-6 ticket #783, chuck@research.att.com.

1.24 -> 1.25 syssrc/sys/arch/vax/vsa/asc_vsbus.c

Original log message:
increase sc_maxxfer from 63K to 64K. otherwise fsck fails for
file systems with larger block sizes.
 1.24.8.3  18-Oct-2002  nathanw Catch up to -current.
 1.24.8.2  17-Sep-2002  nathanw Catch up to -current.
 1.24.8.1  16-May-2001  nathanw file asc_vsbus.c was added on branch nathanw_sa on 2002-09-17 21:18:37 +0000
 1.24.2.1  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.29.2.4  18-Dec-2004  skrll Sync with HEAD.
 1.29.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.29.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.29.2.1  03-Aug-2004  skrll Sync with HEAD
 1.31.10.4  17-Mar-2008  yamt sync with head.
 1.31.10.3  04-Feb-2008  yamt sync with head.
 1.31.10.2  03-Sep-2007  yamt sync with head.
 1.31.10.1  21-Jun-2006  yamt sync with head.
 1.32.10.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.32.8.1  13-Mar-2006  yamt sync with head.
 1.32.6.1  22-Apr-2006  simonb Sync with head.
 1.32.4.1  09-Sep-2006  rpaulo sync with head
 1.33.16.1  12-Mar-2007  rmind Sync with HEAD.
 1.35.26.1  18-Feb-2008  mjf Sync with HEAD.
 1.35.20.1  23-Mar-2008  matt sync with HEAD
 1.36.6.2  02-Jun-2008  mjf Sync with HEAD.
 1.36.6.1  03-Apr-2008  mjf Sync with HEAD.
 1.36.2.1  24-Mar-2008  keiichi sync with head.
 1.39.4.2  11-Mar-2010  yamt sync with head
 1.39.4.1  16-May-2008  yamt sync with head.
 1.39.2.1  18-May-2008  yamt sync with head.
 1.41.4.1  05-Mar-2011  rmind sync with head
 1.42.18.2  03-Dec-2017  jdolecek update from HEAD
 1.42.18.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.42.8.1  30-Oct-2012  yamt sync with head
 1.43.14.1  09-Jul-2016  skrll Sync with HEAD
 1.44.18.1  10-Jun-2019  christos Sync with HEAD
 1.44.16.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

RSS XML Feed