Commit Graph

26 Commits

Author SHA1 Message Date
tsutsui 47c4c87d2c Fix bus error trap on X68030/25MHz on-board SPC, which may have some quirk.
Problem reported by Yasushi Oshima.
2004-01-06 18:07:17 +00:00
wiz c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
isaki 515af69254 Delete strange ifdef x68k.
Requested by tsutsui@
2003-09-07 05:26:30 +00:00
isaki 05e2e8b5b9 Delete unnecessary #ifndef for x68k.
approved by tsutsui@
2003-08-29 02:45:57 +00:00
tsutsui 1a4743265a - Add hooks for MD DMA transfers.
- Prepare ADAPTER_REQ_SET_XFER_MODE function.
  (currently sync xfer is not supported)
2003-08-01 00:38:38 +00:00
tsutsui fddebe9b9c There is a report that x68k SCSI no longer works after the previous changes.
It seems x68k SPC SCSI has several hardware quirks, so add some (a bit ugly)
#ifdefs for workaround.  (XXX - needs revisiting)
2003-07-27 03:51:28 +00:00
tsutsui c42dcc7de8 More misc fixes for forthcoming hp300 MI SCSI support:
- Don't use SCMD_XFR command in message-in phase and status phase.
   It causes unexpected hangs on heavy load. Instead transfer data
   manually via TEMP register by SCMD_SET_ACK and SCMD_RST_ACK.
 - Don't set SCMD_ICPT_XFR in spc_dataout_pio() and spc_msgout().
 - Rewrite spc_datain_pio() to handle FIFO more properly.
2003-07-05 19:50:17 +00:00
tsutsui e30199e1ff Misc cleanup:
- disable debug code by default
 - use MI minphys()
 - add proper delay in spc_find()
 - initialize TMOD register in spc_reset()
 - wrap a sanity check with #ifdef DIAGNOSTIC (sync with aic6360.c)
 - no need to set LUN bits in SCSI command which should be done in mid-layer
 - set proper resid even in error case
 - fix/remove some bogus comments
2003-07-05 19:31:11 +00:00
tsutsui cfa57f87aa Use bus_space_{read,write}_multi_1() for PIO data transfers. 2003-07-05 19:04:48 +00:00
tsutsui 6615ddefa9 Rename some MI mb89352 functions for consistency:
spcintr() -> spc_intr()
 spcattach() -> spc_attach()
2003-07-05 19:00:16 +00:00
tsutsui 443eeab7de Some cosmetics:
- Remove useless macro.
 - Remove ^L characters.
 - KNF a comment.
2003-07-05 18:56:55 +00:00
tsutsui 09d1921299 Misc cosmetics:
- some KNF and wrap long lines
- use TAILQ macro
- replace some magic numbers with macro
- use #if 0/#endif pair to disable code
2003-05-19 14:56:03 +00:00
tsutsui 0ff49f9f99 hz -> Hz 2003-02-21 17:14:04 +00:00
thorpej 34820075d5 Statements must follow labels. 2002-05-30 21:09:54 +00:00
bouyer e5727031fb Implement mstohz() as discussed on tech-kern, and use it in SCSI drivers
to convert xs->timeout to callout() parameter.
2002-04-05 18:27:45 +00:00
lukem 2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
tsutsui 064be15283 Use common macro to check message length. 2001-11-04 12:03:41 +00:00
thorpej 0884f20bf7 bzero -> memset 2001-07-07 16:13:44 +00:00
thorpej 7711ad565b bcopy -> memcpy 2001-07-07 15:53:13 +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
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
thorpej 63b8530b4e Update for SCSPI changes. 1999-09-30 23:04:39 +00:00
minoura 1ff51fea1a Some x68k conditionals (I don't know why these are needed...). 1999-03-14 16:14:54 +00:00
minoura 38803874bb Translated Japanese comments. 1999-02-19 16:19:53 +00:00
minoura 4d5a04afc4 MI version of the Fujitsu MB89352 SCSI Protocol Controler (SPC) driver.
Based on experimental NetBSD/pc98 ISA/PISA version, which was derived
from the MD /sys/arch/x68k/dev/spc.c.
1999-02-13 17:33:14 +00:00