svn commit: r259096 - in head/sys/geom: cache journal

2013-12-08 Thread Justin Hibbits
Author: jhibbits
Date: Sun Dec  8 09:34:56 2013
New Revision: 259096
URL: http://svnweb.freebsd.org/changeset/base/259096

Log:
  Partially revert r259080.  bde@ pointed out that there are a lot more style 
bugs
  going on in here than can be fixed, and I introduced some of my own.  Rather
  than fix the whole host of them, back out my bugs.
  
  Found by: bde
  X-MFC with:   r259080

Modified:
  head/sys/geom/cache/g_cache.c
  head/sys/geom/journal/g_journal.c

Modified: head/sys/geom/cache/g_cache.c
==
--- head/sys/geom/cache/g_cache.c   Sun Dec  8 06:52:22 2013
(r259095)
+++ head/sys/geom/cache/g_cache.c   Sun Dec  8 09:34:56 2013
(r259096)
@@ -67,7 +67,7 @@ static u_int g_cache_used_hi = 20;
 static int
 sysctl_handle_pct(SYSCTL_HANDLER_ARGS)
 {
-   int val;
+   u_int val = *(u_int *)arg1;
int error;
 
error = sysctl_handle_int(oidp, val, 0, req);

Modified: head/sys/geom/journal/g_journal.c
==
--- head/sys/geom/journal/g_journal.c   Sun Dec  8 06:52:22 2013
(r259095)
+++ head/sys/geom/journal/g_journal.c   Sun Dec  8 09:34:56 2013
(r259096)
@@ -168,7 +168,7 @@ SYSCTL_UINT(_kern_geom_journal_cache, OI
 static int
 g_journal_cache_switch_sysctl(SYSCTL_HANDLER_ARGS)
 {
-   int cswitch;
+   u_int cswitch;
int error;
 
cswitch = g_journal_cache_switch;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259099 - head/sys/arm/ti/am335x

2013-12-08 Thread Luiz Otavio O Souza
Author: loos
Date: Sun Dec  8 13:46:27 2013
New Revision: 259099
URL: http://svnweb.freebsd.org/changeset/base/259099

Log:
  Similar to r255816, fix the math for the DELAY() calculation.  It was off
  by a really small amount because of the higher timer resolution.
  
  Approved by:  adrian (mentor)
  Verified on:  BBB

Modified:
  head/sys/arm/ti/am335x/am335x_dmtimer.c

Modified: head/sys/arm/ti/am335x/am335x_dmtimer.c
==
--- head/sys/arm/ti/am335x/am335x_dmtimer.c Sun Dec  8 11:13:37 2013
(r259098)
+++ head/sys/arm/ti/am335x/am335x_dmtimer.c Sun Dec  8 13:46:27 2013
(r259099)
@@ -359,7 +359,7 @@ DELAY(int usec)
}
 
/* Get the number of times to count */
-   counts = usec * ((am335x_dmtimer_tc.tc_frequency / 100) + 1);
+   counts = usec * (am335x_dmtimer_tc.tc_frequency / 100) + 1;
 
first = am335x_dmtimer_tc_read_4(DMTIMER_TCRR);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259100 - head/contrib/llvm/tools/clang/lib/CodeGen

2013-12-08 Thread Dimitry Andric
Author: dim
Date: Sun Dec  8 13:56:26 2013
New Revision: 259100
URL: http://svnweb.freebsd.org/changeset/base/259100

Log:
  Pull in r196658 from upstream clang trunk:
  
CodeGen: Don't emit linkage on thunks that aren't emitted because they're
vararg.
  
This can happen when we're trying to emit a thunk with available_externally
linkage with optimization enabled but bail because it doesn't make sense for
vararg functions.
  
[LLVM] PR18098.
  
  This should fix clang Broken module found, compilation aborted errors when
  building the qt4-based dvbcut port.
  
  Reported by:  se
  MFC after:3 days

Modified:
  head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp

Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
==
--- head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Sun Dec  8 
13:46:27 2013(r259099)
+++ head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Sun Dec  8 
13:56:26 2013(r259100)
@@ -454,10 +454,9 @@ void CodeGenVTables::EmitThunk(GlobalDec
   } else {
 // Normal thunk body generation.
 CodeGenFunction(CGM).GenerateThunk(ThunkFn, FnInfo, GD, Thunk);
+if (UseAvailableExternallyLinkage)
+  ThunkFn-setLinkage(llvm::GlobalValue::AvailableExternallyLinkage);
   }
-
-  if (UseAvailableExternallyLinkage)
-ThunkFn-setLinkage(llvm::GlobalValue::AvailableExternallyLinkage);
 }
 
 void CodeGenVTables::MaybeEmitThunkAvailableExternally(GlobalDecl GD,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259101 - head/sys/dev/drm2/radeon

2013-12-08 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Dec  8 14:21:54 2013
New Revision: 259101
URL: http://svnweb.freebsd.org/changeset/base/259101

Log:
  drm/radeon: agp_info-ai_aperture_size is in bytes, not Mbytes
  
  This fixes radeon_agp_init() and gtt_size is now correct. However, this
  is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't
  implemented yet.
  
  Submitted by: tijl@

Modified:
  head/sys/dev/drm2/radeon/radeon_agp.c

Modified: head/sys/dev/drm2/radeon/radeon_agp.c
==
--- head/sys/dev/drm2/radeon/radeon_agp.c   Sun Dec  8 13:56:26 2013
(r259100)
+++ head/sys/dev/drm2/radeon/radeon_agp.c   Sun Dec  8 14:21:54 2013
(r259101)
@@ -153,11 +153,11 @@ int radeon_agp_init(struct radeon_device
return ret;
}
 
-   if (rdev-ddev-agp-info.ai_aperture_size  32) {
+   if ((rdev-ddev-agp-info.ai_aperture_size  20)  32) {
drm_agp_release(rdev-ddev);
dev_warn(rdev-dev, AGP aperture too small (%zuM) 
need at least 32M, disabling AGP\n,
-   rdev-ddev-agp-info.ai_aperture_size);
+   rdev-ddev-agp-info.ai_aperture_size  20);
return -EINVAL;
}
 
@@ -246,7 +246,7 @@ int radeon_agp_init(struct radeon_device
}
 
rdev-mc.agp_base = rdev-ddev-agp-info.ai_aperture_base;
-   rdev-mc.gtt_size = rdev-ddev-agp-info.ai_aperture_size  20;
+   rdev-mc.gtt_size = rdev-ddev-agp-info.ai_aperture_size;
rdev-mc.gtt_start = rdev-mc.agp_base;
rdev-mc.gtt_end = rdev-mc.gtt_start + rdev-mc.gtt_size - 1;
dev_info(rdev-dev, GTT: %juM 0x%08jX - 0x%08jX\n,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259102 - head/sys/sparc64/sparc64

2013-12-08 Thread Marius Strobl
Author: marius
Date: Sun Dec  8 15:25:19 2013
New Revision: 259102
URL: http://svnweb.freebsd.org/changeset/base/259102

Log:
  Restore a vital comment nuked in r259016.

Modified:
  head/sys/sparc64/sparc64/machdep.c

Modified: head/sys/sparc64/sparc64/machdep.c
==
--- head/sys/sparc64/sparc64/machdep.c  Sun Dec  8 14:21:54 2013
(r259101)
+++ head/sys/sparc64/sparc64/machdep.c  Sun Dec  8 15:25:19 2013
(r259102)
@@ -553,6 +553,13 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
 * trigger a fatal reset error or worse things further down the road.
 * XXX it should be possible to use this solely instead of writing
 * %tba in cpu_setregs().  Doing so causes a hang however.
+*
+* NB: the low-level console drivers require a working DELAY() and
+* some compiler optimizations may cause the curthread accesses of
+* mutex(9) to be factored out even if the latter aren't actually
+* called.  Both of these require PCPU_REG to be set.  However, we
+* can't set PCPU_REG without also taking over the trap table or the
+* firmware will overwrite it.
 */
sun4u_set_traptable(tl0_base);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken

2013-12-08 Thread Marius Strobl
On Thu, Dec 05, 2013 at 10:38:54PM +, Aleksandr Rybalko wrote:
 Author: ray
 Date: Thu Dec  5 22:38:53 2013
 New Revision: 259016
 URL: http://svnweb.freebsd.org/changeset/base/259016
 
 Log:
   Merge VT(9) project (a.k.a. newcons).
   
   Reviewed by:nwhitehorn
   MFC_to_10_after:re approval

Have you addressed any of the points raised in:
http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045887.html
to get VT(9) at least en par with syscons(4) regarding being able to use a
hardware cursor, allowing different low-level console drivers to compete
for the same hardware etc. in the meantime?

Marius

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259103 - head/sys/dev/cxgbe

2013-12-08 Thread Navdeep Parhar
Author: np
Date: Sun Dec  8 17:47:37 2013
New Revision: 259103
URL: http://svnweb.freebsd.org/changeset/base/259103

Log:
  cxgbe(4): save a copy of the RSS map for each port for the driver's use.

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hSun Dec  8 15:25:19 2013
(r259102)
+++ head/sys/dev/cxgbe/adapter.hSun Dec  8 17:47:37 2013
(r259103)
@@ -200,6 +200,7 @@ struct port_info {
unsigned long flags;
int if_flags;
 
+   uint16_t *rss;
uint16_t viid;
int16_t  xact_addr_filt;/* index of exact MAC address filter */
uint16_t rss_size;  /* size of VI's RSS table slice */

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cSun Dec  8 15:25:19 2013
(r259102)
+++ head/sys/dev/cxgbe/t4_main.cSun Dec  8 17:47:37 2013
(r259103)
@@ -3157,7 +3157,7 @@ port_full_init(struct port_info *pi)
struct ifnet *ifp = pi-ifp;
uint16_t *rss;
struct sge_rxq *rxq;
-   int rc, i;
+   int rc, i, j;
 
ASSERT_SYNCHRONIZED_OP(sc);
KASSERT((pi-flags  PORT_INIT_DONE) == 0,
@@ -3174,21 +3174,25 @@ port_full_init(struct port_info *pi)
goto done;  /* error message displayed already */
 
/*
-* Setup RSS for this port.
+* Setup RSS for this port.  Save a copy of the RSS table for later use.
 */
-   rss = malloc(pi-nrxq * sizeof (*rss), M_CXGBE,
-   M_ZERO | M_WAITOK);
-   for_each_rxq(pi, i, rxq) {
-   rss[i] = rxq-iq.abs_id;
+   rss = malloc(pi-rss_size * sizeof (*rss), M_CXGBE, M_ZERO | M_WAITOK);
+   for (i = 0; i  pi-rss_size;) {
+   for_each_rxq(pi, j, rxq) {
+   rss[i++] = rxq-iq.abs_id;
+   if (i == pi-rss_size)
+   break;
+   }
}
-   rc = -t4_config_rss_range(sc, sc-mbox, pi-viid, 0,
-   pi-rss_size, rss, pi-nrxq);
-   free(rss, M_CXGBE);
+
+   rc = -t4_config_rss_range(sc, sc-mbox, pi-viid, 0, pi-rss_size, rss,
+   pi-rss_size);
if (rc != 0) {
if_printf(ifp, rss_config failed: %d\n, rc);
goto done;
}
 
+   pi-rss = rss;
pi-flags |= PORT_INIT_DONE;
 done:
if (rc != 0)
@@ -3237,6 +3241,7 @@ port_full_uninit(struct port_info *pi)
quiesce_fl(sc, ofld_rxq-fl);
}
 #endif
+   free(pi-rss, M_CXGBE);
}
 
t4_teardown_port_queues(pi);

Modified: head/sys/dev/cxgbe/t4_sge.c
==
--- head/sys/dev/cxgbe/t4_sge.c Sun Dec  8 15:25:19 2013(r259102)
+++ head/sys/dev/cxgbe/t4_sge.c Sun Dec  8 17:47:37 2013(r259103)
@@ -1678,7 +1678,7 @@ t4_eth_rx(struct sge_iq *iq, const struc
 
m0-m_pkthdr.rcvif = ifp;
m0-m_flags |= M_FLOWID;
-   m0-m_pkthdr.flowid = rss-hash_val;
+   m0-m_pkthdr.flowid = be32toh(rss-hash_val);
 
if (cpl-csum_calc  !cpl-err_vec) {
if (ifp-if_capenable  IFCAP_RXCSUM 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259104 - head/sys/dev/drm2/radeon

2013-12-08 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sun Dec  8 18:48:07 2013
New Revision: 259104
URL: http://svnweb.freebsd.org/changeset/base/259104

Log:
  drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD
  
  The code was unmodified compared to Linux and returned the amount of
  received bytes from the i2c bus. This led to non-working i2c bus and
  failure to eg. read monitor's EDID, if connected to DisplayPort.
  
  MFC after:3 days
  Tested by:Mikaël Urankar mikael.uran...@gmail.com

Modified:
  head/sys/dev/drm2/radeon/atombios_dp.c

Modified: head/sys/dev/drm2/radeon/atombios_dp.c
==
--- head/sys/dev/drm2/radeon/atombios_dp.c  Sun Dec  8 17:47:37 2013
(r259103)
+++ head/sys/dev/drm2/radeon/atombios_dp.c  Sun Dec  8 18:48:07 2013
(r259104)
@@ -272,7 +272,7 @@ int radeon_dp_i2c_aux_ch(device_t dev, i
case AUX_I2C_REPLY_ACK:
if (mode == MODE_I2C_READ)
*read_byte = reply[0];
-   return ret;
+   return (0); /* Return ret on Linux. */
case AUX_I2C_REPLY_NACK:
DRM_DEBUG_KMS(aux_i2c nack\n);
return -EREMOTEIO;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

svn commit: r259106 - head/sbin/casperd

2013-12-08 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Dec  8 19:32:29 2013
New Revision: 259106
URL: http://svnweb.freebsd.org/changeset/base/259106

Log:
  Some improvements to the casperd manual page.
  
  Submitted by: emaste

Modified:
  head/sbin/casperd/casperd.8

Modified: head/sbin/casperd/casperd.8
==
--- head/sbin/casperd/casperd.8 Sun Dec  8 19:20:50 2013(r259105)
+++ head/sbin/casperd/casperd.8 Sun Dec  8 19:32:29 2013(r259106)
@@ -43,15 +43,15 @@
 .Sh DESCRIPTION
 The
 .Nm
-daemon provides various services in capability-like fashion to programs
-running in capability mode sandbox.
+daemon hosts various services that can be accessed through
+libcapsicum's capabilities by programs running in sandboxes.
 For example it is prohibited to send UDP packets to arbitrary destinations
 when operating in capability mode, which makes DNS resolution impossible.
 To make it possible the
 .Nm
-daemon provides
+daemon provides the
 .Nm system.dns
-service that allows to proxy DNS resolution requests through dedicated,
+service that proxies DNS resolution requests through a dedicated,
 non-sandboxed process provided by
 .Nm .
 .Pp
@@ -80,15 +80,15 @@ stored.
 The default location is
 .Pa /var/run/casperd.pid .
 .It Fl S Ar sockpath
-Specify alternative location of a
+Specify alternative location of the
 .Xr unix 4
-domain socket that can be used to connect to the
+domain socket used to connect to the
 .Nm
 daemon.
 The default location is
 .Pa /var/run/casper .
 .It Fl v
-Print or log verbose/debugging informations.
+Print or log verbose/debugging information.
 This option can be specified multiple times to raise the verbosity
 level.
 .El
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259107 - head/sys/vm

2013-12-08 Thread Alan Cox
Author: alc
Date: Sun Dec  8 20:07:02 2013
New Revision: 259107
URL: http://svnweb.freebsd.org/changeset/base/259107

Log:
  Eliminate a redundant parameter to vm_radix_replace().
  
  Improve the wording of the comment describing vm_radix_replace().
  
  Reviewed by:  attilio
  MFC after:6 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/vm/vm_page.c
  head/sys/vm/vm_radix.c
  head/sys/vm/vm_radix.h

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Sun Dec  8 19:32:29 2013(r259106)
+++ head/sys/vm/vm_page.c   Sun Dec  8 20:07:02 2013(r259107)
@@ -1200,7 +1200,7 @@ vm_page_replace(vm_page_t mnew, vm_objec
 
mnew-object = object;
mnew-pindex = pindex;
-   mold = vm_radix_replace(object-rtree, mnew, pindex);
+   mold = vm_radix_replace(object-rtree, mnew);
KASSERT(mold-queue == PQ_NONE,
(vm_page_replace: mold is on a paging queue));
 

Modified: head/sys/vm/vm_radix.c
==
--- head/sys/vm/vm_radix.c  Sun Dec  8 19:32:29 2013(r259106)
+++ head/sys/vm/vm_radix.c  Sun Dec  8 20:07:02 2013(r259107)
@@ -788,20 +788,18 @@ vm_radix_reclaim_allnodes(struct vm_radi
 }
 
 /*
- * Replace an existing page into the trie with another one.
- * Panics if the replacing page is not present or if the new page has an
- * invalid key.
+ * Replace an existing page in the trie with another one.
+ * Panics if there is not an old page in the trie at the new page's index.
  */
 vm_page_t
-vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage, vm_pindex_t index)
+vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage)
 {
struct vm_radix_node *rnode;
vm_page_t m;
+   vm_pindex_t index;
int slot;
 
-   KASSERT(newpage-pindex == index, (%s: newpage index invalid,
-   __func__));
-
+   index = newpage-pindex;
rnode = vm_radix_getroot(rtree);
if (rnode == NULL)
panic(%s: replacing page on an empty trie, __func__);

Modified: head/sys/vm/vm_radix.h
==
--- head/sys/vm/vm_radix.h  Sun Dec  8 19:32:29 2013(r259106)
+++ head/sys/vm/vm_radix.h  Sun Dec  8 20:07:02 2013(r259107)
@@ -43,8 +43,7 @@ vm_page_t vm_radix_lookup_ge(struct vm_r
 vm_page_t  vm_radix_lookup_le(struct vm_radix *rtree, vm_pindex_t index);
 void   vm_radix_reclaim_allnodes(struct vm_radix *rtree);
 void   vm_radix_remove(struct vm_radix *rtree, vm_pindex_t index);
-vm_page_t  vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage,
-   vm_pindex_t index);
+vm_page_t  vm_radix_replace(struct vm_radix *rtree, vm_page_t newpage);
 
 #endif /* _KERNEL */
 #endif /* !_VM_RADIX_H_ */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r259058 - head/usr.bin/bc

2013-12-08 Thread Tim Kientzle

On Dec 7, 2013, at 2:04 PM, Tom Rhodes trho...@freebsd.org wrote:

 On Sat, 7 Dec 2013 01:44:19 -0500
 Eitan Adler ead...@freebsd.org wrote:
 
 On Sat, Dec 7, 2013 at 1:27 AM, Xin LI delp...@freebsd.org wrote:
 Author: delphij
 Date: Sat Dec  7 06:27:54 2013
 New Revision: 259058
 URL: http://svnweb.freebsd.org/changeset/base/259058
 
 Log:
  Remove mention of the compatibility option 'q', which is
  intentionally undocumented and its only purpose is that
  we do not bail out when used as a drop-in replacement of
  a different implementation.
 
 As I mentioned in the reply to the PR this change goes in the wrong 
 direction.
 
 We should instead document -q as a compatibility option.
 Undocumented flags, even as NOPS, are bugs.
 
 It should be documented as a do-nothing option.

It should be documented in the manpage as a do-nothing option.

It should not be included in Usage.

Tim

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259108 - head/sys/cam/scsi

2013-12-08 Thread Alexander Motin
Author: mav
Date: Sun Dec  8 20:43:01 2013
New Revision: 259108
URL: http://svnweb.freebsd.org/changeset/base/259108

Log:
  When comparing device IDs, make sure that they have the same type
  (like NAA assigned) and identify the same entity (like device or port).
  Otherwise there can be false positives since at least some models of
  Seagate disks use same IDs for the whole device and one of its ports.
  
  MFC after:2 weeks

Modified:
  head/sys/cam/scsi/scsi_all.c

Modified: head/sys/cam/scsi/scsi_all.c
==
--- head/sys/cam/scsi/scsi_all.cSun Dec  8 20:07:02 2013
(r259107)
+++ head/sys/cam/scsi/scsi_all.cSun Dec  8 20:43:01 2013
(r259108)
@@ -6509,7 +6509,11 @@ scsi_devid_match(uint8_t *lhs, size_t lh
while (rhs_id = rhs_last
 (rhs_id-identifier + rhs_id-length) = rhs_end) {
 
-   if (rhs_id-length == lhs_id-length
+   if ((rhs_id-id_type 
+(SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK)) ==
+   (lhs_id-id_type 
+(SVPD_ID_ASSOC_MASK | SVPD_ID_TYPE_MASK))
+ rhs_id-length == lhs_id-length
  memcmp(rhs_id-identifier, lhs_id-identifier,
   rhs_id-length) == 0)
return (0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken

2013-12-08 Thread Andreas Tobler
Hi Aleksandr,

On 08.12.13 00:59, Aleksandr Rybalko wrote:
 Andreas Tobler andre...@freebsd.org написав(ла):
 On 05.12.13 23:38, Aleksandr Rybalko wrote:
 Author: ray
 Date: Thu Dec  5 22:38:53 2013
 New Revision: 259016
 URL: http://svnweb.freebsd.org/changeset/base/259016

 Log:
   Merge VT(9) project (a.k.a. newcons).
   
   Reviewed by:  nwhitehorn
   MFC_to_10_after:  re approval
   
   Sponsored by: The FreeBSD Foundation

 Great! Thanks, gives a new look  feel on the console :)
 Have it running on amd64/i386 and PowerMac(32/64-bit).
 The only thing I need to figure is the mapping of the AltGr or in Mac
 world, the alt key mapping. Iow, the third level mapping of the keys.
 e.g. the @ here is on altgr-2...

 Again, thanks!
 Andreas
 

 I'm glad to fix that, but I've to understand how it is should work :-)

Hehe :)

So do I. I was playing a bit while comparing to syscons.c

And with the below diff I'm able to get what I want. At least when I
press RALT (Altgr) key I get the third symbol printed on my keyboard.
I have a couple of Thinkpads here where I play with. (The PowerMac's are
currently to loud)

For example, on the '2' I have the '' as the second symbol and the '@'
as third symbol. Yeah, these are european keyboards

Now I do not prepend the 0x1b and then my RALT behaves as used to, at
least for me.

I do not know the fine details but LALT and RALT are different.

What do you think, others?

For me this is a really important thing since all the 'special' keys are
not accesible w/o the 'hack' below. If I want the pipe (|), or writing
code ({}, [], ...) I have to remote login to get the characters I need.
But I guess I do not need to explain that ;)

TIA,
Andreas

Index: vt_core.c
===
--- vt_core.c   (revision 259095)
+++ vt_core.c   (working copy)
@@ -408,6 +408,7 @@
} else {
switch (c  ~RELKEY) {
case (SPCLKEY | RALT):
+   break;
case (SPCLKEY | LALT):
vd-vd_kbstate |= ALKED;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

svn commit: r259109 - in head/sys: conf opencrypto

2013-12-08 Thread Peter Wemm
Author: peter
Date: Sun Dec  8 21:59:46 2013
New Revision: 259109
URL: http://svnweb.freebsd.org/changeset/base/259109

Log:
  Fix build with 'crypto' and 'zfs' in the same kernel.  This was the path
  of least pain I could find.

Added:
  head/sys/opencrypto/cryptodeflate.c
 - copied unchanged from r259108, head/sys/opencrypto/deflate.c
Deleted:
  head/sys/opencrypto/deflate.c
Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sun Dec  8 20:43:01 2013(r259108)
+++ head/sys/conf/files Sun Dec  8 21:59:46 2013(r259109)
@@ -3728,7 +3728,7 @@ opencrypto/crypto.c   optional crypto
 opencrypto/cryptodev.c optional cryptodev
 opencrypto/cryptodev_if.m  optional crypto
 opencrypto/cryptosoft.coptional crypto
-opencrypto/deflate.c   optional crypto
+opencrypto/cryptodeflate.c optional crypto
 opencrypto/rmd160.coptional crypto | ipsec
 opencrypto/skipjack.c  optional crypto
 opencrypto/xform.c optional crypto

Copied: head/sys/opencrypto/cryptodeflate.c (from r259108, 
head/sys/opencrypto/deflate.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/opencrypto/cryptodeflate.c Sun Dec  8 21:59:46 2013
(r259109, copy of r259108, head/sys/opencrypto/deflate.c)
@@ -0,0 +1,263 @@
+/* $OpenBSD: deflate.c,v 1.3 2001/08/20 02:45:22 hugh Exp $ */
+
+/*-
+ * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (j...@wabbitt.org)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * This file contains a wrapper around the deflate algo compression
+ * functions using the zlib library (see net/zlib.{c,h})
+ */
+
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include sys/types.h
+#include sys/param.h
+#include sys/malloc.h
+#include sys/param.h
+#include sys/kernel.h
+#include sys/sdt.h
+#include sys/systm.h
+#include net/zlib.h
+
+#include opencrypto/cryptodev.h
+#include opencrypto/deflate.h
+
+SDT_PROVIDER_DECLARE(opencrypto);
+SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, entry,
+int, u_int32_t);
+SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, bad,
+int, int, int, int, int);
+SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, iter,
+int, int, int, int, int);
+SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, return,
+int, u_int32_t);
+
+int window_inflate = -1 * MAX_WBITS;
+int window_deflate = -12;
+
+/*
+ * This function takes a block of data and (de)compress it using the deflate
+ * algorithm
+ */
+
+u_int32_t
+deflate_global(data, size, decomp, out)
+   u_int8_t *data;
+   u_int32_t size;
+   int decomp;
+   u_int8_t **out;
+{
+   /* decomp indicates whether we compress (0) or decompress (1) */
+
+   z_stream zbuf;
+   u_int8_t *output;
+   u_int32_t count, result;
+   int error, i;
+   struct deflate_buf *bufh, *bufp;
+
+   SDT_PROBE2(opencrypto, deflate, deflate_global, entry, decomp, size);
+
+   bufh = bufp = NULL;
+   if (!decomp) {
+   i = 1;
+   } else {
+   /*
+* Choose a buffer with 4x the size of the input buffer
+* for the size of the output buffer in the case of
+* decompression. If it's not sufficient, it will need to be
+* updated while the decompression is going on.
+*/
+   i = 4;
+   }
+   /*
+

svn commit: r259110 - in head/sys: conf dev/vt

2013-12-08 Thread Aleksandr Rybalko
Author: ray
Date: Sun Dec  8 22:49:12 2013
New Revision: 259110
URL: http://svnweb.freebsd.org/changeset/base/259110

Log:
  o Build syscons(9)'s splash support if both sc and splash are enabled.
  o Include opt_splash.h for vt(9) to know when splash device is enabled.
  o Build logo_freebsd.c only if splash and vt are enabled.
  o Include opt_compat.h to know when we have to respect compatibility.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/conf/files
  head/sys/dev/vt/vt.h
  head/sys/dev/vt/vt_core.c

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sun Dec  8 21:59:46 2013(r259109)
+++ head/sys/conf/files Sun Dec  8 22:49:12 2013(r259110)
@@ -1398,7 +1398,7 @@ dev/exca/exca.c   optional cbb
 dev/fatm/if_fatm.c optional fatm pci
 dev/fb/fbd.c   optional fbd | vt
 dev/fb/fb_if.m standard
-dev/fb/splash.coptional splash
+dev/fb/splash.coptional sc splash
 dev/fdt/fdt_common.c   optional fdt
 dev/fdt/fdt_ic_if.moptional fdt
 dev/fdt/fdt_pci.c  optional fdt pci
@@ -2468,7 +2468,7 @@ dev/vt/font/vt_font_default.c optional v
 dev/vt/font/vt_mouse_cursor.c  optional vt
 dev/vt/hw/fb/vt_fb.c   optional vt
 dev/vt/hw/vga/vga.coptional vt vt_vga
-dev/vt/logo/logo_freebsd.c optional vt
+dev/vt/logo/logo_freebsd.c optional vt splash
 dev/vt/vt_buf.coptional vt
 dev/vt/vt_consolectl.c optional vt
 dev/vt/vt_core.c   optional vt

Modified: head/sys/dev/vt/vt.h
==
--- head/sys/dev/vt/vt.hSun Dec  8 21:59:46 2013(r259109)
+++ head/sys/dev/vt/vt.hSun Dec  8 22:49:12 2013(r259110)
@@ -46,7 +46,9 @@
 #include sys/terminal.h
 #include sys/sysctl.h
 
+#include opt_compat.h
 #include opt_syscons.h
+#include opt_splash.h
 
 #ifndefVT_MAXWINDOWS
 #ifdef MAXCONS

Modified: head/sys/dev/vt/vt_core.c
==
--- head/sys/dev/vt/vt_core.c   Sun Dec  8 21:59:46 2013(r259109)
+++ head/sys/dev/vt/vt_core.c   Sun Dec  8 22:49:12 2013(r259110)
@@ -794,6 +794,7 @@ vtterm_done(struct terminal *tm)
}
 }
 
+#ifdef DEV_SPLASH
 static void
 vtterm_splash(struct vt_device *vd)
 {
@@ -813,6 +814,7 @@ vtterm_splash(struct vt_device *vd)
vd-vd_flags |= VDF_SPLASH;
}
 }
+#endif
 
 static void
 vtterm_cnprobe(struct terminal *tm, struct consdev *cp)
@@ -845,7 +847,9 @@ vtterm_cnprobe(struct terminal *tm, stru
vt_winsize(vd, vw-vw_font, wsz);
terminal_set_winsize(tm, wsz);
 
+#ifdef DEV_SPLASH
vtterm_splash(vd);
+#endif
 
vd-vd_flags |= VDF_INITIALIZED;
main_vd = vd;
@@ -1788,8 +1792,10 @@ vt_allocate(struct vt_driver *drv, void 
/* Refill settings with new sizes. */
vt_resize(vd);
 
+#ifdef DEV_SPLASH
if (vd-vd_flags  VDF_SPLASH)
vtterm_splash(vd);
+#endif
 
if (vd-vd_curwindow != NULL)
callout_schedule(vd-vd_timer, hz / VT_TIMERFREQ);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259111 - head/contrib/gcc/config/i386

2013-12-08 Thread Dimitry Andric
Author: dim
Date: Sun Dec  8 23:24:32 2013
New Revision: 259111
URL: http://svnweb.freebsd.org/changeset/base/259111

Log:
  Use correct casts in gcc's emmintrin.h for the first arguments of the
  following builtin functions:
  
  * __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
  * __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
  * __builtin_ia32_psradi128() takes __v4si instead of __v8hi
  
  This should fix the following errors when building the LINT kernel with
  gcc:
  
  sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
  '__builtin_ia32_psradi128'
  sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
  '__builtin_ia32_pslldi128'
  
  MFC after:3 days

Modified:
  head/contrib/gcc/config/i386/emmintrin.h

Modified: head/contrib/gcc/config/i386/emmintrin.h
==
--- head/contrib/gcc/config/i386/emmintrin.hSun Dec  8 22:49:12 2013
(r259110)
+++ head/contrib/gcc/config/i386/emmintrin.hSun Dec  8 23:24:32 2013
(r259111)
@@ -1126,9 +1126,9 @@ _mm_slli_epi64 (__m128i __A, int __B)
 #define _mm_slli_epi16(__A, __B) \
   ((__m128i)__builtin_ia32_psllwi128 ((__v8hi)(__A), __B))
 #define _mm_slli_epi32(__A, __B) \
-  ((__m128i)__builtin_ia32_pslldi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_pslldi128 ((__v4si)(__A), __B))
 #define _mm_slli_epi64(__A, __B) \
-  ((__m128i)__builtin_ia32_psllqi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_psllqi128 ((__v2di)(__A), __B))
 #endif
 
 #if 0
@@ -1147,7 +1147,7 @@ _mm_srai_epi32 (__m128i __A, int __B)
 #define _mm_srai_epi16(__A, __B) \
   ((__m128i)__builtin_ia32_psrawi128 ((__v8hi)(__A), __B))
 #define _mm_srai_epi32(__A, __B) \
-  ((__m128i)__builtin_ia32_psradi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_psradi128 ((__v4si)(__A), __B))
 #endif
 
 #if 0
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259113 - head/usr.sbin/bsdconfig/share

2013-12-08 Thread Devin Teske
Author: dteske
Date: Mon Dec  9 01:30:20 2013
New Revision: 259113
URL: http://svnweb.freebsd.org/changeset/base/259113

Log:
  Fix failed attempt to send pkg(8) stderr to /dev/null
  
  MFC after:3 days

Modified:
  head/usr.sbin/bsdconfig/share/common.subr

Modified: head/usr.sbin/bsdconfig/share/common.subr
==
--- head/usr.sbin/bsdconfig/share/common.subr   Sun Dec  8 23:41:35 2013
(r259112)
+++ head/usr.sbin/bsdconfig/share/common.subr   Mon Dec  9 01:30:20 2013
(r259113)
@@ -64,8 +64,8 @@ export UNAME_M=$( uname -m ) # Machine
 export UNAME_R=$( uname -r ) # Release Level (i.e. X.Y-RELEASE)
 if [ ! ${PKG_ABI+set} ]; then
export PKG_ABI=$(
-   ASSUME_ALWAYS_YES=1 pkg -vv |
-   awk '$1==ABI{print $3;exit}' 2 /dev/null
+   ASSUME_ALWAYS_YES=1 pkg -vv 2 /dev/null |
+   awk '$1==ABI{print $3;exit}'
)
 fi
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259114 - head/sys/modules/crypto

2013-12-08 Thread Alfred Perlstein
Author: alfred
Date: Mon Dec  9 02:06:52 2013
New Revision: 259114
URL: http://svnweb.freebsd.org/changeset/base/259114

Log:
  Chase down cryptodeflate.c change from r259109.

Modified:
  head/sys/modules/crypto/Makefile

Modified: head/sys/modules/crypto/Makefile
==
--- head/sys/modules/crypto/MakefileMon Dec  9 01:30:20 2013
(r259113)
+++ head/sys/modules/crypto/MakefileMon Dec  9 02:06:52 2013
(r259114)
@@ -11,7 +11,7 @@
 KMOD   = crypto
 SRCS   = crypto.c cryptodev_if.c
 SRCS   += criov.c cryptosoft.c xform.c
-SRCS   += cast.c deflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c
+SRCS   += cast.c cryptodeflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c
 SRCS   += skipjack.c bf_enc.c bf_ecb.c bf_skey.c
 SRCS   += des_ecb.c des_enc.c des_setkey.c
 SRCS   += sha1.c sha2.c
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259115 - head/usr.sbin/bsdinstall

2013-12-08 Thread Devin Teske
Author: dteske
Date: Mon Dec  9 03:38:18 2013
New Revision: 259115
URL: http://svnweb.freebsd.org/changeset/base/259115

Log:
  Forgot to utilize feature added in SVN r257782 to prevent truncating
  /tmp/bsdinstall_log each time we exec a module.
  
  MFC after:3 days

Modified:
  head/usr.sbin/bsdinstall/bsdinstall

Modified: head/usr.sbin/bsdinstall/bsdinstall
==
--- head/usr.sbin/bsdinstall/bsdinstall Mon Dec  9 02:06:52 2013
(r259114)
+++ head/usr.sbin/bsdinstall/bsdinstall Mon Dec  9 03:38:18 2013
(r259115)
@@ -33,6 +33,7 @@
 # re-processing of flags (all children log to the parent's log file).
 #
 export DEBUG_SELF_INITIALIZE=
+export DEBUG_INITIALIZE_FILE=
 
 BSDCFG_SHARE=/usr/share/bsdconfig
 . $BSDCFG_SHARE/common.subr || exit 1
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259116 - head/sys/dev/iwn

2013-12-08 Thread Adrian Chadd
Author: adrian
Date: Mon Dec  9 03:40:02 2013
New Revision: 259116
URL: http://svnweb.freebsd.org/changeset/base/259116

Log:
  Add some initial support for the Intel 6235.
  
  Tested:
  
  * Intel 5100
  * Intel 6235
  
  Obtained from:mav, others

Modified:
  head/sys/dev/iwn/if_iwn.c
  head/sys/dev/iwn/if_iwn_chip_cfg.h
  head/sys/dev/iwn/if_iwnreg.h

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Mon Dec  9 03:38:18 2013(r259115)
+++ head/sys/dev/iwn/if_iwn.c   Mon Dec  9 03:40:02 2013(r259116)
@@ -124,15 +124,8 @@ static const struct iwn_ident iwn_ident_
{ 0x8086, IWN_DID_5x50_2, Intel WiMAX/WiFi Link 5350  
},
{ 0x8086, IWN_DID_5x50_3, Intel WiMAX/WiFi Link 5150  
},
{ 0x8086, IWN_DID_5x50_4, Intel WiMAX/WiFi Link 5150  
},
-   /*
-* These currently don't function; the firmware crashes during
-* the startup calibration request.
-*/
-#if 0
{ 0x8086, IWN_DID_6035_1, Intel Centrino Advanced 6235
},
-   /* XXX TODO: figure out which ID this one is? */
{ 0x8086, IWN_DID_6035_2, Intel Centrino Advanced 6235
},
-#endif
{ 0, 0, NULL }
 };
 
@@ -837,8 +830,8 @@ iwn_config_specific(struct iwn_softc *sc
case IWN_SDID_6035_3:
case IWN_SDID_6035_4:
sc-fwname = iwn6000g2bfw;
-   sc-limits = iwn6000_sensitivity_limits;
-   sc-base_params = iwn_6000g2b_base_params;
+   sc-limits = iwn6235_sensitivity_limits;
+   sc-base_params = iwn_6235_base_params;
break;
default:
device_printf(sc-sc_dev, adapter type id : 
0x%04x sub id :
@@ -5815,7 +5808,7 @@ iwn_send_sensitivity(struct iwn_softc *s
cmd.energy_cck = htole16(calib-energy_cck);
/* Barker modulation: use default values. */
cmd.corr_barker= htole16(190);
-   cmd.corr_barker_mrc= htole16(390);
+   cmd.corr_barker_mrc= htole16(sc-limits-barker_mrc);
 
DPRINTF(sc, IWN_DEBUG_CALIBRATE,
%s: set sensitivity %d/%d/%d/%d/%d/%d/%d\n, __func__,
@@ -6648,7 +6641,7 @@ iwn_auth(struct iwn_softc *sc, struct ie
sc-rxon-ofdm_mask = 0;
} else {
/* Assume 802.11b/g. */
-   sc-rxon-cck_mask  = 0x0f;
+   sc-rxon-cck_mask  = 0x03;
sc-rxon-ofdm_mask = 0x15;
}
DPRINTF(sc, IWN_DEBUG_STATE, rxon chan %d flags %x cck %x ofdm %x\n,

Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h
==
--- head/sys/dev/iwn/if_iwn_chip_cfg.h  Mon Dec  9 03:38:18 2013
(r259115)
+++ head/sys/dev/iwn/if_iwn_chip_cfg.h  Mon Dec  9 03:40:02 2013
(r259116)
@@ -359,6 +359,34 @@ static const struct iwn_base_params iwn_
.bt_mode = IWN_BT_ADVANCED,
.plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD,
 };
+
+/*
+ * 6235 series NICs.
+ */
+static const struct iwn_base_params iwn_6235_base_params = {
+   .pll_cfg_val = 0,
+   .max_ll_items = IWN_OTP_MAX_LL_ITEMS_6x00,
+   .shadow_ram_support = true,
+   .shadow_reg_enable = true,
+   .bt_session_2 = false,
+   .bt_sco_disable = true,
+   .additional_nic_config = true,
+   .regulatory_bands = iwn6000_regulatory_bands,
+   .enhanced_TX_power = true,
+   .calib_need =
+   (IWN_FLG_NEED_PHY_CALIB_DC
+   | IWN_FLG_NEED_PHY_CALIB_LO
+   | IWN_FLG_NEED_PHY_CALIB_TX_IQ
+   | IWN_FLG_NEED_PHY_CALIB_BASE_BAND
+   | IWN_FLG_NEED_PHY_CALIB_TEMP_OFFSET ),
+   .support_hostap = false,
+   .no_multi_vaps = true,
+   /* XXX 1x2? This NIC is 2x2, right? */
+   .additional_gp_drv_bit = IWN_GP_DRIVER_6050_1X2,
+   .bt_mode = IWN_BT_ADVANCED,
+   .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD,
+};
+
 static const struct iwn_base_params iwn_5x50_base_params = {
.pll_cfg_val = IWN_ANA_PLL_INIT,
.max_ll_items = IWN_OTP_MAX_LL_ITEMS_6x00,

Modified: head/sys/dev/iwn/if_iwnreg.h
==
--- head/sys/dev/iwn/if_iwnreg.hMon Dec  9 03:38:18 2013
(r259115)
+++ head/sys/dev/iwn/if_iwnreg.hMon Dec  9 03:40:02 2013
(r259116)
@@ -2001,6 +2001,7 @@ struct iwn_sensitivity_limits {
uint32_tmin_energy_cck;
uint32_tenergy_cck;
uint32_tenergy_ofdm;
+   uint32_tbarker_mrc;
 };
 
 /*
@@ -2015,7 +2016,8 @@ static const struct iwn_sensitivity_limi
200, 400,
 97,
100,
-   100
+

svn commit: r259117 - head/include/rpcsvc

2013-12-08 Thread Hiroki Sato
Author: hrs
Date: Mon Dec  9 04:26:50 2013
New Revision: 259117
URL: http://svnweb.freebsd.org/changeset/base/259117

Log:
  Replace Sun RPC license with a 3-clause BSD license.  This license change
  was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and
  Virtualization at Oracle Corporation.

Modified:
  head/include/rpcsvc/bootparam_prot.x
  head/include/rpcsvc/key_prot.x
  head/include/rpcsvc/klm_prot.x
  head/include/rpcsvc/mount.x
  head/include/rpcsvc/nfs_prot.x
  head/include/rpcsvc/nis.x
  head/include/rpcsvc/nis_callback.x
  head/include/rpcsvc/nis_object.x
  head/include/rpcsvc/nis_tags.h
  head/include/rpcsvc/rex.x
  head/include/rpcsvc/rnusers.x
  head/include/rpcsvc/rstat.x
  head/include/rpcsvc/sm_inter.x
  head/include/rpcsvc/spray.x
  head/include/rpcsvc/yp.x
  head/include/rpcsvc/yppasswd.x

Modified: head/include/rpcsvc/bootparam_prot.x
==
--- head/include/rpcsvc/bootparam_prot.xMon Dec  9 03:40:02 2013
(r259116)
+++ head/include/rpcsvc/bootparam_prot.xMon Dec  9 04:26:50 2013
(r259117)
@@ -1,30 +1,32 @@
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part.  Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- * 
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
- * 
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
- * 
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
- * 
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- * 
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California  94043
+/*-
+ * Copyright (c) 2010, Oracle America, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ * * Neither the name of the Oracle America, Inc. nor the names of its
+ *   contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 /*

Modified: head/include/rpcsvc/key_prot.x
==
--- head/include/rpcsvc/key_prot.x  Mon Dec  9 03:40:02 2013
(r259116)
+++ head/include/rpcsvc/key_prot.x  Mon Dec  9 04:26:50 2013
(r259117)
@@ -1,30 +1,32 @@
-%/*
-% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
-% * unrestricted use provided that this legend is included on all tape
-% * media and as a part of the software program in whole or part.  Users
-% * may copy or modify Sun RPC without charge, but are not authorized
-% * to license or distribute it to anyone else except as part of a product or
-% * program developed by the user.
+%/*-
+% * Copyright (c) 2010, Oracle America, Inc.
 % *
-% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
-% * WARRANTIES OF DESIGN, 

svn commit: r259118 - head/lib/libc/xdr

2013-12-08 Thread Hiroki Sato
Author: hrs
Date: Mon Dec  9 05:01:38 2013
New Revision: 259118
URL: http://svnweb.freebsd.org/changeset/base/259118

Log:
  Replace Sun RPC license with a 3-clause BSD license.  This license change
  was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and
  Virtualization at Oracle Corporation.

Modified:
  head/lib/libc/xdr/xdr.c
  head/lib/libc/xdr/xdr_array.c
  head/lib/libc/xdr/xdr_float.c
  head/lib/libc/xdr/xdr_mem.c
  head/lib/libc/xdr/xdr_rec.c
  head/lib/libc/xdr/xdr_reference.c
  head/lib/libc/xdr/xdr_sizeof.c
  head/lib/libc/xdr/xdr_stdio.c

Modified: head/lib/libc/xdr/xdr.c
==
--- head/lib/libc/xdr/xdr.c Mon Dec  9 04:26:50 2013(r259117)
+++ head/lib/libc/xdr/xdr.c Mon Dec  9 05:01:38 2013(r259118)
@@ -1,32 +1,34 @@
 /* $NetBSD: xdr.c,v 1.22 2000/07/06 03:10:35 christos Exp $*/
 
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part.  Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
- * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+/*-
+ * Copyright (c) 2010, Oracle America, Inc.
  *
- * Sun RPC is provided with no support and without any obligation on the
- * part of Sun Microsystems, Inc. to assist in its use, correction,
- * modification or enhancement.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
  *
- * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
- * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
- * OR ANY PART THEREOF.
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ * * Neither the name of the Oracle America, Inc. nor the names of its
+ *   contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
  *
- * In no event will Sun Microsystems, Inc. be liable for any lost revenue
- * or profits or other special, indirect and consequential damages, even if
- * Sun has been advised of the possibility of such damages.
- *
- * Sun Microsystems, Inc.
- * 2550 Garcia Avenue
- * Mountain View, California  94043
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #if defined(LIBC_SCCS)  !defined(lint)
@@ -39,8 +41,6 @@ __FBSDID($FreeBSD$);
 /*
  * xdr.c, Generic XDR routines implementation.
  *
- * Copyright (C) 1986, Sun Microsystems, Inc.
- *
  * These are the generic xdr routines used to serialize and de-serialize
  * most common data items.  See xdr.h for more info on the interface to
  * xdr.

Modified: head/lib/libc/xdr/xdr_array.c
==
--- head/lib/libc/xdr/xdr_array.c   Mon Dec  9 04:26:50 2013
(r259117)
+++ head/lib/libc/xdr/xdr_array.c   Mon Dec  9 05:01:38 2013
(r259118)
@@ -1,32 +1,34 @@
 /* $NetBSD: xdr_array.c,v 1.12 2000/01/22 22:19:18 mycroft Exp $   */
 
-/*
- * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
- * unrestricted use provided that this legend is included on all tape
- * media and as a part of the software program in whole or part.  Users
- * may copy or modify Sun RPC without charge, but are not authorized
- * to license or distribute it to anyone else except as part of a product or
- * program developed by the user.
- *
- 

svn commit: r259121 - head/sys/arm/rockchip

2013-12-08 Thread Ganbold Tsagaankhuu
Author: ganbold (doc committer)
Date: Mon Dec  9 07:14:59 2013
New Revision: 259121
URL: http://svnweb.freebsd.org/changeset/base/259121

Log:
  Add gpio parse routines according to sys/boot/fdt/dts/bindings-gpio.txt.
  
  Reviewed by: stas@

Modified:
  head/sys/arm/rockchip/rk30xx_gpio.c

Modified: head/sys/arm/rockchip/rk30xx_gpio.c
==
--- head/sys/arm/rockchip/rk30xx_gpio.c Mon Dec  9 07:00:39 2013
(r259120)
+++ head/sys/arm/rockchip/rk30xx_gpio.c Mon Dec  9 07:14:59 2013
(r259121)
@@ -86,6 +86,26 @@ struct rk30_gpio_softc {
struct gpio_pin sc_gpio_pins[RK30_GPIO_PINS];
 };
 
+static struct rk30_gpio_softc *rk30_gpio_sc = NULL;
+
+typedef int (*gpios_phandler_t)(phandle_t, pcell_t *, int);
+
+struct gpio_ctrl_entry {
+   const char  *compat;
+   gpios_phandler_thandler;
+};
+
+int rk30_gpios_prop_handle(phandle_t ctrl, pcell_t *gpios, int len);
+int platform_gpio_init(void);
+
+struct gpio_ctrl_entry gpio_controllers[] = {
+   { rockchip,rk30xx-gpio, rk30_gpios_prop_handle },
+   { rockchip,rk30xx-gpio, rk30_gpios_prop_handle },
+   { rockchip,rk30xx-gpio, rk30_gpios_prop_handle },
+   { rockchip,rk30xx-gpio, rk30_gpios_prop_handle },
+   { NULL, NULL }
+};
+
 #defineRK30_GPIO_LOCK(_sc) mtx_lock(_sc-sc_mtx)
 #defineRK30_GPIO_UNLOCK(_sc)   mtx_unlock(_sc-sc_mtx)
 #defineRK30_GPIO_LOCK_ASSERT(_sc)  mtx_assert(_sc-sc_mtx, 
MA_OWNED)
@@ -436,6 +456,9 @@ rk30_gpio_attach(device_t dev)
int i, rid;
phandle_t gpio;
 
+   if (rk30_gpio_sc)
+   return (ENXIO);
+
sc-sc_dev = dev;
 
mtx_init(sc-sc_mtx, rk30 gpio, gpio, MTX_DEF);
@@ -480,6 +503,11 @@ rk30_gpio_attach(device_t dev)
 
device_add_child(dev, gpioc, device_get_unit(dev));
device_add_child(dev, gpiobus, device_get_unit(dev));
+
+   rk30_gpio_sc = sc;
+
+   platform_gpio_init();
+   
return (bus_generic_attach(dev));
 
 fail:
@@ -525,3 +553,121 @@ static driver_t rk30_gpio_driver = {
 };
 
 DRIVER_MODULE(rk30_gpio, simplebus, rk30_gpio_driver, rk30_gpio_devclass, 0, 
0);
+
+int
+rk30_gpios_prop_handle(phandle_t ctrl, pcell_t *gpios, int len)
+{
+   struct rk30_gpio_softc *sc;
+   pcell_t gpio_cells;
+   int inc, t, tuples, tuple_size;
+   int dir, flags, pin, i;
+   u_long gpio_ctrl, size;
+
+   sc = rk30_gpio_sc;
+   if (sc == NULL)
+   return ENXIO;
+
+   if (OF_getprop(ctrl, #gpio-cells, gpio_cells, sizeof(pcell_t))  0)
+   return (ENXIO);
+
+   gpio_cells = fdt32_to_cpu(gpio_cells);
+   if (gpio_cells != 2)
+   return (ENXIO);
+
+   tuple_size = gpio_cells * sizeof(pcell_t) + sizeof(phandle_t);
+   tuples = len / tuple_size;
+
+   if (fdt_regsize(ctrl, gpio_ctrl, size))
+   return (ENXIO);
+
+   /*
+* Skip controller reference, since controller's phandle is given
+* explicitly (in a function argument).
+*/
+   inc = sizeof(ihandle_t) / sizeof(pcell_t);
+   gpios += inc;
+   for (t = 0; t  tuples; t++) {
+   pin = fdt32_to_cpu(gpios[0]);
+   dir = fdt32_to_cpu(gpios[1]);
+   flags = fdt32_to_cpu(gpios[2]);
+
+   for (i = 0; i  sc-sc_gpio_npins; i++) {
+   if (sc-sc_gpio_pins[i].gp_pin == pin)
+   break;
+   }
+   if (i = sc-sc_gpio_npins)
+   return (EINVAL);
+
+   rk30_gpio_pin_configure(sc, sc-sc_gpio_pins[i], flags);
+
+   if (dir == 1) {
+   /* Input. */
+   rk30_gpio_pin_set(sc-sc_dev, pin, RK30_GPIO_INPUT);
+   } else {
+   /* Output. */
+   rk30_gpio_pin_set(sc-sc_dev, pin, RK30_GPIO_OUTPUT);
+   }
+   gpios += gpio_cells + inc;
+   }
+
+   return (0);
+}
+
+#defineMAX_PINS_PER_NODE   5
+#defineGPIOS_PROP_CELLS4
+
+int
+platform_gpio_init(void)
+{
+   phandle_t child, parent, root, ctrl;
+   pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS];
+   struct gpio_ctrl_entry *e;
+   int len, rv;
+
+   root = OF_finddevice(/);
+   len = 0;
+   parent = root;
+
+   /* Traverse through entire tree to find nodes with 'gpios' prop */
+   for (child = OF_child(parent); child != 0; child = OF_peer(child)) {
+
+   /* Find a 'leaf'. Start the search from this node. */
+   while (OF_child(child)) {
+   parent = child;
+   child = OF_child(child);
+   }
+   if ((len = OF_getproplen(child, gpios))  0) {
+
+   if (len  sizeof(gpios))
+   return (ENXIO);
+
+

svn commit: r259122 - head/sys/boot/fdt/dts

2013-12-08 Thread Ganbold Tsagaankhuu
Author: ganbold (doc committer)
Date: Mon Dec  9 07:15:46 2013
New Revision: 259122
URL: http://svnweb.freebsd.org/changeset/base/259122

Log:
  Add gpio config for usb1 in dts.
  That way it gives power to other usb hub via gpio at boot time.
  
  Reviewed by: stas@

Modified:
  head/sys/boot/fdt/dts/rk3188.dtsi

Modified: head/sys/boot/fdt/dts/rk3188.dtsi
==
--- head/sys/boot/fdt/dts/rk3188.dtsi   Mon Dec  9 07:14:59 2013
(r259121)
+++ head/sys/boot/fdt/dts/rk3188.dtsi   Mon Dec  9 07:15:46 2013
(r259122)
@@ -174,6 +174,7 @@
interrupt-parent = GIC;
#address-cells = 1;
#size-cells = 0;
+   gpios = gpio0 3 2 2;
};
 
uart0: serial@10124000 {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259123 - head/sys/modules/usb

2013-12-08 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Dec  9 07:26:55 2013
New Revision: 259123
URL: http://svnweb.freebsd.org/changeset/base/259123

Log:
  Make it easier to test build the USB code having the debug flags set
  without having to build the complete kernel.
  
  MFC after:2 weeks

Modified:
  head/sys/modules/usb/Makefile

Modified: head/sys/modules/usb/Makefile
==
--- head/sys/modules/usb/Makefile   Mon Dec  9 07:15:46 2013
(r259122)
+++ head/sys/modules/usb/Makefile   Mon Dec  9 07:26:55 2013
(r259123)
@@ -27,6 +27,18 @@
 
 .include bsd.own.mk
 
+#
+# Check for common USB debug flags to pass when building the USB
+# modules in this directory:
+#
+.if defined(USB_DEBUG)
+MAKE+= DEBUG_FLAGS+=-DUSB_DEBUG
+.endif
+
+.if defined(USB_DEBUG)  defined(USB_REQ_DEBUG)
+MAKE+= DEBUG_FLAGS+=-DUSB_REQ_DEBUG
+.endif
+
 # Modules that include binary-only blobs of microcode should be selectable by
 # MK_SOURCELESS_UCODE option (see below).
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org