]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoFix typo. Bump .Dd for the previous change.
pluknet [Mon, 5 Mar 2012 17:38:44 +0000 (17:38 +0000)]
Fix typo. Bump .Dd for the previous change.

12 years agoMake growfs(8) mostly style compliant. No functional changes,
trasz [Mon, 5 Mar 2012 16:37:51 +0000 (16:37 +0000)]
Make growfs(8) mostly style compliant.  No functional changes,
verified with MD5.

12 years agoPrint out process name and thread id in the debugging message.
ivoras [Mon, 5 Mar 2012 14:19:43 +0000 (14:19 +0000)]
Print out process name and thread id in the debugging message.
This is useful because the message can end up in system logs in
non-debugging operation.

Reviewed by: attilio (earlier version)

12 years agoApply inlined vn_vget_ino() algorithm for ".." lookup in pseudofs.
kib [Mon, 5 Mar 2012 11:38:02 +0000 (11:38 +0000)]
Apply inlined vn_vget_ino() algorithm for ".." lookup in pseudofs.

Reported and tested by: pho
MFC after: 2 weeks

12 years agoAdd DWC OTG module to ARM builds.
hselasky [Mon, 5 Mar 2012 06:46:35 +0000 (06:46 +0000)]
Add DWC OTG module to ARM builds.

MFC after: 1 week

12 years agoFix for DWC OTG interrupt register programming.
hselasky [Mon, 5 Mar 2012 06:41:44 +0000 (06:41 +0000)]
Fix for DWC OTG interrupt register programming.
Fix a compiler warning.
Add missing header file.

MFC after: 1 week

12 years agoFix ng_ipfw(4) cookie number in example.
glebius [Mon, 5 Mar 2012 06:12:15 +0000 (06:12 +0000)]
Fix ng_ipfw(4) cookie number in example.

Pointed out by: "Jacco van Buuren" <jaccovanbuuren gmail.com>

12 years agoMake the chroot shell more functional by providing devfs.
nwhitehorn [Mon, 5 Mar 2012 02:40:18 +0000 (02:40 +0000)]
Make the chroot shell more functional by providing devfs.

Reported by: Robert Simmons
MFC after: 4 days

12 years agoOops - used the wrong field.
adrian [Mon, 5 Mar 2012 02:36:15 +0000 (02:36 +0000)]
Oops - used the wrong field.

Noticed by: nwhitehorn

12 years agoAdd the thread id to the net80211 alq records.
adrian [Sun, 4 Mar 2012 23:13:52 +0000 (23:13 +0000)]
Add the thread id to the net80211 alq records.

This will (hopefully) aid in debugging concurrency related issues.

12 years agoFix style(9) issues.
adrian [Sun, 4 Mar 2012 23:04:16 +0000 (23:04 +0000)]
Fix style(9) issues.

12 years agoFix a thinko in r232322, where gcc (and its tools) are not built during
dim [Sun, 4 Mar 2012 21:36:18 +0000 (21:36 +0000)]
Fix a thinko in r232322, where gcc (and its tools) are not built during
the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set.

This causes no 'cc' to be installed in the temporary cross-tools tree,
making lint fall over later in the build, because it ignores ${CC} and
attempts to run 'cc' anyway.

To fix this, only skip building gcc during cross-tools, if WITHOUT_GCC
is set, or if WITH_CLANG_IS_CC is set.

Pointy hat to: dim
MFC after: 2 weeks

12 years agoExclude USB drivers (except umass and ukbd) from main kernel image on i386
rmh [Sun, 4 Mar 2012 21:31:13 +0000 (21:31 +0000)]
Exclude USB drivers (except umass and ukbd) from main kernel image on i386
and amd64.

Reviewed by: hselasky, arch, usb
Approved by: kib (mentor)

12 years agoCopy amd64 ptrace.h to x86 and merge with i386 ptrace.h. Replace
tijl [Sun, 4 Mar 2012 20:24:28 +0000 (20:24 +0000)]
Copy amd64 ptrace.h to x86 and merge with i386 ptrace.h. Replace
amd64/i386/pc98 ptrace.h with stubs.

For amd64 PT_GETXSTATE and PT_SETXSTATE have been redefined to match the
i386 values. The old values are still supported but should no longer be
used.

Reviewed by: kib

12 years agoDo not use INT64_C and UINT64_C to define 64 bit integer limits. They
tijl [Sun, 4 Mar 2012 20:02:20 +0000 (20:02 +0000)]
Do not use INT64_C and UINT64_C to define 64 bit integer limits.  They
aren't defined for C++ code unless __STDC_CONSTANT_MACROS is defined.

Reported by: jhb

12 years agoRespect phy-handle property in Ethernet nodes of the device tree.
raj [Sun, 4 Mar 2012 19:22:52 +0000 (19:22 +0000)]
Respect phy-handle property in Ethernet nodes of the device tree.

This lets specify whereabouts of the parent PHY for a given MAC node
(and get rid of ugly kludges in mge(4) and tsec(4)).

Obtained from: Semihalf
MFC after: 1 week

12 years agoChange SYSINIT priorities so that ip_mroute_modevent() is executed
zec [Sun, 4 Mar 2012 18:59:38 +0000 (18:59 +0000)]
Change SYSINIT priorities so that ip_mroute_modevent() is executed
before vnet_mroute_init(), since vnet_mroute_init() depends on mfchashsize
tunable to be set, and that is done in in ip_mroute_modevent().
Apparently I broke that ordering with r208744 almost 2 years ago...

PR: kern/162201
Submitted by: Stevan Markovic (mcafee.com)
MFC after: 3 days

12 years agoDocument pci_find_extcap() and pci_find_htcap().
jhb [Sun, 4 Mar 2012 18:55:33 +0000 (18:55 +0000)]
Document pci_find_extcap() and pci_find_htcap().

12 years agoRather than printing the output from route add for all FIBs just print them
bz [Sun, 4 Mar 2012 18:53:35 +0000 (18:53 +0000)]
Rather than printing the output from route add for all FIBs just print them
for the default FIB followed by a statement with a list of FIB numbers for
all the other FIBs we install the routes for.

Request by: kib (to make it less noisy)
Tested by: kib
MFC after: 3 days

12 years agoIn nd6_options() ignore the RFC 6106 options completely rather than printing
bz [Sun, 4 Mar 2012 18:51:45 +0000 (18:51 +0000)]
In nd6_options() ignore the RFC 6106 options completely rather than printing
them if nd6_debug is enabled as unknown.  Leave a comment about the RFC4191
option as I am undecided so far.

Discussed with: hrs
MFC after: 3 days

12 years agoCorrect typo in the RFC number for the constants based on IANA assignments
bz [Sun, 4 Mar 2012 18:47:20 +0000 (18:47 +0000)]
Correct typo in the RFC number for the constants based on IANA assignments
for IPv6 Neighbor Discovery Option types for "IPv6 Router Advertisement
Options for DNS Configuration".  It is RFC 6106.

MFC after: 3 days

12 years agoRemove unused #defines. All this is now retrieved from the device tree.
raj [Sun, 4 Mar 2012 18:13:45 +0000 (18:13 +0000)]
Remove unused #defines. All this is now retrieved from the device tree.

MFC after: 1 week

12 years agoPermit the use of raidz3 in pc-sysinstall
eadler [Sun, 4 Mar 2012 17:33:22 +0000 (17:33 +0000)]
Permit the use of raidz3 in pc-sysinstall

PR: conf/164709
Submitted by: Garrett Cooper <yanegomi@gmail.com>
Reviewed by: brd, brooks
Approved by: cperciva
MFC after: 3 days

12 years agoFix race condition in KfRaiseIrql().
brucec [Sun, 4 Mar 2012 17:08:43 +0000 (17:08 +0000)]
Fix race condition in KfRaiseIrql().

After getting the current irql, if the kthread gets preempted and
subsequently runs on a different CPU, the saved irql could be wrong.

Also, correct the panic string.

PR: kern/165630
Submitted by: Vladislav Movchan <vladislav.movchan at gmail.com>

12 years agoBump date as modified the man page
eadler [Sun, 4 Mar 2012 16:59:45 +0000 (16:59 +0000)]
Bump date as modified the man page

Submitted by: gjb

12 years agoExplicitly list dependency
eadler [Sun, 4 Mar 2012 16:46:27 +0000 (16:46 +0000)]
Explicitly list dependency

PR: misc/160463
Submitted by: Garrett Cooper <yanegomi@gmail.com>
Helped by: kan
Approved by: cperciva
MFC after: 3 days

12 years agoRemove outdated comment of seven years
eadler [Sun, 4 Mar 2012 16:44:04 +0000 (16:44 +0000)]
Remove outdated comment of seven years

PR: docs/116116
Approved by: cperciva
MFC after: 1 week

12 years agoRemove reference to gcc's non-standard -fwritable-strings, which
eadler [Sun, 4 Mar 2012 16:41:07 +0000 (16:41 +0000)]
Remove reference to gcc's non-standard -fwritable-strings, which
doesn't exist in recent releases (and is bad advice anyway)

PR: docs/163119
Submitted by: Yuri Pankov <yuri.pankov@gmail.com>
Approved by: cperciva
MFC after: 1 week

12 years agoPOSIX mandates that swab do nothing when len < 0
eadler [Sun, 4 Mar 2012 16:39:08 +0000 (16:39 +0000)]
POSIX mandates that swab do nothing when len < 0

PR: kern/140690
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
Approved by: cperciva
MFC after: 2 weeks

12 years agoFix a variety of grammar issues and style nits.
eadler [Sun, 4 Mar 2012 16:37:44 +0000 (16:37 +0000)]
Fix a variety of grammar issues and style nits.

PR: docs/165668
Submitted by: Robert Simmons <rsimmons0@gmail.com>
Reviewed by: kaduk@mit.edu
Approved by: cperciva
MFC after: 1 week

12 years agoehci tunables are only available when kernel is compiled with USB_DEBUG
eadler [Sun, 4 Mar 2012 16:26:49 +0000 (16:26 +0000)]
ehci tunables are only available when kernel is compiled with USB_DEBUG

PR: docs/163646
Reported by: Momchil Ivanov <momchil@xaxo.eu>
Submitted by: Benjamin Kaduk <kaduk@mit.edu>
Approved by: cperciva
MFC after: 1 week

12 years agoReapply 227753 (xlocale cleanup), plus some fixes so that it passes build
theraven [Sun, 4 Mar 2012 15:31:13 +0000 (15:31 +0000)]
Reapply 227753 (xlocale cleanup), plus some fixes so that it passes build
universe with gcc.

Approved by: dim (mentor)

12 years agoAdd __aeabi_read_tp to the symbol list.
cognet [Sun, 4 Mar 2012 15:25:11 +0000 (15:25 +0000)]
Add  __aeabi_read_tp to the symbol list.

12 years agoPR: docs/158813
eadler [Sun, 4 Mar 2012 15:22:03 +0000 (15:22 +0000)]
PR: docs/158813
Submitted by: Ben Kaduk <kaduk@mit.edu>
Approved by: bcr
MFC after: 1 week

12 years agopipe_read(): change the type of size to int, and remove signed clamp.
kib [Sun, 4 Mar 2012 15:09:01 +0000 (15:09 +0000)]
pipe_read(): change the type of size to int, and remove signed clamp.
pipe_write(): change the type of desiredsize back to int, its value fits.

Requested by: bde
MFC after:    3 weeks

12 years agoInstead of incomplete handling of read(2)/write(2) return values that
kib [Sun, 4 Mar 2012 14:55:37 +0000 (14:55 +0000)]
Instead of incomplete handling of read(2)/write(2) return values that
does not fit into registers, declare that we do not support this case
using CTASSERT(), and remove endianess-unsafe code to split return value
into td_retval.

While there, change the style of the sysctl debug.iosize_max_clamp
definition.

Requested by: bde
MFC after: 3 weeks

12 years agoRemove unneeded cast to u_int. The values as small enough to fit into
kib [Sun, 4 Mar 2012 14:51:42 +0000 (14:51 +0000)]
Remove unneeded cast to u_int. The values as small enough to fit into
int, beside the use of MIN macro which performs type promotions.

Submitted by: bde
MFC after: 3 weeks

12 years agoCopy amd64 trap.h to x86 and replace amd64/i386/pc98 trap.h with stubs.
tijl [Sun, 4 Mar 2012 14:12:57 +0000 (14:12 +0000)]
Copy amd64 trap.h to x86 and replace amd64/i386/pc98 trap.h with stubs.

12 years agoCopy amd64 float.h to x86 and merge with i386 float.h. Replace
tijl [Sun, 4 Mar 2012 14:00:32 +0000 (14:00 +0000)]
Copy amd64 float.h to x86 and merge with i386 float.h. Replace
amd64/i386/pc98 float.h with stubs.

12 years agoRestore proper dot symbol creation for assembly files in the kernel build case.
andreast [Sun, 4 Mar 2012 11:55:28 +0000 (11:55 +0000)]
Restore proper dot symbol creation for assembly files in the kernel build case.
Without this patch we were not able to see the assembly function.
Only the function descriptor was visible.

- Distinguish between user-land and kernel when creating the ENTRY() point of
  assembly source.
- Make the ENTRY() macro more readable, replace the .align directive with the
  gas platform independant .p2align directive.
- Create an END()macro for later use to provide traceback tables on powerpc64.

12 years agoProperly restore curvnet context when returning early from
zec [Sun, 4 Mar 2012 11:11:03 +0000 (11:11 +0000)]
Properly restore curvnet context when returning early from
ether_input_internal().

This change only affects options VIMAGE kernel builds.

PR: kern/165643
Submitted by: Vijay Singh
MFC after: 3 days

12 years agoRemove unnecessary casts
kevlo [Sun, 4 Mar 2012 09:48:58 +0000 (09:48 +0000)]
Remove unnecessary casts

12 years agoFix build w/o 'options IEEE80211_SUPPORT_MESH'.
glebius [Sun, 4 Mar 2012 09:45:43 +0000 (09:45 +0000)]
Fix build w/o 'options IEEE80211_SUPPORT_MESH'.

12 years agoClean up style(9) nits
kevlo [Sun, 4 Mar 2012 09:38:20 +0000 (09:38 +0000)]
Clean up style(9) nits

12 years agoAdd support for PWM controlled fans. I found these fans on my PowerMac9,1.
andreast [Sun, 4 Mar 2012 08:43:33 +0000 (08:43 +0000)]
Add support for PWM controlled fans. I found these fans on my PowerMac9,1.
These fans are not located under the same node as the the RPM controlled ones,
So I had to adapt the current source to parse and fill the properties correctly.
To control the fans we can set the PWM ratio via sysctl between 20 and 100%.

Tested by: nwhitehorn
MFC after: 3 weeks

12 years ago* Introduce new flag for QoS control field;
adrian [Sun, 4 Mar 2012 05:52:26 +0000 (05:52 +0000)]
* Introduce new flag for QoS control field;
* Change in mesh_input to validate that QoS is set and Mesh Control field
  is present, also both bytes of the QoS are read;
* Moved defragmentation in mesh_input before we try to forward packet as
  inferred from amendment spec, because Mesh Control field only present in first
  fragment;
* Changed in ieee80211_encap to set QoS subtype and Mesh Control field present,
  only first fragment have Mesh Control field present bit equal to 1;

Submitted by: monthadar@gmail.com

12 years ago* Added IEEE80211_ACTION_CAT_MESH in ieee80211.h as specified amendment spec;
adrian [Sun, 4 Mar 2012 05:49:39 +0000 (05:49 +0000)]
* Added IEEE80211_ACTION_CAT_MESH in ieee80211.h as specified amendment spec;
* Moved old categories as specified by D4.0 to be action fields of MESH category
  as specified in amendment spec;
* Modified functions to use MESH category and its action fields:
  + ieee80211_send_action_register
  + ieee80211_send_action
  + ieee80211_recv_action_register
  +ieee80211_recv_action;
* Modified ieee80211_hwmp_init and hwmp_send_action so they uses correct
  action fields as specified in amendment spec;
* Modified ieee80211_parse_action so that it verifies MESH frames.
* Change Mesh Link Metric to use one information element as amendment spec.
  Draft 4.0 defined two different information elements for request and response.

Submitted by: monthadar@gmail.com

12 years agoFix tls base computation with COMPAT_FREEBSD32 on n64 kernels. The previous
jmallett [Sun, 4 Mar 2012 05:19:55 +0000 (05:19 +0000)]
Fix tls base computation with COMPAT_FREEBSD32 on n64 kernels.  The previous
version was missing an else and would always use the n64 TP_OFFSET.  Eliminate
some duplication of logic here.

It may be worth getting rid of some of the ifdefs and introducing gratuitous
SV_ILP32 runtime checks on n64 kernels without COMPAT_FREEBSD32 and on o32
kernels, similarly to how PowerPC works.

12 years agoIn r232322, I forgot one case where a check for MK_CLANG_IS_CC was
dim [Sun, 4 Mar 2012 00:42:18 +0000 (00:42 +0000)]
In r232322, I forgot one case where a check for MK_CLANG_IS_CC was
needed, in sys/conf/kern.pre.mk.  Add it now.

MFC after: 2 weeks

12 years agoRevert r232473. I have been convinced by Doug Barton and Bjoern Zeeb
dim [Sat, 3 Mar 2012 23:49:53 +0000 (23:49 +0000)]
Revert r232473.  I have been convinced by Doug Barton and Bjoern Zeeb
that it is better to error out when people attempt to build using the
wrong bsd.*.mk files, than to silently ignore the problem.

This means, that after this commit, if you want to build kernel modules
by hand (or via a port) from a head source tree, you *must* make sure
the files in /usr/share/mk are in sync with that tree.  If that isn't
possible, for example when you are running on an older FreeBSD branch,
you can:

- Run "make buildenv" from your head source tree, to have the correct
  environment setup.  (It's advisable to have run "make buildworld", or
  at a minimum "make toolchain" first.)
- Alternatively, set MAKESYSPATH to the share/mk directory under your
  head source tree.  If your build tools are too old, other problems may
  still occur.
- Alternatively, use "make -m" and specify the share/mk directory under
  your head source tree.  Again, build tools that are too old may still
  result in trouble.

MFC after: 2 weeks

12 years agoOn MIPS, _ALIGN always aligns to 8 bytes, even for 32-bit binaries. This might
jmallett [Sat, 3 Mar 2012 21:39:12 +0000 (21:39 +0000)]
On MIPS, _ALIGN always aligns to 8 bytes, even for 32-bit binaries.  This might
not be ideal, but is the ABI we've shipped so far.  Fix macros which reflect
the results of _ALIGN on 32-bit MIPS to use the right alignment.

This fixes sendmsg under COMPAT_FREEBSD32 on n64 MIPS kernels.

12 years agoAfter r232322, it turned out many people (and some ports) are building
dim [Sat, 3 Mar 2012 18:58:15 +0000 (18:58 +0000)]
After r232322, it turned out many people (and some ports) are building
kernel modules using their old installed /usr/share/mk/bsd.*.mk files,
instead of the updated ones in their source tree.  This leads to errors
like:

  "sys/conf/kmod.mk", line 111: Malformed conditional (${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang")

Obviously, these errors will go away after a "make installworld", or
alternatively, by using "make buildenv" before attempting to manually
build modules.

However, since it is apparently an expected use case to build using old
.mk files, change the way we test for clang, so it also works when the
MK_CLANG_IS_CC macro doesn't exist.

Note the conditional expressions are becoming rather unreadable now, but
I will attempt to fix that on a followup commit.

MFC after: 2 weeks

12 years agoExpand the set of APIs available for locating PCI capabilities:
jhb [Sat, 3 Mar 2012 18:08:57 +0000 (18:08 +0000)]
Expand the set of APIs available for locating PCI capabilities:
- pci_find_extcap() is repurposed to be used for fetching PCI-express
  extended capabilities (PCIZ_* constants in <dev/pci/pcireg.h>).
- pci_find_htcap() can be used to locate a specific HyperTransport
  capability (PCIM_HTCAP_* constants in <dev/pci/pcireg.h>).
- Cache the starting location of the PCI-express capability for PCI-express
  devices in PCI device ivars.

12 years agoDocument the [n]eei and [n]bacc options
eadler [Sat, 3 Mar 2012 18:07:53 +0000 (18:07 +0000)]
Document the [n]eei and [n]bacc options

PR: docs/165009
Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
Approved by: bcr
MFC after: 1 week

12 years agoUse pci_find_cap() instead of pci_find_extcap() to locate PCI
jhb [Sat, 3 Mar 2012 18:03:50 +0000 (18:03 +0000)]
Use pci_find_cap() instead of pci_find_extcap() to locate PCI
find capabilities as the latter API is deprecated for this purpose.

MFC after: 2 weeks

12 years agoBump date to today (since I modified it)
eadler [Sat, 3 Mar 2012 17:52:19 +0000 (17:52 +0000)]
Bump date to today (since I modified it)

PR: bin/165321
Approved by: gjb
MFC after: 3 days

12 years agoThe name caching changes of r230394 exposed an intermittent bug
rmacklem [Sat, 3 Mar 2012 16:13:20 +0000 (16:13 +0000)]
The name caching changes of r230394 exposed an intermittent bug
in the new NFS server for NFSv4, where it would report ENOENT
when the file actually existed on the server. This turned out
to be caused by not initializing ni_topdir before calling lookup()
and there was a rare case where the value on the stack location
assigned to ni_topdir happened to be a pointer to a ".." entry,
such that "dp == ndp->ni_topdir" succeeded in lookup().
This patch initializes ni_topdir to fix the problem.

MFC after: 5 days

12 years agoDirect users to swapinfo and pstat from df
eadler [Sat, 3 Mar 2012 15:38:01 +0000 (15:38 +0000)]
Direct users to swapinfo and pstat from df

PR: bin/165321
Submitted by: jhs
Approved by: bcr
MFC after: 3 days

12 years agoUpdate the pci_get_vpd_readonly() wrapper to use 'vptr' instead of
jhb [Sat, 3 Mar 2012 14:25:36 +0000 (14:25 +0000)]
Update the pci_get_vpd_readonly() wrapper to use 'vptr' instead of
'identptr' for its last parameter to match the default implementation
as well as the method definition in pci_if.m.

12 years agoFix a typo.
jhb [Sat, 3 Mar 2012 14:24:39 +0000 (14:24 +0000)]
Fix a typo.

12 years agoExpand and reorganize the pci(9) manpage a bit:
jhb [Sat, 3 Mar 2012 14:23:54 +0000 (14:23 +0000)]
Expand and reorganize the pci(9) manpage a bit:
- Document the following routines: pci_alloc_msi(), pci_alloc_msix(),
  pci_find_cap(), pci_get_max_read_req(), pci_get_vpd_ident(),
  pci_get_vpd_readonly(), pci_msi_count(), pci_msix_count(),
  pci_pending_msix(), pci_release_msi(),  pci_remap_msix(), and
  pci_set_max_read_req().
- Group the functions into five sub-sections: raw configuration access,
  locating devices, device information, device configuration, and
  message signaled interrupts.
- Discourage use of pci_disable_io() and pci_enable_io() in device drivers.
  The PCI bus driver handles this automatically as resources are activated.

MFC after: 2 weeks

12 years agoMake kern.proc.umask sysctl readonly.
trociny [Sat, 3 Mar 2012 11:53:35 +0000 (11:53 +0000)]
Make kern.proc.umask sysctl readonly.

Requested by: src
MFC after: 1 week

12 years agoFix bug of r232207, when cpu_search() could prefer CPU group with best
mav [Sat, 3 Mar 2012 11:50:48 +0000 (11:50 +0000)]
Fix bug of r232207, when cpu_search() could prefer CPU group with best
load, but with no CPU matching given limitations. It caused kernel panics
in some cases when thread was bound to specific CPUs with cpuset(1).

12 years agoUnbreak n64 build without COMPAT_FREEBSD32 by fixing mismatched preprocessor
jmallett [Sat, 3 Mar 2012 10:22:49 +0000 (10:22 +0000)]
Unbreak n64 build without COMPAT_FREEBSD32 by fixing mismatched preprocessor
conditionals.

12 years agoUse snprintf(3) constantly when generating CAM error messages.
jh [Sat, 3 Mar 2012 09:19:20 +0000 (09:19 +0000)]
Use snprintf(3) constantly when generating CAM error messages.

PR: bin/57088
Submitted by: Rui Lopes, arundel
MFC after: 2 weeks

12 years agoo) Add COMPAT_FREEBSD32 support for MIPS kernels using the n64 ABI with userlands
jmallett [Sat, 3 Mar 2012 08:19:18 +0000 (08:19 +0000)]
o) Add COMPAT_FREEBSD32 support for MIPS kernels using the n64 ABI with userlands
   using the o32 ABI.  This mostly follows nwhitehorn's lead in implementing
   COMPAT_FREEBSD32 on powerpc64.
o) Add a new type to the freebsd32 compat layer, time32_t, which is time_t in the
   32-bit ABI being used.  Since the MIPS port is relatively-new, even the 32-bit
   ABIs use a 64-bit time_t.
o) Because time{spec,val}32 has the same size and layout as time{spec,val} on MIPS
   with 32-bit compatibility, then, disable some code which assumes otherwise
   wrongly when built for MIPS.  A more general macro to check in this case would
   seem like a good idea eventually.  If someone adds support for using n32
   userland with n64 kernels on MIPS, then they will have to add a variety of
   flags related to each piece of the ABI that can vary.  That's probably the
   right time to generalize further.
o) Add MIPS to the list of architectures which use PAD64_REQUIRED in the
   freebsd32 compat code.  Probably this should be generalized at some point.

Reviewed by: gonzo

12 years agoMake sure that the USB system suspend event is executed synchronously
hselasky [Sat, 3 Mar 2012 08:11:04 +0000 (08:11 +0000)]
Make sure that the USB system suspend event is executed synchronously
and not asynchronously. This fixes problems related to USB system
suspend and resume.  It is assumed that we are always allowed to sleep
from the device_suspend() method.

MFC after: 1 week
Submitted by: jkim

12 years agoAdd entry for packages-8.3-release directory.
kensmith [Sat, 3 Mar 2012 05:04:47 +0000 (05:04 +0000)]
Add entry for packages-8.3-release directory.

12 years agoPost r230394, the Lookup RPC counts for both NFS clients increased
rmacklem [Sat, 3 Mar 2012 01:06:54 +0000 (01:06 +0000)]
Post r230394, the Lookup RPC counts for both NFS clients increased
significantly. Upon investigation this was caused by name cache
misses for lookups of "..". For name cache entries for non-".."
directories, the cache entry serves double duty. It maps both the
named directory plus ".." for the parent of the directory. As such,
two ctime values (one for each of the directory and its parent) need
to be saved in the name cache entry.
This patch adds an entry for ctime of the parent directory to the
name cache. It also adds an additional uma zone for large entries
with this time value, in order to minimize memory wastage.
As well, it fixes a couple of cases where the mtime of the parent
directory was being saved instead of ctime for positive name cache
entries. With this patch, Lookup RPC counts return to values similar
to pre-r230394 kernels.

Reported by: bde
Discussed with: kib
Reviewed by: jhb
MFC after: 2 weeks

12 years agoAdd VESA option to GENERIC for amd64 and i386.
jkim [Sat, 3 Mar 2012 00:11:46 +0000 (00:11 +0000)]
Add VESA option to GENERIC for amd64 and i386.

MFC after: 1 month

12 years agoFix a problem that was causing the mpt(4) driver to attach to MegaRAID
ken [Fri, 2 Mar 2012 22:00:40 +0000 (22:00 +0000)]
Fix a problem that was causing the mpt(4) driver to attach to MegaRAID
cards that should be handled by the mfi(4) driver.

The root of the problem is that the mpt(4) driver was masking off the
bottom bit of the PCI device ID when deciding which cards to attach to.

It appears that a number of the mpt(4) Fibre Channel cards had a LAN
variant whose PCI device ID was just one bit off from the FC card's device
ID.  The FC cards were even and the LAN cards were odd.

The problem was that this pattern wasn't carried over on the SAS and
parallel SCSI mpt(4) cards.  Luckily the SAS and parallel SCSI PCI device
IDs were either even numbers, or they would get masked to a supported
adjacent PCI device ID, and everything worked well.

Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb
SAS device IDs for their new MegaRAID cards.  This is causing the mpt(4)
driver to attach to the RAID cards instead of the mfi(4) driver.

The solution is to stop masking off the bottom bit of the device ID, and
explicitly list the PCI device IDs of all supported cards.

This change should be a no-op for mpt(4) hardware.  The only intended
functional change is that for the 929X, the is_fc variable gets set.  It
wasn't being set previously, but needs to be because the 929X is a Fibre
Channel card.

Reported by: Kashyap Desai <Kashyap.Desai@lsi.com>
MFC After: 3 days

12 years agoWhen creating a handle for a subregion, be sure to actually math out the new
jmallett [Fri, 2 Mar 2012 21:46:31 +0000 (21:46 +0000)]
When creating a handle for a subregion, be sure to actually math out the new
handle address, where we're using handles as raw addresses.

This fixes devices with subregions on Octeon PCI specifically, and likely also on
MIPS more generally, where there isn't another bus_space in use that was doing the
math already.

12 years agoIf an Atheros device is attached to an Octeon, it's going to be by PCI.
jmallett [Fri, 2 Mar 2012 21:44:39 +0000 (21:44 +0000)]
If an Atheros device is attached to an Octeon, it's going to be by PCI.

12 years ago- Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge.
jhb [Fri, 2 Mar 2012 20:38:04 +0000 (20:38 +0000)]
- Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge.
  The tag enforces a single restriction that all DMA transactions must not
  cross a 4GB boundary.  Note that while this restriction technically only
  applies to PCI-express, this change applies it to all PCI devices as it
  is simpler to implement that way and errs on the side of caution.
- Add a softc structure for PCI bus devices to hold the bus_dma tag and
  a new pci_attach_common() routine that performs actions common to the
  attach phase of all PCI bus drivers.  Right now this only consists of
  a bootverbose printf and the allocate of a bus_dma tag if necessary.
- Adjust all PCI bus drivers to allocate a PCI bus softc and to call
  pci_attach_common() from their attach routines.

MFC after: 2 weeks

12 years agoUnbreak SMP on stock Octeon systems -- copy the core_mask from bootinfo into
jmallett [Fri, 2 Mar 2012 20:34:15 +0000 (20:34 +0000)]
Unbreak SMP on stock Octeon systems -- copy the core_mask from bootinfo into
sysinfo.  This should have been done as part of replacing bootinfo with sysinfo.

12 years agoSimilar to the fixes in 226967 and 226987, purge any name cache entries
jhb [Fri, 2 Mar 2012 18:55:19 +0000 (18:55 +0000)]
Similar to the fixes in 226967 and 226987, purge any name cache entries
associated with the previous vnode (if any) associated with the target of
a rename().  Otherwise, a lookup of the target pathname concurrent with a
rename() could re-add a name cache entry after the namei(RENAME) lookup
in kern_renameat() had purged the target pathname.

MFC after: 2 weeks

12 years agoFix typo.
andreast [Fri, 2 Mar 2012 18:18:14 +0000 (18:18 +0000)]
Fix typo.

12 years agoEliminate stale incorrect ARGSUSED comments.
alc [Fri, 2 Mar 2012 17:33:51 +0000 (17:33 +0000)]
Eliminate stale incorrect ARGSUSED comments.

Submitted by: bde

12 years agoRemoved excessive _seekdir() call in closedir(). This saves one lseek()
ru [Fri, 2 Mar 2012 14:05:50 +0000 (14:05 +0000)]
Removed excessive _seekdir() call in closedir().  This saves one lseek()
syscall.  Before r5958, seekdir() was called for its side effect of
freeing memory allocated by opendir() for rewinddir(), but that revision
added _reclaim_telldir() that frees all memory allocated by telldir()
calls, making this call redundant.

This introduces a slight change.  If an application duplicated the descriptor
obtained through dirfd(), it can no longer rely on file position to be
reset to the start of file after a call to closedir().  It's believed to
be safe because neither POSIX, nor any other OS I've tested (NetBSD, Linux,
OS X) rewind the file offset pointer on closedir().

Reported by: Igor Sysoev

12 years agoBelatedly add dl_iterate_phdr(3) to the list of installed manpages.
kib [Fri, 2 Mar 2012 13:19:56 +0000 (13:19 +0000)]
Belatedly add dl_iterate_phdr(3) to the list of installed manpages.

MFC after: 3 days

12 years agoFinally removed the stat() and fstat() calls from the opendir() code.
ru [Fri, 2 Mar 2012 10:03:38 +0000 (10:03 +0000)]
Finally removed the stat() and fstat() calls from the opendir() code.
They were made excessive in r205424 by opening with O_DIRECTORY.
Also eliminated the fcntl() call used to set FD_CLOEXEC by opening
with O_CLOEXEC.

(fdopendir() still checks that the passed descriptor is a directory,
and sets FD_CLOEXEC on it.)

Reviewed by: ed

12 years agoReflect the renaming of ifmaof_ifpforaddr() to if_findmulti() in r148652.
pluknet [Fri, 2 Mar 2012 09:52:42 +0000 (09:52 +0000)]
Reflect the renaming of ifmaof_ifpforaddr() to if_findmulti() in r148652.

MFC after: 1 week

12 years agoDo not expose unlocked unconstructed nullfs vnode on mount list.
kib [Fri, 2 Mar 2012 09:48:46 +0000 (09:48 +0000)]
Do not expose unlocked unconstructed nullfs vnode on mount list.
Lock the native nullfs vnode lock before switching the locks.

Tested by: pho
MFC after: 1 week

12 years agoifp->if_ioctl() has moved to u_long cmd in r36735.
pluknet [Fri, 2 Mar 2012 09:30:54 +0000 (09:30 +0000)]
ifp->if_ioctl() has moved to u_long cmd in r36735.
Somehow that change had not reached here together with ifioctl().

MFC after: 1 week

12 years agoFix names of some Marvell SATA chips. It looks like chips with proprietary
mav [Fri, 2 Mar 2012 08:49:07 +0000 (08:49 +0000)]
Fix names of some Marvell SATA chips. It looks like chips with proprietary
interface supported by mvs(4) are 88SX, while AHCI-like chips are 88SE.

PR: kern/165271
Submitted by: Jia-Shiun Li <jiashiun@gmail.com>
MFC after: 1 week

12 years agoAllow to configure net.inet6.ip6.{accept_rtadv,no_radr} by the loader tunables
hrs [Fri, 2 Mar 2012 07:23:28 +0000 (07:23 +0000)]
Allow to configure net.inet6.ip6.{accept_rtadv,no_radr} by the loader tunables
as well because they have to be configured before interface initialization for
AF_INET6.

12 years agoRemove a redundant check.
hrs [Fri, 2 Mar 2012 07:22:04 +0000 (07:22 +0000)]
Remove a redundant check.

12 years agoKill EoL whitespaces, and minor lint.
pluknet [Fri, 2 Mar 2012 05:55:45 +0000 (05:55 +0000)]
Kill EoL whitespaces, and minor lint.

12 years agoAdd ahci(4) and siis(4) to the hardware notes.
mav [Fri, 2 Mar 2012 05:16:53 +0000 (05:16 +0000)]
Add ahci(4) and siis(4) to the hardware notes.

MFC after: 1 week

12 years agoWrap another ATH_LOCK around the scanning flag.
adrian [Fri, 2 Mar 2012 03:11:53 +0000 (03:11 +0000)]
Wrap another ATH_LOCK around the scanning flag.

PR: kern/163318

12 years agoWrap the scan code state change stuff behind ATH_LOCK and the PCU fiddling
adrian [Fri, 2 Mar 2012 02:57:10 +0000 (02:57 +0000)]
Wrap the scan code state change stuff behind ATH_LOCK and the PCU fiddling
behind the PCU lock.

sc_scanning is being checked without ATH_LOCK behind held and could
in theory run from multiple threads.

12 years agoAttempt to catch scan cancellations at exactly the wrong time from occuring.
adrian [Fri, 2 Mar 2012 02:53:43 +0000 (02:53 +0000)]
Attempt to catch scan cancellations at exactly the wrong time from occuring.

The scan code unlocks the comlock and calls into the driver.  It then
assumes the state hasn't changed from underneath it.

Although I haven't seen this particular condition trigger, I'd like to
be informed if I or anyone else sees it.

What I'm thinking may occur:

* A cancellation comes in during the scan_end call;
* the cancel flag is set;
* but it's never checked, so scandone isn't updated;
* .. and the interface stays in the STA power save mode.

It's a subtle race, if it even exists.

PR: kern/163318

12 years agoProperly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-X
jhb [Thu, 1 Mar 2012 22:13:10 +0000 (22:13 +0000)]
Properly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-X
allocation fails.

Reviewed by: jfv
MFC after: 2 weeks

12 years ago- Add support for the Intel Sandy Bridge microarchitecture (both core and uncore...
davide [Thu, 1 Mar 2012 21:23:26 +0000 (21:23 +0000)]
- Add support for the Intel Sandy Bridge microarchitecture (both core and uncore counting events)
- New manpages with event lists.
- Add MSRs for the Intel Sandy Bridge microarchitecture

Reviewed by: attilio, brueffer, fabient
Approved by: gnn (mentor)
MFC after: 3 weeks

12 years agoProvide pre/post transfer method callbacks for icbbb
kan [Thu, 1 Mar 2012 20:58:20 +0000 (20:58 +0000)]
Provide pre/post transfer method callbacks for icbbb
clients.

These are helful when making certain drivers work on both Linux
and FreeBSD without changing the code flow too much.

Reviewed by: kib, wlosh
MFC after: 1 month

12 years agoAdd regression test for USB enumeration.
hselasky [Thu, 1 Mar 2012 20:45:17 +0000 (20:45 +0000)]
Add regression test for USB enumeration.

MFC after: 1 week

12 years agoUpdate the documentation on pci_get/set_powerstate(). These methods are
jhb [Thu, 1 Mar 2012 20:36:50 +0000 (20:36 +0000)]
Update the documentation on pci_get/set_powerstate().  These methods are
not ACPI-specific at all, but deal with PCI power states.  Also,
pci_set_powerstate() fails with EOPNOTSUPP if a request is made that the
underlying device does not support rather than falling back to somehow
setting D0.

12 years agoSort function prototypes.
jhb [Thu, 1 Mar 2012 20:32:02 +0000 (20:32 +0000)]
Sort function prototypes.

12 years agoStyle change: Expand redundant #if's. Remove a couple of empty lines.
hselasky [Thu, 1 Mar 2012 20:25:17 +0000 (20:25 +0000)]
Style change: Expand redundant #if's. Remove a couple of empty lines.

MFC after: 1 week

12 years agoAdd pci_save_state() and pci_restore_state() wrappers around
jhb [Thu, 1 Mar 2012 20:20:55 +0000 (20:20 +0000)]
Add pci_save_state() and pci_restore_state() wrappers around
pci_cfg_save() and pci_cfg_restore() for device drivers to use when
saving and restoring state (e.g. to handle device-specific resets).

Reviewed by: imp
MFC after: 2 weeks