Commit Graph

16 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
simonb 5d4fa9b0ce Revert rev 1.31 of bha.c (and associtated changes in the headers and
config glue files).

Fixes PR kern/9841.  Tested by Tracy J. Di Marco White with a bt948
and 6 disks.
2000-10-03 14:07:36 +00:00
wrstuden ba7b2b4124 Make the bitfields in here work on big-endian machines. How this ever
worked is unclear.

Patch from thorpej, tested by me.
1999-12-23 00:15:12 +00:00
thorpej 415b44a62a Rework the Buslogic SCSI driver in preparation for some pending improvements
to the SCSIPI subsystem.
- Determine more characteristics about the board, including the number
  of concurrent commands that the processor can execute at a time.
- Rework memory allocation strategy so that we can do dynamic pre-allocation
  of resources according to workload.

Thanks to the Linux Buslogic driver for having some useful comments.
1999-09-30 23:12:28 +00:00
mycroft a1ac68819f Assign my copyrights to TNF. 1998-08-17 00:26:32 +00:00
thorpej e08a44b196 - Perform all necessary bus_dmamap_sync() operations.
- Greatly simplify allocation and DMA mapping of the mailbox and ccbs.
- Be more robust against resource shortage errors, and report errors better.
1998-02-06 23:06:44 +00:00
thorpej 1dfae448cd Reply from an INQUIRE DEVICES is a lun map. 1997-10-28 19:08:26 +00:00
mycroft fa0b187898 Make `hashkey' unsigned. 1997-09-09 18:56:15 +00:00
bouyer 6f3bab1f59 Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
1997-08-27 11:22:52 +00:00
thorpej fbc0df0a1a Pull thorpej-bus-dma branch into mainline. 1997-06-06 23:30:02 +00:00
jonathan f703350d59 typo in definition of extended-geometry register. 1997-01-04 16:47:03 +00:00
thorpej fca7fce17e Deal with targets > 7 on wide Buslogic controllers. Remember the "wide"
bit from the extended setup inquiry and key off it to:
- Force synchronous negotiation on targs > 7.
- Read additional information returned by wide cards on inquire setup.
- Read sync period on targs > 7.
- Display sync period/offset on targs > 7.
- Set scsi_link.max_target to 15.
cvs: ----------------------------------------------------------------------
1996-12-20 21:35:10 +00:00
jonathan e7a52ac635 Add missing fields to the extended_inquire reply struct.
Fixes probing of aha154x's, and provides wide/ultra bits for the MI scsi code.
1996-12-20 06:20:49 +00:00
jonathan 79b026a8f3 * Add command struct and modifier definitions for controlling the
ISA-compatible port space of PCI buslogic cards.

* Add call to bha_pci.c to disable the ISA-compatible ports of a PCI
  device.  The ISA-compatible ports are enabled by default, which
  causes the card to be autoconfigured a second time as an ISA device,
  which appears to deadlock the card.

* Change bha_cmd() to return the number of bytes it actually received
  in response to a command, or -1 on error.

*  Use heuristics (checking for bha-only registers, and checking the size
   of the response to BHA_INQURE_EXTENDED) to bha_find, to make sure the
   bha driver never matches an aha (Adaptec    1542 or compatible) device.

A single kernel should now boot on either Adaptec or BusLogic controllers,
provided we always probe for BusLogic devices before Adaptec devices,
but this has not yet been verified.
1996-11-05 03:04:28 +00:00
mycroft 80110252d0 Minor changes. 1996-09-01 00:54:34 +00:00
mycroft 06fdef11fd Split the BusLogic driver apart, and rename it to `bha (like BSDi). 1996-08-31 20:18:24 +00:00