freebsd-dev/sys/dev
Matt Jacob 4fd13c1ba2 Major restructuring for swizzling to the request queue and unswizzling from
the response queue. Instead of the ad hoc ISP_SWIZZLE_REQUEST, we now have
a complete set of inline functions in isp_inline.h. Each platform is
responsible for providing just one of a set of ISP_IOX_{GET,PUT}{8,16,32}
macros.

The reason this needs to be done is that we need to have a single set of
functions that will work correctly on multiple architectures for both little
and big endian machines. It also needs to work correctly in the case that
we have the request or response queues in memory that has to be treated
specially (e.g., have ddi_dma_sync called on it for Solaris after we update
it or before we read from it). It also has to handle the SBus cards (for
platforms that have them) which, while on a Big Endian machine, do *not*
require *most* of the request/response queue entry fields to be swizzled
or unswizzled.

One thing that falls out of this is that we no longer build requests in the
request queue itself. Instead, we build the request locally (e.g., on the
stack) and then as part of the swizzling operation, copy it to the request
queue entry we've allocated. I thought long and hard about whether this was
too expensive a change to make as it in a lot of cases requires an extra
copy. On balance, the flexbility is worth it. With any luck, the entry that
we build locally stays in a processor writeback cache (after all, it's only
64 bytes) so that the cost of actually flushing it to the memory area that is
the shared queue with the PCI device is not all that expensive. We may examine
this again and try to get clever in the future to try and avoid copies.

Another change that falls out of this is that MEMORYBARRIER should be taken
a lot more seriously. The macro ISP_ADD_REQUEST does a MEMORYBARRIER on the
entry being added. But there had been many other places this had been missing.
It's now very important that it be done.

Additional changes:

Fix a longstanding buglet of sorts. When we get an entry via isp_getrqentry,
the iptr value that gets returned is the value we intend to eventually plug
into the ISP registers as the entry *one past* the last one we've written-
*not* the current entry we're updating. All along we've been calling sync
functions on the wrong index value. Argh. The 'fix' here is to rename all
'iptr' variables as 'nxti' to remember that this is the 'next' pointer-
not the current pointer.

Devote a single bit to mboxbsy- and set aside bits for output mbox registers
that we need to pick up- we can have at least one command which does not
have any defined output registers (MBOX_EXECUTE_FIRMWARE).

MFC after:	2 weeks
2001-12-11 00:18:45 +00:00
..
aac I missed a string concatenation. 2001-12-10 09:34:47 +00:00
acpica Disable sleep requests for 5 sec after wakeup. This is needed for 2001-12-09 18:02:36 +00:00
advansys
agp Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
aha
ahb
aic Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
aic7xxx
amd
amr Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
an Minor style problem I introduced recently 2001-11-15 06:44:43 +00:00
ar
asr Put a Band-Aid over the asr driver so that it hopefully won't cause 2001-10-30 21:13:39 +00:00
ata Allow setting the CD type on cue sheets 2001-12-04 21:39:34 +00:00
atkbdc
awi Add NEWCARD support to awi. 2001-11-19 06:42:11 +00:00
bge Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
bktr o Add #include <sys/systm.h> to fix a warning about printf() being 2001-11-26 04:06:47 +00:00
buslogic
cardbus
ccd Return EOPNOTSUPP for unknown module events. 2001-11-17 00:46:08 +00:00
ciss Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
cnw
cs Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
ct
cy Call to cdevsw_add() no longer needed. 2001-11-04 08:49:51 +00:00
dc MFS (merge from stable): rev 1.9.2.28, fix ordering of IFF_RUNNING mods. 2001-12-07 00:57:57 +00:00
de No FreeBSD/vax here either. 2001-11-03 08:32:28 +00:00
dec Introduce a boot environment variable (clock_compat_osf1) which can 2001-11-03 17:22:50 +00:00
dgb Don't call cdevsw_add(). 2001-11-04 09:09:41 +00:00
digi - Fix a bunch of malloc calls where the M_FLAG is incorrectly used; it 2001-12-07 17:59:15 +00:00
dpt This file is a 2.2 vintage pre-CAM file of no current value. 2001-11-06 07:24:54 +00:00
ed Patch to allow the ed driver interrupt routine to terminate if the 2001-11-24 16:15:18 +00:00
eisa
em Fixed two problems: 2001-12-06 17:50:21 +00:00
en
ep More devices. Obtained from NetBSD. 2001-11-15 07:57:38 +00:00
ex
fb Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
fdc
fe Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
fxp Emit a warning if the mbuf or mbuf cluster allocation failed. 2001-11-02 05:10:40 +00:00
gfb We need to operate on struct thread now, not struct proc. 2001-11-08 01:49:06 +00:00
gx Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
hea
hfa
ic
ichsmb Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
ida Fix a signed bug in the crashdump code for systems with > 2GB of ram. 2001-11-13 01:08:54 +00:00
ie
iicbus Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
isp Major restructuring for swizzling to the request queue and unswizzling from 2001-12-11 00:18:45 +00:00
ispfw
joy Split joystick driver into ISA and PC Card front ends. 2001-12-05 09:08:23 +00:00
kbd
lge
lmc
lnc
mc146818
mca
mcd Don't call cdevsw_add(). 2001-11-04 08:58:22 +00:00
md Implement IO_NOWDRAIN and B_NOWDRAIN - prevents the buffer cache from blocking 2001-11-05 18:48:54 +00:00
mii
mlx Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
mly Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
mse
musycc
ncv Remove PAO3 dependent part. 2001-11-03 08:55:34 +00:00
nge Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
nmdm Don't call cdevsw_add(). 2001-11-04 15:55:17 +00:00
nsp Remove PAO3 dependent part. 2001-11-03 08:55:34 +00:00
null
ofw 1. Add ofw_pci.h with definitions for the OpenFirmware PCI bindings 2001-11-18 20:38:44 +00:00
pccard implement MFC links properly (and I think long links too). This make 2001-12-04 13:48:16 +00:00
pccbb Make the start memory address that we use configurable via a boot 2001-11-26 07:17:09 +00:00
pcf Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
pci Experimental patch to try to properly clip the range of the memory 2001-11-26 07:12:35 +00:00
pcic
pdq
ppbus Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
ppc Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
random
ray Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
rc
rp Force the RxBuf and TxBuf arrays to be aligned on 16-bit boundaries to 2001-11-05 12:57:46 +00:00
sbni Add driver for Granch SBNI12-xx ISA and PCI network adapters. 2001-11-21 22:29:35 +00:00
scd Don't call cdevsw_add() 2001-11-04 08:54:15 +00:00
sf
si
sio Split the sio driver for pc98 into bus front end and back end. 2001-11-26 12:29:53 +00:00
sk
smbus
sn Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
snc
snp Check the return value of tsleep() in snpread(). This may be 2001-11-24 15:59:46 +00:00
sound Get rid of irritating (bogus) message: 2001-12-10 20:27:18 +00:00
speaker
sr
stg Remove PAO3 dependent part. 2001-11-03 08:55:34 +00:00
streams
sym Submitted by:David E. O'Brien 2001-11-24 12:35:48 +00:00
syscons Fix POLA - when selecting line into syscons' cut'n'paste buffer (double 2001-11-25 22:51:30 +00:00
tdfx
tga Add the TGA video driver. This is a great accomplishtment and will help 2001-11-01 08:26:30 +00:00
ti Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
twe Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
tx
txp Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the 2001-12-03 17:28:27 +00:00
usb Regen from usbdevs rev 1.70: added some AGFA scanners 2001-12-10 11:46:23 +00:00
vinum Don't call cdevsw_{add,remove}(). 2001-11-04 11:55:19 +00:00
vr
vx
wds
wi Update to C99, s/__FUNCTION__/__func__/, 2001-12-10 08:09:49 +00:00
wl
xe