svn commit: r291139 - in head/usr.sbin: . uathload

2015-11-21 Thread Warner Losh
Author: imp
Date: Sat Nov 21 16:37:11 2015
New Revision: 291139
URL: https://svnweb.freebsd.org/changeset/base/291139

Log:
  Document why we use -z nonexecstack in the Makefile since it
  is so unusual. Turn off mis-match warnings for building uathload
  because the firmware .o file is produced in a way that we
  can't get to match exactly. This fixes the build on mips,
  so stop excluding it from the build.

Modified:
  head/usr.sbin/Makefile.mips
  head/usr.sbin/uathload/Makefile

Modified: head/usr.sbin/Makefile.mips
==
--- head/usr.sbin/Makefile.mips Sat Nov 21 16:32:14 2015(r291138)
+++ head/usr.sbin/Makefile.mips Sat Nov 21 16:37:11 2015(r291139)
@@ -1,7 +1,3 @@
 # $FreeBSD$
 
 SUBDIR+=   ofwdump
-# uathload broken for n32 and n64 due to toolchain issues, only build for o32
-.if ${MACHINE_ARCH} != "mips" && ${MACHINE_ARCH} != "mipsel"
-SUBDIR.yes:=   ${SUBDIR.yes:Nuathload}
-.endif

Modified: head/usr.sbin/uathload/Makefile
==
--- head/usr.sbin/uathload/Makefile Sat Nov 21 16:32:14 2015
(r291138)
+++ head/usr.sbin/uathload/Makefile Sat Nov 21 16:37:11 2015
(r291139)
@@ -7,10 +7,20 @@ SRCS= uathload.c ar5523.bin
 
 CLEANFILES=ar5523.bin
 
+# It's hard to tag ar5523.o with the proper gnu note saying that it has a
+# non-executable stack, so ld doesn't properly mark his executable as
+# not having an executable stack. Mark it explicitly, but only for those
+# platforms that support his feature (otherwise signals don't work).
+# Note: Newer versions of ld than is in the tree ignore -z.
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} 
== "powerpc" || ${MACHINE_ARCH} == "powerpc64"
 LDFLAGS+=  -Wl,-z,noexecstack
 .endif
 
+# The conversion from .bin to .o doesn't always produce a pedantically correct
+# .o's. And it doesn't matter, so turn off the mismatch warnings since it is
+# pure data. On mips64 here's no easy way to produce a proper .o.
+LDFLAGS+=  -Wl,--no-warn-mismatch
+
 ar5523.bin: ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu
uudecode -p ${.CURDIR}/../../sys/contrib/dev/uath/ar5523.bin.uu > 
${.TARGET}
 
___
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: r291141 - head/sys/netinet

2015-11-21 Thread Michael Tuexen
Author: tuexen
Date: Sat Nov 21 18:21:16 2015
New Revision: 291141
URL: https://svnweb.freebsd.org/changeset/base/291141

Log:
  Fix the handling of IPSec policies in the SCTP stack. At least
  make sure they are not leaked...
  
  MFC after:1 week

Modified:
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_pcb.c
==
--- head/sys/netinet/sctp_pcb.c Sat Nov 21 16:46:59 2015(r291140)
+++ head/sys/netinet/sctp_pcb.c Sat Nov 21 18:21:16 2015(r291141)
@@ -2495,14 +2495,7 @@ sctp_inpcb_alloc(struct socket *so, uint
return (ENOBUFS);
}
 #ifdef IPSEC
-   {
-   struct inpcbpolicy *pcb_sp = NULL;
-
-   error = ipsec_init_policy(so, _sp);
-   /* Arrange to share the policy */
-   inp->ip_inp.inp.inp_sp = pcb_sp;
-   ((struct in6pcb *)(>ip_inp.inp))->in6p_sp = pcb_sp;
-   }
+   error = ipsec_init_policy(so, >ip_inp.inp.inp_sp);
if (error != 0) {
crfree(inp->ip_inp.inp.inp_cred);
SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp);
@@ -2536,6 +2529,9 @@ sctp_inpcb_alloc(struct socket *so, uint
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, 
EOPNOTSUPP);
so->so_pcb = NULL;
crfree(inp->ip_inp.inp.inp_cred);
+#ifdef IPSEC
+   ipsec_delete_pcbpolicy(>ip_inp.inp);
+#endif
SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp);
return (EOPNOTSUPP);
}
@@ -2556,6 +2552,9 @@ sctp_inpcb_alloc(struct socket *so, uint
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, 
ENOBUFS);
so->so_pcb = NULL;
crfree(inp->ip_inp.inp.inp_cred);
+#ifdef IPSEC
+   ipsec_delete_pcbpolicy(>ip_inp.inp);
+#endif
SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp);
return (ENOBUFS);
}
@@ -3640,13 +3639,9 @@ sctp_inpcb_free(struct sctp_inpcb *inp, 
 * macro here since le_next will get freed as part of the
 * sctp_free_assoc() call.
 */
-   if (so) {
 #ifdef IPSEC
-   ipsec_delete_pcbpolicy(ip_pcb);
-#endif /* IPSEC */
-
-   /* Unlocks not needed since the socket is gone now */
-   }
+   ipsec_delete_pcbpolicy(ip_pcb);
+#endif
if (ip_pcb->inp_options) {
(void)sctp_m_free(ip_pcb->inp_options);
ip_pcb->inp_options = 0;

Modified: head/sys/netinet/sctp_usrreq.c
==
--- head/sys/netinet/sctp_usrreq.c  Sat Nov 21 16:46:59 2015
(r291140)
+++ head/sys/netinet/sctp_usrreq.c  Sat Nov 21 18:21:16 2015
(r291141)
@@ -487,11 +487,6 @@ sctp_attach(struct socket *so, int proto
int error;
uint32_t vrf_id = SCTP_DEFAULT_VRFID;
 
-#ifdef IPSEC
-   uint32_t flags;
-
-#endif
-
inp = (struct sctp_inpcb *)so->so_pcb;
if (inp != 0) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, 
EINVAL);
@@ -513,34 +508,6 @@ sctp_attach(struct socket *so, int proto
ip_inp = >ip_inp.inp;
ip_inp->inp_vflag |= INP_IPV4;
ip_inp->inp_ip_ttl = MODULE_GLOBAL(ip_defttl);
-#ifdef IPSEC
-   error = ipsec_init_policy(so, _inp->inp_sp);
-#ifdef SCTP_LOG_CLOSING
-   sctp_log_closing(inp, NULL, 17);
-#endif
-   if (error != 0) {
-try_again:
-   flags = inp->sctp_flags;
-   if (((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) &&
-   (atomic_cmpset_int(>sctp_flags, flags, (flags | 
SCTP_PCB_FLAGS_SOCKET_GONE | SCTP_PCB_FLAGS_CLOSE_IP {
-#ifdef SCTP_LOG_CLOSING
-   sctp_log_closing(inp, NULL, 15);
-#endif
-   SCTP_INP_WUNLOCK(inp);
-   sctp_inpcb_free(inp, SCTP_FREE_SHOULD_USE_ABORT,
-   SCTP_CALLED_AFTER_CMPSET_OFCLOSE);
-   } else {
-   flags = inp->sctp_flags;
-   if ((flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0) {
-   goto try_again;
-   } else {
-   SCTP_INP_WUNLOCK(inp);
-   }
-   }
-   so->so_pcb = NULL;
-   return (error);
-   }
-#endif
SCTP_INP_WUNLOCK(inp);
return (0);
 }
___
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: r291136 - in head/sys: arm/ti/am335x conf

2015-11-21 Thread Andrew Turner
Author: andrew
Date: Sat Nov 21 16:25:03 2015
New Revision: 291136
URL: https://svnweb.freebsd.org/changeset/base/291136

Log:
  Move hdmi_if.m to files.arm so other kernel configs can use it.

Modified:
  head/sys/arm/ti/am335x/files.am335x
  head/sys/conf/files.arm

Modified: head/sys/arm/ti/am335x/files.am335x
==
--- head/sys/arm/ti/am335x/files.am335x Sat Nov 21 16:23:56 2015
(r291135)
+++ head/sys/arm/ti/am335x/files.am335x Sat Nov 21 16:25:03 2015
(r291136)
@@ -17,7 +17,6 @@ arm/ti/am335x/am335x_scm_padconf.cstand
 arm/ti/am335x/am335x_usbss.c   optionalmusb fdt
 arm/ti/am335x/am335x_musb.coptionalmusb fdt
 
-arm/arm/hdmi_if.m  optionalhdmi
 arm/ti/am335x/tda19988.c   optionalhdmi
 
 arm/ti/ti_edma3.c  standard

Modified: head/sys/conf/files.arm
==
--- head/sys/conf/files.arm Sat Nov 21 16:23:56 2015(r291135)
+++ head/sys/conf/files.arm Sat Nov 21 16:25:03 2015(r291136)
@@ -41,6 +41,7 @@ arm/arm/fusu.Sstandard
 arm/arm/gdb_machdep.c  optionalgdb
 arm/arm/generic_timer.coptionalgeneric_timer
 arm/arm/gic.c  optionalgic
+arm/arm/hdmi_if.m  optionalhdmi
 arm/arm/identcpu.c standard
 arm/arm/in_cksum.c optionalinet | inet6
 arm/arm/in_cksum_arm.S optionalinet | inet6
___
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: r291137 - head/sys/netinet

2015-11-21 Thread Michael Tuexen
Author: tuexen
Date: Sat Nov 21 16:25:09 2015
New Revision: 291137
URL: https://svnweb.freebsd.org/changeset/base/291137

Log:
  Don't send SHUTDOWN chunk when the association is in a front state
  and the applications calls shutdown(..., SHUT_WR) or
  shutdown(..., SHUT_RDWR).
  
  MFC after:1 week.

Modified:
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_pcb.c
==
--- head/sys/netinet/sctp_pcb.c Sat Nov 21 16:25:03 2015(r291136)
+++ head/sys/netinet/sctp_pcb.c Sat Nov 21 16:25:09 2015(r291137)
@@ -3640,13 +3640,11 @@ sctp_inpcb_free(struct sctp_inpcb *inp, 
 * macro here since le_next will get freed as part of the
 * sctp_free_assoc() call.
 */
-   if (so) {
 #ifdef IPSEC
+   if (ip_pcb->inp_sp != NULL) {
ipsec_delete_pcbpolicy(ip_pcb);
-#endif /* IPSEC */
-
-   /* Unlocks not needed since the socket is gone now */
}
+#endif
if (ip_pcb->inp_options) {
(void)sctp_m_free(ip_pcb->inp_options);
ip_pcb->inp_options = 0;

Modified: head/sys/netinet/sctp_usrreq.c
==
--- head/sys/netinet/sctp_usrreq.c  Sat Nov 21 16:25:03 2015
(r291136)
+++ head/sys/netinet/sctp_usrreq.c  Sat Nov 21 16:25:09 2015
(r291137)
@@ -1007,16 +1007,15 @@ sctp_shutdown(struct socket *so)
} else {
netp = stcb->asoc.primary_destination;
}
-   if (TAILQ_EMPTY(>send_queue) &&
+   if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) &&
+   TAILQ_EMPTY(>send_queue) &&
TAILQ_EMPTY(>sent_queue) &&
(asoc->stream_queue_cnt == 0)) {
if (asoc->locked_on_sending) {
goto abort_anyway;
}
/* there is nothing queued to send, so I'm done... */
-   if (SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) {
-   SCTP_STAT_DECR_GAUGE32(sctps_currestab);
-   }
+   SCTP_STAT_DECR_GAUGE32(sctps_currestab);
SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_SENT);
SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
sctp_stop_timers_for_shutdown(stcb);
___
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: r291140 - head/sys/netinet

2015-11-21 Thread Michael Tuexen
Author: tuexen
Date: Sat Nov 21 16:46:59 2015
New Revision: 291140
URL: https://svnweb.freebsd.org/changeset/base/291140

Log:
  Revert part of r291137 which seems correct, bit does not fix the
  resource problem I'm currently hunting down.
  
  MFC after:1 week
  X-MFC with:   291137

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==
--- head/sys/netinet/sctp_pcb.c Sat Nov 21 16:37:11 2015(r291139)
+++ head/sys/netinet/sctp_pcb.c Sat Nov 21 16:46:59 2015(r291140)
@@ -3640,11 +3640,13 @@ sctp_inpcb_free(struct sctp_inpcb *inp, 
 * macro here since le_next will get freed as part of the
 * sctp_free_assoc() call.
 */
+   if (so) {
 #ifdef IPSEC
-   if (ip_pcb->inp_sp != NULL) {
ipsec_delete_pcbpolicy(ip_pcb);
+#endif /* IPSEC */
+
+   /* Unlocks not needed since the socket is gone now */
}
-#endif
if (ip_pcb->inp_options) {
(void)sctp_m_free(ip_pcb->inp_options);
ip_pcb->inp_options = 0;
___
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: r291132 - head/sys/dev/ispfw

2015-11-21 Thread Alexander Motin
Author: mav
Date: Sat Nov 21 14:39:57 2015
New Revision: 291132
URL: https://svnweb.freebsd.org/changeset/base/291132

Log:
  Update firmware for QLogic 22xx from 2.02.06 to 2.02.08.

Modified:
  head/sys/dev/ispfw/asm_2200.h

Modified: head/sys/dev/ispfw/asm_2200.h
==
--- head/sys/dev/ispfw/asm_2200.h   Sat Nov 21 13:02:34 2015
(r291131)
+++ head/sys/dev/ispfw/asm_2200.h   Sat Nov 21 14:39:57 2015
(r291132)
@@ -29,3976 +29,4291 @@
  * *
  * --- ISP2200 Initiator/Target Firmware ---*
  *   with Fabric support (Public Loop) and  *
- *   with expanded LUN addressing.  *
+ *  with expanded LUN addressing for FCTAPE.*
  * *
  /
 /*
- * Firmware Version 2.02.06 (08:39 Jun 26, 2003)
+ * Firmware Version 2.02.08
  */
-static const u_int16_t isp_2200_risc_code[] = {
-   0x0470, 0x, 0x, 0x96cf, 0x, 0x0002, 0x0002, 0x0006,
-   0x0007, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
+static const uint16_t isp_2200_risc_code[] = {
+   0x0470, 0x, 0x, 0xa52b, 0x, 0x0002, 0x0002, 0x0008,
+   0x0017, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
0x5449, 0x4f4e, 0x2049, 0x5350, 0x3232, 0x3030, 0x2046, 0x6972,
0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-   0x322e, 0x3032, 0x2e30, 0x3620, 0x2020, 0x2020, 0x2400, 0x20c1,
-   0x0005, 0x2001, 0x017f, 0x2003, 0x, 0x20c9, 0xabff, 0x2091,
-   0x2000, 0x2059, 0x, 0x2b78, 0x7823, 0x0004, 0x2089, 0x28ce,
-   0x2051, 0xa700, 0x2a70, 0x2029, 0xc600, 0x2031, 0x, 0x2039,
-   0xc5f5, 0x2021, 0x0200, 0x0804, 0x1468, 0x20a1, 0xa6cf, 0xa00e,
-   0x20a9, 0x0731, 0x41a4, 0x3400, 0x7562, 0x7666, 0x775e, 0x746a,
-   0x746e, 0x20a1, 0xae00, 0x7164, 0x810d, 0x810d, 0x810d, 0x810d,
-   0xa18c, 0x000f, 0x2001, 0x000a, 0xa112, 0xa00e, 0x21a8, 0x41a4,
+   0x322e, 0x3032, 0x2e30, 0x3820, 0x2020, 0x2020, 0x2400, 0x20c1,
+   0x0005, 0x2001, 0x017f, 0x2003, 0x, 0x20c9, 0xbbff, 0x2091,
+   0x2000, 0x2059, 0x, 0x2b78, 0x7823, 0x0004, 0x2089, 0x299f,
+   0x2051, 0xb600, 0x2a70, 0x2029, 0xee00, 0x2031, 0x, 0x2039,
+   0xede9, 0x2021, 0x0200, 0x0804, 0x146d, 0x20a1, 0xb52b, 0xa00e,
+   0x20a9, 0x08d5, 0x41a4, 0x3400, 0x7562, 0x7666, 0x775e, 0x746a,
+   0x746e, 0x20a1, 0xbe00, 0x7164, 0x810d, 0x810d, 0x810d, 0x810d,
+   0xa18c, 0x000f, 0x2001, 0x000b, 0xa112, 0xa00e, 0x21a8, 0x41a4,
0x3400, 0x8211, 0x1dd8, 0x7164, 0x3400, 0xa102, 0x0120, 0x0218,
-   0x20a8, 0xa00e, 0x41a4, 0x3800, 0xd08c, 0x01d8, 0x2009, 0xa700,
+   0x20a8, 0xa00e, 0x41a4, 0x3800, 0xd08c, 0x01d8, 0x2009, 0xb600,
0x810d, 0x810d, 0x810d, 0x810d, 0xa18c, 0x000f, 0x2001, 0x0001,
0xa112, 0x20a1, 0x1000, 0xa00e, 0x21a8, 0x41a4, 0x8211, 0x1de0,
-   0x2009, 0xa700, 0x3400, 0xa102, 0x0120, 0x0218, 0x20a8, 0xa00e,
-   0x41a4, 0x080c, 0x1411, 0x080c, 0x1632, 0x080c, 0x17cf, 0x080c,
-   0x1f20, 0x080c, 0x4b3f, 0x080c, 0x807c, 0x080c, 0x15bb, 0x080c,
-   0x2e1a, 0x080c, 0x5c7a, 0x080c, 0x5235, 0x080c, 0x6675, 0x080c,
-   0x248e, 0x080c, 0x68f6, 0x080c, 0x6273, 0x080c, 0x2348, 0x080c,
-   0x245c, 0x2091, 0x3009, 0x7823, 0x, 0x1004, 0x10c5, 0x7820,
+   0x2009, 0xb600, 0x3400, 0xa102, 0x0120, 0x0218, 0x20a8, 0xa00e,
+   0x41a4, 0x080c, 0x1416, 0x080c, 0x1637, 0x080c, 0x17d4, 0x080c,
+   0x1fbe, 0x080c, 0x4c72, 0x080c, 0x8646, 0x080c, 0x15c0, 0x080c,
+   0x2ef9, 0x080c, 0x5dfc, 0x080c, 0x53b3, 0x080c, 0x6940, 0x080c,
+   0x2545, 0x080c, 0x6bd3, 0x080c, 0x642d, 0x080c, 0x23ff, 0x080c,
+   0x2513, 0x2091, 0x3009, 0x7823, 0x, 0x1004, 0x10c5, 0x7820,
0xa086, 0x0002, 0x1150, 0x7823, 0x4000, 0x0e04, 0x10bd, 0x781b,
0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2a70, 0x7003, 0x,
-   0x2a70, 0x7000, 0xa08e, 0x0003, 0x1158, 0x080c, 0x3e49, 0x080c,
-   0x2e41, 0x080c, 0x5cc8, 0x080c, 0x53e4, 0x080c, 0x66a0, 0x0c80,
-   0x000b, 0x0c98, 0x10e4, 0x10e5, 0x1210, 0x10e2, 0x12dd, 0x140e,
-   0x140f, 0x1410, 0x080c, 0x1515, 0x0005, 0x0126, 0x00f6, 0x2091,
-   0x8000, 0x7000, 0xa086, 0x0001, 0x1904, 0x11ed, 0x080c, 0x1588,
-   0x080c, 0x59c3, 0x0150, 0x080c, 0x59e9, 0x15c0, 0x2079, 0x0100,
-   0x7828, 0xa085, 0x1800, 0x782a, 0x0488, 0x080c, 0x58fb, 0x7000,
-   0xa086, 0x0001, 0x1904, 0x11ed, 0x708c, 0xa086, 0x0028, 0x1904,
-   0x11ed, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827,
-   0x, 0x7a28, 0xa295, 0x1e2f, 0x7a2a, 0x2011, 0x5896, 0x080c,
- 

svn commit: r291131 - in head/sys/arm: arm include versatile

2015-11-21 Thread Andrew Turner
Author: andrew
Date: Sat Nov 21 13:02:34 2015
New Revision: 291131
URL: https://svnweb.freebsd.org/changeset/base/291131

Log:
  Limit arm_base_bs_tag to ARMv4 and ARMv5, we only used it in one place in
  armv6 and that can use fdtbus_bs_tag.

Modified:
  head/sys/arm/arm/bus_space_base.c
  head/sys/arm/include/bus.h
  head/sys/arm/versatile/versatile_pci.c

Modified: head/sys/arm/arm/bus_space_base.c
==
--- head/sys/arm/arm/bus_space_base.c   Sat Nov 21 12:53:44 2015
(r291130)
+++ head/sys/arm/arm/bus_space_base.c   Sat Nov 21 13:02:34 2015
(r291131)
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include "opt_platform.h"
 
@@ -156,4 +157,6 @@ static struct bus_space arm_base_bus_spa
 bus_space_tag_t fdtbus_bs_tag = _base_bus_space;
 #endif
 
+#if __ARM_ARCH < 6
 bus_space_tag_t arm_base_bs_tag = _base_bus_space;
+#endif

Modified: head/sys/arm/include/bus.h
==
--- head/sys/arm/include/bus.h  Sat Nov 21 12:53:44 2015(r291130)
+++ head/sys/arm/include/bus.h  Sat Nov 21 13:02:34 2015(r291131)
@@ -67,6 +67,7 @@
 #define _MACHINE_BUS_H_
 
 #include 
+#include 
 
 /*
  * int bus_space_map  (bus_space_tag_t t, bus_addr_t addr,
@@ -252,7 +253,9 @@ struct bus_space {
bus_size_t, const uint64_t *, bus_size_t);
 };
 
+#if __ARM_ARCH < 6
 extern bus_space_tag_t arm_base_bs_tag;
+#endif
 
 /*
  * Utility macros; INTERNAL USE ONLY.

Modified: head/sys/arm/versatile/versatile_pci.c
==
--- head/sys/arm/versatile/versatile_pci.c  Sat Nov 21 12:53:44 2015
(r291130)
+++ head/sys/arm/versatile/versatile_pci.c  Sat Nov 21 13:02:34 2015
(r291131)
@@ -357,7 +357,7 @@ versatile_pci_activate_resource(device_t
vaddr = (vm_offset_t)pmap_mapdev(rman_get_start(r),
rman_get_size(r));
rman_set_bushandle(r, vaddr);
-   rman_set_bustag(r, arm_base_bs_tag);
+   rman_set_bustag(r, fdtbus_bs_tag);
res = rman_activate_resource(r);
break;
case SYS_RES_IRQ:
___
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: r291130 - head/sys/modules

2015-11-21 Thread Andrew Turner
Author: andrew
Date: Sat Nov 21 12:53:44 2015
New Revision: 291130
URL: https://svnweb.freebsd.org/changeset/base/291130

Log:
  Fix a logic inversion, we should build dtrace on armv6, not on arm and
  armeb.

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Sat Nov 21 11:06:20 2015(r291129)
+++ head/sys/modules/Makefile   Sat Nov 21 12:53:44 2015(r291130)
@@ -403,7 +403,7 @@ _autofs=autofs
 .endif
 
 .if ${MK_CDDL} != "no" || defined(ALL_MODULES)
-.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} == "") && \
+.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \
${MACHINE_CPUARCH} != "mips" && \
${MACHINE_CPUARCH} != "sparc64"
 SUBDIR+=   dtrace
___
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: r291133 - in head/sys: arm/allwinner arm/altera/socfpga arm/amlogic/aml8726 arm/annapurna/alpine arm/at91 arm/broadcom/bcm2835 arm/cavium/cns11xx arm/freescale/imx arm/freescale/vybrid ...

2015-11-21 Thread Andrew Turner
Author: andrew
Date: Sat Nov 21 15:30:08 2015
New Revision: 291133
URL: https://svnweb.freebsd.org/changeset/base/291133

Log:
  Move more bus_space_* files to be built by files.arm. This leaves the
  definition in a file.* file under sys/arm/arm in the few cases we need it
  for non-fdt platforms.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/allwinner/files.allwinner
  head/sys/arm/altera/socfpga/files.socfpga
  head/sys/arm/amlogic/aml8726/files.aml8726
  head/sys/arm/annapurna/alpine/files.alpine
  head/sys/arm/at91/files.at91
  head/sys/arm/broadcom/bcm2835/files.bcm283x
  head/sys/arm/cavium/cns11xx/files.econa
  head/sys/arm/freescale/imx/files.imx5
  head/sys/arm/freescale/imx/files.imx6
  head/sys/arm/freescale/vybrid/files.vybrid
  head/sys/arm/lpc/files.lpc
  head/sys/arm/mv/files.mv
  head/sys/arm/qemu/files.qemu
  head/sys/arm/rockchip/files.rk30xx
  head/sys/arm/samsung/exynos/files.exynos5
  head/sys/arm/ti/files.ti
  head/sys/arm/versatile/files.versatile
  head/sys/arm/xilinx/files.zynq7
  head/sys/arm/xscale/i80321/files.i80219
  head/sys/arm/xscale/i80321/files.i80321
  head/sys/arm/xscale/i8134x/files.i81342
  head/sys/arm/xscale/ixp425/files.ixp425
  head/sys/arm/xscale/pxa/files.pxa
  head/sys/conf/files.arm

Modified: head/sys/arm/allwinner/files.allwinner
==
--- head/sys/arm/allwinner/files.allwinner  Sat Nov 21 14:39:57 2015
(r291132)
+++ head/sys/arm/allwinner/files.allwinner  Sat Nov 21 15:30:08 2015
(r291133)
@@ -1,9 +1,6 @@
 # $FreeBSD$
 kern/kern_clocksource.cstandard
 
-arm/arm/bus_space_base.c   standard
-arm/arm/bus_space_generic.cstandard
-
 arm/allwinner/a10_ahci.c   optionalahci
 arm/allwinner/a10_clk.cstandard
 arm/allwinner/a10_common.c standard

Modified: head/sys/arm/altera/socfpga/files.socfpga
==
--- head/sys/arm/altera/socfpga/files.socfpga   Sat Nov 21 14:39:57 2015
(r291132)
+++ head/sys/arm/altera/socfpga/files.socfpga   Sat Nov 21 15:30:08 2015
(r291133)
@@ -2,9 +2,6 @@
 
 kern/kern_clocksource.cstandard
 
-arm/arm/bus_space_generic.cstandard
-
-arm/arm/bus_space_base.c   standard
 arm/arm/mpcore_timer.c standard
 
 arm/altera/socfpga/socfpga_common.cstandard

Modified: head/sys/arm/amlogic/aml8726/files.aml8726
==
--- head/sys/arm/amlogic/aml8726/files.aml8726  Sat Nov 21 14:39:57 2015
(r291132)
+++ head/sys/arm/amlogic/aml8726/files.aml8726  Sat Nov 21 15:30:08 2015
(r291133)
@@ -2,9 +2,6 @@
 
 kern/kern_clocksource.cstandard
 
-arm/arm/bus_space_base.c   standard
-arm/arm/bus_space_generic.cstandard
-
 arm/amlogic/aml8726/aml8726_l2cache.c  standard
 
 arm/amlogic/aml8726/aml8726_machdep.c  standard

Modified: head/sys/arm/annapurna/alpine/files.alpine
==
--- head/sys/arm/annapurna/alpine/files.alpine  Sat Nov 21 14:39:57 2015
(r291132)
+++ head/sys/arm/annapurna/alpine/files.alpine  Sat Nov 21 15:30:08 2015
(r291133)
@@ -2,9 +2,6 @@
 
 kern/kern_clocksource.cstandard
 
-arm/arm/bus_space_base.c   standard
-arm/arm/bus_space_generic.cstandard
-
 arm/versatile/sp804.c  standard
 arm/versatile/versatile_timer.cstandard
 dev/uart/uart_dev_ns8250.c optionaluart

Modified: head/sys/arm/at91/files.at91
==
--- head/sys/arm/at91/files.at91Sat Nov 21 14:39:57 2015
(r291132)
+++ head/sys/arm/at91/files.at91Sat Nov 21 15:30:08 2015
(r291133)
@@ -1,5 +1,4 @@
 # $FreeBSD$
-arm/arm/bus_space_generic.cstandard
 arm/at91/at91_machdep.cstandard
 arm/at91/at91_aic.cstandard
 arm/at91/at91.cstandard

Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x
==
--- head/sys/arm/broadcom/bcm2835/files.bcm283x Sat Nov 21 14:39:57 2015
(r291132)
+++ head/sys/arm/broadcom/bcm2835/files.bcm283x Sat Nov 21 15:30:08 2015
(r291133)
@@ -16,9 +16,6 @@ arm/broadcom/bcm2835/bcm2835_vcio.c   sta
 arm/broadcom/bcm2835/bcm2835_wdog.cstandard
 arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt
 
-arm/arm/bus_space_base.c   standard
-arm/arm/bus_space_generic.c

svn commit: r291138 - head/sys/netinet

2015-11-21 Thread Michael Tuexen
Author: tuexen
Date: Sat Nov 21 16:32:14 2015
New Revision: 291138
URL: https://svnweb.freebsd.org/changeset/base/291138

Log:
  Clear the so_pcb pointer in case of ipsec_init_policy() fails.
  
  MFC after:1 week

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==
--- head/sys/netinet/sctp_usrreq.c  Sat Nov 21 16:25:09 2015
(r291137)
+++ head/sys/netinet/sctp_usrreq.c  Sat Nov 21 16:32:14 2015
(r291138)
@@ -537,9 +537,10 @@ try_again:
SCTP_INP_WUNLOCK(inp);
}
}
+   so->so_pcb = NULL;
return (error);
}
-#endif /* IPSEC */
+#endif
SCTP_INP_WUNLOCK(inp);
return (0);
 }
___
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: r291135 - in head/sys: arm/altera/socfpga arm/broadcom/bcm2835 arm/conf arm/freescale/imx arm/freescale/vybrid arm/qemu arm/rockchip arm/samsung/exynos arm/ti/omap4 arm/xilinx conf

2015-11-21 Thread Andrew Turner
Author: andrew
Date: Sat Nov 21 16:23:56 2015
New Revision: 291135
URL: https://svnweb.freebsd.org/changeset/base/291135

Log:
  Create device options for the two common ARM timers.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/altera/socfpga/files.socfpga
  head/sys/arm/broadcom/bcm2835/files.bcm2836
  head/sys/arm/conf/EXYNOS5.common
  head/sys/arm/conf/IMX6
  head/sys/arm/conf/PANDABOARD
  head/sys/arm/conf/RK3188
  head/sys/arm/conf/RPI2
  head/sys/arm/conf/SOCKIT.common
  head/sys/arm/conf/VIRT
  head/sys/arm/conf/VYBRID
  head/sys/arm/conf/ZEDBOARD
  head/sys/arm/freescale/imx/files.imx6
  head/sys/arm/freescale/vybrid/files.vybrid
  head/sys/arm/qemu/files.qemu
  head/sys/arm/rockchip/files.rk30xx
  head/sys/arm/samsung/exynos/files.exynos5
  head/sys/arm/ti/omap4/files.omap4
  head/sys/arm/xilinx/files.zynq7
  head/sys/conf/files.arm

Modified: head/sys/arm/altera/socfpga/files.socfpga
==
--- head/sys/arm/altera/socfpga/files.socfpga   Sat Nov 21 16:21:27 2015
(r291134)
+++ head/sys/arm/altera/socfpga/files.socfpga   Sat Nov 21 16:23:56 2015
(r291135)
@@ -2,8 +2,6 @@
 
 kern/kern_clocksource.cstandard
 
-arm/arm/mpcore_timer.c standard
-
 arm/altera/socfpga/socfpga_common.cstandard
 arm/altera/socfpga/socfpga_machdep.c   standard
 arm/altera/socfpga/socfpga_manager.c   standard

Modified: head/sys/arm/broadcom/bcm2835/files.bcm2836
==
--- head/sys/arm/broadcom/bcm2835/files.bcm2836 Sat Nov 21 16:21:27 2015
(r291134)
+++ head/sys/arm/broadcom/bcm2835/files.bcm2836 Sat Nov 21 16:23:56 2015
(r291135)
@@ -1,6 +1,4 @@
 # $FreeBSD$
 
-arm/arm/generic_timer.cstandard
-
 arm/broadcom/bcm2835/bcm2836.c standard
 arm/broadcom/bcm2835/bcm2836_mp.c  optional smp

Modified: head/sys/arm/conf/EXYNOS5.common
==
--- head/sys/arm/conf/EXYNOS5.commonSat Nov 21 16:21:27 2015
(r291134)
+++ head/sys/arm/conf/EXYNOS5.commonSat Nov 21 16:23:56 2015
(r291135)
@@ -87,6 +87,8 @@ devicedwmmc
 
 # Interrupt controller
 device gic
+# ARM Generic Timer
+device generic_timer
 
 # Pseudo devices
 

Modified: head/sys/arm/conf/IMX6
==
--- head/sys/arm/conf/IMX6  Sat Nov 21 16:21:27 2015(r291134)
+++ head/sys/arm/conf/IMX6  Sat Nov 21 16:23:56 2015(r291135)
@@ -64,6 +64,8 @@ options   ROOTDEVNAME=\"ufs:mmcsd0s2a\"
 device gic
 # Cache controller
 device pl310   # PL310 L2 cache controller
+# ARM MPCore timer
+device mpcore_timer
 
 # Pseudo devices.
 device loop# Network loopback

Modified: head/sys/arm/conf/PANDABOARD
==
--- head/sys/arm/conf/PANDABOARDSat Nov 21 16:21:27 2015
(r291134)
+++ head/sys/arm/conf/PANDABOARDSat Nov 21 16:23:56 2015
(r291135)
@@ -62,6 +62,8 @@ options   DDB # Enable the kernel 
debug
 device fdt_pinctrl
 # Interrupt controller
 device gic
+# ARM MPCore timer
+device mpcore_timer
 
 # MMC/SD/SDIO Card slot support
 device mmc # mmc/sd bus

Modified: head/sys/arm/conf/RK3188
==
--- head/sys/arm/conf/RK3188Sat Nov 21 16:21:27 2015(r291134)
+++ head/sys/arm/conf/RK3188Sat Nov 21 16:23:56 2015(r291135)
@@ -47,6 +47,8 @@ options   ROOTDEVNAME=\"ufs:/dev/mmcsd0\"
 
 # Interrupt controller
 device gic
+# ARM MPCore timer
+device mpcore_timer
 
 # MMC/SD/SDIO Card slot support
 device mmc # mmc/sd bus

Modified: head/sys/arm/conf/RPI2
==
--- head/sys/arm/conf/RPI2  Sat Nov 21 16:21:27 2015(r291134)
+++ head/sys/arm/conf/RPI2  Sat Nov 21 16:23:56 2015(r291135)
@@ -53,6 +53,9 @@ options   INVARIANT_SUPPORT   # Extra sanit
 
 optionsROOTDEVNAME=\"ufs:mmcsd0s2\"
 
+# ARM Generic Timer
+device generic_timer
+
 device bpf
 device loop
 device ether

Modified: head/sys/arm/conf/SOCKIT.common
==
--- head/sys/arm/conf/SOCKIT.common Sat Nov 21 16:21:27 2015
(r291134)
+++ head/sys/arm/conf/SOCKIT.common Sat Nov 21 16:23:56 2015
(r291135)
@@ -53,6 +53,8 @@ options   INVARIANT_SUPPORT   # Extra sanit
 
 # 

svn commit: r291153 - in head/sys: amd64/linux arm/arm modules/cryptodev modules/linux64 opencrypto vm

2015-11-21 Thread Mark Johnston
Author: markj
Date: Sun Nov 22 02:01:01 2015
New Revision: 291153
URL: https://svnweb.freebsd.org/changeset/base/291153

Log:
  Remove unneeded includes of opt_kdtrace.h.
  
  As of r258541, KDTRACE_HOOKS is defined in opt_global.h, so opt_kdtrace.h
  is not needed when defining SDT(9) probes.

Modified:
  head/sys/amd64/linux/linux_dummy.c
  head/sys/arm/arm/exception.S
  head/sys/modules/cryptodev/Makefile
  head/sys/modules/linux64/Makefile
  head/sys/opencrypto/cryptodev.c
  head/sys/vm/vm_pageout.c

Modified: head/sys/amd64/linux/linux_dummy.c
==
--- head/sys/amd64/linux/linux_dummy.c  Sun Nov 22 01:20:36 2015
(r291152)
+++ head/sys/amd64/linux/linux_dummy.c  Sun Nov 22 02:01:01 2015
(r291153)
@@ -28,7 +28,6 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_compat.h"
-#include "opt_kdtrace.h"
 
 #include 
 #include 

Modified: head/sys/arm/arm/exception.S
==
--- head/sys/arm/arm/exception.SSun Nov 22 01:20:36 2015
(r291152)
+++ head/sys/arm/arm/exception.SSun Nov 22 02:01:01 2015
(r291153)
@@ -48,7 +48,6 @@
 
 #include "assym.s"
 
-#include "opt_kdtrace.h"
 #include 
 #include 
 #include 

Modified: head/sys/modules/cryptodev/Makefile
==
--- head/sys/modules/cryptodev/Makefile Sun Nov 22 01:20:36 2015
(r291152)
+++ head/sys/modules/cryptodev/Makefile Sun Nov 22 02:01:01 2015
(r291153)
@@ -3,6 +3,6 @@
 .PATH: ${.CURDIR}/../../opencrypto
 KMOD   = cryptodev
 SRCS   = cryptodev.c
-SRCS   += bus_if.h device_if.h opt_compat.h opt_kdtrace.h
+SRCS   += bus_if.h device_if.h opt_compat.h
 
 .include 

Modified: head/sys/modules/linux64/Makefile
==
--- head/sys/modules/linux64/Makefile   Sun Nov 22 01:20:36 2015
(r291152)
+++ head/sys/modules/linux64/Makefile   Sun Nov 22 02:01:01 2015
(r291153)
@@ -10,7 +10,7 @@ SRCS= linux_fork.c linux_dummy.c linux_f
linux_machdep.c linux_misc.c linux_signal.c \
linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \
linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \
-   opt_inet6.h opt_compat.h opt_kdtrace.h opt_posix.h opt_usb.h \
+   opt_inet6.h opt_compat.h opt_posix.h opt_usb.h \
vnode_if.h device_if.h bus_if.h assym.s \
linux_support.s
 DPSRCS=linux_genassym.c

Modified: head/sys/opencrypto/cryptodev.c
==
--- head/sys/opencrypto/cryptodev.c Sun Nov 22 01:20:36 2015
(r291152)
+++ head/sys/opencrypto/cryptodev.c Sun Nov 22 02:01:01 2015
(r291153)
@@ -42,7 +42,6 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_compat.h"
-#include "opt_kdtrace.h"
 
 #include 
 #include 

Modified: head/sys/vm/vm_pageout.c
==
--- head/sys/vm/vm_pageout.cSun Nov 22 01:20:36 2015(r291152)
+++ head/sys/vm/vm_pageout.cSun Nov 22 02:01:01 2015(r291153)
@@ -76,7 +76,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_vm.h"
-#include "opt_kdtrace.h"
+
 #include 
 #include 
 #include 
___
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: r291151 - head/sys/powerpc/mpc85xx

2015-11-21 Thread Justin Hibbits
Author: jhibbits
Date: Sun Nov 22 01:16:43 2015
New Revision: 291151
URL: https://svnweb.freebsd.org/changeset/base/291151

Log:
  Modernize mpc85xx PCI hostbridge driver.
  
  Summary:
  * Take advantage of NEW_PCIB to remove a lot of setup code.
  * Fix some bugs related to multiple PCI bridges.
  
  There's still room for more cleanup, and still some bugs leftover, but this
  cleans up a lot.
  
  Test Plan: Tested on P5020 board with IDT PCIe switch.
  
  Differential Revision: https://reviews.freebsd.org/D4127

Modified:
  head/sys/powerpc/mpc85xx/pci_mpc85xx.c
  head/sys/powerpc/mpc85xx/pci_mpc85xx_pcib.c

Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c
==
--- head/sys/powerpc/mpc85xx/pci_mpc85xx.c  Sat Nov 21 23:55:46 2015
(r291150)
+++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c  Sun Nov 22 01:16:43 2015
(r291151)
@@ -104,9 +104,9 @@ struct fsl_pcib_softc {
device_tsc_dev;
 
int sc_iomem_target;
-   bus_addr_t  sc_iomem_alloc, sc_iomem_start, sc_iomem_end;
+   bus_addr_t  sc_iomem_start, sc_iomem_end;
int sc_ioport_target;
-   bus_addr_t  sc_ioport_alloc, sc_ioport_start, sc_ioport_end;
+   bus_addr_t  sc_ioport_start, sc_ioport_end;
 
struct resource *sc_res;
bus_space_handle_t sc_bsh;
@@ -266,9 +266,8 @@ fsl_pcib_attach(device_t dev)
/*
 * Scan bus using firmware configured, 0 based bus numbering.
 */
-   sc->sc_busnr = 0;
maxslot = (sc->sc_pcie) ? 0 : PCI_SLOTMAX;
-   sc->sc_busnr = fsl_pcib_init(sc, sc->sc_busnr, maxslot);
+   fsl_pcib_init(sc, sc->sc_busnr, maxslot);
 
if (sc->sc_pcie) {
ltssm = fsl_pcib_cfgread(sc, 0, 0, 0, PCIR_LTSSM, 1);
@@ -285,6 +284,7 @@ fsl_pcib_attach(device_t dev)
return (ofw_pci_attach(dev));
 
 err:
+   //panic("Because I said so\n");
return (ENXIO);
 }
 
@@ -294,9 +294,6 @@ fsl_pcib_cfgread(struct fsl_pcib_softc *
 {
uint32_t addr, data;
 
-   if (bus == sc->sc_busnr - 1)
-   bus = 0;
-
addr = CONFIG_ACCESS_ENABLE;
addr |= (bus & 0xff) << 16;
addr |= (slot & 0x1f) << 11;
@@ -335,9 +332,6 @@ fsl_pcib_cfgwrite(struct fsl_pcib_softc 
 {
uint32_t addr;
 
-   if (bus == sc->sc_busnr - 1)
-   bus = 0;
-
addr = CONFIG_ACCESS_ENABLE;
addr |= (bus & 0xff) << 16;
addr |= (slot & 0x1f) << 11;
@@ -449,74 +443,14 @@ fsl_pcib_init_via(struct fsl_pcib_softc 
 }
 
 static int
-fsl_pcib_init_bar(struct fsl_pcib_softc *sc, int bus, int slot, int func,
-int barno)
-{
-   bus_addr_t *allocp;
-   uint32_t addr, mask, size;
-   int reg, width;
-
-   reg = PCIR_BAR(barno);
-
-   if (DEVFN(bus, slot, func) == sc->sc_devfn_via_ide) {
-   switch (barno) {
-   case 0: addr = 0x1f0; break;
-   case 1: addr = 0x3f4; break;
-   case 2: addr = 0x170; break;
-   case 3: addr = 0x374; break;
-   case 4: addr = 0xcc0; break;
-   default: return (1);
-   }
-   fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, addr, 
4);
-   return (1);
-   }
-
-   fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, ~0, 4);
-   size = fsl_pcib_read_config(sc->sc_dev, bus, slot, func, reg, 4);
-   if (size == 0)
-   return (1);
-   width = ((size & 7) == 4) ? 2 : 1;
-
-   if (size & 1) { /* I/O port */
-   allocp = >sc_ioport_alloc;
-   size &= ~3;
-   if ((size & 0x) == 0)
-   size |= 0x;
-   } else {/* memory */
-   allocp = >sc_iomem_alloc;
-   size &= ~15;
-   }
-   mask = ~size;
-   size = mask + 1;
-   /* Sanity check (must be a power of 2). */
-   if (size & mask)
-   return (width);
-
-   addr = (*allocp + mask) & ~mask;
-   *allocp = addr + size;
-
-   if (bootverbose)
-   printf("PCI %u:%u:%u:%u: reg %x: size=%08x: addr=%08x\n",
-   device_get_unit(sc->sc_dev), bus, slot, func, reg,
-   size, addr);
-
-   fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg, addr, 4);
-   if (width == 2)
-   fsl_pcib_write_config(sc->sc_dev, bus, slot, func, reg + 4,
-   0, 4);
-   return (width);
-}
-
-static int
 fsl_pcib_init(struct fsl_pcib_softc *sc, int bus, int maxslot)
 {
int secbus;
int old_pribus, old_secbus, old_subbus;
int new_pribus, new_secbus, new_subbus;
int slot, func, maxfunc;
-   int bar, maxbar;
uint16_t vendor, device;
-   uint8_t command, hdrtype, class, subclass;
+   uint8_t command, hdrtype, subclass;
 
secbus = bus;
for 

svn commit: r291148 - head/usr.bin/vmstat

2015-11-21 Thread Mark Johnston
Author: markj
Date: Sat Nov 21 23:04:12 2015
New Revision: 291148
URL: https://svnweb.freebsd.org/changeset/base/291148

Log:
  Add a missing brace to fix vmstat -s output.

Modified:
  head/usr.bin/vmstat/vmstat.c

Modified: head/usr.bin/vmstat/vmstat.c
==
--- head/usr.bin/vmstat/vmstat.cSat Nov 21 21:44:11 2015
(r291147)
+++ head/usr.bin/vmstat/vmstat.cSat Nov 21 23:04:12 2015
(r291148)
@@ -1113,7 +1113,7 @@ dosum(void)
nchtotal = lnchstats.ncs_goodhits + lnchstats.ncs_neghits +
lnchstats.ncs_badhits + lnchstats.ncs_falsehits +
lnchstats.ncs_miss + lnchstats.ncs_long;
-   xo_emit(":total-name-lookups/%9ld} {N:total name lookups}\n",
+   xo_emit("{:total-name-lookups/%9ld} {N:total name lookups}\n",
nchtotal);
xo_emit("{P:/%9s} {N:cache hits} "
"({:positive-cache-hits/%ld}% pos + "
___
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: r291143 - head/sys/dev/ispfw

2015-11-21 Thread Alexander Motin
Author: mav
Date: Sat Nov 21 20:52:40 2015
New Revision: 291143
URL: https://svnweb.freebsd.org/changeset/base/291143

Log:
  Update Qlogic 23XX firmware from 3.03.26 to 3.03.28

Modified:
  head/sys/dev/ispfw/asm_2300.h
  head/sys/dev/ispfw/asm_2322.h

Modified: head/sys/dev/ispfw/asm_2300.h
==
--- head/sys/dev/ispfw/asm_2300.h   Sat Nov 21 19:55:01 2015
(r291142)
+++ head/sys/dev/ispfw/asm_2300.h   Sat Nov 21 20:52:40 2015
(r291143)
@@ -27,21 +27,21 @@
 
 /
  * *
- *   --- ISP2300 Initiator/Target Firmware ---  *
- * with Fabric (Public Loop), Point-point, *
- * expanded LUN addressing for FCTAPE, and 2K port logins  *
+ * --- ISP2300 Initiator/Target Firmware ---   *
+ *  with Fabric (Public Loop), Point-point,*
+ *   expanded LUN addressing for FCTAPE, and 2K port logins*
  * *
  /
 /*
- * Firmware Version 3.03.26 (16:58 Aug 14, 2007)
+ * Firmware Version 3.03.28
  */
 static const uint16_t isp_2300_risc_code[] = {
-   0x0470, 0x, 0x, 0xddef, 0x, 0x0003, 0x0003, 0x001a,
-   0x0117, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
+   0x0470, 0x, 0x, 0xf4a2, 0x, 0x0003, 0x0003, 0x001c,
+   0x0137, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030,
0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241,
0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972,
0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030,
-   0x332e, 0x3033, 0x2e32, 0x3620, 0x2020, 0x2020, 0x2400, 0x20a9,
+   0x332e, 0x3033, 0x2e32, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9,
0x000f, 0x2001, 0x, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f,
0x2001, 0x, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001,
0x, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x,
@@ -50,1007 +50,1067 @@ static const uint16_t isp_2300_risc_code
0x2c00, 0x20a9, 0x000f, 0x2001, 0x, 0x400f, 0x2091, 0x2e00,
0x20a9, 0x000f, 0x2001, 0x, 0x400f, 0x2091, 0x2000, 0x2001,
0x, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x, 0x2b78,
-   0x7883, 0x0004, 0x2089, 0x2c69, 0x2051, 0x1800, 0x2a70, 0x20e1,
-   0x0001, 0x20e9, 0x0001, 0x2009, 0x, 0x080c, 0x0e51, 0x2029,
+   0x7883, 0x0004, 0x2089, 0x2e49, 0x2051, 0x1800, 0x2a70, 0x20e1,
+   0x0001, 0x20e9, 0x0001, 0x2009, 0x, 0x080c, 0x0e5a, 0x2029,
0x4d00, 0x2031, 0x, 0x2039, 0x4cd0, 0x2021, 0x0200, 0x20e9,
0x0001, 0x20a1, 0x, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9,
0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff,
0x20a8, 0x4104, 0x2001, 0x, 0x9086, 0x, 0x0120, 0x21a8,
-   0x4104, 0x8001, 0x1de0, 0x756a, 0x766e, 0x7766, 0x7472, 0x7476,
-   0x00e6, 0x2071, 0x1aac, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x716c,
+   0x4104, 0x8001, 0x1de0, 0x756e, 0x7672, 0x776a, 0x7476, 0x747a,
+   0x00e6, 0x2071, 0x1ad4, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x7170,
0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001,
-   0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x716c, 0x3400,
+   0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x7170, 0x3400,
0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009,
0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f,
0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e,
-   0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f25, 0x080c,
-   0x5fc1, 0x080c, 0xa333, 0x080c, 0x10dc, 0x080c, 0x12c4, 0x080c,
-   0x1ae1, 0x080c, 0x0d55, 0x080c, 0x1061, 0x080c, 0x3368, 0x080c,
-   0x7660, 0x080c, 0x695d, 0x080c, 0x83d5, 0x080c, 0x23a4, 0x080c,
-   0x874c, 0x080c, 0x7cf9, 0x080c, 0x21d9, 0x080c, 0x230d, 0x080c,
-   0x2399, 0x2091, 0x3009, 0x7883, 0x, 0x1004, 0x091d, 0x7880,
-   0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833,
-   0x0010, 0x0e04, 0x0911, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001,
-   0x0089, 0x2004, 0xd084, 0x190c, 0x11a9, 0x2071, 0x1800, 0x7003,
-   0x, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, 0x1168, 0x080c,
-   0x4c32, 0x080c, 0x338f, 0x080c, 0x76d1, 0x080c, 0x6e62, 0x080c,
-   0x8401, 0x080c, 0x2b72, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941,
-   0x0ade, 0x093e, 0x0b9e, 0x0d54, 0x0d54, 0x0d54, 0x080c, 0x0dc3,
-   0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000, 0x9086, 0x0001,
-   0x1904, 0x0ab1, 0x080c, 0x0e93, 0x080c, 0x7351, 0x0150, 0x080c,
-   0x7374, 0x15b0, 

svn commit: r291147 - head/sys/dev/isp

2015-11-21 Thread Alexander Motin
Author: mav
Date: Sat Nov 21 21:44:11 2015
New Revision: 291147
URL: https://svnweb.freebsd.org/changeset/base/291147

Log:
  Increase maximal value of vports tunable to 254.
  
  I am not sure this value is really viable yet, but that is what chips
  officially support in NPIV mode (in loop mode maximum is 125).

Modified:
  head/sys/dev/isp/isp_pci.c

Modified: head/sys/dev/isp/isp_pci.c
==
--- head/sys/dev/isp/isp_pci.c  Sat Nov 21 21:18:55 2015(r291146)
+++ head/sys/dev/isp/isp_pci.c  Sat Nov 21 21:44:11 2015(r291147)
@@ -486,7 +486,7 @@ isp_get_generic_options(device_t dev, is
}
tval = -1;
(void) resource_int_value(device_get_name(dev), device_get_unit(dev), 
"vports", );
-   if (tval > 0 && tval < 127) {
+   if (tval > 0 && tval <= 254) {
isp_nvports = tval;
}
tval = 7;
___
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: r291145 - head/usr.sbin/bluetooth/bthidd

2015-11-21 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Nov 21 21:14:16 2015
New Revision: 291145
URL: https://svnweb.freebsd.org/changeset/base/291145

Log:
  Fix scancodes for Kana and Eisu keys.
  
  PR:   204709
  Submitted by: naito.yuich...@gmail.com
  MFC after:3 days

Modified:
  head/usr.sbin/bluetooth/bthidd/kbd.c

Modified: head/usr.sbin/bluetooth/bthidd/kbd.c
==
--- head/usr.sbin/bluetooth/bthidd/kbd.cSat Nov 21 21:01:00 2015
(r291144)
+++ head/usr.sbin/bluetooth/bthidd/kbd.cSat Nov 21 21:14:16 2015
(r291145)
@@ -226,8 +226,8 @@ static int32_t constx[] =
 /* Keyboard Int'l 7 8D */ -1,   /* Unassigned */
 /* Keyboard Int'l 8 8E */ -1,   /* Unassigned */
 /* Keyboard Int'l 9 8F */ -1,   /* Unassigned */
-/* Keyboard Lang 1  90 */ 0x71, /* eisu */
-/* Keyboard Lang 2  91 */ 0x72, /* kana */
+/* Keyboard Lang 1  90 */ 0x71, /* Kana */
+/* Keyboard Lang 2  91 */ 0x72, /* Eisu */
 /* Keyboard Lang 3  92 */ 0x78, /* F8 */
 /* Keyboard Lang 4  93 */ 0x77, /* F7 */
 /* Keyboard Lang 5  94 */ 0x76, /* F6 */
___
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: r291142 - in head/sys: arm/arm arm64/arm64 mips/mips powerpc/powerpc x86/x86

2015-11-21 Thread Svatopluk Kraus
Author: skra
Date: Sat Nov 21 19:55:01 2015
New Revision: 291142
URL: https://svnweb.freebsd.org/changeset/base/291142

Log:
  Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being
  created for bus_dma_tag_t tag, bounce pages should be allocated
  only if needed.
  
  Before the fix, they were allocated always if BUS_DMA_COULD_BOUNCE flag
  was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never freed,
  it could cause memory exhaustion when a lot of such tags together with
  their maps were created.
  
  Note that there could be more maps in one tag by current design.
  However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after
  bounce pages are allocated. Thus, they are allocated only for first
  tag's map which needs them.
  
  Approved by:  kib (mentor)

Modified:
  head/sys/arm/arm/busdma_machdep-v6.c
  head/sys/arm/arm/busdma_machdep.c
  head/sys/arm64/arm64/busdma_bounce.c
  head/sys/mips/mips/busdma_machdep.c
  head/sys/powerpc/powerpc/busdma_machdep.c
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/arm/arm/busdma_machdep-v6.c
==
--- head/sys/arm/arm/busdma_machdep-v6.cSat Nov 21 18:21:16 2015
(r291141)
+++ head/sys/arm/arm/busdma_machdep-v6.cSat Nov 21 19:55:01 2015
(r291142)
@@ -654,8 +654,8 @@ allocate_bz_and_pages(bus_dma_tag_t dmat
maxpages = MAX_BPAGES;
else
maxpages = 2 * bz->map_count;
-   if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 ||
-   (bz->map_count > 0 && bz->total_bpages < maxpages)) {
+   if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 &&
+   bz->map_count > 0 && bz->total_bpages < maxpages) {
int pages;
 
pages = atop(roundup2(dmat->maxsize, PAGE_SIZE)) + 1;

Modified: head/sys/arm/arm/busdma_machdep.c
==
--- head/sys/arm/arm/busdma_machdep.c   Sat Nov 21 18:21:16 2015
(r291141)
+++ head/sys/arm/arm/busdma_machdep.c   Sat Nov 21 19:55:01 2015
(r291142)
@@ -569,8 +569,8 @@ allocate_bz_and_pages(bus_dma_tag_t dmat
 * basis up to a sane limit.
 */
maxpages = MAX_BPAGES;
-   if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0
-|| (bz->map_count > 0 && bz->total_bpages < maxpages)) {
+   if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 &&
+   bz->map_count > 0 && bz->total_bpages < maxpages) {
int pages;
 
pages = MAX(atop(dmat->maxsize), 1);

Modified: head/sys/arm64/arm64/busdma_bounce.c
==
--- head/sys/arm64/arm64/busdma_bounce.cSat Nov 21 18:21:16 2015
(r291141)
+++ head/sys/arm64/arm64/busdma_bounce.cSat Nov 21 19:55:01 2015
(r291142)
@@ -304,8 +304,8 @@ bounce_bus_dmamap_create(bus_dma_tag_t d
else
maxpages = MIN(MAX_BPAGES, Maxmem -
atop(dmat->common.lowaddr));
-   if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0 ||
-   (bz->map_count > 0 && bz->total_bpages < maxpages)) {
+   if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0 &&
+   bz->map_count > 0 && bz->total_bpages < maxpages) {
pages = MAX(atop(dmat->common.maxsize), 1);
pages = MIN(maxpages - bz->total_bpages, pages);
pages = MAX(pages, 1);

Modified: head/sys/mips/mips/busdma_machdep.c
==
--- head/sys/mips/mips/busdma_machdep.c Sat Nov 21 18:21:16 2015
(r291141)
+++ head/sys/mips/mips/busdma_machdep.c Sat Nov 21 19:55:01 2015
(r291142)
@@ -560,8 +560,8 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
 * basis up to a sane limit.
 */
maxpages = MAX_BPAGES;
-   if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0
-|| (bz->map_count > 0 && bz->total_bpages < maxpages)) {
+   if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0 &&
+   bz->map_count > 0 && bz->total_bpages < maxpages) {
int pages;
 
pages = MAX(atop(dmat->maxsize), 1);

Modified: head/sys/powerpc/powerpc/busdma_machdep.c
==
--- head/sys/powerpc/powerpc/busdma_machdep.c   Sat Nov 21 18:21:16 2015
(r291141)
+++ head/sys/powerpc/powerpc/busdma_machdep.c   Sat Nov 21 19:55:01 2015
(r291142)
@@ -423,8 +423,8 @@ bus_dmamap_create(bus_dma_tag_t dmat, in
maxpages = MAX_BPAGES;
else
maxpages = 

svn commit: r291146 - head/sys/dev/usb/input

2015-11-21 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Nov 21 21:18:55 2015
New Revision: 291146
URL: https://svnweb.freebsd.org/changeset/base/291146

Log:
  Add support for Kana and Eisu keys to the USB keyboard driver.
  
  PR:   204709
  Submitted by: naito.yuich...@gmail.com
  MFC after:3 days

Modified:
  head/sys/dev/usb/input/ukbd.c

Modified: head/sys/dev/usb/input/ukbd.c
==
--- head/sys/dev/usb/input/ukbd.c   Sat Nov 21 21:14:16 2015
(r291145)
+++ head/sys/dev/usb/input/ukbd.c   Sat Nov 21 21:18:55 2015
(r291146)
@@ -299,6 +299,10 @@ static const struct ukbd_mods ukbd_mods[
  * 0x68: F13
  * 0x69: F14
  * 0x6a: F15
+ * 
+ * USB Apple Keyboard JIS generates:
+ * 0x90: Kana
+ * 0x91: Eisu
  */
 static const uint8_t ukbd_trtab[256] = {
0, 0, 0, 0, 30, 48, 46, 32, /* 00 - 07 */
@@ -319,7 +323,7 @@ static const uint8_t ukbd_trtab[256] = {
109, 110, 112, 118, 114, 116, 117, 119, /* 78 - 7F */
121, 120, NN, NN, NN, NN, NN, 123,  /* 80 - 87 */
124, 125, 126, 127, 128, NN, NN, NN,/* 88 - 8F */
-   NN, NN, NN, NN, NN, NN, NN, NN, /* 90 - 97 */
+   129, 130, NN, NN, NN, NN, NN, NN,   /* 90 - 97 */
NN, NN, NN, NN, NN, NN, NN, NN, /* 98 - 9F */
NN, NN, NN, NN, NN, NN, NN, NN, /* A0 - A7 */
NN, NN, NN, NN, NN, NN, NN, NN, /* A8 - AF */
@@ -2067,7 +2071,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int
0x166,  /* Sun Type 6 Find */
0x167,  /* Sun Type 6 Cut */
0x125,  /* Sun Type 6 Mute */
-   /* 120 - 128 */
+   /* 120 - 130 */
0x11f,  /* Sun Type 6 VolumeDown */
0x11e,  /* Sun Type 6 VolumeUp */
0x120,  /* Sun Type 6 PowerDown */
@@ -2079,6 +2083,8 @@ ukbd_key2scan(struct ukbd_softc *sc, int
0x79,   /* Keyboard Intl' 4 (Henkan) */
0x7b,   /* Keyboard Intl' 5 (Muhenkan) */
0x5c,   /* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */
+   0x71,   /* Apple Keyboard JIS (Kana) */
+   0x72,   /* Apple Keyboard JIS (Eisu) */
};
 
if ((code >= 89) && (code < (int)(89 + (sizeof(scan) / 
sizeof(scan[0]) {
___
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: r291114 - head/lib/libc/gen

2015-11-21 Thread Andrey Chernov
On 21.11.2015 5:29, David Sanderson wrote:
> Thank you for pointing out the possibility of fdopen() setting
> FD_CLOEXEC on the parent's end of the pipe if the mode string contains
> an 'e'.  This is indeed documented on popen(3).
> 
> However, note that popen() uses pipe2(pdes, O_CLOEXEC) to create the
> pipe -- so both ends of the pipe start out with FD_CLOEXEC set.
> 
> If the caller uses popen() with "re" or "we", the fdopen() code will
> simply set FD_CLOEXEC on the parent's end of the pipe _again_.  So
> moving the fdopen() prior to the fork() doesn't have any net effect on
> the file descriptors the child process receives, even in the face of
> popen() with "re" or "we".
> 
> Does this address your concerns?

Yes, it is safe in this case. Thanx.

-- 
http://ache.vniz.net/
___
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: r291144 - head/sys/dev/isp

2015-11-21 Thread Alexander Motin
Author: mav
Date: Sat Nov 21 21:01:00 2015
New Revision: 291144
URL: https://svnweb.freebsd.org/changeset/base/291144

Log:
  Fix target mode with fabric for pre-24xx chips.
  
  For those chips we are not receiving login events, adding initiators
  based on ATIO requests.  But there is no port ID in that structure, so
  in fabric mode we have to explicitly fetch it from firmware to be able
  to do normal scan after that.

Modified:
  head/sys/dev/isp/isp.c
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_library.c
  head/sys/dev/isp/ispvar.h

Modified: head/sys/dev/isp/isp.c
==
--- head/sys/dev/isp/isp.c  Sat Nov 21 20:52:40 2015(r291143)
+++ head/sys/dev/isp/isp.c  Sat Nov 21 21:01:00 2015(r291144)
@@ -2320,7 +2320,8 @@ isp_mark_portdb(ispsoftc_t *isp, int cha
lp = >portdb[i];
if (lp->state == FC_PORTDB_STATE_NIL)
continue;
-   if ((lp->portid & 0xfffc00) == 0xfffc00)
+   if (lp->portid >= DOMAIN_CONTROLLER_BASE &&
+   lp->portid <= DOMAIN_CONTROLLER_END)
continue;
fcp->portdb[i].probational = 1;
}
@@ -2787,9 +2788,6 @@ isp_fclink_test(ispsoftc_t *isp, int cha
 
fcp = FCPARAM(isp, chan);
 
-   /* Mark port database entries probational for following scan. */
-   isp_mark_portdb(isp, chan);
-
if (fcp->isp_loopstate >= LOOP_LTEST_DONE)
return (0);
 
@@ -3079,6 +3077,48 @@ isp_pdb_add_update(ispsoftc_t *isp, int 
 }
 
 /*
+ * Fix port IDs for logged-in initiators on pre-2400 chips.
+ * For those chips we are not receiving login events, adding initiators
+ * based on ATIO requests, but there is no port ID in that structure.
+ */
+static void
+isp_fix_portids(ispsoftc_t *isp, int chan)
+{
+   fcparam *fcp = FCPARAM(isp, chan);
+   isp_pdb_t pdb;
+   uint64_t wwpn;
+   int i, r;
+
+   for (i = 0; i < MAX_FC_TARG; i++) {
+   fcportdb_t *lp = >portdb[i];
+
+   if (lp->state == FC_PORTDB_STATE_NIL ||
+   lp->state == FC_PORTDB_STATE_ZOMBIE)
+   continue;
+   if (VALID_PORT(lp->portid))
+   continue;
+
+   r = isp_getpdb(isp, chan, lp->handle, , 1);
+   if (fcp->isp_loopstate < LOOP_SCANNING_LOOP)
+   return;
+   if (r != 0) {
+   isp_prt(isp, ISP_LOGDEBUG1,
+   "Chan %d FC Scan Loop handle %d returned %x",
+   chan, lp->handle, r);
+   continue;
+   }
+
+   MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname);
+   if (lp->port_wwn != wwpn)
+   continue;
+   lp->portid = lp->new_portid = pdb.portid;
+   isp_prt(isp, ISP_LOG_SANCFG,
+   "Chan %d Port 0x%06x@0x%04x is fixed",
+   chan, pdb.portid, pdb.handle);
+   }
+}
+
+/*
  * Scan local loop for devices.
  */
 static int
@@ -3097,13 +3137,18 @@ isp_scan_loop(ispsoftc_t *isp, int chan)
return (0);
}
isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan", chan);
+   fcp->isp_loopstate = LOOP_SCANNING_LOOP;
if (TOPO_IS_FABRIC(fcp->isp_topo)) {
+   if (!IS_24XX(isp)) {
+   isp_fix_portids(isp, chan);
+   if (fcp->isp_loopstate < LOOP_SCANNING_LOOP)
+   goto abort;
+   }
isp_prt(isp, ISP_LOG_SANCFG,
"Chan %d FC loop scan done (no loop)", chan);
fcp->isp_loopstate = LOOP_LSCAN_DONE;
return (0);
}
-   fcp->isp_loopstate = LOOP_SCANNING_LOOP;
 
lim = LOCAL_LOOP_LIM;
r = isp_gethandles(isp, chan, handles, , 1, 1);
@@ -3121,6 +3166,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan)
/*
 * Run through the list and get the port database info for each one.
 */
+   isp_mark_portdb(isp, chan);
for (idx = 0; idx < lim; idx++) {
handle = handles[idx];
 
@@ -3162,8 +3208,6 @@ abort:
isp_prt(isp, ISP_LOGDEBUG1,
"Chan %d FC Scan Loop handle %d returned %x",
chan, handle, r);
-   if (fcp->isp_loopstate < LOOP_SCANNING_LOOP)
-   goto abort;
continue;
}
 
@@ -3363,13 +3407,13 @@ isp_scan_fabric(ispsoftc_t *isp, int cha
return (0);
}
isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan", chan);
+   fcp->isp_loopstate = LOOP_SCANNING_FABRIC;
if (!TOPO_IS_FABRIC(fcp->isp_topo)) {
fcp->isp_loopstate = LOOP_FSCAN_DONE;
isp_prt(isp, 

svn commit: r291149 - head/sys/arm/freescale/imx

2015-11-21 Thread Ian Lepore
Author: ian
Date: Sat Nov 21 23:30:47 2015
New Revision: 291149
URL: https://svnweb.freebsd.org/changeset/base/291149

Log:
  Update the imx5/imx6 cpu_reset() implementation based on a new understanding
  of the SRS (software reset) bit in the watchdog control register.  Despite
  what the manual seems to imply, this bit DOES trigger an immediate reset, as
  opposed to simply flagging the type of reset as software-triggered.

Modified:
  head/sys/arm/freescale/imx/imx_machdep.c

Modified: head/sys/arm/freescale/imx/imx_machdep.c
==
--- head/sys/arm/freescale/imx/imx_machdep.cSat Nov 21 23:04:12 2015
(r291148)
+++ head/sys/arm/freescale/imx/imx_machdep.cSat Nov 21 23:30:47 2015
(r291149)
@@ -72,16 +72,14 @@ imx_wdog_cpu_reset(vm_offset_t wdcr_phys
volatile uint16_t * pcr;
 
/*
-* The deceptively simple write of WDOG_CR_WDE enables the watchdog,
-* sets the timeout to its minimum value (half a second), and also
-* clears the SRS bit which results in the SFTW (software-requested
-* reset) bit being set in the watchdog status register after the reset.
-* This is how software can distinguish a reset from a wdog timeout.
+* Trigger an immediate reset by clearing the SRS bit in the watchdog
+* control register.  The reset happens on the next cycle of the wdog
+* 32KHz clock, so hang out in a spin loop until the reset takes effect.
 */
if ((pcr = arm_devmap_ptov(wdcr_physaddr, sizeof(*pcr))) == NULL) {
printf("cpu_reset() can't find its control register... locking 
up now.");
} else {
-   *pcr = WDOG_CR_WDE;
+   *pcr &= ~WDOG_CR_SRS;
}
for (;;)
continue;
___
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: r291150 - in head/sys/fs: nfs nfsserver

2015-11-21 Thread Rick Macklem
Author: rmacklem
Date: Sat Nov 21 23:55:46 2015
New Revision: 291150
URL: https://svnweb.freebsd.org/changeset/base/291150

Log:
  When the nfsd threads are terminated, the NFSv4 server state
  (opens, locks, etc) is retained, which I believe is correct behaviour.
  However, for NFSv4.1, the server also retained a reference to the xprt
  (RPC transport socket structure) for the backchannel. This caused
  svcpool_destroy() to not call SVC_DESTROY() for the xprt and allowed
  a socket upcall to occur after the mutexes in the svcpool were destroyed,
  causing a crash.
  This patch fixes the code so that the backchannel xprt structure is
  dereferenced just before svcpool_destroy() is called, so the code
  does do an SVC_DESTROY() on the xprt, which shuts down the socket upcall.
  
  Tested by:g_amana...@yahoo.com
  PR:   204340
  MFC after:2 weeks

Modified:
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfsserver/nfs_nfsdkrpc.c
  head/sys/fs/nfsserver/nfs_nfsdstate.c

Modified: head/sys/fs/nfs/nfs_var.h
==
--- head/sys/fs/nfs/nfs_var.h   Sat Nov 21 23:30:47 2015(r291149)
+++ head/sys/fs/nfs/nfs_var.h   Sat Nov 21 23:55:46 2015(r291150)
@@ -135,6 +135,7 @@ int nfsrv_checksequence(struct nfsrv_des
 uint32_t *, int, uint32_t *, NFSPROC_T *);
 int nfsrv_checkreclaimcomplete(struct nfsrv_descript *);
 void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **);
+void nfsrv_freeallbackchannel_xprts(void);
 
 /* nfs_nfsdserv.c */
 int nfsrvd_access(struct nfsrv_descript *, int,

Modified: head/sys/fs/nfsserver/nfs_nfsdkrpc.c
==
--- head/sys/fs/nfsserver/nfs_nfsdkrpc.cSat Nov 21 23:30:47 2015
(r291149)
+++ head/sys/fs/nfsserver/nfs_nfsdkrpc.cSat Nov 21 23:55:46 2015
(r291150)
@@ -544,6 +544,7 @@ nfsrvd_init(int terminating)
if (terminating) {
nfsd_master_proc = NULL;
NFSD_UNLOCK();
+   nfsrv_freeallbackchannel_xprts();
svcpool_destroy(nfsrvd_pool);
nfsrvd_pool = NULL;
NFSD_LOCK();

Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c
==
--- head/sys/fs/nfsserver/nfs_nfsdstate.c   Sat Nov 21 23:30:47 2015
(r291149)
+++ head/sys/fs/nfsserver/nfs_nfsdstate.c   Sat Nov 21 23:55:46 2015
(r291150)
@@ -4191,10 +4191,23 @@ nfsrv_docallback(struct nfsclient *clp, 
if (!error) {
if ((nd->nd_flag & ND_NFSV41) != 0) {
KASSERT(sep != NULL, ("sep NULL"));
-   error = newnfs_request(nd, NULL, clp, >lc_req,
-   NULL, NULL, cred, clp->lc_program,
-   clp->lc_req.nr_vers, NULL, 1, NULL,
-   >sess_cbsess);
+   if (sep->sess_cbsess.nfsess_xprt != NULL)
+   error = newnfs_request(nd, NULL, clp,
+   >lc_req, NULL, NULL, cred,
+   clp->lc_program, clp->lc_req.nr_vers, NULL,
+   1, NULL, >sess_cbsess);
+   else {
+   /*
+* This should probably never occur, but if a
+* client somehow does an RPC without a
+* SequenceID Op that causes a callback just
+* after the nfsd threads have been terminated
+* and restared we could conceivably get here
+* without a backchannel xprt.
+*/
+   printf("nfsrv_docallback: no xprt\n");
+   error = ECONNREFUSED;
+   }
nfsrv_freesession(sep, NULL);
} else
error = newnfs_request(nd, NULL, clp, >lc_req,
@@ -5784,14 +5797,16 @@ nfsrv_checksequence(struct nfsrv_descrip
 * If this session handles the backchannel, save the nd_xprt for this
 * RPC, since this is the one being used.
 */
-   if (sep->sess_cbsess.nfsess_xprt != NULL &&
+   if (sep->sess_clp->lc_req.nr_client != NULL &&
(sep->sess_crflags & NFSV4CRSESS_CONNBACKCHAN) != 0) {
savxprt = sep->sess_cbsess.nfsess_xprt;
SVC_ACQUIRE(nd->nd_xprt);
-   nd->nd_xprt->xp_p2 = savxprt->xp_p2;
+   nd->nd_xprt->xp_p2 =
+   sep->sess_clp->lc_req.nr_client->cl_private;
nd->nd_xprt->xp_idletimeout = 0;/* Disable timeout. */
sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
-   SVC_RELEASE(savxprt);
+   if 

svn commit: r291152 - head/sys/powerpc/mpc85xx

2015-11-21 Thread Justin Hibbits
Author: jhibbits
Date: Sun Nov 22 01:20:36 2015
New Revision: 291152
URL: https://svnweb.freebsd.org/changeset/base/291152

Log:
  Remove a debug panic that crept into r291151

Modified:
  head/sys/powerpc/mpc85xx/pci_mpc85xx.c

Modified: head/sys/powerpc/mpc85xx/pci_mpc85xx.c
==
--- head/sys/powerpc/mpc85xx/pci_mpc85xx.c  Sun Nov 22 01:16:43 2015
(r291151)
+++ head/sys/powerpc/mpc85xx/pci_mpc85xx.c  Sun Nov 22 01:20:36 2015
(r291152)
@@ -284,7 +284,6 @@ fsl_pcib_attach(device_t dev)
return (ofw_pci_attach(dev));
 
 err:
-   //panic("Because I said so\n");
return (ENXIO);
 }
 
___
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: r291155 - head/usr.bin/bc

2015-11-21 Thread Pedro F. Giffuni
Author: pfg
Date: Sun Nov 22 02:43:14 2015
New Revision: 291155
URL: https://svnweb.freebsd.org/changeset/base/291155

Log:
  bc: sync with OpenBSD
  
  tty.c Rev. 1.3
  Avoid unintended problems with operator precedence when doing an
  assignment and comparison.
  
  bc.1, Rev. 1.31, 1.32
  '.Ql Quit' -> '.Ql quit' because only the lowercase command is valid.
  Clarify sentence about `quit` in BUGS section.
  
  extern.h, Rev. 1.12
  whitespace
  
  bc.y, Rev. 1.47
  Prefer setvbuf() to setlinebuf() for portability
  
  Obtained from:OpenBSD
  MFC after:2 weeks

Modified:
  head/usr.bin/bc/bc.1
  head/usr.bin/bc/bc.y
  head/usr.bin/bc/extern.h
  head/usr.bin/bc/tty.c

Modified: head/usr.bin/bc/bc.1
==
--- head/usr.bin/bc/bc.1Sun Nov 22 02:40:19 2015(r291154)
+++ head/usr.bin/bc/bc.1Sun Nov 22 02:43:14 2015(r291155)
@@ -1,5 +1,5 @@
 .\"$FreeBSD$
-.\"$OpenBSD: bc.1,v 1.30 2014/01/14 07:42:42 jmc Exp $
+.\"$OpenBSD: bc.1,v 1.32 2015/11/17 05:45:35 mmcc Exp $
 .\"
 .\" Copyright (C) Caldera International Inc.  2001-2002.
 .\" All rights reserved.
@@ -35,7 +35,7 @@
 .\"
 .\"@(#)bc.16.8 (Berkeley) 8/8/91
 .\"
-.Dd April 16, 2014
+.Dd November 21 2015 
 .Dt BC 1
 .Os
 .Sh NAME
@@ -407,8 +407,9 @@ The current version of the
 utility was written by
 .An Otto Moerbeek .
 .Sh BUGS
-.Ql Quit
-is interpreted when read, not when executed.
+The
+.Ql quit
+statement is interpreted when read, not when executed.
 .Pp
 Some non-portable extensions, as found in the GNU version of the
 .Nm

Modified: head/usr.bin/bc/bc.y
==
--- head/usr.bin/bc/bc.ySun Nov 22 02:40:19 2015(r291154)
+++ head/usr.bin/bc/bc.ySun Nov 22 02:43:14 2015(r291155)
@@ -1125,7 +1125,7 @@ main(int argc, char *argv[])
int ch, i;
 
init();
-   setlinebuf(stdout);
+   setvbuf(stdout, NULL, _IOLBF, 0);
 
sargv = malloc(argc * sizeof(char *));
if (sargv == NULL)

Modified: head/usr.bin/bc/extern.h
==
--- head/usr.bin/bc/extern.hSun Nov 22 02:40:19 2015(r291154)
+++ head/usr.bin/bc/extern.hSun Nov 22 02:43:14 2015(r291155)
@@ -1,5 +1,5 @@
 /* $FreeBSD$   */
-/*  $OpenBSD: extern.h,v 1.10 2013/09/19 16:12:01 otto Exp $   */
+/*  $OpenBSD: extern.h,v 1.12 2014/04/17 19:07:14 otto Exp $   */
 
 /*
  * Copyright (c) 2003, Otto Moerbeek 
@@ -39,9 +39,9 @@ extern intfileindex;
 extern int sargc;
 extern const char  **sargv;
 extern const char  *filename;
-extern bool interactive;
-extern EditLine*el;
-extern History *hist;
-extern HistEventhe;
+extern bool interactive;
+extern EditLine*el;
+extern History *hist;
+extern HistEvent he;
 extern char*cmdexpr;
 extern struct termios ttysaved;

Modified: head/usr.bin/bc/tty.c
==
--- head/usr.bin/bc/tty.c   Sun Nov 22 02:40:19 2015(r291154)
+++ head/usr.bin/bc/tty.c   Sun Nov 22 02:43:14 2015(r291155)
@@ -1,5 +1,5 @@
 /* $FreeBSD$   */
-/*  $OpenBSD: tty.c,v 1.2 2013/11/12 13:54:51 deraadt Exp $*/
+/*  $OpenBSD: tty.c,v 1.3 2015/09/05 09:49:24 jsg Exp $*/
 
 /*
  * Copyright (c) 2013, Otto Moerbeek 
@@ -30,7 +30,7 @@ settty(struct termios *t)
 {
int ret;
 
-   while ((ret = tcsetattr(0, TCSADRAIN,  t) == -1) && errno == EINTR)
+   while ((ret = tcsetattr(0, TCSADRAIN,  t)) == -1 && errno == EINTR)
continue;
return ret;
 }
@@ -40,7 +40,7 @@ gettty(struct termios *t)
 {
int ret;
 
-   while ((ret = tcgetattr(0, t) == -1) && errno == EINTR)
+   while ((ret = tcgetattr(0, t)) == -1 && errno == EINTR)
continue;
return ret;
 }
___
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: r291154 - head/sys/mips/malta

2015-11-21 Thread Adrian Chadd
Author: adrian
Date: Sun Nov 22 02:40:19 2015
New Revision: 291154
URL: https://svnweb.freebsd.org/changeset/base/291154

Log:
  [mips]: Don't hard-code PHYS_AVAIL_ENTRIES.

Modified:
  head/sys/mips/malta/malta_machdep.c

Modified: head/sys/mips/malta/malta_machdep.c
==
--- head/sys/mips/malta/malta_machdep.c Sun Nov 22 02:01:01 2015
(r291153)
+++ head/sys/mips/malta/malta_machdep.c Sun Nov 22 02:40:19 2015
(r291154)
@@ -177,7 +177,7 @@ mips_init(unsigned long memsize, uint64_
 {
int i;
 
-   for (i = 0; i < 10; i++) {
+   for (i = 0; i < PHYS_AVAIL_ENTRIES; i++) {
phys_avail[i] = 0;
}
 
___
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: r291156 - head/sys/dev/hyperv/netvsc

2015-11-21 Thread Wei Hu
Author: whu
Date: Sun Nov 22 05:26:13 2015
New Revision: 291156
URL: https://svnweb.freebsd.org/changeset/base/291156

Log:
  Ignore the inbound checksum flags when doing packet forwarding in netvsc 
driver.
  
  PR: 20363
  Submitted by: whu
  Reviewed by: royger, whu
  Approved by: royger
  MFC after: 1 week
  Relnotes: No
  Sponsored by: Microsoft OSTC
  Differential Revision:  https://reviews.freebsd.org/D4131

Modified:
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Sun Nov 22 02:43:14 
2015(r291155)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Sun Nov 22 05:26:13 
2015(r291156)
@@ -128,6 +128,15 @@ __FBSDID("$FreeBSD$");
 #define HV_NV_SC_PTR_OFFSET_IN_BUF 0
 #define HV_NV_PACKET_OFFSET_IN_BUF 16
 
+/*
+ * A unified flag for all outbound check sum flags is useful,
+ * and it helps avoiding unnecessary check sum calculation in
+ * network forwarding scenario.
+ */
+#define HV_CSUM_FOR_OUTBOUND   \
+(CSUM_IP|CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP|CSUM_IP_TSO| \
+CSUM_IP_ISCSI|CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP| \
+CSUM_IP6_TSO|CSUM_IP6_ISCSI)
 
 /*
  * Data types
@@ -570,7 +579,8 @@ hn_start_locked(struct ifnet *ifp)
packet->vlan_tci & 0xfff;
}
 
-   if (0 == m_head->m_pkthdr.csum_flags) {
+   /* Only check the flags for outbound and ignore the ones for 
inbound */
+   if (0 == (m_head->m_pkthdr.csum_flags & HV_CSUM_FOR_OUTBOUND)) {
goto pre_send;
}
 
___
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: r291129 - head/usr.bin/m4

2015-11-21 Thread Baptiste Daroussin
Author: bapt
Date: Sat Nov 21 11:06:20 2015
New Revision: 291129
URL: https://svnweb.freebsd.org/changeset/base/291129

Log:
  Revert a modification that crept in and should not

Modified:
  head/usr.bin/m4/extern.h

Modified: head/usr.bin/m4/extern.h
==
--- head/usr.bin/m4/extern.hSat Nov 21 11:05:38 2015(r291128)
+++ head/usr.bin/m4/extern.hSat Nov 21 11:06:20 2015(r291129)
@@ -112,7 +112,7 @@ extern void usage(void);
 extern voidresizedivs(int);
 extern size_t  buffer_mark(void);
 extern voiddump_buffer(FILE *, size_t);
-extern void__dead m4errx(int, const char *, ...);
+extern voidm4errx(int, const char *, ...);
 
 extern int obtain_char(struct input_file *);
 extern voidset_input(struct input_file *, FILE *, const char *);
___
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: r291125 - in head: contrib/xz contrib/xz/src/common contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/common contrib/xz/src/liblzma/lz contrib/xz/src/lib...

2015-11-21 Thread Xin LI
Author: delphij
Date: Sat Nov 21 09:09:25 2015
New Revision: 291125
URL: https://svnweb.freebsd.org/changeset/base/291125

Log:
  MFV r291123:
  
  xz 5.2.2.
  
  MFC after:1 month
  Relnotes: yes

Modified:
  head/contrib/xz/ChangeLog
  head/contrib/xz/THANKS
  head/contrib/xz/src/common/tuklib_physmem.c
  head/contrib/xz/src/liblzma/api/lzma.h
  head/contrib/xz/src/liblzma/api/lzma/version.h
  head/contrib/xz/src/liblzma/common/index.c
  head/contrib/xz/src/liblzma/lz/lz_encoder.c
  head/contrib/xz/src/liblzma/lzma/lzma_encoder.c
  head/contrib/xz/src/xz/args.h
  head/contrib/xz/src/xz/file_io.c
  head/contrib/xz/src/xz/main.c
  head/contrib/xz/src/xz/message.c
  head/contrib/xz/src/xz/options.c
  head/contrib/xz/src/xz/xz.1
  head/lib/liblzma/config.h
Directory Properties:
  head/contrib/xz/   (props changed)

Modified: head/contrib/xz/ChangeLog
==
--- head/contrib/xz/ChangeLog   Sat Nov 21 07:15:07 2015(r291124)
+++ head/contrib/xz/ChangeLog   Sat Nov 21 09:09:25 2015(r291125)
@@ -1,3 +1,313 @@
+commit 9815cdf6987ef91a85493bfcfd1ce2aaf3b47a0a
+Author: Lasse Collin 
+Date:   2015-09-29 13:59:35 +0300
+
+Bump version and soname for 5.2.2.
+
+ src/liblzma/Makefile.am| 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cbe0cec8476bdd0416c7ca9bc83895c9bea1cf78
+Author: Lasse Collin 
+Date:   2015-09-29 13:57:28 +0300
+
+Update NEWS for 5.2.2.
+
+ NEWS | 18 ++
+ 1 file changed, 18 insertions(+)
+
+commit 49427ce7eececdd18bbd35dab23c81910d083e1c
+Author: Andre Noll 
+Date:   2015-05-28 15:50:00 +0200
+
+Fix typo in German translation.
+
+As pointed out by Robert Pollak, there's a typo in the German
+translation of the compression preset option (-0 ... -9) help text.
+"The compressor" translates to "der Komprimierer", and the genitive
+form is "des Komprimierers". The old word makes no sense at all.
+
+ po/de.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 608d6f06c940e7f28c25de005e8b99bdff42d27c
+Author: Hauke Henningsen 
+Date:   2015-08-17 04:59:54 +0200
+
+Update German translation, mostly wrt orthography
+
+Provide an update of the German translation.
+* A lot of compound words were previously written with spaces, while
+  German orthography is relatively clear in that the components
+  should not be separated.
+* When referring to the actual process of (de)compression rather than the
+  concept, replace “(De-)Kompression” with “(De-)Komprimierung”.
+  Previously, both forms were used in this context and are now used in a
+  manner consistent with “Komprimierung” being more likely to refer to
+  a process.
+* Consistently translate “standard input”/“output”
+* Use “Zeichen” instead of false friend “Charakter” for “character”
+* Insert commas around relative clauses (as required in German)
+* Some other minor corrections
+* Capitalize “ß” as “ẞ”
+* Consistently start option descriptions in --help with capital letters
+
+Acked-By: Andre Noll 
+
+* Update after msgmerge
+
+ po/de.po | 383 ---
+ 1 file changed, 196 insertions(+), 187 deletions(-)
+
+commit c8988414e5b67b8ef2fe0ba7b1ccdd0ec73c60d3
+Author: Lasse Collin 
+Date:   2015-08-11 13:23:04 +0300
+
+Build: Minor Cygwin cleanup.
+
+Some tests used "cygwin*" and some used "cygwin". I changed
+them all to use "cygwin". Shouldn't affect anything in practice.
+
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 85a6dfed53477906bfe9a7c0123dd412e391cb48
+Author: Lasse Collin 
+Date:   2015-08-11 13:21:52 +0300
+
+Build: Support building of MSYS2 binaries.
+
+ configure.ac | 16 +++-
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+commit 77f270be8432df2e4516a0c48814b6976d6618c5
+Author: Lasse Collin 
+Date:   2015-08-09 21:06:26 +0300
+
+Windows: Define DLL_EXPORT when building liblzma.dll with MSVC.
+
+src/liblzma/common/common.h uses it to set __declspec(dllexport)
+for the API symbols.
+
+Thanks to Adam Walling.
+
+ windows/liblzma_dll.vcxproj | 12 ++--
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 8c975446c5903090a5a8493b5b96b71003056a88
+Author: Lasse Collin 
+Date:   2015-08-09 21:02:20 +0300
+
+Windows: Omit unneeded header files from MSVC project files.
+
+ windows/liblzma.vcxproj | 5 -
+ windows/liblzma_dll.vcxproj | 5 -
+ 2 files changed, 10 deletions(-)
+
+commit 119a00434954726ca58e4a578e6469f530fca30e
+Author: Lasse Collin 

svn commit: r291126 - in head: share/examples/ses/srcs sys/cam/scsi

2015-11-21 Thread Alexander Motin
Author: mav
Date: Sat Nov 21 10:22:01 2015
New Revision: 291126
URL: https://svnweb.freebsd.org/changeset/base/291126

Log:
  Add API to obtain primary enclosure name and ID for /dev/sesX devices.
  
  sesX device number may change between reboots, so to properly identify
  the instance we need more data.  Name and ID reported here may mach ones
  reported by SCSI device, but that is not really required by specs.
  
  MFC after:1 week
  Sponsored by: iXsystems, Inc.

Modified:
  head/share/examples/ses/srcs/getencstat.c
  head/sys/cam/scsi/scsi_enc.c
  head/sys/cam/scsi/scsi_enc.h
  head/sys/cam/scsi/scsi_enc_ses.c

Modified: head/share/examples/ses/srcs/getencstat.c
==
--- head/share/examples/ses/srcs/getencstat.c   Sat Nov 21 09:09:25 2015
(r291125)
+++ head/share/examples/ses/srcs/getencstat.c   Sat Nov 21 10:22:01 2015
(r291126)
@@ -48,12 +48,14 @@
 int
 main(int a, char **v)
 {
+   encioc_string_t stri;
encioc_element_t *objp;
encioc_elm_status_t ob;
encioc_elm_desc_t objd;
encioc_elm_devnames_t objdn;
int fd, nobj, f, i, verbose, quiet, errors;
u_char estat;
+   char str[32];
 
if (a < 2) {
fprintf(stderr, "usage: %s [ -v ] device [ device ... ]\n", *v);
@@ -78,6 +80,16 @@ main(int a, char **v)
perror(*v);
continue;
}
+   if (verbose > 1) {
+   stri.bufsiz = sizeof(str);
+   stri.buf = [0];
+   if (ioctl(fd, ENCIOC_GETENCNAME, (caddr_t) ) == 0)
+   printf("%s: Enclosure Name: %s\n", *v, 
stri.buf);
+   stri.bufsiz = sizeof(str);
+   stri.buf = [0];
+   if (ioctl(fd, ENCIOC_GETENCID, (caddr_t) ) == 0)
+   printf("%s: Enclosure ID: %s\n", *v, stri.buf);
+   }
if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) ) < 0) {
perror("ENCIOC_GETNELM");
(void) close(fd);

Modified: head/sys/cam/scsi/scsi_enc.c
==
--- head/sys/cam/scsi/scsi_enc.cSat Nov 21 09:09:25 2015
(r291125)
+++ head/sys/cam/scsi/scsi_enc.cSat Nov 21 10:22:01 2015
(r291126)
@@ -407,6 +407,8 @@ enc_ioctl(struct cdev *dev, u_long cmd, 
case ENCIOC_GETELMSTAT:
case ENCIOC_GETELMDESC:
case ENCIOC_GETELMDEVNAMES:
+   case ENCIOC_GETENCNAME:
+   case ENCIOC_GETENCID:
break;
default:
if ((flag & FWRITE) == 0) {
@@ -461,6 +463,8 @@ enc_ioctl(struct cdev *dev, u_long cmd, 
 
case ENCIOC_GETSTRING:
case ENCIOC_SETSTRING:
+   case ENCIOC_GETENCNAME:
+   case ENCIOC_GETENCID:
if (enc->enc_vec.handle_string == NULL) {
error = EINVAL;
break;

Modified: head/sys/cam/scsi/scsi_enc.h
==
--- head/sys/cam/scsi/scsi_enc.hSat Nov 21 09:09:25 2015
(r291125)
+++ head/sys/cam/scsi/scsi_enc.hSat Nov 21 10:22:01 2015
(r291126)
@@ -46,6 +46,8 @@
 #defineENCIOC_GETELMDEVNAMES   _IO(ENCIOC, 10)
 #defineENCIOC_GETSTRING_IO(ENCIOC, 11)
 #defineENCIOC_SETSTRING_IO(ENCIOC, 12)
+#defineENCIOC_GETENCNAME   _IO(ENCIOC, 13)
+#defineENCIOC_GETENCID _IO(ENCIOC, 14)
 
 /*
  * Platform Independent Definitions for enclosure devices.

Modified: head/sys/cam/scsi/scsi_enc_ses.c
==
--- head/sys/cam/scsi/scsi_enc_ses.cSat Nov 21 09:09:25 2015
(r291125)
+++ head/sys/cam/scsi/scsi_enc_ses.cSat Nov 21 10:22:01 2015
(r291126)
@@ -345,8 +345,9 @@ typedef struct ses_cache {
const struct ses_cfg_page   *cfg_page;
 
/* References into the config page. */
+   int  ses_nsubencs;
const struct ses_enc_desc * const   *subencs;
-   uint8_t  ses_ntypes;
+   int  ses_ntypes;
const ses_type_t*ses_types;
 
/* Source for all the status pointers */
@@ -1382,11 +1383,12 @@ ses_process_config(enc_softc_t *enc, str
 * The cast here is not required in C++ but C99 is not so
 * sophisticated (see C99 6.5.16.1(1)).
 */
+   ses_cache->ses_nsubencs = ses_cfg_page_get_num_subenc(cfg_page);
ses_cache->subencs = subencs;
 
buf_subenc = cfg_page->subencs;
cur_subenc = subencs;
-   last_subenc = [ses_cfg_page_get_num_subenc(cfg_page) - 1];
+   

Re: svn commit: r291126 - in head: share/examples/ses/srcs sys/cam/scsi

2015-11-21 Thread Alexander Motin
On 21.11.2015 12:41, Baptiste Daroussin wrote:
> On Sat, Nov 21, 2015 at 10:22:01AM +, Alexander Motin wrote:
>> Author: mav
>> Date: Sat Nov 21 10:22:01 2015
>> New Revision: 291126
>> URL: https://svnweb.freebsd.org/changeset/base/291126
>>
>> Log:
>>   Add API to obtain primary enclosure name and ID for /dev/sesX devices.
>>   
>>   sesX device number may change between reboots, so to properly identify
>>   the instance we need more data.  Name and ID reported here may mach ones
>>   reported by SCSI device, but that is not really required by specs.
>>   
>>   MFC after: 1 week
>>   Sponsored by:  iXsystems, Inc.
>>
> Any plan to add that to sesutil(8) :)

This patch was created long ago before sesutil appeared, just got lost
in internal repo. So, while it indeed would be good, I haven't thought
about it. If anybody wants to do it -- feel free.

-- 
Alexander Motin
___
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: r291128 - head/usr.bin/m4

2015-11-21 Thread Baptiste Daroussin
Author: bapt
Date: Sat Nov 21 11:05:38 2015
New Revision: 291128
URL: https://svnweb.freebsd.org/changeset/base/291128

Log:
  Synchronize m4(1) with OpenBSD

Modified:
  head/usr.bin/m4/eval.c
  head/usr.bin/m4/extern.h
  head/usr.bin/m4/m4.1
  head/usr.bin/m4/main.c
  head/usr.bin/m4/mdef.h
  head/usr.bin/m4/pathnames.h

Modified: head/usr.bin/m4/eval.c
==
--- head/usr.bin/m4/eval.c  Sat Nov 21 10:52:32 2015(r291127)
+++ head/usr.bin/m4/eval.c  Sat Nov 21 11:05:38 2015(r291128)
@@ -1,4 +1,4 @@
-/* $OpenBSD: eval.c,v 1.73 2014/07/11 21:04:17 espie Exp $ */
+/* $OpenBSD: eval.c,v 1.74 2015/02/05 12:59:57 millert Exp $   */
 /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $  */
 
 /*
@@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
 #include 
 #include 
 #include 

Modified: head/usr.bin/m4/extern.h
==
--- head/usr.bin/m4/extern.hSat Nov 21 10:52:32 2015(r291127)
+++ head/usr.bin/m4/extern.hSat Nov 21 11:05:38 2015(r291128)
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.54 2014/05/12 19:11:19 espie Exp $ */
+/* $OpenBSD: extern.h,v 1.54 2014/05/12 19:11:19 espie Exp $   */
 /* $NetBSD: extern.h,v 1.3 1996/01/13 23:25:24 pk Exp $*/
 
 /*-
@@ -112,7 +112,7 @@ extern void usage(void);
 extern voidresizedivs(int);
 extern size_t  buffer_mark(void);
 extern voiddump_buffer(FILE *, size_t);
-extern voidm4errx(int, const char *, ...);
+extern void__dead m4errx(int, const char *, ...);
 
 extern int obtain_char(struct input_file *);
 extern voidset_input(struct input_file *, FILE *, const char *);

Modified: head/usr.bin/m4/m4.1
==
--- head/usr.bin/m4/m4.1Sat Nov 21 10:52:32 2015(r291127)
+++ head/usr.bin/m4/m4.1Sat Nov 21 11:05:38 2015(r291128)
@@ -1,5 +1,5 @@
 .\"$NetBSD: m4.1,v 1.23 2012/04/08 22:00:39 wiz Exp $
-.\"@(#) $OpenBSD: m4.1,v 1.62 2014/04/14 07:00:47 jmc Exp $
+.\"@(#) $OpenBSD: m4.1,v 1.63 2015/09/14 20:06:58 schwarze Exp $
 .\"
 .\" Copyright (c) 1989, 1993
 .\"The Regents of the University of California.  All rights reserved.
@@ -33,7 +33,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd $Mdocdate: April 14 2014 $
+.Dd $Mdocdate: September 14 2015 $
 .Dt M4 1
 .Os
 .Sh NAME
@@ -98,9 +98,7 @@ recognized as special when not followed 
 .Pp
 The options are as follows:
 .Bl -tag -width Ds
-.It Fl D Ns Ar name Ns Oo
-.Pf = Ns Ar value
-.Oc
+.It Fl D Ns Ar name Ns Op = Ns Ar value
 Define the symbol
 .Ar name
 to have some value (or

Modified: head/usr.bin/m4/main.c
==
--- head/usr.bin/m4/main.c  Sat Nov 21 10:52:32 2015(r291127)
+++ head/usr.bin/m4/main.c  Sat Nov 21 11:05:38 2015(r291128)
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.84 2014/12/21 09:33:12 espie Exp $ */
+/* $OpenBSD: main.c,v 1.86 2015/11/03 16:21:47 deraadt Exp $   */
 /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $*/
 
 /*-
@@ -133,13 +133,7 @@ static struct keyblk keywrds[] = { /* m4
{ "traceon",  TRACEONTYPE | NOARGS },
{ "traceoff", TRACEOFFTYPE | NOARGS },
 
-#if defined(unix) || defined(__unix__)
{ "unix", SELFTYPE | NOARGS },
-#else
-#ifdef vms
-   { "vms",  SELFTYPE | NOARGS },
-#endif
-#endif
 };
 
 #define MAXKEYS(sizeof(keywrds)/sizeof(struct keyblk))
@@ -477,14 +471,14 @@ macro(void)
 
default:
if (LOOK_AHEAD(t, scommt)) {
-   char *cp;
-   for (cp = scommt; *cp; cp++)
-   chrsave(*cp);
+   char *p;
+   for (p = scommt; *p; p++)
+   chrsave(*p);
for(;;) {
t = gpbc();
if (LOOK_AHEAD(t, ecommt)) {
-   for (cp = ecommt; *cp; cp++)
-   chrsave(*cp);
+   for (p = ecommt; *p; p++)
+   chrsave(*p);
break;
}
if (t == EOF)

Modified: head/usr.bin/m4/mdef.h
==
--- head/usr.bin/m4/mdef.h  Sat Nov 21 10:52:32 2015(r291127)
+++ head/usr.bin/m4/mdef.h  Sat Nov 21 11:05:38 2015(r291128)
@@ 

Re: svn commit: r291126 - in head: share/examples/ses/srcs sys/cam/scsi

2015-11-21 Thread Baptiste Daroussin
On Sat, Nov 21, 2015 at 10:22:01AM +, Alexander Motin wrote:
> Author: mav
> Date: Sat Nov 21 10:22:01 2015
> New Revision: 291126
> URL: https://svnweb.freebsd.org/changeset/base/291126
> 
> Log:
>   Add API to obtain primary enclosure name and ID for /dev/sesX devices.
>   
>   sesX device number may change between reboots, so to properly identify
>   the instance we need more data.  Name and ID reported here may mach ones
>   reported by SCSI device, but that is not really required by specs.
>   
>   MFC after:  1 week
>   Sponsored by:   iXsystems, Inc.
> 
Any plan to add that to sesutil(8) :)

Best regards,
Bapt


signature.asc
Description: PGP signature


svn commit: r291127 - head/usr.bin/colldef

2015-11-21 Thread Baptiste Daroussin
Author: bapt
Date: Sat Nov 21 10:52:32 2015
New Revision: 291127
URL: https://svnweb.freebsd.org/changeset/base/291127

Log:
  colldef(1) does not need the libc's internal collate.h header anymore

Modified:
  head/usr.bin/colldef/Makefile
  head/usr.bin/colldef/parse.y

Modified: head/usr.bin/colldef/Makefile
==
--- head/usr.bin/colldef/Makefile   Sat Nov 21 10:22:01 2015
(r291126)
+++ head/usr.bin/colldef/Makefile   Sat Nov 21 10:52:32 2015
(r291127)
@@ -3,7 +3,7 @@
 PROG=  colldef
 SRCS=  parse.y scan.l y.tab.h
 LFLAGS=-8 -i
-CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/locale
+CFLAGS+=-I. -I${.CURDIR}
 CFLAGS+=-DCOLLATE_DEBUG -DYY_NO_UNPUT -DYY_NO_INPUT
 LIBADD=l
 

Modified: head/usr.bin/colldef/parse.y
==
--- head/usr.bin/colldef/parse.ySat Nov 21 10:22:01 2015
(r291126)
+++ head/usr.bin/colldef/parse.ySat Nov 21 10:52:32 2015
(r291127)
@@ -32,12 +32,13 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-#include "collate.h"
 #include "common.h"
 
 extern FILE *yyin;
___
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"