]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agooops commit the version that compiles
julian [Sun, 14 Sep 2008 08:24:45 +0000 (08:24 +0000)]
oops commit the version that compiles

15 years agoRevert a part of the MRT commit that proved un-needed.
julian [Sun, 14 Sep 2008 08:19:48 +0000 (08:19 +0000)]
Revert a part of the MRT commit that proved un-needed.
rt_check() in its original form proved to be sufficient and
rt_check_fib() can go away (as can its evil twin in_rt_check()).

I believe this does NOT address the crashes people have been seeing
in rt_check.

MFC after: 1 week

15 years agoMake the commet for the default rule number more clear.
rik [Sun, 14 Sep 2008 06:14:06 +0000 (06:14 +0000)]
Make the commet for the default rule number more clear.

Submitted by: yar@

15 years agoChoose a flag-handling strategy based on platform capabilities
kientzle [Sun, 14 Sep 2008 05:51:25 +0000 (05:51 +0000)]
Choose a flag-handling strategy based on platform capabilities
rather than on platform.

15 years agoClean up flags support just a tad: FreeBSD support depends on
kientzle [Sun, 14 Sep 2008 03:49:00 +0000 (03:49 +0000)]
Clean up flags support just a tad:  FreeBSD support depends on
HAVE_STRUCT_STAT_ST_FLAGS, Linux support depends on the
existence of the appropriate ioctl() options.  In particular,
this should fix some nagging compile errors on Linux platforms
that don't have e2fsprogs-devel installed.

15 years agoTest handling of restores relative to symlinks.
kientzle [Sun, 14 Sep 2008 02:16:04 +0000 (02:16 +0000)]
Test handling of restores relative to symlinks.
In particular:
  * tar -x -P follows symlinks to existing dirs, but not without -P
  * symlinks to files are always replaced
  * broken symlinks are always replaced

15 years agoInstead of building up a "struct nfs_args" to pass to the kernel
rodrigc [Sat, 13 Sep 2008 20:22:46 +0000 (20:22 +0000)]
Instead of building up a "struct nfs_args" to pass to the kernel
via nmount(), build up an iovec where each iovec member is an NFS mount
option, and pass the iovec down to the kernel via nmount().  These options
are then parsed in the kernel.
This should make it easier to add new NFS mount options in future.

Many, many thanks to Doug Rabson for taking my initial patches,
and cleaning them up.  In addition, Doug added a fallback_mount()
function so that the newer mount_nfs program will work against older
kernels, to facilitate upgrading/downgrading scenarios.
Doug also re-wrote the mount_nfs.8 man page.

Reviewed by: dfr

15 years agoTake a moment to tidy some white space while I'm here. No functional
imp [Sat, 13 Sep 2008 19:56:37 +0000 (19:56 +0000)]
Take a moment to tidy some white space while I'm here.  No functional
changes for this commit.

15 years agoWe don't need pax and tar. These days tar is a strict superset of
imp [Sat, 13 Sep 2008 19:54:15 +0000 (19:54 +0000)]
We don't need pax and tar.  These days tar is a strict superset of
pax.  Per discssuion on arch@ eliminate it.

15 years agoAdd code to parse NFS mount options passed as individual
rodrigc [Sat, 13 Sep 2008 18:57:47 +0000 (18:57 +0000)]
Add code to parse NFS mount options passed as individual
items of the nmount() iovec.  This will allow us to move
away from gathering up all the NFS mount options as a single
"struct nfs_args" to be passed down through nmount().
This will make adding new NFS mount options much easier.
Many, many thanks to Doug Rabson, who took my initial patches and
cleaned them up.

Reviewed by: dfr
MFC after: 3 months

15 years agoFix TELOPT(opt) when opt > TELOPT_TN3270E.
antoine [Sat, 13 Sep 2008 17:46:50 +0000 (17:46 +0000)]
Fix TELOPT(opt) when opt > TELOPT_TN3270E.

PR: 127194
Submitted by: Joost Bekkers
MFC after: 1 month

15 years agoAllow PAGE_SHIFT to already be defined.
thompsa [Sat, 13 Sep 2008 17:34:18 +0000 (17:34 +0000)]
Allow PAGE_SHIFT to already be defined.

Submitted by: Hans Petter Selasky

15 years agoAdd files to remove when WITHOUT_HESIOD is set.
antoine [Sat, 13 Sep 2008 17:29:49 +0000 (17:29 +0000)]
Add files to remove when WITHOUT_HESIOD is set.
This fixes "make check-old" when WITH_HESIOD is set.

PR: 122406
MFC after: 1 month

15 years agoImplement IPv6 support for TCP MD5 Signature Option (RFC 2385)
bz [Sat, 13 Sep 2008 17:26:46 +0000 (17:26 +0000)]
Implement IPv6 support for TCP MD5 Signature Option (RFC 2385)
the same way it has been implemented for IPv4.

Reviewed by: bms (skimmed)
Tested by: Nick Hilliard (nick netability.ie) (with more changes)
MFC after: 2 months

15 years agoUpdate man page according to r182999 snd_hda driver update.
mav [Sat, 13 Sep 2008 17:01:38 +0000 (17:01 +0000)]
Update man page according to r182999 snd_hda driver update.

15 years agoMy massive snd_hda driver update.
mav [Sat, 13 Sep 2008 16:56:03 +0000 (16:56 +0000)]
My massive snd_hda driver update.

Because of using more clear and same time more functional codec parser
new driver is able to handle more codecs, use them better then before and
without most of previous quirks. All of tested codecs itself manage playback,
record, input mixing and monitoring quite fine. In all of investigated
trouble cases problem was found or in nonstandard codec usage or incorrect
codec configuration made by BIOS. Most of that cases could be fixed using
device hints, some of which are already included to the driver.

New driver supports multiple codecs per HDA bus, multiple audio function
groups per codec and multiple logical sound devices per audio function group.
So don't worry when you get several PCM devices instead of one, it is normal.
It is usual situation with powerful codecs to provide, for example, 3 PCM
devices: one for 7.1 playback and main recording, one for headset and one
for digital SPDIF I/O.

New driver implements Universal Audio Architecture (UAA) much better then
previous one. Most information about recommended codec usage now taken from
the codec configuration registers initialized by BIOS. User may alter that
configuration using device hints to reconfigure logical audio devices to
his needs in a very broad range up to the limits of the codec functionality.

New driver supports digital PCM playback and AC3 pass-through. I am not sure
about completeness of this implementation, but I have several success stories
including my own. Vchans subsystem does not support AC3 pass-through so it
had to be disabled for that devices at this moment.

New driver is ready for multichannel playback, but until our OSS is unable
to use this it will just duplicate same stereo stream into all channel
pairs.

New driver supports suspend/resume. I am unable to really test this part
myself, but I have got several success stories.

Driver has very informative verbose boot messages. So if you have any
questions or problems - enable and read them first.

Discussed on: freebsd-multimedia@
Tested by: many

15 years agoTurn on TCP_SIGNATURE for LINT builds. This should catch situations
bz [Sat, 13 Sep 2008 14:06:36 +0000 (14:06 +0000)]
Turn on TCP_SIGNATURE for LINT builds. This should catch situations
we ran into in the past where places hidden by TCP_SIGNATURE were
missed.

It is possible to turn it on now that FAST_IPSEC (now know as IPSEC)
is enabled for LINT and the default and only IPsec implementation.

15 years agoWe can't implicitly trust the hook on NGQF_FN/NGQF_FN2 processing in
mav [Sat, 13 Sep 2008 09:17:02 +0000 (09:17 +0000)]
We can't implicitly trust the hook on NGQF_FN/NGQF_FN2 processing in
ng_apply_item(). There are possible (and I have got one) use-after-free
class panics because of it.

If hook is specified, require it to be valid at the apply time. The only
exceptions are the internal ng_con_part2(), ng_con_part3() and
ng_rmhook_part2() functions which are specially made to work with invalid
hooks.

15 years ago- For any lock list we hold the head in order to reduce allocation from
attilio [Fri, 12 Sep 2008 21:44:01 +0000 (21:44 +0000)]
- For any lock list we hold the head in order to reduce allocation from
  the free list and in this way avoid contention on the w_mtx.
  In order to make the code simple, we rely on the rule that when the head
  has not a child it also doesn't have other subsequent entries.
  Actually this assertion is broken because we can free all the head
  children and quit witness_unlock() with the head still allocated, with no
  children and subsequent entries present.
  Fix this by shifting the head if other entries are present and still
  freeing the object, but leaving always an head.
- Fix witness_thread_has_locks() in order to report, correctly, if the
  lock list linked to a specific thread has children or not based on the
  above explained rule.
- Fix a printout into DDB's "show alllocks" command in order to show,
  correctly, the process name that is really what we want.
- Fix style(9) for a comment.

Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
Reported by: Marko Kiiskila <marko dot kiiskila at nokia dot com>
Sponsored by: Nokia

15 years agoDon't issue CDC request before negotiate the interface role.
takawata [Fri, 12 Sep 2008 20:34:12 +0000 (20:34 +0000)]
Don't issue CDC request before negotiate the interface role.

15 years agoWhitespace cleanup.
emaste [Fri, 12 Sep 2008 18:15:12 +0000 (18:15 +0000)]
Whitespace cleanup.

15 years agoDisplay the sum of the runtime of all the threads in a process when it's
sepotvin [Fri, 12 Sep 2008 17:54:50 +0000 (17:54 +0000)]
Display the sum of the runtime of all the threads in a process when it's
multithreaded instead of picking the time of the first thread found.

Reviewed by: jhb
Approved by: kan (mentor)
MFC after: 1 month

15 years agoMake mlxcontrol work with more than one system drive:
sepotvin [Fri, 12 Sep 2008 17:40:17 +0000 (17:40 +0000)]
Make mlxcontrol work with more than one system drive:
- When searching for the next system drive, return the next one instead
  of always returning the first one.
- Plug fd lead and make sure that the MLX_NEXT_CHILD ioctl is called
  on the controller fd, not the disk's one.

While there, fix a cut-n-pase error in a warning.

Reviewed by: jhb
Approved by: kan (mentor)
MFC after: 1 month

15 years agoUse the parent device's DMA tag when creating our own DMA tags. This fixes
jhb [Fri, 12 Sep 2008 14:41:53 +0000 (14:41 +0000)]
Use the parent device's DMA tag when creating our own DMA tags.  This fixes
a panic on sparc64.

Reviewed by: Florian Smeets  flo kasimir.com

15 years agoRemove unneeded comma.
kib [Fri, 12 Sep 2008 13:04:39 +0000 (13:04 +0000)]
Remove unneeded comma.

Noted by: kensmith

15 years agoWhen doing rfork(0), i.e. separating curproc VM from any other user of
kib [Fri, 12 Sep 2008 09:53:29 +0000 (09:53 +0000)]
When doing rfork(0), i.e. separating curproc VM from any other user of
the same vmspace, decrement the reference count of the shared LDT instead
of a newly-made copy. Code factually removed LDT from the process that
did rfork(0).

Introduce user_ldt_deref() function that does decrement of refcount for
the struct proc_ldt, and call it in the rfork(0) case on the shared LDT.

Reviewed by: jhb
MFC after: 1 week

15 years agoThe user_ldt_alloc() function shall return with dt_lock locked.
kib [Fri, 12 Sep 2008 09:51:11 +0000 (09:51 +0000)]
The user_ldt_alloc() function shall return with dt_lock locked.
The user_ldt_free() function shall return with dt_lock unlocked.
Error handling code in both functions do not handle this, fix it by
doing necessary lock/unlock.

While there, fix minor style nits.

MFC after: 1 week

15 years agoRemove warning about static LDT segment allocation. Applications
kib [Fri, 12 Sep 2008 09:49:01 +0000 (09:49 +0000)]
Remove warning about static LDT segment allocation. Applications
continue using it after ~7 years since warning was introduced, and there
is no reason to discourage them.

MFC after: 1 week

15 years agoPortability: Don't use symbolic constants when the values are more
kientzle [Fri, 12 Sep 2008 05:33:00 +0000 (05:33 +0000)]
Portability: Don't use symbolic constants when the values are more
standard than the names are.  Remove some trailing whitespace.

15 years agoPortability: Not everyone is lucky enough to have ftruncate()
kientzle [Fri, 12 Sep 2008 04:08:11 +0000 (04:08 +0000)]
Portability: Not everyone is lucky enough to have ftruncate()

15 years agoPortability: Support platforms that lack (struct stat).st_blksize or SSIZE_MAX
kientzle [Fri, 12 Sep 2008 04:03:34 +0000 (04:03 +0000)]
Portability:  Support platforms that lack (struct stat).st_blksize or SSIZE_MAX
Of course, FreeBSD has both.

15 years agoWindows compatibility: The stub replacement for compression_program
kientzle [Fri, 12 Sep 2008 03:53:54 +0000 (03:53 +0000)]
Windows compatibility:  The stub replacement for compression_program
(which always returns an error when invoked) needs its prototype.

15 years agoConnect ufoma(4) to build and,
takawata [Fri, 12 Sep 2008 03:45:08 +0000 (03:45 +0000)]
Connect ufoma(4) to build and,
disable handsfree interface that is not yet ported to newtty.

15 years agoSweep this man page a bit:
danger [Thu, 11 Sep 2008 22:11:41 +0000 (22:11 +0000)]
Sweep this man page a bit:
- new sentence = new line
- use .Dq macro to quote words
- some minor rewording

MFC after: 2 weeks

15 years agoAdd a 'hw.pci.mcfg' tunable. It can be set to 0 to disable memory-mapped
jhb [Thu, 11 Sep 2008 21:42:11 +0000 (21:42 +0000)]
Add a 'hw.pci.mcfg' tunable.  It can be set to 0 to disable memory-mapped
PCI config access.

15 years agoBandaid: disable interrupts to make sure intr_enabled and the IER register
cognet [Thu, 11 Sep 2008 20:43:38 +0000 (20:43 +0000)]
Bandaid: disable interrupts to make sure intr_enabled and the IER register
are in sync. I'm not sure why it is needed, and why it wouldn't be on other
arm platforms, but it prevents a lockup under heavy I/O.

15 years agoRemove the unused field "pc_prvspace" from the MD fields for the struct
cognet [Thu, 11 Sep 2008 20:39:46 +0000 (20:39 +0000)]
Remove the unused field "pc_prvspace" from the MD fields for the struct
pcpu. There's not even a thing such as a "struct pcup".
While I'm there, remove a comment that makes no sense for arm.

Spotted out by: Mark Tinguely

15 years agoMakefile.inc already defines OPENSSL if crypto is available/wanted.
roberto [Thu, 11 Sep 2008 20:32:06 +0000 (20:32 +0000)]
Makefile.inc already defines OPENSSL if crypto is available/wanted.

PR: bin/127296
Submitted by: oliver
MFC after: 3 days

15 years agoFix two small typo's in comments in the nullfs vnops code.
ed [Thu, 11 Sep 2008 20:15:34 +0000 (20:15 +0000)]
Fix two small typo's in comments in the nullfs vnops code.

Submitted by: Jille Timmermans <jille quis cx>

15 years agoUpdate the comments above the 0xcf9 register reset attempt to match the
jhb [Thu, 11 Sep 2008 18:33:57 +0000 (18:33 +0000)]
Update the comments above the 0xcf9 register reset attempt to match the
code.  We only attempt a single reset using this method (a "hard" reset),
and we use two writes to ensure there is a 0 -> 1 transition in bit 2 to
force a reset.

MFC after: 1 week

15 years agoThe ERESTART to EINTR conversion is already done in
rdivacky [Thu, 11 Sep 2008 15:28:28 +0000 (15:28 +0000)]
The ERESTART to EINTR conversion is already done in
kern_select so there is no need to repeat it in
linux_select().

Submitted by: Dmitry Chagin <dchagin@>
MFC after: 1 week
Approved by: kib (mentor)

15 years agoARM nexus style(9) improvements.
raj [Thu, 11 Sep 2008 12:39:54 +0000 (12:39 +0000)]
ARM nexus style(9) improvements.

15 years agoARM interrupts improvements.
raj [Thu, 11 Sep 2008 12:36:13 +0000 (12:36 +0000)]
ARM interrupts improvements.

- Fix nexus_setup_intr() abuse of setting up multiple IRQs in one go. Calling
  arm_setup_irqhandler() in loop is bogus, as there's just one cookie given
  from the caller and it is overwritten in each iteration so that only the
  last handler's cookie value prevails.

- Proper intr masking/unmasking handling: the IRQ source is masked at PIC level
  only after the last handler has been removed from the list.

Reviewed by: cognet, imp, sam, stass
Obtained from: Grzegorz Bernacki gjb ! semihalf dot com

15 years agoIXP425: split handling of the two QMGR interrupts so they are separately
raj [Thu, 11 Sep 2008 12:17:21 +0000 (12:17 +0000)]
IXP425: split handling of the two QMGR interrupts so they are separately
managed. Adjust ixpqmgr_{attach,detach} to comply with device_* interface.

Reviewed by: cognet, imp, sam, stass
Tested by: cognet

15 years agoDocument dev_clone eventhandler interface
kib [Thu, 11 Sep 2008 11:43:47 +0000 (11:43 +0000)]
Document dev_clone eventhandler interface

15 years agoAdd a first draft of the cdevpriv(9) documentation
kib [Thu, 11 Sep 2008 11:41:33 +0000 (11:41 +0000)]
Add a first draft of the cdevpriv(9) documentation

15 years agoDocument make_dev_credf(9), destroy_dev_sched(9) and destroy_dev_drain(9)
kib [Thu, 11 Sep 2008 11:38:48 +0000 (11:38 +0000)]
Document make_dev_credf(9), destroy_dev_sched(9) and destroy_dev_drain(9)
functions.

Reviewed by: brueffer

15 years agoUpdate insmntque(9) manpage, bringing it close to reality.
kib [Thu, 11 Sep 2008 11:36:21 +0000 (11:36 +0000)]
Update insmntque(9) manpage, bringing it close to reality.

Reviewed by: brueffer

15 years agoFix the device name spacing.
adrian [Thu, 11 Sep 2008 09:55:54 +0000 (09:55 +0000)]
Fix the device name spacing.

The old logic padded the device name out but assumed the unit number was one digit
long; this fails for things like SATA devices which (for me) begin at ad10.

Assemble the full device name in a temporary buffer and then calcluate padding
based on that string.

15 years agoRevert r177108 and restore r60506 for sparc64 as long as libstand
marius [Wed, 10 Sep 2008 20:53:22 +0000 (20:53 +0000)]
Revert r177108 and restore r60506 for sparc64 as long as libstand
isn't fixed to only open the network device once and not do a open
and close dance on every file access; the firmwares of newer sparc64
machines perform an auto-negotiation with every open which in turn
causes netbooting to take horribly long if we open and close the
device over and over again.

15 years agoAdd drivers for the power management devices found on Fireplane/
marius [Wed, 10 Sep 2008 20:22:27 +0000 (20:22 +0000)]
Add drivers for the power management devices found on Fireplane/
Safari- and JBus-based machines. Currently the main purpose of
these drivers is debugging of the resource allocation on nexus(4)
and the register content of these devices though.

15 years agoMake sure the TTY has not disappeared out from under us before calling
csjp [Wed, 10 Sep 2008 20:12:10 +0000 (20:12 +0000)]
Make sure the TTY has not disappeared out from under us before calling
ttydevsw_outwakeup().  This should fix panics which occur after remote
login sessions timeout during moderate TTY activity.  An example of
where this might occur is where a pending write to the terminal is
occurring while sshd(8) is shutting down the TTY after a TCP timeout.

Submitted by: ed

15 years agoWork around Cheetah+ erratum 34 (USIII+ erratum #10) by relocating
marius [Wed, 10 Sep 2008 20:07:08 +0000 (20:07 +0000)]
Work around Cheetah+ erratum 34 (USIII+ erratum #10) by relocating
the locked entry in it16 slot 0, which typically is occupied by the
PROM, and manually entering locked entries in slots != 0.

Thanks to Hubert Feyrer for donating the Blade 2000 this change was
developed on.

15 years agomld_timerresid() returns ms so instead of doing the maths in usec
bz [Wed, 10 Sep 2008 19:42:13 +0000 (19:42 +0000)]
mld_timerresid() returns ms so instead of doing the maths in usec
and then dividing down to ms, do the maths in ms.

Obtained from: NetBSD mld6.c rev. 1.47
MFC after: 2 months

15 years agoTeach WITNESS about the interlocks used with lockmgr. This removes a bunch
jhb [Wed, 10 Sep 2008 19:13:30 +0000 (19:13 +0000)]
Teach WITNESS about the interlocks used with lockmgr.  This removes a bunch
of spurious witness warnings since lockmgr grew witness support.  Before
this, every time you passed an interlock to a lockmgr lock WITNESS treated
it as a LOR.

Reviewed by: attilio

15 years agoDisable the inline assembly crc32 routine and use the C version instead.
jhb [Wed, 10 Sep 2008 18:42:19 +0000 (18:42 +0000)]
Disable the inline assembly crc32 routine and use the C version instead.
The assembly version is reported to be broken on 5.x+.

PR: kern/100425
Submitted by: Rashid N. Achilov  shelton www.granch.ru
MFC after: 1 week

15 years agoResurrect the sbni(4) driver. Someone finally tested the MPSAFE patches and
jhb [Wed, 10 Sep 2008 18:36:58 +0000 (18:36 +0000)]
Resurrect the sbni(4) driver.  Someone finally tested the MPSAFE patches and
the driver worked ok with them.

Tested by: friends of yar

15 years agoBeginning of overhaul of fwcontrol:
sbruno [Wed, 10 Sep 2008 18:09:52 +0000 (18:09 +0000)]
Beginning of overhaul of fwcontrol:
-  Documentation of send_phy_config()
-  cleanup of malloc's() and added error checking throughout
-  new capability to iterate over multiple firewire buses
-  update usage() display
-  cleanup command line parsing to allow out of order switches
-  cleanup command line parsing to allow multiple switches per invocation
-  cleanup grammar of man page a bit
-  add some ranges to the man page to indicate what values are valid

Since fwcontrol's code is the same across 6/7/head this can be
applied to all branches after the MFC period.

Reviewed by: Dieter freebsd@sopwith.solgatos.com
Approved by: mentor Scott scottl@samsco.org
MFC after: 60 days

15 years agoSome K8 chipsets don't expose all of the PCI devices on bus 0 via PCIe
jhb [Wed, 10 Sep 2008 18:06:08 +0000 (18:06 +0000)]
Some K8 chipsets don't expose all of the PCI devices on bus 0 via PCIe
memory-mapped config access.  Add a workaround for these systems by
checking the first function of each slot on bus 0 using both the
memory-mapped config access and the older type 1 I/O port config access.
If we find a slot that is only visible via the type 1 I/O port config
access, we flag that slot.  Future PCI config transactions to flagged
slots on bus 0 use type 1 I/O port config access rather than memory mapped
config access.

15 years agoVarious whitespace fixes.
jhb [Wed, 10 Sep 2008 17:59:21 +0000 (17:59 +0000)]
Various whitespace fixes.

15 years agoAdd a proper detach method to the est(4) driver using cpufreq_unregister().
jhb [Wed, 10 Sep 2008 17:41:41 +0000 (17:41 +0000)]
Add a proper detach method to the est(4) driver using cpufreq_unregister().

MFC after: 1 week

15 years agoIf arm.h is going to define WCHAR_TYPE, don't assume WCHAR_TYPE_SIZE
obrien [Wed, 10 Sep 2008 15:47:31 +0000 (15:47 +0000)]
If arm.h is going to define WCHAR_TYPE, don't assume WCHAR_TYPE_SIZE
doesn't already have a definition.

Reported by: imp

15 years agoUse PAGE_{SIZE,MASK,SHIFT} from machine/param.h rather than hard-coding
jasone [Wed, 10 Sep 2008 14:27:34 +0000 (14:27 +0000)]
Use PAGE_{SIZE,MASK,SHIFT} from machine/param.h rather than hard-coding
page size and using sysconf(3).

Suggested by: marcel

15 years agoRemove VSVTX, VSGID and VSUID. This should be a no-op,
trasz [Wed, 10 Sep 2008 13:16:41 +0000 (13:16 +0000)]
Remove VSVTX, VSGID and VSUID.  This should be a no-op,
as VSVTX == S_ISVTX, VSGID == S_ISGID and VSUID == S_ISUID.

Approved by: rwatson (mentor)

15 years agoAdd a missing break statement; IFDATA_LINKSPECIFIC would fall through
bms [Wed, 10 Sep 2008 13:08:37 +0000 (13:08 +0000)]
Add a missing break statement; IFDATA_LINKSPECIFIC would fall through
to IFDATA_DRIVERNAME otherwise.

Reviewed by: brooks
MFC after: 1 week

15 years agoo Correct a comment: a test file size is a four pages not three.
maxim [Wed, 10 Sep 2008 09:32:25 +0000 (09:32 +0000)]
o Correct a comment: a test file size is a four pages not three.

15 years agoGet initial bootstrap of APs working under xen.
kmacy [Wed, 10 Sep 2008 07:11:08 +0000 (07:11 +0000)]
Get initial bootstrap of APs working under xen.
Note that the APs still blow up in sched_throw().

MFC after: 1 month

15 years ago Fix path in all includes: remove /mips32 subdirectory
gonzo [Wed, 10 Sep 2008 03:49:08 +0000 (03:49 +0000)]
  Fix path in all includes: remove /mips32 subdirectory

15 years agorename flags and add a ZYD_FLAG_DETACHING flag to indicate we're
weongyo [Wed, 10 Sep 2008 03:40:51 +0000 (03:40 +0000)]
rename flags and add a ZYD_FLAG_DETACHING flag to indicate we're
detaching that when the USB is pulled out forcibly during the driver is
running background scan, a page fault can be occurred even if we called
usb_rem_task() when detaching.  It looks like a kind of races.

15 years ago- Fix regression with GETMEM
kmacy [Wed, 10 Sep 2008 01:10:17 +0000 (01:10 +0000)]
- Fix regression with GETMEM
- Remove gratuitous bswap macros
- check for rev 3 with t3b

Obtained from: Chelsio Inc.
MFC after: 3 days

15 years agoAllow building k8temp on i386.
rpaulo [Tue, 9 Sep 2008 22:37:29 +0000 (22:37 +0000)]
Allow building k8temp on i386.

MFC after: 1 week

15 years agoBuild k8temp on i386.
rpaulo [Tue, 9 Sep 2008 22:32:30 +0000 (22:32 +0000)]
Build k8temp on i386.

15 years agoAdd support for the CyberPower CP1500AVRLCD.
remko [Tue, 9 Sep 2008 19:59:51 +0000 (19:59 +0000)]
Add support for the CyberPower CP1500AVRLCD.

PR: 126845
Submitted by: gavin
Approved by: imp (mentor, implicit)
MFC after: 1 week

15 years agoAdd support to rc.initdiskless for /conf/T/M/remount_subdir.
bms [Tue, 9 Sep 2008 18:40:50 +0000 (18:40 +0000)]
Add support to rc.initdiskless for /conf/T/M/remount_subdir.
This allows the location of the configuration data to be relocated
within the filesystem containing it. A nullfs mount is used in order
to achieve this.

Obtained from: XORP, Inc.

15 years agoMove call to _malloc_thread_cleanup() so that if this is the last thread,
jasone [Tue, 9 Sep 2008 17:14:32 +0000 (17:14 +0000)]
Move call to _malloc_thread_cleanup() so that if this is the last thread,
the call never happens.  This is necessary because malloc may be used
during exit handler processing.

Submitted by: davidxu

15 years agoUpdate for new HAL.
rpaulo [Tue, 9 Sep 2008 16:21:25 +0000 (16:21 +0000)]
Update for new HAL.

Reviewed by: sam

15 years agoGetdents requires padding with 2 bytes instead of 1 byte
rdivacky [Tue, 9 Sep 2008 16:00:17 +0000 (16:00 +0000)]
Getdents requires padding with 2 bytes instead of 1 byte
as with getdents64. The last byte is used for storing
the d_type, add this to plain getdents case where it was
missing before. Also change the code to use strlcpy instead
of plain strcpy. This changes fix the getdents crash we
had reports about (hl2 server etc.)

PR: kern/117010
MFC after: 1 week
Submitted by: Dmitry Chagin (dchagin@)
Tested by: MITA Yoshio <mita ee.t.u-tokyo.ac jp>
Approved by: kib (mentor)

15 years agoInitialise the SVCAUTH field for new transport structures when they are
dfr [Tue, 9 Sep 2008 14:15:55 +0000 (14:15 +0000)]
Initialise the SVCAUTH field for new transport structures when they are
allocated instead of waiting for the first request. This fixes an issue with
rpcbind's support for PMAPPROC_CALLIT.

Reviewed by: markm

15 years agoRemove superfluous copyin() of args, structures are already in kernel space.
kib [Tue, 9 Sep 2008 13:01:14 +0000 (13:01 +0000)]
Remove superfluous copyin() of args, structures are already in kernel space.

Submitted by: dchagin
MFC after: 1 week

15 years agoRemove redundant close(2).
trasz [Tue, 9 Sep 2008 12:31:42 +0000 (12:31 +0000)]
Remove redundant close(2).

Submitted by: kensmith
Approved by: rwatson (mentor)

15 years agoAdd workaround for CRC errors seen at 100Mbps on JMC250 A2.
yongari [Tue, 9 Sep 2008 10:19:48 +0000 (10:19 +0000)]
Add workaround for CRC errors seen at 100Mbps on JMC250 A2.
While here update chip revision number of JMC250/JMC260 from the
latest datasheet.

15 years agoFix typo.
yongari [Tue, 9 Sep 2008 10:10:03 +0000 (10:10 +0000)]
Fix typo.

15 years agoReturn two fixes from previous backout which does not require
ache [Tue, 9 Sep 2008 09:46:36 +0000 (09:46 +0000)]
Return two fixes from previous backout which does not require
review by secteam@ for the reasons mentioned below.

1) Rename /dev/urandom to /dev/random since urandom marked as
XXX Deprecated
alias in /sys/dev/random/randomdev.c
(this is our naming convention and no review by secteam@ required)

2) Set rs_stired flag after forced initialization to prevent
double stearing.
(this is already in OpenBSD, i.e. they don't have double stearing.
It means that this change matches their code path and no additional
secteam@ review required)

Submitted by:   Thorsten Glaser <tg@mirbsd.de> (2)

15 years agoWork around an integer division resulting in 0 and thus the
bz [Tue, 9 Sep 2008 07:35:21 +0000 (07:35 +0000)]
Work around an integer division resulting in 0 and thus the
congestion window not being incremented, if cwnd > maxseg^2.
As suggested in RFC2581 increment the cwnd by 1 in this case.

See http://caia.swin.edu.au/reports/080829A/CAIA-TR-080829A.pdf
for more details.

Submitted by: Alana Huebner, Lawrence Stewart,
Grenville Armitage (caia.swin.edu.au)
Reviewed by: dwmalone, gnn, rpaulo
MFC After: 3 days

15 years agoIGP based radeon cards such as the rs485 and rs690 require that the GART table
rnoland [Tue, 9 Sep 2008 02:18:37 +0000 (02:18 +0000)]
IGP based radeon cards such as the rs485 and rs690 require that the GART table
be un-cached.  Our previous memory barrier was not sufficient.  This patch
allocates the IGP GART tables using the BUS_DMA_NOCACHE flag to get these
cards working.

Approved by: kib

15 years agoWe should never call drm_pci_alloc() while holding locks, due the the
rnoland [Tue, 9 Sep 2008 02:05:03 +0000 (02:05 +0000)]
We should never call drm_pci_alloc() while holding locks, due the the
calls to bus_dma.  There were multiple paths that held different locks or
no locks at all. This patch ensures that all of the calling paths drop
their lock(s) before calling drm_pci_alloc().

Reviewed by: kib

15 years agoFix issue with recovering from transient jumbo mbuf shortage.
kmacy [Tue, 9 Sep 2008 01:36:02 +0000 (01:36 +0000)]
Fix issue with recovering from transient jumbo mbuf shortage.

Submitted by: Chelsio Inc.
MFC after: 3 days

15 years agoDocument TAPGIFNAME, TAPSIFINFO and TAPGIFINFO tap(4)
emax [Mon, 8 Sep 2008 22:44:51 +0000 (22:44 +0000)]
Document TAPGIFNAME, TAPSIFINFO and TAPGIFINFO tap(4)
character device ioctl's.

MFC after: 1 week

15 years agoAdd new TAPGIFNAME tap(4) character device ioctl. This is a
emax [Mon, 8 Sep 2008 22:43:55 +0000 (22:43 +0000)]
Add new TAPGIFNAME tap(4) character device ioctl. This is a
convenient shortcut to obtain network interface name using
file descriptor for character device.

Obtained from: NetBSD
MFC after: 1 week

15 years ago- Reduce scope of #ifdef's in uma_zcreate() call in init_turnstile0().
jhb [Mon, 8 Sep 2008 21:40:15 +0000 (21:40 +0000)]
- Reduce scope of #ifdef's in uma_zcreate() call in init_turnstile0().
- Set UMA_ZONE_NOFREE so that the per-turnstile spin locks are type stable
  to avoid a race where one thread might dereference a lock in a free'd
  turnstile that was previously used by another thread.

Theorized by: tegge (2)
MFC after: 1 week

15 years agoFor cheetah-class CPUs ensure that the dt512_0 is set to hold 8k pages
marius [Mon, 8 Sep 2008 21:24:25 +0000 (21:24 +0000)]
For cheetah-class CPUs ensure that the dt512_0 is set to hold 8k pages
for all three contexts and configure the dt512_1 to hold 4MB pages for
them (e.g. for direct mappings).
This might allow for additional optimization by using the faulting
page sizes provided by AA_DMMU_TAG_ACCESS_EXT for bypassing the page
size walker for the dt512 in the superpage support code.

Submitted by: nwhitehorn (initial patch)

15 years agoUSIII and beyond CPUs have stricter requirements when it comes
marius [Mon, 8 Sep 2008 20:38:48 +0000 (20:38 +0000)]
USIII and beyond CPUs have stricter requirements when it comes
to synchronization needed after stores to internal ASIs in order
to make side-effects visible. This mainly requires the MEMBAR #Sync
after such stores to be replaced with a FLUSH. We use KERNBASE as
the address to FLUSH as it is guaranteed to not trap. Actually,
the USII synchronization rules also already require a FLUSH in
pretty much all of the cases changed.
We're also hitting an additional USIII synchronization rule which
requires stores to AA_IMMU_SFSR to be immediately followed by a DONE,
FLUSH or RETRY. Doing so triggers a RED state exception though so
leave the MEMBAR #Sync. Linux apparently also has gotten away with
doing the same for quite some time now, apart from the fact that
it's not clear to me why we need to clear the valid bit from the
SFSR in the first place.

Reviewed by: nwhitehorn

15 years agoo Move the MODULE_DEPEND() for cam(4) from the esp_sbus.c front-end to
marius [Mon, 8 Sep 2008 20:20:44 +0000 (20:20 +0000)]
o Move the MODULE_DEPEND() for cam(4) from the esp_sbus.c front-end to
  the ncr53c9x.c core where it actually belongs so future front-ends
  don't need to add it.
o Use the correct OFW property when looking for the initiator ID of the
  SBus device.
o Don't specify an alignment when creating the parent DMA tag for
  SUNW,fas; their DMA engine doesn't require an alignment constraint
  and it's no inherited by the child DMA tags anyway (which probably
  is a bug though).
o Drop the superfluous sc_maxsync and use sc_minsync instead. The
  former apparently was added due to a confusion with the maximum
  frequency used in cam(4), which basically corresponds to the
  inverse of minimum sync period.
o Merge ncr53c9x.c from NetBSD:
  1.116: NCRDMA_SETUP() should be called before NCR_SET_COUNT() and
         NCRCMD_DMA command in ncr53c9x_select().
  1.125: free allocated resources on detach.
o Static'ize ncr53c9x_action(), ncr53c9x_init() and ncr53c9x_reset()
  as these are not required outside of ncr53c9x.c.
o In ncr53c9x_attach() don't leak the device mutex in case attaching
  fails.
o Register an asynchronous notification handler so in case cam(4)
  reports a lost device we can cancel outstanding commands and
  restore the default parameters for the target in question.
o For FAS366 correctly support 16-bit target IDs and let it know
  that we use 32-bit transfers.
o Overhaul the negotiation of transfer settings. This includes
  distinguishing between current and goal transfer settings of the
  target so we can renegotiate their goal settings when necessary
  and correcting the order in which tagged, wide and synchronous
  transfers are negotiated.
o If we are requesting sense, force a renegotiation if we are
  currently using anything different from asynchronous at 8 bit
  as the target might have lost our transfer negotiations.
o In case of an XPT_RESET_BUS just directly call ncr53c9x_init()
  instead of issuing a NCRCMD_RSTSCSI, which in turn will issue an
  interrupt that is treated as an unexpected SCSI bus reset by
  ncr53c9x_intr() and thus calls ncr53c9x_init(). Remove the now
  no longer used ncr53c9x_scsi_reset().
o Correct an off-by-one error when setting cpi->max_lun.
o In replace printf(9) with device_printf(9) calls where appropriate
  and in ncr53c9x_action() remove some unnecessarily verbose messages.
o In ncr53c9x_sched() use TAILQ_FOREACH() instead of reimplementing
  it and consolidate two tagging-related target info checks into one.
o In ncr53c9x_done() set the CAM status to CAM_SCSI_STATUS_ERROR when
  appropriate, respect CAM_DIS_AUTOSENSE and teach it to return SCSI
  status information.
o In ncr53c9x_dequeue() ensure the tags are cleared.
o Use ulmin() instead of min() where appropriate.
o In ncr53c9x_msgout() consistently use the reset label.
o When we're interrupted during a data phase and the DMA engine is
  still active, don't panic but reset the core and the DMA engine as
  this should be sufficient. Also, the typical problem for triggering
  this was the lack of renegotiation when requesting sense.
o Correctly handle DEVICE RESETs.
o Adapt the locking of esp(4) to MPSAFE cam(4). This includes moving
  the calls of lsi64854_attach() to the bus front-ends so it can pass
  the esp(4) mutex to bus_dma_tag_create(9).
o Change the LSI64854 driver to not create a DMA tag and map for the
  Ethernet channel as le(4) will handle these on its own as well as
  sync and unload the DMA maps for the SCSI and parallel port channel
  after a DMA transfer.
o Cam(4)'ify some NetBSD-centric comments.
o Use bus_{read,write}_*(9) instead of bus_space_{read,write}_*(9)
  and take advantage of rman_get_rid(9) in order to save some softc
  members.

Reviewed by: scottl
MFC after: 1 month

15 years agoClose a race in sleepq_broadcast() where the sleepq could be reused after
jhb [Mon, 8 Sep 2008 19:44:57 +0000 (19:44 +0000)]
Close a race in sleepq_broadcast() where the sleepq could be reused after
it had been assigned to the last sleeping thread.  That thread might have
started running on another CPU and have reused that sleep queue.  Fix it
by just walking the thread queue using TAILQ_FOREACH_SAFE() rather than
a while loop.

PR: amd64/124200
Discovered by: tegge
Tested by: benjsc
MFC after: 1 week

15 years agobge_tick(): do not touch PHY if link is up. This should solve problem with
oleg [Mon, 8 Sep 2008 18:10:15 +0000 (18:10 +0000)]
bge_tick(): do not touch PHY if link is up. This should solve problem with
extra input errors for some BCM57XX chips.

PR: kern/122295

15 years agoNote sendmail 8.14.3 upgrade
gshapiro [Mon, 8 Sep 2008 17:13:18 +0000 (17:13 +0000)]
Note sendmail 8.14.3 upgrade

15 years agoStreamline #include sections in ds133x and ds1672 drivers. This unbreaks the
raj [Mon, 8 Sep 2008 15:49:07 +0000 (15:49 +0000)]
Streamline #include sections in ds133x and ds1672 drivers. This unbreaks the
LINT build.

15 years agoPass 1 of mpsafetty-ifying si(4). It compiles and has basic functionality,
peter [Mon, 8 Sep 2008 11:41:20 +0000 (11:41 +0000)]
Pass 1 of mpsafetty-ifying si(4).  It compiles and has basic functionality,
but needs a lot more work.  In particular, it has no flow control and has
a tendency to race when giving commands.  It still uses Giant for the
tty and driver lock, but this is a keep-it-simple feature for now.
Some of the [temporary] proliferation of messages lines are way too long.

15 years agods133x: Introduce device_identify method; update NOTES.
raj [Mon, 8 Sep 2008 10:40:48 +0000 (10:40 +0000)]
ds133x: Introduce device_identify method; update NOTES.

Obtained from: Semihalf

15 years agoBump __FreeBSD_version for per-CPU GDT on amd64.
kib [Mon, 8 Sep 2008 10:27:11 +0000 (10:27 +0000)]
Bump __FreeBSD_version for per-CPU GDT on amd64.

Requested by: nox