opnsense-src/sys/dev
Justin T. Gibbs d7cff4ab97 Correct spelling errors.
Switch to handling bad SCSI status as a sequencer interrupt
instead of having the kernel proccess these failures via
the completion queue.  This is done because:

 o The old scheme required us to pause the sequencer and clear
   critical sections for each SCB.  It seems that these pause
   actions, if coincident with a sequencer FIFO interrupt, would
   result in a FIFO interrupt getting lost or directing to the
   wrong FIFO.  This caused hangs when the driver was stressed
   under high "queue full" loads.
 o The completion code assumed that it was always called with
   the sequencer running.  This may not be the case in timeout
   processing where completions occur manually via
   ahd_pause_and_flushwork().
 o With this scheme, the extra expense of clearing critical
   sections is avoided since the sequencer will only self pause
   once all pending selections have cleared and it is not in
   a critical section.

  aic79xx.c
	Add code to handle the new BAD_SCB_STATUS sequencer
	interrupt code.  This just redirects the SCB through
	the already existing ahd_complete_scb() code path.
	Remove code in ahd_handle_scsi_status() that paused
	the sequencer, made sure that no selections where
	pending, and cleared critical sections.  Bad
	status SCBs are now only processed when all of these
	conditions are true.

  aic79xx.reg:
	Add the BAD_SCB_STATUS sequencer interrupt code.

  aic79xx.seq:
	When completing an SCB upload to the host, if
	we are doing this because the SCB contains non-zero
	SCSI status, defer completing the SCB until there
	are no pending selection events.  When completing
	these SCBs, use the new BAD_SCB_STATUS sequencer
	interrupt.  For all other uploaded SCBs (currently
	only for underruns), the SCB is completed via the
	normal done queue.  Additionally, keep the SCB that
	is currently being uploaded on the COMPLETE_DMA_SCB
	list until the dma is completed, not just until the
	DMA is started.  This ensures that the DMA is restarted
	properly should the host disable the DMA transfer for
	some reason.

	In our RevA workaround for Maxtor drives, guard against
	the host pausing us while trying to pause I/O until the
	first data-valid REQ by clearing the current snapshot
	so that we can tell if the transfer has completed prior
	to us noticing the REQINIT status.

	In cfg4data_intr, shave off an instruction before getting
	the data path running by adding an entrypoint to the
	overrun handler to also increment the FIFO use count.

	In the overrun handler, be sure to clear our LONGJMP
	address in both exit paths.

Perform a few sequencer optimizations.

  aic79xx.c:
	Print the full path from the SCB when a packetized
	status overrun occurs.

	Remove references to LONGJMP_SCB which is being
	removed from firmware usage.

	Print the new SCB_FIFO_USE_COUNT field in the
	per-SCB section of ahd_dump_card_state().  The
	SCB_TAG field is now re-used by the sequencer,
	so it no longer makes sense to reference this
	field in the kernel driver.

  aic79xx.h:
	Re-arrange fields in the hardware SCB from largest
	size type to smallest.  This makes it easier to
	move fields without changing field alignment.

	The hardware scb tag field is now down near the
	"spare" portion of the SCB to facilitate reuse
	by the sequencer.

  aic79xx.reg:
	Remove LONGJMP_ADDR.

	Rearrange SCB fields to match aic79xx.h.
	Add SCB_FIFO_USE_COUNT as the first byte
	of the SCB_TAG field.

  aic79xx.seq:
	Add a per-SCB "Fifos in use count" field and use
	it to determine when it is safe (all data posted)
	to deliver status back to the host.  The old method
	involved polling one or both FIFOs to verify that
	the current task did not have pending data.  This
	makes running down the GSFIFO very cheap, so we
	will empty the GSFIFO in one idle loop pass in
	all cases.

	Use this simplification of the completion process
	to prune down the data FIFO teardown sequencer for
	packetized transfers.  Much more code is now shared
	between the data residual and transfer complete cases.

	Correct some issues in the packetized status handler.
	It used to be possible to CLRCHN our FIFO before status
	had fully transferred to the host.  We also failed to
	handle NONPACKREQ phases that could occur should a CRC
	error occur during transmission of the status data packet.

Correct a few big endian issues:

  aic79xx.c:
  aic79xx_inline.h:
  aic79xx_pci.c:
  aic79xx_osm.c:
	o Always get the SCB's tag via the SCB_GET_TAG acccessor
	o Add missing use of byte swapping macros when touching
	  hscb fields.
	o Don't double swap SEEPROM data when it is printed.
	  Correct a big-endian bug.  We cannot assign a
	o When assigning a 32bit LE variable to a 64bit LE
	  variable, we must be explict about how the words
	  of the 64bit LE variable are initialized.  Cast to
	  (uint32_t*) to do this.

aic79xx.c:
	In ahd_clear_critical_section(), hit CRLSCSIINT
	after restoring the interrupt masks to avoid what
	appears to be a glitch on SCSIINT.  Any real SCSIINT
	status will be persistent and will immidiately
	reset SCSIINT.  This clear should only get rid of
	spurious SCSIINTs.

	This glitch was the cause of the "Unexpected PKT busfree"
	status that occurred under high queue full loads

	Call ahd_fini_scbdata() after shutdown so that
	any ahd_chip_init() routine that might access
	SCB data will not access free'd memory.

	Reset the bus on an IOERR since the chip doesn't
	seem to reset to the new voltage level without
	this.

	Change offset calculation for scatter gather maps
	so that the calculation is correct if an integral
	multiple of sg lists does not fit in the allocation
	size.

	Adjust bus dma tag for data buffers based on 39BIT
	addressing flag in our softc.

	Use the QFREEZE count to simplify ahd_pause_and_flushworkd().
	We can thus rely on the sequencer eventually clearing ENSELO.

	In ahd_abort_scbs(), fix a bug that could potentially
	corrupt sequencer state.  The saved SCB was being
	restored in the SCSI mode instead of the saved mode.
	It turns out that the SCB did not need to be saved at all
	as the scbptr is already restored by all subroutines
	called during this function that modify that register.

aic79xx.c:
aic79xx.h:
aic79xx_pci.c:
	Add support for parsing the seeprom vital product
	data.  The VPD data are currently unused.

aic79xx.h:
aic79xx.seq:
aic79xx_pci.c:
	Add a firmware workaround to make the LED blink
	brighter during packetized operations on the H2A.

aic79xx_inline.h:
	The host does not use timer interrupts, so don't
	gate our decision on whether or not to unpause
	the sequencer on whether or not a timer interrupt
	is pending.
2003-05-04 00:20:07 +00:00
..
aac Don't pass pointers to kernel data structures through 32-bit fields 2003-04-28 06:16:20 +00:00
acpica Catch up to reworked debugging levels in latest Intel import. 2003-05-01 18:51:43 +00:00
adlink Almost the finished article. 2003-04-08 19:12:48 +00:00
advansys I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
agp - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
aha I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
ahb I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
aic Make sure that pp_name is non-null before setting the device 2003-04-10 04:36:02 +00:00
aic7xxx Correct spelling errors. 2003-05-04 00:20:07 +00:00
amd I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
amr Use bioq_flush() to drain a bio queue with a specific error code. 2003-04-01 15:06:26 +00:00
an - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
ar Get rid of kvtop(). 2003-04-23 15:40:11 +00:00
asr Include <sys/ioccom.h> instead of <sys/disklabel.h> 2003-04-16 20:46:30 +00:00
ata Fix locking on reinit. 2003-05-03 18:28:43 +00:00
atkbdc Update the hardcoded bus tags for early console support for amd64. 2003-05-01 04:19:19 +00:00
awi Explicitly declare 'int' parameters. 2003-04-21 16:27:46 +00:00
bge Implement the write twice to send producer index workaround for 2003-05-04 00:07:21 +00:00
bktr - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
buslogic I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
cardbus MFp4: when you can't allocate a resource, print a message, don't panic. 2003-04-08 07:05:16 +00:00
ccd More correct patch: Only call biofinish if we have not already sent 2003-04-14 08:49:54 +00:00
ciss Add support for the HP Smart Array 6400 EM 2003-04-03 20:09:27 +00:00
cm - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
cnw - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
cs - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
ct Force PnP devices to set SMIT mode. 2003-05-03 02:04:58 +00:00
cy - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
dc Use only a 64bit hash filter table for ADM-Centaur cards like the 2003-05-01 09:31:01 +00:00
de - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
dec Introduce a boot environment variable (clock_compat_osf1) which can 2001-11-03 17:22:50 +00:00
dgb Make TTYHOG tunable. 2003-03-05 08:16:29 +00:00
digi Make nokqfilter() return the correct return value. 2003-03-03 16:24:47 +00:00
dpt I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
drm Merge from DRI CVS: Disable MTRRs on FreeBSD-stable to work around hangs with 2003-04-26 06:59:38 +00:00
ed - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
eisa Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
em - Fix breakage on PAE enabled kernel 2003-05-03 07:35:47 +00:00
en Add module data and version to the atm_subr and reference this info from the 2003-04-29 08:07:44 +00:00
ep Make sure that pp_name is non-null before setting the device 2003-04-10 04:36:02 +00:00
ex - Declare ex_devclass in if_ex.c 2003-03-29 15:38:53 +00:00
exca Massive overhaul of exca to help with the isa efforts: 2003-02-14 06:21:18 +00:00
fb Unbreak alpha and ia64 builds. The previous change made the inclusion 2003-05-02 01:36:27 +00:00
fdc Use bioq_flush() to drain a bio queue with a specific error code. 2003-04-01 15:06:26 +00:00
fe Make sure that pp_name is non-null before setting the device 2003-04-10 04:36:02 +00:00
firewire Fix printf format errors. 2003-05-02 17:21:07 +00:00
fxp Fix tpyo in last commit. 2003-04-30 04:14:56 +00:00
gem - Don't call pci_enable_io() in drivers (unless needed for resume). 2003-04-16 03:16:57 +00:00
gfb - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
gx - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
hea Explicitly declare 'int' parameters. 2003-04-21 16:27:46 +00:00
hfa - Don't call pci_enable_io() in drivers (unless needed for resume). 2003-04-16 03:16:57 +00:00
hifn o add crypto driver glue for using the new rndtest driver/module; this is 2003-03-11 22:47:06 +00:00
hme - Don't call pci_enable_io() in drivers (unless needed for resume). 2003-04-16 03:16:57 +00:00
ic - Clean up function calling conventions. 2003-03-28 06:27:08 +00:00
ichsmb typo. 2002-10-18 12:06:01 +00:00
ida I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
idt - Deal with netisr changes. 2003-03-29 15:55:04 +00:00
ie - Move driver to newbus. 2003-03-29 13:36:41 +00:00
iicbus Update netisr handling; Each SWI now registers its queue, and all queue 2003-03-04 23:19:55 +00:00
iir Import latest changes from the vendor. This also is reported to fix the 2003-04-25 05:37:04 +00:00
isp Add an explanatory comment about what operational modes in xfwopt are. 2003-03-25 07:02:45 +00:00
ispfw Roll to latest level. 2003-02-16 01:30:31 +00:00
joy Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
kbd Update the hardcoded bus tags for early console support for amd64. 2003-05-01 04:19:19 +00:00
lge - Don't call pci_enable_io() in drivers (unless needed for resume). 2003-04-16 03:16:57 +00:00
lmc Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
lnc - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
mc146818 Add missing $FreeBSD$ 2000-05-01 19:54:26 +00:00
mca Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
mcd Don't include <sys/disklabel.h> 2003-04-16 20:57:35 +00:00
md Call g_wither_geom(), instead of just setting the flag. 2003-05-02 06:18:58 +00:00
mii - Move bge_phy_hack into the phy code and implement the various DSP 2003-05-03 19:06:50 +00:00
mk48txx Add a driver back end for the Mostek MK48T02, MK48T08 and MK48T59 2002-04-04 23:44:42 +00:00
mlx Use bioq_flush() to drain a bio queue with a specific error code. 2003-04-01 15:06:26 +00:00
mly Centralize the devstat handling for all GEOM disk device drivers 2003-03-08 08:01:31 +00:00
mpt I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
mse Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
musycc Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
my - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
ncv Make sure that pp_name is non-null before setting the device 2003-04-10 04:36:02 +00:00
nge - Don't call pci_enable_io() in drivers (unless needed for resume). 2003-04-16 03:16:57 +00:00
nmdm Make TTYHOG tunable. 2003-03-05 08:16:29 +00:00
nsp o Changes to support NEWCARD. 2002-11-28 01:09:29 +00:00
null Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
ofw Use __FBSDID rather than rcsid[]. 2003-04-03 21:36:33 +00:00
pccard Sync to 1.50 2003-04-27 03:32:09 +00:00
pccbb Fix typo on O2Micro devices names. 2003-04-29 05:59:04 +00:00
pcf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
pci Add constants for USB programming interfaces. These are already defined 2003-04-23 15:51:36 +00:00
pcic More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9). 2003-03-02 16:54:40 +00:00
pdq - Don't call pci_enable_io() in drivers (unless needed for resume). 2003-04-16 03:16:57 +00:00
ppbus Fix a printf warning from the recent CAM changes. 2003-05-01 19:46:21 +00:00
ppc Fix some easy, global, lint warnings. In most cases, this means 2003-04-30 12:57:40 +00:00
pst Pull the pst driver out from under GAINT. 2003-04-28 08:10:27 +00:00
puc Add support for IC Book Ironclad Pro/Lite 8-port cards. 2003-04-30 22:15:47 +00:00
raidframe Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
random Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
ray Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
rc Make TTYHOG tunable. 2003-03-05 08:16:29 +00:00
rndtest FIPS 140-2 rng data tester for h/w crypto devices. This driver periodically 2003-03-11 22:54:44 +00:00
rp Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
sab Match "serial" as well as "se". 2003-03-31 18:21:52 +00:00
sbni - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
sbsh cosmetic style fixes 2003-04-15 17:26:28 +00:00
scd Don't include <sys/disklabel.h> 2003-04-16 20:57:35 +00:00
sf Use newly minted device_is_attached rather than device_is_alive to see 2003-04-21 18:34:04 +00:00
si Make TTYHOG tunable. 2003-03-05 08:16:29 +00:00
sio Eliminate a compiler warning with gcc3.3 on AMD64, where speed is 2003-04-30 21:39:28 +00:00
sk Use newly minted device_is_attached rather than device_is_alive to see 2003-04-21 18:34:04 +00:00
smbus Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
sn - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
snc Fix off-by-one bug. 2003-05-03 01:47:38 +00:00
snp Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
sound Fix lock order reversal when opening device and chn_reset fails. 2003-05-01 16:31:21 +00:00
speaker Retire sys/pc98/pc98/spkr.c 2003-03-24 21:01:54 +00:00
sr Use bus_space*() instead of in*() and out*(). 2003-04-23 20:22:32 +00:00
stg Make sure that pp_name is non-null before setting the device 2003-04-10 04:36:02 +00:00
streams Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
sym I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
syscons Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
tdfx - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
tga Gigacommit to improve device-driver source compatibility between 2003-03-03 12:15:54 +00:00
ti Use newly minted device_is_attached rather than device_is_alive to see 2003-04-21 18:34:04 +00:00
trm I deserve a big pointy hat for having missed all those references 2003-04-10 23:50:06 +00:00
twe Use bioq_flush() to drain a bio queue with a specific error code. 2003-04-01 15:06:26 +00:00
tx Convert the tx(4) driver to use the busdma API. 2003-04-20 18:08:00 +00:00
txp - Don't call pci_enable_io() in drivers (unless needed for resume). 2003-04-16 03:16:57 +00:00
ubsec recognize the Sun Crypto 5821 and Crypto 1K cards; 2003-04-27 04:26:22 +00:00
usb Regen. 2003-05-03 10:19:43 +00:00
vinum check_drive: If we find an existing drive which is "up" or "down", 2003-05-02 06:04:19 +00:00
vr Use newly minted device_is_attached rather than device_is_alive to see 2003-04-21 18:34:04 +00:00
vx - Express hard dependencies on bus (pci, isa, pccard) and 2003-04-15 06:37:30 +00:00
wds Don't include <sys/disklabel.h> 2003-04-16 20:57:35 +00:00
wi Don't hold a driver lock across bus_teardown_intr. Jhb points out 2003-04-29 03:22:39 +00:00
wl Get wlread() closer to working. Use m->m_len as the initial value for 2003-04-17 17:51:24 +00:00
xe Make sure that pp_name is non-null before setting the device 2003-04-10 04:36:02 +00:00
zs Note that MAJOR_AUTO is now the default if d_maj is not initialized. This 2003-03-09 11:03:45 +00:00