o When restarting the sequencer, clear any pending
authorPeter Avalos <pavalos@dragonflybsd.org>
Fri, 6 Jul 2007 02:04:20 +0000 (02:04 +0000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Fri, 6 Jul 2007 02:04:20 +0000 (02:04 +0000)
commit9501e9b97ee8e8d83251b6dd4fd4bab54653e34e
tree82b34cbeb197c6fc9757512ccb54119474381a10
parent263a6b5f1e4cf9118b920c7a533eaea90c207d59
o When restarting the sequencer, clear any pending
  sequencer interrupt codes.  These codes are only
  relevant to the code that was last being executed
  and that context is cleared when we reset the
  program counter.  This addresses a race condition
  between a sequencer interrupt and any SCSI event
  that causes us to restart the sequencer.

o When running the untagged-Q, we must start the
  timer for any transaction we queue.

o Give the firmware half a millisecond between
  pauses to flush work out.  This should give us
  around half a second of total delay before flagging
  an issue with pausing and flushing controller work.

  Only attempt to clear critical sections if there
  are no pending interrupts in the pause and flush
  loop.  If the sequencer has issued an INTSTAT, we
  may not be able to step out of the critical section.

o Cancel pending transactions on devices that
  respond with a selection timeout.  This decreases
  the duration of timeout recovery when a device
  disappears.

  Don't bother forcing renegotiation on a selection
  timeout now that we use the device reset handler
  to abort any pending commands on the target.
  The device reset handler already takes us down
  to async narrow and forces a renegotiation.

o In the device reset handlers, only send a
  BDR sent async event if the status is not
  CAM_SEL_TIMEOUT.  This avoids sending this
  event in the selection timeout case.

o Modify the Core timeout handler to verify that another
  command has the potential to timeout before passing off
  a command timeout as due to some other command.

Obtained-from: FreeBSD
sys/dev/disk/aic7xxx/aic7xxx.c