Commit Graph

103273 Commits

Author SHA1 Message Date
imp
c958d06940 Step 1 in moving EISA devices to kobj/newbus. Use kobj methods for
all of the interface between the driver and the bus.  This will enable
us to stop special casing eisa bus attachments in modules and treat them
like we treat all other busses.

In the longer run, we need to eliminate much (all?) of these interfaces
and switch to using the standard bus_alloc_resource(), but that's not
done right now.

# I've not updated the modules to include eisa, etc, just yet

Tested on: Compaq Proliant 3000/333 purchased for eisa work
2004-06-09 16:08:20 +00:00
wpaul
fe5a153f53 Add some special case code to fix a problem with the BCM5704 in TBI (fiber)
mode. The 5704 apparently has some s00p3r s33kr1t registers for setting
the advertisement of pause frame ability (i.e flow control) when in
autoneg mode. If we don't set these registers correctly, we may not
be able to negotiate a proper link with some switches. (Symptom is that
the NIC reports the link as up (PCS synched) but no traffic can be
exchanged.)

PR:		kern/67598
2004-06-09 16:01:59 +00:00
le
5f449b8087 Remove duplicate #include.
PR:             misc/67748
Submitted by:   bugghy <bugghy@phenix.rootshell.be>
2004-06-09 15:40:00 +00:00
mux
90deaa0a63 Fix a panic happening when m_getm() is called with len < MCLBYTES.
Reported by:	ale
Tested by:	ale
Reviewed by:	bosko
2004-06-09 14:53:35 +00:00
naddy
52e18c6c23 Replace handrolled CRC calculation with ether_crc32_[lb]e(). 2004-06-09 14:34:04 +00:00
jmallett
00cffe3fcf Add a comment explaining td_critnest's initial state and its life from that
point on, as it happens relatively indirectly, and in a codepath the casual
reader may not be acquainted with or find obvious.

Glanced at by:	jhb
2004-06-09 14:06:44 +00:00
dwmalone
7f971d53a9 Add some more details about what traceroute6 does.
Submitted by:	Orla McGann <orly@redbrick.dcu.ie>
Obtained from:	KAME
MFC after:	2 weeks
2004-06-09 12:45:51 +00:00
phk
3ff4d97d57 Update kvm mode to match kernel changes. 2004-06-09 12:20:44 +00:00
den
d7b7f00e1f Update copyright years. 2004-06-09 10:56:32 +00:00
das
5f921b7f25 Include <sys/cdefs.h> earlier to get the various visibility constants.
Previously, we were relying on <sys/_types.h> to include it implicitly.
2004-06-09 10:32:05 +00:00
phk
dd18d90a0a Rename struct pt_ioctl to "ptsc" and pointers to it from "pti" to "pt" 2004-06-09 10:21:53 +00:00
phk
a9af1dba3e Ditch K&R function style 2004-06-09 10:16:14 +00:00
phk
3692195f5a Reference count struct tty.
Add two new functions: ttyref() and ttyrel().  ttymalloc() creates a struct
tty with a reference count of one.  when ttyrel sees the count go to zero,
struct tty is freed.

Hold references for open ttys and for ttys which are controlling terminal
for sessions.

Until drivers start using ttyrel(), this commit will make no difference.
2004-06-09 09:41:30 +00:00
phk
1777f5359e Fix a race in destruction of sessions. 2004-06-09 09:29:08 +00:00
phk
5989134159 Move PTY private defines into PTY private files. 2004-06-09 09:09:54 +00:00
obrien
2ad1b2602b style.Makefile(5) 2004-06-09 08:27:05 +00:00
imp
5e2e0b3618 Only match cards that claim to be network cards. I've had two
different cards that matched vendor/id, but weren't wi cards.  This is
because the vendor foolishly didn't have unique product ids.  Symbol
has a serial card that would otherwise match the wi driver, for
example...

Taken from a patch for xe posted by: Carlos Velasco
2004-06-09 06:31:40 +00:00
rwatson
7e4c9eb30f Introduce a netisr to deliver kernel-generated routing, avoiding
recursive entering of the socket code from the routing code:

- Modify rt_dispatch() to bundle up the sockaddr family, if any,
  associated with a pending mbuf to dispatch to routing sockets, in
  an m_tag on the mbuf.

- Allocate NETISR_ROUTE for use by routing sockets.

- Introduce rtsintrq, an ifqueue to be used by the netisr, and
  introduce rts_input(), a function to unbundle the tagged sockaddr
  and inject the mbuf and address into raw_input(), which previously
  occurred in rt_dispatch().

- Introduce rts_init() to initialize rtsintrq, its mutex, and
  register the netisr.  Perform this at the same point in system
  initialization as setup of the domains.

This change introduces asynchrony between the generation of a
pending routing socket message and delivery to sockets for use
by userspace.  It avoids socket->routing->rtsock->socket use and
helps to avoid lock order reversals between the routing code and
socket code (in particular, raw socket control blocks), as route
locks are held over calls to rt_dispatch().

Reviewed by:		"George V.Neville-Neil" <gnn@neville-neil.com>
Conceptual head nod by:	sam
2004-06-09 02:48:23 +00:00
naddy
d9a8ed2dbc Replace convoluted and broken CRC calcuation with ether_crc32_le().
This should fix multicast reception.
2004-06-09 00:30:11 +00:00
naddy
e0b9dbe1ef * Fix multicast reception.
* Replace handrolled crc calculation with ether_crc32_le().

Based on:

PR:		67544
Submitted by:	HASHI Hiroaki <hashiz@tomba.cskk-sv.co.jp>
2004-06-09 00:25:44 +00:00
darrenr
48a1651c6d Recognise NOINET6 as an indication to not build IPv6 enabled source even
if FreeBSD header files, etc, support it.

Submitted by:	Sergey Mokryshev <mokr@mokr.net>
2004-06-08 23:52:22 +00:00
obrien
7a1212a9ab Back out rev 1.3.
This is one of the few RC scripts that doesn't use rc.subr, and thus
doesn't source rc.conf. :-(
2004-06-08 19:53:25 +00:00
brueffer
8ae1718f93 Fix typo
Obtained from:	DragonFly BSD
MFC after:	3 days
2004-06-08 17:36:17 +00:00
csjp
a8bd7fdeab Add note that rmuser will clean up any IPC mechanisms owned by the user.
Approved by:	bmilekic (mentor)
2004-06-08 14:52:55 +00:00
stefanf
1d1f53a52d Remove an #if section originally written for Sun compilers. 2004-06-08 13:46:31 +00:00
stefanf
ce8e58fb1a Avoid assignments to cast expressions.
Reviewed by:	md5
Approved by:	das (mentor)
2004-06-08 13:08:19 +00:00
stefanf
484004ba16 Signal handlers are supposed to take an int parameter.
Approved by:	das (mentor)
2004-06-08 12:24:47 +00:00
stefanf
b9b627bcfb Remove a couple of casts added for an ancient Sun compiler.
Approved by:	das (mentor)
2004-06-08 12:20:40 +00:00
stefanf
289dfdc6d7 - Don't use argv[i] when i is uninitialised.
- Cast isdigit's argument to unsigned char.
- Remove the now unused variable i.

Approved by:	das (mentor)
2004-06-08 12:11:19 +00:00
stefanf
ff9fc1604c The third operand of the conditional operator should have type void too.
Approved by:	das (mentor)
2004-06-08 12:03:48 +00:00
joerg
19b03b5b57 Implement the BREAK_TO_DEBUGGER option for sab(4). 2004-06-08 11:58:34 +00:00
rik
3e982e3588 1. struct tty => struct tty *tty.
Requested by:	phk
2004-06-08 10:38:20 +00:00
tjr
687eba3097 Remove remnants of PGINPROF. 2004-06-08 10:37:30 +00:00
yar
2043932b5a Touch .Dd (date) since new functionality has been documented.
Reminded by:	ru
2004-06-08 09:54:53 +00:00
das
7a9a1abd40 If we are asked to print the total number of blocks, do so even if we
have no entries to print (either due to an empty directory or an
error).  This makes the -l and -s options more consistent, like
Solaris and (Debian) Linux.  To make this happen, tweak two
optimizations on the second call to display():

- Don't skip display() altogether, even if list == NULL.
- Don't skip the call to the printfn in display() if we
  need to print the total.

PR:	45723
2004-06-08 09:30:10 +00:00
das
e79220be15 Remove from the printfns the assumption that dp->list != NULL. Even
if there are no entries, these functions may be called to print the
total number of blocks (0) for consistency's sake.
2004-06-08 09:27:42 +00:00
yar
9db7d2a055 Make the legend to the table of interface flags compact
for the reader's convenience.

Suggested by:	ru
2004-06-08 09:01:37 +00:00
yar
296cb81853 Describe how polling(4) applies to network interfaces.
Reviewed by:	ru
2004-06-08 08:48:49 +00:00
das
d6567c3dfa In fts_build(), if we try to chdir and fail (e.g. due to lack of search
permission), try to continue in FTS_DONTCHDIR mode.  Of course this
won't work for long paths, but we can't descend more than one pathname
component beyond the directory anyway if we lack search permission.

Here is a transcript demonstrating the change, where oldls is ls(1)
linked with the old fts(3):

	das@VARK:~> mkdir t && touch t/{a,b,c} && chmod u-x t
	das@VARK:~> oldls t
	a       b       c
	das@VARK:~> oldls -l t
	das@VARK:~> \ls t
	a       b       c
	das@VARK:~> \ls -l t
	ls: a: Permission denied
	ls: b: Permission denied
	ls: c: Permission denied

I had forgotten about this patch until bde reminded me.  He reports
using it without problems for over a year.

PR:	45723
2004-06-08 06:23:23 +00:00
das
ad77780229 Rename cantwrite() to prepwrite(). The latter is less confusing,
since the macro isn't really a predicate, and it has side-effects.
Also, don't set errno if prepwrite() fails, since this is done in
prepwrite() now.
2004-06-08 05:45:48 +00:00
das
6b17d45905 Rename cantwrite() to prepwrite(). The latter is less confusing,
since the macro isn't really a predicate, and it has side-effects.
2004-06-08 05:45:32 +00:00
das
e3d5e6f3ff Set errno to EBADF on attempts to write to a stream that is not
writable.  Affected callers include fwrite(), put?(), and *printf().
The issue of whether this is the right errno for funopened streams is
unresolved, but that's an obscure case, and some errno is better than
no errno.

Discussed with:	bde, jkh
2004-06-08 05:44:52 +00:00
peter
92508cd80c In pmap_extract_and_hold(), there is no need to mask off PG_FRAME because
pmap_extract() already does it.
In pmap_enter(), opa has already been masked so don't do it again.
Wrap a long line (recent transgression).
Use trunc_page() in pmap_mapdev() instead of anding with PG_FRAME, since
that is what we really meant.

Submitted by:  alc (first item)
2004-06-08 02:20:40 +00:00
peter
706753b80a Fix my silly typo in asm statement in previous commit. 2004-06-08 01:35:48 +00:00
peter
425146ee78 Argh. Remove stray number that slipped into the previous commit. 2004-06-08 01:20:37 +00:00
peter
e0e0263306 Reapply rev 1.151 after enable sse/fpuinit order fixed in mp_machdep.c
Obtained from:  das
2004-06-08 01:14:39 +00:00
peter
388d5d92b5 Set up the fpu *after* enabling SSE mode on AP's
Submitted by: (argh, I can't find the email)
2004-06-08 01:07:51 +00:00
peter
56777bd5f3 Initial PG_NX support (no-execute page bit)
- export the rest of the cpu features (and amd's features).
- turn on EFER_NXE, depending on the NX amd feature bit
- reorg the identcpu stuff a bit in order to stop treating the
  amd features as second class features (since it is now a primary feature
  bit set) and make it easier to export.
2004-06-08 01:02:52 +00:00
peter
2eebe98baa Mask pte's with PG_FRAME before passing it to PHYS_TO_VM_PAGE().. PG_NX
lives in the top 12 'available' bits.  atop() in the PHYS_TO_VM_PAGE()
macro only masks off the lower bits (by accident) and the upper bits
in the 64 bit ptes turn into "interesting" index values.
2004-06-08 00:29:42 +00:00
kientzle
6d40bbe5d3 Correct some spelling errors. 2004-06-08 00:23:27 +00:00