]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoRestore link state handling which was broken in rev 1.69.
yongari [Tue, 12 Aug 2008 00:57:39 +0000 (00:57 +0000)]
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.

Reported by: Pete French < petefrench at ticketswitch dot com >
Tested by: Pete French < petefrench at ticketswitch dot com >
MFC after: 1 week

16 years agoRemove 'cr' at the end of line.
yongari [Tue, 12 Aug 2008 00:55:03 +0000 (00:55 +0000)]
Remove 'cr' at the end of line.

16 years agoRemove whitespace at the end of line.
yongari [Tue, 12 Aug 2008 00:52:10 +0000 (00:52 +0000)]
Remove whitespace at the end of line.

16 years agoRemove cxgb private lro implementation and switch to using system implementation.
kmacy [Tue, 12 Aug 2008 00:27:32 +0000 (00:27 +0000)]
Remove cxgb private lro implementation and switch to using system implementation.

Obtained from: Chelsio Inc.
MFC after: 1 week

16 years agoSuggections from bde@
ache [Mon, 11 Aug 2008 23:24:42 +0000 (23:24 +0000)]
Suggections from bde@
1) Split too long source lines
2) Portable code should not assume that null pointer == all-bits-0,
so back out prev. calloc() change.

Submitted by:   bde

16 years agoVendor fix for PHY problem.
kmacy [Mon, 11 Aug 2008 23:01:34 +0000 (23:01 +0000)]
Vendor fix for PHY problem.

Obtained from: Chelsio Inc.
MFC after: 3 days

16 years agoDecode some more "exotic" instructions including: fxsave, fxrstor, ldmxcsr,
jhb [Mon, 11 Aug 2008 20:19:42 +0000 (20:19 +0000)]
Decode some more "exotic" instructions including: fxsave, fxrstor, ldmxcsr,
stmxcsr, clflush, lfence, mfence, sfence, syscall, sysret, sysenter,
sysexit, pause, monitor, mwait, and swapgs (amd64 only).

MFC after: 1 week

16 years agoMake sure we check the preselection masks present for all audit pipes.
csjp [Mon, 11 Aug 2008 20:14:56 +0000 (20:14 +0000)]
Make sure we check the preselection masks present for all audit pipes.
It is possible that the audit pipe(s) have different preselection configs
then the global preselection mask.

Spotted by: Vincenzo Iozzo
MFC after: 2 weeks

16 years agoMFamd64: Decode "cmov*" instructions.
jhb [Mon, 11 Aug 2008 20:10:52 +0000 (20:10 +0000)]
MFamd64: Decode "cmov*" instructions.

MFC after: 1 week

16 years agoRework Dallas Semiconductor RTC support.
raj [Mon, 11 Aug 2008 19:33:58 +0000 (19:33 +0000)]
Rework Dallas Semiconductor RTC support.

- Extend the DS1339 driver to recognize more chips in the family:
  DS1337, DS1338, DS1339 are now supported
- Provide run-time chip detection

Reviewed, tested by: stas
Obtained from: Piotr Ziecik kosmo ! semihalf dot com

16 years agoRename ds1339 -> ds133x to better fit the upcoming driver extensions.
raj [Mon, 11 Aug 2008 19:26:55 +0000 (19:26 +0000)]
Rename ds1339 -> ds133x to better fit the upcoming driver extensions.

16 years agoCorrect a few minor markup and grammar issues.
brueffer [Mon, 11 Aug 2008 08:42:31 +0000 (08:42 +0000)]
Correct a few minor markup and grammar issues.

16 years ago- Convert sc_sessions_mtx mutex to a rwlock, so in the fast path
pjd [Mon, 11 Aug 2008 08:41:08 +0000 (08:41 +0000)]
- Convert sc_sessions_mtx mutex to a rwlock, so in the fast path
  (glxsb_process()) we don't block others when looking for our session.
- Simplify the loop responsible for freeing sessions on detach.
- No need to drop a lock around malloc(M_NOWAIT).
- Treat ses_used as boolean.
- Avoid gotos where possible.
- Various style(9) fixes.

Reviewed by: philip, Patrick Lamaiziere <patfbsd@davenulle.org>

16 years agoAdd upgt(4) to the list of supported network interface.
weongyo [Mon, 11 Aug 2008 04:58:06 +0000 (04:58 +0000)]
Add upgt(4) to the list of supported network interface.

16 years agoAdd an entry for the upgt(4) module.
weongyo [Mon, 11 Aug 2008 04:54:43 +0000 (04:54 +0000)]
Add an entry for the upgt(4) module.

16 years agoConnect upgt.4 to the build.
weongyo [Mon, 11 Aug 2008 04:48:34 +0000 (04:48 +0000)]
Connect upgt.4 to the build.

16 years agoConnect upgt(4) to the build.
weongyo [Mon, 11 Aug 2008 04:46:14 +0000 (04:46 +0000)]
Connect upgt(4) to the build.

16 years agoAdd Conexant/Intersil PrismGT SoftMAC wireless USB driver - upgt(4).
weongyo [Mon, 11 Aug 2008 03:57:31 +0000 (03:57 +0000)]
Add Conexant/Intersil PrismGT SoftMAC wireless USB driver - upgt(4).

This driver supports GW3887 based chipsets and works on
x86/powerpc/sparc64.  You need upgtfw kernel module before loading
upgt(4).  Please see the manpage.

Obtained from: OpenBSD

16 years agoUse device_set_desc() instead of device_set_desc_copy() as we don't
yongari [Mon, 11 Aug 2008 01:49:46 +0000 (01:49 +0000)]
Use device_set_desc() instead of device_set_desc_copy() as we don't
manipulate the verbose description of a device.

16 years agoPartial back out r180952.
yongari [Mon, 11 Aug 2008 01:45:05 +0000 (01:45 +0000)]
Partial back out r180952.
 pci_get_vendor() and pci_get_device() don't do configuration space
 accessses so cahcing them makes no sense.
Pointed out by: jhb, imp, des

16 years agoFix up test suite so it works again with the libarchive 1.x API.
kientzle [Mon, 11 Aug 2008 01:19:36 +0000 (01:19 +0000)]
Fix up test suite so it works again with the libarchive 1.x API.
In particular, FreeBSD 6 still uses the libarchive 1.x API and
this correction will permit MFCing new libarchive features back
to FreeBSD 6.

16 years agoCorrect test_tar_large so it works correctly with the libarchive 1.x API.
kientzle [Sun, 10 Aug 2008 21:14:26 +0000 (21:14 +0000)]
Correct test_tar_large so it works correctly with the libarchive 1.x API.

16 years agoDoc updates for changes in the default values of
das [Sun, 10 Aug 2008 19:35:09 +0000 (19:35 +0000)]
Doc updates for changes in the default values of
-ffancy-math-387 and -mmath-errno.

16 years agoMake -fno-math-errno the default. Our libm doesn't support the SysV
das [Sun, 10 Aug 2008 19:33:35 +0000 (19:33 +0000)]
Make -fno-math-errno the default. Our libm doesn't support the SysV
mistake of setting errno, and never has.  This will need to be fixed
upstream in a more generic way, but the changes are somewhat more
involved.

16 years agoMake -mfancy-math-387 the default on FreeBSD, as it is on most other
das [Sun, 10 Aug 2008 19:02:57 +0000 (19:02 +0000)]
Make -mfancy-math-387 the default on FreeBSD, as it is on most other
operating systems. Previously, gcc would inhibit the generation of
fsqrt, fsin, and several other floating point instructions, for the
benefit of the old in-kernel math emulator, which was removed over 5
years ago.

16 years agoImprove periodic/security/550.ipfwlimit a bit:
antoine [Sun, 10 Aug 2008 18:11:24 +0000 (18:11 +0000)]
Improve periodic/security/550.ipfwlimit a bit:
- don't run it if net.inet.ip.fw.verbose = 0 as it is pointless
- handle rules without logging limit correctly [1]
(those rules show up without logamount in "ipfw -a list")

PR: conf/126060 [1]
MFC after: 1 month

16 years agoMinor typo fix, caught while skimming through the file.
keramida [Sun, 10 Aug 2008 15:10:39 +0000 (15:10 +0000)]
Minor typo fix, caught while skimming through the file.

16 years agoRevert r181345.
kib [Sun, 10 Aug 2008 12:15:36 +0000 (12:15 +0000)]
Revert r181345.
Move the NULL pointer check to the vfs_deleteopt() function.

Discussed with: rodrigc
MFC after: 3 days

16 years agoAll cosmetic.
ache [Sun, 10 Aug 2008 11:31:56 +0000 (11:31 +0000)]
All cosmetic.
1) Rename RANDOM_MAX to RANDOM_MAX_PLUS1 to not confuse with random()'s max
2) Use calloc() instead of zeroing fields explicitly
3) "too many lines" -> "too many delimiters" for err()

16 years agoMove sis to sys/dev/sis for consistency.
imp [Sun, 10 Aug 2008 10:00:14 +0000 (10:00 +0000)]
Move sis to sys/dev/sis for consistency.

16 years agoRead the config space of the child, not the bridge, to determine when
imp [Sun, 10 Aug 2008 09:55:14 +0000 (09:55 +0000)]
Read the config space of the child, not the bridge, to determine when
the child is out of reset... <blush>

16 years agoMove the xl driver form sys/pci to sys/dev/xl for consistency.
imp [Sun, 10 Aug 2008 09:45:52 +0000 (09:45 +0000)]
Move the xl driver form sys/pci to sys/dev/xl for consistency.

16 years agoExplain why two apparently-identical archive_read_data() calls
kientzle [Sun, 10 Aug 2008 03:13:42 +0000 (03:13 +0000)]
Explain why two apparently-identical archive_read_data() calls
really should have different return values.

16 years agoMfP4: Joerg Sonnenberger's fixes to make 'ar' and 'pax' writers
kientzle [Sun, 10 Aug 2008 02:06:28 +0000 (02:06 +0000)]
MfP4: Joerg Sonnenberger's fixes to make 'ar' and 'pax' writers
robust against multiple calls to their destroy() functions.

16 years agoAdd quirks for making uhid(4) ignore the Apple iPhone and iPhone 3G.
brix [Sat, 9 Aug 2008 22:25:13 +0000 (22:25 +0000)]
Add quirks for making uhid(4) ignore the Apple iPhone and iPhone 3G.

Reviewed by: sam
Approved by: sam
MFC after: 3 days

16 years agofix syntax
sam [Sat, 9 Aug 2008 21:51:57 +0000 (21:51 +0000)]
fix syntax

16 years agoSimplify session selection/allocation.
pjd [Sat, 9 Aug 2008 20:01:01 +0000 (20:01 +0000)]
Simplify session selection/allocation.

16 years ago- Fix freeing session on newsession failure.
pjd [Sat, 9 Aug 2008 19:48:59 +0000 (19:48 +0000)]
- Fix freeing session on newsession failure.
- Update copyright years.

16 years agoImplify sessions freeing loop.
pjd [Sat, 9 Aug 2008 19:47:19 +0000 (19:47 +0000)]
Implify sessions freeing loop.

16 years agoWe don't have to drop a lock around malloc(M_NOWAIT).
pjd [Sat, 9 Aug 2008 19:45:43 +0000 (19:45 +0000)]
We don't have to drop a lock around malloc(M_NOWAIT).

16 years agoWhen freeing session, restore its ID after zeroing memory.
pjd [Sat, 9 Aug 2008 19:43:44 +0000 (19:43 +0000)]
When freeing session, restore its ID after zeroing memory.

Bug tracked down by: Patrick Lamaiziere <patfbsd@davenulle.org>

16 years agoSessions in-use are at the end of the queue, so use TAILQ_FOREACH_REVERSE()
pjd [Sat, 9 Aug 2008 19:42:37 +0000 (19:42 +0000)]
Sessions in-use are at the end of the queue, so use TAILQ_FOREACH_REVERSE()
when looking for them.

Idea from: Patrick Lamaiziere <patfbsd@davenulle.org>

16 years agofix typo
imp [Sat, 9 Aug 2008 17:29:36 +0000 (17:29 +0000)]
fix typo

Submitted by: N.J. Mann

16 years agoClean up of dead code and possible unassigned variable usage.
ivoras [Sat, 9 Aug 2008 16:47:30 +0000 (16:47 +0000)]
Clean up of dead code and possible unassigned variable usage.

Found by: LLVM/Clang Static Checker
Approved by: gnn (mentor)

16 years agoIt turns out that checking the first DWORD register is more reliable
imp [Sat, 9 Aug 2008 15:55:10 +0000 (15:55 +0000)]
It turns out that checking the first DWORD register is more reliable
on a variety of cards.  Adjust the comments accordingly to match the
code.  Even if the vendor chose 0xffff for the device ID, the vendor
ID can't be 0xffff, so the test is still valid from a standards
perspective.

16 years agoTypo: glxsb(4) was imported to FreeBSD 8.0, not 7.0.
philip [Sat, 9 Aug 2008 15:09:51 +0000 (15:09 +0000)]
Typo: glxsb(4) was imported to FreeBSD 8.0, not 7.0.

Spotted by: kib

16 years agoAdd the glxsb(4) manual page.
philip [Sat, 9 Aug 2008 14:54:19 +0000 (14:54 +0000)]
Add the glxsb(4) manual page.

Submitted by: Patrick Lamaizière <patfbsd -at- davenulle.org>
MFC after: 1 week

16 years agoAdd glxsb(4) driver for the Security Block in AMD Geode LX processors (as
philip [Sat, 9 Aug 2008 14:52:31 +0000 (14:52 +0000)]
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).

TODO:

    o Implement rndtest(4) support
    o Performance enhancements

Submitted by: Patrick Lamaizière <patfbsd -at- davenulle.org>
Reviewed by: jhb, sam
MFC after: 1 week

16 years agoDelete unused files in the window(1) directory that contain a colon.
ed [Sat, 9 Aug 2008 14:44:04 +0000 (14:44 +0000)]
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.

Reported by: Rohit Tripathi <rohit trip gmail com>
MFC after: 3 days

16 years agoRemove unneeded D_NEEDGIANT from /dev/fd/{0,1,2}.
ed [Sat, 9 Aug 2008 12:42:12 +0000 (12:42 +0000)]
Remove unneeded D_NEEDGIANT from /dev/fd/{0,1,2}.

There is no reason the fdopen() routine needs Giant. It only sets
curthread->td_dupfd, based on the device unit number of the cdev.

I guess we won't get massive performance improvements here, but still, I
assume we eventually want to get rid of Giant.

16 years agoNit
des [Sat, 9 Aug 2008 11:28:57 +0000 (11:28 +0000)]
Nit

16 years agoAdd sbuf_new_auto as a shortcut for the very common case of creating a
des [Sat, 9 Aug 2008 11:14:05 +0000 (11:14 +0000)]
Add sbuf_new_auto as a shortcut for the very common case of creating a
completely dynamic sbuf.

Obtained from: Varnish
MFC after: 2 weeks

16 years agoSwitch to simplified BSD license (with phk's approval), plus whitespace
des [Sat, 9 Aug 2008 10:26:21 +0000 (10:26 +0000)]
Switch to simplified BSD license (with phk's approval), plus whitespace
and style(9) cleanup.

16 years agoAdd late customize hook
phk [Sat, 9 Aug 2008 09:37:44 +0000 (09:37 +0000)]
Add late customize hook

Submitted by:  Patrick M. Hausen
Sat on for far too long: phk

16 years agoAdd -i option to supress image building.
phk [Sat, 9 Aug 2008 09:27:54 +0000 (09:27 +0000)]
Add -i option to supress image building.

Submitted by: keramida

16 years agoTrack /etc/ttys change to uart(4)
phk [Sat, 9 Aug 2008 09:27:06 +0000 (09:27 +0000)]
Track /etc/ttys change to uart(4)

16 years agoAfter some intial testing, there are even slower cards than the ones
imp [Sat, 9 Aug 2008 07:41:18 +0000 (07:41 +0000)]
After some intial testing, there are even slower cards than the ones
that I have.  Wait up to 1.1s for the card to become ready.  Document
what the standards say, and use that to justify the behavior in the
code: PCI standard says that a card must respond to configuration
cycles within 2^25 cycles after reset goes high, which is
approximately 1s.  Therefore, give cards a little break and wait for
up to 1.1s for VENDOR to become valid.  Only look at the vendor part
of the ID, since only it can't be 0xffff (although in practice
vendor/device will always be != 0xfffffffff).  Include detailed
pointers to standards so epople understand why we're doing what we're
doing and why it just might be OK.  Make it clear in the timeout
message that it is just a warning, sinc we try to soldier on as best
we can anyway.

This should eliminate an error message that r181453 produced on
certain Atheros cards.

16 years agoOnly symlink booted kernel directory to /boot/kernel if user has explicitly
obrien [Sat, 9 Aug 2008 06:35:19 +0000 (06:35 +0000)]
Only symlink booted kernel directory to /boot/kernel if user has explicitly
requested it.  This is too dangerous to just do behind the admin's back.

16 years agoIntel describes the behavior of their processors as "undefined" if two or
alc [Sat, 9 Aug 2008 05:46:13 +0000 (05:46 +0000)]
Intel describes the behavior of their processors as "undefined" if two or
more mappings to the same physical page have different memory types, i.e.,
PAT settings.  Consequently, if pmap_change_attr() is applied to a virtual
address range within the kernel map, then the corresponding ranges of the
direct map also need to be changed.  Enhance pmap_change_attr() to handle
this case automatically.

Add a comment describing what pmap_change_attr() does.

Discussed with: jhb

16 years agoVerify that the WPA flags set are actually compatible with the
imp [Sat, 9 Aug 2008 05:46:01 +0000 (05:46 +0000)]
Verify that the WPA flags set are actually compatible with the
driver's set of valid flags.  Otherwise, wpa_supplicant wouldn't
report an error for old wi cards that can't do WPA.

Reviewed by: sam@

16 years agorecognize WPS ie's
sam [Sat, 9 Aug 2008 05:37:22 +0000 (05:37 +0000)]
recognize WPS ie's

Submitted by: "Chuck Tuffli" <chuck@tuffli.net>
MFC after: 1 week

16 years agoRather than waiting a fixed amount of time, which might not be enough
imp [Sat, 9 Aug 2008 04:08:36 +0000 (04:08 +0000)]
Rather than waiting a fixed amount of time, which might not be enough
and also holds things up, check every 20ms to see if we can read the
vendor of device 0.0.  It will be 0xffffffff until the card is out of
reset.  Always wait at least 20ms, for safety.

I think this is a better fix to the reset problem.  However, I did it
as a separate commit in case something bad happens, people can roll
back to the commit before this one to see if that gives them reliable
behavior.  I don't have FreeBSD up on enough machines to do exhaustive
testing on all known bridges...

16 years agoChange -1 to 0xfffffffful since the interface returns uint32_t.
imp [Sat, 9 Aug 2008 03:54:12 +0000 (03:54 +0000)]
Change -1 to 0xfffffffful since the interface returns uint32_t.

16 years agoWhile most bridges can bring a card out of reset in 20ms, there are
imp [Sat, 9 Aug 2008 03:37:12 +0000 (03:37 +0000)]
While most bridges can bring a card out of reset in 20ms, there are
some bridge + card combinations that take longer for reasons unknown.
Adjust the timeout to be 100ms on all !RICOH bridges, but leave RICOH
at 400ms.  The 400ms is "lore" from other open source projects, and
I've never see my ricoh bridge chips take this long.  Maybe it is the
same thing?  Maybe a bit should be read instead of a hard-wired pause?

After this adjustment, a few cards that I'd insert and get only:
cbb0: card_power: 3V
cbb0: card_power: 0V
with full debugging enabled would actually try to attach.

Reported by: sam@ (I think)
MFC after: 3 days

16 years agoOnly symlink booted kernel directory to /boot/kernel if user has explicitly
obrien [Sat, 9 Aug 2008 01:19:00 +0000 (01:19 +0000)]
Only symlink booted kernel directory to /boot/kernel if user has explicitly
requested it.  This is too dangerous to just do behind the admin's back.

16 years agoAdd prototype defination for setfib(2) to sys/socket.h.
delphij [Fri, 8 Aug 2008 22:40:04 +0000 (22:40 +0000)]
Add prototype defination for setfib(2) to sys/socket.h.

16 years ago- Bump __FreeBSD_version for cpuctl(4) added.
stas [Fri, 8 Aug 2008 21:36:49 +0000 (21:36 +0000)]
- Bump __FreeBSD_version for cpuctl(4) added.

Approved by: kib

16 years agoRemove variables which are assigned values and never used thereafter.
cperciva [Fri, 8 Aug 2008 20:42:42 +0000 (20:42 +0000)]
Remove variables which are assigned values and never used thereafter.

Found by: LLVM/Clang Static Checker
Approved by: jasone

16 years ago- Initialize the vm86 structure to a known-good state. Specifically, always
jhb [Fri, 8 Aug 2008 19:41:20 +0000 (19:41 +0000)]
- Initialize the vm86 structure to a known-good state.  Specifically, always
  set the %eflags used during a BIOS call via BTX to 0x202.  Previously
  the flags field was uninitialized garbage, and thus it was "random" if
  interrupts were enabled or not during BIOS calls.
- Use constants from <machine/psl.h> for fields in %eflags.

MFC after: 3 days

16 years agoFix the hangs reported with the real mode BTX:
jhb [Fri, 8 Aug 2008 19:39:11 +0000 (19:39 +0000)]
Fix the hangs reported with the real mode BTX:
- I had errantly assumed that all user requests should run with interrupts
  enabled.  User requests for software interrupts, however, need to disable
  interrupts (and tracing) just like hardware interrupts.
- Disable alignment checking when emulating a hardware interrupt as well
  (based on the description of the real mode operation of the 'INT'
  instruction in the IA-32 manuals).
- Use constants for fields in %eflags.

Tested by: bz
MFC after: 3 days

16 years agoAdd a "glimpse" target to the kernel Makefile.
philip [Fri, 8 Aug 2008 18:00:33 +0000 (18:00 +0000)]
Add a "glimpse" target to the kernel Makefile.

Glimpse is a powerful "grep on an index".
Especially addictive on slow laptop hard disks.

MFC after: 2 days

16 years ago- Add cpuctl(4) pseudo-device driver to provide access to some low-level
stas [Fri, 8 Aug 2008 16:26:53 +0000 (16:26 +0000)]
- Add cpuctl(4) pseudo-device driver to provide access to some low-level
  features of CPUs like reading/writing machine-specific registers,
  retrieving cpuid data, and updating microcode.
- Add cpucontrol(8) utility, that provides userland access to
  the features of cpuctl(4).
- Add subsequent manpages.

The cpuctl(4) device operates as follows. The pseudo-device node cpuctlX
is created for each cpu present in the systems. The pseudo-device minor
number corresponds to the cpu number in the system. The cpuctl(4) pseudo-
device allows a number of ioctl to be preformed, namely RDMSR/WRMSR/CPUID
and UPDATE. The first pair alows the caller to read/write machine-specific
registers from the correspondent CPU. cpuid data could be retrieved using
the CPUID call, and microcode updates are applied via UPDATE.

The permissions are inforced based on the pseudo-device file permissions.
RDMSR/CPUID will be allowed when the caller has read access to the device
node, while WRMSR/UPDATE will be granted only when the node is opened
for writing. There're also a number of priv(9) checks.

The cpucontrol(8) utility is intened to provide userland access to
the cpuctl(4) device features. The utility also allows one to apply
cpu microcode updates.

Currently only Intel and AMD cpus are supported and were tested.

Approved by: kib
Reviewed by: rpaulo, cokane, Peter Jeremy
MFC after: 1 month

16 years agoRemove D_NEEDGIANT from io(4).
ed [Fri, 8 Aug 2008 13:43:56 +0000 (13:43 +0000)]
Remove D_NEEDGIANT from io(4).

There is no need to mark this device node to use Giant. The only
architectures that use io(4) (i386 and amd64) only change a flag in
td->td_frame, which is only accessed by curthread.

Apart from this change, I think some fishy things may happen when using
/dev/io in multithreaded applications. I haven't tested, but looking at
the code, the flag doesn't get cleared when close() is called from
another thread, but this may not be this important.

I'm not removing D_NEEDGIANT from mem(4), because this driver isn't
Giant safe at all (it calls GIANT_REQUIRED).

16 years agoAdd /usr/share/man/whatis, /var/db/locate.database, and /var/log to the
cperciva [Fri, 8 Aug 2008 10:36:16 +0000 (10:36 +0000)]
Add /usr/share/man/whatis, /var/db/locate.database, and /var/log to the
list of paths which `freebsd-update IDS` should ignore by default.

16 years agoReplace description on how to do CVS imports on this module with a
edwin [Fri, 8 Aug 2008 04:37:43 +0000 (04:37 +0000)]
Replace description on how to do CVS imports on this module with a
description on how to do SVN imports on this module.

Approved by: bde (implicit)

16 years agoIn `freebsd-update IDS`, strip out file flags before we look for
cperciva [Fri, 8 Aug 2008 04:34:00 +0000 (04:34 +0000)]
In `freebsd-update IDS`, strip out file flags before we look for
non-matching index lines.  This fixes a bug where bogus warnings would
be printed file has the wrong file flags AND has been updated by
FreeBSD Update.

Reported by: Royce Williams

16 years agoMFV on tzdata2008e:
edwin [Fri, 8 Aug 2008 04:29:39 +0000 (04:29 +0000)]
MFV on tzdata2008e:

- Fix dates in 2008/2009 for Africa/Mauritius.
- Leap second notification for the end of 2008.

Approved by: bde (mentor, implicit), des
MFC after: 1 week

16 years agoMFV of tzdata2008d
edwin [Fri, 8 Aug 2008 04:20:36 +0000 (04:20 +0000)]
MFV 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

Approved by: bde (mentor, implicit), des
MFC after: 1 week

16 years agoMFV of tzdata2008c
edwin [Fri, 8 Aug 2008 03:48:10 +0000 (03:48 +0000)]
MFV of tzdata2008c

- Africa/Morocco will have DST in 2008.
- Asia/Choibalsan should be GMT+08:00.
- Asia/Pakistan will have DST in 2008.

Also set all the svn:eol-style properties to native.

Approved by: bde (mentor, implicit), des
MFC after: 1 week

16 years agoRevert the change in leapseconds for 31 december 2008, so I can
edwin [Fri, 8 Aug 2008 03:18:30 +0000 (03:18 +0000)]
Revert the change in leapseconds for 31 december 2008, so I can
properly bootstrap the merge history on this module.

Approved by: bde (implicit)

16 years agoCleanup (cont)
edwin [Fri, 8 Aug 2008 02:55:34 +0000 (02:55 +0000)]
Cleanup (cont)

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).

Approved by: bde (implicit)
MFC after: 1 week

16 years ago1) Fix longstanding math bug with denominator > 1 (wrong probability).
ache [Fri, 8 Aug 2008 02:46:47 +0000 (02:46 +0000)]
1) Fix longstanding math bug with denominator > 1 (wrong probability).
Test case:
random -f some_small_file 10000
(in most cases must be no output)
2) Prevent number of lines > RANDOM_MAX (overflow or nothing may be
choosed) with EFBIG err()
3) After line is found, terminate list loop for -U case too,
since nothing to do in the rest of the loop left.

16 years agoI was confused a bit by the wrong construction with RAND_MAX
ache [Fri, 8 Aug 2008 01:42:17 +0000 (01:42 +0000)]
I was confused a bit by the wrong construction with RAND_MAX
used in randomize_fd.c.
Although the max value is the same currently, RAND_MAX is for rand(),
not for random().
So move RANDOM_MAX const to the common file now, make it UL and
use in randomize_fd.c too.
(in any case its old value was 1 less then must be, as noted in
the prev. commit)

16 years ago1) Replace hardcoded RANDOM_MAX macro with wrong (1 less than must be)
ache [Fri, 8 Aug 2008 01:02:30 +0000 (01:02 +0000)]
1) Replace hardcoded RANDOM_MAX macro with wrong (1 less than must be)
value with ((double)RAND_MAX + 1)
2) For exit code increase valid denominator upper range from 255 to 256
since returned value is [0 .. denom - 1]

16 years agoRemove some unused variables.
das [Fri, 8 Aug 2008 00:21:27 +0000 (00:21 +0000)]
Remove some unused variables.

Reported by: Intel C Compiler

16 years agoremove the empty "datfiles" directory.
edwin [Fri, 8 Aug 2008 00:18:22 +0000 (00:18 +0000)]
remove the empty "datfiles" directory.

Approved by: bde (mentor, implicit), des

16 years agoIn the line
das [Fri, 8 Aug 2008 00:15:16 +0000 (00:15 +0000)]
In the line
   #pragma STDC CX_LIMITED_RANGE   ON
the "ON" needs to be in caps. gcc doesn't understand this pragma
anyway and assumes it is always on in any case, but icc supports
it and cares about the case.

16 years agoAllow 53C1010 without NVRAM to negotiate Ultra-3.
marius [Thu, 7 Aug 2008 23:41:17 +0000 (23:41 +0000)]
Allow 53C1010 without NVRAM to negotiate Ultra-3.

MFC after: 3 days

16 years ago- Reimplement {d,i}tlb_enter() and {d,i}tlb_va_to_pa() in C. There's
marius [Thu, 7 Aug 2008 22:46:25 +0000 (22:46 +0000)]
- Reimplement {d,i}tlb_enter() and {d,i}tlb_va_to_pa() in C. There's
  no particular reason for them to be implemented in assembler and
  having them in C allows easier extension as well as using more C
  macros and {d,i}tlb_slot_max rather than hard-coding magic (and
  actually spitfire-only) values.
- Fix the compilation of pmap_print_tte().
- Change pmap_print_tlb() to use ldxa() rather than re-rolling it
  inline as well as TLB_DAR_SLOT and {d,i}tlb_slot_max rather than
  hardcoding magic (and actually spitfire-only) values.
- While at it, suffix the above mentioned functions with "_sun4u" to
  underline they're architecture-specific.
- Use __FBSDID and macros instead of magic values in locore.S.
- Remove unused includes and smp_stack in locore.S.

16 years agoUse arc4random_uniform(3)
ache [Thu, 7 Aug 2008 22:22:41 +0000 (22:22 +0000)]
Use arc4random_uniform(3)

16 years agoUse __FreeBSD_version check since it is bootstrap tool
ache [Thu, 7 Aug 2008 21:36:09 +0000 (21:36 +0000)]
Use __FreeBSD_version check since it is bootstrap tool

16 years agoFix a small problem in the comment about departure from NetBSD.
imp [Thu, 7 Aug 2008 21:16:14 +0000 (21:16 +0000)]
Fix a small problem in the comment about departure from NetBSD.
Also, r181392 fixed a small problem with multifunction cards that would
cause the card not to power down when the last driver detached from it.

16 years agoPermit Giant to be passed as the explicit interlock either to
jhb [Thu, 7 Aug 2008 21:00:13 +0000 (21:00 +0000)]
Permit Giant to be passed as the explicit interlock either to
msleep/mtx_sleep or the various cv_*wait*() routines.  Currently, the
"unlock" behavior of PDROP and cv_wait_unlock() with Giant is not
permitted as it is will be confusing since Giant is fully unrecursed and
unlocked during a thread sleep.

This is handy for subsystems which wish to allow unlocked drivers to
continue to use Giant such as CAM, the new TTY layer, and the new USB
stack.  CAM currently uses a hack that I told Scott to use because I
really didn't want to permit this behavior, and the TTY and USB patches
both have various patches to permit this.

MFC after: 2 weeks

16 years agoConvert to new style PC Card front end driver. Add support for the
imp [Thu, 7 Aug 2008 20:55:20 +0000 (20:55 +0000)]
Convert to new style PC Card front end driver.  Add support for the
NEC PC-9801N-J02 and PC-9801N-J02R.  I can't test the former because
it requires resources that conflict with my laptop.  I can't test the
latter because my dog chewed up my -J02R card and it didn't survive
well enough for me to test.

16 years agoAdd NEC PC-9802N-J02 (confirmed) and NEC PC-9202N-J02R (speculative)
imp [Thu, 7 Aug 2008 20:52:54 +0000 (20:52 +0000)]
Add NEC PC-9802N-J02 (confirmed) and NEC PC-9202N-J02R (speculative)
to the list of devices.

16 years agoAdd card_if.h and pccarddevs.h
imp [Thu, 7 Aug 2008 20:51:51 +0000 (20:51 +0000)]
Add card_if.h and pccarddevs.h

16 years agoDocument the new return values for sleepq_abort(), sleepq_broadcast(), and
jhb [Thu, 7 Aug 2008 20:47:01 +0000 (20:47 +0000)]
Document the new return values for sleepq_abort(), sleepq_broadcast(), and
sleepq_signal().

Prodded by: attilio

16 years agoAdd reference to arc4random_uniform(3)
ache [Thu, 7 Aug 2008 20:07:30 +0000 (20:07 +0000)]
Add reference to arc4random_uniform(3)

16 years agoUse arc4random_uniform(3)
ache [Thu, 7 Aug 2008 20:05:51 +0000 (20:05 +0000)]
Use arc4random_uniform(3)

16 years agoUse arc4random_uniform(3)
ache [Thu, 7 Aug 2008 20:02:42 +0000 (20:02 +0000)]
Use arc4random_uniform(3)

Obtained from:  OpenBSD