]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoCorrect parsing of the cpcht ranges property.
Nathan Whitehorn [Thu, 20 Jan 2011 15:02:51 +0000 (15:02 +0000)]
Correct parsing of the cpcht ranges property.

Submitted by: andreast
MFC after: 2 weeks

13 years agoImprove comments.
Michael Tuexen [Thu, 20 Jan 2011 13:53:34 +0000 (13:53 +0000)]
Improve comments.

MFC after: 1 week.

13 years agoAdd another ID for the ZTE MF190 Surf Stick
Nick Hibma [Thu, 20 Jan 2011 13:02:54 +0000 (13:02 +0000)]
Add another ID for the ZTE MF190 Surf Stick

Submitted by: nagilum
MFC after: 1 day

13 years agoMove 'cpu CPU_RMI' to std.xlr, this is common for all XLR cpus.
Jayachandran C. [Thu, 20 Jan 2011 12:45:29 +0000 (12:45 +0000)]
Move 'cpu CPU_RMI' to std.xlr, this is common for all XLR cpus.

13 years agoFix it so we align with new socket API draft for
Randall Stewart [Thu, 20 Jan 2011 12:40:09 +0000 (12:40 +0000)]
Fix it so we align with new socket API draft for
state's in destination (i.e. ACTIVE/INACTIVE/UNCONFIRMED)

MFC after: 1 week

13 years agoOnly enable 11n modes if the chipset suports 11n.
Adrian Chadd [Thu, 20 Jan 2011 09:46:18 +0000 (09:46 +0000)]
Only enable 11n modes if the chipset suports 11n.

Since the AR2427 doesn't allow 802.11n, it shouldn't have them
configured.

13 years agoIn tmpfs_readdir(), normalize handling of the directory entries that
Konstantin Belousov [Thu, 20 Jan 2011 09:39:16 +0000 (09:39 +0000)]
In tmpfs_readdir(), normalize handling of the directory entries that
either overflow the supplied buffer, or cause uiomove fail.
Do not advance cached de when directory entry was not copied out.
Do not return EOF when no entries could be copied due to first entry
too large for supplied buffer, signal EINVAL instead.

Reported by: Beat G?tzi <beat chruetertee ch>
MFC after: 1 week

13 years agoInclude the device ids for the AR2427.
Adrian Chadd [Thu, 20 Jan 2011 09:37:53 +0000 (09:37 +0000)]
Include the device ids for the AR2427.

This is apparently an AR9285 with the 802.11n specific bits disabled.

This code is completely untested; I'm doing this in response to users
who wish to test the functionality out. It's likely as buggy as the
AR9285 support is in FreeBSD at the moment.

13 years agoPush the non-AR5416 related stuff into chipset specific directories.
Adrian Chadd [Thu, 20 Jan 2011 09:03:40 +0000 (09:03 +0000)]
Push the non-AR5416 related stuff into chipset specific directories.

sys/dev/ath/ath_hal/ar5416/ is getting very crowded and further
commits will make it even more crowded. Now is a good time to
shuffle these files out before any more extensive work is done
on them.

Create an ar9003 directory whilst I'm here; ar9003 specific
chipset code will eventually live there.

13 years agoRe-format XLR configuartion files and remove obsolete options.
Jayachandran C. [Thu, 20 Jan 2011 09:01:14 +0000 (09:01 +0000)]
Re-format XLR configuartion files and remove obsolete options.

13 years agoAdd a comment from my local HAL about what is actually going on here
Adrian Chadd [Thu, 20 Jan 2011 08:40:22 +0000 (08:40 +0000)]
Add a comment from my local HAL about what is actually going on here
with these ADC DC Gain/Offset calibrations.

The whole idea is to calibrate a pair of ADCs to compensate for any
differences between them.

The AR5416 returns lots of garbage, so there's no need to do the
calibration there.

The AR9160 returns 0 for secondary ADCs when calibrating 2.4ghz 20mhz
modes. It returns valid data for the secondary ADCs when calibrating
2.4ghz HT/40 and any 5ghz mode.

13 years agoMigrate the sample rate module to the new ath_hal_gettxcompletionrates() API.
Adrian Chadd [Thu, 20 Jan 2011 08:19:23 +0000 (08:19 +0000)]
Migrate the sample rate module to the new ath_hal_gettxcompletionrates() API.

This removes the chipset-dependent TX DMA completion descriptor groveling.
It should now be (more) portable to other, later atheros chipsets when the
time comes.

13 years agoAdd in the public method to access the tx completion rates.
Adrian Chadd [Thu, 20 Jan 2011 08:15:46 +0000 (08:15 +0000)]
Add in the public method to access the tx completion rates.

13 years agoldscript and conf cleanup for MIPS
Jayachandran C. [Thu, 20 Jan 2011 08:15:11 +0000 (08:15 +0000)]
ldscript and conf cleanup for MIPS

- Remove sys/conf/ldscript.mips.64 and sys/conf/ldscript.mips.n32 and use
  ldscript.mips for all ABIs. The default OUTPUT_FORMAT of the toolchain
  is correct.
- Remove LDSCRIPT_NAME entires from XLR n32 and n64 conf files.
- Remove TARGET_BIG_ENDIAN from XLR conf files.
- Fix machine entry in XLRN32

13 years agoFixes in the XLR platform code
Jayachandran C. [Thu, 20 Jan 2011 08:08:19 +0000 (08:08 +0000)]
Fixes in the XLR platform code

- Fix bug in pic.h, assign reg variable, before return.
- In xlr_pci.c, need to ignore the result of mmio read.

13 years agoInclude the initial support for external EEPROMs.
Adrian Chadd [Thu, 20 Jan 2011 07:56:09 +0000 (07:56 +0000)]
Include the initial support for external EEPROMs.

The AR9100 at least doesn't have an external serial EEPROM
attached to the MAC; it instead stores the calibration data
in the normal system flash.

I believe earlier parts can do something similar but I haven't
experienced it first-hand.

This commit introduces an eepromdata pointer into the API but
doesn't at all commit to using it. A future commit will
include the glue needed to allow the AR9100 support code
to use this data pointer as the EEPROM.

13 years agoPort over another EEPROM option from ath9k - AR_EEP_DAC_HPWR_5G
Adrian Chadd [Thu, 20 Jan 2011 07:42:39 +0000 (07:42 +0000)]
Port over another EEPROM option from ath9k - AR_EEP_DAC_HPWR_5G

This will be used by the temperature compensation calibration code
which will shortly make an appearance.

13 years agoAdd another HAL function which waits for a register for a configurable amount.
Adrian Chadd [Thu, 20 Jan 2011 07:03:20 +0000 (07:03 +0000)]
Add another HAL function which waits for a register for a configurable amount.

This will be used by some future code.

13 years agoAdd a new HAL method to retrieve the completion schedule. It sets
Adrian Chadd [Thu, 20 Jan 2011 05:49:15 +0000 (05:49 +0000)]
Add a new HAL method to retrieve the completion schedule. It sets
the completion schedule from the hardware and returns AH_TRUE if
the hardware supports multi-rate retries (AR5212 and above); and
returns AH_FALSE if the hardware doesn't support multi-rate retries.

The sample rate module directly reads the TX completion descriptor
and extracts the TX schedule information from that. It will be
updated in a future commit to instead use this method to determine
the completion schedule.

13 years agoFix build by changing format for size_t to %jd
Oleksandr Tymoshenko [Thu, 20 Jan 2011 05:44:36 +0000 (05:44 +0000)]
Fix build by changing format for size_t to %jd

13 years agoUse the now-exposed diag code, rather than a hard-coded magic number.
Adrian Chadd [Thu, 20 Jan 2011 04:59:11 +0000 (04:59 +0000)]
Use the now-exposed diag code, rather than a hard-coded magic number.

13 years agoBreak out the diagnostic codes from ah_internal.h and place them in ah_diagcodes.h.
Adrian Chadd [Thu, 20 Jan 2011 04:57:26 +0000 (04:57 +0000)]
Break out the diagnostic codes from ah_internal.h and place them in ah_diagcodes.h.

Since we now have the source code, there's no reason to hide the diag codes
from other areas.

They live in the HAL as they form part of the HAL API and should still be treate
as "potentially flexible; don't publish as a public API." But since they're
already used as a public API (see follow-up commit), we may as well use
them in place of magic constants.

13 years agoIntroduce signed and unsigned version of CTLTYPE_QUAD, renaming
Matthew D Fleming [Wed, 19 Jan 2011 23:00:25 +0000 (23:00 +0000)]
Introduce signed and unsigned version of CTLTYPE_QUAD, renaming
existing uses.  Rename sysctl_handle_quad() to sysctl_handle_64().

13 years agodocument that even when wakeup_one is used to wakeup, msleep and friends
John-Mark Gurney [Wed, 19 Jan 2011 22:16:42 +0000 (22:16 +0000)]
document that even when wakeup_one is used to wakeup, msleep and friends
may still return a non-zero value... You are not guaranteed to get a one
to one mapping between wakeup_one and zero return values...

Reviewed by: kib
MFC after: 3 days

13 years agoThe output format should be determined by the ABI flags, not the ldscript.
Juli Mallett [Wed, 19 Jan 2011 22:15:12 +0000 (22:15 +0000)]
The output format should be determined by the ABI flags, not the ldscript.
This ldscript is used with both little-endian and big-endian targets.

This hopefully fixes MIPS universe.

NB: We really should get rid of almost all of the MIPS ldscripts.  There's
    only gratuitous differences between them, mostly because they're too
    specific or they do things like specify the output format rather than
    taking it from flags given in the kernel config file or the default
    output format of the compiler.

Also add svn:keywords property.

13 years agoCleanup the management of CC functions.
Michael Tuexen [Wed, 19 Jan 2011 22:10:35 +0000 (22:10 +0000)]
Cleanup the management of CC functions.

MFC after: 3 months.

13 years agoFix format of physical addresses; this fixes the n32 build.
Juli Mallett [Wed, 19 Jan 2011 21:45:40 +0000 (21:45 +0000)]
Fix format of physical addresses; this fixes the n32 build.

13 years agoBump .Dd date of manpage for r217481
Giorgos Keramidas [Wed, 19 Jan 2011 21:43:08 +0000 (21:43 +0000)]
Bump .Dd date of manpage for r217481

13 years agoUse CTLFLAG_RDTUN for read-only sysctl that exports tunable.
Konstantin Belousov [Wed, 19 Jan 2011 21:35:48 +0000 (21:35 +0000)]
Use CTLFLAG_RDTUN for read-only sysctl that exports tunable.

Reminded by: pjd
MFC after: 6 days

13 years agoFix style 9 nit that snuck in when I
Randall Stewart [Wed, 19 Jan 2011 20:57:08 +0000 (20:57 +0000)]
Fix style 9 nit that snuck in when I
grabbed the wrong patch ;-0 (thanks Daniel)

MFC after: 1 week

13 years agoFix a small typo nit
Ulrich Spörlein [Wed, 19 Jan 2011 20:16:47 +0000 (20:16 +0000)]
Fix a small typo nit

13 years agoUpdate groff manpage and symbols with what has been submitted upstream.
Ulrich Spörlein [Wed, 19 Jan 2011 20:16:38 +0000 (20:16 +0000)]
Update groff manpage and symbols with what has been submitted upstream.
Also remove local overrides that are now in the contrib tree.

This is a direct commit to contrib/ as we will no longer import any
newer groff snapshots, due to licensing issues.

MFC after: 3 weeks

13 years agoFix build with KDB defined.
John Baldwin [Wed, 19 Jan 2011 19:49:48 +0000 (19:49 +0000)]
Fix build with KDB defined.

Pointy hat to: jhb
Submitted by: jkim

13 years agoUpdate driver to version 2.3.8:
Jack F Vogel [Wed, 19 Jan 2011 19:36:27 +0000 (19:36 +0000)]
Update driver to version 2.3.8:
CRITICAL FIX - with stats changes the older 82598 will panic
and trash the stack on driver load, FCOE registers ONLY exist
in 82599 and must not be read otherwise.

kern/153951 - to correct incorrect media type on adapters
with pluggable modules I have eliminated the old static
table in favor of a new dynamic shared code routine. This
also has the benefit of detecting changes when a different
module is inserted.

Performance/enhancement to the Flow Director code from my
linux coworker (the developer of the code).

Fixes from Michael Tuexen - a data corruption problem on the
82599 (CRITICAL), fix so the buf size correctly adjusts as
the cluster changes, and max descriptors are set properly.
Also added 16K clusters for those REALLY big jumbos :)

In the RX path, the RX LOCK was not being released, and this
causes LOR problems. Add the code that igb already has.

Sync with in house shared code, this was necessary for the
Flow Director fix.

MFC in 2 days

13 years agoFix a bug where Multicast packets sent from a
Randall Stewart [Wed, 19 Jan 2011 19:07:16 +0000 (19:07 +0000)]
Fix a bug where Multicast packets sent from a
udp endpoint may end up echoing back to the sender
even with OUT joining the multi-cast group.

Reviewed by: gnn, bms, bz?
Obtained from: deischen (with help from)

13 years agoFix for kern/152853, pullup at the wrong point
Jack F Vogel [Wed, 19 Jan 2011 18:20:11 +0000 (18:20 +0000)]
Fix for kern/152853, pullup at the wrong point
is breaking UDP. Thanks to Petr Lampa for the
patch.

13 years agoJump to the next element and not to an arbitrary point. frm[1] contains
Bernhard Schmidt [Wed, 19 Jan 2011 17:40:58 +0000 (17:40 +0000)]
Jump to the next element and not to an arbitrary point. frm[1] contains
the element's data length, frm[2] is the first byte of the element's data.

Submitted by: Monthadar Al Jaberi <monthadar at gmail.com>
MFC after: 1 week

13 years agoHere v->iov_len has been assigned the return value from snprintf.
David Malone [Wed, 19 Jan 2011 17:17:37 +0000 (17:17 +0000)]
Here v->iov_len has been assigned the return value from snprintf.
Checking if it is > 0 doesn't make sense, because snprintf returns
how much space is needed if the buffer is too small. Instead, check
if the return value was greater than the buffer size, and truncate
the message if it was too long.

It isn't clear if snprintf can return a negative value in the case
of an error - I don't believe it can. If it can, then testing
v->iov_len won't help 'cos it is a size_t, not an ssize_t.

Also, as clang points out, we must always increment v here, because
later code depends on the message being in iov[5].

13 years agoAdd MNT_NFS4ACLS to ZFS mount flags. It's not conditional, since there
Edward Tomasz Napierala [Wed, 19 Jan 2011 17:11:52 +0000 (17:11 +0000)]
Add MNT_NFS4ACLS to ZFS mount flags.  It's not conditional, since there
is no way to disable NFSv4 ACLs in ZFS.  This should make it easier
for the NFS server to figure out whether the exported filesystem supports
ACLs or not.

Reviewed by: pjd
MFC after: 2 weeks

13 years agoFix yet another fallout from r208833. VM86 BIOS call may cause page fault
Jung-uk Kim [Wed, 19 Jan 2011 17:09:07 +0000 (17:09 +0000)]
Fix yet another fallout from r208833.  VM86 BIOS call may cause page fault
when FPU is in use.

Reported by: Marc UBM Bocklet (ubm dot freebsd at googlemail dot com)
Tested by: b. f. (bf1783 at googlemail dot com)
MFC after: 3 days

13 years agosysctl(8) should use the CTLTYPE to determine the type of data when
Matthew D Fleming [Wed, 19 Jan 2011 17:04:07 +0000 (17:04 +0000)]
sysctl(8) should use the CTLTYPE to determine the type of data when
reading.  (This was already done for writing to a sysctl).  This
requires all SYSCTL setups to specify a type.  Most of them are now
checked at compile-time.

Remove SYSCTL_*X* sysctl additions as the print being in hex should be
controlled by the -x flag to sysctl(8).

Succested by: bde

13 years agoWhitespace and style fixes.
John Baldwin [Wed, 19 Jan 2011 16:55:32 +0000 (16:55 +0000)]
Whitespace and style fixes.

13 years agoMove calculation of 'bmask' earlier to match it's current location in
John Baldwin [Wed, 19 Jan 2011 16:52:22 +0000 (16:52 +0000)]
Move calculation of 'bmask' earlier to match it's current location in
ufs_lookup().

13 years agoAdd missed ().
Konstantin Belousov [Wed, 19 Jan 2011 16:48:07 +0000 (16:48 +0000)]
Add missed ().

Noted by: alc
MFC after: 3 days

13 years agoMerge 118969 from UFS:
John Baldwin [Wed, 19 Jan 2011 16:46:13 +0000 (16:46 +0000)]
Merge 118969 from UFS:
Eliminate the i_devvp field from the incore inodes, we can get the same
value from ip->i_ump->um_devvp.

Submitted by: Pedro F. Giffuni  giffunip at yahoo
MFC after: 1 week

13 years agoThere is no point in calling vm_object_set_writeable_dirty() on an object
Alan Cox [Wed, 19 Jan 2011 15:43:54 +0000 (15:43 +0000)]
There is no point in calling vm_object_set_writeable_dirty() on an object
that is definitively known to be swap backed since its only effects are on
vnode-backed objects.

Reviewed by: kib

13 years agoIn linuxolator getdents_common(), it seems there is no reason to loop
Konstantin Belousov [Wed, 19 Jan 2011 12:19:25 +0000 (12:19 +0000)]
In linuxolator getdents_common(), it seems there is no reason to loop
if no records where returned by VOP_READDIR(). Readdir implementations
allowed to return 0 records when first record is larger then supplied
buffer. In this case trying to execute VOP_READDIR() again causes the
syscall looping forewer.

The goto was there from the day 1, which goes back to 1995 year.

Reported and tested by: Beat G?tzi <beat chruetertee ch>
MFC after:   2 weeks

13 years agoo Correct version of DragonFly: it was 2.8.2 released, not 2.8.0.
Maxim Konovalov [Wed, 19 Jan 2011 10:30:49 +0000 (10:30 +0000)]
o Correct version of DragonFly: it was 2.8.2 released, not 2.8.0.

Submitted by: Sascha Wildner

13 years agoDon't do a device_identify to add uart0, it's already hinted.
Juli Mallett [Wed, 19 Jan 2011 07:06:28 +0000 (07:06 +0000)]
Don't do a device_identify to add uart0, it's already hinted.

Reported by: imp

13 years agoFix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier.
Matthew D Fleming [Wed, 19 Jan 2011 00:57:58 +0000 (00:57 +0000)]
Fix a few more SYSCTL_PROC() that were missing a CTLFLAG type specifier.

13 years agoMake the length of the LDT a loader tunable, machdep.max_ldt_segment,
Konstantin Belousov [Tue, 18 Jan 2011 23:00:22 +0000 (23:00 +0000)]
Make the length of the LDT a loader tunable, machdep.max_ldt_segment,
and export it with read-only sysctl. Remove unused defines.

Reviewed by: jhb (previous version)
MFC after: 1 week

13 years agoUse malloc(9) instead of kmem_alloc(9) for temporal copy of the
Konstantin Belousov [Tue, 18 Jan 2011 22:56:10 +0000 (22:56 +0000)]
Use malloc(9) instead of kmem_alloc(9) for temporal copy of the
user-supplied descriptor array.

Noted and reviewed by: jhb (previous version)
MFC after: 1 week

13 years agoFor architectures not using direct map , and requiring real KVA page for
Konstantin Belousov [Tue, 18 Jan 2011 21:57:02 +0000 (21:57 +0000)]
For architectures not using direct map , and requiring real KVA page for
sf buf allocation, use wakeup() instead of wakeup_one() to notify sf
buffer waiters about free buffer.

sf_buf_alloc() calls msleep(PCATCH) when SFB_CATCH flag was given,
and for simultaneous wakeup and signal delivery, msleep() returns
EINTR/ERESTART despite the thread was selected for wakeup_one(). As
result, we loose a wakeup, and some other waiter will not be woken up.

Reported and tested by: az
Reviewed by: alc, jhb
MFC after: 1 week

13 years agoThere are PowerMacs which do not have a hwsensor-location property
Andreas Tobler [Tue, 18 Jan 2011 21:47:30 +0000 (21:47 +0000)]
There are PowerMacs which do not have a hwsensor-location property
for this sensor. Instead of leaving this location empty we use here
the default name 'sensor'.

Submitted by: Justin Hibbits <chmeeedalf at gmail dot com>
Approved by: nwhitehorn (mentor)

13 years agoMake sure the PKGDIR exists before we move stuff into it.
Poul-Henning Kamp [Tue, 18 Jan 2011 21:36:51 +0000 (21:36 +0000)]
Make sure the PKGDIR exists before we move stuff into it.

13 years agoMake USB packet filtering code optional.
Hans Petter Selasky [Tue, 18 Jan 2011 21:18:51 +0000 (21:18 +0000)]
Make USB packet filtering code optional.

Approved by: thompsa (mentor)

13 years agosh: Fix signal messages being sent to the wrong file sometimes.
Jilles Tjoelker [Tue, 18 Jan 2011 21:18:31 +0000 (21:18 +0000)]
sh: Fix signal messages being sent to the wrong file sometimes.

When a foreground job exits on a signal, a message is printed to stdout
about this. The buffer was not flushed after this which could result in the
message being written to the wrong file if the next command was a builtin
and had stdout redirected.

Example:
  sh -c 'kill -9 $$'; : > foo; echo FOO:; cat foo

Reported by: gcooper
MFC after: 1 week

13 years agoSpecify a CTLTYPE_FOO so that a future sysctl(8) change does not need
Matthew D Fleming [Tue, 18 Jan 2011 21:14:23 +0000 (21:14 +0000)]
Specify a CTLTYPE_FOO so that a future sysctl(8) change does not need
to rely on the format string.

13 years agoSpecify a CTLTYPE_FOO so that a future sysctl(8) change does not need
Matthew D Fleming [Tue, 18 Jan 2011 21:14:18 +0000 (21:14 +0000)]
Specify a CTLTYPE_FOO so that a future sysctl(8) change does not need
to rely on the format string.

13 years agoSpecify a CTLTYPE_FOO so that a future sysctl(8) change does not need
Matthew D Fleming [Tue, 18 Jan 2011 21:14:13 +0000 (21:14 +0000)]
Specify a CTLTYPE_FOO so that a future sysctl(8) change does not need
to rely on the format string.  For SYSCTL_PROC instances that I
noticed a discrepancy between the CTLTYPE and the format specifier,
fix the CTLTYPE.

13 years agoUpdate to upstream version 2.3
Tony Finch [Tue, 18 Jan 2011 19:13:03 +0000 (19:13 +0000)]
Update to upstream version 2.3

Only significant change is to fix a bu when the output file overwrites
the input when the input is redirected.

Obtained from: http://dotat.at/prog/unifdef

13 years agoRework RX filter programming by providing separate handler for
Pyun YongHyeon [Tue, 18 Jan 2011 17:50:14 +0000 (17:50 +0000)]
Rework RX filter programming by providing separate handler for
DP8381[56] and SiS 900/7016 controllers.  After r212119, sis(4) no
longer reinitializes controller if ALLMULTI/PROMISC was changed.
However, RX filter handling code assumed some bits of the RX filter
is programmed by driver initialization. This caused ALLMULTI/PROMISC
configuration is ignored under certain conditions.
Fix that issue by reprogramming all bits of RX filter register.
While I'm here follow recommended RX filter programming steps
recommended by National DP8381[56] data sheet(RX filter should be
is disabled before programming).

Reported by: Paul Schenkeveld < freebsd () psconsult dot nl >
Tested by: Paul Schenkeveld < freebsd () psconsult dot nl >
MFC after: 3 days

13 years ago- Remove some always-true checks (checking for unsigned < 0).
John Baldwin [Tue, 18 Jan 2011 16:43:01 +0000 (16:43 +0000)]
- Remove some always-true checks (checking for unsigned < 0).
- Only check largs->num against max_ldt_segment on amd64 for I386_SET_LDT
  when descriptors are provided.  Specifically, allow the 'start == 0'
  and 'num == 0' special case used to free all LDT entries that previously
  failed with EINVAL.

Submitted by: clang via rdivacky (some of 1)
Reviewed by: kib

13 years agoFix some bugs in my last set of changes to ale(4):
John Baldwin [Tue, 18 Jan 2011 16:27:40 +0000 (16:27 +0000)]
Fix some bugs in my last set of changes to ale(4):
- Remove extra unlock from end of ale_start_locked().
- Expand scope of locking in interrupt handler.
- Move ether_ifdetach() earlier and retire now-unneeded DETACH flag.

Tested by: Aryeh Friedman
Reviewed by: yongari (earlier version)

13 years agoMFi386: revision 217515
Yoshihiro Takahashi [Tue, 18 Jan 2011 15:35:13 +0000 (15:35 +0000)]
MFi386: revision 217515

The mem_range_softc is defined in mem.c.

13 years agoRemove some always-true comparisons.
John Baldwin [Tue, 18 Jan 2011 15:23:16 +0000 (15:23 +0000)]
Remove some always-true comparisons.

Submitted by: clang via rdivacky

13 years agoRemove bogus check. pcib_get_bus() (like other BUS_ACCESSOR() methods)
John Baldwin [Tue, 18 Jan 2011 14:58:44 +0000 (14:58 +0000)]
Remove bogus check.  pcib_get_bus() (like other BUS_ACCESSOR() methods)
doesn't "fail", it may merely return garbage if it is not a valid ivar
for a given device.  Our parent device must be a 'pcib' device, so we
can just assume it implements pcib IVARs, and all pcib devices have a
bus number.

Submitted by: clang via rdivacky

13 years agoAdd libm to the dependencies section.
Nathan Whitehorn [Tue, 18 Jan 2011 14:58:12 +0000 (14:58 +0000)]
Add libm to the dependencies section.

Submitted by: Garrett Cooper

13 years agoFix the experimental NFSv4 server so that it uses VOP_ACCESSX()
Rick Macklem [Tue, 18 Jan 2011 14:34:45 +0000 (14:34 +0000)]
Fix the experimental NFSv4 server so that it uses VOP_ACCESSX()
to check for VREAD_ACL instead of VOP_ACCESS().

MFC after: 3 days

13 years agoLimit maximum number of GPT entries to 4k. It is most realistic value
Andrey V. Elsukov [Tue, 18 Jan 2011 09:52:53 +0000 (09:52 +0000)]
Limit maximum number of GPT entries to 4k. It is most realistic value
and can prevent kernel memory exhausting when big value is specified
from command line.

Split reading and writing operation to several iteration to do not
trigger KASSERT when data length is greater than MAXPHYS.

PR:             kern/144962, kern/147851
MFC after:      2 weeks

13 years agoMove the definition of M_VMPGDATA to the swap pager, where the only
Alan Cox [Tue, 18 Jan 2011 04:54:43 +0000 (04:54 +0000)]
Move the definition of M_VMPGDATA to the swap pager, where the only
remaining uses are.

13 years agoChange model names of controller RTL_HWREV_8168_SPIN[123] to real ones.
Pyun YongHyeon [Tue, 18 Jan 2011 00:46:10 +0000 (00:46 +0000)]
Change model names of controller RTL_HWREV_8168_SPIN[123] to real ones.
s/RL_HWREV_8168_SPIN1/RL_HWREV_8168B_SPIN1/g
s/RL_HWREV_8168_SPIN2/RL_HWREV_8168B_SPIN2/g
s/RL_HWREV_8168_SPIN3/RL_HWREV_8168B_SPIN3/g
No functional changes.

13 years agoSupport booting non FDT-capable loaders:
Marcel Moolenaar [Mon, 17 Jan 2011 23:54:50 +0000 (23:54 +0000)]
Support booting non FDT-capable loaders:
1.  Allow embedding the FDT into the kernel, just like PowerPC/book-E.
2.  If the loader passes us a pointer to the bootinfo structure, save
    it and use it to fill in the gaps (e.g. bus frequencies, etc).

13 years agoFix typo and bump date.
Matthew D Fleming [Mon, 17 Jan 2011 23:43:03 +0000 (23:43 +0000)]
Fix typo and bump date.

13 years agoThe kernel is not exporting any "T,dev_t" sysctl nodes anymore, so
Matthew D Fleming [Mon, 17 Jan 2011 23:36:53 +0000 (23:36 +0000)]
The kernel is not exporting any "T,dev_t" sysctl nodes anymore, so
remove the capability and mention from sysctl(8).

13 years agoCheck the environment for system devices before using the FDT.
Marcel Moolenaar [Mon, 17 Jan 2011 23:34:36 +0000 (23:34 +0000)]
Check the environment for system devices before using the FDT.
This allows overriding the FDT, and allows specifying a debug
port.

13 years agoRemove empty dev_mem_md_init() stubs.
Jung-uk Kim [Mon, 17 Jan 2011 23:06:47 +0000 (23:06 +0000)]
Remove empty dev_mem_md_init() stubs.

13 years agoSave the CPU model, the board and the CPU clock rate so they are reported by
Warner Losh [Mon, 17 Jan 2011 23:03:09 +0000 (23:03 +0000)]
Save the CPU model, the board and the CPU clock rate so they are reported by
the approrpiate sysctl.

13 years agoKill redundant cpu line
Warner Losh [Mon, 17 Jan 2011 23:00:23 +0000 (23:00 +0000)]
Kill redundant cpu line

13 years agoMake cpu_model public (otherwise there's no way to set it) and bump it
Warner Losh [Mon, 17 Jan 2011 22:58:41 +0000 (22:58 +0000)]
Make cpu_model public (otherwise there's no way to set it) and bump it
to 80 characters.
Add hw.board to export board information, if known, from the mips kernel.

13 years agoAdd reader/writer lock around mem_range_attr_get() and mem_range_attr_set().
Jung-uk Kim [Mon, 17 Jan 2011 22:58:28 +0000 (22:58 +0000)]
Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set().
Compile sys/dev/mem/memutil.c for all supported platforms and remove now
unnecessary dev_mem_md_init().  Consistently define mem_range_softc from
mem.c for all platforms.  Add missing #include guards for machine/memdev.h
and sys/memrange.h.  Clean up some nearby style(9) nits.

MFC after: 1 month

13 years agoIn order to save instructions the MMU trap handlers assumed that the kernel
Marius Strobl [Mon, 17 Jan 2011 20:32:17 +0000 (20:32 +0000)]
In order to save instructions the MMU trap handlers assumed that the kernel
TSB is located within the 32-bit address space, which held true as long as
we were using virtual addresses magic-mapped before the location of the
kernel for addressing it. However, with r216803 in place when possible we
address it via its physical address instead, which on machines like Sun Fire
V880 have no physical memory in the 32-bit address space at all requires
to use 64-bit addressing. When using physical addressing it still should
be safe to assume that we can just ignore the lowest 10 bits of the address
as a minor optimization as we did before r216803.

13 years agoPull ieee80211_ratectl_node_init() calls from drivers into net80211.
Bernhard Schmidt [Mon, 17 Jan 2011 20:15:15 +0000 (20:15 +0000)]
Pull ieee80211_ratectl_node_init() calls from drivers into net80211.
This fixes hostap mode for at least ral(4) and run(4), because there is
no sufficient call into drivers which could be used initialize the node
related ratectl variables.

MFC after: 3 days

13 years agoFix 32bit bit fields handling. This fixes card serial number fetching.
Alexander Motin [Mon, 17 Jan 2011 19:31:34 +0000 (19:31 +0000)]
Fix 32bit bit fields handling. This fixes card serial number fetching.
It was just a cosmetic issue, because that number is only reported in logs.

Reported by: Michael Butler on current@

13 years agoExplicitly initialize the page's queue field to PQ_NONE instead of relying
Alan Cox [Mon, 17 Jan 2011 19:17:26 +0000 (19:17 +0000)]
Explicitly initialize the page's queue field to PQ_NONE instead of relying
on PQ_NONE being zero.

Redefine PQ_NONE and PQ_COUNT so that a page queue isn't allocated for
PQ_NONE.

Reviewed by: kib@

13 years agoAvoid preemption while manipulating CRs and MTRRs.
Jung-uk Kim [Mon, 17 Jan 2011 17:30:35 +0000 (17:30 +0000)]
Avoid preemption while manipulating CRs and MTRRs.

Tested by: ariff

13 years agoFix a bug related to connection caching which could cause a crash after
Dag-Erling Smørgrav [Mon, 17 Jan 2011 17:25:46 +0000 (17:25 +0000)]
Fix a bug related to connection caching which could cause a crash after
a STAT command.

PR: kern/153748 (different patch)
Submitted by: Mark Johnston <markjdb@gmail.com>
MFC after: 2 weeks

13 years agoImplement initial jumbo frame support for RTL8168/8111 C/D/E PCIe
Pyun YongHyeon [Mon, 17 Jan 2011 03:24:33 +0000 (03:24 +0000)]
Implement initial jumbo frame support for RTL8168/8111 C/D/E PCIe
GbE controllers. It seems these controllers no longer support
multi-fragmented RX buffers such that driver have to allocate
physically contiguous buffers.

 o Retire RL_FLAG_NOJUMBO flag and introduce RL_FLAG_JUMBOV2 to
   mark controllers that use new jumbo frame scheme.
 o Configure PCIe max read request size to 4096 for standard frames
   and reduce it to 512 for jumbo frames.
 o TSO/checksum offloading is not supported for jumbo frames on
   these controllers. Reflect it to ioctl handler and driver
   initialization.
 o Remove unused rl_stats_no_timeout in softc.
 o Embed a pointer to structure rl_hwrev into softc to keep track
   of controller MTU limitation and remove rl_hwrev in softc since
   that information is available through a pointer to structure
   rl_hwrev.

Special thanks to Realtek for donating sample hardwares which made
this possible.

H/W donated by: Realtek Semiconductor Corp.

13 years agoAdd initial support for RTL8168E/8111E-VL PCIe GbE.
Pyun YongHyeon [Mon, 17 Jan 2011 02:23:50 +0000 (02:23 +0000)]
Add initial support for RTL8168E/8111E-VL PCIe GbE.

H/W donated by: Realtek Semiconductor Corp.

13 years agoAdd missing comma to unbreak the PC98 build.
Rebecca Cran [Mon, 17 Jan 2011 00:15:01 +0000 (00:15 +0000)]
Add missing comma to unbreak the PC98 build.

13 years agoReduce the amount of text users need to read on each screen. Also try and
Rebecca Cran [Mon, 17 Jan 2011 00:08:28 +0000 (00:08 +0000)]
Reduce the amount of text users need to read on each screen. Also try and
make it more relevant to modern systems: for example users will be
familiar with the MBR but possibly less so with MS-DOS.

After installation has finished don't return to the main menu but exit.

13 years agomknod(2): The required include is <sys/stat.h>, not <unistd.h>.
Jilles Tjoelker [Sun, 16 Jan 2011 21:59:50 +0000 (21:59 +0000)]
mknod(2): The required include is <sys/stat.h>, not <unistd.h>.

This is what SUSv4 requires, and also the only thing that works if strict
standards compliance is requested or mknodat() is needed.

PR: standards/123688
Submitted by: gcooper
MFC after: 1 week

13 years agoSort function prototypes.
Alan Cox [Sun, 16 Jan 2011 20:40:50 +0000 (20:40 +0000)]
Sort function prototypes.

13 years agoFix the mount example of xfDmitry Marakasov <amdmi3@FreeBSD.org>s(5) filesystems...
Giorgos Keramidas [Sun, 16 Jan 2011 20:10:55 +0000 (20:10 +0000)]
Fix the mount example of xfDmitry Marakasov <amdmi3@FreeBSD.org>s(5) filesystems by including the read-only
option.  We only support ro mounts for xfs, so it's nice if the examples
we show in the manpage are easy to copy/paste.

PR: docs/149106
Submitted by: amdmi3
MFC after: 3 days

13 years agoUpdate a lock annotation on the page structure.
Alan Cox [Sun, 16 Jan 2011 18:04:01 +0000 (18:04 +0000)]
Update a lock annotation on the page structure.

13 years agoShift responsibility for synchronizing access to the page's act_count
Alan Cox [Sun, 16 Jan 2011 18:01:39 +0000 (18:01 +0000)]
Shift responsibility for synchronizing access to the page's act_count
field to the object's lock.

Reviewed by: kib@

13 years agoClean up the start of vm_page_alloc(). In particular, eliminate an
Alan Cox [Sun, 16 Jan 2011 17:33:34 +0000 (17:33 +0000)]
Clean up the start of vm_page_alloc().  In particular, eliminate an
assertion that is no longer required.  Long ago, calls to vm_page_alloc()
from an interrupt handler had to specify VM_ALLOC_INTERRUPT so that
vm_page_alloc() would not attempt to reclaim a PQ_CACHE page from another vm
object.  Today, with the synchronization on a vm object's collection of
PQ_CACHE pages, this is no longer an issue.  In fact, VM_ALLOC_INTERRUPT now
reclaims PQ_CACHE pages just like VM_ALLOC_{NORMAL,SYSTEM}.

MFC after: 3 weeks

13 years agoAdd a missing word.
Marius Strobl [Sun, 16 Jan 2011 14:21:26 +0000 (14:21 +0000)]
Add a missing word.

Submitted by: gj

13 years agosh(1): Document changes to 'exit' from traps.
Jilles Tjoelker [Sun, 16 Jan 2011 14:11:50 +0000 (14:11 +0000)]
sh(1): Document changes to 'exit' from traps.

13 years agosh: If exit is used without args from a trap action, exit on the signal.
Jilles Tjoelker [Sun, 16 Jan 2011 13:56:41 +0000 (13:56 +0000)]
sh: If exit is used without args from a trap action, exit on the signal.

This is useful so that it is easier to exit on a signal than to reset the
trap to default and resend the signal. It matches ksh93. POSIX says that
'exit' without args from a trap action uses the exit status from the last
command before the trap, which is different from 'exit $?' and matches this
if the previous command is assumed to have exited on the signal.

If the signal is SIGSTOP, SIGTSTP, SIGTTIN or SIGTTOU, or if the default
action for the signal is to ignore it, a normal _exit(2) is done with exit
status 128+signal_number.