]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAdd a comment that shows how to limit the build to the specific list of arches.
fjoe [Mon, 28 Nov 2011 14:03:36 +0000 (14:03 +0000)]
Add a comment that shows how to limit the build to the specific list of arches.

12 years ago.include <bsd.init.mk> instead of <bsd.own.mk>
fjoe [Mon, 28 Nov 2011 14:01:17 +0000 (14:01 +0000)]
.include <bsd.init.mk> instead of <bsd.own.mk>

The former allows common settings from ../Makefile.inc to be used.

12 years agoSimplify arge_flush_ddr to use updated ar71xx_device_flush_ddr_ge(unit).
ray [Mon, 28 Nov 2011 13:42:59 +0000 (13:42 +0000)]
Simplify arge_flush_ddr to use updated ar71xx_device_flush_ddr_ge(unit).

Approved by: adrian (mentor)

12 years agoSynchronize with laster version of m4 from OpenBSD and NetBSD
bapt [Mon, 28 Nov 2011 13:32:39 +0000 (13:32 +0000)]
Synchronize with laster version of m4 from OpenBSD and NetBSD
This bring better compatibility with gnum4

Reviewed by: cognet
Approved by: cognet
Obtained from: OpenBSD, NetBSD

12 years agoFix one more fallout from r227791: do not overwrite trimmed sa_len
glebius [Mon, 28 Nov 2011 13:30:14 +0000 (13:30 +0000)]
Fix one more fallout from r227791: do not overwrite trimmed sa_len
on the ia_sockmask when doing SIOCSIFNETMASK.

Reported by: Stefan Bethke <stb lassitu.de>, gonzo
Pointy hat to: glebius

12 years agoThe size of APM could be bigger than number of already allocated entries.
ae [Mon, 28 Nov 2011 12:38:24 +0000 (12:38 +0000)]
The size of APM could be bigger than number of already allocated entries.
And the first usable sector should not start from the inside of APM area.

MFC after: 1 month

12 years agoupgrade gperf to the last GPLv2 version (3.0.3)
bapt [Mon, 28 Nov 2011 12:29:16 +0000 (12:29 +0000)]
upgrade gperf to the last GPLv2 version (3.0.3)

Reviewed by: cognet
Approved by: cognet

12 years agoChange the Makefile in cddl/lib/drti to use bsd.lib.mk instead of
rwatson [Mon, 28 Nov 2011 10:01:36 +0000 (10:01 +0000)]
Change the Makefile in cddl/lib/drti to use bsd.lib.mk instead of
bsd.prog.mk -- we need to compile PIC, which requires a library build.
With this change, USDT (userspace DTrace probes) work from within
shared libraries.

PR: kern/159046
Submitted by: Alex Samorukov <samm at os2.kiev.ua>
Comments by: Scott Lystig Fritchie <slfritchie at snookles.com>
MFC after: 3 days

12 years agoThis commit marks the beginning of a new internal USB
hselasky [Mon, 28 Nov 2011 09:54:41 +0000 (09:54 +0000)]
This commit marks the beginning of a new internal USB
transfer statemachine. This work is about using a single
state variable instead of multiple state bits as input
for the USB statemachine to determine what to do in the
various parts of the code. No APIs towards USB device
drivers or USB host controller drivers will be changed.

MFC after: 1 month

12 years agoUse singular form for zfs destroy snapshot in zfs(8).
mm [Mon, 28 Nov 2011 09:33:13 +0000 (09:33 +0000)]
Use singular form for zfs destroy snapshot in zfs(8).

MFC after: 6 days

12 years agoAdd missing warning to zfs(8) for using "zfs destroy" with -r and -R flags.
mm [Mon, 28 Nov 2011 09:14:51 +0000 (09:14 +0000)]
Add missing warning to zfs(8) for using "zfs destroy" with -r and -R flags.

Obtained from: illumos
MFC after: 6 days

12 years agoFix build, fininshing r228018.
glebius [Mon, 28 Nov 2011 08:10:12 +0000 (08:10 +0000)]
Fix build, fininshing r228018.

12 years agoCast a_val on printing. This fixes build on mips.
trociny [Mon, 28 Nov 2011 07:09:29 +0000 (07:09 +0000)]
Cast a_val on printing. This fixes build on mips.

12 years agoPlug memory leaks and fix open(2) error check.
kevlo [Mon, 28 Nov 2011 05:34:16 +0000 (05:34 +0000)]
Plug memory leaks and fix open(2) error check.

Reviewed by: nwhitehorn
MFC after: 3 days

12 years agoThis should have been committed in r228030.
trociny [Sun, 27 Nov 2011 21:01:51 +0000 (21:01 +0000)]
This should have been committed in r228030.

MFC after: 2 weeks

12 years agoAdd missing -n flag to "zpool import" description.
mm [Sun, 27 Nov 2011 20:24:07 +0000 (20:24 +0000)]
Add missing -n flag to "zpool import" description.

MFC after: 1 week

12 years agoCross-reference capsicum.4 from cap_enter.2 and cap_new.2.
rwatson [Sun, 27 Nov 2011 19:45:41 +0000 (19:45 +0000)]
Cross-reference capsicum.4 from cap_enter.2 and cap_new.2.

MFC after: 3 days
Sponsored by: Google, Inc.

12 years agoAdd an introductory Capsicum man page providing a high-level description of
rwatson [Sun, 27 Nov 2011 19:44:15 +0000 (19:44 +0000)]
Add an introductory Capsicum man page providing a high-level description of
its mechanisms, pointing at other pertinent man pages, and cautioning about
the experimental status of Capsicum in FreeBSD.

MFC after: 3 days
Sponsored by: Google, Inc.

12 years agoFix a warning reported by arundel@.
tuexen [Sun, 27 Nov 2011 17:51:13 +0000 (17:51 +0000)]
Fix a warning reported by arundel@.
Fix a bug where the parameter length of a supported address types
parameter is set to a wrong value if the kernel is built with
with either INET or INET6, but not both.

MFC after: 3 days.

12 years agoAdd sysctl to retrieve ps_strings structure location of another process.
trociny [Sun, 27 Nov 2011 17:05:26 +0000 (17:05 +0000)]
Add sysctl to retrieve ps_strings structure location of another process.

Suggested by: kib
Reviewed by: kib

12 years agoIn sysctl_kern_proc_auxv the process was released too early: we still
trociny [Sun, 27 Nov 2011 16:56:01 +0000 (16:56 +0000)]
In sysctl_kern_proc_auxv the process was released too early: we still
need to hold it when checking process sv_flags.

MFC after: 2 weeks

12 years ago- Based on a report on sparc64@ move V245 to the list of known working
marius [Sun, 27 Nov 2011 16:50:13 +0000 (16:50 +0000)]
- Based on a report on sparc64@ move V245 to the list of known working
  machines.
- Mention that V480 with broken centerplanes have a chance of working with
  the WAR in the upcoming 8.3-RELEASE and 9.0-RELEASE.

MFC after: 3 days

12 years agoMove the scsi_da_bios_params() prototype from pc98_machdep.h to md_var.h
marius [Sun, 27 Nov 2011 16:22:19 +0000 (16:22 +0000)]
Move the scsi_da_bios_params() prototype from pc98_machdep.h to md_var.h
where the prototype for pc98_ata_disk_firmware_geom_adjust() also lives
in order to avoid an #ifdef'ed include in cam(4).

12 years agoCompile cam_machdep.c if it exists, missed in r228022.
marius [Sun, 27 Nov 2011 16:17:17 +0000 (16:17 +0000)]
Compile cam_machdep.c if it exists, missed in r228022.

12 years agoMake proctstat -x output more readable.
trociny [Sun, 27 Nov 2011 15:53:58 +0000 (15:53 +0000)]
Make proctstat -x output more readable.

This also fixes the issue, spotted by mdf, with values that were
printed as decimal and had hex prefixes.

Discussed with: kib, rwatson
MFC after: 2 weeks

12 years agoUpdate comment.
marius [Sun, 27 Nov 2011 15:49:46 +0000 (15:49 +0000)]
Update comment.

12 years agoAdd unicode support to ntfs
kevlo [Sun, 27 Nov 2011 15:43:49 +0000 (15:43 +0000)]
Add unicode support to ntfs

Obtained from: imura

12 years agoFor sparc64 also adjust the geometry of da(4) driven disks to not overflow
marius [Sun, 27 Nov 2011 15:43:40 +0000 (15:43 +0000)]
For sparc64 also adjust the geometry of da(4) driven disks to not overflow
the 16-bit cylinders field of the VTOC8 disk label (at around 502GB). The
geometry chosen for disks above that limit allows to use disks up to 2TB,
which is the limit of the extended VTOC8 format. The geometry used for
disks smaller than the 16-bit cylinders limit stays the same as used by
cam_calc_geometry(9) for extended translation.
Thanks to Hans-Joerg Sirtl for providing hardware for testing this change.

MFC after: 3 days

12 years agoAdd LINT-NOINET LINT-NOINET6 and LINT-NOIP to the make clean target.
jh [Sun, 27 Nov 2011 13:53:36 +0000 (13:53 +0000)]
Add LINT-NOINET LINT-NOINET6 and LINT-NOIP to the make clean target.
This was missed in r221353.

12 years agoFix zfs(8) and zpool(8) context help to repport supported flags.
mm [Sun, 27 Nov 2011 11:46:09 +0000 (11:46 +0000)]
Fix zfs(8) and zpool(8) context help to repport supported flags.

MFC after: 3 days

12 years agoUpdate ZFS manual pages to a mdoc(7) reimplementation.
mm [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.
ray [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.
gjb [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
lstewart [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 [Sun, 27 Nov 2011 00:09:59 +0000 (00:09 +0000)]
sh: Remove impossible evalskip check in 'for'.

12 years agoRemove unused 'plen' variable.
pjd [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 [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
pjd [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.
pjd [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'.
pjd [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.
pjd [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.
pjd [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 [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 [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.
theraven [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 [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.
theraven [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
theraven [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.
theraven [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
dumbbell [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
dim [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
lstewart [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
gonzo [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 [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
theraven [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 [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
wblock [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 [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.
theraven [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.
theraven [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.
delphij [Fri, 25 Nov 2011 07:11:02 +0000 (07:11 +0000)]
Fix build.

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

12 years agoAdd firmware update support for SCSI devices.
emaste [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 [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.
glebius [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.
glebius [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
rmh [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
trociny [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.
trociny [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.
trociny [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.
fjoe [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
kib [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.
fjoe [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
fjoe [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.
fjoe [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:
fjoe [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 [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 ;;
fjoe [Thu, 24 Nov 2011 14:22:05 +0000 (14:22 +0000)]
Add missing ;;

12 years agoUse ${VAR} instead of $(VAR) consistently.
fjoe [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
fjoe [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.
fjoe [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,
des [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.
des [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
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
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.
fjoe [Thu, 24 Nov 2011 10:08:22 +0000 (10:08 +0000)]
Remove unused code.

12 years agoRemove unused code.
fjoe [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 [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 [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 [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 [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 [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 [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 [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 [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 [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
yongari [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.
yongari [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 [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 [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.