Commit Graph

76671 Commits

Author SHA1 Message Date
Alan Cox
fd776d18a0 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.
2010-02-21 22:23:13 +00:00
Nathan Whitehorn
f41c8c170f 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.
2010-02-21 22:13:57 +00:00
Nathan Whitehorn
ddc58b9379 Fix several mistakes in this file, in order to allow individual fan speeds
to be read and set correctly.
2010-02-21 21:03:37 +00:00
Ed Schouten
28993443b4 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.

Behold, subr_uio.c and subr_hash.c.
2010-02-21 19:53:33 +00:00
Randall Stewart
fc8b40ff1c 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 :-)
2010-02-21 17:27:20 +00:00
Robert Watson
5702371bd2 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.

Discussed with:	brooks (ages ago)
MFC after:	1 week
2010-02-21 15:25:47 +00:00
Ed Schouten
62399df2c9 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.
2010-02-21 13:57:02 +00:00
Marius Strobl
ba96c16ae8 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.

This file was missed in r204152.
2010-02-21 09:25:53 +00:00
Alan Cox
cc611daaf4 Since create_pagetables() zeroes the page tables, pmap_bootstrap() needn't
zero *CMAP1.
2010-02-21 03:49:39 +00:00
Kip Macy
20f72e6f2f - fix bootstrap for variable KVA_PAGES
- remove unused CADDR1
- hold lock across page table update

MFC after:	3 days
2010-02-21 01:13:34 +00:00
Kip Macy
c9a425bae3 don't hold spin lock across free 2010-02-21 01:12:18 +00:00
Kip Macy
227ca25786 - make printf conditional
- fix witness warnings by making configuration lock a mutex
2010-02-21 01:11:39 +00:00
Kip Macy
6f1b404676 remove atkbd from default config to avoid pulling in real-mode bios emulation 2010-02-21 01:06:07 +00:00
Pyun YongHyeon
8b2d91810b Add __FBSDID.
Reviewed by:	sam
2010-02-21 00:07:45 +00:00
Pyun YongHyeon
02d77e455f 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.
2010-02-21 00:00:55 +00:00
Marius Strobl
c273f8a878 Starting with UltraSPARC IV CPUs the CPU caches are described with different
OFW properties.
2010-02-20 23:42:24 +00:00
Marius Strobl
9b824f84d5 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.
2010-02-20 23:24:19 +00:00
Pyun YongHyeon
04bde8528b 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.
2010-02-20 23:21:06 +00:00
Pyun YongHyeon
9b76d9cb3d 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.

Reviewed by:	thompsa
2010-02-20 22:47:20 +00:00
Bjoern A. Zeeb
0a68a45914 Set curvnet earlier so that it also covers calls to sodisconnect(), which
before were possibly panicing the system in ULP code in the VIMAGE case.

Submitted by:	Igor (igor ispsystem.com)
MFC after:	5 days
2010-02-20 22:29:28 +00:00
Pyun YongHyeon
cf5756a6bf Correct inversed programming of ethernet hardware address on
big-endian architecture.

Submitted by:	C. Jayachandran <c.jayachandran at gmail dot com> (initial version)
2010-02-20 22:24:24 +00:00
Bjoern A. Zeeb
c9fdacdac8 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].

Sponsored by:	ISPsystem
Suggested by:	rwatson [1]
Reviewed by:	rwatson
MFC after:	5 days
2010-02-20 22:09:48 +00:00
Marius Strobl
30b9cadca4 Add support for BCM54K2 found in combination with Apple K2 GMAC.
Submitted by:   Andreas Tobler
Obtained from:  OpenBSD
MFC after:      1 week
2010-02-20 22:01:24 +00:00
Bjoern A. Zeeb
aa3f803697 Upon virtual network stack teardown properly release the TCP syncache
resources.

Sponsored by:	ISPsystem
Reviewed by:	rwatson
MFC After:	5 days
2010-02-20 21:45:04 +00:00
Bjoern A. Zeeb
58606037c1 Enhance a panic string to contain more useful debugging information.
Sponsored by:	ISPsystem
Reviewed by:	rwatson
MFC after:	5 days
2010-02-20 21:43:36 +00:00
Michael Tuexen
7b470fc31c Fix handling of SHUTDOWN-ACK chunk in COOKIE_WAIT and COOKIE_ECHOED.
MFC after: 1 week
2010-02-20 20:30:40 +00:00
Bjoern A. Zeeb
9802380e41 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
2010-02-20 19:59:52 +00:00
Alan Cox
507377a656 Eliminate an unused declaration. 2010-02-20 19:30:04 +00:00
Randall Stewart
7198148c8e 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
2010-02-20 17:24:33 +00:00
Randall Stewart
019ee9781a 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
2010-02-20 17:19:16 +00:00
Randall Stewart
219c125a72 Opps forgot to add this:
- add bus_space_rmi_pci.c for PCI bus space

Obtained from:	C. Jayachandran -  <c.jayachandran@gmail.com>
2010-02-20 17:12:07 +00:00
Randall Stewart
ec1dd52fc8 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
2010-02-20 16:32:33 +00:00
Randall Stewart
0364c7f075 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
2010-02-20 16:30:29 +00:00
Nathan Whitehorn
d91c59ee1e Enable NETIF_OPEN_CLOSE_ONCE on PowerPC OFW. This fixes netbooting on
PowerPC Book-S hardware, which had been broken for a very long time.

Submitted by:	Andreas Tobler
MFC after:	1 week
2010-02-20 16:28:37 +00:00
Nathan Whitehorn
ab73970649 Reduce KVA pressure on OEA64 systems running in bridge mode by mapping
UMA segments at their physical addresses instead of into KVA. This emulates
the direct mapping behavior of OEA32 in an ad-hoc way. To make this work
properly required sharing the entire kernel PMAP with Open Firmware, so
ofw_pmap is transformed into a stub on 64-bit CPUs.

Also implement some more tweaks to get more mileage out of our limited
amount of KVA, principally by extending KVA into segment 16 until the
beginning of the first OFW mapping.

Reported by:	linimon
2010-02-20 16:23:29 +00:00
Nathan Whitehorn
cfe174daab Turn on experimental support for DEEPNAP on the 970MP. 2010-02-20 16:14:19 +00:00
Nathan Whitehorn
19317dfd85 Merge r198724 to Book-E. casuword() non-atomically read the current value
of its argument before atomically replacing it, which could occasionally
return the wrong value on an SMP system. This resulted in user mutex
operations hanging when using threaded applications.
2010-02-20 16:13:43 +00:00
Kevin Lo
16445d1e64 Show the cpu info for fa526
Submitted by:	Yohanes Nugroho <yohanes at gmail dot com>
2010-02-20 14:54:11 +00:00
Kevin Lo
dbb0e359a7 Correct both FA526/FA626TE cpu ids since the cpu id is always
masked with 0xfffffff0
2010-02-20 14:52:07 +00:00
Ed Schouten
0b918ea7a9 Remove redundant inclusion of <sys/cdefs.h>.
In my previous commit I should have moved the inclusion to the top,
instead of adding a second one.
2010-02-20 14:13:47 +00:00
Ed Schouten
d502d4503a Add <sys/cdefs.h>.
This header file uses __packed, without including <sys/cdefs.h>. This
means it cannot be used in the way described in sysarch(3) by only
including <machine/sysarch.h>.
2010-02-20 13:33:50 +00:00
Ulrich Spörlein
8fa03d08ca Fix common misspelling of hierarchy
Pointed out by:		bf1783 at gmail
Approved by:		np (cxgb), kientzle (tar, etc.), philip (mentor)
2010-02-20 10:19:19 +00:00
Neel Natu
c03dee5d5b Fix DDB backtrace that includes a kernel exception frame.
The backtrace code tries to look for an instruction of the form "sw ra, x(sp)"
to figure out the program counter of the calling function. When we generate
the kernel exception frame we store the 'ra' at the time of the exception
using an instruction of the same form. The problem is that the 'ra' at the
time of the exception is not the same as the 'program counter' at the time
of the exception.

The fix is to save the 'exception program counter' register by staging
it through the 'ra' register.
2010-02-20 07:34:37 +00:00
Neel Natu
40e359dc3a Get rid of unused options: KERNPHYSADDR, KERNVIRTADDR, PHYSADDR, PHYS_ADDR_64BIT
Discussed with: gonzo, imp
2010-02-20 06:39:14 +00:00
Ed Maste
ad54221048 Avoid corrupting the list or queue if _REMOVE is invoked with a
reference to the head.

PR:		kern/119307
MFC After:	1 week
2010-02-20 01:05:30 +00:00
Jung-uk Kim
8df67d77ed Return partially filled buffer for non-blocking read(2)
in non-immediate mode.

PR:		kern/143855
2010-02-20 00:19:21 +00:00
Marius Strobl
c245df764c Hook up nfs_common missed in r203968.
Submitted by:	kib
2010-02-19 21:11:40 +00:00
Pawel Jakub Dawidek
251294bca9 Don't set f_bsize to recordsize. It might confuse some software (like squid).
Submitted by:	Alexander Zagrebin <alexz@visp.ru>
MFC after:	2 weeks
2010-02-19 20:18:16 +00:00
Daniel Eischen
4fa8d4eff4 Correct spelling of reseting (found while researching the "bb hang detected"
messages that are plaguing me).  While I'm here, delete trailing whitespace.
2010-02-19 18:23:45 +00:00
Michael Tuexen
7291848a0b * Fix another u_long -> uint32_t issue.
* Remove an unused global variable.
* Fix an issue reported by Bruce Cran related to reusing SCTP socket which
  where connected.

MFC after: 1 week
2010-02-19 18:00:38 +00:00
Alexander Kabaev
779fea6010 Define DMA_RX_STATUS_OVERFLOW with correct value.
The RX overflow is reported in bit 2 on real hardware and Linux driver
for the same device already has this defined correctly.
This fixes frequent interrupt storms seen on RouterStation Pro boards.

Discussed with:	gonzo
2010-02-19 17:37:46 +00:00
Attilio Rao
fb7c88e695 Use the cached value within comparison.
Submitted by:	jhb
2010-02-19 15:10:05 +00:00
Attilio Rao
3aadd65dbb Fix the grammar.
Submitted by:	Brandon Gooch <bgooch at se dot edu>
2010-02-19 15:03:55 +00:00
Attilio Rao
dd55eec791 Fix a race in regard of p_numthreads.
Submitted by:	Giovanni Trematerra
		<giovanni dot trematerra at gmail dot com>
2010-02-19 14:59:41 +00:00
Nathan Whitehorn
6abc7eb7f7 Allow the SMU driver to read a variety of hardware sensors (possible
questions on the thermal calibration), and to read and set fan RPMs from
software. While here, fix a number of bugs.

Calibration code from:	OpenBSD
MFC after:	2 weeks
2010-02-19 04:37:54 +00:00
Weongyo Jeong
ef0894bfd2 o print msgs with length if the frame is too short to pass to net80211.
o print key index for debugging if the frame is attempted to decrypt for
  WEP, AES or TKIP though currently HW decryption isn't supported.
2010-02-19 03:36:02 +00:00
Pawel Jakub Dawidek
32115b105a Please welcome HAST - Highly Avalable Storage.
HAST allows to transparently store data on two physically separated machines
connected over the TCP/IP network. HAST works in Primary-Secondary
(Master-Backup, Master-Slave) configuration, which means that only one of the
cluster nodes can be active at any given time. Only Primary node is able to
handle I/O requests to HAST-managed devices. Currently HAST is limited to two
cluster nodes in total.

HAST operates on block level - it provides disk-like devices in /dev/hast/
directory for use by file systems and/or applications. Working on block level
makes it transparent for file systems and applications. There in no difference
between using HAST-provided device and raw disk, partition, etc. All of them
are just regular GEOM providers in FreeBSD.

For more information please consult hastd(8), hastctl(8) and hast.conf(5)
manual pages, as well as http://wiki.FreeBSD.org/HAST.

Sponsored by:	FreeBSD Foundation
Sponsored by:	OMCnet Internet Service GmbH
Sponsored by:	TransIP BV
2010-02-18 23:16:19 +00:00
Pawel Jakub Dawidek
d0d6567d4a Correct typo in comment. 2010-02-18 22:34:29 +00:00
Pawel Jakub Dawidek
bbd388268e Add tunable and sysctl to skip hostid check on pool import. 2010-02-18 22:31:43 +00:00
Pawel Jakub Dawidek
ceda73974b No need to include security/mac/mac_framework.h here. 2010-02-18 22:30:37 +00:00
Pawel Jakub Dawidek
12f35a615a - Style fixes.
- Prefer strlcpy() over strncpy().
2010-02-18 22:29:35 +00:00
Pawel Jakub Dawidek
f24bf7522d Correct comment. 2010-02-18 22:28:12 +00:00
Pawel Jakub Dawidek
e5131ab452 Log attach just like we log detach. 2010-02-18 22:27:38 +00:00
Pawel Jakub Dawidek
957d68dd91 No need to include security/mac/mac_framework.h here. 2010-02-18 22:26:01 +00:00
Pawel Jakub Dawidek
736c8a338c Update comment. We also look for GPT partitions. 2010-02-18 22:23:30 +00:00
Pawel Jakub Dawidek
d779d44313 - Reduce scope of vnode lock. vfs_mount_alloc() doesn't need vnode to be
locked.
- Remove code duplication.
2010-02-18 22:22:45 +00:00
Pawel Jakub Dawidek
e15d7a0b4c Use vput() instead of VOP_UNLOCK()+vrele(). The comment here is out-dated,
we no longer pass thread pointer to VOP_UNLOCK().
2010-02-18 22:14:44 +00:00
Pawel Jakub Dawidek
0454fe84e4 Use NULL instead of 0 when setting up pointer. 2010-02-18 22:12:40 +00:00
Pawel Jakub Dawidek
6619e90994 Simplify code a bit. 2010-02-18 22:10:55 +00:00
Warner Losh
e04e376b8a Unbreak SENTRY5 build. 2010-02-18 20:20:34 +00:00
Warner Losh
265deb36e6 Hack to make ALCHEMY compile again... 2010-02-18 19:41:38 +00:00
Warner Losh
a62e05a4e0 Make printfs work for both OCTEON1 and OCTEON1-32 2010-02-18 19:27:00 +00:00
Warner Losh
f976477f81 Parens around tertiary operator so that casting the result works... 2010-02-18 19:24:23 +00:00
Warner Losh
37b892b263 Use proper structure type for 64-bit headers
# this fixes the MALTA64 build
2010-02-18 19:02:33 +00:00
Warner Losh
ae67f5502d n64 has a different size for KINFO_PROC_SIZE. 2010-02-18 18:57:15 +00:00
Matt Jacob
ee3e6d9906 Don't try and re-use a handle, even if the firmware tells you that's what is logged in.
PR:		kern/144026
MFC after:	1 week
2010-02-18 18:35:09 +00:00
Nathan Whitehorn
062c8f4c86 Fix a bug where pages being removed from memory entirely no longer have
PVOs, and so the modified state of the page can no longer be communicated
to the VM layer, causing pages not to be flushed to swap when needed, in
turn causing memory corruption. Also make several correctness adjustments
to I-Cache synchronization and TLB invalidation for 64-bit Book-S CPUs.

Obtained from:	projects/ppc64
Discussed with:	grehan
MFC after:	2 weeks
2010-02-18 15:00:43 +00:00
Ed Schouten
ddc534916d Allow the pmap code to be built with GCC from FreeBSD 7 again.
This patch basically gives us the best of both worlds. Instead of
forcing the compiler to emulate GNU-style inline semantics even though
we're using ISO C99, it will only use GNU-style inlining when the
compiler is configured that way (__GNUC_GNU_INLINE__).

Tested by:	jhb
2010-02-18 14:28:38 +00:00
Michael Tuexen
63eda93d1a Use uint32_t instead of u_long.
MFC after: 1 week
2010-02-18 13:46:54 +00:00
Neel Natu
6f3c632700 Kernel module support for mips.
Reviewed by: gonzo

Tested by: Alexandr Rybalko (ray@dlink.ua)
2010-02-18 05:49:52 +00:00
Ed Maste
5aa4bb5b49 Include command type in COMMAND TIMEOUT messages to aid in debugging. 2010-02-17 22:28:37 +00:00
Rafal Jaworowski
d6bdd318a3 Assorted fixes for mge(4).
- Use proper map for the busdma sync on mge descriptor.
- Remove unnecesary busdma sync.
- Eliminate redundant locking in mge_reinit_rx() (just assert).
- Kill unused variable.

Submitted by:	Grzegorz Bernacki
Obtained from:	Semihalf
MFC after:	1 week
2010-02-17 17:03:04 +00:00
Luigi Rizzo
27c9c97a3e remove recursive lock/unlock calls, we do them already before entering
the switch.

Reported by: Marta Carbone
2010-02-17 13:06:06 +00:00
Neel Natu
f7bb996d92 Various fixes to get the SWARM config working on a big-endian Sibyte CPU.
Getting the little-endian PCI bus working on the big-endian CPU proved to be
quite challenging. We let the PCI devices be mapped in the "match byte lanes"
address window. This is where they are mapped by the CFE and DMA transfers
generated to or from addresses within this window are not subject to automatic
byte-swapping.

However any access by the driver to memory-mapped pci space is redirected
via the "match bit lanes" address window. We get the benefit of automatic
byte swapping through this address window and drivers don't need to change
to deal with CPU big-endianness.
2010-02-17 06:43:37 +00:00
Warner Losh
d01c5f360e The NetBSD Foundation has granted permission to remove clauses 3 and 4.
Obtained from:	NetBSD
2010-02-16 21:59:17 +00:00
Marius Strobl
b06b8fe3a7 Factor out the code shared between NFS client and server into its own
module. With r203732 it became apparent that creating the sysctl nodes
twice causes at least a warning, however the whole code shouldn't be
present twice in the first place.

Discussed with:	rmacklem
2010-02-16 20:00:21 +00:00
Rui Paulo
8c53f2f83c Fix Kite and Merlin version check. 2010-02-16 12:43:55 +00:00
Weongyo Jeong
45d9abdbc3 adds bwn(4) driver for supporting Broadcom BCM43xx chipsets.
o uses v4 firmware instead of v3.  A port will be committed to create
    the bwn firmware module.
  o supports B/G and LP(low power) PHYs.
  o supports 32 / 64 bits DMA operations.
  o tested on big / little endian machines so should work on all
    architectures.

It'd not connected to the build until the firmware port is committed.
2010-02-16 01:44:14 +00:00
Weongyo Jeong
5c984ceaf9 supports SPROM rev8 informations properly which are used to support
low-power PHY of bwn(4) and LDO voltage adjustments.
2010-02-16 01:22:33 +00:00
Oleksandr Tymoshenko
f6951d3084 - Clean-up output of memory banks info 2010-02-16 00:08:42 +00:00
Attilio Rao
c1210a7d97 Adjust style (following the already existing rules) for the newly
introduced option DEADLKRES.

Reported by:	danfe, julian, avg
2010-02-15 23:44:48 +00:00
Jung-uk Kim
463537a097 Rename some macros to clarify their intentions and fix style nits. 2010-02-15 20:46:01 +00:00
Jung-uk Kim
aba311e1d4 Add support for cycle' and zero' events for LCD brightness control.
Submitted by:	Daniel Walter (d dot walter at 0x90 dot at) (intial version)
2010-02-15 19:30:28 +00:00
Bernhard Schmidt
ae6fd00faf Fix for the Intel WiFi Link 1000. The EEPROM image is in the OTPROM block
before the last block, not in the last block itself.

Approved by:	rpaulo (mentor)
Obtained from:	OpenBSD
MFC after:	3 weeks
2010-02-15 19:18:46 +00:00
Rui Paulo
1480515a8b Fix KITE version check.
Obtained from:	//depot/user/rpaulo/80211n/...
2010-02-15 18:47:42 +00:00
Alexander Motin
c89d1732ba Make CD driver a bit more robust and predictable to unreported errors. 2010-02-15 18:14:51 +00:00
Rui Paulo
7d4f72b39d Bring back AR9285 support. This fixes most of the issues and should be
pretty usable.

MFC after:	1 month
2010-02-15 17:49:49 +00:00
Rafal Jaworowski
e95b7f61b9 Call the proper linkup routine in PowerPC Book-E machdep.
Submitted by:	attilio
MFC after:	1 week
2010-02-15 14:38:30 +00:00
Pawel Jakub Dawidek
784949026c Mark various sysctls also as tunables.
Reviewed by:	rwatson
MFC after:	1 week
2010-02-15 09:19:07 +00:00
Andrew Thompson
8bbbf173a2 Add device ID for the FTDI 4232H.
PR:		usb/143832
Submitted by:	UEMURA Tetsuya
2010-02-14 20:10:41 +00:00
Andrew Thompson
2386d71421 Add support for the E1752 3G modem and the required eject command.
Submitted by:	Milan Obuch
2010-02-14 20:05:12 +00:00
Andrew Thompson
3e889e246c Make umodem more tolerant for devices which modem descriptors are misplaced.
Reported by:	Erick Wales
Submitted by:	Hans Petter Selasky
2010-02-14 19:59:19 +00:00
Andrew Thompson
b60541a9ec Add UQ_KBD_BOOTPROTO quirk needed in r203896 2010-02-14 19:56:05 +00:00
Andrew Thompson
1bdb81f124 Detect when we are polling from kernel via cngetc() in the boot process and
reserve the keypresses so they do not get passed to syscons.

Submitted by:	Hans Petter Selasky
2010-02-14 19:53:45 +00:00
Ed Maste
8e7e6335bc Diff reduction with Adaptec's vendor driver.
Driver version 2.1.9 chosen as that Adaptec version roughly corresponds
with the current feature set merged to the in-tree driver.
2010-02-14 17:14:11 +00:00
Marcel Moolenaar
438e84ae72 Some code cleanups:
o   s/u_int32_t/uint32_t/g
o   Add multiple-inclusion protection.
o   Break long lines.
2010-02-14 17:03:20 +00:00
Marcel Moolenaar
26279767e4 Some code churn:
o   Eliminate IA64_PHYS_TO_RR6 and change all places where the macro is used
    by calling either bus_space_map() or pmap_mapdev().
o   Implement bus_space_map() in terms of pmap_mapdev() and implement
    bus_space_unmap() in terms of pmap_unmapdev().
o   Have ia64_pib hold the uncached virtual address of the processor interrupt
    block throughout the kernel's life and access the elements of the PIB
    through this structure pointer.

This is a non-functional change with the exception of using ia64_ld1() and
ia64_st8() to write to the PIB. We were still using assignments, for which
the compiler generates semaphore reads -- which cause undefined behaviour
for uncacheable memory. Note also that the memory barriers in ipi_send() are
critical for proper functioning.

With all the mapping of uncached memory done by pmap_mapdev(), we can keep
track of the translations and wire them in the CPU. This then eliminates
the need to reserve a whole region for uncached I/O and it eliminates
translation traps for device I/O accesses.
2010-02-14 16:56:24 +00:00
Rui Paulo
12fefae25c Revert part of the 9285 support because it breaks the 9280 support. I'll
try to do the 9285 support without interfering with any other chipset
revisions support.
2010-02-14 16:26:32 +00:00
Konstantin Belousov
d07dc8e3eb Do not leak process lock when current thread is not allowed to see target.
Bumped into by:	ed
MFC after:	3 days
2010-02-14 13:59:01 +00:00
Alexander Motin
b41cd53957 MFp4:
With FBS enabled, we have no idea what command caused timeout.
Implement same logic as in siis(4) - wait for other commands
complete or timeout and then give some more time.
2010-02-14 12:30:35 +00:00
Alexander Motin
301c88be98 MFp4:
After last running command completed, give commands in timeout state
second time.
2010-02-14 12:27:49 +00:00
Konstantin Belousov
3c8b687fe1 Invalid filesystem might cause the bp to be never read.
Noted by:	Pedro F. Giffuni <giffunip tutopia com>
Obtanined from:	NetBSD
MFC after:	1 week
2010-02-14 12:10:49 +00:00
Ed Schouten
80445d3f53 Make <sys/timeb.h> work without including <sys/types.h>.
According to the last POSIX specification that contained <sys/timeb.h>,
this header should also typedef time_t properly. Also add a proper
comment to the final #endif.
2010-02-14 12:00:42 +00:00
Rui Paulo
3834e46b8e Also build ah_eeprom_v4k.c when ar9280 is selected. 2010-02-14 11:04:52 +00:00
Kevin Lo
4e92112d57 Correct cpu id for FA526.
While I'm here, add cpu id for FA626TE.
2010-02-14 05:02:08 +00:00
Rick Macklem
9c360f222d Change the default value for vfs.newnfs.enable_locallocks to 0 for
the experimental NFS server, since local locking is known to be
broken and the patch to fix it is still a work in progress.

MFC after:	5 days
2010-02-14 00:18:32 +00:00
Rick Macklem
d5ad662523 This fixes the experimental NFS server so that it won't crash in the
caching code for IPv6 by fixing a typo that used the incorrect variable.
It also fixes the indentation of the statement above it.

Reported by:	simon AT comsys.ntu-kpi.kiev.ua
MFC after:	5 days
2010-02-13 23:56:19 +00:00
Michael Tuexen
8d9d061323 Add missing SCTP_PACKED. Spotted by Irene Ruengeler.
MFC after: 1 week
2010-02-13 21:38:15 +00:00
Marius Strobl
a675da796f Predict KASSERTs to be true. 2010-02-13 19:17:06 +00:00
Marius Strobl
f00d6a0cc2 Add ssm(4), which serves as a glue device allowing devices beneath the
scalable shared memory node, which is used in large UltraSPARC III based
machines to group snooping-coherency domains together, like schizo(4) to
be treated like nexus(4) children.
2010-02-13 19:05:34 +00:00
Marius Strobl
527eebfeeb - Add the 'cmp' and 'core' pseudo-busses which are used to group CPU cores
to the exclusion lists as the CPU nodes aren't handled as regular devices
  either. Also add the pseudo-devices found in Sun Fire V1280.
- Allow nexus_attach() and nexus_alloc_resource() to be used by drivers
  derived from nexus(4) for subordinate busses.
- Don't add the zero-sized memory resources of glue devices to the resource
  lists.
2010-02-13 18:51:49 +00:00
Marius Strobl
ac144cadbc Resurrect nexusvar.h from r167307. 2010-02-13 18:18:45 +00:00
Marius Strobl
1c05d13e3f Style fixes 2010-02-13 17:05:57 +00:00
Marius Strobl
c61b6da840 - Search the whole OFW device tree instead of only the children of the
root nexus device for the CPUs as starting with UltraSPARC IV the 'cpu'
  nodes hang off of from 'cmp' (chip multi-threading processor) or 'core'
  or combinations thereof. Also in large UltraSPARC III based machines
  the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which
  group snooping-coherency domains together instead of directly from the
  nexus.
  It would be great if we could use newbus to deal with the different ways
  the 'cpu' devices can hang off of pseudo ones but unfortunately both
  cpu_mp_setmaxid() and sparc64_init() have to work prior to regular device
  probing.
- Add support for UltraSPARC IV and IV+ CPUs. Due to the fact that these
  are multi-core each CPU has two Fireplane config registers and thus the
  module/target ID has to be determined differently so the one specific
  to a certain core is used. Similarly, starting with UltraSPARC IV the
  individual cores use a different property in the OFW device tree to
  indicate the CPU/core ID as it no longer is in coincidence with the
  shared slot/socket ID.
  This involves changing the MD KTR code to not directly read the UPA
  module ID either. We use the MID stored in the per-CPU data instead of
  calling cpu_get_mid() as a replacement in order prevent clobbering any
  registers as side-effect in the assembler version. This requires CATR()
  invocations from mp_startup() prior to mapping the per-CPU pages to be
  removed though.
  While at it additionally distinguish between CPUs with Fireplane and
  JBus interconnects as these also use slightly different sizes for the
  JBus/agent/module/target IDs.
- Make sparc64_shutdown_final() static as it's not used outside of
  machdep.c.
2010-02-13 16:52:33 +00:00
Max Laier
193cbc4d24 Fix drbr and altq interaction:
- introduce drbr_needs_enqueue that returns whether the interface/br needs
   an enqueue operation: returns true if altq is enabled or there are
   already packets in the ring (as we need to maintain packet order)
 - update all drbr consumers
 - fix drbr_flush
 - avoid using the driver queue (IFQ_DRV_*) in the altq case as the
   multiqueue consumer does not provide enough protection, serialize altq
   interaction with the main queue lock
 - make drbr_dequeue_cond work with altq

Discussed with:		kmacy, yongari, jfv
MFC after:		4 weeks
2010-02-13 16:04:58 +00:00
Marius Strobl
dfade4c0a4 - At least the trap table of the Sun Fire V1280 firmware apparently has
no cleanwindows handler so just remove trying to trigger it from _start
  and the AP trampoline code as that leads to a crash there. This should
  be okay as leaking data from the OFW via the CPU registers on start of
  the kernel should be no real concern.
- Make the comments of _start and the AP trampoline code regarding the
  initializations they perform match each other and reality.
- Make the comments of the AP trampoline code regarding iTLB accesses
  refer to the right macro.
2010-02-13 15:36:33 +00:00
Marius Strobl
8c56bcac75 Correct the panic strings introduced in r203830 to match their arguments. 2010-02-13 15:12:46 +00:00
Marius Strobl
606e071c41 Use the SUNW,{d,i}tlb-load methods for entering locked TLB entries like
OpenBSD and OpenSolaris do instead of fiddling with the MMUs ourselves.
Unlike direct access the firmware methods don't automatically use the
next free (?) TLB slot, instead the slot to be used has to be specified.
We allocate the TLB slots for the kernel top-down as OpenSolaris suggests
that the firmware will always allocate the ones for its own use bottom-up.
Besides being simpler, according to OpenBSD using the firmware methods is
required to allow booting on Sun Fire E10K with multi-systemboard domains.
2010-02-13 14:40:42 +00:00
Marius Strobl
4f607e8ef2 - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware
of Sun Fire V1280 doesn't round up the size itself but instead lets
  claiming of non page-sized amounts of memory fail.
- Change parameters and variables related to the TLB slots to unsigned
  which is more appropriate.
- Search the whole OFW device tree instead of only the children of the
  root nexus device for the BSP as starting with UltraSPARC IV the 'cpu'
  nodes hang off of from 'cmp' (chip multi-threading processor) or 'core'
  or combinations thereof. Also in large UltraSPARC III based machines
  the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which
  group snooping-coherency domains together instead of directly from the
  nexus.
- Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these
  are multi-core each CPU has two Fireplane config registers and thus the
  module/target ID has to be determined differently so the one specific
  to a certain core is used. Similarly, starting with UltraSPARC IV the
  individual cores use a different property in the OFW device tree to
  indicate the CPU/core ID as it no longer is in coincidence with the
  shared slot/socket ID.
  While at it additionally distinguish between CPUs with Fireplane and
  JBus interconnects as these also use slightly different sizes for the
  JBus/agent/module/target IDs.
- Check the return value of init_heap(). This requires moving it after
  cons_probe() so we can panic when appropriate. This should be fine as
  the PowerPC OFW loader uses that order for quite some time now.
2010-02-13 14:13:39 +00:00
Konstantin Belousov
699d124f23 Fix function name in the comment in the second location too.
Submitted by:	ed
MFC after:	1 week
2010-02-13 12:50:09 +00:00
Konstantin Belousov
48d1bcf8e0 - Add idempotency guards so the structures can be used in other utilities.
- Update bpb structs with reserved fields.
- In direntry struct join deName with deExtension. Although a
  fix was attempted in the past, these fields were being overflowed,
  Now this is consistent with the spec, and we can now share the
  WinChksum code with NetBSD.

Submitted by:	Pedro F. Giffuni <giffunip tutopia com>
Mostly obtained from:	NetBSD
Reviewed by:	bde
MFC after:	2 weeks
2010-02-13 12:41:07 +00:00
Konstantin Belousov
8b36e81367 Use M_ZERO instead of calling bzero().
Fix function name in the comment.

MFC after:	1 week
2010-02-13 12:11:03 +00:00
Konstantin Belousov
4f160a1c59 Remove unused macros.
MFC after:	1 week
2010-02-13 11:34:25 +00:00
Konstantin Belousov
2950ff259c When ffs_realloccg() failed to allocate bigger fragment and, because
pending blocks are scheduled for removal, goes to retry the (re)allocation,
clear the bp pointer. It might happen that meantime free space is really
exhausted and we are entering nospace: label without bread()ing buffer,
causing stale bp value to be brelse()d again.

Tested by:	pho
    (Producing a scenario to reliably reproduce the
     race appeared to be much harder then fixing the bug)
MFC after:	1 week
2010-02-13 10:34:50 +00:00
Jung-uk Kim
f29d6f75fa Make sanity check slightly more useful and tweak an error message. 2010-02-13 05:38:21 +00:00
Jung-uk Kim
f67f8ffd43 Prefer correct and simpler backlight control methods for ASUS G2K laptop. 2010-02-13 02:30:43 +00:00
Jung-uk Kim
35dd1ef75c Implement LCD brightness control notify handler.
Submitted by:	Daniel Walter(d dot walter at 0x90 dot at) (intial version)
2010-02-13 02:24:23 +00:00
Rui Paulo
cc01b2698a Add a space before printing 'thread pid ...' to match the space before
']'.
2010-02-12 19:52:51 +00:00
Ed Maste
2134e2ef57 Garbage collect Falcon/PPC support that has not been used in released
products, based on discussion with Adaptec.
2010-02-12 18:48:18 +00:00
Neel Natu
9dcae110dc Remove the PCI_IOSPACE_SIZE and PCI_IOSPACE_ADDR hack from nexus.c. Implement
this in the Sibyte PCI hostbridge driver instead.

The nexus driver sees resource allocation requests for memory and irq
resources only. These are legitimate resources on all MIPS platforms.

Suggested by: imp
2010-02-12 02:59:49 +00:00
Marcel Moolenaar
af002ab819 Initialize pve_fsid and pve_fileid to VNOVAL. 2010-02-11 21:10:56 +00:00
Andriy Gapon
0430ba9e55 acpi: drop the second bus_generic_attach pass
It is belived that that pass s not needed anymore.
Specifically it is not required now for the reasons that were given
in the removed comment.

Discussed with:	jhb
MFC after:	4 weeks
2010-02-11 18:24:00 +00:00
Kirk McKusick
81479e688b One last pass to get all the unsigned comparisons correct. 2010-02-11 18:14:53 +00:00
Marcel Moolenaar
162110273c o Add support for COMPAT_IA32.
o  Incorporate review comments:
   -  Properly reference and lock the map
   -  Take into account that the VM map can change inbetween requests
   -  Add the fileid and fsid attributes

Credits: kib@
Reviewed by: kib@
2010-02-11 18:00:53 +00:00
Andriy Gapon
aa83516001 acpi cpu: probe+attach before all other enumerated children on acpi bus
Some current systems dynamically load SSDT(s) when _PDC/_OSC method
of Processor is evaluated.  Other devices in ACPI namespace may access
objects defined in the dynamic SSDT.  Drivers for such devices might
have to have a rather high priority, because of other dependencies.
Good example is acpi_ec driver for EC.
Thus we attach to Processors as early as possible to load the SSDTs
before any other drivers may try to evaluate control methods.
It also seems to be a natural order for a processor in a device
hierarchy.

On the other hand, some child devices on acpi cpu bus need to access
other system resources like PCI configuration space of chipset devices,
so they need to be probed and attached rather late.
For this reason we probe and attach the cpu bus at
SI_SUB_CONFIGURE:SI_ORDER_MIDDLE SYSINIT level.
In the future this could be done more elegantly via multipass.

Please note that acpi drivers that might access ACPI namespace from
device_identify will do that before _PDC/_OSC of Processors are evaluated.

Legacy cpu driver is not affected by this change.

PR:		kern/142561 (in part)
Reviewed by:	jhb
Silence from:	acpi@
MFC after:	5 weeks
2010-02-11 08:50:21 +00:00
Kirk McKusick
e870d1e6f9 This fix corrects a problem in the file system that treats large
inode numbers as negative rather than unsigned. For a default
(16K block) file system, this bug began to show up at a file system
size above about 16Tb.

To fully handle this problem, newfs must be updated to ensure that
it will never create a filesystem with more than 2^32 inodes. That
patch will be forthcoming soon.

Reported by: Scott Burns, John Kilburg, Bruce Evans
Followup by: Jeff Roberson
PR:          133980
MFC after:   2 weeks
2010-02-10 20:10:35 +00:00
Edward Tomasz Napierala
619961810c Remove unused variable. 2010-02-10 18:56:49 +00:00
Attilio Rao
88cbfa852e Add the options DEADLKRES (introducing the deadlock resolver thread) in
the 'debugging' section of any HEAD kernel and enable for the mainstream
ones, excluding the embedded architectures.
It may, of course, enabled on a case-by-case basis.

Sponsored by:	Sandvine Incorporated
Requested by:	emaste
Discussed with:	kib
2010-02-10 16:30:04 +00:00
Randall Stewart
9518a2a361 If a mbuf is split across two pages, we
have code that detects this and makes two
transmit descriptors. However its possible
that the algorithm detects when the second
page is not used (when the data aligns perfectly
to the bottom of the page). This caused a 0
len descriptor to be added which locks up the
rge device. Skip such things with a continue.

JC provided this patch... Thanks JC :-)
Obtained from:	JC (c.jayachandran@gmail.com)
2010-02-10 13:48:34 +00:00
Rui Paulo
fb023b5a3c Turn on the front LED at boot time like we do with the Avila. 2010-02-10 11:40:18 +00:00
Rui Paulo
1ac5dac214 Fix typo in comment.
Pointed out by:	danfe
2010-02-10 11:12:39 +00:00
Rui Paulo
24b509868d 't' stands for Turbo and is a valid mode, so fix previous commit.
Pointed out by:	sam
2010-02-10 11:11:37 +00:00
Neel Natu
bd43e0ce56 Code cleanup:
- make some variables static
- remove unused variables.
2010-02-10 06:57:05 +00:00
Neel Natu
73614b2316 Call profclock() and statclock() explicitly on all cpus. Prior to this
change these functions were called only on the BSP indirectly via hardclock().

top -P now shows usage statistics of all cpus.
2010-02-10 06:29:43 +00:00
David Xu
8251549f27 In function umtxq_insert_queue, use parameter q (shared/exclusive queue)
instead of hard coded constant. This does not affect RELENG_8 and previous,
because the code only exists in the HEAD.
2010-02-10 05:47:34 +00:00
Neel Natu
ed6933b252 Enable interrupts before doing AST processing to avoid a deadlock.
Specifically on an SMP kernel it was observed that if both the
processors are doing an exit1() via ast()->postsig()->sigexit()
then we will deadlock.

This happens because exit1() calls vmspace_exit() that in turn
calls pmap_invalidate_all(). This function tries to do a
smp_rendezvous() which blocks because the other processor is not
responding to IPIs - because it too is doing AST processing with
interrupts disabled.
2010-02-10 05:43:31 +00:00
Marius Strobl
9ea01fedc0 - Move nfs_realign() from the NFS client to the shared NFS code and
remove the NFS server version in order to reduce code duplication.
  The shared version now uses a second parameter how, which is passed
  on to m_get(9) and m_getcl(9) as the server used M_WAIT while the
  client requires M_DONTWAIT, and replaces the the previously unused
  parameter hsiz.
- Change nfs_realign() to use nfsm_aligned() so as with other NFS code
  the alignment check isn't actually performed on platforms without
  strict alignment requirements for performance reasons because as the
  comment suggests unaligned data only occasionally occurs with TCP.
- Change fha_extract_info() to use nfs_realign() with M_DONTWAIT rather
  than M_WAIT because it's called with the RPC sp_lock held.

Reviewed by:	jhb, rmacklem
MFC after:	1 week
2010-02-09 23:45:14 +00:00
Marius Strobl
be03f0b907 Some style(9) fixes 2010-02-09 23:40:07 +00:00
Bjoern A. Zeeb
3e0490b3fe Add DDB support for printing vnet_sysinit and vnet_sysuninit
ordered call lists. Try to lookup function/symbol names and print
those in addition to the pointers, along with the constants for
subsystem and order.
This is useful for debugging vnet teardown ordering issues.

Make it possible to call the actual printing frunction from normal
code at runtime, ie. from vnet_sysuninit(), if DDB support is there.

Sponsored by:	ISPsystem
MFC After:	8 days
2010-02-09 22:39:34 +00:00
Xin LI
5cb9c68cc9 - Return EAFNOSUPPORT instead of EINVAL for unsupported address family,
this matches the Linux behavior.
 - Check if we have sufficient space allocated for socket structure, which
   fixes a buffer overflow when wrong length is being passed into the
   emulation layer. [1]

PR:		kern/138860
Submitted by:	Mateusz Guzik <mjguzik gmail com>
Reported by:	Alexander Best [1]
MFC after:	2 weeks
2010-02-09 22:30:51 +00:00
Bjoern A. Zeeb
61d033d436 Add an SDT provider for "vnet"s along with probes for vnet_alloc
and vnet_destroy.
Use the line number rather than NULL as dummy argument.

Note: the fbt provider does not reliably provide :return probes
(depending on optimization levels used at compile time) making
it unusable for scripts to generate complete call-traces with
well defined boundaries over allocations or destructions of
virtual network stacks.

Sponsored by:	ISPsystem
MFC After:	8 days
2010-02-09 22:15:59 +00:00
Bjoern A. Zeeb
fffb9f1d9c Properly free resources when destroying the TCP hostcache while
tearing down a network stack (in the VIMAGE jail+vnet case).

For that break out the logic from tcp_hc_purge() into an internal
function we can call from both, the sysctl handler and the
tcp_hc_destroy().

Sponsored by:	ISPsystem
Reviewed by:	silby, lstewart
MFC After:	8 days
2010-02-09 21:31:53 +00:00
Pyun YongHyeon
4150ce6f17 Move device specific flag configuration to attach routine.
The softc obtained in device probe wouldn't be the same one used in
device attach. Drivers should not assume any values stored in softc
structure in probe routine will be available for its attach routine.
2010-02-09 19:12:06 +00:00
Marcel Moolenaar
8a25c0c741 Unbreak building kernels with COMPAT_32 enabled. The actual support
for the PT_VM_ENTRY request from 32-bit processes will follow.

Pointy hat: marcel
2010-02-09 17:20:00 +00:00
Neel Natu
1d4fd9f5a8 SMP support for the mips port.
The platform that supports SMP currently is a SWARM with a dual-core Sibyte
processor. The kernel config file to use is SWARM_SMP.

Reviewed by: imp, rrs
2010-02-09 06:24:43 +00:00
Marcel Moolenaar
90b4621a5f Add PT_VM_TIMESTAMP and PT_VM_ENTRY so that the tracing process can
obtain the memory map of the traced process. PT_VM_TIMESTAMP can be
used to check if the memory map changed since the last time to avoid
iterating over all the VM entries unnecesarily.

MFC after:	1 month
2010-02-09 05:52:35 +00:00
Tai-hwa Liang
4a97e4f030 Fixing compilation bustage by removing a stray comment fragment. 2010-02-09 04:07:39 +00:00
Andrew Thompson
cf223a88bc Disable the use of the IAAD usb doorbell on NVidia controllers as it can cause
the hardware to stall.

Submitted by:	Hans Petter Selasky
2010-02-09 00:38:40 +00:00
Rebecca Cran
c7ea7c4618 Update documentation for the iwn and iwnfw drivers: they support the 1000, 5150, 6000 and 6050 devices too, with firmware modules for the 4965, 1000, 5000, 5150 and 6000.
Add documentation for mwl and all the wireless firmware drivers.

Approved by:	rrs (mentor)
2010-02-08 21:38:42 +00:00
Rebecca Cran
31615ef723 Document the usfs driver and the NO_SYSCTL_DESCR option, and update the comment for umass.
Don't include the sysctl description variables in aic7xxx when NO_SYSCTL_DESCR is used.

Approved by:	rrs (mentor)
2010-02-08 20:57:42 +00:00
Rui Paulo
9ac01d39ad Add multicast key search support. This fixes corrupted mcast packets
when we have more than one hostap vap.

Submitted by:	Russell Yount <russell.yount at gmail.com>
MFC after:	2 weeks
2010-02-08 20:23:20 +00:00
Rui Paulo
21d18f0e20 Fix TX power problems with AR9285. 2010-02-08 20:12:01 +00:00
Rui Paulo
b605438031 Fix typo in comment. 2010-02-08 20:04:02 +00:00
Rebecca Cran
ac6be749cd Remove the usb2_input_kbd directive that was missed during the renaming of the drivers in the usb2 stack.
Approved by:	rrs (mentor)
2010-02-08 19:48:33 +00:00
Rebecca Cran
4c21be9b2d Rename usb2_ structures and variables to usb_.
Approved by:	rrs (mentor)
Discussed with:	hps
2010-02-08 19:44:09 +00:00
Bernhard Schmidt
98f160d999 Ensure that tkip_mixing_phase1() is called after a rekeying event when
useing plain s/w crypto.

Approved by:	rpaulo (mentor)
Reviewed by:	sam
2010-02-08 18:16:59 +00:00
Ed Schouten
790f66db55 Remove unused LIBCOMPAT keyword from syscalls.master. 2010-02-08 10:02:01 +00:00
Ed Schouten
e7fe3cf158 Fall back to ASCII codepoints for box drawing.
Even though the default VGA font provides box drawing fonts, there is no
guarantee any font will provide these as well (i.e. ISO-8859-*, KOI8-R).
Just use ASCII characters for box drawing.

PR:		kern/141633
2010-02-08 09:16:59 +00:00
David Xu
93f0162799 Set waiters flag before checking semaphore's counter,
otherwise we might lose a wakeup. Tested on postgresql database server.
2010-02-08 07:31:05 +00:00
Rafal Jaworowski
530a5fb294 Improve checking whether an ARM VA has a valid mapping before performing cache
sync.

VIPT/PIPT caches need valid VA-PA mapping in PTE for a cache operation to
succeed (unlike VIVT). Prior to this fix pmap was using l2pte_valid() for that
check, but this is not sufficient as the function merely checks if a PTE
exists (there can be existing but _invalid_ entries in the table).

A new pmap_has_valid_mapping() routine is introduced to do this job right by
checking proper PTE flags.

Among other potential problems this cures coherency issues with L2 caches on
MV-78100.

Submitted by:	Grzegorz Bernacki, Piotr Ziecik
Reviewed, tested by:	marcel
Obtained from:	Semihalf
MFC after:	1 week
2010-02-07 20:48:57 +00:00
Warner Losh
070f5ba893 merge from my tbemd branch: cmpdi2 and ucmpdi2 are genereated when the
inline limit is pushed to a very low level.  Include them here until
we can find a better way to optionally include them.  They are small...
2010-02-07 19:49:01 +00:00
Gavin Atkinson
b31b20fa02 Add support for a few more Sony-specific ACPI features (default display
brightness, wired LAN power and bass gain), and update the description of
one previously unknown feature (display contrast).  While here, expand on
a comment and remove two defines left over from an old version of the code.

Also update man page to document the above changes, and correct grammar.

PR:		kern/127581
2010-02-07 18:36:30 +00:00
Gavin Atkinson
e83bcc015f Document support for the D-Link DFE520-TX card (supported with the vr(4)
driver)

PR:		kern/135989
Submitted by:	"Rashid N. Achilov"  citycat4 ngs.ru
2010-02-07 18:05:12 +00:00
Gavin Atkinson
03be779506 Spelling nit 2010-02-07 18:00:13 +00:00
Ed Schouten
f004528903 Remove statistics from the TTY queues.
I added counters to see how often fast copying to userspace was actually
performed, which was only useful during development. Remove these
statistics now we know it to be effective.
2010-02-07 15:42:15 +00:00
Marcel Moolenaar
58ce165dfd Fix single-stepping when the kernel was entered through the EPC syscall
path. When the taken branch leaves the kernel and enters the process,
we still need to execute the instruction at that address. Don't raise
SIGTRAP when we branch into the process, but enable single-stepping
instead.
2010-02-06 20:46:14 +00:00
Rui Paulo
53541ce4b7 Revert unwanted changes in revision 203422.
Spotted by:	sam
2010-02-06 19:24:16 +00:00
Ermal Luçi
644da90d9f Propagate the vlan eventis to the underlying interfaces/members so they can do initialization of hw related features.
PR:	kern/141646
Reviewed by:	thompsa
Approved by:	thompsa(co-mentor)
MFC after:	2 weeks
2010-02-06 13:49:35 +00:00
Andriy Gapon
f4ab0cccce acpi_cpu: prefer _OSC over _PDC, just in case
_PDC was deprecated in favor of _OSC long time ago, but it
seems that they still peacefully coexist and in some case
only _PDC is present.
Still _OSC provides a reacher interface and is capable to
report back its status.
If the status is non-zero, then report it, we may find
it useful to understand what firmware expects from OS.
Also clean up some comments that became less useful over time.

Reviewed by:	njl, jhb, rpaulo
MFC after:	3 weeks
2010-02-06 12:48:06 +00:00
Jung-uk Kim
316bcf56a2 Map and report actual video memory we need. 2010-02-06 00:52:42 +00:00
Xin LI
d0d444da07 Remove two files that are not needed by FreeBSD.
Approved by:	pjd
MFC after:	2 weeks
2010-02-05 23:17:59 +00:00
Jung-uk Kim
f801fa102d Replace some homegrown functions with better/correct ones. 2010-02-05 18:00:24 +00:00
Alexander Motin
2622a559a7 Use new helper functions to set PCIe max read request size. 2010-02-05 17:20:48 +00:00
Alexander Motin
24d6a5ed27 Add pci_get|set_max_read_req() helper functions to control maximum PCIe
read request size.

Reviewed by:	jhb@
2010-02-05 17:18:48 +00:00
Alexander Motin
a4271edc11 Report SATA300 chips also as SATA. 2010-02-05 14:41:18 +00:00
Alexander Motin
57ae362c8f When hacking INQUIRY result, make sure that it is right INQUIRY and there
is enough of result to hack.
2010-02-05 12:40:18 +00:00
Neel Natu
ca98449e12 Correct a comment - we are not setting the exception level but rather are
disabling interrupts.

Simplify register usage - we can directly load 'curpcb' into 'k1' after
interrupts are disabled. There is no need to do so indirectly through 'a1'.
2010-02-05 06:36:03 +00:00
Neel Natu
d3e24a4579 Initialize interrupt controller early on. 2010-02-05 03:22:04 +00:00
Neel Natu
c3f7e882dc Reimplement all functions to access the system control unit in C.
The only reason we need to have the sb_load64() and sb_store64()
functions in assembly is to cheat the compiler and generate the
'ld' and 'sd' instructions which it otherwise will not do when
compiling for a 32-bit architecture. There are some 64-bit
registers in the SCD unit that must be accessed using 64-bit
load and store instructions.
2010-02-05 03:20:47 +00:00
Neel Natu
c8f4860360 style: don't need to use braces for single line control statements. 2010-02-05 02:40:42 +00:00