Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2014 09:24:32 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r274420 - in projects/sendfile: cddl/contrib/opensolaris/cmd/zfs contrib/libxo contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved sys/arm/broadcom/bcm2835 sys/a...
Message-ID:  <201411120924.sAC9OWKv060083@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Nov 12 09:24:32 2014
New Revision: 274420
URL: https://svnweb.freebsd.org/changeset/base/274420

Log:
  Merge head r258543 through r274419.

Modified:
  projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  projects/sendfile/contrib/libxo/README.md
  projects/sendfile/contrib/libxo/configure.ac
  projects/sendfile/contrib/libxo/libxo/libxo.c
  projects/sendfile/contrib/libxo/libxo/xoconfig.h
  projects/sendfile/contrib/libxo/libxo/xoversion.h
  projects/sendfile/contrib/libxo/tests/core/Makefile.am
  projects/sendfile/contrib/libxo/tests/core/saved/test_07.J.out
  projects/sendfile/contrib/libxo/tests/core/saved/test_07.JP.out
  projects/sendfile/contrib/libxo/tests/core/saved/test_07.X.out
  projects/sendfile/contrib/libxo/tests/core/saved/test_07.XP.out
  projects/sendfile/contrib/libxo/tests/core/test_07.c
  projects/sendfile/sys/arm/broadcom/bcm2835/bcm2835_bsc.c
  projects/sendfile/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
  projects/sendfile/sys/arm/freescale/imx/imx_iomux.c
  projects/sendfile/sys/boot/common/load_elf.c
  projects/sendfile/sys/cam/scsi/scsi_all.c
  projects/sendfile/sys/compat/freebsd32/freebsd32_misc.c
  projects/sendfile/sys/dev/fdt/fdt_pinctrl.c
  projects/sendfile/sys/kern/uipc_syscalls.c
  projects/sendfile/usr.bin/mkimg/image.c
  projects/sendfile/usr.bin/w/w.c
  projects/sendfile/usr.sbin/i2c/i2c.c
Directory Properties:
  projects/sendfile/   (props changed)
  projects/sendfile/cddl/   (props changed)
  projects/sendfile/cddl/contrib/opensolaris/   (props changed)
  projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/   (props changed)
  projects/sendfile/sys/   (props changed)
  projects/sendfile/sys/boot/   (props changed)
  projects/sendfile/usr.bin/mkimg/   (props changed)

Modified: projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==============================================================================
--- projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Wed Nov 12 09:24:32 2014	(r274420)
@@ -27,10 +27,11 @@
 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
 .\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
 .\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
+.\" Copyright (c) 2014, The FreeBSD Foundation, All Rights Reserved.
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 10, 2014
+.Dd November 12, 2014
 .Dt ZFS 8
 .Os
 .Sh NAME
@@ -1791,7 +1792,7 @@ descendent file systems.
 Recursively destroy all clones of these snapshots, including the clones,
 snapshots, and children.
 If this flag is specified, the
-.Op fl d
+.Fl d
 flag will have no effect.
 .It Fl n
 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in

Modified: projects/sendfile/contrib/libxo/README.md
==============================================================================
--- projects/sendfile/contrib/libxo/README.md	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/README.md	Wed Nov 12 09:24:32 2014	(r274420)
@@ -60,3 +60,5 @@ option: 
 View the beautiful documentation at:
 
 http://juniper.github.io/libxo/libxo-manual.html
+
+[![Analytics](https://ga-beacon.appspot.com/UA-56056421-1/Juniper/libxo/Readme)](https://github.com/Juniper/libxo)

Modified: projects/sendfile/contrib/libxo/configure.ac
==============================================================================
--- projects/sendfile/contrib/libxo/configure.ac	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/configure.ac	Wed Nov 12 09:24:32 2014	(r274420)
@@ -12,7 +12,7 @@
 #
 
 AC_PREREQ(2.2)
-AC_INIT([libxo], [0.1.4], [phil@juniper.net])
+AC_INIT([libxo], [0.1.5], [phil@juniper.net])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
 
 # Support silent build rules.  Requires at least automake-1.11.

Modified: projects/sendfile/contrib/libxo/libxo/libxo.c
==============================================================================
--- projects/sendfile/contrib/libxo/libxo/libxo.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/libxo/libxo.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -79,7 +79,7 @@ struct xo_handle_s {
     unsigned short xo_indent;	/* Indent level (if pretty) */
     unsigned short xo_indent_by; /* Indent amount (tab stop) */
     xo_write_func_t xo_write;	/* Write callback */
-    xo_close_func_t xo_close;	/* Clo;se callback */
+    xo_close_func_t xo_close;	/* Close callback */
     xo_formatter_t xo_formatter; /* Custom formating function */
     xo_checkpointer_t xo_checkpointer; /* Custom formating support function */
     void *xo_opaque;		/* Opaque data for write function */
@@ -1912,6 +1912,7 @@ xo_format_string (xo_handle_t *xop, xo_b
 		  xo_format_t *xfp)
 {
     static char null[] = "(null)";
+
     char *cp = NULL;
     wchar_t *wcp = NULL;
     int len, cols = 0, rc = 0;
@@ -1922,16 +1923,33 @@ xo_format_string (xo_handle_t *xop, xo_b
     if (xo_check_conversion(xop, xfp->xf_enc, need_enc))
 	return 0;
 
+    len = xfp->xf_width[XF_WIDTH_SIZE];
+
     if (xfp->xf_enc == XF_ENC_WIDE) {
 	wcp = va_arg(xop->xo_vap, wchar_t *);
 	if (xfp->xf_skip)
 	    return 0;
 
+	/*
+	 * Dont' deref NULL; use the traditional "(null)" instead
+	 * of the more accurate "who's been a naughty boy, then?".
+	 */
+	if (wcp == NULL) {
+	    cp = null;
+	    len = sizeof(null) - 1;
+	}
+
     } else {
 	cp = va_arg(xop->xo_vap, char *); /* UTF-8 or native */
 	if (xfp->xf_skip)
 	    return 0;
 
+	/* Echo "Dont' deref NULL" logic */
+	if (cp == NULL) {
+	    cp = null;
+	    len = sizeof(null) - 1;
+	}
+
 	/*
 	 * Optimize the most common case, which is "%s".  We just
 	 * need to copy the complete string to the output buffer.
@@ -1957,17 +1975,6 @@ xo_format_string (xo_handle_t *xop, xo_b
 	}
     }
 
-    len = xfp->xf_width[XF_WIDTH_SIZE];
-
-    /*
-     * Dont' deref NULL; use the traditional "(null)" instead
-     * of the more accurate "who's been a naughty boy, then?".
-     */
-    if (cp == NULL && wcp == NULL) {
-	cp = null;
-	len = sizeof(null) - 1;
-    }
-
     cols = xo_format_string_direct(xop, xbp, flags, wcp, cp, len,
 				   xfp->xf_width[XF_WIDTH_MAX],
 				   need_enc, xfp->xf_enc);
@@ -3859,7 +3866,7 @@ xo_close_list_h (xo_handle_t *xop, const
     rc = xo_printf(xop, "%s%*s]", pre_nl, xo_indent(xop), "");
     xop->xo_stack[xop->xo_depth].xs_flags |= XSF_NOT_FIRST;
 
-    return 0;
+    return rc;
 }
 
 int

Modified: projects/sendfile/contrib/libxo/libxo/xoconfig.h
==============================================================================
--- projects/sendfile/contrib/libxo/libxo/xoconfig.h	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/libxo/xoconfig.h	Wed Nov 12 09:24:32 2014	(r274420)
@@ -158,7 +158,7 @@
 #define PACKAGE_NAME "libxo"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libxo 0.1.4"
+#define PACKAGE_STRING "libxo 0.1.5"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "libxo"
@@ -167,7 +167,7 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.1.4"
+#define PACKAGE_VERSION "0.1.5"
 
 /* If using the C implementation of alloca, define if you know the
    direction of stack growth for your system; otherwise it will be
@@ -181,7 +181,7 @@
 #define STDC_HEADERS 1
 
 /* Version number of package */
-#define VERSION "0.1.4"
+#define VERSION "0.1.5"
 
 /* Define to `__inline__' or `__inline' if that's what the C compiler
    calls it, or to nothing if 'inline' is not supported under any name.  */

Modified: projects/sendfile/contrib/libxo/libxo/xoversion.h
==============================================================================
--- projects/sendfile/contrib/libxo/libxo/xoversion.h	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/libxo/xoversion.h	Wed Nov 12 09:24:32 2014	(r274420)
@@ -18,7 +18,7 @@
 /**
  * The version string
  */
-#define LIBXO_VERSION		"0.1.4"
+#define LIBXO_VERSION		"0.1.5"
 
 /**
  * The version number

Modified: projects/sendfile/contrib/libxo/tests/core/Makefile.am
==============================================================================
--- projects/sendfile/contrib/libxo/tests/core/Makefile.am	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/tests/core/Makefile.am	Wed Nov 12 09:24:32 2014	(r274420)
@@ -30,7 +30,7 @@ test_07_test_SOURCES = test_07.c
 
 # TEST_CASES := $(shell cd ${srcdir} ; echo *.c )
 
-bin_PROGRAMS = ${TEST_CASES:.c=.test}
+noinst_PROGRAMS = ${TEST_CASES:.c=.test}
 
 LDADD = \
     ${top_builddir}/libxo/libxo.la
@@ -66,7 +66,7 @@ valgrind:
 
 TEST_ONE = \
   LIBXO_OPTIONS=:W$$fmt \
-      ${CHECKER} $$base.test ${TEST_OPTS} \
+      ${CHECKER} ./$$base.test ${TEST_OPTS} \
       > out/$$base.$$fmt.out 2> out/$$base.$$fmt.err ; \
  ${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.out out/$$base.$$fmt.out ${S2O} ; \
  ${DIFF} -Nu ${srcdir}/saved/$$base.$$fmt.err out/$$base.$$fmt.err ${S2O}

Modified: projects/sendfile/contrib/libxo/tests/core/saved/test_07.J.out
==============================================================================
--- projects/sendfile/contrib/libxo/tests/core/saved/test_07.J.out	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/tests/core/saved/test_07.J.out	Wed Nov 12 09:24:32 2014	(r274420)
@@ -1,2 +1,2 @@
-{"employees": {"v1":"γιγνώσκειν","v2":"ὦ ἄνδρες ᾿Αθηναῖοι","columns":28,"columns":2,"v1":"ახლავე გაიაროთ რეგისტრაცია","v2":"Unicode-ის მეათე საერთაშორისო","columns":55, "employee": ["columns":0, {"first-name":"Jim","nic-name":"\"რეგტ\"","last-name":"გთხოვთ ახ","department":431,"percent-time":90,"columns":23,"benefits":"full"}, {"first-name":"Terry","nic-name":"\"<one\"","last-name":"Οὐχὶ ταὐτὰ παρίσταταί μοι Jones","department":660,"percent-time":90,"columns":47,"benefits":"full"}, {"first-name":"Leslie","nic-name":"\"Les\"","last-name":"Patterson","department":341,"percent-time":60,"columns":25,"benefits":"full"}, {"first-name":"Ashley","nic-name":"\"Ash\"","last-name":"Meter & Smith","department":1440,"percent-time":40,"columns":30}, {"first-name":"0123456789","nic-name":"\"0123456789\"","last-name":"01234567890123
 4567890","department":1440,"percent-time":40,"columns":49}, {"first-name":"ახლა","nic-name":"\"გაიარო\"","last-name":"საერთაშორისო","department":123,"percent-time":90,"columns":29,"benefits":"full"}]}
+{"employees": {"test": [{"filename":"(null)"}],"v1":"γιγνώσκειν","v2":"ὦ ἄνδρες ᾿Αθηναῖοι","columns":28,"columns":2,"v1":"ახლავე გაიაროთ რეგისტრაცია","v2":"Unicode-ის მეათე საერთაშორისო","columns":55, "employee": ["columns":0, {"first-name":"Jim","nic-name":"\"რეგტ\"","last-name":"გთხოვთ ახ","department":431,"percent-time":90,"columns":23,"benefits":"full"}, {"first-name":"Terry","nic-name":"\"<one\"","last-name":"Οὐχὶ ταὐτὰ παρίσταταί μοι Jones","department":660,"percent-time":90,"columns":47,"benefits":"full"}, {"first-name":"Leslie","nic-name":"\"Les\"","last-name":"Patterson","department":341,"percent-time":60,"columns":25,"benefits":"full"}, {"first-name":"Ashley","nic-name":"\"Ash\"","last-name":"Meter & Smith","department":1440,"percent-time":40,"columns":30}, {"first-name":"0123456789","nic-name":"\"012345678
 9\"","last-name":"012345678901234567890","department":1440,"percent-time":40,"columns":49}, {"first-name":"ახლა","nic-name":"\"გაიარო\"","last-name":"საერთაშორისო","department":123,"percent-time":90,"columns":29,"benefits":"full"}]}
 }

Modified: projects/sendfile/contrib/libxo/tests/core/saved/test_07.JP.out
==============================================================================
--- projects/sendfile/contrib/libxo/tests/core/saved/test_07.JP.out	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/tests/core/saved/test_07.JP.out	Wed Nov 12 09:24:32 2014	(r274420)
@@ -1,5 +1,10 @@
 {
   "employees": {
+    "test": [
+      {
+        "filename": "(null)"
+      }
+    ],
     "v1": "γιγνώσκειν",
     "v2": "ὦ ἄνδρες ᾿Αθηναῖοι",
     "columns": 28,

Modified: projects/sendfile/contrib/libxo/tests/core/saved/test_07.X.out
==============================================================================
--- projects/sendfile/contrib/libxo/tests/core/saved/test_07.X.out	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/tests/core/saved/test_07.X.out	Wed Nov 12 09:24:32 2014	(r274420)
@@ -1 +1 @@
-<employees><v1>γιγνώσκειν</v1><v2>ὦ ἄνδρες ᾿Αθηναῖοι</v2><columns>28</columns><columns>2</columns><v1>ახლავე გაიაროთ რეგისტრაცია</v1><v2>Unicode-ის მეათე საერთაშორისო</v2><columns>55</columns><columns>0</columns><employee><first-name>Jim</first-name><nic-name>"რეგტ"</nic-name><last-name>გთხოვთ ახ</last-name><department>431</department><percent-time>90</percent-time><columns>23</columns><benefits full-time="honest &amp; for true">full</benefits></employee><employee><first-name>Terry</first-name><nic-name>"&lt;one"</nic-name><last-name>Οὐχὶ ταὐτὰ παρίσταταί μοι Jones</last-name><department>660</department><percent-time>90</percent-time><columns>47</columns><benefits full-time="honest &amp; for true">full</benefits></employee><employee><first-name>Leslie</first-name><nic-name>"Les"</nic-name><last-name>Patterson</last-n
 ame><department>341</department><percent-time>60</percent-time><columns>25</columns><benefits full-time="honest &amp; for true">full</benefits></employee><employee><first-name>Ashley</first-name><nic-name>"Ash"</nic-name><last-name>Meter &amp; Smith</last-name><department>1440</department><percent-time>40</percent-time><columns>30</columns></employee><employee><first-name>0123456789</first-name><nic-name>"0123456789"</nic-name><last-name>012345678901234567890</last-name><department>1440</department><percent-time>40</percent-time><columns>49</columns></employee><employee><first-name>ახლა</first-name><nic-name>"გაიარო"</nic-name><last-name>საერთაშორისო</last-name><department>123</department><percent-time>90</percent-time><columns>29</columns><benefits full-time="honest &amp; for true">full</benefits></employee></employees>
\ No newline at end of file
+<employees><test><filename>(null)</filename></test><v1>γιγνώσκειν</v1><v2>ὦ ἄνδρες ᾿Αθηναῖοι</v2><columns>28</columns><columns>2</columns><v1>ახლავე გაიაროთ რეგისტრაცია</v1><v2>Unicode-ის მეათე საერთაშორისო</v2><columns>55</columns><columns>0</columns><employee><first-name>Jim</first-name><nic-name>"რეგტ"</nic-name><last-name>გთხოვთ ახ</last-name><department>431</department><percent-time>90</percent-time><columns>23</columns><benefits full-time="honest &amp; for true">full</benefits></employee><employee><first-name>Terry</first-name><nic-name>"&lt;one"</nic-name><last-name>Οὐχὶ ταὐτὰ παρίσταταί μοι Jones</last-name><department>660</department><percent-time>90</percent-time><columns>47</columns><benefits full-time="honest &amp; for true">full</benefits></employee><employee><first-name>Leslie</first-name><nic-name>"Les
 "</nic-name><last-name>Patterson</last-name><department>341</department><percent-time>60</percent-time><columns>25</columns><benefits full-time="honest &amp; for true">full</benefits></employee><employee><first-name>Ashley</first-name><nic-name>"Ash"</nic-name><last-name>Meter &amp; Smith</last-name><department>1440</department><percent-time>40</percent-time><columns>30</columns></employee><employee><first-name>0123456789</first-name><nic-name>"0123456789"</nic-name><last-name>012345678901234567890</last-name><department>1440</department><percent-time>40</percent-time><columns>49</columns></employee><employee><first-name>ახლა</first-name><nic-name>"გაიარო"</nic-name><last-name>საერთაშორისო</last-name><department>123</department><percent-time>90</percent-time><columns>29</columns><benefits full-time="honest &amp; for true">full</benefits></employee></employees>
\ No newline at end of file

Modified: projects/sendfile/contrib/libxo/tests/core/saved/test_07.XP.out
==============================================================================
--- projects/sendfile/contrib/libxo/tests/core/saved/test_07.XP.out	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/tests/core/saved/test_07.XP.out	Wed Nov 12 09:24:32 2014	(r274420)
@@ -1,4 +1,7 @@
 <employees>
+  <test>
+    <filename>(null)</filename>
+  </test>
   <v1>γιγνώσκειν</v1>
   <v2>ὦ ἄνδρες ᾿Αθηναῖοι</v2>
   <columns>28</columns>

Modified: projects/sendfile/contrib/libxo/tests/core/test_07.c
==============================================================================
--- projects/sendfile/contrib/libxo/tests/core/test_07.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/contrib/libxo/tests/core/test_07.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -52,6 +52,12 @@ main (int argc, char **argv)
 
     xo_open_container("employees");
 
+    xo_open_list("test");
+    xo_open_instance("test");
+    xo_emit("{ek:filename/%s}", NULL);
+    xo_close_instance("test");
+    xo_close_list("test");
+
     rc = xo_emit("Οὐχὶ ταὐτὰ παρίσταταί μοι {:v1/%s}, {:v2/%s}\n",
 	    "γιγνώσκειν", "ὦ ἄνδρες ᾿Αθηναῖοι");
     rc = xo_emit("{:columns/%d}\n", rc);

Modified: projects/sendfile/sys/arm/broadcom/bcm2835/bcm2835_bsc.c
==============================================================================
--- projects/sendfile/sys/arm/broadcom/bcm2835/bcm2835_bsc.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/sys/arm/broadcom/bcm2835/bcm2835_bsc.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -441,7 +441,7 @@ bcm_bsc_transfer(device_t dev, struct ii
 		err = mtx_sleep(dev, &sc->sc_mtx, 0, "bsciow", hz);
 
 		/* Check for errors. */
-		if (err != 0 && (sc->sc_flags & BCM_I2C_ERROR))
+		if (err == 0 && (sc->sc_flags & BCM_I2C_ERROR))
 			err = EIO;
 		if (err != 0)
 			break;

Modified: projects/sendfile/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==============================================================================
--- projects/sendfile/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -84,10 +84,13 @@ __FBSDID("$FreeBSD$");
 /* 
  * Arasan HC seems to have problem with Data CRC on lower frequencies.
  * Use this tunable to cap initialization sequence frequency at higher
- * value. Default is standard 400kHz
+ * value.  Default is standard 400kHz.
+ * HS mode brings too many problems for most of cards, so disable HS mode
+ * until a better fix comes up.
+ * HS mode still can be enabled with the tunable.
  */
 static int bcm2835_sdhci_min_freq = 400000;
-static int bcm2835_sdhci_hs = 1;
+static int bcm2835_sdhci_hs = 0;
 static int bcm2835_sdhci_pio_mode = 0;
 
 TUNABLE_INT("hw.bcm2835.sdhci.min_freq", &bcm2835_sdhci_min_freq);

Modified: projects/sendfile/sys/arm/freescale/imx/imx_iomux.c
==============================================================================
--- projects/sendfile/sys/arm/freescale/imx/imx_iomux.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/sys/arm/freescale/imx/imx_iomux.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -99,6 +99,10 @@ struct pincfg {
 	uint32_t padconf_val;
 };
 
+#define	PADCONF_NONE	(1U << 31)	/* Do not configure pad. */
+#define	PADCONF_SION	(1U << 30)	/* Force SION bit in mux register. */
+#define	PADMUX_SION	(1U <<  4)	/* The SION bit in the mux register. */
+
 static inline uint32_t
 RD4(struct iomux_softc *sc, bus_size_t off)
 {
@@ -120,6 +124,7 @@ iomux_configure_pins(device_t dev, phand
 	struct pincfg *cfgtuples, *cfg;
 	phandle_t cfgnode;
 	int i, ntuples;
+	uint32_t sion;
 
 	sc = device_get_softc(dev);
 	cfgnode = OF_node_from_xref(cfgxref);
@@ -130,9 +135,22 @@ iomux_configure_pins(device_t dev, phand
 	if (ntuples == 0)
 		return (0); /* Empty property is not an error. */
 	for (i = 0, cfg = cfgtuples; i < ntuples; i++, cfg++) {
-		WR4(sc, cfg->mux_reg, cfg->mux_val);
-		WR4(sc, cfg->input_reg, cfg->input_val);
-		WR4(sc, cfg->padconf_reg, cfg->padconf_val);
+		sion = (cfg->padconf_val & PADCONF_SION) ? PADMUX_SION : 0;
+		WR4(sc, cfg->mux_reg, cfg->mux_val | sion);
+		if (cfg->input_reg != 0)
+			WR4(sc, cfg->input_reg, cfg->input_val);
+		if ((cfg->padconf_val & PADCONF_NONE) == 0)
+			WR4(sc, cfg->padconf_reg, cfg->padconf_val);
+		if (bootverbose) {
+			char name[32]; 
+			OF_getprop(cfgnode, "name", &name, sizeof(name));
+			printf("%16s: muxreg 0x%04x muxval 0x%02x "
+			    "inpreg 0x%04x inpval 0x%02x "
+			    "padreg 0x%04x padval 0x%08x\n",
+			    name, cfg->mux_reg, cfg->mux_val | sion,
+			    cfg->input_reg, cfg->input_val,
+			    cfg->padconf_reg, cfg->padconf_val);
+		}
 	}
 	free(cfgtuples, M_OFWPROP);
 	return (0);

Modified: projects/sendfile/sys/boot/common/load_elf.c
==============================================================================
--- projects/sendfile/sys/boot/common/load_elf.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/sys/boot/common/load_elf.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -640,6 +640,14 @@ struct mod_metadata64 {
 	u_int64_t	md_cval;	/* common string label */
 };
 #endif
+#if defined(__amd64__) && __ELF_WORD_SIZE == 32
+struct mod_metadata32 {
+	int		md_version;	/* structure version MDTV_* */  
+	int		md_type;	/* type of entry MDT_* */
+	u_int32_t	md_data;	/* specific data */
+	u_int32_t	md_cval;	/* common string label */
+};
+#endif
 
 int
 __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
@@ -647,6 +655,8 @@ __elfN(parse_modmetadata)(struct preload
     struct mod_metadata md;
 #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64
     struct mod_metadata64 md64;
+#elif defined(__amd64__) && __ELF_WORD_SIZE == 32
+    struct mod_metadata32 md32;
 #endif
     struct mod_depend *mdepend;
     struct mod_version mver;
@@ -682,6 +692,18 @@ __elfN(parse_modmetadata)(struct preload
 	md.md_type = md64.md_type;
 	md.md_cval = (const char *)(uintptr_t)md64.md_cval;
 	md.md_data = (void *)(uintptr_t)md64.md_data;
+#elif defined(__amd64__) && __ELF_WORD_SIZE == 32
+	COPYOUT(v, &md32, sizeof(md32));
+	error = __elfN(reloc_ptr)(fp, ef, v, &md32, sizeof(md32));
+	if (error == EOPNOTSUPP) {
+	    md32.md_cval += ef->off;
+	    md32.md_data += ef->off;
+	} else if (error != 0)
+	    return (error);
+	md.md_version = md32.md_version;
+	md.md_type = md32.md_type;
+	md.md_cval = (const char *)(uintptr_t)md32.md_cval;
+	md.md_data = (void *)(uintptr_t)md32.md_data;
 #else
 	COPYOUT(v, &md, sizeof(md));
 	error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md));

Modified: projects/sendfile/sys/cam/scsi/scsi_all.c
==============================================================================
--- projects/sendfile/sys/cam/scsi/scsi_all.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/sys/cam/scsi/scsi_all.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -1106,13 +1106,13 @@ static struct asc_table_entry asc_table[
 	{ SST(0x04, 0x09, SS_RDEF,	/* XXX TBD */
 	    "Logical unit not ready, self-test in progress") },
 	/* DTLPWROMAEBKVF */
-	{ SST(0x04, 0x0A, SS_RDEF,	/* XXX TBD */
+	{ SST(0x04, 0x0A, SS_TUR | SSQ_MANY | SSQ_DECREMENT_COUNT | ENXIO,
 	    "Logical unit not accessible, asymmetric access state transition")},
 	/* DTLPWROMAEBKVF */
-	{ SST(0x04, 0x0B, SS_RDEF,	/* XXX TBD */
+	{ SST(0x04, 0x0B, SS_FATAL | ENXIO,
 	    "Logical unit not accessible, target port in standby state") },
 	/* DTLPWROMAEBKVF */
-	{ SST(0x04, 0x0C, SS_RDEF,	/* XXX TBD */
+	{ SST(0x04, 0x0C, SS_FATAL | ENXIO,
 	    "Logical unit not accessible, target port in unavailable state") },
 	/*              F */
 	{ SST(0x04, 0x0D, SS_RDEF,	/* XXX TBD */

Modified: projects/sendfile/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- projects/sendfile/sys/compat/freebsd32/freebsd32_misc.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/sys/compat/freebsd32/freebsd32_misc.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -1570,6 +1570,8 @@ freebsd32_do_sendfile(struct thread *td,
 	struct sf_hdtr32 hdtr32;
 	struct sf_hdtr hdtr;
 	struct uio *hdr_uio, *trl_uio;
+	struct file *fp;
+	cap_rights_t rights;
 	struct iovec32 *iov32;
 	off_t offset, sbytes;
 	int error;

Modified: projects/sendfile/sys/dev/fdt/fdt_pinctrl.c
==============================================================================
--- projects/sendfile/sys/dev/fdt/fdt_pinctrl.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/sys/dev/fdt/fdt_pinctrl.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -124,15 +124,14 @@ pinctrl_configure_children(device_t pinc
 		pinctrl_configure_children(pinctrl, node);
 		nconfigs = OF_getencprop_alloc(node, "pinctrl-0", 
 		    sizeof(*configs), (void **)&configs);
-#ifdef DEBUG
-		{
+		if (nconfigs <= 0)
+			continue;
+		if (bootverbose) {
 			char name[32]; 
 			OF_getprop(node, "name", &name, sizeof(name));
-			printf("%d items in pinctrl-0 for %s\n", nconfigs, name);
+			printf("Processing %d pin-config node(s) in pinctrl-0 for %s\n",
+			    nconfigs, name);
 		}
-#endif
-		if (nconfigs <= 0)
-			continue;
 		for (i = 0; i < nconfigs; i++) {
 			if (OF_device_from_xref(configs[i]) == pinctrl)
 				FDT_PINCTRL_CONFIGURE(pinctrl, configs[i]);

Modified: projects/sendfile/sys/kern/uipc_syscalls.c
==============================================================================
--- projects/sendfile/sys/kern/uipc_syscalls.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/sys/kern/uipc_syscalls.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -1967,7 +1967,7 @@ do_sendfile(struct thread *td, struct se
 		}
 	}
 
-	AUDIT_ARG_FD(src_fd);
+	AUDIT_ARG_FD(uap->fd);
 
 	/*
 	 * sendfile(2) can start at any offset within a file so we require

Modified: projects/sendfile/usr.bin/mkimg/image.c
==============================================================================
--- projects/sendfile/usr.bin/mkimg/image.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/usr.bin/mkimg/image.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -405,16 +405,18 @@ image_copyin_mapped(lba_t blk, int fd, u
 	error = 0;
 	while (!error && cur < end) {
 		hole = lseek(fd, cur, SEEK_HOLE);
+		if (hole == -1)
+			hole = end;
 		data = lseek(fd, cur, SEEK_DATA);
+		if (data == -1)
+			data = end;
 
 		/*
 		 * Treat the entire file as data if sparse files
 		 * are not supported by the underlying file system.
 		 */
-		if (hole == -1 && data == -1) {
+		if (hole == end && data == end)
 			data = cur;
-			hole = end;
-		}
 
 		if (cur == hole && data > hole) {
 			hole = pos;

Modified: projects/sendfile/usr.bin/w/w.c
==============================================================================
--- projects/sendfile/usr.bin/w/w.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/usr.bin/w/w.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -509,7 +509,7 @@ pr_header(time_t *nowp, int nusers)
 	}
 
 	/* Print number of users logged in to system */
-	xo_emit(" {:users/%d} user%s", nusers, nusers == 1 ? "" : "s");
+	xo_emit(" {:users/%d} {N:user%s}", nusers, nusers == 1 ? "" : "s");
 
 	/*
 	 * Print 1, 5, and 15 minute load averages.

Modified: projects/sendfile/usr.sbin/i2c/i2c.c
==============================================================================
--- projects/sendfile/usr.sbin/i2c/i2c.c	Wed Nov 12 08:38:38 2014	(r274419)
+++ projects/sendfile/usr.sbin/i2c/i2c.c	Wed Nov 12 09:24:32 2014	(r274420)
@@ -142,6 +142,7 @@ scan_bus(struct iiccmd cmd, char *dev, i
 			if (tokens == NULL) {
 				fprintf(stderr, "Error allocating tokens "
 				    "buffer\n");
+				error = -1;
 				goto out;
 			}
 			index = skip_get_tokens(skip_addr, tokens,
@@ -150,6 +151,7 @@ scan_bus(struct iiccmd cmd, char *dev, i
 
 		if (!no_range && (addr_range.start > addr_range.end)) {
 			fprintf(stderr, "Skip address out of range\n");
+			error = -1;
 			goto out;
 		}
 	}
@@ -409,8 +411,10 @@ i2c_read(char *dev, struct options i2c_o
 		if (i2c_opt.mode == I2C_MODE_STOP_START) {
 			cmd.slave = i2c_opt.addr;
 			error = ioctl(fd, I2CSTOP, &cmd);
-			if (error == -1)
+			if (error == -1) {
+				err_msg = "error sending stop condtion\n";
 				goto err2;
+			}
 		}
 	}
 	cmd.slave = i2c_opt.addr;
@@ -432,8 +436,10 @@ i2c_read(char *dev, struct options i2c_o
 		}
 	}
 	error = ioctl(fd, I2CSTOP, &cmd);
-	if (error == -1)
+	if (error == -1) {
+		err_msg = "error sending stop condtion\n";
 		goto err2;
+	}
 
 	for (i = 0; i < i2c_opt.count; i++) {
 		error = read(fd, &i2c_buf[i], 1);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411120924.sAC9OWKv060083>