Bjoern A. Zeeb [Wed, 24 Feb 2010 15:54:24 +0000 (15:54 +0000)]
Use the DB_SHOW_ALL_COMMAND() macro to register the formerly 'show ifnets'
in the db_show_all_table as 'show all ifnets' and with that follow the
convention for showing complete lists.
Brooks Davis [Wed, 24 Feb 2010 15:52:18 +0000 (15:52 +0000)]
Don't inforce an upper bound on kern.ngroups. The INT_MAX-1 limit was
too high due to several overflows. The actual limit is somewhere in the
neighborhood of INT_MAX/4 on 64-bit machines, but most systems could not
support such a limit due to a lack of memory and the cost of duplicate
credentials.
Navdeep Parhar [Wed, 24 Feb 2010 10:16:18 +0000 (10:16 +0000)]
There is no need to test __FreeBSD_version for features that have
been around for a long time now (7.1-ish or even earlier); assume
they are present. These includes MSI, TSO, LRO, VLAN, INTR_FILTERS,
FIRMWARE, etc.
Also, eliminate some dead code and clean up in other places as part
of this quick once-over.
Navdeep Parhar [Wed, 24 Feb 2010 01:44:39 +0000 (01:44 +0000)]
Accessing an mbuf after it has been handed off to the hardware is a bad
race as it could already have been tx'd and freed by that time. Place
the bpf tap just _before_ writing the gen bit.
This fixes a panic when running tcpdump on a cxgb interface.
Nathan Whitehorn [Wed, 24 Feb 2010 00:54:37 +0000 (00:54 +0000)]
Close a race involving the OEA64 scratchpage. When the scratch page's
physical address is changed, there is a brief window during which its PTE
is invalid. Since moea64_set_scratchpage_pa() does not and cannot hold
the page table lock, it was possible for another CPU to insert a new PTE
into the scratch page's PTEG slot during this interval, corrupting both
mappings.
Solve this by creating a new flag, LPTE_LOCKED, such that
moea64_pte_insert will avoid claiming locked PTEG slots even if they
are invalid. This change also incorporates some additional paranoia
added to solve things I thought might be this bug.
Jung-uk Kim [Tue, 23 Feb 2010 21:51:14 +0000 (21:51 +0000)]
Yet another attempt to make palette loading more safer:
- Add a separate palette data for 8-bit DAC mode when SC_PIXEL_MODE is set
and fill it up with default gray-scale palette data for text. Now we don't
have to set `hint.sc.0.vesa_mode' to get the default palette data.
- Add a new adapter flag, V_ADP_DAC8 to track whether the controller is
using 8-bit palette format and load correct palette when switching modes.
- Set 8-bit DAC mode only for non-VGA compatible graphics mode.
Ed Maste [Tue, 23 Feb 2010 21:41:13 +0000 (21:41 +0000)]
Minor diff reduction with Adaptec's driver: in aac_release_command() set
cm_queue to AAC_ADAP_NORM_CMD_QUEUE by default. In every place it was set,
it was set to AAC_ADAP_NORM_CMD_QUEUE anyhow.
Nathan Whitehorn [Tue, 23 Feb 2010 14:56:49 +0000 (14:56 +0000)]
Fix two bugs in this manpage: 'System' is not abbreviated with 'P',
and a non-useful version of smu(4) was in 8.0, so modify the history
to reflect that.
Matt Jacob [Tue, 23 Feb 2010 14:35:44 +0000 (14:35 +0000)]
xpt_rescan only honors a wildcard in the target field. Revert the previous
change and have isp_make_here scan the whole bus which will then scan all
luns.
I think xpt_rescan needs to be fixed, but that's a separable issue.
Pyun YongHyeon [Mon, 22 Feb 2010 23:35:35 +0000 (23:35 +0000)]
Remove Tx mbuf parsing code for VLAN in TSO path. Controller does
not support TSO over VLAN if VLAN hardware tagging is disabled so
there is no need to check VLAN here.
Pyun YongHyeon [Mon, 22 Feb 2010 22:41:27 +0000 (22:41 +0000)]
Add TSO support on VLANs. Also make sure to update TSO capability
whenever jumbo frame is configured.
While I'm here remove unnecessary check of VLAN hardware checksum
offloading. vlan(4) already takes care of this.
Xin LI [Mon, 22 Feb 2010 22:32:24 +0000 (22:32 +0000)]
POSIX patch(1) would treat -b as different meaning (the functionality
is to be provided by --suffix). Looking at the usage here in diffutils,
it seems that we can just get rid of the -b .orig stuff. This resolves
a problem that can triggered if we move toward to a more permissively
licensed patch(1) program.
Pyun YongHyeon [Mon, 22 Feb 2010 21:03:15 +0000 (21:03 +0000)]
Remove Tx mbuf parsing code for VLAN in TSO path. Controller does
not support TSO over VLAN if VLAN hardware tagging is disabled so
there is no need to check VLAN here.
While I'm here make sure to pullup IP/TCP headers in the first
buffer.
Marius Strobl [Mon, 22 Feb 2010 21:01:08 +0000 (21:01 +0000)]
According to the Linux sungem driver, in case of Apple (K2) GMACs
GEM_MIF_CONFIG_MDI0 cannot be trusted when the firmware has powered
down the chip so the internal transceiver has to be hardcoded. This
is also in line with the AppleGMACEthernet driver, which just doesn't
distinguish between internal/external transceiver and MDIO/MDI1
respectively in the first place. Tested by: Andreas Tobler
Pyun YongHyeon [Mon, 22 Feb 2010 18:51:14 +0000 (18:51 +0000)]
Add TSO on VLANs. Because re(4) has a TSO limitation for jumbo
frame, make sure to update VLAN capabilities whenever jumbo frame
is configured.
While I'm here rearrange interface capabilities configuration. The
controller requires VLAN hardware tagging to make TSO work on VLANs
so explicitly check this requirement.
Justin T. Gibbs [Mon, 22 Feb 2010 17:03:45 +0000 (17:03 +0000)]
Enforce stronger semantics for bus-dma alignment (currently only on amd64).
Now all contiguous regions returned from bus-dma will be aligned to the
alignment constraint and all but the last region are guaranteed to be
a multiple of the alignment in length. This also means that the relative
alignment of two adjacent bytes in the I/O stream have a difference of 1
even if they are not physically contiguous.
The old code, when needing to perform a copy in order to align data, only
copied the amount of data needed to reach the next page boundary. This
often left an unaligned end to the segment. Drivers such as Xen's blkfront
can't deal with such segments.
The downside to this approach is that, once an unaligned region is encountered,
the remainder of the I/O will be bounced. However, bouncing should be rare.
It is typically caused by non-performance critical userland programs that
don't bother to align their I/O buffers (e.g. bsdlabel). In-kernel I/O
buffers are always aligned to at least a page boundary.
Robert Watson [Mon, 22 Feb 2010 15:57:36 +0000 (15:57 +0000)]
Teach netstat(1) to print out netisr statistics when given the -Q argument.
Currently supports only reporting on live systems via sysctl, kmem support
needs to be edded.
Nathan Whitehorn [Mon, 22 Feb 2010 14:17:23 +0000 (14:17 +0000)]
Allow user programs to execute mfpvr instructions. Linux allows this, and
some math-related software like GMP expects to be able to use it to pick
a target appropriately.
Neel Natu [Mon, 22 Feb 2010 01:48:38 +0000 (01:48 +0000)]
Use KERNLOADADDR instead of hardcoded address. This is required to be able to
build the trampoline kernel that has symbol/string tables embedded within it.
Alan Cox [Sun, 21 Feb 2010 22:23:13 +0000 (22:23 +0000)]
Align the start of the clean submap to a superpage boundary. Although
no superpage mappings are created within the clean submap, aligning the
start of the clean submap helps to prevent interference with kmem_alloc()'s
use of superpages.
Nathan Whitehorn [Sun, 21 Feb 2010 22:13:57 +0000 (22:13 +0000)]
Add a simple fan management callout to the SMU driver. This is designed
such that a fancier thermal management algorithm can be run from user
space, but the kernel will at least ensure your machine does not either
sound like a wind tunnel or catch fire.
Changing proto_socketpair.c compilation and linking order revealed
a problem - we should simply ignore proto_server() if address
doesn't start with socketpair://, and not abort.
Ed Schouten [Sun, 21 Feb 2010 19:53:33 +0000 (19:53 +0000)]
Decompose the most lousy named file in sys/kern; kern_subr.c.
Although this file has historically been used as a dumping ground for
random functions, nowadays it only contains functions related to copying
bits {from,to} userspace and hash table utility functions.
Randall Stewart [Sun, 21 Feb 2010 17:27:20 +0000 (17:27 +0000)]
Fix another fo-pa of mine... duplicate patches should
not be applied and randy needs coffee in the morning
when working to help keep things sorted out... obviously :-)
Robert Watson [Sun, 21 Feb 2010 15:25:47 +0000 (15:25 +0000)]
ifconfig(8) expects interface fooX to be supported by the module if_foo,
and will try to load it if it's not present. To better meet these
expectations, change the module name for the loopback interface from
'loop' to 'if_lo'. The loopback interface is always compiled into the
base kernel, so there are no resulting changes in kld files, etc.
Gabor Kovesdan [Sun, 21 Feb 2010 14:28:03 +0000 (14:28 +0000)]
- Remove GNU bc/dc bits. There has not been any regressions seen after
BSD bc/dc import. It has been tested with make universe that this code
is not used by anything any more.
Ed Schouten [Sun, 21 Feb 2010 13:57:02 +0000 (13:57 +0000)]
Add proper const keywords to sysctl(3) parameters.
The `name' and `newp' arguments can be marked const, because the buffers
they refer to are never changed. While there, perform some other
cleanups:
- Remove K&R from sysctl.c.
- Implement sysctlbyname() using sysctlnametomib() to prevent
duplication of an undocumented kernel interface.
- Fix some whitespace nits.
It seems the prototypes are now in sync with NetBSD as well.
Gavin Atkinson [Sun, 21 Feb 2010 10:14:06 +0000 (10:14 +0000)]
Add a "-x" option to chown(8)/chgrp(1) similar to the same option in
du(1), cp(1) etc, to prevent the crossing of mountpoints whilst using the
commands recursively.
Marius Strobl [Sun, 21 Feb 2010 09:25:53 +0000 (09:25 +0000)]
Some machines can not only consist of CPUs running at different speeds
but also of different types, f.e. Sun Fire V890 can be equipped with a
mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization
and different workarounds for model specific errata. Therefore move the
CPU implementation number from a global variable to the per-CPU data.
Functions which are called before the latter is available are passed the
implementation number as a parameter now.
Pyun YongHyeon [Sun, 21 Feb 2010 00:00:55 +0000 (00:00 +0000)]
Increase PCIe maximuim read request size to 2048. Because re(4) uses
Tx DMA burst size 2048, I beleive PCIe maximum read request size
also should match to the value of Tx DMA burst size. With this
change I can get more than 800Mbps for TCP bulk transfers.
Previously I was not able to get more than 700Mbps. If I enable TSO
it now shows 927Mbps.
Marius Strobl [Sat, 20 Feb 2010 23:24:19 +0000 (23:24 +0000)]
Some machines can not only consist of CPUs running at different speeds
but also of different types, f.e. Sun Fire V890 can be equipped with a
mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization
and different workarounds for model specific errata. Therefore move the
CPU implementation number from a global variable to the per-CPU data.
Functions which are called before the latter is available are passed the
implementation number as a parameter now.
Pyun YongHyeon [Sat, 20 Feb 2010 23:21:06 +0000 (23:21 +0000)]
Add TSO support on VLAN. Controller requires VLAN hardware tagging
to make TSO work on VLAN. So if VLAN hardware tagging is disabled
explicitly clear TSO on VLAN. While I'm here remove duplicated
VLAN_CAPABILITIES call.
Pyun YongHyeon [Sat, 20 Feb 2010 22:47:20 +0000 (22:47 +0000)]
Add TSO support on VLANs. Intentionally separated IFCAP_VLAN_HWTSO
from IFCAP_VLAN_HWTAGGING. I think some hardwares may be able to
TSO over VLAN without VLAN hardware tagging.
Driver changes and userland support will follow.
Bjoern A. Zeeb [Sat, 20 Feb 2010 22:09:48 +0000 (22:09 +0000)]
Start to implement ifnet DDB support:
- 'show ifnets' prints a list of ifnet *s per virtual network stack,
- 'show ifnet <struct ifnet *>' prints fields matching the given ifp.
We do not yet print the complete set of fields and might want to
factor this out to an extra if_debug.c file in case this grows
a lot[1]. We may also want to grow 'show ifnet <if_xname>' support[1].
Bjoern A. Zeeb [Sat, 20 Feb 2010 19:59:52 +0000 (19:59 +0000)]
Split up ip_drain() into an outer lock and iterator part and
a "locked" version that will only handle a single network stack
instance. The latter is called directly from ip_destroy().
Hook up an ip_destroy() function to release resources from the
legacy IP network layer upon virtual network stack teardown.
Sponsored by: ISPsystem
Reviewed by: rwatson
MFC After: 5 days
Randall Stewart [Sat, 20 Feb 2010 17:29:27 +0000 (17:29 +0000)]
These contain JC's patch to get gdb sort of working
on mips. Its not fully done yet but its a start.
Obtained from: JC - c.jayachandran@gmail.com
M gnu/usr.bin/gdb/kgdb/trgt_mips.c
M gnu/usr.bin/gdb/arch/mips/init.c
M gnu/usr.bin/gdb/arch/mips/Makefile
M gnu/usr.bin/Makefile
M contrib/gdb/gdb/mips-tdep.h
Randall Stewart [Sat, 20 Feb 2010 17:24:33 +0000 (17:24 +0000)]
Fix for the rge driver for boards without rge6 and rge7.
- changes to avoid adding theses instances on specific chips
Obtained from: C. Jayachandran - JC - c.jayachandran@gmail.com
Randall Stewart [Sat, 20 Feb 2010 17:19:16 +0000 (17:19 +0000)]
Changes for pci and pci-e support
- add bus_space_rmi_pci.c for PCI bus space
- files.xlr update for changes in files
- pcibus.c merged into xlr_pci.c (they were small files with inter-dependencies)
- xlr_pci.c - lot of changes here with few fixes, formatting cleanup
Obtained from: C. Jayachandran (JC) - c.jayachandran@gmail.com
Randall Stewart [Sat, 20 Feb 2010 16:32:33 +0000 (16:32 +0000)]
Cleanups for sys/mips/rmi/bus_space_rmi.c
- remove pci related code from bus_space_rmi.c, we will have another
file for PCI bus space functions which will do byte-swapping.
- remove local SWAP implementation
- added TODO stub for unimplemented functions
Obtained from: C. Jayachandran - c.jayachandran@gmail.com
Randall Stewart [Sat, 20 Feb 2010 16:30:29 +0000 (16:30 +0000)]
Some fixes to the current RMI interrupt handling, changes in this patch are:
- (cleanup) remove rmi specific 'struct mips_intrhand' - this is no
longer needed since 'struct intr_event' have all the required hooks
- add xlr_cpu_establish_hardintr, which has args for pre/post ithread
and filter hooks, so that the PCI code can add the PCI controller
interrupt ack code here
- make 'cpu_establish_hardintr' use the above function.
- (fix) change type of eirr/eimr from register_t to uint64_t. These
have to be 64bit otherwise we cannot handle interrupts from 32.
- (fix) use eimr to mask eirr before checking interrupts, so that we
will not handle masked interrupts.
Obtained from: C. Jayachandran - c.jayachandran@gmail.com