Commit Graph

2122 Commits

Author SHA1 Message Date
jhb
11a6b9c53f - 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
jhb
f515c0a62f Add a simple manpage describing the basic functionality of witness.
It needs a diagonistics section added at some point in the future.
2001-03-28 12:44:30 +00:00
jhb
640834f755 Add a manpage for the critical_enter/exit() functions. 2001-03-28 07:30:58 +00:00
ru
a27d1d954d MAN[1-9] -> MAN. 2001-03-27 13:48:25 +00:00
ken
24c4b1e75b 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
sos
47e63f32ef Added burncd to the SEE ALSO section.
Idea by: "Akinori MUSHA" <knu@iDaemons.org>
2001-03-26 19:49:39 +00:00
dirk
9fbad51d2a Fix .Xr sd -> da. 2001-03-25 11:57:25 +00:00
alex
465f853f3d 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
alex
058bb29044 - 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
des
097a9d6bae Axe TCP_RESTRICT_RST. It was never a particularly good idea except for a few
very specific scenarios, and now that we have had net.inet.tcp.blackhole for
quite some time there is really no reason to use it any more.

(second of three commits)
2001-03-19 22:07:32 +00:00
rwatson
5a276e4bc8 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
alex
267099bf5a Fix typo: s/DRIVERMODULE/DRIVER_MODULE/
PR:		25901
Submitted by:	Maxime Henrion <mux@qualys.com>
2001-03-18 16:54:39 +00:00
rwatson
6235bd69f9 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
rwatson
d69289c4bf 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
ru
dfe904214e mdoc(7) police: empty lines outside displays cause warnings in -mdocNG. 2001-03-16 13:50:50 +00:00
ru
d724309cca mdoc(7) police: apply formatting fixes to rev 1.14. 2001-03-16 13:38:49 +00:00
dd
e1f64013d1 /modules -> /boot/kernel
PR:		25053
Approved by:	nik
2001-03-16 02:26:48 +00:00
sos
469ebe3b82 Remove the ATA_ENABLE_ATAPI_DMA, ATA_ENABLE_WC and ATA_ENABLE_TAGS
options, add the tuneables for this purpose.
2001-03-15 15:38:57 +00:00
rwatson
29d9568ff2 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
dd
97642444ac Remove the last remnants of circle queues.
PR:		25184
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
Approved by:	nik
2001-03-15 02:08:44 +00:00
dd
3519f71ec0 /devs -> /dev
PR:		25252
Submitted by:	Christian Weisgerber <naddy@mips.inka.de>
Approved by:	nik, phk (via nik)
2001-03-15 02:06:44 +00:00
mjacob
a0b58bfe93 update this to be marginally closer to reality 2001-03-14 04:31:36 +00:00
ru
34101a084a .St macro cleanup:
- spell the abbreviation of 1003.1 as ``POSIX.1''
- fixed the description of -p1003.1-90; it was sold as ISO/IEC 9945-1:1990
- removed -p1003.1b; it only existed as 1003.1b-1993 (-p1003.1b-93), and
  is part of 1003.1 since 1003.1-1996.
- replaced -p1003.1g (project) with -p1003.1g-2000 (approved draft)
- changed abbreviation of -isoC from ``ISO C'' to ``ISO C89''
- removed -iso9899 alias for -isoC
- IEC was missing from some names
- added abbreviation for -susv2 (``SUSv2'')
2001-03-12 17:19:38 +00:00
ru
2833cfc211 mdoc(7) police:
removed hard sentence breaks, use Ft for function return type.
2001-03-12 10:15:03 +00:00
ru
eae0e490e3 Fixed typo. 2001-03-12 10:07:33 +00:00
ru
7b764c6a0e mdoc(7) police: misc formatting fixes. 2001-03-12 09:33:07 +00:00
ru
d3a3cdbcc9 mdoc(7) police: misc formatting fixes. 2001-03-12 09:26:32 +00:00
ru
9994a61e4a mdoc(7) police:
o  Update document date.
o  Remove hard sentence break.
o  Sort xrefs.
2001-03-12 09:14:22 +00:00
ru
8debd4d8a0 mdoc(7) police: misc formatting fixes. 2001-03-12 09:05:59 +00:00
ru
e6ec102c95 mdoc(7) police: mark C types with Vt macro. 2001-03-12 08:54:49 +00:00
assar
e79905605f change the default mode from adhoc to bss (infrastructure)
Reviewed by:	Brooks Davis <brooks@one-eyed-alien.net>
2001-03-12 06:13:39 +00:00
bp
68e03855ac Apply some grammar fixes.
Submitted by:	asmodai
2001-03-12 05:18:37 +00:00
assar
06f90766a4 change default from adhoc mode to BSS (infrastructure) 2001-03-12 04:49:50 +00:00
mjacob
49ab6df486 Document the make_dev_alias function. 2001-03-11 20:10:45 +00:00
alex
085bf061f4 Add a manpage for the DEV_MODULE kernel macro. 2001-03-11 17:30:08 +00:00
alex
7620114ca9 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
alex
93f23e8292 Fix brain damage: s/CDEV_MODULE/DEV_MODULE/ 2001-03-11 16:52:17 +00:00
alex
6610a558f7 Add MODULE_DEPEND.9 and MODULE_VERSION.9 2001-03-11 14:42:38 +00:00
alex
fc8e179d62 Add a manpage for the MODULE_DEPEND macro. 2001-03-11 14:33:34 +00:00
alex
227b97706e Add a manpage for the MODULE_VERSION macro. 2001-03-11 14:33:15 +00:00
alex
22925ff281 Add calls to MODULE_VERSION and MODULE_DEPEND to the EXAMPLE. 2001-03-11 14:18:23 +00:00
alex
a8d215e3c1 Cross references between the DEVICE_*(9) manual pages. 2001-03-10 19:53:38 +00:00
alex
369d42d428 Add references to the various DEVICE_*(9) manpages, otherwise people
don't even know about these.
2001-03-10 19:42:26 +00:00
alex
af8db25151 Add DEVICE_IDENTIFY.9 2001-03-10 19:37:27 +00:00
alex
68ca2c53a3 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
alex
11a9fa5bfe Two mdoc fixes:
- .Os is used without "FreeBSD" nowadays.
- remove hard sentence breaks.
2001-03-10 19:12:46 +00:00
markm
ca954435e8 Update for /dev/random improvements. 2001-03-10 16:08:04 +00:00
okazaki
2d1e8b393b Fix typo.
Approved by:	tanimura
2001-03-10 10:19:38 +00:00
bp
e9b6e3c42c Add documentation for mchain API.
Reviewed by:	asmodai, ru (mbchain.9)
2001-03-10 06:10:48 +00:00
phk
553d1d6989 Make md(4) and mdconfig(8) take over the role of vn(4) and vnconfig(8)
entirely as previously advertised.

md(4) adopted all assets of vn(4) some time back and has proper devfs
support and cloning abilities to boot.
2001-03-09 20:09:28 +00:00