Commit Graph

478 Commits

Author SHA1 Message Date
John Baldwin
1c39cfb650 Correct the MLINKS for mutex.9 to reflect the API change and add a new
MLINK for mtx_initialized.

Reminded by:	rwatson
2001-03-30 23:00:00 +00:00
John Baldwin
0630abadd1 - Document mtx_initialized().
- Document that MTX_QUIET can be passed to mtx_init() and the new flag
  MTX_NOWITNESS.
2001-03-30 22:59:02 +00:00
Bruce Evans
eac993bcaa Fixed bitrot in the prototypes for NDINIT and NDFREE. 2001-03-29 10:29:37 +00:00
Bruce Evans
74c3913eb4 Fixed missing and disorded includes in synopsis.
Removed bogus quotes in .Fn invocations.  Single words don't need quoting.
2001-03-29 10:18:54 +00:00
Bruce Evans
16bef91c0a Fixed wrong include in synopsis. <sys/param.h> is a prerequisite for
<sys/mutex.h> due to #include spam in <sys/mutex.h>.  (More precisely,
<sys/time.h> is the prerequisite, but that is provided by standard
#include spam in <sys/param.h>.)

Fixed bitrot in prototype for mtx_init().
2001-03-29 10:06:50 +00:00
Dag-Erling Smørgrav
d67fe1bd2f Prepare for pseudofs. 2001-03-28 22:21:07 +00:00
John Baldwin
ad84c9eb36 - Both <sys/sx.h> and <sys/mutex.h> depend on <sys/types.h> and
<sys/lock.h>.
- <sys/sx.h> depends on <sys/mutex.h>.
2001-03-28 12:45:41 +00:00
John Baldwin
5ecf40428d Add a manpage for the critical_enter/exit() functions. 2001-03-28 07:30:58 +00:00
Ruslan Ermilov
acaf79e1b9 MAN[1-9] -> MAN. 2001-03-27 13:48:25 +00:00
Kenneth D. Merry
3393f8daa3 Rewrite of the CAM error recovery code.
Some of the major changes include:

	- The SCSI error handling portion of cam_periph_error() has
	  been broken out into a number of subfunctions to better
	  modularize the code that handles the hierarchy of SCSI errors.
	  As a result, the code is now much easier to read.

	- String handling and error printing has been significantly
	  revamped.  We now use sbufs to do string formatting instead
	  of using printfs (for the kernel) and snprintf/strncat (for
	  userland) as before.

	  There is a new catchall error printing routine,
	  cam_error_print() and its string-based counterpart,
	  cam_error_string() that allow the kernel and userland
	  applications to pass in a CCB and have errors printed out
	  properly, whether or not they're SCSI errors.  Among other
	  things, this helped eliminate a fair amount of duplicate code
	  in camcontrol.

	  We now print out more information than before, including
	  the CAM status and SCSI status and the error recovery action
	  taken to remedy the problem.

	- sbufs are now available in userland, via libsbuf.  This
	  change was necessary since most of the error printing code
	  is shared between libcam and the kernel.

	- A new transfer settings interface is included in this checkin.
	  This code is #ifdef'ed out, and is primarily intended to aid
	  discussion with HBA driver authors on the final form the
	  interface should take.  There is example code in the ahc(4)
	  driver that implements the HBA driver side of the new
	  interface.  The new transfer settings code won't be enabled
	  until we're ready to switch all HBA drivers over to the new
	  interface.

src/Makefile.inc1,
lib/Makefile:		Add libsbuf.  It must be built before libcam,
			since libcam uses sbuf routines.

libcam/Makefile:	libcam now depends on libsbuf.

libsbuf/Makefile:	Add a makefile for libsbuf.  This pulls in the
			sbuf sources from sys/kern.

bsd.libnames.mk:	Add LIBSBUF.

camcontrol/Makefile:	Add -lsbuf.  Since camcontrol is statically
			linked, we can't depend on the dynamic linker
			to pull in libsbuf.

camcontrol.c:		Use cam_error_print() instead of checking for
			CAM_SCSI_STATUS_ERROR on every failed CCB.

sbuf.9:			Change the prototypes for sbuf_cat() and
			sbuf_cpy() so that the source string is now a
			const char *.  This is more in line wth the
			standard system string functions, and helps
			eliminate warnings when dealing with a const
			source buffer.

			Fix a typo.

cam.c:			Add description strings for the various CAM
			error status values, as well as routines to
			look up those strings.

			Add new cam_error_string() and
			cam_error_print() routines for userland and
			the kernel.

cam.h:			Add a new CAM flag, CAM_RETRY_SELTO.

			Add enumerated types for the various options
			available with cam_error_print() and
			cam_error_string().

cam_ccb.h:		Add new transfer negotiation structures/types.

			Change inq_len in the ccb_getdev structure to
			be "reserved".  This field has never been
			filled in, and will be removed when we next
			bump the CAM version.

cam_debug.h:		Fix typo.

cam_periph.c:		Modularize cam_periph_error().  The SCSI error
			handling part of cam_periph_error() is now
			in camperiphscsistatuserror() and
			camperiphscsisenseerror().

			In cam_periph_lock(), increase the reference
			count on the periph while we wait for our lock
			attempt to succeed so that the periph won't go
			away while we're sleeping.

cam_xpt.c:		Add new transfer negotiation code.  (ifdefed
			out)

			Add a new function, xpt_path_string().  This
			is a string/sbuf analog to xpt_print_path().

scsi_all.c:		Revamp string handing and error printing code.
			We now use sbufs for much of the string
			formatting code.  More of that code is shared
			between userland the kernel.

scsi_all.h:		Get rid of SS_TURSTART, it wasn't terribly
			useful in the first place.

			Add a new error action, SS_REQSENSE.  (Send a
			request sense and then retry the command.)
			This is useful when the controller hasn't
			performed autosense for some reason.

			Change the default actions around a bit.

scsi_cd.c,
scsi_da.c,
scsi_pt.c,
scsi_ses.c:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.  Selection
			timeouts shouldn't be covered by a sense flag.

scsi_pass.[ch]:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.

			Get rid of the last vestiges of a read/write
			interface.

libkern/bsearch.c,
sys/libkern.h,
conf/files:		Add bsearch.c, which is needed for some of the
			new table lookup routines.

aic7xxx_freebsd.c:	Define AHC_NEW_TRAN_SETTINGS if
			CAM_NEW_TRAN_CODE is defined.

sbuf.h,
subr_sbuf.c:		Add the appropriate #ifdefs so sbufs can
			compile and run in userland.

			Change sbuf_printf() to use vsnprintf()
			instead of kvprintf(), which is only available
			in the kernel.

			Change the source string for sbuf_cpy() and
			sbuf_cat() to be a const char *.

			Add __BEGIN_DECLS and __END_DECLS around
			function prototypes since they're now exported
			to userland.

kdump/mkioctls:		Include stdio.h before cam.h since cam.h now
			includes a function with a FILE * argument.

Submitted by:	gibbs (mostly)
Reviewed by:	jdp, marcel (libsbuf makefile changes)
Reviewed by:	des (sbuf changes)
Reviewed by:	ken
2001-03-27 05:45:52 +00:00
Alexander Langer
80b91e98af Sort includes and remove bogus typedef of modeventhand_t, since this
isn't used in the example any more.

Pointed out by:		bde
2001-03-24 12:18:45 +00:00
Alexander Langer
12829b5fd8 - DECLARE_MODULE needs SYSINIT -> include sys/kernel.h
- modeventhand_t declares a pointer to a function, so it can't be
  used as a forward declaration (d'oh!)

Submitted by:	Harti Brandt <brandt@fokus.gmd.de>
2001-03-23 14:05:05 +00:00
Robert Watson
6feb993d95 o Rename "namespace" argument to "attrnamespace" as namespace is a C++
reserved word

Submitted by:	jkh
Obtained from:	TrustedBSD Project
2001-03-19 05:53:39 +00:00
Alexander Langer
ec5dc5774c Fix typo: s/DRIVERMODULE/DRIVER_MODULE/
PR:		25901
Submitted by:	Maxime Henrion <mux@qualys.com>
2001-03-18 16:54:39 +00:00
Robert Watson
e2cd9aeda3 o The revenge of the mdoc(7) police:
- These pages abused Ar macro (they should have used Fa).
   - NULL and other numeric constants should be marked with Dv.
   - VOP_* in the ERRORS section for the EOPNOTSUPP entry should be marked
     with Fn.

Submitted by:	ru
2001-03-16 17:42:38 +00:00
Robert Watson
42f558db10 o The mdoc(7) police strike with avengance:
- These pages abused Ar macro (they should have used Fa).
   - NULL constant should be marked with Dv.
   - VOP_* in the ERRORS section for the EOPNOTSUPP entry should be marked
     with Fn.

Submitted by:	ru
2001-03-16 15:02:30 +00:00
Ruslan Ermilov
ef99442288 mdoc(7) police: empty lines outside displays cause warnings in -mdocNG. 2001-03-16 13:50:50 +00:00
Robert Watson
50b19f1978 o Update some of the kernel man pages associated with extended attributes
to reflect EA API change to explicit namespacing.

Obtained from:	TrustedBSD Project
2001-03-15 03:13:58 +00:00
Ruslan Ermilov
edf0984dae mdoc(7) police:
removed hard sentence breaks, use Ft for function return type.
2001-03-12 10:15:03 +00:00
Ruslan Ermilov
0048d07db2 Fixed typo. 2001-03-12 10:07:33 +00:00
Ruslan Ermilov
90bd299417 mdoc(7) police: misc formatting fixes. 2001-03-12 09:26:32 +00:00
Ruslan Ermilov
e38cc86b60 mdoc(7) police: mark C types with Vt macro. 2001-03-12 08:54:49 +00:00
Boris Popov
e95f56120b Apply some grammar fixes.
Submitted by:	asmodai
2001-03-12 05:18:37 +00:00
Matt Jacob
792b236965 Document the make_dev_alias function. 2001-03-11 20:10:45 +00:00
Alexander Langer
74169a2c54 Add a manpage for the DEV_MODULE kernel macro. 2001-03-11 17:30:08 +00:00
Alexander Langer
3dca0e13fc Use type of modeventhand_t for the event handler (defined in module.h).
Add a reference to module(9) for more info about the event handler.
2001-03-11 17:07:20 +00:00
Alexander Langer
a8ed195d01 Fix brain damage: s/CDEV_MODULE/DEV_MODULE/ 2001-03-11 16:52:17 +00:00
Alexander Langer
ed488dd0c8 Add MODULE_DEPEND.9 and MODULE_VERSION.9 2001-03-11 14:42:38 +00:00
Alexander Langer
7b8dd7efbf Add a manpage for the MODULE_DEPEND macro. 2001-03-11 14:33:34 +00:00
Alexander Langer
3d34e980a0 Add a manpage for the MODULE_VERSION macro. 2001-03-11 14:33:15 +00:00
Alexander Langer
9790b255bb Add calls to MODULE_VERSION and MODULE_DEPEND to the EXAMPLE. 2001-03-11 14:18:23 +00:00
Alexander Langer
26b104142d Cross references between the DEVICE_*(9) manual pages. 2001-03-10 19:53:38 +00:00
Alexander Langer
66abaf8210 Add references to the various DEVICE_*(9) manpages, otherwise people
don't even know about these.
2001-03-10 19:42:26 +00:00
Alexander Langer
448be9f93c Add DEVICE_IDENTIFY.9 2001-03-10 19:37:27 +00:00
Alexander Langer
2fccaec614 Add a manpage for the last of the driver's functions, the identify
routine.

PR:		18654
Submitted by:	myself (reworked today)
2001-03-10 19:34:42 +00:00
Alexander Langer
ab71708be3 Two mdoc fixes:
- .Os is used without "FreeBSD" nowadays.
- remove hard sentence breaks.
2001-03-10 19:12:46 +00:00
Boris Popov
a1a5ca5514 Add documentation for mchain API.
Reviewed by:	asmodai, ru (mbchain.9)
2001-03-10 06:10:48 +00:00
Alexander Langer
85ac71e9c6 Add module.9 and DECLARE_MODULE.9 2001-03-09 14:16:46 +00:00
Alexander Langer
8b26e61fab Add a general manpage about kernel modules, similar to driver(9).
Reviewed by:	dfr, ru
2001-03-09 14:12:43 +00:00
Alexander Langer
b6a55e7adc Add a manpage for the kernel macro DECLARE_MODULE.
Reviewed by:	dfr, ru
2001-03-09 14:11:56 +00:00
John Baldwin
ebadd4f5b1 Document the ithread_* API used to manage interrupt threads and their
list of handlers.
2001-03-09 03:30:20 +00:00
John Baldwin
d265f30080 Add 2001 to copyright. 2001-03-09 03:17:18 +00:00
John Baldwin
29ef536da3 - Add 2001 to copyright.
- Kthread functions return an error status, they don't set errno to an
  error status.
- Remove the BUGS section as all the bugs listed have been fixed now.
2001-03-09 03:09:30 +00:00
Mark Murray
adcaec54eb Grammar police. 2001-03-06 10:19:12 +00:00
Mark Murray
63fe79c5e8 Fix markup.
Submitted by:	ru
2001-03-06 10:08:36 +00:00
Ruslan Ermilov
79cd39f2dd mdoc(7) police: Use Vt for variable types. 2001-03-06 08:22:10 +00:00
John Baldwin
3d92386026 Adjust swi.9 MLINKS to catch up to the new swi API. 2001-03-05 23:48:38 +00:00
John Baldwin
9ebce8e5b5 Catch up to the new swi API. 2001-03-05 23:47:34 +00:00
Jason Evans
6281b30a73 Implement shared/exclusive locks.
Reviewed by:	bmilekic, jake, jhb
2001-03-05 19:59:41 +00:00
Mark Murray
f4e8d446d8 Extra MLINKS to reflect expansion of BUS_SETUP_INTR(9) manpage. 2001-03-03 14:19:39 +00:00