Commit graph

72 commits

Author SHA1 Message Date
Peter Wemm 7d05a38314 Fix deprecated use of label at end of compound statement 2002-05-24 05:58:13 +00:00
Peter Wemm 70148712be Constify a debug function arg that we pass __func__ to in order to pacify
gcc-3.1's 'const char *__func__;'
2002-05-24 05:57:47 +00:00
Tom Rhodes d394511de3 More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
Scott Long c52bf372f5 Update the PCI table as per Dell's fickleness.
MFC after:	3 days
2002-05-12 04:30:28 +00:00
Scott Long 39ee03c316 bzero out the sync command buffer when sending commands. This was causing
problems when enumerating multiple arrays.

This is an MFC candidate.
2002-05-03 00:07:50 +00:00
Scott Long 1089f082aa Fix a bug where the aacp device would only talk to bus 0 on the
controller.
2002-04-30 22:50:26 +00:00
Scott Long fe3cb0e1ec Add a CAM interface to the aac driver. This is useful in case you should
ever connect a SCSI Cdrom/Tape/Jukebox/Scanner/Printer/kitty-litter-scooper
to your high-end RAID controller.  The interface to the arrays is still
via the block interface; this merely provides a way to circumvent the
RAID functionality and access the SCSI buses directly.  Note that for
somewhat obvious reasons, hard drives are not exposed to the da driver
through this interface, though you can still talk to them via the pass
driver.  Be the first on your block to low-level format unsuspecting
drives that are part of an array!

To enable this, add the 'aacp' device to your kernel config.

MFC after:	3 days
2002-04-27 01:31:17 +00:00
Scott Long cbfd045b10 Prepare for a major update to the aac driver:
Update the aac driver with the new crashdump api.
	Protect sync fibs with a mutex.
	Align all DMA buffers on a PAGE_SIZE boundary.

MFC after:	3 days
2002-04-24 05:12:50 +00:00
Scott Long ce2d4dd7f1 Add the PCI ID for an upcoming variant of a soon-to-be released series of
cards.
2002-04-18 15:47:31 +00:00
Scott Long fee435e8ac Add support for the Dell 2650
Submitted by:	andrew_bachler@dell.com
2002-04-05 20:00:29 +00:00
John Baldwin 6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
Scott Long 671eafe203 Add support for the PERC3/Di found in the Dell 1650
Submitted by:	mp
2002-04-02 21:49:26 +00:00
Poul-Henning Kamp 67cd130e59 The AAC, TWE and IDA diskdrivers cannot dump until I and msmith
have ripped all the i386 specific formatting code from their
dump routines.  Due to the potential for trashing disks, I did
not want to do this "blind".
2002-03-31 22:29:52 +00:00
Scott Long 0e6020f359 Add ID's for a couple of upcoming cards.
MFC after:	1 day
2002-02-13 07:44:43 +00:00
Scott Long fe94b852b3 Don't attach to Dell PERC2/QC cards that have a firmware rev of 1.x. This
check is complicated by the fact that the Adaptec 5400S cards claim to use
1.x firmware also.  PERC2/QC 1.x firmware is not compatible with this driver
and will cause a system hang.

MFC after:	3 days
2002-02-06 01:34:09 +00:00
Alfred Perlstein a4db49537b Replace ffind_* with fget calls.
Make fget MPsafe.

Make fgetvp and fgetsock use the fget subsystem to reduce code bloat.

Push giant down in fpathconf().
2002-01-14 00:13:45 +00:00
Alfred Perlstein 9e209b124a Include sys/_lock.h and sys/_mutex.h to reduce namespace pollution.
Requested by: jhb
2002-01-13 21:37:49 +00:00
Alfred Perlstein 426da3bcfb SMP Lock struct file, filedesc and the global file list.
Seigo Tanimura (tanimura) posted the initial delta.

I've polished it quite a bit reducing the need for locking and
adapting it for KSE.

Locks:

1 mutex in each filedesc
   protects all the fields.
   protects "struct file" initialization, while a struct file
     is being changed from &badfileops -> &pipeops or something
     the filedesc should be locked.

1 mutex in each struct file
   protects the refcount fields.
   doesn't protect anything else.
   the flags used for garbage collection have been moved to
     f_gcflag which was the FILLER short, this doesn't need
     locking because the garbage collection is a single threaded
     container.
  could likely be made to use a pool mutex.

1 sx lock for the global filelist.

struct file *	fhold(struct file *fp);
        /* increments reference count on a file */

struct file *	fhold_locked(struct file *fp);
        /* like fhold but expects file to locked */

struct file *	ffind_hold(struct thread *, int fd);
        /* finds the struct file in thread, adds one reference and
                returns it unlocked */

struct file *	ffind_lock(struct thread *, int fd);
        /* ffind_hold, but returns file locked */

I still have to smp-safe the fget cruft, I'll get to that asap.
2002-01-13 11:58:06 +00:00
Mike Smith e45bef2aa9 Staticise the aac devclass. 2002-01-09 03:32:40 +00:00
David E. O'Brien 956d569b10 I missed a string concatenation. 2001-12-10 09:34:47 +00:00
David E. O'Brien 6e551fb628 Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.
2001-12-10 08:09:49 +00:00
Scott Long 8ea9ab6622 MFS: Use correct terminology for RAID 0/1 and 0/5. 2001-12-04 02:39:06 +00:00
Scott Long 1c4c22583c BAH! Missed another change to this file. 2001-12-04 02:26:57 +00:00
Scott Long a1078af4df Bah, I missed this file on the last commit 2001-12-04 02:24:07 +00:00
Scott Long c3d15322a1 Use d_thread_t to reduce diffs between current and stable.
Spell ACQUIRE correctly.
2001-12-03 22:55:14 +00:00
Scott Long b3457b5173 Add functionality and fix bugs so the driver will work with soon-to-be
released management apps.

1.  Implement poll().  This will check for queued aif's so that a
    subsequent ioctl call to retrieve the next aif will not block.
2.  Don't catch signals when sleeping on a fib sent from userland.  This
    causes a race and panic due to the pthread context switcher waking
    up the tsleep at inopportune times.
3.  Fix some whitespace nits.

MFC after:	3 days
2001-12-02 03:47:33 +00:00
Paul Saab 817805d9c9 Fix a signed bug in the crashdump code for systems with > 2GB of ram.
Reviewed by:	peter
2001-11-13 01:08:54 +00:00
John Baldwin 282873e2c0 - Change the taskqueue locking to protect the necessary parts of a task
while it is on a queue with the queue lock and remove the per-task locks.
- Remove TASK_DESTROY now that it is no longer needed.
- Go back to inlining TASK_INIT now that it is short again.

Inspired by:	dfr
2001-10-26 18:46:48 +00:00
John Baldwin 1de1c550b1 Add locking to taskqueues. There is one mutex per task, one mutex per
queue, and a mutex to protect the global list of taskqueues.  The only
visible change is that a TASK_DESTROY() macro has been added to mirror
the TASK_INIT() macro to destroy a task before it is free'd.

Submitted by:	Andrew Reiter <awr@watson.org>
2001-10-26 06:32:21 +00:00
Julian Elischer b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Scott Long 5e7e7ec92b Don't use a silly test to define INTR_ENTROPY.
Submitted by:	peter
2001-09-06 08:57:51 +00:00
Scott Long 914da7d0d3 Bring the aac driver *much* closer to style(9).
Reviewed by:	ken
2001-09-05 20:43:02 +00:00
Scott Long f8185d5456 Sigh. There are actually two ioctls ranges that need to be watched on the
linux side.  This will all be over soon...
2001-09-03 07:50:14 +00:00
Scott Long 61fea38293 Work around a bug where the driver's copy of the disklabel gets corrupted
and causes diskerr() to panic.
2001-09-02 23:16:40 +00:00
Scott Long 3361abb7a7 Restrict the range of linux ioctls we will accept. 2001-09-02 23:15:26 +00:00
Scott Long 6965a4937d Doh! Fix a comma that disappeared along the way.
Pointy-hat by:	peter
2001-08-30 13:09:09 +00:00
Scott Long 36e0bf6e9c Mega update to the aac driver.
1.  Correctly handle commands initiated by the adapter.  These commands
    are defered to a kthread responsible for their processing, then are
    properly returned to the controller.
2.  Add/remove disk devices when notified by the card that a container was
    created/deleted/offline.
3.  Implement crashdump functionality.
4.  Support all ioctls needed for the management CLI to work.  The linux
    version of this app can be found at the Dell or HP website.  A native
    version will be forthcoming.

MFC-after:	4.4-RELEASE
2001-08-29 23:34:05 +00:00
Scott Long 33a375b754 Clarify the description string for one of the StrongARM based cards. 2001-08-17 20:59:49 +00:00
Scott Long 1a393b6188 Adding missing () in a KASSERT format string.
Submitted by:	brandt@fokus.gmd.de
2001-08-07 16:48:28 +00:00
Scott Long d047ecf50b Make AAC_COMPAT_LINUX optional once again.
Submitted by:	julian
2001-08-06 19:40:47 +00:00
Scott Long fb0c27d7e2 Put the linux compat ioctl interface on death row. Add FreeBSD
definitions of all of the ioctls, plus round out all ioctl definitions to
match what exists for linux.  Allow ioctls to be called through either the
native or linux interface, though no apps exist (yet) that can take
advantage of native calling.
2001-08-06 04:34:47 +00:00
Scott Long 74e818733c Missed this one in my 80-column sweep. 2001-08-06 03:52:40 +00:00
Scott Long 3d04a9d7e3 Once again throw out the calculation of si_iosize_max and set it to 64K.
Although it can go higher, it is not safe to so do on arrays with many
members.  Compromise by adding a tunable, "hw.aac.iosize_max" that can be
set at boottime.  Also document in the aac(4) manpage.

MFC after:	4 weeks
2001-08-05 07:26:31 +00:00
Scott Long f6c4dd3f48 Bugfixes. Close a race and logic bug in the timeout handling, don't call the
interrupt handler from the upper half, etc.  This fixes some serious stability
problems that we were seeing on our production server.  These patches have
been tested for almost 6 months and are a highly recommended MFC candidate.

Reviewed by:	gibbs, merry, msmith
MFC after:	4 days
2001-08-05 06:20:13 +00:00
Scott Long fadfef893f Fix a couple of copyright issues and an 80 column nit that I missed before 2001-08-05 06:15:00 +00:00
Scott Long c6eafcf2c5 Reformat for 80 columns. Sorry, but I had to do it. 2001-08-03 00:50:30 +00:00
Scott Long 4aa620cdc6 Add /dev/hpn? as an alias to /dev/aac? so that the HP version of the CLI
utility will work, and document it in the manpage.

MFC after:	3 days
2001-07-25 22:36:17 +00:00
Mike Smith 0bc88fe1eb Add another Dell 3/Di PCI ID. You'd think they had enough of these
already...
2001-07-22 04:06:36 +00:00
Poul-Henning Kamp 079f2df393 Make the disk mini-layer check for and handle zero-length transfers
instead of the underlying drivers.
2001-05-06 21:55:22 +00:00
Mike Smith ed1c82f450 More new Dell PCI IDs.
Submitted by:	"Marty Moll" <martym@arbor.edu>
2001-04-26 01:14:37 +00:00