]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoFix grammar.
brucec [Mon, 18 Oct 2010 14:26:29 +0000 (14:26 +0000)]
Fix grammar.

13 years agoFix typo: Offlaod -> Offload.
pluknet [Mon, 18 Oct 2010 14:13:19 +0000 (14:13 +0000)]
Fix typo: Offlaod -> Offload.

PR: docs/150756
Approved by: avg (mentor)
MFC after: 3 days

13 years agoUpdate links for taskqueue(9) functions.
pjd [Mon, 18 Oct 2010 12:35:48 +0000 (12:35 +0000)]
Update links for taskqueue(9) functions.

13 years agoAdd links for libradius(3) functions.
pjd [Mon, 18 Oct 2010 12:35:10 +0000 (12:35 +0000)]
Add links for libradius(3) functions.

13 years agoSet of legacy mode SATA enchancements:
mav [Mon, 18 Oct 2010 11:30:13 +0000 (11:30 +0000)]
Set of legacy mode SATA enchancements:
- Implement proper combined mode decoding for Intel controllers to properly
identify SATA and PATA channels and associate ATA channels with SATA ports.
This fixes wrong reporting and in some cases hard resets to wrong SATA ports.
- Improve SATA registers support to handle hot-plug events and potentially
interface errors. For ICH5/6300ESB chipsets these registers accessible via
PCI config space. For later ones they may be accessible via PCI BAR(5).
- For controllers not generating interrupts on hot-plug events, implement
periodic status polling. Use it to detect hot-plug on Intel and VIA
controllers. Same probably could also be used for Serverworks and SIS.

13 years agoUnbreak buildworld by including pthread_rwlockattr_setkind_np and
davidxu [Mon, 18 Oct 2010 09:44:21 +0000 (09:44 +0000)]
Unbreak buildworld by including pthread_rwlockattr_setkind_np and
pthread_rwlockattr_getkind_np.

13 years agoRevert r213867; while this driver really doesn't use any of the generic
marius [Mon, 18 Oct 2010 08:36:03 +0000 (08:36 +0000)]
Revert r213867; while this driver really doesn't use any of the generic
subroutines, at least mii_capabilities is used within itself.

13 years agoLog if fopen() fails.
glebius [Mon, 18 Oct 2010 07:28:53 +0000 (07:28 +0000)]
Log if fopen() fails.

Reviewed by: brian

13 years ago"b64decode -r" did not handle arbitary breaks in base64 encoded
edwin [Mon, 18 Oct 2010 05:44:11 +0000 (05:44 +0000)]
"b64decode -r" did not handle arbitary breaks in base64 encoded
data. White space should be accepted anywhere in a base64 encoded
stream, not just after every chunk (4 characters).

Test-scenario:

VmVsb2NpdHkgUmV3YXJkcw==

and

VmVsb2NpdHkgUmV3YXJkcw
==

should both produce "Velocity Rewards"

PR: bin/124739
Submitted by: Mark Andrews <marka@isc.org>
MFC after: 2 weeks

13 years agosort function name.
davidxu [Mon, 18 Oct 2010 05:16:44 +0000 (05:16 +0000)]
sort function name.

13 years agos/||/&&
davidxu [Mon, 18 Oct 2010 05:15:26 +0000 (05:15 +0000)]
s/||/&&

13 years agoAdd pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, the
davidxu [Mon, 18 Oct 2010 05:09:22 +0000 (05:09 +0000)]
Add pthread_rwlockattr_setkind_np and pthread_rwlockattr_getkind_np, the
functions set or get pthread_rwlock type, current supported types are:
   PTHREAD_RWLOCK_PREFER_READER_NP,
   PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
   PTHREAD_RWLOCK_PREFER_WRITER_NP,
default is PTHREAD_RWLOCK_PREFER_WRITER_NONCECURSIVE_NP, this maintains
binary compatible with old code.

13 years agoRe-implement the root mount logic using a recursive approach, whereby each
marcel [Mon, 18 Oct 2010 05:01:53 +0000 (05:01 +0000)]
Re-implement the root mount logic using a recursive approach, whereby each
root file system (starting with devfs and a synthesized configuration) can
contain directives for mounting another file system as root. The old root
file system is re-mounted under the new root file system (with /.mount or
/mnt as the mount point) to allow access to the underlying file system.

The configuration allows for creating vnode-backed memory disks that can
subsequently be mounted as root. This allows for an efficient and low-
cost way to distribute and boot FreeBSD software images that reside on
some storage media.

When trying a mount, the kernel will wait for the device in question to
arrive. The timeout is configurable and is part of the configuration.
This allows arbitrarily complex GEOM configurations to be constructed
on the fly.

A side-effect of this change is that all root specifications, whether
compiled into the kernel or typed at the prompt can contain root mount
options.

13 years agoIn vfs_filteropt(), only print the errmsg when there's no errmsg
marcel [Mon, 18 Oct 2010 04:34:42 +0000 (04:34 +0000)]
In vfs_filteropt(), only print the errmsg when there's no errmsg
mount option. Otherwise errors tend to get printed multiple times.

13 years agoRename boot() to kern_reboot() and make it visible outside of
marcel [Mon, 18 Oct 2010 04:30:27 +0000 (04:30 +0000)]
Rename boot() to kern_reboot() and make it visible outside of
kern_shutdown.c. This makes it easier for emulators and other
parts of the kernel to initiate a reboot.

13 years agoAllow the MDIOCATTACH ioctl operation to originate from within the kernel.
marcel [Mon, 18 Oct 2010 04:26:32 +0000 (04:26 +0000)]
Allow the MDIOCATTACH ioctl operation to originate from within the kernel.
To protect against malicious software, we demand that the file name is at
a particular location (i.e. appended to the mdio structure) for it to be
treated as in-kernel.

13 years agoStylify of uudecode(1)
edwin [Mon, 18 Oct 2010 03:59:55 +0000 (03:59 +0000)]
Stylify of uudecode(1)
Part of PR bin/124739.

PR: bin/124739
Submitted by: Mark Andrews <marka@isc.org>

13 years agoFix a possible race where the directory dirent is moved to the location
kevlo [Mon, 18 Oct 2010 03:34:33 +0000 (03:34 +0000)]
Fix a possible race where the directory dirent is moved to the location
that was used by ".." entry.
This change seems fixed panic during attempt to access msdosfs data
over nfs.

Reviewed by: kib
MFC after: 1 week

13 years agoRe-add opt_mps.h and opt_cam.h, lost in the previous rev.
scottl [Sun, 17 Oct 2010 20:01:56 +0000 (20:01 +0000)]
Re-add opt_mps.h and opt_cam.h, lost in the previous rev.

13 years agoAdd myself to calendar.freebsd.
culot [Sun, 17 Oct 2010 19:02:42 +0000 (19:02 +0000)]
Add myself to calendar.freebsd.

Approved by: sahil@ (mentor)

13 years agoAdd an entry for myself to committers-ports.dot.
culot [Sun, 17 Oct 2010 18:48:51 +0000 (18:48 +0000)]
Add an entry for myself to committers-ports.dot.

Approved by: sahil@ (mentor)

13 years agoFix an XXX comment by answering 'no'. OS X does not set the day-of-week
nwhitehorn [Sun, 17 Oct 2010 17:31:49 +0000 (17:31 +0000)]
Fix an XXX comment by answering 'no'. OS X does not set the day-of-week
counter on SMU-based systems, which causes FreeBSD to reject the RTC time
when used in a dual-boot environment. Since we don't use the day-of-week
counter anyway, solve this by just not checking that it matches.

MFC after: 3 weeks

13 years ago- In oneshot-mode it doesn't make sense to try to compensate the clock
marius [Sun, 17 Oct 2010 16:46:54 +0000 (16:46 +0000)]
- In oneshot-mode it doesn't make sense to try to compensate the clock
  drift in order to achieve a more stable clock as the tick intervals may
  vary in the first place. In fact I haven't seen this code kick in when
  in oneshot-mode so just skip it in that case.
- There's no need to explicitly stop the (S)TICK counter in oneshot-mode
  with every tick as it just won't trigger again with the (S)TICK compare
  register set to a value in the past (with a wrap-around once every ~195
  years of uptime at 1.5 GHz this isn't something we have to worry about
  in practice).
- Given that we'll disable interrupts completely anyway there's no
  need to enter critical sections.

13 years agoDocument vunref(9), add some important notes for vrele(9) and vput(9).
kib [Sun, 17 Oct 2010 16:30:33 +0000 (16:30 +0000)]
Document vunref(9), add some important notes for vrele(9) and vput(9).
Merge all three manpages to one, removing separate file for vput(9).

MFC after: 1 week

13 years agoLog correct connection when canceling half-open connection.
pjd [Sun, 17 Oct 2010 15:47:27 +0000 (15:47 +0000)]
Log correct connection when canceling half-open connection.

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

13 years ago- Insert thread0 into correct thread hash link list.
davidxu [Sun, 17 Oct 2010 11:01:52 +0000 (11:01 +0000)]
- Insert thread0 into correct thread hash link list.
- In thr_exit() and kthread_exit(), only remove thread from
  hash if it can directly exit, otherwise let exit1() do it.
- In thread_suspend_check(), fix cleanup code when thread needs
  to exit.
This change seems fixed the "Bad link elm " panic found by
Peter Holm.

Stress testing: pho

13 years agoUse one fprintf() instead of two.
pjd [Sat, 16 Oct 2010 22:50:12 +0000 (22:50 +0000)]
Use one fprintf() instead of two.

MFC after: 3 days

13 years agoClear signal mask before executing a hook.
pjd [Sat, 16 Oct 2010 22:48:48 +0000 (22:48 +0000)]
Clear signal mask before executing a hook.

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

13 years agozfs: add vop_getpages method implementation
avg [Sat, 16 Oct 2010 20:43:05 +0000 (20:43 +0000)]
zfs: add vop_getpages method implementation

This should make vnode_pager_getpages path a bit shorter and clearer.
Also this should eliminate problems with partially valid pages.
Having this method opens room for future optimizations.

To do: try to satisfy other pages besides the required one taking into
account tradeofs between number of page faults, read throughput and read
latency.  Also, eventually vop_putpages should be added too.

Reviewed by: kib, mm, pjd
MFC after: 3 weeks

13 years agoMfP4 CH182763 (original version):
bz [Sat, 16 Oct 2010 19:53:22 +0000 (19:53 +0000)]
MfP4 CH182763 (original version):

Make it harder to exploit certain in_control() related races between the
intiial lookup at the beginning and the time we will remove the entry
from the lists by re-checking that entry is still in the list before
trying to remove it.

(*) It is believed that with the current code and locking strategy we
    cannot completely fix all race.

Reported by: Nima Misaghian (nima_misa hotmail.com) on net@ 20100817
Tested by: Nima Misaghian (nima_misa hotmail.com) (original version)
PR: kern/146250
Submitted by: Mikolaj Golub (to.my.trociny gmail.com) (different version)
MFC after: 1 week

13 years agoAllow umass to use bigger transactions for USB 3.0 devices. It is less
mav [Sat, 16 Oct 2010 19:29:37 +0000 (19:29 +0000)]
Allow umass to use bigger transactions for USB 3.0 devices. It is less
important for USB 2.0 devices and some of them reported to have problems
with large transactions. But USB 3.0 benchmarks show that limited number
of transactions per second on USB makes impossible to reach high transfer
speeds without using bigger transactions.

On my tests this change allows to read up to 220MB/s from USB-attached SSD
(at block size of 256-512KB), comparing to only 113MB/s without it.

Reviewed by: hselasky

13 years agoClose a race acquiring the IF_ADDR_LOCK() for each entry while iterating
bz [Sat, 16 Oct 2010 19:25:27 +0000 (19:25 +0000)]
Close a race acquiring the IF_ADDR_LOCK() for each entry while iterating
over all interfaces to make sure the address will neither change nor be
freed while we are working on it.

PR: kern/146250
Submitted by: Mikolaj Golub (to.my.trociny gmail.com)
MFC after: 1 week

13 years agolltable_drain() has never been used so far, thus #if 0 it for now.
bz [Sat, 16 Oct 2010 18:42:09 +0000 (18:42 +0000)]
lltable_drain() has never been used so far, thus #if 0 it for now.
While touching it add the missing locking to the now disabled code
for the time when we'll resurrect it.

MFC after: 3 days

13 years agoFix a grammatical error connected to the previous commit.
bcr [Sat, 16 Oct 2010 17:30:27 +0000 (17:30 +0000)]
Fix a grammatical error connected to the previous commit.

Spotted by: gjb@

13 years agoCorrect some typos in comments, no functional changes.
bcr [Sat, 16 Oct 2010 15:24:04 +0000 (15:24 +0000)]
Correct some typos in comments, no functional changes.

13 years agosh(1): Clarify subshells/processes for pipelines.
jilles [Sat, 16 Oct 2010 14:37:56 +0000 (14:37 +0000)]
sh(1): Clarify subshells/processes for pipelines.

For multi-command pipelines,
1. all commands are direct children of the shell (unlike the original
   Bourne shell)
2. all commands are executed in a subshell (unlike the real Korn shell)

MFC after: 1 week

13 years agosh: Use <stddef.h> rather than <sys/stddef.h>.
jilles [Sat, 16 Oct 2010 12:40:00 +0000 (12:40 +0000)]
sh: Use <stddef.h> rather than <sys/stddef.h>.

<sys/stddef.h> is only for the kernel and conflicts with <stddef.h>.

13 years ago- Add support for libusbhid in 32-bit compatibility mode.
hselasky [Sat, 16 Oct 2010 11:20:53 +0000 (11:20 +0000)]
- Add support for libusbhid in 32-bit compatibility mode.
- Add missing check for ugd_actlen being too small.
- Add missing inclusion guard to usbvar.h header file.
- This also fixes buildworld breakage since r213852.

13 years agoatrtc: remove (pre-)historic check of RTC NVRAM at address 0x0e
avg [Sat, 16 Oct 2010 10:45:36 +0000 (10:45 +0000)]
atrtc: remove (pre-)historic check of RTC NVRAM at address 0x0e

Old scrolls tell that once upon a time IBM AT BIOS was known to put some
useful system diagnostic information into RTC NVRAM.  It is not really
known if and for how long PC BIOSes followed that convention, but I
believe that many, if not all, modern BIOSes do not do that any more
(not mentioning other types of x86 firmware).
Some diagnostic bits don't even make any sense any longer.
The check results in confusing messages upon boot on some systems.
So I am removing it.

Discussed with: bde, jhb, mav
MFC after: 3 weeks

13 years agoDocument vfs.ncsizefactor and vfs.ncnegfactor.
kib [Sat, 16 Oct 2010 09:46:03 +0000 (09:46 +0000)]
Document vfs.ncsizefactor and vfs.ncnegfactor.

MFC after: 2 weeks

13 years agoProvide vfs.ncsizefactor instead of hard-coding namecache ratio.
kib [Sat, 16 Oct 2010 09:44:31 +0000 (09:44 +0000)]
Provide vfs.ncsizefactor instead of hard-coding namecache ratio.
Move debug.ncnegfactor to vfs.ncnegfactor [1].
Provide some descriptions for the namecache related sysctls [1].

Based on the submission by: Rogier R. Mulhuijzen <drwilco drwilco net> [1]
MFC after: 2 weeks
X-MFC-note: remove debug.ncnegfactor in HEAD after MFC

13 years agoRetire the system-wide, per-reassembly queue segment limit. The mechanism is far
lstewart [Sat, 16 Oct 2010 07:12:39 +0000 (07:12 +0000)]
Retire the system-wide, per-reassembly queue segment limit. The mechanism is far
too coarse grained to be useful and the default value significantly degrades TCP
performance on moderate to high bandwidth-delay product paths with non-zero loss
(e.g. 5+Mbps connections across the public Internet often suffer).

Replace the outgoing mechanism with an individual per-queue limit based on the
number of MSS segments that fit into the socket's receive buffer. This should
strike a good balance between performance and the potential for resource
exhaustion when FreeBSD is acting as a TCP receiver. With socket buffer
autotuning (which is enabled by default), the reassembly queue tracks the
socket buffer and benefits too.

As the XXX comment suggests, my testing uncovered some unexpected behaviour
which requires further investigation. By using so->so_rcv.sb_hiwat
instead of sbspace(&so->so_rcv), we allow more segments to be held across both
the socket receive buffer and reassembly queue than we probably should. The
tradeoff is better performance in at least one common scenario, versus a devious
sender's ability to consume more resources on a FreeBSD receiver.

Sponsored by: FreeBSD Foundation
Reviewed by: andre, gnn, rpaulo
MFC after: 2 weeks

13 years ago- Switch the "net.inet.tcp.reass.cursegments" and
lstewart [Sat, 16 Oct 2010 05:37:45 +0000 (05:37 +0000)]
- Switch the "net.inet.tcp.reass.cursegments" and
  "net.inet.tcp.reass.maxsegments" sysctl variables to be based on UMA zone
  stats. The value returned by the cursegments sysctl is approximate owing to
  the way in which uma_zone_get_cur is implemented.

- Discontinue use of V_tcp_reass_qsize as a global reassembly segment count
  variable in the reassembly implementation. The variable was used without
  proper synchronisation and was duplicating accounting done by UMA already. The
  lack of synchronisation was particularly problematic on SMP systems
  terminating many TCP sessions, resulting in poor TCP performance for
  connections with non-zero packet loss.

Sponsored by: FreeBSD Foundation
Reviewed by: andre, gnn, rpaulo (as part of a larger patch)
MFC after: 2 weeks

13 years agoChange uma_zone_set_max to return the effective value of "nitems" after
lstewart [Sat, 16 Oct 2010 04:41:45 +0000 (04:41 +0000)]
Change uma_zone_set_max to return the effective value of "nitems" after
rounding. The same value can also be obtained with uma_zone_get_max, but this
change avoids a caller having to make two back-to-back calls.

Sponsored by: FreeBSD Foundation
Reviewed by: gnn, jhb

13 years ago- Simplify implementation of uma_zone_get_max.
lstewart [Sat, 16 Oct 2010 04:14:45 +0000 (04:14 +0000)]
- Simplify implementation of uma_zone_get_max.
- Add uma_zone_get_cur which returns the current approximate occupancy of
  a zone. This is useful for providing stats via sysctl amongst other things.

Sponsored by: FreeBSD Foundation
Reviewed by: gnn, jhb
MFC after: 2 weeks

13 years agoConvert the PHY drivers to honor the mii_flags passed down and convert
marius [Fri, 15 Oct 2010 23:34:31 +0000 (23:34 +0000)]
Convert the PHY drivers to honor the mii_flags passed down and convert
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 to get rid of certain hacks. For
the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
  addresses; we now let mii_attach() only probe the PHY at the desired
  address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
  off from, partly even based on grabbing and using the softc of the
  parent; we now pass these flags down from the NIC to the PHY drivers
  via mii_attach(). This got us rid of all such hacks except those of
  brgphy() in combination with bce(4) and bge(4), which is way beyond
  what can be expressed with simple flags.

While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).

This file was missed in r213893.

13 years agoRemove unnecessary castings and fix couple of style(9) nits.
jkim [Fri, 15 Oct 2010 21:41:59 +0000 (21:41 +0000)]
Remove unnecessary castings and fix couple of style(9) nits.

13 years agoRemove two .endp's without matching .proc in lib/csu/ia64/crtn.S.
dim [Fri, 15 Oct 2010 21:40:20 +0000 (21:40 +0000)]
Remove two .endp's without matching .proc in lib/csu/ia64/crtn.S.
This allows it to assemble with newer binutils.

Reviewed by: marcel

13 years agoMove setting power state for children into a separate function as they were
jkim [Fri, 15 Oct 2010 21:39:51 +0000 (21:39 +0000)]
Move setting power state for children into a separate function as they were
essentially the same.  This also restores hw.pci.do_power_resume tunable,
which was broken since r211430.

Reviewed by: jhb

13 years agoAdd three new drivers for fan control and temperature reading on the
andreast [Fri, 15 Oct 2010 20:08:16 +0000 (20:08 +0000)]
Add three new drivers for fan control and temperature reading on the
PowerMac7,2.

- The fcu driver lets us read and write the fan RPMs for all fans in the
  PowerMac7,2. This driver is PowerMac specific.
- The ds1775 is a driver to read the temperature for the drive bay sensor.
- The max6690 is another driver to read temperatures. Here it is used to
  read the inlet, the backside and the U3 heatsink temperature.

An additional driver, the ad7417, will follow later.

Thanks to nwhitehorn for guiding me through this driver development.

Approved by: nwhitehorn (mentor)

13 years agosh: Allow running 'prove' from tools/regression/bin/sh again
jilles [Fri, 15 Oct 2010 20:01:35 +0000 (20:01 +0000)]
sh: Allow running 'prove' from tools/regression/bin/sh again
without needing to set special environment variables, testing the 'sh' from
PATH.

13 years agoNow that all previous users of mii_phy_probe() have been converted
marius [Fri, 15 Oct 2010 15:46:58 +0000 (15:46 +0000)]
Now that all previous users of mii_phy_probe() have been converted
in r213893 and r213894 to use mii_attach() instead remove the former
and along with it the "EVIL HACK".

MFC after: never

13 years agoCurrently only opt_compat.h is included by the mps(4) driver. Also
mdf [Fri, 15 Oct 2010 15:24:59 +0000 (15:24 +0000)]
Currently only opt_compat.h is included by the mps(4) driver. Also
enable /dev/mps0, which was missing from my previous patches enabling
f/w upload and download.

opt_compat.h issue noticed by scottl.

13 years agoUpdate pmap_extract() to handle 1GB page mappings. Some device drivers
alc [Fri, 15 Oct 2010 15:23:34 +0000 (15:23 +0000)]
Update pmap_extract() to handle 1GB page mappings.  Some device drivers
use pmap_extract() rather than pmap_kextract() on direct map addresses.
Thus, pmap_extract() needs to be able to deal with 1GB page mappings if
we are to use 1GB page mappings for the direct map.  (See r197580.)

13 years agoRemove a device_printf() accidentally left in r213894.
marius [Fri, 15 Oct 2010 15:16:36 +0000 (15:16 +0000)]
Remove a device_printf() accidentally left in r213894.

Submitted by: jhb

13 years agoConverted the remainder of the NIC drivers to use the mii_attach()
marius [Fri, 15 Oct 2010 15:00:30 +0000 (15:00 +0000)]
Converted the remainder of the NIC drivers to use the mii_attach()
introduced in r213878 instead of mii_phy_probe(). Unlike r213893 these
are only straight forward conversions though.

Reviewed by: yongari

13 years agoConvert the PHY drivers to honor the mii_flags passed down and convert
marius [Fri, 15 Oct 2010 14:52:11 +0000 (14:52 +0000)]
Convert the PHY drivers to honor the mii_flags passed down and convert
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 to get rid of certain hacks. For
the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
  addresses; we now let mii_attach() only probe the PHY at the desired
  address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
  off from, partly even based on grabbing and using the softc of the
  parent; we now pass these flags down from the NIC to the PHY drivers
  via mii_attach(). This got us rid of all such hacks except those of
  brgphy() in combination with bce(4) and bge(4), which is way beyond
  what can be expressed with simple flags.

While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).

Reviewed by: jhb, yongari

13 years agoPrevent the ofwdump manpage from being deleted by make delete-old on
nwhitehorn [Fri, 15 Oct 2010 14:34:34 +0000 (14:34 +0000)]
Prevent the ofwdump manpage from being deleted by make delete-old on
PowerPC.

13 years agoStop hard coding nm(1) and make it overridable.
jkim [Thu, 14 Oct 2010 23:31:58 +0000 (23:31 +0000)]
Stop hard coding nm(1) and make it overridable.

13 years agoEmbellish this testcase a little bit to be more clear what the output is
obrien [Thu, 14 Oct 2010 23:28:31 +0000 (23:28 +0000)]
Embellish this testcase a little bit to be more clear what the output is
and why.  The first case is correct usage which has but one correct output.
The 2nd and 3rd cases are incorrect usage in which the exact output is
not standardized and various shells give various allowable output.

13 years agoFixes to mps_user_command():
mdf [Thu, 14 Oct 2010 23:26:08 +0000 (23:26 +0000)]
Fixes to mps_user_command():
 - fix the leak of command struct on error
 - simplify the cleanup logic
 - EINPROGRESS is not a fatal error
 - buggy comment and error message

Reviewed by:   ken

13 years agoAdd new USB device IDs to the list of supported devices.
hselasky [Thu, 14 Oct 2010 22:14:55 +0000 (22:14 +0000)]
Add new USB device IDs to the list of supported devices.

PR: usb/151043
Approved by:    thompsa (mentor)

13 years ago- Add more USB devices to usbdevs and rename some previously unknown ones.
hselasky [Thu, 14 Oct 2010 22:06:52 +0000 (22:06 +0000)]
- Add more USB devices to usbdevs and rename some previously unknown ones.
- Add more USB mass storage quirks.

Submitted by: Dmitry Luhtionov
PR: usb/149934, usb/143045
Approved by:    thompsa (mentor)

13 years agoAdd a NetBSD-compatible mii_attach(), which is intended to eventually
marius [Thu, 14 Oct 2010 22:01:40 +0000 (22:01 +0000)]
Add a NetBSD-compatible mii_attach(), which is intended to eventually
replace mii_phy_probe() altogether. Compared to the latter the advantages
of mii_attach() are:
- intended to be called multiple times in order to attach PHYs in multiple
  passes (f.e. in order to only use sub-ranges of the 0 to MII_NPHY - 1
  range)
- being able to pass along the capability mask from the NIC to the PHY
  drivers
- being able to specify at which address (phyloc) to probe for a PHY
  (instead of always probing at all addresses from 0 to MII_NPHY - 1)
- being able to specify which PHY instance (offloc) to attach
- being able to pass along MIIF_* flags from the NIC to the PHY drivers
  (f.e. as required to indicated to the PHY drivers that flow control is
  supported by the NIC driver, which actually is the motivation for this
  change).

While at it, I used the opportunity to get rid of some hacks in mii(4)
like miibus_probe() generally doing work besides sheer probing and the
"EVIL HACK" (which will vanish entirely along with mii_phy_probe()) by
passing the struct ifnet pointer via an argument of mii_attach() as well
as to fix some resource leaks in mii(4) in case something fails.
Commits which will update the PHY drivers to honor the MII flags passed
down from the NIC drivers and take advantage of mii_attach() to get rid
of certain types of hacks in NIC and PHY drivers as well as a conversion
of the remaining uses of mii_phy_probe() will follow shortly.

Reviewed by: jhb, yongari
Obtained from: NetBSD (partially)

13 years agoAdd more USB device IDs to supported list of devices.
hselasky [Thu, 14 Oct 2010 21:53:42 +0000 (21:53 +0000)]
Add more USB device IDs to supported list of devices.

Submitted by: Nick Hibma
PR: usb/149900
Approved by:    thompsa (mentor)

13 years agoUpdate manual with regarding to the status of calendars/calendar.judaic.
edwin [Thu, 14 Oct 2010 21:53:25 +0000 (21:53 +0000)]
Update manual with regarding to the status of calendars/calendar.judaic.

13 years agoExplicitly lower the PIL to 0 as part of enabling interrupts, similar to
marius [Thu, 14 Oct 2010 21:46:53 +0000 (21:46 +0000)]
Explicitly lower the PIL to 0 as part of enabling interrupts, similar to
what is done on other platforms. Unlike as with the sched_throw(NULL)
called on BSPs during their startup apparently there's nothing which will
reliably lower it on APs. I'm unsure why this only came up on V215 though,
breaking these with r207248. My best guess is that these are the only
supported ones so far fast enough to loose some race.

PR: 151404
MFC after: 3 days

13 years agoFix forwarding of Line Register Status changes to TTY layer.
hselasky [Thu, 14 Oct 2010 21:45:41 +0000 (21:45 +0000)]
Fix forwarding of Line Register Status changes to TTY layer.

PR: usb/149675
Approved by:    thompsa (mentor)

13 years agoRemove unused EHCI register definition.
hselasky [Thu, 14 Oct 2010 21:41:08 +0000 (21:41 +0000)]
Remove unused EHCI register definition.
Define reserved EHCI register.

Approved by:    thompsa (mentor)

13 years agoRevert most of r197682 (EHCI Hardware BUG workaround). Implement
hselasky [Thu, 14 Oct 2010 21:38:06 +0000 (21:38 +0000)]
Revert most of r197682 (EHCI Hardware BUG workaround). Implement
proper solution which is to not use the TERMINATE pointer, but rather
link to a halted TD. The initial fix was due to a misunderstanding
about how the EHCI hardware works. Thanks to Alan Stern for clearing
this up. This patch can increase mass storage read performance
significantly when the IRQ rate is less than 8000 IRQ/s.

Approved by:    thompsa (mentor)

13 years ago- In the spirit of r212559 add a comment describing what will eventually
marius [Thu, 14 Oct 2010 21:34:53 +0000 (21:34 +0000)]
- In the spirit of r212559 add a comment describing what will eventually
  lower the PIL.
- Just as with the AP ensure that the (S)TICK timer(s) are in a known
  state when starting BSPs.

13 years agoJust like xmphy(4) this driver doesn't use any of the generic subroutines
marius [Thu, 14 Oct 2010 21:30:13 +0000 (21:30 +0000)]
Just like xmphy(4) this driver doesn't use any of the generic subroutines
so there's no need to fill mii_{ext,}capabilities either.

13 years agoAvoid using endless retransmission at EHCI hardware level, hence this hide
hselasky [Thu, 14 Oct 2010 21:26:06 +0000 (21:26 +0000)]
Avoid using endless retransmission at EHCI hardware level, hence this hide
errors from the applications. Only use endless retransmission while in the
non-addressed state on a High-Speed device.

Approved by:    thompsa (mentor)

13 years agoCorrect EHCI root HUB interface descriptor.
hselasky [Thu, 14 Oct 2010 21:18:18 +0000 (21:18 +0000)]
Correct EHCI root HUB interface descriptor.

Approved by:    thompsa (mentor)

13 years agoCorrect EHCI port register read.
hselasky [Thu, 14 Oct 2010 21:14:33 +0000 (21:14 +0000)]
Correct EHCI port register read.

Approved by:    thompsa (mentor)

13 years ago- Add more USB devices to usbdevs and rename some previously unknown ones.
hselasky [Thu, 14 Oct 2010 21:09:37 +0000 (21:09 +0000)]
- Add more USB devices to usbdevs and rename some previously unknown ones.
- Add more USB mass storage quirks.

Submitted by: Dmitry Luhtionov
PR: usb/149934, usb/143045
Approved by:    thompsa (mentor)

13 years ago- Add missing LibUSB API functions:
hselasky [Thu, 14 Oct 2010 20:50:33 +0000 (20:50 +0000)]
- Add missing LibUSB API functions:
  * libusb_strerror()
  * libusb_get_driver[_np]()
  * libusb_detach_kernel_driver[_np]()
- Factor out setting of non-blocking flag inside libusb.
- Add missing NULL check after libusb_get_device() call.
- Correct some wrong error codes due to copy and paste error.

PR: usb/150546
Submitted by: Robert Jenssen, Alexander Leidinger
Approved by:    thompsa (mentor)

13 years ago- Add support for LibUSB in 32-bit compatibility mode.
hselasky [Thu, 14 Oct 2010 20:38:18 +0000 (20:38 +0000)]
- Add support for LibUSB in 32-bit compatibility mode.

Approved by:    thompsa (mentor)

13 years ago- Fix some compile warnings regarding comparing signed to unsigned.
hselasky [Thu, 14 Oct 2010 20:18:39 +0000 (20:18 +0000)]
- Fix some compile warnings regarding comparing signed to unsigned.

Approved by:    thompsa (mentor)

13 years agoLibUSB (new API):
hselasky [Thu, 14 Oct 2010 20:04:36 +0000 (20:04 +0000)]
LibUSB (new API):
- Add a new API function to check the connected
status of the USB handle in the LibUSB v1.0 and
LibUSB v0.1 interfaces.

Approved by:    thompsa (mentor)

13 years agoRemove stale comment.
kib [Thu, 14 Oct 2010 19:30:44 +0000 (19:30 +0000)]
Remove stale comment.

Submitted by: arundel
MFC after: 3 days

13 years agoRevert r213765. This is required because our build infrastructure uses
rpaulo [Thu, 14 Oct 2010 19:19:19 +0000 (19:19 +0000)]
Revert r213765. This is required because our build infrastructure uses
the host lex instead of the lex built during buildworld. I will MFC the
lex changes soon and in a few weeks this I'll commit again r213765.

13 years agoMake sure to not use stale ip/tcp header pointers. The ip/tcp
yongari [Thu, 14 Oct 2010 18:31:40 +0000 (18:31 +0000)]
Make sure to not use stale ip/tcp header pointers. The ip/tcp
header parser uses m_pullup(9) to get access to mbuf chain.
m_pullup(9) can allocate new mbuf chain and free old one if the
space left in the mbuf chain is not enough to hold requested
contiguous bytes. Previously drivers can use stale ip/tcp header
pointer if m_pullup(9) returned new mbuf chain.

Reported by: Andrew Boyer (aboyer <> averesystems dot com)
MFC after: 10 days

13 years agoBackout r204230. TX mbuf parser for VLAN is still required to
yongari [Thu, 14 Oct 2010 17:57:52 +0000 (17:57 +0000)]
Backout r204230. TX mbuf parser for VLAN is still required to
enable TX checksum offloading if VLAN hardware tagging is disabled.

13 years agoIt seems some multi-port dc(4) controllers shares SROM of the first
yongari [Thu, 14 Oct 2010 17:22:38 +0000 (17:22 +0000)]
It seems some multi-port dc(4) controllers shares SROM of the first
port such that reading station address from second port always
returned 0xFF:0xFF:0xFF:0xFF:0xFF:0xFF Unfortunately it seems there
is no easy way to know whether SROM is shared or not. Workaround
the issue by traversing dc(4) device list and see whether we're
using second port and use station address of controller 0 as base
station address of second port.

PR: kern/79262
MFC after: 2 weeks

13 years agoSupport firmware download.
mdf [Thu, 14 Oct 2010 16:44:44 +0000 (16:44 +0000)]
Support firmware download.

13 years agoRe-work the internals of adding items to the driver's scatter-gather
mdf [Thu, 14 Oct 2010 16:44:05 +0000 (16:44 +0000)]
Re-work the internals of adding items to the driver's scatter-gather
list.  Use the new internals to simplify adding transaction context
elements, and in future diffs, more complicated SGLs.

13 years agoRemove dead code:
bz [Thu, 14 Oct 2010 15:15:22 +0000 (15:15 +0000)]
Remove dead code:
assignment to a local variable not used anywhere after that.

MFC after: 3 days

13 years agoStyle: make the asterisk go with the variable name, not the type.
bz [Thu, 14 Oct 2010 14:49:49 +0000 (14:49 +0000)]
Style: make the asterisk go with the variable name, not the type.

MFC after: 3 days

13 years agoAdd FreeBSD 8.2.
jh [Thu, 14 Oct 2010 14:48:11 +0000 (14:48 +0000)]
Add FreeBSD 8.2.

Reviewed by: ru
MFC after: 3 days

13 years agoUse ifa_ifwithaddr_check() rather than ifa_ifwithaddr() as we are not
bz [Thu, 14 Oct 2010 12:32:49 +0000 (12:32 +0000)]
Use ifa_ifwithaddr_check() rather than ifa_ifwithaddr() as we are not
interested in the result and would leak a reference otherwise.

PR: kern/151435
Submitted by: Andrew Boyer (aboyer averesystems.com)
MFC after: 3 days

13 years agoEnable the shared memory reference clock driver. The GPS devices are
glebius [Thu, 14 Oct 2010 11:20:23 +0000 (11:20 +0000)]
Enable the shared memory reference clock driver. The GPS devices are
getting more and more popular, as source of precise time, and the gpsd
daemon from ports is using the shared memory to synchronize with ntpd.

Reviewed by: roberto

13 years agoIn kern_sigtimedwait(), move initialization code out of process lock,
davidxu [Thu, 14 Oct 2010 08:01:33 +0000 (08:01 +0000)]
In kern_sigtimedwait(), move initialization code out of process lock,
instead of using SIGISMEMBER to test every interesting signal, just
unmask the signal set and let cursig() return one, get the signal
after it returns, call reschedule_signal() after signals are blocked
again.

In kern_sigprocmask(), don't call reschedule_signal() when it is
unnecessary.

In reschedule_signal(), replace SIGISEMPTY() + SIGISMEMBER() with
sig_ffs(), rename variable 'i' to sig.

13 years agoWe only need to look as far as '..' to find 'test/'.
obrien [Wed, 13 Oct 2010 23:31:17 +0000 (23:31 +0000)]
We only need to look as far as '..' to find 'test/'.

13 years agoDo not assume in growstackstr() that a "precious" character will be
obrien [Wed, 13 Oct 2010 23:29:09 +0000 (23:29 +0000)]
Do not assume in growstackstr() that a "precious" character will be
immediately written into the stack after the call.  Instead let the caller
manage the "space left".

Previously, growstackstr()'s assumption causes problems with STACKSTRNUL()
where we want to be able to turn a stack into a C string, and later
pretend the NUL is not there.

This fixes a bug in STACKSTRNUL() (that grew the stack) where:
1. STADJUST() called after a STACKSTRNUL() results in an improper adjust.
   This can be seen in ${var%pattern} and ${var%%pattern} evaluation.
2. Memory leak in STPUTC() called after a STACKSTRNUL().

Reviewed by: jilles

13 years agoUse a safer mechanism for determining if a task is currently running,
mdf [Wed, 13 Oct 2010 22:59:04 +0000 (22:59 +0000)]
Use a safer mechanism for determining if a task is currently running,
that does not rely on the lifetime of pointers being the same. This also
restores the task KBI.

Suggested by: jhb
MFC after: 1 month

13 years agoFix a regression introduced in r213710. r213710 removed the use of
yongari [Wed, 13 Oct 2010 22:29:48 +0000 (22:29 +0000)]
Fix a regression introduced in r213710. r213710 removed the use of
auto polling such that it made all controllers obtain link status
information from the state of the LNKRDY input signal. Broadcom
recommends disabling auto polling such that driver should rely on
PHY interrupts for link status change indications. Unfortunately it
seems some controllers(BCM5703, BCM5704 and BCM5705) have PHY
related issues so Linux took other approach to workaround it.
bge(4) didn't follow that and it used to enable auto polling to
workaround it. Restore this old behavior for BCM5700 family
controllers and BCM5705 to use auto polling. For BCM5700 and
BCM5701, it seems it does not need to enable auto polling but I
restored it for safety.
Special thanks to marius who tried lots of patches with patience.

Reported by: marius
Tested by: marius

13 years agoIn the spirit of r90111, depend on c89 and remove the "STATIC" macro
obrien [Wed, 13 Oct 2010 22:18:03 +0000 (22:18 +0000)]
In the spirit of r90111, depend on c89 and remove the "STATIC" macro
and its usage.

13 years agodocument logging through bpf
luigi [Wed, 13 Oct 2010 22:07:57 +0000 (22:07 +0000)]
document logging through bpf

13 years agoUSB network (NCM driver):
hselasky [Wed, 13 Oct 2010 22:04:55 +0000 (22:04 +0000)]
USB network (NCM driver):
- correct the ethernet payload remainder which
must be post-offseted by -14 bytes instead of
0 bytes. This is not very clearly defined in the
NCM specification.
- add development feature about limiting the
maximum datagram count in each NCM payload.
- zero-pad alignment data
- add TX-interval tuning sysctl

Approved by:    thompsa (mentor)