Commit Graph

57246 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
481b55b1e3 Style cleanups.
X-MFC-after:	Already MFCed to RELENG_6 by accident.
2006-01-18 11:03:20 +00:00
Søren Schmidt
ac1731fb20 Properly report SATA connection speed. 2006-01-18 10:02:23 +00:00
Gleb Smirnoff
8d6b240b0d Check ifp before dereferencing it in xl_detach(). xl_detach() can be called
from xl_attach(), when ifp is not defined yet.

Found with:	Coverity Prevent(tm)
2006-01-18 09:42:21 +00:00
Søren Schmidt
f5f55db308 Add support for using DMA on dump, greatly speeds up the dump process.
Add dump support in ataraid.
2006-01-18 09:14:55 +00:00
Colin Percival
9238d0aff6 Correct a buffer overflow when scanning for 802.11 wireless networks.
Security:	FreeBSD-SA-06:05.80211
2006-01-18 09:03:15 +00:00
Matt Jacob
fba92123ac Fix ioctl to not get swallowed by ioctl code (i.e., make sure the darned
code sticks within 8 bits)

MFC after:	1 week
2006-01-18 08:37:27 +00:00
David Xu
74bcd9d280 Eliminate a stale instruction introduced in revision 1.136. 2006-01-18 06:42:42 +00:00
Marcel Moolenaar
7ee3d29ed6 o Add missing relocations.
o  Minor white-space fixups.
2006-01-18 01:45:57 +00:00
Ariff Abdullah
4aee05133b Remove Giant / busdma_lock_mutex from busdma_tag_create(). 2006-01-18 01:01:37 +00:00
Oleg Bulyzhin
6fb34dd2ed - Count packets discarded by RX/TX MAC (cause of FIFO overflow, etc)
as input/output interface errors.
 - Keep values of rx/tx discards & tx collisions inside struct bge_softc.
   So we can keep statistic across ifconfig down/up runs (cause bringing
   bge up will reset chip).

Approved by:	glebius (mentor)
MFC after:	1 week
2006-01-17 23:01:58 +00:00
Marcel Moolenaar
853b7411b6 s/R_IA64_/R_IA_64_/g as per the ia64 psABI. 2006-01-17 21:03:22 +00:00
Juli Mallett
b241b0a239 Since p_cansee will end up dereferencing p_ucred, don't check for p_ucred
equal to NULL several times later.  p_ucred "should probably not" be NULL
if the process isn't PRS_NEW anyway.  This is strongly reinforced by the fact
that we don't see frequent crashes here.  Remove the checks after p_cansee and
add a KASSERT right before it.

Found by:	Coverity Prevent (tm)

Also trim one nearby trailing space.
2006-01-17 20:25:01 +00:00
Alfred Perlstein
92e73f5711 I ran into an nfs client panic a couple of times in a row over the
last few days.  I tracked it down to the fact that nfs_reclaim()
is setting vp->v_data to NULL _before_ calling vnode_destroy_object().
After silence from the mailing list I checked further and discovered
that ufs_reclaim() is unique among FreeBSD filesystems for calling
vnode_destroy_object() early, long before tossing v_data or much
of anything else, for that matter.  The rest, including NFS, appear
to be identical, as if they were just clones of one original routine.

The enclosed patch fixes all file systems in essentially the same
way, by moving the call to vnode_destroy_object() to early in the
routine (before the call to vfs_hash_remove(), if any).  I have
only tested NFS, but I've now run for over eighteen hours with the
patch where I wouldn't get past four or five without it.

Submitted by: Frank Mayhar
Requested by: Mohan Srinivasan
MFC After: 1 week
2006-01-17 17:29:03 +00:00
John Baldwin
2971d7ab9b Fix a memory leak I introduced with the hostb/vgapci stuff.
Reported by:	Coverity (via dfr's clue-bat)
2006-01-17 17:02:45 +00:00
John Baldwin
6ef970a972 Bah. Fix 'show lock' to actually be compiled in. I had just fixed this in
p4 but had an older subr_lock.c on the machine I committed to CVS from.
2006-01-17 16:58:32 +00:00
John Baldwin
83a81bcb14 Add a new file (kern/subr_lock.c) for holding code related to struct
lock_obj objects:
- Add new lock_init() and lock_destroy() functions to setup and teardown
  lock_object objects including KTR logging and registering with WITNESS.
- Move all the handling of LO_INITIALIZED out of witness and the various
  lock init functions into lock_init() and lock_destroy().
- Remove the constants for static indices into the lock_classes[] array
  and change the code outside of subr_lock.c to use LOCK_CLASS to compare
  against a known lock class.
- Move the 'show lock' ddb function and lock_classes[] array out of
  kern_mutex.c over to subr_lock.c.
2006-01-17 16:55:17 +00:00
Joseph Koshy
2b01a08446 Fix a memory leak.
Found by:	Coverity
2006-01-17 16:53:50 +00:00
John Baldwin
550d1c9392 Initialize thread0.td_contested in init_turnstiles() rather than
mutex_init() as it is used by the turnstile code and is not mutex-specific.
2006-01-17 16:47:42 +00:00
John Baldwin
2037434379 Update a stale comment. 2006-01-17 16:44:34 +00:00
John Baldwin
3eb9cab0c6 Garbage collect turnstile_empty() since it is unused. 2006-01-17 16:40:20 +00:00
Poul-Henning Kamp
25a14196dd Fix an 11 year old mistake: Let the hash functions take a void* instead
of unsigned char* argument.
2006-01-17 15:35:57 +00:00
Pawel Jakub Dawidek
a1c10dcb4c Move $FreeBSD$ from comment to __FBSDID(). 2006-01-17 11:48:16 +00:00
Pawel Jakub Dawidek
7d54b385a6 - Use better types.
- Log problems at level 0 when killing providers.

MFC after:	3 days
2006-01-17 07:32:43 +00:00
Pawel Jakub Dawidek
b5f30223fc Check return value.
Found by:	Coverity Prevent(tm)
MFC after:	3 days
2006-01-17 07:30:34 +00:00
Pawel Jakub Dawidek
7192f621d0 Remove dead code.
Found by:	Coverity Prevent(tm)
MFC after:	3 days
2006-01-17 07:27:46 +00:00
Pawel Jakub Dawidek
4ec0490779 Remove unused value.
Found by:	Coverity Prevent(tm)
MFC after:	3 days
2006-01-17 07:26:48 +00:00
Pawel Jakub Dawidek
58d85f544f Log situation when EIO is returned. 2006-01-17 07:23:36 +00:00
Pawel Jakub Dawidek
54df0743c7 Remove bio leak when EIO error is emulated.
Found by:	Coverity Prevent(tm)
MFC after:	3 days
2006-01-17 07:22:44 +00:00
Pyun YongHyeon
e0078c6436 The number of ticks per usec for YUKON_EC is 125. 2006-01-17 06:58:25 +00:00
Pyun YongHyeon
1a98c9b4a2 fix Rx checksum computation on little endian systems.
Reported & Tested by:	brad@OpenBSD
2006-01-17 06:02:22 +00:00
Pyun YongHyeon
c57c874824 fix interrupt moderation timer frequencies for Yukon
Obtained from:	OpenBSD
2006-01-17 05:57:44 +00:00
Pyun YongHyeon
878793bc2f remove trailing spaces 2006-01-17 05:41:20 +00:00
Tor Egge
dffaf91aa3 Set flag in needsbuffer while still holding bqlock to avoid lost wakeup. 2006-01-16 22:09:47 +00:00
Ariff Abdullah
d8f1a170d9 Fix broken capabilites. There are possible calculation errors within
ess_calcspeed8() and ess_calcspeed9() that need to be fixed as well
(TODO).

Reported by:	[1] Claude Buisson <cbuisson at nerim.net>
MFC after:	3 days

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003566.html
2006-01-16 20:01:33 +00:00
Ariff Abdullah
ed3b31fc67 ehci_pci.c:
ATI EHCI controllers exhibit simmilar stall issues and require
	this dropped interrupts workaround. Be verbose about it.
ehci.c:
ehcivar.h:
	Slight change in comments to note about issues surrounding both
	VIA and ATI EHCI controllers.

Approved by:	iedowse
2006-01-16 19:23:59 +00:00
Ariff Abdullah
d26f1706b9 Add PCI vendor id for ATI OHCI USB controllers.
Approved by:	iedowse
2006-01-16 19:07:05 +00:00
Christian S.J. Peron
ed9e2ed449 Although we check the return value of copyin(9) while determaining how
long the string is in userspace, afterwards we call malloc(M_WAITOK),
which could sleep for an unknown amount of time. Check the return
value of copyin(9) just to be sure that nothing has changed during that
time.

Found with:	Coverity Prevent (tm)
MFC after:	1 week
2006-01-16 17:03:21 +00:00
Ruslan Ermilov
b2c9ed2d83 Fix standalone module build.
Reported by:	Boris Samorodov <bsam@ipt.ru>
2006-01-16 17:03:06 +00:00
Ruslan Ermilov
150636cae7 I couldn't find any traces of what the tags1 file was supposed to do. 2006-01-16 16:25:17 +00:00
Ariff Abdullah
2fd8d3d84e Restore old compatibility of feeding directly into /dev/dsp at 8000 hz
while preserving the New World Order.

Discussed with:	[1] Michael W. Oliver <michael at gargantuan.com>
MFC after:	1 week

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003562.html
2006-01-16 11:07:15 +00:00
Kris Kennaway
0c6913cd9a Correct typos (s/OFERFLOW/OVERFLOW/).
Reviewed by:	jhb
2006-01-16 01:35:25 +00:00
Ian Dowse
afcb6f8261 Work around a problem seen on VIA EHCI controllers where occasionally
an interrupt appears to occur before the transfer has been marked
as completed. This caused umass transfers to get stuck, especially
when writing large files. The workaround sets up a timer that
rechecks for missed completed transfers if some operations are still
pending. Other suggested workarounds, such as performing a PCI read
immediately after acknowledging the interrupts, do not appear to
help.

Obtained from:	OpenBSD
2006-01-15 21:03:19 +00:00
Ian Dowse
df3e5efa87 Set sc_dying to 1 when detaching. In NetBSD and OpenBSD this was
done by the DVACT_DEACTIVATE case in *hci_activate(), but we don't
use that code in FreeBSD so it was never set.
2006-01-15 20:41:04 +00:00
Ian Dowse
c15e3d30c7 The ehci driver doesn't use the transfer `hcpriv' field, so don't
bother setting it to NULL in ehci_root_ctrl_done().
2006-01-15 20:32:52 +00:00
Christian S.J. Peron
323203d389 vfs_busy can only return something useful if MNTK_UNMOUNT has been set.
Since we are using vfs_busy() on a freshly allocated mount structure, use
(void) to show that we do not care about the return value.

Found with:	Coverity Prevent (tm)
MFC after:	2 weeks
2006-01-15 20:14:11 +00:00
Robert Watson
6994eebcab Cast VFS_STATFS() in vfs_domount() to (void) to indicate that ignoring the
return value is intentional: this is simply an attempt to pre-cache the
statfs state.

Found with:	Coverity Prevent (tm)
MFC after:	3 days
2006-01-15 20:01:05 +00:00
Robert Watson
d248c7d7f5 Modify the IP fragment reassembly code so that it uses a new UMA zone,
ipq_zone, to allocate fragment headers from, rather than using cast mbuf
storage.  This was one of the few remaining uses of mbuf storage for
local data structures that relied on dtom().  Implement the resource
limit on ipq's using UMA zone limits, but preserve current sysctl
semantics using a sysctl proc.

MFC after:	3 weeks
2006-01-15 18:58:21 +00:00
Robert Watson
dfa60d9354 Staticize ipqlock, since it is local to ip_input.c.
MFC after:	3 days
2006-01-15 17:05:48 +00:00
Robert Watson
f0ee42d0f1 Don't leak mbufs and mbuf clusters in several error-handling situations
in the if_an receive routine.

Found with:	Coverity Prevent (tm)
MFC after:	1 week
2006-01-15 12:09:03 +00:00
Robert Watson
63e0298298 If frame length is excessive, don't leak an mbuf and cluster when
abandoning processing.

Found with:	Coverity Prevent (tm)
MFC after:	1 week
2006-01-15 12:06:09 +00:00