]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years ago- Use proper constant for accessing PCB intead of hardcoded numbers
Oleksandr Tymoshenko [Sun, 7 Nov 2010 20:56:41 +0000 (20:56 +0000)]
- Use proper constant for accessing PCB intead of hardcoded numbers
- Minor clean-up

13 years agoLink threads support to the build
Oleksandr Tymoshenko [Sun, 7 Nov 2010 20:53:19 +0000 (20:53 +0000)]
Link threads support to the build

13 years agoPrevent endless loop by detecting broken MIPS.options
Oleksandr Tymoshenko [Sun, 7 Nov 2010 20:44:46 +0000 (20:44 +0000)]
Prevent endless loop by detecting broken MIPS.options

13 years agoChange register numbers according to current struct reg and
Oleksandr Tymoshenko [Sun, 7 Nov 2010 20:40:00 +0000 (20:40 +0000)]
Change register numbers according to current struct reg and
struct fpreg in src/sys/mips/include/reg.h

13 years agoRemove line for the uncommitted Cambria gpio drive that snuck in with r214946.
Andrew Thompson [Sun, 7 Nov 2010 20:38:14 +0000 (20:38 +0000)]
Remove line for the uncommitted Cambria gpio drive that snuck in with r214946.

13 years agoCalculate offset from frame top for registers saved on a stack frame.
Oleksandr Tymoshenko [Sun, 7 Nov 2010 20:37:25 +0000 (20:37 +0000)]
Calculate offset from frame top for registers saved on a stack frame.

13 years agoHook up the five gpio pins on the Avila board to the gpio framework. There are
Andrew Thompson [Sun, 7 Nov 2010 20:33:39 +0000 (20:33 +0000)]
Hook up the five gpio pins on the Avila board to the gpio framework. There are
actually 16 I/O lines but the other ones are used for system devices and
interrupts.

The IXP4XX platform can set interrupts on these pins for
high/low/rising/falling/transitional but this is not implemented yet.

The Cambria has the same interface but as all the pins are assigned to system
functions the gpio header is toggled via a PLD on the i2c bus and is not
supported by this commit.

13 years agoAdd gpart and glabel to the release CD mfsroot.
Marius Strobl [Sun, 7 Nov 2010 19:23:25 +0000 (19:23 +0000)]
Add gpart and glabel to the release CD mfsroot.

13 years agoDo not have the MTU table twice in the code. Therefore move the
Michael Tuexen [Sun, 7 Nov 2010 18:50:35 +0000 (18:50 +0000)]
Do not have the MTU table twice in the code. Therefore move the
function from the timer code to util, rename it appropriately and
also fix a bug in sctp_get_prev_mtu(), where calling it with a
value existing in the MTU table did not return a smaller one.

MFC after: 3 days.

13 years agoEliminate a possible race between pmap_pinit() and pmap_kenter_pde() on
Alan Cox [Sun, 7 Nov 2010 18:42:37 +0000 (18:42 +0000)]
Eliminate a possible race between pmap_pinit() and pmap_kenter_pde() on
superpage promotion or demotion.

Micro-optimize pmap_kenter_pde().

Reviewed by: kib, jhb (an earlier version)
MFC after: 1 week

13 years agoRemove two functions which are not used.
Michael Tuexen [Sun, 7 Nov 2010 17:50:56 +0000 (17:50 +0000)]
Remove two functions which are not used.

MFC after: 3 days.

13 years ago* Use exponential backoff for retransmission of SHUTDOWN and
Michael Tuexen [Sun, 7 Nov 2010 17:44:04 +0000 (17:44 +0000)]
* Use exponential backoff for retransmission of SHUTDOWN and
  SHUTDOWN-ACK chunks.
* While there, do some cleanups.

MFC after: 3 days.

13 years agoRemove useless comment.
Edward Tomasz Napierala [Sun, 7 Nov 2010 17:33:04 +0000 (17:33 +0000)]
Remove useless comment.

13 years agoSync with the latest version from NetBSD. It notably addds ISO9660 support.
Olivier Houchard [Sun, 7 Nov 2010 16:05:04 +0000 (16:05 +0000)]
Sync with the latest version from NetBSD. It notably addds ISO9660 support.

Submitted by: bapt

13 years agoBugfix: Set the bit that marks a device number in use.
Nick Hibma [Sun, 7 Nov 2010 15:36:07 +0000 (15:36 +0000)]
Bugfix: Set the bit that marks a device number in use.
This would cause a panic when disconnecting the second serial device.

Submitted by: Lucius Windschuh

13 years agoNot only stop all timers when entering the SHUTDOWN_SENT state,
Michael Tuexen [Sun, 7 Nov 2010 14:39:40 +0000 (14:39 +0000)]
Not only stop all timers when entering the SHUTDOWN_SENT state,
but also when entering the SHUTDOWN_ACK_SEND state.

MFC after: 3 days.

13 years agoAdd missing curly brackets. By chance, the missing brackets didn't alter
Jaakko Heinonen [Sun, 7 Nov 2010 14:28:01 +0000 (14:28 +0000)]
Add missing curly brackets. By chance, the missing brackets didn't alter
the code behavior.

Submitted by: Lucius Windschuh

13 years agoFix indentation in r213894.
Marius Strobl [Sun, 7 Nov 2010 12:29:26 +0000 (12:29 +0000)]
Fix indentation in r213894.

13 years agoRetire objformat(1), take two.
Ulrich Spörlein [Sun, 7 Nov 2010 10:49:40 +0000 (10:49 +0000)]
Retire objformat(1), take two.

It's been almost four years, and this placeholder has not been needed.

13 years agoRemove extraneous Aq.
Joel Dahl [Sun, 7 Nov 2010 07:16:35 +0000 (07:16 +0000)]
Remove extraneous Aq.

13 years agoIf the Zip reader doesn't see a PK signature block
Tim Kientzle [Sun, 7 Nov 2010 03:40:37 +0000 (03:40 +0000)]
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one.  This allows us to handle a lot
of Zip archives that have been modified in-place.

Thanks to: Gleb Kurtsou for sending me a sample archive

13 years agoAdd minidump support for MIPS
Oleksandr Tymoshenko [Sun, 7 Nov 2010 03:26:22 +0000 (03:26 +0000)]
Add minidump support for MIPS

13 years ago- Add minidump support for FreeBSD/mips
Oleksandr Tymoshenko [Sun, 7 Nov 2010 03:09:02 +0000 (03:09 +0000)]
- Add minidump support for FreeBSD/mips

13 years agoFix a long standing bug in programming station address for Yukon
Pyun YongHyeon [Sat, 6 Nov 2010 22:07:22 +0000 (22:07 +0000)]
Fix a long standing bug in programming station address for Yukon
controllers. sk(4) never reprogrammed station address for Yukon
controllers so overriding station address with ifconfig(8) was not
possible.
Fix the bug by reprogramming all registers that control station
address, flow-control and virtual station address. Virtual station
address has no use at this moment since driver does not make use of
fail over feature.

Tested by: "Mikhail T." <mi+thun <> aldan.algebra.com>
MFC after: 1 week

13 years agoIf we got an invalid station address, generate random address. This
Pyun YongHyeon [Sat, 6 Nov 2010 21:54:32 +0000 (21:54 +0000)]
If we got an invalid station address, generate random address. This
might be caused by broken BIOS.

Reported by: "Mikhail T." <mi+thun <> aldan.algebra.com>
MFC after: 1 week

13 years agoMark command submission timeouts as timeouts. This should trigger device
Alexander Motin [Sat, 6 Nov 2010 19:11:49 +0000 (19:11 +0000)]
Mark command submission timeouts as timeouts. This should trigger device
resets and increase chances of getting device back again.

13 years agoInstead of using the AMRR ratectl algo as default for drivers which have
Bernhard Schmidt [Sat, 6 Nov 2010 18:17:20 +0000 (18:17 +0000)]
Instead of using the AMRR ratectl algo as default for drivers which have
the IEEE80211_C_RATECTL flag set, default to NONE for all drivers. Only if
a driver calls ieee80211_ratectl_init() check if the NONE algo is still
selected and try to use AMRR in that case. Drivers are still free to use
any other algo by calling ieee80211_ratectl_set() prior to the
ieee80211_ratectl_init() call.

After this change it is now safe to assume that a ratectl algo is always
available and selected, which renders the IEEE80211_C_RATECTL flag pretty
much useless. Therefore revert r211314 and 211546.

Reviewed by: rpaulo
MFC after: 2 weeks

13 years agoFix a segmentation fault in argument processing.
Jean-Sébastien Pédron [Sat, 6 Nov 2010 17:48:46 +0000 (17:48 +0000)]
Fix a segmentation fault in argument processing.

The crash was caused by a command line such as this one:
# foldl -b1

PR: bin/151592
Reported by: Marcus Reid <marcus@blazingdot.com>
Tested by: Marcus Reid <marcus@blazingdot.com>
MFC after: 3 days

13 years agoApply style(9) and unbreak build.
Ulrich Spörlein [Sat, 6 Nov 2010 15:04:56 +0000 (15:04 +0000)]
Apply style(9) and unbreak build.

This went unnoticed during the WARNS bump, as this tool is not connected
to the build.

13 years agoPut string in quotes, like is done everywhere.
Ulrich Spörlein [Sat, 6 Nov 2010 15:04:48 +0000 (15:04 +0000)]
Put string in quotes, like is done everywhere.

13 years agoAdd support for odd-sized PIO transfers, sometimes used by ATAPI.
Alexander Motin [Sat, 6 Nov 2010 14:22:50 +0000 (14:22 +0000)]
Add support for odd-sized PIO transfers, sometimes used by ATAPI.

13 years agoImplement pmap_is_prefaultable().
Marius Strobl [Sat, 6 Nov 2010 13:58:24 +0000 (13:58 +0000)]
Implement pmap_is_prefaultable().

Reviewed by: alc (with bugfix)

13 years agoDo not resend DATA chunks without delay when dropped by the peer and
Michael Tuexen [Sat, 6 Nov 2010 13:43:18 +0000 (13:43 +0000)]
Do not resend DATA chunks without delay when dropped by the peer and
the CRC was correct.

MFC after: 3 days.

13 years ago* Fix an accounting bug regarding SACK/NR-SACK chunks.
Michael Tuexen [Sat, 6 Nov 2010 13:30:54 +0000 (13:30 +0000)]
* Fix an accounting bug regarding SACK/NR-SACK chunks.
* Fix the generation of the SACK/NR-SACK gap lists.

MFC after: 3 days.

13 years ago- Move Sun Fire V240 to the list of known working machines.
Marius Strobl [Sat, 6 Nov 2010 11:38:49 +0000 (11:38 +0000)]
- Move Sun Fire V240 to the list of known working machines.
- For the parallel stable/7 and stable/8 branches mention both releases that
  first supported a particular sparc64 machine and update the sparc64 hardware
  list regarding machines that will be supported beginning with 7.4-RELEASE.

13 years agoFix manpage markup.
Ulrich Spörlein [Sat, 6 Nov 2010 10:54:33 +0000 (10:54 +0000)]
Fix manpage markup.

13 years agoInverse display of top(1)'s table header when running in inactive mode.
Xin LI [Sat, 6 Nov 2010 03:59:21 +0000 (03:59 +0000)]
Inverse display of top(1)'s table header when running in inactive mode.

MFC after: 2 weeks

13 years agoValidate whether the zfs_cmd_t submitted from userland is not smaller than
Xin LI [Fri, 5 Nov 2010 22:18:09 +0000 (22:18 +0000)]
Validate whether the zfs_cmd_t submitted from userland is not smaller than
what we have.  Without the check the kernel could accessing memory that
does not belong to the request struct.

Note that we do not test if the struct equals in size at this time, which
may faciliate forward compatibility with newer binaries.

Reviewed by: pjd at MeetBSD CA '2010
MFC after: 1 week

13 years agosh: Add simple tests for printf.
Jilles Tjoelker [Fri, 5 Nov 2010 21:47:58 +0000 (21:47 +0000)]
sh: Add simple tests for printf.

These are not meant as a replacement for tools/regression/usr.bin/printf/*
but to detect errors specific to making it a shell builtin.

13 years agoBugfix: In rev 213509 Alexander committed a duplicate ID for ZTE STOR
Nick Hibma [Fri, 5 Nov 2010 21:17:55 +0000 (21:17 +0000)]
Bugfix: In rev 213509 Alexander committed a duplicate ID for ZTE STOR
based devices (QUALCOMMINC 0x2000). He made it use SCSI eject instead of
ZTE STOR eject. This prevented my ZTE MF626 dongle from switching.

- Apply both eject methods for ZTE STOR based devices. Works on my as
  well as mav's device.
- Remove the duplicate.
- Sort the usbdevs entries for Qualcomm so this won't happen again.
- Add bootverbose message displaying the fact that we are ejecting (and
  how).

Reviewed by: mav
MFC after: 2 weeks

13 years agoFix a bug in r214049. The nvp == vp case shall be handled specially
Konstantin Belousov [Fri, 5 Nov 2010 21:13:16 +0000 (21:13 +0000)]
Fix a bug in r214049. The nvp == vp case shall be handled specially
only for !usevget case. If VFS_VGET is working, the vnode shared lock
is obtained recursively and vput() shall be done, not vunref().

Submitted by: rmacklem
Tested by: Josh Carroll <josh.carroll gmail com>
MFC after: 3 days

13 years agoAdd a forgotten change from the previous commit.
Jung-uk Kim [Fri, 5 Nov 2010 20:24:26 +0000 (20:24 +0000)]
Add a forgotten change from the previous commit.

13 years agoFix a use-after-free bug for extended IRQ resource[1]. When _PRS buffer is
Jung-uk Kim [Fri, 5 Nov 2010 19:50:09 +0000 (19:50 +0000)]
Fix a use-after-free bug for extended IRQ resource[1].  When _PRS buffer is
copied as a template for _SRS, a string pointer for descriptor name is also
copied and it becomes stale as soon as it gets de-allocated[2].  Now _CRS is
used as a template for _SRS as ACPI specification suggests if it is usable.
The template from _PRS is still utilized but only when _CRS is not available
or broken.  To avoid use-after-free the problem in this case, however, only
mandatory fields are copied, optional data is removed, and structure length
is adjusted accordingly.

Reported by: hps[1]
Analyzed by: avg[2]
Tested by: hps

13 years agoCorrect an inverted check in r213893.
Marius Strobl [Fri, 5 Nov 2010 19:38:28 +0000 (19:38 +0000)]
Correct an inverted check in r213893.

13 years agoAdd simple MAC statistics counter reading support. Unfortunately
Pyun YongHyeon [Fri, 5 Nov 2010 19:28:00 +0000 (19:28 +0000)]
Add simple MAC statistics counter reading support. Unfortunately
useful counters like rl_missed_pkts is 16 bits quantity which is
too small to hold meaningful information happened in a second. This
means driver should frequently read these counters in order not to
lose accuracy and that approach is too inefficient in driver's
view. Moreover it seems there is no way to trigger an interrupt to
detect counter near-full or wraparound event as well as lacking
clearing the MAC counters. Another limitation of reading the
counters from RealTek controllers is lack of interrupt firing at
the end of DMA cycle of MAC counter read request such that driver
have to poll the end of the DMA which is a time consuming process
as well as inefficient. The more severe issue of the MAC counter
read request is it takes too long to complete the DMA. All these
limitation made maintaining MAC counters in driver impractical. For
now, just provide simple sysctl interface to trigger reading the
MAC counters. These counters could be used to track down driver
issues. Users can read MAC counters maintained in controller with
the following command.
#sysctl dev.re.0.stats=1

While I'm here add check for validity of dma map and allocated
memory before unloading/freeing them.

Tested by: rmacklem

13 years agoImplement ucom_set_pnpinfo_usb() providing ttyname and port number
Nick Hibma [Fri, 5 Nov 2010 19:12:48 +0000 (19:12 +0000)]
Implement ucom_set_pnpinfo_usb() providing ttyname and port number
information through devd. My E220 now produces the notification (1 line):

+u3g0 at bus=1 hubaddr=1 port=0 devaddr=2 interface=0 \
vendor=0x12d1 product=0x1003 devclass=0x00 devsubclass=0x00 \
sernum="" release=0x0000 intclass=0xff intsubclass=0xff \
ttyname=U0 ttyports=2 on uhub0

Note: serial/ufoma and net/uhso still provide port number and tty name
(uhso only) information through sysctls, which should now be removed.

Reviewed by: hpselasky

13 years agostyle(9).
Pyun YongHyeon [Fri, 5 Nov 2010 18:24:50 +0000 (18:24 +0000)]
style(9).

13 years agoRemove extra white spaces.
Pyun YongHyeon [Fri, 5 Nov 2010 18:23:43 +0000 (18:23 +0000)]
Remove extra white spaces.

13 years agoEnable 64bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe
Pyun YongHyeon [Fri, 5 Nov 2010 18:19:54 +0000 (18:19 +0000)]
Enable 64bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe
controllers. Some old PCI controllers may work with DAC but it was
known to be buggy so 64bit DMA addressing is used only on PCIe
controllers.

13 years agoAdjust the order of operations in spinlock_enter() and spinlock_exit() to
John Baldwin [Fri, 5 Nov 2010 13:42:58 +0000 (13:42 +0000)]
Adjust the order of operations in spinlock_enter() and spinlock_exit() to
work properly with single-stepping in a kernel debugger.  Specifically,
these routines have always disabled interrupts before increasing the nesting
count and restored the prior state of interrupts after decreasing the nesting
count to avoid problems with a nested interrupt not disabling interrupts
when acquiring a spin lock.  However, trap interrupts for single-stepping
can still occur even when interrupts are disabled.  Now the saved state of
interrupts is not saved in the thread until after interrupts have been
disabled and the nesting count has been increased.  Similarly, the saved
state from the thread cannot be read once the nesting count has been
decreased to zero.  To fix this, use temporary variables to store interrupt
state and shuffle it between the thread's MD area and the appropriate
registers.

In cooperation with: bde
MFC after:     1 month

13 years agoAppend to CFLAGS, don't clobber it.
Rui Paulo [Fri, 5 Nov 2010 11:31:39 +0000 (11:31 +0000)]
Append to CFLAGS, don't clobber it.

Submitted by: loos

13 years ago- Remove an unused entry from the softc (only used in a debugging printf).
Nick Hibma [Fri, 5 Nov 2010 09:06:23 +0000 (09:06 +0000)]
- Remove an unused entry from the softc (only used in a debugging printf).
- Fix the loop count on detach (causing a panic on detaching a serial
  dongle).
- Increase a buffer in case some driver want extra long tty device names
  (postfixing the purpose of the tty for example, e.g. u3g.ppp).

13 years agoBugfix: Move the 'at <location string' to the beginning of the attach
Nick Hibma [Fri, 5 Nov 2010 08:30:16 +0000 (08:30 +0000)]
Bugfix: Move the 'at <location string' to the beginning of the attach
notification. devd would stop evaluating at 'at' (not '<k>=<v>') and
hence prevent 'port=X' (and 'bus=<"on" string>) from making it into the
environment for the devd action.

Reviewed by: hselasky
MFC after: 2 weeks

13 years agoClarify the naming: Methods that free an object should
Tim Kientzle [Fri, 5 Nov 2010 05:11:54 +0000 (05:11 +0000)]
Clarify the naming:  Methods that free an object should
be called "free".  Retain the old "finish" names to preserve
source compatibility for now.

13 years agoPartially implement the mysterious cons25 \e[x escape sequence.
Ed Schouten [Fri, 5 Nov 2010 00:56:21 +0000 (00:56 +0000)]
Partially implement the mysterious cons25 \e[x escape sequence.

It seems the terminfo library on some systems (OS X, Linux) may emit the
sequence \e[x to reset to default attributes. Apart from using the
zero-command, this escape sequence allows many more operations, such as
setting ANSI colors. I don't see this used anywhere, so this should be
sufficient for now.

This deficiency was spotted by the Debian GNU/kFreeBSD. They have their
own patch, which is slightly flawed in my opinion. I don't know why they
never reported this issue to us.

MFC after: 1 week

13 years agoDon't terminate the notification with \n. This is done in
Nick Hibma [Thu, 4 Nov 2010 21:06:36 +0000 (21:06 +0000)]
Don't terminate the notification with \n. This is done in
usb_device.c:devctl_notify_f().

13 years agoIn man section 4, ERRORS is spelled DIAGNOSTICS
Ulrich Spörlein [Thu, 4 Nov 2010 21:03:50 +0000 (21:03 +0000)]
In man section 4, ERRORS is spelled DIAGNOSTICS

13 years agor214781 caused the timer value to be rounded down, so that if the user asked
Rebecca Cran [Thu, 4 Nov 2010 20:31:12 +0000 (20:31 +0000)]
r214781 caused the timer value to be rounded down, so that if the user asked
for 59 minutes 30 was sent to the drive. The timer value is now always
rounded up.

Reported by: mav

13 years agoAdd code to warm reset a USB 3.0 port.
Hans Petter Selasky [Thu, 4 Nov 2010 19:24:21 +0000 (19:24 +0000)]
Add code to warm reset a USB 3.0 port.

Approved by: thompsa (mentor)

13 years agoAdd new USB quirk.
Hans Petter Selasky [Thu, 4 Nov 2010 19:05:35 +0000 (19:05 +0000)]
Add new USB quirk.

Submitted by: Dmitry Luhtionov
Approved by: thompsa (mentor)

13 years agoRemove 4.x, 5.x and 6.x compatibility bits.
Bernhard Schmidt [Thu, 4 Nov 2010 18:43:57 +0000 (18:43 +0000)]
Remove 4.x, 5.x and 6.x compatibility bits.

Submitted by: Paul B Mahol <onemda at gmail.com>

13 years agoUpdate startup_alloc() to support multi-page allocations and allow internal
John Baldwin [Thu, 4 Nov 2010 15:33:50 +0000 (15:33 +0000)]
Update startup_alloc() to support multi-page allocations and allow internal
zones whose objects are larger than a page to use startup_alloc().  This
allows allocation of zone objects during early boot on machines with a large
number of CPUs since the resulting zone objects are larger than a page.

Submitted by: trema
Reviewed by: attilio
MFC after: 1 week

13 years agoFix standby timer calculation: the timer was being set 30 minutes later
Rebecca Cran [Thu, 4 Nov 2010 15:24:32 +0000 (15:24 +0000)]
Fix standby timer calculation: the timer was being set 30 minutes later
than the user requested.
Also, 21 minutes is encoded as 252 and 22-29 minutes cannot be encoded
so must be rounded up to 30.

PR: bin/151871

13 years agoFix typo.
Benedict Reuschling [Thu, 4 Nov 2010 10:47:19 +0000 (10:47 +0000)]
Fix typo.

13 years agoIn r214728, if dlopen() is called for the object that has been already
Konstantin Belousov [Thu, 4 Nov 2010 09:29:00 +0000 (09:29 +0000)]
In r214728, if dlopen() is called for the object that has been already
loaded as a dependency and marked -z nodlopen, object' DAG is already
initialized by load_needed_objects(). Due to this, the init_dag() call
from dlopen() does not increment refcount for the object [1].

Change init_dag() to not increment DAG refcount. Require explicit calls
to ref_dag() to increment, and assert that ref_dag() and unref_dag()
are called for root that has dag initialized. To fix the noted issue,
unconditionally call both init_dag() and ref_dag() in dlopen() for the
case when the object was already loaded, making it similar to the case
of newly loaded object.

Noted by: jh [1]
Reviewed by: jh, kan
MFC after: 6 days

13 years agoFix style.
Konstantin Belousov [Thu, 4 Nov 2010 09:19:14 +0000 (09:19 +0000)]
Fix style.

MFC after: 6 days

13 years agox86 topo_probe: do not probe smp topology if only one cpu is visible
Andriy Gapon [Thu, 4 Nov 2010 08:51:45 +0000 (08:51 +0000)]
x86 topo_probe: do not probe smp topology if only one cpu is visible

This could lead to a division by zero if hardware is multi-core and/or
multi-threaded, but for some (quite unusual) reason FreeBSD sees only
one logical processor.  This could happen, for example, if neither MADT
nor MP Table are presented by BIOS.

Also:
- assert in topo_probe_0x4 that BSP is accounted for
- neither cpu_cores nor cpu_logical should be zero after successful
  probing, so either being zero is an indication of failed probing

Reported by: vwe, Dan Allen <danallen46@airwired.net>
Tested by: Dan Allen <danallen46@airwired.net>
MFC after: 3 days

13 years agoDon't attach the PCI bus driver if the board we're being run on has PCIe. The
Juli Mallett [Wed, 3 Nov 2010 23:29:52 +0000 (23:29 +0000)]
Don't attach the PCI bus driver if the board we're being run on has PCIe.  The
two are mutually-exclusive on Octeon.

13 years agoAdjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type
Jung-uk Kim [Wed, 3 Nov 2010 23:16:35 +0000 (23:16 +0000)]
Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type
in ACPICA.  Reshuffle the code a bit to make sure this kludge only applies
to these two specical cases and to make it cleaner.

13 years ago- Simplify the way unit/subunit allocation is done in ucom.
Nick Hibma [Wed, 3 Nov 2010 21:50:49 +0000 (21:50 +0000)]
- Simplify the way unit/subunit allocation is done in ucom.
- hw.usb.ucom.cons_unit is now split into
  hw.usb.ucom.cons_unit/...cons_subunit.

Note: The tunable/sysctl hw.usb.ucom.cons_unit needs to be reviewed if

a) a console was defined a USB serial devices, and a USB device with
more than 1 subunit is present, and this device is attached before the
device functioning as a console

or

b) a console was defined on a USB device with more than 1 subunit

Reviewed by: hps
MFC after: 2 weeks

13 years agoDon't spam the console with loaded modules during boot and/or during
Nick Hibma [Wed, 3 Nov 2010 21:10:12 +0000 (21:10 +0000)]
Don't spam the console with loaded modules during boot and/or during
startup of ppp.

Note: This cannot be hidden behind bootverbose as this file is included
from lib/libalias as well.

13 years agoXref BUS_SETUP_INTR(9) and locking(9).
Edward Tomasz Napierala [Wed, 3 Nov 2010 18:49:50 +0000 (18:49 +0000)]
Xref BUS_SETUP_INTR(9) and locking(9).

13 years agoFix two mistakes on 32-bit systems. The slbmte code in syscall() is 64-bit
Nathan Whitehorn [Wed, 3 Nov 2010 16:21:47 +0000 (16:21 +0000)]
Fix two mistakes on 32-bit systems. The slbmte code in syscall() is 64-bit
only, and should be protected with an ifdef, and the no-execute bit in
32-bit set_user_sr() should be set before the comparison, not after, or
it will never match.

13 years agoExtend the g_eventlock mutex coverage in one_event() to include setting
Jaakko Heinonen [Wed, 3 Nov 2010 16:19:35 +0000 (16:19 +0000)]
Extend the g_eventlock mutex coverage in one_event() to include setting
of the EV_DONE flag and use the mutex to protect against losing wakeups
in g_waitfor_event().

Reported by: davidxu
Tested by: davidxu
Discussed on: freebsd-current

13 years agoRemove 'softclock_ih' as it is no longer used.
John Baldwin [Wed, 3 Nov 2010 15:38:52 +0000 (15:38 +0000)]
Remove 'softclock_ih' as it is no longer used.

13 years agoClean up the user segment handling code a little more. Now that
Nathan Whitehorn [Wed, 3 Nov 2010 15:15:48 +0000 (15:15 +0000)]
Clean up the user segment handling code a little more. Now that
set_user_sr() itself caches the user segment VSID, there is no need for
cpu_switch() to do it again. This change also unifies the 32 and 64-bit
code paths for kernel faults on user pages and remaps the user SLB slot
on 64-bit systems when taking a syscall to avoid some unnecessary segment
exception traps.

13 years agoDelete machine/foo.h headers moved to x86/. I forgot to commit this
John Baldwin [Wed, 3 Nov 2010 13:42:59 +0000 (13:42 +0000)]
Delete machine/foo.h headers moved to x86/.  I forgot to commit this
earlier.

13 years agoRemove unused files.
Rui Paulo [Wed, 3 Nov 2010 10:46:39 +0000 (10:46 +0000)]
Remove unused files.

13 years agoAdapt for wpa_supplicant / hostapd 0.7.3.
Rui Paulo [Wed, 3 Nov 2010 10:44:25 +0000 (10:44 +0000)]
Adapt for wpa_supplicant / hostapd 0.7.3.

13 years agoMerge wpa_supplicant and hostapd 0.7.3.
Rui Paulo [Wed, 3 Nov 2010 10:43:38 +0000 (10:43 +0000)]
Merge wpa_supplicant and hostapd 0.7.3.

13 years agoIf dlopen() is called for the dso that has been already loaded as a
Konstantin Belousov [Wed, 3 Nov 2010 09:23:08 +0000 (09:23 +0000)]
If dlopen() is called for the dso that has been already loaded as a
dependency, then the dso never has its DAG initialized. Empty DAG
makes ref_dag() call in dlopen() a nop, and the dso refcount is off
by one.

Initialize the DAG on the first dlopen() call, using a boolean flag
to prevent double initialization.

From the PR (edited):
Assume we have a library liba.so, containing a function a(), and a
library libb.so, containing function b(). liba.so needs functionality
from libb.so, so liba.so links in libb.so.

An application doesn't know about the relation between these libraries,
but needs to call a() and b(). It dlopen()s liba.so and obtains a
pointer to a(), then it dlopen()s libb.so and obtains a pointer to b().

As soon as the application doesn't need a() anymore, it dlclose()s liba.so.

Expected result: the pointer to b() is still valid and can be called
Actual result: the pointer to b() has become invalid, even though the
application did not dlclose() the handle to libb.so. On calling b(), the
application crashes with a segmentation fault.

PR: misc/151861
Based on patch by: jh
Reviewed by: kan
Tested by: Arjan van Leeuwen <freebsd-maintainer opera com>
MFC after: 1 week

13 years agoClean up leftover USB device ID after r213856. This fixes:
Hans Petter Selasky [Wed, 3 Nov 2010 07:51:33 +0000 (07:51 +0000)]
Clean up leftover USB device ID after r213856. This fixes:
options USB_VERBOSE

Submitted by: Lucius Windschuh
Approved by: thompsa (mentor)

13 years agoMFV of tzdata2010o, r214716
Edwin Groothuis [Wed, 3 Nov 2010 01:30:56 +0000 (01:30 +0000)]
MFV of tzdata2010o, r214716

- Fiji moves to DST three weeks earlier in 2010.

13 years agoVendor import of tzdata2010o:
Edwin Groothuis [Wed, 3 Nov 2010 01:24:26 +0000 (01:24 +0000)]
Vendor import of tzdata2010o:

- Fiji will end DST 3 weeks earlier than expected - on March 6,
  2011, not March 27, 2011.

Obtained from: ftp://elsie.nci.nih.gov/pub/

13 years agosh: Fix some issues with aliases and case, by importing dash checkkwd code.
Jilles Tjoelker [Tue, 2 Nov 2010 23:44:29 +0000 (23:44 +0000)]
sh: Fix some issues with aliases and case, by importing dash checkkwd code.

This moves the function of the noaliases variable into the checkkwd
variable. This way it is properly reset on errors and aliases can be used
normally in the commands for each case (the case labels recognize the
keyword esac but no aliases).

The new code is clearer as well.

Obtained from: dash

13 years agoDeclare the CF GEOM class so that g_modevent will get called, the class will
Juli Mallett [Tue, 2 Nov 2010 23:43:44 +0000 (23:43 +0000)]
Declare the CF GEOM class so that g_modevent will get called, the class will
be recorded, etc.  This fixes libgeom on Octeon.

13 years agoSend packets to remote node only via the send thread to avoid possible
Pawel Jakub Dawidek [Tue, 2 Nov 2010 22:13:08 +0000 (22:13 +0000)]
Send packets to remote node only via the send thread to avoid possible
races - in this case a keepalive packet was send from wrong thread which
lead to connection dropping, because of corrupted packet.

Fix it by sending keepalive packets directly from the send thread.
As a bonus we now send keepalive packets only when connection is idle.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days

13 years agoCosmetic change to revert one of my earlier ones.
John Baldwin [Tue, 2 Nov 2010 20:16:41 +0000 (20:16 +0000)]
Cosmetic change to revert one of my earlier ones.
#if __i386__ && PAE is identical to just #if PAE since PAE is only a valid
option for i386.

Submitted by: attilio

13 years agoTweak the waitchannel messages for the dead lock detection kthread. Use
John Baldwin [Tue, 2 Nov 2010 18:34:31 +0000 (18:34 +0000)]
Tweak the waitchannel messages for the dead lock detection kthread.  Use
a shorter message (userland generally only sees the first 6 to 8
characters) when waiting for the allproc lock.  Use "-" when idle to math
the behavior of other kthreads.

Reviewed by: attilio
MFC after: 1 week

13 years agoFurther tweaks to the ram_attach() routine:
John Baldwin [Tue, 2 Nov 2010 17:56:16 +0000 (17:56 +0000)]
Further tweaks to the ram_attach() routine:
- Use > 2^32 - 1 instead of >= when checking for memory regions above 4G.
- Skip SMAP entries > 4G on i386 rather than breaking out of the loop
  since SMAP entries are not guaranteed to be in order.
- Remove 'i' and loop over 'rid' directly in the dump_avail[] case.
- Only check for 4G regions in the dump_avail[] case on i386 if PAE is
  enabled since vm_paddr_t is 32-bit in the !PAE case.

Submitted by: alc

13 years agoAdd a new libc function: cfmakesane(3).
Ed Schouten [Tue, 2 Nov 2010 17:00:56 +0000 (17:00 +0000)]
Add a new libc function: cfmakesane(3).

I've noticed various terminal emulators that need to obtain a sane
default termios structure use very complex `hacks'. Even though POSIX
doesn't provide any functionality for this, extend our termios API with
cfmakesane(3), which is similar to the commonly supported cfmakeraw(3),
except that it fills the termios structure with sane defaults.

Change all code in our base system to use this function, instead of
depending on <sys/ttydefaults.h> to provide TTYDEF_*.

13 years agoSkip SMAP regions above 4GB on i386 since they will not fit into a long.
John Baldwin [Tue, 2 Nov 2010 13:04:25 +0000 (13:04 +0000)]
Skip SMAP regions above 4GB on i386 since they will not fit into a long.
While here, update some comments to better explain the new code flow.

Tested by: dhw

13 years agoDon't leak the LLE lock if the arptimer callout is pending or inactive.
John Baldwin [Tue, 2 Nov 2010 13:00:56 +0000 (13:00 +0000)]
Don't leak the LLE lock if the arptimer callout is pending or inactive.

Reported by: David Rhodus
MFC after: 1 month

13 years agoFix a few typos and style nits in the example code.
John Baldwin [Tue, 2 Nov 2010 12:40:13 +0000 (12:40 +0000)]
Fix a few typos and style nits in the example code.

Submitted by: Arnaud Lacombe  lacombar of gmail
MFC after: 3 days

13 years agoRemove stale line, accidentally slipped into r214016.
Alexander Motin [Tue, 2 Nov 2010 09:31:24 +0000 (09:31 +0000)]
Remove stale line, accidentally slipped into r214016.

MFC after: 3 days

13 years agoShorten long lines.
David E. O'Brien [Tue, 2 Nov 2010 05:39:57 +0000 (05:39 +0000)]
Shorten long lines.

13 years agoGive the user a hint as to what config(8) is unhappy with.
David E. O'Brien [Tue, 2 Nov 2010 05:27:05 +0000 (05:27 +0000)]
Give the user a hint as to what config(8) is unhappy with.

13 years agoUse sysctl kern.sched.cpusetsize to retrieve size of kernel cpuset.
David Xu [Tue, 2 Nov 2010 02:13:13 +0000 (02:13 +0000)]
Use sysctl kern.sched.cpusetsize to retrieve size of kernel cpuset.

13 years ago- Add ELF core for FreeBSD/mips
Oleksandr Tymoshenko [Tue, 2 Nov 2010 01:26:21 +0000 (01:26 +0000)]
- Add ELF core for FreeBSD/mips
- Register all known cores in init function

13 years agoFix reading of .debug_line on MIPS64, big-endian:
Oleksandr Tymoshenko [Tue, 2 Nov 2010 01:24:49 +0000 (01:24 +0000)]
Fix reading of .debug_line  on MIPS64, big-endian:
    read_initial_length detects pointer size by checking first
    4 bytes of .debug_line and stores it in struct comp_unit_head *
    passed to it as second argument. By passing NULL to a
    read_initial_length we ignore actual pointer size (8 bytes) and
    use default (4 bytes) which results in wrong offsets of header fields.