Commit Graph

69 Commits

Author SHA1 Message Date
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
leo d3febbb5aa Do endian swaps where appropriate. This is currently dependent on 'BYTE_ORDER'
since the driver only supports little endian busses.
1998-04-16 07:12:43 +00:00
leo d2551d5b3f Use bus-dma functions. 1998-03-16 15:36:17 +00:00
thorpej 095c4c092d Adjust for config changes. 1998-01-12 09:23:08 +00:00
jtk 827918e4ab fix warnings when -DAHC_DEBUG 1997-10-09 02:17:36 +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 da1b5f9021 It's perfectly normal for an older (e.g. pre SCSI-2) device to send
MESSAGE_REJECT in response to SDTR or WDTR.  Because of this, the
printfs that indicate refusal of sync/wide negotiation are unneeded
in normal operation.  In the __NetBSD__ case, disable them by default.
They, like the other extra-verbose ahc driver boot messages, may be
reenabled with "options DEBUG".  The behavior in the !__NetBSD__ case
is unchanged.
1997-06-09 01:51:03 +00:00
cgd db0f072019 clean these up (mostly rename bus_space_{tag,handle}_t variables) so that
this code makes equal sense for memory and I/O space, prefer to map
the PCI front end via memory space (conditionalized on a patchable kernel
variable), and do a bit of other random NetBSD-specific cleanup.  (These
changes were sent to Justin Gibbs on March 28.)
1997-04-10 02:48:38 +00:00
cgd 4c654c0acf fixes from Matt Jacob so that these can compile and run on the Alpha.
(aic7xxx has been tested and works on the Alpha, bha has not yet been
tested on thne Alpha.)
1997-03-13 00:38:48 +00:00
mikel a71e39e5d5 fix some spelling errors noticed by Charles Kane <ckane@mipos2.intel.com>.
fix some more noticed by myself; all are in comments or strings.
1997-03-09 06:10:32 +00:00
mikel 2af30c1cd3 make sure max_target is initialized for both buses on multibus parts;
from Anders Hjalmarsson in PR 3103.
1997-02-20 05:15:50 +00:00