Re: svn commit: r242074 - head/etc/rc.d

2012-10-27 Thread Hiroki Sato
Brian Somers br...@freebsd.org wrote
  in 20121026235044.ga77...@thong.lan.awfulhak.org:

br When I reboot and don't use -accept_rtadv (and leave
br net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in
br /var/log/messages:
br
br Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
interface sk0.  Ignored.
br Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
interface bridge0.  Ignored.
br Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
interface sk0.  Ignored.
br Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
interface bridge0.  Ignored.
br
br This seems to be the problem.  Because check_accept_rtadv() (in
br rtadvd) reports the interface as being able to accept RAs (it finds
br the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing
br happens.

 Can you send me your /etc/rc.conf and /etc/sysctl.conf?  I guess you
 are still using ipv6_enable=YES on 9.X.

-- Hiroki


pgpGRqjBDYOuO.pgp
Description: PGP signature


Re: svn commit: r242074 - head/etc/rc.d

2012-10-27 Thread Brian Somers
On Sat, Oct 27, 2012 at 03:57:07PM +0900, Hiroki Sato wrote:
 Brian Somers br...@freebsd.org wrote
   in 20121026235044.ga77...@thong.lan.awfulhak.org:
 
 br When I reboot and don't use -accept_rtadv (and leave
 br net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in
 br /var/log/messages:
 br
 br Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
 interface sk0.  Ignored.
 br Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
 interface bridge0.  Ignored.
 br Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
 interface sk0.  Ignored.
 br Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
 interface bridge0.  Ignored.
 br
 br This seems to be the problem.  Because check_accept_rtadv() (in
 br rtadvd) reports the interface as being able to accept RAs (it finds
 br the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing
 br happens.
 
  Can you send me your /etc/rc.conf and /etc/sysctl.conf?  I guess you
  are still using ipv6_enable=YES on 9.X.

Sure (attached).  I'm not sure what is supposed to change in rc.conf
when upgrading from 8 to 9.  There's nothing obvious that I can
see...  maybe I'm looking in the wrong place?

http://www.freebsd.org/releases/9.0R/relnotes.html

This issue seems to be with rtadvd (as per above).  Eliding the return
after the above non-zero lifetime message in rtadvd.c makes everything
work again (without using ifconfig iface inet6 -accept_rtadv).

-- 
Brian Somers  br...@awfulhak.org
Don't _EVER_ lose your sense of humour !   br...@freebsd.org
hostname=gw.lan.Awfulhak.org
nisdomainname=Awfulhak.org
firewall_enable=YES
firewall_flags=-p /usr/bin/m4
firewall_type=/etc/firewall.rules
firewall_quiet=YES
#network_interfaces=fxp0 re0 lo0 bridge0
#network_interfaces=fxp1 sk0 lo0 bridge0
ifconfig_sk0=inet 172.16.0.1 netmask 0xff00
ifconfig_sk0_alias0=inet 172.16.0.23 netmask 0x
ifconfig_lo0_alias0=inet 127.0.0.2 netmask 0x
ifconfig_fxp0=DHCP
#static_routes=upstairs
#route_upstairs=172.16.2.128/25 172.16.2.34
ifconfig_fxp1=up
vlans_sk0=167
ifconfig_sk0_167=up
cloned_interfaces=bridge0
ifconfig_bridge0=addm sk0.167 addm fxp1 172.16.2.2 netmask 0xff80
bsdstats_enable=YES
ipv6_enable=YES
ipv6_gateway_enable=YES
ipv6_ifconfig_sk0=2001:1938:27d:0:240:f4ff:feb1:1c85 prefixlen 64
ipv6_ifconfig_bridge0=2001:1938:27d:1:20d:61ff:fe45:2c3f prefixlen 64
rtadvd_enable=YES
rtadvd_interfaces=sk0 bridge0
fsck_y_enable=YES

natd_enable=YES
natd_interface=fxp0
natd_flags=-f /etc/natd.conf
rpcbind_enable=YES
syslogd_enable=YES
syslogd_flags=-ss
dnscrypt_proxy_enable=YES
dnscrypt_proxy_flags='-a 127.0.0.2'
named_enable=YES
rwhod_enable=YES
amd_enable=YES
amd_flags=
nfs_client_enable=YES
nfs_server_enable=YES
mountd_enable=YES
mountd_flags=-p 1007
rpc_lockd_enable=YES
rpc_statd_enable=YES
timed_flags=-F localhost
nis_client_enable=YES
nis_client_flags=-S $nisdomainname,172.16.0.1 -m
nis_server_enable=YES
nis_yppasswdd_enable=YES
gateway_enable=YES
cursor=destructive
lpd_enable=YES
lpd_flags=-lc
dumpdev=/dev/ad0s1b
clear_tmp_enable=YES
ldconfig_paths_aout=NO
sshd_enable=YES
ntpd_enable=YES
ntpd_sync_on_start=YES
usbd_enable=YES
snmpd_enable=YES
snmpd_flags=-Lsd

moused_enable=YES
moused_type=ps/2
moused_port=/dev/psm0
sendmail_enable=YES
inetd_enable=YES

sixxs_aiccu_enable=YES
cyrus_pwcheck_enable=YES
#slapd_enable=YES
#slapd_flags='-h ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/;'
#slapd_sockets=/var/run/openldap/ldapi  

apache22_enable=YES
apache22ssl_enable=YES
dhcpd_enable=YES
dhcpd_ifaces=sk0 bridge0
dhcpd_chuser_enable=NO
mysql_enable=YES
cyrus_imapd_enable=YES
saslauthd_enable=YES
saslauthd_flags=-a pam
squid_enable=YES
samba_enable=YES
#winbindd_enable=YES
#winbindd_flags=-d10
mt_daapd_enable=YES
arpwatch_enable=YES
arpwatch_interfaces=sk0 bridge0
cupsd_enable=YES
nagios_enable=YES
nsca_enable=YES
sshblock_enable=YES

saver=green
# added by xorg-libraries port
local_startup=/usr/local/etc/rc.d

ddclient_enable=YES
daily_ddclient_force_enable=YES

spamd_enable=YES
spamass_milter_enable=YES
# $FreeBSD: stable/9/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#
kern.maxfilesperproc=1024

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0

# I want to see firewall log messages in /var/log/security
net.inet.ip.fw.verbose=1


pgpjN9HAdEmnU.pgp
Description: PGP signature


Re: svn commit: r242074 - head/etc/rc.d

2012-10-27 Thread Hiroki Sato
Brian Somers br...@freebsd.org wrote
  in 20121027072048.gb77...@thong.lan.awfulhak.org:

br On Sat, Oct 27, 2012 at 03:57:07PM +0900, Hiroki Sato wrote:
br  Brian Somers br...@freebsd.org wrote
brin 20121026235044.ga77...@thong.lan.awfulhak.org:
br 
br  br When I reboot and don't use -accept_rtadv (and leave
br  br net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in
br  br /var/log/messages:
br  br
br  br Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
interface sk0.  Ignored.
br  br Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
interface bridge0.  Ignored.
br  br Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
interface sk0.  Ignored.
br  br Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA receiving 
interface bridge0.  Ignored.
br  br
br  br This seems to be the problem.  Because check_accept_rtadv() (in
br  br rtadvd) reports the interface as being able to accept RAs (it finds
br  br the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing
br  br happens.
br 
br   Can you send me your /etc/rc.conf and /etc/sysctl.conf?  I guess you
br   are still using ipv6_enable=YES on 9.X.
br
br Sure (attached).  I'm not sure what is supposed to change in rc.conf
br when upgrading from 8 to 9.  There's nothing obvious that I can
br see...  maybe I'm looking in the wrong place?
br
br http://www.freebsd.org/releases/9.0R/relnotes.html

 Thank you.  It is explained in section 3.2.4 in

  http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE

 I think it will work as 8.X just after removing the ipv6_enable=YES
 line in your rc.conf, but after investigating the network.subr
 closely I found a bug in backward compatibility of ipv6_enable=YES on
 9.X...  Can you try the attached patch?  This should fix the issue
 even if ipv6_enable=YES exists on a 9.X's rc.conf without a patch to
 rc.d/rtadvd.

-- Hiroki
Index: etc/network.subr
===
--- etc/network.subr	(revision 242172)
+++ etc/network.subr	(working copy)
@@ -504,7 +504,11 @@
 	# backward compatibility: $ipv6_enable
 	case $ipv6_enable in
 	[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-		return 0
+		if checkyesno ipv6_gateway_enable; then
+			return 1
+		else
+			return 0
+		fi
 	;;
 	esac



pgpKE30ZKMjyI.pgp
Description: PGP signature


Re: svn commit: r242074 - head/etc/rc.d

2012-10-27 Thread Hiroki Sato
Hiroki Sato h...@freebsd.org wrote
  in 20121027.165129.351491404794553651@allbsd.org:

hr Brian Somers br...@freebsd.org wrote
hr   in 20121027072048.gb77...@thong.lan.awfulhak.org:
hr
hr br On Sat, Oct 27, 2012 at 03:57:07PM +0900, Hiroki Sato wrote:
hr br  Brian Somers br...@freebsd.org wrote
hr brin 20121026235044.ga77...@thong.lan.awfulhak.org:
hr br 
hr br  br When I reboot and don't use -accept_rtadv (and leave
hr br  br net.inet6.ip6.accept_rtadv set to zero), I repeatedly see this in
hr br  br /var/log/messages:
hr br  br
hr br  br Oct 26 16:31:26 gw rtadvd[2879]: non-zero lifetime RA on RA 
receiving interface sk0.  Ignored.
hr br  br Oct 26 16:31:33 gw rtadvd[2879]: non-zero lifetime RA on RA 
receiving interface bridge0.  Ignored.
hr br  br Oct 26 16:31:42 gw rtadvd[2879]: non-zero lifetime RA on RA 
receiving interface sk0.  Ignored.
hr br  br Oct 26 16:31:49 gw rtadvd[2879]: non-zero lifetime RA on RA 
receiving interface bridge0.  Ignored.
hr br  br
hr br  br This seems to be the problem.  Because check_accept_rtadv() (in
hr br  br rtadvd) reports the interface as being able to accept RAs (it 
finds
hr br  br the ND6_IFF_ACCEPT_RTADV flag), it drops outgoing RAs and nothing
hr br  br happens.
hr br 
hr br   Can you send me your /etc/rc.conf and /etc/sysctl.conf?  I guess you
hr br   are still using ipv6_enable=YES on 9.X.
hr br
hr br Sure (attached).  I'm not sure what is supposed to change in rc.conf
hr br when upgrading from 8 to 9.  There's nothing obvious that I can
hr br see...  maybe I'm looking in the wrong place?
hr br
hr br http://www.freebsd.org/releases/9.0R/relnotes.html
hr
hr  Thank you.  It is explained in section 3.2.4 in
hr
hr   http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE
hr
hr  I think it will work as 8.X just after removing the ipv6_enable=YES
hr  line in your rc.conf, but after investigating the network.subr
hr  closely I found a bug in backward compatibility of ipv6_enable=YES on
hr  9.X...  Can you try the attached patch?  This should fix the issue
hr  even if ipv6_enable=YES exists on a 9.X's rc.conf without a patch to
hr  rc.d/rtadvd.

 Gr, sorry.  The previous patch was wrong.  The correct one is
 attached to this mail.

-- Hiroki
Index: etc/network.subr
===
--- etc/network.subr	(revision 242114)
+++ etc/network.subr	(working copy)
@@ -109,7 +109,9 @@
 		# backward compatibility: $ipv6_enable
 		case $ipv6_enable in
 		[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-			_ipv6_opts=${_ipv6_opts} accept_rtadv
+			if ! checkyesno ipv6_gateway_enable; then
+_ipv6_opts=${_ipv6_opts} accept_rtadv
+			fi
 			;;
 		esac

@@ -488,7 +490,11 @@
 	# backward compatibility: $ipv6_enable
 	case $ipv6_enable in
 	[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-		return 0
+		if checkyesno ipv6_gateway_enable; then
+			return 1
+		else
+			return 0
+		fi
 	;;
 	esac



pgppEgkDHhMX2.pgp
Description: PGP signature


Re: svn commit: r241610 - in head: . sys/dev/usb sys/net sys/net80211 sys/netpfil/ipfw sys/netpfil/pf sys/sys

2012-10-27 Thread Adrian Chadd
On 26 October 2012 21:16, Rui Paulo rpa...@felyko.com wrote:
 I second Adrian's comments and I would like to add that you must NOT commit 
 something like this, breaking the ABI, when you discussed this *ONE YEAR* ago 
 with only two people (one of them is not very active in the networking 
 stack). This is against all reasonable software development practices.

It's fine now; I've fixed the net80211 case.

Please, just next time give us all a bit more of a heads up before you
drop this stuff in. You won't hear me saying hell no - I'll be
saying ok, how do I teach my code to still work on -9. Which is what
I ended up doing.

Your work is sorely needed, don't get me wrong. :-) I'm glad you're doing it.

Thanks,



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


Re: svn commit: r242074 - head/etc/rc.d

2012-10-27 Thread Brian Somers
On Sat, Oct 27, 2012 at 05:01:39PM +0900, Hiroki Sato wrote:
 Hiroki Sato h...@freebsd.org wrote
   in 20121027.165129.351491404794553651@allbsd.org:
 hr  Thank you.  It is explained in section 3.2.4 in
 hr
 hr   http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE
 hr
 hr  I think it will work as 8.X just after removing the ipv6_enable=YES
 hr  line in your rc.conf, but after investigating the network.subr
 hr  closely I found a bug in backward compatibility of ipv6_enable=YES on
 hr  9.X...  Can you try the attached patch?  This should fix the issue
 hr  even if ipv6_enable=YES exists on a 9.X's rc.conf without a patch to
 hr  rc.d/rtadvd.
 
  Gr, sorry.  The previous patch was wrong.  The correct one is
  attached to this mail.
 
 -- Hiroki

 Index: etc/network.subr
 ===
 --- etc/network.subr  (revision 242114)
 +++ etc/network.subr  (working copy)
 @@ -109,7 +109,9 @@
   # backward compatibility: $ipv6_enable
   case $ipv6_enable in
   [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
 - _ipv6_opts=${_ipv6_opts} accept_rtadv
 + if ! checkyesno ipv6_gateway_enable; then
 + _ipv6_opts=${_ipv6_opts} accept_rtadv
 + fi
   ;;
   esac
 
 @@ -488,7 +490,11 @@
   # backward compatibility: $ipv6_enable
   case $ipv6_enable in
   [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
 - return 0
 + if checkyesno ipv6_gateway_enable; then
 + return 1
 + else
 + return 0
 + fi
   ;;
   esac
 

Yep, that fixes the issue.  Everything works now both with and
without ipv6_enable in rc.conf.  Thanks for your help.

It might be worth asking re@ if the above patch can be squeezed
into 9.1 before the release?

I'm also ok with backing the original /etc/rc.d/rtadvd change out
if you prefer?

Thanks again.

-- 
Brian Somers  br...@awfulhak.org
Don't _EVER_ lose your sense of humour !   br...@freebsd.org


pgpLB48uLcyQS.pgp
Description: PGP signature


svn commit: r242173 - head/sys/cam/scsi

2012-10-27 Thread Alexander Motin
Author: mav
Date: Sat Oct 27 08:52:33 2012
New Revision: 242173
URL: http://svn.freebsd.org/changeset/base/242173

Log:
  Remove one more numeric priority constant.

Modified:
  head/sys/cam/scsi/scsi_enc.c

Modified: head/sys/cam/scsi/scsi_enc.c
==
--- head/sys/cam/scsi/scsi_enc.cSat Oct 27 04:45:25 2012
(r242172)
+++ head/sys/cam/scsi/scsi_enc.cSat Oct 27 08:52:33 2012
(r242173)
@@ -559,7 +559,7 @@ enc_runcmd(struct enc_softc *enc, char *
cdbl = IOCDBLEN;
}
 
-   ccb = cam_periph_getccb(enc-periph, 1);
+   ccb = cam_periph_getccb(enc-periph, CAM_PRIORITY_NORMAL);
if (enc-enc_type == ENC_SEMB_SES || enc-enc_type == ENC_SEMB_SAFT) {
tdlen = min(dlen, 1020);
tdlen = (tdlen + 3)  ~3;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242074 - head/etc/rc.d

2012-10-27 Thread Hiroki Sato
Brian Somers br...@freebsd.org wrote
  in 20121027083156.ga81...@thong.lan.awfulhak.org:

br On Sat, Oct 27, 2012 at 05:01:39PM +0900, Hiroki Sato wrote:
br  Hiroki Sato h...@freebsd.org wrote
brin 20121027.165129.351491404794553651@allbsd.org:
br  hr  Thank you.  It is explained in section 3.2.4 in
br  hr
br  hr   http://www.freebsd.org/releases/9.0R/relnotes-detailed.html#UPGRADE
br  hr
br  hr  I think it will work as 8.X just after removing the ipv6_enable=YES
br  hr  line in your rc.conf, but after investigating the network.subr
br  hr  closely I found a bug in backward compatibility of ipv6_enable=YES on
br  hr  9.X...  Can you try the attached patch?  This should fix the issue
br  hr  even if ipv6_enable=YES exists on a 9.X's rc.conf without a patch to
br  hr  rc.d/rtadvd.
br 
br   Gr, sorry.  The previous patch was wrong.  The correct one is
br   attached to this mail.
br 
br  -- Hiroki
br
br  Index: etc/network.subr
br  ===
br  --- etc/network.subr  (revision 242114)
br  +++ etc/network.subr  (working copy)
br  @@ -109,7 +109,9 @@
br# backward compatibility: $ipv6_enable
brcase $ipv6_enable in
br[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
br  - _ipv6_opts=${_ipv6_opts} accept_rtadv
br  + if ! checkyesno ipv6_gateway_enable; then
br  + _ipv6_opts=${_ipv6_opts} accept_rtadv
br  + fi
br;;
bresac
br 
br  @@ -488,7 +490,11 @@
br# backward compatibility: $ipv6_enable
brcase $ipv6_enable in
br[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
br  - return 0
br  + if checkyesno ipv6_gateway_enable; then
br  + return 1
br  + else
br  + return 0
br  + fi
br;;
bresac
br 
br
br Yep, that fixes the issue.  Everything works now both with and
br without ipv6_enable in rc.conf.  Thanks for your help.
br
br It might be worth asking re@ if the above patch can be squeezed
br into 9.1 before the release?
br
br I'm also ok with backing the original /etc/rc.d/rtadvd change out
br if you prefer?

 Thank you for testing it!  Today I will commit them including revert
 of rc.d/rtadvd to head (since network.subr on head is also broken
 partially) and then send a merge request of the fix.

-- Hiroki


pgpbMazUmTpbf.pgp
Description: PGP signature


svn commit: r242174 - in head/sys/cam: ctl scsi

2012-10-27 Thread Alexander Motin
Author: mav
Date: Sat Oct 27 09:40:29 2012
New Revision: 242174
URL: http://svn.freebsd.org/changeset/base/242174

Log:
  Remove several uses of numeric priorities from immediate CCB setups.

Modified:
  head/sys/cam/ctl/ctl_frontend_cam_sim.c
  head/sys/cam/ctl/scsi_ctl.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c
==
--- head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Oct 27 08:52:33 2012
(r242173)
+++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Sat Oct 27 09:40:29 2012
(r242174)
@@ -240,7 +240,7 @@ cfcs_init(void)
goto bailout;
}
 
-   xpt_setup_ccb(csa.ccb_h, softc-path, /*priority*/ 5);
+   xpt_setup_ccb(csa.ccb_h, softc-path, CAM_PRIORITY_NONE);
csa.ccb_h.func_code = XPT_SASYNC_CB;
csa.event_enable = AC_LOST_DEVICE;
csa.callback = cfcs_async;

Modified: head/sys/cam/ctl/scsi_ctl.c
==
--- head/sys/cam/ctl/scsi_ctl.c Sat Oct 27 08:52:33 2012(r242173)
+++ head/sys/cam/ctl/scsi_ctl.c Sat Oct 27 09:40:29 2012(r242174)
@@ -334,7 +334,7 @@ ctlfeasync(void *callback_arg, uint32_t 
return;
}
xpt_setup_ccb(ccb-ccb_h, cpi-ccb_h.path,
- /*priority*/ 1);
+ CAM_PRIORITY_NONE);
 
sim = xpt_path_sim(cpi-ccb_h.path);
 
@@ -571,7 +571,7 @@ ctlferegister(struct cam_periph *periph,
callout_init_mtx(softc-dma_callout, sim-mtx, /*flags*/ 0);
periph-softc = softc;
 
-   xpt_setup_ccb(en_lun_ccb.ccb_h, periph-path, /*priority*/ 1);
+   xpt_setup_ccb(en_lun_ccb.ccb_h, periph-path, CAM_PRIORITY_NONE);
en_lun_ccb.ccb_h.func_code = XPT_EN_LUN;
en_lun_ccb.cel.grp6_len = 0;
en_lun_ccb.cel.grp7_len = 0;
@@ -668,7 +668,7 @@ ctlfeoninvalidate(struct cam_periph *per
 
softc = (struct ctlfe_lun_softc *)periph-softc;
 
-   xpt_setup_ccb(en_lun_ccb.ccb_h, periph-path, /*priority*/ 1);
+   xpt_setup_ccb(en_lun_ccb.ccb_h, periph-path, CAM_PRIORITY_NONE);
en_lun_ccb.ccb_h.func_code = XPT_EN_LUN;
en_lun_ccb.cel.grp6_len = 0;
en_lun_ccb.cel.grp7_len = 0;
@@ -1694,7 +1694,7 @@ ctlfe_onoffline(void *arg, int online)
return;
}
ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP, M_WAITOK | M_ZERO);
-   xpt_setup_ccb(ccb-ccb_h, path, /*priority*/ 1);
+   xpt_setup_ccb(ccb-ccb_h, path, CAM_PRIORITY_NONE);
 
sim = xpt_path_sim(path);
 

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Sat Oct 27 08:52:33 2012(r242173)
+++ head/sys/cam/scsi/scsi_da.c Sat Oct 27 09:40:29 2012(r242174)
@@ -1510,7 +1510,7 @@ dasysctlinit(void *context, int pending)
 * Add some addressing info.
 */
memset(cts, 0, sizeof (cts));
-   xpt_setup_ccb(cts.ccb_h, periph-path, /*priority*/1);
+   xpt_setup_ccb(cts.ccb_h, periph-path, CAM_PRIORITY_NONE);
cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS;
cts.type = CTS_TYPE_CURRENT_SETTINGS;
cam_periph_lock(periph);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242080 - in head/contrib/llvm/tools/clang: include/clang/Basic lib/Sema

2012-10-27 Thread Ed Schouten
Hi Roman,

2012/10/25 Roman Divacky rdiva...@freebsd.org:
 Why? I can understand cherry picking revisions that fix bugs FreeBSD
 users hit but why additional features?

Because I discussed this specific warning/compiler flag with others at
EuroBSDCon and most people seemed interested. By having it in our
compiler binary, it lowers the barrier for people to try it on their
code.

Also, I am considering adding this to WARNS=6 (or maybe a WARNS=7?) by
the time we make Clang the default on amd64/i386.

I discussed it with the respective maintainer (dim@) and he approved,
so I don't see the problem.

-- 
Ed Schouten e...@80386.nl
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242175 - in head/sys/cam: . scsi

2012-10-27 Thread Alexander Motin
Author: mav
Date: Sat Oct 27 10:14:12 2012
New Revision: 242175
URL: http://svn.freebsd.org/changeset/base/242175

Log:
  Remove priority enforcement from xpt_ation().  It is not good and even not
  safe in some cases to reduce CCB priority after it was scheduled with high
  priority.  This fixes reproducible deadlock when command sent through the
  pass interface while ATA XPT recovers from command timeout.
  
  Instead of that enforce priority at passioctl().  libcam provides no obvious
  interface to specify CCB priority and so much (all?) code specifies zero
  (highest) priority.  This change limits pass CCBs priority to NORMAL run
  level, allowing XPT to complete bus and device recovery after reset before
  running any payload.

Modified:
  head/sys/cam/cam.h
  head/sys/cam/cam_xpt.c
  head/sys/cam/scsi/scsi_pass.c

Modified: head/sys/cam/cam.h
==
--- head/sys/cam/cam.h  Sat Oct 27 09:40:29 2012(r242174)
+++ head/sys/cam/cam.h  Sat Oct 27 10:14:12 2012(r242175)
@@ -83,6 +83,7 @@ typedef struct {
 #define CAM_PRIORITY_NORMAL((CAM_RL_NORMAL  8) + 0x80)
 #define CAM_PRIORITY_NONE  (u_int32_t)-1
 #define CAM_PRIORITY_TO_RL(x)  ((x)  8)
+#define CAM_RL_TO_PRIORITY(x)  ((x)  8)
u_int32_t generation;
int   index;
 #define CAM_UNQUEUED_INDEX -1

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Sat Oct 27 09:40:29 2012(r242174)
+++ head/sys/cam/cam_xpt.c  Sat Oct 27 10:14:12 2012(r242175)
@@ -2468,9 +2468,6 @@ xpt_action(union ccb *start_ccb)
CAM_DEBUG(start_ccb-ccb_h.path, CAM_DEBUG_TRACE, (xpt_action\n));
 
start_ccb-ccb_h.status = CAM_REQ_INPROG;
-   /* Compatibility for RL-unaware code. */
-   if (CAM_PRIORITY_TO_RL(start_ccb-ccb_h.pinfo.priority) == 0)
-   start_ccb-ccb_h.pinfo.priority += CAM_PRIORITY_NORMAL - 1;
(*(start_ccb-ccb_h.path-bus-xport-action))(start_ccb);
 }
 

Modified: head/sys/cam/scsi/scsi_pass.c
==
--- head/sys/cam/scsi/scsi_pass.c   Sat Oct 27 09:40:29 2012
(r242174)
+++ head/sys/cam/scsi/scsi_pass.c   Sat Oct 27 10:14:12 2012
(r242175)
@@ -521,6 +521,7 @@ passioctl(struct cdev *dev, u_long cmd, 
struct  cam_periph *periph;
struct  pass_softc *softc;
int error;
+   uint32_t priority;
 
periph = (struct cam_periph *)dev-si_drv1;
if (periph == NULL)
@@ -553,6 +554,11 @@ passioctl(struct cdev *dev, u_long cmd, 
break;
}
 
+   /* Compatibility for RL/priority-unaware code. */
+   priority = inccb-ccb_h.pinfo.priority;
+   if (priority  CAM_RL_TO_PRIORITY(CAM_RL_NORMAL))
+   priority += CAM_RL_TO_PRIORITY(CAM_RL_NORMAL);
+
/*
 * Non-immediate CCBs need a CCB from the per-device pool
 * of CCBs, which is scheduled by the transport layer.
@@ -561,15 +567,14 @@ passioctl(struct cdev *dev, u_long cmd, 
 */
if ((inccb-ccb_h.func_code  XPT_FC_QUEUED)
  ((inccb-ccb_h.func_code  XPT_FC_USER_CCB) == 0)) {
-   ccb = cam_periph_getccb(periph,
-   inccb-ccb_h.pinfo.priority);
+   ccb = cam_periph_getccb(periph, priority);
ccb_malloced = 0;
} else {
ccb = xpt_alloc_ccb_nowait();
 
if (ccb != NULL)
xpt_setup_ccb(ccb-ccb_h, periph-path,
- inccb-ccb_h.pinfo.priority);
+ priority);
ccb_malloced = 1;
}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242161 - in head/sys: net netinet netpfil/pf

2012-10-27 Thread Andre Oppermann

On 26.10.2012 23:06, Gleb Smirnoff wrote:

Author: glebius
Date: Fri Oct 26 21:06:33 2012
New Revision: 242161
URL: http://svn.freebsd.org/changeset/base/242161

Log:
   o Remove last argument to ip_fragment(), and obtain all needed information
 on checksums directly from mbuf flags. This simplifies code.
   o Clear CSUM_IP from the mbuf in ip_fragment() if we did checksums in
 hardware. Some driver may not announce CSUM_IP in theur if_hwassist,
 although try to do checksums if CSUM_IP set on mbuf. Example is em(4).


I'm not getting your description here?  Why work around a bug in a driver
in ip_fragment() when we can fix the bug in the driver?


   o While here, consistently use CSUM_IP instead of its alias CSUM_DELAY_IP.
 After this change CSUM_DELAY_IP vanishes from the stack.


Good. :)


   Submitted by:Sebastian Kuzminsky seb lineratesystems.com


--
Andre

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


svn commit: r242179 - head/sys/modules

2012-10-27 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sat Oct 27 16:07:38 2012
New Revision: 242179
URL: http://svn.freebsd.org/changeset/base/242179

Log:
  drm(4) works just fine on PowerPC, so connect it to the build.
  
  MFC after:2 weeks

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Sat Oct 27 14:41:45 2012(r242178)
+++ head/sys/modules/Makefile   Sat Oct 27 16:07:38 2012(r242179)
@@ -783,6 +783,7 @@ _cardbus=   cardbus
 _cbb=  cbb
 _cfi=  cfi
 _cpufreq=  cpufreq
+_drm=  drm
 _exca= exca
 _nvram=powermac_nvram
 _pccard=   pccard
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242181 - in head/etc: . rc.d

2012-10-27 Thread Hiroki Sato
Author: hrs
Date: Sat Oct 27 17:06:26 2012
New Revision: 242181
URL: http://svn.freebsd.org/changeset/base/242181

Log:
  Fix an issue when ipv6_enable=YES  ipv6_gateway_enable=YES which could
  prevent rtadvd(8) from working as intended.
  
  Spotted by:   brian
  Discussed with:   brian

Modified:
  head/etc/network.subr
  head/etc/rc.d/rtadvd

Modified: head/etc/network.subr
==
--- head/etc/network.subr   Sat Oct 27 16:44:41 2012(r242180)
+++ head/etc/network.subr   Sat Oct 27 17:06:26 2012(r242181)
@@ -504,7 +504,11 @@ ipv6_autoconfif()
# backward compatibility: $ipv6_enable
case $ipv6_enable in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-   return 0
+   if checkyesno ipv6_gateway_enable; then
+   return 1
+   else
+   return 0
+   fi
;;
esac
 

Modified: head/etc/rc.d/rtadvd
==
--- head/etc/rc.d/rtadvdSat Oct 27 16:44:41 2012(r242180)
+++ head/etc/rc.d/rtadvdSat Oct 27 17:06:26 2012(r242181)
@@ -51,10 +51,6 @@ rtadvd_precmd()
;;
esac
 
-   for iface in ${command_args}; do
-   ifconfig ${iface} inet6 -accept_rtadv
-   done
-
# Enable Router Renumbering, unicast case
# (use correct src/dst addr)
# rtadvd -R in ipsec 
ah/transport/fec0:0:0:1::1-fec0:0:0:10::1/require ${ipv6_network_interfaces}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242181 - in head/etc: . rc.d

2012-10-27 Thread Chris Rees
On 27 October 2012 18:06, Hiroki Sato h...@freebsd.org wrote:
 Author: hrs
 Date: Sat Oct 27 17:06:26 2012
 New Revision: 242181
 URL: http://svn.freebsd.org/changeset/base/242181

 Log:
   Fix an issue when ipv6_enable=YES  ipv6_gateway_enable=YES which could
   prevent rtadvd(8) from working as intended.

   Spotted by:   brian
   Discussed with:   brian

 Modified:
   head/etc/network.subr
   head/etc/rc.d/rtadvd

 Modified: head/etc/network.subr
 ==
 --- head/etc/network.subr   Sat Oct 27 16:44:41 2012(r242180)
 +++ head/etc/network.subr   Sat Oct 27 17:06:26 2012(r242181)
 @@ -504,7 +504,11 @@ ipv6_autoconfif()
 # backward compatibility: $ipv6_enable
 case $ipv6_enable in
 [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
 -   return 0
 +   if checkyesno ipv6_gateway_enable; then
 +   return 1
 +   else
 +   return 0
 +   fi

While there, any chance to use checkyesno ipv6_enable too?

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


Re: svn commit: r242181 - in head/etc: . rc.d

2012-10-27 Thread Hiroki Sato
Chris Rees cr...@freebsd.org wrote
  in CADLo83-psYE3T9+aZhEfQWpm6Ht3snC8OrQ=1qarhnv124o...@mail.gmail.com:

cr On 27 October 2012 18:06, Hiroki Sato h...@freebsd.org wrote:
cr  Author: hrs
cr  Date: Sat Oct 27 17:06:26 2012
cr  New Revision: 242181
cr  URL: http://svn.freebsd.org/changeset/base/242181
cr 
cr  Log:
crFix an issue when ipv6_enable=YES  ipv6_gateway_enable=YES which could
crprevent rtadvd(8) from working as intended.
cr 
crSpotted by:   brian
crDiscussed with:   brian
cr 
cr  Modified:
crhead/etc/network.subr
crhead/etc/rc.d/rtadvd
cr 
cr  Modified: head/etc/network.subr
cr  
==
cr  --- head/etc/network.subr   Sat Oct 27 16:44:41 2012(r242180)
cr  +++ head/etc/network.subr   Sat Oct 27 17:06:26 2012(r242181)
cr  @@ -504,7 +504,11 @@ ipv6_autoconfif()
cr  # backward compatibility: $ipv6_enable
cr  case $ipv6_enable in
cr  [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
cr  -   return 0
cr  +   if checkyesno ipv6_gateway_enable; then
cr  +   return 1
cr  +   else
cr  +   return 0
cr  +   fi
cr
cr While there, any chance to use checkyesno ipv6_enable too?

 No, this is intentional because ipv6_enable is a deprecated variable
 and a not set properly warning should not be displayed even if it
 is not defined.

-- Hiroki


pgpR4HydLEgiq.pgp
Description: PGP signature


Re: svn commit: r242181 - in head/etc: . rc.d

2012-10-27 Thread Chris Rees
On 27 October 2012 18:20, Hiroki Sato h...@freebsd.org wrote:
 Chris Rees cr...@freebsd.org wrote
   in CADLo83-psYE3T9+aZhEfQWpm6Ht3snC8OrQ=1qarhnv124o...@mail.gmail.com:

 cr On 27 October 2012 18:06, Hiroki Sato h...@freebsd.org wrote:
 cr  Author: hrs
 cr  Date: Sat Oct 27 17:06:26 2012
 cr  New Revision: 242181
 cr  URL: http://svn.freebsd.org/changeset/base/242181
 cr 
 cr  Log:
 crFix an issue when ipv6_enable=YES  ipv6_gateway_enable=YES which 
 could
 crprevent rtadvd(8) from working as intended.
 cr 
 crSpotted by:   brian
 crDiscussed with:   brian
 cr 
 cr  Modified:
 crhead/etc/network.subr
 crhead/etc/rc.d/rtadvd
 cr 
 cr  Modified: head/etc/network.subr
 cr  
 ==
 cr  --- head/etc/network.subr   Sat Oct 27 16:44:41 2012
 (r242180)
 cr  +++ head/etc/network.subr   Sat Oct 27 17:06:26 2012
 (r242181)
 cr  @@ -504,7 +504,11 @@ ipv6_autoconfif()
 cr  # backward compatibility: $ipv6_enable
 cr  case $ipv6_enable in
 cr  [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
 cr  -   return 0
 cr  +   if checkyesno ipv6_gateway_enable; then
 cr  +   return 1
 cr  +   else
 cr  +   return 0
 cr  +   fi
 cr
 cr While there, any chance to use checkyesno ipv6_enable too?

  No, this is intentional because ipv6_enable is a deprecated variable
  and a not set properly warning should not be displayed even if it
  is not defined.

Thanks for clarifying.

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


svn commit: r242182 - head/contrib/gcc/config/i386

2012-10-27 Thread Alexander Kabaev
Author: kan
Date: Sat Oct 27 17:39:36 2012
New Revision: 242182
URL: http://svn.freebsd.org/changeset/base/242182

Log:
  Follow clang lead and include  mm_malloc.h only in hosted configurations.
  
  This makes the use of intrinsics easier in kernel environment, according
  to the submitter.
  
  Requested by: jmg

Modified:
  head/contrib/gcc/config/i386/xmmintrin.h

Modified: head/contrib/gcc/config/i386/xmmintrin.h
==
--- head/contrib/gcc/config/i386/xmmintrin.hSat Oct 27 17:06:26 2012
(r242181)
+++ head/contrib/gcc/config/i386/xmmintrin.hSat Oct 27 17:39:36 2012
(r242182)
@@ -39,7 +39,9 @@
 #include mmintrin.h
 
 /* Get _mm_malloc () and _mm_free ().  */
+#if __STDC_HOSTED__
 #include mm_malloc.h
+#endif
 
 /* The Intel API is flexible enough that we must allow aliasing with other
vector types, and their scalar components.  */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242183 - head/etc

2012-10-27 Thread Chris Rees
Author: crees (ports committer)
Date: Sat Oct 27 17:43:30 2012
New Revision: 242183
URL: http://svn.freebsd.org/changeset/base/242183

Log:
  Allow spaces in _chroot
  
  Noticed by:   adj (IRC/#bsdports)
  Approved by:  hrs
  MFC after:1 month

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrSat Oct 27 17:39:36 2012(r242182)
+++ head/etc/rc.subrSat Oct 27 17:43:30 2012(r242183)
@@ -261,8 +261,8 @@ _find_processes()
 
_pref=
if [ $_interpreter != . ]; then   # an interpreted script
-   _script=${_chroot}${_chroot:+/}$_procname
-   if [ -r $_script ]; then
+   _script=${_chroot}${_chroot:+/}$_procname
+   if [ -r $_script ]; then
read _interp  $_script # read interpreter name
case $_interp in
\#!*)
@@ -705,7 +705,7 @@ run_rc_command()
return 1
fi
 
-   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
+   if [ ! -x ${_chroot}${_chroot:+/}${command} ]; then
warn run_rc_command: cannot run $command
return 1
fi
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242184 - in head: etc share/man/man5

2012-10-27 Thread Hiroki Sato
Author: hrs
Date: Sat Oct 27 19:09:09 2012
New Revision: 242184
URL: http://svn.freebsd.org/changeset/base/242184

Log:
  Add setfib(1) support for services as name_fib in rc.conf.

Modified:
  head/etc/rc.subr
  head/share/man/man5/rc.conf.5

Modified: head/etc/rc.subr
==
--- head/etc/rc.subrSat Oct 27 17:43:30 2012(r242183)
+++ head/etc/rc.subrSat Oct 27 19:09:09 2012(r242184)
@@ -462,6 +462,8 @@ check_startmsgs()
 #  NOTE:   $flags from the parent environment
 #  can be used to override this.
 #
+#  ${name}_fib n   Routing table number to run ${command} with.
+#
 #  ${name}_nicen   Nice level to run ${command} at.
 #
 #  ${name}_usern   User to run ${command} as, using su(1) if not
@@ -640,7 +642,8 @@ run_rc_command()
fi
eval _chdir=\$${name}_chdir _chroot=\$${name}_chroot \
_nice=\$${name}_nice_user=\$${name}_user \
-   _group=\$${name}_group  _groups=\$${name}_groups
+   _group=\$${name}_group  _groups=\$${name}_groups \
+   _fib=\$${name}_fib
 
if [ -n $_user ]; then# unset $_user if running as that user
if [ $_user = $(eval $IDCMD) ]; then
@@ -721,11 +724,13 @@ run_rc_command()
if [ -n $_chroot ]; then
_doit=\
 ${_nice:+nice -n $_nice }\
+${_fib:+setfib -F $_fib }\
 chroot ${_user:+-u $_user }${_group:+-g $_group }${_groups:+-G $_groups }\
 $_chroot $command $rc_flags $command_args
else
_doit=\
 ${_chdir:+cd $_chdir  }\
+${_fib:+setfib -F $_fib }\
 $command $rc_flags $command_args
if [ -n $_user ]; then
_doit=su -m $_user -c 'sh -c \$_doit\'

Modified: head/share/man/man5/rc.conf.5
==
--- head/share/man/man5/rc.conf.5   Sat Oct 27 17:43:30 2012
(r242183)
+++ head/share/man/man5/rc.conf.5   Sat Oct 27 19:09:09 2012
(r242184)
@@ -24,7 +24,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd July 22, 2012
+.Dd October 27, 2012
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -179,6 +179,11 @@ Run the service under this user account.
 .Pq Vt str
 Run the chrooted service under this system group. Unlike the _user
 setting, this setting has no effect if the service is not chrooted.
+.It Ao Ar name Ac Ns Va _fib
+.Pq Vt int
+The
+.Xr setfib 1
+value to run the service under.
 .It Ao Ar name Ac Ns Va _nice
 .Pq Vt int
 The
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r242097 - head/sys/fs/smbfs

2012-10-27 Thread Pawel Jakub Dawidek
On Thu, Oct 25, 2012 at 09:08:03PM +, Davide Italiano wrote:
 Author: davide
 Date: Thu Oct 25 21:08:02 2012
 New Revision: 242097
 URL: http://svn.freebsd.org/changeset/base/242097
 
 Log:
   Fix build in case we have SMBVDEBUG turned on.
[...]
 - SMBVDEBUG(ofs=%d,resid=%d\n,(int)uiop-uio_offset, uiop-uio_resid);
 + SMBVDEBUG(ofs=%d,resid=%zd\n,(int)uiop-uio_offset, uiop-uio_resid);

While you are here, you may want to change the code to use %jd for
uio_offset and cast it to (intmax_t).

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl


pgpW9dqAEhEBN.pgp
Description: PGP signature


Re: svn commit: r242101 - in head/usr.sbin/cron: cron crontab lib

2012-10-27 Thread Pawel Jakub Dawidek
On Thu, Oct 25, 2012 at 10:54:30PM +, Maxim Sobolev wrote:
 Author: sobomax
 Date: Thu Oct 25 22:54:29 2012
 New Revision: 242101
 URL: http://svn.freebsd.org/changeset/base/242101
 
 Log:
   Second attempt to add @every_second keyword support. Due to multiple
   requests, default to the previous 60-seconds scheduling method
   unless there is any @every_second entries to conserve CPU cycles and
   power.

On behalf of Mother Earth thank you:)

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://tupytaj.pl


pgpS0rKHW9T7v.pgp
Description: PGP signature


Re: svn commit: r241897 - in head: . sys/sys

2012-10-27 Thread Attilio Rao
On Mon, Oct 22, 2012 at 9:28 PM, Gleb Smirnoff gleb...@freebsd.org wrote:
 On Mon, Oct 22, 2012 at 07:28:42PM +0100, Attilio Rao wrote:
 A On 10/22/12, Konstantin Belousov k...@freebsd.org wrote:
 A  Author: kib
 A  Date: Mon Oct 22 17:54:32 2012
 A  New Revision: 241897
 A  URL: http://svn.freebsd.org/changeset/base/241897
 A 
 A  Log:
 ABump __FreeBSD_version and make a note in UPDATING about removal of
 Athe support for non-MPSAFE filesystems.
 A
 A Also, the __FreeBSD_version bump can be used for FUSE import and
 A NON-mpsafe filesystems removal as well.

 Can you please mention this in the doc repo, where we document 
 __FreeBSD_version
 values?

Done in r39819 of the book.xml.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242185 - stable/9/release

2012-10-27 Thread Hiroki Sato
Author: hrs
Date: Sat Oct 27 19:37:26 2012
New Revision: 242185
URL: http://svn.freebsd.org/changeset/base/242185

Log:
  MFC of 240586 and 240587 to unbreak release building:
  
  Update generate-release.sh script:
  
   - Use svn for ports and doc trees
   - When installing a binary textproc/docproj package,
 switch pkg_add(1) to pkg(8) [1]

Modified:
  stable/9/release/generate-release.sh
Directory Properties:
  stable/9/release/   (props changed)
  stable/9/release/doc/   (props changed)

Modified: stable/9/release/generate-release.sh
==
--- stable/9/release/generate-release.shSat Oct 27 19:09:09 2012
(r242184)
+++ stable/9/release/generate-release.shSat Oct 27 19:37:26 2012
(r242185)
@@ -3,14 +3,10 @@
 # generate-release.sh: check out source trees, and build release components 
with
 #  totally clean, fresh trees.
 #
-#  Usage: generate-release.sh svn-branch scratch-dir
+#  Usage: generate-release.sh [-r revision] [-d docrevision] \
+#  [-p portsrevision] svn-branch scratch-dir
 #
 # Environment variables:
-#  CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation
-#   trees. This or CVSROOT must be set to include ports and documentation.
-#  CVSROOT:CVS root to obtain the ports and documentation trees. This or
-#   CVSUP_HOST must be set to include ports and documentation.
-#  CVS_TAG:CVS tag for ports and documentation (HEAD by default)
 #  SVNROOT:SVN URL to FreeBSD source repository (by default, 
 #   svn://svn.freebsd.org/base)
 #  MAKE_FLAGS: optional flags to pass to make (e.g. -j)
@@ -20,26 +16,42 @@
 # $FreeBSD$
 #
 
-mkdir -p $2/usr/src
+usage()
+{
+   echo Usage: $0 [-r revision] [-d docrevision] [-p portsrevision] 
svn-branch scratch-dir
+   exit 1
+}
+
+REVISION=
+DOCREVISION=
+PORTSREVISION=
+while getopts d:r:p: opt; do
+   case $opt in
+   d)
+   DOCREVISION=-r $OPTARG
+   ;;
+   r)
+   REVISION=-r $OPTARG
+   ;;
+   p)
+   PORTSREVISION=-r $OPTARG
+   ;;
+   \?)
+   usage
+   ;;
+   esac
+done
+shift $(($OPTIND - 1))
+
+if [ $# -lt 2 ]; then
+   usage
+fi
+
 set -e # Everything must succeed
 
 svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src
-if [ ! -z $CVSUP_HOST ]; then
-   cat  $2/docports-supfile  EOF
-   *default host=$CVSUP_HOST
-   *default base=/var/db
-   *default prefix=/usr
-   *default release=cvs tag=${CVS_TAG:-.}
-   *default delete use-rel-suffix
-   *default compress
-   ports-all
-   doc-all
-EOF
-elif [ ! -z $CVSROOT ]; then
-   cd $2/usr
-   cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports
-   cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc
-fi
+svn co ${SVNROOT:-svn://svn.freebsd.org/doc}/head $2/usr/doc $DOCREVISION
+svn co ${SVNROOT:-svn://svn.freebsd.org/ports}/head $2/usr/ports $PORTSREVISION
 
 cd $2/usr/src
 make $MAKE_FLAGS buildworld
@@ -47,18 +59,11 @@ make installworld distribution DESTDIR=$
 mount -t devfs devfs $2/dev
 trap umount $2/dev EXIT # Clean up devfs mount on exit
 
-if [ ! -z $CVSUP_HOST ]; then 
-   cp /etc/resolv.conf $2/etc/resolv.conf
-
-   # Checkout ports and doc trees
-   chroot $2 /usr/bin/csup /docports-supfile
-fi
-
 if [ -d $2/usr/doc ]; then 
cp /etc/resolv.conf $2/etc/resolv.conf
 
-   # Build ports to build release documentation
-   chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd 
/usr/ports/textproc/docproj  make install clean BATCH=yes WITHOUT_X11=yes 
JADETEX=no WITHOUT_PYTHON=yes)'
+   # Install docproj to build release documentation
+   chroot $2 /bin/sh -c '(export ASSUME_ALWAYS_YES=1  /usr/sbin/pkg 
install -y docproj) || (cd /usr/ports/textproc/docproj  make install clean 
BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)'
 fi
 
 chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242186 - releng/9.1/release

2012-10-27 Thread Hiroki Sato
Author: hrs
Date: Sat Oct 27 19:40:25 2012
New Revision: 242186
URL: http://svn.freebsd.org/changeset/base/242186

Log:
  MFC of 240586 and 240587 to unbreak release building:
  
  Update generate-release.sh script:
  
   - Use svn for ports and doc trees
   - When installing a binary textproc/docproj package,
 switch pkg_add(1) to pkg(8) [1]
  
  Approved by:  re (implicitly)

Modified:
  releng/9.1/release/generate-release.sh
Directory Properties:
  releng/9.1/release/   (props changed)

Modified: releng/9.1/release/generate-release.sh
==
--- releng/9.1/release/generate-release.sh  Sat Oct 27 19:37:26 2012
(r242185)
+++ releng/9.1/release/generate-release.sh  Sat Oct 27 19:40:25 2012
(r242186)
@@ -3,14 +3,10 @@
 # generate-release.sh: check out source trees, and build release components 
with
 #  totally clean, fresh trees.
 #
-#  Usage: generate-release.sh svn-branch scratch-dir
+#  Usage: generate-release.sh [-r revision] [-d docrevision] \
+#  [-p portsrevision] svn-branch scratch-dir
 #
 # Environment variables:
-#  CVSUP_HOST: Host of a cvsup server to obtain the ports and documentation
-#   trees. This or CVSROOT must be set to include ports and documentation.
-#  CVSROOT:CVS root to obtain the ports and documentation trees. This or
-#   CVSUP_HOST must be set to include ports and documentation.
-#  CVS_TAG:CVS tag for ports and documentation (HEAD by default)
 #  SVNROOT:SVN URL to FreeBSD source repository (by default, 
 #   svn://svn.freebsd.org/base)
 #  MAKE_FLAGS: optional flags to pass to make (e.g. -j)
@@ -20,26 +16,42 @@
 # $FreeBSD$
 #
 
-mkdir -p $2/usr/src
+usage()
+{
+   echo Usage: $0 [-r revision] [-d docrevision] [-p portsrevision] 
svn-branch scratch-dir
+   exit 1
+}
+
+REVISION=
+DOCREVISION=
+PORTSREVISION=
+while getopts d:r:p: opt; do
+   case $opt in
+   d)
+   DOCREVISION=-r $OPTARG
+   ;;
+   r)
+   REVISION=-r $OPTARG
+   ;;
+   p)
+   PORTSREVISION=-r $OPTARG
+   ;;
+   \?)
+   usage
+   ;;
+   esac
+done
+shift $(($OPTIND - 1))
+
+if [ $# -lt 2 ]; then
+   usage
+fi
+
 set -e # Everything must succeed
 
 svn co ${SVNROOT:-svn://svn.freebsd.org/base}/$1 $2/usr/src
-if [ ! -z $CVSUP_HOST ]; then
-   cat  $2/docports-supfile  EOF
-   *default host=$CVSUP_HOST
-   *default base=/var/db
-   *default prefix=/usr
-   *default release=cvs tag=${CVS_TAG:-.}
-   *default delete use-rel-suffix
-   *default compress
-   ports-all
-   doc-all
-EOF
-elif [ ! -z $CVSROOT ]; then
-   cd $2/usr
-   cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} ports
-   cvs -R ${CVSARGS} -d ${CVSROOT} co -P -r ${CVS_TAG:-HEAD} doc
-fi
+svn co ${SVNROOT:-svn://svn.freebsd.org/doc}/head $2/usr/doc $DOCREVISION
+svn co ${SVNROOT:-svn://svn.freebsd.org/ports}/head $2/usr/ports $PORTSREVISION
 
 cd $2/usr/src
 make $MAKE_FLAGS buildworld
@@ -47,18 +59,11 @@ make installworld distribution DESTDIR=$
 mount -t devfs devfs $2/dev
 trap umount $2/dev EXIT # Clean up devfs mount on exit
 
-if [ ! -z $CVSUP_HOST ]; then 
-   cp /etc/resolv.conf $2/etc/resolv.conf
-
-   # Checkout ports and doc trees
-   chroot $2 /usr/bin/csup /docports-supfile
-fi
-
 if [ -d $2/usr/doc ]; then 
cp /etc/resolv.conf $2/etc/resolv.conf
 
-   # Build ports to build release documentation
-   chroot $2 /bin/sh -c 'pkg_add -r docproj || (cd 
/usr/ports/textproc/docproj  make install clean BATCH=yes WITHOUT_X11=yes 
JADETEX=no WITHOUT_PYTHON=yes)'
+   # Install docproj to build release documentation
+   chroot $2 /bin/sh -c '(export ASSUME_ALWAYS_YES=1  /usr/sbin/pkg 
install -y docproj) || (cd /usr/ports/textproc/docproj  make install clean 
BATCH=yes WITHOUT_X11=yes JADETEX=no WITHOUT_PYTHON=yes)'
 fi
 
 chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242187 - stable/9/etc

2012-10-27 Thread Hiroki Sato
Author: hrs
Date: Sat Oct 27 19:49:15 2012
New Revision: 242187
URL: http://svn.freebsd.org/changeset/base/242187

Log:
  MFC r242181:
  
  Fix an issue when ipv6_enable=YES  ipv6_gateway_enable=YES which could
  prevent rtadvd(8) from working as intended.
  
  Spotted by:   brian
  Discussed with:   brian

Modified:
  stable/9/etc/network.subr
Directory Properties:
  stable/9/etc/   (props changed)

Modified: stable/9/etc/network.subr
==
--- stable/9/etc/network.subr   Sat Oct 27 19:40:25 2012(r242186)
+++ stable/9/etc/network.subr   Sat Oct 27 19:49:15 2012(r242187)
@@ -109,7 +109,9 @@ ifconfig_up()
# backward compatibility: $ipv6_enable
case $ipv6_enable in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-   _ipv6_opts=${_ipv6_opts} accept_rtadv
+   if ! checkyesno ipv6_gateway_enable; then
+   _ipv6_opts=${_ipv6_opts} accept_rtadv
+   fi
;;
esac
 
@@ -488,7 +490,11 @@ ipv6_autoconfif()
# backward compatibility: $ipv6_enable
case $ipv6_enable in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-   return 0
+   if checkyesno ipv6_gateway_enable; then
+   return 1
+   else
+   return 0
+   fi
;;
esac
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242188 - head/usr.sbin/bsdinstall/scripts

2012-10-27 Thread Devin Teske
Author: dteske
Date: Sat Oct 27 19:56:57 2012
New Revision: 242188
URL: http://svn.freebsd.org/changeset/base/242188

Log:
  Fix bug introduced by r241902 (MANIFEST uses TAB delimiter).
  
  PR:   bin/173140
  Approved by:  adrian (co-mentor)

Modified:
  head/usr.sbin/bsdinstall/scripts/auto

Modified: head/usr.sbin/bsdinstall/scripts/auto
==
--- head/usr.sbin/bsdinstall/scripts/auto   Sat Oct 27 19:49:15 2012
(r242187)
+++ head/usr.sbin/bsdinstall/scripts/auto   Sat Oct 27 19:56:57 2012
(r242188)
@@ -53,7 +53,7 @@ bsdinstall hostname || error
 
 export DISTRIBUTIONS=base.txz kernel.txz
 if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
-   DISTMENU=`awk '!/^(kernel|base)/{print $4,$5,$6}' 
$BSDINSTALL_DISTDIR/MANIFEST`
+   DISTMENU=`awk -F'\t' '!/^(kernel|base)/{print $4,$5,$6}' 
$BSDINSTALL_DISTDIR/MANIFEST`
 
exec 31
EXTRA_DISTS=$( eval dialog \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242189 - releng/9.1/etc

2012-10-27 Thread Hiroki Sato
Author: hrs
Date: Sat Oct 27 20:17:59 2012
New Revision: 242189
URL: http://svn.freebsd.org/changeset/base/242189

Log:
  MFC of r242187:
  
  Fix an issue when ipv6_enable=YES  ipv6_gateway_enable=YES which could
  prevent rtadvd(8) from working as intended.
  
  Approved by:  re (kib)

Modified:
  releng/9.1/etc/network.subr
Directory Properties:
  releng/9.1/etc/   (props changed)

Modified: releng/9.1/etc/network.subr
==
--- releng/9.1/etc/network.subr Sat Oct 27 19:56:57 2012(r242188)
+++ releng/9.1/etc/network.subr Sat Oct 27 20:17:59 2012(r242189)
@@ -109,7 +109,9 @@ ifconfig_up()
# backward compatibility: $ipv6_enable
case $ipv6_enable in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-   _ipv6_opts=${_ipv6_opts} accept_rtadv
+   if ! checkyesno ipv6_gateway_enable; then
+   _ipv6_opts=${_ipv6_opts} accept_rtadv
+   fi
;;
esac
 
@@ -488,7 +490,11 @@ ipv6_autoconfif()
# backward compatibility: $ipv6_enable
case $ipv6_enable in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
-   return 0
+   if checkyesno ipv6_gateway_enable; then
+   return 1
+   else
+   return 0
+   fi
;;
esac
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r241610 - in head: . sys/dev/usb sys/net sys/net80211 sys/netpfil/ipfw sys/netpfil/pf sys/sys

2012-10-27 Thread Gleb Smirnoff
On Fri, Oct 26, 2012 at 09:16:08PM -0700, Rui Paulo wrote:
R I second Adrian's comments and I would like to add that you must NOT commit 
something like this, breaking the ABI, when you discussed this *ONE YEAR* ago 
with only two people (one of them is not very active in the networking stack). 
This is against all reasonable software development practices.

- This wasn't discussed privately but on svn-src-head@ mailing list. You could
  participate.

- No objections were raised one year ago. The code of if_cloners hasn't
  any single change during this year.

- If you mean that brooks@ is not very active in networking stack,
  then I will point your attention to the fact that he is the
  original author of interface cloners.

Now my questions:

- Do we have any policy that doesn't permit changing ABI in head?
- Apart from the ABI is there anything wrong with the r241610?

P.S. And yes, please don't use top-quoting on FreeBSD mailing lists:

http://www.freebsd.org/doc/en/articles/mailing-list-faq/etiquette.html

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


Re: svn commit: r242161 - in head/sys: net netinet netpfil/pf

2012-10-27 Thread Gleb Smirnoff
On Sat, Oct 27, 2012 at 12:58:52PM +0200, Andre Oppermann wrote:
A On 26.10.2012 23:06, Gleb Smirnoff wrote:
A  Author: glebius
A  Date: Fri Oct 26 21:06:33 2012
A  New Revision: 242161
A  URL: http://svn.freebsd.org/changeset/base/242161
A 
A  Log:
A o Remove last argument to ip_fragment(), and obtain all needed 
information
A   on checksums directly from mbuf flags. This simplifies code.
A o Clear CSUM_IP from the mbuf in ip_fragment() if we did checksums in
A   hardware. Some driver may not announce CSUM_IP in theur if_hwassist,
A   although try to do checksums if CSUM_IP set on mbuf. Example is em(4).
A 
A I'm not getting your description here?  Why work around a bug in a driver
A in ip_fragment() when we can fix the bug in the driver?

Well, that was actually bug in the stack and a very special driver that
demonstrates it. I may even agree that driver is incorrect, but the stack was
incorrect, too.

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


svn commit: r242191 - head/sys/arm/ti

2012-10-27 Thread Tim Kientzle
Author: kientzle
Date: Sat Oct 27 22:13:42 2012
New Revision: 242191
URL: http://svn.freebsd.org/changeset/base/242191

Log:
  Missing paren.
  
  Pointy hat:me

Modified:
  head/sys/arm/ti/ti_machdep.c

Modified: head/sys/arm/ti/ti_machdep.c
==
--- head/sys/arm/ti/ti_machdep.cSat Oct 27 21:03:29 2012
(r242190)
+++ head/sys/arm/ti/ti_machdep.cSat Oct 27 22:13:42 2012
(r242191)
@@ -494,7 +494,7 @@ initarm(struct arm_boot_params *abp)
 
env = getenv(kernelname);
if (env != NULL)
-   strlcpy(kernelname, env, sizeof(kernelname);
+   strlcpy(kernelname, env, sizeof(kernelname));
 
if (err_devmap != 0)
printf(WARNING: could not fully configure devmap, error=%d\n,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242193 - head/sys/mips/mips

2012-10-27 Thread Alan Cox
Author: alc
Date: Sat Oct 27 22:43:30 2012
New Revision: 242193
URL: http://svn.freebsd.org/changeset/base/242193

Log:
  Eliminate a redundant TLB invalidation from pmap_pv_reclaim().

Modified:
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/mips/pmap.c
==
--- head/sys/mips/mips/pmap.c   Sat Oct 27 22:33:23 2012(r242192)
+++ head/sys/mips/mips/pmap.c   Sat Oct 27 22:43:30 2012(r242193)
@@ -1440,7 +1440,6 @@ pmap_pv_reclaim(pmap_t locked_pmap)
*pte = PTE_G;
else
*pte = 0;
-   pmap_invalidate_page(pmap, va);
m = PHYS_TO_VM_PAGE(TLBLO_PTE_TO_PA(oldpte));
if (pte_test(oldpte, PTE_D))
vm_page_dirty(m);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242196 - stable/9/sys/dev/bce

2012-10-27 Thread Davide Italiano
Author: davide
Date: Sat Oct 27 23:12:05 2012
New Revision: 242196
URL: http://svn.freebsd.org/changeset/base/242196

Log:
  MFC r239110:
  Remove a spurious brace which causes build fail in case BCE_DEBUG option
  is turned on.

Modified:
  stable/9/sys/dev/bce/if_bce.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bce/if_bce.c
==
--- stable/9/sys/dev/bce/if_bce.c   Sat Oct 27 22:58:02 2012
(r242195)
+++ stable/9/sys/dev/bce/if_bce.c   Sat Oct 27 23:12:05 2012
(r242196)
@@ -10513,7 +10513,7 @@ bce_dump_ftqs(struct bce_softc *sc)
(BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT8) |
(BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT);
 
-   if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709)
+   if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709)
val = val |
(BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI 
 24);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242197 - head/sys/modules/drm/via

2012-10-27 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sat Oct 27 23:14:37 2012
New Revision: 242197
URL: http://svn.freebsd.org/changeset/base/242197

Log:
  Don't try to build Linux compatibility stuff on platforms without
  COMPAT_LINUX.

Modified:
  head/sys/modules/drm/via/Makefile

Modified: head/sys/modules/drm/via/Makefile
==
--- head/sys/modules/drm/via/Makefile   Sat Oct 27 23:12:05 2012
(r242196)
+++ head/sys/modules/drm/via/Makefile   Sat Oct 27 23:14:37 2012
(r242197)
@@ -10,7 +10,8 @@ SRCS  += device_if.h bus_if.h pci_if.h op
 DRM_DEBUG_OPT= \#define DRM_DEBUG 1
 .endif
 
-.if !defined(DRM_NOLINUX)
+.if !defined(DRM_NOLINUX)  \
+ (${MACHINE_CPUARCH} == i386 || ${MACHINE_CPUARCH} == amd64)
 DRM_LINUX_OPT= \#define DRM_LINUX 1
 .endif
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242198 - stable/8/sys/dev/bce

2012-10-27 Thread Davide Italiano
Author: davide
Date: Sat Oct 27 23:17:22 2012
New Revision: 242198
URL: http://svn.freebsd.org/changeset/base/242198

Log:
  MFC r239110:
  Remove a spurious brace which causes build fail in case BCE_DEBUG option
  is turned on.

Modified:
  stable/8/sys/dev/bce/if_bce.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/bce/   (props changed)

Modified: stable/8/sys/dev/bce/if_bce.c
==
--- stable/8/sys/dev/bce/if_bce.c   Sat Oct 27 23:14:37 2012
(r242197)
+++ stable/8/sys/dev/bce/if_bce.c   Sat Oct 27 23:17:22 2012
(r242198)
@@ -10513,7 +10513,7 @@ bce_dump_ftqs(struct bce_softc *sc)
(BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT8) |
(BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT);
 
-   if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709)
+   if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709)
val = val |
(BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI 
 24);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242199 - in stable/9/sys: conf kern

2012-10-27 Thread Davide Italiano
Author: davide
Date: Sat Oct 27 23:30:46 2012
New Revision: 242199
URL: http://svn.freebsd.org/changeset/base/242199

Log:
  MFCr238925:
  Until now KTR_ENTRIES, which defines the size of circular buffer used in
  ktr(4), was constrained to be a power of two. Remove this constraint and
  update sys/conf/NOTES accordingly.

Modified:
  stable/9/sys/conf/NOTES
  stable/9/sys/kern/kern_ktr.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/conf/   (props changed)

Modified: stable/9/sys/conf/NOTES
==
--- stable/9/sys/conf/NOTES Sat Oct 27 23:17:22 2012(r242198)
+++ stable/9/sys/conf/NOTES Sat Oct 27 23:30:46 2012(r242199)
@@ -435,7 +435,7 @@ options KTRACE_REQUEST_POOL=101
 #
 # KTR is a kernel tracing facility imported from BSD/OS.  It is
 # enabled with the KTR option.  KTR_ENTRIES defines the number of
-# entries in the circular trace buffer; it must be a power of two.
+# entries in the circular trace buffer; it may be an arbitrary number.
 # KTR_COMPILE defines the mask of events to compile into the kernel as
 # defined by the KTR_* constants in sys/ktr.h.  KTR_MASK defines the
 # initial value of the ktr_mask variable which determines at runtime

Modified: stable/9/sys/kern/kern_ktr.c
==
--- stable/9/sys/kern/kern_ktr.cSat Oct 27 23:17:22 2012
(r242198)
+++ stable/9/sys/kern/kern_ktr.cSat Oct 27 23:30:46 2012
(r242199)
@@ -283,7 +283,7 @@ ktr_tracepoint(u_int mask, const char *f
{
do {
saveindex = ktr_idx;
-   newindex = (saveindex + 1)  (KTR_ENTRIES - 1);
+   newindex = (saveindex + 1) % KTR_ENTRIES;
} while (atomic_cmpset_rel_int(ktr_idx, saveindex, newindex) 
== 0);
entry = ktr_buf[saveindex];
}
@@ -338,7 +338,7 @@ static  int db_mach_vtrace(void);
 DB_SHOW_COMMAND(ktr, db_ktr_all)
 {

-   tstate.cur = (ktr_idx - 1)  (KTR_ENTRIES - 1);
+   tstate.cur = (ktr_idx - 1) % KTR_ENTRIES;
tstate.first = -1;
db_ktr_verbose = 0;
db_ktr_verbose |= (index(modif, 'v') != NULL) ? 2 : 0;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242200 - in stable/8/sys: conf kern

2012-10-27 Thread Davide Italiano
Author: davide
Date: Sat Oct 27 23:34:18 2012
New Revision: 242200
URL: http://svn.freebsd.org/changeset/base/242200

Log:
  MFC r238925:
  Until now KTR_ENTRIES, which defines the size of circular buffer used in
  ktr(4), was constrained to be a power of two. Remove this constraint and
  update sys/conf/NOTES accordingly.

Modified:
  stable/8/sys/conf/NOTES
  stable/8/sys/kern/kern_ktr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/conf/   (props changed)
  stable/8/sys/kern/   (props changed)

Modified: stable/8/sys/conf/NOTES
==
--- stable/8/sys/conf/NOTES Sat Oct 27 23:30:46 2012(r242199)
+++ stable/8/sys/conf/NOTES Sat Oct 27 23:34:18 2012(r242200)
@@ -409,7 +409,7 @@ options KTRACE_REQUEST_POOL=101
 # KTR is a kernel tracing mechanism imported from BSD/OS.  Currently
 # it has no userland interface aside from a few sysctl's.  It is
 # enabled with the KTR option.  KTR_ENTRIES defines the number of
-# entries in the circular trace buffer; it must be a power of two.
+# entries in the circular trace buffer; it may be an arbitrary number.
 # KTR_COMPILE defines the mask of events to compile into the kernel as
 # defined by the KTR_* constants in sys/ktr.h.  KTR_MASK defines the
 # initial value of the ktr_mask variable which determines at runtime

Modified: stable/8/sys/kern/kern_ktr.c
==
--- stable/8/sys/kern/kern_ktr.cSat Oct 27 23:30:46 2012
(r242199)
+++ stable/8/sys/kern/kern_ktr.cSat Oct 27 23:34:18 2012
(r242200)
@@ -235,7 +235,7 @@ ktr_tracepoint(u_int mask, const char *f
{
do {
saveindex = ktr_idx;
-   newindex = (saveindex + 1)  (KTR_ENTRIES - 1);
+   newindex = (saveindex + 1) % KTR_ENTRIES;
} while (atomic_cmpset_rel_int(ktr_idx, saveindex, newindex) 
== 0);
entry = ktr_buf[saveindex];
}
@@ -290,7 +290,7 @@ static  int db_mach_vtrace(void);
 DB_SHOW_COMMAND(ktr, db_ktr_all)
 {

-   tstate.cur = (ktr_idx - 1)  (KTR_ENTRIES - 1);
+   tstate.cur = (ktr_idx - 1) % KTR_ENTRIES;
tstate.first = -1;
db_ktr_verbose = 0;
db_ktr_verbose |= (index(modif, 'v') != NULL) ? 2 : 0;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242201 - head/sys/mips/cavium

2012-10-27 Thread Juli Mallett
Author: jmallett
Date: Sat Oct 27 23:36:41 2012
New Revision: 242201
URL: http://svn.freebsd.org/changeset/base/242201

Log:
  Add missing return that broke 8-bit CF support in refactoring in r222671.
  Tested on a Cavium CN5860-EVB-NIC4.  This was broken for over a year.

Modified:
  head/sys/mips/cavium/octeon_ebt3000_cf.c

Modified: head/sys/mips/cavium/octeon_ebt3000_cf.c
==
--- head/sys/mips/cavium/octeon_ebt3000_cf.cSat Oct 27 23:34:18 2012
(r242200)
+++ head/sys/mips/cavium/octeon_ebt3000_cf.cSat Oct 27 23:36:41 2012
(r242201)
@@ -280,6 +280,7 @@ static void cf_outb_8(int port, uint8_t 
if (bus_type == CF_8) {
volatile uint8_t *task_file = (volatile uint8_t *)base_addr;
task_file[port] = val;
+   return;
}
 
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242202 - head/sys/kern

2012-10-27 Thread Davide Italiano
Author: davide
Date: Sat Oct 27 23:42:41 2012
New Revision: 242202
URL: http://svn.freebsd.org/changeset/base/242202

Log:
  The fields of struct timespec32 should be int32_t and not uint32_t.
  Make this change.
  
  Reviewed by:  bde, davidxu
  Tested by:pho
  MFC after:1 week

Modified:
  head/sys/kern/kern_umtx.c

Modified: head/sys/kern/kern_umtx.c
==
--- head/sys/kern/kern_umtx.c   Sat Oct 27 23:36:41 2012(r242201)
+++ head/sys/kern/kern_umtx.c   Sat Oct 27 23:42:41 2012(r242202)
@@ -3291,8 +3291,8 @@ freebsd32_umtx_unlock(struct thread *td,
 }
 
 struct timespec32 {
-   uint32_t tv_sec;
-   uint32_t tv_nsec;
+   int32_t tv_sec;
+   int32_t tv_nsec;
 };
 
 struct umtx_time32 {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242203 - in head/sys/modules/drm: r128 radeon via

2012-10-27 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sun Oct 28 02:15:35 2012
New Revision: 242203
URL: http://svn.freebsd.org/changeset/base/242203

Log:
  Extend dim's hack from r228978: not only clang but gcc on non-x86 platforms
  warns about unused variables in this code, so always add -Wno-unused to
  the warning flags. Why gcc on x86 *doesn't* warn about this, I will never
  know. The code itself should probably be fixed at some point.

Modified:
  head/sys/modules/drm/r128/Makefile
  head/sys/modules/drm/radeon/Makefile
  head/sys/modules/drm/via/Makefile

Modified: head/sys/modules/drm/r128/Makefile
==
--- head/sys/modules/drm/r128/Makefile  Sat Oct 27 23:42:41 2012
(r242202)
+++ head/sys/modules/drm/r128/Makefile  Sun Oct 28 02:15:35 2012
(r242203)
@@ -7,6 +7,6 @@ SRCS+=device_if.h bus_if.h pci_if.h opt
 
 .include bsd.kmod.mk
 
-CWARNFLAGS.r128_cce.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}
-CWARNFLAGS.r128_state.c=   ${NO_WUNUSED_VALUE}
+CWARNFLAGS.r128_cce.c= -Wno-unused ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.r128_state.c=   -Wno-unused
 CWARNFLAGS+=   ${CWARNFLAGS.${.IMPSRC:T}}

Modified: head/sys/modules/drm/radeon/Makefile
==
--- head/sys/modules/drm/radeon/MakefileSat Oct 27 23:42:41 2012
(r242202)
+++ head/sys/modules/drm/radeon/MakefileSun Oct 28 02:15:35 2012
(r242203)
@@ -8,6 +8,6 @@ SRCS+=device_if.h bus_if.h pci_if.h opt
 
 .include bsd.kmod.mk
 
-CWARNFLAGS.r600_cp.c=  ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}
-CWARNFLAGS.radeon_cp.c=${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.r600_cp.c=  -Wno-unused ${NO_WCONSTANT_CONVERSION}
+CWARNFLAGS.radeon_cp.c=-Wno-unused ${NO_WCONSTANT_CONVERSION}
 CWARNFLAGS+=   ${CWARNFLAGS.${.IMPSRC:T}}

Modified: head/sys/modules/drm/via/Makefile
==
--- head/sys/modules/drm/via/Makefile   Sat Oct 27 23:42:41 2012
(r242202)
+++ head/sys/modules/drm/via/Makefile   Sun Oct 28 02:15:35 2012
(r242203)
@@ -22,6 +22,6 @@ opt_drm.h:
 
 .include bsd.kmod.mk
 
-CWARNFLAGS.via_dma.c=  ${NO_WUNUSED_VALUE}
-CWARNFLAGS.via_dmablit.c=  ${NO_WUNUSED_VALUE}
+CWARNFLAGS.via_dma.c=  -Wno-unused-value
+CWARNFLAGS.via_dmablit.c=  -Wno-unused-value
 CWARNFLAGS+=   ${CWARNFLAGS.${.IMPSRC:T}}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242204 - head/sys/conf

2012-10-27 Thread Warner Losh
Author: imp
Date: Sun Oct 28 02:55:51 2012
New Revision: 242204
URL: http://svn.freebsd.org/changeset/base/242204

Log:
  Better comments.

Modified:
  head/sys/conf/files.mips

Modified: head/sys/conf/files.mips
==
--- head/sys/conf/files.mipsSun Oct 28 02:15:35 2012(r242203)
+++ head/sys/conf/files.mipsSun Oct 28 02:55:51 2012(r242204)
@@ -76,9 +76,9 @@ dev/fdt/fdt_mips.coptionalfdt
 crypto/blowfish/bf_enc.c   optionalcrypto | ipsec 
 crypto/des/des_enc.c   optionalcrypto | ipsec
 
-# AP common nvram interface
+# AP common nvram interface MIPS specific, but maybe should be more generic
 dev/nvram2env/nvram2env.c  optionalnvram2env
 
-# hwpmc goo
+# hwpmc support
 dev/hwpmc/hwpmc_mips.c optionalhwpmc
 dev/hwpmc/hwpmc_mips24k.c  optionalhwpmc
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r242205 - head/sys/net80211

2012-10-27 Thread Adrian Chadd
Author: adrian
Date: Sun Oct 28 04:18:49 2012
New Revision: 242205
URL: http://svn.freebsd.org/changeset/base/242205

Log:
  Add some further BAR TX debugging; it was useful when figuring out
  when BAR TX was actually failing.

Modified:
  head/sys/net80211/ieee80211_ht.c

Modified: head/sys/net80211/ieee80211_ht.c
==
--- head/sys/net80211/ieee80211_ht.cSun Oct 28 02:55:51 2012
(r242204)
+++ head/sys/net80211/ieee80211_ht.cSun Oct 28 04:18:49 2012
(r242205)
@@ -1025,12 +1025,21 @@ ieee80211_ht_node_init(struct ieee80211_
struct ieee80211_tx_ampdu *tap;
int tid;
 
+   IEEE80211_NOTE(ni-ni_vap, IEEE80211_MSG_11N,
+   ni,
+   %s: called,
+   __func__);
+
if (ni-ni_flags  IEEE80211_NODE_HT) {
/*
 * Clean AMPDU state on re-associate.  This handles the case
 * where a station leaves w/o notifying us and then returns
 * before node is reaped for inactivity.
 */
+   IEEE80211_NOTE(ni-ni_vap, IEEE80211_MSG_11N,
+   ni,
+   %s: calling cleanup,
+   __func__);
ieee80211_ht_node_cleanup(ni);
}
for (tid = 0; tid  WME_NUM_TID; tid++) {
@@ -1052,6 +1061,11 @@ ieee80211_ht_node_cleanup(struct ieee802
struct ieee80211com *ic = ni-ni_ic;
int i;
 
+   IEEE80211_NOTE(ni-ni_vap, IEEE80211_MSG_11N,
+   ni,
+   %s: called,
+   __func__);
+
KASSERT(ni-ni_flags  IEEE80211_NODE_HT, (not an HT node));
 
/* XXX optimize this */
@@ -1684,6 +1698,11 @@ ampdu_tx_stop(struct ieee80211_tx_ampdu 
struct ieee80211_node *ni = tap-txa_ni;
struct ieee80211com *ic = ni-ni_ic;
 
+   IEEE80211_NOTE(tap-txa_ni-ni_vap, IEEE80211_MSG_11N,
+   tap-txa_ni,
+   %s: called,
+   __func__);
+
KASSERT(tap-txa_flags  IEEE80211_AGGR_SETUP,
(txa_flags 0x%x tid %d ac %d, tap-txa_flags, tap-txa_tid,
TID_TO_WME_AC(tap-txa_tid)));
@@ -2203,6 +,9 @@ bar_timeout(void *arg)
} else {
ni-ni_vap-iv_stats.is_ampdu_bar_tx_retry++;
if (ieee80211_send_bar(ni, tap, tap-txa_seqpending) != 0) {
+   IEEE80211_NOTE(ni-ni_vap, IEEE80211_MSG_11N,
+   ni, %s: failed to TX, starting timer\n,
+   __func__);
/*
 * If ieee80211_send_bar() fails here, the
 * timer may have stopped and/or the pending
@@ -2221,12 +2243,20 @@ bar_timeout(void *arg)
 static void
 bar_start_timer(struct ieee80211_tx_ampdu *tap)
 {
+   IEEE80211_NOTE(tap-txa_ni-ni_vap, IEEE80211_MSG_11N,
+   tap-txa_ni,
+   %s: called,
+   __func__);
callout_reset(tap-txa_timer, ieee80211_bar_timeout, bar_timeout, tap);
 }
 
 static void
 bar_stop_timer(struct ieee80211_tx_ampdu *tap)
 {
+   IEEE80211_NOTE(tap-txa_ni-ni_vap, IEEE80211_MSG_11N,
+   tap-txa_ni,
+   %s: called,
+   __func__);
callout_stop(tap-txa_timer);
 }
 
@@ -2258,6 +2288,10 @@ ieee80211_bar_response(struct ieee80211_
struct ieee80211_tx_ampdu *tap, int status)
 {
 
+   IEEE80211_NOTE(tap-txa_ni-ni_vap, IEEE80211_MSG_11N,
+   tap-txa_ni,
+   %s: called,
+   __func__);
if (status == 0) {  /* got ACK */
IEEE80211_NOTE(ni-ni_vap, IEEE80211_MSG_11N,
ni, BAR moves BA win %u:%u (%u frames) txseq %u tid %u,
@@ -2292,6 +2326,12 @@ ieee80211_send_bar(struct ieee80211_node
uint8_t *frm;
int tid, ret;
 
+
+   IEEE80211_NOTE(tap-txa_ni-ni_vap, IEEE80211_MSG_11N,
+   tap-txa_ni,
+   %s: called,
+   __func__);
+
if ((tap-txa_flags  IEEE80211_AGGR_RUNNING) == 0) {
/* no ADDBA response, should not happen */
/* XXX stat+msg */
@@ -2354,6 +2394,9 @@ ieee80211_send_bar(struct ieee80211_node
 */
ret = ic-ic_raw_xmit(ni, m, NULL);
if (ret != 0) {
+   IEEE80211_NOTE(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_11N,
+   ni, send BAR: failed: (ret = %d)\n,
+   ret);
/* xmit failed, clear state flag */
tap-txa_flags = ~IEEE80211_AGGR_BARPEND;
vap-iv_stats.is_ampdu_bar_tx_fail++;
@@ -2364,6 +2407,10 @@ ieee80211_send_bar(struct ieee80211_node
bar_start_timer(tap);
return 0;
 bad:
+   IEEE80211_NOTE(tap-txa_ni-ni_vap, IEEE80211_MSG_11N,
+   tap-txa_ni,
+   %s: bad! ret=%d,
+   __func__, ret);
vap-iv_stats.is_ampdu_bar_tx_fail++;
ieee80211_free_node(ni);
return ret;
___