]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoUpdate ZFS manual pages to a mdoc(7) reimplementation.
Martin Matuska [Sun, 27 Nov 2011 11:44:20 +0000 (11:44 +0000)]
Update ZFS manual pages to a mdoc(7) reimplementation.

The zfs(8) and zpool(8) manual pages now match the state of the ZFS module
and have been customized for FreeBSD.

The new texts of the "Deduplication" subsection in zfs(8), the zpool "split"
command, the zfs "dedup" property and several other missing parts have been
added from illumos or OpenSolaris snv_134 (CDDL-licensed).

The mdoc(7) reimplementation of whole manual pages, the descriptions of the
zpool "readonly" property, "zfs diff" command and descriptions of several
other missing command flags and/or options were authored by myself.

MFC after: 1 week

12 years agoJoin chip depended methods for arge0 and arge1 into single call with unit.
Aleksandr Rybalko [Sun, 27 Nov 2011 11:15:59 +0000 (11:15 +0000)]
Join chip depended methods for arge0 and arge1 into single call with unit.

Approved by: adrian (mentor)

12 years agoRemove a seemingly unnecessary [1] ellipsis from netmap.4.
Glen Barber [Sun, 27 Nov 2011 06:55:57 +0000 (06:55 +0000)]
Remove a seemingly unnecessary [1] ellipsis from netmap.4.

Spotted by: manlint [1]

12 years agoPlug a TCP reassembly UMA zone leak introduced in r226113 by only using the
Lawrence Stewart [Sun, 27 Nov 2011 02:32:08 +0000 (02:32 +0000)]
Plug a TCP reassembly UMA zone leak introduced in r226113 by only using the
backup stack queue entry when the zone is exhausted, otherwise we leak a zone
allocation each time we plug a hole in the reassembly queue.

Reported by: many on freebsd-stable@ (thread: "TCP Reassembly Issues")
Tested by: many on freebsd-stable@ (thread: "TCP Reassembly Issues")
Reviewed by: bz (very brief sanity check)
MFC after: 3 days

12 years agosh: Remove impossible evalskip check in 'for'.
Jilles Tjoelker [Sun, 27 Nov 2011 00:09:59 +0000 (00:09 +0000)]
sh: Remove impossible evalskip check in 'for'.

12 years agoRemove unused 'plen' variable.
Pawel Jakub Dawidek [Sat, 26 Nov 2011 23:57:03 +0000 (23:57 +0000)]
Remove unused 'plen' variable.

12 years agosh: Reduce one level of evaltree() recursion when executing 'case'.
Jilles Tjoelker [Sat, 26 Nov 2011 23:28:31 +0000 (23:28 +0000)]
sh: Reduce one level of evaltree() recursion when executing 'case'.
Free expanded case text before executing commands.
Remove impossible evalskip checks (expanding an argument cannot set
evalskip anymore since $(break) and the like are properly executed in a
subshell environment).

12 years agoThe esp_max_ivlen global variable is not needed, we can just use
Pawel Jakub Dawidek [Sat, 26 Nov 2011 23:27:41 +0000 (23:27 +0000)]
The esp_max_ivlen global variable is not needed, we can just use
EALG_MAX_BLOCK_LEN.

12 years agomalloc(M_WAITOK) never fails, so there is no need to check for NULL.
Pawel Jakub Dawidek [Sat, 26 Nov 2011 23:18:19 +0000 (23:18 +0000)]
malloc(M_WAITOK) never fails, so there is no need to check for NULL.

12 years agoEliminate 'err' variable and just use existing 'error'.
Pawel Jakub Dawidek [Sat, 26 Nov 2011 23:15:28 +0000 (23:15 +0000)]
Eliminate 'err' variable and just use existing 'error'.

12 years agoSimplify code a bit.
Pawel Jakub Dawidek [Sat, 26 Nov 2011 23:13:30 +0000 (23:13 +0000)]
Simplify code a bit.

12 years agoThere is no need to virtualize esp_max_ivlen.
Pawel Jakub Dawidek [Sat, 26 Nov 2011 23:11:41 +0000 (23:11 +0000)]
There is no need to virtualize esp_max_ivlen.

12 years agosh: Add tests for some corner cases of 'case' exit status.
Jilles Tjoelker [Sat, 26 Nov 2011 22:28:25 +0000 (22:28 +0000)]
sh: Add tests for some corner cases of 'case' exit status.

These already work properly.

12 years agoChange another instance of amd(4) to esp(4) missed in r227006.
Marius Strobl [Sat, 26 Nov 2011 18:47:09 +0000 (18:47 +0000)]
Change another instance of amd(4) to esp(4) missed in r227006.

Submitted by: Garrett Cooper
MFC after: 3 days

12 years agoUpdate libcxxrt to remove the pthread dependency.
David Chisnall [Sat, 26 Nov 2011 18:46:33 +0000 (18:46 +0000)]
Update libcxxrt to remove the pthread dependency.

Also add the license from upstream to contrib.

Approved by: dim (mentor)

12 years agoRemove some more occurrences of amd(4) missed in r227982.
Marius Strobl [Sat, 26 Nov 2011 18:02:39 +0000 (18:02 +0000)]
Remove some more occurrences of amd(4) missed in r227982.

12 years agostyle(9) fix.
David Chisnall [Sat, 26 Nov 2011 16:49:25 +0000 (16:49 +0000)]
style(9) fix.

Approved by: dim (mentor)

12 years agoReturn not-implemented from pthread_once and pthread_key_create, rather
David Chisnall [Sat, 26 Nov 2011 15:57:09 +0000 (15:57 +0000)]
Return not-implemented from pthread_once and pthread_key_create, rather
than silently failing and returning success.

Without this, code calls pthread_once(), receives a return value of
success, and thinks that the passed function has been called.

Approved by: dim (mentor)

12 years agoImported the latest version of libcxxrt.
David Chisnall [Sat, 26 Nov 2011 14:18:39 +0000 (14:18 +0000)]
Imported the latest version of libcxxrt.

Approved by: dim (mentor)

12 years agoPrevent a division by zero with some broken batteries
Jean-Sébastien Pédron [Sat, 26 Nov 2011 13:43:50 +0000 (13:43 +0000)]
Prevent a division by zero with some broken batteries

This problem was seen on a laptop with a dead battery.

12 years agoFix breakage after r227983; lib/libcxxrt still got built, because it was
Dimitry Andric [Sat, 26 Nov 2011 03:26:06 +0000 (03:26 +0000)]
Fix breakage after r227983; lib/libcxxrt still got built, because it was
not disabled in the usual way (by adding it to __DEFAULT_NO_OPTIONS in
share/mk/bsd.own.mk), and because the test for MK_LIBCPLUSPLUS in
Makefile.inc1 was incorrect.

Pointy hat to: dim

12 years agoExport the "ffclock" feature for kernels compiled with feed-forward clock
Lawrence Stewart [Sat, 26 Nov 2011 01:44:37 +0000 (01:44 +0000)]
Export the "ffclock" feature for kernels compiled with feed-forward clock
support.

Suggested by: netchild
Reviewed by: netchild

12 years agoProvide proper error message when trying to build xdev, xdev-build or
Oleksandr Tymoshenko [Sat, 26 Nov 2011 00:30:39 +0000 (00:30 +0000)]
Provide proper error message when trying to build xdev, xdev-build or
    xdev-install targets without either XDEV or XDEV_ARCH defined.

12 years agotest: Reduce code size of ops table.
Jilles Tjoelker [Fri, 25 Nov 2011 23:45:29 +0000 (23:45 +0000)]
test: Reduce code size of ops table.

12 years agoImport libc++ / libcxxrt into base. Not build by default yet (use
David Chisnall [Fri, 25 Nov 2011 20:59:04 +0000 (20:59 +0000)]
Import libc++ / libcxxrt into base.  Not build by default yet (use
MK_LIBCPLUSPLUS=yes to enable).  This is a work-in-progress.  It works for
me, but is not guaranteed to work for anyone else and may eat your dog.

To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags.

Bug reports welcome, bug fixes even more welcome...

Approved by: dim (mentor)

12 years agoDeorbit the broken amd(4) (see PR 124667), which was superseded by esp(4)
Marius Strobl [Fri, 25 Nov 2011 19:29:21 +0000 (19:29 +0000)]
Deorbit the broken amd(4) (see PR 124667), which was superseded by esp(4)
as of r227006.

12 years agoPoint out that @reboot runs at every cron startup, not just system
Warren Block [Fri, 25 Nov 2011 17:41:12 +0000 (17:41 +0000)]
Point out that @reboot runs at every cron startup, not just system
startup.

Discussed on: hackers@

Approved by: gjb (mentor)
MFC after: 1 week

12 years agoMove to SCHED_ULE by default. Since r226057 SCHED_ULE and sparc64 are
Marius Strobl [Fri, 25 Nov 2011 17:40:01 +0000 (17:40 +0000)]
Move to SCHED_ULE by default. Since r226057 SCHED_ULE and sparc64 are
compatible with each other and since r227539 the last issue seen when
using SCHED_ULE is fixed. At least on UP and 2-way machines SCHED_4BSD
still performs better than SCHED_ULE, however, the optimizations done
in r225889 pretty much compensate that so there's at least no net
regression.
Thanks go to Peter Jeremy for extensive testing.

12 years agolibcxxrt version snapshot created.
David Chisnall [Fri, 25 Nov 2011 15:48:30 +0000 (15:48 +0000)]
libcxxrt version snapshot created.

Approved by: dim (mentor)

12 years agoImport the new version of libcxxrt, which grew an extra ARM.
David Chisnall [Fri, 25 Nov 2011 15:46:25 +0000 (15:46 +0000)]
Import the new version of libcxxrt, which grew an extra ARM.

Approved by: dim (mentor)

12 years agoFix build.
Xin LI [Fri, 25 Nov 2011 07:11:02 +0000 (07:11 +0000)]
Fix build.

12 years agoRemove DEBUG_FLAGS.
Max Khon [Fri, 25 Nov 2011 07:10:59 +0000 (07:10 +0000)]
Remove DEBUG_FLAGS.

12 years agoAdd firmware update support for SCSI devices.
Ed Maste [Fri, 25 Nov 2011 04:03:37 +0000 (04:03 +0000)]
Add firmware update support for SCSI devices.

Firmware can be reprogrammed on devices from Hitachi, HP, IBM, Plextor,
Quantum, and Seagate.  At least one device from each manufacturer has
been tested with some version of this code, and it has been used to
update thousands of drives so far.

The man page suggests having a backup of the drive's data, and the
operation must be confirmed, either interactively or on the command
line.  (This is the same as the confirmation on the format command.)

This work is largely derived from fwprog.c by Andre Albsmeier.

Submitted by: Nima Misaghian
Sponsored by: Sandvine Incorporated
MFC after: 3 months

12 years agoIncrease the CDMA sync timeout for Schizo bridges to 15 seconds as used by
Marius Strobl [Thu, 24 Nov 2011 23:48:22 +0000 (23:48 +0000)]
Increase the CDMA sync timeout for Schizo bridges to 15 seconds as used by
OpenSolaris. One second turned out to be not enough for certain loads while
10 seconds were sufficient.
Reported by: Peter Jeremy

MFC after: 3 days

12 years agoRemove superfluous check: SIOCAIFADDR must have ifra_addr supplied.
Gleb Smirnoff [Thu, 24 Nov 2011 22:46:11 +0000 (22:46 +0000)]
Remove superfluous check: SIOCAIFADDR must have ifra_addr supplied.

12 years agoFix stupid typo in r227830.
Gleb Smirnoff [Thu, 24 Nov 2011 22:43:48 +0000 (22:43 +0000)]
Fix stupid typo in r227830.

PR: 162806
Pointy hat to: glebius

12 years agoAdjust a few old checks to use __FreeBSD_version macro to
Robert Millan [Thu, 24 Nov 2011 21:23:58 +0000 (21:23 +0000)]
Adjust a few old checks to use __FreeBSD_version macro to
determine which version of FreeBSD kernel we're compiling.

Approved by: kib (mentor)

12 years agousr.bin/procstat
Mikolaj Golub [Thu, 24 Nov 2011 20:54:06 +0000 (20:54 +0000)]
usr.bin/procstat

Add -l flag to display resource limits.

PR: bin/161257
Reviewed by: kib
MFC after: 2 weeks

12 years agoAdd sysctl to get process resource limits.
Mikolaj Golub [Thu, 24 Nov 2011 20:43:37 +0000 (20:43 +0000)]
Add sysctl to get process resource limits.

Reviewed by: kib
MFC after: 2 weeks

12 years agoAdd const qualifier to rlimit_ident.
Mikolaj Golub [Thu, 24 Nov 2011 20:37:09 +0000 (20:37 +0000)]
Add const qualifier to rlimit_ident.

Reviewed by: kib
MFC after: 2 weeks

12 years agolibodialog: Remove no longer used library.
Max Khon [Thu, 24 Nov 2011 20:34:50 +0000 (20:34 +0000)]
libodialog: Remove no longer used library.

12 years agoFix a race between getvnode() dereferencing half-constructed file
Konstantin Belousov [Thu, 24 Nov 2011 20:34:06 +0000 (20:34 +0000)]
Fix a race between getvnode() dereferencing half-constructed file
and dupfdopen().

Reported and tested by: pho
MFC after: 3 days

12 years agolibodialog: disconnect from the build and obsolete.
Max Khon [Thu, 24 Nov 2011 20:31:06 +0000 (20:31 +0000)]
libodialog: disconnect from the build and obsolete.

12 years agocalloc +1 DIALOG_LISTITEM to prevent possible wild pointer access
Max Khon [Thu, 24 Nov 2011 18:45:23 +0000 (18:45 +0000)]
calloc +1 DIALOG_LISTITEM to prevent possible wild pointer access
in dlg_default_listitem().

12 years agoPort to new libdialog.
Max Khon [Thu, 24 Nov 2011 18:37:16 +0000 (18:37 +0000)]
Port to new libdialog.

12 years agoDisk selection dialog is now a normal menu, not a checkboxed menu:
Max Khon [Thu, 24 Nov 2011 15:47:01 +0000 (15:47 +0000)]
Disk selection dialog is now a normal menu, not a checkboxed menu:
checkboxed menu is confusing and also can not be implemented
in new libdialog.

12 years agoI've had verification that the second-last 64k is actually used by the tplink
Adrian Chadd [Thu, 24 Nov 2011 15:12:57 +0000 (15:12 +0000)]
I've had verification that the second-last 64k is actually used by the tplink
firmware to store configuration data.

It's safe to overwrite it.

12 years agoAdd missing ;;
Max Khon [Thu, 24 Nov 2011 14:22:05 +0000 (14:22 +0000)]
Add missing ;;

12 years agoUse ${VAR} instead of $(VAR) consistently.
Max Khon [Thu, 24 Nov 2011 14:17:04 +0000 (14:17 +0000)]
Use ${VAR} instead of $(VAR) consistently.

12 years agoUtility script to build specific parts of the source tree on all arches
Max Khon [Thu, 24 Nov 2011 14:16:01 +0000 (14:16 +0000)]
Utility script to build specific parts of the source tree on all arches

12 years agoPort to new libdialog.
Max Khon [Thu, 24 Nov 2011 13:24:06 +0000 (13:24 +0000)]
Port to new libdialog.

12 years agoRevert r227841 and part of r227798. We still build libpam in two passes,
Dag-Erling Smørgrav [Thu, 24 Nov 2011 13:18:58 +0000 (13:18 +0000)]
Revert r227841 and part of r227798.  We still build libpam in two passes,
but we use STATIC_CFLAGS instead of our own private .c.o rule.

MFC after: 3 weeks

12 years agoAdd CTF magic to the new .c.o rule.
Dag-Erling Smørgrav [Thu, 24 Nov 2011 13:13:50 +0000 (13:13 +0000)]
Add CTF magic to the new .c.o rule.

MFC after: 3 weeks

12 years agoMove up the address to the top of the sctp_udencaps structure
Michael Tuexen [Thu, 24 Nov 2011 10:58:48 +0000 (10:58 +0000)]
Move up the address to the top of the sctp_udencaps structure
like in all other structures. This avoids alignment problems.

MFC after: 3 months.

12 years agoMove up the address to the top of the sctp_paddrthlds structure
Michael Tuexen [Thu, 24 Nov 2011 10:54:30 +0000 (10:54 +0000)]
Move up the address to the top of the sctp_paddrthlds structure
like in all other structures. This avoids alignment problems.

MFC after: 3 days.

12 years agoRemove unused code.
Max Khon [Thu, 24 Nov 2011 10:08:22 +0000 (10:08 +0000)]
Remove unused code.

12 years agoRemove unused code.
Max Khon [Thu, 24 Nov 2011 08:56:24 +0000 (08:56 +0000)]
Remove unused code.

12 years agoNow that I've brought up FreeBSD via flash, I've discovered that
Adrian Chadd [Thu, 24 Nov 2011 07:37:19 +0000 (07:37 +0000)]
Now that I've brought up FreeBSD via flash, I've discovered that
the second-last 64k seems to be the default firmware board configuration
area.

Since I have no idea whether uboot uses it or not - and it's prefixed
with an atheros eeprom signature (0xaa55), I figure the safest thing
to do is mark it as read-only.

I've modified my local tplink firmware building program to generate
a board configuration section - which is separate to this partition.
It's located in the 64k _before_ this particular 64k.

The firmware build program from OpenWRT never initialises those
values and the firmware images from tplink also leave it 0x0, so I
don't currently know what the exact, correct details should be.

12 years agoFlip on AR71XX_ENV_UBOOT so the environment variables are properly
Adrian Chadd [Thu, 24 Nov 2011 07:33:41 +0000 (07:33 +0000)]
Flip on AR71XX_ENV_UBOOT so the environment variables are properly
processed. (Which is to say they're currently ignored.)

12 years agoIntroduce a new (global, sorry!) option which controls whether
Adrian Chadd [Thu, 24 Nov 2011 07:32:52 +0000 (07:32 +0000)]
Introduce a new (global, sorry!) option which controls whether
the ar71xx platform code should assume a uboot or redboot environment.

The current code gets very confused (and just crashes) on a uboot
environment, where each attribute=value pair is in a single entry.
Redboot on the other hand stores it as "attribute", "value", "attribute",
"value", ...

This allows the kernel to boot on a TP-LINK TL-WR1043ND from flash,
where the uboot environment gets setup. This didn't show up during a netboot
as "tftpboot" and "go" don't setup the uboot environment variables.

12 years agoDon't compile in the AR9130 embedded WMAC code into the HAL by default.
Adrian Chadd [Thu, 24 Nov 2011 06:27:47 +0000 (06:27 +0000)]
Don't compile in the AR9130 embedded WMAC code into the HAL by default.

This won't work unless AH_SUPPORT_AR9130 which can't be enabled - it
breaks the other 11n chipsets for now.

Sponsored by: Hobnob, Inc.

12 years agoFlesh out a geom_map setup, so the kernel can be squeezed _onto_ the device.
Adrian Chadd [Thu, 24 Nov 2011 04:39:01 +0000 (04:39 +0000)]
Flesh out a geom_map setup, so the kernel can be squeezed _onto_ the device.

The default flash layout gives only 1 megabyte for the kernel, gzipped.
The uboot firmware running on this device only supports gzip, not lzma, so
we actually _do_ have to try and slim the kernel down a bit.

But, since I can't actually do that at the present, I'm opting to:

* extend the kernel from 1mb to 2mb;
* have rootfs fill the rest of that, save 64k;
* eventually I'll hide a 64k config partition at the end, between the
  end of rootfs and the ART (radio configuration data.)

The uboot firmware doesn't care about the partition layout. It just
expects the kernel application image to sit at 0xbf020000 (right after
the 128k uboot image.) The uboot header isn't actually read either -
it's "faked" from a "tplink" flash image header. So as long as the
map configuration here matches what is being written out via the
tplink firmware generator, everything is a-ok.

12 years agoCompile in the right bits so the AR9130 WMAC support functions correctly.
Adrian Chadd [Thu, 24 Nov 2011 04:34:04 +0000 (04:34 +0000)]
Compile in the right bits so the AR9130 WMAC support functions correctly.

A previous commit disabled compiling the AR9130 support in the default
HAL build in the kernel. Since the AR9130 support won't actually function
without AH_SUPPORT_AR9130 (and that abomination needs to be undone at some
point, in order to allow USB 11n NICs to also work), we now have to
explicitly compile it in.

But since the 11n RF backends don't (currently) join the RF linker set,
one has to compile in _an_ RF backend for the HAL to compile.

12 years agoAdd a comment documenting where the WMAC hangs off of.
Adrian Chadd [Thu, 24 Nov 2011 04:23:42 +0000 (04:23 +0000)]
Add a comment documenting where the WMAC hangs off of.

At some point it would be nice to correctly update the bus glue to make
this "correct", including having the DDR flush occur in the right spot
(ie, any AHB interrupt.)

12 years agoFlip on these debugging options by default. This is -HEAD after all.
Adrian Chadd [Thu, 24 Nov 2011 04:21:19 +0000 (04:21 +0000)]
Flip on these debugging options by default. This is -HEAD after all.

12 years agoSlim the default build down a little:
Adrian Chadd [Thu, 24 Nov 2011 04:19:02 +0000 (04:19 +0000)]
Slim the default build down a little:

* Disable the NFS client, it's not needed for booting off of flash.
* Don't compile in softdep, snapshots, ufs acls and directory hashing.

12 years agoTo save more power, switch to 10/100Mbps link when controller is
Pyun YongHyeon [Wed, 23 Nov 2011 23:29:18 +0000 (23:29 +0000)]
To save more power, switch to 10/100Mbps link when controller is
put into suspend/shutdown.  Old PCI controllers performed that
operation in firmware but for RTL8111C or newer controllers, it's
responsibility of driver.  It's not clear whether the firmware of
RTL8111B still downgrades its speed to 10/100Mbps so leave it as it
was.

12 years agoMake sure to stop TX MAC before freeing queued TX frames.
Pyun YongHyeon [Wed, 23 Nov 2011 22:07:13 +0000 (22:07 +0000)]
Make sure to stop TX MAC before freeing queued TX frames.
For RTL8111DP, check if the TX MAC is active by reading RL_GTXSTART
register.  For RTL8402/8168E-VL/8168F/8411, wait until TX queue is
empty.

12 years agoWrap BCM5785 in #ifdef notyet for now. According to yongari@ there are
Marius Strobl [Wed, 23 Nov 2011 22:05:44 +0000 (22:05 +0000)]
Wrap BCM5785 in #ifdef notyet for now. According to yongari@ there are
issues probably needing workarounds in bge(4) when brgphy(4) handles this
PHY. Letting ukphy(4) handle it instead results in a working configuration,
although likely with performance penalties.

12 years ago- Just use cam_calc_geometry(9) on newer version of FreeBSD rather than
Marius Strobl [Wed, 23 Nov 2011 21:43:51 +0000 (21:43 +0000)]
- Just use cam_calc_geometry(9) on newer version of FreeBSD rather than
  duplicating it.
- In hptmv(4) and hptrr(4) use __FBSDID and DEVMETHOD_END.

12 years agoUse DEVMETHOD_END.
Marius Strobl [Wed, 23 Nov 2011 20:27:26 +0000 (20:27 +0000)]
Use DEVMETHOD_END.

12 years agoProbe the BCM5785.
Marius Strobl [Wed, 23 Nov 2011 20:09:34 +0000 (20:09 +0000)]
Probe the BCM5785.

Obtained from: NetBSD

12 years agoSync with NetBSD rev. 1.104
Marius Strobl [Wed, 23 Nov 2011 20:08:56 +0000 (20:08 +0000)]
Sync with NetBSD rev. 1.104

Obtained from: NetBSD

12 years agoRemove unused functions.
Max Khon [Wed, 23 Nov 2011 19:11:03 +0000 (19:11 +0000)]
Remove unused functions.

12 years ago- Remove unused old libdialog includes
Max Khon [Wed, 23 Nov 2011 19:06:30 +0000 (19:06 +0000)]
- Remove unused old libdialog includes
- Remove unused functions

12 years agoFix parsing of redirect_addr argument.
Gleb Smirnoff [Wed, 23 Nov 2011 18:38:08 +0000 (18:38 +0000)]
Fix parsing of redirect_addr argument.

PR: kern/162739
MFC after: 3 days

12 years agoAvoid double free creating a new RAID with invalid command line arguments.
Ed Maste [Wed, 23 Nov 2011 17:02:27 +0000 (17:02 +0000)]
Avoid double free creating a new RAID with invalid command line arguments.

Submitted by: Xin Huang <xhuang sandvine com>
Reviewed by: rstone@
MFC after: 1 week

12 years agosome tweaks to build picobsd for different architectures.
Luigi Rizzo [Wed, 23 Nov 2011 12:05:39 +0000 (12:05 +0000)]
some tweaks to build picobsd for different architectures.

12 years agoPlug fd leaks
Kevin Lo [Wed, 23 Nov 2011 10:27:18 +0000 (10:27 +0000)]
Plug fd leaks

12 years agofix formatting warning using casts. The numbers involved
Luigi Rizzo [Wed, 23 Nov 2011 09:45:48 +0000 (09:45 +0000)]
fix formatting warning using casts. The numbers involved
are small and these are debug statements, so there is no reason to
obfuscate the format string with PRIsomeKINDofINTEGER

12 years agoFix build without INVARIANTS.
Mikolaj Golub [Wed, 23 Nov 2011 08:11:04 +0000 (08:11 +0000)]
Fix build without INVARIANTS.

Discussed with: kib

12 years agoFix build, hopefully.
Mikolaj Golub [Wed, 23 Nov 2011 07:34:09 +0000 (07:34 +0000)]
Fix build, hopefully.

Reviewed by: kib

12 years agoRe-lock the ath lock after ath_reset() has been called.
Adrian Chadd [Wed, 23 Nov 2011 07:12:26 +0000 (07:12 +0000)]
Re-lock the ath lock after ath_reset() has been called.
The calibrate callout is done with the sc lock held.

This only showed up when using an older NIC (AR5212) whose
radio/phy requires the rfgain adjustment.

Pointy-hat-to: adrian
Sponsored by: Hobnob, Inc.

12 years agoRemove unused variable mii.
Kevin Lo [Wed, 23 Nov 2011 05:34:01 +0000 (05:34 +0000)]
Remove unused variable mii.
This variable is initialized but not used.

Reviewed by: yongari

12 years agoTidy up the statistic documentation.
Adrian Chadd [Wed, 23 Nov 2011 05:03:27 +0000 (05:03 +0000)]
Tidy up the statistic documentation.

Sponsored by: Hobnob, Inc.

12 years agoAdd the new statistics introduced in r227868.
Adrian Chadd [Wed, 23 Nov 2011 05:01:23 +0000 (05:01 +0000)]
Add the new statistics introduced in r227868.

Sponsored by: Hobnob, Inc.

12 years agoFlesh out the TX aggregation completion statistics.
Adrian Chadd [Wed, 23 Nov 2011 05:00:25 +0000 (05:00 +0000)]
Flesh out the TX aggregation completion statistics.

* Failall is now named just that.
* Add TX ok and TX fail, for aggregate frame sub-frames.

This will break athstats; a followup commit wil resolve this.

Sponsored by: Hobnob, Inc.

12 years agoDisable accepting frames in re_stop() to put RX MAC into idle state.
Pyun YongHyeon [Wed, 23 Nov 2011 02:08:05 +0000 (02:08 +0000)]
Disable accepting frames in re_stop() to put RX MAC into idle state.
Because there is no reliable way to know whether RX MAC is in
stopped state, rejecting all frames would be the only way to
minimize possible races.
Otherwise it's possible to receive frames while stop command
execution is in progress and controller can DMA the frame to freed
RX buffer during that period.
This was observed on recent PCIe controllers(i.e. RTL8111F).

While this change may not be required on old controllers it
wouldn't make negative effects on old controllers.  One side effect
of this change is disabling receive so driver reprograms RL_RXCFG
to receive WOL frames when it is put into suspend or shutdown.

This should address occasional 'memory modified free' errors seen
on recent RealTek controllers.

12 years agofdopendir(): Do not close the passed file descriptor on failure.
Jilles Tjoelker [Tue, 22 Nov 2011 23:46:56 +0000 (23:46 +0000)]
fdopendir(): Do not close the passed file descriptor on failure.

Reviewed by: delphij

12 years agoPerform media change after setting IFF_DRV_RUNNING flag. Without it,
Pyun YongHyeon [Tue, 22 Nov 2011 23:27:59 +0000 (23:27 +0000)]
Perform media change after setting IFF_DRV_RUNNING flag. Without it,
driver would ignore the first link state update if controller
already established a link such that it would have to take
additional link state handling in re_tick().

12 years agoWriting access to RL_CFG5 register also requires EEPROM write
Pyun YongHyeon [Tue, 22 Nov 2011 23:19:49 +0000 (23:19 +0000)]
Writing access to RL_CFG5 register also requires EEPROM write
access.
While I'm here, enable WOL through magic packet but disable waking
up system via unicast, multicast and broadcast frames.  Otherwise,
multicast or unicast frame(e.g. ICMP echo request) can wake up
system which is not probably wanted behavior on most environments.
This was not known as problem because RL_CFG5 register access had
not effect until this change.
The capability to wake up system with unicast/multicast frames
are still set in driver, default off, so users who need that
feature can still activate it with ifconfig(8).

12 years agoRename device_delete_all_children() into device_delete_children().
Hans Petter Selasky [Tue, 22 Nov 2011 21:56:55 +0000 (21:56 +0000)]
Rename device_delete_all_children() into device_delete_children().

Suggested by: jhb @ and marius @
MFC after: 1 week

12 years agos,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mention
Marius Strobl [Tue, 22 Nov 2011 21:55:40 +0000 (21:55 +0000)]
s,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mention
of kobj(9) from device drivers.

12 years agoStyle change.
Hans Petter Selasky [Tue, 22 Nov 2011 21:53:19 +0000 (21:53 +0000)]
Style change.

Suggested by: jhb @ and marius @
MFC after: 1 week

12 years agoRemove yet another outdated note about procfs(5) being required.
Mikolaj Golub [Tue, 22 Nov 2011 21:53:06 +0000 (21:53 +0000)]
Remove yet another outdated note about procfs(5) being required.

Spotted by: arundel

12 years agoforgot to merge NETMAP entries in sys/conf !
Luigi Rizzo [Tue, 22 Nov 2011 21:50:38 +0000 (21:50 +0000)]
forgot to merge NETMAP entries in sys/conf !

12 years agoUpdate to use DEVMETHOD_END.
Marius Strobl [Tue, 22 Nov 2011 21:49:29 +0000 (21:49 +0000)]
Update to use DEVMETHOD_END.

12 years ago- There's no need to overwrite the default device method with the default
Marius Strobl [Tue, 22 Nov 2011 21:28:20 +0000 (21:28 +0000)]
- There's no need to overwrite the default device method with the default
  one. Interestingly, these are actually the default for quite some time
  (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9)
  since r52045) but even recently added device drivers do this unnecessarily.
  Discussed with: jhb, marcel
- While at it, use DEVMETHOD_END.
  Discussed with: jhb
- Also while at it, use __FBSDID.

12 years agoFor IP1001 PHY, do not set multi-port device(MASTER). Ideally this
Pyun YongHyeon [Tue, 22 Nov 2011 21:22:06 +0000 (21:22 +0000)]
For IP1001 PHY, do not set multi-port device(MASTER).  Ideally this
bit should not affect link establishment process of auto-negotiation
if manual configuration is not used, which is true in auto-negotiation.
However it seems setting this bit interfere with IP1001 PHY's
down-shifting feature such that establishing a 10/100Mbps link failed
when 1000baseT link is not available during auto-negotiation process.

Tested by: Andrey Smagin <samspeed <> mail dot ru >

12 years agoRemove libpam from _prebuild_libs. This should unbreak the -jX build.
Dag-Erling Smørgrav [Tue, 22 Nov 2011 21:18:14 +0000 (21:18 +0000)]
Remove libpam from _prebuild_libs.  This should unbreak the -jX build.

MFC after: 3 weeks