svn commit: r288256 - in head/sys: amd64/amd64 arm/arm arm64/arm64 i386/i386 mips/mips

2015-09-26 Thread Alan Cox
Author: alc
Date: Sat Sep 26 07:18:05 2015
New Revision: 288256
URL: https://svnweb.freebsd.org/changeset/base/288256

Log:
  Exploit r288122 to address a cosmetic issue.  Since PV chunk pages don't
  belong to a vm object, they can't be paged out.  Since they can't be paged
  out, they are never enqueued in a paging queue.  Nonetheless, passing
  PQ_INACTIVE to vm_page_unwire() creates the appearance that these pages
  are being enqueued in the inactive queue.  As of r288122, we can avoid
  this false impression by passing PQ_NONE.
  
  Submitted by: kmacy (an earlier version)
  Differential Revision:https://reviews.freebsd.org/D1674

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/arm/arm/pmap-v6-new.c
  head/sys/arm/arm/pmap-v6.c
  head/sys/arm64/arm64/pmap.c
  head/sys/i386/i386/pmap.c
  head/sys/mips/mips/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Sat Sep 26 07:14:00 2015(r288255)
+++ head/sys/amd64/amd64/pmap.c Sat Sep 26 07:18:05 2015(r288256)
@@ -2860,7 +2860,7 @@ free_pv_chunk(struct pv_chunk *pc)
/* entire chunk is free, return it */
m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc));
dump_drop_page(m->phys_addr);
-   vm_page_unwire(m, PQ_INACTIVE);
+   vm_page_unwire(m, PQ_NONE);
vm_page_free(m);
 }
 

Modified: head/sys/arm/arm/pmap-v6-new.c
==
--- head/sys/arm/arm/pmap-v6-new.c  Sat Sep 26 07:14:00 2015
(r288255)
+++ head/sys/arm/arm/pmap-v6-new.c  Sat Sep 26 07:18:05 2015
(r288256)
@@ -2866,7 +2866,7 @@ free_pv_chunk(struct pv_chunk *pc)
/* entire chunk is free, return it */
m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc));
pmap_qremove((vm_offset_t)pc, 1);
-   vm_page_unwire(m, PQ_INACTIVE);
+   vm_page_unwire(m, PQ_NONE);
vm_page_free(m);
pmap_pte2list_free(_vafree, (vm_offset_t)pc);
 }

Modified: head/sys/arm/arm/pmap-v6.c
==
--- head/sys/arm/arm/pmap-v6.c  Sat Sep 26 07:14:00 2015(r288255)
+++ head/sys/arm/arm/pmap-v6.c  Sat Sep 26 07:18:05 2015(r288256)
@@ -4292,7 +4292,7 @@ pmap_free_pv_chunk(struct pv_chunk *pc)
/* entire chunk is free, return it */
m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc));
pmap_qremove((vm_offset_t)pc, 1);
-   vm_page_unwire(m, PQ_INACTIVE);
+   vm_page_unwire(m, PQ_NONE);
vm_page_free(m);
pmap_ptelist_free(_vafree, (vm_offset_t)pc);
 

Modified: head/sys/arm64/arm64/pmap.c
==
--- head/sys/arm64/arm64/pmap.c Sat Sep 26 07:14:00 2015(r288255)
+++ head/sys/arm64/arm64/pmap.c Sat Sep 26 07:18:05 2015(r288256)
@@ -1517,7 +1517,7 @@ free_pv_chunk(struct pv_chunk *pc)
/* entire chunk is free, return it */
m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc));
dump_drop_page(m->phys_addr);
-   vm_page_unwire(m, PQ_INACTIVE);
+   vm_page_unwire(m, PQ_NONE);
vm_page_free(m);
 }
 

Modified: head/sys/i386/i386/pmap.c
==
--- head/sys/i386/i386/pmap.c   Sat Sep 26 07:14:00 2015(r288255)
+++ head/sys/i386/i386/pmap.c   Sat Sep 26 07:18:05 2015(r288256)
@@ -2312,7 +2312,7 @@ free_pv_chunk(struct pv_chunk *pc)
/* entire chunk is free, return it */
m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc));
pmap_qremove((vm_offset_t)pc, 1);
-   vm_page_unwire(m, PQ_INACTIVE);
+   vm_page_unwire(m, PQ_NONE);
vm_page_free(m);
pmap_ptelist_free(_vafree, (vm_offset_t)pc);
 }

Modified: head/sys/mips/mips/pmap.c
==
--- head/sys/mips/mips/pmap.c   Sat Sep 26 07:14:00 2015(r288255)
+++ head/sys/mips/mips/pmap.c   Sat Sep 26 07:18:05 2015(r288256)
@@ -1527,7 +1527,7 @@ free_pv_chunk(struct pv_chunk *pc)
PV_STAT(pc_chunk_frees++);
/* entire chunk is free, return it */
m = PHYS_TO_VM_PAGE(MIPS_DIRECT_TO_PHYS((vm_offset_t)pc));
-   vm_page_unwire(m, PQ_INACTIVE);
+   vm_page_unwire(m, PQ_NONE);
vm_page_free(m);
 }
 
___
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: r288252 - head/sys/dev/usb

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sat Sep 26 06:57:08 2015
New Revision: 288252
URL: https://svnweb.freebsd.org/changeset/base/288252

Log:
  Update USB device IDs for the upcoming AR9170 support.

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsSat Sep 26 04:22:18 2015(r288251)
+++ head/sys/dev/usb/usbdevsSat Sep 26 06:57:08 2015(r288252)
@@ -776,6 +776,7 @@ vendor MOSCHIP  0x9710  MosChip Semicondu
 vendor NETGEAR40x9846  Netgear
 vendor MARVELL 0x9e88  Marvell Technology Group Ltd.
 vendor 3COM3   0xa727  3Com
+vendor CACE0xcace  CACE Technologies
 vendor EVOLUTION   0xdeee  Evolution Robotics products
 vendor DATAAPEX0xdaae  DataApex
 vendor HP2 0xf003  Hewlett Packard
@@ -863,6 +864,7 @@ product ACCTON RT3070_3 0xc522  RT3070
 productACCTON RT3070_5 0xd522  RT3070
 product ACCTON RTL8192SU0xc512  RTL8192SU
 product ACCTON ZD1211B 0xe501  ZD1211B
+product ACCTON WN7512  0xf522  WN7512
 
 /* Aceeca products */
 product ACEECA MEZ1000 0x0001  MEZ1000 RDA
@@ -1223,6 +1225,11 @@ product ATHEROS2 AR5523_20x0003  AR5523
 product ATHEROS2 AR5523_2_NF   0x0004  AR5523 (no firmware)
 product ATHEROS2 AR5523_3  0x0005  AR5523
 product ATHEROS2 AR5523_3_NF   0x0006  AR5523 (no firmware)
+product ATHEROS2 TG121N0x1001  TG121N
+product ATHEROS2 WN821NV2  0x1002  WN821NV2
+product ATHEROS2 3CRUSBN2750x1010  3CRUSBN275
+product ATHEROS2 WN612 0x1011  WN612
+product ATHEROS2 AR91700x9170  AR9170
 
 /* Atmel Comp. products */
 product ATMEL STK541   0x2109  Zigbee Controller
@@ -1238,6 +1245,9 @@ product AUTHENTEC AES1610 0x1600  AES1610
 /* Avision products */
 product AVISION 1200U  0x0268  1200U scanner
 
+/* AVM products */
+product AVM FRITZWLAN  0x8401  FRITZ!WLAN N
+
 /* Axesstel products */
 product AXESSTEL DATAMODEM 0x1000  Data Modem
 
@@ -1340,6 +1350,9 @@ product BROTHER MFC8600_9650  0x0100  MFC8
 product BTC BTC61000x5550  6100C Keyboard
 product BTC BTC79320x6782  Keyboard with mouse port
 
+/* CACE Technologies products */
+product CACE AIRPCAPNX 0x0300  AirPcap NX
+
 /* Canon, Inc. products */
 product CANON N656U0x2206  CanoScan N656U
 product CANON N1220U   0x2207  CanoScan N1220U
@@ -1640,8 +1653,10 @@ product  DLINK DWA131B   0x330d  DWA-131 re
 product DLINK2 RTL8192SU_1 0x3300  RTL8192SU
 product DLINK2 RTL8192SU_2 0x3302  RTL8192SU
 product DLINK2 DWA131A10x3303  DWA-131 A1
+product DLINK2 DWA160A20x3a09  DWA-160 A2
 product DLINK2 DWA120  0x3a0c  DWA-120
 product DLINK2 DWA120_NF   0x3a0d  DWA-120 (no firmware)
+product DLINK2 DWA130D10x3a0f  DWA-130 D1
 product DLINK2 DWLG122C1   0x3c03  DWL-G122 c1
 product DLINK2 WUA1340 0x3c04  WUA-1340
 product DLINK2 DWA111  0x3c06  DWA-111
@@ -1652,6 +1667,7 @@ product DLINK2 RT3072_1   0x3c0b  RT3072
 product DLINK2 RT3070_10x3c0d  RT3070
 product DLINK2 RT3070_20x3c0e  RT3070
 product DLINK2 RT3070_30x3c0f  RT3070
+product DLINK2 DWA160A10x3c10  DWA-160 A1
 product DLINK2 RT2870_20x3c11  RT2870
 product DLINK2 DWA130  0x3c13  DWA-130
 product DLINK2 RT3070_40x3c15  RT3070
@@ -2469,6 +2485,7 @@ product IODATA USBETTXS   0x0913  USB ETTX
 product IODATA USBWNB11A   0x0919  USB WN-B11
 product IODATA USBWNB110x0922  USB Airport WN-B11
 product IODATA ETGUS2  0x0930  ETG-US2
+product IODATA WNGDNUS20x093f  WN-GDN/US2
 product IODATA RT3072_10x0944  RT3072
 product IODATA RT3072_20x0945  RT3072
 product IODATA RT3072_30x0947  RT3072
@@ -3209,6 +3226,7 @@ product NATIONAL BEARPAW2400  0x1001  Bear
 /* NEC products */
 product NEC HUB_0050   0x0050  USB 2.0 7-Port Hub
 product NEC HUB_005A   0x005a  USB 2.0 4-Port Hub
+product NEC WL300NUG   0x0249  WL300NU-G
 product NEC HUB0x55aa  hub
 product NEC HUB_B  0x55ab  hub
 
@@ -3241,7 +3259,11 @@ product NETGEAR WG111V3  0x4260  WG111v3
 product NETGEAR WG111U 0x4300  WG111U
 product NETGEAR WG111U_NF  0x4301  WG111U (no firmware)
 product NETGEAR WG111V20x6a00  WG111V2
+product NETGEAR WN111V20x9001  WN111V2
+product NETGEAR WNDA3100   0x9010  WNDA3100
+product NETGEAR WNDA3200   0x9018  WNDA3200
 product NETGEAR RTL8192CU  0x9021  RTL8192CU
+product NETGEAR WNA10000x9040  WNA1000
 product NETGEAR WNA1000M   0x9041  WNA1000M
 product 

svn commit: r288254 - head/share/man/man4

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sat Sep 26 07:09:46 2015
New Revision: 288254
URL: https://svnweb.freebsd.org/changeset/base/288254

Log:
  Add man pages for the AR9170 and AR9170 firmware.

Added:
  head/share/man/man4/otus.4   (contents, props changed)
  head/share/man/man4/otusfw.4   (contents, props changed)
Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileSat Sep 26 07:08:35 2015
(r288253)
+++ head/share/man/man4/MakefileSat Sep 26 07:09:46 2015
(r288254)
@@ -379,6 +379,8 @@ MAN=aac.4 \
oce.4 \
ohci.4 \
orm.4 \
+   otus.4 \
+   otusfw.4 \
ow.4 \
ow_temp.4 \
owc.4 \

Added: head/share/man/man4/otus.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/otus.4  Sat Sep 26 07:09:46 2015(r288254)
@@ -0,0 +1,169 @@
+.\" $FreeBSD$
+.\"
+.\" Copyright (c) 2015 Adrian Chadd 
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd September 25, 2015
+.Dt OTUS 4
+.Os
+.Sh NAME
+.Nm otus
+.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device ehci"
+.Cd "device uhci"
+.Cd "device ohci"
+.Cd "device usb"
+.Cd "device otus"
+.Cd "device wlan"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time,
+place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_otus_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 2.0 wireless network devices based on the Atheros
+AR9170 chipset.
+.Pp
+The Atheros AR9170 is a draft-802.11n adapter that uses an external
+radio to operate in either 2.4GHz only or 2.4GHz and 5GHz.
+.Pp
+The AR9101 radio supports 1T1R operation in 2GHz only.
+.Pp
+The AR9102 radio supports 2T2R operation in 2GHz only.
+.Pp
+The AR9104 radio supports 2T2R operation both 2GHz and 5GHz.
+.Pp
+These are the modes the
+.Nm
+driver can operate in:
+.Bl -tag -width "IBSS-masterXX"
+.It BSS mode
+Also known as
+.Em infrastructure
+mode, this is used when associating with an access point, through
+which all traffic passes.
+This mode is the default.
+.El
+.Pp
+The
+.Nm
+driver can be configured to use
+Wired Equivalent Privacy (WEP) or
+Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
+WPA is the de facto encryption standard for wireless networks.
+It is strongly recommended that WEP
+not be used as the sole mechanism
+to secure wireless communication,
+due to serious weaknesses in it.
+.Pp
+The
+.Nm
+driver can be configured at runtime with
+.Xr ifconfig 8 .
+.Sh FILES
+The driver needs at least version 1.0 of the following firmware files,
+which is loaded when an interface is attached:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It Pa /boot/kernel/otusfw-init.ko
+.It Pa /boot/kernel/otusfw-main.ko
+.El
+.Sh HARDWARE
+The
+.Nm
+driver provices support for Atheros AR9170 USB IEEE 802.11b/g/n
+wireless network adapters, including:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It 3Com 3CRUSBN275
+.It Arcadyan WN7512
+.\" .It AVM FRITZ!WLAN USB Stick N
+.It CACE AirPcap \
+.It D-Link DWA-130 rev \
+.It D-Link DWA-160 rev A1
+.It D-Link DWA-160 rev A2
+.It IO-Data WN-GDN/US2
+.It NEC Aterm WL300NU-G
+.It Netgear WNDA3100
+.It Netgear WN111 v2
+.It Planex GW-US300
+.It SMC Networks SMCWUSB-N2
+.It TP-Link TL-WN821N v1, v2
+.It Ubiquiti SR71 USB
+.It Unex DNUA-81
+.It Z-Com UB81
+.It Z-Com UB82
+.It ZyXEL NWD-271N
+.El
+.Sh EXAMPLES
+Join an existing BSS network (i.e., connect to an access point):
+.Bd -literal -offset indent
+ifconfig wlan create wlandev otus0 inet 192.168.0.20 \e
+netmask 0xff00
+.Ed
+.Pp
+Join a specific BSS network with network name
+.Dq Li my_net :
+.Pp
+.Dl "ifconfig wlan create wlandev otus0 ssid my_net up"
+.Pp
+Join a specific BSS network with 64-bit WEP encryption:
+.Bd -literal -offset indent
+ifconfig wlan create wlandev otus0 ssid my_net \e
+wepmode on wepkey 0x1234567890 weptxkey 1 up

Re: svn commit: r288258 - head/sys/sys

2015-09-26 Thread Konstantin Belousov
On Sat, Sep 26, 2015 at 07:30:45AM +, Konstantin Belousov wrote:
> Author: kib
> Date: Sat Sep 26 07:30:45 2015
> New Revision: 288258
> URL: https://svnweb.freebsd.org/changeset/base/288258
> 
> Log:
>   Make the __bitcount*() functions unconditionally available, by moving
>   them out of the #if _BSD_VISIBLE block.  Other headers may depend on
>   __bitcount().  The dependencies can be a header not specified by
>   POSIX, and then namespace restrictions by _XOPEN_SOURCE are not
>   applicable, as it was reported.  Or, we might grow an implementation
>   of some POSIX facility using __bitcount(), which also should work.

It was ought to be mentioned in the commit message that all
symbols moved out of the _BSD_VISIBLE protection are in the
implementation-private namespace. In other words, by making the symbols
declared unconditionally, we are still compliant.
___
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: r288257 - head/sys/dev/usb/wlan

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sat Sep 26 07:25:53 2015
New Revision: 288257
URL: https://svnweb.freebsd.org/changeset/base/288257

Log:
  * Add 11n HT40 support - i needed to send both HTINFO and HTCAP fields
in the join message so the firmware would pick it up.
  
  * Strip out the direct hardware fiddling for 40MHz mode - the firmware
we're using doesn't require it (the rtl8712su firmware does; it
is less 'fullmac' than what we're using.)
  
  * Fix the mbuf handling during errors - rsu_tx shouldn't free mbufs;
it's up to the caller to do so.  This brings it in line with
what other drivers do or should be doing.
  
  Tested:
  
  * RTL8712, HT40 channel, STA mode (during this commit)

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Sep 26 07:18:05 2015
(r288256)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Sep 26 07:25:53 2015
(r288257)
@@ -22,7 +22,6 @@ __FBSDID("$FreeBSD$");
  * Driver for Realtek RTL8188SU/RTL8191SU/RTL8192SU.
  *
  * TODO:
- *   o 11n HT40 support
  *   o h/w crypto
  *   o hostap / ibss / mesh
  *   o sensible RSSI levels
@@ -490,14 +489,7 @@ rsu_attach(device_t self)
IEEE80211_HTC_AMSDU |
IEEE80211_HTCAP_MAXAMSDU_3839 |
IEEE80211_HTCAP_SMPS_OFF;
-
-   /*
-* XXX HT40 isn't working in this driver yet - there's
-* something missing.  Disable it for now.
-*/
-#if 0
ic->ic_htcaps |= IEEE80211_HTCAP_CHWIDTH40;
-#endif
 
/* set number of spatial streams */
ic->ic_txstream = 1;
@@ -1378,8 +1370,10 @@ rsu_join_bss(struct rsu_softc *sc, struc
if ((ic->ic_flags & IEEE80211_F_WME) &&
(ni->ni_ies.wme_ie != NULL))
frm = ieee80211_add_wme_info(frm, >ic_wme);
-   if (ni->ni_flags & IEEE80211_NODE_HT)
+   if (ni->ni_flags & IEEE80211_NODE_HT) {
frm = ieee80211_add_htcap(frm, ni);
+   frm = ieee80211_add_htinfo(frm, ni);
+   }
bss->ieslen = htole32(frm - (uint8_t *)fixed);
bss->len = htole32(((frm - buf) + 3) & ~3);
RSU_DPRINTF(sc, RSU_DEBUG_RESET | RSU_DEBUG_FWCMD,
@@ -1844,6 +1838,10 @@ rsu_bulk_rx_callback(struct usb_xfer *xf
/* FALLTHROUGH */
case USB_ST_SETUP:
 tr_setup:
+   /*
+* XXX TODO: if we have an mbuf list, but then
+* we hit data == NULL, what now?
+*/
data = STAILQ_FIRST(>sc_rx_inactive);
if (data == NULL) {
KASSERT(m == NULL, ("mbuf isn't NULL"));
@@ -2001,6 +1999,11 @@ rsu_bulk_tx_callback_h2c(struct usb_xfer
rsu_start(sc);
 }
 
+/*
+ * Transmit the given frame.
+ *
+ * This doesn't free the node or mbuf upon failure.
+ */
 static int
 rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni, 
 struct mbuf *m0, struct rsu_data *data)
@@ -2031,7 +2034,6 @@ rsu_tx_start(struct rsu_softc *sc, struc
device_printf(sc->sc_dev,
"ieee80211_crypto_encap returns NULL.\n");
/* XXX we don't expect the fragmented frames */
-   m_freem(m0);
return (ENOBUFS);
}
wh = mtod(m0, struct ieee80211_frame *);
@@ -2147,6 +2149,11 @@ rsu_transmit(struct ieee80211com *ic, st
RSU_UNLOCK(sc);
return (ENXIO);
}
+
+   /*
+* XXX TODO: ensure that we treat 'm' as a list of frames
+* to transmit!
+*/
error = mbufq_enqueue(>sc_snd, m);
if (error) {
RSU_DPRINTF(sc, RSU_DEBUG_TX,
@@ -2207,6 +2214,7 @@ _rsu_start(struct rsu_softc *sc)
IFCOUNTER_OERRORS, 1);
rsu_freebuf(sc, bf);
ieee80211_free_node(ni);
+   m_freem(m);
break;
}
}
@@ -2720,6 +2728,7 @@ rsu_raw_xmit(struct ieee80211_node *ni, 
}
if (rsu_tx_start(sc, ni, m, bf) != 0) {
ieee80211_free_node(ni);
+   m_freem(m);
rsu_freebuf(sc, bf);
RSU_UNLOCK(sc);
return (EIO);
@@ -2809,19 +2818,6 @@ rsu_init(struct rsu_softc *sc)
goto fail;
}
 
-   if (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) {
-   /* Enable 40MHz mode. */
-   error = rsu_fw_iocmd(sc,
-   SM(R92S_IOCMD_CLASS, 0xf4) |
-   SM(R92S_IOCMD_INDEX, 0x00) |
-   SM(R92S_IOCMD_VALUE, 0x0007));
-   if (error != 0) {
-   device_printf(sc->sc_dev,
-   "could not enable 40MHz mode\n");
-  

svn commit: r288259 - in head: sys/cam/ctl usr.sbin/ctladm usr.sbin/ctld

2015-09-26 Thread Alexander Motin
Author: mav
Date: Sat Sep 26 11:28:45 2015
New Revision: 288259
URL: https://svnweb.freebsd.org/changeset/base/288259

Log:
  Remove some duplicate, legacy, dead and questionable code.

Modified:
  head/sys/cam/ctl/ctl.c
  head/sys/cam/ctl/ctl_backend_block.c
  head/sys/cam/ctl/ctl_backend_ramdisk.c
  head/sys/cam/ctl/ctl_frontend_cam_sim.c
  head/sys/cam/ctl/ctl_ioctl.h
  head/sys/cam/ctl/ctl_private.h
  head/sys/cam/ctl/ctl_util.c
  head/sys/cam/ctl/ctl_util.h
  head/usr.sbin/ctladm/ctladm.8
  head/usr.sbin/ctladm/ctladm.c
  head/usr.sbin/ctld/kernel.c

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Sat Sep 26 07:30:45 2015(r288258)
+++ head/sys/cam/ctl/ctl.c  Sat Sep 26 11:28:45 2015(r288259)
@@ -1754,12 +1754,7 @@ ctl_init(void)
softc->io_zone = uma_zcreate("CTL IO", sizeof(union ctl_io),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
softc->open_count = 0;
-
-   /*
-* Default to actually sending a SYNCHRONIZE CACHE command down to
-* the drive.
-*/
-   softc->flags = CTL_FLAG_REAL_SYNC;
+   softc->flags = 0;
 
SYSCTL_ADD_INT(>sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
OID_AUTO, "ha_mode", CTLFLAG_RDTUN, (int *)>ha_mode, 0,
@@ -2586,112 +2581,6 @@ ctl_ioctl(struct cdev *dev, u_long cmd, 
mtx_unlock(>ctl_lock);
break;
}
-   case CTL_GET_PORT_LIST: {
-   struct ctl_port *port;
-   struct ctl_port_list *list;
-   int i;
-
-   list = (struct ctl_port_list *)addr;
-
-   if (list->alloc_len != (list->alloc_num *
-   sizeof(struct ctl_port_entry))) {
-   printf("%s: CTL_GET_PORT_LIST: alloc_len %u != "
-  "alloc_num %u * sizeof(struct ctl_port_entry) "
-  "%zu\n", __func__, list->alloc_len,
-  list->alloc_num, sizeof(struct ctl_port_entry));
-   retval = EINVAL;
-   break;
-   }
-   list->fill_len = 0;
-   list->fill_num = 0;
-   list->dropped_num = 0;
-   i = 0;
-   mtx_lock(>ctl_lock);
-   STAILQ_FOREACH(port, >port_list, links) {
-   struct ctl_port_entry entry, *list_entry;
-
-   if (list->fill_num >= list->alloc_num) {
-   list->dropped_num++;
-   continue;
-   }
-
-   entry.port_type = port->port_type;
-   strlcpy(entry.port_name, port->port_name,
-   sizeof(entry.port_name));
-   entry.targ_port = port->targ_port;
-   entry.physical_port = port->physical_port;
-   entry.virtual_port = port->virtual_port;
-   entry.wwnn = port->wwnn;
-   entry.wwpn = port->wwpn;
-   if (port->status & CTL_PORT_STATUS_ONLINE)
-   entry.online = 1;
-   else
-   entry.online = 0;
-
-   list_entry = >entries[i];
-
-   retval = copyout(, list_entry, sizeof(entry));
-   if (retval != 0) {
-   printf("%s: CTL_GET_PORT_LIST: copyout "
-  "returned %d\n", __func__, retval);
-   break;
-   }
-   i++;
-   list->fill_num++;
-   list->fill_len += sizeof(entry);
-   }
-   mtx_unlock(>ctl_lock);
-
-   /*
-* If this is non-zero, we had a copyout fault, so there's
-* probably no point in attempting to set the status inside
-* the structure.
-*/
-   if (retval != 0)
-   break;
-
-   if (list->dropped_num > 0)
-   list->status = CTL_PORT_LIST_NEED_MORE_SPACE;
-   else
-   list->status = CTL_PORT_LIST_OK;
-   break;
-   }
-   case CTL_DUMP_OOA: {
-   union ctl_io *io;
-   char printbuf[128];
-   struct sbuf sb;
-
-   mtx_lock(>ctl_lock);
-   printf("Dumping OOA queues:\n");
-   STAILQ_FOREACH(lun, >lun_list, links) {
-   mtx_lock(>lun_lock);
-   for (io = (union ctl_io *)TAILQ_FIRST(
->ooa_queue); io != NULL;
-io = (union ctl_io *)TAILQ_NEXT(>io_hdr,
-ooa_links)) {
- 

svn commit: r288253 - in head/sys: contrib/dev/otus dev/otus modules modules/otus modules/otusfw modules/otusfw/otusfw_init modules/otusfw/otusfw_main

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sat Sep 26 07:08:35 2015
New Revision: 288253
URL: https://svnweb.freebsd.org/changeset/base/288253

Log:
  Add an initial driver for the AR9170 series draft-11n hardware from
  Atheros.
  
  Thanks to OpenBSD for providing a driver based on the original
  Atheros open source driver circa 2008.  This uses the early, pre-carl9170
  atheros provided firmware.
  
  It only supports 11bg at the moment.  I've not tested it with 11a
  (and so the TX rate control logic may be slightly wrong!) so if
  you do have the dual-band version of this hardware please do let me know.
  
  Tested:
  
  * AR9170, TP-Link WN821N 2GHz.
  
  TODO:
  
  * Hook this up to a non-module build.

Added:
  head/sys/contrib/dev/otus/
  head/sys/contrib/dev/otus/otus-init   (contents, props changed)
  head/sys/contrib/dev/otus/otus-license
  head/sys/contrib/dev/otus/otus-main   (contents, props changed)
  head/sys/dev/otus/
  head/sys/dev/otus/if_otus.c   (contents, props changed)
  head/sys/dev/otus/if_otusreg.h   (contents, props changed)
  head/sys/modules/otus/
  head/sys/modules/otus/Makefile   (contents, props changed)
  head/sys/modules/otusfw/
  head/sys/modules/otusfw/Makefile   (contents, props changed)
  head/sys/modules/otusfw/otusfw_init/
  head/sys/modules/otusfw/otusfw_init/Makefile   (contents, props changed)
  head/sys/modules/otusfw/otusfw_main/
  head/sys/modules/otusfw/otusfw_main/Makefile   (contents, props changed)
Modified:
  head/sys/modules/Makefile

Added: head/sys/contrib/dev/otus/otus-init
==
Binary file. No diff available.

Added: head/sys/contrib/dev/otus/otus-license
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/contrib/dev/otus/otus-license  Sat Sep 26 07:08:35 2015
(r288253)
@@ -0,0 +1,47 @@
+Copyright (c) 2008, Atheros Communications, Inc.
+All rights reserved.
+
+Redistribution.  Redistribution and use in binary form, without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions must reproduce the above copyright notice and the
+  following disclaimer in the documentation and/or other materials
+  provided with the distribution.
+
+* Neither the name of Atheros Communications, Inc. nor the names of
+  its suppliers may be used to endorse or promote products derived
+  from this software without specific prior written permission.
+
+* No reverse engineering, decompilation, or disassembly of this
+  software is permitted.
+
+Limited patent license.  Atheros Communications, Inc. grants a
+world-wide, royalty-free, non-exclusive license under patents it
+now or hereafter owns or controls to make, have made, use, import,
+offer to sell and sell ("Utilize") this software, but solely to
+the extent that any such patent is necessary to Utilize the software
+alone, or in combination with an operating system licensed under an
+approved Open Source license as listed by the Open Source Initiative
+at http://opensource.org/licenses.  The patent license shall not
+apply to any other combinations which include this software. No
+hardware per se is licensed hereunder.
+
+DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+The following files are under this license:
+
+otus-init otus-main
+
+These files are needed by otus(4) devices.

Added: head/sys/contrib/dev/otus/otus-main
==
Binary file. No diff available.

Added: head/sys/dev/otus/if_otus.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/otus/if_otus.c Sat Sep 26 07:08:35 2015(r288253)
@@ -0,0 +1,3099 @@
+/* $OpenBSD: if_otus.c,v 1.46 2015/03/14 03:38:49 jsg Exp $*/
+
+/*-
+ * Copyright (c) 2009 Damien Bergamini 
+ * Copyright (c) 2015 Adrian Chadd 
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and 

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

2015-09-26 Thread Alexander Motin
Author: mav
Date: Sat Sep 26 11:56:28 2015
New Revision: 288261
URL: https://svnweb.freebsd.org/changeset/base/288261

Log:
  Move ioctl frontend defines where they belong.

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

Modified: head/sys/cam/ctl/ctl_frontend_ioctl.c
==
--- head/sys/cam/ctl/ctl_frontend_ioctl.c   Sat Sep 26 11:39:54 2015
(r288260)
+++ head/sys/cam/ctl/ctl_frontend_ioctl.c   Sat Sep 26 11:56:28 2015
(r288261)
@@ -56,6 +56,18 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+typedef enum {
+   CTL_IOCTL_INPROG,
+   CTL_IOCTL_DATAMOVE,
+   CTL_IOCTL_DONE
+} ctl_fe_ioctl_state;
+
+struct ctl_fe_ioctl_params {
+   struct cv   sem;
+   struct mtx  ioctl_mtx;
+   ctl_fe_ioctl_state  state;
+};
+
 struct cfi_softc {
uint32_tcur_tag_num;
struct ctl_port port;

Modified: head/sys/cam/ctl/ctl_private.h
==
--- head/sys/cam/ctl/ctl_private.h  Sat Sep 26 11:39:54 2015
(r288260)
+++ head/sys/cam/ctl/ctl_private.h  Sat Sep 26 11:56:28 2015
(r288261)
@@ -47,18 +47,6 @@
 #defineCTL_PROCESSOR_PRODUCT   "CTLPROCESSOR"
 #defineCTL_UNKNOWN_PRODUCT "CTLDEVICE   "
 
-typedef enum {
-   CTL_IOCTL_INPROG,
-   CTL_IOCTL_DATAMOVE,
-   CTL_IOCTL_DONE
-} ctl_fe_ioctl_state;
-
-struct ctl_fe_ioctl_params {
-   struct cv   sem;
-   struct mtx  ioctl_mtx;
-   ctl_fe_ioctl_state  state;
-};
-
 #define CTL_POOL_ENTRIES_OTHER_SC   200
 
 struct ctl_io_pool {
___
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: r288258 - head/sys/sys

2015-09-26 Thread Konstantin Belousov
Author: kib
Date: Sat Sep 26 07:30:45 2015
New Revision: 288258
URL: https://svnweb.freebsd.org/changeset/base/288258

Log:
  Make the __bitcount*() functions unconditionally available, by moving
  them out of the #if _BSD_VISIBLE block.  Other headers may depend on
  __bitcount().  The dependencies can be a header not specified by
  POSIX, and then namespace restrictions by _XOPEN_SOURCE are not
  applicable, as it was reported.  Or, we might grow an implementation
  of some POSIX facility using __bitcount(), which also should work.
  
  Reported by:  Jason Schulz 
  Discussed with:   jhb
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks

Modified:
  head/sys/sys/types.h

Modified: head/sys/sys/types.h
==
--- head/sys/sys/types.hSat Sep 26 07:25:53 2015(r288257)
+++ head/sys/sys/types.hSat Sep 26 07:30:45 2015(r288258)
@@ -290,9 +290,6 @@ typedef _Bool   bool;
  * The following are all things that really shouldn't exist in this header,
  * since its purpose is to provide typedefs, not miscellaneous doodads.
  */
-#if __BSD_VISIBLE
-
-#include 
 
 #ifdef __POPCNT__
 #define__bitcount64(x) __builtin_popcountll((__uint64_t)(x))
@@ -356,6 +353,10 @@ __bitcount64(__uint64_t _x)
 #define__bitcount(x)   __bitcount32((unsigned int)(x))
 #endif
 
+#if __BSD_VISIBLE
+
+#include 
+
 /*
  * minor() gives a cookie instead of an index since we don't want to
  * change the meanings of bits 0-15 or waste time and space shifting
___
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: r288255 - head/sys/dev/otus

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sat Sep 26 07:14:00 2015
New Revision: 288255
URL: https://svnweb.freebsd.org/changeset/base/288255

Log:
  Fix a bug in the TX command handling - log when a too-large payload is
  sent, and fix a bug I found when doing so.

Modified:
  head/sys/dev/otus/if_otus.c

Modified: head/sys/dev/otus/if_otus.c
==
--- head/sys/dev/otus/if_otus.c Sat Sep 26 07:09:46 2015(r288254)
+++ head/sys/dev/otus/if_otus.c Sat Sep 26 07:14:00 2015(r288255)
@@ -1292,6 +1292,14 @@ otus_cmd(struct otus_softc *sc, uint8_t 
 
/* Always bulk-out a multiple of 4 bytes. */
xferlen = (sizeof (*hdr) + ilen + 3) & ~3;
+   if (xferlen > OTUS_MAX_TXCMDSZ) {
+   device_printf(sc->sc_dev, "%s: command (0x%02x) size (%d) > 
%d\n",
+   __func__,
+   code,
+   xferlen,
+   OTUS_MAX_TXCMDSZ);
+   return (EIO);
+   }
 
cmd = otus_get_txcmd(sc);
if (cmd == NULL) {
@@ -1346,7 +1354,7 @@ otus_write(struct otus_softc *sc, uint32
sc->write_buf[sc->write_idx].reg = htole32(reg);
sc->write_buf[sc->write_idx].val = htole32(val);
 
-   if (++sc->write_idx > AR_MAX_WRITE_IDX)
+   if (++sc->write_idx > (AR_MAX_WRITE_IDX-1))
(void)otus_write_barrier(sc);
 }
 
___
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: r288271 - head/share/man/man9

2015-09-26 Thread Conrad E. Meyer
Author: cem
Date: Sat Sep 26 14:52:47 2015
New Revision: 288271
URL: https://svnweb.freebsd.org/changeset/base/288271

Log:
  Document bus_get_resource(9).
  
  Suggested by: Francois Tigeot
  Obtained from:DragonFlyBSD 09301a2b29f3ae5edd39a858f909f8770372f71e
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/share/man/man9/bus_get_resource.9   (contents, props changed)
Modified:
  head/share/man/man9/Makefile

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileSat Sep 26 14:28:04 2015
(r288270)
+++ head/share/man/man9/MakefileSat Sep 26 14:52:47 2015
(r288271)
@@ -39,6 +39,7 @@ MAN=  accept_filter.9 \
bus_generic_print_child.9 \
bus_generic_read_ivar.9 \
bus_generic_shutdown.9 \
+   bus_get_resource.9 \
BUS_NEW_PASS.9 \
BUS_PRINT_CHILD.9 \
BUS_READ_IVAR.9 \

Added: head/share/man/man9/bus_get_resource.9
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man9/bus_get_resource.9  Sat Sep 26 14:52:47 2015
(r288271)
@@ -0,0 +1,94 @@
+.\"
+.\" Copyright (c) 2008
+.\"The DragonFly Project.  All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in
+.\"the documentation and/or other materials provided with the
+.\"distribution.
+.\" 3. Neither the name of The DragonFly Project nor the names of its
+.\"contributors may be used to endorse or promote products derived
+.\"from this software without specific, prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
+.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $DragonFly: src/share/man/man9/bus_get_resource.9,v 1.1 2008/11/09 
09:48:41 swildner Exp $
+.\" $FreeBSD$
+.\"
+.Dd September 26, 2015
+.Dt BUS_GET_RESOURCE 9
+.Os
+.Sh NAME
+.Nm bus_get_resource
+.Nd "read a resource range/value with a given resource ID"
+.Sh SYNOPSIS
+.In sys/param.h
+.In sys/bus.h
+.In sys/rman.h
+.Ft int
+.Fo bus_get_resource
+.Fa "device_t dev" "int type" "int rid" "u_long *startp" "u_long *countp"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn bus_get_resource
+function reads the range or value of the resource
+.Fa type , rid
+pair and stores it in the
+.Fa startp
+and
+.Fa countp
+arguments.
+.Pp
+The arguments are as follows:
+.Bl -tag -width ".Fa startp"
+.It Fa dev
+The device to read the resource from.
+.It Fa type
+The type of resource you want to read.
+It is one of:
+.Pp
+.Bl -tag -width ".Dv SYS_RES_MEMORY" -compact
+.It Dv SYS_RES_IRQ
+for IRQs
+.It Dv SYS_RES_DRQ
+for ISA DMA lines
+.It Dv SYS_RES_MEMORY
+for I/O memory
+.It Dv SYS_RES_IOPORT
+for I/O ports
+.El
+.It Fa rid
+A bus-specific handle that identifies the resource being read.
+.It Fa startp
+A pointer to the start address of this resource.
+.It Fa countp
+A pointer to the length of the resource.
+For example, the size of the memory in bytes.
+.El
+.Sh RETURN VALUES
+Zero is returned on success, otherwise an error is returned.
+.Sh SEE ALSO
+.Xr bus_set_resource 9 ,
+.Xr device 9 ,
+.Xr driver 9
+.Sh AUTHORS
+This manual page was written by
+.An Sascha Wildner .
___
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: r288267 - in head/gnu: lib/csu lib/libreadline/readline usr.bin/cc/cc_tools

2015-09-26 Thread Bryan Drewery
Author: bdrewery
Date: Sat Sep 26 14:15:01 2015
New Revision: 288267
URL: https://svnweb.freebsd.org/changeset/base/288267

Log:
  Remove redundant .NOPATH.
  
  All of these are already in CLEANFILES which is added to .NOPATH in 
bsd.obj.mk.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/gnu/lib/csu/Makefile
  head/gnu/lib/libreadline/readline/Makefile
  head/gnu/usr.bin/cc/cc_tools/Makefile

Modified: head/gnu/lib/csu/Makefile
==
--- head/gnu/lib/csu/Makefile   Sat Sep 26 14:13:51 2015(r288266)
+++ head/gnu/lib/csu/Makefile   Sat Sep 26 14:15:01 2015(r288267)
@@ -75,6 +75,4 @@ CLEANFILES+=  tm.h tconfig.h options.h op
 tm.h tconfig.h options.h: ${CCDIR}/cc_tools/Makefile
(cd ${.CURDIR}; ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} 
${.TARGET})
 
-.NOPATH: ${CLEANFILES}
-
 .include 

Modified: head/gnu/lib/libreadline/readline/Makefile
==
--- head/gnu/lib/libreadline/readline/Makefile  Sat Sep 26 14:13:51 2015
(r288266)
+++ head/gnu/lib/libreadline/readline/Makefile  Sat Sep 26 14:15:01 2015
(r288267)
@@ -16,8 +16,6 @@ INSTALLED_HEADERS= readline.h chardefs.h
 CFLAGS+=   -I${.OBJDIR}/..
 SRCDIR=${.CURDIR}/../../../../contrib/libreadline
 
-.NOPATH: ${INSTALLED_HEADERS}
-
 beforebuild: ${INSTALLED_HEADERS}
 CLEANFILES+= ${INSTALLED_HEADERS}
 DPSRCS+= ${INSTALLED_HEADERS}

Modified: head/gnu/usr.bin/cc/cc_tools/Makefile
==
--- head/gnu/usr.bin/cc/cc_tools/Makefile   Sat Sep 26 14:13:51 2015
(r288266)
+++ head/gnu/usr.bin/cc/cc_tools/Makefile   Sat Sep 26 14:15:01 2015
(r288267)
@@ -216,8 +216,6 @@ tconfig.h:
 GENSRCS+=  tconfig.h
 CLEANFILES+=   cs-tconfig.h
 
-.NOPATH: ${GENSRCS} ${CLEANFILES}
-
 # Options
 optionlist: ${OPT_FILES}
LC_ALL=C awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.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: r288266 - in head: kerberos5 kerberos5/lib kerberos5/libexec kerberos5/tools kerberos5/usr.bin kerberos5/usr.sbin usr.bin/svn usr.sbin/amd usr.sbin/bsdinstall usr.sbin/fifolog usr.sbin/...

2015-09-26 Thread Bryan Drewery
Author: bdrewery
Date: Sat Sep 26 14:13:51 2015
New Revision: 288266
URL: https://svnweb.freebsd.org/changeset/base/288266

Log:
  Add more SUBDIR_PARALLEL.
  
  MFC after:3 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/kerberos5/Makefile
  head/kerberos5/lib/Makefile
  head/kerberos5/libexec/Makefile
  head/kerberos5/tools/Makefile
  head/kerberos5/usr.bin/Makefile
  head/kerberos5/usr.sbin/Makefile
  head/usr.bin/svn/Makefile
  head/usr.sbin/amd/Makefile
  head/usr.sbin/bsdinstall/Makefile
  head/usr.sbin/fifolog/Makefile
  head/usr.sbin/lpr/Makefile
  head/usr.sbin/pc-sysinstall/Makefile
  head/usr.sbin/unbound/Makefile
  head/usr.sbin/wpa/Makefile

Modified: head/kerberos5/Makefile
==
--- head/kerberos5/Makefile Sat Sep 26 13:55:55 2015(r288265)
+++ head/kerberos5/Makefile Sat Sep 26 14:13:51 2015(r288266)
@@ -1,6 +1,8 @@
 # $FreeBSD$
 
-SUBDIR=lib libexec tools usr.bin usr.sbin
+SUBDIR=lib .WAIT \
+   libexec tools usr.bin usr.sbin
+SUBDIR_PARALLEL=
 
 # These are the programs which depend on Kerberos.
 KPROGS=lib/libpam \

Modified: head/kerberos5/lib/Makefile
==
--- head/kerberos5/lib/Makefile Sat Sep 26 13:55:55 2015(r288265)
+++ head/kerberos5/lib/Makefile Sat Sep 26 14:13:51 2015(r288266)
@@ -6,5 +6,7 @@ SUBDIR= libasn1 libgssapi_krb5 libgssapi
libroken libsl libvers libkdc libwind libheimbase libheimipcc 
libheimipcs
 
 SUBDIR+= libkafs5  # requires krb_err.h from libkrb5
+SUBDIR_DEPEND_libkafs5=libkrb5
+SUBDIR_PARALLEL=
 
 .include 

Modified: head/kerberos5/libexec/Makefile
==
--- head/kerberos5/libexec/Makefile Sat Sep 26 13:55:55 2015
(r288265)
+++ head/kerberos5/libexec/Makefile Sat Sep 26 14:13:51 2015
(r288266)
@@ -2,5 +2,6 @@
 
 SUBDIR=digest-service ipropd-master ipropd-slave hprop hpropd kadmind 
kdc \
kdigest kfd kimpersonate kpasswdd kcm
+SUBDIR_PARALLEL=
 
 .include 

Modified: head/kerberos5/tools/Makefile
==
--- head/kerberos5/tools/Makefile   Sat Sep 26 13:55:55 2015
(r288265)
+++ head/kerberos5/tools/Makefile   Sat Sep 26 14:13:51 2015
(r288266)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
 SUBDIR=make-roken asn1_compile slc
+SUBDIR_PARALLEL=
 
 .include 

Modified: head/kerberos5/usr.bin/Makefile
==
--- head/kerberos5/usr.bin/Makefile Sat Sep 26 13:55:55 2015
(r288265)
+++ head/kerberos5/usr.bin/Makefile Sat Sep 26 14:13:51 2015
(r288266)
@@ -2,5 +2,6 @@
 
 SUBDIR=hxtool kadmin kcc kdestroy kgetcred kf kinit kpasswd 
krb5-config ksu \
string2key verify_krb5_conf
+SUBDIR_PARALLEL=
 
 .include 

Modified: head/kerberos5/usr.sbin/Makefile
==
--- head/kerberos5/usr.sbin/MakefileSat Sep 26 13:55:55 2015
(r288265)
+++ head/kerberos5/usr.sbin/MakefileSat Sep 26 14:13:51 2015
(r288266)
@@ -1,5 +1,6 @@
 # $FreeBSD$
 
 SUBDIR=iprop-log kstash ktutil
+SUBDIR_PARALLEL=
 
 .include 

Modified: head/usr.bin/svn/Makefile
==
--- head/usr.bin/svn/Makefile   Sat Sep 26 13:55:55 2015(r288265)
+++ head/usr.bin/svn/Makefile   Sat Sep 26 14:13:51 2015(r288266)
@@ -1,5 +1,8 @@
 # $FreeBSD$
 
-SUBDIR = lib svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion 
svnmucc svnrdump
+SUBDIR = lib .WAIT \
+svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion \
+svnmucc svnrdump
+SUBDIR_PARALLEL=
 
 .include 

Modified: head/usr.sbin/amd/Makefile
==
--- head/usr.sbin/amd/Makefile  Sat Sep 26 13:55:55 2015(r288265)
+++ head/usr.sbin/amd/Makefile  Sat Sep 26 14:13:51 2015(r288266)
@@ -5,7 +5,9 @@
 #
 # $FreeBSD$
 
-SUBDIR= include libamu amd amq fixmount fsinfo hlfsd mk-amd-map pawd \
+SUBDIR= include libamu .WAIT \
+   amd amq fixmount fsinfo hlfsd mk-amd-map pawd \
scripts wire-test
+SUBDIR_PARALLEL=
 
 .include 

Modified: head/usr.sbin/bsdinstall/Makefile
==
--- head/usr.sbin/bsdinstall/Makefile   Sat Sep 26 13:55:55 2015
(r288265)
+++ head/usr.sbin/bsdinstall/Makefile   Sat Sep 26 14:13:51 2015
(r288266)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 SUBDIR= distextract distfetch partedit scripts
+SUBDIR_PARALLEL=
 SCRIPTS= bsdinstall
 MAN= bsdinstall.8
 

Modified: head/usr.sbin/fifolog/Makefile

Re: svn commit: r286170 - head/share/man/man9

2015-09-26 Thread Jonathan Anderson

> On Aug 4, 2015, at 8:18 AM, Hans Petter Selasky  wrote:
> 
> Wouldn't the argument be the same for queue.3 . Once C-compilers finally 
> decide to compile time support queues, we should throw queue.3 aswell?


Sure! Not right away, and not in a way that causes unnecessary churn, but if 
there are benefits (e.g., better optimizations, better standards compliance) 
and a diversity of compilers support a new C feature in both our stable 
branches and the ports tree (for lots of architectures), then why not?

(note: by “diversity”, I don’t mean “Clang and GCC support it on amd64 but none 
of the vendor toolchains for other important architectures do”)

There are lots of things like this, where FreeBSD folk historically said, 
“K/C89/C99/C11 doesn’t provide feature X, so we need to write some macros to 
do it ourselves.” That’s great, FreeBSD was ahead of its time, but once the C 
standard catches up, isn’t it good to hew to the standard wherever it’s 
practical to do so? stdatomic.h, _Generic, _Noreturn, static assertions... the 
language is growing lots of useful features. Wouldn’t it be good to adopt them 
when we can and trim non-standard code?

Cheers,


Jon
--
jonat...@freebsd.org
___
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: r288265 - head/sys/nfs

2015-09-26 Thread Ian Lepore
Author: ian
Date: Sat Sep 26 13:55:55 2015
New Revision: 288265
URL: https://svnweb.freebsd.org/changeset/base/288265

Log:
  Wait up to 10 seconds for late-initializing network interfaces to arrive.
  
  Reviewed by:  rmacklem

Modified:
  head/sys/nfs/nfs_diskless.c

Modified: head/sys/nfs/nfs_diskless.c
==
--- head/sys/nfs/nfs_diskless.c Sat Sep 26 13:51:29 2015(r288264)
+++ head/sys/nfs/nfs_diskless.c Sat Sep 26 13:55:55 2015(r288265)
@@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#defineNFS_IFACE_TIMEOUT_SECS  10 /* Timeout for interface to appear. 
*/
+
 static int inaddr_to_sockaddr(char *ev, struct sockaddr_in *sa);
 static int hwaddr_to_sockaddr(char *ev, struct sockaddr_dl *sa);
 static int decode_nfshandle(char *ev, u_char *fh, int maxfh);
@@ -170,6 +172,7 @@ nfs_setup_diskless(void)
char *cp;
int cnt, fhlen, is_nfsv3;
uint32_t len;
+   time_t timeout_at;
 
if (nfs_diskless_valid != 0)
return;
@@ -214,6 +217,8 @@ nfs_setup_diskless(void)
return;
}
ifa = NULL;
+   timeout_at = time_uptime + NFS_IFACE_TIMEOUT_SECS;
+retry:
CURVNET_SET(TD_TO_VNET(curthread));
IFNET_RLOCK();
TAILQ_FOREACH(ifp, _ifnet, if_link) {
@@ -234,6 +239,10 @@ nfs_setup_diskless(void)
}
IFNET_RUNLOCK();
CURVNET_RESTORE();
+   if (time_uptime < timeout_at) {
+   pause("nfssdl", hz / 5);
+   goto retry;
+   }
printf("nfs_diskless: no interface\n");
return; /* no matching interface */
 match_done:
___
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: r288263 - head/sys/dev/wpi

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sat Sep 26 13:22:44 2015
New Revision: 288263
URL: https://svnweb.freebsd.org/changeset/base/288263

Log:
  Don't duplicate checks; net80211 now does this for us.
  
  Submitted by: s3er...@gmail.com

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

Modified: head/sys/dev/wpi/if_wpi.c
==
--- head/sys/dev/wpi/if_wpi.c   Sat Sep 26 12:53:55 2015(r288262)
+++ head/sys/dev/wpi/if_wpi.c   Sat Sep 26 13:22:44 2015(r288263)
@@ -3954,14 +3954,6 @@ wpi_config(struct wpi_softc *sc)
sc->rxon.cck_mask  = 0x0f;  /* not yet negotiated */
sc->rxon.ofdm_mask = 0xff;  /* not yet negotiated */
 
-   /* XXX Current configuration may be unusable. */
-   if (IEEE80211_IS_CHAN_NOADHOC(c) && sc->rxon.mode == WPI_MODE_IBSS) {
-   device_printf(sc->sc_dev,
-   "%s: invalid channel (%d) selected for IBSS mode\n",
-   __func__, ieee80211_chan2ieee(ic, c));
-   return EINVAL;
-   }
-
if ((error = wpi_send_rxon(sc, 0, 0)) != 0) {
device_printf(sc->sc_dev, "%s: could not send RXON\n",
__func__);
___
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: r288241 - head/share/mk

2015-09-26 Thread Warner Losh
On Fri, Sep 25, 2015 at 11:11 PM, NGie Cooper  wrote:

> On Fri, Sep 25, 2015 at 4:13 PM, Bryan Drewery 
> wrote:
> > On 9/25/2015 4:12 PM, NGie Cooper wrote:
> >> On Fri, Sep 25, 2015 at 4:03 PM, Bryan Drewery 
> wrote:
> >>> Author: bdrewery
> >>> Date: Fri Sep 25 23:03:32 2015
> >>> New Revision: 288241
> >>> URL: https://svnweb.freebsd.org/changeset/base/288241
> >>>
> >>> Log:
> >>>   Remove 'set -e' that are no longer needed as it is already default.
> >>>
> >>>   When bmake was initially imported at r241298 shell commands were no
> longer
> >>>   ran with 'set -e' as they were before.  This was fixed in r254980 so
> they
> >>>   again always use 'set -e'.
> >>
> >> The bsd.subdir.mk portion of the change looks like it would cause
> >> issues depending on what's being called (fmake or an earlier version
> >> of sys.mk might be used at install time).
> >>
> >
> > We only support bmake in head. And the 'set -e' were only added for
> > bmake compatibility before it was fixed to work like fmake did.
>
> Sorry. Fuzzy memory on the latter item. Yeah, I requested it a couple
> years ago.
>
> We might only support bmake in head, but there's nothing preventing
> someone from doing a source upgrade from one of the older 10 releases
> to 11+. Thinking about this a bit more, this is an extreme edge case
> that doesn't really matter, because people doing source upgrades
> across major releases really should be doing them from the latest
> minor release for the major release
>

I wouldn't state it so glibly. It is not as extreme as you might think. For
a
long time compiling -current from a host that was one or two major
releases old has worked. Currently we advertise that we can upgrade
from the stable/9 branch point or newer to tip of head (based on values
in Makefile.inc1).

I don't believe that Bryan's change set changes that in any significant way,
but given the large amount of churn he and I (and others) have generated in
/usr/share/mk, testing from a 9.x machine would be prudent. I didn't remove
some minor bits of code, and also made sys.mk compatible with the FreeBSD 9
fmake because of issues like this.

Warner
___
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: r288270 - head/usr.bin

2015-09-26 Thread Bryan Drewery
Author: bdrewery
Date: Sat Sep 26 14:28:04 2015
New Revision: 288270
URL: https://svnweb.freebsd.org/changeset/base/288270

Log:
  Hookup mkcsmapper_static and mkesdb_static for all but install.
  
  These are only handled as 'build-tools' in Makefile.inc1.  This causes
  'make clean' from the top of the tree to not clean the directories.  It also
  effectively has kept them disconnected and risks them bitrotting.  The
  buildworld process never cleans them either.
  
  Connect them so they will always be built, cleaned, etc, but never installed.
  
  Discussed with:   imp (briefly)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.bin/Makefile

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Sat Sep 26 14:27:21 2015(r288269)
+++ head/usr.bin/Makefile   Sat Sep 26 14:28:04 2015(r288270)
@@ -401,6 +401,13 @@ SUBDIR+=   who
 SUBDIR+=   svn
 .endif
 
+# These are normally only handled for build-tools.  Connect them for
+# all but installing to keep them reasonably connected.
+.if !make(install)
+SUBDIR+=   mkcsmapper_static
+SUBDIR+=   mkesdb_static
+.endif
+
 .include 
 
 SUBDIR:=   ${SUBDIR:O}
___
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: r288272 - in head: sys/rpc/rpcsec_gss usr.sbin/gssd

2015-09-26 Thread Josh Paetzel
Author: jpaetzel
Date: Sat Sep 26 16:30:16 2015
New Revision: 288272
URL: https://svnweb.freebsd.org/changeset/base/288272

Log:
  Increase group limit for kerberized NFSv4
  
  PR:   202659
  Submitted by: matthew.l.dai...@dartmouth.edu
  Reviewed by:  rmacklem dfr
  MFC after:1 week
  Sponsored by: iXsystems

Modified:
  head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
  head/usr.sbin/gssd/gssd.c

Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
==
--- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.cSat Sep 26 14:52:47 2015
(r288271)
+++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.cSat Sep 26 16:30:16 2015
(r288272)
@@ -121,9 +121,6 @@ enum svc_rpc_gss_client_state {
 };
 
 #define SVC_RPC_GSS_SEQWINDOW  128
-#ifndef RPCAUTH_UNIXGIDS
-#define RPCAUTH_UNIXGIDS   16
-#endif
 
 struct svc_rpc_gss_clientid {
unsigned long   ci_hostid;
@@ -150,7 +147,7 @@ struct svc_rpc_gss_client {
int cl_rpcflavor;   /* RPC pseudo sec flavor */
bool_t  cl_done_callback; /* TRUE after call */
void*cl_cookie; /* user cookie from callback */
-   gid_t   cl_gid_storage[RPCAUTH_UNIXGIDS];
+   gid_t   cl_gid_storage[NGROUPS];
gss_OID cl_mech;/* mechanism */
gss_qop_t   cl_qop; /* quality of protection */
uint32_tcl_seqlast; /* sequence window origin */
@@ -776,7 +773,7 @@ svc_rpc_gss_build_ucred(struct svc_rpc_g
uc->gid = 65534;
uc->gidlist = client->cl_gid_storage;
 
-   numgroups = RPCAUTH_UNIXGIDS;
+   numgroups = NGROUPS;
maj_stat = gss_pname_to_unix_cred(_stat, name, client->cl_mech,
>uid, >gid, , >gidlist[0]);
if (GSS_ERROR(maj_stat))

Modified: head/usr.sbin/gssd/gssd.c
==
--- head/usr.sbin/gssd/gssd.c   Sat Sep 26 14:52:47 2015(r288271)
+++ head/usr.sbin/gssd/gssd.c   Sat Sep 26 16:30:16 2015(r288272)
@@ -751,8 +751,8 @@ gssd_pname_to_uid_1_svc(pname_to_uid_arg
buflen_hint = buflen;
}
if (pw) {
-   int len = NGRPS;
-   int groups[NGRPS];
+   int len = NGROUPS;
+   int groups[NGROUPS];
result->gid = pw->pw_gid;
getgrouplist(pw->pw_name, pw->pw_gid,
groups, );
___
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: r287824 - head

2015-09-26 Thread Slawa Olhovchenkov
On Tue, Sep 15, 2015 at 02:24:20PM +, Brad Davis wrote:

> Author: brd (doc,ports committer)
> Date: Tue Sep 15 14:24:19 2015
> New Revision: 287824
> URL: https://svnweb.freebsd.org/changeset/base/287824
> 
> Log:
>   Fix grammer in an error message
>   
>   PR: 202310
>   Submitted by:   Chris Petrik 
>   Approved by:will

May be need to include this note in /usr/src/UPDATING?
And for other branches too.

> Modified:
>   head/Makefile.inc1
> 
> Modified: head/Makefile.inc1
> ==
> --- head/Makefile.inc1Tue Sep 15 13:37:48 2015(r287823)
> +++ head/Makefile.inc1Tue Sep 15 14:24:19 2015(r287824)
> @@ -1258,7 +1258,7 @@ _elftoolchain_libs= lib/libelf lib/libdw
>  
>  legacy:
>  .if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0
> - @echo "ERROR: Source upgrades from versions prior to 8.0 not 
> supported."; \
> + @echo "ERROR: Source upgrades from versions prior to 8.0 are not 
> supported."; \
>   false
>  .endif
>  .for _tool in tools/build ${_elftoolchain_libs}
> ___
> svn-src-...@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-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: r288260 - head/sys/cam/ctl

2015-09-26 Thread Alexander Motin
Author: mav
Date: Sat Sep 26 11:39:54 2015
New Revision: 288260
URL: https://svnweb.freebsd.org/changeset/base/288260

Log:
  Remove few more unused variables.

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

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Sat Sep 26 11:28:45 2015(r288259)
+++ head/sys/cam/ctl/ctl.c  Sat Sep 26 11:39:54 2015(r288260)
@@ -1753,7 +1753,6 @@ ctl_init(void)
mtx_init(>ctl_lock, "CTL mutex", NULL, MTX_DEF);
softc->io_zone = uma_zcreate("CTL IO", sizeof(union ctl_io),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
-   softc->open_count = 0;
softc->flags = 0;
 
SYSCTL_ADD_INT(>sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),

Modified: head/sys/cam/ctl/ctl_private.h
==
--- head/sys/cam/ctl/ctl_private.h  Sat Sep 26 11:28:45 2015
(r288259)
+++ head/sys/cam/ctl/ctl_private.h  Sat Sep 26 11:39:54 2015
(r288260)
@@ -419,8 +419,6 @@ struct tpc_token;
 struct ctl_softc {
struct mtx ctl_lock;
struct cdev *dev;
-   int open_count;
-   int num_disks;
int num_luns;
ctl_gen_flags flags;
ctl_ha_mode ha_mode;
@@ -436,7 +434,6 @@ struct ctl_softc {
struct sysctl_oid *sysctl_tree;
void *othersc_pool;
struct proc *ctl_proc;
-   int targ_online;
uint32_t ctl_lun_mask[(CTL_MAX_LUNS + 31) / 32];
struct ctl_lun *ctl_luns[CTL_MAX_LUNS];
uint32_t ctl_port_mask[(CTL_MAX_PORTS + 31) / 32];
___
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: r288262 - head/sys/cam/ctl

2015-09-26 Thread Alexander Motin
Author: mav
Date: Sat Sep 26 12:53:55 2015
New Revision: 288262
URL: https://svnweb.freebsd.org/changeset/base/288262

Log:
  Remove concept of control device.

Modified:
  head/sys/cam/ctl/ctl.c

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Sat Sep 26 11:56:28 2015(r288261)
+++ head/sys/cam/ctl/ctl.c  Sat Sep 26 12:53:55 2015(r288262)
@@ -3819,14 +3819,8 @@ ctl_init_page_index(struct ctl_lun *lun)
for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
 
page_index = >mode_pages.index[i];
-   /*
-* If this is a disk-only mode page, there's no point in
-* setting it up.  For some pages, we have to have some
-* basic information about the disk in order to calculate the
-* mode page data.
-*/
-   if ((lun->be_lun->lun_type != T_DIRECT)
-&& (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY))
+   if (lun->be_lun->lun_type != T_DIRECT &&
+   (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY))
continue;
 
switch (page_index->page_code & SMPH_PC_MASK) {
@@ -4211,18 +4205,12 @@ ctl_init_log_page_index(struct ctl_lun *
for (i = 0, j = 0, k = 0; i < CTL_NUM_LOG_PAGES; i++) {
 
page_index = >log_pages.index[i];
-   /*
-* If this is a disk-only mode page, there's no point in
-* setting it up.  For some pages, we have to have some
-* basic information about the disk in order to calculate the
-* mode page data.
-*/
-   if ((lun->be_lun->lun_type != T_DIRECT)
-&& (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY))
+   if (lun->be_lun->lun_type != T_DIRECT &&
+   (page_index->page_flags & CTL_PAGE_FLAG_DISK_ONLY))
continue;
 
if (page_index->page_code == SLS_LOGICAL_BLOCK_PROVISIONING &&
-lun->backend->lun_attr == NULL)
+   lun->backend->lun_attr == NULL)
continue;
 
if (page_index->page_code != prev) {
@@ -4494,9 +4482,8 @@ ctl_alloc_lun(struct ctl_softc *ctl_soft
/* Setup statistics gathering */
lun->stats.device_type = be_lun->lun_type;
lun->stats.lun_number = lun_number;
-   if (lun->stats.device_type == T_DIRECT)
-   lun->stats.blocksize = be_lun->blocksize;
-   else
+   lun->stats.blocksize = be_lun->blocksize;
+   if (be_lun->blocksize == 0)
lun->stats.flags = CTL_LUN_STATS_NO_BLOCKSIZE;
for (i = 0;i < CTL_MAX_PORTS;i++)
lun->stats.ports[i].targ_port = i;
@@ -5899,8 +5886,7 @@ ctl_do_mode_select(union ctl_io *io)
struct scsi_mode_page_header *page_header;
struct ctl_page_index *page_index;
struct ctl_scsiio *ctsio;
-   int control_dev, page_len;
-   int page_len_offset, page_len_size;
+   int page_len, page_len_offset, page_len_size;
union ctl_modepage_info *modepage_info;
struct ctl_lun *lun;
int *len_left, *len_used;
@@ -5911,11 +5897,6 @@ ctl_do_mode_select(union ctl_io *io)
page_len = 0;
lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
 
-   if (lun->be_lun->lun_type != T_DIRECT)
-   control_dev = 1;
-   else
-   control_dev = 0;
-
modepage_info = (union ctl_modepage_info *)
ctsio->io_hdr.ctl_private[CTL_PRIV_MODEPAGE].bytes;
len_left = _info->header.len_left;
@@ -5953,8 +5934,8 @@ do_next_page:
 */
for (i = 0; i < CTL_NUM_MODE_PAGES; i++) {
 
-   if ((control_dev != 0)
-&& (lun->mode_pages.index[i].page_flags &
+   if (lun->be_lun->lun_type != T_DIRECT &&
+   (lun->mode_pages.index[i].page_flags &
 CTL_PAGE_FLAG_DISK_ONLY))
continue;
 
@@ -6251,7 +6232,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio)
int alloc_len, page_len, header_len, total_len;
struct scsi_mode_block_descr *block_desc;
struct ctl_page_index *page_index;
-   int control_dev;
 
dbd = 0;
llba = 0;
@@ -6261,12 +6241,6 @@ ctl_mode_sense(struct ctl_scsiio *ctsio)
CTL_DEBUG_PRINT(("ctl_mode_sense\n"));
 
lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr;
-
-   if (lun->be_lun->lun_type != T_DIRECT)
-   control_dev = 1;
-   else
-   control_dev = 0;
-
switch (ctsio->cdb[0]) {
case MODE_SENSE_6: {
struct scsi_mode_sense_6 *cdb;
@@ -6339,8 +6313,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio)
}
 
for (i = 0; i < 

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

2015-09-26 Thread Alexander Motin
Author: mav
Date: Sat Sep 26 13:51:29 2015
New Revision: 288264
URL: https://svnweb.freebsd.org/changeset/base/288264

Log:
  Allow LOG SENSE command on non-disk devices.

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

Modified: head/sys/cam/ctl/ctl_cmd_table.c
==
--- head/sys/cam/ctl/ctl_cmd_table.cSat Sep 26 13:22:44 2015
(r288263)
+++ head/sys/cam/ctl/ctl_cmd_table.cSat Sep 26 13:51:29 2015
(r288264)
@@ -866,7 +866,10 @@ const struct ctl_cmd_entry ctl_cmd_table
 {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
 
 /* 4D LOG SENSE */
-{ctl_log_sense, CTL_SERIDX_LOG_SNS, CTL_CMD_FLAG_OK_ON_SLUN |
+{ctl_log_sense, CTL_SERIDX_LOG_SNS, CTL_CMD_FLAG_OK_ON_BOTH |
+   CTL_CMD_FLAG_OK_ON_STOPPED |
+   CTL_CMD_FLAG_OK_ON_INOPERABLE |
+   CTL_CMD_FLAG_OK_ON_STANDBY |
CTL_FLAG_DATA_IN |
CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
  CTL_LUN_PAT_NONE, 10, {0, 0xff, 0xff, 0, 0xff, 0xff, 0xff, 0xff, 0x07} },

Modified: head/sys/cam/ctl/ctl_private.h
==
--- head/sys/cam/ctl/ctl_private.h  Sat Sep 26 13:22:44 2015
(r288263)
+++ head/sys/cam/ctl/ctl_private.h  Sat Sep 26 13:51:29 2015
(r288264)
@@ -306,7 +306,7 @@ static const struct ctl_page_index log_p
{SLS_SUPPORTED_PAGES_PAGE, SLS_SUPPORTED_SUBPAGES_SUBPAGE, 0, NULL,
 CTL_PAGE_FLAG_NONE, NULL, NULL},
{SLS_LOGICAL_BLOCK_PROVISIONING, 0, 0, NULL,
-CTL_PAGE_FLAG_NONE, ctl_lbp_log_sense_handler, NULL},
+CTL_PAGE_FLAG_DISK_ONLY, ctl_lbp_log_sense_handler, NULL},
{SLS_STAT_AND_PERF, 0, 0, NULL,
 CTL_PAGE_FLAG_NONE, ctl_sap_log_sense_handler, NULL},
 };
___
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: r288268 - head/usr.sbin

2015-09-26 Thread Bryan Drewery
Author: bdrewery
Date: Sat Sep 26 14:26:08 2015
New Revision: 288268
URL: https://svnweb.freebsd.org/changeset/base/288268

Log:
  Hookup mkcsmapper_static and mkesdb_static for all but install.
  
  These are only handled as 'build-tools' in Makefile.inc1.  This causes
  'make clean' from the top of the tree to not clean the directories.  It also
  effectively has kept them disconnected and risks them bitrotting.  The
  buildworld process never cleans them either.
  
  Connect them so they will always be built, cleaned, etc, but never installed.
  
  Discussed with:   imp (briefly)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.sbin/Makefile

Modified: head/usr.sbin/Makefile
==
--- head/usr.sbin/Makefile  Sat Sep 26 14:15:01 2015(r288267)
+++ head/usr.sbin/Makefile  Sat Sep 26 14:26:08 2015(r288268)
@@ -157,7 +157,7 @@ SUBDIR+=fdwrite
 SUBDIR+=   mtree
 .endif
 
-.if ${MK_FREEBSD_UPDATE} != "no"
+.if ${MK_FREEBSD_UPDATE} != "no" && ${MK_RCS} != "no"
 SUBDIR+=   freebsd-update
 .endif
 
___
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: r288269 - head/usr.sbin

2015-09-26 Thread Bryan Drewery
Author: bdrewery
Date: Sat Sep 26 14:27:21 2015
New Revision: 288269
URL: https://svnweb.freebsd.org/changeset/base/288269

Log:
  Revert r288268.  Wrong change committed.

Modified:
  head/usr.sbin/Makefile

Modified: head/usr.sbin/Makefile
==
--- head/usr.sbin/Makefile  Sat Sep 26 14:26:08 2015(r288268)
+++ head/usr.sbin/Makefile  Sat Sep 26 14:27:21 2015(r288269)
@@ -157,7 +157,7 @@ SUBDIR+=fdwrite
 SUBDIR+=   mtree
 .endif
 
-.if ${MK_FREEBSD_UPDATE} != "no" && ${MK_RCS} != "no"
+.if ${MK_FREEBSD_UPDATE} != "no"
 SUBDIR+=   freebsd-update
 .endif
 
___
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: r288273 - head/share/man/man4

2015-09-26 Thread Hans Petter Selasky
Author: hselasky
Date: Sat Sep 26 16:48:25 2015
New Revision: 288273
URL: https://svnweb.freebsd.org/changeset/base/288273

Log:
  Fix spelling.
  
  Submitted by: Maxime Soule 
  PR:   203249
  MFC after:2 weeks

Modified:
  head/share/man/man4/usb_quirk.4

Modified: head/share/man/man4/usb_quirk.4
==
--- head/share/man/man4/usb_quirk.4 Sat Sep 26 16:30:16 2015
(r288272)
+++ head/share/man/man4/usb_quirk.4 Sat Sep 26 16:48:25 2015
(r288273)
@@ -16,7 +16,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 24, 2015
+.Dd September 26, 2015
 .Dt USB_QUIRK 4
 .Os
 .Sh NAME
@@ -193,9 +193,10 @@ The value is a string whose format is:
 Installs the quirks
 .Ic UQ_QUIRK,...
 for all USB devices matching
-.Ic VendorId ,
+.Ic VendorId
+and
 .Ic ProductId
-and has a hardware revision between and including
+which have a hardware revision between and including
 .Ic LowRevision
 and
 .Ic HighRevision .
___
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: r288274 - head/sys/vm

2015-09-26 Thread Alan Cox
Author: alc
Date: Sat Sep 26 17:45:10 2015
New Revision: 288274
URL: https://svnweb.freebsd.org/changeset/base/288274

Log:
  Exploit r288122 to address a cosmetic issue.  Since the pages allocated
  by noobj_alloc() don't belong to a vm object, they can't be paged out.
  Since they can't be paged out, they are never enqueued in a paging queue.
  Nonetheless, passing PQ_INACTIVE to vm_page_unwire() creates the appearance
  that these pages are being enqueued in the inactive queue.  As of r288122,
  we can avoid giving this false impression by passing PQ_NONE.
  
  Submitted by: kmacy
  Differential Revision:https://reviews.freebsd.org/D1674

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Sat Sep 26 16:48:25 2015(r288273)
+++ head/sys/vm/uma_core.c  Sat Sep 26 17:45:10 2015(r288274)
@@ -1153,7 +1153,7 @@ noobj_alloc(uma_zone_t zone, vm_size_t b
 * exit.
 */
TAILQ_FOREACH_SAFE(p, , listq, p_next) {
-   vm_page_unwire(p, PQ_INACTIVE);
+   vm_page_unwire(p, PQ_NONE);
vm_page_free(p); 
}
return (NULL);
___
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: r288254 - head/share/man/man4

2015-09-26 Thread Benjamin Kaduk
On Sat, Sep 26, 2015 at 2:09 AM, Adrian Chadd  wrote:

> Author: adrian
> Date: Sat Sep 26 07:09:46 2015
> New Revision: 288254
> URL: https://svnweb.freebsd.org/changeset/base/288254
>
> Log:
>   Add man pages for the AR9170 and AR9170 firmware.
>
> Added:
>   head/share/man/man4/otus.4   (contents, props changed)
>   head/share/man/man4/otusfw.4   (contents, props changed)
>

I don't think otusfw.4 is quite right; it is still claiming to be .Dt otus
(and may just be a copy of otus.4, though I didn't check?).  If the goal is
to have the same text appear for "man otus" and "man otusfw", it's probably
best to use MLINKS.

-Ben



> Modified:
>   head/share/man/man4/Makefile
>
> Modified: head/share/man/man4/Makefile
>
> ==
> --- head/share/man/man4/MakefileSat Sep 26 07:08:35 2015
> (r288253)
> +++ head/share/man/man4/MakefileSat Sep 26 07:09:46 2015
> (r288254)
> @@ -379,6 +379,8 @@ MAN=aac.4 \
> oce.4 \
> ohci.4 \
> orm.4 \
> +   otus.4 \
> +   otusfw.4 \
> ow.4 \
> ow_temp.4 \
> owc.4 \
>
> Added: head/share/man/man4/otus.4
>
> ==
> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
> +++ head/share/man/man4/otus.4  Sat Sep 26 07:09:46 2015(r288254)
> @@ -0,0 +1,169 @@
> +.\" $FreeBSD$
> +.\"
> +.\" Copyright (c) 2015 Adrian Chadd 
> +.\"
> +.\" Permission to use, copy, modify, and distribute this software for any
> +.\" purpose with or without fee is hereby granted, provided that the above
> +.\" copyright notice and this permission notice appear in all copies.
> +.\"
> +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
> WARRANTIES
> +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
> +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
> FOR
> +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
> +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
> +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
> OF
> +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
> +.\"
> +.Dd September 25, 2015
> +.Dt OTUS 4
> +.Os
> +.Sh NAME
> +.Nm otus
> +.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device
> +.Sh SYNOPSIS
> +To compile this driver into the kernel,
> +place the following lines in your kernel configuration file:
> +.Bd -ragged -offset indent
> +.Cd "device ehci"
> +.Cd "device uhci"
> +.Cd "device ohci"
> +.Cd "device usb"
> +.Cd "device otus"
> +.Cd "device wlan"
> +.Ed
> +.Pp
> +Alternatively, to load the driver as a module at boot time,
> +place the following line in
> +.Xr loader.conf 5 :
> +.Bd -literal -offset indent
> +if_otus_load="YES"
> +.Ed
> +.Sh DESCRIPTION
> +The
> +.Nm
> +driver supports USB 2.0 wireless network devices based on the Atheros
> +AR9170 chipset.
> +.Pp
> +The Atheros AR9170 is a draft-802.11n adapter that uses an external
> +radio to operate in either 2.4GHz only or 2.4GHz and 5GHz.
> +.Pp
> +The AR9101 radio supports 1T1R operation in 2GHz only.
> +.Pp
> +The AR9102 radio supports 2T2R operation in 2GHz only.
> +.Pp
> +The AR9104 radio supports 2T2R operation both 2GHz and 5GHz.
> +.Pp
> +These are the modes the
> +.Nm
> +driver can operate in:
> +.Bl -tag -width "IBSS-masterXX"
> +.It BSS mode
> +Also known as
> +.Em infrastructure
> +mode, this is used when associating with an access point, through
> +which all traffic passes.
> +This mode is the default.
> +.El
> +.Pp
> +The
> +.Nm
> +driver can be configured to use
> +Wired Equivalent Privacy (WEP) or
> +Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
> +WPA is the de facto encryption standard for wireless networks.
> +It is strongly recommended that WEP
> +not be used as the sole mechanism
> +to secure wireless communication,
> +due to serious weaknesses in it.
> +.Pp
> +The
> +.Nm
> +driver can be configured at runtime with
> +.Xr ifconfig 8 .
> +.Sh FILES
> +The driver needs at least version 1.0 of the following firmware files,
> +which is loaded when an interface is attached:
> +.Pp
> +.Bl -tag -width Ds -offset indent -compact
> +.It Pa /boot/kernel/otusfw-init.ko
> +.It Pa /boot/kernel/otusfw-main.ko
> +.El
> +.Sh HARDWARE
> +The
> +.Nm
> +driver provices support for Atheros AR9170 USB IEEE 802.11b/g/n
> +wireless network adapters, including:
> +.Pp
> +.Bl -tag -width Ds -offset indent -compact
> +.It 3Com 3CRUSBN275
> +.It Arcadyan WN7512
> +.\" .It AVM FRITZ!WLAN USB Stick N
> +.It CACE AirPcap \
> +.It D-Link DWA-130 rev \
> +.It D-Link DWA-160 rev A1
> +.It D-Link DWA-160 rev A2
> +.It IO-Data WN-GDN/US2
> +.It NEC Aterm WL300NU-G
> +.It Netgear WNDA3100
> +.It Netgear WN111 v2
> +.It Planex GW-US300
> +.It SMC Networks SMCWUSB-N2
> +.It TP-Link TL-WN821N v1, v2
> 

svn commit: r288276 - head/sys/kern

2015-09-26 Thread Mark Johnston
Author: markj
Date: Sat Sep 26 22:16:54 2015
New Revision: 288276
URL: https://svnweb.freebsd.org/changeset/base/288276

Log:
  Fix argument ordering in vn_printf().
  
  MFC after:3 days

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cSat Sep 26 20:26:05 2015(r288275)
+++ head/sys/kern/vfs_subr.cSat Sep 26 22:16:54 2015(r288276)
@@ -3071,8 +3071,8 @@ vn_printf(struct vnode *vp, const char *
"cleanbuf %d dirtybuf %d\n",
vp->v_object, vp->v_object->ref_count,
vp->v_object->resident_page_count,
-   vp->v_bufobj.bo_dirty.bv_cnt,
-   vp->v_bufobj.bo_clean.bv_cnt);
+   vp->v_bufobj.bo_clean.bv_cnt,
+   vp->v_bufobj.bo_dirty.bv_cnt);
printf("");
lockmgr_printinfo(vp->v_vnlock);
if (vp->v_data != NULL)
___
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: r288279 - head/sys/dev/usb/wlan

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sat Sep 26 22:20:30 2015
New Revision: 288279
URL: https://svnweb.freebsd.org/changeset/base/288279

Log:
  Free the TX/RX list buffers /before/ tearing down net80211 state.
  
  Otherwise buffers in the RX queue get freed with their parent vap
  being gone and you end up with a juicy kernel panic.

Modified:
  head/sys/dev/usb/wlan/if_rsu.c

Modified: head/sys/dev/usb/wlan/if_rsu.c
==
--- head/sys/dev/usb/wlan/if_rsu.c  Sat Sep 26 22:20:11 2015
(r288278)
+++ head/sys/dev/usb/wlan/if_rsu.c  Sat Sep 26 22:20:30 2015
(r288279)
@@ -545,18 +545,25 @@ rsu_detach(device_t self)
RSU_LOCK(sc);
rsu_stop(sc);
RSU_UNLOCK(sc);
+
usbd_transfer_unsetup(sc->sc_xfer, RSU_N_TRANSFER);
 
+   /*
+* Free buffers /before/ we detach from net80211, else node
+* references to destroyed vaps will lead to a panic.
+*/
+   /* Free Tx/Rx buffers. */
+   RSU_LOCK(sc);
+   rsu_free_tx_list(sc);
+   rsu_free_rx_list(sc);
+   RSU_UNLOCK(sc);
+
/* Frames are freed; detach from net80211 */
ieee80211_ifdetach(ic);
 
taskqueue_drain_timeout(taskqueue_thread, >calib_task);
taskqueue_drain(taskqueue_thread, >tx_task);
 
-   /* Free Tx/Rx buffers. */
-   rsu_free_tx_list(sc);
-   rsu_free_rx_list(sc);
-
mtx_destroy(>sc_mtx);
 
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: r288278 - head/share/man/man9

2015-09-26 Thread Mark Johnston
Author: markj
Date: Sat Sep 26 22:20:11 2015
New Revision: 288278
URL: https://svnweb.freebsd.org/changeset/base/288278

Log:
  Document the interface for applying advice up to the end of a file.
  
  MFC after:3 days

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

Modified: head/share/man/man9/VOP_ADVISE.9
==
--- head/share/man/man9/VOP_ADVISE.9Sat Sep 26 22:19:07 2015
(r288277)
+++ head/share/man/man9/VOP_ADVISE.9Sat Sep 26 22:20:11 2015
(r288278)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 3, 2013
+.Dd September 26, 2015
 .Dt VOP_ADVISE 9
 .Os
 .Sh NAME
@@ -52,6 +52,9 @@ The vnode of the file.
 The start of the range of file data.
 .It Fa end
 The end of the range of file data.
+A value of
+.Dv OFF_MAX
+indicates that the advice is to be applied up to the end of the file.
 .It Fa advice
 The type of operation to apply to the file data.
 Possible values are:
___
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: r288280 - head/sys/kern

2015-09-26 Thread Mark Johnston
On Sat, Sep 26, 2015 at 03:28:34PM -0700, NGie Cooper wrote:
> 
> > On Sep 26, 2015, at 15:26, Mark Johnston  wrote:
> > 
> > Author: markj
> > Date: Sat Sep 26 22:26:55 2015
> > New Revision: 288280
> > URL: https://svnweb.freebsd.org/changeset/base/288280
> > 
> > Log:
> >  Remove a check for a condition that is always false by a preceding KASSERT
> >  that was added in r144704.
> > 
> > Modified:
> >  head/sys/kern/vfs_subr.c
> > 
> > Modified: head/sys/kern/vfs_subr.c
> > ==
> > --- head/sys/kern/vfs_subr.cSat Sep 26 22:20:30 2015
> > (r288279)
> > +++ head/sys/kern/vfs_subr.cSat Sep 26 22:26:55 2015
> > (r288280)
> > @@ -1429,11 +1429,6 @@ flushbuflist(struct bufv *bufv, int flag
> > KASSERT(bp->b_bufobj == bo,
> > ("bp %p wrong b_bufobj %p should be %p",
> > bp, bp->b_bufobj, bo));
> > -   if (bp->b_bufobj != bo) {   /* XXX: necessary ? */
> > -   BUF_UNLOCK(bp);
> > -   BO_LOCK(bo);
> > -   return (EAGAIN);
> > -   }
> > /*
> >  * XXX Since there are no node locks for NFS, I
> >  * believe there is a slight chance that a delayed
> > 
> 
> Except the KASSERT gets optimized out with !INVARIANTS. Is this if-statement 
> protecting against bad behavior?

Technically it was, but it's behaviour that could only occur as a result
of a bug elsewhere. The latest reports of this assertion failure that I
can find are all from 2005, when some buf-handling bugs were being
shaken out (see r147772 and r147387, for example). Given that this
invariant is pretty important and that it's been a decade since these
bugs were fixed, I believe it's safe to remove the extra handling. 
___
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: r288281 - head/sys/vm

2015-09-26 Thread Alan Cox
Author: alc
Date: Sat Sep 26 22:57:10 2015
New Revision: 288281
URL: https://svnweb.freebsd.org/changeset/base/288281

Log:
  The conversion of kmem_alloc_attr() from operating on a vm map to a vmem
  arena in r254025 introduced a bug in the case when an allocation is only
  partially successful.  Specifically, the vm object lock was not being
  acquired before freeing the allocated pages.  To address this bug, replace
  the existing code by a call to kmem_unback().
  
  Change the type of a variable in kmem_alloc_attr() so that an allocation
  of two or more gigabytes won't fail.
  
  Replace the error handling code in kmem_back() by a call to kmem_unback().
  
  Reviewed by:  kib (an earlier version)
  MFC after:1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/vm/vm_kern.c

Modified: head/sys/vm/vm_kern.c
==
--- head/sys/vm/vm_kern.c   Sat Sep 26 22:26:55 2015(r288280)
+++ head/sys/vm/vm_kern.c   Sat Sep 26 22:57:10 2015(r288281)
@@ -159,11 +159,10 @@ kmem_alloc_attr(vmem_t *vmem, vm_size_t 
 vm_paddr_t high, vm_memattr_t memattr)
 {
vm_object_t object = vmem == kmem_arena ? kmem_object : kernel_object;
-   vm_offset_t addr;
+   vm_offset_t addr, i;
vm_ooffset_t offset;
vm_page_t m;
int pflags, tries;
-   int i;
 
size = round_page(size);
if (vmem_alloc(vmem, size, M_BESTFIT | flags, ))
@@ -184,18 +183,7 @@ retry:
tries++;
goto retry;
}
-   /* 
-* Unmap and free the pages.
-*/
-   if (i != 0)
-   pmap_remove(kernel_pmap, addr, addr + i);
-   while (i != 0) {
-   i -= PAGE_SIZE;
-   m = vm_page_lookup(object,
-   OFF_TO_IDX(offset + i));
-   vm_page_unwire(m, PQ_INACTIVE);
-   vm_page_free(m);
-   }
+   kmem_unback(object, addr, i);
vmem_free(vmem, addr, size);
return (0);
}
@@ -353,25 +341,13 @@ retry:
 * aren't on any queues.
 */
if (m == NULL) {
+   VM_OBJECT_WUNLOCK(object);
if ((flags & M_NOWAIT) == 0) {
-   VM_OBJECT_WUNLOCK(object);
VM_WAIT;
VM_OBJECT_WLOCK(object);
goto retry;
}
-   /* 
-* Unmap and free the pages.
-*/
-   if (i != 0)
-   pmap_remove(kernel_pmap, addr, addr + i);
-   while (i != 0) {
-   i -= PAGE_SIZE;
-   m = vm_page_lookup(object,
-  OFF_TO_IDX(offset + i));
-   vm_page_unwire(m, PQ_INACTIVE);
-   vm_page_free(m);
-   }
-   VM_OBJECT_WUNLOCK(object);
+   kmem_unback(object, addr, i);
return (KERN_NO_SPACE);
}
if (flags & M_ZERO && (m->flags & PG_ZERO) == 0)
@@ -387,6 +363,15 @@ retry:
return (KERN_SUCCESS);
 }
 
+/*
+ * kmem_unback:
+ *
+ * Unmap and free the physical pages underlying the specified virtual
+ * address range.
+ *
+ * A physical page must exist within the specified object at each index
+ * that is being unmapped.
+ */
 void
 kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size)
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r288280 - head/sys/kern

2015-09-26 Thread NGie Cooper

> On Sep 26, 2015, at 15:26, Mark Johnston  wrote:
> 
> Author: markj
> Date: Sat Sep 26 22:26:55 2015
> New Revision: 288280
> URL: https://svnweb.freebsd.org/changeset/base/288280
> 
> Log:
>  Remove a check for a condition that is always false by a preceding KASSERT
>  that was added in r144704.
> 
> Modified:
>  head/sys/kern/vfs_subr.c
> 
> Modified: head/sys/kern/vfs_subr.c
> ==
> --- head/sys/kern/vfs_subr.c  Sat Sep 26 22:20:30 2015(r288279)
> +++ head/sys/kern/vfs_subr.c  Sat Sep 26 22:26:55 2015(r288280)
> @@ -1429,11 +1429,6 @@ flushbuflist(struct bufv *bufv, int flag
>   KASSERT(bp->b_bufobj == bo,
>   ("bp %p wrong b_bufobj %p should be %p",
>   bp, bp->b_bufobj, bo));
> - if (bp->b_bufobj != bo) {   /* XXX: necessary ? */
> - BUF_UNLOCK(bp);
> - BO_LOCK(bo);
> - return (EAGAIN);
> - }
>   /*
>* XXX Since there are no node locks for NFS, I
>* believe there is a slight chance that a delayed
> 

Except the KASSERT gets optimized out with !INVARIANTS. Is this if-statement 
protecting against bad behavior?
___
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: r288280 - head/sys/kern

2015-09-26 Thread Mark Johnston
Author: markj
Date: Sat Sep 26 22:26:55 2015
New Revision: 288280
URL: https://svnweb.freebsd.org/changeset/base/288280

Log:
  Remove a check for a condition that is always false by a preceding KASSERT
  that was added in r144704.

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cSat Sep 26 22:20:30 2015(r288279)
+++ head/sys/kern/vfs_subr.cSat Sep 26 22:26:55 2015(r288280)
@@ -1429,11 +1429,6 @@ flushbuflist(struct bufv *bufv, int flag
KASSERT(bp->b_bufobj == bo,
("bp %p wrong b_bufobj %p should be %p",
bp, bp->b_bufobj, bo));
-   if (bp->b_bufobj != bo) {   /* XXX: necessary ? */
-   BUF_UNLOCK(bp);
-   BO_LOCK(bo);
-   return (EAGAIN);
-   }
/*
 * XXX Since there are no node locks for NFS, I
 * believe there is a slight chance that a delayed
___
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: r288277 - head/share/man/man4

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sat Sep 26 22:19:07 2015
New Revision: 288277
URL: https://svnweb.freebsd.org/changeset/base/288277

Log:
  Oops - commit the correct manpage content for otusfw.4.

Modified:
  head/share/man/man4/otusfw.4

Modified: head/share/man/man4/otusfw.4
==
--- head/share/man/man4/otusfw.4Sat Sep 26 22:16:54 2015
(r288276)
+++ head/share/man/man4/otusfw.4Sat Sep 26 22:19:07 2015
(r288277)
@@ -1,5 +1,4 @@
 .\" $FreeBSD$
-.\"
 .\" Copyright (c) 2015 Adrian Chadd 
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
@@ -15,155 +14,32 @@
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
 .Dd September 25, 2015
-.Dt OTUS 4
+.Dt otusfw 4
 .Os
 .Sh NAME
-.Nm otus
-.Nd Atheros AR9170 USB IEEE 802.11a/b/g/n wireless network device
+.Nm otusfw
+.Nd "Firmware Module for AR9170 driver"
 .Sh SYNOPSIS
-To compile this driver into the kernel,
-place the following lines in your kernel configuration file:
+To compile this module into the kernel, place the following line in your
+kernel configuration file:
 .Bd -ragged -offset indent
-.Cd "device ehci"
-.Cd "device uhci"
-.Cd "device ohci"
-.Cd "device usb"
-.Cd "device otus"
-.Cd "device wlan"
+.Cd "device otusfw"
 .Ed
 .Pp
-Alternatively, to load the driver as a module at boot time,
-place the following line in
+This will include the firmware image, AR9170, inside the kernel.
+.Xr otus 4
+will load the image into the chip.
+.Pp
+Alternatively, to load the firmware images as a module at boot time, place
+the following line in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
-if_otus_load="YES"
+otusfw_init_load="YES"
+otusfw_main_load="YES"
 .Ed
 .Sh DESCRIPTION
-The
-.Nm
-driver supports USB 2.0 wireless network devices based on the Atheros
-AR9170 chipset.
-.Pp
-The Atheros AR9170 is a draft-802.11n adapter that uses an external
-radio to operate in either 2.4GHz only or 2.4GHz and 5GHz.
-.Pp
-The AR9101 radio supports 1T1R operation in 2GHz only.
-.Pp
-The AR9102 radio supports 2T2R operation in 2GHz only.
-.Pp
-The AR9104 radio supports 2T2R operation both 2GHz and 5GHz.
-.Pp
-These are the modes the
-.Nm
-driver can operate in:
-.Bl -tag -width "IBSS-masterXX"
-.It BSS mode
-Also known as
-.Em infrastructure
-mode, this is used when associating with an access point, through
-which all traffic passes.
-This mode is the default.
-.El
-.Pp
-The
-.Nm
-driver can be configured to use
-Wired Equivalent Privacy (WEP) or
-Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
-WPA is the de facto encryption standard for wireless networks.
-It is strongly recommended that WEP
-not be used as the sole mechanism
-to secure wireless communication,
-due to serious weaknesses in it.
-.Pp
-The
-.Nm
-driver can be configured at runtime with
-.Xr ifconfig 8 .
-.Sh FILES
-The driver needs at least version 1.0 of the following firmware files,
-which is loaded when an interface is attached:
-.Pp
-.Bl -tag -width Ds -offset indent -compact
-.It Pa /boot/kernel/otusfw-init.ko
-.It Pa /boot/kernel/otusfw-main.ko
-.El
-.Sh HARDWARE
-The
-.Nm
-driver provices support for Atheros AR9170 USB IEEE 802.11b/g/n
-wireless network adapters, including:
-.Pp
-.Bl -tag -width Ds -offset indent -compact
-.It 3Com 3CRUSBN275
-.It Arcadyan WN7512
-.\" .It AVM FRITZ!WLAN USB Stick N
-.It CACE AirPcap \
-.It D-Link DWA-130 rev \
-.It D-Link DWA-160 rev A1
-.It D-Link DWA-160 rev A2
-.It IO-Data WN-GDN/US2
-.It NEC Aterm WL300NU-G
-.It Netgear WNDA3100
-.It Netgear WN111 v2
-.It Planex GW-US300
-.It SMC Networks SMCWUSB-N2
-.It TP-Link TL-WN821N v1, v2
-.It Ubiquiti SR71 USB
-.It Unex DNUA-81
-.It Z-Com UB81
-.It Z-Com UB82
-.It ZyXEL NWD-271N
-.El
-.Sh EXAMPLES
-Join an existing BSS network (i.e., connect to an access point):
-.Bd -literal -offset indent
-ifconfig wlan create wlandev otus0 inet 192.168.0.20 \e
-netmask 0xff00
-.Ed
-.Pp
-Join a specific BSS network with network name
-.Dq Li my_net :
-.Pp
-.Dl "ifconfig wlan create wlandev otus0 ssid my_net up"
-.Pp
-Join a specific BSS network with 64-bit WEP encryption:
-.Bd -literal -offset indent
-ifconfig wlan create wlandev otus0 ssid my_net \e
-wepmode on wepkey 0x1234567890 weptxkey 1 up
-.Ed
-.Sh DIAGNOSTICS
-.Bl -diag
-.It "%s: failed load firmware of file otusfw-main"
-For some reason, the driver was unable to read the microcode file from the
-filesystem.
-The file might be missing or corrupted.
-.El
+This module provides the firmware for the Atheros AR9170 based
+USB WiFi adapters.
 .Sh SEE ALSO
-.Xr intro 1 ,
-.Xr netintro 4 ,
-.Xr otusfw 4 ,
-.Xr usb 4 ,
-.Xr wlan 4 ,
-.Xr arp 8 ,
-.Xr hostapd 8 ,
-.Xr ifconfig 8 ,
-.Xr wpa_supplicant 8
-.Sh HISTORY
-The
-.Nm
-driver first appeared in
-.Ox 4.6 .
-.Sh AUTHORS
-.An -nosplit
-The
-.Nm
-driver was written by
-.An Damien Bergamini Aq Mt dam...@openbsd.org
-and ported by
-.An Adrian Chadd Aq Mt 

Re: svn commit: r288241 - head/share/mk

2015-09-26 Thread Bryan Drewery
On 9/26/2015 7:19 AM, Warner Losh wrote:
> 
> 
> On Fri, Sep 25, 2015 at 11:11 PM, NGie Cooper  > wrote:
> 
> On Fri, Sep 25, 2015 at 4:13 PM, Bryan Drewery  > wrote:
> > On 9/25/2015 4:12 PM, NGie Cooper wrote:
> >> On Fri, Sep 25, 2015 at 4:03 PM, Bryan Drewery  > wrote:
> >>> Author: bdrewery
> >>> Date: Fri Sep 25 23:03:32 2015
> >>> New Revision: 288241
> >>> URL: https://svnweb.freebsd.org/changeset/base/288241
> >>>
> >>> Log:
> >>>   Remove 'set -e' that are no longer needed as it is already default.
> >>>
> >>>   When bmake was initially imported at r241298 shell commands were no 
> longer
> >>>   ran with 'set -e' as they were before.  This was fixed in r254980 
> so they
> >>>   again always use 'set -e'.
> >>
> >> The bsd.subdir.mk  portion of the change looks
> like it would cause
> >> issues depending on what's being called (fmake or an earlier version
> >> of sys.mk  might be used at install time).
> >>
> >
> > We only support bmake in head. And the 'set -e' were only added for
> > bmake compatibility before it was fixed to work like fmake did.
> 
> Sorry. Fuzzy memory on the latter item. Yeah, I requested it a
> couple years ago.
> 
> We might only support bmake in head, but there's nothing preventing
> someone from doing a source upgrade from one of the older 10 releases
> to 11+. Thinking about this a bit more, this is an extreme edge case
> that doesn't really matter, because people doing source upgrades
> across major releases really should be doing them from the latest
> minor release for the major release
> 
> 
> I wouldn't state it so glibly. It is not as extreme as you might think.
> For a
> long time compiling -current from a host that was one or two major
> releases old has worked. Currently we advertise that we can upgrade
> from the stable/9 branch point or newer to tip of head (based on values
> in Makefile.inc1).
> 
> I don't believe that Bryan's change set changes that in any significant way,
> but given the large amount of churn he and I (and others) have generated in
> /usr/share/mk, testing from a 9.x machine would be prudent. I didn't remove
> some minor bits of code, and also made sys.mk  compatible
> with the FreeBSD 9
> fmake because of issues like this.
> 

Note that fmake compatibility was explicitly removed around the
META_MODE import time. fmake doesn't work at all currently.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r288270 - head/usr.bin

2015-09-26 Thread Bryan Drewery
Please revert this. I am away for the day.

Regards,
Bryan Drewery

> On Sep 26, 2015, at 07:28, Bryan Drewery  wrote:
> 
> Author: bdrewery
> Date: Sat Sep 26 14:28:04 2015
> New Revision: 288270
> URL: https://svnweb.freebsd.org/changeset/base/288270
> 
> Log:
>  Hookup mkcsmapper_static and mkesdb_static for all but install.
> 
>  These are only handled as 'build-tools' in Makefile.inc1.  This causes
>  'make clean' from the top of the tree to not clean the directories.  It also
>  effectively has kept them disconnected and risks them bitrotting.  The
>  buildworld process never cleans them either.
> 
>  Connect them so they will always be built, cleaned, etc, but never installed.
> 
>  Discussed with:imp (briefly)
>  Sponsored by:EMC / Isilon Storage Division
> 
> Modified:
>  head/usr.bin/Makefile
> 
> Modified: head/usr.bin/Makefile
> ==
> --- head/usr.bin/MakefileSat Sep 26 14:27:21 2015(r288269)
> +++ head/usr.bin/MakefileSat Sep 26 14:28:04 2015(r288270)
> @@ -401,6 +401,13 @@ SUBDIR+=who
> SUBDIR+=svn
> .endif
> 
> +# These are normally only handled for build-tools.  Connect them for
> +# all but installing to keep them reasonably connected.
> +.if !make(install)
> +SUBDIR+=mkcsmapper_static
> +SUBDIR+=mkesdb_static
> +.endif
> +
> .include 
> 
> SUBDIR:=${SUBDIR:O}
> 
___
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: r287824 - head

2015-09-26 Thread Slawa Olhovchenkov
On Sat, Sep 26, 2015 at 01:34:17PM -0600, Warner Losh wrote:

> traditionally, this hasn't been documented in UPDATING

I see, may be documented in UPDATING is will be good practic?
And, I am dream about more accurate pointing required revision -- for
example, upgrading from 8.4-RELEASE to 10-STABLE is imposible, first
need upgrade world to last 8-STABLE.

> On Sat, Sep 26, 2015 at 11:01 AM, Slawa Olhovchenkov  wrote:
> 
> > On Tue, Sep 15, 2015 at 02:24:20PM +, Brad Davis wrote:
> >
> > > Author: brd (doc,ports committer)
> > > Date: Tue Sep 15 14:24:19 2015
> > > New Revision: 287824
> > > URL: https://svnweb.freebsd.org/changeset/base/287824
> > >
> > > Log:
> > >   Fix grammer in an error message
> > >
> > >   PR: 202310
> > >   Submitted by:   Chris Petrik 
> > >   Approved by:will
> >
> > May be need to include this note in /usr/src/UPDATING?
> > And for other branches too.
> >
> > > Modified:
> > >   head/Makefile.inc1
> > >
> > > Modified: head/Makefile.inc1
> > >
> > ==
> > > --- head/Makefile.inc1Tue Sep 15 13:37:48 2015(r287823)
> > > +++ head/Makefile.inc1Tue Sep 15 14:24:19 2015(r287824)
> > > @@ -1258,7 +1258,7 @@ _elftoolchain_libs= lib/libelf lib/libdw
> > >
> > >  legacy:
> > >  .if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0
> > > - @echo "ERROR: Source upgrades from versions prior to 8.0 not
> > supported."; \
> > > + @echo "ERROR: Source upgrades from versions prior to 8.0 are not
> > supported."; \
> > >   false
> > >  .endif
> > >  .for _tool in tools/build ${_elftoolchain_libs}
> > > ___
> > > svn-src-...@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-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: r287824 - head

2015-09-26 Thread Warner Losh
traditionally, this hasn't been documented in UPDATING

Warner

On Sat, Sep 26, 2015 at 11:01 AM, Slawa Olhovchenkov  wrote:

> On Tue, Sep 15, 2015 at 02:24:20PM +, Brad Davis wrote:
>
> > Author: brd (doc,ports committer)
> > Date: Tue Sep 15 14:24:19 2015
> > New Revision: 287824
> > URL: https://svnweb.freebsd.org/changeset/base/287824
> >
> > Log:
> >   Fix grammer in an error message
> >
> >   PR: 202310
> >   Submitted by:   Chris Petrik 
> >   Approved by:will
>
> May be need to include this note in /usr/src/UPDATING?
> And for other branches too.
>
> > Modified:
> >   head/Makefile.inc1
> >
> > Modified: head/Makefile.inc1
> >
> ==
> > --- head/Makefile.inc1Tue Sep 15 13:37:48 2015(r287823)
> > +++ head/Makefile.inc1Tue Sep 15 14:24:19 2015(r287824)
> > @@ -1258,7 +1258,7 @@ _elftoolchain_libs= lib/libelf lib/libdw
> >
> >  legacy:
> >  .if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0
> > - @echo "ERROR: Source upgrades from versions prior to 8.0 not
> supported."; \
> > + @echo "ERROR: Source upgrades from versions prior to 8.0 are not
> supported."; \
> >   false
> >  .endif
> >  .for _tool in tools/build ${_elftoolchain_libs}
> > ___
> > svn-src-...@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-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: r288275 - head/usr.bin

2015-09-26 Thread Bryan Drewery
Thanks. Broke sparc64 and aarch64 at least.

Regards,
Bryan Drewery

> On Sep 26, 2015, at 13:26, Conrad E. Meyer  wrote:
> 
> Author: cem
> Date: Sat Sep 26 20:26:05 2015
> New Revision: 288275
> URL: https://svnweb.freebsd.org/changeset/base/288275
> 
> Log:
>  Revert r288270 to fix the build
> 
>  Submitted by:bdrewery
>  Sponsored by:EMC / Isilon Storage Division
> 
> Modified:
>  head/usr.bin/Makefile
> 
> Modified: head/usr.bin/Makefile
> ==
> --- head/usr.bin/MakefileSat Sep 26 17:45:10 2015(r288274)
> +++ head/usr.bin/MakefileSat Sep 26 20:26:05 2015(r288275)
> @@ -401,13 +401,6 @@ SUBDIR+=who
> SUBDIR+=svn
> .endif
> 
> -# These are normally only handled for build-tools.  Connect them for
> -# all but installing to keep them reasonably connected.
> -.if !make(install)
> -SUBDIR+=mkcsmapper_static
> -SUBDIR+=mkesdb_static
> -.endif
> -
> .include 
> 
> SUBDIR:=${SUBDIR:O}
> 
___
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: r287824 - head

2015-09-26 Thread Warner Losh
What's the error when you try from 8.4-RELEASE?

Warner

On Sat, Sep 26, 2015 at 2:36 PM, Slawa Olhovchenkov  wrote:

> On Sat, Sep 26, 2015 at 01:34:17PM -0600, Warner Losh wrote:
>
> > traditionally, this hasn't been documented in UPDATING
>
> I see, may be documented in UPDATING is will be good practic?
> And, I am dream about more accurate pointing required revision -- for
> example, upgrading from 8.4-RELEASE to 10-STABLE is imposible, first
> need upgrade world to last 8-STABLE.
>
> > On Sat, Sep 26, 2015 at 11:01 AM, Slawa Olhovchenkov 
> wrote:
> >
> > > On Tue, Sep 15, 2015 at 02:24:20PM +, Brad Davis wrote:
> > >
> > > > Author: brd (doc,ports committer)
> > > > Date: Tue Sep 15 14:24:19 2015
> > > > New Revision: 287824
> > > > URL: https://svnweb.freebsd.org/changeset/base/287824
> > > >
> > > > Log:
> > > >   Fix grammer in an error message
> > > >
> > > >   PR: 202310
> > > >   Submitted by:   Chris Petrik 
> > > >   Approved by:will
> > >
> > > May be need to include this note in /usr/src/UPDATING?
> > > And for other branches too.
> > >
> > > > Modified:
> > > >   head/Makefile.inc1
> > > >
> > > > Modified: head/Makefile.inc1
> > > >
> > >
> ==
> > > > --- head/Makefile.inc1Tue Sep 15 13:37:48 2015
> (r287823)
> > > > +++ head/Makefile.inc1Tue Sep 15 14:24:19 2015
> (r287824)
> > > > @@ -1258,7 +1258,7 @@ _elftoolchain_libs= lib/libelf lib/libdw
> > > >
> > > >  legacy:
> > > >  .if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0
> > > > - @echo "ERROR: Source upgrades from versions prior to 8.0 not
> > > supported."; \
> > > > + @echo "ERROR: Source upgrades from versions prior to 8.0 are
> not
> > > supported."; \
> > > >   false
> > > >  .endif
> > > >  .for _tool in tools/build ${_elftoolchain_libs}
> > > > ___
> > > > svn-src-...@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-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: r288290 - head/sys/dev/otus

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sun Sep 27 03:46:55 2015
New Revision: 288290
URL: https://svnweb.freebsd.org/changeset/base/288290

Log:
  Track the command response code buffer size and verify it in the
  receive path.

Modified:
  head/sys/dev/otus/if_otus.c
  head/sys/dev/otus/if_otusreg.h

Modified: head/sys/dev/otus/if_otus.c
==
--- head/sys/dev/otus/if_otus.c Sun Sep 27 01:37:30 2015(r288289)
+++ head/sys/dev/otus/if_otus.c Sun Sep 27 03:46:55 2015(r288290)
@@ -156,7 +156,7 @@ voidotus_do_async(struct otus_softc *,
 intotus_newstate(struct ieee80211vap *, enum ieee80211_state,
int);
 intotus_cmd(struct otus_softc *, uint8_t, const void *, int,
-   void *);
+   void *, int);
 void   otus_write(struct otus_softc *, uint32_t, uint32_t);
 intotus_write_barrier(struct otus_softc *);
 struct ieee80211_node *otus_node_alloc(struct ieee80211com *);
@@ -702,7 +702,7 @@ otus_attachhook(struct otus_softc *sc)
 
/* Send an ECHO command to check that everything is settled. */
in = 0xbadc0ffe;
-   if (otus_cmd(sc, AR_CMD_ECHO, , sizeof in, ) != 0) {
+   if (otus_cmd(sc, AR_CMD_ECHO, , sizeof in, , sizeof(out)) != 0) {
OTUS_UNLOCK(sc);
device_printf(sc->sc_dev,
"%s: echo command failed\n", __func__);
@@ -1282,7 +1282,7 @@ otus_newstate(struct ieee80211vap *vap, 
 
 int
 otus_cmd(struct otus_softc *sc, uint8_t code, const void *idata, int ilen,
-void *odata)
+void *odata, int odatalen)
 {
struct otus_tx_cmd *cmd;
struct ar_cmd_hdr *hdr;
@@ -1321,6 +1321,7 @@ otus_cmd(struct otus_softc *sc, uint8_t 
__func__, code, ilen, hdr->token);
 
cmd->odata = odata;
+   cmd->odatalen = odatalen;
cmd->buflen = xferlen;
 
/* Queue the command to the endpoint */
@@ -1373,7 +1374,7 @@ otus_write_barrier(struct otus_softc *sc
sc->write_idx);
 
error = otus_cmd(sc, AR_CMD_WREG, sc->write_buf,
-   sizeof (sc->write_buf[0]) * sc->write_idx, NULL);
+   sizeof (sc->write_buf[0]) * sc->write_idx, NULL, 0);
sc->write_idx = 0;
return error;
 }
@@ -1428,7 +1429,7 @@ otus_read_eeprom(struct otus_softc *sc)
for (i = 0; i < sizeof (sc->eeprom) / 32; i++) {
for (j = 0; j < 8; j++, reg += 4)
regs[j] = htole32(reg);
-   error = otus_cmd(sc, AR_CMD_RREG, regs, sizeof regs, eep);
+   error = otus_cmd(sc, AR_CMD_RREG, regs, sizeof regs, eep, 32);
if (error != 0)
break;
eep += 32;
@@ -1477,8 +1478,18 @@ otus_cmd_handle_response(struct otus_sof
(int) cmd->token);
if (hdr->token == cmd->token) {
/* Copy answer into caller's supplied buffer. */
-   if (cmd->odata != NULL)
-   memcpy(cmd->odata, [1], hdr->len);
+   if (cmd->odata != NULL) {
+   if (hdr->len != cmd->odatalen) {
+   device_printf(sc->sc_dev,
+   "%s: code 0x%02x, len=%d, 
olen=%d\n",
+   __func__,
+   (int) hdr->code,
+   (int) hdr->len,
+   (int) cmd->odatalen);
+   }
+   memcpy(cmd->odata, [1],
+   MIN(cmd->odatalen, hdr->len));
+   }
wakeup(cmd);
}
 
@@ -1513,8 +1524,9 @@ otus_cmd_rxeof(struct otus_softc *sc, ui
hdr->code);
 
/*
-* XXX TODO: has to reach into the cmd queue "waiting for
+* This has to reach into the cmd queue "waiting for
 * an RX response" list, grab the head entry and check
+* if we need to wake anyone up.
 */
if ((hdr->code & 0xc0) != 0xc0) {
otus_cmd_handle_response(sc, hdr);
@@ -2686,7 +2698,7 @@ otus_set_chan(struct otus_softc *sc, str
goto finish;
 
/* XXX Is that FREQ_START ? */
-   error = otus_cmd(sc, AR_CMD_FREQ_STRAT, NULL, 0, NULL);
+   error = otus_cmd(sc, AR_CMD_FREQ_STRAT, NULL, 0, NULL, 0);
if (error != 0)
goto finish;
 
@@ -2758,7 +2770,7 @@ otus_set_chan(struct otus_softc *sc, str
cmd.check_loop_count = assoc ? htole32(2000) : htole32(1000);
OTUS_DPRINTF(sc, OTUS_DEBUG_RESET,
"%s\n", (code == AR_CMD_RF_INIT) ? "RF_INIT" : "FREQUENCY");
-   error = otus_cmd(sc, code, , sizeof cmd, );
+   error = otus_cmd(sc, code, , sizeof cmd, , 

svn commit: r288295 - in head: . share/man/man9

2015-09-26 Thread Garrett Cooper
Author: ngie
Date: Sun Sep 27 04:40:54 2015
New Revision: 288295
URL: https://svnweb.freebsd.org/changeset/base/288295

Log:
  Posthumously remove all references to MFREE(9)
  
  The macro was removed in r90227
  
  MFC after: 3 days
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/ObsoleteFiles.inc
  head/share/man/man9/Makefile
  head/share/man/man9/mbuf.9

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Sep 27 04:36:09 2015(r288294)
+++ head/ObsoleteFiles.inc  Sun Sep 27 04:40:54 2015(r288295)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20150926: posthumously (r90227) remove MFREE(9) from mbuf(9)
+OLD_FILES+=usr/share/man/man9/MFREE.9.gz
 # 20150818: *allocm() are gone in jemalloc 4.0.0
 OLD_FILES+=usr/share/man/man3/allocm.3.gz
 OLD_FILES+=usr/share/man/man3/dallocm.3.gz

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileSun Sep 27 04:36:09 2015
(r288294)
+++ head/share/man/man9/MakefileSun Sep 27 04:40:54 2015
(r288295)
@@ -1013,7 +1013,6 @@ MLINKS+=\
mbuf.9 MEXT_IS_REF.9 \
mbuf.9 MEXT_REM_REF.9 \
mbuf.9 m_fixhdr.9 \
-   mbuf.9 MFREE.9 \
mbuf.9 m_free.9 \
mbuf.9 m_freem.9 \
mbuf.9 MGET.9 \

Modified: head/share/man/man9/mbuf.9
==
--- head/share/man/man9/mbuf.9  Sun Sep 27 04:36:09 2015(r288294)
+++ head/share/man/man9/mbuf.9  Sun Sep 27 04:40:54 2015(r288295)
@@ -53,7 +53,6 @@
 .Fa "int type"
 .Fc
 .Fn MEXTFREE "struct mbuf *mbuf"
-.Fn MFREE "struct mbuf *mbuf" "struct mbuf *successor"
 .\"
 .Ss Mbuf utility macros
 .Fn mtod "struct mbuf *mbuf" "type"
___
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: r288299 - head/sys/kern

2015-09-26 Thread Jeff Roberson
Author: jeff
Date: Sun Sep 27 05:16:06 2015
New Revision: 288299
URL: https://svnweb.freebsd.org/changeset/base/288299

Log:
   - Collapse vfs_vmio_truncate & vfs_vmio_release into a single function.
   - Allow vfs_vmio_invalidate() to free the pages, leaving us with a
 single loop and bufobj lock when B_NOCACHE/B_INVAL is used.
   - Eliminate the special B_ASYNC handling on free that has not been
 relevant for some time.
   - Remove the extraneous page busy from vfs_vmio_truncate().
  
  Reviewed by:  kib
  Tested by:pho
  Sponsored by: EMC / Isilon storage division

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Sun Sep 27 04:55:43 2015(r288298)
+++ head/sys/kern/vfs_bio.c Sun Sep 27 05:16:06 2015(r288299)
@@ -111,7 +111,6 @@ static void vfs_page_set_validclean(stru
 static void vfs_clean_pages_dirty_buf(struct buf *bp);
 static void vfs_setdirty_locked_object(struct buf *bp);
 static void vfs_vmio_invalidate(struct buf *bp);
-static void vfs_vmio_release(struct buf *bp);
 static void vfs_vmio_truncate(struct buf *bp, int npages);
 static void vfs_vmio_extend(struct buf *bp, int npages, int size);
 static int vfs_bio_clcheck(struct vnode *vp, int size,
@@ -1830,20 +1829,19 @@ brelse(struct buf *bp)
bdirtysub();
bp->b_flags &= ~(B_DELWRI | B_CACHE);
if ((bp->b_flags & B_VMIO) == 0) {
-   if (bp->b_bufsize)
-   allocbuf(bp, 0);
+   allocbuf(bp, 0);
if (bp->b_vp)
brelvp(bp);
}
}
 
/*
-* We must clear B_RELBUF if B_DELWRI is set.  If vfs_vmio_release() 
+* We must clear B_RELBUF if B_DELWRI is set.  If vfs_vmio_truncate() 
 * is called with B_DELWRI set, the underlying pages may wind up
 * getting freed causing a previous write (bdwrite()) to get 'lost'
 * because pages associated with a B_DELWRI bp are marked clean.
 * 
-* We still allow the B_INVAL case to call vfs_vmio_release(), even
+* We still allow the B_INVAL case to call vfs_vmio_truncate(), even
 * if B_DELWRI is set.
 */
if (bp->b_flags & B_DELWRI)
@@ -1870,14 +1868,13 @@ brelse(struct buf *bp)
(bp->b_ioflags & BIO_ERROR && bp->b_iocmd == BIO_READ)) &&
!(bp->b_vp->v_mount != NULL &&
(bp->b_vp->v_mount->mnt_vfc->vfc_flags & VFCF_NETWORK) != 0 &&
-   !vn_isdisk(bp->b_vp, NULL) && (bp->b_flags & B_DELWRI)))
+   !vn_isdisk(bp->b_vp, NULL) && (bp->b_flags & B_DELWRI))) {
vfs_vmio_invalidate(bp);
+   allocbuf(bp, 0);
+   }
 
if ((bp->b_flags & (B_INVAL | B_RELBUF)) != 0) {
-   if (bp->b_flags & B_VMIO)
-   vfs_vmio_release(bp);
-   if (bp->b_bufsize != 0)
-   allocbuf(bp, 0);
+   allocbuf(bp, 0);
if (bp->b_vp != NULL)
brelvp(bp);
}
@@ -2059,8 +2056,41 @@ vfs_vmio_iodone(struct buf *bp)
 }
 
 /*
+ * Unwire a page held by a buf and place it on the appropriate vm queue.
+ */
+static void
+vfs_vmio_unwire(struct buf *bp, vm_page_t m)
+{
+   bool freed;
+
+   vm_page_lock(m);
+   if (vm_page_unwire(m, PQ_NONE)) {
+   /*
+* Determine if the page should be freed before adding
+* it to the inactive queue.
+*/
+   if (m->valid == 0) {
+   freed = !vm_page_busied(m);
+   if (freed)
+   vm_page_free(m);
+   } else if ((bp->b_flags & B_DIRECT) != 0)
+   freed = vm_page_try_to_free(m);
+   else
+   freed = false;
+   if (!freed) {
+   /*
+* In order to maintain LRU page ordering, put
+* the page at the tail of the inactive queue.
+*/
+   vm_page_deactivate(m);
+   }
+   }
+   vm_page_unlock(m);
+}
+
+/*
  * Perform page invalidation when a buffer is released.  The fully invalid
- * pages will be reclaimed later in vfs_vmio_release().
+ * pages will be reclaimed later in vfs_vmio_truncate().
  */
 static void
 vfs_vmio_invalidate(struct buf *bp)
@@ -2069,6 +2099,11 @@ vfs_vmio_invalidate(struct buf *bp)
vm_page_t m;
int i, resid, poffset, presid;
 
+   if (buf_mapped(bp)) {
+   BUF_CHECK_MAPPED(bp);
+   pmap_qremove(trunc_page((vm_offset_t)bp->b_data), bp->b_npages);
+   } else
+   BUF_CHECK_UNMAPPED(bp);
/*
 * Get the base offset and length of the buffer.  Note that 
 

svn commit: r288291 - head/etc

2015-09-26 Thread Adrian Chadd
Author: adrian
Date: Sun Sep 27 04:03:11 2015
New Revision: 288291
URL: https://svnweb.freebsd.org/changeset/base/288291

Log:
  Enforce consistent limits of daemons run from rc.subr:
  
  * Allow the user to configure the login class to use in rc.conf
by using {daemon}_login_class, which;
  * Use the daemon class by default;
  * .. and then use 'limits' to set the login class so it works both
via init at startup (which runs this in 'daemon' class) and via
whichever root environment (eg command line, other daemons, etc.)
  
  Reviewed by:  dteske
  Differential Revision:https://reviews.freebsd.org/D3630

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrSun Sep 27 03:46:55 2015(r288290)
+++ head/etc/rc.subrSun Sep 27 04:03:11 2015(r288291)
@@ -768,6 +768,8 @@ check_startmsgs()
 #
 #  ${name}_prepend n   Command added before ${command}.
 #
+#  ${name}_login_class n   Login class to use, else "daemon".
+#
 #  ${rc_arg}_cmd   n   If set, use this as the method when invoked;
 #  Otherwise, use default command (see below)
 #
@@ -942,7 +944,7 @@ run_rc_command()
_nice=\$${name}_nice_user=\$${name}_user \
_group=\$${name}_group  _groups=\$${name}_groups \
_fib=\$${name}_fib  _env=\$${name}_env \
-   _prepend=\$${name}_prepend
+   _prepend=\$${name}_prepend  
_login_class=\${${name}_login_class:-daemon}
 
if [ -n "$_user" ]; then# unset $_user if running as that user
if [ "$_user" = "$(eval $IDCMD)" ]; then
@@ -1050,6 +1052,9 @@ $command $rc_flags $command_args"
fi
fi
 
+   # Prepend default limits
+   _doit="limits -C $_login_class $_doit"
+
# run the full command
#
if ! _run_rc_doit "$_doit"; then
___
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: r288297 - in head: sys/netinet sys/netinet6 usr.sbin/arp usr.sbin/ndp

2015-09-26 Thread Alexander V. Chernikov
Author: melifaro
Date: Sun Sep 27 04:54:29 2015
New Revision: 288297
URL: https://svnweb.freebsd.org/changeset/base/288297

Log:
  rtsock requests for deleting interface address lles started to return EPERM
instead of old "ignore-and-return 0" in r287789. This broke arp -da /
ndp -cn behavior (they exit on rtsock command failure). Fix this by
translating LLE_IFADDR to RTM_PINNED flag, passing it to userland and
making arp/ndp ignore these entries in batched delete.
  
  MFC after:2 weeks

Modified:
  head/sys/netinet/in.c
  head/sys/netinet6/in6.c
  head/usr.sbin/arp/arp.c
  head/usr.sbin/ndp/ndp.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Sun Sep 27 04:47:08 2015(r288296)
+++ head/sys/netinet/in.c   Sun Sep 27 04:54:29 2015(r288297)
@@ -1333,6 +1333,8 @@ in_lltable_dump_entry(struct lltable *ll
arpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA);
if (lle->la_flags & LLE_STATIC)
arpc.rtm.rtm_flags |= RTF_STATIC;
+   if (lle->la_flags & LLE_IFADDR)
+   arpc.rtm.rtm_flags |= RTF_PINNED;
arpc.rtm.rtm_index = ifp->if_index;
error = SYSCTL_OUT(wr, , sizeof(arpc));
 

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Sun Sep 27 04:47:08 2015(r288296)
+++ head/sys/netinet6/in6.c Sun Sep 27 04:54:29 2015(r288297)
@@ -2354,6 +2354,8 @@ in6_lltable_dump_entry(struct lltable *l
ndpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA);
if (lle->la_flags & LLE_STATIC)
ndpc.rtm.rtm_flags |= RTF_STATIC;
+   if (lle->la_flags & LLE_IFADDR)
+   ndpc.rtm.rtm_flags |= RTF_PINNED;
ndpc.rtm.rtm_index = ifp->if_index;
error = SYSCTL_OUT(wr, , sizeof(ndpc));
 

Modified: head/usr.sbin/arp/arp.c
==
--- head/usr.sbin/arp/arp.c Sun Sep 27 04:47:08 2015(r288296)
+++ head/usr.sbin/arp/arp.c Sun Sep 27 04:54:29 2015(r288297)
@@ -673,10 +673,13 @@ print_entry(struct sockaddr_dl *sdl,
  */
 static void
 nuke_entry(struct sockaddr_dl *sdl __unused,
-   struct sockaddr_in *addr, struct rt_msghdr *rtm __unused)
+   struct sockaddr_in *addr, struct rt_msghdr *rtm)
 {
char ip[20];
 
+   if (rtm->rtm_flags & RTF_PINNED)
+   return;
+
snprintf(ip, sizeof(ip), "%s", inet_ntoa(addr->sin_addr));
delete(ip);
 }

Modified: head/usr.sbin/ndp/ndp.c
==
--- head/usr.sbin/ndp/ndp.c Sun Sep 27 04:47:08 2015(r288296)
+++ head/usr.sbin/ndp/ndp.c Sun Sep 27 04:54:29 2015(r288297)
@@ -649,6 +649,8 @@ again:;
if (rtm->rtm_flags & RTF_CLONED)
delete(host_buf);
 #else
+   if (rtm->rtm_flags & RTF_PINNED)
+   continue;
delete(host_buf);
 #endif
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: r288298 - in head: . share/man/man9

2015-09-26 Thread Garrett Cooper
Author: ngie
Date: Sun Sep 27 04:55:43 2015
New Revision: 288298
URL: https://svnweb.freebsd.org/changeset/base/288298

Log:
  Remove MLINKS to more non-existent mbuf(9) macros
  
  X-MFC with: r288295
  MFC after: 3 days
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/ObsoleteFiles.inc
  head/share/man/man9/Makefile
  head/share/man/man9/mbuf.9

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Sun Sep 27 04:54:29 2015(r288297)
+++ head/ObsoleteFiles.inc  Sun Sep 27 04:55:43 2015(r288298)
@@ -38,7 +38,11 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
-# 20150926: posthumously (r90227) remove MFREE(9) from mbuf(9)
+# 20150926: remove links to removed/unimplemented mbuf(9) macros
+OLD_FILES+=usr/share/man/man9/MEXT_ADD_REF.9.gz
+OLD_FILES+=usr/share/man/man9/MEXTFREE.9.gz
+OLD_FILES+=usr/share/man/man9/MEXT_IS_REF.9.gz
+OLD_FILES+=usr/share/man/man9/MEXT_REM_REF.9.gz
 OLD_FILES+=usr/share/man/man9/MFREE.9.gz
 # 20150818: *allocm() are gone in jemalloc 4.0.0
 OLD_FILES+=usr/share/man/man3/allocm.3.gz

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileSun Sep 27 04:54:29 2015
(r288297)
+++ head/share/man/man9/MakefileSun Sep 27 04:55:43 2015
(r288298)
@@ -1008,10 +1008,6 @@ MLINKS+=\
mbuf.9 m_dup.9 \
mbuf.9 m_dup_pkthdr.9 \
mbuf.9 MEXTADD.9 \
-   mbuf.9 MEXT_ADD_REF.9 \
-   mbuf.9 MEXTFREE.9 \
-   mbuf.9 MEXT_IS_REF.9 \
-   mbuf.9 MEXT_REM_REF.9 \
mbuf.9 m_fixhdr.9 \
mbuf.9 m_free.9 \
mbuf.9 m_freem.9 \

Modified: head/share/man/man9/mbuf.9
==
--- head/share/man/man9/mbuf.9  Sun Sep 27 04:54:29 2015(r288297)
+++ head/share/man/man9/mbuf.9  Sun Sep 27 04:55:43 2015(r288298)
@@ -52,7 +52,6 @@
 .Fa "short flags"
 .Fa "int type"
 .Fc
-.Fn MEXTFREE "struct mbuf *mbuf"
 .\"
 .Ss Mbuf utility macros
 .Fn mtod "struct mbuf *mbuf" "type"
___
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: r288301 - in head/sys: net netinet netinet6

2015-09-26 Thread Alexander V. Chernikov
Author: melifaro
Date: Sun Sep 27 05:29:34 2015
New Revision: 288301
URL: https://svnweb.freebsd.org/changeset/base/288301

Log:
  Eliminate nd6_nud_hint() and its TCP bindings.
  
  Initially function was introduced in r53541 (KAME initial commit) to
"provide hints from upper layer protocols that indicate a connection
is making "forward progress"" (quote from RFC 2461 7.3.1 Reachability
Confirmation).
  However, it was converted to do nothing (e.g. just return) in r122922
(tcp_hostcache implementation) back in 2003. Some defines were moved
to tcp_var.h in r169541. Then, it was broken (for non-corner cases)
by r186119 (L2<>L3 split) in 2008 (NULL ifp in nd6_lookup). So,
right now this code is broken and has no "real" base users.
  
  Differential Revision:https://reviews.freebsd.org/D3699

Modified:
  head/sys/net/if_llatbl.c
  head/sys/net/if_llatbl.h
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_reass.c
  head/sys/netinet/tcp_var.h
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6.h
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/net/if_llatbl.c
==
--- head/sys/net/if_llatbl.cSun Sep 27 05:26:22 2015(r288300)
+++ head/sys/net/if_llatbl.cSun Sep 27 05:29:34 2015(r288301)
@@ -721,7 +721,6 @@ llatbl_lle_show(struct llentry_sa *la)
db_printf(" la_flags=0x%04x\n", lle->la_flags);
db_printf(" la_asked=%u\n", lle->la_asked);
db_printf(" la_preempt=%u\n", lle->la_preempt);
-   db_printf(" ln_byhint=%u\n", lle->ln_byhint);
db_printf(" ln_state=%d\n", lle->ln_state);
db_printf(" ln_router=%u\n", lle->ln_router);
db_printf(" ln_ntick=%ju\n", (uintmax_t)lle->ln_ntick);

Modified: head/sys/net/if_llatbl.h
==
--- head/sys/net/if_llatbl.hSun Sep 27 05:26:22 2015(r288300)
+++ head/sys/net/if_llatbl.hSun Sep 27 05:29:34 2015(r288301)
@@ -75,7 +75,6 @@ struct llentry {
uint16_t la_flags;
uint16_t la_asked;
uint16_t la_preempt;
-   uint16_t ln_byhint;
int16_t  ln_state;  /* IPv6 has ND6_LLINFO_NOSTATE 
== -2 */
uint16_t ln_router;
time_t   ln_ntick;

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp_input.cSun Sep 27 05:26:22 2015
(r288300)
+++ head/sys/netinet/tcp_input.cSun Sep 27 05:29:34 2015
(r288301)
@@ -469,18 +469,6 @@ tcp_signature_verify_input(struct mbuf *
 }
 #endif
 
-/* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */
-#ifdef INET6
-#define ND6_HINT(tp) \
-do { \
-   if ((tp) && (tp)->t_inpcb && \
-   ((tp)->t_inpcb->inp_vflag & INP_IPV6) != 0) \
-   nd6_nud_hint(NULL, NULL, 0); \
-} while (0)
-#else
-#define ND6_HINT(tp)
-#endif
-
 /*
  * Indicate whether this ack should be delayed.  We can delay the ack if
  * following conditions are met:
@@ -1763,7 +1751,6 @@ tcp_do_segment(struct mbuf *m, struct tc
tp->snd_wl2 = th->th_ack;
tp->t_dupacks = 0;
m_freem(m);
-   ND6_HINT(tp); /* Some progress has been made. */
 
/*
 * If all outstanding data are acked, stop
@@ -1822,7 +1809,6 @@ tcp_do_segment(struct mbuf *m, struct tc
tp->rcv_up = tp->rcv_nxt;
TCPSTAT_INC(tcps_rcvpack);
TCPSTAT_ADD(tcps_rcvbyte, tlen);
-   ND6_HINT(tp);   /* Some progress has been made */
 #ifdef TCPDEBUG
if (so->so_options & SO_DEBUG)
tcp_trace(TA_INPUT, ostate, tp,
@@ -2924,7 +2910,6 @@ dodata:   
/* XXX */
thflags = th->th_flags & TH_FIN;
TCPSTAT_INC(tcps_rcvpack);
TCPSTAT_ADD(tcps_rcvbyte, tlen);
-   ND6_HINT(tp);
SOCKBUF_LOCK(>so_rcv);
if (so->so_rcv.sb_state & SBS_CANTRCVMORE)
m_freem(m);

Modified: head/sys/netinet/tcp_reass.c
==
--- head/sys/netinet/tcp_reass.cSun Sep 27 05:26:22 2015
(r288300)
+++ head/sys/netinet/tcp_reass.cSun Sep 27 05:29:34 2015
(r288301)
@@ -327,7 +327,6 @@ present:
tp->t_segqlen--;
q = nq;
} while (q && q->tqe_th->th_seq == tp->rcv_nxt);
-   ND6_HINT(tp);
sorwakeup_locked(so);
 

svn commit: r288275 - head/usr.bin

2015-09-26 Thread Conrad E. Meyer
Author: cem
Date: Sat Sep 26 20:26:05 2015
New Revision: 288275
URL: https://svnweb.freebsd.org/changeset/base/288275

Log:
  Revert r288270 to fix the build
  
  Submitted by: bdrewery
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.bin/Makefile

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Sat Sep 26 17:45:10 2015(r288274)
+++ head/usr.bin/Makefile   Sat Sep 26 20:26:05 2015(r288275)
@@ -401,13 +401,6 @@ SUBDIR+=   who
 SUBDIR+=   svn
 .endif
 
-# These are normally only handled for build-tools.  Connect them for
-# all but installing to keep them reasonably connected.
-.if !make(install)
-SUBDIR+=   mkcsmapper_static
-SUBDIR+=   mkesdb_static
-.endif
-
 .include 
 
 SUBDIR:=   ${SUBDIR:O}
___
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: r288241 - head/share/mk

2015-09-26 Thread Warner Losh
On Sat, Sep 26, 2015 at 8:20 AM, Bryan Drewery  wrote:

> On 9/26/2015 7:19 AM, Warner Losh wrote:
> >
> >
> > On Fri, Sep 25, 2015 at 11:11 PM, NGie Cooper  > > wrote:
> >
> > On Fri, Sep 25, 2015 at 4:13 PM, Bryan Drewery  > > wrote:
> > > On 9/25/2015 4:12 PM, NGie Cooper wrote:
> > >> On Fri, Sep 25, 2015 at 4:03 PM, Bryan Drewery <
> bdrew...@freebsd.org > wrote:
> > >>> Author: bdrewery
> > >>> Date: Fri Sep 25 23:03:32 2015
> > >>> New Revision: 288241
> > >>> URL: https://svnweb.freebsd.org/changeset/base/288241
> > >>>
> > >>> Log:
> > >>>   Remove 'set -e' that are no longer needed as it is already
> default.
> > >>>
> > >>>   When bmake was initially imported at r241298 shell commands
> were no longer
> > >>>   ran with 'set -e' as they were before.  This was fixed in
> r254980 so they
> > >>>   again always use 'set -e'.
> > >>
> > >> The bsd.subdir.mk  portion of the change
> looks
> > like it would cause
> > >> issues depending on what's being called (fmake or an earlier
> version
> > >> of sys.mk  might be used at install time).
> > >>
> > >
> > > We only support bmake in head. And the 'set -e' were only added for
> > > bmake compatibility before it was fixed to work like fmake did.
> >
> > Sorry. Fuzzy memory on the latter item. Yeah, I requested it a
> > couple years ago.
> >
> > We might only support bmake in head, but there's nothing preventing
> > someone from doing a source upgrade from one of the older 10 releases
> > to 11+. Thinking about this a bit more, this is an extreme edge case
> > that doesn't really matter, because people doing source upgrades
> > across major releases really should be doing them from the latest
> > minor release for the major release
> >
> >
> > I wouldn't state it so glibly. It is not as extreme as you might think.
> > For a
> > long time compiling -current from a host that was one or two major
> > releases old has worked. Currently we advertise that we can upgrade
> > from the stable/9 branch point or newer to tip of head (based on values
> > in Makefile.inc1).
> >
> > I don't believe that Bryan's change set changes that in any significant
> way,
> > but given the large amount of churn he and I (and others) have generated
> in
> > /usr/share/mk, testing from a 9.x machine would be prudent. I didn't
> remove
> > some minor bits of code, and also made sys.mk  compatible
> > with the FreeBSD 9
> > fmake because of issues like this.
> >
>
> Note that fmake compatibility was explicitly removed around the
> META_MODE import time. fmake doesn't work at all currently.
>

That's only partially true. Some of the compatibility was removed,
but not all. We still have (and still want) the compatibility for
detecting whether or not to bootstrap bmake or not in src/Makefile.
We also added compatibility to sys.mk so that we could build older
systems on -current hosts with fmake which uses the system sys.mk
for the earliest parts of the build.. So there's still some vestiges of it
in the system, and they are conscious decisions to leave them in
place.

What was removed was building world with fmake for the whole
shooting match. Also removed were certain hacks in the other
files than sys.mk (and what it includes) to support both.

But regardless, we need to make sure that the minimal version
we support is actually accurate in Makefile.inc1. And that can
only be done by direct testing.

I tried to remove it all, but there was much gnashing of teeth
and such when I proposed it so I backed away. There's too much
need and too many use cases for slivers of fmake support in
the tree still.

Warner
___
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"