svn commit: r306899 - head/sys/arm/arm

2016-10-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sun Oct  9 04:37:21 2016
New Revision: 306899
URL: https://svnweb.freebsd.org/changeset/base/306899

Log:
  Fix release MSI method for ARM GIC

Modified:
  head/sys/arm/arm/gic.c

Modified: head/sys/arm/arm/gic.c
==
--- head/sys/arm/arm/gic.c  Sun Oct  9 04:36:40 2016(r306898)
+++ head/sys/arm/arm/gic.c  Sun Oct  9 04:37:21 2016(r306899)
@@ -1474,15 +1474,15 @@ arm_gicv2m_release_msi(device_t dev, dev
 
mtx_lock(>sc_mutex);
for (i = 0; i < count; i++) {
-   gi = (struct gic_irqsrc *)isrc;
+   gi = (struct gic_irqsrc *)isrc[i];
 
KASSERT((gi->gi_flags & GI_FLAG_MSI_USED) == GI_FLAG_MSI_USED,
("%s: Trying to release an unused MSI-X interrupt",
__func__));
 
gi->gi_flags &= ~GI_FLAG_MSI_USED;
-   mtx_unlock(>sc_mutex);
}
+   mtx_unlock(>sc_mutex);
 
return (0);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306898 - head/sys/arm/nvidia

2016-10-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sun Oct  9 04:36:40 2016
New Revision: 306898
URL: https://svnweb.freebsd.org/changeset/base/306898

Log:
  Fix release MSI method for NVidia Tegra PCI controller

Modified:
  head/sys/arm/nvidia/tegra_pcie.c

Modified: head/sys/arm/nvidia/tegra_pcie.c
==
--- head/sys/arm/nvidia/tegra_pcie.cSun Oct  9 04:29:42 2016
(r306897)
+++ head/sys/arm/nvidia/tegra_pcie.cSun Oct  9 04:36:40 2016
(r306898)
@@ -762,15 +762,15 @@ tegra_pcib_msi_release_msi(device_t dev,
sc = device_get_softc(dev);
mtx_lock(>mtx);
for (i = 0; i < count; i++) {
-   ti = (struct tegra_pcib_irqsrc *)isrc;
+   ti = (struct tegra_pcib_irqsrc *)isrc[i];
 
KASSERT((ti->flags & TEGRA_FLAG_MSI_USED) == 
TEGRA_FLAG_MSI_USED,
("%s: Trying to release an unused MSI-X interrupt",
__func__));
 
ti->flags &= ~TEGRA_FLAG_MSI_USED;
-   mtx_unlock(>mtx);
}
+   mtx_unlock(>mtx);
return (0);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306897 - head/sys/arm/nvidia

2016-10-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sun Oct  9 04:29:42 2016
New Revision: 306897
URL: https://svnweb.freebsd.org/changeset/base/306897

Log:
  Fix MSI allocation for NVidia Tegra
  
  - Fix range check
  - Due to checking found value in for(;;) condition irq after loop was
  always + 1 from actually found slot and wrong entry was marked as
  used which lead to returning slot 0 for all requests.

Modified:
  head/sys/arm/nvidia/tegra_pcie.c

Modified: head/sys/arm/nvidia/tegra_pcie.c
==
--- head/sys/arm/nvidia/tegra_pcie.cSun Oct  9 03:20:58 2016
(r306896)
+++ head/sys/arm/nvidia/tegra_pcie.cSun Oct  9 04:29:42 2016
(r306897)
@@ -710,7 +710,7 @@ tegra_pcib_msi_alloc_msi(device_t dev, d
mtx_lock(>mtx);
 
found = false;
-   for (irq = 0; irq < TEGRA_PCIB_MAX_MSI && !found; irq++) {
+   for (irq = 0; (irq + count - 1) < TEGRA_PCIB_MAX_MSI; irq++) {
/* Start on an aligned interrupt */
if ((irq & (maxcount - 1)) != 0)
continue;
@@ -719,20 +719,17 @@ tegra_pcib_msi_alloc_msi(device_t dev, d
found = true;
 
/* Check this range is valid */
-   for (end_irq = irq; end_irq != irq + count - 1; end_irq++) {
-   /* No free interrupts */
-   if (end_irq == (TEGRA_PCIB_MAX_MSI - 1)) {
-   found = false;
-   break;
-   }
-
+   for (end_irq = irq; end_irq < irq + count; end_irq++) {
/* This is already used */
-   if ((sc->isrcs[irq].flags & TEGRA_FLAG_MSI_USED) ==
+   if ((sc->isrcs[end_irq].flags & TEGRA_FLAG_MSI_USED) ==
TEGRA_FLAG_MSI_USED) {
found = false;
break;
}
}
+
+   if (found)
+   break;
}
 
/* Not enough interrupts were found */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306896 - head/sbin/ifconfig

2016-10-08 Thread Allan Jude
Author: allanjude
Date: Sun Oct  9 03:20:58 2016
New Revision: 306896
URL: https://svnweb.freebsd.org/changeset/base/306896

Log:
  Fix spurious white space introduced in r301059
  
  r301059 accidently introduced a subtle change for point to point interfaces
  where an extra space is inserted before the netmask. This can cause issues
  for scripts that parse ifconfig output.
  
  Submitted by: Kevin Bowling 
  Reviewed by:  hiren
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D8199

Modified:
  head/sbin/ifconfig/af_inet.c
  head/sbin/ifconfig/af_inet6.c

Modified: head/sbin/ifconfig/af_inet.c
==
--- head/sbin/ifconfig/af_inet.cSun Oct  9 01:58:29 2016
(r306895)
+++ head/sbin/ifconfig/af_inet.cSun Oct  9 03:20:58 2016
(r306896)
@@ -88,7 +88,7 @@ in_status(int s __unused, const struct i
sin = (struct sockaddr_in *)ifa->ifa_dstaddr;
if (sin == NULL)
sin = _sin;
-   printf(" --> %s ", inet_ntoa(sin->sin_addr));
+   printf(" --> %s", inet_ntoa(sin->sin_addr));
}
 
sin = (struct sockaddr_in *)ifa->ifa_netmask;

Modified: head/sbin/ifconfig/af_inet6.c
==
--- head/sbin/ifconfig/af_inet6.c   Sun Oct  9 01:58:29 2016
(r306895)
+++ head/sbin/ifconfig/af_inet6.c   Sun Oct  9 03:20:58 2016
(r306896)
@@ -237,7 +237,7 @@ in6_status(int s __unused, const struct 
if (error != 0)
inet_ntop(AF_INET6, >sin6_addr, addr_buf,
  sizeof(addr_buf));
-   printf(" --> %s ", addr_buf);
+   printf(" --> %s", addr_buf);
}
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306880 - stable/10/sbin/dmesg

2016-10-08 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Sat Oct  8 21:19:44 2016
New Revision: 306880
URL: https://svnweb.freebsd.org/changeset/base/306880

Log:
  MFC r306599:
  dmesg(8) first appeared in 3BSD.
  http://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man1/dmesg.1m
  
  PR:   212443
  Approved by:  bcr (mentor)
  Obtained from:TUHS
  Differential Revision:https://reviews.freebsd.org/D8105

Modified:
  stable/10/sbin/dmesg/dmesg.8
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/dmesg/dmesg.8
==
--- stable/10/sbin/dmesg/dmesg.8Sat Oct  8 21:13:55 2016
(r306879)
+++ stable/10/sbin/dmesg/dmesg.8Sat Oct  8 21:19:44 2016
(r306880)
@@ -28,7 +28,7 @@
 .\" @(#)dmesg.88.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd May 9, 2013
+.Dd October 3, 2016
 .Dt DMESG 8
 .Os
 .Sh NAME
@@ -84,4 +84,4 @@ at startup time
 The
 .Nm
 utility appeared in
-.Bx 4.0 .
+.Bx 3 .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306879 - stable/11/sbin/dmesg

2016-10-08 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Sat Oct  8 21:13:55 2016
New Revision: 306879
URL: https://svnweb.freebsd.org/changeset/base/306879

Log:
  MFC r306599:
  dmesg(8) first appeared in 3BSD.
  http://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man1/dmesg.1m
  
  PR:   212443
  Approved by:  bcr (mentor)
  Obtained from:TUHS
  Differential Revision:https://reviews.freebsd.org/D8105

Modified:
  stable/11/sbin/dmesg/dmesg.8
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/dmesg/dmesg.8
==
--- stable/11/sbin/dmesg/dmesg.8Sat Oct  8 20:41:08 2016
(r306878)
+++ stable/11/sbin/dmesg/dmesg.8Sat Oct  8 21:13:55 2016
(r306879)
@@ -28,7 +28,7 @@
 .\" @(#)dmesg.88.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd May 9, 2013
+.Dd October 3, 2016
 .Dt DMESG 8
 .Os
 .Sh NAME
@@ -84,4 +84,4 @@ at startup time
 The
 .Nm
 utility appeared in
-.Bx 4.0 .
+.Bx 3 .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306878 - head/sys/dev/wpi

2016-10-08 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Oct  8 20:41:08 2016
New Revision: 306878
URL: https://svnweb.freebsd.org/changeset/base/306878

Log:
  wpi: restore frame header before submitting an mbuf to
  ieee80211_tx_complete()
  
  This change allows to pass packet length to rate control modules and
  fixes IFCOUNTER_OBYTES calculation.
  
  Tested with Intel 3945BG, STA mode.

Modified:
  head/sys/dev/wpi/if_wpi.c
  head/sys/dev/wpi/if_wpivar.h

Modified: head/sys/dev/wpi/if_wpi.c
==
--- head/sys/dev/wpi/if_wpi.c   Sat Oct  8 19:54:01 2016(r306877)
+++ head/sys/dev/wpi/if_wpi.c   Sat Oct  8 20:41:08 2016(r306878)
@@ -527,7 +527,8 @@ wpi_attach(device_t dev)
wpi_radiotap_attach(sc);
 
/* Setup Tx status flags (constant). */
-   sc->sc_txs.flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY |
+   sc->sc_txs.flags = IEEE80211_RATECTL_STATUS_PKTLEN |
+   IEEE80211_RATECTL_STATUS_SHORT_RETRY |
IEEE80211_RATECTL_STATUS_LONG_RETRY;
 
callout_init_mtx(>calib_to, >rxon_mtx, 0);
@@ -2079,9 +2080,15 @@ wpi_tx_done(struct wpi_softc *sc, struct
m = data->m, data->m = NULL;
ni = data->ni, data->ni = NULL;
 
+   /* Restore frame header. */
+   KASSERT(M_LEADINGSPACE(m) >= data->hdrlen, ("no frame header!"));
+   M_PREPEND(m, data->hdrlen, M_NOWAIT);
+   KASSERT(m != NULL, ("%s: m is NULL\n", __func__));
+
/*
 * Update rate control statistics for the node.
 */
+   txs->pktlen = m->m_pkthdr.len;
txs->short_retries = stat->rtsfailcnt;
txs->long_retries = stat->ackfailcnt / WPI_NTRIES_DEFAULT;
if (!(status & WPI_TX_STATUS_FAIL))
@@ -2721,6 +2728,7 @@ wpi_cmd2(struct wpi_softc *sc, struct wp
 
data->m = buf->m;
data->ni = buf->ni;
+   data->hdrlen = hdrlen;
 
DPRINTF(sc, WPI_DEBUG_XMIT, "%s: qid %d idx %d len %d nsegs %d\n",
__func__, ring->qid, cur, totlen, nsegs);

Modified: head/sys/dev/wpi/if_wpivar.h
==
--- head/sys/dev/wpi/if_wpivar.hSat Oct  8 19:54:01 2016
(r306877)
+++ head/sys/dev/wpi/if_wpivar.hSat Oct  8 20:41:08 2016
(r306878)
@@ -63,6 +63,7 @@ struct wpi_tx_data {
bus_addr_t  cmd_paddr;
struct mbuf *m;
struct ieee80211_node   *ni;
+   int hdrlen;
 };
 
 struct wpi_tx_ring {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306877 - head/tools/build/options

2016-10-08 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  8 19:54:01 2016
New Revision: 306877
URL: https://svnweb.freebsd.org/changeset/base/306877

Log:
  Remove the WITH_FMAKE option left over from r284464
  
  MFC after:3 days

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


svn commit: r306874 - head/sys/sys

2016-10-08 Thread Conrad E. Meyer
Author: cem
Date: Sat Oct  8 19:40:58 2016
New Revision: 306874
URL: https://svnweb.freebsd.org/changeset/base/306874

Log:
  sys/module.h: Unbreak MOD_DPF printf
  
  MOD_DPF's args parameter already has parentheses around it.  This was broken 
14
  years ago in r91472.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/sys/module.h

Modified: head/sys/sys/module.h
==
--- head/sys/sys/module.h   Sat Oct  8 19:32:17 2016(r306873)
+++ head/sys/sys/module.h   Sat Oct  8 19:40:58 2016(r306874)
@@ -233,7 +233,7 @@ extern int mod_debug;
 
 #defineMOD_DPF(cat, args) do { 
\
if (mod_debug & MOD_DEBUG_##cat)\
-   printf(args);   \
+   printf args;\
 } while (0)
 
 #else  /* !MOD_DEBUG */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306864 - head

2016-10-08 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  8 18:57:11 2016
New Revision: 306864
URL: https://svnweb.freebsd.org/changeset/base/306864

Log:
  groff is not needed in the bootstrap tools if the system is built
  WITHOUT_SHAREDOCS
  
  MFC after:2 weeks

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Sat Oct  8 18:44:29 2016(r306863)
+++ head/Makefile.inc1  Sat Oct  8 18:57:11 2016(r306864)
@@ -1586,7 +1586,7 @@ _strfile= usr.bin/fortune/strfile
 _gperf=gnu/usr.bin/gperf
 .endif
 
-.if ${MK_GROFF} != "no"
+.if ${MK_SHAREDOCS} != "no" || ${MK_GROFF} != "no"
 _groff=gnu/usr.bin/groff \
usr.bin/soelim
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306860 - head/sys/arm/broadcom/bcm2835

2016-10-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Oct  8 18:19:52 2016
New Revision: 306860
URL: https://svnweb.freebsd.org/changeset/base/306860

Log:
  Add multitouch support for RPi's FT5406
  
  - Add multitouch support (protocol B)
  - Report physical size of the screen
  - Switch from using busy loop to callbacks
  - Enable callbacks only when there is active listener on /dev/input/eventX
  
  Submitted by: Vladimir Kondratiev 

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c  Sat Oct  8 18:16:18 
2016(r306859)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_ft5406.c  Sat Oct  8 18:19:52 
2016(r306860)
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -102,14 +101,20 @@ __FBSDID("$FreeBSD$");
(buf[FT5406_POINT_YL(n)]))
 #defineGET_TOUCH_ID(buf, n)((buf[FT5406_POINT_YH(n)] >> 4) & 0xf)
 
-#defineNO_POINTS   99
-#defineSCREEN_WIDTH800
-#defineSCREEN_HEIGHT   480
+#defineNO_POINTS   99
+#defineSCREEN_WIDTH800
+#defineSCREEN_HEIGHT   480
+#defineSCREEN_WIDTH_MM 155
+#defineSCREEN_HEIGHT_MM86
+#defineSCREEN_RES_X(SCREEN_WIDTH / SCREEN_WIDTH_MM)
+#defineSCREEN_RES_Y(SCREEN_HEIGHT / SCREEN_HEIGHT_MM)
+#defineMAX_TOUCH_ID(10 - 1)
 
 struct ft5406ts_softc {
device_tsc_dev;
struct mtx  sc_mtx;
-   struct proc *sc_worker;
+   int sc_tick;
+   struct callout  sc_callout;
 
/* mbox buffer (mapped to KVA) */
uint8_t *touch_buf;
@@ -118,86 +123,76 @@ struct ft5406ts_softc {
struct intr_config_hook sc_init_hook;
 
struct evdev_dev*sc_evdev;
-   int sc_detaching;
+
+   uint8_t sc_window[FT5406_WINDOW_SIZE];
+};
+
+static evdev_open_t ft5406ts_ev_open;
+static evdev_close_t ft5406ts_ev_close;
+
+static const struct evdev_methods ft5406ts_evdev_methods = {
+   .ev_open = _ev_open,
+   .ev_close = _ev_close,
 };
 
 static void
-ft5406ts_worker(void *data)
+ft5406ts_callout(void *data)
 {
struct ft5406ts_softc *sc = (struct ft5406ts_softc *)data;
int points;
-   int id, new_x, new_y, i, new_pen_down, updated;
-   int x, y, pen_down;
-   uint8_t window[FT5406_WINDOW_SIZE];
-   int tick;
+   int id, i, x, y;
 
-   /* 60Hz */
-   tick = hz*17/1000;
-   if (tick == 0)
-   tick = 1;
-
-   x = y = -1;
-   pen_down = 0;
-
-   FT5406_LOCK(sc);
-   while(1) {
-   msleep(sc, >sc_mtx, PCATCH | PZERO, "ft5406ts", tick);
-
-   if (sc->sc_detaching)
-   break;
-
-   memcpy(window, sc->touch_buf, sizeof(window));
-   sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS;
-
-   points = GET_NUM_POINTS(window);
-   /*
-* No update from VC - do nothing
-*/
-   if (points == NO_POINTS)
-   continue;
+   FT5406_LOCK_ASSERT(sc);
 
-   /* No points and pen is already up */
-   if ((points == 0) && !pen_down)
-   continue;
+   memcpy(sc->sc_window, sc->touch_buf, FT5406_WINDOW_SIZE);
+   sc->touch_buf[FT5406_NUM_POINTS] = NO_POINTS;
 
-   new_pen_down = 0;
-   for (i = 0; i < points; i++) {
-   id = GET_TOUCH_ID(window, 0);
-   /* For now consider only touch 0 */
-   if (id != 0)
-   continue;
-   new_pen_down = 1;
-   new_x = GET_X(window, 0);
-   new_y = GET_Y(window, 0);
+   points = GET_NUM_POINTS(sc->sc_window);
+   /*
+* No update from VC - do nothing.
+*/
+   if (points == NO_POINTS)
+   goto out;
+
+   for (i = 0; i < points; i++) {
+   id = GET_TOUCH_ID(sc->sc_window, i);
+   x = GET_X(sc->sc_window, i);
+   y = GET_Y(sc->sc_window, i);
+
+   if (id > MAX_TOUCH_ID) {
+   device_printf(sc->sc_dev, "bad touch id: %d", id);
+   continue;
}
+   evdev_push_event(sc->sc_evdev, EV_ABS, ABS_MT_SLOT, id);
+   evdev_push_event(sc->sc_evdev, EV_ABS, ABS_MT_TRACKING_ID, id);
+   evdev_push_event(sc->sc_evdev, EV_ABS, ABS_MT_POSITION_X, x);
+   evdev_push_event(sc->sc_evdev, EV_ABS, ABS_MT_POSITION_Y, y);
+   }
+   

svn commit: r306857 - head/sys/dev/evdev

2016-10-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Oct  8 17:59:53 2016
New Revision: 306857
URL: https://svnweb.freebsd.org/changeset/base/306857

Log:
  Implement EVDEV_FLAG_MT_AUTOREL flag (autorelease touchpoints)
  
  Automaticaly release (send ABS_MT_TRACKING_ID = -1) MT-slots
  that has not been listed in current MT protocol type B report.
  
  Slot is counted as listed if corresponding ABS_MT_SLOT event
  has been sent regardless of other MT events.
  
  Events are sent on SYN_REPORT event.
  
  Submitted by: Vladimir Kondratiev 

Modified:
  head/sys/dev/evdev/evdev.c
  head/sys/dev/evdev/evdev.h
  head/sys/dev/evdev/evdev_mt.c
  head/sys/dev/evdev/evdev_private.h

Modified: head/sys/dev/evdev/evdev.c
==
--- head/sys/dev/evdev/evdev.c  Sat Oct  8 17:58:40 2016(r306856)
+++ head/sys/dev/evdev/evdev.c  Sat Oct  8 17:59:53 2016(r306857)
@@ -686,6 +686,8 @@ evdev_sparse_event(struct evdev_dev *evd
 
case EV_SYN:
if (code == SYN_REPORT) {
+   /* Count empty reports as well as non empty */
+   evdev->ev_report_count++;
/* Skip empty reports */
if (!evdev->ev_report_opened)
return (EV_SKIP_EVENT);
@@ -722,10 +724,7 @@ evdev_propagate_event(struct evdev_dev *
EVDEV_CLIENT_UNLOCKQ(client);
}
 
-   /* Update counters */
evdev->ev_event_count++;
-   if (type == EV_SYN && code == SYN_REPORT)
-   evdev->ev_report_count++;
 }
 
 void
@@ -765,6 +764,9 @@ evdev_push_event(struct evdev_dev *evdev
if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
EVDEV_LOCK(evdev);
evdev_modify_event(evdev, type, code, );
+   if (type == EV_SYN && code == SYN_REPORT &&
+bit_test(evdev->ev_flags, EVDEV_FLAG_MT_AUTOREL))
+   evdev_send_mt_autorel(evdev);
if (type == EV_SYN && code == SYN_REPORT && evdev->ev_report_opened &&
bit_test(evdev->ev_flags, EVDEV_FLAG_MT_STCOMPAT))
evdev_send_mt_compat(evdev);

Modified: head/sys/dev/evdev/evdev.h
==
--- head/sys/dev/evdev/evdev.h  Sat Oct  8 17:58:40 2016(r306856)
+++ head/sys/dev/evdev/evdev.h  Sat Oct  8 17:59:53 2016(r306857)
@@ -70,6 +70,8 @@ extern int evdev_rcpt_mask;
 #defineEVDEV_FLAG_SOFTREPEAT   0x00/* use evdev to repeat keys */
 #defineEVDEV_FLAG_MT_STCOMPAT  0x01/* autogenerate ST-compatible 
events
 * for MT protocol type B reports */
+#defineEVDEV_FLAG_MT_AUTOREL   0x02/* Autorelease MT-slots not 
listed in
+* current MT protocol type B report */
 #defineEVDEV_FLAG_MAX  0x1F
 #defineEVDEV_FLAG_CNT  (EVDEV_FLAG_MAX + 1)
 

Modified: head/sys/dev/evdev/evdev_mt.c
==
--- head/sys/dev/evdev/evdev_mt.c   Sat Oct  8 17:58:40 2016
(r306856)
+++ head/sys/dev/evdev/evdev_mt.c   Sat Oct  8 17:59:53 2016
(r306857)
@@ -112,6 +112,7 @@ void
 evdev_set_last_mt_slot(struct evdev_dev *evdev, int32_t slot)
 {
 
+   evdev->ev_mt->ev_mt_slots[slot].ev_report = evdev->ev_report_count;
evdev->ev_mt->ev_mt_last_reported_slot = slot;
 }
 
@@ -128,10 +129,6 @@ evdev_set_mt_value(struct evdev_dev *evd
 int32_t value)
 {
 
-   if (code == ABS_MT_TRACKING_ID && value == -1)
-   evdev->ev_mt->ev_mt_slots[slot].ev_report =
-   evdev->ev_report_count;
-
evdev->ev_mt->ev_mt_slots[slot].ev_mt_states[ABS_MT_INDEX(code)] =
value;
 }
@@ -275,3 +272,21 @@ evdev_push_mt_compat(struct evdev_dev *e
if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
EVDEV_UNLOCK(evdev);
 }
+
+void
+evdev_send_mt_autorel(struct evdev_dev *evdev)
+{
+   int32_t slot;
+
+   EVDEV_LOCK_ASSERT(evdev);
+
+   for (slot = 0; slot <= MAXIMAL_MT_SLOT(evdev); slot++) {
+   if (evdev->ev_mt->ev_mt_slots[slot].ev_report !=
+   evdev->ev_report_count &&
+   evdev_get_mt_value(evdev, slot, ABS_MT_TRACKING_ID) != -1){
+   evdev_send_event(evdev, EV_ABS, ABS_MT_SLOT, slot);
+   evdev_send_event(evdev, EV_ABS, ABS_MT_TRACKING_ID,
+   -1);
+   }
+   }
+}

Modified: head/sys/dev/evdev/evdev_private.h
==
--- head/sys/dev/evdev/evdev_private.h  Sat Oct  8 17:58:40 2016
(r306856)
+++ head/sys/dev/evdev/evdev_private.h  Sat Oct  8 17:59:53 2016
(r306857)
@@ -192,6 +192,7 @@ void evdev_set_last_mt_slot(struct evdev
 int32_t evdev_get_mt_value(struct 

svn commit: r306855 - head/sys/dev/evdev

2016-10-08 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Sat Oct  8 17:58:26 2016
New Revision: 306855
URL: https://svnweb.freebsd.org/changeset/base/306855

Log:
  Allow using of driver's mutex instead internal one for evdev locking.
  
  Add new API call: evdev_register_mtx which takes lock argument that
  should be used instead of internal one for evdev locking. Useful for
  cases if evdev_push_event() is always called with driver's lock taken
  and reduces amount of lock aquisitions. This allows to avoid LOR
  between ev_open/ev_close invocations and evdev_push_event() Such LOR
  can happen when ev_open/ev_close methods acquire driver lock and
  evdev_push_event() is called with this lock taken.
  
  Submitted by: Vladimir Kondratiev 

Modified:
  head/sys/dev/evdev/evdev.c
  head/sys/dev/evdev/evdev.h
  head/sys/dev/evdev/evdev_mt.c
  head/sys/dev/evdev/evdev_private.h

Modified: head/sys/dev/evdev/evdev.c
==
--- head/sys/dev/evdev/evdev.c  Sat Oct  8 17:51:15 2016(r306854)
+++ head/sys/dev/evdev/evdev.c  Sat Oct  8 17:58:26 2016(r306855)
@@ -187,8 +187,8 @@ evdev_estimate_report_size(struct evdev_
return (size);
 }
 
-int
-evdev_register(struct evdev_dev *evdev)
+static int
+evdev_register_common(struct evdev_dev *evdev)
 {
int ret;
 
@@ -196,7 +196,6 @@ evdev_register(struct evdev_dev *evdev)
evdev->ev_shortname, evdev->ev_name, evdev->ev_serial);
 
/* Initialize internal structures */
-   mtx_init(>ev_mtx, "evmtx", NULL, MTX_DEF);
LIST_INIT(>ev_clients);
 
if (evdev_event_supported(evdev, EV_REP) &&
@@ -228,6 +227,19 @@ evdev_register(struct evdev_dev *evdev)
/* Create char device node */
ret = evdev_cdev_create(evdev);
 bail_out:
+   return (ret);
+}
+
+int
+evdev_register(struct evdev_dev *evdev)
+{
+   int ret;
+
+   evdev->ev_lock_type = EV_LOCK_INTERNAL;
+   evdev->ev_lock = >ev_mtx;
+   mtx_init(>ev_mtx, "evmtx", NULL, MTX_DEF);
+
+   ret = evdev_register_common(evdev);
if (ret != 0)
mtx_destroy(>ev_mtx);
 
@@ -235,6 +247,15 @@ bail_out:
 }
 
 int
+evdev_register_mtx(struct evdev_dev *evdev, struct mtx *mtx)
+{
+
+   evdev->ev_lock_type = EV_LOCK_MTX;
+   evdev->ev_lock = mtx;
+   return (evdev_register_common(evdev));
+}
+
+int
 evdev_unregister(struct evdev_dev *evdev)
 {
struct evdev_client *client;
@@ -257,7 +278,7 @@ evdev_unregister(struct evdev_dev *evdev
/* destroy_dev can sleep so release lock */
ret = evdev_cdev_destroy(evdev);
evdev->ev_cdev = NULL;
-   if (ret == 0)
+   if (ret == 0 && evdev->ev_lock_type == EV_LOCK_INTERNAL)
mtx_destroy(>ev_mtx);
 
evdev_free_absinfo(evdev->ev_absinfo);
@@ -735,16 +756,21 @@ evdev_push_event(struct evdev_dev *evdev
 int32_t value)
 {
 
+   if (evdev->ev_lock_type != EV_LOCK_INTERNAL)
+   EVDEV_LOCK_ASSERT(evdev);
+
if (evdev_check_event(evdev, type, code, value) != 0)
return (EINVAL);
 
-   EVDEV_LOCK(evdev);
+   if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
+   EVDEV_LOCK(evdev);
evdev_modify_event(evdev, type, code, );
if (type == EV_SYN && code == SYN_REPORT && evdev->ev_report_opened &&
bit_test(evdev->ev_flags, EVDEV_FLAG_MT_STCOMPAT))
evdev_send_mt_compat(evdev);
evdev_send_event(evdev, type, code, value);
-   EVDEV_UNLOCK(evdev);
+   if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
+   EVDEV_UNLOCK(evdev);
 
return (0);
 }

Modified: head/sys/dev/evdev/evdev.h
==
--- head/sys/dev/evdev/evdev.h  Sat Oct  8 17:51:15 2016(r306854)
+++ head/sys/dev/evdev/evdev.h  Sat Oct  8 17:58:26 2016(r306855)
@@ -92,6 +92,7 @@ void evdev_set_serial(struct evdev_dev *
 void evdev_set_methods(struct evdev_dev *, void *,
 const struct evdev_methods *);
 int evdev_register(struct evdev_dev *);
+int evdev_register_mtx(struct evdev_dev *, struct mtx *);
 int evdev_unregister(struct evdev_dev *);
 int evdev_push_event(struct evdev_dev *, uint16_t, uint16_t, int32_t);
 int evdev_sync(struct evdev_dev *);

Modified: head/sys/dev/evdev/evdev_mt.c
==
--- head/sys/dev/evdev/evdev_mt.c   Sat Oct  8 17:51:15 2016
(r306854)
+++ head/sys/dev/evdev/evdev_mt.c   Sat Oct  8 17:58:26 2016
(r306855)
@@ -227,9 +227,13 @@ void
 evdev_push_nfingers(struct evdev_dev *evdev, int32_t nfingers)
 {
 
-   EVDEV_LOCK(evdev);
+   if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
+   EVDEV_LOCK(evdev);
+   else
+   EVDEV_LOCK_ASSERT(evdev);
evdev_send_nfingers(evdev, nfingers);
-   EVDEV_UNLOCK(evdev);
+   if (evdev->ev_lock_type == 

svn commit: r306854 - head/share/misc

2016-10-08 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  8 17:51:15 2016
New Revision: 306854
URL: https://svnweb.freebsd.org/changeset/base/306854

Log:
  Update pci_vendors to 2016-10-03
  
  MFC after:3 days

Modified:
  head/share/misc/pci_vendors

Modified: head/share/misc/pci_vendors
==
--- head/share/misc/pci_vendors Sat Oct  8 17:46:59 2016(r306853)
+++ head/share/misc/pci_vendors Sat Oct  8 17:51:15 2016(r306854)
@@ -3,8 +3,8 @@
 #
 #  List of PCI ID's
 #
-#  Version: 2016.05.23
-#  Date:2016-05-23 03:15:02
+#  Version: 2016.10.03
+#  Date:2016-10-03 03:15:01
 #
 #  Maintained by Albert Pool, Martin Mares, and other volunteers from
 #  the PCI ID Project at http://pci-ids.ucw.cz/.
@@ -244,6 +244,19 @@
1000 1000  LSI53C895A PCI to Ultra2 SCSI Controller
0013  53c875a
1000 1000  LSI53C875A PCI to Ultra SCSI Controller
+   0014  MegaRAID Tri-Mode SAS3516
+   1d49 0602  ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter
+   0016  MegaRAID Tri-Mode SAS3508
+   1d49 0601  ThinkSystem RAID 930-8i 2GB Flash PCIe 12Gb Adapter
+   1d49 0603  ThinkSystem RAID 930-24i 4GB Flash PCIe 12Gb Adapter
+   1d49 0604  ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter
+   0017  MegaRAID Tri-Mode SAS3408
+   1d49 0500  ThinkSystem RAID 530-8i PCIe 12Gb Adapter
+   1d49 0502  ThinkSystem RAID 530-8i Dense Adapter
+   001b  MegaRAID Tri-Mode SAS3504
+   1d49 0605  ThinkSystem RAID 930-4i 2GB Flash Flex Adapter
+   001c  MegaRAID Tri-Mode SAS3404
+   1d49 0501  ThinkSystem RAID 530-4i Flex Adapter
0020  53c1010 Ultra3 SCSI Adapter
1000 1000  LSI53C1010-33 PCI to Dual Channel Ultra160 SCSI 
Controller
107b 1040  Server Onboard 53C1010-33
@@ -351,6 +364,8 @@
005c  SAS1064A PCI-X Fusion-MPT SAS
005d  MegaRAID SAS-3 3108 [Invader]
1000 9361  MegaRAID SAS 9361-8i
+   1000 9364  MegaRAID SAS 9364-8i
+   1000 936a  MegaRAID SAS 9364-8i
1028 1f41  PERC H830 Adapter
1028 1f42  PERC H730P Adapter
1028 1f43  PERC H730 Adapter
@@ -363,6 +378,7 @@
1028 1f54  PERC FD33xD
17aa 1052  ThinkServer RAID 720i
17aa 1053  ThinkServer RAID 720ix
+   1d49 0600  ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter
005e  SAS1066 PCI-X Fusion-MPT SAS
005f  MegaRAID SAS-3 3008 [Fury]
1028 1f44  PERC H330 Adapter
@@ -506,6 +522,7 @@
0087  SAS2308 PCI-Express Fusion-MPT SAS-2
1000 3020  9207-8i SAS2.1 HBA
1000 3040  9207-8e SAS2.1 HBA
+   1000 3050  SAS9217-8i
1590 0044  H220i
008f  53c875J
1092 8000  FirePort 40 SCSI Controller
@@ -516,8 +533,20 @@
0095  SAS3108 PCI-Express Fusion-MPT SAS-3
0096  SAS3004 PCI-Express Fusion-MPT SAS-3
0097  SAS3008 PCI-Express Fusion-MPT SAS-3
+   1000 3090  SAS9311-8i
+   1000 30e0  SAS9300-8i
1028 1f45  12GB/s HBA internal
1028 1f46  12Gbps HBA
+   00ab  SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC)
+   00ac  SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
+   1d49 0201  ThinkSystem 9400-16i PCIe 12Gb HBA
+   1d49 0203  ThinkSystem 9400-16e PCIe 12Gb HBA
+   00ae  SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC)
+   00af  SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
+   1d49 0200  ThinkSystem 9400-8i PCIe 12Gb HBA
+   1d49 0202  ThinkSystem 9400-8e PCIe 12Gb HBA
+   00be  SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC)
+   00bf  SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
00c0  SAS3324 PCI-Express Fusion-MPT SAS-3
00c1  SAS3324 PCI-Express Fusion-MPT SAS-3
00c2  SAS3324 PCI-Express Fusion-MPT SAS-3
@@ -533,6 +562,9 @@
1000 9390  MegaRAID SAS 9380-8i8e
00cf  MegaRAID SAS-3 3324 [Intruder]
1000 9370  MegaRAID SAS 9361-24i
+   00d0  SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC)
+   00d1  SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
+   00d3  MegaRAID Tri-Mode SAS3716W
0407  MegaRAID
1000 0530  MegaRAID 530 SCSI 320-0X RAID Controller
1000 0531  MegaRAID 531 SCSI 320-4X RAID Controller
@@ -1389,23 +1421,23 @@
5a11  RD890 Northbridge only single slot PCI-e GFX Hydra part
5a12  RD890 Northbridge only dual slot (2x8) PCI-e GFX Hydra part
15d9 a811  H8DGU
-   5a13  RD890 PCI to PCI bridge (external gfx0 port A)
-   5a14  RD890 PCI to PCI bridge (external gfx0 port B)
+   5a13  RD890S/SR5650 Host 

Re: svn commit: r306849 - head/sys/contrib/ipfilter/netinet

2016-10-08 Thread Cy Schubert
In message <201610081457.u98evlfa019...@repo.freebsd.org>, Kevin Lo writes:
> Author: kevlo
> Date: Sat Oct  8 14:57:21 2016
> New Revision: 306849
> URL: https://svnweb.freebsd.org/changeset/base/306849
> 
> Log:
>   In case of removal of m_copy() the macro should remain named M_COPY()
>   in ip_compat.h after r305824.  Leaving as vanilla as possible aids in
>   future maintenance and upgrades.
>   
>   Suggested by:   glebius, cy
> 
> Modified:
>   head/sys/contrib/ipfilter/netinet/fil.c
>   head/sys/contrib/ipfilter/netinet/ip_compat.h
> 
> Modified: head/sys/contrib/ipfilter/netinet/fil.c
> =
> =
> --- head/sys/contrib/ipfilter/netinet/fil.c   Sat Oct  8 14:32:43 2016
>   (r306848)
> +++ head/sys/contrib/ipfilter/netinet/fil.c   Sat Oct  8 14:57:21 2016
>   (r306849)
> @@ -3226,7 +3226,7 @@ filterdone:
>   fdp = fin->fin_dif;
>   if ((fdp != NULL) && (fdp->fd_ptr != NULL) &&
>   (fdp->fd_ptr != (void *)-1)) {
> - mc = M_COPYM(fin->fin_m);
> + mc = M_COPY(fin->fin_m);
>   if (mc != NULL)
>   ipf_fastroute(mc, , fin, fdp);
>   }
> 
> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
> =
> =
> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Sat Oct  8 14:32:43 201
> 6 (r306848)
> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Sat Oct  8 14:57:21 201
> 6 (r306849)
> @@ -212,7 +212,7 @@ struct  ether_addr {
>  #  defineMSGDSIZE(m) mbufchainlen(m)
>  #  defineM_LEN(m)(m)->m_len
>  #  defineM_ADJ(m,x)  m_adj(m, x)
> -#  defineM_COPYM(x)  m_copym((x), 0, M_COPYALL, M_NOWAIT)
> +#  defineM_COPY(x)   m_copym((x), 0, M_COPYALL, M_NOWAIT)
>  #  defineM_DUP(m)m_dup(m, M_NOWAIT)
>  #  defineIPF_PANIC(x,y)  if (x) { printf y; panic("ipf_panic"); }
>  typedef struct mbuf mb_t;
> @@ -367,7 +367,7 @@ typedef   struct  mb_s{
>  # define MSGDSIZE(m) msgdsize(m)
>  # define M_LEN(m)(m)->mb_len
>  # define M_ADJ(m,x)  (m)->mb_len += x
> -# define M_COPYM(m)  dupmbt(m)
> +# define M_COPY(m)   dupmbt(m)
>  # define M_DUP(m)dupmbt(m)
>  # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL)
>  # define MTOD(m, t)  ((t)(m)->mb_data)
> 
> 

Thank you Kevin.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


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


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-10-08 Thread Cy Schubert
In message <20161008145909.ga5...@ns.kevlo.org>, Kevin Lo writes:
> On Wed, Oct 05, 2016 at 04:14:42PM -0700, Gleb Smirnoff wrote:
> > 
> > On Wed, Oct 05, 2016 at 11:20:58AM +0800, Kevin Lo wrote:
> > K> > On Thu, Sep 15, 2016 at 07:41:48AM +, Kevin Lo wrote:
> > K> > K> Log:
> > K> > K>   Remove the 4.3BSD compatible macro m_copy(), use m_copym() instea
> d.
> > K> > ...
> > K> > K> Modified: head/sys/contrib/ipfilter/netinet/fil.c
> > K> > K> ===
> ===
> > K> > K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 201
> 6 (r305823)
> > K> > K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 201
> 6 (r305824)
> > K> > K> @@ -3226,7 +3226,7 @@ filterdone:
> > K> > K> fdp = fin->fin_dif;
> > K> > K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) &&
> > K> > K> (fdp->fd_ptr != (void *)-1)) {
> > K> > K> -   mc = M_COPY(fin->fin_m);
> > K> > K> +   mc = M_COPYM(fin->fin_m);
> > K> > K> if (mc != NULL)
> > K> > K> ipf_fastroute(mc, , fin, fdp);
> > K> > K> }
> > K> > K> 
> > K> > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
> > K> > K> ===
> ===
> > K> > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h   Thu Sep 15 02:4
> 8:56 2016 (r305823)
> > K> > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h   Thu Sep 15 07:4
> 1:48 2016 (r305824)
> > K> > K> @@ -211,7 +211,7 @@ struct  ether_addr {
> > K> > K>  #  define  MSGDSIZE(m) mbufchainlen(m)
> > K> > K>  #  define  M_LEN(m)(m)->m_len
> > K> > K>  #  define  M_ADJ(m,x)  m_adj(m, x)
> > K> > K> -#  define  M_COPY(x)   m_copy((x), 0, M_COPYALL)
> > K> > K> +#  define  M_COPYM(x)  m_copym((x), 0, M_COPYALL, M_NOWAIT)
> > K> > K>  #  define  M_DUP(m)m_dup(m, M_NOWAIT)
> > K> > K>  #  define  IPF_PANIC(x,y)  if (x) { printf y; panic("ipf_panic"); 
> }
> > K> > K>  typedef struct mbuf mb_t;
> > K> > K> @@ -366,7 +366,7 @@ typedef struct  mb_s{
> > K> > K>  # define   MSGDSIZE(m) msgdsize(m)
> > K> > K>  # define   M_LEN(m)(m)->mb_len
> > K> > K>  # define   M_ADJ(m,x)  (m)->mb_len += x
> > K> > K> -# define   M_COPY(m)   dupmbt(m)
> > K> > K> +# define   M_COPYM(m)  dupmbt(m)
> > K> > K>  # define   M_DUP(m)dupmbt(m)
> > K> > K>  # define   GETKTIME(x) gettimeofday((struct timeval *)(x), NUL
> L)
> > K> > K>  # define   MTOD(m, t)  ((t)(m)->mb_data)
> > K> > 
> > K> > IMHO, for contributed ipfilter we should only modify ip_compat.h and i
> p_fil_freebsd.c.
> > K> > In case of removal of m_copy() the macro should remain named M_COPY(),
>  but it should be
> > K> > defined to call to function of m_copym(). So fil.c can be left unmodif
> ied, and ip_compat.h
> > K> > will have only 1 line change. The userland part of ip_compat.h which d
> efines M_COPY() to
> > K> > dupmbt() doesn't need to be renamed as well.
> > K> 
> > K> Actually your comments were addressed in my original patch, but rwatson@
> > K> pointed out that switching M_COPY() to M_COPYM() for consistency:
> > K> https://reviews.freebsd.org/D7878#163304
> > 
> > This looks more like a general comment, not comment to ipfilter part. Rober
> t,
> > can you confirm please?
> > 
> > The ipfilter part should have modifications only in ip_compat.h and ip_fil_
> freebsd.c.
> 
> Fixed in r306849, thanks.

Thank you Kevin.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


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


svn commit: r306853 - head/contrib/tzdata

2016-10-08 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  8 17:46:59 2016
New Revision: 306853
URL: https://svnweb.freebsd.org/changeset/base/306853

Log:
  Import tzdata 2016g
  
  MFC after:3 days

Modified:
  head/contrib/tzdata/africa
  head/contrib/tzdata/antarctica
  head/contrib/tzdata/asia
  head/contrib/tzdata/australasia
  head/contrib/tzdata/backward
  head/contrib/tzdata/etcetera
  head/contrib/tzdata/europe
  head/contrib/tzdata/factory
  head/contrib/tzdata/leap-seconds.list
  head/contrib/tzdata/leapseconds
  head/contrib/tzdata/northamerica
  head/contrib/tzdata/southamerica
  head/contrib/tzdata/zone.tab
  head/contrib/tzdata/zone1970.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/africa
==
--- head/contrib/tzdata/africa  Sat Oct  8 17:46:29 2016(r306852)
+++ head/contrib/tzdata/africa  Sat Oct  8 17:46:59 2016(r306853)
@@ -343,6 +343,12 @@ Rule   Egypt   2007only-   Sep Thu>=1  
24:00   
 # decision to abandon DST permanently.  See Ahram Online 2015-04-24.
 # 
http://english.ahram.org.eg/NewsContent/1/64/128509/Egypt/Politics-/Sisi-cancels-daylight-saving-time-in-Egypt.aspx
 
+# From Steffen Thorsen (2016-04-29):
+# Egypt will have DST from July 7 until the end of October
+# 
http://english.ahram.org.eg/NewsContentP/1/204655/Egypt/Daylight-savings-time-returning-to-Egypt-on--July.aspx
+# From Mina Samuel (2016-07-04):
+# Egyptian government took the decision to cancel the DST,
+
 Rule   Egypt   2008only-   Aug lastThu 24:00   0   -
 Rule   Egypt   2009only-   Aug 20  24:00   0   -
 Rule   Egypt   2010only-   Aug 10  24:00   0   -
@@ -458,7 +464,7 @@ ZoneAfrica/Monrovia -0:43:08 -  LMT 1882
 # http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
 #
 # From Paul Eggert (2013-10-25):
-# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2.
+# For now, assume they're reverting to the pre-2012 rules of permanent UT +02.
 
 # Rule NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
 Rule   Libya   1951only-   Oct 14  2:001:00S
@@ -858,11 +864,11 @@ Rule  Morocco 2009only-   Aug 21  
 0:00   0   
 Rule   Morocco 2010only-   May  2   0:00   1:00S
 Rule   Morocco 2010only-   Aug  8   0:00   0   -
 Rule   Morocco 2011only-   Apr  3   0:00   1:00S
-Rule   Morocco 2011only-   Jul 31   0  0   -
+Rule   Morocco 2011only-   Jul 31   0:00   0   -
 Rule   Morocco 20122013-   Apr lastSun  2:00   1:00S
-Rule   Morocco 2012only-   Sep 30   3:00   0   -
 Rule   Morocco 2012only-   Jul 20   3:00   0   -
 Rule   Morocco 2012only-   Aug 20   2:00   1:00S
+Rule   Morocco 2012only-   Sep 30   3:00   0   -
 Rule   Morocco 2013only-   Jul  7   3:00   0   -
 Rule   Morocco 2013only-   Aug 10   2:00   1:00S
 Rule   Morocco 2013max -   Oct lastSun  3:00   0   -

Modified: head/contrib/tzdata/antarctica
==
--- head/contrib/tzdata/antarctica  Sat Oct  8 17:46:29 2016
(r306852)
+++ head/contrib/tzdata/antarctica  Sat Oct  8 17:46:59 2016
(r306853)
@@ -10,10 +10,8 @@
 # http://www.spri.cam.ac.uk/bob/periant.htm
 # for information.
 # Unless otherwise specified, we have no time zone information.
-#
-# Except for the French entries,
-# I made up all time zone abbreviations mentioned here; corrections welcome!
-# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited.
+
+# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited.
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
@@ -29,7 +27,7 @@
 #  previously sealers and scientific personnel wintered
 #  Margaret Turner reports
 #  
http://web.archive.org/web/2002120445/http://www.dstc.qut.edu.au/DST/marg/daylight.html
-#  (1999-09-30) that they're UTC+5, with no DST;
+#  (1999-09-30) that they're UT +05, with no DST;
 #  presumably this is when they have visitors.
 #
 # year-round bases
@@ -67,24 +65,23 @@
 # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
 
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
-Zone Antarctica/Casey  0   -   zzz 1969
-   8:00-   AWST2009 Oct 18  2:00
-   # Australian Western Std Time
-   11:00   -   CAST2010 Mar  5  2:00  # Casey Time
-   8:00- 

svn commit: r306852 - head/contrib/tzcode/zic

2016-10-08 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  8 17:46:29 2016
New Revision: 306852
URL: https://svnweb.freebsd.org/changeset/base/306852

Log:
  Incorporate a change from OpenBSD by mill...@openbsd.org
  
  Don't warn about valid time zone abbreviations.  POSIX
  through 2000 says that an abbreviation cannot start with ':', and
  cannot contain ',', '-', '+', NUL, or a digit.  POSIX from 2001
  on changes this rule to say that an abbreviation can contain only
  '-', '+', and alphanumeric characters from the portable character
  set in the current locale.  To be portable to both sets of rules,
  an abbreviation must therefore use only ASCII letters."  Adapted
  from tzcode2015f.
  
  This is needed to be able to update tzdata to a newer version
  
  MFC after:3 days

Modified:
  head/contrib/tzcode/zic/zdump.c
  head/contrib/tzcode/zic/zic.c

Modified: head/contrib/tzcode/zic/zdump.c
==
--- head/contrib/tzcode/zic/zdump.c Sat Oct  8 16:39:21 2016
(r306851)
+++ head/contrib/tzcode/zic/zdump.c Sat Oct  8 17:46:29 2016
(r306852)
@@ -212,24 +212,16 @@ const char * constzone;
return;
cp = abbrp;
wp = NULL;
-   while (isascii((unsigned char) *cp) && isalpha((unsigned char) *cp))
+   while (isascii((unsigned char) *cp) &&
+   (isalnum((unsigned char)*cp) || *cp == '-' || *cp == '+'))
++cp;
-   if (cp - abbrp == 0)
-   wp = _("lacks alphabetic at start");
-   else if (cp - abbrp < 3)
-   wp = _("has fewer than 3 alphabetics");
+   if (cp - abbrp < 3)
+   wp = _("has fewer than 3 characters");
else if (cp - abbrp > 6)
-   wp = _("has more than 6 alphabetics");
-   if (wp == NULL && (*cp == '+' || *cp == '-')) {
-   ++cp;
-   if (isascii((unsigned char) *cp) &&
-   isdigit((unsigned char) *cp))
-   if (*cp++ == '1' && *cp >= '0' && *cp <= '4')
-   ++cp;
-   if (*cp != '\0')
-   wp = _("differs from POSIX standard");
-   }
-   if (wp == NULL)
+   wp = _("has more than 6 characters");
+   else if (*cp)
+   wp = "has characters other than ASCII alphanumerics, '-' or 
'+'";
+   else
return;
(void) fflush(stdout);
(void) fprintf(stderr,

Modified: head/contrib/tzcode/zic/zic.c
==
--- head/contrib/tzcode/zic/zic.c   Sat Oct  8 16:39:21 2016
(r306851)
+++ head/contrib/tzcode/zic/zic.c   Sat Oct  8 17:46:29 2016
(r306852)
@@ -2615,29 +2615,15 @@ const char * const  string;
register const char *   cp;
register char * wp;
 
-   /*
-   ** Want one to ZIC_MAX_ABBR_LEN_WO_WARN alphabetics
-   ** optionally followed by a + or - and a number from 1 to 14.
-   */
cp = string;
wp = NULL;
while (isascii((unsigned char) *cp) &&
-   isalpha((unsigned char) *cp))
+   (isalnum((unsigned char)*cp) || *cp == '-' || *cp == 
'+'))
++cp;
-   if (cp - string == 0)
-wp = _("time zone abbreviation lacks alphabetic at start");
if (noise && cp - string > 3)
-wp = _("time zone abbreviation has more than 3 alphabetics");
+wp = _("time zone abbreviation has more than 3 characters");
if (cp - string > ZIC_MAX_ABBR_LEN_WO_WARN)
-wp = _("time zone abbreviation has too many alphabetics");
-   if (wp == NULL && (*cp == '+' || *cp == '-')) {
-   ++cp;
-   if (isascii((unsigned char) *cp) &&
-   isdigit((unsigned char) *cp))
-   if (*cp++ == '1' &&
-   *cp >= '0' && *cp <= '4')
-   ++cp;
-   }
+wp = _("time zone abbreviation has too many characters");
if (*cp != '\0')
 wp = _("time zone abbreviation differs from POSIX standard");
if (wp != NULL) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306851 - stable/11/sys/dev/ral

2016-10-08 Thread Andriy Voskoboinyk
Author: avos
Date: Sat Oct  8 16:39:21 2016
New Revision: 306851
URL: https://svnweb.freebsd.org/changeset/base/306851

Log:
  MFC r306498:
  
  ral (rt2860): eliminate duplicate ieee80211_process_callback() call
  (left after r287197)
  
  While here, add missing mergeinfo for r306320 (committed in r306549)

Modified:
  stable/11/sys/dev/ral/rt2860.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/ral/rt2860.c
==
--- stable/11/sys/dev/ral/rt2860.c  Sat Oct  8 14:58:26 2016
(r306850)
+++ stable/11/sys/dev/ral/rt2860.c  Sat Oct  8 16:39:21 2016
(r306851)
@@ -1140,10 +1140,6 @@ rt2860_tx_intr(struct rt2860_softc *sc, 
bus_dmamap_sync(sc->txwi_dmat, data->map,
BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(sc->txwi_dmat, data->map);
-   if (data->m->m_flags & M_TXCB) {
-   ieee80211_process_callback(data->ni, data->m,
-   0);
-   }
ieee80211_tx_complete(data->ni, data->m, 0);
data->ni = NULL;
data->m = NULL;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-10-08 Thread Kevin Lo
On Wed, Oct 05, 2016 at 04:14:42PM -0700, Gleb Smirnoff wrote:
> 
> On Wed, Oct 05, 2016 at 11:20:58AM +0800, Kevin Lo wrote:
> K> > On Thu, Sep 15, 2016 at 07:41:48AM +, Kevin Lo wrote:
> K> > K> Log:
> K> > K>   Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead.
> K> > ...
> K> > K> Modified: head/sys/contrib/ipfilter/netinet/fil.c
> K> > K> 
> ==
> K> > K> --- head/sys/contrib/ipfilter/netinet/fil.c   Thu Sep 15 02:48:56 
> 2016(r305823)
> K> > K> +++ head/sys/contrib/ipfilter/netinet/fil.c   Thu Sep 15 07:41:48 
> 2016(r305824)
> K> > K> @@ -3226,7 +3226,7 @@ filterdone:
> K> > K>   fdp = fin->fin_dif;
> K> > K>   if ((fdp != NULL) && (fdp->fd_ptr != NULL) &&
> K> > K>   (fdp->fd_ptr != (void *)-1)) {
> K> > K> - mc = M_COPY(fin->fin_m);
> K> > K> + mc = M_COPYM(fin->fin_m);
> K> > K>   if (mc != NULL)
> K> > K>   ipf_fastroute(mc, , fin, fdp);
> K> > K>   }
> K> > K> 
> K> > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
> K> > K> 
> ==
> K> > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 
> 02:48:56 2016(r305823)
> K> > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 
> 07:41:48 2016(r305824)
> K> > K> @@ -211,7 +211,7 @@ struct  ether_addr {
> K> > K>  #  defineMSGDSIZE(m) mbufchainlen(m)
> K> > K>  #  defineM_LEN(m)(m)->m_len
> K> > K>  #  defineM_ADJ(m,x)  m_adj(m, x)
> K> > K> -#  defineM_COPY(x)   m_copy((x), 0, M_COPYALL)
> K> > K> +#  defineM_COPYM(x)  m_copym((x), 0, M_COPYALL, M_NOWAIT)
> K> > K>  #  defineM_DUP(m)m_dup(m, M_NOWAIT)
> K> > K>  #  defineIPF_PANIC(x,y)  if (x) { printf y; panic("ipf_panic"); }
> K> > K>  typedef struct mbuf mb_t;
> K> > K> @@ -366,7 +366,7 @@ typedef   struct  mb_s{
> K> > K>  # define MSGDSIZE(m) msgdsize(m)
> K> > K>  # define M_LEN(m)(m)->mb_len
> K> > K>  # define M_ADJ(m,x)  (m)->mb_len += x
> K> > K> -# define M_COPY(m)   dupmbt(m)
> K> > K> +# define M_COPYM(m)  dupmbt(m)
> K> > K>  # define M_DUP(m)dupmbt(m)
> K> > K>  # define GETKTIME(x) gettimeofday((struct timeval *)(x), 
> NULL)
> K> > K>  # define MTOD(m, t)  ((t)(m)->mb_data)
> K> > 
> K> > IMHO, for contributed ipfilter we should only modify ip_compat.h and 
> ip_fil_freebsd.c.
> K> > In case of removal of m_copy() the macro should remain named M_COPY(), 
> but it should be
> K> > defined to call to function of m_copym(). So fil.c can be left 
> unmodified, and ip_compat.h
> K> > will have only 1 line change. The userland part of ip_compat.h which 
> defines M_COPY() to
> K> > dupmbt() doesn't need to be renamed as well.
> K> 
> K> Actually your comments were addressed in my original patch, but rwatson@
> K> pointed out that switching M_COPY() to M_COPYM() for consistency:
> K> https://reviews.freebsd.org/D7878#163304
> 
> This looks more like a general comment, not comment to ipfilter part. Robert,
> can you confirm please?
> 
> The ipfilter part should have modifications only in ip_compat.h and 
> ip_fil_freebsd.c.

Fixed in r306849, thanks.

> -- 
> Totus tuus, Glebius.

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


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

2016-10-08 Thread Kevin Lo
Author: kevlo
Date: Sat Oct  8 14:58:26 2016
New Revision: 306850
URL: https://svnweb.freebsd.org/changeset/base/306850

Log:
  Add description for ifi_oqdrops.

Modified:
  head/share/man/man9/ifnet.9

Modified: head/share/man/man9/ifnet.9
==
--- head/share/man/man9/ifnet.9 Sat Oct  8 14:57:21 2016(r306849)
+++ head/share/man/man9/ifnet.9 Sat Oct  8 14:58:26 2016(r306850)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 27, 2016
+.Dd October 8, 2016
 .Dt IFNET 9
 .Os
 .Sh NAME
@@ -951,6 +951,8 @@ Number of packets sent by link-layer mul
 .It Va ifi_iqdrops
 Number of packets dropped on input.
 Rarely implemented.
+.It Va ifi_oqdrops
+Number of packets dropped on output.
 .It Va ifi_noproto
 Number of packets received for unknown network-layer protocol.
 .It Va ifi_lastchange
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306849 - head/sys/contrib/ipfilter/netinet

2016-10-08 Thread Kevin Lo
Author: kevlo
Date: Sat Oct  8 14:57:21 2016
New Revision: 306849
URL: https://svnweb.freebsd.org/changeset/base/306849

Log:
  In case of removal of m_copy() the macro should remain named M_COPY()
  in ip_compat.h after r305824.  Leaving as vanilla as possible aids in
  future maintenance and upgrades.
  
  Suggested by: glebius, cy

Modified:
  head/sys/contrib/ipfilter/netinet/fil.c
  head/sys/contrib/ipfilter/netinet/ip_compat.h

Modified: head/sys/contrib/ipfilter/netinet/fil.c
==
--- head/sys/contrib/ipfilter/netinet/fil.c Sat Oct  8 14:32:43 2016
(r306848)
+++ head/sys/contrib/ipfilter/netinet/fil.c Sat Oct  8 14:57:21 2016
(r306849)
@@ -3226,7 +3226,7 @@ filterdone:
fdp = fin->fin_dif;
if ((fdp != NULL) && (fdp->fd_ptr != NULL) &&
(fdp->fd_ptr != (void *)-1)) {
-   mc = M_COPYM(fin->fin_m);
+   mc = M_COPY(fin->fin_m);
if (mc != NULL)
ipf_fastroute(mc, , fin, fdp);
}

Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
==
--- head/sys/contrib/ipfilter/netinet/ip_compat.h   Sat Oct  8 14:32:43 
2016(r306848)
+++ head/sys/contrib/ipfilter/netinet/ip_compat.h   Sat Oct  8 14:57:21 
2016(r306849)
@@ -212,7 +212,7 @@ struct  ether_addr {
 #  define  MSGDSIZE(m) mbufchainlen(m)
 #  define  M_LEN(m)(m)->m_len
 #  define  M_ADJ(m,x)  m_adj(m, x)
-#  define  M_COPYM(x)  m_copym((x), 0, M_COPYALL, M_NOWAIT)
+#  define  M_COPY(x)   m_copym((x), 0, M_COPYALL, M_NOWAIT)
 #  define  M_DUP(m)m_dup(m, M_NOWAIT)
 #  define  IPF_PANIC(x,y)  if (x) { printf y; panic("ipf_panic"); }
 typedef struct mbuf mb_t;
@@ -367,7 +367,7 @@ typedef struct  mb_s{
 # define   MSGDSIZE(m) msgdsize(m)
 # define   M_LEN(m)(m)->mb_len
 # define   M_ADJ(m,x)  (m)->mb_len += x
-# define   M_COPYM(m)  dupmbt(m)
+# define   M_COPY(m)   dupmbt(m)
 # define   M_DUP(m)dupmbt(m)
 # define   GETKTIME(x) gettimeofday((struct timeval *)(x), NULL)
 # define   MTOD(m, t)  ((t)(m)->mb_data)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r306843 - in head/bin/sh: . tests/parameters

2016-10-08 Thread Pedro Giffuni



On 10/08/16 08:40, Jilles Tjoelker wrote:

Author: jilles
Date: Sat Oct  8 13:40:12 2016
New Revision: 306843
URL: https://svnweb.freebsd.org/changeset/base/306843

Log:
  sh: Do not import IFS's value from the environment.

  Per Austin group issue #884, always set IFS to $' \t\n'. As before, IFS will
  be exported iff it was in the environment.

  Most shells (e.g. bash, ksh93 and mksh) already did this. This change
  improves predictability, in that scripts can simply rely on the default
  value.

  However, the effect on security is little, since applications should not be
  calling the shell with attacker-controlled environment variable names in the
  first place and other security-sensitive variables such as PATH should be
  and are imported by the shell.

  When using a new sh with an old (before 10.2) libc wordexp(), IFS is no
  longer passed on. Otherwise, wordexp() continues to pass along IFS from the
  environment per its documentation.

  Discussed with:   pfg
  Relnotes: yes



For the record, the idea was suggested originally by Joerg Schilling.

Thanks!

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


svn commit: r306848 - vendor/tzdata/tzdata2016g

2016-10-08 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  8 14:32:43 2016
New Revision: 306848
URL: https://svnweb.freebsd.org/changeset/base/306848

Log:
  Tag import of tzdata 2016g

Added:
  vendor/tzdata/tzdata2016g/
 - copied from r294088, vendor/tzdata/dist/
Replaced:
  vendor/tzdata/tzdata2016g/africa
 - copied unchanged from r306847, vendor/tzdata/dist/africa
  vendor/tzdata/tzdata2016g/antarctica
 - copied unchanged from r306847, vendor/tzdata/dist/antarctica
  vendor/tzdata/tzdata2016g/asia
 - copied unchanged from r306847, vendor/tzdata/dist/asia
  vendor/tzdata/tzdata2016g/australasia
 - copied unchanged from r306847, vendor/tzdata/dist/australasia
  vendor/tzdata/tzdata2016g/backward
 - copied unchanged from r306847, vendor/tzdata/dist/backward
  vendor/tzdata/tzdata2016g/etcetera
 - copied unchanged from r306847, vendor/tzdata/dist/etcetera
  vendor/tzdata/tzdata2016g/europe
 - copied unchanged from r306847, vendor/tzdata/dist/europe
  vendor/tzdata/tzdata2016g/factory
 - copied unchanged from r306847, vendor/tzdata/dist/factory
  vendor/tzdata/tzdata2016g/iso3166.tab
 - copied unchanged from r306847, vendor/tzdata/dist/iso3166.tab
  vendor/tzdata/tzdata2016g/leap-seconds.list
 - copied unchanged from r306847, vendor/tzdata/dist/leap-seconds.list
  vendor/tzdata/tzdata2016g/leapseconds
 - copied unchanged from r306847, vendor/tzdata/dist/leapseconds
  vendor/tzdata/tzdata2016g/northamerica
 - copied unchanged from r306847, vendor/tzdata/dist/northamerica
  vendor/tzdata/tzdata2016g/southamerica
 - copied unchanged from r306847, vendor/tzdata/dist/southamerica
  vendor/tzdata/tzdata2016g/zone.tab
 - copied unchanged from r306847, vendor/tzdata/dist/zone.tab
  vendor/tzdata/tzdata2016g/zone1970.tab
 - copied unchanged from r306847, vendor/tzdata/dist/zone1970.tab

Copied: vendor/tzdata/tzdata2016g/africa (from r306847, 
vendor/tzdata/dist/africa)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/tzdata/tzdata2016g/africaSat Oct  8 14:32:43 2016
(r306848, copy of r306847, vendor/tzdata/dist/africa)
@@ -0,0 +1,1188 @@
+# This file is in the public domain, so clarified as of
+# 2009-05-17 by Arthur David Olson.
+
+# This file is by no means authoritative; if you think you know better,
+# go ahead and edit the file (and please send any changes to
+# t...@iana.org for general use in the future).  For more, please see
+# the file CONTRIBUTING in the tz distribution.
+
+# From Paul Eggert (2014-10-31):
+#
+# Unless otherwise specified, the source for data through 1990 is:
+# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
+# San Diego: ACS Publications, Inc. (2003).
+# Unfortunately this book contains many errors and cites no sources.
+#
+# Gwillim Law writes that a good source
+# for recent time zone data is the International Air Transport
+# Association's Standard Schedules Information Manual (IATA SSIM),
+# published semiannually.  Law sent in several helpful summaries
+# of the IATA's data after 1990.  Except where otherwise noted,
+# IATA SSIM is the source for entries after 1990.
+#
+# Another source occasionally used is Edward W. Whitman, World Time 
Differences,
+# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated), which
+# I found in the UCLA library.
+#
+# For data circa 1899, a common source is:
+# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94.
+# http://www.jstor.org/stable/1774359
+#
+# A reliable and entertaining source about time zones is
+# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
+#
+# Previous editions of this database used WAT, CAT, SAT, and EAT
+# for +0:00 through +3:00, respectively,
+# but Mark R V Murray reports that
+# 'SAST' is the official abbreviation for +2:00 in the country of South Africa,
+# 'CAT' is commonly used for +2:00 in countries north of South Africa, and
+# 'WAT' is probably the best name for +1:00, as the common phrase for
+# the area that includes Nigeria is "West Africa".
+# He has heard of "Western Sahara Time" for +0:00 but can find no reference.
+#
+# To make things confusing, 'WAT' seems to have been used for -1:00 long ago;
+# I'd guess that this was because people needed _some_ name for -1:00,
+# and at the time, far west Africa was the only major land area in -1:00.
+# This usage is now obsolete, as the last use of -1:00 on the African
+# mainland seems to have been 1976 in Western Sahara.
+#
+# To summarize, the following abbreviations seem to have some currency:
+#  -1:00   WAT West Africa Time (no longer used)
+#   0:00   GMT Greenwich Mean Time
+#   2:00   CAT Central Africa Time
+#   2:00   SASTSouth Africa Standard Time
+# and Murray suggests the following abbreviation:
+#   1:00   WAT West Africa Time
+# I realize that this leads to 'WAT' being used for both -1:00 and 

svn commit: r306847 - vendor/tzdata/dist

2016-10-08 Thread Baptiste Daroussin
Author: bapt
Date: Sat Oct  8 14:31:55 2016
New Revision: 306847
URL: https://svnweb.freebsd.org/changeset/base/306847

Log:
  Import tzdata 2016g

Modified:
  vendor/tzdata/dist/africa
  vendor/tzdata/dist/antarctica
  vendor/tzdata/dist/asia
  vendor/tzdata/dist/australasia
  vendor/tzdata/dist/backward
  vendor/tzdata/dist/etcetera
  vendor/tzdata/dist/europe
  vendor/tzdata/dist/factory
  vendor/tzdata/dist/iso3166.tab
  vendor/tzdata/dist/leap-seconds.list
  vendor/tzdata/dist/leapseconds
  vendor/tzdata/dist/northamerica
  vendor/tzdata/dist/southamerica
  vendor/tzdata/dist/zone.tab
  vendor/tzdata/dist/zone1970.tab

Modified: vendor/tzdata/dist/africa
==
--- vendor/tzdata/dist/africa   Sat Oct  8 14:10:45 2016(r306846)
+++ vendor/tzdata/dist/africa   Sat Oct  8 14:31:55 2016(r306847)
@@ -343,6 +343,12 @@ Rule   Egypt   2007only-   Sep Thu>=1  
24:00   
 # decision to abandon DST permanently.  See Ahram Online 2015-04-24.
 # 
http://english.ahram.org.eg/NewsContent/1/64/128509/Egypt/Politics-/Sisi-cancels-daylight-saving-time-in-Egypt.aspx
 
+# From Steffen Thorsen (2016-04-29):
+# Egypt will have DST from July 7 until the end of October
+# 
http://english.ahram.org.eg/NewsContentP/1/204655/Egypt/Daylight-savings-time-returning-to-Egypt-on--July.aspx
+# From Mina Samuel (2016-07-04):
+# Egyptian government took the decision to cancel the DST,
+
 Rule   Egypt   2008only-   Aug lastThu 24:00   0   -
 Rule   Egypt   2009only-   Aug 20  24:00   0   -
 Rule   Egypt   2010only-   Aug 10  24:00   0   -
@@ -458,7 +464,7 @@ ZoneAfrica/Monrovia -0:43:08 -  LMT 1882
 # http://www.libyaherald.com/2013/10/24/correction-no-time-change-tomorrow/
 #
 # From Paul Eggert (2013-10-25):
-# For now, assume they're reverting to the pre-2012 rules of permanent UTC+2.
+# For now, assume they're reverting to the pre-2012 rules of permanent UT +02.
 
 # Rule NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
 Rule   Libya   1951only-   Oct 14  2:001:00S
@@ -858,11 +864,11 @@ Rule  Morocco 2009only-   Aug 21  
 0:00   0   
 Rule   Morocco 2010only-   May  2   0:00   1:00S
 Rule   Morocco 2010only-   Aug  8   0:00   0   -
 Rule   Morocco 2011only-   Apr  3   0:00   1:00S
-Rule   Morocco 2011only-   Jul 31   0  0   -
+Rule   Morocco 2011only-   Jul 31   0:00   0   -
 Rule   Morocco 20122013-   Apr lastSun  2:00   1:00S
-Rule   Morocco 2012only-   Sep 30   3:00   0   -
 Rule   Morocco 2012only-   Jul 20   3:00   0   -
 Rule   Morocco 2012only-   Aug 20   2:00   1:00S
+Rule   Morocco 2012only-   Sep 30   3:00   0   -
 Rule   Morocco 2013only-   Jul  7   3:00   0   -
 Rule   Morocco 2013only-   Aug 10   2:00   1:00S
 Rule   Morocco 2013max -   Oct lastSun  3:00   0   -

Modified: vendor/tzdata/dist/antarctica
==
--- vendor/tzdata/dist/antarctica   Sat Oct  8 14:10:45 2016
(r306846)
+++ vendor/tzdata/dist/antarctica   Sat Oct  8 14:31:55 2016
(r306847)
@@ -10,10 +10,8 @@
 # http://www.spri.cam.ac.uk/bob/periant.htm
 # for information.
 # Unless otherwise specified, we have no time zone information.
-#
-# Except for the French entries,
-# I made up all time zone abbreviations mentioned here; corrections welcome!
-# FORMAT is 'zzz' and GMTOFF is 0 for locations while uninhabited.
+
+# FORMAT is '-00' and GMTOFF is 0 for locations while uninhabited.
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
@@ -29,7 +27,7 @@
 #  previously sealers and scientific personnel wintered
 #  Margaret Turner reports
 #  
http://web.archive.org/web/2002120445/http://www.dstc.qut.edu.au/DST/marg/daylight.html
-#  (1999-09-30) that they're UTC+5, with no DST;
+#  (1999-09-30) that they're UT +05, with no DST;
 #  presumably this is when they have visitors.
 #
 # year-round bases
@@ -67,24 +65,23 @@
 # http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
 
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
-Zone Antarctica/Casey  0   -   zzz 1969
-   8:00-   AWST2009 Oct 18  2:00
-   # Australian Western Std Time
-   11:00   -   CAST2010 Mar  5  2:00  # Casey Time
-   8:00-   AWST2011 Oct 28  2:00
-   11:00   -   

svn commit: r306846 - stable/10/include

2016-10-08 Thread Eric van Gyzen
Author: vangyzen
Date: Sat Oct  8 14:10:45 2016
New Revision: 306846
URL: https://svnweb.freebsd.org/changeset/base/306846

Log:
  MFC r306568, r306569
  
  Add the __printflike attribute to the declarations of
  dprintf(3) and vdprintf(3).
  
  Sponsored by: Dell EMC

Modified:
  stable/10/include/stdio.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/include/stdio.h
==
--- stable/10/include/stdio.h   Sat Oct  8 14:07:34 2016(r306845)
+++ stable/10/include/stdio.h   Sat Oct  8 14:10:45 2016(r306846)
@@ -351,7 +351,7 @@ ssize_t  getdelim(char ** __restrict, si
FILE * __restrict);
 FILE   *open_memstream(char **, size_t *);
 int renameat(int, const char *, int, const char *);
-int vdprintf(int, const char * __restrict, __va_list);
+int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0);
 
 /*
  * Every programmer and his dog wrote functions called getline() and dprintf()
@@ -387,7 +387,7 @@ ssize_t  getline(char ** __restrict, siz
 #endif
 
 #ifdef _WITH_DPRINTF
-int (dprintf)(int, const char * __restrict, ...);
+int (dprintf)(int, const char * __restrict, ...) __printflike(2, 3);
 #endif
 
 #endif /* __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306845 - stable/11/include

2016-10-08 Thread Eric van Gyzen
Author: vangyzen
Date: Sat Oct  8 14:07:34 2016
New Revision: 306845
URL: https://svnweb.freebsd.org/changeset/base/306845

Log:
  MFC r306568, r306569
  
  Add the __printflike attribute to the declarations of
  dprintf(3) and vdprintf(3).
  
  Sponsored by: Dell EMC

Modified:
  stable/11/include/stdio.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/include/stdio.h
==
--- stable/11/include/stdio.h   Sat Oct  8 13:49:40 2016(r306844)
+++ stable/11/include/stdio.h   Sat Oct  8 14:07:34 2016(r306845)
@@ -356,7 +356,7 @@ ssize_t  getdelim(char ** __restrict, si
FILE * __restrict);
 FILE   *open_memstream(char **, size_t *);
 int renameat(int, const char *, int, const char *);
-int vdprintf(int, const char * __restrict, __va_list);
+int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0);
 
 /*
  * Every programmer and his dog wrote functions called getline() and dprintf()
@@ -392,7 +392,7 @@ ssize_t  getline(char ** __restrict, siz
 #endif
 
 #ifdef _WITH_DPRINTF
-int (dprintf)(int, const char * __restrict, ...);
+int (dprintf)(int, const char * __restrict, ...) __printflike(2, 3);
 #endif
 
 #endif /* __POSIX_VISIBLE >= 200809 */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306844 - stable/11/sys/dev/lmc

2016-10-08 Thread Eric van Gyzen
Author: vangyzen
Date: Sat Oct  8 13:49:40 2016
New Revision: 306844
URL: https://svnweb.freebsd.org/changeset/base/306844

Log:
  lmc(4): fix the build without the bpf device
  
  Reported by:  Dave Mischler 
  Sponsored by: Dell EMC

Modified:
  stable/11/sys/dev/lmc/if_lmc.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/lmc/if_lmc.c
==
--- stable/11/sys/dev/lmc/if_lmc.c  Sat Oct  8 13:40:12 2016
(r306843)
+++ stable/11/sys/dev/lmc/if_lmc.c  Sat Oct  8 13:49:40 2016
(r306844)
@@ -91,7 +91,11 @@
 # define  P2P 0/* not in FreeBSD */
 # define NSPPP 1   /* No count devices in FreeBSD 5 */
 # include "opt_bpf.h"  /* DEV_BPF */
-# define NBPFILTER DEV_BPF
+# ifdef DEV_BPF
+#  define NBPFILTER 1
+# else
+#  define NBPFILTER 0
+# endif
 # define  GEN_HDLC 0   /* not in FreeBSD */
 #
 # include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306843 - in head/bin/sh: . tests/parameters

2016-10-08 Thread Jilles Tjoelker
Author: jilles
Date: Sat Oct  8 13:40:12 2016
New Revision: 306843
URL: https://svnweb.freebsd.org/changeset/base/306843

Log:
  sh: Do not import IFS's value from the environment.
  
  Per Austin group issue #884, always set IFS to $' \t\n'. As before, IFS will
  be exported iff it was in the environment.
  
  Most shells (e.g. bash, ksh93 and mksh) already did this. This change
  improves predictability, in that scripts can simply rely on the default
  value.
  
  However, the effect on security is little, since applications should not be
  calling the shell with attacker-controlled environment variable names in the
  first place and other security-sensitive variables such as PATH should be
  and are imported by the shell.
  
  When using a new sh with an old (before 10.2) libc wordexp(), IFS is no
  longer passed on. Otherwise, wordexp() continues to pass along IFS from the
  environment per its documentation.
  
  Discussed with:   pfg
  Relnotes: yes

Added:
  head/bin/sh/tests/parameters/ifs1.0   (contents, props changed)
Modified:
  head/bin/sh/sh.1
  head/bin/sh/tests/parameters/Makefile
  head/bin/sh/var.c

Modified: head/bin/sh/sh.1
==
--- head/bin/sh/sh.1Sat Oct  8 13:38:05 2016(r306842)
+++ head/bin/sh/sh.1Sat Oct  8 13:40:12 2016(r306843)
@@ -32,7 +32,7 @@
 .\"from: @(#)sh.1  8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd May 30, 2016
+.Dd October 8, 2016
 .Dt SH 1
 .Os
 .Sh NAME
@@ -1349,13 +1349,13 @@ used in tilde expansion and as a default
 built-in.
 .It Va IFS
 Input Field Separators.
-The default value is
+This is initialized at startup to
 .Aq space ,
 .Aq tab ,
 and
 .Aq newline
 in that order.
-This default also applies if
+This value also applies if
 .Va IFS
 is unset, but not if it is set to the empty string.
 See the

Modified: head/bin/sh/tests/parameters/Makefile
==
--- head/bin/sh/tests/parameters/Makefile   Sat Oct  8 13:38:05 2016
(r306842)
+++ head/bin/sh/tests/parameters/Makefile   Sat Oct  8 13:40:12 2016
(r306843)
@@ -9,6 +9,7 @@ ATF_TESTS_SH=   functional_test
 
 ${PACKAGE}FILES+=  env1.0
 ${PACKAGE}FILES+=  exitstatus1.0
+${PACKAGE}FILES+=  ifs1.0
 ${PACKAGE}FILES+=  mail1.0
 ${PACKAGE}FILES+=  mail2.0
 ${PACKAGE}FILES+=  optind1.0

Added: head/bin/sh/tests/parameters/ifs1.0
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/sh/tests/parameters/ifs1.0 Sat Oct  8 13:40:12 2016
(r306843)
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+env IFS=_ ${SH} -c '
+rc=2
+nosuchtool_function() {
+   rc=0
+}
+v=nosuchtool_function
+$v && exit "$rc"
+'

Modified: head/bin/sh/var.c
==
--- head/bin/sh/var.c   Sat Oct  8 13:38:05 2016(r306842)
+++ head/bin/sh/var.c   Sat Oct  8 13:40:12 2016(r306843)
@@ -186,6 +186,7 @@ initvar(void)
}
}
setvareq_const("OPTIND=1", 0);
+   setvareq_const("IFS= \t\n", 0);
 }
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306842 - head/sys/kern

2016-10-08 Thread Mateusz Guzik
Author: mjg
Date: Sat Oct  8 13:38:05 2016
New Revision: 306842
URL: https://svnweb.freebsd.org/changeset/base/306842

Log:
  vfs: assert empty tmp free list on unmount

Modified:
  head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==
--- head/sys/kern/vfs_mount.c   Sat Oct  8 13:36:59 2016(r306841)
+++ head/sys/kern/vfs_mount.c   Sat Oct  8 13:38:05 2016(r306842)
@@ -522,6 +522,8 @@ vfs_mount_destroy(struct mount *mp)
panic("vfs_mount_destroy: nonzero nvnodelistsize");
if (mp->mnt_activevnodelistsize != 0)
panic("vfs_mount_destroy: nonzero activevnodelistsize");
+   if (mp->mnt_tmpfreevnodelistsize != 0)
+   panic("vfs_mount_destroy: nonzero tmpfreevnodelistsize");
if (mp->mnt_lockref != 0)
panic("vfs_mount_destroy: nonzero lock refcount");
MNT_IUNLOCK(mp);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306841 - head/sys/kern

2016-10-08 Thread Mateusz Guzik
Author: mjg
Date: Sat Oct  8 13:36:59 2016
New Revision: 306841
URL: https://svnweb.freebsd.org/changeset/base/306841

Log:
  vfs: clear the tmp free list flag before taking the free vnode list lock
  
  Safe access is already guaranteed because of the mnt_listmx lock.

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cSat Oct  8 12:53:23 2016(r306840)
+++ head/sys/kern/vfs_subr.cSat Oct  8 13:36:59 2016(r306841)
@@ -1066,16 +1066,16 @@ vnlru_return_batch_locked(struct mount *
if (mp->mnt_tmpfreevnodelistsize == 0)
return;
 
-   mtx_lock(_free_list_mtx);
TAILQ_FOREACH(vp, >mnt_tmpfreevnodelist, v_actfreelist) {
VNASSERT((vp->v_mflag & VMP_TMPMNTFREELIST) != 0, vp,
("vnode without VMP_TMPMNTFREELIST on 
mnt_tmpfreevnodelist"));
vp->v_mflag &= ~VMP_TMPMNTFREELIST;
}
+   mtx_lock(_free_list_mtx);
TAILQ_CONCAT(_free_list, >mnt_tmpfreevnodelist, 
v_actfreelist);
freevnodes += mp->mnt_tmpfreevnodelistsize;
-   mp->mnt_tmpfreevnodelistsize = 0;
mtx_unlock(_free_list_mtx);
+   mp->mnt_tmpfreevnodelistsize = 0;
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r306840 - head/sbin/devd

2016-10-08 Thread Sevan Janiyan
Author: sevan (doc committer)
Date: Sat Oct  8 12:53:23 2016
New Revision: 306840
URL: https://svnweb.freebsd.org/changeset/base/306840

Log:
  Sort SEE ALSO section sequentially.
  Highlighted by mandoc -Tlint
  
  PR:   212440
  Approved by:  imp
  MFC after:5 days
  Differential Revision:https://reviews.freebsd.org/D8192

Modified:
  head/sbin/devd/devd.conf.5

Modified: head/sbin/devd/devd.conf.5
==
--- head/sbin/devd/devd.conf.5  Sat Oct  8 05:26:45 2016(r306839)
+++ head/sbin/devd/devd.conf.5  Sat Oct  8 12:53:23 2016(r306840)
@@ -41,7 +41,7 @@
 .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 .\" SOFTWARE.
 .\"
-.Dd April 14, 2016
+.Dd October 8, 2016
 .Dt DEVD.CONF 5
 .Os
 .Sh NAME
@@ -646,8 +646,8 @@ The installed
 .Pa /etc/devd.conf
 has many additional examples.
 .Sh SEE ALSO
+.Xr cam 4 ,
 .Xr coretemp 4 ,
 .Xr devfs 5 ,
 .Xr re_format 7 ,
-.Xr devd 8 ,
-.Xr cam 4
+.Xr devd 8
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"