Commit Graph

79 Commits

Author SHA1 Message Date
thorpej 623f83a793 Use BUS_DMA_READ and BUS_DMA_WRITE in some obvious places. 2001-07-19 16:25:23 +00:00
wiz cc0b68092e Correct various misspellings of 'transfer' and inflected forms. 2001-07-08 18:06:42 +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
wiz e7313e53ae Fix typo in comment. 2001-07-04 20:34:03 +00:00
bouyer e27abfaddf Make it compile with SCSIPI_DEBUG 2001-06-26 12:19:49 +00:00
wiz f3f6c5b675 `accessible' only has one `a'. 2001-06-19 12:52:20 +00:00
bouyer af5fd4c7d8 Stopgap measure for PR kern/12762: cut the number of openings per device
to 16 or 4 (depending on capabilities of adapter), as it was before
thorpej_scsipi integration
Waiting feedback to known whenever the problem with openings set to AHC_SCB_MAX
existed before.
2001-04-27 14:49:11 +00:00
bouyer d032d80637 Redo xfer sync/wide/tag notification again: we need to notify upper layer
that we can do tag.
Start sync/wide nego at first command, but wait ADAPTER_REQ_SET_XFER_MODE
to notify upper level.
2001-04-26 16:56:53 +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
ross 7e0b361d84 Fix for kernel alignment crash reported on port-alpha. A developer went on
a happy code sweep (in the kernel!) and constified a random selection of
kernel objects. This changed the alignment of the previously-aligned-by-
accident seqprog array, and exposed a lurking bug.  I can't decide if this
is good or bad.
2001-04-14 19:37:17 +00:00
fvdl 0ccb3965dd Fix missing splx calls. One of them from OpenBSD. 2001-04-09 23:51:28 +00:00
thorpej fd7ed72be1 Add BUS_DMA_STREAMING to data transfer maps. 2001-03-07 23:07:12 +00:00
cgd 023e9f0649 C requires that labels be followed by statements. 2001-02-24 00:01:22 +00:00
chs 09cb38f22b expose the definitions of MIN() and MAX() in sys/param.h to the kernel
and use those in favor of a dozen copies scattered around the source tree.
2001-02-05 10:42:40 +00:00
jdolecek 9e7736f1dc make patches[] const 2001-01-22 14:30:43 +00:00
jdolecek 34c8ae80da constify 2001-01-18 20:28:15 +00:00
fvdl 2b69243845 Add AHC_NO_TAGS option to switch off tagged queueing. Done because
tagged queueing has a severe performance impact (60%) on write
throughput with UBC. Needs investigation.
2000-12-02 14:53:01 +00:00
thorpej 275539f03c NBPG -> PAGE_SIZE 2000-11-14 18:21:00 +00:00
tls c9dc8413bb Make our policy WRT tagged queueing consistent and sane: ordered tags for sync writes, simple tags for all else. Should make ahc and adv a bit more reliable (metadata writes won't get reordered incorrectly...) and isp a bit more performant (it was using ordered tags all the time). 2000-08-11 21:31:19 +00:00
pk 8c46f6d687 #include "opt_ahc.h" 2000-06-29 23:12:19 +00:00
mrg 314f1e97c5 remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 17:12:48 +00:00
fvdl 4cc6a62a33 Remove debugging code that wasn't supposed to be in the commit of version 1.55 2000-06-26 19:38:14 +00:00
mrg 89d0a3e519 remove redundant vm includes. 2000-06-26 14:38:50 +00:00
fvdl c8c1e5854f Fix wrong test for (software) queue blocked condition. 2000-06-04 11:42:55 +00:00
fvdl b9bb94500e Obey the "Reset SCSI bus at startup" EEPROM setting. 2000-05-29 20:13:53 +00:00
fvdl 3713246e34 Don't bother searching the qinfifo for SCBs to requeue in the BUSY
and QUEUE FULL cases; this is already done for all BAD_STATUS cases.

Make sure to requeue the SCB in the above cases internally in the driver,
the SCSI layer doesn't know how to deal with it properly.
2000-05-28 00:19:59 +00:00
fvdl 4b7b35ae8a When a bus is accessed for the first time, reset it. Without this,
some devices may not be found if the BIOS (which would normally
do the reset at startup) is disabled. Should really be done from the SCSI
layer.

Implement the SCBUSIORESET ioctl.
2000-05-27 21:58:15 +00:00
fvdl 3e54d43abc Be sure to not use tagged queueing for a few commands. 2000-05-25 11:41:05 +00:00
soren 9f00930ace Make AHC_DEBUG compile. 2000-05-23 03:50:12 +00:00
fvdl c9fe89891a Don't try to re-enable tags once they have been disabled because of a
MSG_REJECT from the target. Obey the NOTAG quirk.
2000-05-22 21:14:24 +00:00
thorpej f636538446 NULL != 0 2000-05-19 04:34:39 +00:00
dante 1937dbee6a Reflect changes in scsipi_inquiry_data structure: "flags" field is now named "flags3" 2000-05-14 18:22:13 +00:00
fvdl aa0f78b2f6 We can use openings = 16 here; this won't even exhaust the number of
allocated SCBs for 16 targets, and it's a noticeable difference.
2000-03-25 21:09:08 +00:00
fvdl 97688d9a83 Do simple tagged queueing, enabled by default. 2000-03-25 19:52:12 +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
fvdl f44ddd61a9 Do bus-specific interrupt handling (i.e. ahc_pci_intr) via a bus_intr
field in the softc, instead of relying on NPCI > 0. This would
prevent things from compiling if PCI buses were in the config file,
but ahc was attached only to something else than the PCI bus.
2000-03-16 10:33:45 +00:00
fvdl 1e4647a15b New ahc driver, a port of Justin Gibbs' FreeBSD driver. This adds
support for the U2W chips, and U160 controllers.
2000-03-15 02:08:28 +00:00
thorpej 1268cc5d6c If we got an xfer from our backlog queue, don't allow sleeping; we're in
interrupt context.

XXX This is fixed properly in the thorpej_scsipi branch, but that won't
be ready for 1.5, I don't think.
2000-02-12 19:12:52 +00:00
thorpej 5802ccb9c9 In ahc_intr(), if initialization failed, don't try to service the
interrupt.
2000-02-03 06:25:09 +00:00
thorpej a697dac5f2 Back out a change I didn't intend to commit. 2000-01-26 06:17:59 +00:00
thorpej 8949eab0cb Split the code that reads the SEEPROM into its own file. 2000-01-26 06:04:37 +00:00
thorpej 63b8530b4e Update for SCSPI changes. 1999-09-30 23:04:39 +00:00
danw 6775e175ca Add a brief delay after resetting the card before checking to see if
it's done resetting. Trying to read registers off the card while it's
unresponsive can cause a machine check on some platforms/busses.
1999-09-21 01:04:44 +00:00
leo e54f78017e This one needs <machine/bswap.h> too. 1999-02-19 20:58:51 +00:00
thorpej 7a9cc5bfbc Update for changed scsipi_xfer struct. 1998-12-09 08:37:50 +00:00
mjacob 74bc9f26d5 Update HBAs to incorporate the new max_lun property. 1998-12-05 19:43:33 +00:00
thorpej 5f0577babc Adapt to the new scsipi_adapter interface. 1998-11-19 21:43:00 +00:00
thorpej 29d472f53d Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter.  This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
1998-10-10 00:28:28 +00:00
eeh a2dd74ed79 Merge paddr_t changes into the main branch. 1998-08-13 02:10:37 +00:00