Commit Graph

143556 Commits

Author SHA1 Message Date
qingli
c6b6112234 Remove the rt argument from nd6_storelladdr() because
rt is no longer accessed.
2008-12-17 10:27:34 +00:00
qingli
3bfc2293f2 A couple of files were not meant to be committed. 2008-12-17 10:19:53 +00:00
qingli
c6a0a000ca in6_clsroute() was applied to prefix routes causing some
of them to expire. in6_clsroute() was only applied to
cloned routes that are no longer applicable after the
arp-v2 commit.
2008-12-17 10:03:49 +00:00
yongari
62ee68bb08 It seems that RealTek PCIe controllers require an explicit Tx poll
command whenever Tx completion interrupt is raised. The Tx poll
bit is cleared when all packets waiting to be transferred have been
processed. This means the second Tx poll command can be silently
ignored as the Tx poll bit could be still active while processing
of previous Tx poll command is in progress.
To address the issue re(4) used to invoke the Tx poll command in Tx
completion handler whenever it detects there are pending packets in
TxQ. However that still does not seem to completely eliminate
watchdog timeouts seen on RealTek PCIe controllers. To fix the
issue kick Tx poll command only after Tx completion interrupt is
raised as this would indicate Tx is now idle state such that it can
accept new Tx poll command again. While here apply this workaround
for PCIe based controllers as other controllers does not seem to
have this limitation.

Tested by:	Victor Balada Diaz < victor <> bsdes DOT net >
2008-12-17 08:18:11 +00:00
kmacy
7efe2ccd48 Keep stats in drbr_enqueue
Discussed with: ps
2008-12-17 08:12:50 +00:00
imp
39a3668dcc AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.
Reviewed by:	peter
2008-12-17 06:56:58 +00:00
imp
e4a424be30 Remove obsolete AT_DEBUG stuff. It never should have been committed
in the first place, let alone migrated to linux emulation.

Reviewed by:	peter, rdivacky
2008-12-17 06:11:42 +00:00
yongari
4b0736516e For RTL8168C SPIN2 controllers, make sure to take the controller
out of sleep mode prior to accessing to PHY. This should fix device
attach failure seen on these controllers. Also enable the sleep
mode when device is put into sleep state.

PR:	kern/123123, kern/123053
2008-12-17 06:01:03 +00:00
kmacy
832d8c0e29 avoid trying to acquire a shared lock while holding an exclusive lock
by making the ifnet lock acquisition exclusive
2008-12-17 04:33:52 +00:00
murray
253ef3d897 1. Correct capitalization of a closing tag (no effect on output).
2. Ensure all &arch entities end with ';' (no effect on output).
3. Ensure all &arch lists for drivers/features are comma-separated.

PR:		docs/127840 (item 2 only)
MFC after:	1 week
2008-12-17 04:15:38 +00:00
kmacy
4b4aad01dc merge in 2 buf_ring helper routines for enqueueing and freeing buf_rings 2008-12-17 04:00:43 +00:00
murray
0d699e4383 1. Update the list of Intel chips which have EM64T and can run the amd64
port.

2. Increase the known working maximum memory configuration from
   8gb to 32gb.

PR:		docs/102148 (1)
Submitted by:	Mike Meyer <mwm@mired.org> (1 - partially)
Reviewed by:	hrs
Approved by:	re (hrs)
MFC after:	1 minute
2008-12-17 03:24:55 +00:00
kensmith
22049cbe36 Remove file no longer part of sysinstall. 2008-12-17 02:54:18 +00:00
kensmith
d4bb372483 As threatened a while ago, remove support for tape media. Reports vary
but most people believe it stopped working a while ago.
2008-12-17 02:52:45 +00:00
kmacy
ea41cce94c default to doing lla_lookup with shared afdata lock and returning a
shared lock on the lle - thus restoring parallel performance to
pre-arpv2 level
2008-12-17 00:14:28 +00:00
kmacy
d0147f27c7 convert ifnet and afdata locks from mutexes to rwlocks 2008-12-17 00:11:56 +00:00
kmacy
43e7c1af8b * Compare pointer with NULL
* Remove trailing whitespace (added in r186162)
* Reduce indentation by rephrasing test

Submitted by:	Christopher Mallon (christoph dot mallon at gmx dot de)
2008-12-16 23:56:24 +00:00
attilio
697e2a94e4 1) Fix a deadlock in the VFS:
- threadA runs vfs_rel(mp1)
- threadB does unmount the mp1 fs, sets MNTK_UNMOUNT and drop MNT_ILOCK()
- threadA runs vfs_busy(mp1) and, as long as, MNTK_UNMOUNT is set, sleeps
  waiting for threadB to complete the unmount
- threadB, in vfs_mount_destroy(), finds mnt_lock > 0 and sleeps waiting
  for the refcount to expire.

Fix the deadlock by adding a flag called MNTK_REFEXPIRE which signals the
unmounter is waiting for mnt_ref to expire.
The vfs_busy contenders got awake, fails, and if they retry the
MNTK_REFEXPIRE won't allow them to sleep again.

2) Simplify significantly the code of vfs_mount_destroy() trimming
   unnecessary codes:
   - as long as any reference exited, it is no-more possible to have
     write-op (primarty and secondary) in progress.
   - it is no needed to drop and reacquire the mount lock.
   - filling the structures with dummy values is unuseful as long as
     it is going to be freed.

Tested by:	pho, Andrea Barberio <insomniac at slackware dot it>
Discussed with:	kib
2008-12-16 23:16:10 +00:00
kmacy
447f3863c6 - Simplify handling of the deferring of mbuf transmit until after lle lock drop
- add a couple of comments to clarify intent
2008-12-16 23:06:36 +00:00
thompsa
af3a8d21c8 Also propagate the if_hwassist value to the parent so that cksum offload works.
Submitted by:	Tom Hicks (thicks_averesys.com)
2008-12-16 22:16:34 +00:00
trasz
b2515a861b According to phk@, VOP_STRATEGY should never, _ever_, return
anything other than 0.  Make it so.  This fixes
"panic: VOP_STRATEGY failed bp=0xc320dd90 vp=0xc3b9f648",
encountered when writing to an orphaned filesystem.  Reason
for the panic was the following assert:
KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp));
at vfs_bio:bufstrategy().

Reviewed by:	scottl, phk
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-16 21:13:11 +00:00
trasz
4039bb7c82 Fix forced mdconfig -du. E.g. the following would previously
result in panic:

mdconfig -af blah.img -o force
mount /dev/md0 /mnt
mdconfig -du 0

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-16 20:59:27 +00:00
imp
a69ce4ce83 Start to clean up the MIPS elf machine dependent file.
o Add support for compiling elf64 for this file (the rest of the changes are
  coming later)
o Fill in some misssing relocation types.  We need to support these in
  elf_machdep.c's relocation routines eventually, but that's future work
  too.
2008-12-16 20:07:47 +00:00
imp
961b89a6c2 Mips never had /usr/libexec/ld-elf.so.1, so remove it. We don't have
any binaries that need it.  This was moved before FreeBSD 5.x.
2008-12-16 20:04:02 +00:00
mav
1290464fbc Unroll two loops of SHA1Update(). 60 bytes of static memory is not a price. 2008-12-16 19:15:31 +00:00
trasz
99f3b7b788 Implement g_vfs_orphan(). Without it, the filesystem never closes
the device, which means refcount on periph drivers never drops,
which means cam_sim_free() never returns, which results in umass
sleeping there ad infinitum.

Submitted by:	pjd
Reviewed by:	scottl, pjd
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-16 17:04:52 +00:00
rwatson
1d38ccff94 A few locking fixes and cleanups to pfil hook registration,
unregistration, and execution:

- Add some brackets for clarity and trim a bit of vertical whitespace.
- Remove comments that may not contribute to clarity, such as "Lock"
  before acquiring a lock and "Get memory" before allocating memory.
- During hook registration, don't drop pfil_list_lock between checking
  for a duplicate and registering the hook, as this leaves a race
  condition by failing to enforce the "no duplicate hooks" invariant.
- Don't lock the hook during registration, since it's not yet in use.
- Document assumption that hooks will be quiesced before being
  unregistered.
- Don't write-lock hooks during removal because they are assumed
  quiesced.
- Rename "done" label to "locked_error" to be clear that it's an error
  path on the way out of hook execution.

MFC after:	pretty soon
2008-12-16 17:03:22 +00:00
trasz
a06a1075a6 Fix locking in periph drivers - don't try to unlock periph
that was already deallocated.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-16 17:01:52 +00:00
trasz
1aa4ea9cfb Add SIM refcounting. This is slightly different from what DragonFly
does - in DragonFly, it's cam_sim_release() what actually frees the
SIM; cam_sim_free does nothing more than calling cam_sim_release().
Here, we drain in cam_sim_free, waiting for refcount to drop to zero.
We cannot do the same think DragonFly does, because after cam_sim_free
returns, client would destroy the sim->mtx, and CAM would trip over
an initialized mutex.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-16 16:57:33 +00:00
trasz
ebb77f64c3 Get rid of dead_sim. There is no way to make it work - any attempt
to actually use it would panic on mtx operation, as dead_sim doesn't
have a proper mutex.  Even if it had a properly initialized mutex,
it wouldn't have properly locked and owned one.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-16 16:54:51 +00:00
kensmith
f8bfa764a5 Add confirmation of the password that got entered.
PR:		29893 (among others)
2008-12-16 16:15:19 +00:00
mav
852a86e463 Call ata_legacy() only once on attach and save it's result. Scanning PCI
configuration registers (which are not going to change) on every interrupt
looks expensive, especially when interrupt is shared. Profiling shows me 3%
of time spent by atapci0 on pure network load due to IRQ sharing with em0.
2008-12-16 16:04:40 +00:00
phk
f77e2d29f5 Make it possible to cherry-pick packages out of a directory. 2008-12-16 15:05:52 +00:00
rwatson
662640d1ee IPFW's pfil hook/unhook code ignores the return values of pfil_add_hook()
and pfil_remove_hook(), so cast them to (void).

MFC after:	pretty soon
2008-12-16 15:05:35 +00:00
mav
f702951b49 Avoid 256 integer divisions per rc4_init() call. Replace it with using
separate index variable.

It gives more then double rc4_init() performance increase on tested i386 P4.
It also gives about 15% speedup to PPTP VPN with stateless MPPE encryption
(by ng_mppc) which calls rc4_init() for every packet.
2008-12-16 13:58:37 +00:00
kmacy
bf1d63fc61 ipfw doesn't use the radix node head lock to protect the radix tree - remove acquisition 2008-12-16 11:06:30 +00:00
jkoshy
6fc1cf0348 Bug fixes:
- Initialize variables before use.
- Remove a KASSERT() that could falsely trigger if there are other sources
  of NMIs in the system.

Efficiency tweak:
- When checking PMCs that overflowed, ignore PMCs that were not configured for
  sampling.
2008-12-16 11:04:02 +00:00
kmacy
8c8136db7e remove assertion checks for now - ipfw uses its own lock for protecting its radix tree instance 2008-12-16 11:01:36 +00:00
dumbbell
c7b031dfae Rephrase and/or fix some comments in Synaptics touchpad initialization
function.
2008-12-16 09:51:13 +00:00
ru
1283f09c3e Fix printing of shared memory limits.
MFC after:	3 days
2008-12-16 09:17:05 +00:00
kmacy
222f4e20a8 check pointers against NULL 2008-12-16 06:01:08 +00:00
delphij
7a3ee73de5 Don't count InFramesL2FilterDiscards into Ierr. This value does not represent
a real packet error but simply indicate that an unexpected unicast or multicast
error was received by the NIC, which was not counted in the past as well.

Reported by:	many (on -stable@)
Reviewed by:	davidch
MFC after:	3 days
2008-12-16 05:03:22 +00:00
delphij
fff25bc8ab Test whether sc->tx_mbuf_map[i], not whether sc->tx_mbuf_map is NULL before
doing bus_dmamap_sync() since it operates on the former, not the latter.

Reviewed by:	davidch
2008-12-16 04:59:04 +00:00
kmacy
9a4c20e435 style and spelling fix 2008-12-16 04:41:39 +00:00
kmacy
91748deadf assert that the radix node head is locked when manipulating the tree 2008-12-16 04:40:43 +00:00
kensmith
7d088b7fca Handle VFS_VGET() failing with an error other than EOPNOTSUPP in addition
to failing with that error.

PR:		125149
Submitted by:	Jaakko Heinonen (jh <at> saunalahti <dot> fi)
Reviewed by:	mohans, kan
MFC after:	3 days
2008-12-16 04:34:09 +00:00
kmacy
9be993627e check pointer against NULL
add new line after declaration for style
2008-12-16 03:18:59 +00:00
kmacy
c501489004 convert more pointer validation checks to checking against NULL 2008-12-16 03:12:44 +00:00
kmacy
e73e761720 simplify locking in find_pfxlist_reachable_router 2008-12-16 03:05:18 +00:00
kmacy
81140652bf don't unlock lle if it is NULL 2008-12-16 02:48:12 +00:00