Commit Graph

40884 Commits

Author SHA1 Message Date
David Xu
e2e8935832 Fix LOR between scheduler lock and SMP rendezvous lock.
Reviewed by: jhb
2003-07-08 00:14:30 +00:00
Garrett Wollman
e14eb5a118 FreeBSD 2.0.5 is old hat. Also cross-reference GEOM_VOL from the discussion
of wiring SCSI devices, since it provides a non-SCSI-specific way of
accomplishing a similar task.
2003-07-07 21:19:04 +00:00
Garrett Wollman
4aeb6d2671 Fix wording: `irregardless' is a solecism. 2003-07-07 21:15:01 +00:00
Garrett Wollman
00b0445c82 Put NFSSERVER in the right list of filesystem stuff. Building a kernel
with only NFSSERVER won't get you anywhere.
2003-07-07 21:13:21 +00:00
Garrett Wollman
57a42501da Single-character style fix. 2003-07-07 21:12:34 +00:00
Jeff Roberson
0ec896fd28 - Clean up an unused variable.
Submitted by:	Steve Kargl <skg@routmask.apl.washington.edu>
2003-07-07 21:08:28 +00:00
Bill Paul
39e674767e Add a workaround for the USB_PRODUCT_MCT_SITECOM_USB232 device: limit
the bulk out buffer size to 16 bytes. The bulk out endpoint descriptor
reports 32 bytes, but if you use this value, data will get dropped.

Reviewed/approved by: scottl
2003-07-07 18:01:23 +00:00
Cameron Grant
eaa69ee9a9 * add a function to display a complete feeder chain on the console, for
debugging.

* set the parent of non-format feeders, so that sndstat doesn't miss out
things like feeder_rate.

MFC:		1 week
2003-07-07 17:40:02 +00:00
Warner Losh
247056ed2a Add corega PCCL-11 to match entry added to pccarddevs a while ago.
Noticed going into openbsd...
2003-07-07 07:57:35 +00:00
Alan Cox
ecf6279f00 - Complete the vm object locking in vm_pageout_object_deactivate_pages().
- Change vm_pageout_object_deactivate_pages()'s first parameter from a
   vm_map_t to a pmap_t.
 - Change vm_pageout_object_deactivate_pages()'s and
   vm_pageout_map_deactivate_pages()'s last parameter from a vm_pindex_t
   to a long.  Since the number of pages in an address space doesn't
   require 64 bits on an i386, vm_pindex_t is overkill.
2003-07-07 07:16:29 +00:00
Mike Heffner
b1181a94a3 Reset the PSM aux device twice to help pierce through some KVM's to
get the correct data from the attached mouse. Multiple resets should
be harmless, but just in case, the second one is non-fatal and is just
ignored.
2003-07-07 05:40:13 +00:00
Cameron Grant
e2df178350 * support ich5
PR:		kern/53242
Submitted by:	Shin-ichi Yoshimoto <yosimoto@waishi.jp>  (partly)
Tested by:	Dominic Marks <dom@cus.org.uk> (version in PR)
MFC after:	1 week
2003-07-06 23:54:00 +00:00
Maxime Henrion
56e5e7ae57 Convert the dc(4) driver to the busdma API. This is a necessary step
to have this driver working on sparc64.  It still needs to be made
endian-clean before it can work there.

Special thanks to dragonk@evilcode.net for sending me a dc(4) card so
that I was able to do this work.

Many cheers to all the people that tested this change, thanks to them,
this change shouldn't break anything :-).

Tested by:	marcel (i386 and ia64), ru (i386), wilko (alpha),
		mbr (i386), wpaul (i386) and
		Will Saxon <WillS@housing.ufl.edu> (i386)
2003-07-06 21:45:31 +00:00
Alan Cox
6e3bf93111 MFi386
Updates to cnt.v_wire_count, the global count of wired pages, should be
 performed using atomic ops.
2003-07-06 20:32:42 +00:00
Brian S. Dean
fa8ee6aca1 Woops - don't forget to declare locals needed for that last commit. 2003-07-06 16:56:16 +00:00
Brian S. Dean
6745e78cee Don't unconditionally reset the hardware debug registers in cpu_exit(),
reset them only if they were previously in use.  Unconditionally
resetting the registers wipes them out frequently, which interferes
with their use for kernel debugging.

While I'm here, be less verbose in the associated comment of a
neighboring function.

Noticed by:	bde
2003-07-06 16:52:18 +00:00
Maxime Henrion
3d6ae7e047 Fix a bug that could cause dc(4) to m_freem() an already freed
mbuf or something that isn't an mbuf.

MFC after:	3 days
2003-07-06 14:39:45 +00:00
Maxime Henrion
b3811c9583 Various style(9) and readability fixes. 2003-07-06 14:36:33 +00:00
Bill Paul
79a5874541 Testing VLANs with the new 8139C+ chip (which does hardware tag
insertion and extraction) has revealed two bugs:

- In vlan_start(), we're supposed to check the underlying interface to
  see if it has the IFCAP_VLAN_HWTAGGING cabability set and, if so, set
  things up for the VLAN_OUTPUT_TAG() routine. However the code checks
  ifp->if_capabilities, which is the vlan pseudo-interface's capabilities
  when it should be checking p->if_capabilities, which relates to the
  underlying physical interface. Change ifp->if_capabilities to
  p->if_capabilities so this works.

- In vlan_input(), we have to extract the 16-bit tag value from the
  received frame and use it to figure out which vlan interface gets
  the frame. The code that we use to track down the desired vlan
  pseudo-interface is:

       for (ifv = LIST_FIRST(&ifv_list); ifv != NULL;
            ifv = LIST_NEXT(ifv, ifv_list))
                if (ifp == ifv->ifv_p && tag == ifv->ifv_tag)
                        break;

  The problem is that 'tag' is not computed consistently. In the case
  where the interface supports hardware VLAN tag extraction and calls
  VLAN_INPUT_TAG(), we do this:

                tag = *(u_int*)(mtag+1);

  But in the software emulation case, we do this

                tag = EVL_VLANOFTAG(ntohs(evl->evl_tag));

  The problem here is the EVL_VLANOFTAG() macro is only ever applied
  in this one case. It's never applied to ifv->ifv_tag or anwhere else.
  We must be consistent: either it's applied everywhere or nowhere.
  To see how this can be a problem, do something like
  ifconfig vlan0 vlan 12345 vlandev foo0 and observe the results.

  I'm not quite sure what the right thing is to do here. Neither the
  vlan(4) nor ifconfig(8) man pages suggest which way to go. For now,
  I've removed this use of EVL_VLANOFTAG() so that the tag will match
  correctly in all cases. I will not get upset if somebody makes a
  compelling argument for using EVL_VLANOFTAG() everywhere instead,
  as long as the use is consistent.
2003-07-06 03:24:25 +00:00
Cameron Grant
b6eb8f8a31 * add support for amd-768 audio, as used on many dual athlon boards. only
tested for playback.

* modify device name strings for ich chips to better conform with their
common names.

* remove superflous 'AC97 controller' from nforce device names.

MFC after: 1 week
2003-07-06 03:11:06 +00:00
Marcel Moolenaar
290245ea4c Don't call malloc() and free() while in the debugger and unwinding
to get a stacktrace. This does not work even with M_NOWAIT when we
have WITNESS and is generally a bad idea (pointed out by bde@). We
allocate an 8K heap for use by the unwinder when ddb is active. A
stack trace roughly takes up half of that in any case, so we have
some room for complex unwind situations. We don't want to waste too
much space though. Due to the nature of unwinding, we don't worry
too much about fragmentation or performance of unwinding while in
the debugger. For now we have our own heap management, but we may
be able to leverage from existing code at some later time.

While here:
o  Make sure we actually free the unwind environment after unwinding.
   This fixes a memory leak.
o  Replace Doug's license with mine in unwind.c and unwind.h. Both
   files don't have much, if any, of Doug's code left since the EPC
   syscall overhaul and the import of the unwinder.
o  Remove dead code.
o  Replace M_NOWAIT with M_WAITOK for all remaining malloc() calls.
2003-07-05 23:21:58 +00:00
Alan Cox
f278f0fbab Lock a vm object when freeing a page from it. 2003-07-05 20:51:22 +00:00
Mike Makonnen
14b5ae1a98 Make the conditional, which decides what siglist to put a signal on,
more concise and improve the comment.

Submitted by: bde
2003-07-05 08:37:40 +00:00
John-Mark Gurney
e4bfcbdb32 add the mbr_enc file so that we can load the module on sparc64. 2003-07-05 08:11:43 +00:00
Thomas Moestl
5ff9e59f71 Fix a signedness problem in zstty_cncheckc(): when no character is ready,
-1 should be returned, but it was assigned to an uint8_t (which is
extended to an int to form the return value), causing 255 to be returned
instead.
2003-07-05 01:31:30 +00:00
Robert Watson
de88922310 Remove trailing whitespace. 2003-07-05 01:24:36 +00:00
Mike Makonnen
e55c35c433 I was so happy I found the semi-colon from hell that I didn't
notice another typo in the same line. This typo makes libthr unuseable,
but it's effects where counter-balanced by the extra semicolon, which
made libthr remarkably useable for the past several months.
2003-07-04 23:28:42 +00:00
John-Mark Gurney
58ac352f32 remove \n at end of panic strings. They are added by the call to panic.
This brings us more in line with Net/OpenBSD

Obtained from:	Net/OpenBSD
2003-07-04 23:11:13 +00:00
Alan Cox
4041408f4f Add vm object locking to pmap_prefault(). 2003-07-04 22:13:39 +00:00
Luigi Rizzo
c3e5b9f154 Implement the 'ipsec' option to match packets coming out of an ipsec tunnel.
Should work with both regular and fast ipsec (mutually exclusive).
See manpage for more details.

Submitted by: Ari Suutari (ari.suutari@syncrontech.com)
Revised by: sam
MFC after: 1 week
2003-07-04 21:42:32 +00:00
Luigi Rizzo
f030c1518d Correct some comments, add opcode O_IPSEC to match packets
coming out of an ipsec tunnel.
2003-07-04 21:39:51 +00:00
Jeff Roberson
749d01b011 - Parse the cpu topology map in sched_setup().
- Associate logical CPUs on the same physical core with the same kseq.
 - Adjust code that assumed there would only be one running thread in any
   kseq.
 - Wrap the HTT code with a ULE_HTT_EXPERIMENTAL ifdef.  This is a start
   towards HyperThreading support but it isn't quite there yet.
2003-07-04 19:59:00 +00:00
Hidetoshi Shimokawa
4f93346871 Add compatibility for FreeBSD-4. 2003-07-04 14:04:41 +00:00
Hartmut Brandt
98ab6e3295 Delete a superfluous semi-colon.
Pointed out by: nick@garage.freebsd.pl
2003-07-04 13:41:03 +00:00
Poul-Henning Kamp
a5d841d4ce Remove unnecessary cast. 2003-07-04 12:23:43 +00:00
Poul-Henning Kamp
1226914c17 Use the f_vnode field to tell which file descriptors have a vnode. 2003-07-04 12:20:27 +00:00
Poul-Henning Kamp
b941a2beb7 We just cached the inode pointer, no need to call VTOI() again. 2003-07-04 12:16:33 +00:00
Maxime Henrion
139cfa581e - Ensure that the busdma API won't do deferred loads by using the
BUS_DMA_NOWAIT flag, since the code can't handle this.
- Use NULL, NULL for the lockfunc and lockfuncarg parameters of
  bus_dma_tag_create() since deferred loads can't happen now.
2003-07-04 11:46:23 +00:00
Mike Makonnen
1069e3a6f4 It's unfair how one extraneous semi-colon can cause so much grief. 2003-07-04 11:18:07 +00:00
Maxime Henrion
dbe4792865 The em(4) driver has been converted to busdma and doesn't use
vtophys() anymore, so remove the alpha hack which defines
vtophys() to alpha_XXX_dmamap().
2003-07-04 10:15:16 +00:00
Mike Makonnen
71cfaac0b0 style(9)
o Remove double-spacing, and while I'm here add a couple
  of braces as well.

Requested by:	bde
2003-07-04 06:59:28 +00:00
Olivier Houchard
a10d5f02c8 In setpgrp(), don't assume a pgrp won't exist if the provided pgid is the same
as the target process' pid, it may exist if the process forked before leaving
the pgrp.
Thix fixes a panic that happens when calling setpgid to make a process
re-enter the pgrp with the same pgid as its pid if the pgrp still exists.
2003-07-04 02:21:28 +00:00
John-Mark Gurney
c97325b0c8 WARNING: white space diff
This code reduces the number of trailing white space to be more in line
w/ NetBSD.  I don't regenerate usbdevs, saving that for when it really
changes.
2003-07-04 01:50:39 +00:00
Mike Makonnen
8689793bfb kse_thr_interrupt should target the thread, specifically.
Requested by:	davidxu
2003-07-04 01:41:32 +00:00
Julian Elischer
53dc6459d7 Allow the caller to get an erro direclty if we sent the packet immediatly.
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
MFC after:	1 day
2003-07-03 22:09:47 +00:00
Warner Losh
b84e866a18 Due to extreme bogusness in the pci bus layer, these drivers were
forced to do slightly bogus power state manipulation.  However, this
is one of those features that is preventing further progress, so mark
them as BURN_BIRDGES like I did for the drivers in sys/dev/...

This, like the other change, are a no-op unless you have BURN_BRIDGES
in your kernel.
2003-07-03 21:39:53 +00:00
Alan Cox
1f78f902a8 Background: pmap_object_init_pt() premaps the pages of a object in
order to avoid the overhead of later page faults.  In general, it
implements two cases: one for vnode-backed objects and one for
device-backed objects.  Only the device-backed case is really
machine-dependent, belonging in the pmap.

This commit moves the vnode-backed case into the (relatively) new
function vm_map_pmap_enter().  On amd64 and i386, this commit only
amounts to code rearrangement.  On alpha and ia64, the new machine
independent (MI) implementation of the vnode case is smaller and more
efficient than their pmap-based implementations.  (The MI
implementation takes advantage of the fact that objects in -CURRENT
are ordered collections of pages.)  On sparc64, pmap_object_init_pt()
hadn't (yet) been implemented.
2003-07-03 20:18:02 +00:00
Mike Makonnen
c197abc49a Signals sent specifically to a particular thread must
be delivered to that thread, regardless of whether it
has it masked or not.

Previously, if the targeted thread had the signal masked,
it would be put on the processes' siglist. If
another thread has the signal umasked or unmasks it before
the target, then the thread it was intended for would never
receive it.

This patch attempts to solve the problem by requiring callers
of tdsignal() to say whether the signal is for the thread or
for the process. If it is for the process, then normal processing
occurs and any thread that has it unmasked can receive it.
But if it is destined for a specific thread, it is put on
that thread's pending list regardless of whether it is currently
masked or not.

The new behaviour still needs more work, though.  If the signal
is reposted for some reason it is always posted back to the
thread that handled it because the information regarding the
target of the signal has been lost by then.

Reviewed by:	jdp, jeff, bde (style)
2003-07-03 19:09:59 +00:00
Tom Rhodes
3c01bab8a3 If bread() returns a zero-length buffer, as can happen after a
failed write, return an error instead of looping forever.

PR:		37035
Submitted by:	das
2003-07-03 14:54:47 +00:00
John Baldwin
5cc1a74e77 Silly compile fixes from resource_disabled() commit.
Reported by:	tinderbox
Pointy hat to:	jhb
2003-07-03 14:33:17 +00:00