]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoMFC
attilio [Mon, 2 May 2011 22:03:30 +0000 (22:03 +0000)]
MFC

13 years agoClang r130700 can now compile sys/boot/i386/boot2 with room to spare.
dim [Mon, 2 May 2011 21:13:08 +0000 (21:13 +0000)]
Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.

13 years agoMinor updates to the clang and tblgen manpages.
dim [Mon, 2 May 2011 21:10:13 +0000 (21:10 +0000)]
Minor updates to the clang and tblgen manpages.

13 years agoHandle a rare edge case with nearly full TCP receive buffers. If a TCP
jhb [Mon, 2 May 2011 21:05:52 +0000 (21:05 +0000)]
Handle a rare edge case with nearly full TCP receive buffers.  If a TCP
buffer fills up causing the remote sender to enter into persist mode, but
there is still room available in the receive buffer when a window probe
arrives (either due to window scaling, or due to the local application
very slowing draining data from the receive buffer), then the single byte
of data in the window probe is accepted.  However, this can cause rcv_nxt
to be greater than rcv_adv.  This condition will only last until the next
ACK packet is pushed out via tcp_output(), and since the previous ACK
advertised a zero window, the ACK should be pushed out while the TCP
pcb is write-locked.

During the window while rcv_nxt is greather than rcv_adv, a few places
would compute the remaining receive window via rcv_adv - rcv_nxt.
However, this value was then (uint32_t)-1.  On a 64 bit machine this
could expand to a positive 2^32 - 1 when cast to a long.  In particular,
when calculating the receive window in tcp_output(), the result would be
that the receive window was computed as 2^32 - 1 resulting in advertising
a far larger window to the remote peer than actually existed.

Fix various places that compute the remaining receive window to either
assert that it is not negative (i.e. rcv_nxt <= rcv_adv), or treat the
window as full if rcv_nxt is greather than rcv_adv.

Reviewed by: bz
MFC after: 1 month

13 years agoUpgrade our copy of llvm/clang to r130700, from upstream's trunk.
dim [Mon, 2 May 2011 21:04:37 +0000 (21:04 +0000)]
Upgrade our copy of llvm/clang to r130700, from upstream's trunk.

13 years agoCorrect spelling in comments.
marius [Mon, 2 May 2011 21:04:23 +0000 (21:04 +0000)]
Correct spelling in comments.

Submitted by: brucec

13 years agoFix an logic bug which caused jumbo buffers to not be synced.
marius [Mon, 2 May 2011 20:45:19 +0000 (20:45 +0000)]
Fix an logic bug which caused jumbo buffers to not be synced.
Reported and tested by: Michael Moll

MFC after: 3 days

13 years ago- Re-committed r220603 which was accidentally backed out by an earlier
davidch [Mon, 2 May 2011 20:43:24 +0000 (20:43 +0000)]
- Re-committed r220603 which was accidentally backed out by an earlier
  commit.
- Fixed a bug in an unused debug macro.

MFC after: One week.

13 years agoProbe the PHY accompanying BCM57765.
marius [Mon, 2 May 2011 20:37:30 +0000 (20:37 +0000)]
Probe the PHY accompanying BCM57765.
Tested by: Paul Thornton

MFC after: 1 week

13 years agoVendor import of clang trunk r130700:
dim [Mon, 2 May 2011 19:39:53 +0000 (19:39 +0000)]
Vendor import of clang trunk r130700:
http://llvm.org/svn/llvm-project/cfe/trunk@130700

13 years agoVendor import of llvm trunk r130700:
dim [Mon, 2 May 2011 19:34:44 +0000 (19:34 +0000)]
Vendor import of llvm trunk r130700:
http://llvm.org/svn/llvm-project/llvm/trunk@130700

13 years agoThe ACPI Host-PCI bridge driver actually supports multiple domains via
jhb [Mon, 2 May 2011 19:02:30 +0000 (19:02 +0000)]
The ACPI Host-PCI bridge driver actually supports multiple domains via
the optional _SEG function.  Return that value (ap->segment) rather than
0 for the pcib domain ivar.

13 years agoCorrect a typo. According to Intel document 318914, the Tj(max) for Core 2
delphij [Mon, 2 May 2011 18:41:54 +0000 (18:41 +0000)]
Correct a typo.  According to Intel document 318914, the Tj(max) for Core 2
Duo Mobile CPUs should be 105.

Noticed by: Mark Johnston <markjdb gmail.com>
MFC after: 3 days

13 years agoDon't use the whole region 5 for KVA, because the CPU may not implement all
marcel [Mon, 2 May 2011 17:49:05 +0000 (17:49 +0000)]
Don't use the whole region 5 for KVA, because the CPU may not implement all
of the 61 bits available within the region for virtual addressing.  Since
there's no good way for us to map out the gap in the virtual address space,
limit KVA to the architectural minimum implemented address bits. This still
gives us 1 petabyte of KVA, so no worries.

13 years agoRemove usr/include/nfs/krpc.h and usr/include/nfs/nfsdiskless.h from
dim [Mon, 2 May 2011 17:46:59 +0000 (17:46 +0000)]
Remove usr/include/nfs/krpc.h and usr/include/nfs/nfsdiskless.h from
ObsoleteFiles.inc, since these files have been reincarnated in the new
NFS implementation.

Reviewed by: rmacklem

13 years agoRemove the redefinition of MEMSTAT_MAXCPU and just use MAXCPU for that.
attilio [Mon, 2 May 2011 17:13:40 +0000 (17:13 +0000)]
Remove the redefinition of MEMSTAT_MAXCPU and just use MAXCPU for that.

Reviewed by: sbruno

13 years agoFix build with clang. Please note there is an LLVM/Clang PR:
jkim [Mon, 2 May 2011 17:08:36 +0000 (17:08 +0000)]
Fix build with clang.  Please note there is an LLVM/Clang PR:

http://llvm.org/bugs/show_bug.cgi?id=9379

Reported by: rpaulo, dim

13 years agoAll PCI based wireless drivers seem to be explicitly removed from the
bschmidt [Mon, 2 May 2011 16:51:02 +0000 (16:51 +0000)]
All PCI based wireless drivers seem to be explicitly removed from the
PAE kernel config, do that also for those added to GENERIC lately.

13 years agoSome more cleanups related to an kernel without INET.
tuexen [Mon, 2 May 2011 15:53:00 +0000 (15:53 +0000)]
Some more cleanups related to an kernel without INET.

MFC after: 1 week

13 years agoDon't explicitly list pci_write_ivar() for bus_write_ivar, the method is
jhb [Mon, 2 May 2011 15:01:28 +0000 (15:01 +0000)]
Don't explicitly list pci_write_ivar() for bus_write_ivar, the method is
already inherited from the PCI bus driver.

13 years agoAdd an entry for the Kuroutoshikou SERIAL4P-LPPCI2 which uses an Oxford
jhb [Mon, 2 May 2011 14:34:03 +0000 (14:34 +0000)]
Add an entry for the Kuroutoshikou SERIAL4P-LPPCI2 which uses an Oxford
4 port chip but with a nonstandard clock.

PR: kern/104212
Submitted by: Shuichi KITAGUCHI  kit of ysnb net
MFC after: 1 week

13 years agoMFC @ r221324
attilio [Mon, 2 May 2011 14:23:36 +0000 (14:23 +0000)]
MFC @ r221324

13 years agoAdd implementations of BUS_ADJUST_RESOURCE() to the PCI bus driver,
jhb [Mon, 2 May 2011 14:13:12 +0000 (14:13 +0000)]
Add implementations of BUS_ADJUST_RESOURCE() to the PCI bus driver,
generic PCI-PCI bridge driver, x86 nexus driver, and x86 Host to PCI bridge
drivers.

13 years ago- Merge a fix fixup for the last lazyfix removal
attilio [Mon, 2 May 2011 13:56:47 +0000 (13:56 +0000)]
- Merge a fix fixup for the last lazyfix removal
- Sync xen with i386 about the ipi_send_cpu() usage

13 years agoAdd in the work-around for the AR8316 gige switch PHY.
adrian [Mon, 2 May 2011 10:42:19 +0000 (10:42 +0000)]
Add in the work-around for the AR8316 gige switch PHY.

This allows the ethernet to function on the PB92 board.

Submitted by: Luiz Otavio O Souza

13 years agoAdd -Wmissing-include-dirs to CWARNFLAGS, so tinderbox will punish those
brucec [Mon, 2 May 2011 10:35:27 +0000 (10:35 +0000)]
Add -Wmissing-include-dirs to CWARNFLAGS, so tinderbox will punish those
developers committing new code with broken include directories.
Fix a few whitespace issues.
Improve a couple of comments.
-W is now deprecated and is referred to as -Wextra (see gcc(1)).

Submitted by: arundel

13 years agoo OpenBSD 4.9 added.
maxim [Mon, 2 May 2011 09:47:13 +0000 (09:47 +0000)]
o OpenBSD 4.9 added.

13 years agoAdd documentation to sys/conf/options pointing out that AH_SUPPORT_AR9130
adrian [Mon, 2 May 2011 05:39:43 +0000 (05:39 +0000)]
Add documentation to sys/conf/options pointing out that AH_SUPPORT_AR9130
shouldn't be enabled by default unless you're truely building for the
AR913x platform.

13 years agoFix nfsstat.1 to indicate that "-z" now works for
rmacklem [Sun, 1 May 2011 23:55:56 +0000 (23:55 +0000)]
Fix nfsstat.1 to indicate that "-z" now works for
the new NFS subsystems after r221308.
This is a content change.

MFC after: 2 weeks

13 years agoFix nfsstat so that the "-z" option works for the
rmacklem [Sun, 1 May 2011 23:41:35 +0000 (23:41 +0000)]
Fix nfsstat so that the "-z" option works for the
new NFS subsystem.

MFC after: 2 weeks

13 years agoSome AR724x PCIe fixes, which should wrap up the first round
adrian [Sun, 1 May 2011 23:32:37 +0000 (23:32 +0000)]
Some AR724x PCIe fixes, which should wrap up the first round
of endian-ness issues with the AR724x.

From Luiz:

* Fix the bus space tag used so endian-ness is correctly handled;
* Only do the workaround for the AR7240; AR7241/AR7242 (PB92)
  don't require this

From me:

* Add a read flush from openwrt

Submitted by: Luiz Otavio O Souza

13 years agoAdd the kernel support needed to zero out the nfsstats
rmacklem [Sun, 1 May 2011 22:19:52 +0000 (22:19 +0000)]
Add the kernel support needed to zero out the nfsstats
structure for the new NFS subsystem. This will be used
by nfsstats.c to implement the "-z" option.

MFC after: 2 weeks

13 years agoMinor cleanup.
brueffer [Sun, 1 May 2011 20:46:37 +0000 (20:46 +0000)]
Minor cleanup.

13 years agorecoverdisk(8): treat output file consistently and abort on EINVAL
uqs [Sun, 1 May 2011 20:14:10 +0000 (20:14 +0000)]
recoverdisk(8): treat output file consistently and abort on EINVAL

This improves usability a little as we no longer require using touch.
Also reword the manpage wrt. parameters and fix usage() [1]

With no media in a cd(4) drive, the reads will loop producing EINVAL,
abort in that case [2].

Document the shortcoming of sectorsize and MAXPHYS (a quick solution
to this might be having MAXPHYS as the "bigsize", in short testing it
didn't make a difference on throughput).

Submitted by: arundel [1]
PR: bin/154528 [2]

13 years agoLet users' PATH decide which groff suite to pick up.
uqs [Sun, 1 May 2011 19:47:34 +0000 (19:47 +0000)]
Let users' PATH decide which groff suite to pick up.

Let groff pass the -c flag to grotty, which will turn off ANSI
sequences. While these are not a problem for our more/less, they get
mangled by col(1) and this will result in garbage output.

This makes man(1) work together with textproc/groff, in case the
user decided to delete the old groff from base (-DWITHOUT_GROFF).

13 years agoThese are of course i386/amd64 only.
bschmidt [Sun, 1 May 2011 19:05:54 +0000 (19:05 +0000)]
These are of course i386/amd64 only.

13 years agoAdd files for wpi(4)
bschmidt [Sun, 1 May 2011 18:42:56 +0000 (18:42 +0000)]
Add files for wpi(4)

13 years agoNo need for htole32(), which is an uint8_t.
bschmidt [Sun, 1 May 2011 18:41:57 +0000 (18:41 +0000)]
No need for htole32(), which is an uint8_t.

13 years agoFix typo in manpage resolvconf.conf(5).
ume [Sun, 1 May 2011 15:46:18 +0000 (15:46 +0000)]
Fix typo in manpage resolvconf.conf(5).

PR: docs/156494
Submitted by: bcr
Requested by: bcr
Obtained from: http://roy.marples.name/projects/openresolv/ticket/12

13 years agoAdd the remaining wireless drivers.
bschmidt [Sun, 1 May 2011 13:26:34 +0000 (13:26 +0000)]
Add the remaining wireless drivers.

Discussed with: joel

13 years agoFix the Makefile for mount_nfs so that it creates a
rmacklem [Sun, 1 May 2011 01:34:22 +0000 (01:34 +0000)]
Fix the Makefile for mount_nfs so that it creates a
link for mount_oldnfs.8 instead of mount_newnfs.8.

13 years agoMFC @ r221286
attilio [Sun, 1 May 2011 00:48:03 +0000 (00:48 +0000)]
MFC @ r221286

13 years agoRemove unnused typedef.
attilio [Sun, 1 May 2011 00:08:13 +0000 (00:08 +0000)]
Remove unnused typedef.

13 years ago- Remove the following sysctl:
attilio [Sat, 30 Apr 2011 23:28:07 +0000 (23:28 +0000)]
- Remove the following sysctl:
  kern.sched.ipiwakeup.onecpu
  kern.sched.ipiwakeup.htt2

  Because they are absolutely obsolete. Probabilly the whole wakeup
  forward mechanism should be revisited for a better fitting in modern
  hw.
- As map2 variable is no longer used rename map3 to map2
- Fix a string by making more informative the msg and removing the
  arguments passing

Approved by: julian

13 years agoAdd the function md_assert_nopreempt(), which is a very consistent
attilio [Sat, 30 Apr 2011 23:12:37 +0000 (23:12 +0000)]
Add the function md_assert_nopreempt(), which is a very consistent
function on the possibility of a thread to not preempt.

As this function is very tied to x86 (interrupts disabled checkings)
it is not intended to be used in MI code.

13 years agoRemove the support for lazy cr3 switching from i386.
attilio [Sat, 30 Apr 2011 23:02:17 +0000 (23:02 +0000)]
Remove the support for lazy cr3 switching from i386.
amd64 has already this micro-optimization removed.

Submitted by: kib

13 years agoAdd ChangeLog.gcc43 for backported changes from gcc 4.3
mm [Sat, 30 Apr 2011 23:00:41 +0000 (23:00 +0000)]
Add ChangeLog.gcc43 for backported changes from gcc 4.3

MFC after: 3 days

13 years agoFix typos.
kib [Sat, 30 Apr 2011 22:46:02 +0000 (22:46 +0000)]
Fix typos.

Noted by: Fabian Keil <freebsd-listen fabiankeil de>
Pointy hat to: kib
MFC after: 1 week

13 years agoFix a typo/error.
attilio [Sat, 30 Apr 2011 22:34:44 +0000 (22:34 +0000)]
Fix a typo/error.

13 years agoRemove unnecessary usage of memory barriers when dealing with
attilio [Sat, 30 Apr 2011 22:33:11 +0000 (22:33 +0000)]
Remove unnecessary usage of memory barriers when dealing with
pmc_cpumask.

Discussed with: fabient

13 years agoidle_cpus_mask is just used in the SMP case and within sched_4BSD.
attilio [Sat, 30 Apr 2011 22:30:18 +0000 (22:30 +0000)]
idle_cpus_mask is just used in the SMP case and within sched_4BSD.
Declare appropriately.

13 years agoMFC @ 221273
attilio [Sat, 30 Apr 2011 22:24:45 +0000 (22:24 +0000)]
MFC @ 221273

13 years agoStop linking against a direct-mapped virtual address and instead
marcel [Sat, 30 Apr 2011 20:49:00 +0000 (20:49 +0000)]
Stop linking against a direct-mapped virtual address and instead
use the PBVM. This eliminates the implied hardcoding of the
physical address at which the kernel needs to be loaded. Using the
PBVM makes it possible to load the kernel irrespective of the
physical memory organization and allows us to replicate kernel text
on NUMA machines.

While here, reduce the direct-mapped page size to the kernel's
page size so that we can support memory attributes better.

13 years agoLACP frames must not be send VLAN-tagged, check for that before processing.
thompsa [Sat, 30 Apr 2011 20:34:52 +0000 (20:34 +0000)]
LACP frames must not be send VLAN-tagged, check for that before processing.

PR: kern/156743
Submitted by: Dmitrij Tejblum
MFC after: 1 week

13 years agoTurn PBVM page table entries into PTEs so that they can be inserted
marcel [Sat, 30 Apr 2011 20:16:49 +0000 (20:16 +0000)]
Turn PBVM page table entries into PTEs so that they can be inserted
into the TLB as-is.

While here, have ia64_platform_alloc() return ~0UL on failure.

13 years agoUpdate carp, gre and pf module builds to be depenent on INET and/or
bz [Sat, 30 Apr 2011 17:59:54 +0000 (17:59 +0000)]
Update carp, gre and pf module builds to be depenent on INET and/or
INET6_SUPPORT.

Reviewed by: gnn (slightly earlier version without pf)
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 2 weeks

13 years agoIntroduce two new options MK_INET and MK_INET_SUPPORT analogically
bz [Sat, 30 Apr 2011 17:58:28 +0000 (17:58 +0000)]
Introduce two new options MK_INET and MK_INET_SUPPORT analogically
with INET6 equivalents. Patch reather than re-genenerating src.conf
(given the current problem with the script that does the re-gen).

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 2 weeks

13 years agoAllow MKMODULESENV being preset from other sources like makeoptions
bz [Sat, 30 Apr 2011 17:51:39 +0000 (17:51 +0000)]
Allow MKMODULESENV being preset from other sources like makeoptions
kernel configurations to apply WITH_* WITHOUT_* knobs we use for
module building as well to restrict or control opt_*.h flags.

Reviewed by: imp, +
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 2 weeks

13 years agoFix a mismerge from p4 in that in_localaddr() is not available without INET.
bz [Sat, 30 Apr 2011 16:30:18 +0000 (16:30 +0000)]
Fix a mismerge from p4 in that in_localaddr() is not available without INET.

Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 4 days

13 years agoFix deduplicated zfs receive
mm [Sat, 30 Apr 2011 14:52:49 +0000 (14:52 +0000)]
Fix deduplicated zfs receive
(dmu_recv_stream builds incomplete guid_to_ds_map)

Illumos-gate changeset: 13329:c48b8bf84ab7
MFC together with v28

Approved by: pjd
Obtained from: Illumos (Bug #755)

13 years agoFis a problem with r221258 that mac is still needed in case for ient6 only
bz [Sat, 30 Apr 2011 14:22:45 +0000 (14:22 +0000)]
Fis a problem with r221258 that mac is still needed in case for ient6 only
for mac_inet.c.

Reported by: Luiz Otavio O Souza (lists.br gmail.com)
MFC after: 4 days

13 years agoClarify the comment.
kib [Sat, 30 Apr 2011 13:49:03 +0000 (13:49 +0000)]
Clarify the comment.

MFC after: 1 week

13 years agoAfter r221249 allow SCTP to be compiled in an IPv6 only environment as well.
bz [Sat, 30 Apr 2011 12:39:47 +0000 (12:39 +0000)]
After r221249 allow SCTP to be compiled in an IPv6 only environment as well.

Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 10 days

13 years agoAn example configuration file for the Atheros PB92.
adrian [Sat, 30 Apr 2011 12:25:09 +0000 (12:25 +0000)]
An example configuration file for the Atheros PB92.

TODO:

* pcie doesn't yet work properly, I'm working on it.
* if_arge doesn't work - it's likely the phy mask is wrong; again I'm working on it.

13 years agoAdd some more missing optional dependencies on inet6, not only inet,
bz [Sat, 30 Apr 2011 12:07:31 +0000 (12:07 +0000)]
Add some more missing optional dependencies on inet6, not only inet,
to get the files for an IPv6 only kernel as well, remove extra inet6
option where not needed.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 4 days

13 years agoThe AR724x SoC's require the irq status line to be acked/cleared.
adrian [Sat, 30 Apr 2011 12:07:15 +0000 (12:07 +0000)]
The AR724x SoC's require the irq status line to be acked/cleared.

This allows console IO to occur correctly once the kernel is in multi-user
mode.

Submitted by: Luiz Otavio O Souza

13 years agoCall the DDR FIFO flush method when IP2 interrupts occur.
adrian [Sat, 30 Apr 2011 11:56:04 +0000 (11:56 +0000)]
Call the DDR FIFO flush method when IP2 interrupts occur.

13 years agoFlip off debugging for now.
adrian [Sat, 30 Apr 2011 11:40:31 +0000 (11:40 +0000)]
Flip off debugging for now.

13 years agoAdd some initial PCIe bridge support for the AR724x chipsets.
adrian [Sat, 30 Apr 2011 11:36:16 +0000 (11:36 +0000)]
Add some initial PCIe bridge support for the AR724x chipsets.

This is reported to work on the AR7240 based Ubiquiti Rocket M5
but I haven't tested it on that hardware. I also don't yet have
it fully working on the AR7242 based development board here;
probe/attach functions but the register space resource looks like
the endian-ness is wrong (0x10000000 instead of 0x00001000).o

Further digging will be required.

Submitted by: Luiz Otavio O Souza

13 years agoAdd UPDATING entry for the AR71xx config changes
adrian [Sat, 30 Apr 2011 11:30:42 +0000 (11:30 +0000)]
Add UPDATING entry for the AR71xx config changes

13 years agoIn preparation for the AR724x PCIe bus code, make the AR71xx PCI bus
adrian [Sat, 30 Apr 2011 11:28:21 +0000 (11:28 +0000)]
In preparation for the AR724x PCIe bus code, make the AR71xx PCI bus
glue require 'device ar71xx_pci' .

Users of the AR71xx board configs will now require this for functioning
PCI:

device pci
device ar71xx_pci

13 years agoRemove some leftover debug code.
tuexen [Sat, 30 Apr 2011 11:22:30 +0000 (11:22 +0000)]
Remove some leftover debug code.

MFC after: 1 week

13 years agoMake the TCP code compile without INET. Sort #includes and add #ifdef INETs.
bz [Sat, 30 Apr 2011 11:21:29 +0000 (11:21 +0000)]
Make the TCP code compile without INET.  Sort #includes and add #ifdef INETs.
Add some comments at #endifs given more nestedness.  To make the compiler
happy, some default initializations were added in accordance with the style
on the files.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 4 days

13 years agoImprove compilation of SCTP code without INET support.
tuexen [Sat, 30 Apr 2011 11:18:16 +0000 (11:18 +0000)]
Improve compilation of SCTP code without INET support.
Some bugs where fixed while doing this:
* ASCONF-ACK messages might use wrong port number when using
  IPv6.
* Checking for additional addresses takes the correct address
  into account and also does not do more comparisons than
  necessary.

This patch is based on one received from bz@ who was
sponsored by The FreeBSD Foundation and iXsystems.

MFC after: 1 week

13 years agoMake the UDP code compile without INET. Expose udp_usrreq.c to IPv6 only
bz [Sat, 30 Apr 2011 11:17:00 +0000 (11:17 +0000)]
Make the UDP code compile without INET.  Expose udp_usrreq.c to IPv6 only
as well compiling out most functions adding or extending #ifdef INET
coverage.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 4 days

13 years agoMake the PCB code compile without INET support by adding #ifdef INETs
bz [Sat, 30 Apr 2011 11:04:34 +0000 (11:04 +0000)]
Make the PCB code compile without INET support by adding #ifdef INETs
and correcting few #includes.

Reviewed by: gnn
Sponsored by: The FreeBSD Foundation
Sponsored by: iXsystems
MFC after: 4 days

13 years agoAdd a missing DDR FIFO method for the ar71xx.
adrian [Sat, 30 Apr 2011 02:31:56 +0000 (02:31 +0000)]
Add a missing DDR FIFO method for the ar71xx.

13 years agoImprove the accuracy from a max ULP of ~2000 to max ULP < 0.79
kargl [Fri, 29 Apr 2011 23:13:43 +0000 (23:13 +0000)]
Improve the accuracy from a max ULP of ~2000 to max ULP < 0.79
on i386-class hardware for sinl and cosl.  The hand-rolled argument
reduction have been replaced by e_rem_pio2l() implementations.  To
preserve history the following commands have been executed:

svn cp src/e_rem_pio2.c ld80/e_rem_pio2l.h
mv ${HOME}/bde/ld80/e_rem_pio2l.c ld80/e_rem_pio2l.h

svn cp src/e_rem_pio2.c ld128/e_rem_pio2l.h
mv ${HOME}/bde/ld128/e_rem_pio2l.c ld128/e_rem_pio2l.h

The ld80 version has been tested by bde, das, and kargl over the
last few years (bde, das) and few months (kargl).  An older ld128
version was tested by das.  The committed version has only been
compiled tested via 'make universe'.

Approved by: das (mentor)
Obtained from: bde

13 years agoAdd an -E option to mirror newfs's. The idea is that if you have a system
des [Fri, 29 Apr 2011 23:00:23 +0000 (23:00 +0000)]
Add an -E option to mirror newfs's.  The idea is that if you have a system
that was built before ffs grew support for TRIM, your filesystem will have
plenty of free blocks that the flash chip doesn't know are free, so it
can't take advantage of them for wear leveling.  Once you've upgraded your
kernel, you enable TRIM on the filesystem (tunefs -t enable), then run
fsck_ffs -E on it before mounting it.

I tested this patch by half-filling an mdconfig'ed filesystem image,
running fsck_ffs -E on it, then verifying that the contents were not
damaged by comparing them to a pristine copy using rsync's checksum
functionality.  There is no reliable way to test it on real hardware.

Many thanks to mckusick@, who provided the tricky parts of this patch and
reviewed the final version.

Reviewed by: mckusick@
MFC after: 3 weeks

13 years agoSomewhere around the 473rd time I mistyped "mdconfig file" instead of
des [Fri, 29 Apr 2011 22:40:11 +0000 (22:40 +0000)]
Somewhere around the 473rd time I mistyped "mdconfig file" instead of
"mdconfig -f file", I decided that it would be easier to make mdconfig
DWIM than to teach my fingers to type the correct command line.

MFC after: 3 weeks

13 years agoAdd a new bus method, BUS_ADJUST_RESOURCE() that is intended to be a
jhb [Fri, 29 Apr 2011 21:36:45 +0000 (21:36 +0000)]
Add a new bus method, BUS_ADJUST_RESOURCE() that is intended to be a
wrapper around rman_adjust_resource().  Include a generic implementation,
bus_generic_adjust_resource() which passes the request up to the parent
bus.  There is currently no default implementation.  A
bus_adjust_resource() wrapper is provided for use in drivers.

13 years agoImplement BIO_DELETE for vnode devices by simply overwriting the deleted
des [Fri, 29 Apr 2011 21:18:41 +0000 (21:18 +0000)]
Implement BIO_DELETE for vnode devices by simply overwriting the deleted
sectors with all-zeroes.

The zeroes come from a static buffer; null(4) uses a dynamic buffer for
the same purpose (for /dev/zero).  It might be a good idea to have a
static, shared, read-only all-zeroes page somewhere in the kernel that
md(4), null(4) and any other code that needs zeroes could use.

Reviewed by: kib
MFC after: 3 weeks

13 years agoRather than trusting that nothing is going to sneak in before the
dougb [Fri, 29 Apr 2011 21:10:41 +0000 (21:10 +0000)]
Rather than trusting that nothing is going to sneak in before the
early_late_divider in the second run (and thus be skipped altogether),
keep a list of the scripts run early, and use that list to skip things
in the second run.

This has the primary benefit of not skipping a local script that gets
ordered too early in the second run. It also gives an opportunity to
clean up/simplify the code a bit.

Use a space-separated list rather than the more traditional colon for
maximum insurance against creativity in local naming conventions.

Reviewed by: brooks

13 years agoExtend the rman(9) API to support altering an existing resource.
jhb [Fri, 29 Apr 2011 20:05:19 +0000 (20:05 +0000)]
Extend the rman(9) API to support altering an existing resource.
Specifically, these changes allow a resource to back a relocatable and
resizable resource such as the I/O window decoders in PCI-PCI bridges.
- rman_adjust_resource() can adjust the start and end address of an
  existing resource.  It only succeeds if the newly requested address
  space is already free.  It also supports shrinking a resource in
  which case the freed space will be marked unallocated in the rman.
- rman_first_free_region() and rman_last_free_region() return the
  start and end addresses for the first or last unallocated region in
  an rman, respectively.  This can be used to determine by how much
  the resource backing an rman must be adjusted to accomodate an
  allocation request that does not fit into the existing rman.

While here, document the rm_start and rm_end fields in struct rman,
rman_is_region_manager(), the bound argument to
rman_reserve_resource_bound(), and rman_init_from_resource().

13 years agoChange rman_manage_region() to actually honor the rm_start and rm_end
jhb [Fri, 29 Apr 2011 18:41:21 +0000 (18:41 +0000)]
Change rman_manage_region() to actually honor the rm_start and rm_end
constraints on the rman and reject attempts to manage a region that is out
of range.
- Fix various places that set rm_end incorrectly (to ~0 or ~0u instead of
  ~0ul).
- To preserve existing behavior, change rman_init() to set rm_start and
  rm_end to allow managing the full range (0 to ~0ul) if they are not set by
  the caller when rman_init() is called.

13 years agoAdd the mipsn32eb TARGET_ARCH to the list of mips targets for the
jhb [Fri, 29 Apr 2011 18:27:50 +0000 (18:27 +0000)]
Add the mipsn32eb TARGET_ARCH to the list of mips targets for the
XLRN32 kernel config.

Reviewed by: imp, jmallet

13 years agoAdd the AH_SUPPORT_AR9130 option.
jhb [Fri, 29 Apr 2011 18:26:17 +0000 (18:26 +0000)]
Add the AH_SUPPORT_AR9130 option.

13 years agoDetect VMware guest and set the TSC frequency as reported by the hypervisor.
jkim [Fri, 29 Apr 2011 18:20:12 +0000 (18:20 +0000)]
Detect VMware guest and set the TSC frequency as reported by the hypervisor.
VMware products virtualize TSC and it run at fixed frequency in so-called
"apparent time".  Although virtualized i8254 also runs in apparent time, TSC
calibration always gives slightly off frequency because of the complicated
timer emulation and lost-tick correction mechanism.

13 years agoCosmetic changes to fit 80 character screen width.
adrian [Fri, 29 Apr 2011 16:43:30 +0000 (16:43 +0000)]
Cosmetic changes to fit 80 character screen width.

13 years agoTCP reuses t_rxtshift to determine the backoff timer used for both the
jhb [Fri, 29 Apr 2011 15:40:12 +0000 (15:40 +0000)]
TCP reuses t_rxtshift to determine the backoff timer used for both the
persist state and the retransmit timer.  However, the code that implements
"bad retransmit recovery" only checks t_rxtshift to see if an ACK has been
received in during the first retransmit timeout window.  As a result, if
ticks has wrapped over to a negative value and a socket is in the persist
state, it can incorrectly treat an ACK from the remote peer as a
"bad retransmit recovery" and restore saved values such as snd_ssthresh and
snd_cwnd.  However, if the socket has never had a retransmit timeout, then
these saved values will be zero, so snd_ssthresh and snd_cwnd will be set
to 0.

If the socket is in fast recovery (this can be caused by excessive
duplicate ACKs such as those fixed by 220794), then each ACK that arrives
triggers either NewReno or SACK partial ACK handling which clamps snd_cwnd
to be no larger than snd_ssthresh.  In effect, the socket's send window
is permamently stuck at 0 even though the remote peer is advertising a
much larger window and pending data is only sent via TCP window probes
(so one byte every few seconds).

Fix this by adding a new TCP pcb flag (TF_PREVVALID) that indicates that
the various snd_*_prev fields in the pcb are valid and only perform
"bad retransmit recovery" if this flag is set in the pcb.  The flag is set
on the first retransmit timeout that occurs and is cleared on subsequent
retransmit timeouts or when entering the persist state.

Reviewed by: bz
MFC after: 2 weeks

13 years agoAdd a 'show progress' command that shows a summary of all in-progress
jhb [Fri, 29 Apr 2011 14:06:37 +0000 (14:06 +0000)]
Add a 'show progress' command that shows a summary of all in-progress
commands for a given adapter.  Specifically, it shows the status of any
drive or volume activities currently in progress similar to the
'drive process' and 'volume progress' commands.

Reviewed by: emaste
MFC after: 1 week

13 years agoFix build of this kernel config. The ath(4) bits need the 11n frame format
jhb [Fri, 29 Apr 2011 14:01:49 +0000 (14:01 +0000)]
Fix build of this kernel config.  The ath(4) bits need the 11n frame format
even though ar5416 isn't enabled.

Reviewed by: adrian

13 years agoRemove some holdovers from the AR5212 origin of this code.
adrian [Fri, 29 Apr 2011 12:52:18 +0000 (12:52 +0000)]
Remove some holdovers from the AR5212 origin of this code.
These aren't relevant here.

13 years agoThe build was broken by r221190 for 64bit arches like amd64.
rmacklem [Fri, 29 Apr 2011 12:30:15 +0000 (12:30 +0000)]
The build was broken by r221190 for 64bit arches like amd64.
This patch fixes it.

MFC after: 2 weeks

13 years agoMake CAM_DEBUG_CDB also dump ATA commands in addition to SCSI.
mav [Fri, 29 Apr 2011 07:14:37 +0000 (07:14 +0000)]
Make CAM_DEBUG_CDB also dump ATA commands in addition to SCSI.

13 years agoAdd urtw(4)
kevlo [Fri, 29 Apr 2011 06:36:39 +0000 (06:36 +0000)]
Add urtw(4)

13 years agoGuard against default ni_chan
kevlo [Fri, 29 Apr 2011 06:28:29 +0000 (06:28 +0000)]
Guard against default ni_chan

PR: kern/144642
Submitted by: Arthur Hartwig <a_hartwig at fastmaildot fm>

13 years agoTidy up the naming of the ip2 DDR flush routine, and add an inline
adrian [Fri, 29 Apr 2011 06:25:11 +0000 (06:25 +0000)]
Tidy up the naming of the ip2 DDR flush routine, and add an inline
accessor method (which is currently unused) in there.

13 years agoAnother man page update related to the switchover of the
rmacklem [Fri, 29 Apr 2011 01:14:12 +0000 (01:14 +0000)]
Another man page update related to the switchover of the
NFS clients done by r221124.
This is a content change.

Submitted by: jh

13 years agoFix the new NFS client so that it handles the "nfs_args" value
rmacklem [Thu, 28 Apr 2011 23:21:50 +0000 (23:21 +0000)]
Fix the new NFS client so that it handles the "nfs_args" value
in mnt_optnew. This is needed so that the old mount(2) syscall
works and that is needed so that amd(8) works. The code was
basically just cribbed from sys/nfsclient/nfs_vfsops.c with minor
changes. This patch is mainly to fix the new NFS client so that
amd(8) works with it. Thanks go to Craig Rodrigues for helping with
this.

Tested by: Craig Rodrigues (for amd)
MFC after: 2 weeks