Commit Graph

49354 Commits

Author SHA1 Message Date
Poul-Henning Kamp
cbca0b53e5 Respect that G_BDE_MAXKEYS is a compile time variable. 2004-09-11 17:57:51 +00:00
Max Laier
c9f6794e2e One more round on the H/W supported checksum code: Fix NICs that can't do
the pseudo header. We really need the TCP packet length here. This happens
to end up in ip->ip_len in tcp_input.c, but here we should get it from the
len function variable instead.

Submitted by:	yongari
Tested by:	Nicolas Linard, yongari (sparc64 + hme)
MFC after:	5 days
2004-09-11 11:18:25 +00:00
Scott Long
1e7fad6b6a Revert the previous round of changes to td_pinned. The scheduler isn't
fully initialed when the pmap layer tries to call sched_pini() early in the
boot and results in an quick panic.  Use ke_pinned instead as was originally
done with Tor's patch.

Approved by: julian
2004-09-11 10:07:22 +00:00
Gleb Smirnoff
5d67845f3e Remove orphaned comment about Meta data. 2004-09-11 08:59:06 +00:00
Alan Cox
fe8d8261ec Add nge. (I've used one for about a week in an XP1000.) 2004-09-11 07:26:50 +00:00
Poul-Henning Kamp
083d7d1c8f Add a threadcount field which we will need later for device removal
cleanup.  Adding it now and MT5'ing will preserve binary compatibility
if this code is later MFC'ed.

MT5 candidate.
2004-09-11 07:09:48 +00:00
Doug White
155119e8ff Fix build if both of BKTR_USE_FREEBSD_SMBUS and BKTR_NEW_MSP34XX_DRIVER are
defined.

Thanks to Damian Gerow <dgerow@afflictions.org> for pointing out this problem.
RELENG_5 candidate.
2004-09-11 04:32:55 +00:00
Warner Losh
d5daf6c02e Add two spare fields to struct resource for some planned enhacenments
to make it possible to merge them w/o changing the size of struct resource
which some drivers unfortunately still need to know.
2004-09-11 04:28:46 +00:00
Scott Long
9e0c3bdf64 Double the number of kernel page tables for amd64 and for i386/PAE. The old
value was only enough for 8GB of RAM, the new value can do 16GB.  This still
isn't optimal since it doesn't scale.  Fixing this for amd64 looks to be
fairly easy, but for i386 will be quite difficult.

Reviewed by: peter
2004-09-11 01:31:26 +00:00
Bill Paul
712753fd51 Remove unneeded VGE_UNLOCK() in vge_detach(). 2004-09-11 01:07:39 +00:00
Julian Elischer
0caccd943f Whitespace fix
MFC after:	2 days
2004-09-11 00:33:51 +00:00
Julian Elischer
513efa5b39 Try committing from the right tree this time
MFC after:	2 days
2004-09-11 00:11:09 +00:00
Julian Elischer
5c854accc1 Make up my mind if cpu pinning is stored in the thread structure or the
scheduler specific extension to it. Put it in the extension as
the implimentation details of how the pinning is done needn't be visible
outside the scheduler.

Submitted by:	tegge  (of course!)   (with changes)
MFC after:	3 days
2004-09-10 22:28:33 +00:00
Julian Elischer
3389af30e8 Add some code to allow threads to nominat a sibling to run if theyu are going to sleep.
MFC after:	1 week
2004-09-10 21:04:38 +00:00
Bill Paul
a07bd003bf Add device driver support for the VIA Networking Technologies
VT6122 gigabit ethernet chip and integrated 10/100/1000 copper PHY.
The vge driver has been added to GENERIC for i386, pc98 and amd64,
but not to sparc or ia64 since I don't have the ability to test
it there. The vge(4) driver supports VLANs, checksum offload and
jumbo frames.

Also added the lge(4) and nge(4) drivers to GENERIC for i386 and
pc98 since I was in the neighborhood. There's no reason to leave them
out anymore.
2004-09-10 20:57:46 +00:00
Poul-Henning Kamp
5263eebc9a Add two spare elements for planned but not yet implemented stuff related
to device driver unloading.  Adding these two now and MT5'ing them will
allow us to preserve binary compatibility on RELENG_5 when these facilities
are MFC'ed.

MT5 Candiate.
2004-09-10 20:49:30 +00:00
Stefan Eßer
c7754014fa Fix oversight reported by Norikatsu Shigemura for the "sym" driver
(which was derived from the "ncr" driver) and add a MODULE_DEPEND
on "cam".

MT5 candidate, IMHO.
MFC after:	1 week
2004-09-10 19:35:44 +00:00
Matt Jacob
78fb2586ce Make it depend on PCI as well.
Submitted by:	Stefan eSSer
2004-09-10 18:39:02 +00:00
Matt Jacob
0c994d8520 Make sym depend, as a module, on cam.
Submitted by:"Norikatsu Shigemura" <nork@FreeBSD.org>
2004-09-10 17:57:33 +00:00
Tom Rhodes
88af03989b Remove the debugging tunable, it was not being used.
Enable first match by default.[1]

We should:	rwatson [1]
2004-09-10 15:14:50 +00:00
Søren Schmidt
1d535cd590 Reduce the amount of memory reported to busdma.
This made the requirements for bouncebuffers too big with PAE.
Cleanup the way size defines for transfers are implemented.
2004-09-10 10:31:37 +00:00
Don Lewis
ca219d048a Convert sndstat_lock from a mutex to an sx lock. sndstat_read()
holds sndstat_lock across a call to uiomove(), which is not legal
to do with a  mutex because of the possibility that the data transfer
could sleep because of a page fault.  It is not possible to just
unlock the mutex for the uiomove() call without introducing another
locking mechanism to prevent the body of sndstat_read() from being
re-entered.  Converting sndstat_lock to an sx lock is the least
complicated change.

This is a candidate for RELENG_5.

LOR:		030
MFC after:	4 days
2004-09-10 09:37:06 +00:00
Marcel Moolenaar
e4793b0eda Better fix the busdma problem exposed by ATA. With the CMD 646 for
example the maximum segment size is 64K while the boundary is set
to 8K due to controller limitations. It is impossible to NOT cross
the boundary for any segment size that's larger than the boundary.
So, once we inherited the boundary from the parent tag, make sure
to reduce the maximum segment size to the boundary if it was larger.

MT5 candidate.
2004-09-10 07:00:28 +00:00
Marcel Moolenaar
7dafab2e78 The previous commit, roughly one and a half years ago removed the
branch prediction optimization for LINT, because the kernel was too
large. This commit now removes it altogether since it causes build
failures for GENERIC kernels and the various applicable trends are
such that one can expect that it these failure will cause more
problems than they're worth in the future. These trends include:
1. Alpha was demoted from tier 1 to tier 2 due to lack of active
   support. The number of people willing to fix build breakages
   is not likely to increase and those developers that do have the
   gumption to test MI changes on alpha are not likely to spend
   time fixing unexpected build failures first.
2. The kernel will only increase in size. Even though stripped-down
   kernels do link without problems now, compiler optimizations (like
   inlining) and new (non-optional) functionality will likely cause
   stripped-down kernels to break in the future as well.

So, with my asbestos suit on, get rid of potential problems before
they happen.

MT5 candidate.
2004-09-10 05:00:27 +00:00
John-Mark Gurney
ca95b2de43 remove giant required from kqueue_close..
Reported by:	kuriyama
MFC after:	3 days
2004-09-10 03:14:32 +00:00
Warner Losh
7e76a985ca Add comments about why we're freeing subdevs (which is completely
redundant at this point and should be retired).  Don't free subdevs if
we don't attach any devices.  This was leaving stale device_t's
around.  Don't touch the device if it isn't attached since the name
isn't meaningful then.  Switch from strncpy (properly used) to
strlcpy.

From a patch submitted by Peter Pentchev
2004-09-09 20:47:28 +00:00
Warner Losh
9c56382454 We don't need a uhub_child_detached() routine now that we don't detach
device_t instances when no driver attaches.  They are left around, and
we need to remember them.

# The usbd_device_handle->subdevs[] array likely is completely bogus
# at this point, but one change at a time, since its removal will need
# to have similar code replace it extracted from newbus.

Part of the patch submitted by Peter Pentchev after an excellent
analysis of the underlying problems.

MFC After: 1 week
2004-09-09 20:43:49 +00:00
John Baldwin
64621fc5af Teach the stack trace code how to step across a double fault when stepping
across frames.  Basically, if the current frame is for the
'dblfault_handler' function, then get the next %eip and %ebp values to use
from the original TSS of the thread that has the saved state when the
double fault triggered.

MFC after:	4 days
2004-09-09 20:39:31 +00:00
Maksim Yevmenkin
248a9ca8ba Shame on me. I screwed up product ID for the 3COM Bluetooth PC-Card.
It's 0x0040 not 0x0400.

MFC after:	3 days
2004-09-09 18:48:09 +00:00
Warner Losh
b3b0e2521a For the moment, back out my back out of green's 1.87 commit. While it
produced better results for a test program I had here, it didn't
substantially change the number of crashes that I saw.  Both the old
code and the new code seemed to produce the same crashes from the usb
layer.  Since the new code also solves a close() crash, go with it
until the underlying issues wrt devices going away can be addressed.
2004-09-09 17:49:53 +00:00
Scott Long
698e3209dc sparc64 is not ready for PREEMPTION, so turn it off for now. 2004-09-09 17:03:53 +00:00
Søren Schmidt
6c893545ad Release the hold on ata_delayed_attach earlier so we can use tsleep
in the boot probe as well.

Suggested by:	gibbs
2004-09-09 13:25:46 +00:00
Gleb Smirnoff
324398687f Check flag do_bridge always, even if kernel was compiled without
BRIDGE support. This makes dynamic bridge.ko working.

Reviewed by:	sam
Approved by:	julian (mentor)
MFC after:	1 week
2004-09-09 12:34:07 +00:00
Gleb Smirnoff
9fdd451496 Do not call xl_init_locked() unconditionally when we are bringed UP. Call
it only if we weren't UP before. In some cases xl_init causes long media
re-negotiation, and ppp(8) fails to open PPPoE connection because it sets
IFF_UP every time before opening PPPoE connection.

PR:		kern/69133
Patch by:	mdodd
Approved by:	wpaul, julian (mentor)
MFC after:	1 week
2004-09-09 12:16:29 +00:00
Robert Watson
030c6fb156 Hard code witness lock order for BPF locks. 2004-09-09 05:01:37 +00:00
Robert Watson
46448b5a1b Reformulate bpf_dettachd() to acquire the BIF_LOCK() as well as
BPFD_LOCK() when removing a descriptor from an interface descriptor
list.  Hold both over the operation, and do a better job at
maintaining the invariant that you can't find partially connected
descriptors on an active interface descriptor list.

This appears to close a race that resulted in the kernel performing
a NULL pointer dereference when BPF sessions are detached during
heavy network activity on SMP systems.

RELENG_5 candidate.
2004-09-09 04:11:12 +00:00
Robert Watson
4a3feeaa86 Reformulate use of linked lists in 'struct bpf_d' and 'struct bpf_if'
to use queue(3) list macros rather than hand-crafted lists.  While
here, move to doubly linked lists to eliminate iterating lists in
order to remove entries.  This change simplifies and clarifies the
list logic in the BPF descriptor code as a first step towards revising
the locking strategy.

RELENG_5 candidate.

Reviewed by:	fenner
2004-09-09 00:19:27 +00:00
Robert Watson
d17d818425 Compare/set pointers using NULL not 0. 2004-09-09 00:11:50 +00:00
Nate Lawson
f6cb6ecd55 Clean up rev 1.49 by using the temperature conversion for _PSV also and
wrap a long line.
2004-09-08 19:36:07 +00:00
Alan Cox
e232eb8288 Use atomic ops in pmap_clear_ptes() to prevent SMP races that could
result in the loss of an accessed or modified bit from the pte.

In collaboration with: tegge@

MT5 candidate
2004-09-08 18:58:29 +00:00
Max Khon
51eb0765c6 Do not compile in zlib.c. Add a dependency on module instead. 2004-09-08 17:27:31 +00:00
Pawel Jakub Dawidek
f7b4d339ac Show current status of mirror device directly.
Suggested by:	Krzysztof Ciep³ucha <kris@home.pl>
2004-09-08 16:37:22 +00:00
Tim J. Robbins
d676af371d Reduce the size of struct defid's defid_dirclust, defid_dirofs and
(disabled) defid_gen members from u_long to u_int32_t so that alignment
requirements don't cause the structure to become larger than struct fid
on LP64 platforms. This fixes NFS exports of msdos filesystems on at
least amd64.

PR:		71173
2004-09-08 13:03:19 +00:00
Ken Smith
a6406834da Back out v1.24. v1.40 of sys/sparc64/sparc64/bus_machdep.c fixes the
problem this hack was put in place for.

MFC to be done if the fix to bus_machdep.c is MFC-ed.
2004-09-08 12:52:45 +00:00
Tim J. Robbins
6a5bf04a5b Merge from NetBSD:
Fix a problem in previous: we can't blindly assume that we have
wincnt entries available at the offset the file has been found. If the dos
directory entry is not preceded by appropriate number of long name
entries (happens e.g. when the filesystem is corrupted, or when
the filename complies to DOS rules and doesn't use any long name entry),
we would overwrite random directory entries.

There are still some problems, the whole thing has to be revisited and solved
right.

Submitted by:	Xin LI
2004-09-08 11:25:41 +00:00
Tim J. Robbins
d23af19a71 Merge from NetBSD:
Fix a panic that occurred when trying to traverse a corrupt msdosfs
filesystem.  With this particular corruption, the code in pcbmap()
would compute an offset into an array that was way out of bounds,
so check the bounds before trying to access and return an error if
the offset would be out of bounds.

Submitted by:	Xin LI
2004-09-08 10:57:09 +00:00
Alfred Perlstein
7a3b8aefbf sync with private code:
fix a 5.x'ism that 4.x needs protection from.
make this code compile standalone.
2004-09-08 08:44:14 +00:00
Ruslan Ermilov
673974d9ee Fixed sound-related hints. (Yes, this is ambiguous but matches reality.)
Reviewed by:	matk, cg (an earlier version)
MT5 after:	3 days
2004-09-08 08:42:36 +00:00
Warner Losh
63ba42fbf5 Back out 1.88.
The reference counts are there to block detach until the sleepers in
read/write/ioctl have gotten out, not to prevent the open device from
going away.  Restore the old behavior so that we have a chance to wake
up sleepers when the usb device goes away, so they can properly return
EIO back to the caller when this happens.

Otherwise, we have a guarnateed panic waiting to happen when a device
detaches with an active read channel.

This should be merged to 5 asap.
2004-09-08 07:13:39 +00:00
Scott Long
50736a153b Fix a problem with tag->boundary inheritence that has existed since day one
and was propagated to nearly every platform.  The boundary of the child needs
to consider the boundary of the parent and pick the minimum of the two, not
the maximum.  However, if either is 0 then pick the appropriate one.
This bug was exposed by a recent change to ATA, which should now be fixed by
this change.  The alignment and maxsegsz tag attributes likely also need
a similar review in the near future.

This is a MT5 candidate.

Reviewed by: marcel
Submitted by: sos (in part)
2004-09-08 04:54:19 +00:00