Commit Graph

58 Commits

Author SHA1 Message Date
thorpej 85c0b77956 twe_ccb_map(): Remove the DEBUG panic case of "unknown" S/G list offset.
In all likelihood, this is a command passed from userspace management
tools where no S/G list is needed because no data is being passed.
2004-06-04 20:11:17 +00:00
heas 4a60d04fc7 Double the time we wait for the attention bit following a soft reset (and make
the timeout message just a bit clearer), as the latest firmware appears to be
a bit slower.
OK from Jason Thorpe.
2004-06-03 18:07:30 +00:00
thorpej a8d1145d1b Rename twe_tweio_command_handler() to twe_ccb_wait_handler() and expose it. 2004-05-27 23:47:23 +00:00
thorpej 6837b365dd Assign a syslog priority to the AEN codes and use that priority when
logging the error message.  Potentially allows critical messages to be
noticed much more quickly.
2004-04-15 02:03:03 +00:00
thorpej ca75be9eb7 When performing command pass-through for management tools, don't poll
for CCB completion.  Instead, sleep, and use a CCB callback to wake the
sleeper.
2003-12-04 05:46:47 +00:00
thorpej 9a0c12a504 Correct the size passed to a malloc() call when performing command
passthrough for userland management tools.
2003-11-10 15:35:39 +00:00
simonb b6abb6ab1d Remove some assigned-to but otherwise unused variables. 2003-10-30 01:58:17 +00:00
thorpej abcd16ecc6 Fix up the TWEIO_COMMAND code to actually work. The 3ware management API
library can now communicate with the card.
2003-09-25 22:26:40 +00:00
thorpej 4fa7c2c48b - Fix a bug I introduced in a previous commit (oops).
- Add the twe_drivecommand ioctl structure.
2003-09-25 01:35:25 +00:00
thorpej 544359b9a2 - Make CCB allocation slightly more efficient by changing how the
CCB is returned to the caller.
- Make code paths that can use twe_ccb_alloc_wait() use it, and assert
  that a CCB is always returned from that function.
- Assert that a CCB is always returned when allocating the reserved CCB
  for an AEN fetch.
2003-09-23 23:50:04 +00:00
thorpej 765ddabe83 Add a comment clarifying why we clear TWEF_AEN in twe_reset() now. 2003-09-23 23:10:53 +00:00
thorpej 1cad401c12 Separate the AEN fetching path into its own special path that uses the
reserved CCB.  This means that all remaining callers of twe_param_get*()
are called from a valid thread context, and thus have no need to use a
reserved CCB.  This will allow for further cleanup in a future commit.
2003-09-23 23:08:54 +00:00
thorpej ddfcdc4f1f Add support for dynamically attaching and detaching RAID array units. 2003-09-22 18:31:10 +00:00
thorpej 0448a55234 Improve AEN handling:
- Make AENs use the generic code table stuff.
- Add a few more AEN codes (from FreeBSD).
- Correct the context of a few AEN codes (some were listed as
  "unit context" when they're really "port context").
- Add a queue of AENs that management tools in userspace can poll
  (from FreeBSD).
2003-09-22 01:13:02 +00:00
thorpej 4431e5d2ea Fetch info about the drives during attach, and inject that info
into the msgbuf using aprint_verbose().
2003-09-21 19:46:44 +00:00
thorpej 21809f0c30 Expose the "param get" functions. 2003-09-21 19:27:27 +00:00
thorpej 291d256789 - Record more information about the array unit, including array
type and stripe depth.
- Report array type and stripe depth when attaching the logical drive.
2003-09-21 19:20:18 +00:00
thorpej 4cf2e784e2 Add some helper routines to fetch 1, 2, and 4 byte parameter values.
Modeled after code in FreeBSD.
2003-09-21 19:01:05 +00:00
thorpej 6c5904f215 Add some additional code -> description tables, and add a generic
routine to translate code -> description.  AENs will be converted
to this mechanism in a future commit.

Partially from FreeBSD.
2003-09-21 18:35:31 +00:00
jdolecek d2041674e6 tweioctl(): store the result of twe_param_get() directly to the right
variable rather than using (void *) temporary
should fix strict aliasing warning of gcc 3.3
2003-08-03 18:45:46 +00:00
jdolecek 4ba1407d10 print some additional information about the controller on boot (from FreeBSD)
use aprint_* as appropriate
change some debug #ifdef DIAGNOSTIC messages into #ifdef DEBUG
make aenfmt[] more const
change twe_param_get() signature to take (struct twe_param **) last arg, and
  remove now unnecessary casts
2003-07-25 11:49:19 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
thorpej 72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
fvdl f11e75d5f6 Remove comparison of u_int8_t value to (512 - a few bytes), since it's
always false. As found by gcc-current.
2002-12-16 18:27:20 +00:00
christos fa65bb7322 Add /dev/twex support. To be used with FreeBSD's 3dmd.
Initial port from Masaru OKI <oki@netbsd.org>, with KNF, memory leak fixes,
denial of service problems, and null pointer fixes from me.
2002-12-13 23:31:32 +00:00
thorpej d94a4ac49e Avoid strict-alias warnings. 2002-11-25 07:47:53 +00:00
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +00:00
thorpej 387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
thorpej 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
kim 462f87e7fd Missing comma in aenfmt array initialization. 2002-08-06 20:47:44 +00:00
christos bdd3768afd Add missing messages from FreeBSD's driver. Re-organize a bit how the
message is formatted and printed.
2002-07-10 15:37:30 +00:00
lukem 06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
christos 7db182d94d NBPG is not constant on the sparc, so don't use CPP tricks. 2002-05-24 18:10:06 +00:00
christos 0c5fed7eec Deal with the NBPG problem in a better way. 2002-05-24 15:58:06 +00:00
ad d7e512df18 - Use write barriers.
- NBPG -> PAGE_SIZE.
2002-05-18 20:59:20 +00:00
lukem 9048aaae21 add RCSID 2001-11-13 07:48:40 +00:00
ad 08632b145a Back out previous - it causes panics. 2001-10-10 09:33:36 +00:00
ad ec1f68e931 Use bus_dma to get temporary I/O buffers. 2001-09-20 22:09:44 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
chs 64c6d1d2dc a whole bunch of changes to improve performance and robustness under load:
- remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.
2001-09-15 20:36:31 +00:00
thorpej 44e529fecc Use BUS_DMA_READ and BUS_DMA_WRITE in some obvious places. 2001-07-19 16:36:14 +00:00
ad f4afeda420 Reduce the delay when polling so that dumps go faster. 2001-05-31 11:31:43 +00:00
ad 30b7c151f0 AEN 0x000c appears to mean `init started'. From lukem. 2001-03-30 16:48:57 +00:00
thorpej fd7ed72be1 Add BUS_DMA_STREAMING to data transfer maps. 2001-03-07 23:07:12 +00:00
ad fc04a38b9a Don't choke when we get lots of AENs all at once. 2001-03-04 17:50:51 +00:00
ad 811e2b490b Wait 10x longer for status bits. 2001-02-25 17:46:42 +00:00
ad b0eba3a40d Match an upcoming product. 2001-02-11 15:37:13 +00:00
ad c5fe587d24 Oops, be sure to clear the ATTN interrupt on error. 2001-01-23 20:47:02 +00:00