Commit Graph

92 Commits

Author SHA1 Message Date
Scott Long
b50569b71d Prepare for future integration between CAM and newbus. xpt_bus_register
now takes a device_t to be the parent of the bus that is being created.
Most SIMs have been updated with a reasonable argument, but a few exceptions
just pass NULL for now.  This argument isn't used yet and the newbus
integration likely won't be ready until after 7.0-RELEASE.
2007-06-17 05:55:54 +00:00
Scott Long
2b83592fdc Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will
use to synchornize and protect all data objects that are used for that
SIM.  Drivers that are not yet MPSAFE register Giant and operate as
usual.  RIght now, no drivers are MPSAFE, though a few will be changed
in the coming week as this work settles down.

The driver API has changed, so all CAM drivers will need to be recompiled.
The userland API has not changed, so tools like camcontrol do not need to
be recompiled.
2007-04-15 08:49:19 +00:00
Paolo Pisati
ef544f6312 o break newbus api: add a new argument of type driver_filter_t to
bus_setup_intr()

o add an int return code to all fast handlers

o retire INTR_FAST/IH_FAST

For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current

Reviewed by: many
Approved by: re@
2007-02-23 12:19:07 +00:00
Matt Jacob
b3d93fd0c9 Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.
PR:		106543
MFC after:	3 days
2006-12-11 18:28:31 +00:00
Robert Watson
acd3428b7d Sweep kernel replacing suser(9) calls with priv(9) calls, assigning
specific privilege names to a broad range of privileges.  These may
require some future tweaking.

Sponsored by:           nCircle Network Security, Inc.
Obtained from:          TrustedBSD Project
Discussed on:           arch@
Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri,
                        Alex Lyashkov <umka at sevcity dot net>,
                        Skip Ford <skip dot ford at verizon dot net>,
                        Antoine Brodin <antoine dot brodin at laposte dot net>
2006-11-06 13:42:10 +00:00
Matt Jacob
bd3fd815a7 2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.
2006-11-02 00:54:38 +00:00
Matt Jacob
fa9ed86506 The first of 3 major steps to move the CAM layer forward to using
the CAM_NEW_TRAN_CODE that has been in the tree for some years now.

This first step consists solely of adding to or correcting
CAM_NEW_TRAN_CODE pieces in the kernel source tree such
that a both a GENERIC (at least on i386) and a LINT build
with CAM_NEW_TRAN_CODE as an option will compile correctly
and run (at least with some the h/w I have).

After a short settle time, the other pieces (making
CAM_NEW_TRAN_CODE the default and updating libcam
and camcontrol) will be brought in.

This will be an incompatible change in that the size of structures
related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change
in both size and content. However, basic system operation and
basic system utilities work well enough with this change.

Reviewed by:	freebsd-scsi and specific stakeholders
2006-10-31 05:53:29 +00:00
Mark Murray
67ef9ba623 Remove stale MAINTAINER
OK'd by: scottl
2006-07-09 16:31:53 +00:00
John Baldwin
73dbd3da73 Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
Scott Long
b5a531ae40 Give the asr softc list global a proper name. 2006-02-12 06:57:41 +00:00
Scott Long
5d9299772e Squash a couple more invalid long casts. 2006-02-05 05:05:27 +00:00
Scott Long
1107d45356 Squash another use of vtophys. Instead of creating separate busdma objects
for doing static memory transfers, start collecting them into a single
object.
2006-02-04 17:56:17 +00:00
Scott Long
b0cb1aaf7c Add the start of busdma infrastructure to this driver. Convert the
ASR_resetIOPR function to use it.
2006-02-04 08:45:19 +00:00
Scott Long
b32f2b9a08 Now that the U32 type is a really 32-bits wide, eliminate a bunch of other
bad assumptions and long values.
2006-02-04 08:20:23 +00:00
Scott Long
90acf956d3 Give correct definitions to some basic types. 2006-02-04 08:01:49 +00:00
Scott Long
04ab3022a9 Fix a possible memory leak in asr_attach. 2006-02-04 06:08:19 +00:00
Scott Long
9cbec74dcb Don't allocate an asr_ccb in asr_attach, it hasn't been needed for years. 2006-01-14 16:01:01 +00:00
Scott Long
19e9e8235d Replace bogus code with real code. 2006-01-14 15:59:54 +00:00
Scott Long
8f6ee34112 Rename driver_t variables. Use device_printf() instead of homerolled printf.
Use the provided softc instead of rolling our own.
2006-01-14 15:51:42 +00:00
Ruslan Ermilov
3238c6bd33 Fix -Wundef from compiling the amd64 LINT. 2005-12-04 10:06:06 +00:00
Scott Long
a304e92b2b Only create the rdpti alias if the asr device creation succeeds. 2005-04-29 04:47:11 +00:00
Scott Long
e5bd0ae156 Make life easier on those trying to use the asr utilities by automatically
creating the /dev/dpti%d entry that the software expects.  This is just
a band-aid until either someone (hopefully) rewrites the utilities, or all
asr/dpt cards in existance get blasted into the sun.
2005-04-01 22:12:53 +00:00
Olivier Houchard
641a67bed4 Bring back some of the ioctl junk that was removed in rev 1.59 as a
i386-only kernel option, ASR_COMPAT, and under BURN_BRIDGES.
It is really ugly, but raidutils depends on it.

Discussed with:	scottl
2005-03-17 01:20:49 +00:00
Warner Losh
53ee71735f Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 19:06:12 +00:00
Warner Losh
098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Marius Strobl
72aca14cfb - Set the CAM status to CAM_SCSI_STATUS_ERROR rather than CAM_REQ_CMP
in case of a CHECK CONDITION.
- Make this driver return SCSI status information.
- While here, factor out the clearing of the CAM status from every
  element of the switch statement to only once before the switch.

This fixes burning CDs with recent cdrecord 2.01 alpha versions and
burners attached to asr(4) controllers but there could have been
other applications and da(4) etc. also affected.

Reviewed by:	gibbs, scottl
MFC after:	2 weeks
2004-08-02 23:32:23 +00:00
Poul-Henning Kamp
89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
Poul-Henning Kamp
fe12f24bb0 Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
Scott Long
c043a33795 Update the version history in the driver to note everything that has happened
over the last three weeks.
2004-05-05 14:19:43 +00:00
Scott Long
1e5532d487 Roto-till the ioctl code. Remove all the groping around in the x86 BIOS
segment, remove the groping around in the Option ROM segments, remove the
bogus tests for bcopy vs. copyout.  There really is no reason for a
management app to know these things other than to create l33t info tables
for the user.
2004-05-05 05:29:19 +00:00
Scott Long
60c3d7b627 Convert the asr driver to use the bus_space API. This does not represent
a significant functional change, but it further cleans up the code and
brings it closer to being portable.  Thanks to Don Bowman for helping to
test this.
2004-05-05 03:42:33 +00:00
Scott Long
01a157ea66 Fix a typo from rev 1.56 that somehow escaped my testing. 2004-05-04 03:16:22 +00:00
Scott Long
eb095afb05 Remove the static reservation of the asr major number 2004-05-02 03:51:53 +00:00
Scott Long
9823f1a2c9 Remove the defAlignLong and getAlignLong macros. I guess that the original
intent was to make sure that message structs allocated off of the stack were
4-byte aligned.  However, the macros as defined did absolutely nothing.
And since I2O forces you to manually copy messages down to the hardware, there
really is no point of enforced alignment anyways.
2004-05-02 03:33:18 +00:00
Scott Long
c371b99774 Remove the bogus printing of the asr control device major number. Also
rename the control device from rasr%d to asr%d.  This starts us down the
path of divorcing ourselves from a very bogus design in the management
apps.  Since the apps are open source now, they will likely be updated
and fixed before 5.3.
2004-05-02 00:27:54 +00:00
Scott Long
f5a923258b Correctly test *Reply_Ptr in ASR_resetIOP(). Thanks to dhartmei for pointing
this out.
2004-05-01 06:32:01 +00:00
Scott Long
6021732ae8 Re-indent some silly sub-blocks in asr_attach(). 2004-05-01 06:12:58 +00:00
Scott Long
6f4409dd10 Remove ASR_get_sc() and reference the softc in the dev_t. For some nefarious
reason, the I2O protocol requires knowledge of all I2O devices in the system,
so we can't get rid of the evil linked-list of softc's yet.
2004-05-01 05:56:57 +00:00
Scott Long
68cf1a90b4 Remove the DOMINO and MODE0 device attachments. They never did anything.
Remove a bunch of obfuscating macros.
2004-05-01 05:19:39 +00:00
Scott Long
ec0b2af03f More whitespace style cleanups, also remove unneeded (void *) casts for bzero(). 2004-05-01 03:06:54 +00:00
Scott Long
6f2cb1c2f2 Many more style cleanups. Switch complex macros to being inline functions.
Put @includes in a better spot.  Fix many cases of 2 space indents and spaces
between a function name and the parens.  Use KASSERT instead of a home-rolled
ASSERT.  Remove some undeeded caddr casts.
2004-05-01 02:27:06 +00:00
Scott Long
cff5a08d74 Get rid of a bunch of useless macros. STATIC becomes static, INLINE becomes
__inline where appropriate and gets nuked elsewhere, IN/OUT/INOUT go away.
Reformat code affected by this.
2004-05-01 01:25:05 +00:00
Nate Lawson
28aee9f11e Fix the build. opt_asr.h is gone.
Beer or equivalent to?	njl
2004-04-22 02:22:18 +00:00
Scott Long
f0c8cb0022 Remove more sead code. 2004-04-21 20:58:48 +00:00
Scott Long
ba6d64678f Don't indent preprocessor tokens. 2004-04-21 20:56:08 +00:00
Scott Long
4ada12355d Remove ASR_MEASURE_PERFORMANCE. It hasn't been able to compile in several
years.
2004-04-21 20:14:45 +00:00
Scott Long
1f4b72f7f6 Use offsetof() instead of hand-rolling something equivalent. 2004-04-21 20:09:45 +00:00
Scott Long
bf91c20547 Remove all of the old __FreeBSD_version code that provided FreeBSD 2.2.x and
3.x shims.
2004-04-21 03:59:52 +00:00
Scott Long
4e28e03aa5 Begin the slow, painful process of cleaning up asr. This eliminates many of the
bogus casts of NULL.  It also distracts me while I procrastinate on useful work.
2004-04-21 03:51:39 +00:00
Nate Lawson
5f96beb9e0 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00