yongari [Fri, 20 May 2011 20:29:50 +0000 (20:29 +0000)]
MFC r221468:
Enable Ethernet@WireSpeed for BCM5718/BCM57765 family. While I'm
here inverse meaning of PHY flag as Ethernet@WireSpeed is enabled
for most PHYs.
yongari [Fri, 20 May 2011 20:26:16 +0000 (20:26 +0000)]
MFC r221445:
Add initial BCM57765 family support. The BCM57765 family seems to
have similar hardware features of BCM5718 family except the number
of receive return ring is 4. The BCM57765 family is known to
support IEEE 802.3az EEE(Energy Efficient Ethernet) but this change
does not include EEE support code. I hope EEE is implemented in
near future.
This change will support BCM57761, BCM57765, BCM57781, BCM57785,
BCM57791 and BCM57795. All hardware offloading features are
supported and suspend/resume also should work.
Many thanks to Broadcom for continuing support of FreeBSD.
trociny [Fri, 20 May 2011 17:29:03 +0000 (17:29 +0000)]
MFC r221632, r221643:
r221632:
Fix isitme(), which is used to check if node-specific configuration
belongs to our node, and was returning false positive if the first
part of a node name matches short hostname.
r221643 (pjd):
Allow to specify remote as 'none' again which was broken by r219351, where
'none' was defined as a value for checksum.
rmacklem [Fri, 20 May 2011 01:04:33 +0000 (01:04 +0000)]
MFC: r221537
Set the initial value of maxfilesize to OFF_MAX in the
new NFS client. It will then be reduced to whatever the
server says it can support. There might be an argument
that this could be one block larger, but since NFS is
a byte granular system, I chose not to do that.
rmacklem [Fri, 20 May 2011 00:51:52 +0000 (00:51 +0000)]
MFC: r221517
Change the new NFS server so that it returns 0 when the f_bavail
or f_ffree fields of "struct statfs" are negative, since the
values that go on the wire are unsigned and will appear to be
very large positive values otherwise. This makes the handling
of a negative f_bavail compatible with the old/regular NFS server.
yongari [Thu, 19 May 2011 17:18:13 +0000 (17:18 +0000)]
MFC r221817:
Explicitly clear 1000baseT control register for F1 PHY used in
AR8132 FastEthernet controller. The PHY has no ability to
establish a gigabit link. Previously only link parters which
support down-shifting was able to establish link.
This change should fix a long standing link establishment issue of
AR8132.
rmacklem [Thu, 19 May 2011 01:35:52 +0000 (01:35 +0000)]
MFC: r221467
Fix the new NFS client so that it handles the 64bit fields
that are now in "struct statfs" for NFSv3 and NFSv4. Since
the ffiles value is uint64_t on the wire, I clip the value
to INT64_MAX to avoid setting f_ffree negative.
rmacklem [Wed, 18 May 2011 02:14:26 +0000 (02:14 +0000)]
MFC: r221462
Add a comment noting that the NFS code assumes that the
values of error numbers in sys/errno.h will be the same
as the ones specified by the NFS RFCs and that the code
needs to be fixed if error numbers are changed in sys/errno.h.
rmacklem [Wed, 18 May 2011 01:14:27 +0000 (01:14 +0000)]
MFC: r221439
Add kernel support for NFSSVC_ZEROCLTSTATS and NFSSVC_ZEROSRVSTATS
so that they can be used by nfsstat(1) to implement the "-z" option
for the new NFS subsystem.
delphij [Mon, 16 May 2011 18:12:32 +0000 (18:12 +0000)]
MFC r217588+218386 (trasz):
Add MNT_NFS4ACLS to ZFS mount flags and make it impossible to clear
the flag by using 'mount -uw'. It's not conditional, since there
is no way to disable NFSv4 ACLs in ZFS. This should make it easier
for the NFS server to figure out whether the exported filesystem supports
ACLs or not.
kib [Sun, 15 May 2011 06:42:32 +0000 (06:42 +0000)]
MFC r220985:
Move some parts of ufs_reclaim() into helper function ufs_prepare_reclaim(),
and call the helper from VOP_RECLAIM and ffs_valloc() to properly prepare
the ufs vnode for reuse.
attilio [Sun, 15 May 2011 01:08:51 +0000 (01:08 +0000)]
MFC r221121,221173:
- Add the possibility to reuse the already last used timeout when patting
the watchdog, via the watchdog(9) interface.
- Add the possibility to pat the watchdogs installed via the watchdog(9)
interface from the kernel.
- Avoid to pass WD_ACTIVE down in the watchdog handlers. All the control
bit processing should over to the upper layer functions and not passed
down to the handlers at all.
- Add the watchdogs patting during the (shutdown time) disk syncing and
disk dumping.
rmacklem [Sun, 15 May 2011 00:43:51 +0000 (00:43 +0000)]
MFC: r221190,r221205
Fix the new NFS client so that it handles the "nfs_args" value
in mnt_optnew. This is needed so that the old mount(2) syscall
works and that is needed so that amd(8) works. The code was
basically just cribbed from sys/nfsclient/nfs_vfsops.c with minor
changes. This patch is mainly to fix the new NFS client so that
amd(8) works with it. Thanks go to Craig Rodrigues for helping with
this.
rmacklem [Sun, 15 May 2011 00:25:19 +0000 (00:25 +0000)]
MFC: r221127
This patch is believed to fix a problem in the kernel rpc for
non-interruptible NFS mounts, where a kernel thread will seem
to be stuck sleeping on "rpccon". The msleep() in clnt_vc_create()
that was waiting to a TCP connect to complete would return ERESTART,
since PCATCH was specified. Then the tsleep() in clnt_reconnect_call()
would sleep for 1 second and then try again and again and...
The patch changes the msleep() in clnt_vc_create() so it only sets
the PCATCH flag for interruptible cases.
rmacklem [Sun, 15 May 2011 00:11:00 +0000 (00:11 +0000)]
MFC: r221032,r221040,r221066
Move the files used for a diskless NFS root from sys/nfsclient
to sys/nfs in preparation for them to be used by both NFS
clients. Also, move the declaration of the three global data
structures from sys/nfsclient/nfs_vfsops.c to sys/nfs/nfs_diskless.c
so that they are defined when either client uses them.
Also, make the changes to the experimental NFS client so
that it uses the moved diskless NFS root files and fixes
it so that it links for cases where "options NFS_ROOT" is
not specified for the kernel config.
dougb [Sat, 14 May 2011 21:42:08 +0000 (21:42 +0000)]
MFC r221475:
1. If PKG_DBDIR cannot be determined from make, set the default
2. Add the -H flag to tar in case /var/db/pkg itself is a symlink
3. Direct stderr to /dev/null to suppress the leading slash warning
marius [Sat, 14 May 2011 21:15:49 +0000 (21:15 +0000)]
MFC: r220039, 220147
- A closer inspection of the OpenSolaris code indicates that the DMA
syncing for Hummingbird and Sabre bridges should be applied with every
BUS_DMASYNC_POSTREAD instead of in a wrapper around interrupt handlers
for devices behind PCI-PCI bridges only as suggested by the documentation
(code for the latter actually exists in OpenSolaris but is disabled by
default), which also makes more sense.
- Take advantage of the ofw_pci_setup_device method introduced in r220038
(MFC'ed to stable/8 in r221923) for disabling bus parking for certain
EBus bridges in order to work around hardware bugs.
- Mark some unused parameters as such.
marius [Sat, 14 May 2011 21:12:00 +0000 (21:12 +0000)]
MFC: r220038
- Merge the *_SET macros from fire(4) which generally print out the
register changes when compiled with SCHIZO_DEBUG and take advantage
of them.
- Add support for the XMITS Fireplane/Safari to PCI-X bridges. I tought
I'd need this for a Sun Fire 3800, which then turned out to not being
equipped with such a bridge though. The support for these should be
complete but given that it hasn't actually been tested probing is
disabled for now.
This required a way to alter the XMITS configuration in case a PCI-X
device is found further down the device tree so the sparc64 specific
ofw_pci kobj was revived with a ofw_pci_setup_device method, which is
called by the ofw_pcibus code for every device added.
- A closer inspection of the OpenSolaris code indicates that consistent
DMA flushing/syncing as well as the block store workaround should be
applied with every BUS_DMASYNC_POSTREAD instead of in a wrapper around
interrupt handlers for devices behind PCI-PCI bridges only as suggested
by the documentation (code for the latter actually exists in OpenSolaris
but is disabled by default), which also makes more sense.
- Add a workaround for Casinni/Skyhawk combinations. Chances are that
this solves the crashes seen when using the the on-board Casinni NICs
of Sun Fire V480 equipped with centerplanes other than 501-6780 or
501-6790. This also takes advantage of the ofw_pci_setup_device method.
- Mark some unused parameters as such.
marius [Sat, 14 May 2011 21:07:51 +0000 (21:07 +0000)]
MFC: r219785
- Make a panic message better reflect the actual problem.
- A closer inspection of the OpenSolaris code indicates the block store
workaround is only necessary in case of BUS_DMASYNC_POSTREAD.
- Mark some unused parameters as such.
marius [Sat, 14 May 2011 21:03:44 +0000 (21:03 +0000)]
MFC: r216803, r217058, r217514, r218457
On UltraSPARC-III+ and greater take advantage of ASI_ATOMIC_QUAD_LDD_PHYS,
which takes an physical address instead of an virtual one, for loading TTEs
of the kernel TSB so we no longer need to lock the kernel TSB into the dTLB,
which only has a very limited number of lockable dTLB slots. The net result
is that we now basically can handle a kernel TSB of any size and no longer
need to limit the kernel address space based on the number of dTLB slots
available for locked entries. Consequently, other parts of the trap handlers
now also only access the the kernel TSB via its physical address in order
to avoid nested traps, as does the PMAP bootstrap code as we haven't taken
over the trap table at that point, yet. Apart from that the kernel TSB now
is accessed via a direct mapping when we are otherwise taking advantage of
ASI_ATOMIC_QUAD_LDD_PHYS so no further code changes are needed. Most of this
is implemented by extending the patching of the TSB addresses and mask as
well as the ASIs used to load it into the trap table so the runtime overhead
of this change is rather low.
Theoretically it should be possible to use the same approach also for the
user TSB, which already is not locked into the dTLB, avoiding nested traps.
However, for reasons I don't understand yet OpenSolaris only does that with
SPARC64 CPUs. On the other hand I think that also addressing the user TSB
physically and thus avoiding nested traps would get us closer to sharing
this code with sun4v, which only supports trap level 0 and 1, so eventually
we could have a single kernel which runs on both sun4u and sun4v (as does
Linux and OpenBSD).
rmacklem [Sat, 14 May 2011 02:28:21 +0000 (02:28 +0000)]
MFC: r221014,r221018
Modify the experimental NFS client so that it uses the same
"struct nfs_args" as the regular NFS client. This is needed
so that the old mount(2) syscall will work and it makes
sharing of the diskless NFS root code easier. Eary in the
porting exercise I introduced a new revision of nfs_args, but
didn't actually need it, thanks to nmount(2). I re-introduced the
NFSMNT_KERB flag, since it does essentially the same thing and
the old one would not have been used because it never worked.
I also added a few new NFSMNT_xxx flags to sys/nfsclient/nfs_args.h
that are used by the experimental NFS client.
Also fix the NFS client so that it doesn't bogusly set the
f_flags argument of "struct statfs",
mav [Sat, 14 May 2011 00:35:56 +0000 (00:35 +0000)]
MFC r220829:
According to specification. device should respond to COMRESET with COMINIT
in no more then 10ms. If we detected no device presence within that time,
there is no reason to wait longer.
- Setup the default filter mode to allow filtering/steering based on IP
protocol, ingress port, inner VLAN ID, IP frag, FCoE, and MPS match
type; all combined together. You can also filter based on MAC index,
Ethernet type, IP TOS/IPv6 Traffic Class, and outer VLAN ID but you'll
have to modify the default filter mode and exclude some of the
match-fields in it.
IPv4 and IPv6 SIP/DIP/SPORT/DPORT are always available in all filter
rules.
- Add driver ioctls to get/set the global filter mode.
- Add driver ioctls to program and delete hardware filters. A couple of
the "switch" actions that rewrite Ethernet and VLAN information and
switch the packet out of another port may not work as the L2 code is not
yet in place. Everything else, including all "drop" and "pass" rules
with RSS or absolute qid, should work.
r221477:
T4 packet timestamps.
Reference code that shows how to get a packet's timestamp out of
cxgbe(4). Disabled by default because we don't have a standard way
today to pass this information up the stack.
The timestamp is 60 bits wide and each increment represents 1 tick of
the T4's core clock. As an example, the timestamp granularity is ~4.4ns
for this card:
marius [Tue, 10 May 2011 18:43:18 +0000 (18:43 +0000)]
Supply the correct size of the softc. This is a direct commit to stable/8
as in head the problem is no longer present as of r221407 but that revision
can't be MFC'ed.
n_hibma [Sat, 7 May 2011 22:20:01 +0000 (22:20 +0000)]
MFC overview:
- Fix busg in events provided to devd from the USB stack.
- Provide more info on the u3g devices that attached.
- Make the ucom device numbering more sane.
MFC r214429
Add support for setting per-interface PnP information.
MFC r214761
- Simplify the way unit/subunit allocation is done in ucom.
- hw.usb.ucom.cons_unit is now split into
hw.usb.ucom.cons_unit/...cons_subunit.
Note: The tunable/sysctl hw.usb.ucom.cons_unit needs to be reviewed if
a) a console was defined a USB serial devices, and a USB device with
more than 1 subunit is present, and this device is attached before the
device functioning as a console
or
b) a console was defined on a USB device with more than 1 subunit
MFC r214809
Don't terminate the notification with \n. This is done in
usb_device.c:devctl_notify_f().
MFC r214830
Bugfix: Move the 'at <location string' to the beginning of the attach
notification. devd would stop evaluating at 'at' (not '<k>=<v>') and
hence prevent 'port=X' (and 'bus=<"on" string>) from making it into the
environment for the devd action.
MFC r214831
- Remove an unused entry from the softc (only used in a debugging printf).
- Fix the loop count on detach (causing a panic on detaching a serial
dongle).
- Increase a buffer in case some driver want extra long tty device names
(postfixing the purpose of the tty for example, e.g. u3g.ppp).
MFC r214843
Implement ucom_set_pnpinfo_usb() providing ttyname and port number
information through devd. My E220 now produces the notification (1 line):
kaiw [Sat, 7 May 2011 10:32:52 +0000 (10:32 +0000)]
MFC r216716:
* Add mention of the `-f`, `-q`, `-S`, and `-V` options in the synopsis
section.
* Document the `-l`, `-M` and `-S` options.
* Improve the text describing the behavior of the `-r` option.
* Start a section on standard compliance.
* Indicate in the synopsis that the `-S` and `-s` options are mutually
exclusive.
kaiw [Sat, 7 May 2011 10:31:34 +0000 (10:31 +0000)]
MFC r216014:
Add option -D for ranlib(1). When -D is speicified, ranlib(1) will generate
a deterministic archive symbol table (i.e. timestamp for the symbol table
member header is set to 0).
kaiw [Sat, 7 May 2011 10:27:23 +0000 (10:27 +0000)]
MFC r213643 (kientzle):
Add -D (deterministic) option to ar.
When set, it forces all timestamps and owners to zero and
modes to 0644. Useful for producing libraries that are
bitwise identical across multiple build runs.
kaiw [Sat, 7 May 2011 10:23:07 +0000 (10:23 +0000)]
MFC r208189:
Removed ar(1)'s support for compressed archives. This change removes
ar(1)'s dependencies on compressor libraries -lz, -lbz2 and -llzma and
fixes building HEAD on some versions of FreeBSD[78]. Option -j and -z
is now accepted but ignored.
Compressed ar(1) archives are not useful without a ld(1) that can read
them. Also, the current ar(1) compression scheme prevents random
access of archive members and needs to be redesigned anyway.
rmacklem [Sat, 7 May 2011 02:00:35 +0000 (02:00 +0000)]
MFC: r220967
Fix a LOR in vfs_busy() where, after msleeping, it would lock
the mutexes in the wrong order for the case where the
MBF_MNTLSTLOCK is set. I believe this did have the
potential for deadlock. For example, if multiple nfsd threads
called vfs_busyfs(), which calls vfs_busy() with MBF_MNTLSTLOCK.
Thanks go to pho for catching this during his testing.
fabient [Fri, 6 May 2011 14:05:32 +0000 (14:05 +0000)]
MFC r220198:
Clearing the flag when preempting will let the preempted thread run
too much time. This can finish in a scheduler deadlock with ping-pong
between two threads.
One sample of this is:
- device lapic (to have a preemption point on critical_exit())
- options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq)
- running a cpu intensive task (that does not enter the kernel)
- only one CPU on SMP or no SMP.
As requested by jhb@ 4BSD have received the same type of fix instead of
propagating the flag to the new thread.