Commit graph

28029 commits

Author SHA1 Message Date
Bruce Evans b228f1f47a Fixed style bugs (indentation errors, missing punctuation, and unsorting)
in rev.1.61.
2001-10-04 07:25:16 +00:00
Bruce Evans 152bd66c13 Fixed a missing forward declaration and unsorting of prototypes in rev.1.18. 2001-10-04 07:12:37 +00:00
Bruce Evans 05e47d1f21 Fixed a missing proc -> thread substitution.
Broke future detection of this bug in userland by not declaring kernel
prototypes in userland.
2001-10-03 17:23:26 +00:00
Søren Schmidt e55639dbdd Doh! committed from the wrong tree, this is the right "stuff"... 2001-10-03 11:36:25 +00:00
Søren Schmidt 7f6d63666d Proberly support the Promise TX2/4.
Programming info kindly provided by Daniela Engert <dani@ngrt.de>
2001-10-03 08:27:29 +00:00
Doug Rabson 712bc4a99a The encoding for the bus being passed to SAL was completely wrong. 2001-10-03 08:25:58 +00:00
Søren Schmidt 592fcea788 cosmetics in the bootverbose probe- 2001-10-03 08:25:37 +00:00
Søren Schmidt 9b7c4d4ea0 Hopefully fix the identify failed on ATAPI slaves on some notebooks. 2001-10-03 08:25:11 +00:00
Takanori Watanabe c84f2b288e Add PnP ID 'IBM3781' for TP240 mouse. 2001-10-03 07:26:28 +00:00
Matt Jacob 77049e810b Let's not kid ourselves- we don't *really* support jumbframes yet.
We only support the size of frame we are currently allocating, which
is MCLBYTES - sizeof (struct ether_header) usable, so don't set an
MTU that would go over this.
2001-10-02 22:36:49 +00:00
Dag-Erling Smørgrav b84ce33438 Add a PFS_DISABLED flag; pfs_visible() automatically returns 0 if it is set
on the node in question.  Also add two API functions for setting and clearing
this flag; setting it also reclaims all vnodes associated with the node.
2001-10-02 22:22:42 +00:00
Matt Jacob 1c3903d23f Various fixes and improvements- some from the folks at Sitara Networks (thx) 2001-10-02 22:21:21 +00:00
Dag-Erling Smørgrav b7004390b3 Only print "XXX (un)registered" message if bootverbose. 2001-10-02 22:21:07 +00:00
Matt Jacob 22883e3c68 Fix problem where a user buffer outside of the area being tested
will be corrupted.

PR:		29194
Obtained from:	Tor.Egge@fast.no
MFC after:	2 weeks
2001-10-02 18:34:20 +00:00
Matt Jacob 8ec410b54a Documentation comment: note that the each NIC's softc is assumed to start
with an ifnet structure.

MFC after:	1 week
2001-10-02 18:08:34 +00:00
Robert Watson ab66aa1468 o Replace two direct uid!=0 comparisons with suser_xxx() calls.
Obtained from:	TrustedBSD Project
2001-10-02 14:41:43 +00:00
Robert Watson b73d2870cd o Replace two direct uid!=0 comparisons with suser_td() calls.
Obtained from:	TrustedBSD Project
2001-10-02 14:34:22 +00:00
Kazutaka YOKOTA 82fe828980 Fix the ANSI color escape sequence \E[m.
- Corretly map the ansi color number to a PC BIOS color.
- Handle multiple arguments to the escape sequence.
2001-10-02 13:11:35 +00:00
Kazutaka YOKOTA 4238458ba2 Fix the local macro: isvisible().
- The space char (0x20) IS a visible char :-)
2001-10-02 09:13:07 +00:00
Marcel Moolenaar 6b207c0e90 Remove redundant and misplaced "options DDB" line. 2001-10-02 06:18:23 +00:00
Matthew Dillon 4c94c7bfb9 Backout the last commit. The problem is actually much worse then I
first thought and may require serious work to the VOP_RENAME() api itself.
Basically, by the time the VOP_RENAME() function is called, it's already
too late.
2001-10-02 04:26:58 +00:00
Matthew Dillon be2a975a9f IN_RENAME should only be cleared by the routine that set it. This fixes
a rename/rmdir race that has been shown to cause a panic.

Bug reported by: Yevgeniy Aleynikov <eugenea@infospace.com>
MFC after:	3 days
2001-10-02 02:58:48 +00:00
Matt Jacob 4a5470eebd Remove all OpenBSD/NetBSD code. It was the right place to start from, but
it now really gets in the way.

This allows us to fix several problems- not least of which was problems
of ordering about when you'd have a device softc for an miibus child
available or not. Move some steps of things around.

Put the ifnet/arpcom structure at the head of the softc (PR 29249).

Don't do tx gc in the interrupt service routine- that seems to make
things a bit more efficient.

Enable jumbo support by default- but this version of 'jumbo' is broken
because it really is just using multiple tfd/rfd's to match a packet,
which will never be > CLSIZE anyway.

This should begin the first steps toward cleaning this driver up.

PR:		29249
MFC after:	1 week
2001-10-02 00:13:44 +00:00
Mike Silbersack 0742c2bb67 grammar fix: to -> too 2001-10-01 23:41:13 +00:00
Matt Jacob 79a79ad9b8 Note the 'common knowledge' assumption that each NIC's softc starts
with an ifnet structure (so device_get_softc will get one).

If memory allocation fails in mii_phy_probe, don't just march ahead into
a panic- return ENOMEM.

MFC after:	1 week
2001-10-01 22:57:57 +00:00
John Baldwin 0479e3d339 Move the ap boot spin lock earlier in the lock order before the sio(4)
lock since we occasionally call printf() while holding the ap boot lock
which can call down into the sio(4) driver if using a serial console.
2001-10-01 22:50:30 +00:00
John Baldwin 7105201b3d Sigh, statclock_process() takes a KSE instead of a thread for its first
argument.
2001-10-01 22:26:47 +00:00
Warner Losh cf7ed68316 Add d_thread_t. This is a typedef for struct thread in -current and
will be one for struct proc in stable.  those drivers needing to have
cross version portability should use d_thread_t instead of inventing
their own means.  Non-drivers, and drivers that either only run on
-current or must look under the covers of the struct proc/thread
should must not use this.

As noted in arch@, this minorly violates style(9), but the sys/conf.h
devsw already violates this and all I'm doing is extending the
violation to ease the burdon on device driver writers.  It was judged
that this minor violation, which doesn't impact userland or those
people not using it, was preferable to the alternatives (eg #define
proc thread).  C does not allow a way to rename or alias structs
easily, so we fall back to using a typedef.

Bump FreeBSD_version to reflect this change (porters guide to be done
in a separate commit).
2001-10-01 20:15:11 +00:00
Robert Watson c6ab2f6b4e o Complete the migration from suser error checking in the following form
in vfs_syscalls.c:

    if (mp->mnt_stat.f_owner != p->p_ucred->cr_uid &&
        (error = suser_td(td)) != 0) {
            unwrap_lots_of_stuff();
            return (error);
    }

  to:

    if (mp->mnt_stat.f_owner != p->p_ucred->cr_uid) {
            error = suser_td(td);
            if (error) {
                unwrap_lots_of_stuff();
                return (error);
            }
    }

  This makes the code more readable when complex clauses are in use,
  and minimizes conflicts for large outstanding patchsets modifying the
  kernel authorization code (of which I have several), especially where
  existing authorization and context code are combined in the same if()
  conditional.

Obtained from:	TrustedBSD Project
2001-10-01 20:01:07 +00:00
Jonathan Lemon 25871c13b8 Update the hash table when sppp mucks directly with the interface address. 2001-10-01 18:14:49 +00:00
Jonathan Lemon 22c819a73a in_ifinit apparently can be used to rewrite an ip address; recalculate
the correct hash bucket for the entry.

Submitted by: iedowse  (with some munging by me)
2001-10-01 18:07:08 +00:00
Jonathan Lemon a743950fc2 sppp rewrites the interface's ip address directly; this breaks when the
address is looked up via a hash table.  Add a hack to move the entry to
a new hash bucket when the address changes.

Submitted by: tmm
2001-10-01 18:03:56 +00:00
Luigi Rizzo cc33247e33 Fix a problem with unnumbered rules introduced in latest commit.
Reported by: des
2001-10-01 17:35:54 +00:00
Ruslan Ermilov 32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Søren Schmidt 7a845ac23c Change the way DAO/TAO mode is init'ed.
Fix a bogon introduced in the previous commit, that broke CDIOREADSUBCHANNEL.
2001-10-01 14:59:52 +00:00
Søren Schmidt 19a7ba3ed2 Add test_write element. 2001-10-01 14:56:56 +00:00
Kazutaka YOKOTA b827a63aa6 Fix the function CD(): "Clear to the end of the screen".
- When the video BIOS is called to clear the region (x, y)-(79, 24)
  (by scrolling), the slashed region in Fig.1 is cleared.  CD() is
  supposed to clear the region shown in Fig.2.
        x                 x
    +-------+         +-------+
    |       |         |       |
   y|   ////|        y|   ////|
    |   ////|         |///////|
    |   ////|         |///////|
    +-------+         +-------+
      Fig.1             Fig.2

- Don't move the cursor during this operation.
2001-10-01 11:48:02 +00:00
Kazutaka YOKOTA 6c8e596705 This is white-space only change. No functional difference.
- Be consistent about placing spaces around keywords and
  operators; don't mix statements like "if(A==B)" and "if (X == Y)",
  "return(0)" and "return (-1)", "P=10" and "Q = 0", etc.

- Consitently indent lines. It's not good to indent by 8 columns
  in one part of the file, and by 4 columns in the other part.
2001-10-01 11:42:25 +00:00
Matthew Dillon b5810bab2d After extensive testing it has been determined that adding complexity
to avoid removing higher level directory vnodes from the namecache has
no perceivable effect and will be removed.  This is especially true
when vmiodirenable is turned on, which it is by default now.  ( vmiodirenable
makes a huge difference in directory caching ).  The vfs.vmiodirenable and
vfs.nameileafonly sysctls have been left in to allow further testing, but
I expect to rip out vfs.nameileafonly soon too.

I have also determined through testing that the real problem with numvnodes
getting too large is due to the VM Page cache preventing the vnode from
being reclaimed.  The directory stuff made only a tiny dent relative
to Poul's original code, enough so that some tests succeeded.  But tests
with several million small files show that the bigger problem is the VM Page
cache.  This will have to be addressed by a future commit.

MFC after:	3 days
2001-10-01 04:33:35 +00:00
Dag-Erling Smørgrav e4fea9d1dd Catch up with the visibility callback stuff, and give up trying to keep the
file definitions on single lines.
2001-10-01 04:31:05 +00:00
Dag-Erling Smørgrav 24efa9d3fa [the previous commit to pseudofs_vncache.c got the wrong log message]
YA pseudofs megacommit, part 2:

 - Merge the pfs_vnode and pfs_vdata structures, and make the vnode cache
   a doubly-linked list.  This eliminates the need to walk the list in
   pfs_vncache_free().

 - Add an exit callout which revokes vnodes associated with the process
   that just exited.  Since it needs to lock the cache when it does this,
   pfs_vncache_mutex needs MTX_RECURSE.
2001-10-01 04:26:33 +00:00
Dag-Erling Smørgrav 198bc14b1d YA pseudofs megacommit, part 1:
- Add a third callback to the pfs_node structure.  This one simply returns
   non-zero if the specified requesting process is allowed to access the
   specified node for the specified target process.  This is used in
   addition to the usual permission checks, e.g. when certain files don't
   make sense for certain (system) processes.

 - Make sure that pfs_lookup() and pfs_readdir() don't yap about files
   which aren't pfs_visible().  Also check pfs_visible() before performing
   reads and writes, to prevent the kind of races reported in SA-00:77 and
   SA-01:55 (fork a child, open /proc/child/ctl, have that child fork a
   setuid binary, and assume control of it).

 - Add some more trace points.
2001-10-01 04:22:20 +00:00
Matt Jacob 53036e9289 Begin to implement target mode that for Fibre Channel has a private
per-command component that we *don't* try and pass thru CAM. CAM just
is too risky and too much of a pain- structures get copied, but not
all info of interest can be considered safely transported thru all
consumers (including user space) from the incoming ATIO to the outgoing
CTIO- it's just much safer to have a buddy structure, identified by the
command's tag which *does* make it thru safely.

Pay attention to link speed and report 200MB/s xfer speed for a
23XX card in 2GPs mode.

MFC after:	1 week
2001-10-01 03:48:42 +00:00
Matt Jacob c507669af4 Implement a call to get the actual link data rate (if 23XX) so we can
set whether it's a 2Gps or 1Gps link.

MFC after:	1 week
2001-10-01 03:45:54 +00:00
Jake Burkholder 5792b5403b Add identcpu.c. 2001-09-30 21:35:32 +00:00
Matthew Dillon e2505aa676 Add __FBSDID's to libalias 2001-09-30 21:03:33 +00:00
Jake Burkholder fc67f24833 Add contents to struct *reg. 2001-09-30 19:59:07 +00:00
Jake Burkholder fa753b0bcb Optimize bcopy and bzero etc to use 64 bit loads and stores if possible.
Handle overlap in bcopy.
Add routines for copying and zeroing pages using physical addresses
directly.
Remove all the hacks to account for calling the firmware on its own
trap table, we use the kernel trap table.  There is still a problem
with OF_exit().
2001-09-30 19:50:39 +00:00
Jake Burkholder c4bc2cc714 Use %ver to identify the cpu instead of openfirmware.
Submitted by:	robert
2001-09-30 19:45:34 +00:00
Jake Burkholder 92767809a8 Remove some debug code, add traces. 2001-09-30 19:44:19 +00:00