]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoRemove unneeded checking for invalid minor numbers from pf(4).
ed [Sun, 25 Jan 2009 14:00:00 +0000 (14:00 +0000)]
Remove unneeded checking for invalid minor numbers from pf(4).

Because it is not possible to access the pf(4) character device through
any other device node as the one in devfs, there is no need to check for
unknown device minor numbers.

Approved by: mlaier

15 years agoWhen a statically linked binary is executed (or at least, one without
rwatson [Sun, 25 Jan 2009 12:07:43 +0000 (12:07 +0000)]
When a statically linked binary is executed (or at least, one without
an interpreter definition in its program header), set the auxiliary
ELF argument AT_BASE to 0 rather than to the address that we would
have mapped the interpreter at if there had been one.

The ELF ABI specifications appear to be ambiguous as to the desired
behavior in this situation, as they define AT_BASE as the base address
of the interpreter, but do not mention what to do if there is none.
On Solaris, AT_BASE will be set to the base address of the static
binary if there is no interpreter, and on Linux, AT_BASE is set to 0.
We go with the Linux semantics as they are of more immediate utility
and allow the early runtime environment to know that the kernel has
not mapped an interpreter, but because AT_PHDR points at the ELF
header for the running binary, it is still possible to retrieve all
required mapping information when the process starts should it be
required.  Either approach would be preferable to our current behavior
of passing a pointer to an unmapped region of user memory as AT_BASE.

MFC after: 3 weeks

15 years agoInstead of killing the 'watchdog' subshell and leaving a sleep for
bz [Sun, 25 Jan 2009 10:31:45 +0000 (10:31 +0000)]
Instead of killing the 'watchdog' subshell and leaving a sleep for
rcshutdown_timeout (normally 30s) around re-parented to init, make
sure both go away using pkill -P.

While noone normally notices this for the system shutdown, it helps for
cleanly shutting down trusted jails.
Found without a killall in the base system, which in rc.d/jail normally
ensures that all processes of a jail to be stopped will be killed.

Reviewed by: silence on current@
MFC after: 4 weeks

15 years agoFor consistency with prison_{local,remote,check}_ipN rename
bz [Sun, 25 Jan 2009 10:11:58 +0000 (10:11 +0000)]
For consistency with prison_{local,remote,check}_ipN rename
prison_getipN to prison_get_ipN.

Submitted by: jamie (as part of a larger patch)
MFC after: 1 week

15 years agoRemove unneeded checks of device unit number from speaker(4).
ed [Sun, 25 Jan 2009 09:20:59 +0000 (09:20 +0000)]
Remove unneeded checks of device unit number from speaker(4).

Calls on the cdev can only be made on existing devices. This means we
don't have to check the value of dev2unit().

15 years ago - Correct a typo in a comment.
jeff [Sun, 25 Jan 2009 09:17:16 +0000 (09:17 +0000)]
 - Correct a typo in a comment.

Noticed by: danger

15 years ago - Make the keg abstraction more complete. Permit a zone to have multiple
jeff [Sun, 25 Jan 2009 09:11:24 +0000 (09:11 +0000)]
 - Make the keg abstraction more complete.  Permit a zone to have multiple
   backend kegs so it may source compatible memory from multiple backends.
   This is useful for cases such as NUMA or different layouts for the same
   memory type.
 - Provide a new api for adding new backend kegs to secondary zones.
 - Provide a new flag for adjusting the layout of zones to stagger
   allocations better across cache lines.

Sponsored by: Nokia

15 years agoRemove unneeded use of device unit numbers from pty(4).
ed [Sun, 25 Jan 2009 08:27:11 +0000 (08:27 +0000)]
Remove unneeded use of device unit numbers from pty(4).

A much more simple approach to generate the slave device name, is to
obtain the device name of the master and replace 'p' by 't'.

15 years ago - Use __XSTRING where I want the define to be expanded. This resulted in
jeff [Sun, 25 Jan 2009 07:35:10 +0000 (07:35 +0000)]
 - Use __XSTRING where I want the define to be expanded.  This resulted in
   sizeof("MAXCPU") being used to calculate a string length rather than
   something more reasonable such as sizeof("32").  This shouldn't have
   caused any ill effect until we run on machines with 1000000 or more
   cpus.

15 years agoIf the parent up/down task was queued then sync with it before returning from
thompsa [Sun, 25 Jan 2009 07:31:51 +0000 (07:31 +0000)]
If the parent up/down task was queued then sync with it before returning from
the vap ioctl. This means that the parent interface should hopefully be up
before we return to userland, it does not depend on the parent init succeeding,
just that it was run.

This fixes wpa_supplicant with ndis and USB where the parent interfaces can be
slow to init.

15 years agoFix errors introduced when I rewrote select.
jeff [Sun, 25 Jan 2009 07:24:34 +0000 (07:24 +0000)]
Fix errors introduced when I rewrote select.
 - Restructure selscan() and selrescan() to avoid producing extra selfps
   when we have a fd in multiple sets.  As described below multiple selfps
   may still exist for other reasons.
 - Make selrescan() tolerate multiple selfds for a given descriptor
   set since sockets use two selinfos per fd.  If an event on each selinfo
   fires selrescan() will see the descriptor twice.  This could result in
   select() returning 2x the number of fds actually existing in fd sets.

Reported by: mgleason@ncftp.com

15 years agoRemove unused unrhdr from GEOM character device module.
ed [Sat, 24 Jan 2009 18:23:19 +0000 (18:23 +0000)]
Remove unused unrhdr from GEOM character device module.

Now that make_dev() doesn't require unit numbers to be unique, there is
no need to use an unrhdr here to generate the numbers. Remove the entire
init-routine, because it is optional.

15 years agoMark kern.ttys as MPSAFE.
ed [Sat, 24 Jan 2009 18:20:15 +0000 (18:20 +0000)]
Mark kern.ttys as MPSAFE.

sysctl now allows Giantless calls, so make kern.ttys use this. If it
needs Giant, it locks the proper TTY anyway.

15 years agoNew sentence starts on a new line.
bz [Sat, 24 Jan 2009 15:56:44 +0000 (15:56 +0000)]
New sentence starts on a new line.

MFC after: 2 week

15 years agoUpdate the description of the '-h' option wrt to primary addresses
bz [Sat, 24 Jan 2009 15:53:37 +0000 (15:53 +0000)]
Update the description of the '-h' option wrt to primary addresses
per address family and add a reference to the ip-addresses option.

MFC after: 1 week

15 years agoChange IP addresses/prefixes to be from "Test-Net" (IPv4 documentation
bz [Sat, 24 Jan 2009 15:33:09 +0000 (15:33 +0000)]
Change IP addresses/prefixes to be from "Test-Net" (IPv4 documentation
prefix 192.0.2.0/24) rather than from private-use networks.

MFC after: 1 week

15 years agoUse __FBSDID() for $FreeBSD$ version strings in .c files.
rwatson [Sat, 24 Jan 2009 13:15:45 +0000 (13:15 +0000)]
Use __FBSDID() for $FreeBSD$ version strings in .c files.

Obtained from: TrustedBSD Project
MFC after: 3 days

15 years agoBegin to add SDT tracing of the MAC Framework: add policy modevent,
rwatson [Sat, 24 Jan 2009 10:57:32 +0000 (10:57 +0000)]
Begin to add SDT tracing of the MAC Framework: add policy modevent,
register, and unregister hooks that give access to the mac_policy_conf
for the policy.

Obtained from: TrustedBSD Project
MFC after: 3 days

15 years agoAdd explicit static DTrace tracing to the callout mechanism, capturing
rwatson [Sat, 24 Jan 2009 10:22:49 +0000 (10:22 +0000)]
Add explicit static DTrace tracing to the callout mechanism, capturing
pointers to the callout handler just before and just after the callout
it invoked.  I attempted to do this in a manner congruent to tracing in
Solaris's callout mechanism, but couldn't quite use the same names due
to convention and syntax differences.

Example DTrace script to generate a distribution graph of callout
execution times:

callout_execute:::callout_start
{
        self->cstart = timestamp;
}

callout_execute:::callout_end
{

        @length = quantize(timestamp - self->cstart);
}

Reviewed by: jb
MFC after: 3 days

15 years agoWhen "-b" is specified, one could easily create "smaller" files
trhodes [Sat, 24 Jan 2009 05:32:11 +0000 (05:32 +0000)]
When "-b" is specified, one could easily create "smaller" files
that are much larger than expected (given the default size).
Change "smaller files" to "split files" which is more in line
with what "-b" actually does.

PR: 119329
Submitted by: Julian Stacey <jhs@berklix.org>

15 years agoUpdate the supported device list a little bit.
trhodes [Sat, 24 Jan 2009 04:08:00 +0000 (04:08 +0000)]
Update the supported device list a little bit.

PR: 84538
Submitted by: asmodai

15 years agoAdd a comment on kern.ipc.maxpipekva.
trhodes [Sat, 24 Jan 2009 01:46:46 +0000 (01:46 +0000)]
Add a comment on kern.ipc.maxpipekva.

PR: 105997
Reviewed by: keramida

15 years ago- Mark all standalone INT/LONG/QUAD sysctl's MPSAFE. This is done
jhb [Fri, 23 Jan 2009 22:49:23 +0000 (22:49 +0000)]
- Mark all standalone INT/LONG/QUAD sysctl's MPSAFE.  This is done
  inside the SYSCTL() macros and thus does not need to be done for
  all of the nodes scattered across the source tree.
- Mark the name-cache related sysctl's (including debug.hashstat.*) MPSAFE.
- Mark vm.loadavg MPSAFE.
- Remove GIANT_REQUIRED from vmtotal() (everything in this routine already
  has sufficient locking) and mark vm.vmtotal MPSAFE.
- Mark the vm.stats.(sys|vm).* sysctls MPSAFE.

15 years ago- Add conditional Giant locking around the vrele() in
jhb [Fri, 23 Jan 2009 22:46:45 +0000 (22:46 +0000)]
- Add conditional Giant locking around the vrele() in
  sysctl_kern_proc_pathname().
- Mark all the kern.proc.* sysctls as MPSAFE.

Submitted by: csjp (2)

15 years agoAdd a flag to tag individual sysctl leaf nodes as MPSAFE and thus not
jhb [Fri, 23 Jan 2009 22:40:35 +0000 (22:40 +0000)]
Add a flag to tag individual sysctl leaf nodes as MPSAFE and thus not
needing Giant.

Submitted by: csjp (an older version)

15 years agoUse shared vnode locks for fchdir().
jhb [Fri, 23 Jan 2009 22:13:30 +0000 (22:13 +0000)]
Use shared vnode locks for fchdir().

Submitted by: ups

15 years agoTweak the wording for vfs_mark_atime() since the I/O it is avoiding by not
jhb [Fri, 23 Jan 2009 22:13:00 +0000 (22:13 +0000)]
Tweak the wording for vfs_mark_atime() since the I/O it is avoiding by not
updating va_atime via VOP_SETATTR() isn't always synchronous.  For some
filesystems it is asynchronous.

Suggested by:  bde

15 years agoPush down Giant in the vlnru kproc main loop so that it is only acquired
jhb [Fri, 23 Jan 2009 22:08:54 +0000 (22:08 +0000)]
Push down Giant in the vlnru kproc main loop so that it is only acquired
around calls to vlrureclaim() on non-MPSAFE filesystems.  Specifically,
vnlru no longer needs Giant for the common case of waking up and deciding
there is nothing for it to do.

MFC after: 2 weeks

15 years agoProtect against NULL pointer dereference.
trasz [Fri, 23 Jan 2009 21:08:00 +0000 (21:08 +0000)]
Protect against NULL pointer dereference.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation

15 years agoDon't leak memory when alloc fails.
trasz [Fri, 23 Jan 2009 21:06:16 +0000 (21:06 +0000)]
Don't leak memory when alloc fails.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Found with: Coverity Prevent(tm)
CID: 2908

15 years agoGuard against NULL pointer dereference.
trasz [Fri, 23 Jan 2009 21:05:16 +0000 (21:05 +0000)]
Guard against NULL pointer dereference.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Found with: Coverity Prevent(tm)
CID: 1847

15 years agoGuard against NULL pointer dereference.
trasz [Fri, 23 Jan 2009 21:03:59 +0000 (21:03 +0000)]
Guard against NULL pointer dereference.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Found with: Coverity Prevent(tm)
CID: 130

15 years agoOnly start the if_slowtimo timer (which drives the if_watchdog methods of
jhb [Fri, 23 Jan 2009 20:53:01 +0000 (20:53 +0000)]
Only start the if_slowtimo timer (which drives the if_watchdog methods of
network interfaces) if we have at least one interface with an if_watchdog
routine.

MFC after: 2 weeks

15 years agoSort KERNFAST and KERNCONF into the list they are in.
imp [Fri, 23 Jan 2009 18:35:09 +0000 (18:35 +0000)]
Sort KERNFAST and KERNCONF into the list they are in.

15 years agoDocument KERNCONF and KERNFAST. Note that TARGET is usually all one
imp [Fri, 23 Jan 2009 18:32:31 +0000 (18:32 +0000)]
Document KERNCONF and KERNFAST.  Note that TARGET is usually all one
needs to set for cross building.

15 years agoImplement an idea from Sam Leffler:
imp [Fri, 23 Jan 2009 18:23:16 +0000 (18:23 +0000)]
Implement an idea from Sam Leffler:
make KERNFAST=blah buildkernel
is now a short cut for
make KERNCONF=blah -DKERNFAST buildkernel

This change works for all kernel config files not named "1".  I did
that to make sure that
make -DKERNFAST buildkernel
remains the same as
make -DKERNFAST KERNCONF=GENERIC buildkernel
rather than trying to build and configure "1".  I've never seen a
kernel config file named "1," so I think this is a good compromise.

15 years agofix regulatory state check for all vaps' being down; it must be done
sam [Fri, 23 Jan 2009 18:16:14 +0000 (18:16 +0000)]
fix regulatory state check for all vaps' being down; it must be done
before calling the ic_setregdomain callback

15 years agoadd defines for driver-private bits to eliminate use of constants
sam [Fri, 23 Jan 2009 18:15:09 +0000 (18:15 +0000)]
add defines for driver-private bits to eliminate use of constants

15 years ago- Add few VIA bridges to agp_via.c and connect it to amd64 build
jkim [Fri, 23 Jan 2009 17:48:18 +0000 (17:48 +0000)]
- Add few VIA bridges to agp_via.c and connect it to amd64 build
as they support Intel Core/Core 2 and VIA Nano processors.
- Align "optional agp" in conf/files.* for consistency while I am here.

15 years agoUse the correct type for the timeout parameter to the 32-bit
jhb [Fri, 23 Jan 2009 13:23:17 +0000 (13:23 +0000)]
Use the correct type for the timeout parameter to the 32-bit
compat version aio_waitcomplete().

Reminded by: bz
Submitted by: jamie
MFC after: 3 days

15 years agoNote the implication of setting the 'w' permission on directories,
trhodes [Fri, 23 Jan 2009 11:39:00 +0000 (11:39 +0000)]
Note the implication of setting the 'w' permission on directories,
while here, expand the 'naughty bits' comment in BUGS.

PR: 84265 and 84268
Reviewed by: keramida
Obtained from: hints from ceri, keramida

15 years agourtw(4) works also on amd64.
weongyo [Fri, 23 Jan 2009 08:18:58 +0000 (08:18 +0000)]
urtw(4) works also on amd64.

Tested by: kevlo

15 years agoAdd urtw(4) to the list of supported network interface.
weongyo [Fri, 23 Jan 2009 05:57:40 +0000 (05:57 +0000)]
Add urtw(4) to the list of supported network interface.

15 years agoAdd an entry for the urtw(4) module.
weongyo [Fri, 23 Jan 2009 05:56:09 +0000 (05:56 +0000)]
Add an entry for the urtw(4) module.

15 years agoConnect urtw.4 to the build.
weongyo [Fri, 23 Jan 2009 05:53:49 +0000 (05:53 +0000)]
Connect urtw.4 to the build.

15 years agoConnect urtw(4) to the i386 build only because it's not tested on amd64
weongyo [Fri, 23 Jan 2009 05:45:17 +0000 (05:45 +0000)]
Connect urtw(4) to the i386 build only because it's not tested on amd64
architecture but expect it'd work.  In cases on other architectures it'd
not work yet.

15 years agofix return status handling by ar5XXXReset; this is the reason the
sam [Fri, 23 Jan 2009 05:33:48 +0000 (05:33 +0000)]
fix return status handling by ar5XXXReset; this is the reason the
driver sometimes reports reset failed w/ status 0

15 years agoAdd a new USB wireless driver, urtw(4) for supporting Realtek's 8187L
weongyo [Fri, 23 Jan 2009 05:04:49 +0000 (05:04 +0000)]
Add a new USB wireless driver, urtw(4) for supporting Realtek's 8187L
chipset.

15 years agoAdd an example of using bs=2048 to duplicate data CD-ROMs.
keramida [Fri, 23 Jan 2009 03:46:44 +0000 (03:46 +0000)]
Add an example of using bs=2048 to duplicate data CD-ROMs.

This should be a bit useful for users who look at the manpage and
then try to copy data CD-ROM disks using dd.  A lot of us know
that bs=2048 is required, but it still manages to cause a bit of
grief to those who haven't heard about it.

PR: bin/130857
Submitted by: Tri Brotoharsono < mail at tribrotoharsono.net >
MFC after: 3 days

15 years agodon't run the calibration code if scanning, we won't be on the home channel
sam [Fri, 23 Jan 2009 03:15:28 +0000 (03:15 +0000)]
don't run the calibration code if scanning, we won't be on the home channel

15 years agoAttaching to the init process returns EINVAL,
trhodes [Fri, 23 Jan 2009 00:58:14 +0000 (00:58 +0000)]
Attaching to the init process returns EINVAL,
so give an example that is more likely to work.
Stolen from the ktrace(1) manual page.

PR: 128222
Submitted by: Mateusz Guzik <mjguzik@gmail.com>

15 years agoMove to having a caps flag. Newer versions of the AT91 family don't
imp [Fri, 23 Jan 2009 00:51:25 +0000 (00:51 +0000)]
Move to having a caps flag.  Newer versions of the AT91 family don't
need the bouncing, so save a few copies in that case.  Also convert
4-bit code selection to using it.

15 years agoremove some useless #include,
luigi [Thu, 22 Jan 2009 23:25:28 +0000 (23:25 +0000)]
remove some useless #include,
document why timeconv.h is needed

MFC after: 3 days

15 years agoDon't over-commit the DMA. Use the passed in size of the transfer
imp [Thu, 22 Jan 2009 22:29:21 +0000 (22:29 +0000)]
Don't over-commit the DMA.  Use the passed in size of the transfer
rather than a fixed 512...  This fixes the mount root problem on at91.
Prior to the SD card reorg, all data transfers were 512 bytes, so we
didn't notice.

15 years agoMigrate towards using at91_master_clock. Initialize the clocks for
imp [Thu, 22 Jan 2009 21:56:41 +0000 (21:56 +0000)]
Migrate towards using at91_master_clock.  Initialize the clocks for
the serial port class when we set the devclass since it is now
no-longer a compile time constant.  Eliminate the pci include, as it
isn't relevant or necessary.

15 years agoUse at91_master_clock instead of AT91C_MASTER_CLOCK.
imp [Thu, 22 Jan 2009 21:55:37 +0000 (21:55 +0000)]
Use at91_master_clock instead of AT91C_MASTER_CLOCK.

15 years agoRemove now-redundant declaration.
imp [Thu, 22 Jan 2009 21:55:04 +0000 (21:55 +0000)]
Remove now-redundant declaration.

15 years agoStore at91_master_clock in a global variable as opposed to a compile
imp [Thu, 22 Jan 2009 21:54:26 +0000 (21:54 +0000)]
Store at91_master_clock in a global variable as opposed to a compile
time constant.  This allows us to potentially change it at runtime or
autodetect it early in the boot (the latter being much more likely to
have a good outcome).

15 years agoVIA Nano processor has a special MSR (CENT_HARDWARECTRL3) bit 32 to determine
jkim [Thu, 22 Jan 2009 21:04:46 +0000 (21:04 +0000)]
VIA Nano processor has a special MSR (CENT_HARDWARECTRL3) bit 32 to determine
whether TSC is P-state invariant or not.  In fact, this MSR is writable but
we just leave it at the BIOS default for now.

15 years agoInclude a missing header file.
jkim [Thu, 22 Jan 2009 20:29:07 +0000 (20:29 +0000)]
Include a missing header file.

Reported by: thompsa, "build universe"

15 years agoReplace couple of strcmp(cpu_vendor, "foo") with cpu_vendor_id for i386
jkim [Thu, 22 Jan 2009 17:06:33 +0000 (17:06 +0000)]
Replace couple of strcmp(cpu_vendor, "foo") with cpu_vendor_id for i386
and hide i386-specific code under #ifdef.

15 years agoAdd a comment explaining what ARM_KERN_DIRECTMAP is all about.
cognet [Thu, 22 Jan 2009 15:36:11 +0000 (15:36 +0000)]
Add a comment explaining what ARM_KERN_DIRECTMAP is all about.

Suggested by: raj

15 years agoFix a compile bogon. 'ppbus' is used by two different sets of debug code
jhb [Thu, 22 Jan 2009 15:35:54 +0000 (15:35 +0000)]
Fix a compile bogon.  'ppbus' is used by two different sets of debug code
in lptout().

Reported by: several

15 years agoMFV of tzdata2009a
edwin [Thu, 22 Jan 2009 11:24:42 +0000 (11:24 +0000)]
MFV of tzdata2009a

- Asia/Katmandu -> Asia/Kathmandu
- Fix historical references to DST in Switzerland
- Correct rules for America/Resolute (Nunavut)
- Cuba didn't have DST in 2005.

MFC after: 1 week

15 years agoAdd externs to fix build with VIMAGE_GLOBALS after r187289.
bz [Thu, 22 Jan 2009 10:29:09 +0000 (10:29 +0000)]
Add externs to fix build with VIMAGE_GLOBALS after r187289.

15 years agoDocument the "-U" option. While it is not part of the
trhodes [Thu, 22 Jan 2009 08:29:39 +0000 (08:29 +0000)]
Document the "-U" option.  While it is not part of the
getopt(), it is accepted through smb_ctx_init() in
lib/smb/ctx.c.

PR: 117013
Submitted by: Tom Evans <tevans.uk@googlemail.com> (original version)

15 years agoAdd support for multibyte thousands_sep encodings, e.g., U+066C.
das [Thu, 22 Jan 2009 08:14:28 +0000 (08:14 +0000)]
Add support for multibyte thousands_sep encodings, e.g., U+066C.
The integer thousands' separator code is rewritten in order to
avoid having to preallocate a buffer for the largest possible
digit string with the most possible instances of the longest
possible multibyte thousands' separator. The new version inserts
thousands' separators for integers using the same code as floating point.

15 years ago - Update my copyright.
jeff [Thu, 22 Jan 2009 06:21:30 +0000 (06:21 +0000)]
 - Update my copyright.
 - Print human readable time as a float with two digits of precision.  Use
   ns now as well since clock periods are well into the hundreds of
   picoseconds now.
 - Show the average duration in the stats frame.  This is often more useful
   than total duration.

15 years agoRename sc_is_pseudo to sc_nobulk member in ufoma_softc.
takawata [Thu, 22 Jan 2009 05:05:56 +0000 (05:05 +0000)]
Rename sc_is_pseudo to sc_nobulk member in ufoma_softc.
That was pseudo ucom because it used home brew tty interface.
Now, it is integrated to usb serial framework, so it is not pseudo
ucom any more.

15 years agoAdd locking to ppc and ppbus and mark the whole lot MPSAFE:
jhb [Wed, 21 Jan 2009 23:10:06 +0000 (23:10 +0000)]
Add locking to ppc and ppbus and mark the whole lot MPSAFE:
- To avoid having a bunch of locks that end up always getting acquired as
  a group, give each ppc(4) device a mutex which it shares with all the
  child devices including ppbus(4), lpt(4), plip(4), etc.  This mutex
  is then used for all the locking.
- Rework the interrupt handling stuff yet again.  Now ppbus drivers setup
  their interrupt handler during attach and tear it down during detach
  like most other drivers.  ppbus(4) only invokes the interrupt handler
  of the device that currently owns the bus (if any) when an interrupt
  occurs, however.  Also, interrupt handlers in general now accept their
  softc pointers as their argument rather than the device_t.  Another
  feature of the ppbus interrupt handlers is that they are called with
  the parent ppc device's lock already held.  This minimizes the number
  of lock operations during an interrupt.
- Mark plip(4), lpt(4), pcfclock(4), ppi(4), vpo(4) MPSAFE.
- lpbb(4) uses the ppc lock instead of Giant.
- Other plip(4) changes:
  - Add a mutex to protect the global tables in plip(4) and free them on
    module unload.
  - Add a detach routine.
  - Split out the init/stop code from the ioctl routine into separate
    functions.
- Other lpt(4) changes:
  - Use device_printf().
  - Use a dedicated callout for the lptout timer.
  - Allocate the I/O buffers at attach and detach rather than during
    open and close as this simplifies the locking at the cost of
    1024+32 bytes when the driver is attached.
- Other ppi(4) changes:
  - Use an sx lock to serialize open and close.
  - Remove unused HADBUS flag.
  - Add a detach routine.
  - Use a malloc'd buffer for each read and write to avoid races with
    concurrent read/write.
- Other pps(4) changes:
  - Use a callout rather than a callout handle with timeout().
  - Conform to the new ppbus requirements (regular mutex, non-filter
    interrupt handler).  pps(4) is probably going to have to become a
    standalone driver that doesn't use ppbus(4) to satisfy it's
    requirements for low latency as a result.
  - Use an sx lock to serialize open and close.
- Other vpo(4) changes:
  - Use the parent ppc device's lock to create the CAM sim instead of
    Giant.
- Other ppc(4) changes:
  - Fix ppc_isa's detach method to detach instead of calling attach.

Tested by:   no one :-(

15 years ago- Document targets run-depends-list and build-depends-list
tabthorpe [Wed, 21 Jan 2009 21:29:00 +0000 (21:29 +0000)]
- Document targets run-depends-list and build-depends-list

PR: docs/127575
Submitted by: Walter Venable <walt relnor.com>
Approved by: keramida
MFC after: 3 days

15 years agoAdd the dresden elektronik SensorTerminalBoard which uses an FT245.
joerg [Wed, 21 Jan 2009 20:57:28 +0000 (20:57 +0000)]
Add the dresden elektronik SensorTerminalBoard which uses an FT245.

15 years agoChange __FreeBSD_version to prepare for merging r184102.
jkim [Wed, 21 Jan 2009 20:44:42 +0000 (20:44 +0000)]
Change __FreeBSD_version to prepare for merging r184102.

15 years agoFix a few style bogons.
jhb [Wed, 21 Jan 2009 20:08:17 +0000 (20:08 +0000)]
Fix a few style bogons.

Submitted by: bde

15 years agoAdd Unicode rendering to the teken demo application.
ed [Wed, 21 Jan 2009 19:43:10 +0000 (19:43 +0000)]
Add Unicode rendering to the teken demo application.

Some time ago I tried adding Unicode rendering to the teken demo
application, but I didn't get it working. It seems I forgot to call
setlocale(). Polish this code and make sure it doesn't get lost.

Also a small fix for my previous commit: all Unicode characters in
teken_boxdrawing are below 0x10000, so store them as 16-bit values.

15 years agoDefault to normal bus timing mode on SD cards. In practice, most
imp [Wed, 21 Jan 2009 17:49:23 +0000 (17:49 +0000)]
Default to normal bus timing mode on SD cards.  In practice, most
cards people have today support high speed mode, so the timing field
would be initialized to bus_timing_hs, but there are some slow
cards...

15 years agoo The f_max is really at91_master_clock / 2, not 30MHz, so compute it as such.
imp [Wed, 21 Jan 2009 17:39:11 +0000 (17:39 +0000)]
o The f_max is really at91_master_clock / 2, not 30MHz, so compute it as such.
o Only set 4-bit caps on those boards that have 4-bit caps (this means that
  because we don't set wire4 yet, this forces us to always use 1-bit bus).
o Don't test wire4 when setting up the bus width, since bad things will
  happen if we do.

# This likely won't fix the busted at91 sd card support, but these are
# needful changes for correctness.

15 years agoFix minor style nit for file consistency.
imp [Wed, 21 Jan 2009 17:34:14 +0000 (17:34 +0000)]
Fix minor style nit for file consistency.

15 years agoMake the command reporting be under boot verbose.
imp [Wed, 21 Jan 2009 17:28:24 +0000 (17:28 +0000)]
Make the command reporting be under boot verbose.
Also, report a few other things under boot verbose.
Small style nit to make new code look like old code in this file.

15 years agoMove the code from ufs_lookup.c used to do dotdot lookup, into
kib [Wed, 21 Jan 2009 14:51:38 +0000 (14:51 +0000)]
Move the code from ufs_lookup.c used to do dotdot lookup, into
the helper function. It is supposed to be useful for any filesystem
that has to unlock dvp to walk to the ".." entry in lookup routine.

Requested by: jhb
Tested by: pho
MFC after: 1 month

15 years agoNow that vfs_markatime() no longer requires an exclusive lock due to
jhb [Wed, 21 Jan 2009 14:43:35 +0000 (14:43 +0000)]
Now that vfs_markatime() no longer requires an exclusive lock due to
the VOP_MARKATIME() changes, use a shared vnode lock for mmap().

Submitted by: ups

15 years agoMove the VA_MARKATIME flag for VOP_SETATTR() out into its own VOP:
jhb [Wed, 21 Jan 2009 14:42:00 +0000 (14:42 +0000)]
Move the VA_MARKATIME flag for VOP_SETATTR() out into its own VOP:
VOP_MARKATIME() since unlike the rest of VOP_SETATTR(), VA_MARKATIME
can be performed while holding a shared vnode lock (the same functionality
is done internally by VOP_READ which can run with a shared vnode lock).
Add missing locking of the vnode interlock to the ufs implementation and
remove a special note and test from the NFS client about not supporting the
feature.

Inspired by: ups
Tested by: pho

15 years agoFix copy/paste mistake in variable name. This could lead to using incorrect
mav [Wed, 21 Jan 2009 14:22:06 +0000 (14:22 +0000)]
Fix copy/paste mistake in variable name. This could lead to using incorrect
bus frequency.

15 years agoLatest bulletin C from Daniel GAMBIS: no leap at the end of june 2009.
phk [Wed, 21 Jan 2009 10:51:54 +0000 (10:51 +0000)]
Latest bulletin C from Daniel GAMBIS: no leap at the end of june 2009.

15 years agoMerge-from-Googlecode r419
kientzle [Wed, 21 Jan 2009 06:55:27 +0000 (06:55 +0000)]
Merge-from-Googlecode r419

In archive_write_disk:  If archive_write_header() fails to create
the file, that's a failure and should return ARCHIVE_FAILED.
Metadata restore failures still return ARCHIVE_WARN, because
that's non-critical.  Fix test_write_disk_secure test to
verify the correct return code in one case; add test_write_disk_failures
to do another very simple test of restore failure.

This should fix cpio coredumping when it tries to restore to
a write-protected directory.

Thanks to: Giorgos Keramidas
MFC after: 30 days

15 years agoAdd functions WITNESS so it can be asserted that the lock is not released for a
thompsa [Wed, 21 Jan 2009 04:19:18 +0000 (04:19 +0000)]
Add functions WITNESS so it can be asserted that the lock is not released for a
section of code, this uses WITNESS_NORELEASE() and WITNESS_RELEASEOK() to mark
the boundaries. Both functions require the lock to be held when calling.

This is intended for scenarios like a bus asserting that the bus lock is not
dropped during a driver call. There doesn't appear to be a man page to
document this in.

Reviewed by: jhb

15 years agocorrect typo that left programmed sifs time in the slot time
sam [Wed, 21 Jan 2009 02:53:00 +0000 (02:53 +0000)]
correct typo that left programmed sifs time in the slot time
(to be applied on subsequent resets)

Submitted by: Jiri Fojtasek <jiri.fojtasek@hlohovec.net>

15 years agoFix typo in comment
emax [Tue, 20 Jan 2009 23:25:27 +0000 (23:25 +0000)]
Fix typo in comment

Pointed out by: Daan Vreeken / Daan at vehosting dot nl

15 years agoRename option 'C' to 'D' (damaged) in order to avoid a conflict with upcoming
delphij [Tue, 20 Jan 2009 22:49:49 +0000 (22:49 +0000)]
Rename option 'C' to 'D' (damaged) in order to avoid a conflict with upcoming
Juniper 'C' (clean) flag.

Requested by: obrien
MFC after: 1 week

15 years agoCheck for infinite recursion possible on some broken PPTP/L2TP/... VPN setups.
mav [Tue, 20 Jan 2009 22:26:09 +0000 (22:26 +0000)]
Check for infinite recursion possible on some broken PPTP/L2TP/... VPN setups.
Mark packets with mbuf_tag on first interface passage and drop on second.

PR: ports/129625, ports/125303,
MFC after: 2 weeks

15 years agoUpdate (well, actually rewrite mostly) ng_ubt2 driver for USB2.
emax [Tue, 20 Jan 2009 22:17:05 +0000 (22:17 +0000)]
Update (well, actually rewrite mostly) ng_ubt2 driver for USB2.

Reviewed by: HPS, alfred
Blessed by: HPS

15 years agoThe r187467 should remove all pages for V_NORMAL case too, because
kib [Tue, 20 Jan 2009 22:00:19 +0000 (22:00 +0000)]
The r187467 should remove all pages for V_NORMAL case too, because
indirect block pages are not removed by the mentioned invocation of
the vnode_pager_setsize().

Put a common code into the helper function ffs_pages_remove().

Reported and tested by: dchagin
Reviewed by: ups
MFC after: 3 weeks

15 years agoDont assume $MACHINE is set, this breaks for regular builds.
thompsa [Tue, 20 Jan 2009 21:37:41 +0000 (21:37 +0000)]
Dont assume $MACHINE is set, this breaks for regular builds.

Reported by: pho

15 years ago- Add support for 8110SCe part. Some magic registers were taken from
jkim [Tue, 20 Jan 2009 20:22:28 +0000 (20:22 +0000)]
- Add support for 8110SCe part.  Some magic registers were taken from
Linux driver.
- Swap hardware revisions for 8110S and 8169S as Linux driver claims.

Reviewed by: yongari (early version)

15 years agoRetire RL_FLAG_INVMAR bit to match its comment and reality.
jkim [Tue, 20 Jan 2009 20:04:09 +0000 (20:04 +0000)]
Retire RL_FLAG_INVMAR bit to match its comment and reality.

15 years ago- Do not read and write RX configuration register multiple times.
jkim [Tue, 20 Jan 2009 19:58:01 +0000 (19:58 +0000)]
- Do not read and write RX configuration register multiple times.
- Always program RX configuration register from scratch instead of
doing read/modify/write.
- Rename re_setmulti() to re_set_rxmode() to be reflect reality.
- Simplify hash filter logic a little while I am here.

Reviewed by: yongari (early version)

15 years agoFix a number of (innocuous) warnings, and remove a useless test.
luigi [Tue, 20 Jan 2009 18:16:31 +0000 (18:16 +0000)]
Fix a number of (innocuous) warnings, and remove a useless test.
There are still several signed/unsigned warnings left, which
require a bit more study for a proper fix.

This file has grown beyond reasonable limits.

We really need to split it into separate components (ipv4, ipv6,
dummynet, nat, table, userland-kernel communication ...) so we can
make mainteinance easier.

MFC after: 1 weeks

15 years agoImplement MMCBR_IVAR_CAPS. It should better be implemented, or results
mav [Tue, 20 Jan 2009 17:36:58 +0000 (17:36 +0000)]
Implement MMCBR_IVAR_CAPS. It should better be implemented, or results
can be unpredictable.

PR: arm/128987

15 years agoRemove inlining of functions that are used mostly in different object files.
rdivacky [Tue, 20 Jan 2009 17:15:12 +0000 (17:15 +0000)]
Remove inlining of functions that are used mostly in different object files.
This gets rid of gnu89 style inlining. Also silence gcc by assigning two
variables NULL. This lets use to remove NO_WERROR.

Approved by: kib (mentor)
Approved by: harti

15 years agoAdd a comment explaining why the "bufwait" / "dirhash" LOR reported by
jhb [Tue, 20 Jan 2009 16:35:34 +0000 (16:35 +0000)]
Add a comment explaining why the "bufwait" / "dirhash" LOR reported by
WITNESS will not actually result in a deadlock.

Discussed with: kib
MFC after: 1 week