Commit Graph

49373 Commits

Author SHA1 Message Date
Andre Oppermann
f91248c1ad If we have to 'ipfw fwd'-tag a packet the second time in ipfw_pfil_out() don't
prepend an already existing tag again.  Instead unlink it and prepend it again
to have it as the first tag in the chain.

PR:		kern/71380
2004-09-13 19:20:14 +00:00
Lukas Ertl
fce2deb197 Rename gv_kill_thread() to gv_kill_plex_thread(), since there are more
threads to come.
2004-09-13 17:44:47 +00:00
Lukas Ertl
a0781b98f3 Save the config back to disk when a drive goes down. 2004-09-13 17:33:52 +00:00
Lukas Ertl
ea29a30466 Read a whole sector instead of GV_HDR_LEN, since a sector might be
bigger (i.e. on CD-ROMs).
2004-09-13 17:27:58 +00:00
Andre Oppermann
f4fca2d8d3 Make comments more clear for the packet changed cases after pfil hooks. 2004-09-13 17:09:06 +00:00
Andre Oppermann
eedc0a7535 Fix ip_input() fallback for the destination modified cases (from the packet
filters).  After the ipfw to pfil move ip_input() expects M_FASTFWD_OURS
tagged packets to have ip_len and ip_off in host byte order instead of
network byte order.

PR:		kern/71652
Submitted by:	mlaier (patch)
2004-09-13 17:01:53 +00:00
Andre Oppermann
7c0102f575 Make 'ipfw tee' behave as inteded and designed. A tee'd packet is copied
and sent to the DIVERT socket while the original packet continues with the
next rule.  Unlike a normally diverted packet no IP reassembly attemts are
made on tee'd packets and they are passed upwards totally unmodified.

Note: This will not be MFC'd to 4.x because of major infrastucture changes.

PR:		kern/64240 (and many others collapsed into that one)
2004-09-13 16:46:05 +00:00
Scott Long
4c2ca0f7c8 Pull the correct clock frequency value out of OFW. Why the helper function
doesn't do this is beyond me, but that will be investigated later.  This
results in programming the chip with the correct frequency, which in turn
allows devices to negotiate up to the full 20MB/s.
2004-09-13 15:15:38 +00:00
Pawel Jakub Dawidek
7e8ca741ca Make kern.geom.debugflags sysctl tunable from /boot/loader.conf.
It will help to debug problems when booting.

Approved by:	phk
2004-09-13 14:58:27 +00:00
Poul-Henning Kamp
67673e6677 Create struct snapdata which contains the snapshot fields from cdev
and the previously malloc'ed snapshot lock.

Malloc struct snapdata instead of just the lock.

Replace snapshot fields in cdev with pointer to snapdata (saves 16 bytes).

While here, give the private readblock() function a vnode argument
in preparation for moving UFS to access GEOM directly.
2004-09-13 07:29:45 +00:00
Poul-Henning Kamp
883d3c0c07 Remove the buffercache/vnode side of BIO_DELETE processing in
preparation for integration of p4::phk_bufwork.  In the future,
local filesystems will talk to GEOM directly and they will consequently
be able to issue BIO_DELETE directly.  Since the removal of the fla
driver, BIO_DELETE has effectively been a no-op anyway.
2004-09-13 06:50:42 +00:00
Alan Cox
031102cc7b Use an atomic op to update the pte in pmap_protect(). This is to prevent
the loss of a page modified (PG_M) bit in a race between processors.

Quoting Tor:
	One scenario where the old code could cause a lost PG_M bit is a
	multithreaded linux program (or FreeBSD program using the
	linuxthreads port) where one thread was starting a subprocess.
	The thread doing fork() would call vmspace_fork(), which would then
	call vm_map_copy_entry() which would call pmap_protect() on an area
	possibly accessed by other threads.

Additionally, make the clearing of PG_M by pmap_protect() unconditional if
write permission is removed.  Previously, PG_M could persist on a read-only
unmanaged page.  That seems inconsistent and confusing.

In collaboration with: tegge@

MT5 candidate
PR: 61852
2004-09-12 20:20:40 +00:00
Don Lewis
2e715afcac Change sb_lock() calls to sbc_lockassert() and remove the sb_unlock()
calls in sb_cmd2() and sb_getmixer().  The lock has already be grabbed
before these functions are called.

This is a RELENG_5 candidate.

PR:		71189
Submitted by:	stephane
MFC after:	3 days
2004-09-12 18:19:42 +00:00
Ceri Davies
8c5923d931 Typo fix. 2004-09-12 12:13:29 +00:00
Marcel Moolenaar
fa3b7cae8d Catch up with other platforms: switch the default scheduler to 4BSD. 2004-09-12 05:50:32 +00:00
Scott Long
bd971c4961 Put some of the probe messages under bootverbose so to lessen the noise. 2004-09-12 03:19:32 +00:00
Bill Paul
9d77459ca7 Remove unneeded TX channel wakeup from vge_txeof(). This was put
there for testing and forgotten. It's not really needed, and taking
it out saves a register access.
2004-09-11 22:13:25 +00:00
Alan Cox
5e4bdb57cb System maps are prohibited from mapping vnode-backed objects. Take
advantage of this restriction to avoid acquiring and releasing Giant when
wiring pages within a system map.

In collaboration with: tegge@
2004-09-11 18:49:59 +00:00
Poul-Henning Kamp
4090065137 Fix a problem that shows up if less than the full complement of
lock sectors are defined ("number_of_keys" argument to gbde init being
less than 4 in the default compile).
2004-09-11 17:58:53 +00:00
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