sson [Tue, 26 May 2009 20:28:22 +0000 (20:28 +0000)]
Add the OpenSolaris dtrace lockstat provider. The lockstat provider
adds probes for mutexes, reader/writer and shared/exclusive locks to
gather contention statistics and other locking information for
dtrace scripts, the lockstat(1M) command and other potential
consumers.
jhb [Tue, 26 May 2009 20:00:30 +0000 (20:00 +0000)]
Correct the sense of a test so that this filter always waits for the full
request to arrive. Previously it would end up returning as soon as the
request length stored in the first two bytes had arrived.
rmacklem [Tue, 26 May 2009 15:19:04 +0000 (15:19 +0000)]
Add two new utilities and two new daemons to /usr/src/usr.sbin that
are specifically used by the experimental nfsv4 subsystem.
nfscbd - The NFSv4 client callback daemon.
nfsuserd - The NFSv4 daemon that maps between user and group name
and their corresponding uid/gid numbers.
nfsdumpstate - A utility that dumps out the NFSv4 Open/Lock state.
nfsrevoke - Administratively revokes an NFSv4 client, releasing all
NFSv4 Open/Lock state it holds on the server.
trasz [Tue, 26 May 2009 08:21:59 +0000 (08:21 +0000)]
MFp4 changes neccessary for NFSv4 ACLs support in ZFS. This is mostly
about removing a few #ifdefs and providing compatibility wrappers and
VOP implementations to get and set an ACL; ZFS does ACL enforcement all
by itself.
Note that the VOPs are ifdefed out for now, so this change should be
a no-op.
rmacklem [Tue, 26 May 2009 01:47:37 +0000 (01:47 +0000)]
Add two sysctl variables to the experimental nfs server, so
that the range of versions of NFS handled by the server can
be limited. The nfsd daemon must be restarted after these
sysctl variables are changed, in order for the change to take
effect.
rmacklem [Tue, 26 May 2009 01:16:09 +0000 (01:16 +0000)]
Fix the handling of NFSv4 Illegal Operation number to conform
to RFC3530 (the operation number in the reply must be set to
the value for OP_ILLEGAL). Also cleaned up some indentation.
rmacklem [Tue, 26 May 2009 01:09:33 +0000 (01:09 +0000)]
Fix the experimental nfs server's interface to the new krpc so
that it handles the case of a non-exported NFSv4 root correctly.
Also, delete handling for the case where nd_repstat is already
set in nfs_proc(), since that no longer happens.
dougb [Tue, 26 May 2009 00:07:02 +0000 (00:07 +0000)]
Per the man page:
The makekey utility has been deprecated and will be removed in a future
release of FreeBSD.
Actually removing it was approved back on 10/29/2007 by re (kensmith) but
I dropped the ball on actually removing it. It's doubtful that it's become
more relevant/useful in the intervening time.
ed [Mon, 25 May 2009 20:07:41 +0000 (20:07 +0000)]
Fix kdump build when building it by hand.
I don't entirely like this approach, but it will only be temporarily,
namely until we get rid of COMPAT_43TTY. I do want <sys/ioctl_compat.h>
to cause a compiler error when included, because it's just there for
binary compatibility.
sam [Mon, 25 May 2009 16:38:47 +0000 (16:38 +0000)]
Fix handling of devices w/o radiotap support:
o do not attach DLT_IEEE802_11_RADIO unless both tx and rx headers are
present; this is assumed in the capture code paths
o verify the above with asserts in ieee80211_radiotap_{rx,tx}
o add missing checks for active taps before calling ieee80211_radiotap_rx
attilio [Mon, 25 May 2009 14:37:10 +0000 (14:37 +0000)]
Use, in uncovered part, the END() macro in order to improve debugging.
In this specific case, Valgrind won't get confused when analyzing such
functions.
Sponsored by: Sandvine Incorporated
Tested by: emaste
MFC: 3 days
rwatson [Mon, 25 May 2009 13:34:03 +0000 (13:34 +0000)]
Add missing call to ipx_pcbdetach() during SPX socket tear-down: not
harmful in practice if running without INVARIANTS, but will panic
with KASSERT enabled when SPX sockets are closed.
rwatson [Mon, 25 May 2009 11:50:58 +0000 (11:50 +0000)]
Rather than store a skeleton IPX header in an mbuf hung off the SPX
PCB, simply embed it in the PCB, avoiding additional memory overhead,
memory allocation overhead, and removing one of the few remaining
uses of dtom() in the network stack.
Restore misplaced spx_ctlinput() from an earlier commit.
yongari [Mon, 25 May 2009 07:31:18 +0000 (07:31 +0000)]
Add workaround for Yukon FE+ A0. This controller is known to have
severe silicon bugs that can't handle VLAN hardware tagging as well
as status LE writeback bug. The status LE writeback bug is so
critical we can't trust status word of received frame. To accept
frames on Yukon FE+ A0 msk(4) just do minimal check for received
frames and pass them to upper stack. This means msk(4) can pass
corrupted frames to upper layer. You have been warned!
Also I supposed RX_GMF_FL_THR to be 32bits register but Linux
driver treated it as 16bit register so follow their leads. At least
this does not seem to break msk(4) on Yukon FE+.
Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com )
Bruce Cran ( bruce <> cran dot org dot uk )
Michael Reifenberger ( mike <> reifenberger dot com )
Stephen Montgomery-Smith ( stephen <> missouri dot edu )
yongari [Mon, 25 May 2009 07:06:10 +0000 (07:06 +0000)]
Add preliminary Yukon FE+ support and register definitions.
Yukon FE+ is fast ethernet controller and uses new descriptor
format. Since I don't have this controller, the support code was
written from guess and various feedback from enthusiastic users.
Thanks to all users who patiently tested my initial patches.
Special thanks to Tanguy Bouzeloc who fixed critical bug of initial
patch.
Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com )
Bruce Cran ( bruce <> cran dot org dot uk )
Michael Reifenberger ( mike <> reifenberger dot com )
Stephen Montgomery-Smith ( stephen <> missouri dot edu )
yongari [Mon, 25 May 2009 06:39:48 +0000 (06:39 +0000)]
Explicitly reset GMAC Controls and initialize GM_GP_CTRL register.
The GM_GP_CTRL register may have stale content from previous link
information so clearing it will make hardware update the register
correctly when it established a valid link.
While I'm here remove stale comment.
yongari [Mon, 25 May 2009 06:29:02 +0000 (06:29 +0000)]
Disable HW WOL for Yukon EC Ultra. While I'm here use switch
statement over if-else statement. This change will make it easy to
add newer Yukon controllers.
yongari [Mon, 25 May 2009 06:19:36 +0000 (06:19 +0000)]
Explicitly check resolved speed/duplex. Just checking IFM_ACTIVE
does not guarantee established link. Also 1000baseT link report for
fast ethernet controller is not valid one so make sure gigabit link
is allowed for this controller.
Whenever we lost link, check whether Rx/Tx MACs were enabled. If both
MAC are not active, do not try to disable it again.
yongari [Mon, 25 May 2009 04:22:27 +0000 (04:22 +0000)]
Rather than checking every chip revision, introduce more flags to
mark controller's capability. Controllers that have jumbo frame
support sets MSK_FLAG_JUMBO, and controllers that does not support
checksum offloading for jumbo frames will set MSK_FLAG_JUMBO_NOCSUM.
For Fast Ethernet controllers it will set MSK_FLAG_FASTETHER and it
would be used in link state handling.
While here, disable Tx checksum offloading if jumbo frame is used
on controllers that does not have Tx checksum offloading capability
for jumbo frame(e.g. Yukon EC Ultra).
yongari [Mon, 25 May 2009 02:36:29 +0000 (02:36 +0000)]
Add driver support for 88E3016 PHY which is found on Marvell Yukon
FE+ controller. Due to the severe silicon bugs for Yukon FE+, 88E3016 seems to require more workarounds. However I'm not sure
whether the workaround is PHY specific or only applicable to Yukon
FE+. The datasheet for the PHY is publicly available but it lacks
several details for the workaround used in this change. The
workaround information was obtained from Linux. Many thanks to
Yukon FE+ users who helped me add 88E3016 support.
Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com )
Bruce Cran ( bruce <> cran dot org dot uk )
Michael Reifenberger ( mike <> reifenberger dot com )
Stephen Montgomery-Smith ( stephen <> missouri dot edu )
yongari [Mon, 25 May 2009 02:05:00 +0000 (02:05 +0000)]
Do not ignore NEXT Page capability of auto-negotiation
advertisement register. Some PHYs such as 88E3016 requires NEXT
Page capability to establish valid link. Also set protocol selector
field which is read only but it makes the intention clearer.
yongari [Mon, 25 May 2009 01:56:19 +0000 (01:56 +0000)]
Don't read unnecessary PHY registers. Speed/duplex resolution bit
is valid only for auto-negotiation case so check the bit if we know
auto-negotiation is active. While I'm here explicitly checks
current speed with speed mask and set IFM_NONE if resolved speed
is unknown.
yongari [Mon, 25 May 2009 01:41:05 +0000 (01:41 +0000)]
Use mii_phy_add_media() and remove usage of local macro ADD. Also
checks extended status register to see whether the PHY is fast
ethernet or not. This removes a lot of checks for specific PHY
models and it makes easy to add more PHYs to e1000phy(4).
While I'm here remove setting mii_anegticks as it is set with
mii_phy_add_media().
rmacklem [Mon, 25 May 2009 01:00:09 +0000 (01:00 +0000)]
Add NFSv4 root export checks to the DelegPurge, Renew and
ReleaseLockOwner operations analagous to what is already
in place for SetClientID and SetClientIDConfirm. These are
the five NFSv4 operations that do not use file handle(s),
so the checks are done using the NFSv4 root export entries
in /etc/exports.
yongari [Mon, 25 May 2009 00:56:01 +0000 (00:56 +0000)]
NVIDIA MCP controllers have no Rx buffer alignment restrictions.
Remove PAGE_SIZE alignment used in Rx buffer DMA tag creation. The
alignment restriction was used in old local jumbo allocator and
nfe(4) switched to UMA backed page allocator for jumbo frame.
This change should fix jumbo buffer allocation failure.
rmacklem [Sun, 24 May 2009 19:46:12 +0000 (19:46 +0000)]
Crib the realign function out of nfs_krpc.c and add a call
to it for the client side reply. Hopefully this fixes the
problem with using the new krpc for arm for the experimental
nfs client.
trasz [Sun, 24 May 2009 19:21:49 +0000 (19:21 +0000)]
Don't allow non-owner to set SUID bit on a file. It doesn't make
any difference now, but in NFSv4 ACLs, there is write_acl permission,
which also affects mode changes.
rmacklem [Sun, 24 May 2009 18:49:53 +0000 (18:49 +0000)]
Fix the experimental NFSv4 server so that it handles the case
where a client is not allowed NFSv4 access correctly. This
restriction is specified in the "V4: ..." line(s) in
/etc/exports.
dfr [Sun, 24 May 2009 13:22:00 +0000 (13:22 +0000)]
Make sure we feed 32bit align memory to nfsm_dissect otherwise we will fault
on platforms with strict alignment requirements. In particular, this fixes the
problems with the new RPC transport on the arm platform.
Note: this adds yet another copy of nfs_realign(). I will attempt to refactor
after NFS_LEGACYRPC is removed.
kib [Sun, 24 May 2009 12:39:38 +0000 (12:39 +0000)]
The advisory lock may be activated or activated and removed during the
sleep waiting for conditions when the lock may be granted.
To prevent lf_setlock() from accessing possibly freed memory, add reference
counting to the struct lockf_entry. Bump refcount around the sleep.
Make lf_free_lock() return non-zero when structure was freed, and use
this after the sleep to return EINTR to the caller. The error code might
need a clarification, but we cannot return success to usermode, since
the lock is not owned anymore.
kib [Sun, 24 May 2009 12:33:16 +0000 (12:33 +0000)]
In lf_advlockasync(), recheck for doomed vnode after the state->ls_lock
is acquired. In the lf_purgelocks(), assert that vnode is doomed and set
*statep to NULL before clearing ls_pending list. Otherwise, we allow for
the thread executing lf_advlockasync() to put new pending entry after
state->ls_lock is dropped in lf_purgelocks().
ed [Sun, 24 May 2009 12:32:03 +0000 (12:32 +0000)]
Block when initially opening a TTY multiple times.
In the original MPSAFE TTY code, I changed the behaviour by returning
EBUSY. I thought this made more sense, because it's basically a race to
see who gets the TTY first.
It turns out this is not a good change, because it also causes EBUSY to
be returned when another process is closing the TTY. This can happen
during startup, when /etc/rc (or one of its children) is still busy
draining its data and /sbin/init is attempting to open the TTY to spawn
a getty.
dfr [Sun, 24 May 2009 11:37:10 +0000 (11:37 +0000)]
Increase the number of available file descriptors to 64. This fixes the
reported zfsboot problems for systems where more than seven drives are part
of ZFS pools.