Commit Graph

19 Commits

Author SHA1 Message Date
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
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 154a3bba69 use MI softintr 2001-03-30 23:28:00 +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
wdk 935036cf94 Remove superfluous #include added in previous commit 2001-02-21 09:20:56 +00:00
wdk 85f0f12a55 Changes for KGDB 2001-02-21 09:12:14 +00:00
wdk 8a5e278439 Glue functions for KGDB support 2001-02-21 09:08:35 +00:00
wdk 25ad09d3d2 Fully implement bus_space(9) access to the z8530 SCC registers.
This adds the missing wbflush() calls after writing register data.

At same time tidy up several comments and make several KNF changes.

XXX: The z8530 MI driver doesn't support bus_space access to the registers
     (lacks a hook for storing a bus space tag, and stores register
     addresses directly)
     Until other ports catch up (this is the first) we have overlayed
     the missing data in the MD structures
2001-02-07 11:38:34 +00:00
matt bd338a518c Deal with -Wstrict-prototypes -Wmissing-prototypes 2000-12-03 04:51:04 +00:00
wdk 2bc18c0ead Add parenthesis to TICKS_TO_USECS macro avoiding side-effects.
Fixes glitch where microtime goes backward.   KNF rules!
2000-10-02 07:58:26 +00:00
wdk b38096892a Microtime calculation was seriously incorrect when HZ != 100
Give rest of clock interrupt code a revamp.  Because we are using an external
cycle counter we can now handle loosing several hundred interrupts without
the time slipping.
2000-09-06 07:52:47 +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 149a5fc5f2 Engage the clutch before changing gears.
If the machine uses a Z85230 ESCC device with deep buffers, we observe
output glitches when printing the zstty{0,1} probe lines when the device
is reset & reprogrammed during startup.

There is no easy 'hook' in the MI Z8530 driver, so we wait for output
buffer to drain before changing the baud rate generator prescaler value.
2000-08-29 11:25:08 +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 9ac68bcb51 - Add support for calling most prom firmware functions
- Using the prom getenv function determine the correct console port

- Remove old prom function hooks

- Tidy up bootflags (remove upper case names, fixup RB_ASKNAME) as
  recommended by Jaromír Doleèek
2000-08-19 12:13:46 +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