Re: svn commit: r290663 - in head/sys: modules modules/tests modules/tests/callout_test modules/tests/framework tests tests/callout_test tests/framework

2015-11-11 Thread Hans Petter Selasky

On 11/10/15 17:15, Bjoern A. Zeeb wrote:



On 10 Nov 2015, at 14:14 , Randall Stewart  wrote:

Author: rrs
Date: Tue Nov 10 14:14:41 2015
New Revision: 290663
URL: https://svnweb.freebsd.org/changeset/base/290663

Log:
  Add a kernel test framework. The callout_test is a demonstration and will only
  work with the upcoming async-drain functionality. Tests can be added
  to the tests directory and then the framework can be used to launch
  those tests.

  MFC after:1 month
  Sponsored by: Netflix Inc.
  Differential Revision:https://reviews.freebsd.org/D1755




/scratch/tmp/bz/head.svn/sys/modules/tests/callout_test/../../../tests/callout_test/callout_test.c:75:
 warning: function declaration isn't a prototype [-Wstrict-prototypes]
/scratch/tmp/bz/head.svn/sys/modules/tests/callout_test/../../../tests/callout_test/callout_test.c:133:
 warning: no previous prototype for ‘execute_the_co_test' [-Wmissing-prototypes]


/scratch/tmp/bz/head.svn/sys/modules/tests/framework/../../../tests/framework/kern_testfrwk.c:171:
 warning: redundant redeclaration of 'sysctl___kern' [-Wredundant-decls]
/scratch/tmp/bz/head.svn/sys/sys/sysctl.h:918: warning: previous declaration of 
‘sysctl___kern' was here

This is on sparc64 but I guess that’s just one of my early kernel compiles.



Added:
  head/sys/modules/tests/
  head/sys/modules/tests/callout_test/
  head/sys/modules/tests/callout_test/Makefile   (contents, props changed)
  head/sys/modules/tests/framework/
  head/sys/modules/tests/framework/Makefile   (contents, props changed)
  head/sys/tests/
  head/sys/tests/callout_test/
  head/sys/tests/callout_test.h   (contents, props changed)
  head/sys/tests/callout_test/callout_test.c   (contents, props changed)
  head/sys/tests/framework/
  head/sys/tests/framework/kern_testfrwk.c   (contents, props changed)
  head/sys/tests/kern_testfrwk.h   (contents, props changed)
Modified:
  head/sys/modules/Makefile




Breaks here too on amd64:


/usr/img/freebsd/sys/modules/tests/callout_test/../../../tests/callout_test/callout_test.c:52:9:
 error:
  'cpu_spinwait' macro redefined [-Werror]
#define cpu_spinwait()
^
./machine/cpu.h:50:9: note: previous definition is here
#define cpu_spinwait()  ia32_pause()
^
1 error generated.



/usr/img/freebsd/sys/modules/tests/framework/../../../sys/bus.h:655:10: fatal 
error:
  'device_if.h' file not found
#include "device_if.h"
 ^
1 error generated.
*** Error code 1


--HPS


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

Re: svn commit: r290663 - in head/sys: modules modules/tests modules/tests/callout_test modules/tests/framework tests tests/callout_test tests/framework

2015-11-11 Thread Renato Botelho
> On Nov 11, 2015, at 06:32, Hans Petter Selasky  wrote:
> 
> On 11/10/15 17:15, Bjoern A. Zeeb wrote:
>> 
>>> On 10 Nov 2015, at 14:14 , Randall Stewart  wrote:
>>> 
>>> Author: rrs
>>> Date: Tue Nov 10 14:14:41 2015
>>> New Revision: 290663
>>> URL: https://svnweb.freebsd.org/changeset/base/290663
>>> 
>>> Log:
>>>  Add a kernel test framework. The callout_test is a demonstration and will 
>>> only
>>>  work with the upcoming async-drain functionality. Tests can be added
>>>  to the tests directory and then the framework can be used to launch
>>>  those tests.
>>> 
>>>  MFC after: 1 month
>>>  Sponsored by:  Netflix Inc.
>>>  Differential Revision: https://reviews.freebsd.org/D1755
>>> 
>> 
>> 
>> /scratch/tmp/bz/head.svn/sys/modules/tests/callout_test/../../../tests/callout_test/callout_test.c:75:
>>  warning: function declaration isn't a prototype [-Wstrict-prototypes]
>> /scratch/tmp/bz/head.svn/sys/modules/tests/callout_test/../../../tests/callout_test/callout_test.c:133:
>>  warning: no previous prototype for ‘execute_the_co_test' 
>> [-Wmissing-prototypes]
>> 
>> 
>> /scratch/tmp/bz/head.svn/sys/modules/tests/framework/../../../tests/framework/kern_testfrwk.c:171:
>>  warning: redundant redeclaration of 'sysctl___kern' [-Wredundant-decls]
>> /scratch/tmp/bz/head.svn/sys/sys/sysctl.h:918: warning: previous declaration 
>> of ‘sysctl___kern' was here
>> 
>> This is on sparc64 but I guess that’s just one of my early kernel compiles.
>> 
>> 
>>> Added:
>>>  head/sys/modules/tests/
>>>  head/sys/modules/tests/callout_test/
>>>  head/sys/modules/tests/callout_test/Makefile   (contents, props changed)
>>>  head/sys/modules/tests/framework/
>>>  head/sys/modules/tests/framework/Makefile   (contents, props changed)
>>>  head/sys/tests/
>>>  head/sys/tests/callout_test/
>>>  head/sys/tests/callout_test.h   (contents, props changed)
>>>  head/sys/tests/callout_test/callout_test.c   (contents, props changed)
>>>  head/sys/tests/framework/
>>>  head/sys/tests/framework/kern_testfrwk.c   (contents, props changed)
>>>  head/sys/tests/kern_testfrwk.h   (contents, props changed)
>>> Modified:
>>>  head/sys/modules/Makefile
>> 
> 
> Breaks here too on amd64:
> 
>> /usr/img/freebsd/sys/modules/tests/callout_test/../../../tests/callout_test/callout_test.c:52:9:
>>  error:
>>  'cpu_spinwait' macro redefined [-Werror]
>> #define cpu_spinwait()
>>^
>> ./machine/cpu.h:50:9: note: previous definition is here
>> #define cpu_spinwait()  ia32_pause()
>>^
>> 1 error generated.
> 
>> /usr/img/freebsd/sys/modules/tests/framework/../../../sys/bus.h:655:10: 
>> fatal error:
>>  'device_if.h' file not found
>> #include "device_if.h"
>> ^
>> 1 error generated.
>> *** Error code 1

+1

--
Renato Botelho

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

Re: svn commit: r290651 - head/sys/dev/usb/wlan

2015-11-11 Thread Renato Botelho
> On Nov 10, 2015, at 18:19, Renato Botelho  wrote:
> 
>> On Nov 10, 2015, at 10:52, Andriy Voskoboinyk  wrote:
>> 
>> Author: avos
>> Date: Tue Nov 10 12:52:26 2015
>> New Revision: 290651
>> URL: https://svnweb.freebsd.org/changeset/base/290651
>> 
>> Log:
>> urtwn(4): add IBSS mode support
>> 
>> Tested with RTL8188EU, IBSS and STA modes.
>> 
>> Reviewed by: kevlo
>> Approved by: adrian (mentor)
>> Differential Revision:   https://reviews.freebsd.org/D4038
>> 
>> Modified:
>> head/sys/dev/usb/wlan/if_urtwn.c
>> head/sys/dev/usb/wlan/if_urtwnvar.h
>> 
>> Modified: head/sys/dev/usb/wlan/if_urtwn.c
>> ==
>> --- head/sys/dev/usb/wlan/if_urtwn.c Tue Nov 10 12:20:22 2015
>> (r290650)
>> +++ head/sys/dev/usb/wlan/if_urtwn.c Tue Nov 10 12:52:26 2015
>> (r290651)
>> @@ -228,10 +228,14 @@ static int urtwn_setup_beacon(struct ur
>> static void  urtwn_update_beacon(struct ieee80211vap *, int);
>> static int   urtwn_tx_beacon(struct urtwn_softc *sc,
>>  struct urtwn_vap *);
>> +static void urtwn_tsf_task_adhoc(void *, int);
>> static void  urtwn_tsf_sync_enable(struct urtwn_softc *,
>>  struct ieee80211vap *);
>> static void  urtwn_set_led(struct urtwn_softc *, int, int);
>> static void  urtwn_set_mode(struct urtwn_softc *, uint8_t);
>> +static void urtwn_ibss_recv_mgmt(struct ieee80211_node *,
>> +struct mbuf *, int,
>> +const struct ieee80211_rx_stats *, int, int);
>> static int   urtwn_newstate(struct ieee80211vap *,
>>  enum ieee80211_state, int);
>> static void  urtwn_watchdog(void *);
>> @@ -449,6 +453,7 @@ urtwn_attach(device_t self)
>>  ic->ic_caps =
>>IEEE80211_C_STA   /* station mode */
>>  | IEEE80211_C_MONITOR   /* monitor mode */
>> +| IEEE80211_C_IBSS  /* adhoc mode */
>>  | IEEE80211_C_HOSTAP/* hostap mode */
>>  | IEEE80211_C_SHPREAMBLE/* short preamble supported */
>>  | IEEE80211_C_SHSLOT/* short slot time supported */
>> @@ -592,13 +597,18 @@ urtwn_vap_create(struct ieee80211com *ic
>>  return (NULL);
>>  }
>> 
>> -if (opmode == IEEE80211_M_HOSTAP)
>> +if (opmode == IEEE80211_M_HOSTAP || opmode == IEEE80211_M_IBSS)
>>  urtwn_init_beacon(sc, uvp);
>> 
>>  /* override state transition machine */
>>  uvp->newstate = vap->iv_newstate;
>>  vap->iv_newstate = urtwn_newstate;
>>  vap->iv_update_beacon = urtwn_update_beacon;
>> +if (opmode == IEEE80211_M_IBSS) {
>> +uvp->recv_mgmt = vap->iv_recv_mgmt;
>> +vap->iv_recv_mgmt = urtwn_ibss_recv_mgmt;
>> +TASK_INIT(&uvp->tsf_task_adhoc, 0, urtwn_tsf_task_adhoc, vap);
>> +}
>> 
>>  /* complete setup */
>>  ieee80211_vap_attach(vap, ieee80211_media_change,
>> @@ -610,13 +620,13 @@ urtwn_vap_create(struct ieee80211com *ic
>> static void
>> urtwn_vap_delete(struct ieee80211vap *vap)
>> {
>> +struct ieee80211com *ic = vap->iv_ic;
>>  struct urtwn_vap *uvp = URTWN_VAP(vap);
>> -enum ieee80211_opmode opmode = vap->iv_opmode;
>> 
>> -if (opmode == IEEE80211_M_HOSTAP) {
>> -if (uvp->bcn_mbuf != NULL)
>> -m_freem(uvp->bcn_mbuf);
>> -}
>> +if (uvp->bcn_mbuf != NULL)
>> +m_freem(uvp->bcn_mbuf);
>> +if (vap->iv_opmode == IEEE80211_M_IBSS)
>> +ieee80211_draintask(ic, &uvp->tsf_task_adhoc);
>>  ieee80211_vap_detach(vap);
>>  free(uvp, M_80211_VAP);
>> }
>> @@ -1611,8 +1621,50 @@ urtwn_tx_beacon(struct urtwn_softc *sc, 
>> }
>> 
>> static void
>> +urtwn_tsf_task_adhoc(void *arg, int pending)
>> +{
>> +struct ieee80211vap *vap = arg;
>> +struct urtwn_softc *sc = vap->iv_ic->ic_softc;
>> +struct ieee80211_node *ni;
>> +uint32_t reg;
>> +
>> +URTWN_LOCK(sc);
>> +ni = ieee80211_ref_node(vap->iv_bss);
>> +reg = urtwn_read_1(sc, R92C_BCN_CTRL);
>> +
>> +/* Accept beacons with the same BSSID. */
>> +urtwn_set_rx_bssid_all(sc, 0);
>> +
>> +/* Enable synchronization. */
>> +reg &= ~R92C_BCN_CTRL_DIS_TSF_UDT0;
>> +urtwn_write_1(sc, R92C_BCN_CTRL, reg);
>> +
>> +/* Synchronize. */
>> +usb_pause_mtx(&sc->sc_mtx, hz * ni->ni_intval * 5 / 1000);
>> +
>> +/* Disable synchronization. */
>> +reg |= R92C_BCN_CTRL_DIS_TSF_UDT0;
>> +urtwn_write_1(sc, R92C_BCN_CTRL, reg);
>> +
>> +/* Remove beacon filter. */
>> +urtwn_set_rx_bssid_all(sc, 1);
>> +
>> +/* Enable beaconing. */
>> +urtwn_write_1(sc, R92C_MBID_NUM,
>> +urtwn_read_1(sc, R92C_MBID_NUM) | R92C_MBID_TXBCN_RPT0);
>> +reg |= R92C_BCN_CTRL_EN_BCN;
>> +
>> +urtwn_write_1(sc, R92C_BCN_CTRL, reg);
>> +ieee80211_fr

svn commit: r290670 - head/sys/cam/ctl

2015-11-11 Thread Alexander Motin
Author: mav
Date: Wed Nov 11 13:18:38 2015
New Revision: 290670
URL: https://svnweb.freebsd.org/changeset/base/290670

Log:
  Modify target port groups logic in CTL.
  
   - Introduce "ha_shared" port option, which being set to "on" moves the
  port into separate port group, shared between HA nodes.  This allows to
  better handle cases when iSCSI portals are bound to CARP address that can
  dynamically move between nodes.  Some initiators (at least VMware) don't
  detect that after iSCSI reconnect they've attached to different SCSI port
  from different port group, that totally breakes ALUA status parsing.
  In theory, I believe, it should be enough to have different iSCSI portal
  group tags on different nodes to make initiators detect this condition,
  but it seems like VMware ignores those values, and even full LUN retaste
  forced by UA does not help.
   - Make CTL report up to three port groups: 1 -- non-HA mode or ports
  with "ha_shared" option set, 2 -- HA node 1, 3 -- HA node 2.
   - Report Transitioning state for all port groups when HA interlink is
  connected, but neither of nodes is primary for the LUN.
  
  MFC after:2 weeks

Modified:
  head/sys/cam/ctl/ctl.c
  head/sys/cam/ctl/ctl_frontend.c
  head/sys/cam/ctl/ctl_frontend.h
  head/sys/cam/ctl/ctl_private.h

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Wed Nov 11 12:36:42 2015(r290669)
+++ head/sys/cam/ctl/ctl.c  Wed Nov 11 13:18:38 2015(r290670)
@@ -1819,13 +1819,13 @@ ctl_init(void)
SYSCTL_ADD_INT(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
OID_AUTO, "ha_id", CTLFLAG_RDTUN, &softc->ha_id, 0,
"HA head ID (0 - no HA)");
-   if (softc->ha_id == 0 || softc->ha_id > NUM_TARGET_PORT_GROUPS) {
+   if (softc->ha_id == 0 || softc->ha_id > NUM_HA_SHELVES) {
softc->flags |= CTL_FLAG_ACTIVE_SHELF;
softc->is_single = 1;
softc->port_cnt = CTL_MAX_PORTS;
softc->port_min = 0;
} else {
-   softc->port_cnt = CTL_MAX_PORTS / NUM_TARGET_PORT_GROUPS;
+   softc->port_cnt = CTL_MAX_PORTS / NUM_HA_SHELVES;
softc->port_min = (softc->ha_id - 1) * softc->port_cnt;
}
softc->port_max = softc->port_min + softc->port_cnt;
@@ -7137,8 +7137,8 @@ ctl_report_tagret_port_groups(struct ctl
 {
struct scsi_maintenance_in *cdb;
int retval;
-   int alloc_len, ext, total_len = 0, g, pc, pg, gs, os;
-   int num_target_port_groups, num_target_ports;
+   int alloc_len, ext, total_len = 0, g, pc, pg, ts, os;
+   int num_ha_groups, num_target_ports, shared_group;
struct ctl_lun *lun;
struct ctl_softc *softc;
struct ctl_port *port;
@@ -7172,11 +7172,8 @@ ctl_report_tagret_port_groups(struct ctl
return(retval);
}
 
-   if (softc->is_single)
-   num_target_port_groups = 1;
-   else
-   num_target_port_groups = NUM_TARGET_PORT_GROUPS;
num_target_ports = 0;
+   shared_group = (softc->is_single != 0);
mtx_lock(&softc->ctl_lock);
STAILQ_FOREACH(port, &softc->port_list, links) {
if ((port->status & CTL_PORT_STATUS_ONLINE) == 0)
@@ -7184,15 +7181,18 @@ ctl_report_tagret_port_groups(struct ctl
if (ctl_lun_map_to_port(port, lun->lun) >= CTL_MAX_LUNS)
continue;
num_target_ports++;
+   if (port->status & CTL_PORT_STATUS_HA_SHARED)
+   shared_group = 1;
}
mtx_unlock(&softc->ctl_lock);
+   num_ha_groups = (softc->is_single) ? 0 : NUM_HA_SHELVES;
 
if (ext)
total_len = sizeof(struct scsi_target_group_data_extended);
else
total_len = sizeof(struct scsi_target_group_data);
total_len += sizeof(struct scsi_target_port_group_descriptor) *
-   num_target_port_groups +
+   (shared_group + num_ha_groups) +
sizeof(struct scsi_target_port_descriptor) * num_target_ports;
 
alloc_len = scsi_4btoul(cdb->length);
@@ -7229,24 +7229,62 @@ ctl_report_tagret_port_groups(struct ctl
 
mtx_lock(&softc->ctl_lock);
pg = softc->port_min / softc->port_cnt;
-   if (softc->ha_link == CTL_HA_LINK_OFFLINE)
-   gs = TPG_ASYMMETRIC_ACCESS_UNAVAILABLE;
-   else if (softc->ha_link == CTL_HA_LINK_UNKNOWN)
-   gs = TPG_ASYMMETRIC_ACCESS_TRANSITIONING;
-   else if (softc->ha_mode == CTL_HA_MODE_ACT_STBY)
-   gs = TPG_ASYMMETRIC_ACCESS_STANDBY;
-   else
-   gs = TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED;
-   if (lun->flags & CTL_LUN_PRIMARY_SC) {
-   os = gs;
-   gs = TPG_ASYMMETRIC_ACCESS_OPTIMIZED;
-   } else
-   os = TPG_ASYMMETRIC_ACCESS_OPTIMIZED;
-   for (

svn commit: r290671 - head/crypto/openssh

2015-11-11 Thread Dag-Erling Smørgrav
Author: des
Date: Wed Nov 11 13:23:07 2015
New Revision: 290671
URL: https://svnweb.freebsd.org/changeset/base/290671

Log:
  Now that we have mandoc, we can leave $Mdocdate$ tags as-is.  Unfortunately,
  there is (currently) no way to make Subversion generate correct $Mdocdate$
  tags, but perhas we can teach mandoc to read Subversion's %d format.

Modified:
  head/crypto/openssh/moduli.5
  head/crypto/openssh/scp.1
  head/crypto/openssh/sftp-server.8
  head/crypto/openssh/sftp.1
  head/crypto/openssh/ssh-add.1
  head/crypto/openssh/ssh-keygen.1
  head/crypto/openssh/ssh-keyscan.1
  head/crypto/openssh/ssh-keysign.8
  head/crypto/openssh/ssh-pkcs11-helper.8
  head/crypto/openssh/ssh.1
  head/crypto/openssh/ssh_config.5
  head/crypto/openssh/sshd.8
  head/crypto/openssh/sshd_config.5

Modified: head/crypto/openssh/moduli.5
==
--- head/crypto/openssh/moduli.5Wed Nov 11 13:18:38 2015
(r290670)
+++ head/crypto/openssh/moduli.5Wed Nov 11 13:23:07 2015
(r290671)
@@ -1,5 +1,4 @@
 .\"$OpenBSD: moduli.5,v 1.17 2012/09/26 17:34:38 jmc Exp $
-.\"$FreeBSD$
 .\"
 .\" Copyright (c) 2008 Damien Miller 
 .\"
@@ -14,7 +13,7 @@
 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.Dd September 26, 2012
+.Dd $Mdocdate: September 26 2012 $
 .Dt MODULI 5
 .Os
 .Sh NAME

Modified: head/crypto/openssh/scp.1
==
--- head/crypto/openssh/scp.1   Wed Nov 11 13:18:38 2015(r290670)
+++ head/crypto/openssh/scp.1   Wed Nov 11 13:23:07 2015(r290671)
@@ -9,9 +9,8 @@
 .\" Created: Sun May  7 00:14:37 1995 ylo
 .\"
 .\" $OpenBSD: scp.1,v 1.61 2013/10/20 09:51:26 djm Exp $
-.\" $FreeBSD$
 .\"
-.Dd October 20, 2013
+.Dd $Mdocdate: October 20 2013 $
 .Dt SCP 1
 .Os
 .Sh NAME

Modified: head/crypto/openssh/sftp-server.8
==
--- head/crypto/openssh/sftp-server.8   Wed Nov 11 13:18:38 2015
(r290670)
+++ head/crypto/openssh/sftp-server.8   Wed Nov 11 13:23:07 2015
(r290671)
@@ -1,5 +1,4 @@
 .\" $OpenBSD: sftp-server.8,v 1.25 2013/10/14 14:18:56 jmc Exp $
-.\" $FreeBSD$
 .\"
 .\" Copyright (c) 2000 Markus Friedl.  All rights reserved.
 .\"
@@ -23,7 +22,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 14, 2013
+.Dd $Mdocdate: October 14 2013 $
 .Dt SFTP-SERVER 8
 .Os
 .Sh NAME

Modified: head/crypto/openssh/sftp.1
==
--- head/crypto/openssh/sftp.1  Wed Nov 11 13:18:38 2015(r290670)
+++ head/crypto/openssh/sftp.1  Wed Nov 11 13:23:07 2015(r290671)
@@ -1,5 +1,4 @@
 .\" $OpenBSD: sftp.1,v 1.97 2013/10/20 09:51:26 djm Exp $
-.\" $FreeBSD$
 .\"
 .\" Copyright (c) 2001 Damien Miller.  All rights reserved.
 .\"
@@ -23,7 +22,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 20, 2013
+.Dd $Mdocdate: October 20 2013 $
 .Dt SFTP 1
 .Os
 .Sh NAME

Modified: head/crypto/openssh/ssh-add.1
==
--- head/crypto/openssh/ssh-add.1   Wed Nov 11 13:18:38 2015
(r290670)
+++ head/crypto/openssh/ssh-add.1   Wed Nov 11 13:23:07 2015
(r290671)
@@ -1,5 +1,4 @@
 .\"$OpenBSD: ssh-add.1,v 1.59 2013/12/07 11:58:46 naddy Exp $
-.\"$FreeBSD$
 .\"
 .\" Author: Tatu Ylonen 
 .\" Copyright (c) 1995 Tatu Ylonen , Espoo, Finland
@@ -36,7 +35,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 7, 2013
+.Dd $Mdocdate: December 7 2013 $
 .Dt SSH-ADD 1
 .Os
 .Sh NAME

Modified: head/crypto/openssh/ssh-keygen.1
==
--- head/crypto/openssh/ssh-keygen.1Wed Nov 11 13:18:38 2015
(r290670)
+++ head/crypto/openssh/ssh-keygen.1Wed Nov 11 13:23:07 2015
(r290671)
@@ -1,5 +1,4 @@
 .\"$OpenBSD: ssh-keygen.1,v 1.120 2014/02/05 20:13:25 naddy Exp $
-.\"$FreeBSD$
 .\"
 .\" Author: Tatu Ylonen 
 .\" Copyright (c) 1995 Tatu Ylonen , Espoo, Finland
@@ -36,7 +35,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 5, 2014
+.Dd $Mdocdate: February 5 2014 $
 .Dt SSH-KEYGEN 1
 .Os
 .Sh NAME

Modified: head/crypto/openssh/ssh-keyscan.1
===

svn commit: r290672 - in head/crypto/openssh: . openbsd-compat

2015-11-11 Thread Dag-Erling Smørgrav
Author: des
Date: Wed Nov 11 13:26:47 2015
New Revision: 290672
URL: https://svnweb.freebsd.org/changeset/base/290672

Log:
  Remove /* $FreeBSD$ */ from files that already have __RCSID("$FreeBSD$").

Modified:
  head/crypto/openssh/auth.c
  head/crypto/openssh/auth2.c
  head/crypto/openssh/buffer.c
  head/crypto/openssh/channels.c
  head/crypto/openssh/cipher.c
  head/crypto/openssh/clientloop.c
  head/crypto/openssh/compat.c
  head/crypto/openssh/kex.c
  head/crypto/openssh/misc.c
  head/crypto/openssh/mux.c
  head/crypto/openssh/openbsd-compat/blowfish.c
  head/crypto/openssh/openbsd-compat/bsd-misc.h
  head/crypto/openssh/packet.c
  head/crypto/openssh/readconf.c
  head/crypto/openssh/schnorr.c
  head/crypto/openssh/servconf.c
  head/crypto/openssh/serverloop.c
  head/crypto/openssh/session.c
  head/crypto/openssh/sftp-common.c
  head/crypto/openssh/sftp.c
  head/crypto/openssh/ssh-agent.c
  head/crypto/openssh/ssh.c
  head/crypto/openssh/sshconnect.c
  head/crypto/openssh/sshconnect2.c
  head/crypto/openssh/sshd.c

Modified: head/crypto/openssh/auth.c
==
--- head/crypto/openssh/auth.c  Wed Nov 11 13:23:07 2015(r290671)
+++ head/crypto/openssh/auth.c  Wed Nov 11 13:26:47 2015(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: auth.c,v 1.103 2013/05/19 02:42:42 djm Exp $ */
-/* $FreeBSD$ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *

Modified: head/crypto/openssh/auth2.c
==
--- head/crypto/openssh/auth2.c Wed Nov 11 13:23:07 2015(r290671)
+++ head/crypto/openssh/auth2.c Wed Nov 11 13:26:47 2015(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: auth2.c,v 1.130 2014/01/29 06:18:35 djm Exp $ */
-/* $FreeBSD$ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *

Modified: head/crypto/openssh/buffer.c
==
--- head/crypto/openssh/buffer.cWed Nov 11 13:23:07 2015
(r290671)
+++ head/crypto/openssh/buffer.cWed Nov 11 13:26:47 2015
(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: buffer.c,v 1.35 2014/02/02 03:44:31 djm Exp $ */
-/* $FreeBSD$ */
 /*
  * Author: Tatu Ylonen 
  * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland

Modified: head/crypto/openssh/channels.c
==
--- head/crypto/openssh/channels.c  Wed Nov 11 13:23:07 2015
(r290671)
+++ head/crypto/openssh/channels.c  Wed Nov 11 13:26:47 2015
(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: channels.c,v 1.331 2014/02/26 20:29:29 djm Exp $ */
-/* $FreeBSD$ */
 /*
  * Author: Tatu Ylonen 
  * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland

Modified: head/crypto/openssh/cipher.c
==
--- head/crypto/openssh/cipher.cWed Nov 11 13:23:07 2015
(r290671)
+++ head/crypto/openssh/cipher.cWed Nov 11 13:26:47 2015
(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: cipher.c,v 1.97 2014/02/07 06:55:54 djm Exp $ */
-/* $FreeBSD$ */
 /*
  * Author: Tatu Ylonen 
  * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland

Modified: head/crypto/openssh/clientloop.c
==
--- head/crypto/openssh/clientloop.cWed Nov 11 13:23:07 2015
(r290671)
+++ head/crypto/openssh/clientloop.cWed Nov 11 13:26:47 2015
(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: clientloop.c,v 1.258 2014/02/02 03:44:31 djm Exp $ */
-/* $FreeBSD$ */
 /*
  * Author: Tatu Ylonen 
  * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland

Modified: head/crypto/openssh/compat.c
==
--- head/crypto/openssh/compat.cWed Nov 11 13:23:07 2015
(r290671)
+++ head/crypto/openssh/compat.cWed Nov 11 13:26:47 2015
(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: compat.c,v 1.82 2013/12/30 23:52:27 djm Exp $ */
-/* $FreeBSD$ */
 /*
  * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl.  All rights reserved.
  *

Modified: head/crypto/openssh/kex.c
==
--- head/crypto/openssh/kex.c   Wed Nov 11 13:23:07 2015(r290671)
+++ head/crypto/openssh/kex.c   Wed Nov 11 13:26:47 2015(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: kex.c,v 1.98 2014/02/02 03:44:31 djm Exp $ */
-/* $FreeBSD$ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  *

Modified: head/crypto/openssh/misc.c
==
--- head/crypto/openssh/misc.c  Wed Nov 11 13:23:07 2015(r290671)
+++ head/crypto/openssh/misc.c  Wed Nov 11 13:26:47 2015(r290672)
@@ -1,5 +1,4 @@
 /* $OpenBSD: misc.c,v 1.92 2013/10/14 23:28:23 djm Exp $ */
-/* 

svn commit: r290673 - head/crypto/openssh/contrib

2015-11-11 Thread Dag-Erling Smørgrav
Author: des
Date: Wed Nov 11 13:27:58 2015
New Revision: 290673
URL: https://svnweb.freebsd.org/changeset/base/290673

Log:
  One more $Mdocdate$

Modified:
  head/crypto/openssh/contrib/ssh-copy-id.1

Modified: head/crypto/openssh/contrib/ssh-copy-id.1
==
--- head/crypto/openssh/contrib/ssh-copy-id.1   Wed Nov 11 13:26:47 2015
(r290672)
+++ head/crypto/openssh/contrib/ssh-copy-id.1   Wed Nov 11 13:27:58 2015
(r290673)
@@ -21,7 +21,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ..
-.Dd June 17, 2010
+.Dd $Mdocdate: June 17 2010 $
 .Dt SSH-COPY-ID 1
 .Os
 .Sh NAME
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290674 - head/crypto/openssh

2015-11-11 Thread Dag-Erling Smørgrav
Author: des
Date: Wed Nov 11 13:47:23 2015
New Revision: 290674
URL: https://svnweb.freebsd.org/changeset/base/290674

Log:
  Remove dead code.

Deleted:
  head/crypto/openssh/schnorr.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290675 - head/sys/tests/callout_test

2015-11-11 Thread Bryan Drewery
Author: bdrewery
Date: Wed Nov 11 16:23:07 2015
New Revision: 290675
URL: https://svnweb.freebsd.org/changeset/base/290675

Log:
  Use a proper prototype.
  
  This was a failure in the GCC build.
  
  MFC after:1 month
  X-MFC-With:   r290663

Modified:
  head/sys/tests/callout_test/callout_test.c

Modified: head/sys/tests/callout_test/callout_test.c
==
--- head/sys/tests/callout_test/callout_test.c  Wed Nov 11 13:47:23 2015
(r290674)
+++ head/sys/tests/callout_test/callout_test.c  Wed Nov 11 16:23:07 2015
(r290675)
@@ -72,7 +72,7 @@ static struct callout_run *comaster[MAXC
 
 uint64_t callout_total=0;
 
-static void execute_the_co_test();
+static void execute_the_co_test(struct callout_run *rn);
 
 static void
 co_saydone(void *arg)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290676 - head/sys/tests/framework

2015-11-11 Thread Bryan Drewery
Author: bdrewery
Date: Wed Nov 11 16:24:52 2015
New Revision: 290676
URL: https://svnweb.freebsd.org/changeset/base/290676

Log:
  Remove redundant declaration for sysctl kern.
  
  This is trying to fix the GCC build.
  
  MFC after:1 month
  X-MFC-With:   r290663

Modified:
  head/sys/tests/framework/kern_testfrwk.c

Modified: head/sys/tests/framework/kern_testfrwk.c
==
--- head/sys/tests/framework/kern_testfrwk.cWed Nov 11 16:23:07 2015
(r290675)
+++ head/sys/tests/framework/kern_testfrwk.cWed Nov 11 16:24:52 2015
(r290676)
@@ -168,7 +168,6 @@ kerntest_frwk_fini(void)
 
 static int kerntest_execute(SYSCTL_HANDLER_ARGS);
 
-SYSCTL_DECL(_kern);
 SYSCTL_NODE(_kern, OID_AUTO, testfrwk,  CTLFLAG_RW, 0, "Kernel Test 
Framework");
 SYSCTL_PROC(_kern_testfrwk, OID_AUTO, runtest, (CTLTYPE_STRUCT | CTLFLAG_RW),
0, 0, kerntest_execute, "IU", "Execute a kernel test");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290677 - in head: share/colldef share/ctypedef share/monetdef share/msgdef share/numericdef share/timedef tools/tools/locale/tools

2015-11-11 Thread Bryan Drewery
Author: bdrewery
Date: Wed Nov 11 18:45:48 2015
New Revision: 290677
URL: https://svnweb.freebsd.org/changeset/base/290677

Log:
  Use explicit filename when creating locale symlinks to avoid creating a
  directory symlink when the target directory does not exist.  This will
  cause an error instead of a broken setup.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/colldef/Makefile
  head/share/ctypedef/Makefile
  head/share/monetdef/Makefile
  head/share/msgdef/Makefile
  head/share/numericdef/Makefile
  head/share/timedef/Makefile
  head/tools/tools/locale/tools/cldr2def.pl

Modified: head/share/colldef/Makefile
==
--- head/share/colldef/Makefile Wed Nov 11 16:24:52 2015(r290676)
+++ head/share/colldef/Makefile Wed Nov 11 18:45:48 2015(r290677)
@@ -175,7 +175,8 @@ FILES=  ${LOCALES:S/$/.LC_COLLATE/}
 CLEANFILES=${FILES}
 
 .for f in ${SAME}
-SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} ${LOCALEDIR}/${f:C/^.*://}
+SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} \
+${LOCALEDIR}/${f:C/^.*://}/${FILESNAME}
 .endfor
 
 .for f in ${LOCALES}

Modified: head/share/ctypedef/Makefile
==
--- head/share/ctypedef/MakefileWed Nov 11 16:24:52 2015
(r290676)
+++ head/share/ctypedef/MakefileWed Nov 11 18:45:48 2015
(r290677)
@@ -176,7 +176,8 @@ FILES=  ${LOCALES:S/$/.LC_CTYPE/}
 CLEANFILES=${FILES}
 
 .for f in ${SAME}
-SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} ${LOCALEDIR}/${f:C/^.*://}
+SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} \
+${LOCALEDIR}/${f:C/^.*://}/${FILESNAME}
 .endfor
 
 .for f in ${LOCALES}

Modified: head/share/monetdef/Makefile
==
--- head/share/monetdef/MakefileWed Nov 11 16:24:52 2015
(r290676)
+++ head/share/monetdef/MakefileWed Nov 11 18:45:48 2015
(r290677)
@@ -173,7 +173,8 @@ FILES=  ${LOCALES:S/$/.out/}
 CLEANFILES=${FILES}
 
 .for f in ${SAME}
-SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} ${LOCALEDIR}/${f:C/^.*://}
+SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} \
+${LOCALEDIR}/${f:C/^.*://}/${FILESNAME}
 .endfor
 
 .for f in ${LOCALES}

Modified: head/share/msgdef/Makefile
==
--- head/share/msgdef/Makefile  Wed Nov 11 16:24:52 2015(r290676)
+++ head/share/msgdef/Makefile  Wed Nov 11 18:45:48 2015(r290677)
@@ -173,7 +173,8 @@ FILES=  ${LOCALES:S/$/.out/}
 CLEANFILES=${FILES}
 
 .for f in ${SAME}
-SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} ${LOCALEDIR}/${f:C/^.*://}
+SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} \
+${LOCALEDIR}/${f:C/^.*://}/${FILESNAME}
 .endfor
 
 .for f in ${LOCALES}

Modified: head/share/numericdef/Makefile
==
--- head/share/numericdef/Makefile  Wed Nov 11 16:24:52 2015
(r290676)
+++ head/share/numericdef/Makefile  Wed Nov 11 18:45:48 2015
(r290677)
@@ -173,7 +173,8 @@ FILES=  ${LOCALES:S/$/.out/}
 CLEANFILES=${FILES}
 
 .for f in ${SAME}
-SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} ${LOCALEDIR}/${f:C/^.*://}
+SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} \
+${LOCALEDIR}/${f:C/^.*://}/${FILESNAME}
 .endfor
 
 .for f in ${LOCALES}

Modified: head/share/timedef/Makefile
==
--- head/share/timedef/Makefile Wed Nov 11 16:24:52 2015(r290676)
+++ head/share/timedef/Makefile Wed Nov 11 18:45:48 2015(r290677)
@@ -173,7 +173,8 @@ FILES=  ${LOCALES:S/$/.out/}
 CLEANFILES=${FILES}
 
 .for f in ${SAME}
-SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} ${LOCALEDIR}/${f:C/^.*://}
+SYMLINKS+= ../${f:C/:.*$//}/${FILESNAME} \
+${LOCALEDIR}/${f:C/^.*://}/${FILESNAME}
 .endfor
 
 .for f in ${LOCALES}

Modified: head/tools/tools/locale/tools/cldr2def.pl
==
--- head/tools/tools/locale/tools/cldr2def.pl   Wed Nov 11 16:24:52 2015
(r290676)
+++ head/tools/tools/locale/tools/cldr2def.pl   Wed Nov 11 18:45:48 2015
(r290677)
@@ -946,7 +946,8 @@ FILES=  \${LOCALES:S/\$/.${SRCOUT2}/}
 CLEANFILES=\${FILES}
 
 .for f in \${SAME}
-SYMLINKS+= ../\${f:C/:.*\$//}/\${FILESNAME} \${LOCALEDIR}/\${f:C/^.*://}
+SYMLINKS+= ../\${f:C/:.*\$//}/\${FILESNAME} \\
+\${LOCALEDIR}/\${f:C/^.*://}/\${FILESNAME}
 .endfor
 
 .for f in \${LOCALES}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290678 - head/sys/dev/ntb/ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:54:49 2015
New Revision: 290678
URL: https://svnweb.freebsd.org/changeset/base/290678

Log:
  NTB: Skip db_valid validation writing DB link bit
  
  In ntb_poll_link, we are intentionally writing the link bit, which is
  absent from db_valid_mask.  Don't panic on a kassert when we do so.
  
  The Linux version of this (dual BSD/GPL) driver has the db_valid_mask
  assertions in callers of db_iowrite() rather than db_iowrite() itself;
  it skips the assertions in the equivalent of ntb_poll_link().  Rather
  than duplicating the assertions in every caller, add a db_iowrite_raw()
  that doesn't check and use it from ntb_poll_link().
  
  Suggested by: kassert_panic
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:45:48 2015
(r290677)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:54:49 2015
(r290678)
@@ -283,7 +283,8 @@ static void ntb_interrupt(struct ntb_sof
 static void ndev_vec_isr(void *arg);
 static void ndev_irq_isr(void *arg);
 static inline uint64_t db_ioread(struct ntb_softc *, uint64_t regoff);
-static inline void db_iowrite(struct ntb_softc *, uint64_t regoff, uint64_t 
val);
+static inline void db_iowrite(struct ntb_softc *, uint64_t regoff, uint64_t);
+static inline void db_iowrite_raw(struct ntb_softc *, uint64_t regoff, 
uint64_t);
 static int ntb_create_msix_vec(struct ntb_softc *ntb, uint32_t num_vectors);
 static void ntb_free_msix_vec(struct ntb_softc *ntb);
 static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id);
@@ -994,6 +995,12 @@ db_iowrite(struct ntb_softc *ntb, uint64
 
if (regoff == ntb->self_reg->db_mask)
DB_MASK_ASSERT(ntb, MA_OWNED);
+   db_iowrite_raw(ntb, regoff, val);
+}
+
+static inline void
+db_iowrite_raw(struct ntb_softc *ntb, uint64_t regoff, uint64_t val)
+{
 
if (ntb->type == NTB_ATOM) {
ntb_reg_write(8, regoff, val);
@@ -1875,7 +1882,7 @@ ntb_poll_link(struct ntb_softc *ntb)
ntb->ntb_ctl = ntb_cntl;
ntb->lnk_sta = ntb_reg_read(4, ntb->reg->lnk_sta);
} else {
-   db_iowrite(ntb, ntb->self_reg->db_bell, ntb->db_link_mask);
+   db_iowrite_raw(ntb, ntb->self_reg->db_bell, ntb->db_link_mask);
 
reg_val = pci_read_config(ntb->device, ntb->reg->lnk_sta, 2);
if (reg_val == ntb->lnk_sta)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290681 - head/sys/dev/ntb/ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:55:16 2015
New Revision: 290681
URL: https://svnweb.freebsd.org/changeset/base/290681

Log:
  ntb_hw: Correctly detect DSD/USD
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:07 2015
(r290680)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:16 2015
(r290681)
@@ -1168,9 +1168,9 @@ ntb_detect_xeon(struct ntb_softc *ntb)
ntb->ppd = ppd;
 
if ((ppd & XEON_PPD_DEV_TYPE) != 0)
-   ntb->dev_type = NTB_DEV_USD;
-   else
ntb->dev_type = NTB_DEV_DSD;
+   else
+   ntb->dev_type = NTB_DEV_USD;
 
if ((ppd & XEON_PPD_SPLIT_BAR) != 0)
ntb->features |= NTB_SPLIT_BAR;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290679 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:54:58 2015
New Revision: 290679
URL: https://svnweb.freebsd.org/changeset/base/290679

Log:
  ntb: Use caddr_t to simplify pointer arithmetic
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.h

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:54:49 2015
(r290678)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:54:58 2015
(r290679)
@@ -143,7 +143,7 @@ struct ntb_transport_qp {
void *data, int len);
struct ntb_queue_list   tx_free_q;
struct mtx  ntb_tx_free_q_lock;
-   void*tx_mw;
+   caddr_t tx_mw;
bus_addr_t  tx_mw_phys;
ntb_q_idx_t tx_index;
ntb_q_idx_t tx_max_entry;
@@ -158,7 +158,7 @@ struct ntb_transport_qp {
struct mtx  ntb_rx_q_lock;
struct task rx_completion_task;
struct task rxc_db_work;
-   void*rx_buff;
+   caddr_t rx_buff;
ntb_q_idx_t rx_index;
ntb_q_idx_t rx_max_entry;
uint64_trx_max_frame;
@@ -197,11 +197,11 @@ struct ntb_transport_mw {
size_t  xlat_align;
size_t  xlat_align_size;
/* Tx buff is off vbase / phys_addr */
-   void*vbase;
+   caddr_t vbase;
size_t  xlat_size;
size_t  buff_size;
/* Rx buff is off virt_addr / dma_addr */
-   void*virt_addr;
+   caddr_t virt_addr;
bus_addr_t  dma_addr;
 };
 
@@ -560,7 +560,7 @@ ntb_transport_init(struct ntb_softc *ntb
 
mw->buff_size = 0;
mw->xlat_size = 0;
-   mw->virt_addr = 0;
+   mw->virt_addr = NULL;
mw->dma_addr = 0;
}
 
@@ -665,7 +665,7 @@ ntb_transport_init_queue(struct ntb_tran
tx_size = mw_size / num_qps_mw;
qp_offset = tx_size * qp_num / mw_count;
 
-   qp->tx_mw = (char *)mw->vbase + qp_offset;
+   qp->tx_mw = mw->vbase + qp_offset;
KASSERT(qp->tx_mw != NULL, ("uh oh?"));
 
/* XXX Assumes that a vm_paddr_t is equivalent to bus_addr_t */
@@ -673,7 +673,7 @@ ntb_transport_init_queue(struct ntb_tran
KASSERT(qp->tx_mw_phys != 0, ("uh oh?"));
 
tx_size -= sizeof(struct ntb_rx_info);
-   qp->rx_info = (void *)((char *)qp->tx_mw + tx_size);
+   qp->rx_info = (void *)(qp->tx_mw + tx_size);
 
/* Due to house-keeping, there must be at least 2 buffs */
qp->tx_max_frame = qmin(tx_size / 2,
@@ -1356,10 +1356,10 @@ ntb_transport_setup_qp_mw(struct ntb_tra
num_qps_mw = nt->qp_count / mw_count;
 
rx_size = mw->xlat_size / num_qps_mw;
-   qp->rx_buff = (char *)mw->virt_addr + rx_size * qp_num / mw_count;
+   qp->rx_buff = mw->virt_addr + rx_size * qp_num / mw_count;
rx_size -= sizeof(struct ntb_rx_info);
 
-   qp->remote_rx_info = (void*)((char *)qp->rx_buff + rx_size);
+   qp->remote_rx_info = (void*)(qp->rx_buff + rx_size);
 
/* Due to house-keeping, there must be at least 2 buffs */
qp->rx_max_frame = qmin(rx_size / 2,
@@ -1371,8 +1371,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra
 
/* Set up the hdr offsets with 0s */
for (i = 0; i < qp->rx_max_entry; i++) {
-   offset = (void *)((uint8_t *)qp->rx_buff +
-   qp->rx_max_frame * (i + 1) -
+   offset = (void *)(qp->rx_buff + qp->rx_max_frame * (i + 1) -
sizeof(struct ntb_payload_header));
memset(offset, 0, sizeof(struct ntb_payload_header));
}

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:54:49 2015
(r290678)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:54:58 2015
(r290679)
@@ -111,8 +111,8 @@ struct ntb_pci_bar_info {
int pci_resource_id;
struct resource *pci_resource;
vm_paddr_t  pbase;
-   void*vbase;
-   u_long  size;
+   caddr_t vbase;
+   vm_size_t   size;
 
/* Configuration register offsets */
uint32_tpsz_off;
@@ -2404,7 +2404,7 @@ ntb_peer_spad_read(struct ntb_softc *ntb
  */
 int
 ntb_mw_get_range(struct ntb_softc *ntb, unsigned mw_idx, vm_paddr_t *base,
-void **vbase, size_t *size, size_t *align, size_t *align_size)
+caddr_t *vbase, size_t *size, size_t *align, size_t *align_size)
 {
struct ntb_

svn commit: r290683 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:55:34 2015
New Revision: 290683
URL: https://svnweb.freebsd.org/changeset/base/290683

Log:
  if_ntb: Transport link cleanup needs to be on a taskqueue
  
  Because it can sleep drainking link work callout(s).  Linux (dual
  BSD/GPL driver) does something very similar.
  
  At the same time, switch the NTB CTX lock to a non-spin mutex, because
  the taskqueue_swi lock can't be taken after a spin mutex.
  
  Suggested by: Witness
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:55:25 2015
(r290682)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:55:34 2015
(r290683)
@@ -216,6 +216,7 @@ struct ntb_transport_ctx {
unsignedqp_count;
enum ntb_link_event link_is_up;
struct callout  link_work;
+   struct task link_cleanup;
uint64_tbufsize;
u_char  eaddr[ETHER_ADDR_LEN];
struct mtx  tx_lock;
@@ -304,6 +305,7 @@ static int ntb_transport_setup_qp_mw(str
 unsigned int qp_num);
 static void ntb_qp_link_work(void *arg);
 static void ntb_transport_link_cleanup(struct ntb_transport_ctx *nt);
+static void ntb_transport_link_cleanup_work(void *, int);
 static void ntb_qp_link_down(struct ntb_transport_qp *qp);
 static void ntb_qp_link_down_reset(struct ntb_transport_qp *qp);
 static void ntb_qp_link_cleanup(struct ntb_transport_qp *qp);
@@ -588,6 +590,7 @@ ntb_transport_probe(struct ntb_softc *nt
}
 
callout_init(&nt->link_work, 0);
+   TASK_INIT(&nt->link_cleanup, 0, ntb_transport_link_cleanup_work, nt);
 
rc = ntb_set_ctx(ntb, nt, &ntb_transport_ops);
if (rc != 0)
@@ -614,7 +617,7 @@ ntb_transport_free(struct ntb_transport_
uint8_t i;
 
ntb_transport_link_cleanup(nt);
-
+   taskqueue_drain(taskqueue_swi, &nt->link_cleanup);
callout_drain(&nt->link_work);
 
BIT_COPY(QP_SETSIZE, &nt->qp_bitmap, &qp_bitmap_alloc);
@@ -1178,7 +1181,7 @@ ntb_transport_event_callback(void *data)
} else {
if (bootverbose)
if_printf(nt->ifp, "HW link down\n");
-   ntb_transport_link_cleanup(nt);
+   taskqueue_enqueue(taskqueue_swi, &nt->link_cleanup);
}
 }
 
@@ -1448,6 +1451,12 @@ ntb_transport_link_cleanup(struct ntb_tr
ntb_spad_write(nt->ntb, i, 0);
 }
 
+static void
+ntb_transport_link_cleanup_work(void *arg, int pending __unused)
+{
+
+   ntb_transport_link_cleanup(arg);
+}
 
 static void
 ntb_qp_link_down(struct ntb_transport_qp *qp)

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:25 2015
(r290682)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:34 2015
(r290683)
@@ -182,8 +182,8 @@ struct ntb_softc {
void*ntb_ctx;
const struct ntb_ctx_ops *ctx_ops;
struct ntb_vec  *msix_vec;
-#define CTX_LOCK(sc)   mtx_lock_spin(&(sc)->ctx_lock)
-#define CTX_UNLOCK(sc) mtx_unlock_spin(&(sc)->ctx_lock)
+#define CTX_LOCK(sc)   mtx_lock(&(sc)->ctx_lock)
+#define CTX_UNLOCK(sc) mtx_unlock(&(sc)->ctx_lock)
 #define CTX_ASSERT(sc,f)   mtx_assert(&(sc)->ctx_lock, (f))
struct mtx  ctx_lock;
 
@@ -512,7 +512,7 @@ ntb_attach(device_t device)
callout_init(&ntb->heartbeat_timer, 1);
callout_init(&ntb->lr_timer, 1);
mtx_init(&ntb->db_mask_lock, "ntb hw bits", NULL, MTX_SPIN);
-   mtx_init(&ntb->ctx_lock, "ntb ctx", NULL, MTX_SPIN);
+   mtx_init(&ntb->ctx_lock, "ntb ctx", NULL, MTX_DEF);
 
if (ntb->type == NTB_ATOM)
error = ntb_detect_atom(ntb);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290682 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:55:25 2015
New Revision: 290682
URL: https://svnweb.freebsd.org/changeset/base/290682

Log:
  NTB: Diff reduce with Linux
  
  No functional change.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_regs.h

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:55:16 2015
(r290681)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:55:25 2015
(r290682)
@@ -273,7 +273,7 @@ static void ntb_net_tx_handler(struct nt
 static void ntb_net_rx_handler(struct ntb_transport_qp *qp, void *qp_data,
 void *data, int len);
 static void ntb_net_event_handler(void *data, enum ntb_link_event status);
-static int ntb_transport_init(struct ntb_softc *ntb);
+static int ntb_transport_probe(struct ntb_softc *ntb);
 static void ntb_transport_free(struct ntb_transport_ctx *);
 static void ntb_transport_init_queue(struct ntb_transport_ctx *nt,
 unsigned int qp_num);
@@ -368,7 +368,7 @@ ntb_setup_interface(void)
return (ENXIO);
}
 
-   rc = ntb_transport_init(net_softc.ntb);
+   rc = ntb_transport_probe(net_softc.ntb);
if (rc != 0) {
printf("ntb: Cannot init transport: %d\n", rc);
return (rc);
@@ -541,7 +541,7 @@ ntb_net_event_handler(void *data, enum n
 /* Transport Init and teardown */
 
 static int
-ntb_transport_init(struct ntb_softc *ntb)
+ntb_transport_probe(struct ntb_softc *ntb)
 {
struct ntb_transport_ctx *nt = &net_softc;
struct ntb_transport_mw *mw;
@@ -596,6 +596,8 @@ ntb_transport_init(struct ntb_softc *ntb
nt->link_is_up = false;
ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO);
ntb_link_event(ntb);
+
+   callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt);
return (0);
 
 err:
@@ -693,6 +695,8 @@ ntb_transport_init_queue(struct ntb_tran
STAILQ_INIT(&qp->rx_pend_q);
STAILQ_INIT(&qp->rx_free_q);
STAILQ_INIT(&qp->tx_free_q);
+
+   callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp);
 }
 
 static void

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:16 2015
(r290681)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:25 2015
(r290682)
@@ -518,26 +518,26 @@ ntb_attach(device_t device)
error = ntb_detect_atom(ntb);
else
error = ntb_detect_xeon(ntb);
-   if (error)
+   if (error != 0)
goto out;
 
ntb_detect_max_mw(ntb);
 
+   pci_enable_busmaster(ntb->device);
+
error = ntb_map_pci_bars(ntb);
-   if (error)
+   if (error != 0)
goto out;
if (ntb->type == NTB_ATOM)
error = ntb_atom_init_dev(ntb);
else
error = ntb_xeon_init_dev(ntb);
-   if (error)
-   goto out;
-   error = ntb_init_isr(ntb);
-   if (error)
+   if (error != 0)
goto out;
-   ntb_sysctl_init(ntb);
 
-   pci_enable_busmaster(ntb->device);
+   ntb_poll_link(ntb);
+
+   ntb_sysctl_init(ntb);
 
 out:
if (error != 0)
@@ -556,6 +556,7 @@ ntb_detach(device_t device)
ntb_db_set_mask(ntb, ntb->db_valid_mask);
callout_drain(&ntb->heartbeat_timer);
callout_drain(&ntb->lr_timer);
+   pci_disable_busmaster(ntb->device);
if (ntb->type == NTB_XEON)
ntb_teardown_xeon(ntb);
ntb_teardown_interrupts(ntb);
@@ -1274,18 +1275,22 @@ ntb_xeon_init_dev(struct ntb_softc *ntb)
return (rc);
 
/* Enable Bus Master and Memory Space on the secondary side */
-   ntb_reg_write(2, XEON_PCICMD_OFFSET,
+   ntb_reg_write(2, XEON_SPCICMD_OFFSET,
PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
 
-   /* Enable link training */
-   ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO);
+   /*
+* Mask all doorbell interrupts.
+*/
+   ntb_db_set_mask(ntb, ntb->db_valid_mask);
 
-   return (0);
+   rc = ntb_init_isr(ntb);
+   return (rc);
 }
 
 static int
 ntb_atom_init_dev(struct ntb_softc *ntb)
 {
+   int error;
 
KASSERT(ntb->conn_type == NTB_CONN_B2B,
("Unsupported NTB configuration (%d)\n", ntb->conn_type));
@@ -1310,9 +1315,13 @@ ntb_atom_init_dev(struct ntb_softc *ntb)
configure_atom_secondary_side_bars(ntb);
 
/* Enable Bus Master and Memory Space on the secondary side */
-   ntb_reg_write(2, ATOM_PCICMD_OFFSET,
+   ntb_reg_write(2, ATOM_SPCICMD_OFFSET,
PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
 
+   error = ntb_init_isr(ntb);
+   if (error != 0)
+   return 

svn commit: r290680 - head/sys/dev/ntb/ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:55:07 2015
New Revision: 290680
URL: https://svnweb.freebsd.org/changeset/base/290680

Log:
  ntb_hw: In INTx fallback, correct db shift from 15 to 16
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_regs.h

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:54:58 2015
(r290679)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:07 2015
(r290680)
@@ -905,7 +905,7 @@ ntb_init_isr(struct ntb_softc *ntb)
 
if (ntb->type == NTB_XEON && num_vectors < ntb->db_vec_count) {
ntb->db_vec_count = 1;
-   ntb->db_vec_shift = ntb->db_count;
+   ntb->db_vec_shift = XEON_DB_TOTAL_SHIFT;
rc = ntb_setup_legacy_interrupt(ntb);
} else {
ntb_create_msix_vec(ntb, num_vectors);

Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h
==
--- head/sys/dev/ntb/ntb_hw/ntb_regs.h  Wed Nov 11 18:54:58 2015
(r290679)
+++ head/sys/dev/ntb/ntb_hw/ntb_regs.h  Wed Nov 11 18:55:07 2015
(r290680)
@@ -39,6 +39,7 @@
 #define XEON_HSX_SPLIT_MW_COUNT3
 /* Reserve the uppermost bit for link interrupt */
 #define XEON_DB_COUNT  15
+#define XEON_DB_TOTAL_SHIFT16
 #define XEON_DB_LINK   15
 #define XEON_DB_MSIX_VECTOR_COUNT  4
 #define XEON_DB_MSIX_VECTOR_SHIFT  5
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290688 - head/sys/dev/ntb/if_ntb

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:56:21 2015
New Revision: 290688
URL: https://svnweb.freebsd.org/changeset/base/290688

Log:
  if_ntb: MFV c92ba3c5: invalid buf pointer in multi-MW setups
  
  Order of operations issue with the QP Num and MW count, which would
  result in the receive buffer pointer being invalid if there are more
  than 1 MW.  Corrected with parenthesis to enforce the proper order of
  operations.
  
  Reported by:  John I. Kading 
  Reported by:  Conrad Meyer 
  Authored by:  Jon Mason 
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:56:11 2015
(r290687)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:56:21 2015
(r290688)
@@ -680,7 +680,7 @@ ntb_transport_init_queue(struct ntb_tran
mw_size = mw->phys_size;
 
tx_size = mw_size / num_qps_mw;
-   qp_offset = tx_size * qp_num / mw_count;
+   qp_offset = tx_size * (qp_num / mw_count);
 
qp->tx_mw = mw->vbase + qp_offset;
KASSERT(qp->tx_mw != NULL, ("uh oh?"));
@@ -1374,7 +1374,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra
num_qps_mw = nt->qp_count / mw_count;
 
rx_size = mw->xlat_size / num_qps_mw;
-   qp->rx_buff = mw->virt_addr + rx_size * qp_num / mw_count;
+   qp->rx_buff = mw->virt_addr + rx_size * (qp_num / mw_count);
rx_size -= sizeof(struct ntb_rx_info);
 
qp->remote_rx_info = (void*)(qp->rx_buff + rx_size);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290685 - head/sys/dev/ntb/ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:55:53 2015
New Revision: 290685
URL: https://svnweb.freebsd.org/changeset/base/290685

Log:
  ntb_hw: Similarly, add a debug-leveled macro for ntb_hw
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:44 2015
(r290684)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:53 2015
(r290685)
@@ -317,6 +317,15 @@ static int sysctl_handle_features(SYSCTL
 static int sysctl_handle_link_status(SYSCTL_HANDLER_ARGS);
 static int sysctl_handle_register(SYSCTL_HANDLER_ARGS);
 
+static unsigned g_ntb_hw_debug_level;
+SYSCTL_UINT(_hw_ntb, OID_AUTO, debug_level, CTLFLAG_RWTUN,
+&g_ntb_hw_debug_level, 0, "ntb_hw log level -- higher is more verbose");
+#define ntb_printf(lvl, ...) do {  \
+   if ((lvl) <= g_ntb_hw_debug_level) {\
+   device_printf(ntb->device, __VA_ARGS__);\
+   }   \
+} while (0)
+
 static struct ntb_hw_info pci_ids[] = {
/* XXX: PS/SS IDs left out until they are supported. */
{ 0x0C4E8086, "BWD Atom Processor S1200 Non-Transparent Bridge B2B",
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290687 - head/sys/dev/ntb/ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:56:11 2015
New Revision: 290687
URL: https://svnweb.freebsd.org/changeset/base/290687

Log:
  NTB: Add more HW registers to device sysctl tree
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:56:02 2015
(r290686)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:56:11 2015
(r290687)
@@ -1961,6 +1961,8 @@ ntb_sysctl_init(struct ntb_softc *ntb)
&ntb->conn_type, 0, "0 - Transparent; 1 - B2B; 2 - Root Port");
SYSCTL_ADD_UINT(ctx, tree_par, OID_AUTO, "dev_type", CTLFLAG_RD,
&ntb->dev_type, 0, "0 - USD; 1 - DSD");
+   SYSCTL_ADD_UINT(ctx, tree_par, OID_AUTO, "ppd", CTLFLAG_RD,
+   &ntb->ppd, 0, "Raw PPD register (cached)");
 
if (ntb->b2b_mw_idx != B2B_MW_DISABLED) {
SYSCTL_ADD_U8(ctx, tree_par, OID_AUTO, "b2b_idx", CTLFLAG_RD,
@@ -2085,14 +2087,50 @@ ntb_sysctl_init(struct ntb_softc *ntb)
CTLFLAG_RD, NULL, "Xeon HW errors");
errpar = SYSCTL_CHILDREN(tmptree);
 
-   SYSCTL_ADD_PROC(ctx, errpar, OID_AUTO, "devsts",
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "ppd",
+   CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
+   NTB_REG_8 | NTB_PCI_REG | NTB_PPD_OFFSET,
+   sysctl_handle_register, "CU", "PPD");
+
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "pbar23_sz",
+   CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
+   NTB_REG_8 | NTB_PCI_REG | XEON_PBAR23SZ_OFFSET,
+   sysctl_handle_register, "CU", "PBAR23 SZ (log2)");
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "pbar4_sz",
+   CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
+   NTB_REG_8 | NTB_PCI_REG | XEON_PBAR4SZ_OFFSET,
+   sysctl_handle_register, "CU", "PBAR4 SZ (log2)");
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "pbar5_sz",
+   CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
+   NTB_REG_8 | NTB_PCI_REG | XEON_PBAR5SZ_OFFSET,
+   sysctl_handle_register, "CU", "PBAR5 SZ (log2)");
+
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "sbar23_sz",
+   CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
+   NTB_REG_8 | NTB_PCI_REG | XEON_SBAR23SZ_OFFSET,
+   sysctl_handle_register, "CU", "SBAR23 SZ (log2)");
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "sbar4_sz",
+   CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
+   NTB_REG_8 | NTB_PCI_REG | XEON_SBAR4SZ_OFFSET,
+   sysctl_handle_register, "CU", "SBAR4 SZ (log2)");
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "sbar5_sz",
+   CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
+   NTB_REG_8 | NTB_PCI_REG | XEON_SBAR5SZ_OFFSET,
+   sysctl_handle_register, "CU", "SBAR5 SZ (log2)");
+
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "devsts",
CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
NTB_REG_16 | NTB_PCI_REG | XEON_DEVSTS_OFFSET,
sysctl_handle_register, "SU", "DEVSTS");
-   SYSCTL_ADD_PROC(ctx, errpar, OID_AUTO, "lnksts",
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "lnksts",
CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
NTB_REG_16 | NTB_PCI_REG | XEON_LINK_STATUS_OFFSET,
sysctl_handle_register, "SU", "LNKSTS");
+   SYSCTL_ADD_PROC(ctx, regpar, OID_AUTO, "slnksts",
+   CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
+   NTB_REG_16 | NTB_PCI_REG | XEON_SLINK_STATUS_OFFSET,
+   sysctl_handle_register, "SU", "SLNKSTS");
+
SYSCTL_ADD_PROC(ctx, errpar, OID_AUTO, "uncerrsts",
CTLFLAG_RD | CTLTYPE_OPAQUE, ntb,
NTB_REG_32 | NTB_PCI_REG | XEON_UNCERRSTS_OFFSET,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290686 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:56:02 2015
New Revision: 290686
URL: https://svnweb.freebsd.org/changeset/base/290686

Log:
  ntb: volatile some members set by interrupt routines
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:55:53 2015
(r290685)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:56:02 2015
(r290686)
@@ -144,7 +144,7 @@ struct ntb_transport_qp {
void*cb_data;
 
boolclient_ready;
-   boollink_is_up;
+   volatile bool   link_is_up;
uint8_t qp_num; /* Only 64 QPs are allowed.  0-63 */
 
struct ntb_rx_info  *rx_info;
@@ -225,7 +225,7 @@ struct ntb_transport_ctx {
struct _qpset   qp_bitmap_free;
unsignedmw_count;
unsignedqp_count;
-   enum ntb_link_event link_is_up;
+   volatile bool   link_is_up;
struct callout  link_work;
struct task link_cleanup;
uint64_tbufsize;

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:55:53 2015
(r290685)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cWed Nov 11 18:56:02 2015
(r290686)
@@ -209,8 +209,8 @@ struct ntb_softc {
 #define DB_MASK_ASSERT(sc,f)   mtx_assert(&(sc)->db_mask_lock, (f))
struct mtx  db_mask_lock;
 
-   uint32_tntb_ctl;
-   uint32_tlnk_sta;
+   volatile uint32_t   ntb_ctl;
+   volatile uint32_t   lnk_sta;
 
uint64_tdb_valid_mask;
uint64_tdb_link_mask;
@@ -1976,9 +1976,11 @@ ntb_sysctl_init(struct ntb_softc *ntb)
"Features/errata of this NTB device");
 
SYSCTL_ADD_UINT(ctx, tree_par, OID_AUTO, "ntb_ctl", CTLFLAG_RD,
-   &ntb->ntb_ctl, 0, "NTB CTL register (cached)");
+   __DEVOLATILE(uint32_t *, &ntb->ntb_ctl), 0,
+   "NTB CTL register (cached)");
SYSCTL_ADD_UINT(ctx, tree_par, OID_AUTO, "lnk_sta", CTLFLAG_RD,
-   &ntb->lnk_sta, 0, "LNK STA register (cached)");
+   __DEVOLATILE(uint32_t *, &ntb->lnk_sta), 0,
+   "LNK STA register (cached)");
 
SYSCTL_ADD_PROC(ctx, tree_par, OID_AUTO, "link_status",
CTLFLAG_RD | CTLTYPE_STRING, ntb, 0, sysctl_handle_link_status,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290684 - head/sys/dev/ntb/if_ntb

2015-11-11 Thread Conrad E. Meyer
Author: cem
Date: Wed Nov 11 18:55:44 2015
New Revision: 290684
URL: https://svnweb.freebsd.org/changeset/base/290684

Log:
  if_ntb: Add module-specific log level
  
  Rather than relying on the quite accurately named 'bootverbose'.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:55:34 2015
(r290683)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cWed Nov 11 18:55:44 2015
(r290684)
@@ -90,15 +90,26 @@ enum ntb_link_event {
NTB_LINK_UP,
 };
 
-static unsigned int transport_mtu = 0x1 + ETHER_HDR_LEN + ETHER_CRC_LEN;
+static SYSCTL_NODE(_hw, OID_AUTO, if_ntb, CTLFLAG_RW, 0, "if_ntb");
+
+static unsigned g_if_ntb_debug_level;
+SYSCTL_UINT(_hw_if_ntb, OID_AUTO, debug_level, CTLFLAG_RWTUN,
+&g_if_ntb_debug_level, 0, "if_ntb log level -- higher is more verbose");
+#define ntb_printf(lvl, ...) do {  \
+   if ((lvl) <= g_if_ntb_debug_level) {\
+   if_printf(nt->ifp, __VA_ARGS__);\
+   }   \
+} while (0)
+
+static unsigned transport_mtu = 0x1 + ETHER_HDR_LEN + ETHER_CRC_LEN;
 
 static uint64_t max_mw_size;
-SYSCTL_UQUAD(_hw_ntb, OID_AUTO, max_mw_size, CTLFLAG_RDTUN, &max_mw_size, 0,
+SYSCTL_UQUAD(_hw_if_ntb, OID_AUTO, max_mw_size, CTLFLAG_RDTUN, &max_mw_size, 0,
 "If enabled (non-zero), limit the size of large memory windows. "
 "Both sides of the NTB MUST set the same value here.");
 
-static unsigned int max_num_clients;
-SYSCTL_UINT(_hw_ntb, OID_AUTO, max_num_clients, CTLFLAG_RDTUN,
+static unsigned max_num_clients;
+SYSCTL_UINT(_hw_if_ntb, OID_AUTO, max_num_clients, CTLFLAG_RDTUN,
 &max_num_clients, 0, "Maximum number of NTB transport clients.  "
 "0 (default) - use all available NTB memory windows; "
 "positive integer N - Limit to N memory windows.");
@@ -370,22 +381,23 @@ ntb_setup_interface(void)
return (ENXIO);
}
 
-   rc = ntb_transport_probe(net_softc.ntb);
-   if (rc != 0) {
-   printf("ntb: Cannot init transport: %d\n", rc);
-   return (rc);
-   }
-
ifp = net_softc.ifp = if_alloc(IFT_ETHER);
if (ifp == NULL) {
ntb_transport_free(&net_softc);
printf("ntb: Cannot allocate ifnet structure\n");
return (ENOMEM);
}
+   if_initname(ifp, "ntb", 0);
+
+   rc = ntb_transport_probe(net_softc.ntb);
+   if (rc != 0) {
+   printf("ntb: Cannot init transport: %d\n", rc);
+   if_free(net_softc.ifp);
+   return (rc);
+   }
 
net_softc.qp = ntb_transport_create_queue(ifp, net_softc.ntb,
&handlers);
-   if_initname(ifp, "ntb", 0);
ifp->if_init = ntb_net_init;
ifp->if_softc = &net_softc;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;
@@ -409,17 +421,17 @@ static int
 ntb_teardown_interface(void)
 {
 
-   if (net_softc.qp != NULL)
+   if (net_softc.qp != NULL) {
ntb_transport_link_down(net_softc.qp);
 
+   ntb_transport_free_queue(net_softc.qp);
+   ntb_transport_free(&net_softc);
+   }
+
if (net_softc.ifp != NULL) {
ether_ifdetach(net_softc.ifp);
if_free(net_softc.ifp);
-   }
-
-   if (net_softc.qp != NULL) {
-   ntb_transport_free_queue(net_softc.qp);
-   ntb_transport_free(&net_softc);
+   net_softc.ifp = NULL;
}
 
return (0);
@@ -804,13 +816,15 @@ ntb_transport_create_queue(void *data, s
 static void
 ntb_transport_link_up(struct ntb_transport_qp *qp)
 {
+   struct ntb_transport_ctx *nt;
 
if (qp == NULL)
return;
 
qp->client_ready = true;
-   if (bootverbose)
-   if_printf(qp->transport->ifp, "qp client ready\n");
+
+   nt = qp->transport;
+   ntb_printf(2, "qp client ready\n");
 
if (qp->transport->link_is_up)
callout_reset(&qp->link_work, 0, ntb_qp_link_work, qp);
@@ -1175,12 +1189,10 @@ ntb_transport_event_callback(void *data)
struct ntb_transport_ctx *nt = data;
 
if (ntb_link_is_up(nt->ntb, NULL, NULL)) {
-   if (bootverbose)
-   if_printf(nt->ifp, "HW link up\n");
+   ntb_printf(1, "HW link up\n");
callout_reset(&nt->link_work, 0, ntb_transport_link_work, nt);
} else {
-   if (bootverbose)
-   if_printf(nt->ifp, "HW link down\n");
+   ntb_printf(1, "HW link down\n");
taskqueue_enqueue(taskqueue_swi, &nt->link_cleanup);
}
 }
@@ -1242,8 +1254,7 @@ ntb_transport_link_work(void *arg)
}
 
nt->link_is_up = true;
-   if (boo

Re: svn commit: r290663 - in head/sys: modules modules/tests modules/tests/callout_test modules/tests/framework tests tests/callout_test tests/framework

2015-11-11 Thread Garrett Cooper

> On Nov 10, 2015, at 06:14, Randall Stewart  wrote:
> 
> Author: rrs
> Date: Tue Nov 10 14:14:41 2015
> New Revision: 290663
> URL: https://svnweb.freebsd.org/changeset/base/290663
> 
> Log:
>  Add a kernel test framework. The callout_test is a demonstration and will 
> only
>  work with the upcoming async-drain functionality. Tests can be added
>  to the tests directory and then the framework can be used to launch
>  those tests.
> 
>  MFC after:1 month
>  Sponsored by:Netflix Inc.
>  Differential Revision:https://reviews.freebsd.org/D1755

Hi Randall,

This code drop is lacking a few things:
1. How can other consumers use this?
2. How does this hook in to ATF/Kyua or Jenkins?
There are a bunch of style bugs in the code as well.
It seems like based on the lack of documentation, this needed more 
review/communication and probably should have been put in share/examples or 
tools/test until it could be integrated into existing frameworks and used by 
everyone else.
Thank you,
-NGie


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


Re: svn commit: r290651 - head/sys/dev/usb/wlan

2015-11-11 Thread Andriy Voskoboinyk
Wed, 11 Nov 2015 11:54:58 +0200 було написано Renato Botelho  
:



On Nov 10, 2015, at 18:19, Renato Botelho  wrote:


On Nov 10, 2015, at 10:52, Andriy Voskoboinyk  wrote:

Author: avos
Date: Tue Nov 10 12:52:26 2015
New Revision: 290651
URL: https://svnweb.freebsd.org/changeset/base/290651

Log:
urtwn(4): add IBSS mode support

Tested with RTL8188EU, IBSS and STA modes.

Reviewed by:kevlo
Approved by:adrian (mentor)
Differential Revision:  https://reviews.freebsd.org/D4038

Modified:
head/sys/dev/usb/wlan/if_urtwn.c
head/sys/dev/usb/wlan/if_urtwnvar.h

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==
--- head/sys/dev/usb/wlan/if_urtwn.cTue Nov 10 12:20:22 2015
(r290650)
+++ head/sys/dev/usb/wlan/if_urtwn.cTue Nov 10 12:52:26 2015
(r290651)
@@ -228,10 +228,14 @@ static inturtwn_setup_beacon(struct ur
static void urtwn_update_beacon(struct ieee80211vap *, int);
static int  urtwn_tx_beacon(struct urtwn_softc *sc,
struct urtwn_vap *);
+static voidurtwn_tsf_task_adhoc(void *, int);
static void urtwn_tsf_sync_enable(struct urtwn_softc *,
struct ieee80211vap *);
static void urtwn_set_led(struct urtwn_softc *, int, int);
static void urtwn_set_mode(struct urtwn_softc *, uint8_t);
+static voidurtwn_ibss_recv_mgmt(struct ieee80211_node *,
+   struct mbuf *, int,
+   const struct ieee80211_rx_stats *, int, int);
static int  urtwn_newstate(struct ieee80211vap *,
enum ieee80211_state, int);
static void urtwn_watchdog(void *);
@@ -449,6 +453,7 @@ urtwn_attach(device_t self)
ic->ic_caps =
  IEEE80211_C_STA   /* station mode */
| IEEE80211_C_MONITOR   /* monitor mode */
+   | IEEE80211_C_IBSS  /* adhoc mode */
| IEEE80211_C_HOSTAP/* hostap mode */
| IEEE80211_C_SHPREAMBLE/* short preamble supported */
| IEEE80211_C_SHSLOT/* short slot time supported */
@@ -592,13 +597,18 @@ urtwn_vap_create(struct ieee80211com *ic
return (NULL);
}

-   if (opmode == IEEE80211_M_HOSTAP)
+   if (opmode == IEEE80211_M_HOSTAP || opmode == IEEE80211_M_IBSS)
urtwn_init_beacon(sc, uvp);

/* override state transition machine */
uvp->newstate = vap->iv_newstate;
vap->iv_newstate = urtwn_newstate;
vap->iv_update_beacon = urtwn_update_beacon;
+   if (opmode == IEEE80211_M_IBSS) {
+   uvp->recv_mgmt = vap->iv_recv_mgmt;
+   vap->iv_recv_mgmt = urtwn_ibss_recv_mgmt;
+   TASK_INIT(&uvp->tsf_task_adhoc, 0, urtwn_tsf_task_adhoc, vap);
+   }

/* complete setup */
ieee80211_vap_attach(vap, ieee80211_media_change,
@@ -610,13 +620,13 @@ urtwn_vap_create(struct ieee80211com *ic
static void
urtwn_vap_delete(struct ieee80211vap *vap)
{
+   struct ieee80211com *ic = vap->iv_ic;
struct urtwn_vap *uvp = URTWN_VAP(vap);
-   enum ieee80211_opmode opmode = vap->iv_opmode;

-   if (opmode == IEEE80211_M_HOSTAP) {
-   if (uvp->bcn_mbuf != NULL)
-   m_freem(uvp->bcn_mbuf);
-   }
+   if (uvp->bcn_mbuf != NULL)
+   m_freem(uvp->bcn_mbuf);
+   if (vap->iv_opmode == IEEE80211_M_IBSS)
+   ieee80211_draintask(ic, &uvp->tsf_task_adhoc);
ieee80211_vap_detach(vap);
free(uvp, M_80211_VAP);
}
@@ -1611,8 +1621,50 @@ urtwn_tx_beacon(struct urtwn_softc *sc,
}

static void
+urtwn_tsf_task_adhoc(void *arg, int pending)
+{
+   struct ieee80211vap *vap = arg;
+   struct urtwn_softc *sc = vap->iv_ic->ic_softc;
+   struct ieee80211_node *ni;
+   uint32_t reg;
+
+   URTWN_LOCK(sc);
+   ni = ieee80211_ref_node(vap->iv_bss);
+   reg = urtwn_read_1(sc, R92C_BCN_CTRL);
+
+   /* Accept beacons with the same BSSID. */
+   urtwn_set_rx_bssid_all(sc, 0);
+
+   /* Enable synchronization. */
+   reg &= ~R92C_BCN_CTRL_DIS_TSF_UDT0;
+   urtwn_write_1(sc, R92C_BCN_CTRL, reg);
+
+   /* Synchronize. */
+   usb_pause_mtx(&sc->sc_mtx, hz * ni->ni_intval * 5 / 1000);
+
+   /* Disable synchronization. */
+   reg |= R92C_BCN_CTRL_DIS_TSF_UDT0;
+   urtwn_write_1(sc, R92C_BCN_CTRL, reg);
+
+   /* Remove beacon filter. */
+   urtwn_set_rx_bssid_all(sc, 1);
+
+   /* Enable beaconing. */
+   urtwn_write_1(sc, R92C_MBID_NUM,
+   urtwn_read_1(sc, R92C_MBID_NUM) | R92C_MBID_TXBCN_RPT0);
+   reg |= R92C_BCN_CTRL_EN_BCN;
+
+   urtwn_write_1(sc, R92C_BCN_CTRL, reg);
+   ieee80211_free_node(ni);
+   URTWN_UNLOCK(sc);
+}
+
+static void
urtwn_tsf_sync_enable(str

svn commit: r290689 - head/sbin/init

2015-11-11 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Nov 11 23:00:57 2015
New Revision: 290689
URL: https://svnweb.freebsd.org/changeset/base/290689

Log:
  Fix resource leaks in error cases.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sbin/init/init.c

Modified: head/sbin/init/init.c
==
--- head/sbin/init/init.c   Wed Nov 11 18:56:21 2015(r290688)
+++ head/sbin/init/init.c   Wed Nov 11 23:00:57 2015(r290689)
@@ -659,6 +659,7 @@ read_file(const char *path, void **bufp,
error = fstat(fd, &sb);
if (error != 0) {
emergency("fstat: %s", strerror(errno));
+   close(fd);
return (error);
}
 
@@ -666,12 +667,14 @@ read_file(const char *path, void **bufp,
buf = malloc(bufsize);
if (buf == NULL) {
emergency("malloc: %s", strerror(errno));
+   close(fd);
return (error);
}
 
nbytes = read(fd, buf, bufsize);
if (nbytes != (ssize_t)bufsize) {
emergency("read: %s", strerror(errno));
+   close(fd);
free(buf);
return (error);
}
@@ -690,7 +693,7 @@ read_file(const char *path, void **bufp,
 }
 
 static int
-create_file(const char *path, void *buf, size_t bufsize)
+create_file(const char *path, const void *buf, size_t bufsize)
 {
ssize_t nbytes;
int error, fd;
@@ -704,13 +707,13 @@ create_file(const char *path, void *buf,
nbytes = write(fd, buf, bufsize);
if (nbytes != (ssize_t)bufsize) {
emergency("write: %s", strerror(errno));
+   close(fd);
return (-1);
}
 
error = close(fd);
if (error != 0) {
emergency("close: %s", strerror(errno));
-   free(buf);
return (-1);
}
 
@@ -756,6 +759,9 @@ reroot(void)
size_t bufsize, init_path_len;
int error, name[4];
 
+   buf = NULL;
+   bufsize = 0;
+
name[0] = CTL_KERN;
name[1] = KERN_PROC;
name[2] = KERN_PROC_PATHNAME;
@@ -781,12 +787,6 @@ reroot(void)
}
 
/*
-* Pacify GCC.
-*/
-   buf = NULL;
-   bufsize = 0;
-
-   /*
 * Copy the init binary into tmpfs, so that we can unmount
 * the old rootfs without committing suicide.
 */
@@ -808,6 +808,7 @@ reroot(void)
 
 out:
emergency("reroot failed; going to single user mode");
+   free(buf);
return (state_func_t) single_user;
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290690 - head/share/man/man9

2015-11-11 Thread Randall Stewart
Author: rrs
Date: Wed Nov 11 23:10:09 2015
New Revision: 290690
URL: https://svnweb.freebsd.org/changeset/base/290690

Log:
  Add the MLINK for async_drain Thanks Edward for the pointer.
  
  MFC after:1 month

Modified:
  head/share/man/man9/Makefile

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileWed Nov 11 23:00:57 2015
(r290689)
+++ head/share/man/man9/MakefileWed Nov 11 23:10:09 2015
(r290690)
@@ -1714,6 +1714,7 @@ MLINKS+=time.9 boottime.9 \
time.9 time_uptime.9
 MLINKS+=timeout.9 callout.9 \
timeout.9 callout_active.9 \
+   timeout.9 callout_async_drain.9 \
timeout.9 callout_deactivate.9 \
timeout.9 callout_drain.9 \
timeout.9 callout_handle_init.9 \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290691 - head/share/mk

2015-11-11 Thread Bryan Drewery
Author: bdrewery
Date: Wed Nov 11 23:52:08 2015
New Revision: 290691
URL: https://svnweb.freebsd.org/changeset/base/290691

Log:
  Move META MODE's HOST_CC/CXX/CPP setting to local.meta.sys.mk, which
  centralizes the handling of CC and HOST_CC.
  
  This fixes a bug with WITH_CCACHE_BUILD when using MACHINE=host since
  CC is overridden in local.init.mk via src.opts.mk long before bsd.compiler.mk
  is included.
  
  Originally the ccache implementation was placed in local.init.mk but moved
  to bsd.compiler.mk as it seemed more proper and avoided other ordering
  issues.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/local.init.mk
  head/share/mk/local.meta.sys.mk

Modified: head/share/mk/local.init.mk
==
--- head/share/mk/local.init.mk Wed Nov 11 23:10:09 2015(r290690)
+++ head/share/mk/local.init.mk Wed Nov 11 23:52:08 2015(r290691)
@@ -29,12 +29,6 @@ CXXFLAGS_LAST+= -I/usr/include
 .if ${.MAKE.DEPENDFILE:E} != "host"
 UPDATE_DEPENDFILE?= no
 .endif
-HOST_CC?=  /usr/bin/cc
-CC=${HOST_CC}
-HOST_CXX?= /usr/bin/c++
-CXX=   ${HOST_CXX}
-HOST_CPP?= /usr/bin/cpp
-CPP=   ${HOST_CPP}
 HOST_CFLAGS+= -DHOSTPROG
 CFLAGS+= ${HOST_CFLAGS}
 .endif

Modified: head/share/mk/local.meta.sys.mk
==
--- head/share/mk/local.meta.sys.mk Wed Nov 11 23:10:09 2015
(r290690)
+++ head/share/mk/local.meta.sys.mk Wed Nov 11 23:52:08 2015
(r290691)
@@ -218,6 +218,15 @@ CPP?=  ${HOST_CPP}
 .endif
 .endif
 
+.if ${MACHINE} == "host"
+HOST_CC?=  /usr/bin/cc
+CC=${HOST_CC}
+HOST_CXX?= /usr/bin/c++
+CXX=   ${HOST_CXX}
+HOST_CPP?= /usr/bin/cpp
+CPP=   ${HOST_CPP}
+.endif
+
 .if ${MACHINE:Nhost:Ncommon} != "" && ${MACHINE} != ${HOST_MACHINE}
 # cross-building
 .if !defined(FREEBSD_REVISION)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290692 - head/sys/arm/conf

2015-11-11 Thread Warner Losh
Author: imp
Date: Thu Nov 12 00:26:47 2015
New Revision: 290692
URL: https://svnweb.freebsd.org/changeset/base/290692

Log:
  Revisit this old board with 64MB of RAM. Comment out usb entirely,
  since it isn't used for my application. Add back the md device since
  it's needed for NanoBSD support. Add in many of the small memory
  footprint options from the access points.
  
  With these changes we go from having ~8MB to having ~20MB free,
  though free + inactive only goes from ~35MB to ~42MB. We can
  also boot a nanobsd image mostly (I had to hand tweak what was
  built to represent the final goal).
  
  Move the FDT stuff to the top. We're almost ready to pull the trigger
  to moving over to FDT, but something in the MCI driver is freaking out
  when we do and that needs fixing first.

Modified:
  head/sys/arm/conf/SAM9260EK

Modified: head/sys/arm/conf/SAM9260EK
==
--- head/sys/arm/conf/SAM9260EK Wed Nov 11 23:52:08 2015(r290691)
+++ head/sys/arm/conf/SAM9260EK Thu Nov 12 00:26:47 2015(r290692)
@@ -24,6 +24,15 @@ identSAM9260EK
 include"std.arm"
 include"../at91/std.sam9260ek"
 
+# Coming soon, but not yet
+#options   FDT
+#options   FDT_DTB_STATIC
+#makeoptions   FDT_DTS_FILE=sam9260ek.dts
+
+optionsEARLY_PRINTF
+optionsSOCDEV_PA=0xfc00
+optionsSOCDEV_VA=0xdc00
+
 # To statically compile in device wiring instead of /boot/device.hints
 hints  "SAM9260EK.hints"
 
@@ -92,13 +101,14 @@ optionsPRINTF_BUFR_SIZE=128# Prevent 
 #options   BOOTP_NFSROOT
 #options   BOOTP_COMPAT
 #options   BOOTP_NFSV3
-#options   BOOTP_WIRED_TO=ate0
+#options   BOOTP_WIRED_TO=macb0
 
 # alternatively, boot from a MMC/SD memory card
-#options   ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\"
+# s1 is FAT on this platform.
+optionsROOTDEVNAME=\"ufs:/dev/mmcsd0s2a\"
 
 # Alternatively, boot from a USB card.
-optionsROOTDEVNAME=\"ufs:/dev/da0s1a\"
+#options   ROOTDEVNAME=\"ufs:/dev/da0s1a\"
 
 # kernel/memory size reduction
 optionsMUTEX_NOINLINE
@@ -114,7 +124,7 @@ device  bpf # Berkeley 
packet filter
 
 # Ethernet
 device mii # Minimal MII support
-device ate # Atmel AT91 Ethernet driver
+device macb# Atmel AT91 Ethernet driver
 
 # I2C
 device at91_twi# Atmel AT91 Two-wire Interface
@@ -145,18 +155,18 @@ devicerandom  # Entropy device
 device ether   # Ethernet support
 #devicevlan# 802.1Q VLAN support
 #devicetun # Packet tunnel.
-#devicemd  # Memory "disks"
+device md  # Memory "disks"
 #devicegif # IPv6 and IPv4 tunneling
 #devicefirmware# firmware assist module
 
 # SCSI peripherals
-device scbus   # SCSI bus (required for ATA/SCSI)
+#devicescbus   # SCSI bus (required for 
ATA/SCSI)
 #devicech  # SCSI media changers
-device da  # Direct Access (disks)
+#deviceda  # Direct Access (disks)
 #devicesa  # Sequential Access (tape etc)
-device cd  # CD/DVD
-device pass# Passthrough device (direct ATA/SCSI 
access)
-device ses # Enclosure Services (SES and SAF-TE)
+#devicecd  # CD/DVD
+#devicepass# Passthrough device (direct 
ATA/SCSI access)
+#deviceses # Enclosure Services (SES and 
SAF-TE)
 #devicectl # CAM Target Layer
 
 # Serial (COM) ports
@@ -165,9 +175,9 @@ options ALT_BREAK_TO_DEBUGGER
 
 # USB support
 #options   USB_DEBUG   # enable debug msgs
-device ohci# OHCI USB interface
-device usb # USB Bus (required)
-device umass   # Disks/Mass storage - Requires scbus 
and da
+#deviceohci# OHCI USB interface
+#deviceusb # USB Bus (required)
+#deviceumass   # Disks/Mass storage - Requires 
scbus and da
 
 # watchdog
 device at91_wdt# Atmel AT91 Watchdog Timer
@@ -175,11 +185,18 @@ deviceat91_wdt# Atmel AT91 
Watchdog 
 # NAND Flash - Reference design has Samsung 256MB but others possible
 device nand# NAND interface on CS3
 
-# Com

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

2015-11-11 Thread Devin Teske
Author: dteske
Date: Thu Nov 12 00:30:33 2015
New Revision: 290693
URL: https://svnweb.freebsd.org/changeset/base/290693

Log:
  Add support for "rc.conf.d" file(s).
  
  Differential Revision:https://reviews.freebsd.org/D3551
  Reviewed by:  allanjude
  MFC after:1 week
  X-MFC-to: stable/10
  X-MFC-with:   290337
  Relnotes: yes

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

Modified: head/usr.sbin/bsdconfig/share/sysrc.subr
==
--- head/usr.sbin/bsdconfig/share/sysrc.subrThu Nov 12 00:26:47 2015
(r290692)
+++ head/usr.sbin/bsdconfig/share/sysrc.subrThu Nov 12 00:30:33 2015
(r290693)
@@ -1,6 +1,6 @@
 if [ ! "$_SYSRC_SUBR" ]; then _SYSRC_SUBR=1
 #
-# Copyright (c) 2006-2012 Devin Teske
+# Copyright (c) 2006-2015 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -204,6 +204,100 @@ f_sysrc_get()
)
 }
 
+# f_sysrc_service_configs [-a|-p] $name [$var_to_set]
+#
+# Get a list of optional `rc.conf.d' entries sourced by system `rc.d' script
+# $name (see rc.subr(8) for additional information on `rc.conf.d'). If $name
+# exists in `/etc/rc.d' or $local_startup directories and is an rc(8) script
+# the result is a space separated list of `rc.conf.d' entries sourced by the
+# $name `rc.d' script. Otherwise, if $name exists as a binary `rc.d' script,
+# the result is ``/etc/rc.conf.d/$name /usr/local/etc/rc.conf.d/$name''. The
+# result is NULL if $name does not exist.
+#
+# If $var_to_set is missing or NULL, output is to standard out. Returns success
+# if $name was found, failure otherwise.
+#
+# If `-a' flag is given and $var_to_set is non-NULL, append result to value of
+# $var_to_set rather than overwriting current contents.
+#
+# If `-p' flag is given and $var_to_set is non-NULL, prepend result to value of
+# $var_to_set rather than overwriting current contents.
+#
+# NB: The `-a' and `-p' option flags are mutually exclusive.
+#
+f_sysrc_service_configs()
+{
+   local OPTIND=1 OPTARG __flag __append= __prepend=
+   local __local_startup __dir __spath __stype __names=
+
+   while getopts ap __flag; do
+   case "$__flag" in
+   a) __append=1 __prepend= ;;
+   p) __prepend=1 __append= ;;
+   esac
+   done
+   shift $(( $OPTIND - 1 ))
+
+   [ $# -gt 0 ] || return $FAILURE
+   local __sname="$1" __var_to_set="$2"
+
+   __local_startup=$( f_sysrc_get local_startup )
+   for __dir in /etc/rc.d $__local_startup; do
+   __spath="$__dir/$__sname"
+   [ -f "$__spath" -a -x "$__spath" ] || __spath= continue
+   break
+   done
+   [ "$__spath" ] || return $FAILURE
+
+   __stype=$( file -b "$__spath" 2> /dev/null )
+   case "$__stype" in
+   *"shell script"*)
+   __names=$( exec 9<&1 1>&- 2>&-
+   last_name=
+   print_name() {
+   local name="$1"
+   [ "$name" = "$last_name" ] && return
+   echo "$name" >&9
+   last_name="$name"
+   }
+   eval "$( awk '{
+   gsub(/load_rc_config /, "print_name ")
+   gsub(/run_rc_command /, ": ")
+   print
+   }' "$__spath" )"
+   ) ;;
+   *)
+   __names="$__sname"
+   esac
+
+   local __name __test_path __configs=
+   for __name in $__names; do
+   for __dir in /etc/rc.d $__local_startup; do
+   __test_path="${__dir%/rc.d}/rc.conf.d/$__name"
+   [ -d "$__test_path" ] ||
+   __configs="$__configs $__test_path" continue
+   for __test_path in "$__test_path"/*; do
+   [ -f "$__test_path" ] || continue
+   __configs="$__configs $__test_path"
+   done
+   done
+   done
+   __configs="${__configs# }"
+
+   if [ "$__var_to_set" ]; then
+   local __cur=
+   [ "$__append" -o "$__prepend" ] &&
+   f_getvar "$__var_to_set" __cur
+   [ "$__append"  ] && __configs="$__cur{$__cur:+ }$__configs"
+   [ "$__prepend" ] && __configs="$__configs${__cur:+ }$__cur"
+   setvar "$__var_to_set" "$__configs"
+   else
+   echo "$__configs"
+   fi
+
+   return $SUCCESS
+}
+
 # f_sysrc_get_default $varname
 #
 # Get a system configuration default setting from the default rc.conf(5) file
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, se

svn commit: r290697 - head/contrib/tzdata

2015-11-11 Thread Edwin Groothuis
Author: edwin
Date: Thu Nov 12 03:25:04 2015
New Revision: 290697
URL: https://svnweb.freebsd.org/changeset/base/290697

Log:
  MFV of 290695,tzdata2015g
  
  Update to tzdata2015g:
  
  Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.
  
  Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.
  
  Fiji's 2016 fall-back transition is scheduled for January 17, not 24.
  
  Fort Nelson, British Columbia will not fall back on 2015-11-01.  It has
  effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
  New zone America/Fort_Nelson.

Modified:
  head/contrib/tzdata/asia
  head/contrib/tzdata/australasia
  head/contrib/tzdata/europe
  head/contrib/tzdata/northamerica
  head/contrib/tzdata/zone.tab
  head/contrib/tzdata/zone1970.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/asia
==
--- head/contrib/tzdata/asiaThu Nov 12 03:24:12 2015(r290696)
+++ head/contrib/tzdata/asiaThu Nov 12 03:25:04 2015(r290697)
@@ -131,7 +131,8 @@ ZoneAsia/Yerevan2:58:00 -   LMT 1924 May
 # Azerbaijan
 # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):
 # According to the resolution of Cabinet of Ministers, 1997
-# Resolution available at: http://aif.az/docs/daylight_res.pdf
+# From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17).
+# http://code.az/files/daylight_res.pdf
 # Rule NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
 Rule   Azer1997max -   Mar lastSun  4:00   1:00S
 Rule   Azer1997max -   Oct lastSun  5:00   0   -
@@ -1717,11 +1718,12 @@ RuleROK 19871988-   Oct Sun>=8  
3:000   S
 # the 8:30 time zone on August 15, one example:
 # http://www.bbc.com/news/world-asia-33815049
 #
-# From Paul Eggert (2015-08-07):
-# No transition time is specified; assume 00:00.
+# From Paul Eggert (2015-08-15):
+# Bells rang out midnight (00:00) Friday as part of the celebrations.  See:
+# Talmadge E. North Korea celebrates new time zone, 'Pyongyang Time'
+# 
http://news.yahoo.com/north-korea-celebrates-time-zone-pyongyang-time-164038128.html
 # There is no common English-language abbreviation for this time zone.
-# Use %z rather than invent one.  We can't assume %z works everywhere yet,
-# so for now substitute its output manually.
+# Use KST, as that's what we already use for 1954-1961 in ROK.
 
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone   Asia/Seoul  8:27:52 -   LMT 1908 Apr  1
@@ -1735,7 +1737,7 @@ Zone  Asia/Pyongyang  8:23:00 -   LMT 1908 A
8:30-   KST 1912 Jan  1
9:00-   JCST1937 Oct  1
9:00-   JST 1945 Aug 24
-   9:00-   KST 2015 Aug 15
+   9:00-   KST 2015 Aug 15 00:00
8:30-   KST
 
 ###

Modified: head/contrib/tzdata/australasia
==
--- head/contrib/tzdata/australasia Thu Nov 12 03:24:12 2015
(r290696)
+++ head/contrib/tzdata/australasia Thu Nov 12 03:25:04 2015
(r290697)
@@ -335,10 +335,17 @@ Zone  Indian/Cocos6:27:40 -   LMT 1900
 # DST will start Nov. 2 this year.
 # 
http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx
 
-# From Paul Eggert (2014-10-20):
+# From a government order dated 2015-08-26 and published as Legal Notice No. 77
+# in the Government of Fiji Gazette Supplement No. 24 (2015-08-28),
+# via Ken Rylander (2015-09-02):
+# the daylight saving period is 1 hour in advance of the standard time
+# commencing at 2.00 am on Sunday 1st November, 2015 and ending at
+# 3.00 am on Sunday 17th January, 2016.
+
+# From Paul Eggert (2015-09-01):
 # For now, guess DST from 02:00 the first Sunday in November to
-# 03:00 the first Sunday on or after January 18.  Although ad hoc, it
-# matches this year's plan and seems more likely to match future
+# 03:00 the third Sunday in January.  Although ad hoc, it matches
+# transitions since late 2014 and seems more likely to match future
 # practice than guessing no DST.
 
 # Rule NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
@@ -351,7 +358,7 @@ RuleFiji2011only-   Mar Sun>=1  
3:000   
 Rule   Fiji20122013-   Jan Sun>=18 3:000   -
 Rule   Fiji2014only-   Jan Sun>=18 2:000   -
 Rule   Fiji2014max -   Nov Sun>=1  2:001:00S
-Rule   Fiji2015max -   Jan Sun>=18 3:000   -
+Rule   F

svn commit: r290703 - head/sys/modules/dtb/imx6

2015-11-11 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Thu Nov 12 03:37:28 2015
New Revision: 290703
URL: https://svnweb.freebsd.org/changeset/base/290703

Log:
  Add riotboard DTB to dtb/imx6

Modified:
  head/sys/modules/dtb/imx6/Makefile

Modified: head/sys/modules/dtb/imx6/Makefile
==
--- head/sys/modules/dtb/imx6/Makefile  Thu Nov 12 03:30:31 2015
(r290702)
+++ head/sys/modules/dtb/imx6/Makefile  Thu Nov 12 03:37:28 2015
(r290703)
@@ -5,6 +5,7 @@ DTS=\
imx6q-cubox-i.dts \
imx6dl-hummingboard.dts \
imx6q-hummingboard.dts \
+   imx6dl-riotboard.dts \
imx6dl-wandboard.dts \
imx6q-wandboard.dts
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r290704 - head/tools/tools/nanobsd

2015-11-11 Thread Warner Losh
Author: imp
Date: Thu Nov 12 05:53:32 2015
New Revision: 290704
URL: https://svnweb.freebsd.org/changeset/base/290704

Log:
  Make the slice names for root configurable. For embedded platforms, we
  need s1 to be a FAT partition, s2 to be the config partition and s3
  and s4 to be the ping-pong upgrade partitions.
  
  NANO_SLICE_ROOT defaults to s1
  NANO_SLICE_ALTROOT defaults to s2
  NANO_SLICE_CFG defaults to s3
  NANO_SLICE_DATA defaults to s4
  
  All can be overridden in the config file. Some basic sanity checking
  is in place, but is no substitute for being careful.

Modified:
  head/tools/tools/nanobsd/defaults.sh   (contents, props changed)

Modified: head/tools/tools/nanobsd/defaults.sh
==
--- head/tools/tools/nanobsd/defaults.shThu Nov 12 03:37:28 2015
(r290703)
+++ head/tools/tools/nanobsd/defaults.shThu Nov 12 05:53:32 2015
(r290704)
@@ -152,6 +152,11 @@ PPLEVEL=3
 # /cfg partition will be ${NANO_LABEL}s3
 # /data partition will be ${NANO_LABEL}s4
 NANO_LABEL=""
+NANO_SLICE_ROOT=s1
+NANO_SLICE_ALTROOT=s2
+NANO_SLICE_CFG=s3
+NANO_SLICE_DATA=s4
+
 
 ###
 # Architecture to build.  Corresponds to TARGET_ARCH in a buildworld.
@@ -410,7 +415,6 @@ setup_nanobsd ( ) (
# link /$d under /conf
# we use hard links so we have them both places.
# the files in /$d will be hidden by the mount.
-   # XXX: configure /$d ramdisk size
mkdir -p conf/base/$d conf/default/$d
find $d -print | cpio -dumpl conf/base/
done
@@ -419,7 +423,7 @@ setup_nanobsd ( ) (
echo "$NANO_RAM_TMPVARSIZE" > conf/base/var/md_size
 
# pick up config files from the special partition
-   echo "mount -o ro /dev/${NANO_DRIVE}s3" > conf/default/etc/remount
+   echo "mount -o ro /dev/${NANO_DRIVE}${NANO_SLICE_CFG}" > 
conf/default/etc/remount
 
# Put /tmp on the /var ramdisk (could be symlink already)
nano_rm -rf tmp
@@ -443,8 +447,8 @@ setup_nanobsd_etc ( ) (
# save config file for scripts
echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
 
-   echo "/dev/${NANO_DRIVE}s1a / ufs ro 1 1" > etc/fstab
-   echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab
+   echo "/dev/${NANO_DRIVE}${NANO_SLICE_ROOT}a / ufs ro 1 1" > etc/fstab
+   echo "/dev/${NANO_DRIVE}${NANO_SLICE_CFG} /cfg ufs rw,noauto 2 2" >> 
etc/fstab
mkdir -p cfg
)
 )
@@ -598,15 +602,15 @@ create_diskimage ( ) (
boot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} 
${NANO_BOOT0CFG} ${MD}
fi
if [ -f ${NANO_WORLDDIR}/boot/boot ]; then
-   bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1
+   bsdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot 
${MD}${NANO_SLICE_ROOT}
else
-   bsdlabel -w ${MD}s1
+   bsdlabel -w ${MD}${NANO_SLICE_ROOT}
fi
-   bsdlabel ${MD}s1
+   bsdlabel ${MD}${NANO_SLICE_ROOT}
 
# Create first image
-   populate_slice /dev/${MD}s1a ${NANO_WORLDDIR} ${MNT} "s1a"
-   mount /dev/${MD}s1a ${MNT}
+   populate_slice /dev/${MD}${NANO_SLICE_ROOT}a ${NANO_WORLDDIR} ${MNT} 
"${NANO_SLICE_ROOT}a"
+   mount /dev/${MD}${NANO_SLICE_ROOT}a ${MNT}
echo "Generating mtree..."
( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree
( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du
@@ -615,26 +619,31 @@ create_diskimage ( ) (
if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then
# Duplicate to second image (if present)
echo "Duplicating to second image..."
-   dd conv=sparse if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k
-   mount /dev/${MD}s2a ${MNT}
+   dd conv=sparse if=/dev/${MD}${NANO_SLICE_ROOT} 
of=/dev/${MD}${NANO_SLICE_ALTROOT} bs=64k
+   mount /dev/${MD}${NANO_SLICE_ALTROOT}a ${MNT}
for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab
do
-   sed -i "" "s=${NANO_DRIVE}s1=${NANO_DRIVE}s2=g" $f
+   sed -i "" 
"s=${NANO_DRIVE}${NANO_SLICE_ROOT}=${NANO_DRIVE}${NANO_SLICE_ALTROOT}=g" $f
done
nano_umount ${MNT}
# Override the label from the first partition so we
# don't confuse glabel with duplicates.
if [ ! -z ${NANO_LABEL} ]; then
-   tunefs -L ${NANO_LABEL}"s2a" /dev/${MD}s2a
+   tunefs -L ${NANO_LABEL}"${NANO_SLICE_ALTROOT}a" 
/dev/${MD}${NANO_SLICE_ALTROOT}a
fi
fi

# Create Config slice
-   populate_cfg_slice /dev/${MD}s3 "${NANO_CFGDIR}" ${MNT} "s3"
+   populate_cfg_slice /dev/${MD}${NANO_SLICE_CFG} "${NANO_CFGDIR}" ${MNT} 
"${NANO_SLICE_CFG}"
 
# Create D