]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
21 years agoDifferent and more correct workaround for broken cards under NEWCARD:
Poul-Henning Kamp [Sat, 31 Aug 2002 16:07:17 +0000 (16:07 +0000)]
Different and more correct workaround for broken cards under NEWCARD:
don't spam the configuration index register.

I'm not sure where those bits truly belong, but spamming the config
index sure doesn't do us any good.

21 years agoPass the cleandir target on to the aicasm Makefile. This should
Justin T. Gibbs [Sat, 31 Aug 2002 14:50:46 +0000 (14:50 +0000)]
Pass the cleandir target on to the aicasm Makefile.  This should
fix the buildkernel target.

21 years agoIgnore all config entries which have a non-zero start I/O address.
Poul-Henning Kamp [Sat, 31 Aug 2002 14:38:24 +0000 (14:38 +0000)]
Ignore all config entries which have a non-zero start I/O address.

This is a bandaid which makes some more PCCards work under NEWCARD
which would otherwise not work.

Cards with only fixed address windows still loose.

21 years agoImplement the XSI extension which allows the destination string to be
Tim J. Robbins [Sat, 31 Aug 2002 14:16:12 +0000 (14:16 +0000)]
Implement the XSI extension which allows the destination string to be
NULL, and returns the number of bytes that would be required to store
the result of the conversion without storing anything.

PR: 17694

21 years agoNew release notes: ftpd(8) -m, -M, -W
Yaroslav Tykhiy [Sat, 31 Aug 2002 14:08:57 +0000 (14:08 +0000)]
New release notes: ftpd(8) -m, -M, -W

MFCs noted: ftpd(8) -o, -O

21 years agoSplit ansi.c into a separate source file for each function.
Tim J. Robbins [Sat, 31 Aug 2002 11:26:55 +0000 (11:26 +0000)]
Split ansi.c into a separate source file for each function.

21 years agoDeal with bootstrapping from an old -current (almost exactly a year old)
Peter Wemm [Sat, 31 Aug 2002 07:18:40 +0000 (07:18 +0000)]
Deal with bootstrapping from an old -current (almost exactly a year old)
which fails the make tests (doesn't understand ${notdef:U}) and therefore
fails on __FBSDID in usr.bin/make/*.  -DBOOTSTRAPPING is no help here since
this is before we are using the new share/mk/* files, and it would conflict
with the builtin -DBOOTSTRAPPING support later.. so use a different flag.

21 years agoComplete the hookup of ahd/ahc module building.
Justin T. Gibbs [Sat, 31 Aug 2002 06:57:50 +0000 (06:57 +0000)]
Complete the hookup of ahd/ahc module building.

21 years agoEnable ahd/ahc register pretty printing by default. This expedites
Justin T. Gibbs [Sat, 31 Aug 2002 06:56:43 +0000 (06:56 +0000)]
Enable ahd/ahc register pretty printing by default.  This expedites
handling of bug reports.

21 years agoAdd support for ahd/ahc register pretty printing in diagnostics.
Justin T. Gibbs [Sat, 31 Aug 2002 06:55:59 +0000 (06:55 +0000)]
Add support for ahd/ahc register pretty printing in diagnostics.
This feature can be disabled via the AHD/AHC_REG_PRETTY_PRINT kernel
option.

The ahc driver now uses the same debug options mechanism as ahd:
AHC_DEBUG  - Compile in debugging code
AHC_DEBUG_OPTS - String of debug options as listed in aic7xxx.h

21 years agoSync perforce Ids.
Justin T. Gibbs [Sat, 31 Aug 2002 06:53:06 +0000 (06:53 +0000)]
Sync perforce Ids.

21 years agoIdentify new controllers and the aic7901A.
Justin T. Gibbs [Sat, 31 Aug 2002 06:52:27 +0000 (06:52 +0000)]
Identify new controllers and the aic7901A.

Move interrupt enable to the OSM.

Remove some debugging messages.

Remove chip bug workarounds for non-production asics.

21 years agoHook up the endian macros.
Justin T. Gibbs [Sat, 31 Aug 2002 06:51:51 +0000 (06:51 +0000)]
Hook up the endian macros.

Correct some comments.

21 years agoEnable card interrupts in our OSM rather than in the core.
Justin T. Gibbs [Sat, 31 Aug 2002 06:51:15 +0000 (06:51 +0000)]
Enable card interrupts in our OSM rather than in the core.
This ensures that we don't enter our interrupt handler until
all OSM components it might reference have been fully initialized
during attach.

Remove vestiges of untagged queue handling.

Add hints to ahd_get_scb() so it knows what type of SCB collision
management to perform for each new transaction.

Properly disable/enable IU_REQ with changes in tagged queuing and
disconnection settings passed in by CAM.

21 years agoCorrect lun representation during packetized operation.
Justin T. Gibbs [Sat, 31 Aug 2002 06:50:39 +0000 (06:50 +0000)]
Correct lun representation during packetized operation.

Uninline some routines that are just too big to be inlined.

Add some helper macros for SCB ID collision management.

Use a hardware SCB rather than a full SCB for the "next
SCB to queue" sentinal.

Update for new "high SCBID bit" qoutfifo delivery scheme.

If interrupts are disabled on the card, don't bother running
our interrupt handler.  Our handler was called due to a shared
interrupt, and the card's interrupts are explicitly disabled
to prevent entry into our interrupt handler.

21 years agoAdd a prefix to be used for assembler generated tables and
Justin T. Gibbs [Sat, 31 Aug 2002 06:49:55 +0000 (06:49 +0000)]
Add a prefix to be used for assembler generated tables and
functions for register pretty-printing.

Implement "top bit of SCBID is valid bit" qoutfifo delivery scheme.

"the the" -> "the".

Remove old and never used tag collision chain handling in the
sequencer.  Tag collisions are never allowed to get as far as
on the controller.

Simplify busy target table handling routines.

Update comments to reflect reality.

Add support for catching more protocol violations.

Correct a bug in data fifo handling in mixed packetized and
non-packetized environments.  SG_STATE must be cleared even
if an SG fetch is not in progress at the time of FIFO shutdown
or we may confuse the non-packetized transaction idle-loop.

21 years agoConvert to new assembler field syntax.
Justin T. Gibbs [Sat, 31 Aug 2002 06:49:11 +0000 (06:49 +0000)]
Convert to new assembler field syntax.

Add preliminary Rev B definitions.

Add QOUTFIFO_ENTRY_VALID_TAG for new qoufifo scheme.

Reserve SCB space for large luns.

21 years agoUpdates for new non-packetized SCB-ID collision avoidance,
Justin T. Gibbs [Sat, 31 Aug 2002 06:48:42 +0000 (06:48 +0000)]
Updates for new non-packetized SCB-ID collision avoidance,
busy target table addressing changes, our qoufifo scheme,
and long lun support.

Drop bus reset hold delay to 25us.

Remove chip workarounds for revisions that never went to
production.

Add aic7901A identification information.

Remove untagged queue logic.

21 years agoIdentify the AIC7901A as such instead of an AIC7902.
Justin T. Gibbs [Sat, 31 Aug 2002 06:48:14 +0000 (06:48 +0000)]
Identify the AIC7901A as such instead of an AIC7902.

Push protocol violation handler to its own routine.  We now
properly detect and recovery from the following target induced
protocol violations:
o Unexpected or invalid non-packetized Relesection
o Command complete with no status message
o Good Status after incomplete cdb transfer

Add an SCB collision avoidance algorithm that allows us to
use all 512 SCBs for non-packetized operations.  There is
still the possibility of running out of SCBs with non-colliding
tag identifiers, but the algorithm ensures that the stall will
be rare and short lived.

Convert to a read-only algorithm for validing entries in the
qoufifo.  The sequencer now toggles the high bit of the SCB
identifier on each wrap around of the qinfifo.  If the high
bit doesn't match the expected value for this pass of the
qoufifo, the entry is not valid.  This has the benefit of
working on machines that have large granularity cache write
back semantics without requiring any additional memory.

Remove lots of code related to untagged SCB queues.  Since
these controllers can keep a fully busy target table, we
will never have untagged SCB queues.

Lots of improvements to diagnostic logging.

Clarify some comments.

Don't clear BUSFREE interrupt enable in SIMODE1 in the SELTO
handler.  Just clearing the interrupt status is sufficient and
this avoids the chance of disabling busfree detection in connection
that occurs while we are handling the busfree interrupt.

Clear all possible interrupt sources when handling a busfree
interrupt.  The hardware clears some but not all of them.

Don't panic if we get into the default SCSIINT handler.
Dump the card state and clear all interrupt sources in the
hope that we can continue.

LASTPHASE != PREVPHASE.  Use the correct PREVPHASE for testing
against values in the PERRDIAG register.

According to SPI4, the bus free that is required after certain
PPR negotiations will only occur at the end of all message phases.
Handle the bus free if it occurs after a transaction in either
the message-in or message-out phases.  The busfree can also occur
if the status of IU_REQ changes due to a WDTR or SDTR message.
We now set the expect busfree flag in ahd_set_syncrate so that
it works regardless of message type.

Correct a problem with missing certain busfree events.  The
chip supports single-stepping even if a SCSIINT is pending.
This obviates the need to clear all of the SCSI interrupt enables
prior to single stepping.  Since ENBUSFREE can only be disabled
manually and not re-enabled, avoiding touching this bit in the
single-step case yields reliable bus free detection.

Enhance ahd_clear_intstat to clear all SCSIINT sources.

Only use ahd_update_pending_scbs() if we are active on the
bus.  We cannot modify the "MK_MESSAGE" bits on SCBs in the
execution queue if a selection might be in process since
the sequencer uses this bit to detect PPR negotiation to
a target with an outstanding IU_REQ agreement.

Allocate the SCB delivery mechansim's sentinal SCB specially
so we don't waste a valid SCB for this task.

Move tranceive state settle logic to ahd_chip_init() since
this needs to occur after every chip reset, not just the
chip reset that happens during primary driver initialization.

Correct a bug with transmitting lun information in packetized
connections.

Restrict busy target table operations to the range of luns
that can be used for non-packetized connections.  Larger luns
can only be accessed in packetized mode.

Correct a busy target table addressing bug.

Be more careful about how we shutdown the DMA engines during
bus reset events.

Only freeze the SIMQ once regardless of the number of bus
reset events that occur while we are polling for the resets
to stop.

Don't rely on the sequencer remaining paused() during our
reset poll.  It is safe for the sequencer to run during this
time, and many callers to the bus reset code would need to
be modified to make this assumption universally true.

Even if we are not going to clobber SCB state when an auto-request
sense SCB has a check condition, we must still unfreeze the queue.
Re-arrange the BAD STATUS handler to handle this case appropriately.

Modify the SCB download size depending on whether long luns are
being stored in the SCB.

Add ahd_print_register() for pretty printing register diagnostics.

Don't trust that the flexport logic to detect the presence of
a seeprom is available.  It may not be on some motherboard
implementations.

"the the" -> "the"

21 years agoIf interrupts are disabled on the card, don't bother running
Justin T. Gibbs [Sat, 31 Aug 2002 06:46:37 +0000 (06:46 +0000)]
If interrupts are disabled on the card, don't bother running
our interrupt handler.  Our handler was called due to a shared
interrupt, and the card's interrupts are explicitly disabled
to prevent entry into our interrupt handler.

21 years agoUpdate Perforce Ids.
Justin T. Gibbs [Sat, 31 Aug 2002 06:45:28 +0000 (06:45 +0000)]
Update Perforce Ids.

21 years agoMove interrupt enable into the OSM.
Justin T. Gibbs [Sat, 31 Aug 2002 06:44:56 +0000 (06:44 +0000)]
Move interrupt enable into the OSM.

Set the AHC_LSCBS_ENABLED softc flag appropriately.

Convert to using softc storage for our seeprom data.

Break seeprom parsing out into a separate routine.

Change our policy in regards to AHC_SPIOCAP so that we
will allow auto-termination to take place on some aic7855
based cards.

Remove initialized but never really used variables.

21 years agoCleanup endian macros.
Justin T. Gibbs [Sat, 31 Aug 2002 06:44:20 +0000 (06:44 +0000)]
Cleanup endian macros.

Honor the AHC_REG_PRETTY_PRINT option.

Add lock placeholders for new locks used by the core.  These
are not currently needed for FreeBSD.

21 years agoEnable card interrupts from the OSM.
Justin T. Gibbs [Sat, 31 Aug 2002 06:43:55 +0000 (06:43 +0000)]
Enable card interrupts from the OSM.

Use "offset == 0" not "period == 0" to denote async trasnfers.

Implement TARG_IMMEDIATE_SCB non-disconnected target mode
SCB delivery scheme.

In our timeout handler, don't rely on the phase already being
set to denote an active connection.  IDENTIFY_SEEN is more
than sufficient.

Verify that the softc passed in ahc_detach is still known
to the driver before blindly using it.

21 years agoAdd a prefix to be used for assembler generated tables and
Justin T. Gibbs [Sat, 31 Aug 2002 06:43:15 +0000 (06:43 +0000)]
Add a prefix to be used for assembler generated tables and
functions for register pretty-printing.

Only clear SELDO once we've recorded enough information for
the host to understand that the connection is valid.  The
host uses the SELDO status as a handshake to close this
race window.

Correct a bug in target mode handling of non-disconnected
transactions.  The host would indicate the correct SCB to
DMA by setting the SCB id in the currently selected hardware
SCB.  Unfortunately, we would then immediated allocate a
hardware SCB which, depending on the access patern might not
be the same hardware SCB that the host setup for us.  Avoid
this by having the host put the SCBID into scratch ram.

21 years agoConvert to new assembler field syntax.
Justin T. Gibbs [Sat, 31 Aug 2002 06:42:38 +0000 (06:42 +0000)]
Convert to new assembler field syntax.

Document the SXFRCTL2 register found on U2 and U160 controllers.

Overload the MWI_RESIDUAL field for use as the SCB to be downloaded
for "immediate" (or those without the disconnect privledge)
transactions.

Add scratch ram locations for the 274X that give us a bit more
information including whether to enable extended translation.

21 years agoDrop the bus reset hold delay back down to 25us. The 250us
Justin T. Gibbs [Sat, 31 Aug 2002 06:42:10 +0000 (06:42 +0000)]
Drop the bus reset hold delay back down to 25us.  The 250us
value slipped in from a debugging session.

Add AHC_LSCBS_ENABLED and AHC_SCB_CONFIG_USED ahc_flags which
allow for some code to move to the core.

Remove extern for ahc_syncrates[].  The OSMs no longer need
direct access to this array.

Add serial eeprom field to the ahc softc.

Prototype ahc_search_untagged_queues() and ahc_print_register().

Convert to AHC_SHOW_XXX debug option format.

21 years agoAdd ahc_print_devinfo() to simplify some diagnostic output.
Justin T. Gibbs [Sat, 31 Aug 2002 06:41:37 +0000 (06:41 +0000)]
Add ahc_print_devinfo() to simplify some diagnostic output.

Switch to using the same AHC_SHOW_XXX format as the ahd driver.

Always give the target a MSG_INITIATOR_DET_ERR for unexpected
DT or ST phase errors.

Add AHC_SHOW_SELTO diagnostics.

Force renegotiation whenever an unexpected bus free occurs
to rule out a negotiation mismatch as the cause for the error.

Use "offset != 0" as an intenal indicator of "async" rather than
using a period of 0.

In ahc_fetch_devinfo(), correct a bug in getting "our id" as
target.  We weren't looking at all the SEQ_FLAGS that indicate
that we are still in a selected rather than reselected state.

Add support for the AHC_SHOW_MESSAGES debugging option.

If ahc_parse_msg() tells us to terminate the message loop,
do so without acking the message.  The message may be one
that the sequencer needs to handle on its own.

In ahc_parse_msg() return MSGLOOP_TERMINATED for all messages
the sequencer handles.

Allocate storage for, and track, seeprom contents in our softc.

Touch all SCB bytes to avoid parity errors should one of our
debugging routines read an otherwise uninitiatlized byte.

S/G lists must be 8 byte aligned.  Reflect this in our DMA tag.

"the the" -> "the" in a comment

When pausing the card to perform error recovery, ensure that we
are not in the process of being selected or have just been selected
but have not yet handled that selection.  This leaves only one other
race window, in the command complete handler, that needs to be fixed
to make recovery 100% bullet proof.

Convert a few straglers from bsd u_intX_t to inttypes uintX_t.

Remove unused variables.

Split out searching of the untagged holding queues to its own
routine.  In certain recovery scenarios, we want to just
remove entries in the untagged queue without touching related
transactions that are in the QINFIFO or WAITING queues that are
searched by ahc_search_qinfifo().

Add an implementation of the ahc_print_register() routine which
"pretty prints" registers.  The extra bloat in the form of string
tables for this feature is controlled by the AHC_REG_PRETTY_PRINT
option.

Fix a few bugs in ahc_enable_lun() that could prevent controllers
lacking the multiple-target-id feature from changing "our id" on
the fly.  Add a large comment to this section while I'm here
describing the restrictions on "id switching".

21 years agoPass unparsed serial eeprom information into the driver core.
Justin T. Gibbs [Sat, 31 Aug 2002 06:40:32 +0000 (06:40 +0000)]
Pass unparsed serial eeprom information into the driver core.

Honor the extended translation setting for EISA cards now that
I've determined where this information is kept.

Defer card interrupt enabling to the OSM since it may have
some initialization to perform that must occur before interrupts
can be enabled.

21 years agoUpdate assembler syntax and assembler to allow generation of register
Justin T. Gibbs [Sat, 31 Aug 2002 06:39:41 +0000 (06:39 +0000)]
Update assembler syntax and assembler to allow generation of register
description tables used for diagnostic "pretty printing".

21 years agodb_ps.c:
Bruce Evans [Sat, 31 Aug 2002 04:25:44 +0000 (04:25 +0000)]
db_ps.c:
Don't attempt to follow null pointers for zombie processes in db_ps().

Style fix: use explicit an comparison with NULL for all null pointer
checks in db_ps() instead of for half of them.

db_interface.c:
Fixed ddb's handling of traps from with ddb on i386's only.

This was mostly fixed in rev.1.27 (by longjmp()'ing back to the top
level) but was completly broken in rev.1.48 (by not unwinding the new
state (mainly db_active) either before or after the longjmp().  This
mostly never worked for other arches, since rev.1.27 has not been ported
and lower level longjmp()'s only handle traps for memory accesses.  All
cases should be handled at a lower level to provided better control and
simplify unwinding of state.

Implementation details: don't pretend to maintain db_active in a nested
way -- ddb cannot be reentered in a nested way.  Use db_active instead
of the db_global_jmpbuf_valid flag and longjmp()'s return value for things
related to reentering ddb.  [re]entering is still not atomic enough.

21 years agoTake a shot at fixing up a whole stack of style and other embarresing
Peter Wemm [Sat, 31 Aug 2002 03:33:32 +0000 (03:33 +0000)]
Take a shot at fixing up a whole stack of style and other embarresing
unforced errors that Bruce identified.  I have not yet addressed all of
his concerns.

21 years agoMaxmem is a long, so update printf format so this compiles.
John Baldwin [Sat, 31 Aug 2002 03:21:59 +0000 (03:21 +0000)]
Maxmem is a long, so update printf format so this compiles.

21 years agoDo not use an object for the pte and pv zones on ia64 because it overrides
Peter Wemm [Sat, 31 Aug 2002 03:11:20 +0000 (03:11 +0000)]
Do not use an object for the pte and pv zones on ia64 because it overrides
the pmap_allocf() function that we provide above.  We still use the limits
via other means.

Submitted by: jeff

21 years agoTell the user about a failed IRQ mapping rather than fail silently.
Justin T. Gibbs [Sat, 31 Aug 2002 03:04:08 +0000 (03:04 +0000)]
Tell the user about a failed IRQ mapping rather than fail silently.

21 years agoTypo in [^[:alnum:]] character class.
Giorgos Keramidas [Sat, 31 Aug 2002 02:26:19 +0000 (02:26 +0000)]
Typo in [^[:alnum:]] character class.

PR: docs/41728
Submitted by: osgene@web.de

21 years agotest -h is deprecated; use -L instead.
Kris Kennaway [Sat, 31 Aug 2002 02:22:33 +0000 (02:22 +0000)]
test -h is deprecated; use -L instead.

Submitted by: april <april@oublinet.net>
PR: misc/38724 (part of)
MFC after: 3 days

21 years agoSwitch to new format which allows unlimited numbers of chains and
Andrey A. Chernov [Sat, 31 Aug 2002 01:48:56 +0000 (01:48 +0000)]
Switch to new format which allows unlimited numbers of chains and
usually saves 2K in both data file and program memory.
Updated libc required.

21 years agoUse ntohl() to read cnains number in new format
Andrey A. Chernov [Sat, 31 Aug 2002 01:05:39 +0000 (01:05 +0000)]
Use ntohl() to read cnains number in new format

21 years agoMake ficl work on sparc64. The assumption that int == long == void * is
Scott Long [Sat, 31 Aug 2002 01:04:53 +0000 (01:04 +0000)]
Make ficl work on sparc64.  The assumption that int == long == void * is
very pervasive in this code.  This fixes a few of those assumptions and
band-aids over some others.

Tested on: ia32 alpha sparc64

Reviewed by: peter jake (in concept)

21 years agoPass the pointy hat! Remove accidently imported files.
Jacques Vidrine [Fri, 30 Aug 2002 21:53:25 +0000 (21:53 +0000)]
Pass the pointy hat!  Remove accidently imported files.

21 years agoRemove some parts of the Heimdal distribution which we do not use
Jacques Vidrine [Fri, 30 Aug 2002 21:37:10 +0000 (21:37 +0000)]
Remove some parts of the Heimdal distribution which we do not use
and have never used.

21 years agoAdd dates of foundation for Malaya, Malaysia and Singapore.
Greg Lehey [Fri, 30 Aug 2002 21:36:16 +0000 (21:36 +0000)]
Add dates of foundation for Malaya, Malaysia and Singapore.

21 years agoUpdate build infrastructure after import of Heimdal Kerberos 2002/08/29.
Jacques Vidrine [Fri, 30 Aug 2002 21:33:20 +0000 (21:33 +0000)]
Update build infrastructure after import of Heimdal Kerberos 2002/08/29.

21 years agoRemove files no longer relevant after latest import.
Jacques Vidrine [Fri, 30 Aug 2002 21:28:12 +0000 (21:28 +0000)]
Remove files no longer relevant after latest import.

21 years agoResolve conflicts after import of Heimdal Kerberos circa 2002/08/29.
Jacques Vidrine [Fri, 30 Aug 2002 21:25:14 +0000 (21:25 +0000)]
Resolve conflicts after import of Heimdal Kerberos circa 2002/08/29.

21 years agoThis commit was generated by cvs2svn to compensate for changes in r102644,
Jacques Vidrine [Fri, 30 Aug 2002 21:23:27 +0000 (21:23 +0000)]
This commit was generated by cvs2svn to compensate for changes in r102644,
which included commits to RCS files with non-trunk default branches.

21 years agoImport of Heimdal Kerberos from KTH repository circa 2002/08/29.
Jacques Vidrine [Fri, 30 Aug 2002 21:23:27 +0000 (21:23 +0000)]
Import of Heimdal Kerberos from KTH repository circa 2002/08/29.

21 years agoAdd the 'restrict' type qualifier to the function prototype
Robert Drehmel [Fri, 30 Aug 2002 21:18:39 +0000 (21:18 +0000)]
Add the 'restrict' type qualifier to the function prototype
of the swab(3) function in its manual page to match the
standardization by POSIX.1-2001.

21 years ago - Update the manual page of bcmp(3) by replacing
Robert Drehmel [Fri, 30 Aug 2002 21:07:40 +0000 (21:07 +0000)]
 - Update the manual page of bcmp(3) by replacing
     .In string.h
   with
     .In strings.h
   and adding a sentence to the HISTORY section.
 - Use an ANSI-C function definition.
 - Include <strings.h> instead of <string.h>.
 - Apply style(9): Put a space after return keywords.

21 years agoStyle fix
Andrey A. Chernov [Fri, 30 Aug 2002 20:39:53 +0000 (20:39 +0000)]
Style fix

21 years agoPrepare for switching to unlimited chains format
Andrey A. Chernov [Fri, 30 Aug 2002 20:34:36 +0000 (20:34 +0000)]
Prepare for switching to unlimited chains format

21 years ago - Convert the function definition to declare its arguments
Robert Drehmel [Fri, 30 Aug 2002 20:33:05 +0000 (20:33 +0000)]
 - Convert the function definition to declare its arguments
   in the ANSI-C format.
 - Change the code a bit to hopefully save some cycles.
   I.e. (simplified) change

     a = b + 1;
     while (--b & 0x7)
/* ... */
   to
     a = b;
     for (; b & 0x7; b--)
/* ... */
   and
     while (--a >= 0)
/* ... */
   to
     for (; a > 0; a--)
/* ... */
 - Equip two function arguments of swab() with the 'restrict'
   type qualifier in form of the '__restrict' macro.  This is
   specified by POSIX.1-2001.

21 years agoPrepare for switching to unlimited chains format.
Andrey A. Chernov [Fri, 30 Aug 2002 20:26:02 +0000 (20:26 +0000)]
Prepare for switching to unlimited chains format.
Optimize chains lookup a bit.

21 years ago - Update the manual pages of index() and rindex() to show
Robert Drehmel [Fri, 30 Aug 2002 19:42:07 +0000 (19:42 +0000)]
 - Update the manual pages of index() and rindex() to show
   <strings.h> as the associated header file.
   The prototypes have been moved there from <string.h> because
   POSIX.1-2001 said so.
 - Conditionally include either <strings.h> or <string.h> based
   on whether the [r]index() or str[r]chr() functions are
   compiled, respectively.
 - Style(9) tells us to
    - put a space after the return keyword
    - to check for a NUL character without using the ! operator.
    - use NULL instead of (type *)NULL where the compiler knows
      the type.
   Apply these rules.
 - Rather use ANSI-C function definitions than K&R ones.
 - For index(3), correct second function argument's type; it was
   declared to be a `const char' before and is now an `int'.

21 years ago - Update the manual page to show that the associated header file
Robert Drehmel [Fri, 30 Aug 2002 19:08:53 +0000 (19:08 +0000)]
 - Update the manual page to show that the associated header file
   is <strings.h> and not <string.h> anymore.
 - Tell the reader about this change in the HISTORY section.
 - Switch to use an ANSI-C function definition.
 - Include <strings.h> instead of <string.h> in the source file.

21 years agoAdd IDs for upcoming LSI U320 products that use the MegaRAID interface.
Justin T. Gibbs [Fri, 30 Aug 2002 18:28:00 +0000 (18:28 +0000)]
Add IDs for upcoming LSI U320 products that use the MegaRAID interface.

Adjust format of one comment so it doesn't wrap at 80 columns.
Submitted by: "Moore, Eric Dean" <emoore@lsil.com>

21 years agoImplement data, text, and vmem limit checking in the elf loader and svr4
Matthew Dillon [Fri, 30 Aug 2002 18:09:46 +0000 (18:09 +0000)]
Implement data, text, and vmem limit checking in the elf loader and svr4
compat code.  Clean up accounting for multiple segments.  Part 1/2.

Submitted by: Andrey Alekseyev <uitm@zenon.net> (with some modifications)
MFC after: 3 days

21 years agoReserve majors 171 and 172 for the "mide" (LSI MegaRAID IDE control device)
Justin T. Gibbs [Fri, 30 Aug 2002 16:54:02 +0000 (16:54 +0000)]
Reserve majors 171 and 172 for the "mide" (LSI MegaRAID IDE control device)
and "mided" (LSI MegaRAID IDE disk device).

Submitted by: "Moore, Eric Dean" <emoore@lsil.com>

21 years ago - Update strcasecmp(3)/strncasecmp(3) to reflect the fact that
Robert Drehmel [Fri, 30 Aug 2002 15:40:01 +0000 (15:40 +0000)]
 - Update strcasecmp(3)/strncasecmp(3) to reflect the fact that
   the prototypes for both functions are now in the <strings.h>
   header, as required by IEEE Std 1003.1-2001.
 - Add one sentence about that in the HISTORY section.
 - Include <strings.h> in the source file to have the prototypes
   in scope when the _ANSI_SOURCE macro is defined.

21 years agoRevert previous untested revision. The i386 loader consists of three parts:
John Baldwin [Fri, 30 Aug 2002 14:59:47 +0000 (14:59 +0000)]
Revert previous untested revision.  The i386 loader consists of three parts:
At the front is btxldr, in the middle is BTX itself (our mini-kernel), and
then the 'client' (loader.bin) which is the actual loader itself.  boot2
just executes a raw ELF or a.out binary with the only setup provided being
that a bootinfo structure is passed on the stack.  Now, since loader.bin
is a BTX client, the loader needs to be able to locate a BTX kernel for
the client to execute in the context.  Thus, just like pxelder, btxldr
uses the a.out header on the loader binary to find the BTX kernel stored
in the loader and set it up.  It does _not_ just reuse the BTX kernel
that boot2 invoked it with.  This is because it can't assume that it will
_have_ a "spare" BTX kernel lying around.  For example, when cdboot
loads the loader there isn't an existing BTX kernel.  In fact, cdboot
will only work with an a.out loader as well since it also "borrows" the
BTX kernel in the loader binary (which it finds by parsing the a.out
header) just as pxeldr does.  The only difference between cdboot and
pxeldr is where they get /boot/loader from.

If we wanted to make /boot/loader be an actual ELF binary we would need
to change the following utilites to handle that (and they all have to be
able to handle locating the BTX kernel inside of an ELF binary somehow):
- btxldr
- pxeldr
- cdboot

If we didn't want to require a flag day but make the transition smooth
then we need to be able to support both a.out and ELF versions of
/boot/loader which isn't exactly trivial since all three of these utilities
are written in assembly.

Pointy-hat to: peter

21 years agoWhitespace-only: don't mix tabs and spaces for doing identation.
Maxim Sobolev [Fri, 30 Aug 2002 14:21:01 +0000 (14:21 +0000)]
Whitespace-only: don't mix tabs and spaces for doing identation.

21 years agoFix a silly typo in user-setable promisc mode code.
Maxim Sobolev [Fri, 30 Aug 2002 13:37:13 +0000 (13:37 +0000)]
Fix a silly typo in user-setable promisc mode code.

Pointed out by: Yann Berthier <yb@sainte-barbe.org>
MFC after: 1 day

21 years agoestablish default values for /etc/rc.d/pcvt script
Hellmuth Michaelis [Fri, 30 Aug 2002 13:01:42 +0000 (13:01 +0000)]
establish default values for /etc/rc.d/pcvt script

21 years agodocument options for integrating pcvt configuration into the new /etc/rc.d
Hellmuth Michaelis [Fri, 30 Aug 2002 12:44:44 +0000 (12:44 +0000)]
document options for integrating pcvt configuration into the new /etc/rc.d
startup system.

21 years agointegrate pcvt configuration into the new /etc/rc.d startup system
Hellmuth Michaelis [Fri, 30 Aug 2002 12:43:23 +0000 (12:43 +0000)]
integrate pcvt configuration into the new /etc/rc.d startup system

PR:           i386/7100
Reviewed by:  Gordon Tetlow <gordon@FreeBSD.org>

21 years agos/hint.acpi.0.disable/hint.acpi.0.disabled/
Mitsuru IWASAKI [Fri, 30 Aug 2002 11:11:07 +0000 (11:11 +0000)]
s/hint.acpi.0.disable/hint.acpi.0.disabled/

Fix device hints entry for disabling acpi(4).
This also should fix the arbitration with apm(4) when both drivers
are enabled.

Note that your /boot/device.hints needs to be updated if you want to
stop auto-loading acpi.ko or disable acpi(4).

21 years agoUse correct arguments to sysctl in code example.
Johan Karlsson [Fri, 30 Aug 2002 10:52:17 +0000 (10:52 +0000)]
Use correct arguments to sysctl in code example.

PR: 40038
Submitted by: perky
Approved by: sheldonh (mentor)
MFC after: 1 week

21 years agoCorrectly handle setting, getting and deleting EA's with zero length content.
Poul-Henning Kamp [Fri, 30 Aug 2002 08:57:09 +0000 (08:57 +0000)]
Correctly handle setting, getting and deleting EA's with zero length content.

Sponsored by: DARPA & NAI Labs.

21 years agoAdd the new userland tool for manipulating extended attributes.
Poul-Henning Kamp [Fri, 30 Aug 2002 08:53:03 +0000 (08:53 +0000)]
Add the new userland tool for manipulating extended attributes.

This will replace the existing getextattr(8) and setextattr(8) with
a single binary responding to the names getextattr, setextattr,
rmextattr and lsextattr.

This program is not yet connected to the build.

Sponsored by: DARPA and NAI Labs.

21 years agoRewrite wargames(6) in C. A program in C in the public domain is better than
Juli Mallett [Fri, 30 Aug 2002 07:14:42 +0000 (07:14 +0000)]
Rewrite wargames(6) in C.  A program in C in the public domain is better than
a shell script with a big copyright.  Or maybe just a good way to spend an hour
after watching a Matthew Broderick flick.

21 years agoWas mising ftpchroot.5
David E. O'Brien [Fri, 30 Aug 2002 06:50:08 +0000 (06:50 +0000)]
Was mising ftpchroot.5

PR: 40717
Submitted by: Andrew <andrew@ugh.net.au>

21 years agoUnbreak kernel build by printing Maxmem using %ld instead of old (now changed)
Andrey A. Chernov [Fri, 30 Aug 2002 06:13:39 +0000 (06:13 +0000)]
Unbreak kernel build by printing Maxmem using %ld instead of old (now changed)
%u

21 years agoThe aac driver needs 256K of contiguous physical memory in order to
Scott Long [Fri, 30 Aug 2002 05:02:07 +0000 (05:02 +0000)]
The aac driver needs 256K of contiguous physical memory in order to
attach.  If it can't get that (highly likely if loaded as a module on
a system that's been up for a while), give a more descriptive error
message.
Also clean up some nearby style nits.

MFC after: 2 days

21 years agoChange hw.physmem and hw.usermem to unsigned long like they used to be
Peter Wemm [Fri, 30 Aug 2002 04:04:37 +0000 (04:04 +0000)]
Change hw.physmem and hw.usermem to unsigned long like they used to be
in the original hardwired sysctl implementation.

The buf size calculator still overflows an integer on machines with large
KVA (eg: ia64) where the number of pages does not fit into an int.  Use
'long' there.

Change Maxmem and physmem and related variables to 'long', mostly for
completeness.  Machines are not likely to overflow 'int' pages in the
near term, but then again, 640K ought to be enough for anybody.  This
comes for free on 32 bit machines, so why not?

21 years agoSigh. Ken Merry convinced me that my attempts to DTRT were wrong.
Matt Jacob [Fri, 30 Aug 2002 03:36:50 +0000 (03:36 +0000)]
Sigh. Ken Merry convinced me that my attempts to DTRT were wrong.
Replace dual copyright with a plain BSD style copyright assigned
to LSI Logic. This is still within the intents of express consent
from LSI.

MFC after: 2 days

21 years agoNew release note: XFree86-derived termcap(5) entry for xterm.
Bruce A. Mah [Fri, 30 Aug 2002 02:56:24 +0000 (02:56 +0000)]
New release note:  XFree86-derived termcap(5) entry for xterm.

21 years agoFinish bringing support for the vendor attribute to the stylesheets
Bruce A. Mah [Fri, 30 Aug 2002 02:52:14 +0000 (02:52 +0000)]
Finish bringing support for the vendor attribute to the stylesheets
used for the release documentation.

21 years agoAdd 909A PCI id.
Matt Jacob [Fri, 30 Aug 2002 02:35:31 +0000 (02:35 +0000)]
Add 909A PCI id.

MFC after: 2 days

21 years agoAdd an additional copyright (with the express consent of LSI Logic) that
Matt Jacob [Fri, 30 Aug 2002 02:34:19 +0000 (02:34 +0000)]
Add an additional copyright (with the express consent of LSI Logic) that
specifically allows for (via 'BSD Style' licensing) source && binary
redistribution.

Pointy hat to: Matt, for not getting this done ahead of time.

MFC after: 2 days

21 years agoHopefully unbreak world. ke_slptime is gone. It should really have been
Peter Wemm [Fri, 30 Aug 2002 02:18:38 +0000 (02:18 +0000)]
Hopefully unbreak world.  ke_slptime is gone.  It should really have been
looking at p_ksegrp.kg_slptime anyway.

21 years agoAARGH! btoc() is used in the MI buffer sizing routines to calculate
Peter Wemm [Fri, 30 Aug 2002 00:29:52 +0000 (00:29 +0000)]
AARGH!  btoc() is used in the MI buffer sizing routines to calculate
the minimum of either physmem or KVA.  But.. btoc() casts the address
to (unsigned int).  This is NOT GOOD on 64 bit machines and on alpha and
ia64, this results in a buffer limit of around 500K (not megs).  This
causes extreme disk access problems on alpha and ia64.  Since this cast
is simply to ensure that it is unsigned, use 'vm_offset_t' instead.  This
is available because it is already defined in types.h.

Alpha has been suffering from this for ages. It always felt like the
caching wasn't working, and unfortunately it turned out that way. :-(

21 years agoRejig the code to figure out estcpu and work out how long a KSEGRP has been
Julian Elischer [Fri, 30 Aug 2002 00:25:49 +0000 (00:25 +0000)]
Rejig the code to figure out estcpu and work out how long a KSEGRP has been
idle. What was there before was surprisingly ALMOST correct.

Peter and I fried our brains on this for a couple of hours figuring out
what this actually means in the context of multiple threads.

Reviewed by: peter@freebsd.org

21 years agoTry #2 at having /boot/loader default to ELF. Have pxeldr build its
Peter Wemm [Thu, 29 Aug 2002 23:37:44 +0000 (23:37 +0000)]
Try #2 at having /boot/loader default to ELF.  Have pxeldr build its
own a.out version of loader.bin rather than depend on ../loader/loader
being a.out.

21 years agoRemove much of the dereferencing of the fd table entries to look
Daniel Eischen [Thu, 29 Aug 2002 23:06:07 +0000 (23:06 +0000)]
Remove much of the dereferencing of the fd table entries to look
at file flags and replace it with functions that will avoid null
pointer checks.

MFC to be done by archie ;-)

PR: 42100
Reviewed by: archie, robert
MFC after: 3 days

21 years agoActually remove the a.out kld loader. While I am not 100% sure, I believe
Peter Wemm [Thu, 29 Aug 2002 23:04:05 +0000 (23:04 +0000)]
Actually remove the a.out kld loader.  While I am not 100% sure, I believe
it is broken.  It certainly has been suffering neglect.  It is not needed
because we never shipped a.out kld's and they never really worked right.

21 years agoActually remove the stale a.out kld support. This is the stuff that was
Peter Wemm [Thu, 29 Aug 2002 23:02:37 +0000 (23:02 +0000)]
Actually remove the stale a.out kld support.  This is the stuff that was
never updated for the metadata infrastructure.

21 years agoOur gnats sets Confidential to "no" by default.
Giorgos Keramidas [Thu, 29 Aug 2002 22:59:22 +0000 (22:59 +0000)]
Our gnats sets Confidential to "no" by default.

PR: docs/41727
Submitted by: osgene@web.de
Reviewed by: des

21 years agoMake the libc_r version of select() set the readable or writable
Archie Cobbs [Thu, 29 Aug 2002 21:39:19 +0000 (21:39 +0000)]
Make the libc_r version of select() set the readable or writable
file descriptor bit if poll() returns POLLERR, POLLHUP, or POLLNVAL.
Othewise, it's possible for select() to return successfully but
with no bits set.

Reviewed by: deischen
MFC after: 3 days
PR: bin/42175

21 years agoCleanup grammer related to PR 40907 and add a section on TCP delayed
Matthew Dillon [Thu, 29 Aug 2002 20:34:06 +0000 (20:34 +0000)]
Cleanup grammer related to PR 40907 and add a section on TCP delayed
acks as suggested by Mike Harding <mvh@ix.netcom.com>

21 years agoFix crack-smoking code that was panicing on the quad xeon:
Julian Elischer [Thu, 29 Aug 2002 19:49:53 +0000 (19:49 +0000)]
Fix crack-smoking code that was panicing on the quad xeon:
        - If either of proc or kse are NULL during thread_exit(), then
          the kernel is going to fault because parts of the function
          assume they aren't NULL.  Instead, just assert they aren't NULL
          (as well as the kse group) and assume they are in all of the
          code.  It doesn't make sense for them to be NULL here anyways.
        - Move the PROC_UNLOCK(p) up above clearing td_proc, etc. since
          otherwise we will panic if the proc's lock is contested.

Submitted by: jhb@freebsd.org

21 years agoFix a silly off my one error that caused crashes on resume in certain
Scott Long [Thu, 29 Aug 2002 15:06:26 +0000 (15:06 +0000)]
Fix a silly off my one error that caused crashes on resume in certain
circumstances.  The problem was only reported with -stable, but it's
obviously wrong in -current also.  MFC is forthcoming.

Submitted by: doconnor@dsoft.com.au

21 years agoFix a warning of "possibly used before initialisation".
Giorgos Keramidas [Thu, 29 Aug 2002 14:29:09 +0000 (14:29 +0000)]
Fix a warning of "possibly used before initialisation".

Reviewed by: tjr

21 years agoAdd <stdlib.h> to get a prototype for exit().
Giorgos Keramidas [Thu, 29 Aug 2002 14:26:49 +0000 (14:26 +0000)]
Add <stdlib.h> to get a prototype for exit().

Reviewed by: tjr

21 years agosome ipfilter files that accidently got imported here
Darren Reed [Thu, 29 Aug 2002 13:27:26 +0000 (13:27 +0000)]
some ipfilter files that accidently got imported here

21 years agoCorrectly handle ifr.ifr_flags/ifr.ifr_flagshigh like ifconfig(8) does.
Maxim Sobolev [Thu, 29 Aug 2002 12:52:28 +0000 (12:52 +0000)]
Correctly handle ifr.ifr_flags/ifr.ifr_flagshigh like ifconfig(8) does.

MFC after: 1 day

21 years agoAdd sanity check seeing if adjusted start address exceeds end address
Mitsuru IWASAKI [Thu, 29 Aug 2002 12:39:21 +0000 (12:39 +0000)]
Add sanity check seeing if adjusted start address exceeds end address
after boundary and alignment adjustment.

21 years agoThe mode can be "r+" as well on PUT, but only "a" on APPE.
Yaroslav Tykhiy [Thu, 29 Aug 2002 09:53:51 +0000 (09:53 +0000)]
The mode can be "r+" as well on PUT, but only "a" on APPE.

21 years agoFix lexer jam on unimplemented commands.
Yaroslav Tykhiy [Thu, 29 Aug 2002 09:23:08 +0000 (09:23 +0000)]
Fix lexer jam on unimplemented commands.

Submitted by: maxim
MFC after: 5 days

22 years agoFix kernel build breakage when ACPI_DEBUG option is specified.
Mitsuru IWASAKI [Thu, 29 Aug 2002 08:31:06 +0000 (08:31 +0000)]
Fix kernel build breakage when ACPI_DEBUG option is specified.