]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoNote in rc.conf(5) that jail_list should contain only alphanumeric
gjb [Sun, 5 Sep 2010 20:04:54 +0000 (20:04 +0000)]
Note in rc.conf(5) that jail_list should contain only alphanumeric
characters.

PR: 150098
Submitted by: cc (cpt_complain at yahoo dot com)
Approved by: keramida (mentor)
MFC after: 1 week

13 years agoAdd support for the Sharp/Micron flash chips to powermac_mvram(4).
mav [Sun, 5 Sep 2010 20:04:02 +0000 (20:04 +0000)]
Add support for the Sharp/Micron flash chips to powermac_mvram(4).
Tested on PowerMac G4 AGP.

Reviewed by: nwhitehorn

13 years agoMake nexus report name and compat fields as pnpinfo for devices on the
mav [Sun, 5 Sep 2010 19:57:24 +0000 (19:57 +0000)]
Make nexus report name and compat fields as pnpinfo for devices on the
first level of hierarchy, same as done on deeper levels.

13 years agoSeveral improvements to HPET driver:
mav [Sun, 5 Sep 2010 19:24:32 +0000 (19:24 +0000)]
Several improvements to HPET driver:
 - Add special check for case when time expires before being programmed.
This fixes interrupt loss and respectively timer death on attempt to
program very short interval. Increase minimal supported period to more
realistic value.
 - Add support for hint.hpet.X.allowed_irqs tunable, allowing manually
specify which interrupts driver allowed to use. Unluckily, many BIOSes
program wrong allowed interrupts mask, so driver tries to stay on safe
side by not using unshareable ISA IRQs. This option gives control over
this limitation, allowing more per-CPU timers to be provided, when FSB
interrupts are not supported. Value of this tunable is bitmask.
 - Do not use regular interrupts on virtual machines. QEMU and VirtualBox
do not support them properly, that may cause problems. Stay safe by default.
Same time both QEMU and VirtualBox work fine in legacy_route mode.
VirtualBox also works fine if manually specify allowed ISA IRQs with above.

13 years agolibedit: Try to map <Delete> to ed-delete-next-char.
jilles [Sun, 5 Sep 2010 16:12:10 +0000 (16:12 +0000)]
libedit: Try to map <Delete> to ed-delete-next-char.

This adds a new "arrow" key "delete" corresponding to the kD termcap value.
It only works if that is a sequence such as "\033[3~"; if it is "\177", the
em-delete-prev-char or ed-delete-prev-char from the single-character
mappings remains. It turns out that most terminals (xterm and alikes,
syscons in xterm mode) produce "\033[3~" by default so <Delete> has the
expected effect.

This also means that things need to be considerably misconfigured for
<Backspace> to perform a <Delete> action.

13 years agoDocument "show cdev" command.
kib [Sun, 5 Sep 2010 14:52:27 +0000 (14:52 +0000)]
Document "show cdev" command.

MFC after: 3 days

13 years agoDocument MAKEDEV_ETERNAL.
kib [Sun, 5 Sep 2010 14:47:46 +0000 (14:47 +0000)]
Document MAKEDEV_ETERNAL.

MFC after: 3 days

13 years agoFix some CLANG warnings. One clang warning is left
rrs [Sun, 5 Sep 2010 13:41:45 +0000 (13:41 +0000)]
Fix some CLANG warnings. One clang warning is left
due to the fact that its bogus.. nam->sa_family will
not change from AF_INET6 to AF_INET (but clang
thinks it does ;-D)

13 years agoFix invalid class removal when IAF is not the last class.
fabient [Sun, 5 Sep 2010 13:31:14 +0000 (13:31 +0000)]
Fix invalid class removal when IAF is not the last class.
Keep IAF class with 0 PMC and change the alias in libpmc to IAP.

MFC after: 1 week

13 years agoInitialize buffer for case of empty string. Happens only on non-refactored
mav [Sun, 5 Sep 2010 06:16:04 +0000 (06:16 +0000)]
Initialize buffer for case of empty string. Happens only on non-refactored
platforms.

13 years agoAvoid to try to remove suj journal file (.sujournal) and conventional
daichi [Sun, 5 Sep 2010 05:44:40 +0000 (05:44 +0000)]
Avoid to try to remove suj journal file (.sujournal) and conventional
snapshot directory (.snap) from cleartmp rc.d script.

13 years agoAllowed unionfs to use whiteout not supporting file system as
daichi [Sun, 5 Sep 2010 04:58:16 +0000 (04:58 +0000)]
Allowed unionfs to use whiteout not supporting file system as
upper layer. Until now, unionfs prevents to use that kind of
file system as upper layer. This time, I changed to allow
that kind of file system as upper layer. By this change, you
can use whiteout not supporting file system (e.g., especially
for tmpfs) as upper layer. It's very useful for combination of
tmpfs as upper layer and read only file system as lower layer.

By difinition, without whiteout support from the file system
backing the upper layer, there is no way that delete and rename
operations on lower layer objects can be done.  EOPNOTSUPP is
returned for this kind of operations as generated by VOP_WHITEOUT()
along with any others which would make modifica tions to the
lower layer, such as chmod(1).

This change is suggested by ed.

Submitted by: ed

13 years agoAdd myself to commiters-ports.dot
swills [Sun, 5 Sep 2010 01:58:21 +0000 (01:58 +0000)]
Add myself to commiters-ports.dot

Approved By: pgollucci (co-mentor)

13 years agoAdd myself to calendar.freebsd
swills [Sun, 5 Sep 2010 01:57:25 +0000 (01:57 +0000)]
Add myself to calendar.freebsd

Approved By: pgollucci (co-mentor)

13 years agoChange the code in ncl_bioread() in the experimental NFS
rmacklem [Sun, 5 Sep 2010 00:47:44 +0000 (00:47 +0000)]
Change the code in ncl_bioread() in the experimental NFS
client to return an error when rabp is not set, so it
behaves the same way as the regular NFS client for this
case. It does not affect NFSv4, since nfs_getcacheblk()
only fails for "intr" mounts and NFSv4 can't use the
"intr" mount option.

MFC after: 2 weeks

13 years agoDisable use of the NLM in the experimental NFS client, since
rmacklem [Sun, 5 Sep 2010 00:10:18 +0000 (00:10 +0000)]
Disable use of the NLM in the experimental NFS client, since
it will crash the kernel because it uses the nfsmount and
nfsnode structures of the regular NFS client.

MFC after: 2 weeks

13 years agosh: Get rid of some magic numbers.
jilles [Sat, 4 Sep 2010 21:23:46 +0000 (21:23 +0000)]
sh: Get rid of some magic numbers.

MFC after: 1 week

13 years agostruct device: widen type of flags and order fields to u_int
avg [Sat, 4 Sep 2010 17:28:29 +0000 (17:28 +0000)]
struct device: widen type of flags and order fields to u_int

Also change int -> u_int for order parameter in device_add_child_ordered.
There should not be any ABI change as struct device is private to subr_bus.c
and the API change should be compatible.

To do: change int -> u_int for order parameter of bus_add_child method
and its implementations.  The change should also be API compatible, but
is a bit more churn.

Suggested by: imp, jhb
MFC after: 1 week

13 years agoFix a compile problem introduced with r212008 on 32bit:
bz [Sat, 4 Sep 2010 16:27:14 +0000 (16:27 +0000)]
Fix a compile problem introduced with r212008 on 32bit:

Both deadline and current_time are time_seconds (+ utc_offset())
casted to unsigned long long. No need to cast to or print as pointers.

MFC after: 4 days

13 years agoIn case of RADIX_MPATH do not leak the IN_IFADDR read lock on
bz [Sat, 4 Sep 2010 16:06:01 +0000 (16:06 +0000)]
In case of RADIX_MPATH do not leak the IN_IFADDR read lock on
early return.

MFC after: 3 days

13 years agoShut the compiler up; initializes the sotype variable to zero in
kevlo [Sat, 4 Sep 2010 08:42:19 +0000 (08:42 +0000)]
Shut the compiler up; initializes the sotype variable to zero in
nfs_tryproto().

Reviewed by: rmacklem

13 years agolibedit: Do not move the cursor for ed-delete-next-char in emacs mode.
jilles [Fri, 3 Sep 2010 22:24:26 +0000 (22:24 +0000)]
libedit: Do not move the cursor for ed-delete-next-char in emacs mode.

This makes ed-delete-next-char suitable for mapping to the <Delete> key.

Behaviour in vi mode is unchanged (for 'x').

13 years agosh: Do not use locale for determining if something is a name.
jilles [Fri, 3 Sep 2010 22:13:54 +0000 (22:13 +0000)]
sh: Do not use locale for determining if something is a name.

This makes it impossible to use locale-specific characters in variable
names.

Names containing locale-specific characters make scripts only work with the
correct locale setting. Also, they did not even work in many practical cases
because multibyte character sets such as utf-8 are not supported.

This also avoids weirdness if LC_CTYPE is changed in the middle of a script.

13 years agosh: Add a test that 'read' leaves the file pointer at the correct place.
jilles [Fri, 3 Sep 2010 21:17:33 +0000 (21:17 +0000)]
sh: Add a test that 'read' leaves the file pointer at the correct place.

Naive buffering would break the common while read x... construct, which did
not appear to be tested yet.

13 years agoFix another bug introduced in r212109. We should unload DMA maps
yongari [Fri, 3 Sep 2010 18:00:17 +0000 (18:00 +0000)]
Fix another bug introduced in r212109. We should unload DMA maps
only after sending the last fragment of a frame so the mbuf pointer
also should be stored in the last descriptor index.

13 years agoUse a better #if guard.
mdf [Fri, 3 Sep 2010 17:42:17 +0000 (17:42 +0000)]
Use a better #if guard.

Suggested by pluknet <pluknet at gmail dot com>.

13 years agoStyle(9) fixes and eliminate the use of min().
mdf [Fri, 3 Sep 2010 17:42:12 +0000 (17:42 +0000)]
Style(9) fixes and eliminate the use of min().

13 years agoFix user-space libsbuf build. Why isn't CTASSERT available to
mdf [Fri, 3 Sep 2010 17:23:26 +0000 (17:23 +0000)]
Fix user-space libsbuf build.  Why isn't CTASSERT available to
user-space?

13 years agoFix brain fart when converting an if statement into a KASSERT.
mdf [Fri, 3 Sep 2010 16:12:39 +0000 (16:12 +0000)]
Fix brain fart when converting an if statement into a KASSERT.

13 years agoUse math rather than iteration when the desired sbuf size is larger than
mdf [Fri, 3 Sep 2010 16:09:17 +0000 (16:09 +0000)]
Use math rather than iteration when the desired sbuf size is larger than
SBUF_MAXEXTENDSIZE.

13 years agoChange the parameter passed to the inline assembly to u_short
rdivacky [Fri, 3 Sep 2010 14:25:17 +0000 (14:25 +0000)]
Change the parameter passed to the inline assembly to u_short
as we are dealing with 16bit segment registers. Change mov
to movw.

Approved by:    rpaulo (mentor)
Reviewed by:    kib, rink

13 years agoWhen an asm location cannot be resolved to a function the cost
fabient [Fri, 3 Sep 2010 13:54:02 +0000 (13:54 +0000)]
When an asm location cannot be resolved to a function the cost
will be spread as small value and then filtered by the threshold.
As a first step solution display the number of event that cannot
be resolved as a valid function location.

MFC after: 1week

13 years agovm_page.c: include opt_msgbuf.h for MSGBUF_SIZE use in vm_page_startup
avg [Fri, 3 Sep 2010 10:40:53 +0000 (10:40 +0000)]
vm_page.c: include opt_msgbuf.h for MSGBUF_SIZE use in vm_page_startup

vm_page_startup uses MSGBUF_SIZE value for adding msgbuf pages to minidump.
If opt_msgbuf.h is not included and MSGBUF_SIZE is overriden in kernel
config, then not all msgbuf pages will be dumped.  And most importantly,
struct msgbuf itself will not be included.  Thus the dump would look
corrupted/incomplete to tools like kgdb, dmesg, etc that try to access
struct msgbuf as one of the first things they do when working on a crash
dump.

MFC after: 5 days

13 years agoWe need to copy the ports config files before we launch the prefetch
phk [Fri, 3 Sep 2010 09:34:15 +0000 (09:34 +0000)]
We need to copy the ports config files before we launch the prefetch

13 years agoacpi: update stale comments about order of cpu devices probing
avg [Fri, 3 Sep 2010 08:07:04 +0000 (08:07 +0000)]
acpi: update stale comments about order of cpu devices probing

These comments should have been updated in r203776 when the order was
changed.

Pointyhat to: avg
MFC after: 3 days

13 years ago- Bump MAXCPU to 4. Tested on a quad G5 with both 32 and 64-bit kernels.
grehan [Fri, 3 Sep 2010 03:56:09 +0000 (03:56 +0000)]
- Bump MAXCPU to 4. Tested on a quad G5 with both 32 and 64-bit kernels.
A make buildkernel -j4 uses ~360% CPU.
- Bracket the AP spinup printf with a mutex to avoid garbled output.
- Enable SMP by default on powerpc64.

Reviewed by: nwhitehorn

13 years agoAllow / in the NANO_DEVICE
imp [Fri, 3 Sep 2010 03:48:06 +0000 (03:48 +0000)]
Allow / in the NANO_DEVICE

PR: 149729
Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org>

13 years agofix the move so that it matches what the rest of the internet
jmg [Fri, 3 Sep 2010 03:20:34 +0000 (03:20 +0000)]
fix the move so that it matches what the rest of the internet
says about this game...  This move also makes more sense...

MFC after: 1 week

13 years agoInitial WOL support. NS DP8315 was tested but SiS900/SiS7016 was
yongari [Fri, 3 Sep 2010 00:34:45 +0000 (00:34 +0000)]
Initial WOL support. NS DP8315 was tested but SiS900/SiS7016 was
not tested.
While I'm here, clean up SIOCSIFCAP handler.

13 years agoImplement initial device suspend/resume method.
yongari [Thu, 2 Sep 2010 22:37:13 +0000 (22:37 +0000)]
Implement initial device suspend/resume method.

13 years agoIn the case of non-sequential mappings, ofw_mapmem() could ask Open
nwhitehorn [Thu, 2 Sep 2010 22:26:49 +0000 (22:26 +0000)]
In the case of non-sequential mappings, ofw_mapmem() could ask Open
Firmware to map a memory region with negative length, causing crashes
and Undefined Behavior. Add the appropriate check to make the behavior
defined.

13 years agoAdding a missing firstname (Monique)
edwin [Thu, 2 Sep 2010 21:48:35 +0000 (21:48 +0000)]
Adding a missing firstname (Monique)

PR: conf/150049
Submitted by: Thierry Thomas <thierry@pompo.net>

13 years agoCorrect spelling mistake, int -> into
gavin [Thu, 2 Sep 2010 21:29:50 +0000 (21:29 +0000)]
Correct spelling mistake, int -> into

MFC after: 3 days

13 years agoBetter wording.
yongari [Thu, 2 Sep 2010 20:43:01 +0000 (20:43 +0000)]
Better wording.

Submitted by: jkim

13 years agoCorrect bioq_disksort so that bioq_insert_tail() offers barrier semantic.
gibbs [Thu, 2 Sep 2010 19:40:28 +0000 (19:40 +0000)]
Correct bioq_disksort so that bioq_insert_tail() offers barrier semantic.
Add the BIO_ORDERED flag for struct bio and update bio clients to use it.

The barrier semantics of bioq_insert_tail() were broken in two ways:

 o In bioq_disksort(), an added bio could be inserted at the head of
   the queue, even when a barrier was present, if the sort key for
   the new entry was less than that of the last queued barrier bio.

 o The last_offset used to generate the sort key for newly queued bios
   did not stay at the position of the barrier until either the
   barrier was de-queued, or a new barrier (which updates last_offset)
   was queued.  When a barrier is in effect, we know that the disk
   will pass through the barrier position just before the
   "blocked bios" are released, so using the barrier's offset for
   last_offset is the optimal choice.

sys/geom/sched/subr_disk.c:
sys/kern/subr_disk.c:
o Update last_offset in bioq_insert_tail().

o Only update last_offset in bioq_remove() if the removed bio is
  at the head of the queue (typically due to a call via
  bioq_takefirst()) and no barrier is active.

o In bioq_disksort(), if we have a barrier (insert_point is non-NULL),
  set prev to the barrier and cur to it's next element.  Now that
  last_offset is kept at the barrier position, this change isn't
  strictly necessary, but since we have to take a decision branch
  anyway, it does avoid one, no-op, loop iteration in the while
  loop that immediately follows.

o In bioq_disksort(), bypass the normal sort for bios with the
  BIO_ORDERED attribute and instead insert them into the queue
  with bioq_insert_tail().  bioq_insert_tail() not only gives
  the desired command order during insertion, but also provides
  barrier semantics so that commands disksorted in the future
  cannot pass the just enqueued transaction.

sys/sys/bio.h:
Add BIO_ORDERED as bit 4 of the bio_flags field in struct bio.

sys/cam/ata/ata_da.c:
sys/cam/scsi/scsi_da.c
Use an ordered command for SCSI/ATA-NCQ commands issued in
response to bios with the BIO_ORDERED flag set.

sys/cam/scsi/scsi_da.c
Use an ordered tag when issuing a synchronize cache command.

Wrap some lines to 80 columns.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
sys/geom/geom_io.c
Mark bios with the BIO_FLUSH command as BIO_ORDERED.

Sponsored by: Spectra Logic Corporation
MFC after: 1 month

13 years agoDocument tunable dev.sis.%unit.manual_pad
yongari [Thu, 2 Sep 2010 18:22:06 +0000 (18:22 +0000)]
Document tunable dev.sis.%unit.manual_pad
While I'm here Xref vlan(4) as sis(4) supports VLAN oversized
frames.

13 years agoEnable sis(4). sis(4) should work on all architectures.
yongari [Thu, 2 Sep 2010 18:12:54 +0000 (18:12 +0000)]
Enable sis(4). sis(4) should work on all architectures.

13 years agoUnlike most other controllers, NS DP83815/DP83816 controllers seem
yongari [Thu, 2 Sep 2010 18:10:11 +0000 (18:10 +0000)]
Unlike most other controllers, NS DP83815/DP83816 controllers seem
to pad with 0xFF when it encounter short frames.  According to RFC
1042 the pad bytes should be 0x00.
Because manual padding consumes extra CPU cycles, introduce a new
tunable which controls the padding behavior. Turning this tunable
on will have driver pad manually but it's disabled by default. Users
can enable software padding by setting the following tunable to
non-zero value.

dev.sis.%d.manual_pad="1"

PR: kern/35422 (patch not used)

13 years agoFix the last endianness issue on handling station address which
yongari [Thu, 2 Sep 2010 17:51:41 +0000 (17:51 +0000)]
Fix the last endianness issue on handling station address which
prevented driver from working on big-endian machines. Also rewrite
station address programming to make it work on strict-alignment
architectures. With this change, sis(4) now works on sparc64 and
performance number looks good even though sis(4) have to apply
fixup code to align received frames on 2 bytes boundary on sparc64.

13 years agoMFp4 CH=183052 183053 183258:
bz [Thu, 2 Sep 2010 17:43:44 +0000 (17:43 +0000)]
MFp4 CH=183052 183053 183258:

  In protosw we define pr_protocol as short, while on the wire
  it is an uint8_t.  That way we can have "internal" protocols
  like DIVERT, SEND or gaps for modules (PROTO_SPACER).
  Switch ipproto_{un,}register to accept a short protocol number(*)
  and do an upfront check for valid boundries. With this we
  also consistently report EPROTONOSUPPORT for out of bounds
  protocols, as we did for proto == 0.  This allows a caller
  to not error for this case, which is especially important
  if we want to automatically call these from domain handling.

  (*) the functions have been without any in-tree consumer
  since the initial introducation, so this is considered save.

  Implement ip6proto_{un,}register() similarly to their legacy IP
  counter parts to allow modules to hook up dynamically.

Reviewed by: philip, will
MFC after: 1 week

13 years agoDisable video ROM shadowing by default as I originally intended. I found
jkim [Thu, 2 Sep 2010 17:22:12 +0000 (17:22 +0000)]
Disable video ROM shadowing by default as I originally intended.  I found
a case where video ROM for an IGP is too tightly coupled with system BIOS
to get relocated.

13 years agoFix UP build.
mdf [Thu, 2 Sep 2010 16:23:05 +0000 (16:23 +0000)]
Fix UP build.

MFC after: 2 weeks

13 years agoMFp4 CH=183259:
bz [Thu, 2 Sep 2010 16:11:12 +0000 (16:11 +0000)]
MFp4 CH=183259:

  No reason to use if_free_type() as we don't change our type.
  Just if_free() is fine.

MFC after: 3 days

13 years agoRemove the freelist, which simply duplicates some of the zone allocator's
des [Thu, 2 Sep 2010 14:13:43 +0000 (14:13 +0000)]
Remove the freelist, which simply duplicates some of the zone allocator's
functionality.

Submitted by: Daniel Braniss <danny@cs.huji.ac.il>
MFC after: 3 weeks

13 years agoRemove trailing whitespace.
emaste [Thu, 2 Sep 2010 14:05:32 +0000 (14:05 +0000)]
Remove trailing whitespace.

13 years agoAdd fix for SiI3114 and SiI3512 chips bug, which caused sending R_ERR in
mav [Thu, 2 Sep 2010 12:32:29 +0000 (12:32 +0000)]
Add fix for SiI3114 and SiI3512 chips bug, which caused sending R_ERR in
response to DMA activate FIS under certain circumstances. This is
recommended fix from chip datasheet. If triggered, this bug most likely
cause write command timeout.

MFC after: 2 weeks

13 years agoSATA1.x SiliconImage controllers on power-on reset TFD Status register into
mav [Thu, 2 Sep 2010 11:18:43 +0000 (11:18 +0000)]
SATA1.x SiliconImage controllers on power-on reset TFD Status register into
value 0xff. On hot-plug this value confuses ata_generic_reset() device
presence detection logic. As soon as we already know drive presence from
SATA hard reset, hint ata_generic_reset() to wait for device signature
until success or full timeout.

13 years agoo csup(1) does not have -g flag. Remove it from the example.
maxim [Thu, 2 Sep 2010 05:07:34 +0000 (05:07 +0000)]
o csup(1) does not have -g flag.  Remove it from the example.

PR: conf/150214
Submitted by: Li
MFC after: 1 week

13 years agoReduce the need to accesss struct usb_device by providing functions to access
thompsa [Thu, 2 Sep 2010 04:39:45 +0000 (04:39 +0000)]
Reduce the need to accesss struct usb_device by providing functions to access
the product, manufacturer and serial strings.

Submitted by: Hans Petter Selasky

13 years agoAdd support for power mode filtering as some USB hardware does not support
thompsa [Thu, 2 Sep 2010 04:05:00 +0000 (04:05 +0000)]
Add support for power mode filtering as some USB hardware does not support
power saving.

Submitted by: Hans Petter Selasky

13 years agoChange argument for usbd_get_dma_delay() from USB bus to USB device, some
thompsa [Thu, 2 Sep 2010 04:01:18 +0000 (04:01 +0000)]
Change argument for usbd_get_dma_delay() from USB bus to USB device, some
embedded hardware needs to know exactly which device is in question before it
exactly can decide the required delay.

Submitted by: Hans Petter Selasky

13 years agoFix setting of the rx_max and tx_max variables. If the expected buffer size is
thompsa [Thu, 2 Sep 2010 03:55:08 +0000 (03:55 +0000)]
Fix setting of the rx_max and tx_max variables. If the expected buffer size is
greater than 65535 bytes then the CDC driver might not work as expected, which
is not likely with the existing USB speeds.

Submitted by: Hans Petter Selasky

13 years agoFix UMS_BUTTON_MAX define name
thompsa [Thu, 2 Sep 2010 03:52:04 +0000 (03:52 +0000)]
Fix UMS_BUTTON_MAX define name

13 years agoFix build breakage from r212127
thompsa [Thu, 2 Sep 2010 03:50:11 +0000 (03:50 +0000)]
Fix build breakage from r212127

13 years agoAdd GPIO programming for more PHY hardware.
thompsa [Thu, 2 Sep 2010 03:47:07 +0000 (03:47 +0000)]
Add GPIO programming for more PHY hardware.

Submitted by: yongari

13 years agoAdd support for extra buttons on the Kensington Slimblade Trackball.
thompsa [Thu, 2 Sep 2010 03:44:56 +0000 (03:44 +0000)]
Add support for extra buttons on the Kensington Slimblade Trackball.

Submitted by: Lee, Chung-Yeol

13 years agoSilence debug error by default.
thompsa [Thu, 2 Sep 2010 03:42:26 +0000 (03:42 +0000)]
Silence debug error by default.

PR: usb/141212
Submitted by: Hans Petter Selasky

13 years agoWe need to grab a node reference count to vap->iv_bss before using it as it is
thompsa [Thu, 2 Sep 2010 03:28:03 +0000 (03:28 +0000)]
We need to grab a node reference count to vap->iv_bss before using it as it is
possible for the node to be replaced and freed at any time by
ieee80211_sta_join1().

13 years agoModify pxe.c to use the version of nfs_getrootfh() that returns
rmacklem [Thu, 2 Sep 2010 01:05:10 +0000 (01:05 +0000)]
Modify pxe.c to use the version of nfs_getrootfh() that returns
the file handle's size and was recently committed to
lib/libstand/nfs.c. This allows pxeboot to use NFSv3 and work
correcty for non-FreeBSD as well as FreeBSD NFS servers.
If built with OLD_NFSV2 defined, the old
code that predated this patch will be used.

Tested by: danny at cs.huji.ac.il

13 years agoModify lib/libstand/nfs.c to use NFSv3 instead of NFSv2.
rmacklem [Thu, 2 Sep 2010 01:00:13 +0000 (01:00 +0000)]
Modify lib/libstand/nfs.c to use NFSv3 instead of NFSv2.
This allows the nfs_getrootfh() function to return the
correct file handle size to pxe.c for pxeboot. It also
results in NFSv2 no longer being used by default anywhere
in FreeBSD. If built with OLD_NFSV2 defined, the old
code that predated this patch will be built and NFSv2
will be used.

Tested by: danny at cs.huji.ac.il
MFC after: 2 weeks

13 years agoFix stupid error in r212109 which didn't swap DMA maps. This caused
yongari [Thu, 2 Sep 2010 00:44:05 +0000 (00:44 +0000)]
Fix stupid error in r212109 which didn't swap DMA maps. This caused
IOMMU panic on sparc64 under high TX load.

13 years agoModify nfs_diskless.c to recognize the environment variable
rmacklem [Wed, 1 Sep 2010 23:51:07 +0000 (23:51 +0000)]
Modify nfs_diskless.c to recognize the environment variable
boot.nfsroot.nfshandlelen and set the diskless root fs to
use NFSv3 and this file handle length when it is set. If
this environment variable is not set, the diskless root fs
will use NFSv2 and the same defaults as before. This fixes
the problem where the diskless nfs root fs had to be on a
FreeBSD server for NFSv3 to work, because it did not know
the correct file handle length and assumed the size used
by FreeBSD. Until pxeboot and loader are replaced by ones
built from commits coming soon, boot.nfsroot.nfshandlelen
will not be set by them and the diskless root fs will use
NFSv2 unless the /etc/fstab entry has the "nfsv3" option
specified.

Tested by: danny at cs.huji.ac.il
MFC after: 2 weeks

13 years agoAdd missing MODULE_VERSION() definitions, this resolves problems around
thompsa [Wed, 1 Sep 2010 23:47:53 +0000 (23:47 +0000)]
Add missing MODULE_VERSION() definitions, this resolves problems around
duplicate module loads.

PR: usb/125736
Submitted by: danger, mm
Reviewed by: hselasky

13 years agoMove sis_reset() to sis_initl(). This ensures driver starts with
yongari [Wed, 1 Sep 2010 22:50:11 +0000 (22:50 +0000)]
Move sis_reset() to sis_initl(). This ensures driver starts with
known good state of controller.

13 years agoAvoid controller reinitialization which could be triggered by
yongari [Wed, 1 Sep 2010 22:16:25 +0000 (22:16 +0000)]
Avoid controller reinitialization which could be triggered by
dhclient(8) or alias addresses are added.

PR: kern/87506

13 years agoDo not reinitialize controller whenever promiscuous mode or
yongari [Wed, 1 Sep 2010 22:08:23 +0000 (22:08 +0000)]
Do not reinitialize controller whenever promiscuous mode or
allmulti is toggled. Controller does not require reinitialization.
This removes unnecessary controller reinitialization whenever
tcpdump is used.
While I'm here remove unnecessary variable reinitialization.

13 years agoReport result of link state change to caller. Previously it always
yongari [Wed, 1 Sep 2010 21:44:36 +0000 (21:44 +0000)]
Report result of link state change to caller. Previously it always
returned success.

13 years agoOverhaul link state change handling. Previously sis(4) blindly
yongari [Wed, 1 Sep 2010 21:42:19 +0000 (21:42 +0000)]
Overhaul link state change handling. Previously sis(4) blindly
configured TX/RX MACs before getting a valid link. After that, when
link state change callback is called, it called device
initialization again to reconfigure TX/RX MACs depending on
resolved link state. This hack created several bad side effects and
it required more hacks to not collide with sis_tick callback as
well as disabling switching to currently selected media in device
initialization. Also it seems sis(4) was used to be a template
driver for long time so other drivers which was modeled after
sis(4) also should be changed.

TX/RX MACs are now reconfigured after getting a valid link. Fix for
short cable error is also applied after getting a link because it's
only valid when the resolved speed is 100Mbps.

While I'm here slightly reorganize interrupt handler such that
sis(4) always read SIS_ISR register to see whether the interrupt is
ours or not. This change removes another hack and make it possible
to nuke sis_stopped variable in softc.

13 years agoFix a bug with sched_affinity() where it checks td_pinned of another
mdf [Wed, 1 Sep 2010 20:32:47 +0000 (20:32 +0000)]
Fix a bug with sched_affinity() where it checks td_pinned of another
thread in a racy manner, which can lead to attempting to migrate a
thread that is pinned to a CPU.  Instead, have sched_switch() determine
which CPU a thread should run on if the current one is not allowed.

KASSERT in sched_bind() that the thread is not yet pinned to a CPU.

KASSERT in sched_switch() that only migratable threads or those moving
due to a sched_bind() are changing CPUs.

sched_affinity code came from jhb@.

MFC after: 2 weeks

13 years agos/u_intXX_t/uintXX_t/g
yongari [Wed, 1 Sep 2010 19:53:15 +0000 (19:53 +0000)]
s/u_intXX_t/uintXX_t/g

13 years agormlock(9) two additions and one change/fix:
mlaier [Wed, 1 Sep 2010 19:50:03 +0000 (19:50 +0000)]
rmlock(9) two additions and one change/fix:
 - add rm_try_rlock().
 - add RM_SLEEPABLE to use sx(9) as the back-end lock in order to sleep while
   holding the write lock.
 - change rm_noreadtoken to a cpu bitmask to indicate which CPUs need to go
   through the lock/unlock in order to synchronize.  As a side effect, this
   also avoids IPI to CPUs without any readers during rm_wlock.

Discussed with: ups@, rwatson@ on arch@
Sponsored by: Isilon Systems, Inc.

13 years agobus_dma(9) cleanup.
yongari [Wed, 1 Sep 2010 19:33:40 +0000 (19:33 +0000)]
bus_dma(9) cleanup.
 o Enforce TX/RX descriptor ring alignment. NS data sheet says the
   controller needs 4 bytes alignment but use 16 to cover both SiS
   and NS controllers. I don't have SiS data sheet so I'm not sure
   what is alignment restriction of SiS controller but 16 would be
   enough because it's larger than the size of a TX/RX descriptor.
   Previously sis(4) ignored the alignment restriction.
 o Enforce RX buffer alignment, 4.
   Previously sis(4) ignored RX buffer alignment restriction.
 o Limit number of TX DMA segment to be used to 16. It seems
   controller has no restriction on number of DMA segments but
   using more than 16 looks resource waste.
 o Collapse long mbuf chains with m_collapse(9) instead of calling
   expensive m_defrag(9).
 o TX/RX side bus_dmamap_load_mbuf_sg(9) support and remove
   unnecessary callbacks.
 o Initial endianness support.
 o Prefer local alignment fixup code to m_devget(9).
 o Pre-allocate TX/RX mbuf DMA maps instead of creating/destroying
   these maps in fast TX/RX path. On non-x86 architectures, this is
   very expensive operation and there is no need to do that.
 o Add missing bus_dmamap_sync(9) in TX/RX path.
 o watchdog is now unarmed only when there are no pending frames
   on controller. Previously sis(4) blindly unarmed watchdog
   without checking the number of queued frames.
 o For efficiency, loaded DMA map is reused for error frames.
 o DMA map loading failure is now gracefully handled. Previously
   sis(4) ignored any DMA map loading errors.
 o Nuke unused macros which are not appropriate for endianness
   operation.
 o Stop embedding driver maintained structures into descriptor
   rings. Because TX/RX descriptor structures are shared between
   host and controller, frequent bus_dmamap_sync(9) operations are
   required in fast path. Embedding driver structures will increase
   the size of DMA map which in turn will slow down performance.

13 years agoNuke unnecessary return at the end of function.
yongari [Wed, 1 Sep 2010 18:41:59 +0000 (18:41 +0000)]
Nuke unnecessary return at the end of function.

13 years agostyle(9) - space after keywords.
yongari [Wed, 1 Sep 2010 18:39:35 +0000 (18:39 +0000)]
style(9) - space after keywords.

13 years agoRemove leading and trailing white spaces.
yongari [Wed, 1 Sep 2010 18:28:08 +0000 (18:28 +0000)]
Remove leading and trailing white spaces.
No functional changes.

13 years agoUpdates for the RMI MIPS platform code
jchandra [Wed, 1 Sep 2010 17:35:31 +0000 (17:35 +0000)]
Updates for the RMI MIPS platform code
- set cache_coherent_dma flag in cpuinfo for XLR, this will make sure that
  BUS_DMA_COHERENT flag is handled correctly in busdma_machdep.c
- iodi.c, call device_get_name() just once
- clear RMI specific EIRR while intializing CPUs
- remove debug print in intr_machdep.c

13 years agoAdd a sysctl knob to accept input packets on any link in a failover lagg.
emaste [Wed, 1 Sep 2010 16:53:38 +0000 (16:53 +0000)]
Add a sysctl knob to accept input packets on any link in a failover lagg.

13 years agoFix a bug which results in peer IPv4 addresses a.b.c.d with 224<=d<=239
tuexen [Wed, 1 Sep 2010 16:11:26 +0000 (16:11 +0000)]
Fix a bug which results in peer IPv4 addresses a.b.c.d with 224<=d<=239
incorrectly being detected as multicast addresses on little endian systems.

MFC after: 2 weeks

13 years agoUse a cleaner expression to retrieve the memory size in pc98's boot2.c,
dim [Wed, 1 Sep 2010 15:24:47 +0000 (15:24 +0000)]
Use a cleaner expression to retrieve the memory size in pc98's boot2.c,
which also avoids NULL pointer arithmetic, as suggested by jhb.  The
available space goes from 11 bytes to 7.

Reviewed by: nyan
Approved by: rpaulo (mentor)

13 years agoAs long as we are going to panic anyway, there's no need to hide additional
emaste [Wed, 1 Sep 2010 13:47:11 +0000 (13:47 +0000)]
As long as we are going to panic anyway, there's no need to hide additional
information behind DIAGNOSTIC.

13 years agoRemove incorrect comments, also make sure signal is
davidxu [Wed, 1 Sep 2010 13:22:55 +0000 (13:22 +0000)]
Remove incorrect comments, also make sure signal is
disabled when unregistering sigaction.

13 years agoo Sync the man page with the reality: nfs/ includes
maxim [Wed, 1 Sep 2010 12:08:54 +0000 (12:08 +0000)]
o Sync the man page with the reality: nfs/ includes
are under include/ and include/fs/.

PR: docs/139153
Submitted by: gjb
MFC after: 1 week

13 years agoMake the /dev/dtrace/helper node have the mode 0660. This allows
rpaulo [Wed, 1 Sep 2010 12:08:32 +0000 (12:08 +0000)]
Make the /dev/dtrace/helper node have the mode 0660. This allows
programs that refuse to run as root (pgsql) to install probes when their
user is part of the wheel group.

Sponsored by: The FreeBSD Foundation
> Description of fields to fill in above:                     76 columns --|
> PR:            If a GNATS PR is affected by the change.
> Submitted by:  If someone else sent in the change.
> Reviewed by:   If someone else reviewed your modification.
> Approved by:   If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after:     N [day[s]|week[s]|month[s]].  Request a reminder email.
> Security:      Vulnerability reference (one per line) or description.
> Empty fields above will be automatically removed.

M    dev/dtrace/dtrace_load.c

13 years agoInclude <sys/sdt.h> on a generated header.
rpaulo [Wed, 1 Sep 2010 11:27:09 +0000 (11:27 +0000)]
Include <sys/sdt.h> on a generated header.

Sponsored by: The FreeBSD Foundation

13 years agoRemove reference to device minor numbers in psm(4) man page.
ed [Wed, 1 Sep 2010 09:53:24 +0000 (09:53 +0000)]
Remove reference to device minor numbers in psm(4) man page.

The number returned by stat(2) is generated automatically, so it is not
possible to deduce whether the device is blocking or not.

MFC after: 1 week

13 years agoo List MOUNTVER and SCHED classes. X-ref gsched(8). Bump Dd.
maxim [Wed, 1 Sep 2010 08:32:40 +0000 (08:32 +0000)]
o List MOUNTVER and SCHED classes.  X-ref gsched(8).  Bump Dd.

PR: docs/149925
Submitted by: arundel

13 years agoIn function __pthread_cxa_finalize(), also make code for removing
davidxu [Wed, 1 Sep 2010 07:09:46 +0000 (07:09 +0000)]
In function __pthread_cxa_finalize(), also make code for removing
atfork handler be async-signal safe.

13 years agoIncrease device reset timeout from 10 to 15 seconds, same as in ahci(4).
mav [Wed, 1 Sep 2010 06:43:41 +0000 (06:43 +0000)]
Increase device reset timeout from 10 to 15 seconds, same as in ahci(4).
Some devices found need about 10-12 seconds to spinup.

13 years ago- Remove duplicate comment.
lulf [Wed, 1 Sep 2010 05:34:17 +0000 (05:34 +0000)]
- Remove duplicate comment.

PR: kern/148820
Submitted by: pluknet <pluknet - at - gmail.com>

13 years agopthread_atfork should acquire writer lock and protect the code
davidxu [Wed, 1 Sep 2010 03:55:10 +0000 (03:55 +0000)]
pthread_atfork should acquire writer lock and protect the code
with critical region.