]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC: 228794
mckusick [Fri, 13 Jan 2012 07:19:02 +0000 (07:19 +0000)]
MFC: 228794

Reduce NFPI by half to keep the default number of inodes the same with
the now default 32K/4K filesystem the same as the number of inodes in
the previously default 16K/2K filesystem.

PR:          bin/162659
Reported by: Olivier Cochard-Labbe <olivier@cochard.me>

git-svn-id: svn://svn.freebsd.org/base/stable/9@230049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 226520
mckusick [Fri, 13 Jan 2012 07:08:21 +0000 (07:08 +0000)]
MFC: 226520

The current /etc/dumpdates file restricts device names to 32 characters.
With the addition of various GEOM layers some device names now exceed
this length, for example /dev/mirror/encrypted.elig.journal. This
change expands the field to 53 bytes which brings the /etc/dumpdates
lines to 80 characters. Exceeding 80 characters makes the /etc/dumpdates
file much less human readable. A test is added to dump so that it
verifies that the device name will fit in the 53 character field
failing the dump if it is too long.

This change has been checked to verify that its /etc/dumpdates file
is compatible with older versions of dump.

Reported by: Martin Sugioarto <martin@sugioarto.com>
PR:          kern/160678

git-svn-id: svn://svn.freebsd.org/base/stable/9@230047 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228470:
eadler [Fri, 13 Jan 2012 00:38:35 +0000 (00:38 +0000)]
MFC r228470:
- Add a sysctl to allow non-root users the ability to set idle
  priorities.
- While here fix up some style nits.

Approved by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@230039 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoDocument EN-12:01.
hrs [Thu, 12 Jan 2012 21:12:16 +0000 (21:12 +0000)]
Document EN-12:01.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230031 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r229585
brueffer [Thu, 12 Jan 2012 20:39:54 +0000 (20:39 +0000)]
MFC: r229585

Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228461:
mav [Thu, 12 Jan 2012 15:56:17 +0000 (15:56 +0000)]
MFC r228461:
Fix few bugs in isp(4) target mode support:
 - in destroy_lun_state() assert hold == 1 instead of 0, as it should
receive hold taken by the create_lun_state() or get_lun_statep() before;
 - fix hold count leak inside rls_lun_statep() that also fired above assert;
 - in destroy_lun_state() use SIM bus number instead of SIM path id for
ISP_GET_PC_ADDR(), as it was before r196008;
 - make isp_disable_lun() to set status in CCB;
 - make isp_target_mark_aborted() set status into the proper CCB.

Reviewed by: mjacob
Sponsored by: iXsystems, inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230019 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228462:
mav [Thu, 12 Jan 2012 15:49:06 +0000 (15:49 +0000)]
MFC r228462:
 - Fix different variable types use in different files after r121184,
  causing problems on amd64.
 - s/%lud/%lu/.

Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230017 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228808, r228847, 229395:
mav [Thu, 12 Jan 2012 14:53:08 +0000 (14:53 +0000)]
MFC r228808, r228847, 229395:

r228808, r228847:
Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to
GEOM and using READ CD command for reading data, same as acd driver does.
Audio CDs identified by checking respective bit of the control field of
the first track in TOC.

229395:
Add support for CDRIOCGETBLOCKSIZE and CDRIOCSETBLOCKSIZE IOCTLs to control
sector size same as acd driver does. Together with r228808 and r228847 this
allows existing multimedia/vlc to play Audio CDs via CAM cd driver.

PR:             ports/162190
Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230014 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 228715:
jhb [Thu, 12 Jan 2012 14:43:52 +0000 (14:43 +0000)]
MFC 228715:
Add a TASK_INITIALIZER() macro that can be used to statically
initialize a task structure.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230012 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agomerge from head: support for building cross-arch versions of picobsd
luigi [Thu, 12 Jan 2012 11:08:21 +0000 (11:08 +0000)]
merge from head: support for building cross-arch versions of picobsd

git-svn-id: svn://svn.freebsd.org/base/stable/9@230009 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227674
pho [Thu, 12 Jan 2012 08:03:26 +0000 (08:03 +0000)]
MFC: r227674

Added check for negative seconds value. Found by syscall() fuzzing.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230008 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoFix example addresses.
hrs [Thu, 12 Jan 2012 05:51:11 +0000 (05:51 +0000)]
Fix example addresses.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230006 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoFix a typo. (s,&os;&arch.amd64,&os;/&arch.amd64,)
hrs [Thu, 12 Jan 2012 05:47:28 +0000 (05:47 +0000)]
Fix a typo. (s,&os;&arch.amd64,&os;/&arch.amd64,)

git-svn-id: svn://svn.freebsd.org/base/stable/9@230004 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoVarious grammar/wording fixes.
hrs [Thu, 12 Jan 2012 04:48:44 +0000 (04:48 +0000)]
Various grammar/wording fixes.

Submitted by: Benjamin Kaduk

git-svn-id: svn://svn.freebsd.org/base/stable/9@230003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227774, r227777, r227800, r229838, r229847:
wblock [Thu, 12 Jan 2012 04:37:19 +0000 (04:37 +0000)]
MFC r227774, r227777, r227800, r229838, r229847:

MFC r227774:
Add a section that explicitly describes partitioning schemes.  Modify
existing sections to refer to the new one.  Rearrange partitioning
scheme list so MBR and EBR types are together.  Also add several
corrections for grammar, clarity, and consistency.

MFC r227777:
Fix date.

MFC r227800:
Correct and expand BSD partitioning scheme description.
Correct GUID to GPT in RECOVERING section.

MFC r229838:
Clarity improvements.

MFC r229847:
Whitespace-only fix.

Approved by: gjb (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@230002 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoUse upper case in an anchor id.
hrs [Thu, 12 Jan 2012 03:52:53 +0000 (03:52 +0000)]
Use upper case in an anchor id.

git-svn-id: svn://svn.freebsd.org/base/stable/9@230001 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoBump &release.next;.
hrs [Thu, 12 Jan 2012 00:38:57 +0000 (00:38 +0000)]
Bump &release.next;.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229999 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Thu, 12 Jan 2012 00:34:54 +0000 (00:34 +0000)]
Add relnotes items:
hhook(9) and khelp(9),
hw.memtest.tests loader tunable,
posix_fallocate(2),
boot loader menu updated,
iwn(4) firmware update,
vxge(4) for Neterion X3100 10GbE Server/Storage adapter added,
ipfw(8) fwd IPv6 support,
ipfw(8) call/retrun action added,
IPv4 /31 network support as in RFC 3021,
IPV6_PKTINFO bug fixed,
h_ertt(4) (Enhanced Round Trip Time) khelp module added,
ng_ipfw(4) IPv6 support,
arcmsr(4) 1.20.00.22,
cam(4) descriptor format sense data in SPC-3 support added,
mxge(4) updated,
tws(4) for 3ware 9750 SATA+SAS 6Gb/s RAID controller added,
newfs(8), fsck_ffs(8) -E option added,
NFS nocto mount option added,
vfs.typenumhash loader tunable,
libarchive, tar(1), cpio(1) 2.8.4,
makefs(8) ISO 9660 support,
rtadvd(8), rtsold(8) RDNSS/DNSSL RA option support,
rtadvd(8) noifprefix keyword,
tftpd(8) interop issue fixed,
zpool(8) labelclear command added,
awk 20110807,
compiler-rt imported,
netcat 4.9,
tnftp 20100118,
less v444,
OpenSSH 5.8p2 + hpn patch,
pf 4.5,
sendmail 8.14.5,
tzdata2011m,
xz 20110711.

- Add descriptions about network configuration changes,
  openresolv import, and disk partition management utilities.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229998 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228445:
eadler [Thu, 12 Jan 2012 00:02:14 +0000 (00:02 +0000)]
MFC r228445:
 - Add support for ASCII art splash screens in TheDraw format

PR: kern/143370
Approved by: ed

git-svn-id: svn://svn.freebsd.org/base/stable/9@229994 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228669: du: Allow multiple -HLP options, the last one wins.
jilles [Wed, 11 Jan 2012 23:30:18 +0000 (23:30 +0000)]
MFC r228669: du: Allow multiple -HLP options, the last one wins.

This matches 4.4BSD tradition and other utilities with these options and is
required by POSIX (POSIX does not specify -P, only -HL).

git-svn-id: svn://svn.freebsd.org/base/stable/9@229992 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227981:
wblock [Wed, 11 Jan 2012 22:37:45 +0000 (22:37 +0000)]
MFC r227981:
Point out that @reboot runs at every cron startup, not just system
startup.

Approved by: gjb (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@229987 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd a document for brief installation instructions.
hrs [Wed, 11 Jan 2012 20:04:52 +0000 (20:04 +0000)]
Add a document for brief installation instructions.

Submitted by: kensmith

git-svn-id: svn://svn.freebsd.org/base/stable/9@229979 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228940:
delphij [Wed, 11 Jan 2012 18:18:37 +0000 (18:18 +0000)]
MFC r228940:

Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card
driver.  This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229975 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228726, r228727:
mav [Wed, 11 Jan 2012 18:12:53 +0000 (18:12 +0000)]
MFC r228726, r228727:
Cast some vendor-specific spell on VIA VT1708S codecs to:
 - make analog input loopback work;
 - get access to the mics boost controls.

Sponsored by:   iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229973 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: revision 229462
nyan [Wed, 11 Jan 2012 13:52:34 +0000 (13:52 +0000)]
MFC: revision 229462

  Fix 230MB MO support.

  Submitted by: Kaho Toshikazu

git-svn-id: svn://svn.freebsd.org/base/stable/9@229957 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r228827
rmacklem [Wed, 11 Jan 2012 01:24:35 +0000 (01:24 +0000)]
MFC: r228827
During investigation of an NFSv4 client crash reported by glebius@,
jhb@ spotted that nfscl_getstateid() might modify credentials when
called from nfsrpc_read() for the case where p != NULL, whereas
nfsrpc_read() only did a crdup() to get new credentials for p == NULL.
This bug was introduced by r195510, since pre-r195510 nfscl_getstateid()
only modified credentials for the p == NULL case. This patch modifies
nfsrpc_read()/nfsrpc_write() so that they do crdup() for the p != NULL case.
It is conceivable that this bug caused the crash reported by glebius@, but
that will not be determined for some time, since the crash occurred after
about 1month of operation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228021:
jh [Tue, 10 Jan 2012 18:20:19 +0000 (18:20 +0000)]
MFC r228021:

Add LINT-NOINET LINT-NOINET6 and LINT-NOIP to the make clean target.
This was missed in r221353.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229935 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229431:
kib [Tue, 10 Jan 2012 13:41:14 +0000 (13:41 +0000)]
MFC r229431:
Do the vput() for the lowervp in the null_nodeget() for error case too.
Several callers of null_nodeget() did the cleanup itself, but several
missed it, most prominent being null_bypass(). Remove the cleanup from
the callers, now null_nodeget() handles lowervp free itself.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229932 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229428:
kib [Tue, 10 Jan 2012 13:34:39 +0000 (13:34 +0000)]
MFC r229428:
Document the state of the lowervp vnode for null_nodeget().

MFC r229600 (by dim):
Output the correct vnode pointer.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229931 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r227550, r227576
pho [Tue, 10 Jan 2012 11:41:02 +0000 (11:41 +0000)]
MFC: r227550, r227576

Handle invalid large values for getdirentries(2) data buffer size.
Fix build, use %d for int value formatting.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229929 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228431, r228502, r228802:
fabient [Tue, 10 Jan 2012 08:16:28 +0000 (08:16 +0000)]
MFC r228431, r228502, r228802:
Add watchdog support for VIA south bridge chipset.
Tested on VT8251, VX900 but CX700, VX800, VX855 should works.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229927 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Tue, 10 Jan 2012 08:01:24 +0000 (08:01 +0000)]
Add relnotes items:
machdep.disable_tsc_calibration tunable,
ada(4) kern.cam.ada.write_cache sysctl,
geom_map(4) added,
readline(3) functions imported into libedit, and
lib{md,crypt} SHA-256/-512 support added.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229926 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229425:
dim [Tue, 10 Jan 2012 07:46:35 +0000 (07:46 +0000)]
MFC r229425:

In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c, check the
the number of links against LINK_MAX (which is INT16_MAX), not against
UINT32_MAX.  Otherwise, the constant would implicitly be converted to
-1.

Reviewed by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/9@229925 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229423:
dim [Tue, 10 Jan 2012 07:45:00 +0000 (07:45 +0000)]
MFC r229423:

In sys/dev/qlxgb/qla_misc.c, fix a copy/paste issue.  Clang complained
the variable 'val' was uninitialized when used.  Instead, 'sig' should
have been printed.

Reviewed by: davidcs

git-svn-id: svn://svn.freebsd.org/base/stable/9@229924 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229402:
dim [Tue, 10 Jan 2012 07:42:01 +0000 (07:42 +0000)]
MFC r229402:

In sys/compat/linux/linux_ioctl.c, work around a warning when a pointer
is compared to an integer, by casting the pointer to l_uintptr_t.  No
functional difference on both i386 and amd64.

Reviewed by: ed, jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@229923 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229401:
dim [Tue, 10 Jan 2012 07:38:46 +0000 (07:38 +0000)]
MFC r229401:

In sys/dev/if_ndis/if_ndis_pccard.c, fix a bug where a garbage rid was
passed to resource_list_add().  The rid that was just returned by
bus_alloc_resource_any() should have been used instead.

Reviewed by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@229922 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Tue, 10 Jan 2012 07:21:11 +0000 (07:21 +0000)]
Add relnotes items:
RACCT resource accounting API,
RCTL resource limiting API and rctl(8),
sendmsg(2)/recvmsg(2) improvement in Linux compat layer,
open(2)/fhopen(2) O_CLOEXEC,
COMPAT_43 supports a.out binary on amd64,
usb_pf and usbdump(8),
cxgb(4) 7.11.0,
em(4) 7.3.2,
igb(4) 2.2.5,
OFED 1.5.3 imported to support Infiniband,
graid(8),
resolvconf(8) 3.4.4 imported,
hastd(8) source keyword,
ps(1) -o usertime, systime,
utmp(5) replaced by utmpx(3) [*],
GNU GCC updated to the last GPLv2-licensed version,
tzdata2011e,
add description about incompatibilities due to ATA_CAM.

Submitted by: ed[*]

git-svn-id: svn://svn.freebsd.org/base/stable/9@229921 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r228757
rmacklem [Tue, 10 Jan 2012 02:16:38 +0000 (02:16 +0000)]
MFC: r228757
jwd@ reported a problem via email where the old NFS client would
get a reply of EEXIST from an NFS server when a Mkdir RPC was retried,
for an NFS over UDP mount.
Upon investigation, it was found that the client was retransmitting
the Mkdir RPC request over UDP, but with a different xid. As such,
the retransmitted message would miss the Duplicate Request Cache
in the server, causing it to reply EEXIST. The kernel client side
UDP rpc code has two timers. The first one causes a retransmit using
the same xid and socket and was set to a fixed value of 3seconds.
(The default can be overridden via CLSET_RETRY_TIMEOUT.)
The second one creates a new socket and xid and should be larger
than the first. However, both NFS clients were setting the second
timer to nm_timeo ("timeout=<value>" mount argument), which defaulted to
1second, so the first timer would never time out.
This patch fixes both NFS clients so that they set the first timer
using nm_timeo and makes the second timer larger than the first one.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229902 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years ago- Remove extraneous null ptr deref checks
eadler [Tue, 10 Jan 2012 01:01:57 +0000 (01:01 +0000)]
- Remove extraneous null ptr deref checks
- Fix memory leak

Approved by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@229899 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227535:
eadler [Tue, 10 Jan 2012 00:34:40 +0000 (00:34 +0000)]
MFC r227535:
- add support for Titan VScom PCIex-800H

PR: kern/124128
Approved by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@229895 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227532:
eadler [Tue, 10 Jan 2012 00:26:54 +0000 (00:26 +0000)]
MFC r227532:
- add support for Broadcom 802.11bg/EDGE/GPRS CardBus (Serial)
- correct mislabeling of 0x432214e4 device

PR: kern/119606
Approved by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@229892 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 227489:
eadler [Tue, 10 Jan 2012 00:01:17 +0000 (00:01 +0000)]
MFC 227489:
 - fix duplicate "a a" in some comments

Approved by: simon

git-svn-id: svn://svn.freebsd.org/base/stable/9@229888 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226324
thompsa [Mon, 9 Jan 2012 21:52:55 +0000 (21:52 +0000)]
MFC r226324

 Dont just set the pin high when turning on output, use the current value. Also
 let this value be set when in input mode.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229885 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226242
thompsa [Mon, 9 Jan 2012 21:51:50 +0000 (21:51 +0000)]
MFC r226242

 Fix build after TARGET_BIG_ENDIAN was nuked from orbit.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229884 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226034
thompsa [Mon, 9 Jan 2012 21:49:47 +0000 (21:49 +0000)]
MFC r226034

 Add missing newbus glue, this has never attached properly to gpiobus.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229883 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225955
thompsa [Mon, 9 Jan 2012 21:49:03 +0000 (21:49 +0000)]
MFC r225955

 Allow ixp425 boot2 to compile after r219452

git-svn-id: svn://svn.freebsd.org/base/stable/9@229882 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228717:
yongari [Mon, 9 Jan 2012 19:57:07 +0000 (19:57 +0000)]
MFC r228717:
  Increase wait time for OP_TCPSTART command processing.  It seems
  100us is not enough to ensure prefetch unit work.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228716:
yongari [Mon, 9 Jan 2012 19:28:51 +0000 (19:28 +0000)]
MFC r228716:
  TCP header size is represented by number of 32bits words.
  Fix the TCP header size calculation such that makes TSO engine
  cache all header(ethernet/IP/TCP) bytes to its internal buffer.
  While here, remove extra pull up for TCP payload.  Unlike some
  em(4) controllers, fxp(4) does not require such work around for
  TSO.
  The two limitations are ethernet/IP/TCP header size should be less
  than or equal to the size of controller's internal buffer(80 bytes)
  and these header information should be found in the first fragment
  of a TSO frame.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228479-228480:
yongari [Mon, 9 Jan 2012 19:18:53 +0000 (19:18 +0000)]
MFC r228479-228480:
r228479:
  BCM5720 performance tweak from Broadcom.
   o Allow multiple outstanding read requests from non-LSO read DMA engine.
   o Allow 4KB burst length reads for non-LSO frames.
   o Enable 512B burst length reads for buffer descriptors.

r228480:
  Destroy DMA tag for jumbo RX buffer in device detach.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229867 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228476:
yongari [Mon, 9 Jan 2012 19:07:14 +0000 (19:07 +0000)]
MFC r228476:
  Rework link state tracking and remove superfluous link UP/DOWN
  messages.
   o Add check for actually resolved speed in miibus_statchg callback
     instead of blindly reprogramming BCE_EMAC_MODE register.  The
     callback may be called multiple times(e.g. link UP, link
     transition, auto-negotiate complete etc) while auto-negotiation
     is in progress.  All unresolved link state changes are ignored
     now and setting BCE_EMAC_MODE after link establishment is done
     once.
   o bce(4) is careful enough not to drive MII_TICK if driver got a
     valid link.  To detect lost link, bce(4) relied on link state
     change interrupt and if driver see the interrupt, it forced to
     drive MII_TICK by calling bce_tick() in interrupt handler.
     Because bce(4) generates multiple link state change interrupts
     while auto-negotiation is in progress, bce_tick() would be
     called multiple times and this resulted in generating multiple
     link UP/DOWN messages.
     With this change, bce_tick() is not called in interrupt handler
     anymore such that miibus_statchg callback handles link state
     changes with consistent manner.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229864 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227823, r228163:
jh [Mon, 9 Jan 2012 15:56:33 +0000 (15:56 +0000)]
MFC r227823, r228163:

Append unit number to the WMI status device name to allow attaching
multiple acpi_wmi(4) instances.

PR: kern/162491

git-svn-id: svn://svn.freebsd.org/base/stable/9@229858 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agocc(4) and cc(9) were renamed to mod_cc(4) and mod_cc(9).
hrs [Mon, 9 Jan 2012 14:23:18 +0000 (14:23 +0000)]
cc(4) and cc(9) were renamed to mod_cc(4) and mod_cc(9).

Spotted by: lstewart

git-svn-id: svn://svn.freebsd.org/base/stable/9@229856 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227822: Avoid panics from recursive rename operations.
ivoras [Mon, 9 Jan 2012 13:35:10 +0000 (13:35 +0000)]
MFC r227822: Avoid panics from recursive rename operations.

PR: kern/159418

git-svn-id: svn://svn.freebsd.org/base/stable/9@229855 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226604:
das [Mon, 9 Jan 2012 04:59:44 +0000 (04:59 +0000)]
MFC r226604:
  Add support for the 'x' mode option in fopen() as specified in the C1X
  draft standard.  The option is equivalent to O_EXCL.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229845 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226595:
das [Mon, 9 Jan 2012 04:57:59 +0000 (04:57 +0000)]
MFC r226595:
  Per IEEE754r, pow(1, y) is 1 even if y is NaN, and pow(-1, +-Inf) is 1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229843 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226594:
das [Mon, 9 Jan 2012 04:57:06 +0000 (04:57 +0000)]
MFC r226594:
  Bugfix: feenableexcept() and fedisableexcept() should just return the
  old exception mask, not mask | ~FE_ALL_EXCEPT.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229841 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC various fma{,f,l} improvements:
das [Mon, 9 Jan 2012 04:55:52 +0000 (04:55 +0000)]
MFC various fma{,f,l} improvements:

r226245 - refactoring
r226371 - fix double-rounding bug
r226373 - new math_private.h macros
r226601 - fix nit in r226371

git-svn-id: svn://svn.freebsd.org/base/stable/9@229839 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229353:
gjb [Mon, 9 Jan 2012 01:59:17 +0000 (01:59 +0000)]
MFC r229353:

 - Trivial standardization to a few comments in kern.pre.mk.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229833 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228233:
eadler [Mon, 9 Jan 2012 01:02:37 +0000 (01:02 +0000)]
MFC r228233:
- Fix typos s/(more|less) then|\1 than/

Approved by: brucec

git-svn-id: svn://svn.freebsd.org/base/stable/9@229832 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Sun, 8 Jan 2012 23:11:03 +0000 (23:11 +0000)]
Add relnotes items:
DTrace systrace support for freebsd32 and linux32 on am64,
loader(8) pre-boot virtual memory support on ia64,
bxe(4) for BCM57710, BCM57711, BCM57711E added,
cbrtl(3) (cube root) added,
pam_group(8) ruser and luser options,
tzdata2011d.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229829 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r228560
rmacklem [Sun, 8 Jan 2012 23:05:36 +0000 (23:05 +0000)]
MFC: r228560
Patch the new NFS server in a manner analagous to r228520 for the
old NFS server, so that it correctly handles a count == 0 argument
for Commit.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229827 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Sun, 8 Jan 2012 22:23:19 +0000 (22:23 +0000)]
Add relnotes items:
{get,set}loginclass(2) added,
machdep.disable_tsc tunable added,
ng_netflow(4) now supports NetFlow v9,
cexp(3) and cexpf(3) added,
gpart(8) show -p flag added,
hashd(8) checksum algo selection in a resource section,
hashd(8) compression algo selection in a resource section,
ps(1) -o class added,
gdtoa to 20110304,
tzdata2011c.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229826 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228754:
eadler [Sun, 8 Jan 2012 21:00:37 +0000 (21:00 +0000)]
MFC r228754:
 - Add restrict keyword to glob(3)

PR: kern/161958
Approved by: jilles

git-svn-id: svn://svn.freebsd.org/base/stable/9@229823 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Sun, 8 Jan 2012 19:52:56 +0000 (19:52 +0000)]
Add relnotes items:
Capsicum Capability Mode,
ng_one2many(4) XMIT_FAILOVER support added,
kern.geom.confxml sysctl now support <ident> and <descr>, and
ZFS SPA version 28.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229820 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Sun, 8 Jan 2012 19:24:08 +0000 (19:24 +0000)]
Add relnotes items:
add descriptions about kern.features.*,
new NFS implementation (newnfs) is now compiled in by default,
add some descriptions about NFSv4 configuration, and
document a workaround for the kern.geom.part.check_integrity issue.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229819 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Sun, 8 Jan 2012 17:40:10 +0000 (17:40 +0000)]
Add relnotes items:
cxgbe(4) for Chelsio T4 added,
dc(4) PAE support on FreeBSD/i386,
re(4) RTL8401E support added,
IPsec HMAC-SHA-256/384/512 authenticator hash size fix,
cc(4) TCP_CONGESTION socket option,
Citrus iconv imported (but disabled by default),
utxrm(8) utility added,
GNU binutils to 2.17.50,
LLVM/Clang 3.0 imported,
xz to 5.0.1,
bsdinstall(8) added as the default installer.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229817 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Sun, 8 Jan 2012 13:54:08 +0000 (13:54 +0000)]
Add relnotes items:
igb(4) Intel I350 GbE support,
re(4) TX IP checksum disabled on RTL8168C-based cards,
cc(9) TCP congestion control algorithm framework added,
gpart(8) various aliases and bios-boot GUID added,
FFS SU+J added,
more kern.features.* for UFS-related features,
hastd(8) drops root privilege in worker processes,
newsyslog(8) xz compression support added,
ppp(8) iface name and iface description commands added,
sh(1) arithmetic expression handling updated,
ISC BIND to 9.8.1-P1, and
tzdata2011a.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229812 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229196:
dim [Sun, 8 Jan 2012 13:51:09 +0000 (13:51 +0000)]
MFC r229196:

Redo r228645, but instead of casting away const conversion warnings in
contrib/less, add a few const qualifiers in the right places.

Suggested by: das

git-svn-id: svn://svn.freebsd.org/base/stable/9@229811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229185:
kib [Sun, 8 Jan 2012 07:51:40 +0000 (07:51 +0000)]
MFC r229185:
Avoid double-unlock or double unreference for ndp->ni_dvp when the vnode dp
lock upgrade right after the 'success' label fails.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229804 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r228260
rmacklem [Sun, 8 Jan 2012 00:42:07 +0000 (00:42 +0000)]
MFC: r228260
This patch adds a sysctl to the NFSv4 server which optionally disables the
check for a UTF-8 compliant file name. Enabling this sysctl results in
an NFSv4 server that is non-RFC3530 compliant, therefore it is not enabled
by default. However, enabling this sysctl results in NFSv3 compatible
behaviour and fixes the problem reported by "dan at sunsaturn.com"
to freebsd-current@ on Nov. 14, 2011 under the subject "NFSV4 readlink_stat".

git-svn-id: svn://svn.freebsd.org/base/stable/9@229799 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years ago- Add relnotes items:
hrs [Sun, 8 Jan 2012 00:14:45 +0000 (00:14 +0000)]
- Add relnotes items:
  nfe(4) reinit issue fixed,
re(4) RX int moderation changed from int taskq to one-shot timer,
re(4) TSO disabled by default,
re(4) RTL8105E support, and
rlphy(4) RTL8201E support.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229797 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years ago- Add relnotes items:
hrs [Sat, 7 Jan 2012 23:47:09 +0000 (23:47 +0000)]
- Add relnotes items:
alc(4) AR8152-based card lockup fixed,
ixgbe(4) to 2.3.8,
sis(4) reinit issue fixed,
netstat(1) embedded address scope id handling,
sh(1) signal handling fixed,
unifdef(1) to 2.5.6.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229796 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years ago- Fix spelling.
hrs [Sat, 7 Jan 2012 22:29:46 +0000 (22:29 +0000)]
- Fix spelling.
- Add relnotes items:
        nxstack on powerpc,
        ral(4) and run(4) ieee80211_ratectl_node_init() call fix,
        re(4) RTL8168E/8111E-VL support added,
        re(4) TX/RX checksum offloading configuarable independently,
        cpuset(1) -C and "all" keyword added,
        sh(1) exit status in trap action for !EXIT signals,
        sh(1) trap -- handling,
        ACPI CA to 20110527.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229793 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd relnotes items:
hrs [Sat, 7 Jan 2012 20:29:05 +0000 (20:29 +0000)]
Add relnotes items:
PT_GNU_STACK and kern.elf{32,64}.nxstack sysctls in ELF imgact,
FreeBSD/powerpc PS3 support added,
re(4) TSO support added,
  re(4) RTL8169[CDE] jumbo frame panic fixed,
source address selection in unbound sockets fixed,
ifconfig(8) fdx/flow/hdx/loop aliases added,
sed(1) -i race fixed,
sh(1) EXIT trap fixed,
sh(1) %builtin keyword removed,
dialog to 1.1-20110707 and description about key operation change.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229792 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoAdd revision attribute handling. Links are now generated at the end
hrs [Sat, 7 Jan 2012 18:53:14 +0000 (18:53 +0000)]
Add revision attribute handling.  Links are now generated at the end
of the paragraph from revision="NNN".

git-svn-id: svn://svn.freebsd.org/base/stable/9@229788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years ago- Remove unnecessary and/or old parts.
hrs [Sat, 7 Jan 2012 18:52:16 +0000 (18:52 +0000)]
- Remove unnecessary and/or old parts.
- Add relnote entries:
msk(4) RX checksum bugfix,
rdcphy(4) for R6040 10/100 PHY added,
vte(4) for RDC R6040 added,
vlan(4) IPv6 LLA interface ID bugfix,
wpi(4) bugfix,
md(4) vm.md_malloc_wait sysctl added,
mmc(4) device detection fixed,
FFS TRIM support added,
poweroff(8) added,
rtld(1) now supports shared objects for filtering,
sh(1) kill built-in added, and
KDE 4.7.3.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229787 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229076:
dim [Sat, 7 Jan 2012 14:35:37 +0000 (14:35 +0000)]
MFC r229076:

In sys/dev/hwpmc/hwpmc_amd.c, fix a clang warning about invalid enum
conversions.

Reviewed by: jkoshy

git-svn-id: svn://svn.freebsd.org/base/stable/9@229776 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229765 - Fix the ar724x shift calculation when writing to the PCI config space.
adrian [Sat, 7 Jan 2012 12:32:50 +0000 (12:32 +0000)]
MFC r229765 - Fix the ar724x shift calculation when writing to the PCI config space.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229772 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge from head/ 228732,228811,228813-228816,228855:
glebius [Sat, 7 Jan 2012 11:01:35 +0000 (11:01 +0000)]
Merge from head/ 228732,228811,228813-228816,228855:

  r228732 | glebius | 2011-12-20 16:34:16 +0400 (вт, 20 дек 2011) | 3 lines

  - Cover pfsync callouts deletion with PF_LOCK().
  - Cover setting up interface between pf and pfsync with PF_LOCK().

  r228811 | glebius | 2011-12-22 22:31:47 +0400 (чт, 22 дек 2011) | 3 lines

  In FreeBSD we always have bpf(4) API, either real or stub. No need
  in detecting presense of 'device bpf'.

  r228813 | glebius | 2011-12-22 22:51:35 +0400 (чт, 22 дек 2011) | 2 lines

  We really mean MTU of the real interface here, not of our pseudo.

  r228814 | glebius | 2011-12-22 22:56:27 +0400 (чт, 22 дек 2011) | 16 lines

  Merge couple more fixes from OpenBSD to bulk processing:

    revision 1.118
    date: 2009/03/23 06:19:59;  author: dlg;  state: Exp;  lines: +8 -6
    wait an appropriate amount of time before giving up on a bulk update,
    rather than giving up after a hardcoded 5 seconds (which is generally much
    too short an interval for a bulk update).
    pointed out by david@, eyeballed by mcbride@

    revision 1.171
    date: 2011/10/31 22:02:52;  author: mikeb;  state: Exp;  lines: +2 -1
    Don't forget to cancel bulk update failure timeout when destroying an
    interface.  Problem report and fix from Erik Lax, thanks!

  Start a brief note of revisions merged from OpenBSD.

  r228815 | glebius | 2011-12-22 23:05:58 +0400 (чт, 22 дек 2011) | 12 lines

  Merge from OpenBSD:
    revision 1.120
    date: 2009/04/04 13:09:29;  author: dlg;  state: Exp;  lines: +5 -5
    use time_uptime instead of time_second internally. time_uptime isnt
    affected by adjusting the clock.

    revision 1.175
    date: 2011/11/25 12:52:10;  author: dlg;  state: Exp;  lines: +3 -3
    use time_uptime to set state creation values as time_second can be
    skewed at runtime by things like date(1) and ntpd. time_uptime is
    monotonic and therefore more useful to compare against.

  r228816 | glebius | 2011-12-22 23:09:55 +0400 (чт, 22 дек 2011) | 11 lines

  Merge from OpenBSD:
    revision 1.122
    date: 2009/05/13 01:01:34;  author: dlg;  state: Exp;  lines: +6 -4
    only keep track of the number of updates on tcp connections. state sync on
    all the other protocols is simply pushing the timeouts along which has a
    resolution of 1 second, so it isnt going to be hurt by pfsync taking up
    to a second to send it over.

    keep track of updates on tcp still though, their windows need constant
    attention.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229770 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229508:
kib [Sat, 7 Jan 2012 10:49:04 +0000 (10:49 +0000)]
MFC r229508:
Postpone the resolution of IRELATIVE relocations and IFUNC-targeted
relocations until tls is initialized and stacks permissions correctly
set. This allows the ifunc to call malloc(3) and some other heavy
services.

Add debug banner.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229769 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227491:
eadler [Sat, 7 Jan 2012 03:32:47 +0000 (03:32 +0000)]
MFC r227491:

-  new sentence should start on new line.

Approved by: gjb

git-svn-id: svn://svn.freebsd.org/base/stable/9@229764 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228355:
gjb [Sat, 7 Jan 2012 02:03:07 +0000 (02:03 +0000)]
MFC r228355:

- As of r226865, daily_scrub_zfs_default_threshold is 35 days.

PR: 162890

git-svn-id: svn://svn.freebsd.org/base/stable/9@229757 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r228217
rmacklem [Sat, 7 Jan 2012 00:36:17 +0000 (00:36 +0000)]
MFC: r228217
Post r223774, the NFSv4 client no longer has multiple instances
of the same lock_owner4 string. As such, the handling of cleanup
of lock_owners could be simplified. This simplification permitted
the client to do a ReleaseLockOwner operation when the process that
the lock_owner4 string represents, has exited. This permits the
server to release any storage related to the lock_owner4 string
before the associated open is closed. Without this change, it
is possible to exhaust a server's storage when a long running
process opens a file and then many child processes do locking
on the file, because the open doesn't get closed. A similar patch
was applied to the Linux NFSv4 client recently so that it wouldn't
exhaust a server's storage.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229752 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoWhen copying/pasting a line to create a line you want to add make sure
kensmith [Sat, 7 Jan 2012 00:33:13 +0000 (00:33 +0000)]
When copying/pasting a line to create a line you want to add make sure
to change all pieces of it, not just some of them.

Submitted by: A helpful soul on IRC
Pointy hat: me

git-svn-id: svn://svn.freebsd.org/base/stable/9@229751 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC the rest of r225757 that applies to the package set directories.
kensmith [Sat, 7 Jan 2012 00:07:23 +0000 (00:07 +0000)]
MFC the rest of r225757 that applies to the package set directories.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229748 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228370:
yongari [Fri, 6 Jan 2012 23:57:21 +0000 (23:57 +0000)]
MFC r228370:
  After r228293, et(4) supports altq(4).

git-svn-id: svn://svn.freebsd.org/base/stable/9@229745 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228817:
dim [Fri, 6 Jan 2012 22:18:13 +0000 (22:18 +0000)]
MFC r228817:

Use the correct types when calling the decompression mask function.

There's currently no public code which uses this feature and the
current reference driver doesn't enable this feature at all.
It's possible it was used by a previous version of the driver and
that indeed it should return HAL_STATUS; but at this point I'm
happy to require that they complain and submit a patch.

This was found by LLVM compile-time type checking.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229004:
dim [Fri, 6 Jan 2012 22:15:58 +0000 (22:15 +0000)]
MFC r229004:

In sys/compat/ndis/subr_ntoskrnl.c, change the RtlFillMemory function
definition from K&R to ANSI, to avoid a clang warning about the uint8_t
parameter being promoted to int, which is not compatible with the type
declared in the earlier prototype.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229739 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228333,228335-228336,228362,228368-228369,228381:
yongari [Fri, 6 Jan 2012 21:43:26 +0000 (21:43 +0000)]
MFC r228333,228335-228336,228362,228368-228369,228381:
r228333:
  Protect SIOCSIFMTU ioctl handler with driver lock.
  Don't blindly re-initialize controller whenever MTU is changed.
  Now, reinitializing is done only when driver is running.

  While here, remove unnecessary assignment of error value since it
  was already initialized to 0.

r228335:
  Consistently use a tab character instead of using either a space or
  tab after #define.
  While I'm here consistently use capital letters when it uses
  hexadecimal notation.

  No functional changes.

r228336:
  Disable all clocks and put PHY into COMA before entering into
  suspend state.  This will save more power.
  On resume, make sure to enable all clocks.  While I'm here, if
  controller is not fast ethernet, enable gigabit PHY.

r228362:
  Do not disable interrupt without knowing whether the raised
  interrupt is ours.  Note, interrupts are automatically ACKed when
  the status register is read.
  Add RX/TX DMA error to interrupt handler and do full controller
  reset if driver happen to encounter these errors.  There is no way
  to recover from these DMA errors without controller reset.
  Rename local variable name intrs with status to enhance
  readability.

  While I'm here, rename ET_INTR_TXEOF and ET_INTR_RXEOF to
  ET_INTR_TXDMA and ET_INTR_RXDMA respectively.  These interrupts
  indicate that a frame is successfully DMAed to controller's
  internal FIFO and they have nothing to do with EOF(end of frame).
  Driver does not need to wait actual end of TX/RX of a frame(e.g.
  no need to wait the end signal of TX which is generated when a
  frame in TX FIFO is emptied by MAC).  Previous names were somewhat
  confusing.

r228368:
  Remove unnecessary definition of ET_PCIR_BAR.  Controller support
  I/O memory only.
  While here, use pci_set_max_read_req(9) rather than directly
  manipulating PCIe device control register.

r228369:
  Announce flow control ability to PHY driver and enable RX flow
  control.  Controller does not automatically generate pause frames
  based on number of available RX buffers so it's very hard to
  know when driver should generate XON frame in time.  The only
  mechanism driver can detect low number of RX buffer condition is
  ET_INTR_RXRING0_LOW or ET_INTR_RXRING1_LOW interrupt.  This
  interrupt is generated whenever controller notices the number of
  available RX buffers are lower than pre-programmed value(
  ET_RX_RING0_MINCNT and ET_RX_RING1_MINCNT register).  This scheme
  does not provide a way to detect when controller sees enough number
  of RX buffers again such that efficient generation of XON/XOFF
  frame is not easy.

  While here, add more flow control related register definition.

r228381:
  FreeBSD driver does not require arpcom structure in softc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229736 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228994:
dim [Fri, 6 Jan 2012 21:23:00 +0000 (21:23 +0000)]
MFC r228994:

Disable several instances instances of clang's -Wself-assign warning.
All of these are harmless, and are in fact used to shut up warnings from
lint.

While here, remove -Wno-missing-prototypes from the xfs module
Makefile, as I could not reproduce those warnings either with gcc or
clang.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229734 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228980:
dim [Fri, 6 Jan 2012 21:19:43 +0000 (21:19 +0000)]
MFC r228980:

Reapply r228785 now it has been tested by Adrian.  Also add comments
with the old AR_SCR_SLE_XXX values, with a short explanation why they
were changed.

Reviewed by: adrian

git-svn-id: svn://svn.freebsd.org/base/stable/9@229733 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228979:
dim [Fri, 6 Jan 2012 21:16:51 +0000 (21:16 +0000)]
MFC r228979:

In sys/dev/drm/radeon_state.c, use the correct printf length modifiers
for ints.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228978:
dim [Fri, 6 Jan 2012 21:14:54 +0000 (21:14 +0000)]
MFC r228978:

For several files in sys/dev/drm, disable -Wunused-value when building
with clang.  There are several macros in these files that return values,
and in some cases nothing is done with them, but it is completely
harmless.  For some other files, also disable -Wconstant-conversion,
since that triggers a false positive with the DMA_BIT_MASK() macro.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229731 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoRegen.
jhb [Fri, 6 Jan 2012 19:30:17 +0000 (19:30 +0000)]
Regen.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229724 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 227070,227341,227502:
jhb [Fri, 6 Jan 2012 19:29:16 +0000 (19:29 +0000)]
MFC 227070,227341,227502:
Add the posix_fadvise(2) system call.  It is somewhat similar to
madvise(2) except that it operates on a file descriptor instead of a
memory region.  It is currently only supported on regular files.

Note that this adds a new VOP, so all filesystem modules must be
recompiled.

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@229723 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228326-228327,228331-228332:
yongari [Fri, 6 Jan 2012 19:24:33 +0000 (19:24 +0000)]
MFC r228326-228327,228331-228332:
r228326:
  Controller does not require TX start command for every frame.  So
  send a single TX command after setting up all TX frames.  This
  removes unnecessary register accesses and bus_dmamap_sync(9) calls.
  et(4) uses TX interrupt moderation so it's possible to have TX
  buffers that were already transmitted but waiting for TX completion
  interrupt.  If the number of available TX descriptor is less then
  1/3 of total TX descriptor, try reclaiming first to get enough free
  TX descriptors before setting up TX descriptors.
  After r228325, et_txeof() no longer tries to send frames after
  reclaiming TX buffers.  That change was made to give more chance
  to transmit frames in main interrupt handler since we can still
  send frames in interrupt handler with RX interrupt.  So right
  before exiting interrupt hander, after enabling interrupt, try to
  send more frames.  This gives slightly better performance numbers.

  While I'm here reduce number of spare TX descriptors from 8 to 4.
  Controller does not require reserved TX descriptors, it was just to
  reduce TX overhead.  After r228325, driver has much lower TX
  overhead so it does not make sense to reserve 8 TX descriptors.

r228327:
  Remove et_enable_intrs(), et_disable_intrs() functions and
  manipulation of interrupt register access is done through
  CSR_WRITE_4 macro.  Also add disabling interrupt into et_reset()
  because we want interrupt disabled state after controller reset.
  While I'm here slightly change interrupt handler to be more
  readable one.

r228331:
  Rework link state tracking and TX/RX MAC configuration.
   o Do not report link status if driver is not running.
   o TX/RX MAC configuration should be done with resolved speed,
     duplex and flow control after establishing a link so it can't
     be done in driver initialization routine.
     Move the configuration to miibus_statchg callback which will be
     called whenever any link state change is detected.
     At this moment, flow-control is not enabled yet mainly because
     I was not able to set correct flow control parameters to
     generate TX pause frames.
   o Now TX/RX MAC is enabled only when a valid link is detected.
     Rearragnge hardware initialization routine a bit to leave
     enabling MAC to miibus_statchg callback.  In order to that,
     TX/RX DMA engine is enabled in et_init_locked().
   o Introduce ET_FLAG_LINK flag to track current link state.
   o Introduce ET_FLAG_FASTETHER flag to mark whether controller is
     fast ethernet.  This flag is checked in miibus_statchg callback
     to know whether PHY established a valid link.
   o In et_stop(), TX/RX MAC is explicitly disabled instead of
     relying on et_reset().  And move et_reset() from et_stop() to
     controller initialization.  Controler reset is not required here
     and it would also clear critial registers(i.e station address,
     RX filter configuration, WOL etc) that are required to make WOL
     work.
   o Switching to current media is done in et_init_locked() after
     setting IFF_DRV_RUNNING flag.  This should ensure reliable
     auto-negotiation/manual link establishment.
   o In et_start_locked(), check whether driver got a valid link
     before trying to send frames.
   o Remove checking a link in et_tick() as this is done by
     miibus_statchg callback.

r228332:
  Implement hardware MAC statistics counter.  Counters could be
  queried with dev.et.%d.stats sysctl node where %d is an instance of
  device.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229720 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228325:
yongari [Fri, 6 Jan 2012 19:09:47 +0000 (19:09 +0000)]
MFC r228325:
  Overhaul bus_dma(9) usage in et(4) and clean up TX/RX path.  This
  change should make et(4) work on any architectures.
   o Remove m_getl inline function and replace it with stanard mbuf
     interfaces.  Previous code tried to minimize code duplication
     but this came from incorrect use of common DMA tag.
     Driver may be still use a common RX allocation handler with
     additional structure changes but I don't see much point to do
     that it would make it hard to understand the code.
   o Remove DragonflyBSD specific constant EVL_ENCAPLEN, use
     ETHER_VLAN_ENCAP_LEN instead.
   o Add bunch of new RX status definition.  It seems controller
     supports RX checksum offloading but I was not able to make the
     feature work yet.  Currently driver checks whether recevied
     frame is good one or not.
   o Avoid a typedef ending in '_t' as style(9) says.
   o Controller has no restriction on DMA address space, so there
     is no reason to limit the DMA address to 32bit.  Descriptor
     rings,  status blocks and TX/RX buffers now use full 64bit DMA
     addressing.
   o Allocate DMA memory shared between host and controller as
     coherent.
   o Create 3 separate DMA tags to be used as TX, mini RX ring and
     stanard RX ring.  Previously it created a single DMA tag and it
     was used to all three rings.
   o et(4) does not support jumbo frame at this moment and I still
     don't quite understand how jumbo frame works on this controller
     so use two RX rings to handle small sized frame and normal sized
     frame respectively.  The mini RX ring will be used to receive
     frames that are less than or equal to 127 bytes.  The second RX
     ring is used to receive frames that are not handled by the first
     RX ring.
     If jumbo frame support is implemented, driver may have to choose
     better RX scheme by letting the second RX ring handle jumbo
     frames.  This scheme will mimic Broadcom's efficient jumbo frame
     handling feature.  However RAM buffer size(16KB) of the
     controller is too small to hold 2 jumbo frames, if 9KB
     jumbo frame is used, I'm not sure how good performance would it
     have.
   o In et_rxeof(), make sure to check whether controller received
     good frame or not.  Passing corrupted frame to upper layer is
     bad idea.
   o If driver receives a bad frame or driver fails to allocate RX
     buffer due to resource shortage condition, reuse previously
     loaded DMA map for RX buffer instead of unloading/loading RX
     buffer again.
   o et_init_tx_ring() never fails so change return type to void.
   o In watchdog handler, show TX DMA write back status of errored
     frame which could be used as a clue to debug watchdog timeout.
   o Add missing bus_dmamap_sync() in various places such that et(4)
     should work with bounce buffers(e.g. PAE).
   o TX side bus_dmamap_load_mbuf_sg(9) support.
   o RX side bus_dmamap_load_mbuf_sg(9) support.
   o Controller has no DMA alignment limit in RX buffer so use
     m_adj(9) in RX buffer allocation to make IP header align on 2
     bytes boundary.  Otherwise it would trigger unaligned access
     error in upper layer on strict alignment architectures.
     One of down side of controller is it provides limited set of RX
     buffer length like most Intel controllers.  This is not problem
     at this moment because driver does not support jumbo frame yet
     but it may require alignment fixup code to support jumbo frame
     on strict alignment architectures.
   o In et_txeof(), don't zero TX descriptors for transmitted frames.
     TX descriptors don't need write access after transmission.
     Driver sets IFF_DRV_OACTIVE when the number of available TX
     descriptors are less than or equal to ET_NSEG_SPARE.  Make sure
     to clear IFF_DRV_OACTIVE only when the number of available TX
     descriptor is greater than ET_NSEG_SPARE.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229717 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228291-228293,228297-228298:
yongari [Fri, 6 Jan 2012 18:15:27 +0000 (18:15 +0000)]
MFC r228291-228293,228297-228298:
r228291:
  Remove NetBSD license. r199548 removed all bit macros that were
  derived from NetBSD.

r228292:
  Implement suspend/resume methods.  Driver has no issue with
  suspend/resume.

r228293:
  Fix alt(4) support.  Also add check for number of available TX
  descriptors before trying to send frames.  If we're not able to
  send a frame, make sure to prepend it to if_snd queue such that
  alt(4) should work.

  While I'm here prefer ETHER_BPF_MTAP to BPF_MTAP.  ETHER_BPF_MTAP
  should be used for controllers that support VLAN hardware tag
  insertion.  The controller supports VLAN tag insertion but lacks
  VLAN tag stripping in RX path though.

r228297:
  et(4) supports VLAN oversized frame so correctly set header length.
  While I'm here remove initializing if_mtu, it is set by
  ether_ifattach(9).  Also move callout_init_mtx(9) to the right below
  driver lock initialization.

r228298:
  Make et_probe() return BUS_PROBE_DEFAULT such that allow other
  driver that has high precedence for the controller override et(4).
  Add missing callout_drain(9) in device detach and rework detach
  routine.  While I'm here use rman_get_rid(9) instead of using
  cached resource id because bus methods are free to change the
  id.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229711 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227317, r227355:
trociny [Fri, 6 Jan 2012 16:57:56 +0000 (16:57 +0000)]
MFC r227317, r227355:

When displaying process virtual memory mappings print superpage
mapping flag.

Submitted by: Mel Flynn <mel.flynn+fbsd.hackers@mailing.thruhere.net>
Reviewed by: alc, rwatson

git-svn-id: svn://svn.freebsd.org/base/stable/9@229710 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 228967:
jhb [Fri, 6 Jan 2012 16:56:09 +0000 (16:56 +0000)]
MFC 228967:
Update if_obytes and if_omcast after successful transmit.
While I'm here update if_oerrors if parent interface of vlan is not
up and running.  Previously it updated collision counter and it was
confusing to interprete it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@229708 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f