DragonFly BSD

CVS log for src/sys/dev/disk/aic7xxx/aic7xxx_osm.h

[BACK] Up to [DragonFly] / src / sys / dev / disk / aic7xxx

Request diff between arbitrary revisions

Keyword substitution: kv
Default branch: MAIN

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Apr 6 19:03:18 2008 UTC (7 years, 2 months ago) by pavalos
Branches: MAIN
CVS tags: HEAD, DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_Preview
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +1 -1 lines
LK_EXCLUSIVE has no business being in lockinit.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Feb 10 00:01:02 2008 UTC (7 years, 4 months ago) by pavalos
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +0 -4 lines
Make CAM_NEW_TRAN_CODE default.

As previously mentioned, this makes a huge performance difference for one
of my disks, and future work depends on this change.

Obtained-from: FreeBSD

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Feb 9 18:13:13 2008 UTC (7 years, 4 months ago) by pavalos
Branches: MAIN
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +25 -17 lines
MPSAFE locking for the ahc/ahd drivers using lockmgr locks.

Obtained-from: FreeBSD

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sat Jul 7 01:09:42 2007 UTC (8 years ago) by pavalos
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_10_Slip, DragonFly_RELEASE_1_10
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +2 -2 lines
-Wundef fix.

Obtained-from: FreeBSD

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Jul 6 04:56:22 2007 UTC (8 years ago) by pavalos
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +23 -11 lines
Add an ISA attachement to the aic7xxx driver to handle 284X controllers.
The ISA probe uses an identify routine to probe all slot locations from
1 to 14 that do not conflict with other allocated resources.  This required
making aic7770.c part of the driver core when compiled as a module.

        Use aic_scb_timer_start() consistently to start the watchdog timer.
        This removes a few places that verbatum copied the code in

        During recovery processing, allow commands to still be queued to
        the controller.  The only requirement we have is that our recovery
        command be queued first - something the code already guaranteed.
        The only other change required to make this work is to prevent
        timers from being started for these newly queued commands.

Obtained-from: FreeBSD

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Jul 6 00:01:16 2007 UTC (8 years ago) by pavalos
Branches: MAIN
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +12 -296 lines
	Use common OSM routines from aic_osm_lib for bus dma operations,
	delay routines, accessing CCBs, byte swapping, etc.

	Provide a better description for the 2915/30LP on attach.

	To speed up non-packetized CDB delivery in Rev B, all CDB
	acks are "released" to the output sync as soon as the
	command phase starts.  There is only one problem with this
	approach.  If the target changes phase before all data are
	sent, we have left over acks that can go out on the bus in
	a data phase.  Due to other chip contraints, this only
	happens if the target goes to data-in, but if the acks go
	out before we can test SDONE, we'll think that the transfer
	has completed successfully.  Work around this by taking
	advantage of the 400ns or 800ns dead time between command
	phase and the REQ of the new phase.  If the transfer has
	completed successfully, SCSIEN should fall *long* before we
	see a phase change.  We thus treat any phasemiss that
	occurs before SCSIEN falls as an incomplete transfer.

		Add the AHD_FAST_CDB_DELIVERY feature.

		Set AHD_FAST_CDB_DELIVERY for all Rev. B parts.

		Test for PHASEMIS in the command phase for
		all AHD_FAST_CDB_DELIVERY controlelrs.

	Move definition of controller BAR offsets to core header files.

	In the softc free routine, leave removal of a softc from the
	global list of softcs to the OSM (the caller of this routine).
	This allows us to avoid holding the softc list_lock during device
	destruction where we may have to sleep waiting for our recovery
	thread to halt.

	Use ahc_pci_test_register access to validate I/O mapped in
	addition to the tests already performed for memory mapped

	Remove unused ahc_power_state_change() function.

	Remove reduntant definition of controller BAR offsets.  These
	are also defined in aic79xx.h.

	Remove unused ahd_power_state_change() function.

	Move timeout handling to the driver cores.  In the case
	of the aic79xx driver, the algorithm has been enhanced
	to try target resets before performing a bus reset.  For
	the aic7xxx driver, the algorithm is unchanged.  Although
	the drivers do not currently sleep during recovery (recovery
	is timeout driven), the cores do expect all processing to
	be performed via a recovery thread.  Our timeout handlers
	are now little stubs that wakeup the recovery thread.

	Change shared_data allocation to use a map_node so
	that the sentinel hscb can use this map node in
	ahd_swap_with_next_hscb.  This routine now swaps
	the hscb_map pointer in additon to the hscb
	contents so that any sync operations occur on
	the correct map.

	physaddr -> busaddr

	Pointed out by: Jason Thorpe <thorpej@wasabisystems.com>

	Make more use of the in/out/w/l/q macros for accessing
	byte registers in the chip.

	Correct some issues in the ahd_flush_qoutfifo() routine.
	    o Run the qoutfifo only once the command channel
	      DMA engine has been halted.  This closes a window
	      where we might have missed some entries.
	    o Change ahd_run_data_fifo() to not loop to completion.
	      If we happen to start on the wrong FIFO and the other
	      FIFO has a snapshot savepointers, we might deadlock.
	      This required our delay between FIFO tests to be
	      moved to the ahd_flush_qoutfifo() routine.
	    o Update/add comments.
	    o Remove spurious test for COMPLETE_DMA list being empty
	      when completing transactions from the GSFIFO with
	      residuals.  The SCB must be put on the COMPLETE_DMA
	      scb list unconditionally.
	    o When halting command channel DMA activity, we must
	      disable the DMA channel in all cases but an update
	      of the QOUTFIFO.  The latter case is required so
	      that the sequencer will update its position in the
	      QOUTFIFO.  Previously, we left the channel enabled
	      for all "push" DMAs.  This left us vulnerable to
	      the sequencer handling an SCB push long after that
	      SCB was already processed manually by this routine.
	    o Correct the polarity of tests involving
	      ahd_scb_active_in_fifo().  This routine returns
	      non-zero for true.

	Return to processing bad status completions through
	the qoutfifo.  This reduces the time that the sequencer
	is kept paused when handling transactions with bad
	status or underruns.

	When waiting for the controller to quiece selections,
	add a delay to our loop.  Otherwise we may fail to wait
	long enough for the sequencer to comply.

	On H2A4 hardware, use the slow slewrate for non-paced
	transfers.  This mirrors what the Adaptec Windows
	drivers do.

	On the Rev B. only slow down the CRC timing for
	older U160 devices that might need the slower timing.
	We define "older" as devices that do not support
	packetized protocol.

	Wait up to 5000 * 5us for the SEEPROM to become unbusy.
	Write ops seem to take much longer than read ops.

	For controllers with the FAINT_LED bug, turn the diagnostic
	led feature on during selection and reselection.  This covers
	the non-packetized case.  The LED will be disabled for
	non-packetized transfers once we return to the top level idle
	loop.  Add more comments about the busy LED workaround.

	Extend a critical section around the entire
	command channel idle loop process.  Previously
	the portion of this handler that directly manipulated
	the linked list of completed SCBs was not protected.
	This is the likely cause of the recent reports of
	commands being completed twice by the driver.

	Extend critical sections across the test for,
	and the longjump to, longjump routines.  This
	prevents the firmware from trying to jump to
	a longjmp handler that was just cleared by the

	Improve the locations of several critical section
	begin and end points.  Typically these changes
	remove instructions that did not need to be
	inside a critical section.

	Close the "busfree after selection, but before busfree
	interrupts can be enabled" race to just a single sequencer
	instruction.  We now test the BSY line explicitly before
	clearing the busfree status and enabling the busfree

	Close a race condition in the processing of HS_MAILBOX
	updates.  We now clear the "updated" status before the
	copy.  This ensures that we don't accidentally clear
	the status incorrectly when the host sneaks in an update
	just after our last copy, but before we clear the status.
	This race has never been observed.

	Don't re-enable SCSIEN if we lose the race to disable SCSIEN
	in our interrupt handler's workaround for the RevA data-valid
	too early issue.

	Add comments indicating that the order in which bytes are
	read or written in ahd_inw and ahd_outw is important.  This
	allows us to use these inlines when accessing registers with

	The 29320 and the 29320B are 7902 not 7901 based products.
	Correct the driver banner.

	Enable the use of the auto-access pause feature
	on the aic7870 and aic7880.  It was disabled due
	to an oversight.

	avoid leaving garbage in MWI_RESIDUAL.  This
	prevents spurious overflows whn operating target
	mode on controllers that require the MWI_RESIDUAL

	AHC_TMODE_WIDEODD_BUG is a bug, not a softc flag.
	Reference the correct softc field when testing
	for its presence.

	in SEQ_FLAGS to indicate that the nexus is
	invalid in await busfree.

	Add support for the C56/C66 versions of the EWEN and EWDS

	Move test for the validity of left over BIOS data
	to ahc_test_register_access().  This guarantees that
	any left over CHIPRST value is not clobbered by our
	register access test and lost to the test that was
	in ahc_reset.

Obtained-from: FreeBSD

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Jan 27 15:03:25 2007 UTC (8 years, 5 months ago) by swildner
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +4 -51 lines
Fix argument lists of locking primitives (thereby fixing some compilation

While I'm here, remove several empty functions.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Oct 25 20:55:53 2006 UTC (8 years, 8 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +1 -6 lines
Do a major clean-up of the BUSDMA architecture.  A large number of
essentially machine-independant drivers use the structures and definitions
in machine-dependant directories that are really machine-independant in

Split <machine/bus_dma.h> into machine-depdendant and machine-independant parts
and make the primary access run through <sys/bus_dma.h>.

Remove <machine/bus.h>, <machine/bus_memio.h> and <machine/bus_pio.h>.  The
optimizations related to bus_memio.h and bus_pio.h made a huge mess,
introduced machine-specific knowledge into essentially machine-independant
drivers, and required specific #include file orderings to do their job.
They may be reintroduced in some other form later on.

Move <machine/resource.h> to <sys/bus_resource.h>.  The contents of the file
is machine-independant or can be made a superset across many platforms.

Make <sys/bus.h> include <sys/bus_dma.h> and <sys/bus_resource.h> and
include <sys/bus.h> where necessary. Remove all #include's of
<machine/resource.h> and <machine/bus.h>.  That is, make the BUSDMA
infrastructure integral to I/O-mapped and memory-mapped accesses to devices
and remove a large chunk of machine-specific dependancies from drivers.
bus_if.h and device_if.h are now required to be present when using <sys/bus.h>.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Aug 25 23:37:35 2005 UTC (9 years, 10 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6, DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +2 -2 lines
Reduce critical section warnings for AHC when critical section debugging
is turned on.  The warnings are due to the crit_enter() and crit_exit()
occuring in different procedures.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jun 3 16:57:13 2005 UTC (10 years, 1 month ago) by eirikn
Branches: MAIN
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +5 -4 lines
Remove *spl() from dev/disk/{advansys,aha,ahb,aic7xxx,amd} replacing them with
critical sections.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Sep 17 03:39:39 2004 UTC (10 years, 9 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Stable, DragonFly_Snap29Sep2004, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +2 -3 lines
timeout/untimeout ==> callout_*

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Feb 13 01:04:14 2004 UTC (11 years, 4 months ago) by joerg
Branches: MAIN
CVS tags: DragonFly_Snap13Sep2004, DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +4 -4 lines
Add __DragonFly__

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu Aug 7 21:16:51 2003 UTC (11 years, 11 months ago) by dillon
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +12 -12 lines
kernel tree reorganization stage 1: Major cvs repository work (not logged as
commits) plus a major reworking of the #include's to accomodate the

    * CVS repository files manually moved.  Old directories left intact
      and empty (temporary).

    * Reorganize all filesystems into vfs/, most devices into dev/,
      sub-divide devices by function.

    * Begin to move device-specific architecture files to the device
      subdirs rather then throwing them all into, e.g. i386/include

    * Reorganize files related to system busses, placing the related code
      in a new bus/ directory.  Also move cam to bus/cam though this may
      not have been the best idea in retrospect.

    * Reorganize emulation code and place it in a new emulation/ directory.

    * Remove the -I- compiler option in order to allow #include file
      localization, rename all config generated X.h files to use_X.h to
      clean up the conflicts.

    * Remove /usr/src/include (or /usr/include) dependancies during the
      kernel build, beyond what is normally needed to compile helper

    * Make config create 'machine' softlinks for architecture specific
      directories outside of the standard <arch>/include.

    * Bump the config rev.

    WARNING! after this commit /usr/include and /usr/src/sys/compile/*
    should be regenerated from scratch.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:22 2003 UTC (12 years ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:54:03 2003 UTC (12 years ago) by dillon
Branches: MAIN
import from FreeBSD RELENG_4

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options