Commit Graph

71 Commits

Author SHA1 Message Date
scottl
4e4a567356 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
cognet
125f45ecc1 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
imp
a9dd23fdd6 Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 19:06:12 +00:00
imp
9bc042de86 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
marius
3c6b81319b - 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
phk
70c86a601e Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
phk
90905956dd Add missing <sys/module.h> includes 2004-05-30 20:08:47 +00:00
scottl
3614da6196 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
scottl
8fb1c6ea50 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
scottl
7780d1dc5a 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
scottl
923f10e374 Fix a typo from rev 1.56 that somehow escaped my testing. 2004-05-04 03:16:22 +00:00
scottl
8edba382fd Remove the static reservation of the asr major number 2004-05-02 03:51:53 +00:00
scottl
dc69ea53c1 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
scottl
808057009e 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
scottl
69ffa9292c Correctly test *Reply_Ptr in ASR_resetIOP(). Thanks to dhartmei for pointing
this out.
2004-05-01 06:32:01 +00:00
scottl
8e32b95bd1 Re-indent some silly sub-blocks in asr_attach(). 2004-05-01 06:12:58 +00:00
scottl
63a6a97ae6 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
scottl
5e0db02e32 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
scottl
e0d79ce539 More whitespace style cleanups, also remove unneeded (void *) casts for bzero(). 2004-05-01 03:06:54 +00:00
scottl
c37821e189 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
scottl
69dd084a2f 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
njl
889649ba87 Fix the build. opt_asr.h is gone.
Beer or equivalent to?	njl
2004-04-22 02:22:18 +00:00
scottl
e70b4d9660 Remove more sead code. 2004-04-21 20:58:48 +00:00
scottl
e4f8914816 Don't indent preprocessor tokens. 2004-04-21 20:56:08 +00:00
scottl
7273b9f6dc Remove ASR_MEASURE_PERFORMANCE. It hasn't been able to compile in several
years.
2004-04-21 20:14:45 +00:00
scottl
5ecaf35ebc Use offsetof() instead of hand-rolling something equivalent. 2004-04-21 20:09:45 +00:00
scottl
befc901f99 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
scottl
2767529785 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
njl
6bcc4e8616 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
phk
52bc09bd7f Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
phk
c765bca225 Remove code previously under #ifdef ASR_VERY_BROKEN
Ok'ed by:	scottl
2003-09-26 15:56:42 +00:00
jhb
6d9ca0e79a Use PCIR_BAR(x) instead of PCIR_MAPS.
Glanced over by:	imp, gibbs
Tested by:		i386 LINT
2003-09-02 17:30:40 +00:00
obrien
c8e9653b1c Use __FBSDID().
Also some minor style cleanups.
2003-08-24 17:55:58 +00:00
imp
0886a6ee43 Prefer new location of pci include files (which have only been in the
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.
2003-08-22 05:54:52 +00:00
phk
06b8f3ad2d Include <sys/ioccom.h> instead of <sys/disklabel.h> 2003-04-16 20:46:30 +00:00
phk
c0f52402d6 Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by:    re(scottl)
2003-03-03 12:15:54 +00:00
des
dd17e5b613 More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9). 2003-03-02 16:54:40 +00:00
obrien
d74a258406 <machine/vmparam.h> is the right place to get KERNBASE, so don't special
platform case it (or use alternate spellings).
2003-02-24 06:56:18 +00:00
imp
1493fd6e76 Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
alfred
8f5153c3ea Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
schweikh
c353aec149 Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
rwatson
8b67833f2d Use UID_ and GID_ constants instead of hard-coded numeric values
with make_dev().  Use OPERATOR instead of implicit WHEEL to match
other storage devices.  Use a mode of 0640 to be consistent
with other storage devices.

Submitted by:	kris
Reviewed by:	scottl
2002-12-27 17:50:39 +00:00
jhb
0e648ddd8a Use a bandaid to fix a warning. However, this driver is very, very far
from being MI in any fashion.  It currently "assumes" that it can get
a kernel virtual address for a phyiscal address by adding KERNBASE to the
physical address.  It also tries to read values out of a the PC BIOS on
all archs.  It also uses "manual" inb() and outb()'s to talk to the mcclock
device which just happens to be at that location on both i386 and alpha.
This driver should likely be i386-only.
2002-11-06 19:42:59 +00:00
archie
447e501114 Replace (ab)uses of "NULL" where "0" is really meant. 2002-08-22 21:24:01 +00:00
brian
1f537b83bb Remove an extraneous )
Not approved by: maintainer

I'm guessing that this is trivial enough to sidestep approval.
2002-05-15 12:25:11 +00:00
obrien
43d0d128fc `unexpand -a' should be run _before_ sed 's/^#define /#define^I/g'. 2002-05-14 21:59:10 +00:00
obrien
fa7b61a012 Tighten up the defined()'s. 2002-05-14 21:54:56 +00:00
obrien
a1bdb69445 unexpand -a everything 2002-05-14 01:09:03 +00:00
obrien
c9a75d2498 First pass of style(9) for #define's. 2002-05-14 00:53:08 +00:00
jhb
e3cbbf9804 Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00