Commit Graph

9 Commits

Author SHA1 Message Date
bouyer 937a7a3ed9 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
2001-04-25 17:53:04 +00:00
wdk 70a7bcb64b Remove ncr53c9x_dmaselect 2001-03-30 07:49:07 +00:00
wdk ffa74abf2f - Add "Features Enable" and CDB bits to SCSI controller config
- During un-aligned writes: Don't accidently leave the DMA engine active
  after priming the FIFO between calls to asc_dma_setup and asc_dma_go
2001-03-05 05:04:29 +00:00
matt bd338a518c Deal with -Wstrict-prototypes -Wmissing-prototypes 2000-12-03 04:51:04 +00:00
wdk 3e329a2925 * Use bus_space_write_multi_2 for priming the DMA FIFO as suggested by cgd
*  Correctly handle transfer pad operation

*  Remove check for DMA fifo flush during DMA chaining - after considerable
   thought this is not required
2000-09-04 22:28:53 +00:00
wdk aaa3f11967 Fix an obscure bug with dump corrupting files during raw reads.
If the DMA chaning interrupt couldn't be serviced immediately (higher spl
level when kernel doing something else) a few microseconds later the NCR
controller will fill its FIFO and also interrupt the CPU.

The SCSI interrupt sees the terminal count has been reached, calls
asc_dma_intr to finish the job off.   The FIFO cannot be flushed because
the block count hasn't been setup for the last dma segment (DMA chaining
still wasn't serviced).

Since the NCR 53c94 FIFO is only 16 bytes in size, any short DMA in this
size combined with the machine 'doing something else' causes the problem
to occur.

Servicing the DMA chaining interrupt before the NCR SCSI interrupt solves
this problem.

Add tests to ensure the DMA FIFO has been flushed correctly at the end of
each DMA operation just to be on the safe side.
2000-08-29 08:24:06 +00:00
wdk 33016f23e0 * Tidy up interrupt handlers by implementing an intr_establish()
handler to hook up device interrupts and softc callbacks.

   Suggested by:  Jason Thorpe and Toru Nishimura

*  Fixup the indenting in a few places to conform to NetBSD style
2000-08-15 04:56:45 +00:00
wdk 374fb8efbc Decrement the block count to compensate for 64 bytes prefetched to fill
the DMA FIFO on non block aligned writes.   Not doing this causes large
writes (>4k) that are not aligned to incorrectly write 64bytes
of data every 4k interval.   This only occurs on raw devices - typically
newfs fails to create a clean filesystem.
2000-08-14 21:04:44 +00:00
wdk 3f55a7b9aa Initial commit of port to MIPS Computer Systems RC3xxx systems.
Currently supports the RC3230
2000-08-12 22:57:55 +00:00