]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoResolve conflicts
guido [Wed, 16 Aug 2006 12:23:02 +0000 (12:23 +0000)]
Resolve conflicts

MFC after: 1 weeks

17 years agoResolve conflicts
guido [Wed, 16 Aug 2006 12:06:35 +0000 (12:06 +0000)]
Resolve conflicts

MFC after: 2 weeks

17 years agoo Fix the date of LZ 129 Hindenburg crash.
maxim [Wed, 16 Aug 2006 11:54:07 +0000 (11:54 +0000)]
o Fix the date of LZ 129 Hindenburg crash.

PR: misc/102137
Submitted by: jasper@openbsd
MFC after: 3 days

17 years agoThis commit was generated by cvs2svn to compensate for changes in r161351,
guido [Wed, 16 Aug 2006 11:51:32 +0000 (11:51 +0000)]
This commit was generated by cvs2svn to compensate for changes in r161351,
which included commits to RCS files with non-trunk default branches.

17 years agoImport IP Filter 4.1.13
guido [Wed, 16 Aug 2006 11:51:32 +0000 (11:51 +0000)]
Import IP Filter 4.1.13

17 years agoImport IP Filter 4.1.13
guido [Wed, 16 Aug 2006 11:51:32 +0000 (11:51 +0000)]
Import IP Filter 4.1.13

17 years agoo Re-word a comment.
maxim [Wed, 16 Aug 2006 09:34:56 +0000 (09:34 +0000)]
o Re-word a comment.

PR: kern/102127
Submitted by: Eric Anderson

17 years agoSwap the names "sem_exithook" and "sem_exechook" in the previous commit to
cperciva [Wed, 16 Aug 2006 08:25:40 +0000 (08:25 +0000)]
Swap the names "sem_exithook" and "sem_exechook" in the previous commit to
match up with reality and the prototype definitions.

Register the sem_exechook as the "process_exec" event handler, not
sem_exithook.

Submitted by: rdivacky
Sponsored by: SoC 2006

17 years agoDocument EAGAIN failure per PR. (Finally!)
wes [Wed, 16 Aug 2006 02:56:51 +0000 (02:56 +0000)]
Document EAGAIN failure per PR.  (Finally!)

PR: 24125

17 years agoInclude sys/limits.h for INT_MAX. freebsd32_proto.h 1.58 does not include
jkim [Wed, 16 Aug 2006 00:02:36 +0000 (00:02 +0000)]
Include sys/limits.h for INT_MAX.  freebsd32_proto.h 1.58 does not include
sys/umtx.h any more and previously it was included from there.

17 years agoBackout revision 1.117, xorl and xorq have same result, but xorq needs
davidxu [Tue, 15 Aug 2006 22:43:02 +0000 (22:43 +0000)]
Backout revision 1.117, xorl and xorq have same result, but xorq needs
longer decoding.

17 years agoMove the setup of "diskless" /etc magic files from install_etc() to a
simon [Tue, 15 Aug 2006 21:59:33 +0000 (21:59 +0000)]
Move the setup of "diskless" /etc magic files from install_etc() to a
separate function which is called right after install_etc().  This makes
it simpler to (ab)use nanobsd.sh as a framework to build more normal
FreeBSD images where a normal /etc is used, since setup_nanobsd_etc()
can just be redefined.

OK'ed in principle by: phk
MFC after: 1 week

17 years ago- Fix typo in #error pragma: compitable -> compatible
pav [Tue, 15 Aug 2006 20:10:49 +0000 (20:10 +0000)]
- Fix typo in #error pragma: compitable -> compatible

Submitted by: neologism

17 years agoAdd a new 'show sleepchain' ddb command similar to 'show lockchain' except
jhb [Tue, 15 Aug 2006 18:29:01 +0000 (18:29 +0000)]
Add a new 'show sleepchain' ddb command similar to 'show lockchain' except
that it operates on lockmgr and sx locks.  This can be useful for tracking
down vnode deadlocks in VFS for example.  Note that this command is a bit
more fragile than 'show lockchain' as we have to poke around at the
wait channel of a thread to see if it points to either a struct lock or
a condition variable inside of a struct sx.  If td_wchan points to
something unmapped, then this command will terminate early due to a fault,
but no harm will be done.

17 years ago- When spinning on a spin lock, if the debugger is active or we are in a
jhb [Tue, 15 Aug 2006 18:26:12 +0000 (18:26 +0000)]
- When spinning on a spin lock, if the debugger is active or we are in a
  panic, go ahead and do the longer DELAY(1) spin wait.
- If we panic due to spinning too long, print out a few more details
  including the pointer to the mutex in question and the tid of the owning
  thread.

17 years agoWe operate on 'statfs' structures, not on 'fsstat' structures.
pjd [Tue, 15 Aug 2006 18:17:03 +0000 (18:17 +0000)]
We operate on 'statfs' structures, not on 'fsstat' structures.

MFC after: 3 days

17 years agoadd comment about why we include opt_global.h
imp [Tue, 15 Aug 2006 18:11:25 +0000 (18:11 +0000)]
add comment about why we include opt_global.h

17 years agoIf rawname returns NULL, deal with it appropriately.
mjacob [Tue, 15 Aug 2006 17:53:37 +0000 (17:53 +0000)]
If rawname returns NULL, deal with it appropriately.

PR: 94045
Submitted by: Andrey Elsukov
MFC after: 1 week

17 years agoUse SYS_AUE_<syscallname> to include the appropriate audit event identifier
jhb [Tue, 15 Aug 2006 17:42:14 +0000 (17:42 +0000)]
Use SYS_AUE_<syscallname> to include the appropriate audit event identifier
for syscalls in kld's, even when compiled into the kernel statically.
Note that since this hardcodes the SYS_ prefix SYSCALL_MODULE_HELPER() now
only works for native ABI system calls.  Those are the only ones that
used the macro anyway, and I chose to not require a second argument to the
macro to specify the prefix or audit event directly.

17 years agoRegen to propogate <prefix>_AUE_<mumble> changes as well as the earlier
jhb [Tue, 15 Aug 2006 17:37:01 +0000 (17:37 +0000)]
Regen to propogate <prefix>_AUE_<mumble> changes as well as the earlier
systrace changes.

17 years agoThis XXX remark was rendered false by rev. 103, which made the
yar [Tue, 15 Aug 2006 17:29:52 +0000 (17:29 +0000)]
This XXX remark was rendered false by rev. 103, which made the
VLAN_ARRAY case subject to rw locking, too.

17 years ago- Remove unused sysvec variables from various syscalls.conf.
jhb [Tue, 15 Aug 2006 17:25:55 +0000 (17:25 +0000)]
- Remove unused sysvec variables from various syscalls.conf.
- Send the systrace_args files for all the compat ABIs to /dev/null for
  now.  Right now makesyscalls.sh generates a file with a hardcoded
  function name, so it wouldn't work for any of the ABIs anyway.  Probably
  the function name should be configurable via a 'systracename' variable
  and the functions should be stored in a function pointer in the sysvec
  structure.

17 years agoAdd a new set of macros <prefix>_AUE_<syscallname> to sysproto.h that
jhb [Tue, 15 Aug 2006 17:09:32 +0000 (17:09 +0000)]
Add a new set of macros <prefix>_AUE_<syscallname> to sysproto.h that
map to the audit event associated with a specific system call.  For
example, SYS_AUE___semctl would be set to AUE_SEMCTL in sys/sysproto.h.

17 years agoMake it a tad easier to base other encapsulation schemes on this driver
yar [Tue, 15 Aug 2006 16:56:43 +0000 (16:56 +0000)]
Make it a tad easier to base other encapsulation schemes on this driver
by restoring the ifv_proto field in the vlan softc and putting it to use
this time.  It's a good companion for ifv_encaplen, which has already been
used throughout this driver.

17 years ago- Use NOSTD rather than NOIMPL for nfssvc() to match other syscalls
jhb [Tue, 15 Aug 2006 16:45:41 +0000 (16:45 +0000)]
- Use NOSTD rather than NOIMPL for nfssvc() to match other syscalls
  provided via klds.
- Correct audit identifier for nfssvc().

17 years agoRename 'show lockchain' to 'show locktree' and 'show threadchain' to
jhb [Tue, 15 Aug 2006 16:44:18 +0000 (16:44 +0000)]
Rename 'show lockchain' to 'show locktree' and 'show threadchain' to
'show lockchain'.  The churn is because I'm about to add a new
'show sleepchain' similar to 'show lockchain' for sleep locks (lockmgr and
sx) and 'show threadchain' was a bit ambiguous as both commands show
a chain of thread dependencies, 'lockchain' is for non-sleepable locks
(mtx and rw) and 'sleepchain' is for sleepable locks.

17 years agoOoops we need to include <machine/vmparam.h> to get the definition of
cognet [Tue, 15 Aug 2006 16:43:07 +0000 (16:43 +0000)]
Ooops we need to include <machine/vmparam.h> to get the definition of
KERNBASE and VM_MAXUSER_ADDRESS.
Remove the useless include of opt_global.h, as noticed by netchild@ (the one
in arm/elf_trampoline.c is legit, because this file is compiled outside the
kernel, and doesn't use the standard CFLAGS).

17 years agoAdd a 'show lockmgr' command that dumps the relevant details of a lockmgr
jhb [Tue, 15 Aug 2006 16:42:16 +0000 (16:42 +0000)]
Add a 'show lockmgr' command that dumps the relevant details of a lockmgr
lock.

17 years agoSet IFF_DRV_RUNNING on vlan(4) once in vlan_config(),
yar [Tue, 15 Aug 2006 16:40:27 +0000 (16:40 +0000)]
Set IFF_DRV_RUNNING on vlan(4) once in vlan_config(),
not at many places after each call to vlan_config().
This is consistent with IFF_DRV_RUNNING being unset
in vlan_unconfig().

17 years agoNo need for opt_global.h here
imp [Tue, 15 Aug 2006 15:48:58 +0000 (15:48 +0000)]
No need for opt_global.h here

17 years agoRemove the include of opt_global.h. It's included globally by a command
netchild [Tue, 15 Aug 2006 15:27:13 +0000 (15:27 +0000)]
Remove the include of opt_global.h. It's included globally by a command
line switch. Other files which may make the same mistake (according to
fxr.watson.org) but aren't fixed in this commit (people with more clue
about those files should fix this):
 - i386/xbox/xbox.c
 - arm/arm/elf_trampoline.c
 - arm/arm/mem.c

Noticed by: cognet

17 years agoDisable some parts of the code on amd64 for now to prevent a panic. A better
netchild [Tue, 15 Aug 2006 15:15:17 +0000 (15:15 +0000)]
Disable some parts of the code on amd64 for now to prevent a panic. A better
fix will come later.

Sponsored by: Google SoC 2006
Submitted by: rdivacky

17 years agoInitialize the eventhandlers, mutexes and sx locks.
netchild [Tue, 15 Aug 2006 14:58:15 +0000 (14:58 +0000)]
Initialize the eventhandlers, mutexes and sx locks.

Sponsored by: Google SoC 2006
Submitted by: rdivacky

17 years agoAdd include of opt_global.h, else the futex operations aren't locked on
netchild [Tue, 15 Aug 2006 13:45:39 +0000 (13:45 +0000)]
Add include of opt_global.h, else the futex operations aren't locked on
SMP systems.

Sponsored by: Google SoC 2006
Submitted by: rdivacky

17 years agoFix printing of integer Kelvins broken in rev. 1.71, which is
ru [Tue, 15 Aug 2006 13:32:39 +0000 (13:32 +0000)]
Fix printing of integer Kelvins broken in rev. 1.71, which is
fatal on sizeof(int) != sizeof(long) systems (such as amd64).

MFC after: 1 day

17 years ago- Add the new files to the linux module.
netchild [Tue, 15 Aug 2006 13:01:36 +0000 (13:01 +0000)]
- Add the new files to the linux module.
- Prepare the modules for build on amd64, but don't build them there as
  part of the kernel build yet. The code for the missing symbols on amd64
  isn't committed and it may be solved differently.

Sponsored by: Google SoC 2006
Submitted by: rdivacky

17 years agoadd autogenerated systrace_args stuff for dtrace
netchild [Tue, 15 Aug 2006 12:56:36 +0000 (12:56 +0000)]
add autogenerated systrace_args stuff for dtrace

17 years agoAdd the linux 2.6.x stuff (not used by default!):
netchild [Tue, 15 Aug 2006 12:54:30 +0000 (12:54 +0000)]
Add the linux 2.6.x stuff (not used by default!):
 - TLS - complete
 - pid/tid mangling - complete
 - thread area - complete
 - futexes - complete with issues
 - clone() extension - complete with some possible minor issues
 - mq*/timer*/clock* stuff - complete but untested and the mq* stuff is
   disabled when not build as part of the kernel with native FreeBSD mq*
   support (module support for this will come later)

Tested with:
 - linux-firefox - works, tested
 - linux-opera - works, tested
 - linux-realplay - doesnt work, issue with futexes
 - linux-skype - doesnt work, issue with futexes
 - linux-rt2-demo - works, tested
 - linux-acroread - doesnt work, unknown reason (coredump) and sometimes
   issue with futexes
 - various unix utilities in linux-base-gentoo3 and linux-base-fc4:
   everything tried worked

On amd64 not everything is supported like on i386, the catchup is planned for
later when the remaining bugs in the new functions are fixed.

To test this new stuff, you have to run
sysctl compat.linux.osrelease=2.6.16
to switch back use
sysctl compat.linux.osrelease=2.4.2

Don't switch while running a linux program, strange things may or may not
happen.

Sponsored by: Google SoC 2006
Submitted by: rdivacky
Some suggestions/help by: jhb, kib, manu@NetBSD.org, netchild

17 years agoregen
netchild [Tue, 15 Aug 2006 12:51:45 +0000 (12:51 +0000)]
regen

17 years agoBecause fuword on AMD64 returns 64bit long integer -1 on fault, clear
davidxu [Tue, 15 Aug 2006 12:45:51 +0000 (12:45 +0000)]
Because fuword on AMD64 returns 64bit long integer -1 on fault, clear
entire %rax to zero instead of only clearing %eax, otherwise it will
leave garbage data in upper 32 bits.

17 years agoAdd new syscalls in the linuxolator (only used when the sysctl
netchild [Tue, 15 Aug 2006 12:28:14 +0000 (12:28 +0000)]
Add new syscalls in the linuxolator (only used when the sysctl
compat.linux.osrelease is changed to "2.6.16" or similar).

On amd64 not everything is supported like on i386, the catchup is planned for
later when the remaining bugs in the new functions are fixed.

Sponsored by: Google SoC 2006
Submitted by: rdivacky

17 years agoAdd some new files needed for linux 2.6.x compatibility.
netchild [Tue, 15 Aug 2006 12:20:59 +0000 (12:20 +0000)]
Add some new files needed for linux 2.6.x compatibility.

Please don't style(9) the NetBSD code, we want to stay in sync. Not imported
on a vendor branch since we need local changes.

Sponsored by: Google SoC 2006
Submitted by: rdivacky
With help from: manu@NetBSD.org
Obtained from: NetBSD (linux_{futex,time}.*)

17 years ago- Add some ASM stuff needed for futexes (linuxolator).
netchild [Tue, 15 Aug 2006 12:14:36 +0000 (12:14 +0000)]
- Add some ASM stuff needed for futexes (linuxolator).

Sponsored by: Google SoC 2006
Submitted by: rdivacky
With help from: kib

17 years ago- Change process_exec function handlers prototype to include struct
netchild [Tue, 15 Aug 2006 12:10:57 +0000 (12:10 +0000)]
- Change process_exec function handlers prototype to include struct
  image_params arg.
- Change struct image_params to include struct sysentvec pointer and
  initialize it.
- Change all consumers of process_exit/process_exec eventhandlers to
  new prototypes (includes splitting up into distinct exec/exit functions).
- Add eventhandler to userret.

Sponsored by: Google SoC 2006
Submitted by: rdivacky
Parts suggested by: jhb (on hackers@)

17 years agoNote Intel ICH8 and ESB2 support.
brueffer [Tue, 15 Aug 2006 08:27:38 +0000 (08:27 +0000)]
Note Intel ICH8 and ESB2 support.

17 years agoAdd inverted amplifier sense quirks for Compaq Presario B3800
yongari [Tue, 15 Aug 2006 07:37:41 +0000 (07:37 +0000)]
Add inverted amplifier sense quirks for Compaq Presario B3800

Reported by: Nick Withers < nick AT nickwithers DOT com >
Tested by: Nick Withers < nick AT nickwithers DOT com >
No objection from: ariff
MFC after: 1 week

17 years agoRemove extra '*/' comment close. In code not normally compiled but a bug never the...
julian [Tue, 15 Aug 2006 04:56:29 +0000 (04:56 +0000)]
Remove extra '*/' comment close. In code not normally compiled but a bug never the less.

17 years agoDo not include ucom as a dependency line to enable inclusion of the
imp [Mon, 14 Aug 2006 21:09:37 +0000 (21:09 +0000)]
Do not include ucom as a dependency line to enable inclusion of the
serial line usb drivers that depend on it.  Instead, let the compile
fail rather than silently not including the driver.  This is more in
line with how we handle things like mii.

# I'll note: a better system for coping with missing depends is needed,
# but this dependency is clearly backwards given our current flawed
# depend system.

17 years agoEliminate an unnecessary initialization from trap_pfault() that also
alc [Mon, 14 Aug 2006 19:53:53 +0000 (19:53 +0000)]
Eliminate an unnecessary initialization from trap_pfault() that also
happens to contain a style error.

17 years agoAdd support for the ICH8 and ESB2 chips, also add a few other missing ICH7 parts.
sos [Mon, 14 Aug 2006 19:39:33 +0000 (19:39 +0000)]
Add support for the ICH8 and ESB2 chips, also add a few other missing ICH7 parts.

HW donated by: JMicron

17 years agoaccess only has 2 esses.
jhb [Mon, 14 Aug 2006 19:29:45 +0000 (19:29 +0000)]
access only has 2 esses.

MFC after: 3 days

17 years agoImprove exception string format.
takawata [Mon, 14 Aug 2006 18:38:56 +0000 (18:38 +0000)]
Improve exception string format.
PR:100671
MFC after: 3 days

17 years agoRemove debug messages on notify handler.
takawata [Mon, 14 Aug 2006 18:24:22 +0000 (18:24 +0000)]
Remove debug messages on notify handler.

PR:100671

17 years agoDocument some files which should not get added here at all.
netchild [Mon, 14 Aug 2006 18:20:36 +0000 (18:20 +0000)]
Document some files which should not get added here at all.

Discussed with: kris, ru

17 years agoSeveral updates:
brueffer [Mon, 14 Aug 2006 18:04:01 +0000 (18:04 +0000)]
Several updates:

- Added missing file system/network/sound module entries
- Removed obsolete network module entries
- Capitalized (Fast|Gigabit) Ethernet

MFC after: 1 week

17 years agoDon't try to preserve PAT bits in pmap_enter(). We currently on pages that
jhb [Mon, 14 Aug 2006 15:39:41 +0000 (15:39 +0000)]
Don't try to preserve PAT bits in pmap_enter().  We currently on pages that
aren't mapped via pmap_enter() (KVA).  We will eventually support PAT bits
on user pages, but those will require some sort of MI caching mode stored
in the vm_page.

Reviewed by: alc

17 years agoFix alignment of RX bufs DMA map to be realistic. Maybe it works on
ru [Mon, 14 Aug 2006 15:35:43 +0000 (15:35 +0000)]
Fix alignment of RX bufs DMA map to be realistic.  Maybe it works on
i386 (I don't know) but on amd64 at hand here, it paniced early at
boot.

(I'm pretty sure that PAGE_SIZE here was miscopied from another place
during porting, where in OpenBSD bus_dmamem_alloc() is used, but there
PAGE_SIZE means completely different thing.)

17 years agoDon't use touch when what is really meant is :> (create an empty file, or
des [Mon, 14 Aug 2006 13:28:53 +0000 (13:28 +0000)]
Don't use touch when what is really meant is :> (create an empty file, or
truncate it if it exists) or :>> (ensure the file exists, but don't change
it if it already does)

Reviewed by: ru
MFC after: 2 weeks

17 years agoHow stupid of me. :>> doesn't change a modification time.
ru [Mon, 14 Aug 2006 13:02:01 +0000 (13:02 +0000)]
How stupid of me.  :>> doesn't change a modification time.

17 years ago- Include bsd.own.mk early so existsence check using ${SHAREDIR}
ru [Mon, 14 Aug 2006 12:21:57 +0000 (12:21 +0000)]
- Include bsd.own.mk early so existsence check using ${SHAREDIR}
  actually works.
- Touch /usr/share/tmac/man.local if it already exists.

MFC after: 3 days

17 years agoTouch `locale' and `se_locale' if they exist to stop people from
ru [Mon, 14 Aug 2006 12:10:54 +0000 (12:10 +0000)]
Touch `locale' and `se_locale' if they exist to stop people from
thinking they are obsolete.

Prodded by: kris
Submitted by: des
MFC after: 3 days

17 years agoChange hardcoded and incorrect number with correct define. This change is a
glebius [Mon, 14 Aug 2006 09:52:35 +0000 (09:52 +0000)]
Change hardcoded and incorrect number with correct define. This change is a
nop, since E1000_FDX_COLLISION_DISTANCE == E1000_HDX_COLLISION_DISTANCE.

PR: kern/101000
Submitted by: Doug Havir

17 years agoThe BUILDNAME variable need not be specified.
ru [Mon, 14 Aug 2006 09:34:32 +0000 (09:34 +0000)]
The BUILDNAME variable need not be specified.

17 years agoImprove wording for -f and -F.
dd [Mon, 14 Aug 2006 08:49:08 +0000 (08:49 +0000)]
Improve wording for -f and -F.

17 years agoImprove the wording. Remove the appositive about strcmp, putting the
dd [Mon, 14 Aug 2006 08:21:27 +0000 (08:21 +0000)]
Improve the wording. Remove the appositive about strcmp, putting the
first sentence back to the way it was. Add a second sentence that
explains the case when strcmp is called.

17 years agoPrint packet loss figures with one decimal place. ping6 already does
dd [Mon, 14 Aug 2006 07:54:17 +0000 (07:54 +0000)]
Print packet loss figures with one decimal place. ping6 already does
this, and OpenBSD and NetBSD pings do it too. This is primarily useful
for comparing low levels of packet loss.

17 years agoIt's not entirely obvious that PGEX_I must be zero if no-execute is neither
alc [Mon, 14 Aug 2006 06:15:16 +0000 (06:15 +0000)]
It's not entirely obvious that PGEX_I must be zero if no-execute is neither
supported nor enabled.  Just to be sure, verify that no-execute is enabled
before passing VM_PROT_EXECUTE to vm_fault().

Suggested by: tegge@

17 years agoFix 2KLOGIN code to specify *ibits* (not *obits*) so that the
mjacob [Mon, 14 Aug 2006 05:42:46 +0000 (05:42 +0000)]
Fix 2KLOGIN code to specify *ibits* (not *obits*) so that the
options field in register 10 will be deterministic, not random.

Correct the number of input bits for EXECUTE_FIRMWARE 0..1 to
0..2- the 2322 and 24XX cards use mailbox register 2 to specify
whether the f/w being executed is freshly loaded or not.

Correct the number of input bits for {READ,WRITE}_RAM_WORD_EXTENDED
so that register 8 gets picked up.

Fix the indexing and offset for the 2322 f/w download so that it
correctly puts the different code segments where they belong.

Move VERIFY_CHECKSUM to be the 'else' clause to 2322 f/w downloads-
the EXECUTE_FIRMWARE command for 2322 and 24XX cards will tell you
if the f/w checksum is incorrect and VERIFY_CHECKSUM only works for
RISC SRAM address < 64K so you can only do a VERIFY_CHECKSUM on the
first of the 3 f/w segments for the 2322.

Shorten the delay for the continuation mailbox commands- 1ms is
ridiculous (100us is more likely).

All of the more or less is really only for the 2322/6322 cards.

17 years agoThe register offset is within 4K, not 256 bytes, for some QLogic cards.
mjacob [Mon, 14 Aug 2006 05:36:26 +0000 (05:36 +0000)]
The register offset is within 4K, not 256 bytes, for some QLogic cards.

17 years agoThe macro IS_23XX should not mistakenly include 24XX cards.
mjacob [Mon, 14 Aug 2006 05:35:41 +0000 (05:35 +0000)]
The macro IS_23XX should not mistakenly include 24XX cards.

17 years agoMake em(4) handle too many fragmented frame with m_defrag(9).
yongari [Mon, 14 Aug 2006 02:21:26 +0000 (02:21 +0000)]
Make em(4) handle too many fragmented frame with m_defrag(9).
Previously em(4) requeued the failed mbuf chains from
bus_dmamap_load_mbuf_sg(9) failure to resend it later. However,
bus_dmamap_load_mbuf_sg(9) may never complete its request as the
fragmented frames can have more than EM_MAX_SCATTER segments.
To handle the above EFBIG case, defragment the frame with m_defrag(9)
and free the mbuf chain if it can't deframent the chain due to
resource shortage.

Reviewed by glebius (with improvements)

17 years agoOverhaul Rx path to recover from mbuf cluster allocation failure.
yongari [Mon, 14 Aug 2006 01:50:54 +0000 (01:50 +0000)]
Overhaul Rx path to recover from mbuf cluster allocation failure.
 o Create one more spare DMA map for Rx handler to recover from
   bus_dmamap_load_mbuf_sg(9) failure.
 o Make sure to update status bit in Rx descriptors even if we failed
   to allocate a new buffer. Previously it resulted in stuck condition
   and em_handle_rxtx task took up all available CPU cycles.
 o Don't blindly unload DMA map. Reuse loaded DMA map if received
   packet has errors. This would speed up Rx processing a bit under
   heavy load as it does not need to reload DMA map in case of error.
   (bus_dmamap_load_mbuf_sg(9) is the most expensive call in driver
    context.)
 o Update if_iqdrops counter if it can't allocate a mbuf cluster.
   With this change it's now possible to see queue dropped packets
   with netstat(1).
 o Update mbuf_cluster_failed counter if fixup code failed to
   allocate mbuf header.
 o Return ENOBUFS instead of ENOMEM in case of Rx fixup failure.
 o Make adapter->lmp NULL in case of Rx fixup failure. Strictly
   specking it's not necessary for correct operation but it makes
   the intention clear.
 o Remove now unused dropped_pkts member in softc.

With these changes em(4) should survive mbuf cluster allocation
failure on Rx path.

Reviewed by: pdeuskar, glebius (with improvements)

17 years agoApply alignment fixup only when programmed frame size is greater than
yongari [Mon, 14 Aug 2006 00:36:53 +0000 (00:36 +0000)]
Apply alignment fixup only when programmed frame size is greater than
MCLBYTES - ETHER_ALIGN. Previously it applied the alignment fixup code
for oversized frames which would result in reduced performance on
strict alignment archs.

17 years agoMinor white space tweaks.
rwatson [Sun, 13 Aug 2006 23:16:59 +0000 (23:16 +0000)]
Minor white space tweaks.

17 years agoCorrectly handle the case in calloc(num, size) where
cperciva [Sun, 13 Aug 2006 21:54:47 +0000 (21:54 +0000)]
Correctly handle the case in calloc(num, size) where
  (size_t)(num * size) == 0
but both num and size are nonzero.

Reported by: Ilja van Sprundel
Approved by: jasone
Security: Integer overflow; calloc was allocating 1 byte in
response to a request for a multiple of 2^32 (or 2^64)
bytes instead of returning NULL.

17 years agoDon't push a map on a master server which will fail anyway.
ru [Sun, 13 Aug 2006 19:57:32 +0000 (19:57 +0000)]
Don't push a map on a master server which will fail anyway.

PR: bin/72881
Submitted by: thomas (slightly coloured by me)

17 years agoConvert to the standard section 4 SYNOPSIS layout.
brueffer [Sun, 13 Aug 2006 18:44:18 +0000 (18:44 +0000)]
Convert to the standard section 4 SYNOPSIS layout.

MFC after: 3 days

17 years agoRevert previous commit. Pre-Nehemiah C3 CPUs do have 3DNow!; it doesn't
des [Sun, 13 Aug 2006 08:47:41 +0000 (08:47 +0000)]
Revert previous commit.  Pre-Nehemiah C3 CPUs do have 3DNow!; it doesn't
show up in dmesg because identcpu.c only looks for it on Intel and AMD
processors.

17 years agoUndefine __DATE__ in order to avoid placing a build timestamp into
cperciva [Sun, 13 Aug 2006 05:32:10 +0000 (05:32 +0000)]
Undefine __DATE__ in order to avoid placing a build timestamp into
/usr/sbin/{named, lwresd}.  Note that POSIX / C99 doesn't technically
allow __DATE__ to be (un|re)defined, but gcc does what we mean anyway.

Approved by: dougb
MFC after: 1 month

17 years agoReimplement the page's NOSYNC flag as an object-synchronized instead of a
alc [Sun, 13 Aug 2006 00:11:09 +0000 (00:11 +0000)]
Reimplement the page's NOSYNC flag as an object-synchronized instead of a
page queues-synchronized flag.  Reduce the scope of the page queues lock in
vm_fault() accordingly.

Move vm_fault()'s call to vm_object_set_writeable_dirty() outside of the
scope of the page queues lock.  Reviewed by: tegge
Additionally, eliminate an unnecessary dereference in computing the
argument that is passed to vm_object_set_writeable_dirty().

17 years agoAdd an extension to the UINT & ULONG types. The XINT & XLONG types behave
obrien [Sat, 12 Aug 2006 23:33:10 +0000 (23:33 +0000)]
Add an extension to the UINT & ULONG types.  The XINT & XLONG types behave
the same, except sysctl(8) will print out the values in hex.

17 years agoAdd the module version to fix the loading with if_bridge.
thompsa [Sat, 12 Aug 2006 20:30:58 +0000 (20:30 +0000)]
Add the module version to fix the loading with if_bridge.

Reported by: keramida
Tested by: keramida

17 years agoFix bug preventing the proper displaying of the CTLFLAG_WR option.
obrien [Sat, 12 Aug 2006 20:09:33 +0000 (20:09 +0000)]
Fix bug preventing the proper displaying of the CTLFLAG_WR option.

17 years agoReduce the scope of the page queues lock in vm_pgmoveco() now that
alc [Sat, 12 Aug 2006 19:47:49 +0000 (19:47 +0000)]
Reduce the scope of the page queues lock in vm_pgmoveco() now that
vm_page_sleep_if_busy() no longer requires the page queue lock to be held.

Correctly spell "TRUE".

17 years agoFix "pkg_version -Io" coredump, if some packages have no origin at
krion [Sat, 12 Aug 2006 18:32:51 +0000 (18:32 +0000)]
Fix "pkg_version -Io" coredump, if some packages have no origin at
all.

PR: bin/101932
Submitted by: novel, sat
MFC after: 5 days

17 years agoOops. Remove accidentally committed change.
pjd [Sat, 12 Aug 2006 18:29:49 +0000 (18:29 +0000)]
Oops. Remove accidentally committed change.

Noticed by: marck

17 years agoRestore the "plumb" compatibility command, which was lost
yar [Sat, 12 Aug 2006 18:07:17 +0000 (18:07 +0000)]
Restore the "plumb" compatibility command, which was lost
due to the recent change by sam@ to clone operations in ifconfig(8).

17 years agoFix incorrect .Xr syntax I introduced in the previous commit.
yar [Sat, 12 Aug 2006 17:11:43 +0000 (17:11 +0000)]
Fix incorrect .Xr syntax I introduced in the previous commit.

Noticed by: ru
X-MFC with: rev. 1.31

17 years agoHandle MSDOS file systems properly. Before the change file systems
pjd [Sat, 12 Aug 2006 15:34:15 +0000 (15:34 +0000)]
Handle MSDOS file systems properly. Before the change file systems
created on Windows XP (and others maybe) were not detected.
We detected only those created with newfs_msdos(8).

Submitted by: Tobias Reifenberger <treif@mayn.de>
style(9)ified by: pjd

17 years agoVerify if a label doesn't point to the parent directory.
pjd [Sat, 12 Aug 2006 15:30:24 +0000 (15:30 +0000)]
Verify if a label doesn't point to the parent directory.

17 years agoThe strstr() function is in the libkern now.
pjd [Sat, 12 Aug 2006 15:29:12 +0000 (15:29 +0000)]
The strstr() function is in the libkern now.

17 years agoAdd strstr() function to the libkern.
pjd [Sat, 12 Aug 2006 15:28:39 +0000 (15:28 +0000)]
Add strstr() function to the libkern.

17 years agoI don't know where I got the idea that the VIA C3 has 3DNow!; it doesn't.
des [Sat, 12 Aug 2006 09:46:43 +0000 (09:46 +0000)]
I don't know where I got the idea that the VIA C3 has 3DNow!; it doesn't.
It does have MMX (though MMX support is reputed to be incomplete in early
generations), and later generations have SSE.

MFC after: 2 weeks

17 years agoBatch of changes:
imp [Sat, 12 Aug 2006 09:06:55 +0000 (09:06 +0000)]
Batch of changes:
o when turning off the socket for a 16-bit card, write 0 to INTR register
  rather than just tying to just clear the rest bit.  this seems to fix
  card insert detection after an eject on TI bridges (ricoh bridges work
  either way, apparently).  This is a MFp4.
o Cope better with TOPIC95 bridges on powerup.  According to NetBSD driver,
  these bridges don't set POWER_STATE, so cope accordingly in our power
  code.  They also need a little extra time to settle, so do that as well.
o It appears that we need to turn on/off one of the clocks to the card
  when we power up/down that socket on a TOPIC97, also from NetBSD.
o TOPIC97 bridges need to specifically enable LV card support.  Unconditionally
  do this in the hopes that all laptops that have these chips support LV
  voltages (they should, since they are required for CardBus).
o TOPIC register name regularization.  Registers specific to models of TOPIC
  are now called out as such.

# I need a machine with a TOPIC95 for testing.

17 years agoThe TOPIC97 and TOPIC100 seem to have a special register in the exca
imp [Sat, 12 Aug 2006 08:53:54 +0000 (08:53 +0000)]
The TOPIC97 and TOPIC100 seem to have a special register in the exca
space that enables low voltage operation (and maybe other stuff).
Enable the bits in this register so low voltage 16-bit cards may work.

Existance noticed in NetBSD driver.

17 years agoDon't reset Tx threshold value whenever xl_init_locked() is called.
yongari [Sat, 12 Aug 2006 02:05:13 +0000 (02:05 +0000)]
Don't reset Tx threshold value whenever xl_init_locked() is called.
Instead the threshould is initialized in device attach. Later the
threshold could be increased in Tx underrun error and the new
threshold should be used in xl_init_locked().

17 years agoMake sure to check frames in Tx queue are empty before clearing
yongari [Sat, 12 Aug 2006 01:55:51 +0000 (01:55 +0000)]
Make sure to check frames in Tx queue are empty before clearing
watchdog timer.

17 years agoDue to the poor PHY documentation from RealTek I can't sure but I
yongari [Sat, 12 Aug 2006 01:38:49 +0000 (01:38 +0000)]
Due to the poor PHY documentation from RealTek I can't sure but I
think the RealTek PHY needs driver to set RGEPHY_BMCR_AUTOEN bit of
RGEPHY_MII_BMCR register and proper ANAR register setting for manual
media type selection.
This fixes long standing manual media type selection bug in rgephy(4).

Reported by: Jelte Jansen <jelte AT NLnetLabs DOT nl>
Tested by: Jelte Jansen <jelte AT NLnetLabs DOT nl>

17 years agoFix invalid reference of mbuf chains.
yongari [Sat, 12 Aug 2006 01:30:38 +0000 (01:30 +0000)]
Fix invalid reference of mbuf chains.
Use proper pointer dereference to inform modified mbuf chains to
caller.

While I'm here perform checksum offload setup after loading DMA
maps.

In collaboration with:  glebius

17 years agoFix invalid reference of mbuf chains.
yongari [Sat, 12 Aug 2006 01:24:37 +0000 (01:24 +0000)]
Fix invalid reference of mbuf chains.
Use proper pointer dereference to inform modified mbuf chains to
caller.

In collaboration with: glebius