philip [Fri, 22 Aug 2008 08:09:13 +0000 (08:09 +0000)]
MFC r181753:
Introduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting
to 1. This can be used to disable the 80pin cable check on systems which
forget to set the bit -- such as certain laptops and Soekris boards.
thompsa [Fri, 22 Aug 2008 03:08:31 +0000 (03:08 +0000)]
MFC r174150, r174240, r179009, r179720
Sync sys/compat/ndis to HEAD.
- Correct the calculation for the number of 100ns intervals since January 1,
1601. The 1601 - 1970 period was in seconds rather than 100ns units.
- Remove duplication by having NdisGetCurrentSystemTime call ntoskrnl_time.
- Implement functions required by some ndis drivers.
- Fix a panic when it occurred during initializing the ndis driver because it
try to read network address through ifnet structure which is NULL until the
ndis driver's initialization is finished.
- fix a page fault that it occurred during ifp is NULL. This bug happens when
NDIS driver's initialization is failed and NDIS driver's trying to call
NdisWriteErrorLogEntry().
weongyo [Thu, 21 Aug 2008 05:40:38 +0000 (05:40 +0000)]
MFC r180754
when NDIS framework try to query/set informations NDIS drivers can
return NDIS_STATUS_PENDING. In this case, it's waiting for 5 secs to
get the response from drivers now. However, some NDIS drivers can send
the response before NDIS framework gets ready to receive it so we might
always be blocked for 5 secs in current implementation. NDIS framework
should reset the event before calling NDIS driver's callback not after.
weongyo [Thu, 21 Aug 2008 05:30:26 +0000 (05:30 +0000)]
MFC r179855
handle .INF files for PCMCIA correctly that specify multiple entries in
their [Manufacturer] sections and prevent a case that NDIS_PCI_DEV_TABLE
definition was always emitted that it's only emitted once if a .INF file
is for PCI.
weongyo [Thu, 21 Aug 2008 05:13:55 +0000 (05:13 +0000)]
MFC r179423
Fix a panic that a priority value which is passed to cv_broadcastpri(9)
can be < 0. We don't ignore a `increment' argument but at least we keep
a priority value of NDIS threads over PRI_MIN_KERN.
yongari [Thu, 21 Aug 2008 02:03:01 +0000 (02:03 +0000)]
MFC r180950:
s/printf/device_printf/g
Don't hard code function name in device_printf() and use __func__.
While I'm here nuke bfe_unit in softc as it's not needed anymore.
jhb [Wed, 20 Aug 2008 18:33:09 +0000 (18:33 +0000)]
MFC: Attach the cpufreq child devices with specific orders to enforce
relative priority of some of the drivers that manage the same state (e.g.
ichss0 vs est0).
philip [Wed, 20 Aug 2008 11:33:13 +0000 (11:33 +0000)]
MFC r181467, r181593:
Add glxsb(4) driver for the Security Block in AMD Geode LX processors (as
found in Soekris hardware, for instance). The hardware supports
acceleration of AES-128-CBC accessible through crypto(4) and supplies
entropy to random(4).
yongari [Wed, 20 Aug 2008 05:19:41 +0000 (05:19 +0000)]
MFC r176264:
Nuke local jumbo allocator and switch to use of UMA backed page
allocator for jumbo frame.
o Removed unneeded jlist lock which was used to manage jumbo
buffers.
o Don't reinitialize hardware if MTU was not changed.
o Added additional check for minimal MTU size.
o Added a new tunable hw.skc.jumbo_disable to disable jumbo frame
support for the driver. The tunable could be set for systems that
do not need to use jumbo frames and it would save
(9K * number of Rx descriptors) bytes kernel memory.
o Jumbo buffer allocation failure is no longer critical error for
the operation of sk(4). If sk(4) encounter the allocation failure
it just disables jumbo frame support and continues to work without
user intervention.
With these changes jumbo frame performance of sk(4) was slightly
increased and users should not encounter jumbo buffer allocation
failure. Previously sk(4) tried to allocate physically contiguous
memory, 3388KB for 256 Rx descriptors. Sometimes that amount of
contiguous memory region could not be available for running systems
which in turn resulted in failure of loading the driver.
yongari [Wed, 20 Aug 2008 05:12:30 +0000 (05:12 +0000)]
MFC r176859:
Nuke local jumbo allocator and switch to use of UMA backed page
allocator for jumbo frame. Also remove unneeded jlist lock which
is no longer required to protect jumbo buffers.
With these changes jumbo frame performance of nfe(4) was slightly
increased and users should not encounter jumbo buffer allocation
failure anymore.
yongari [Wed, 20 Aug 2008 04:46:46 +0000 (04:46 +0000)]
MFC r181619:
Restore link state handling which was broken in rev 1.69.
Also report current link state while auto-negotiation is in
progress.
With this change link loss should be reported within a second
and drivers that rely on link state should work.
emaste [Tue, 19 Aug 2008 19:31:58 +0000 (19:31 +0000)]
Update locking table, based on changes in r173444:
- Have SPIN / want SPIN adds the "Recursion is defined per lock" footnote.
- Have sx / want Slp & have sx / want rw changed from no to ok.
kib [Tue, 19 Aug 2008 12:36:40 +0000 (12:36 +0000)]
MFC r179175:
Implement the per-open file data for the cdev.
The td_fpop member of the struct thread is appended to the end, and cleared
in the thread allocator to keep struct thread KBI-compatible on RELENG_7.
MFC r181635:
Remove unnecessary locking around pointer fetch.
kmacy [Tue, 19 Aug 2008 01:16:12 +0000 (01:16 +0000)]
In anticipation of MFCing physically contiguous jumbo frames MFC r177921:
Reintroduce UMA_SLAB_KMAP; however, change its spelling to
UMA_SLAB_KERNEL for consistency with its sibling UMA_SLAB_KMEM.
(UMA_SLAB_KMAP met its original demise in revision 1.30 of
vm/uma_core.c.) UMA_SLAB_KERNEL is now required by the jumbo frame
allocators. Without it, UMA cannot correctly return pages from the
jumbo frame zones to the VM system because it resets the pages' object
field to NULL instead of the kernel object. In more detail, the jumbo
frame zones are created with the option UMA_ZONE_REFCNT. This causes
UMA to overwrite the pages' object field with the address of the slab.
However, when UMA wants to release these pages, it doesn't know how to
restore the object field, so it sets it to NULL. This change teaches
UMA how to reset the object field to the kernel object.
Fix a regression introduced in r179289 splitting up ip6_savecontrol()
into v4-only vs. v6-only inp_flags processing.
When ip6_savecontrol_v4() is called from ip6_savecontrol() we
were not passing back the **mp thus the information will be missing
in userland.
Istead of going with a *** as suggested in the PR we are returning
**mp now and passing in the v4only flag as a pointer argument.
Introduce and use rwlocks throughout the inpcbinfo and inpcb infrastructure,
and protocols that depend on that infrastructure, including UDP, TCP, and
IP raw sockets. Significant parts of this work were reviewed by Bjoern Zeeb,
and tested by Paul Saab, Kris Keneway, and George Neville-Neil, whose
contributions to this work are greatly appreciated.
Tested by: ps, kris, gnn, Mike Tancsa <mike at sentex dot net>
Reviewed by: bz, des
sam [Mon, 18 Aug 2008 01:20:39 +0000 (01:20 +0000)]
MFC r179467
5416 and similar chips grew another region in the pci clock domain
where register accesses do not pass through the byte-lane hardware;
extend the register op macros to deal with this
yar [Sat, 16 Aug 2008 19:17:36 +0000 (19:17 +0000)]
MFC r173217,176789,176792-176793,176839,176842
Don't forget to set MAKEFLAGS in the childs' environment
from the .MAKEFLAGS global variable even if it's empty or
unset. This means setting MAKEFLAGS to just an empty string
in the latter case.
The non-POSIX environment variable MAKE was superseded
by MAKEFLAGS ages ago, so don't mention it in comments.
Update the manpage accordingly and make the whole description of
MAKEFLAGS and .MAKEFLAGS more consistent as this change indeed
brings more consistency into the reliable behaviour of make(1).
Give more details in the manpage on the following topics:
o How global, command-line, and environment variables relate.
o What peculiarities the -f option has WRT ${MAKEFLAGS}.
(.Dd in the manpage is already beyond the date of those changes
in HEAD.)
dwmalone [Sat, 16 Aug 2008 11:48:10 +0000 (11:48 +0000)]
MFC:
Add a new ioctl for changing the read filter (BIOCSETFNR). This is
just like BIOCSETF but it doesn't drop all the packets buffered on
the discriptor and reset the statistics.
Also, when setting the write filter, don't drop packets waiting to
be read or reset the statistics.
jhb [Fri, 15 Aug 2008 20:16:21 +0000 (20:16 +0000)]
MFC: If the kernel fails to allocate resources for the initial value of a
PCI BAR, then zero the BAR and clear the resource list entry so that a
new resource will be allocated by the device driver.
kib [Fri, 15 Aug 2008 09:08:35 +0000 (09:08 +0000)]
MFC r177535 by peter:
(Micro)optimization of cpu_switch for amd64.
Because r173004 (pure kernel threads) is not MFCed to stable/7, I use
P_KTHREAD flag from curthread->td_proc->p_flag instead of TDP_KTHREAD
flag from curthread->td_pflags to test whether the fs/gs bases need to
be restored [1].
No objections for MFC from: peter
Suggested by: jhb [1]
MFC r180992:
Bring back the save/restore of the %ds, %es, %fs and %gs registers for
the 32bit images on amd64.
The end result is almost complete syncronization of the
amd64/amd64/cpu_switch.S between head and stable/7, besides TDP_KTHREAD
difference.
edwin [Fri, 15 Aug 2008 01:12:28 +0000 (01:12 +0000)]
MFC of r180208, r181413, r181418, r181421, r181424
Set magic fbsd:nokeywords property
Remove Theory, which isn't part of the zoneinfo module but came out
of /head/usr.sbin/zic (and isn't installed from there neither).
MFC of tzdata2008c
- Africa/Morocco will have DST in 2008.
- Asia/Choibalsan should be GMT+08:00.
- Asia/Pakistan will have DST in 2008.
MFC of tzdata2008d
- Mauritius will have a DST experiment between 2008-11-01 and 2009-03-31.
- Add/Fix historical data for C-Eur, the SovietZone, Germany,
Bahamas, San Luis.
- Add information about West Para (America/Santarem)
- America/Eirunepe and America/Rio_Branco go to UTC-4
MFC on tzdata2008e:
- Fix dates in 2008/2009 for Africa/Mauritius.
- Leap second notification for the end of 2008.
edwin [Thu, 14 Aug 2008 01:47:39 +0000 (01:47 +0000)]
MFC of r181352
Update the units library file.
- Merge changes from NetBSD and OpenBSD.
- Add the Euro as a primitive unit, add old converted currency and
pegged currency (Obtained from Wikipedia)
- Rename "dollar" to "usdollar" as primitive unit, remove non-pegged
currency and add pegged currency (Obtained from Wikipedia)
- Updated the accuracy of a lot of constants (Obtained from Wikipedia)
peter [Thu, 14 Aug 2008 01:40:12 +0000 (01:40 +0000)]
Hoist mergeinfo for sys/powerpc/include/atomic.h up to sys.
Note that some of the changes that were mfc'ed to powerpc actually affect
other platforms. This hoisting brings those changes to the others.
This adds atomic_fetchadd_long to the rest, and adds
atomic_readandclear_ptr to ia64. While I have not compile tested this, it
looks harmless.
peter [Wed, 13 Aug 2008 19:46:51 +0000 (19:46 +0000)]
Revert the well meaning, but broken rev 181692. For example, sys/nlm has
had several "all revs" merges. If this is exported up to the root of sys
as-is, then it records that 'all revs' of head have been merged for the
entire sys tree, which they have not.
Work is in progress to sanitize the current state and prevent it from
happening again.
kib [Wed, 13 Aug 2008 12:40:23 +0000 (12:40 +0000)]
MFC r181345:
User may do "mount -o snapshot ...", that causes new FFS mount to be
performed with snapshot option, while the mp->mnt_opt is NULL.
Protect against NULL pointer dereference.
MFC r181528:
Revert r181345.
Move the NULL pointer check to the vfs_deleteopt() function.
ed [Tue, 12 Aug 2008 08:54:43 +0000 (08:54 +0000)]
MFC of SVN r181466:
Delete unused files in the window(1) directory that contain a colon.
During the import of the 4.4BSD Lite sources, four files got added to
the repository called :tt, :tty, :var and :ww. They seem to contain some
kind of debug information. These files aren't used/installed anywhere.
Unfortunately the colons in the filenames prevents us from checking out
the source tree on file systems that don't support colons (such as FAT).
Just remove these unneeded files to keep SVN happy.