]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoDon't use almost perfectly pessimal cluster allocation. Allocation
bde [Tue, 10 Jul 2007 13:20:24 +0000 (13:20 +0000)]
Don't use almost perfectly pessimal cluster allocation.  Allocation
of the the first cluster in a file (and, if the allocation cannot be
continued contiguously, for subsequent clusters in a file) was randomized
in an attempt to leave space for contiguous allocation of subsequent
clusters in each file when there are multiple writers.  This reduced
internal fragmentation by a few percent, but it increased external
fragmentation by up to a few thousand percent.

Use simple sequential allocation instead.  Actually maintain the fsinfo
sequence index for this.  The read and write of this index from/to
disk still have many non-critical bugs, but we now write an index that
has something to do with our allocations instead of being modified
garbage.  If there is no fsinfo on the disk, then we maintain the index
internally and don't go near the bugs for writing it.

Allocating the first free cluster gives a layout that is almost as good
(better in some cases), but takes too much CPU if the FAT is large and
the first free cluster is not near the beginning.

The effect of this change for untar and tar of a slightly reduced copy
of /usr/src on a new file system was:

Before (msdosfs 4K-clusters):
untar:  459.57 real              untar from cached file (actually a pipe)
tar:    342.50 real              tar from uncached tree to /dev/zero
Before (ffs2 soft updates 4K-blocks 4K-frags)
untar:   39.18 real
tar:     29.94 real
Before (ffs2 soft updates 16K-blocks 2K-frags)
untar:   31.35 real
tar:     18.30 real

After (msdosfs 4K-clusters):
untar    54.83 real
tar      16.18 real

All of these times can be improved further.

With multiple concurrent writers or readers (especially readers), the
improvement is smaller, but I couldn't find any case where it is
negative.  342 seconds for tarring up about 342 MB on a ~47MB/S partition
is just hard to unimprove on.  (This operation would take about 7.3
seconds with reasonably localized allocation and perfect read-ahead.)
However, for active file systems, 342 seconds is closer to normal than
the 16+ seconds above or the 11 seconds with other changes (best I've
measured -- won easily by msdosfs!).  E.g., my active /usr/src on ffs1
is quite old and fragmented, so reading to prepare for the above
benchmark takes about 6 times longer than reading back the fresh copies
of it.

Approved by: re (kensmith)

16 years agoForced commit to say that the previous changeset was:
delphij [Tue, 10 Jul 2007 10:19:45 +0000 (10:19 +0000)]
Forced commit to say that the previous changeset was:

Submitted by: YAMAMOTO Shigeru <shigeru iij ad jp>
Approved by: re (rwatson, implicit)

16 years agoAdd sed(1) to cross tools. We do want newly built version during
delphij [Tue, 10 Jul 2007 10:17:32 +0000 (10:17 +0000)]
Add sed(1) to cross tools.  We do want newly built version during
buildworld.

Approved by: re (rwatson)

16 years agoFurther cleanup of UDPv4:
rwatson [Tue, 10 Jul 2007 09:30:46 +0000 (09:30 +0000)]
Further cleanup of UDPv4:

- Move udp_sendspace and udp_recvspace global variables and associated
  sysctls to the top of the file where most other such things are present.

- Rename static variable 'blackhole' to 'udp_blackhole' and unstaticize
  so that we can add blackhole support for UDPv6 using the same MIB
  variable.

- Move udp_append() above udp_input() to match the function order in
  udp6_usrreq.c.

Approved by: re (kensmith)

16 years agoFixing the mount_smbfs(8) hanging by utilising the destroy_dev_sched() KPI.
avatar [Tue, 10 Jul 2007 09:23:10 +0000 (09:23 +0000)]
Fixing the mount_smbfs(8) hanging by utilising the destroy_dev_sched() KPI.

Relevant threads:

  http://lists.freebsd.org/pipermail/freebsd-current/2007-June/074329.html

Reviewed by: kib, bp (slightly different version)
Tested by: Yuri Pankov <yuri.pankov at gmail dot com>,
Jiawei Ye <leafy7382 at gmail dot com>
Approved by: re (kensmith)

16 years agoGet rid of a couple of Coverity found sign comparison errors.
mjacob [Tue, 10 Jul 2007 07:55:59 +0000 (07:55 +0000)]
Get rid of a couple of Coverity found sign comparison errors.

Approved by: re (Ken)
MFC after: 3 days

16 years agoBe more conservative- turn off fast posting and RIO for 22XX cards.
mjacob [Tue, 10 Jul 2007 07:55:04 +0000 (07:55 +0000)]
Be more conservative- turn off fast posting and RIO for 22XX cards.

Approved by: re (ken)
MFC after: 3 days

16 years agoMFp4 122896
kmacy [Tue, 10 Jul 2007 06:01:45 +0000 (06:01 +0000)]
MFp4 122896
- reduce cpu usage by as much as 25% (40% -> 30) by doing txq reclaim more efficiently
   - use mtx_trylock when trying to grab the lock to avoid spinning during long encap loop
   - add per-txq reclaim task
   - if mbufs were successfully re-claimed try another pass
- track txq overruns with sysctl

Approved by: re (blanket)

16 years agoCast the arguments to atomic_*_ptr() when mapping it to atomic_*_32()
marcel [Tue, 10 Jul 2007 04:40:00 +0000 (04:40 +0000)]
Cast the arguments to atomic_*_ptr() when mapping it to atomic_*_32()
This is a minimal fix.

Approved by: re (kensmith)

16 years agoFix alignment of context switch traces.
jhb [Tue, 10 Jul 2007 00:01:30 +0000 (00:01 +0000)]
Fix alignment of context switch traces.

MFC after: 1 week
Approved by: re (rwatson: "I like simple patches.")

16 years agoMissed in last commit: add usb task for rue to use for its ticks.
imp [Mon, 9 Jul 2007 20:56:39 +0000 (20:56 +0000)]
Missed in last commit: add usb task for rue to use for its ticks.

Approved by: re (bmah)

16 years ago- Add codec id for Realtek ALC268.
ariff [Mon, 9 Jul 2007 20:42:11 +0000 (20:42 +0000)]
- Add codec id for Realtek ALC268.

- Add controller id for Intel 82801I (ICH9).
  PR: kern/114399
  Submitted by: Michael Fuckner <michael@fuckner.net>

- MSI support. Disable by default due to various issues with too many
  broken hardwares. MSI can be enabled through device.hints(5) or
  kenv(8) by setting "hint.pcm.%d.msi=1".
  Partially submitted by: kevlo
                          YAMAMOTO Taku <taku@tackymt.homeip.net>
  Tested by: joel, kevlo, YAMAMOTO Taku

Approved by: re (hrs)
MFC after: 3 days

16 years agoFix stream suspend/resume activity due to its states being
ariff [Mon, 9 Jul 2007 20:41:23 +0000 (20:41 +0000)]
Fix stream suspend/resume activity due to its states being
clobbered by pcm channel start/stop trigger operation.

Approved by: re (hrs)

16 years agoGeneral style, white space, and comment cleanup; move to ANSI C
rwatson [Mon, 9 Jul 2007 17:47:04 +0000 (17:47 +0000)]
General style, white space, and comment cleanup; move to ANSI C
prototypes, don't use register, etc.  Synchronize structure and
layout to the IPv4 versions of these functions to a greater extent,
making visual comparison easier.

Remove now stale or incorrect comments.

Enable full lock assertions, and correct one exception handling
case where the wrong label was jumped to.

Tested by: bz
Approved by: re (bmah)

16 years agoWhen all the other drivers were converted to scheduling a taskqueue to
imp [Mon, 9 Jul 2007 16:58:07 +0000 (16:58 +0000)]
When all the other drivers were converted to scheduling a taskqueue to
do the heavy lifting of the 'mii_tick' function, rue was left behind.
Implement this in a naive way.  Reports from the field show this makes
the driver functional with some locking issues, as opposed to an
instant panic.  Those will be addressed in a later version of the
driver.

Approved by: re@ (bmah)

16 years agoupdate for 0.5.8 import
sam [Mon, 9 Jul 2007 16:26:48 +0000 (16:26 +0000)]
update for 0.5.8 import

Approved by: re (hrs)

16 years agoresolve conflicts
sam [Mon, 9 Jul 2007 16:20:41 +0000 (16:20 +0000)]
resolve conflicts

Approved by: re (hrs)

16 years agoThis commit was generated by cvs2svn to compensate for changes in r171322,
sam [Mon, 9 Jul 2007 16:15:06 +0000 (16:15 +0000)]
This commit was generated by cvs2svn to compensate for changes in r171322,
which included commits to RCS files with non-trunk default branches.

16 years agoImport of hostapd 0.5.8
sam [Mon, 9 Jul 2007 16:15:06 +0000 (16:15 +0000)]
Import of hostapd 0.5.8

16 years agofixup mcast handling in bpf program; this enables forthcoming support
sam [Mon, 9 Jul 2007 15:57:10 +0000 (15:57 +0000)]
fixup mcast handling in bpf program; this enables forthcoming support
for 802.1x over wired interfaces

Submitted by: Jouke Witteveen
Approved by: re (hrs)

16 years agoNew release notes: sed(1) case-insensitive matching, setenv(3)
bmah [Mon, 9 Jul 2007 15:53:56 +0000 (15:53 +0000)]
New release notes:  sed(1) case-insensitive matching, setenv(3)
API change.

Modified release notes:  Clarify architectures for nfe(4) note and
mention that it replaces nve(4) in i386/amd64 GENERIC [1].

Suggested by: Michael Plass [1]
Approved by: re (implicitly)

16 years agoupdates for 802.11-related parameters
sam [Mon, 9 Jul 2007 15:39:58 +0000 (15:39 +0000)]
updates for 802.11-related parameters

Reviewed by: thompsa
Approved by: re (hrs)

16 years agoFix duplicates that crept in at the last minute :-(.
imp [Mon, 9 Jul 2007 14:26:08 +0000 (14:26 +0000)]
Fix duplicates that crept in at the last minute :-(.

Noticed by: Ian Freislich
Approved by: re@ (blanket)

16 years agoFix a regression in IPv4 multicast join path (IP_ADD_MEMBERSHIP).
bms [Mon, 9 Jul 2007 10:36:47 +0000 (10:36 +0000)]
Fix a regression in IPv4 multicast join path (IP_ADD_MEMBERSHIP).

With the in_mcast.c code, if an interface for an IPv4 multicast join was
not specified, and a route did not exist for the specified group in the
unicast forwarding tables, the join would be rejected with the error
EADDRNOTAVAIL.
This change restores the old behaviour whereby if no interface is specified,
and no route exists for the group destination, the IPv4 address list is
walked to find a non-loopback, multicast-capable interface to satisfy
the join request.
This should resolve problems with starting multicast services during
system boot or when a default forwarding entry does not exist.

Approved by: re (rwatson)

17 years agoCorrect a reference-counting mistake in the ZFS code which led to abnormal
dfr [Mon, 9 Jul 2007 09:03:49 +0000 (09:03 +0000)]
Correct a reference-counting mistake in the ZFS code which led to abnormal
memory usage and pessimal cache performance.

Reviewed by: pjd
Approved by: re (rwatson)

17 years agodocument the call to wakeup after a task has been run...
jmg [Mon, 9 Jul 2007 06:24:10 +0000 (06:24 +0000)]
document the call to wakeup after a task has been run...

Approved by: re (hrs)
MFC after: 3 days

17 years agoFurther diff reduction against the proposed merged usbdevs: Add a few
imp [Mon, 9 Jul 2007 06:20:07 +0000 (06:20 +0000)]
Further diff reduction against the proposed merged usbdevs: Add a few
more vendors, use slightly more standardized names.

No md5 chagnes for !USBVERBOSE kernels

Approved by: re@ (blanket)

17 years agoMore vendors from the merged list.
imp [Mon, 9 Jul 2007 05:47:32 +0000 (05:47 +0000)]
More vendors from the merged list.
Sort NETGEAR list per convention.
Swap QUALCOMM and QUALCOMM2.
Add a few vendor products.

no md5 changes with this file (except when USBVERBOSE is enabled)

Approved by: re@ (blanket)

17 years agodma_tag is a static structure. Testing for it being a NULL pointer
marcel [Mon, 9 Jul 2007 04:58:16 +0000 (04:58 +0000)]
dma_tag is a static structure. Testing for it being a NULL pointer
doesn't make sense. Rewrite to what was intended.

Correctly warned about by: GCC
Approved by: re (bmah)

17 years agoFix typo.
yongari [Mon, 9 Jul 2007 01:13:00 +0000 (01:13 +0000)]
Fix typo.

Reported by: Danny Braniss <danny at cs dot huji dot ac dot il>
Approved by: re (bmah)

17 years agoEliminate the special case handling of OBJT_DEVICE objects in
alc [Sun, 8 Jul 2007 19:42:52 +0000 (19:42 +0000)]
Eliminate the special case handling of OBJT_DEVICE objects in
vm_fault_additional_pages() that was introduced in revision 1.47.  Then
as now, it is unnecessary because dev_pager_haspage() returns zero for
both the number of pages to read ahead and read behind, producing the
same exact behavior by vm_fault_additional_pages() as the special case
handling.

Approved by: re (rwatson)

17 years agoNULL_LDT_BASE is used in !SMP kernels too and set_user_ldt() is not
attilio [Sun, 8 Jul 2007 18:17:42 +0000 (18:17 +0000)]
NULL_LDT_BASE is used in !SMP kernels too and set_user_ldt() is not
properly called. Address these two issues.

Reported by: Tinderbox
Tested by: le
Approved by: jeff (mentor)
Approved by: re

17 years agoMFp4:
delphij [Sun, 8 Jul 2007 15:56:12 +0000 (15:56 +0000)]
MFp4:
 - Plug memory leak.
 - Respect underlying vnode's properties rather than assuming that
   the user want root:wheel + 0755.  Useful for using tmpfs(5) for
   /tmp.
 - Use roundup2 and howmany macros instead of rolling our own version.
 - Try to fix fsx -W -R foo case.
 - Instead of blindly zeroing a page, determine whether we need a pagein
   order to prevent data corruption.
 - Fix several bugs reported by Coverity.

Submitted by: Mingyan Guo <guomingyan gmail com>, Howard Su, delphij
Coverity ID: CID 2550, 2551, 2552, 2557
Approved by: re (tmpfs blanket)

17 years agoFix a bug of retrieving configuration ROM.
simokawa [Sun, 8 Jul 2007 11:47:52 +0000 (11:47 +0000)]
Fix a bug of retrieving configuration ROM.
- Handle directories and leaves other than unit directories and text leaves
  correctly.
- Now we can retrieve CROM of iSight correctly.

Approved by: re (hrs)
Tested by: flz
MFC after: 3 days

17 years agoNow that we have a function that can be called from a cdevsw close()
njl [Sat, 7 Jul 2007 17:54:33 +0000 (17:54 +0000)]
Now that we have a function that can be called from a cdevsw close()
entry point, use it.

Approved by: re

17 years agoActual code shows several problems in ia32 LDT handling:
attilio [Sat, 7 Jul 2007 16:59:01 +0000 (16:59 +0000)]
Actual code shows several problems in ia32 LDT handling:
- When a LDT entry changes, the old one is freed while it is still
  referenced by gdt and ldtr.  This can lead to disruptive behaviours in
  particular on SMP machines.
- When a LDT entry changes, it is assumed that the only one entity sharing
  the same LDT are threads in the same proc.  It doesn't take in account
  edge cases where two processes share the same VM (rfork'ed ones, for
  example).

This patch addresses these two problems and addictionally it fixes the
usage of refcount switching back it to the old manually-grown refcount
(since in this case would be faster).

Diagnosed by: tegge
Tested by: pho (a former version)
Reviewed by: kib
Approved by: jeff (mentor)
Approved by: re

17 years agoFix installworld: /usr/bin/printf isn't available then,
kientzle [Sat, 7 Jul 2007 16:55:42 +0000 (16:55 +0000)]
Fix installworld:  /usr/bin/printf isn't available then,
so use awk's printf for the formatting here instead.

Pointy hat: Yours Truly
Approved by: re

17 years agoMinor UDPv4 cleanup: capitalize comment, move statistics update after mbuf
rwatson [Sat, 7 Jul 2007 09:46:34 +0000 (09:46 +0000)]
Minor UDPv4 cleanup: capitalize comment, move statistics update after mbuf
free to be consistent with other error handling, and release socket buffer
lock before freeing mbufs and statistics updates rather than after.

Approved by: re (kensmith)

17 years agoWhen a cached page is reactivated in vm_fault(), update the counter that
alc [Fri, 6 Jul 2007 21:25:21 +0000 (21:25 +0000)]
When a cached page is reactivated in vm_fault(), update the counter that
tracks the total number of reactivated pages.  (We have not been
counting reactivations by vm_fault() since revision 1.46.)

Correct a comment in vm_fault_additional_pages().

Approved by: re (kensmith)
MFC after: 1 week

17 years agoTrivial differences with the proposed merged BSD usbdevs file merged
imp [Fri, 6 Jul 2007 20:05:39 +0000 (20:05 +0000)]
Trivial differences with the proposed merged BSD usbdevs file merged
in.  These are exclusively in the name of the company for this round.
No new devices have been added, but the MITEL entry has been
eliminated because nothing uses it.  You won't see any difference
unless you have USBVERBOSE defined for the kernel.

Approved by: re@ (blanket)

17 years agouhub already does the printing and naming of a device, so don't do it
imp [Fri, 6 Jul 2007 20:02:37 +0000 (20:02 +0000)]
uhub already does the printing and naming of a device, so don't do it
again here for compat drivers.

Approved by: re@ (blanket)

17 years agoAdd a test case for sed(1) regression - we should not ignore case
delphij [Fri, 6 Jul 2007 16:36:52 +0000 (16:36 +0000)]
Add a test case for sed(1) regression - we should not ignore case
when not being asked to do so.

Approved by: re (hrs)

17 years agoBefore doing compile_re() which needs a parameter to identify
delphij [Fri, 6 Jul 2007 16:34:56 +0000 (16:34 +0000)]
Before doing compile_re() which needs a parameter to identify
whether we should ignore case, determine the flag by calling
compile_flags() first.  Also, make sure that we obtain an
initialized cmd->u.s buffer before processing further.  We
may want to refine this solution later, but for now, make
the changes in order to unbreak world build after a sed(1)
with rev. 1.29 of compile.c is installed.

Approved by: re (hrs)

17 years agoForced commit to document a cast correction needed to get
kientzle [Fri, 6 Jul 2007 15:51:59 +0000 (15:51 +0000)]
Forced commit to document a cast correction needed to get
clean compiles using either old or new API.  I should
have just committed this one-line fix separately.  Apologies.

Approved by: re (Ken Smith)

17 years agoMake test suite work with libarchive 1.3.1: Take advantage of
kientzle [Fri, 6 Jul 2007 15:43:11 +0000 (15:43 +0000)]
Make test suite work with libarchive 1.3.1:  Take advantage of
ARCHIVE_VERSION_STAMP to selectively disable tests that don't
apply to that version; new "skipping()" function reports skipped
tests; modify final summary to report component test failures and
skips.

Note:  I don't currently intend to MFC the test suite itself;
anyone interested should just checkout and use this version
of the test suite, which should work for any library version.

Approved by: re (Ken Smith, blanket)

17 years agoNew "version stamp" simplifies determining the exact version
kientzle [Fri, 6 Jul 2007 15:36:38 +0000 (15:36 +0000)]
New "version stamp" simplifies determining the exact version
of libarchive being used.  I've been taking advantage of this
with a recent round of updates to libarchive_test so that it
can test older and newer versions of the library.

Approved by: re (Ken Smith)

17 years agoFix a typo that prevented the quad symbols from being exported
deischen [Fri, 6 Jul 2007 13:42:24 +0000 (13:42 +0000)]
Fix a typo that prevented the quad symbols from being exported
(s/SYM_MAP/SYM_MAPS/).

Reported by: kan
Approved by: re@ (Ken Smith)

17 years agoFix some problems with lock_profiling in sx locks:
attilio [Fri, 6 Jul 2007 13:20:44 +0000 (13:20 +0000)]
Fix some problems with lock_profiling in sx locks:
- Adjust lock_profiling stubs semantic in the hard functions in order to be
  more accurate and trustable
- Disable shared paths for lock_profiling.  Actually, lock_profiling has a
  subtle race which makes results caming from shared paths not completely
  trustable. A macro stub (LOCK_PROFILING_SHARED) can be actually used for
  re-enabling this paths, but is currently intended for developing use only.
- Use homogeneous names for automatic variables in hard functions regarding
  lock_profiling
- Style fixes
- Add a CTASSERT for some flags building

Discussed with: kmacy, kris
Approved by: jeff (mentor)
Approved by: re

17 years agoI4B header files were repo-copied from sys/i386/include/ to
bz [Fri, 6 Jul 2007 08:05:46 +0000 (08:05 +0000)]
I4B header files were repo-copied from sys/i386/include/ to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

We no longer need these "glue" files.

Reminded by: nyan
Approved by: re (kensmith)

17 years agoBump version after repo-copy of I4B headers.
bz [Fri, 6 Jul 2007 07:36:09 +0000 (07:36 +0000)]
Bump version after repo-copy of I4B headers.

The headers will now be installed to include/i4b/ and
no longer to include/machine/.

Approved by: re (kensmith)

17 years agoI4B header files are now installed in include/i4b/ and no longer live
bz [Fri, 6 Jul 2007 07:24:49 +0000 (07:24 +0000)]
I4B header files are now installed in include/i4b/ and no longer live
in include/machine/.

Approved by: re (kensmith)

17 years agoI4B header files were repo-copied from sys/i386/include/ to
bz [Fri, 6 Jul 2007 07:23:39 +0000 (07:23 +0000)]
I4B header files were repo-copied from sys/i386/include/ to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

Approved by: re (kensmith)

17 years agoI4B header files are now installed in include/i4b/ and no longer
bz [Fri, 6 Jul 2007 07:21:56 +0000 (07:21 +0000)]
I4B header files are now installed in include/i4b/ and no longer
in include/machine/.

Adapt #include paths.

Approved by: re (kensmith)

17 years agoI4B header files were repo-copied from sys/i386/include to
bz [Fri, 6 Jul 2007 07:20:59 +0000 (07:20 +0000)]
I4B header files were repo-copied from sys/i386/include to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

I4B header files are now installed in include/i4b/ and no longer
in include/machine/.

For now we still install the headers for i386 only.

Approved by: re (kensmith)

17 years agoI4B header files were repo-copied from sys/i386/include/ to
bz [Fri, 6 Jul 2007 07:17:22 +0000 (07:17 +0000)]
I4B header files were repo-copied from sys/i386/include/ to
sys/i4b/include/ so they will be available to all architectures
once I4B compiles on those.

Adapt #include paths.

Approved by: re (kensmith)

17 years agoBelately note default driver change for NVIDIA network adapters.
yongari [Fri, 6 Jul 2007 06:35:50 +0000 (06:35 +0000)]
Belately note default driver change for NVIDIA network adapters.

Requested by: Michael Plass < mfp49_freebsd at plass-family dot net>
Approved by: re (hrs)

17 years agoTake care that the input to setenv() may actually be a pointer straight
scf [Fri, 6 Jul 2007 04:04:58 +0000 (04:04 +0000)]
Take care that the input to setenv() may actually be a pointer straight
from environ; make a copy before manipulating it and passing it to
setenv().

Approved by: wes
Approved by: re (kensmith)

17 years agoI did not intend to turn -Werror on for pc98. Refine the test for
peter [Fri, 6 Jul 2007 01:50:58 +0000 (01:50 +0000)]
I did not intend to turn -Werror on for pc98.  Refine the test for
turning it on for i386.

Approved by:  re (rwatson, followup)

17 years agoTurn on -Werror for sparc64 and sun4v.
peter [Fri, 6 Jul 2007 00:52:29 +0000 (00:52 +0000)]
Turn on -Werror for sparc64 and sun4v.

Approved by: re (rwatson)

17 years agoFix warnings.
peter [Fri, 6 Jul 2007 00:47:44 +0000 (00:47 +0000)]
Fix warnings.
nxge: cast page size fragments down to (int). If the vm's demand paging
PAGE_SIZE is ever too big for that, we've got far bigger problems.
ofw: move va_start() a little earlier. gcc-4.2 doesn't like us modifying
the last arg before the va_start().

Approved by: re (rwatson)

17 years agoFix warning - add missing #include
peter [Fri, 6 Jul 2007 00:41:53 +0000 (00:41 +0000)]
Fix warning - add missing #include

Submitted by: mjacob
Approved by: re (rwatson)

17 years agore(4) devices requires an external EEPROM. Depending on models it
yongari [Fri, 6 Jul 2007 00:05:12 +0000 (00:05 +0000)]
re(4) devices requires an external EEPROM. Depending on models it
would be 93C46(1Kbit) or 93C56(2Kbit). One of differences between them
is number of address lines required to access the EEPROM. For example,
93C56 EEPROM needs 8 address lines to read/write data. If 93C56
recevied premature end of required number of serial clock(CLK) to set
OP code/address of EEPROM, the result would be unexpected behavior.
Previously it tried to detect 93C46, which requires 6 address lines,
and then assumed it would be 93C56 if read data was not expected
value. However, this approach didn't work in some models/situations
as 93C56 requries 8 address lines to access its data. In order to fix
it, change EEPROM probing order such that 93C56 is detected reliably.

While I'm here change hard-coded address line numbers with defined
constant to enhance readability.

PR: 112710
Approved by: re (mux)

17 years agoForced commit to note a repo-copy of this file from
bz [Thu, 5 Jul 2007 21:52:43 +0000 (21:52 +0000)]
Forced commit to note a repo-copy of this file from
  src/sys/i386/include/
so it will be available to all architectures once I4B compiles on those.

Approved by: re (kensmith)

17 years agoFix remaining syntax errors (missing semicolons)
peter [Thu, 5 Jul 2007 17:42:00 +0000 (17:42 +0000)]
Fix remaining syntax errors (missing semicolons)

Submitted by: Björn König <bkoenig@cs.tu-berlin.de>
Approved by: re (kensmith, followup commits)

17 years agoSpace cleanup
delphij [Thu, 5 Jul 2007 16:29:40 +0000 (16:29 +0000)]
Space cleanup

Approved by: re (rwatson)

17 years agoANSIfy[1] plus some style cleanup nearby.
delphij [Thu, 5 Jul 2007 16:23:49 +0000 (16:23 +0000)]
ANSIfy[1] plus some style cleanup nearby.

Discussed with: gnn, rwatson
Submitted by: Karl Sj?dahl - dunceor <dunceor gmail com> [1]
Approved by: re (rwatson)

17 years agoAdded comments eplaining the requirement for device crypto with IPSEC
gnn [Thu, 5 Jul 2007 15:33:13 +0000 (15:33 +0000)]
Added comments eplaining the requirement for device crypto with IPSEC

Approved by: re

17 years agoRemove unused variable from pf_subr.c to make it -Werror buildable.
mlaier [Thu, 5 Jul 2007 15:28:59 +0000 (15:28 +0000)]
Remove unused variable from pf_subr.c to make it -Werror buildable.

Approved by: re (kensmith)

17 years agoPrefer device_printf to printf + device_get_nameunit. This saves
imp [Thu, 5 Jul 2007 15:25:32 +0000 (15:25 +0000)]
Prefer device_printf to printf + device_get_nameunit.  This saves
about 100 bytes.

Approved by: re (blanket)

17 years agoMFp4: Fixing IPW_DEBUG enabled builds by converting the last piece of
avatar [Thu, 5 Jul 2007 15:06:49 +0000 (15:06 +0000)]
MFp4: Fixing IPW_DEBUG enabled builds by converting the last piece of
ic->ic_des_essid to ic->ic_des_ssid[0].

Reviewed by: sam
Approved by: re (kensmith)

17 years agoIf the mech_type argument to gss_display_status is null, use a default
dfr [Thu, 5 Jul 2007 13:40:07 +0000 (13:40 +0000)]
If the mech_type argument to gss_display_status is null, use a default
mechanism.

Approved by: re (kensmith)

17 years agoIn preparation for 7.0 privilege cleanup, clean up style:
rwatson [Thu, 5 Jul 2007 13:16:04 +0000 (13:16 +0000)]
In preparation for 7.0 privilege cleanup, clean up style:

- Sort copyrights by date.
- Re-wrap, and in some cases, fix comments.
- Fix tabbing, white space, remove extra blank lines.
- Remove commented out debugging printfs.

Approved by: re (kensmith)

17 years agoAdopt snp to the destroy_dev_sched() KPI after reverting of destroy_dev()
kib [Thu, 5 Jul 2007 13:07:12 +0000 (13:07 +0000)]
Adopt snp to the destroy_dev_sched() KPI after reverting of destroy_dev()
to not call destroy_dev_sched().

Tested by: Peter Holm
Approved by: re (kensmith)

17 years agoRevert destroy_dev() to the state before destroy_dev_sched() was introduced.
kib [Thu, 5 Jul 2007 13:04:59 +0000 (13:04 +0000)]
Revert destroy_dev() to the state before destroy_dev_sched() was introduced.
Attempt to spawn destroy_dev_sched() from it causes inadmissible races.

Requested by: tegge
Approved by: re (kensmith)

17 years agoProperly unlock mutex before returning. There was a slight mishap
ariff [Thu, 5 Jul 2007 10:22:37 +0000 (10:22 +0000)]
Properly unlock mutex before returning. There was a slight mishap
during last major locking cleanup.

Reported by: Thierry Herbelot <thierry@herbelot.com>
Approved by: re (mux)

17 years agoRemove reference to the old ftp-proxy implementation,
delphij [Thu, 5 Jul 2007 09:46:53 +0000 (09:46 +0000)]
Remove reference to the old ftp-proxy implementation,
which was replaced during the pf 4.1 import.

Approved by: re (mux)

17 years agoTurn on -Werror for i386 kernel builds.
peter [Thu, 5 Jul 2007 09:30:34 +0000 (09:30 +0000)]
Turn on -Werror for i386 kernel builds.

Approved by: re (rwatson)

17 years agoAllow the LACP state to be queried from userland which at the moment is the
thompsa [Thu, 5 Jul 2007 09:18:57 +0000 (09:18 +0000)]
Allow the LACP state to be queried from userland which at the moment is the
actor and partner peer info. Print out the active aggregator and per port data
in verbose mode from ifconfig.

Approved by: re (mux)

17 years agoRemove the -DFAST_IPSEC from Makefiles again.
bz [Thu, 5 Jul 2007 08:56:46 +0000 (08:56 +0000)]
Remove the -DFAST_IPSEC from Makefiles again.

This was needed during the IPSEC->FAST_IPSEC->IPSEC transition
period to not break the build after picking up netipsec header
files. Now that the FAST_IPSEC kernel option is gone and the
default is IPSEC again those defines are superfluous.

Approved by: re (rwatson)

17 years agoRemove netkey directory from cscope/TAGs generation and replace
bz [Thu, 5 Jul 2007 08:55:14 +0000 (08:55 +0000)]
Remove netkey directory from cscope/TAGs generation and replace
it with netipsec now that KAME IPsec is gone.
While here add missing netinet6 directories.

Add comments about the ports needed to be able to run those targets.

Reviewed by: philip
Approved by: re (rwatson)

17 years agoFix a build breakage as result of disabling parts of I4B.
bz [Thu, 5 Jul 2007 08:53:21 +0000 (08:53 +0000)]
Fix a build breakage as result of disabling parts of I4B.
Check for (temporary gone) kernel options to be defined before using
them.

Reported by: peter
Approved by: re (rwatson)

17 years agoQuiet framelen uninitialized warning. I think it was a false alarm.
peter [Thu, 5 Jul 2007 07:46:33 +0000 (07:46 +0000)]
Quiet framelen uninitialized warning.  I think it was a false alarm.
If check_fhdr() returns false, the frame_ok variable should protect any
meaningful evaluations of framelen.

Approved by: re (rwatson)

17 years agoQuiet warnings. I believe gcc is incorrect about these.
peter [Thu, 5 Jul 2007 07:38:17 +0000 (07:38 +0000)]
Quiet warnings.  I believe gcc is incorrect about these.

Approved by:  re (rwatson)

17 years ago__packed has no effect on u_int8_t's except to cause a warning (and
peter [Thu, 5 Jul 2007 07:28:38 +0000 (07:28 +0000)]
__packed has no effect on u_int8_t's except to cause a warning (and
never has had any effect).

Approved by:  re (rwatson)

17 years agoTurn -Werror back on for amd64 for kernel builds.
peter [Thu, 5 Jul 2007 07:06:17 +0000 (07:06 +0000)]
Turn -Werror back on for amd64 for kernel builds.

Approved by:  re (rwatson)

17 years agoCompile pf/pf_subr.c and netnatm/cc_conn.c without -Werror for the time
peter [Thu, 5 Jul 2007 07:04:17 +0000 (07:04 +0000)]
Compile pf/pf_subr.c and netnatm/cc_conn.c without -Werror for the time
being.

Approved by:  re (rwatson)

17 years agoQuiet warnings. These do not appear to be actually used uninitialized,
peter [Thu, 5 Jul 2007 06:59:14 +0000 (06:59 +0000)]
Quiet warnings.  These do not appear to be actually used uninitialized,
but gcc's optimizer isn't smart enough to see that.  Pre-initializing
seems harmless enough.

Approved by:  re (rwatson)

17 years agoFix a stray splx() that caused a new warning.
peter [Thu, 5 Jul 2007 06:54:03 +0000 (06:54 +0000)]
Fix a stray splx() that caused a new warning.

Approved by:  re (rwatson)

17 years agoInitialize DWBuf[3].
peter [Thu, 5 Jul 2007 06:51:49 +0000 (06:51 +0000)]
Initialize DWBuf[3].

Approved by:  re (rwatson, blanket)

17 years agoFix a bunch of warnings due to a missing forward declaration of a struct.
peter [Thu, 5 Jul 2007 06:45:37 +0000 (06:45 +0000)]
Fix a bunch of warnings due to a missing forward declaration of a struct.

Approved by: re (rwatson)

17 years agoPrefer device_printf to printf("%s: ...", device_get_nameunit()). On
imp [Thu, 5 Jul 2007 06:42:14 +0000 (06:42 +0000)]
Prefer device_printf to printf("%s: ...", device_get_nameunit()).  On
amd64, we save about 240 bytes (this is about 20 per instance).

Approved by: re (blanket)

17 years agoPrefer device_printf to printf("%s:...", device_get_nameunit(),...);
imp [Thu, 5 Jul 2007 06:28:46 +0000 (06:28 +0000)]
Prefer device_printf to printf("%s:...", device_get_nameunit(),...);
This saves ~300 bytes for uvscom.c and ~100 for uvisor.c

Approved by: re (blanket)

17 years agoFix 'assignment used as truth value' warning
peter [Thu, 5 Jul 2007 06:27:15 +0000 (06:27 +0000)]
Fix 'assignment used as truth value' warning

Approved by: re (rwatson)

17 years agoTemporarily turn nowerror on for i386 and amd64 pmap.c. I'd like to study
peter [Thu, 5 Jul 2007 06:12:40 +0000 (06:12 +0000)]
Temporarily turn nowerror on for i386 and amd64 pmap.c.  I'd like to study
exactly what effect the options cause to the code with gcc these days.

Approved by:  re (rwatson)

17 years agoFix a second warning, introduced by my last "fix". I committed the wrong
peter [Thu, 5 Jul 2007 06:04:46 +0000 (06:04 +0000)]
Fix a second warning, introduced by my last "fix". I committed the wrong
diff from the wrong machine.

Pointy hat to: peter
Approved by:  re (rwatson - blanket, several days ago)

17 years agoFix cast-qualifiers warning when INET6 is not present
peter [Thu, 5 Jul 2007 05:55:57 +0000 (05:55 +0000)]
Fix cast-qualifiers warning when INET6 is not present

Approved by:  re (rwatson)

17 years agoFix bad function type passed to destroy_dev_sched_cb().
peter [Thu, 5 Jul 2007 05:54:47 +0000 (05:54 +0000)]
Fix bad function type passed to destroy_dev_sched_cb().

Approved by:  re (rwatson)

17 years agoRemove pad argument from ftruncate wrapper. Oops.
peter [Thu, 5 Jul 2007 05:32:44 +0000 (05:32 +0000)]
Remove pad argument from ftruncate wrapper.  Oops.

Approved by: re (kensmith)

17 years agoAdd quirks, derived from the linux quirks table for:
imp [Thu, 5 Jul 2007 05:26:08 +0000 (05:26 +0000)]
Add quirks, derived from the linux quirks table for:

o Adonics Cable 205
o Aiptek PocketCAM 3Mega
o Belkin USB2SCSI
o Casio QV DigiCam
o CCYU EasyDisk ED1064
o Desknote UCR-61S2B
o Epson Stylus Photo 875DC Card Reader
o Epson Stylus Photo 895 Card Reader
o Feiya 5-in-1 Card Reader
o Hitachi Dvd-CAM DZ-MV100A Camcorder
o HP CD-WRiter+ CD-4e
o Insystem Storage Adapter v2
o Kyocera Finecam S3x
o Kyocera Finecam S4
o Kyocera Finecam S5
o Kyocera Finecam L3
o Lexar USB CF Reader
o MindAtWork Digital Wallet
o Minolta Dimage F300
o Minolta Dimage E223
o Minsumi USB Fdd
o Netac USB-CF-Card
o NetChip USB Clik! 40
o Onspec MDCFE-B USB CF Reader
o Onspec SIIG/Datafab Memory Stick + CF Reader/Writer
o Onspec Datafab-based Reader
o Onspec PNY/Datafab CF+SM Reader
o Onspec SimpleTech/Datafab CF+SM Reader
o Onspec MDSM-b Reader
o Onspec USB To CF + SM Combo (LC1)
o Onspec ImageMate SDDR55
o Panasonic LS-120 Camera
o Samsung Techwin Digimax 410
o Shuttle eUSB SmartMedia / CompactFlash Adapter
o Skanhex MD 7425 Camera
o Skanhex SX 520z Camera
o Sony Memorystick NW-MS7
o Sony Portable USB Hardrive V2
o Sony Memorystick PEG N760c
o Sony Memorystick MSC-U03
o TREK/IBM USB memory key
o Trumpion T33520 USB Flash Card Controller
o Trumpion MP3 Player
o Vivtar Vivicam 35Xx
o WinMaxGroup USB Flash Disk 64M-C
o Zoran Digital Camera EX-20 DSC

and maybe a few others...

Submitted by: Vaidas Damosevicius and flz
PR: 79893
Reviewed by: njl, flz
Approved by: re (blanket)

17 years agoAdd support for Western Digital MyBook external enclosures. They need
imp [Thu, 5 Jul 2007 04:05:51 +0000 (04:05 +0000)]
Add support for Western Digital MyBook external enclosures.  They need
this quirk to work.

Submitted by: Dierk Sacher
PR: usb/99419
Approved by: re (blanket)