]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoAdd flags for _STA (status) methods and convenience macros for checking
njl [Fri, 6 Aug 2004 00:38:50 +0000 (00:38 +0000)]
Add flags for _STA (status) methods and convenience macros for checking
the presence of batteries and devices.

20 years agoNow that we have gcc 3.4, we can flip ia64 to using a dynamically linked
gordon [Fri, 6 Aug 2004 00:07:26 +0000 (00:07 +0000)]
Now that we have gcc 3.4, we can flip ia64 to using a dynamically linked
/bin and /sbin.

Reviewed by: marcel (via pluto1)

20 years agoJust because we have a serial console attached does not mean we don't
des [Thu, 5 Aug 2004 23:54:04 +0000 (23:54 +0000)]
Just because we have a serial console attached does not mean we don't
want a splash screen.

There seems to be some confusion in the syscons code as to the meaning of
the SC_KERNEL_CONSOLE flag.  Its absence is sometimes interpreted to mean
"I am not the system console", and sometimes to mean "I am not the only
VGA console" (see the font loading code for an example of the latter).
Someone with better syscons fu than myself should take a closer look.

20 years agoTurn on the new contigmalloc(9) by default. There should not actually
green [Thu, 5 Aug 2004 21:54:11 +0000 (21:54 +0000)]
Turn on the new contigmalloc(9) by default.  There should not actually
be a reason to use the old contigmalloc(9), but if desired, it the
vm.old_contigmalloc setting can be tuned/sysctld back to 0 for now.

20 years agoTry to narrow down the race window on HW that does not have ways to
sos [Thu, 5 Aug 2004 21:13:41 +0000 (21:13 +0000)]
Try to narrow down the race window on HW that does not have ways to
poll for which channel actually pulled the irq line.

20 years agoAdd firmware revision to probe printf.
sos [Thu, 5 Aug 2004 21:11:33 +0000 (21:11 +0000)]
Add firmware revision to probe printf.

20 years agoFix spelling.
pjd [Thu, 5 Aug 2004 21:01:27 +0000 (21:01 +0000)]
Fix spelling.

Pointed out by: mux, ru

20 years agoUse in_cksum_skip() to calculate in4_cksum instead of doing handrolled magic
mlaier [Thu, 5 Aug 2004 20:41:38 +0000 (20:41 +0000)]
Use in_cksum_skip() to calculate in4_cksum instead of doing handrolled magic
(that does not compile with !gcc). Moreover we get the benefit for all archs
that have a hand optimized in_cksum_skip().

Submitted by: yongari
Tested by: me (i386, extensivly), pf4freebsd ML (various)

20 years agoDo not check val-tags if the repository is read-only.
des [Thu, 5 Aug 2004 17:47:35 +0000 (17:47 +0000)]
Do not check val-tags if the repository is read-only.

Approved by: maintainer's silence
MFC after: 2 weeks

20 years agoDon't use type unknown for partitions that we don't care about because
marcel [Thu, 5 Aug 2004 17:44:07 +0000 (17:44 +0000)]
Don't use type unknown for partitions that we don't care about because
the chunk will never be added to the list in that case. Use type mbr
for GPT nested MBRs and use type part for any partition we don't know
or care about. Since the subtype is 0, this should not cause confusion.

20 years ago- One can use both BD_ADDR or name to specify address of the Bluetooth device.
emax [Thu, 5 Aug 2004 16:32:41 +0000 (16:32 +0000)]
- One can use both BD_ADDR or name to specify address of the Bluetooth device.
  Update man pages to document this fact.

- Update usage messages

- Change u_intXXX to uintXXX

20 years agoFix the code in rman that merges adjacent unallocated resources to use a
jhb [Thu, 5 Aug 2004 15:48:18 +0000 (15:48 +0000)]
Fix the code in rman that merges adjacent unallocated resources to use a
better check for 'adjacent'.  The old code assumed that if two resources
were adjacent in the linked list that they were also adjacent range wise.
This is not true when a resource manager has to manage disparate regions.
For example, the current interrupt code on i386/amd64 will instruct
irq_rman to manage two disjoint regions: 0-1 and 3-15 for the non-APIC
case.  If IRQs 1 and 3 were allocated and then released, the old code
would coalesce across the 1 to 3 boundary because the resources were
adjacent in the linked list thus adding 2 to the area of resources that
irq_rman managed as a side effect.  The fix adds extra checks so that
adjacent unallocated resources are only merged with the resource being
freed if the start and end values of the resources also match up.  The
patch also consolidates the checks for adjacent resources being allocated.

20 years agoAdd 'i' to the getopt string.
imp [Thu, 5 Aug 2004 15:44:26 +0000 (15:44 +0000)]
Add 'i' to the getopt string.

Noticed by: jhein

20 years agoBe a bit nicer for those who want to work on my code.
pjd [Thu, 5 Aug 2004 15:07:16 +0000 (15:07 +0000)]
Be a bit nicer for those who want to work on my code.

Dedicated to: mux, bosko

20 years agoOnly use rfs and wfs if ARM_HARD_FLOAT is defined, and use stubs if it is not,
cognet [Thu, 5 Aug 2004 14:07:24 +0000 (14:07 +0000)]
Only use rfs and wfs if ARM_HARD_FLOAT is defined, and use stubs if it is not,
in order to unbreak arm make world. The right way to do it with soft floats
will be figured out later.
Discussed with: das

20 years agoDon't use 'bp' after its destruction!
pjd [Thu, 5 Aug 2004 14:07:21 +0000 (14:07 +0000)]
Don't use 'bp' after its destruction!

20 years agoAdd myself as a maintainer of geom_mirror.
pjd [Thu, 5 Aug 2004 13:51:56 +0000 (13:51 +0000)]
Add myself as a maintainer of geom_mirror.

20 years agoIncrease the suggested minimum free space for release-building. It
cperciva [Thu, 5 Aug 2004 13:35:43 +0000 (13:35 +0000)]
Increase the suggested minimum free space for release-building.  It
needed slightly over 3GB when I built one yesterday.

20 years agoSimplify a bit - we could use 'sc' here as it was initialized properly.
pjd [Thu, 5 Aug 2004 13:22:17 +0000 (13:22 +0000)]
Simplify a bit - we could use 'sc' here as it was initialized properly.

20 years agoMFi386: revision 1.597.
nyan [Thu, 5 Aug 2004 13:01:29 +0000 (13:01 +0000)]
MFi386: revision 1.597.

20 years agoMFi386: revision 1.502.
nyan [Thu, 5 Aug 2004 13:00:11 +0000 (13:00 +0000)]
MFi386: revision 1.502.

20 years agoMFi386: revision 1.410.
nyan [Thu, 5 Aug 2004 12:58:52 +0000 (12:58 +0000)]
MFi386: revision 1.410.

20 years agoIn pmap_page_protect, clear the vm page's PG_WRITEABLE flag if
grehan [Thu, 5 Aug 2004 12:44:12 +0000 (12:44 +0000)]
In pmap_page_protect, clear the vm page's PG_WRITEABLE flag if
downgrading to read-only. Found by triggering the KASSERT in
vm_pageout_flush().

20 years agoBack out something I'm working on that crept in with the last commit.
harti [Thu, 5 Aug 2004 09:11:44 +0000 (09:11 +0000)]
Back out something I'm working on that crept in with the last commit.

Spotted by: ru

20 years agoRemove extra spaces. Remove double quotes around error messages -
harti [Thu, 5 Aug 2004 08:44:00 +0000 (08:44 +0000)]
Remove extra spaces. Remove double quotes around error messages -
they are not needed and will actually be printed.

Submitted by: ru

20 years agoSet ip_v field properly.
sobomax [Thu, 5 Aug 2004 08:12:46 +0000 (08:12 +0000)]
Set ip_v field properly.

PR: kern/69957

20 years agoThis file is not suppose be be all one big comment :-(
dfr [Thu, 5 Aug 2004 08:07:40 +0000 (08:07 +0000)]
This file is not suppose be be all one big comment :-(

Pointed out by: ssouhlal

20 years agoAdd another test that checks for a working '+' command flag.
harti [Thu, 5 Aug 2004 07:24:06 +0000 (07:24 +0000)]
Add another test that checks for a working '+' command flag.

20 years agoNow that mem(4) is a kernel module, we need to add a dependency on
mux [Thu, 5 Aug 2004 07:20:24 +0000 (07:20 +0000)]
Now that mem(4) is a kernel module, we need to add a dependency on
it in drm(4) for mem_range_attr_set().  This fixes loading a DRM
driver as a module.

Reviewed by: anholt

20 years agoFinish the PRISON_ROOT -> SUSER_ALLOWJAIL renaming by removing
cperciva [Thu, 5 Aug 2004 07:15:35 +0000 (07:15 +0000)]
Finish the PRISON_ROOT -> SUSER_ALLOWJAIL renaming by removing
the definition of the old name.

20 years agoRemove a product specific workaround for wrong modes when mmap(2)'ing
phk [Thu, 5 Aug 2004 07:04:33 +0000 (07:04 +0000)]
Remove a product specific workaround for wrong modes when mmap(2)'ing
devices.  They have had plenty of time to adjust now.

20 years agoWork around non-compliant BIOS PCI link devices. Some systems have the
njl [Thu, 5 Aug 2004 06:54:16 +0000 (06:54 +0000)]
Work around non-compliant BIOS PCI link devices.  Some systems have the
following behavior:

* Link devices return invalid status (_STA) values.  The results are very
  unreliable -- sometimes never present.  Just ignore the status and pick
  the best configuration from _PRS.

* Link devices return invalid current settings (_CRS).  Even after setting
  the link value, many systems still return a different setting for _CRS.
  When setting an IRQ, don't bother to check _CRS to see if we succeeded.
  Note that we still check _CRS before routing and this should be addressed
  as well.

Since this is a sensitive area, leave the old behavior accessible via
uncommenting the define for ACPI_OLD_PCI_LINK at the top of the file.  Once
this has been thoroughly tested, this option and the code it covers will
be removed.

Thanks to Len Brown at Intel for informing us of these issues as he worked
around them in Linux.

20 years agoRemove the attempt to cache the previous page mapped at our identity
njl [Thu, 5 Aug 2004 06:29:12 +0000 (06:29 +0000)]
Remove the attempt to cache the previous page mapped at our identity
location (for the wake code).  It should not be needed since we don't
map other pages at the same location and if there was an old mapping, it
would be restored by a fault.  The old code had serious problems, namely
that it was restoring the new page it had just removed (not opage) and
it could only guess at the right protection (since there's no
pmap_extract_protect function).  Thanks to Alan Cox for explaining much
of this to me.

Also, remove a commented-out initializecpu() call since it is not needed.
Restoring the cpu context is better than attempting to init from scratch.

Reviewed by: alc (earlier version)

20 years agoMove boot2 BSS zeroing into btx startup code out of boot1. boot1 does not
kan [Thu, 5 Aug 2004 06:00:05 +0000 (06:00 +0000)]
Move boot2 BSS zeroing into btx startup code out of boot1. boot1 does not
have clear idea on boot2 BSS size and leaves portion of it not zeroed out.
btxcsu.s is in much better position for this job.

Obtained from: DragonflyBSD (with minor adjustments)

20 years agoForced commit to acknowledge that
kientzle [Thu, 5 Aug 2004 05:48:12 +0000 (05:48 +0000)]
Forced commit to acknowledge that
the previous fix was due to: Stefan Farfeleder

20 years agoEnsure that there's always a space between the user name and
kientzle [Thu, 5 Aug 2004 05:46:22 +0000 (05:46 +0000)]
Ensure that there's always a space between the user name and
group name in -tv output format.

20 years agoFix the startup logic for sendmail. If sendmail_enable=yes, don't start
gshapiro [Thu, 5 Aug 2004 03:09:54 +0000 (03:09 +0000)]
Fix the startup logic for sendmail.  If sendmail_enable=yes, don't start
the submit and outbound daemon, else if sendmail_submit_enable=yes, don't
start the outbound daemon.  Only one daemon should be started.

Also, do not rebuild database maps at boot time.  The code didn't pay
attention to SENDMAIL_MAP_TYPE and assumed 'hash'.  Also, admins may
not want maps automatically rebuilt just because the back end database
has changed.  Finally, some maps are built with mode tools than just
makemap (e.g., using cidrexpand on the access text file before sending
it to makemap).

Noticed by: ache
Reviewed by: ache

20 years agoImplement TCP/UDP Transmit/Receive checksum offload.
yongari [Thu, 5 Aug 2004 02:52:33 +0000 (02:52 +0000)]
Implement TCP/UDP Transmit/Receive checksum offload.
Since HME doesn't compensate the checksum for UDP datagram which
can yield to 0x0, UDP transmit checksum offload is disabled by
default. The UDP Transmit checksum offload can be reactivated
by setting special link option link0 with ifconfig(8).

Approved by: jake (mentor)
Reviewed by: tmm
Tested by: Herve Boulouis <amon@sockar.homeip.net>

20 years agoDo a lockless read of the BPF interface structure descriptor list head
rwatson [Thu, 5 Aug 2004 02:37:36 +0000 (02:37 +0000)]
Do a lockless read of the BPF interface structure descriptor list head
before grabbing BPF locks to see if there are any entries in order to
avoid the cost of locking if there aren't any.  Avoids a mutex lock/
unlock for each packet received if there are no BPF listeners.

20 years agoReplace s_isnan.c and s_isnanf.c with the more compact s_isnan.c from
das [Thu, 5 Aug 2004 01:46:11 +0000 (01:46 +0000)]
Replace s_isnan.c and s_isnanf.c with the more compact s_isnan.c from
libc.  The externally-visible effect of this is to add __isnanl() to
libm, which means that libm.so.2 can once again link against libc.so.4
when LD_BIND_NOW is set.  This was broken by the addition of fdiml(),
which calls __isnanl().

20 years agoUse isnormal() instead of fpclassify() to avoid dependency on libc.so.5.
das [Thu, 5 Aug 2004 01:44:55 +0000 (01:44 +0000)]
Use isnormal() instead of fpclassify() to avoid dependency on libc.so.5.

20 years agoMove definition of mem_range_softc from mp_machdep.c to machdep.c so
rwatson [Thu, 5 Aug 2004 00:32:08 +0000 (00:32 +0000)]
Move definition of mem_range_softc from mp_machdep.c to machdep.c so
that it is defined for non-SMP builds, not just SMP ones.

20 years agoia64 specific:
marcel [Wed, 4 Aug 2004 23:04:14 +0000 (23:04 +0000)]
ia64 specific:
o  Remove the code that creates the boot directory on the EFI file
   system after it has been mounted, as well as remove the code
   that creates the symlink from /boot -> /efi/boot (*). As a result,
   /boot will be extracted onto the root file system.
o  Add a function efi_mountpoint() that returns the mount point of
   the EFI file system or NULL if no EFI partition is created. This
   function is used to both check whether there's an EFI file system
   and to return what its mount point is.
o  When there's no EFI file system, ask the user if this is what he
   or she wants. Since we extract /boot onto the root file system,
   we do not actually need an EFI file system for the installation to
   work. Whether one wants to install without an EFI partition is
   of course an entirely different question. We allow it...
o  When we're done installing and need to fix up the various bits
   and pieces, check if there's an EFI partition and if yes, move
   /boot to /efi/boot and create a symlink /boot -> /efi/boot (*).
   This is a much more reliable way to get /boot onto the EFI
   partition than creating the symlink up front and hope its being
   respected. It so happened that we never had the boot directory
   end up on the EFI partition. We make the symlink relative.

(*) /efi is a place holder for the actual EFI mount point of course.

20 years ago - Push down the acquisition and release of Giant into pmap_enter_quick()
alc [Wed, 4 Aug 2004 22:03:16 +0000 (22:03 +0000)]
 - Push down the acquisition and release of Giant into pmap_enter_quick()
   on those architectures without pmap locking.
 - Eliminate the acquisition and release of Giant in vm_map_pmap_enter().

20 years ago- Add two fields to bio structure: 'bio_cflags' which can be used by
pjd [Wed, 4 Aug 2004 21:35:05 +0000 (21:35 +0000)]
- Add two fields to bio structure: 'bio_cflags' which can be used by
  consumer and 'bio_pflags' which can be used by provider.
- Remove BIO_FLAG1 and BIO_FLAG2 flags. From now on new fields should be
  used for internal flags.
- Update g_bio(9) manual page.
- Update some comments.
- Update GEOM_MIRROR, which was the only one using BIO_FLAGs.

Idea from: phk
Reviewed by: phk

20 years agoOops. Didn't commit this as part of the mem module fix.
markm [Wed, 4 Aug 2004 20:49:43 +0000 (20:49 +0000)]
Oops. Didn't commit this as part of the mem module fix.

20 years ago- Update l2ping(8) man page and mention that it is possible to use names
emax [Wed, 4 Aug 2004 20:43:57 +0000 (20:43 +0000)]
- Update l2ping(8) man page and mention that it is possible to use names
  instead of BD_ADDRs

- Convert BD_ADDRs in l2ping(8) output into the human readable names via
  bt_gethostbyaddr(3)

- Introduce and document '-n' - numberic output option

Suggested by: Anil Madhavapeddy <anil at recoil dot org>

20 years agoRemove a potential deadlock on i386 SMP by changing the lazypmap ipi and
jhb [Wed, 4 Aug 2004 20:31:19 +0000 (20:31 +0000)]
Remove a potential deadlock on i386 SMP by changing the lazypmap ipi and
spin-wait code to use the same spin mutex (smp_tlb_mtx) as the TLB ipi
and spin-wait code snippets so that you can't get into the situation of
one CPU doing a TLB shootdown to another CPU that is doing a lazy pmap
shootdown each of which are waiting on each other.  With this change, only
one of the CPUs would do an IPI and spin-wait at a time.

20 years agoWorkaround a possible deadlock on SMP due to a spin lock LOR by disabling
jhb [Wed, 4 Aug 2004 20:24:40 +0000 (20:24 +0000)]
Workaround a possible deadlock on SMP due to a spin lock LOR by disabling
the immediate awakening of proc0 (scheduler kproc, controls swapping
processes in and out).  The scheduler process periodically awakens already,
so this will not result in processes not being swapped in, there will just
be more latency in between a thread being made runnable and the scheduler
waking up to swap the affected process back in.

20 years agoCache the value of curthread in the _get_sleep_lock() and _get_spin_lock()
jhb [Wed, 4 Aug 2004 20:18:45 +0000 (20:18 +0000)]
Cache the value of curthread in the _get_sleep_lock() and _get_spin_lock()
macros and pass the value to the associated _mtx_*() functions to avoid
more curthread dereferences in the function implementations.  This provided
a very modest perf improvement in some benchmarks.

Suggested by: rwatson
Tested by: scottl

20 years agoWhitspace fix.
jhb [Wed, 4 Aug 2004 20:16:17 +0000 (20:16 +0000)]
Whitspace fix.

20 years agoUse a 256MB TR instead of a 64MB TR to make sure that the kernel
arun [Wed, 4 Aug 2004 20:09:41 +0000 (20:09 +0000)]
Use a 256MB TR instead of a 64MB TR to make sure that the kernel
text/data are covered on APs. This enables the kernel to boot on
a 4 way Intel Itanium-2 platform. This has a secondary effect of
keeping the TRs identical on BP and the APs.

reviewed by: marcel@

20 years agoTemporarily unhook the English Hardware Notes from the build to unbreak
simon [Wed, 4 Aug 2004 20:04:01 +0000 (20:04 +0000)]
Temporarily unhook the English Hardware Notes from the build to unbreak
the web build.

Pointy hat to: simon

20 years agoAdd stubs for powerpc TLS.
dfr [Wed, 4 Aug 2004 19:12:14 +0000 (19:12 +0000)]
Add stubs for powerpc TLS.

Submitted by: ssouhlal

20 years agoo Fix a typo in the comment.
maxim [Wed, 4 Aug 2004 18:57:41 +0000 (18:57 +0000)]
o Fix a typo in the comment.

20 years agoAssert Giant in namei(). Bugs have been reported in which, following
rwatson [Wed, 4 Aug 2004 18:39:07 +0000 (18:39 +0000)]
Assert Giant in namei().  Bugs have been reported in which, following
a sleep() call waking up in namei(), a later assertion triggers that
Giant is not held.  By asserting Giant at the start of namei(), we can
know that if that assertion triggers, Giant is lost during the call to
namei(), and not before.

20 years agoAssert Giant in the following file descriptor-related functions:
rwatson [Wed, 4 Aug 2004 18:35:33 +0000 (18:35 +0000)]
Assert Giant in the following file descriptor-related functions:

Function             Reason
--------             ------
fdfree()             VFS
setugidsafety()      KQueue
fdcheckstd()         VFS
_fgetvp()            VFS
fgetsock()           Conditional assertion based on debug.mpsafenet

20 years agoFix module builds for i386 and amd64.
markm [Wed, 4 Aug 2004 18:30:31 +0000 (18:30 +0000)]
Fix module builds for i386 and amd64.

20 years agoNow that IPv6 performs basic in6pcb and inpcb locking, enable inpcb
rwatson [Wed, 4 Aug 2004 18:27:55 +0000 (18:27 +0000)]
Now that IPv6 performs basic in6pcb and inpcb locking, enable inpcb
lock assertions even if IPv6 is compiled into the kernel.  Previously,
inclusion of IPv6 and locking assertions would result in a rapid
assertion failure as IPv6 was not properly locking inpcbs.

20 years agoMore minor cleanups and one small bug fix:
wpaul [Wed, 4 Aug 2004 18:22:50 +0000 (18:22 +0000)]
More minor cleanups and one small bug fix:

- In ntoskrnl_var.h, I had defined compat macros for
  ntoskrnl_acquire_spinlock() and ntoskrnl_release_spinlock() but
  never used them. This is fortunate since they were stale. Fix them
  to work properly. (In Windows/x86 KeAcquireSpinLock() is a macro that
  calls KefAcquireSpinLock(), which lives in HAL.dll. To imitate this,
  ntoskrnl_acquire_spinlock() is just a macro that calls hal_lock(),
  which lives in subr_hal.o.)

- Add macros for ntoskrnl_raise_irql() and ntoskrnl_lower_irql() that
  call hal_raise_irql() and hal_lower_irql().

- Use these macros in kern_ndis.c, subr_ndis.c and subr_ntoskrnl.c.

- Along the way, I realised subr_ndis.c:ndis_lock() was not calling
  hal_lock() correctly (it was using the FASTCALL2() wrapper when
  in reality this routine is FASTCALL1()). Using the
  ntoskrnl_acquire_spinlock() fixes this. Not sure if this actually
  caused any bugs since hal_lock() would have just ignored what
  was in %edx, but it was still bogus.

This hides many of the uses of the FASTCALLx() macros which makes the
code a little cleaner. Should not have any effect on generated object
code, other than the one fix in ndis_lock().

20 years agoRemove spl's from kern_resource.c.
rwatson [Wed, 4 Aug 2004 18:19:09 +0000 (18:19 +0000)]
Remove spl's from kern_resource.c.

20 years agoAnnotate locking strategy for 'struct uidinfo'.
rwatson [Wed, 4 Aug 2004 18:14:19 +0000 (18:14 +0000)]
Annotate locking strategy for 'struct uidinfo'.

20 years agoPost-locking clean up/simplification, particularly, the elimination of
alc [Wed, 4 Aug 2004 18:04:44 +0000 (18:04 +0000)]
Post-locking clean up/simplification, particularly, the elimination of
vm_page_sleep_if_busy() and the page table page's busy flag as a
synchronization mechanism on page table pages.

Also, relocate the inline pmap_unwire_pte_hold() so that it can be used
to shorten _pmap_unwire_pte_hold() on alpha and amd64.  This places
pmap_unwire_pte_hold() next to a comment that more accurately describes
it than _pmap_unwire_pte_hold().

20 years agoadd a set of scripts that I posted to -current last year. This makes
jmg [Wed, 4 Aug 2004 18:03:43 +0000 (18:03 +0000)]
add a set of scripts that I posted to -current last year.  This makes
debugging kernels and kernel modules much easier.  It will automaticly
locate kernel source, extract kernel module information, and rerun gdb
to load kernel module symbol information (if available by compiling module
w/ debuging symbols).

I have not run these recently, so may need to be updated to work with
gdb6.  Feel free to fix as appropriate for -current.

20 years agoCorrect a very rare case where command ordering could be compromised
gibbs [Wed, 4 Aug 2004 17:55:34 +0000 (17:55 +0000)]
Correct a very rare case where command ordering could be compromised
by a transaction performing a driver handled message sequence (an
scb with the MK_MESSAGE flag set).

SCBs that perform host managed messaging must always be
at the head of their per-target selection queue so that
the firmware knows to manually assert ATN if the current
negotiation agreement is packetized.  In the past we
guaranteed this by queuing these SCBs separarately in
the execution queue.  This exposes the system to potential
command reordering in two cases:

1) Another SCB for the same ITL nexus is queued that does
   not have the MK_MESSAGE flag set.  This SCB will be
   queued to the per-target list which can be serviced
   before the MK_MESSAGE scb that preceeded it.

2) If the target cannot accept all of the commands in the
   per-target selection queue in one selection, the remainder
   is queued to the tail of the selection queues so as to
   effect round-robin scheduling.  This could allow the
   MK_MESSAGE scb to be sent to the target before the
   requeued commands.

This commit changes the firmware policy to defer queuing
MK_MESSAGE SCBs into the selection queues until this can
be done without affecting order.  This means that the
target's selection queue is either empty, or the last
SCB on the execution queue is also a MK_MESSAGE SCB.
During any wait, the firmware halts the download of new
SCBs so only a single "holding location" is required.

Luckily, MK_MESSAGE SCBs are rare and typically occur only
during CAM's bus probe where only one command is outstanding
at a time.  However, during some recovery scenarios, the
reordering *could* occur.

aic79xx.c:
Update ahd_search_qinfifo() and helper routines to
search for pending MK_MESSAGE scbs and properly
restitch the execution queue if either the MK_MESSAGE
SCB is being aborted, or the MK_MESSAGE SCB can be
queued due to the execution queue draining due to
aborts.

Enable LQOBUSFREE status to assert an interrupt.
This should be redundant since a BUSFREE interrupt
should always occur along with an LQOBUSFREE event,
but on the Rev A, this doesn't seem to be guaranteed.

When a PPR request is rejected when a previously
existing packetized agreement is in place, assume
that the target has been reset without our knowledge
and revert to async/narrow transfers.  This corrects
two issues: the stale ENATNO setting that was used
to send the PPR is cleared so the firmware is not
confused by a future packetized selection with
ATN asserted but no MK_MESSAGE flag in the SCB and
it speeds up recovery by aborting any pending
packetized transactions that by definition are now
dead.

When re-queueing SCBs after a failed negotiation
attempt, ensure command ordering by freezing the
device queue first.

Traverse the list of pending SCBs rather than the
whole SCB array on the controller when pushing
MK_MESSAGE flag changes out to the controller.
The original code was optimized for the aic7xxx
controllers where there are fewer controller slots
then pending SCBs and the firmware picks SCB
slots.  For the U320 controller, the hope is
that we have fewer pending SCBs then the 512
slots on the controller.

Enhance some diagnostics.

Factor out some common code.

aic79xx.h:
Add prototype for new ahd_done_with_status() that is
used to factor out some commone code.

aic79xx.reg:
Add definisions for the pending MK_MESSAGE SCB.

aic79xx.seq:
Defer MK_MESSAGE SCB queing to the execution queue
so as to preserve command ordering.  Re-arrange some
of the selection processing code so the above change
had no performance impact on the common code path.

Close a few critical section holes.

When entering a non-packetized phase, manually enable
busfree interrupts, since the controller hardware
does not do this automatically.

aic79xx_inline.h:
Enhance logging for queued SCBs.

aic79xx_osm.c:
Add new a new DDB ahd command, ahd_dump, which
invokes the ahd_dump_card_state() routine on the
unit specified with the ahd_sunit DDB command.

aic79xx_pci.c:
Turn on the BUSFREEREV bug for the Rev B. controller.
This is required to close the busfree during non-packetized
phase hole.

20 years agoFix Skinny and PPTP NAT'ing after the introduction of the {ip,tcp,udp}_next
marcus [Wed, 4 Aug 2004 15:17:08 +0000 (15:17 +0000)]
Fix Skinny and PPTP NAT'ing after the introduction of the {ip,tcp,udp}_next
functions.  Basically, the ip_next() function was used to get the PPTP and
Skinny headers when tcp_next() should have been used instead.  Symptoms of
this included a segfault in natd when trying to process a PPTP or Skinny
packet.

Approved by: des

20 years agoCorrect the .Dd date. Pluralize 'assignment' in one place.
harti [Wed, 4 Aug 2004 15:10:35 +0000 (15:10 +0000)]
Correct the .Dd date. Pluralize 'assignment' in one place.

Requested by: ru

20 years agoUnbreak LINT by making sure that method is always defined.
philip [Wed, 4 Aug 2004 14:29:22 +0000 (14:29 +0000)]
Unbreak LINT by making sure that method is always defined.

Submitted by: roam
Pointy hat to: philip

20 years agoAdd regression test for "prefer" balance algorithm in MIRROR class.
pjd [Wed, 4 Aug 2004 12:18:42 +0000 (12:18 +0000)]
Add regression test for "prefer" balance algorithm in MIRROR class.

20 years agoFix and add deivce ID's.
simokawa [Wed, 4 Aug 2004 12:18:39 +0000 (12:18 +0000)]
Fix and add deivce ID's.

Obtained from: DragonFly BSD

20 years ago- Add "prefer" balance algorithm. When used, only disk with the biggest
pjd [Wed, 4 Aug 2004 12:09:53 +0000 (12:09 +0000)]
- Add "prefer" balance algorithm. When used, only disk with the biggest
  priority will be used for reading.
- Bump version number.

20 years agoMFp4: We don't really need g_mirror_free_disk() function.
pjd [Wed, 4 Aug 2004 10:02:06 +0000 (10:02 +0000)]
MFp4: We don't really need g_mirror_free_disk() function.

20 years agoIn dev_pager_updatefake, m->valid is typically 0 on entry. It
dfr [Wed, 4 Aug 2004 08:58:58 +0000 (08:58 +0000)]
In dev_pager_updatefake, m->valid is typically 0 on entry.  It
should be set to VM_PAGE_BITS_ALL before returning, to ensure that
neither vm_pager_get_pages nor vm_fault calls vm_page_zero_invalid
after dev_pager_getpages has returned.

Submitted by: tegge

20 years agoAdd Canon CanoScan LIDE 20 and Canon CanoScan LIDE 30 to the list of
blackend [Wed, 4 Aug 2004 08:11:33 +0000 (08:11 +0000)]
Add Canon CanoScan LIDE 20 and Canon CanoScan LIDE 30 to the list of
supported devices.  While I'm there add CanoScan to the names of other
Canon scanners.

MFC after: 1 week

20 years agoGive sshd a secure startup, but with a tweakable timeout so that
markm [Wed, 4 Aug 2004 08:10:37 +0000 (08:10 +0000)]
Give sshd a secure startup, but with a tweakable timeout so that
the box won't hang forever at startup.

20 years agoAdd a regression test for the passing of command line
harti [Wed, 4 Aug 2004 07:40:58 +0000 (07:40 +0000)]
Add a regression test for the passing of command line
variable assignments via the MAKEFLAGS environment variable.

20 years agoMove libbsnmp.so to /lib so that it is available to atmconfig.
harti [Wed, 4 Aug 2004 06:46:02 +0000 (06:46 +0000)]
Move libbsnmp.so to /lib so that it is available to atmconfig.
At the moment the only dependency on this library is bsnmpd.

Approved by: silence on re@

20 years agoCorrect the names and descriptions of the man pages.
kientzle [Wed, 4 Aug 2004 06:19:31 +0000 (06:19 +0000)]
Correct the names and descriptions of the man pages.

20 years agoPass the partition type to get_mountpoint() and new_part(). This way
marcel [Wed, 4 Aug 2004 05:40:15 +0000 (05:40 +0000)]
Pass the partition type to get_mountpoint() and new_part(). This way
we'll actually create an EFI partition with a FAT file system instead
of an UFS file system. It also allows us to give a sensible default
mount point for EFI partitions so that people don't have to guess.
This also means that we can now remove new_efi_part(), which did the
same thing as new_part(), except it created a FAT file system. The
function wasn't called when the EFI partition was created from scratch
though, which was the problem. By passing the partition type to the
various functions, we can deal with EFI without having to duplicate
code.

20 years agoAdd minimal socketpair() regression test to confirm that we can create
rwatson [Wed, 4 Aug 2004 03:46:35 +0000 (03:46 +0000)]
Add minimal socketpair() regression test to confirm that we can create
(and close) PF_UNIX socket pairs, and that we can't create PF_INET
socket pairs.  More tests to follow.

20 years agoRemove these three files left-over from my unsuccessful attempt to
gad [Wed, 4 Aug 2004 03:24:25 +0000 (03:24 +0000)]
Remove these three files left-over from my unsuccessful attempt to
re-import `patch' into this location.  Instead I think I will import
it to 'patch-b', and that way I can be sure that I am starting with
a clean slate WRT the CVS repository.

20 years agoAdd missing patch which was forgotten during GCC 3.4.2 import. libgcc.a
kan [Wed, 4 Aug 2004 03:13:51 +0000 (03:13 +0000)]
Add missing patch which was forgotten during GCC 3.4.2 import. libgcc.a
gets most of it content back now, when symbols from LIB2FUNCS are actually
compiled.

Noticed by: Steve Kargl <gk at troutmask dot apl dot washington dot edu>
Pointy hat to: kan

20 years agoAdd a standard DIAGNOSTICS section.
tjr [Wed, 4 Aug 2004 03:02:14 +0000 (03:02 +0000)]
Add a standard DIAGNOSTICS section.

20 years agoAdd a standard DIAGNOSTICS section.
tjr [Wed, 4 Aug 2004 02:55:25 +0000 (02:55 +0000)]
Add a standard DIAGNOSTICS section.

20 years agoAdd ENVIRONMENT and DIAGNOSTICS sections.
tjr [Wed, 4 Aug 2004 02:51:46 +0000 (02:51 +0000)]
Add ENVIRONMENT and DIAGNOSTICS sections.

20 years agoIn next(), ensure that 'done' is set in the case when a file cannot
tjr [Wed, 4 Aug 2004 02:47:32 +0000 (02:47 +0000)]
In next(), ensure that 'done' is set in the case when a file cannot
be opened, to avoid trying to read standard input after already closing
it, which resulted in EBADF errors.

20 years agoUpdate for conversion to X.Org as default X in -current.
anholt [Wed, 4 Aug 2004 00:46:58 +0000 (00:46 +0000)]
Update for conversion to X.Org as default X in -current.

Requested by: scottl

20 years agoAllow 'create <filename>'.
le [Wed, 4 Aug 2004 00:23:00 +0000 (00:23 +0000)]
Allow 'create <filename>'.

20 years agoFix problems with the OFW console which happen when the system goes
gad [Wed, 4 Aug 2004 00:21:19 +0000 (00:21 +0000)]
Fix problems with the OFW console which happen when the system goes
into single-user mode (as seen on sparc64 and PPC).  Problems were due
to a minor oversight in the changes committed in revision 1.25.

Submitted by: grehan
Tested by: gad & yongari

20 years agoFurther cleanup: merge the three led toggling functions
philip [Tue, 3 Aug 2004 22:37:09 +0000 (22:37 +0000)]
Further cleanup: merge the three led toggling functions
into a single general function to handle all leds.

Approved by: njl

20 years agoAuto generate the device listings in the Hardware Notes based on
simon [Tue, 3 Aug 2004 22:12:45 +0000 (22:12 +0000)]
Auto generate the device listings in the Hardware Notes based on
manual pages, to avoid duplicating work between the Hardware Notes and
manual pages.

Each text line in the output from the manual page parser is generated
as a SGML entity, making it possible for translators to only translate
lines which actually contains English text (this neat idea came from
hrs).

To determine which drivers are usable on which architectures the
dev.archlist.txt file is used to explicitly list this.  It it an
imperfect solution, but the best I have been able to come up with for
now.

This commit converts most of the devices which has a section 4 manual
page with a HARDWARE section to be the new auto generated format.

Reviewed in principle by: ru, hrs, trhodes
Good ideas for improvements: hrs
No objections: -doc, re

20 years agoBump WARNS to 2 for all other ACPI drivers and minor cleanup.
njl [Tue, 3 Aug 2004 21:27:43 +0000 (21:27 +0000)]
Bump WARNS to 2 for all other ACPI drivers and minor cleanup.

20 years agoUse the acpi_{Get,Set}Integer functions instead of rolling custom ones.
njl [Tue, 3 Aug 2004 21:17:36 +0000 (21:17 +0000)]
Use the acpi_{Get,Set}Integer functions instead of rolling custom ones.
Clean up return path of each function to have a single exit point.  This
reduces diffs against the MPSAFE tree.

20 years ago- Add a HARDWARE section which lists supported devices.
simon [Tue, 3 Aug 2004 20:52:28 +0000 (20:52 +0000)]
- Add a HARDWARE section which lists supported devices.

20 years ago- Make the HARDWARE section preamble text have a call to the Nm macro,
simon [Tue, 3 Aug 2004 20:46:23 +0000 (20:46 +0000)]
- Make the HARDWARE section preamble text have a call to the Nm macro,
  so the driver name will appear in the Hardware Notes.

20 years agoUpdate for the null.ko removal.
markm [Tue, 3 Aug 2004 19:29:48 +0000 (19:29 +0000)]
Update for the null.ko removal.

20 years agoMaking a loadable null.ko for /dev/(null|zero) proved rather
markm [Tue, 3 Aug 2004 19:24:54 +0000 (19:24 +0000)]
Making a loadable null.ko for /dev/(null|zero) proved rather
unpopular, so remove this (mis)feature.

Encouragement provided by: jhb (and others)

20 years agoCorrect the description of the MFLAGS and .MAKEFLAGS variables. Add
harti [Tue, 3 Aug 2004 19:14:14 +0000 (19:14 +0000)]
Correct the description of the MFLAGS and .MAKEFLAGS variables. Add
the MFLAGS target. Document that variable assignments from the MAKEFLAGS
environment variable and the .MAKEFLAGS and .MFLAGS target have the
same precedence as command line variable assignments.

20 years agoPut variable assignments from the command line into the MAKEFLAGS
harti [Tue, 3 Aug 2004 18:56:31 +0000 (18:56 +0000)]
Put variable assignments from the command line into the MAKEFLAGS
variable as required by POSIX. This causes such variables to be
pushed into all sub-makes called by the make (except when the MAKEFLAGS
variable is explicitely changed in the sub-make's environment).
This makes them also mostly un-overrideable in sub-makes except on the
sub-make's command line. Therefor specifying 'make CC=icc' will cause
icc to be used as C compiler in all sub-makes no matter what the Makefiles
itself try to do to the CC variable.

This patch also corrects the handling of the MFLAGS variable. MFLAGS
contains all the command line flags but not the command line variable
assignments. The evaluation of the .MFLAGS or .MAKEFLAGS target now
changes both MFLAGS and MAKEFLAGS (they used to change MAKEFLAGS only).
Makefiles can use MFLAGS for their own purposes given that they do not
except MFLAGS to be undefined at the beginning and that they don't evaluate
.MFLAGS or .MAKEFLAGS. MFLAGS should be removed for POSIX compliance,
but it is unfortunately heavily used by the X makefiles.

This has been extensively tested by port builds (thanks to portmgr), new
worlds and kernels.

PR: standards/57295 (1st part above)
Submitted by: James E. Flemer <jflemer@alum.rpi.edu>
Approved by: portmgr
Obtained from: NetBSD (1st part above)
MFC after: 4 weeks

20 years agoInstead of calling ia32_pause() conditionally on __i386__ or __amd64__
mux [Tue, 3 Aug 2004 18:44:27 +0000 (18:44 +0000)]
Instead of calling ia32_pause() conditionally on __i386__ or __amd64__
being defined, define and use a new MD macro, cpu_spinwait().  It only
expands to something on i386 and amd64, so the compiled code should be
identical.

Name of the macro found by: jhb
Reviewed by: jhb