svn commit: r226785 - head

2011-10-26 Thread Ed Schouten
Author: ed
Date: Wed Oct 26 07:49:47 2011
New Revision: 226785
URL: http://svn.freebsd.org/changeset/base/226785

Log:
  Attempt to fix build logic for gensnmptree.
  
  There are two problems with the existing logic. It builds gensnmptree
  on <700018, even if WITHOUT_BSNMP is set, but more importantly, we must
  not forget to build gensnmptree on systems that have originally been
  built without. This causes a buildworld on those systems to fail.
  
  MFC after:1 week

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Oct 26 06:50:40 2011(r226784)
+++ head/Makefile.inc1  Wed Oct 26 07:49:47 2011(r226785)
@@ -1018,7 +1018,8 @@ _yacc=usr.bin/yacc
 _awk=  usr.bin/awk
 .endif
 
-.if ${BOOTSTRAPPING} < 700018
+.if ${MK_BSNMP} != "no" && \
+(${BOOTSTRAPPING} < 700018 || !exists(/usr/sbin/gensnmptree))
 _gensnmptree=  usr.sbin/bsnmpd/gensnmptree
 .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"


Re: svn commit: r226785 - head

2011-10-26 Thread Garrett Cooper
On Oct 26, 2011, at 12:49 AM, Ed Schouten wrote:

> Author: ed
> Date: Wed Oct 26 07:49:47 2011
> New Revision: 226785
> URL: http://svn.freebsd.org/changeset/base/226785
> 
> Log:
>  Attempt to fix build logic for gensnmptree.
> 
>  There are two problems with the existing logic. It builds gensnmptree
>  on <700018, even if WITHOUT_BSNMP is set, but more importantly, we must
>  not forget to build gensnmptree on systems that have originally been
>  built without. This causes a buildworld on those systems to fail.

I addressed the overall issue a bit more thoroughly via bin/143830 . 
Could you take a look at that PR and let me know what you think of it?
Thanks,
-Garrett___
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: r226786 - in stable/9: etc/defaults etc/rc.d share/man/man5

2011-10-26 Thread Martin Matuska
Author: mm
Date: Wed Oct 26 08:34:00 2011
New Revision: 226786
URL: http://svn.freebsd.org/changeset/base/226786

Log:
  MFC r226654, r226657, r226658:
  
  MFC r226654 [1]:
  Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.
  Make sure that static ARP and NDP bindings are set before NETWORKING.
  
  As static_ndp is based on static_arp, pass copyright to the project with
  permission of the original author (delphij@).
  
  MFC r226657 [2]:
  Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@
  as the project itself is no legal entity
  
  MFC r226658 [3]:
  Add information about static_ndp_pairs to rc.conf(5) manual page
  
  Reviewed by:  Xin Li  [1]
  Reported by:  Joe Dahl  [2]
  Submitted by: Sergey Kandaurov  [3]
  Approved by:  re (kib)

Added:
  stable/9/etc/rc.d/static_ndp
 - copied, changed from r226654, head/etc/rc.d/static_ndp
Modified:
  stable/9/etc/defaults/rc.conf
  stable/9/etc/rc.d/Makefile
  stable/9/etc/rc.d/NETWORKING
  stable/9/share/man/man5/rc.conf.5
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/share/man/man5/   (props changed)

Modified: stable/9/etc/defaults/rc.conf
==
--- stable/9/etc/defaults/rc.conf   Wed Oct 26 07:49:47 2011
(r226785)
+++ stable/9/etc/defaults/rc.conf   Wed Oct 26 08:34:00 2011
(r226786)
@@ -383,6 +383,7 @@ bsnmpd_flags="" # Flags for bsnmpd.
 ### Network routing options: ###
 defaultrouter="NO" # Set to default gateway (or NO).
 static_arp_pairs=""# Set to static ARP list (or leave empty).
+static_ndp_pairs=""# Set to static NDP list (or leave empty).
 static_routes=""   # Set to static route list (or leave empty).
 natm_static_routes=""  # Set to static route list for NATM (or leave 
empty).
 gateway_enable="NO"# Set to YES if this host will be a gateway.

Modified: stable/9/etc/rc.d/Makefile
==
--- stable/9/etc/rc.d/Makefile  Wed Oct 26 07:49:47 2011(r226785)
+++ stable/9/etc/rc.d/Makefile  Wed Oct 26 08:34:00 2011(r226786)
@@ -32,7 +32,7 @@ FILES=DAEMON FILESYSTEMS LOGIN NETWORKI
random rarpd rctl resolv rfcomm_pppd_server root \
route6d routed routing rpcbind rtadvd rtsold rwho \
savecore sdpd securelevel sendmail \
-   serial sppp statd static_arp stf swap1 \
+   serial sppp statd static_arp static_ndp stf swap1 \
syscons sysctl syslogd \
timed tmp \
ugidfw \

Modified: stable/9/etc/rc.d/NETWORKING
==
--- stable/9/etc/rc.d/NETWORKINGWed Oct 26 07:49:47 2011
(r226785)
+++ stable/9/etc/rc.d/NETWORKINGWed Oct 26 08:34:00 2011
(r226786)
@@ -6,6 +6,7 @@
 # PROVIDE: NETWORKING NETWORK
 # REQUIRE: netif netoptions routing ppp ipfw stf faith
 # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge
+# REQUIRE: static_arp static_ndp
 
 #  This is a dummy dependency, for services which require networking
 #  to be operational before starting.

Copied and modified: stable/9/etc/rc.d/static_ndp (from r226654, 
head/etc/rc.d/static_ndp)
==
--- head/etc/rc.d/static_ndpSun Oct 23 09:08:42 2011(r226654, copy 
source)
+++ stable/9/etc/rc.d/static_ndpWed Oct 26 08:34:00 2011
(r226786)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2011  The FreeBSD Project
+# Copyright (c) 2011  Xin Li 
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without

Modified: stable/9/share/man/man5/rc.conf.5
==
--- stable/9/share/man/man5/rc.conf.5   Wed Oct 26 07:49:47 2011
(r226785)
+++ stable/9/share/man/man5/rc.conf.5   Wed Oct 26 08:34:00 2011
(r226786)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 13, 2011
+.Dd October 23, 2011
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -2568,6 +2568,22 @@ For example
 static_arp_pairs="gw"
 static_arp_gw="192.168.1.1 00:01:02:03:04:05"
 .Ed
+.It Va static_ndp_pairs
+.Pq Vt str
+Set to the list of static NDP pairs that are to be added at system
+boot time.
+For each whitespace separated
+.Ar element
+in the value, a
+.Va static_ndp_ Ns Aq Ar element
+variable is assumed to exist whose contents will later be passed to a
+.Dq Nm ndp Cm -s
+operation.
+For example
+.Bd -literal
+static_ndp_pairs="gw"
+static_ndp_gw="2001:db8:3::1 00:01:02:03:04:05"
+.Ed
 .It Va static_routes
 .Pq Vt str
 Set to the list of static routes that are to be added at system
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send

svn commit: r226787 - in stable/8: etc/defaults etc/rc.d share/man/man5

2011-10-26 Thread Martin Matuska
Author: mm
Date: Wed Oct 26 08:41:41 2011
New Revision: 226787
URL: http://svn.freebsd.org/changeset/base/226787

Log:
  MFC r226654, r226657, r226658:
  
  MFC r226654 [1]:
  Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.
  Make sure that static ARP and NDP bindings are set before NETWORKING.
  
  As static_ndp is based on static_arp, pass copyright to the project with
  permission of the original author (delphij@).
  
  MFC r226657 [2]:
  Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@
  as the project itself is no legal entity
  
  MFC r226658 [3]:
  Add information about static_ndp_pairs to rc.conf(5) manual page
  
  Reviewed by:  Xin Li  [1]
  Reported by:  Joe Dahl  [2]
  Submitted by: Sergey Kandaurov  [3]

Added:
  stable/8/etc/rc.d/static_ndp
 - copied, changed from r226654, head/etc/rc.d/static_ndp
Modified:
  stable/8/etc/defaults/rc.conf
  stable/8/etc/rc.d/Makefile
  stable/8/etc/rc.d/NETWORKING
  stable/8/share/man/man5/rc.conf.5
Directory Properties:
  stable/8/etc/   (props changed)
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/etc/defaults/rc.conf
==
--- stable/8/etc/defaults/rc.conf   Wed Oct 26 08:34:00 2011
(r226786)
+++ stable/8/etc/defaults/rc.conf   Wed Oct 26 08:41:41 2011
(r226787)
@@ -379,6 +379,7 @@ bsnmpd_flags="" # Flags for bsnmpd.
 ### Network routing options: ###
 defaultrouter="NO" # Set to default gateway (or NO).
 static_arp_pairs=""# Set to static ARP list (or leave empty).
+static_ndp_pairs=""# Set to static NDP list (or leave empty).
 static_routes=""   # Set to static route list (or leave empty).
 natm_static_routes=""  # Set to static route list for NATM (or leave 
empty).
 gateway_enable="NO"# Set to YES if this host will be a gateway.

Modified: stable/8/etc/rc.d/Makefile
==
--- stable/8/etc/rc.d/Makefile  Wed Oct 26 08:34:00 2011(r226786)
+++ stable/8/etc/rc.d/Makefile  Wed Oct 26 08:41:41 2011(r226787)
@@ -32,7 +32,7 @@ FILES=DAEMON FILESYSTEMS LOGIN NETWORKI
random rarpd resolv rfcomm_pppd_server root \
route6d routed routing rpcbind rtadvd rtsold rwho \
savecore sdpd securelevel sendmail \
-   serial sppp statd static_arp swap1 \
+   serial sppp statd static_arp static_ndp swap1 \
syscons sysctl syslogd \
timed tmp \
ugidfw \

Modified: stable/8/etc/rc.d/NETWORKING
==
--- stable/8/etc/rc.d/NETWORKINGWed Oct 26 08:34:00 2011
(r226786)
+++ stable/8/etc/rc.d/NETWORKINGWed Oct 26 08:41:41 2011
(r226787)
@@ -6,6 +6,7 @@
 # PROVIDE: NETWORKING NETWORK
 # REQUIRE: netif netoptions routing network_ipv6 ppp ipfw
 # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv
+# REQUIRE: static_arp static_ndp
 
 #  This is a dummy dependency, for services which require networking
 #  to be operational before starting.

Copied and modified: stable/8/etc/rc.d/static_ndp (from r226654, 
head/etc/rc.d/static_ndp)
==
--- head/etc/rc.d/static_ndpSun Oct 23 09:08:42 2011(r226654, copy 
source)
+++ stable/8/etc/rc.d/static_ndpWed Oct 26 08:41:41 2011
(r226787)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2011  The FreeBSD Project
+# Copyright (c) 2011  Xin Li 
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without

Modified: stable/8/share/man/man5/rc.conf.5
==
--- stable/8/share/man/man5/rc.conf.5   Wed Oct 26 08:34:00 2011
(r226786)
+++ stable/8/share/man/man5/rc.conf.5   Wed Oct 26 08:41:41 2011
(r226787)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 19, 2011
+.Dd October 23, 2011
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -2312,6 +2312,22 @@ For example
 static_arp_pairs="gw"
 static_arp_gw="192.168.1.1 00:01:02:03:04:05"
 .Ed
+.It Va static_ndp_pairs
+.Pq Vt str
+Set to the list of static NDP pairs that are to be added at system
+boot time.
+For each whitespace separated
+.Ar element
+in the value, a
+.Va static_ndp_ Ns Aq Ar element
+variable is assumed to exist whose contents will later be passed to a
+.Dq Nm ndp Cm -s
+operation.
+For example
+.Bd -literal
+static_ndp_pairs="gw"
+static_ndp_gw="2001:db8:3::1 00:01:02:03:04:05"
+.Ed
 .It Va static_routes
 .Pq Vt str
 Set to the list of static routes that are to be added at system
___
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.o

Re: svn commit: r226785 - head

2011-10-26 Thread Ed Schouten
Hi Garrett,

* Garrett Cooper , 20111026 09:54:
> I addressed the overall issue a bit more thoroughly via bin/143830 .
> Could you take a look at that PR and let me know what you think of it?

The patch looks okay, but I think it can be simplified. Maybe we should
get rid of all the `RESCUE' bits from the atmconfig source code itself
and add something like this to the Makefile:

.if !defined(RESCUE) && ${MK_BNSMP} != "no"
CFLAGS+= -DWITH_BSNMP
.endif

That way you can simply use `#ifdef WITH_BSNMP' throughout the source
files.

Thanks,
-- 
 Ed Schouten 
 WWW: http://80386.nl/


pgpwwE2PwuA68.pgp
Description: PGP signature


Re: svn commit: r226771 - head/contrib/tzdata

2011-10-26 Thread Edwin Groothuis

For about a 4 hour window (09:00 till 12:30 Sydney time), tzsetup(8) would 
complain about this missing patch in head, stable/[678]/.
When I committed the port earlier on (misc/zoneinfo) I had spend some time to 
make sure it worked properly.
No idea why I fell for it during the commit in the src/-tree later on.

On 26/10/2011, at 12:56 , Edwin Groothuis wrote:

> Author: edwin
> Date: Wed Oct 26 01:56:22 2011
> New Revision: 226771
> URL: http://svn.freebsd.org/changeset/base/226771
> 
> Log:
>  Fix breakage in tzsetup:
>  MD  +4700+02850 Europe/Chisinau most locations
> 
> Modified:
>  head/contrib/tzdata/zone.tab
> 
> Modified: head/contrib/tzdata/zone.tab
> ==
> --- head/contrib/tzdata/zone.tab  Wed Oct 26 01:03:53 2011
> (r226770)
> +++ head/contrib/tzdata/zone.tab  Wed Oct 26 01:56:22 2011
> (r226771)
> @@ -257,7 +257,7 @@ LV+5657+02406 Europe/Riga
> LY+3254+01311 Africa/Tripoli
> MA+3339-00735 Africa/Casablanca
> MC+4342+00723 Europe/Monaco
> -MD   +4700+02850 Europe/Chisinau
> +MD   +4700+02850 Europe/Chisinau most locations
> MD+4651+02938 Europe/Tiraspol Pridnestrovie
> ME+4226+01916 Europe/Podgorica
> MF+1804-06305 America/Marigot

___
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: r226785 - head

2011-10-26 Thread Bjoern A. Zeeb

On Wed, 26 Oct 2011, Ed Schouten wrote:


Author: ed
Date: Wed Oct 26 07:49:47 2011
New Revision: 226785
URL: http://svn.freebsd.org/changeset/base/226785

Log:
 Attempt to fix build logic for gensnmptree.

 There are two problems with the existing logic. It builds gensnmptree
 on <700018, even if WITHOUT_BSNMP is set, but more importantly, we must
 not forget to build gensnmptree on systems that have originally been
 built without. This causes a buildworld on those systems to fail.


Wasn't it originally located in a different path?   Could be my memory
doesn't serve me right on this one.  You might want to ping syrinx.



 MFC after: 1 week

Modified:
 head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Oct 26 06:50:40 2011(r226784)
+++ head/Makefile.inc1  Wed Oct 26 07:49:47 2011(r226785)
@@ -1018,7 +1018,8 @@ _yacc=usr.bin/yacc
_awk=   usr.bin/awk
.endif

-.if ${BOOTSTRAPPING} < 700018
+.if ${MK_BSNMP} != "no" && \
+(${BOOTSTRAPPING} < 700018 || !exists(/usr/sbin/gensnmptree))
_gensnmptree=   usr.sbin/bsnmpd/gensnmptree
.endif




--
Bjoern A. Zeeb You have to have visions!
 Stop bit received. Insert coin for new address family.
___
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: r225868 - head/bin/ps

2011-10-26 Thread Alexander Best
On Sun Oct  9 11, Ed Schouten wrote:
> * Alexander Best , 20111009 03:11:
> > is this what you had in mind?
> 
> Yes, exactly. :-)

here's an updated patch, which also includes a man page addition. please
anybody feel free to commit.

cheers.
alex

> 
> -- 
>  Ed Schouten 
>  WWW: http://80386.nl/


Index: bin/ps/ps.1
===
--- bin/ps/ps.1 (revision 226769)
+++ bin/ps/ps.1 (working copy)
@@ -29,7 +29,7 @@
 .\" @(#)ps.1   8.3 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd October 1, 2011
+.Dd October 26, 2011
 .Dt PS 1
 .Os
 .Sh NAME
@@ -437,6 +437,10 @@
 .Ql -
 if the process can no longer reach that
 controlling terminal (i.e., it has been revoked).
+A
+.Ql -
+without a preceding two letter abbreviation or pseudo-terminal device number
+indicates a process which never had a controlling terminal.
 The full pathname of the controlling terminal is available via the
 .Cm tty
 keyword.
Index: bin/ps/print.c
===
--- bin/ps/print.c  (revision 226769)
+++ bin/ps/print.c  (working copy)
@@ -362,7 +362,7 @@
v = ve->var;
dev = k->ki_p->ki_tdev;
if (dev == NODEV)
-   str = strdup("??");
+   str = strdup("-");
else
asprintf(&str, "%#jx", (uintmax_t)dev);
 
@@ -379,7 +379,7 @@
v = ve->var;
dev = k->ki_p->ki_tdev;
if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL)
-   str = strdup("?? ");
+   str = strdup("- ");
else {
if (strncmp(ttname, "tty", 3) == 0 ||
strncmp(ttname, "cua", 3) == 0)
@@ -403,7 +403,7 @@
v = ve->var;
dev = k->ki_p->ki_tdev;
if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL)
-   ttname = "??";
+   ttname = "-";
 
return (strdup(ttname));
 }
___
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: r226790 - head/lib/libc/sys

2011-10-26 Thread Sergey Kandaurov
Author: pluknet
Date: Wed Oct 26 14:26:10 2011
New Revision: 226790
URL: http://svn.freebsd.org/changeset/base/226790

Log:
  Fix typo in timer_getoverrun cross-reference.
  
  MFC after:3 days

Modified:
  head/lib/libc/sys/timer_create.2

Modified: head/lib/libc/sys/timer_create.2
==
--- head/lib/libc/sys/timer_create.2Wed Oct 26 13:52:24 2011
(r226789)
+++ head/lib/libc/sys/timer_create.2Wed Oct 26 14:26:10 2011
(r226790)
@@ -151,7 +151,7 @@ memory protection fault.
 .Sh SEE ALSO
 .Xr clock_getres 2 ,
 .Xr timer_delete 2 ,
-.Xr timer_getoverun 2 ,
+.Xr timer_getoverrun 2 ,
 .Xr siginfo 3
 .Sh STANDARDS
 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"


svn commit: r226793 - head/sys/kern

2011-10-26 Thread John Baldwin
Author: jhb
Date: Wed Oct 26 15:17:42 2011
New Revision: 226793
URL: http://svn.freebsd.org/changeset/base/226793

Log:
  - Fixup filenames in a few more places where they are used.
  - Some whitespace fixes.

Modified:
  head/sys/kern/subr_witness.c

Modified: head/sys/kern/subr_witness.c
==
--- head/sys/kern/subr_witness.cWed Oct 26 15:01:04 2011
(r226792)
+++ head/sys/kern/subr_witness.cWed Oct 26 15:17:42 2011
(r226793)
@@ -719,6 +719,18 @@ static int witness_cold = 1;
  */
 static int witness_spin_warn = 0;
 
+/* Trim useless garbage from filenames. */
+static const char *
+fixup_filename(const char *file)
+{
+
+   if (file == NULL)
+   return (NULL);
+   while (strncmp(file, "../", 3) == 0)
+   file += 3;
+   return (file);
+}
+
 /*
  * The WITNESS-enabled diagnostic code.  Note that the witness code does
  * assume that the early boot is single-threaded at least until after this
@@ -924,7 +936,7 @@ witness_ddb_display_descendants(int(*prn
}
w->w_displayed = 1;
if (w->w_file != NULL && w->w_line != 0)
-   prnt(" -- last acquired @ %s:%d\n", w->w_file,
+   prnt(" -- last acquired @ %s:%d\n", fixup_filename(w->w_file),
w->w_line);
else
prnt(" -- never acquired\n");
@@ -990,18 +1002,6 @@ witness_ddb_display(int(*prnt)(const cha
 }
 #endif /* DDB */
 
-/* Trim useless garbage from filenames. */
-static const char *
-fixup_filename(const char *file)
-{
-
-   if (file == NULL)
-   return (NULL);
-   while (strncmp(file, "../", 3) == 0)
-   file += 3;
-   return (file);
-}
-
 int
 witness_defineorder(struct lock_object *lock1, struct lock_object *lock2)
 {
@@ -1167,12 +1167,12 @@ witness_checkorder(struct lock_object *l
"acquiring duplicate lock of same type: \"%s\"\n", 
w->w_name);
printf(" 1st %s @ %s:%d\n", plock->li_lock->lo_name,
-  fixup_filename(plock->li_file), plock->li_line);
+   fixup_filename(plock->li_file), plock->li_line);
printf(" 2nd %s @ %s:%d\n", lock->lo_name,
fixup_filename(file), line);
witness_debugger(1);
-   } else
-   mtx_unlock_spin(&w_mtx);
+   } else
+   mtx_unlock_spin(&w_mtx);
return;
}
mtx_assert(&w_mtx, MA_OWNED);
@@ -1483,7 +1483,8 @@ witness_downgrade(struct lock_object *lo
if ((instance->li_flags & LI_RECURSEMASK) != 0)
panic("downgrade of recursed lock (%s) %s r=%d @ %s:%d",
class->lc_name, lock->lo_name,
-   instance->li_flags & LI_RECURSEMASK, file, line);
+   instance->li_flags & LI_RECURSEMASK,
+   fixup_filename(file), line);
}
instance->li_flags &= ~LI_EXCLUSIVE;
 }
@@ -1533,8 +1534,7 @@ found:
if ((instance->li_flags & LI_EXCLUSIVE) != 0 && witness_watch > 0 &&
(flags & LOP_EXCLUSIVE) == 0) {
printf("shared unlock of (%s) %s @ %s:%d\n", class->lc_name,
-   lock->lo_name,
-   fixup_filename(file), line);
+   lock->lo_name, fixup_filename(file), line);
printf("while exclusively locked from %s:%d\n",
fixup_filename(instance->li_file), instance->li_line);
panic("excl->ushare");
@@ -2090,8 +2090,7 @@ witness_list_lock(struct lock_instance *
prnt(" (%s)", lock->lo_witness->w_name);
prnt(" r = %d (%p) locked @ %s:%d\n",
instance->li_flags & LI_RECURSEMASK, lock,
-   fixup_filename(instance->li_file),
-   instance->li_line);
+   fixup_filename(instance->li_file), instance->li_line);
 }
 
 #ifdef DDB
___
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: r226796 - stable/9/sys/contrib/pf/net

2011-10-26 Thread Bjoern A. Zeeb
Author: bz
Date: Wed Oct 26 15:36:48 2011
New Revision: 226796
URL: http://svn.freebsd.org/changeset/base/226796

Log:
  MFC r226527:
  
Fix indentation in a loop and a tiny maze of #ifdefs for just the
__FreeBSD__ parts that had it wrong.
  
  MFC r226530:
  
Fix a bug when NPFSYNC > 0 that on FreeBSD we would always return
and never remove state.
  
This fixes the problem some people are seeing that state is removed when pf
is loaded as a module but not in situations when compiled into the kernel.
  
  Approved by:  re (kib)

Modified:
  stable/9/sys/contrib/pf/net/pf.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/contrib/pf/net/pf.c
==
--- stable/9/sys/contrib/pf/net/pf.cWed Oct 26 15:22:13 2011
(r226795)
+++ stable/9/sys/contrib/pf/net/pf.cWed Oct 26 15:36:48 2011
(r226796)
@@ -1342,42 +1342,42 @@ pf_purge_thread(void *v)
tsleep(pf_purge_thread, PWAIT, "pftm", 1 * hz);
 
 #ifdef __FreeBSD__
-   sx_slock(&V_pf_consistency_lock);
-   PF_LOCK();
-   locked = 0;
-
-   if (V_pf_end_threads) {
-   PF_UNLOCK();
-   sx_sunlock(&V_pf_consistency_lock);
-   sx_xlock(&V_pf_consistency_lock);
+   sx_slock(&V_pf_consistency_lock);
PF_LOCK();
+   locked = 0;
+
+   if (V_pf_end_threads) {
+   PF_UNLOCK();
+   sx_sunlock(&V_pf_consistency_lock);
+   sx_xlock(&V_pf_consistency_lock);
+   PF_LOCK();
 
-   pf_purge_expired_states(V_pf_status.states, 1);
-   pf_purge_expired_fragments();
-   pf_purge_expired_src_nodes(1);
-   V_pf_end_threads++;
+   pf_purge_expired_states(V_pf_status.states, 1);
+   pf_purge_expired_fragments();
+   pf_purge_expired_src_nodes(1);
+   V_pf_end_threads++;
 
-   sx_xunlock(&V_pf_consistency_lock);
-   PF_UNLOCK();
-   wakeup(pf_purge_thread);
-   kproc_exit(0);
-   }
+   sx_xunlock(&V_pf_consistency_lock);
+   PF_UNLOCK();
+   wakeup(pf_purge_thread);
+   kproc_exit(0);
+   }
 #endif
s = splsoftnet();
 
/* process a fraction of the state table every second */
 #ifdef __FreeBSD__
-   if (!pf_purge_expired_states(1 + (V_pf_status.states /
-   V_pf_default_rule.timeout[PFTM_INTERVAL]), 0)) {
-   PF_UNLOCK();
-   sx_sunlock(&V_pf_consistency_lock);
-   sx_xlock(&V_pf_consistency_lock);
-   PF_LOCK();
-   locked = 1;
+   if (!pf_purge_expired_states(1 + (V_pf_status.states /
+   V_pf_default_rule.timeout[PFTM_INTERVAL]), 0)) {
+   PF_UNLOCK();
+   sx_sunlock(&V_pf_consistency_lock);
+   sx_xlock(&V_pf_consistency_lock);
+   PF_LOCK();
+   locked = 1;
 
-   pf_purge_expired_states(1 + (V_pf_status.states /
-   V_pf_default_rule.timeout[PFTM_INTERVAL]), 1);
-   }
+   pf_purge_expired_states(1 + (V_pf_status.states /
+   V_pf_default_rule.timeout[PFTM_INTERVAL]), 1);
+   }
 #else
pf_purge_expired_states(1 + (pf_status.states
/ pf_default_rule.timeout[PFTM_INTERVAL]));
@@ -1626,8 +1626,8 @@ pf_free_state(struct pf_state *cur)
 
 #if NPFSYNC > 0
 #ifdef __FreeBSD__
-   if (pfsync_state_in_use_ptr != NULL)
-   pfsync_state_in_use_ptr(cur);
+   if (pfsync_state_in_use_ptr != NULL &&
+   pfsync_state_in_use_ptr(cur))
 #else
if (pfsync_state_in_use(cur))
 #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: r226798 - head/sys/dev/ath

2011-10-26 Thread Adrian Chadd
Author: adrian
Date: Wed Oct 26 16:09:05 2011
New Revision: 226798
URL: http://svn.freebsd.org/changeset/base/226798

Log:
  As a prelude to bringing over the 11n work, include some extra statistics 
fields.

Modified:
  head/sys/dev/ath/if_ath_sysctl.c
  head/sys/dev/ath/if_athioctl.h

Modified: head/sys/dev/ath/if_ath_sysctl.c
==
--- head/sys/dev/ath/if_ath_sysctl.cWed Oct 26 15:52:03 2011
(r226797)
+++ head/sys/dev/ath/if_ath_sysctl.cWed Oct 26 16:09:05 2011
(r226798)
@@ -729,6 +729,23 @@ ath_sysctl_stats_attach(struct ath_softc
&sc->sc_stats.ast_tx_timerexpired, 0, "TX exceeded TX_TIMER 
register");
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_desccfgerr", CTLFLAG_RD,
&sc->sc_stats.ast_tx_desccfgerr, 0, "TX Descriptor Cfg Error");
+   SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_swretries", CTLFLAG_RD,
+   &sc->sc_stats.ast_tx_swretries, 0, "TX software retry count");
+   SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_swretrymax", CTLFLAG_RD,
+   &sc->sc_stats.ast_tx_swretrymax, 0, "TX software retry max 
reached");
+
+   SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_data_underrun", 
CTLFLAG_RD,
+   &sc->sc_stats.ast_tx_data_underrun, 0, "");
+   SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_delim_underrun", 
CTLFLAG_RD,
+   &sc->sc_stats.ast_tx_delim_underrun, 0, "");
+   SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_aggrfail", CTLFLAG_RD,
+   &sc->sc_stats.ast_tx_aggrfail, 0,
+   "Number of aggregate TX failures (whole frame)");
+
+   SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_intr", CTLFLAG_RD,
+   &sc->sc_stats.ast_rx_intr, 0, "RX interrupts");
+   SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_intr", CTLFLAG_RD,
+   &sc->sc_stats.ast_tx_intr, 0, "TX interrupts");
 
/* Attach the RX phy error array */
ath_sysctl_stats_attach_rxphyerr(sc, child);

Modified: head/sys/dev/ath/if_athioctl.h
==
--- head/sys/dev/ath/if_athioctl.h  Wed Oct 26 15:52:03 2011
(r226797)
+++ head/sys/dev/ath/if_athioctl.h  Wed Oct 26 16:09:05 2011
(r226798)
@@ -134,7 +134,16 @@ struct ath_stats {
u_int32_t   ast_tx_xtxop;   /* tx exceeded TXOP */
u_int32_t   ast_tx_timerexpired;/* tx exceeded TX_TIMER */
u_int32_t   ast_tx_desccfgerr;  /* tx desc cfg error */
-   u_int32_t   ast_pad[13];
+   u_int32_t   ast_tx_swretries;   /* software TX retries */
+   u_int32_t   ast_tx_swretrymax;  /* software TX retry max limit 
reach */
+   u_int32_t   ast_tx_data_underrun;
+   u_int32_t   ast_tx_delim_underrun;
+   u_int32_t   ast_tx_aggrfail;/* aggregate TX failed 
in its entirety */
+   u_int32_t   ast_tx_getnobuf;
+   u_int32_t   ast_tx_getbusybuf;
+   u_int32_t   ast_tx_intr;
+   u_int32_t   ast_rx_intr;
+   u_int32_t   ast_pad[4];
 };
 
 #defineSIOCGATHSTATS   _IOWR('i', 137, struct ifreq)
___
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: r226799 - head/tools/tools/ath/athstats

2011-10-26 Thread Adrian Chadd
Author: adrian
Date: Wed Oct 26 16:11:49 2011
New Revision: 226799
URL: http://svn.freebsd.org/changeset/base/226799

Log:
  Bring over the new aggregate statistics from the 11n branch.
  
  Some of these values are currently updated by the driver (the 11n
  RX related statistics) so they are immediately useful.

Modified:
  head/tools/tools/ath/athstats/athstats.c

Modified: head/tools/tools/ath/athstats/athstats.c
==
--- head/tools/tools/ath/athstats/athstats.cWed Oct 26 16:09:05 2011
(r226798)
+++ head/tools/tools/ath/athstats/athstats.cWed Oct 26 16:11:49 2011
(r226799)
@@ -49,18 +49,10 @@
 #include 
 #include 
 
-/* Use the system net80211 headers, rather than the kernel tree */
-/*
- * XXX this means that if you build a separate net80211 stack
- * XXX with your kernel and don't install the new/changed headers,
- * XXX this tool may break.
- * XXX -adrian
- */
-#include 
-#include 
-
 #include "ah.h"
 #include "ah_desc.h"
+#include "net80211/ieee80211_ioctl.h"
+#include "net80211/ieee80211_radiotap.h"
 #include "if_athioctl.h"
 
 #include "athstats.h"
@@ -256,8 +248,46 @@ static const struct fmt athstats[] = {
{ 5,"txrawfail","txrawfail","raw tx failed 'cuz 
interface/hw down" },
 #defineS_RX_TOOBIG AFTER(S_TX_RAW_FAIL)
{ 5,"rx2big",   "rx2big",   "rx failed 'cuz frame too 
large"  },
+#defineS_RX_AGGAFTER(S_RX_TOOBIG)
+   { 5,"rxagg","rxagg","A-MPDU sub-frames received" },
+#defineS_RX_HALFGI AFTER(S_RX_AGG)
+   { 5,"rxhalfgi", "rxhgi","Half-GI frames received" },
+#defineS_RX_2040   AFTER(S_RX_HALFGI)
+   { 6,"rx2040",   "rx2040",   "40MHz frames received" },
+#defineS_RX_PRE_CRC_ERRAFTER(S_RX_2040)
+   { 11,   "rxprecrcerr",  "rxprecrcerr",  "CRC errors for non-last A-MPDU 
subframes" },
+#defineS_RX_POST_CRC_ERR   AFTER(S_RX_PRE_CRC_ERR)
+   { 12,   "rxpostcrcerr", "rxpostcrcerr", "CRC errors for last subframe 
in an A-MPDU" },
+#defineS_RX_DECRYPT_BUSY_ERR   AFTER(S_RX_POST_CRC_ERR)
+   { 10,   "rxdescbusy",   "rxdescbusy",   "Decryption engine busy" },
+#defineS_RX_HI_CHAIN   AFTER(S_RX_DECRYPT_BUSY_ERR)
+   { 4,"rxhi", "rxhi", "Frames received with RX chain in high power 
mode" },
+#defineS_TX_HTPROTECT  AFTER(S_RX_HI_CHAIN)
+   { 7,"txhtprot", "txhtprot", "Frames transmitted with HT 
Protection" },
+#defineS_RX_QEND   AFTER(S_TX_HTPROTECT)
+   { 7,"rxquend",  "rxquend",  "Hit end of RX descriptor 
queue" },
+#defineS_TX_TIMEOUTAFTER(S_RX_QEND)
+   { 4,"txtimeout","TXTX", "TX Timeout" },
+#defineS_TX_CSTIMEOUT  AFTER(S_TX_TIMEOUT)
+   { 4,"csttimeout",   "CSTX", "Carrier Sense Timeout" },
+#defineS_TX_XTXOP_ERR  AFTER(S_TX_CSTIMEOUT)
+   { 5,"xtxoperr", "TXOPX","TXOP exceed" },
+#defineS_TX_TIMEREXPIRED_ERR   AFTER(S_TX_XTXOP_ERR)
+   { 7,"texperr",  "texperr",  "TX Timer expired" },
+#defineS_TX_DESCCFG_ERRAFTER(S_TX_TIMEREXPIRED_ERR)
+   { 10,   "desccfgerr",   "desccfgerr",   "TX descriptor error" },
+#defineS_TX_SWRETRIES  AFTER(S_TX_DESCCFG_ERR)
+   { 9,"txswretry","txswretry","Number of frames retransmitted 
in software" },
+#defineS_TX_SWRETRIES_MAX  AFTER(S_TX_SWRETRIES)
+   { 7,"txswmax",  "txswmax",  "Number of frames exceeding 
software retry" },
+#defineS_TX_DATA_UNDERRUN  AFTER(S_TX_SWRETRIES_MAX)
+   { 5,"txdataunderrun",   "TXDAU","A-MPDU TX FIFO data 
underrun" },
+#defineS_TX_DELIM_UNDERRUN AFTER(S_TX_DATA_UNDERRUN)
+   { 5,"txdelimunderrun",  "TXDEU","A-MPDU TX Delimiter 
underrun" },
+#defineS_TX_AGGR_FAIL  AFTER(S_TX_DELIM_UNDERRUN)
+   { 10,   "txaggrfail",   "txaggrfail",   "A-MPDU TX attempt failed" },
 #ifndef __linux__
-#defineS_CABQ_XMIT AFTER(S_RX_TOOBIG)
+#defineS_CABQ_XMIT AFTER(S_TX_AGGR_FAIL)
{ 5,"cabxmit",  "cabxmit",  "cabq frames transmitted" },
 #defineS_CABQ_BUSY AFTER(S_CABQ_XMIT)
{ 5,"cabqbusy", "cabqbusy", "cabq xmit overflowed beacon 
interval" },
@@ -269,7 +299,7 @@ static const struct fmt athstats[] = {
{ 5,"rxbusdma", "rxbusdma", "rx setup failed for dma 
resrcs" },
 #defineS_FF_TXOK   AFTER(S_RX_BUSDMA)
 #else
-#defineS_FF_TXOK   AFTER(S_RX_PHY_UNDERRUN)
+#defineS_FF_TXOK   AFTER(S_TX_AGGR_FAIL)
 #endif
{ 5,"fftxok",   "fftxok",   "fast frames xmit successfully" 
},
 #defineS_FF_TXERR  AFTER(S_FF_TXOK)
@@ -384,12 +414,16 @@ static const struct fmt athstats[] = {
{ 4,"asignal

svn commit: r226800 - in stable/9: sbin/atacontrol sys/dev/ata usr.sbin/burncd

2011-10-26 Thread Craig Rodrigues
Author: rodrigc
Date: Wed Oct 26 17:04:26 2011
New Revision: 226800
URL: http://svn.freebsd.org/changeset/base/226800

Log:
  Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
  option is defined.  This sysctl can be queried by feature_present(3).
  
  Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
  If these utilities detect that ATA_CAM is enabled, then these utilities
  will error out.  These utilities are compatible with the old ATA
  driver, but are incomptible with the new ATA_CAM driver.  By erroring out,
  we give end-users an idea as to what remedies to use, and reduce the need for 
them
  to file PR's.  For atacontrol, camcontrol must be used instead,
  and for burncd, alternative utilties from the ports collection must be used
  such as sysutils/cdrtools.
  
  In future, maybe someone can re-write burncd to work with ATA_CAM,
  but at least for now, we give a somewhat useful error message to end users.
  
  PR:   160979
  Reviewed by:  jh, Arnaud Lacombe 
  Approved by:  re (kib)
  Reported by:  Joe Barbish 

Modified:
  stable/9/sbin/atacontrol/atacontrol.8
  stable/9/sbin/atacontrol/atacontrol.c
  stable/9/sys/dev/ata/ata-all.c
  stable/9/usr.sbin/burncd/burncd.8
  stable/9/usr.sbin/burncd/burncd.c
Directory Properties:
  stable/9/sbin/atacontrol/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/usr.sbin/burncd/   (props changed)

Modified: stable/9/sbin/atacontrol/atacontrol.8
==
--- stable/9/sbin/atacontrol/atacontrol.8   Wed Oct 26 16:11:49 2011
(r226799)
+++ stable/9/sbin/atacontrol/atacontrol.8   Wed Oct 26 17:04:26 2011
(r226800)
@@ -25,12 +25,19 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 21, 2009
+.Dd October 9, 2011
 .Dt ATACONTROL 8
 .Os
 .Sh NAME
 .Nm atacontrol
 .Nd ATA device driver control program
+.Pp
+This utility was
+.Em deprecated
+in
+.Fx 9.0 .
+See
+.Sx NOTES .
 .Sh SYNOPSIS
 .Nm
 .Aq Ar command
@@ -361,11 +368,17 @@ or syslog logging on it as the disk will
 up all the time.
 .Sh SEE ALSO
 .Xr ata 4
+.Xr cam 4
+.Xr camcontrol 8
 .Sh HISTORY
 The
 .Nm
 utility first appeared in
 .Fx 4.6 .
+.Pp
+.Nm
+was deprecated in
+.Fx 9.0 .
 .Sh AUTHORS
 .An -nosplit
 The
@@ -377,3 +390,16 @@ utility was written by
 This manual page was written by
 .An S\(/oren Schmidt
 .Aq s...@freebsd.org .
+.Sh NOTES
+The
+.Nm
+utility was deprecated in
+.Fx 9.0 .
+When
+.Bd -ragged -offset indent
+.Cd "options ATA_CAM"
+.Ed
+.Pp
+is compiled into the kernel, then
+.Xr camcontrol 8
+must be used instead.

Modified: stable/9/sbin/atacontrol/atacontrol.c
==
--- stable/9/sbin/atacontrol/atacontrol.c   Wed Oct 26 16:11:49 2011
(r226799)
+++ stable/9/sbin/atacontrol/atacontrol.c   Wed Oct 26 17:04:26 2011
(r226800)
@@ -378,6 +378,11 @@ main(int argc, char **argv)
 {
int fd, mode, channel, array;
 
+   if (feature_present("ata_cam")) {
+   errx(1, "\nATA_CAM option is enabled in kernel.\n"
+   "Please use camcontrol instead.");
+   }
+
if (argc < 2)
usage();
 

Modified: stable/9/sys/dev/ata/ata-all.c
==
--- stable/9/sys/dev/ata/ata-all.c  Wed Oct 26 16:11:49 2011
(r226799)
+++ stable/9/sys/dev/ata/ata-all.c  Wed Oct 26 17:04:26 2011
(r226800)
@@ -120,6 +120,9 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLA
 TUNABLE_INT("hw.ata.setmax", &ata_setmax);
 SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0,
   "ATA disk set max native address");
+#ifdef ATA_CAM
+FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver");
+#endif
 
 /*
  * newbus device interface related functions

Modified: stable/9/usr.sbin/burncd/burncd.8
==
--- stable/9/usr.sbin/burncd/burncd.8   Wed Oct 26 16:11:49 2011
(r226799)
+++ stable/9/usr.sbin/burncd/burncd.8   Wed Oct 26 17:04:26 2011
(r226800)
@@ -27,12 +27,19 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 21, 2009
+.Dd October 9, 2011
 .Dt BURNCD 8
 .Os
 .Sh NAME
 .Nm burncd
 .Nd control the ATAPI CD-R/RW driver
+.Pp
+This utility was
+.Em deprecated
+in
+.Fx 9.0 .
+See
+.Sx NOTES .
 .Sh SYNOPSIS
 .Nm
 .Op Fl deFlmnpqtv
@@ -211,6 +218,10 @@ The
 .Nm
 utility appeared in
 .Fx 4.0 .
+.Pp
+.Nm
+was deprecated in
+.Fx 9.0 .
 .Sh AUTHORS
 The
 .Nm
@@ -220,3 +231,19 @@ Denmark
 .Aq s...@freebsd.org .
 .Sh BUGS
 Probably, please report when found.
+.Sh NOTES
+When
+.Bd -ragged -offset indent
+.Cd "options ATA_CAM"
+.Ed
+.Pp
+is compiled into the kernel, then
+.Xr cdrecord 1 ,
+available in the
+.Fx
+Ports Collection as part of the
+.Pa sysutils/cdrtools
+port, must be used instead.
+Refer to:
+.Pp
+http://www.freebsd.org/doc/handbook/creating-cds

svn commit: r226801 - stable/9/sys/contrib/pf/net

2011-10-26 Thread Gleb Smirnoff
Author: glebius
Date: Wed Oct 26 17:09:09 2011
New Revision: 226801
URL: http://svn.freebsd.org/changeset/base/226801

Log:
  Sync pf(4) and pfsync(4) with head, merging lots of important bugfixes
  required for normal operation of pfsync(4). Revisions merged:
  
r226531 | bz | 2011-10-19 13:34:40 +0400 (ср, 19 окт 2011) | 4 lines
  
Fix an obvious locking bug where we would lock again rather than unlock.
  
r226532 | bz | 2011-10-19 14:04:24 +0400 (ср, 19 окт 2011) | 12 lines
  
Pseudo interfaces should go at SI_SUB_PSEUDO.  However at least
pfsync also depends on pf to be initialized already so pf goes at
FIRST and the interfaces go at ANY.
Then the (VNET_)SYSINIT startups for pf stays at SI_SUB_PROTO_BEGIN
and for pfsync we move to the later SI_SUB_PROTO_IF.
  
This is not ideal either but at least an order that should work for
the moment and can be re-fined with the VIMAGE merge, once this will
actually work with more than one network stack.
  
r226533 | bz | 2011-10-19 14:08:58 +0400 (ср, 19 окт 2011) | 4 lines
  
In the non-FreeBSD case we do not expect PF_LOCK and friends to do anything.
  
r226535 | bz | 2011-10-19 14:16:42 +0400 (ср, 19 окт 2011) | 5 lines
  
Adjust the PF_ASSERT() macro to what we usually use in the network stack:
PF_LOCK_ASSERT() and PF_UNLOCK_ASSERT().
  
r226536 | bz | 2011-10-19 15:04:49 +0400 (ср, 19 окт 2011) | 8 lines
  
De-virtualize the pf_task_mtx lock.  At the current state of pf locking
and virtualization it is not helpful but complicates things.
  
Current state of art is to not virtualize these kinds of locks -
inp_group/hash/info/.. are all not virtualized either.
  
r226544 | bz | 2011-10-19 17:13:56 +0400 (ср, 19 окт 2011) | 12 lines
  
Fix recursive pf locking leading to panics.  Splatter PF_LOCK_ASSERT()s
to document where we are expecting to be called with a lock held to
more easily catch unnoticed code paths.
This does not neccessarily improve locking in pfsync, it just tries
to avoid the panics reported.
  
PR: kern/159390, kern/158873
Submitted by:   pluknet (at least something that partly resembles
my patch ignoring other cleanup, which I only saw
too late on the 2nd PR)
  
r226609 | glebius | 2011-10-21 15:11:18 +0400 (пт, 21 окт 2011) | 4 lines
  
In FreeBSD ip_output() expects ip_len and ip_off in host byte order
  
PR: kern/159029
  
r226623 | glebius | 2011-10-22 02:28:15 +0400 (сб, 22 окт 2011) | 5 lines
  
Fix a race: we should update sc_len before dropping the pf lock, otherwise a
number of packets can be queued on sc, while we are in ip_output(), and then
we wipe the accumulated sc_len. On next pfsync_sendout() that would lead to
writing beyond our mbuf cluster.
  
r226655 | glebius | 2011-10-23 14:05:25 +0400 (вс, 23 окт 2011) | 5 lines
  
Correct flag for uma_zalloc() is M_WAITOK. M_WAIT is an old and
deprecated flag from historical mbuf(9) allocator.
  
This is style only change.
  
r226656 | glebius | 2011-10-23 14:13:20 +0400 (вс, 23 окт 2011) | 5 lines
  
Absense of M_WAITOK in malloc flags for UMA doesn't
equals presense of M_NOWAIT. Specify M_NOWAIT explicitly.
  
This fixes sleeping with PF_LOCK().
  
r226660 | glebius | 2011-10-23 18:59:54 +0400 (вс, 23 окт 2011) | 22 lines
  
Fix from r226623 is not sufficient to close all races in pfsync(4).
  
The root of problem is re-locking at the end of pfsync_sendout().
Several functions are calling pfsync_sendout() holding pointers
to pf data on stack, and these functions expect this data to be
consistent.
  
To fix this, the following approach was taken:
  
- The pfsync_sendout() doesn't call ip_output() directly, but
  enqueues the mbuf on sc->sc_ifp's interfaces queue, that
  is currently unused. Then pfsync netisr is scheduled. PF_LOCK
  isn't dropped in pfsync_sendout().
- The netisr runs through queue and ip_output()s packets
  on it.
  
Apart from fixing race, this also decouples stack, fixing
potential issues, that may happen, when sending pfsync(4)
packets on input path.
  
Reviewed by:eri (a quick review)
  
r226661 | glebius | 2011-10-23 19:08:18 +0400 (вс, 23 окт 2011) | 13 lines
  
- Fix a bad typo (FreeBSD specific) in pfsync_bulk_update(). Instead
  of scheduling next run pfsync_bulk_update(), pfsync_bulk_fail()
  was scheduled.
  This lead to instant 100% state leak after first bulk update
  request.
- After above fix, it appeared that pfsync_bulk_update() lacks
  locking. To fix this, sc_bulk_tmo callout was converted to an
  mtx one. Eventually, all pf/pfsync callouts should be converted
  to mtx version, since it isn't possible to stop or drain a
  non-mtx callout without risk of race.
- Add comment that callout_stop() in pfsyn

svn commit: r226802 - head/sys/conf

2011-10-26 Thread Robert Millan
Author: rmh
Date: Wed Oct 26 17:26:38 2011
New Revision: 226802
URL: http://svn.freebsd.org/changeset/base/226802

Log:
  Revert r226665 untill the issues with this change have been resolved.
  
  Approved by:  kib (mentor)

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Wed Oct 26 17:09:09 2011(r226801)
+++ head/sys/conf/kern.mk   Wed Oct 26 17:26:38 2011(r226802)
@@ -1,21 +1,11 @@
 # $FreeBSD$
 
-.if ${CC:T:Mclang} != "clang"
-FREEBSD_GCC!=  ${CC} --version | grep FreeBSD || true
-.endif
-
 #
 # Warning flags for compiling the kernel and components of the kernel:
 #
-.if defined(FREEBSD_GCC) && ${FREEBSD_GCC}
-# FreeBSD extensions, not available in upstream GCC
-format_extensions= -fformat-extensions
-no_align_long_strings= -mno-align-long-strings
-.endif
-
 CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-   -Wundef -Wno-pointer-sign ${format_extensions} \
+   -Wundef -Wno-pointer-sign -fformat-extensions \
-Wmissing-include-dirs -fdiagnostics-show-option
 #
 # The following flags are next up for working on:
@@ -42,7 +32,7 @@ CWARNFLAGS?=  -Wall -Wredundant-decls -Wn
 #
 .if ${MACHINE_CPUARCH} == "i386"
 .if ${CC:T:Mclang} != "clang"
-CFLAGS+=   ${no_align_long_strings} -mpreferred-stack-boundary=2 -mno-sse
+CFLAGS+=   -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse
 .else
 CFLAGS+=   -mno-aes -mno-avx
 .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: r226803 - in head/sys/dev/usb: . controller

2011-10-26 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Oct 26 17:43:27 2011
New Revision: 226803
URL: http://svn.freebsd.org/changeset/base/226803

Log:
  Fix suspend and resume of FULL and HIGH speed USB devices
  in the generic XHCI driver. There appears to be some minor
  logic missing for this feature to work.
  
  MFC after:3 days

Modified:
  head/sys/dev/usb/controller/xhci.c
  head/sys/dev/usb/controller/xhcireg.h
  head/sys/dev/usb/usb.h
  head/sys/dev/usb/usb_hub.c

Modified: head/sys/dev/usb/controller/xhci.c
==
--- head/sys/dev/usb/controller/xhci.c  Wed Oct 26 17:26:38 2011
(r226802)
+++ head/sys/dev/usb/controller/xhci.c  Wed Oct 26 17:43:27 2011
(r226803)
@@ -3048,7 +3048,9 @@ xhci_roothub_exec(struct usb_device *ude
}
port = XHCI_PORTSC(index);
 
-   v = XREAD4(sc, oper, port) & ~XHCI_PS_CLEAR;
+   v = XREAD4(sc, oper, port);
+   i = XHCI_PS_PLS_GET(v);
+   v &= ~XHCI_PS_CLEAR;
 
switch (value) {
case UHF_C_BH_PORT_RESET:
@@ -3082,6 +3084,17 @@ xhci_roothub_exec(struct usb_device *ude
XWRITE4(sc, oper, port, v & ~XHCI_PS_PIC_SET(3));
break;
case UHF_PORT_SUSPEND:
+
+   /* U3 -> U15 */
+   if (i == 3) {
+   XWRITE4(sc, oper, port, v |
+   XHCI_PS_PLS_SET(0xF) | XHCI_PS_LWS);
+   }
+
+   /* wait 20ms for resume sequence to complete */
+   usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 50);
+
+   /* U0 */
XWRITE4(sc, oper, port, v |
XHCI_PS_PLS_SET(0) | XHCI_PS_LWS);
break;

Modified: head/sys/dev/usb/controller/xhcireg.h
==
--- head/sys/dev/usb/controller/xhcireg.h   Wed Oct 26 17:26:38 2011
(r226802)
+++ head/sys/dev/usb/controller/xhcireg.h   Wed Oct 26 17:43:27 2011
(r226803)
@@ -133,7 +133,7 @@
 #defineXHCI_PS_WOE 0x0800  /* RW - wake on 
over-current enable */
 #defineXHCI_PS_DR  0x4000  /* RO - device 
removable */
 #defineXHCI_PS_WPR 0x8000U /* RW - warm port reset 
*/
-#defineXHCI_PS_CLEAR   0x80FF00F7U /* command bits */
+#defineXHCI_PS_CLEAR   0x80FF01FFU /* command bits */
 
 #defineXHCI_PORTPMSC(n)(0x3F4 + (0x10 * (n)))  /* XHCI status 
and control */
 #defineXHCI_PM3_U1TO_GET(x)(((x) >> 0) & 0xFF) /* RW - U1 
timeout */

Modified: head/sys/dev/usb/usb.h
==
--- head/sys/dev/usb/usb.h  Wed Oct 26 17:26:38 2011(r226802)
+++ head/sys/dev/usb/usb.h  Wed Oct 26 17:43:27 2011(r226803)
@@ -686,6 +686,7 @@ struct usb_port_status {
 #defineUPS_PORT_LS_HOT_RST 0x09
 #defineUPS_PORT_LS_COMP_MODE   0x0A
 #defineUPS_PORT_LS_LOOPBACK0x0B
+#defineUPS_PORT_LS_RESUME  0x0F
 #defineUPS_PORT_POWER  0x0100
 #defineUPS_LOW_SPEED   0x0200
 #defineUPS_HIGH_SPEED  0x0400

Modified: head/sys/dev/usb/usb_hub.c
==
--- head/sys/dev/usb/usb_hub.c  Wed Oct 26 17:26:38 2011(r226802)
+++ head/sys/dev/usb/usb_hub.c  Wed Oct 26 17:43:27 2011(r226803)
@@ -611,6 +611,7 @@ uhub_suspend_resume_port(struct uhub_sof
switch (UPS_PORT_LINK_STATE_GET(sc->sc_st.port_status)) {
case UPS_PORT_LS_U0:
case UPS_PORT_LS_U1:
+   case UPS_PORT_LS_RESUME:
is_suspend = 0;
break;
default:
___
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: r226804 - head/sys/dev/bge

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Wed Oct 26 18:05:46 2011
New Revision: 226804
URL: http://svn.freebsd.org/changeset/base/226804

Log:
  Make CPMU handle GPHY power down control on controllers that have
  CPMU capability.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Wed Oct 26 17:43:27 2011(r226803)
+++ head/sys/dev/bge/if_bge.c   Wed Oct 26 18:05:46 2011(r226804)
@@ -3446,7 +3446,8 @@ bge_reset(struct bge_softc *sc)
 * Set GPHY Power Down Override to leave GPHY
 * powered up in D0 uninitialized.
 */
-   if (BGE_IS_5705_PLUS(sc))
+   if (BGE_IS_5705_PLUS(sc) &&
+   (sc->bge_flags & BGE_FLAG_CPMU_PRESENT) == 0)
reset |= BGE_MISCCFG_GPHY_PD_OVERRIDE;
 
/* Issue global reset */
___
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: r226805 - head/sys/dev/bge

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Wed Oct 26 18:19:50 2011
New Revision: 226805
URL: http://svn.freebsd.org/changeset/base/226805

Log:
  It is known that all Broadcom controllers have 4GB boundary DMA
  bug.  Apply workaround to all controllers.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Wed Oct 26 18:05:46 2011(r226804)
+++ head/sys/dev/bge/if_bge.c   Wed Oct 26 18:19:50 2011(r226805)
@@ -2918,15 +2918,13 @@ bge_attach(device_t dev)
sc->bge_mi_mode |= BGE_MIMODE_AUTOPOLL;
 
/*
-* All controllers that are not 5755 or higher have 4GB
-* boundary DMA bug.
+* All Broadcom controllers have 4GB boundary DMA bug.
 * Whenever an address crosses a multiple of the 4GB boundary
 * (including 4GB, 8Gb, 12Gb, etc.) and makes the transition
 * from 0xX__ to 0x(X+1)__ an internal DMA
 * state machine will lockup and cause the device to hang.
 */
-   if (BGE_IS_5755_PLUS(sc) == 0)
-   sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG;
+   sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG;
 
misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
if (sc->bge_asicrev == BGE_ASICREV_BCM5705) {
___
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: r226806 - head/sys/dev/bge

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Wed Oct 26 18:27:01 2011
New Revision: 226806
URL: http://svn.freebsd.org/changeset/base/226806

Log:
  Broadcom says BCM5755 or higher and BCM5906 have short DMA bug.
  Apply workaround to these controllers.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Wed Oct 26 18:19:50 2011(r226805)
+++ head/sys/dev/bge/if_bge.c   Wed Oct 26 18:27:01 2011(r226806)
@@ -2828,7 +2828,6 @@ bge_attach(device_t dev)
switch (sc->bge_asicrev) {
case BGE_ASICREV_BCM5717:
case BGE_ASICREV_BCM5719:
-   sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG;
case BGE_ASICREV_BCM57765:
sc->bge_flags |= BGE_FLAG_5717_PLUS | BGE_FLAG_5755_PLUS |
BGE_FLAG_575X_PLUS | BGE_FLAG_5705_PLUS | BGE_FLAG_JUMBO |
@@ -2863,8 +2862,6 @@ bge_attach(device_t dev)
case BGE_ASICREV_BCM5752:
case BGE_ASICREV_BCM5906:
sc->bge_flags |= BGE_FLAG_575X_PLUS;
-   if (sc->bge_asicrev == BGE_ASICREV_BCM5906)
-   sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG;
/* FALLTHROUGH */
case BGE_ASICREV_BCM5705:
sc->bge_flags |= BGE_FLAG_5705_PLUS;
@@ -2926,6 +2923,10 @@ bge_attach(device_t dev)
 */
sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG;
 
+   /* BCM5755 or higher and BCM5906 have short DMA bug. */
+   if (BGE_IS_5755_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5906)
+   sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG;
+
misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
if (sc->bge_asicrev == BGE_ASICREV_BCM5705) {
if (misccfg == BGE_MISCCFG_BOARD_ID_5788 ||
___
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: r226665 - head/sys/conf

2011-10-26 Thread Alexander Best
On Sun Oct 23 11, Robert Millan wrote:
> Author: rmh
> Date: Sun Oct 23 16:27:03 2011
> New Revision: 226665
> URL: http://svn.freebsd.org/changeset/base/226665
> 
> Log:
>   Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are only
>   used with FreeBSD GCC.

any reason -f* flags were added to CWARNFLAGS in the first place? they aren't
really warnings, are they, so adding them to CFLAGS makes more sense imo.

how about:

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index a0a595f..91560e0 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -3,10 +3,9 @@
 #
 # Warning flags for compiling the kernel and components of the kernel:
 #
-CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-   -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-   -Wundef -Wno-pointer-sign -fformat-extensions \
-   -Wmissing-include-dirs -fdiagnostics-show-option
+CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes\
+   -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual\
+   -Wundef -Wno-pointer-sign -Wmissing-include-dirs
 #
 # The following flags are next up for working on:
 #  -Wextra
@@ -83,7 +82,7 @@ CFLAGS+=  -mno-sse
 .else
 CFLAGS+=   -mno-aes -mno-avx
 .endif
-CFLAGS+=   -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \
+CFLAGS+=   -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float\
-fno-asynchronous-unwind-tables
 INLINE_LIMIT?= 8000
 .endif
@@ -120,11 +119,19 @@ INLINE_LIMIT?=8000
 CFLAGS+=   -ffreestanding
 
 #
+# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to
+# enable some diagnostics, which make it easier to pinpoint tinderbox failures.
+# Clang already has these diagnostics enabled by default.
+#
+CFLAGS+=   -fformat-extensions -fdiagnostics-show-option
+
+#
 # GCC SSP support
 #

this also gets rid of some cases where double spaces occur during compilation.
that's just eye candy though.

cheers.
alex

>   
>   Approved by:kib (mentor)
> 
> Modified:
>   head/sys/conf/kern.mk
> 
> Modified: head/sys/conf/kern.mk
> ==
> --- head/sys/conf/kern.mk Sun Oct 23 16:04:07 2011(r226664)
> +++ head/sys/conf/kern.mk Sun Oct 23 16:27:03 2011(r226665)
> @@ -1,11 +1,21 @@
>  # $FreeBSD$
>  
> +.if ${CC:T:Mclang} != "clang"
> +FREEBSD_GCC!=${CC} --version | grep FreeBSD || true
> +.endif
> +
>  #
>  # Warning flags for compiling the kernel and components of the kernel:
>  #
> +.if ${FREEBSD_GCC}
> +# FreeBSD extensions, not available in upstream GCC
> +format_extensions=   -fformat-extensions
> +no_align_long_strings=   -mno-align-long-strings
> +.endif
> +
>  CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
>   -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
> - -Wundef -Wno-pointer-sign -fformat-extensions \
> + -Wundef -Wno-pointer-sign ${format_extensions} \
>   -Wmissing-include-dirs -fdiagnostics-show-option
>  #
>  # The following flags are next up for working on:
> @@ -32,7 +42,7 @@ CWARNFLAGS?=-Wall -Wredundant-decls -Wn
>  #
>  .if ${MACHINE_CPUARCH} == "i386"
>  .if ${CC:T:Mclang} != "clang"
> -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse
> +CFLAGS+= ${no_align_long_strings} -mpreferred-stack-boundary=2 -mno-sse
>  .else
>  CFLAGS+= -mno-aes -mno-avx
>  .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: r226807 - head/sys/dev/bge

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Wed Oct 26 18:37:02 2011
New Revision: 226807
URL: http://svn.freebsd.org/changeset/base/226807

Log:
  BCM5719 cannot handle DMA requests for DMA segments that have
  larger than 4KB in size.  However the maximum DMA segment size
  created in DMA tag is 4KB, so we wouldn't encounter the issue here.
  Just record this issue such that let developers not to create a DMA
  segment that is larger than 4KB for BCM5719. It's possible to split
  a DMA segment into multiple smaller ones in run time but I believe
  it's not worth to implement that.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Wed Oct 26 18:27:01 2011(r226806)
+++ head/sys/dev/bge/if_bge.c   Wed Oct 26 18:37:02 2011(r226807)
@@ -2927,6 +2927,15 @@ bge_attach(device_t dev)
if (BGE_IS_5755_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5906)
sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG;
 
+   /*
+* BCM5719 cannot handle DMA requests for DMA segments that
+* have larger than 4KB in size.  However the maximum DMA
+* segment size created in DMA tag is 4KB for TSO, so we
+* wouldn't encounter the issue here.
+*/
+   if (sc->bge_asicrev == BGE_ASICREV_BCM5719)
+   sc->bge_flags |= BGE_FLAG_4K_RDMA_BUG;
+
misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
if (sc->bge_asicrev == BGE_ASICREV_BCM5705) {
if (misccfg == BGE_MISCCFG_BOARD_ID_5788 ||

Modified: head/sys/dev/bge/if_bgereg.h
==
--- head/sys/dev/bge/if_bgereg.hWed Oct 26 18:27:01 2011
(r226806)
+++ head/sys/dev/bge/if_bgereg.hWed Oct 26 18:37:02 2011
(r226807)
@@ -2797,6 +2797,7 @@ struct bge_softc {
 #defineBGE_FLAG_4G_BNDRY_BUG   0x0200
 #defineBGE_FLAG_RX_ALIGNBUG0x0400
 #defineBGE_FLAG_SHORT_DMA_BUG  0x0800
+#defineBGE_FLAG_4K_RDMA_BUG0x1000
uint32_tbge_phy_flags;
 #defineBGE_PHY_NO_WIRESPEED0x0001
 #defineBGE_PHY_ADC_BUG 0x0002
___
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: r226808 - head/sys/conf

2011-10-26 Thread Olivier Houchard
Author: cognet
Date: Wed Oct 26 19:07:36 2011
New Revision: 226808
URL: http://svn.freebsd.org/changeset/base/226808

Log:
  Add libkern/ucmpdi2.c

Modified:
  head/sys/conf/files.arm

Modified: head/sys/conf/files.arm
==
--- head/sys/conf/files.arm Wed Oct 26 18:37:02 2011(r226807)
+++ head/sys/conf/files.arm Wed Oct 26 19:07:36 2011(r226808)
@@ -71,6 +71,7 @@ libkern/lshrdi3.c standard
 libkern/memchr.c   optionalfdt
 libkern/moddi3.c   standard
 libkern/qdivrem.c  standard
+libkern/ucmpdi2.c  standard
 libkern/udivdi3.c  standard
 libkern/umoddi3.c  standard
 #XXX: We can't use these versions, as strcmp.c is included conf/files
___
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: r226809 - in stable/9/sys: amd64/conf i386/conf ia64/conf powerpc/conf sparc64/conf

2011-10-26 Thread Ken Smith
Author: kensmith
Date: Wed Oct 26 19:45:20 2011
New Revision: 226809
URL: http://svn.freebsd.org/changeset/base/226809

Log:
  MFC r226510,r226547:
  Comment out sbp(4) because it appears to cause boot failure on some
  systems.  Add comment explaining why sbp(4) is commented out.
  
  It was a mistake on my part to omit powerpc's GENERIC for r226510.
  But when I noticed the mistake I checked with the powerpc maintainer
  to see if I should correct the mistake Marcel said he'd prefer it be
  left as-is.
  
  Approved by:  re (kib)

Modified:
  stable/9/sys/amd64/conf/GENERIC
  stable/9/sys/i386/conf/GENERIC
  stable/9/sys/ia64/conf/GENERIC
  stable/9/sys/powerpc/conf/GENERIC
  stable/9/sys/sparc64/conf/GENERIC
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/amd64/conf/GENERIC
==
--- stable/9/sys/amd64/conf/GENERIC Wed Oct 26 19:07:36 2011
(r226808)
+++ stable/9/sys/amd64/conf/GENERIC Wed Oct 26 19:45:20 2011
(r226809)
@@ -320,7 +320,8 @@ device  zyd # ZyDAS zd1211/zd1211b 
wire
 
 # FireWire support
 device firewire# FireWire bus code
-device sbp # SCSI over FireWire (Requires scbus and da)
+# sbp(4) works for some systems but causes boot failure on others
+#devicesbp # SCSI over FireWire (Requires scbus 
and da)
 device fwe # Ethernet over FireWire (non-standard!)
 device fwip# IP over FireWire (RFC 2734,3146)
 device dcons   # Dumb console driver

Modified: stable/9/sys/i386/conf/GENERIC
==
--- stable/9/sys/i386/conf/GENERIC  Wed Oct 26 19:07:36 2011
(r226808)
+++ stable/9/sys/i386/conf/GENERIC  Wed Oct 26 19:45:20 2011
(r226809)
@@ -333,7 +333,8 @@ device  zyd # ZyDAS zd1211/zd1211b 
wire
 
 # FireWire support
 device firewire# FireWire bus code
-device sbp # SCSI over FireWire (Requires scbus and da)
+# sbp(4) works for some systems but causes boot failure on others
+#devicesbp # SCSI over FireWire (Requires scbus 
and da)
 device fwe # Ethernet over FireWire (non-standard!)
 device fwip# IP over FireWire (RFC 2734,3146)
 device dcons   # Dumb console driver

Modified: stable/9/sys/ia64/conf/GENERIC
==
--- stable/9/sys/ia64/conf/GENERIC  Wed Oct 26 19:07:36 2011
(r226808)
+++ stable/9/sys/ia64/conf/GENERIC  Wed Oct 26 19:45:20 2011
(r226809)
@@ -166,7 +166,8 @@ device  uvscom  # USB serial support for
 
 # FireWire support
 device fwip# IP over FireWire (RFC 2734,3146)
-device sbp # SCSI over FireWire (need scbus & da)
+# sbp(4) works for some systems but causes boot failure on others
+#devicesbp # SCSI over FireWire (need scbus & da)
 
 # Various (pseudo) devices
 device ether   # Ethernet support

Modified: stable/9/sys/powerpc/conf/GENERIC
==
--- stable/9/sys/powerpc/conf/GENERIC   Wed Oct 26 19:07:36 2011
(r226808)
+++ stable/9/sys/powerpc/conf/GENERIC   Wed Oct 26 19:45:20 2011
(r226809)
@@ -161,6 +161,7 @@ device  kue # Kawasaki LSI USB 
Ethernet
 
 # FireWire support
 device firewire# FireWire bus code
+# sbp(4) works for some systems but causes boot failure on others
 device sbp # SCSI over FireWire (Requires scbus and da)
 device fwe # Ethernet over FireWire (non-standard!)
 

Modified: stable/9/sys/sparc64/conf/GENERIC
==
--- stable/9/sys/sparc64/conf/GENERIC   Wed Oct 26 19:07:36 2011
(r226808)
+++ stable/9/sys/sparc64/conf/GENERIC   Wed Oct 26 19:45:20 2011
(r226809)
@@ -250,7 +250,8 @@ device  zyd # ZyDAS zd1211/zd1211b 
wire
 
 # FireWire support
 device fir

svn commit: r226810 - in stable/9/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf

2011-10-26 Thread Ken Smith
Author: kensmith
Date: Wed Oct 26 19:59:06 2011
New Revision: 226810
URL: http://svn.freebsd.org/changeset/base/226810

Log:
  I forgot we now leave KDB and KDB_TRACE options in stable kernel config
  files to help provide stack traces during a panic.
  
  Submitted by: Sergey Kandaurov 
  Approved by:  re (implicit)

Modified:
  stable/9/sys/amd64/conf/GENERIC
  stable/9/sys/i386/conf/GENERIC
  stable/9/sys/ia64/conf/GENERIC
  stable/9/sys/pc98/conf/GENERIC
  stable/9/sys/powerpc/conf/GENERIC
  stable/9/sys/sparc64/conf/GENERIC

Modified: stable/9/sys/amd64/conf/GENERIC
==
--- stable/9/sys/amd64/conf/GENERIC Wed Oct 26 19:45:20 2011
(r226809)
+++ stable/9/sys/amd64/conf/GENERIC Wed Oct 26 19:59:06 2011
(r226810)
@@ -64,6 +64,8 @@ options   MAC # TrustedBSD MAC 
Framewor
 #options   KDTRACE_FRAME   # Ensure frames are compiled in
 #options   KDTRACE_HOOKS   # Kernel DTrace hooks
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a 
panic
 
 # Make an SMP-capable kernel by default
 optionsSMP # Symmetric MultiProcessor Kernel

Modified: stable/9/sys/i386/conf/GENERIC
==
--- stable/9/sys/i386/conf/GENERIC  Wed Oct 26 19:45:20 2011
(r226809)
+++ stable/9/sys/i386/conf/GENERIC  Wed Oct 26 19:59:06 2011
(r226810)
@@ -64,6 +64,8 @@ options   AUDIT   # Security event auditi
 optionsMAC # TrustedBSD MAC Framework
 #options   KDTRACE_HOOKS   # Kernel DTrace hooks
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a 
panic
 
 # To make an SMP kernel, the next two lines are needed
 optionsSMP # Symmetric MultiProcessor Kernel

Modified: stable/9/sys/ia64/conf/GENERIC
==
--- stable/9/sys/ia64/conf/GENERIC  Wed Oct 26 19:45:20 2011
(r226809)
+++ stable/9/sys/ia64/conf/GENERIC  Wed Oct 26 19:59:06 2011
(r226810)
@@ -59,6 +59,8 @@ options   UFS_ACL # Support for access c
 optionsUFS_DIRHASH # Hash-based directory lookup scheme
 optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
 options_KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a panic
 
 # Various "busses"
 device firewire# FireWire bus code

Modified: stable/9/sys/pc98/conf/GENERIC
==
--- stable/9/sys/pc98/conf/GENERIC  Wed Oct 26 19:45:20 2011
(r226809)
+++ stable/9/sys/pc98/conf/GENERIC  Wed Oct 26 19:59:06 2011
(r226810)
@@ -65,6 +65,8 @@ options   HWPMC_HOOKS # Necessary kernel
 optionsAUDIT   # Security event auditing
 optionsMAC # TrustedBSD MAC Framework
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a 
panic
 
 # To make an SMP kernel, the next two lines are needed
 #options   SMP # Symmetric MultiProcessor Kernel

Modified: stable/9/sys/powerpc/conf/GENERIC
==
--- stable/9/sys/powerpc/conf/GENERIC   Wed Oct 26 19:45:20 2011
(r226809)
+++ stable/9/sys/powerpc/conf/GENERIC   Wed Oct 26 19:59:06 2011
(r226810)
@@ -66,6 +66,8 @@ options   HWPMC_HOOKS # Necessary kernel
 optionsAUDIT   # Security event auditing
 optionsMAC # TrustedBSD MAC Framework
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a 
panic
 
 # To make an SMP kernel, the next line is needed
 optionsSMP # Symmetric MultiProcessor Kernel

Modified: stable/9/sys/sparc64/conf/GENERIC
==
--- stable/9/sys/sparc64/conf/GENERIC   Wed Oct 26 19:45:20 2011
(r226809)
+++ stable/9/sys/sparc64/conf/GE

svn commit: r226811 - stable/9/usr.sbin/freebsd-update

2011-10-26 Thread Colin Percival
Author: cperciva
Date: Wed Oct 26 20:01:43 2011
New Revision: 226811
URL: http://svn.freebsd.org/changeset/base/226811

Log:
  MFC r226650: Make freebsd-update work with FreeBSD 9.0.
  
  Approved by:  re (kib)

Modified:
  stable/9/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/9/usr.sbin/freebsd-update/   (props changed)

Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/9/usr.sbin/freebsd-update/freebsd-update.sh  Wed Oct 26 19:59:06 
2011(r226810)
+++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh  Wed Oct 26 20:01:43 
2011(r226811)
@@ -1200,7 +1200,7 @@ fetch_metadata_sanity () {
# Some aliases to save space later: ${P} is a character which can
# appear in a path; ${M} is the four numeric metadata fields; and
# ${H} is a sha256 hash.
-   P="[-+./:=_[[:alnum:]]"
+   P="[-+./:=%@_[[:alnum:]]"
M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+"
H="[0-9a-f]{64}"
 
___
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: r226812 - stable/8/usr.sbin/freebsd-update

2011-10-26 Thread Colin Percival
Author: cperciva
Date: Wed Oct 26 20:06:27 2011
New Revision: 226812
URL: http://svn.freebsd.org/changeset/base/226812

Log:
  MFC r226650: Make freebsd-update work with FreeBSD 9.0.  (In particular,
  this will simplify upgrading from 8.3-RELEASE to 9.x.)

Modified:
  stable/8/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/8/usr.sbin/freebsd-update/   (props changed)

Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/8/usr.sbin/freebsd-update/freebsd-update.sh  Wed Oct 26 20:01:43 
2011(r226811)
+++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh  Wed Oct 26 20:06:27 
2011(r226812)
@@ -1185,7 +1185,7 @@ fetch_metadata_sanity () {
# Some aliases to save space later: ${P} is a character which can
# appear in a path; ${M} is the four numeric metadata fields; and
# ${H} is a sha256 hash.
-   P="[-+./:=_[[:alnum:]]"
+   P="[-+./:=%@_[[:alnum:]]"
M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+"
H="[0-9a-f]{64}"
 
___
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: r226813 - stable/7/usr.sbin/freebsd-update

2011-10-26 Thread Colin Percival
Author: cperciva
Date: Wed Oct 26 20:07:58 2011
New Revision: 226813
URL: http://svn.freebsd.org/changeset/base/226813

Log:
  MFC r226650: Make freebsd-update work with FreeBSD 9.0.  (In the unlikely
  event that a 7.5-RELEASE happens, this should simplify upgrading from that
  to 9.x.)

Modified:
  stable/7/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/7/usr.sbin/freebsd-update/   (props changed)

Modified: stable/7/usr.sbin/freebsd-update/freebsd-update.sh
==
--- stable/7/usr.sbin/freebsd-update/freebsd-update.sh  Wed Oct 26 20:06:27 
2011(r226812)
+++ stable/7/usr.sbin/freebsd-update/freebsd-update.sh  Wed Oct 26 20:07:58 
2011(r226813)
@@ -1110,7 +1110,7 @@ fetch_metadata_sanity () {
# Some aliases to save space later: ${P} is a character which can
# appear in a path; ${M} is the four numeric metadata fields; and
# ${H} is a sha256 hash.
-   P="[-+./:=_[[:alnum:]]"
+   P="[-+./:=%@_[[:alnum:]]"
M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+"
H="[0-9a-f]{64}"
 
___
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: r226405 - in stable/9: . etc/defaults lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf

2011-10-26 Thread Ken Smith
On Tue, 2011-10-25 at 23:22 +0400, Sergey Kandaurov wrote:
> In 8-STABLE (and 8.2) both KDB and KDB_TRACE present in GENERIC
> kernels (added in r214326, I guess they are needed for printing a stack
> trace on panic). Were these options removed intentionally in this commit? 

Depends on what you mean by intentionally.  I forgot about the panic
stack trace thing.  So KDB and KDB_TRACE sitting in the section of
stuff that's normally removed didn't trigger a warning bell as I was
doing r226405.

I've fixed stable/9.  And I'll adjust head shortly to try and avoid
having this happen again for 10.0 by moving them out of the chunk of
stuff that's supposed to be removed...

-- 
Ken Smith
- From there to here, from here to  |   kensm...@buffalo.edu
  there, funny things are everywhere.   |
  - Theodor Geisel  |


signature.asc
Description: This is a digitally signed message part


Re: svn commit: r226665 - head/sys/conf

2011-10-26 Thread Bruce Evans

On Wed, 26 Oct 2011, Alexander Best wrote:


On Sun Oct 23 11, Robert Millan wrote:

Log:
  Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are only
  used with FreeBSD GCC.


any reason -f* flags were added to CWARNFLAGS in the first place? they aren't
really warnings, are they, so adding them to CFLAGS makes more sense imo.


-fformat-extensions is added to CWARNFLAGS because it is a modifier
to -Wformat.  It was originally (in bsd.kern.mk 1.10) placed immediately
after -Wformat in CWARNFLAGS, and was added in the same commit as
-Wformat (since -Wformat could not be added before -fformat-extensions
was developed to allow it to be added without breaking kernel builds).
This is partially explained in the commit message.  This was obfuscated
(in bsd.kern.mk 1.14) by removing -Wformat.  1.13 had made -Wformat
redundant by adding -Wall.  This is not explained in the commit message.


diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index a0a595f..91560e0 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -3,10 +3,9 @@
#
# Warning flags for compiling the kernel and components of the kernel:
#
-CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-   -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-   -Wundef -Wno-pointer-sign -fformat-extensions \
-   -Wmissing-include-dirs -fdiagnostics-show-option
+CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes\
+   -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual\
+   -Wundef -Wno-pointer-sign -Wmissing-include-dirs


Neither of these should be moved, except within CWARNFLAGS.

For -fformat-extensions, see above.

-fdiagnostics-show option is even more closely related with warning flags
and even better documented in its commit message, as you should know since
you submitted it :-).  Actually, the commit message seems to tie it
more closely with warning flags than it actually is -- it says that
"it will report which -W* flag was responsible for triggering a certain
warning", while gcc(1) says that it is for reporting of general diagnostics.

-Wformat and -fformat-extensions were originally at the end of CWARNFLAGS.
-fformat-extensions wasn't moved to be with -Wall when that was added.
Keeping it at the end is reasonable.  But it shouldn't be in the middle
of random -W flags like it now is.  All of the -W options are unfortunately
unsorted by adding them to the end of the unsorted list.  Some old versions
even added -std=c99 to the end.  Since -std has nothing to do with warning
flags, that was nonsense and has been fixed.

-fdiagnostics-show-option controls all the warning flags, so it would be
better placed at the beginning.

Bruce
___
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: r226814 - head/sys/dev/bge

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Wed Oct 26 21:05:45 2011
New Revision: 226814
URL: http://svn.freebsd.org/changeset/base/226814

Log:
  Rename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones.
  The origin of GENCOMM seems to come from Alteon Tigon Host/NIC
  interface definition where it defines general communications region
  which is active when firmware is loaded and running.  This region
  was used in communication between the host and processor internal
  to the Tigon chip.
  Broadcom data sheet also defines the region as 'Software Gencomm'
  in NetXtreme memory map but lacks detailed description of its
  interface so it was hard to know which ones are used for which
  interface.
  This change shall slightly enhance readability.
  
  No functional changes.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Wed Oct 26 20:07:58 2011(r226813)
+++ head/sys/dev/bge/if_bge.c   Wed Oct 26 21:05:45 2011(r226814)
@@ -1309,7 +1309,7 @@ bge_sig_pre_reset(struct bge_softc *sc, 
 * Some chips don't like this so only do this if ASF is enabled
 */
if (sc->bge_asf_mode)
-   bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
+   bge_writemem_ind(sc, BGE_SRAM_FW_MB, BGE_SRAM_FW_MB_MAGIC);
 
if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) {
switch (type) {
@@ -1362,7 +1362,7 @@ bge_stop_fw(struct bge_softc *sc)
int i;
 
if (sc->bge_asf_mode) {
-   bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW, BGE_FW_PAUSE);
+   bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_PAUSE);
CSR_WRITE_4(sc, BGE_CPU_EVENT,
CSR_READ_4(sc, BGE_CPU_EVENT) | (1 << 14));
 
@@ -3081,9 +3081,9 @@ bge_attach(device_t dev)
}
 
sc->bge_asf_mode = 0;
-   if (bge_allow_asf && (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG)
-   == BGE_MAGIC_NUMBER)) {
-   if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_NICCFG)
+   if (bge_allow_asf && (bge_readmem_ind(sc, BGE_SRAM_DATA_SIG) ==
+   BGE_SRAM_DATA_SIG_MAGIC)) {
+   if (bge_readmem_ind(sc, BGE_SRAM_DATA_CFG)
& BGE_HWCFG_ASF) {
sc->bge_asf_mode |= ASF_ENABLE;
sc->bge_asf_mode |= ASF_STACKUP;
@@ -3197,8 +3197,8 @@ bge_attach(device_t dev)
 * by its PCI subsystem ID, as we do below for the SysKonnect
 * SK-9D41.
 */
-   if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG) == BGE_MAGIC_NUMBER)
-   hwcfg = bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_NICCFG);
+   if (bge_readmem_ind(sc, BGE_SRAM_DATA_SIG) == BGE_SRAM_DATA_SIG_MAGIC)
+   hwcfg = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG);
else if ((sc->bge_flags & BGE_FLAG_EADDR) &&
(sc->bge_asicrev != BGE_ASICREV_BCM5906)) {
if (bge_read_eeprom(sc, (caddr_t)&hwcfg, BGE_EE_HWCFG_OFFSET,
@@ -3433,9 +3433,9 @@ bge_reset(struct bge_softc *sc)
/*
 * Write the magic number to SRAM at offset 0xB50.
 * When firmware finishes its initialization it will
-* write ~BGE_MAGIC_NUMBER to the same location.
+* write ~BGE_SRAM_FW_MB_MAGIC to the same location.
 */
-   bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
+   bge_writemem_ind(sc, BGE_SRAM_FW_MB, BGE_SRAM_FW_MB_MAGIC);
 
reset = BGE_MISCCFG_RESET_CORE_CLOCKS | BGE_32BITTIME_66MHZ;
 
@@ -3560,8 +3560,8 @@ bge_reset(struct bge_softc *sc)
 */
for (i = 0; i < BGE_TIMEOUT; i++) {
DELAY(10);
-   val = bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM);
-   if (val == ~BGE_MAGIC_NUMBER)
+   val = bge_readmem_ind(sc, BGE_SRAM_FW_MB);
+   if (val == ~BGE_SRAM_FW_MB_MAGIC)
break;
}
 
@@ -4100,10 +4100,10 @@ bge_asf_driver_up(struct bge_softc *sc)
sc->bge_asf_count --;
else {
sc->bge_asf_count = 2;
-   bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW,
+   bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB,
BGE_FW_DRV_ALIVE);
-   bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4);
-   bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_DATA, 3);
+   bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
+   bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3);
CSR_WRITE_4(sc, BGE_CPU_EVENT,
CSR_READ_4(sc, BGE_CPU_EVENT) | (1 << 14));
}

Modified: head/sys/dev/bge/if_bgereg.h

svn commit: r226815 - head/sys/dev/bge

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Wed Oct 26 21:11:40 2011
New Revision: 226815
URL: http://svn.freebsd.org/changeset/base/226815

Log:
  Define MAC address mail box and use it instead of using
  hard-coded value.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Wed Oct 26 21:05:45 2011(r226814)
+++ head/sys/dev/bge/if_bge.c   Wed Oct 26 21:11:40 2011(r226815)
@@ -5938,11 +5938,11 @@ bge_get_eaddr_mem(struct bge_softc *sc, 
 {
uint32_t mac_addr;
 
-   mac_addr = bge_readmem_ind(sc, 0x0c14);
+   mac_addr = bge_readmem_ind(sc, BGE_SRAM_MAC_ADDR_HIGH_MB);
if ((mac_addr >> 16) == 0x484b) {
ether_addr[0] = (uint8_t)(mac_addr >> 8);
ether_addr[1] = (uint8_t)mac_addr;
-   mac_addr = bge_readmem_ind(sc, 0x0c18);
+   mac_addr = bge_readmem_ind(sc, BGE_SRAM_MAC_ADDR_LOW_MB);
ether_addr[2] = (uint8_t)(mac_addr >> 24);
ether_addr[3] = (uint8_t)(mac_addr >> 16);
ether_addr[4] = (uint8_t)(mac_addr >> 8);

Modified: head/sys/dev/bge/if_bgereg.h
==
--- head/sys/dev/bge/if_bgereg.hWed Oct 26 21:05:45 2011
(r226814)
+++ head/sys/dev/bge/if_bgereg.hWed Oct 26 21:11:40 2011
(r226815)
@@ -77,6 +77,8 @@
 #defineBGE_SRAM_FW_CMD_MB  0x0B78
 #defineBGE_SRAM_FW_CMD_LEN_MB  0x0B7C
 #defineBGE_SRAM_FW_CMD_DATA_MB 0x0B80
+#defineBGE_SRAM_MAC_ADDR_HIGH_MB   0x0C14
+#defineBGE_SRAM_MAC_ADDR_LOW_MB0x0C18
 #defineBGE_SOFTWARE_GENCOMM_END0x0FFF
 #defineBGE_UNMAPPED0x1000
 #defineBGE_UNMAPPED_END0x1FFF
___
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: r226816 - in head: sbin/geom/class/raid sys/geom/raid

2011-10-26 Thread Alexander Motin
Author: mav
Date: Wed Oct 26 21:50:10 2011
New Revision: 226816
URL: http://svn.freebsd.org/changeset/base/226816

Log:
  Clarify disks/volumes above 2TiB support in geom_raid:
   - add support for volumes above 2TiB with Promise metadata format;
   - enforse and document other limitations:
 - Intel and Promise metadata formats do not support disks above 2TiB;
 - NVIDIA metadata format does not support volumes above 2TiB.
  
  Sponsored by: iXsystems, Inc.
  MFC after:2 weeks

Modified:
  head/sbin/geom/class/raid/graid.8
  head/sys/geom/raid/md_intel.c
  head/sys/geom/raid/md_nvidia.c
  head/sys/geom/raid/md_promise.c

Modified: head/sbin/geom/class/raid/graid.8
==
--- head/sbin/geom/class/raid/graid.8   Wed Oct 26 21:11:40 2011
(r226815)
+++ head/sbin/geom/class/raid/graid.8   Wed Oct 26 21:50:10 2011
(r226816)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 22, 2011
+.Dd October 26, 2011
 .Dt GRAID 8
 .Os
 .Sh NAME
@@ -250,6 +250,9 @@ If you started migration using BIOS or i
 complete it there.
 Do not run GEOM RAID class on migrating volumes under pain of possible data
 corruption!
+.Sh 2TiB BARRIERS
+Intel and Promise metadata formats do not support disks above 2TiB.
+NVIDIA metadata format does not support volumes above 2TiB.
 .Sh EXIT STATUS
 Exit status is 0 on success, and non-zero if the command fails.
 .Sh SEE ALSO

Modified: head/sys/geom/raid/md_intel.c
==
--- head/sys/geom/raid/md_intel.c   Wed Oct 26 21:11:40 2011
(r226815)
+++ head/sys/geom/raid/md_intel.c   Wed Oct 26 21:50:10 2011
(r226816)
@@ -1172,15 +1172,18 @@ g_raid_md_taste_intel(struct g_raid_md_o
g_access(cp, -1, 0, 0);
if (meta == NULL) {
if (g_raid_aggressive_spare) {
-   if (vendor == 0x8086) {
+   if (vendor != 0x8086) {
+   G_RAID_DEBUG(1,
+   "Intel vendor mismatch 0x%04x != 0x8086",
+   vendor);
+   } else if (pp->mediasize / pp->sectorsize > UINT32_MAX) 
{
+   G_RAID_DEBUG(1,
+   "Intel disk '%s' is too big.", pp->name);
+   } else {
G_RAID_DEBUG(1,
"No Intel metadata, forcing spare.");
spare = 2;
goto search;
-   } else {
-   G_RAID_DEBUG(1,
-   "Intel vendor mismatch 0x%04x != 0x8086",
-   vendor);
}
}
return (G_RAID_MD_TASTE_FAIL);
@@ -1194,9 +1197,9 @@ g_raid_md_taste_intel(struct g_raid_md_o
}
if (meta->disk[disk_pos].sectors !=
(pp->mediasize / pp->sectorsize)) {
-   G_RAID_DEBUG(1, "Intel size mismatch %u != %u",
-   meta->disk[disk_pos].sectors,
-   (u_int)(pp->mediasize / pp->sectorsize));
+   G_RAID_DEBUG(1, "Intel size mismatch %ju != %ju",
+   (off_t)meta->disk[disk_pos].sectors,
+   (off_t)(pp->mediasize / pp->sectorsize));
goto fail1;
}
 
@@ -1449,6 +1452,13 @@ g_raid_md_ctl_intel(struct g_raid_md_obj
cp->private = disk;
g_topology_unlock();
 
+   if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
+   gctl_error(req,
+   "Disk '%s' is too big.", diskname);
+   error = -8;
+   break;
+   }
+
error = g_raid_md_get_label(cp,
&pd->pd_disk_meta.serial[0], INTEL_SERIAL_LEN);
if (error != 0) {
@@ -1940,6 +1950,14 @@ g_raid_md_ctl_intel(struct g_raid_md_obj
pp = cp->provider;
g_topology_unlock();
 
+   if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
+   gctl_error(req,
+   "Disk '%s' is too big.", diskname);
+   g_raid_kill_consumer(sc, cp);
+   error = -8;
+   break;
+   }
+
/* Read disk serial. */
error = g_raid_md_get_label(cp,
&serial[0], INTEL_SERIAL_LEN);

Modified: head/sys/geom/raid/md_nvidia.c
==
--- head/sys/geom/raid/md_nvidia.c  Wed Oct 26 21:11:40 20

Re: svn commit: r226405 - in stable/9: . etc/defaults lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf

2011-10-26 Thread Sergey Kandaurov
On 27 October 2011 00:05, Ken Smith  wrote:
> On Tue, 2011-10-25 at 23:22 +0400, Sergey Kandaurov wrote:
>> In 8-STABLE (and 8.2) both KDB and KDB_TRACE present in GENERIC
>> kernels (added in r214326, I guess they are needed for printing a stack
>> trace on panic). Were these options removed intentionally in this commit?
>
> Depends on what you mean by intentionally.  I forgot about the panic
> stack trace thing.  So KDB and KDB_TRACE sitting in the section of
> stuff that's normally removed didn't trigger a warning bell as I was
> doing r226405.

Err.. Sorry, should be rather read as "unintentionally" in my email.

> I've fixed stable/9.  And I'll adjust head shortly to try and avoid
> having this happen again for 10.0 by moving them out of the chunk of
> stuff that's supposed to be removed...

Thank you very much.

-- 
wbr,
pluknet
___
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: r226405 - in stable/9: . etc/defaults lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf

2011-10-26 Thread Ken Smith
On Thu, 2011-10-27 at 02:12 +0400, Sergey Kandaurov wrote:
> On 27 October 2011 00:05, Ken Smith  wrote:
> > On Tue, 2011-10-25 at 23:22 +0400, Sergey Kandaurov wrote:
> >> In 8-STABLE (and 8.2) both KDB and KDB_TRACE present in GENERIC
> >> kernels (added in r214326, I guess they are needed for printing a stack
> >> trace on panic). Were these options removed intentionally in this commit?
> >
> > Depends on what you mean by intentionally.  I forgot about the panic
> > stack trace thing.  So KDB and KDB_TRACE sitting in the section of
> > stuff that's normally removed didn't trigger a warning bell as I was
> > doing r226405.
> 
> Err.. Sorry, should be rather read as "unintentionally" in my email.

My turn to say sorry.  I should have had a smiley after the first
sentence in my reply.  :-)

-- 
Ken Smith
- From there to here, from here to  |   kensm...@buffalo.edu
  there, funny things are everywhere.   |
  - Theodor Geisel  |


signature.asc
Description: This is a digitally signed message part


svn commit: r226818 - head/sys/ia64/conf

2011-10-26 Thread Ken Smith
Author: kensmith
Date: Wed Oct 26 22:28:28 2011
New Revision: 226818
URL: http://svn.freebsd.org/changeset/base/226818

Log:
  Move the debugging support to its own section.  This matches what is
  in the other architectures' GENERIC and makes removing it at the point
  we're creating a new stable branch a bit easier.
  
  Discussed with:   marcel

Modified:
  head/sys/ia64/conf/GENERIC

Modified: head/sys/ia64/conf/GENERIC
==
--- head/sys/ia64/conf/GENERIC  Wed Oct 26 21:54:10 2011(r226817)
+++ head/sys/ia64/conf/GENERIC  Wed Oct 26 22:28:28 2011(r226818)
@@ -28,17 +28,11 @@ makeoptions DEBUG=-g# Build kernel with
 optionsAUDIT   # Security event auditing
 optionsCD9660  # ISO 9660 Filesystem
 optionsCOMPAT_FREEBSD7 # Compatible with FreeBSD7
-optionsDDB # Support DDB
-optionsDEADLKRES   # Enable the deadlock resolver
 optionsFFS # Berkeley Fast Filesystem
-optionsGDB # Support remote GDB
 optionsGEOM_LABEL  # Provides labelization
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
 optionsINET# InterNETworking
 optionsINET6   # IPv6 communications protocols
-optionsINVARIANTS  # Enable calls of extra sanity checking
-optionsINVARIANT_SUPPORT # required by INVARIANTS
-optionsKDB # Enable kernel debugger support
 optionsKTRACE  # ktrace(1) syscall trace support
 optionsMAC # TrustedBSD MAC Framework
 optionsMD_ROOT # MD usable as root device
@@ -64,9 +58,17 @@ options  SYSVSHM # SYSV-style shared me
 optionsUFS_ACL # Support for access control lists
 optionsUFS_DIRHASH # Hash-based directory lookup scheme
 optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+options_KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions
+
+# Debugging for use in -current
+optionsKDB # Enable kernel debugger support
+optionsDDB # Support DDB
+optionsGDB # Support remote GDB
+optionsDEADLKRES   # Enable the deadlock resolver
+optionsINVARIANTS  # Enable calls of extra sanity checking
+optionsINVARIANT_SUPPORT # required by INVARIANTS
 optionsWITNESS # Enable checks to detect deadlocks and cycles
 optionsWITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
-options_KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions
 optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones
 
 # Various "busses"
___
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: r226819 - in stable/9/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf

2011-10-26 Thread Ken Smith
Author: kensmith
Date: Wed Oct 26 23:05:59 2011
New Revision: 226819
URL: http://svn.freebsd.org/changeset/base/226819

Log:
  Fix whitespace nit.  "options", not "options".
  
  Submitted by: Matthew Fleming 
  Pointy hat:   me
  Approved by:  re (implicit)

Modified:
  stable/9/sys/amd64/conf/GENERIC
  stable/9/sys/i386/conf/GENERIC
  stable/9/sys/ia64/conf/GENERIC
  stable/9/sys/pc98/conf/GENERIC
  stable/9/sys/powerpc/conf/GENERIC
  stable/9/sys/sparc64/conf/GENERIC

Modified: stable/9/sys/amd64/conf/GENERIC
==
--- stable/9/sys/amd64/conf/GENERIC Wed Oct 26 22:28:28 2011
(r226818)
+++ stable/9/sys/amd64/conf/GENERIC Wed Oct 26 23:05:59 2011
(r226819)
@@ -64,8 +64,8 @@ options   MAC # TrustedBSD MAC 
Framewor
 #options   KDTRACE_FRAME   # Ensure frames are compiled in
 #options   KDTRACE_HOOKS   # Kernel DTrace hooks
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
-optionsKDB # Kernel debugger related code
-optionsKDB_TRACE   # Print a stack trace for a 
panic
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a panic
 
 # Make an SMP-capable kernel by default
 optionsSMP # Symmetric MultiProcessor Kernel

Modified: stable/9/sys/i386/conf/GENERIC
==
--- stable/9/sys/i386/conf/GENERIC  Wed Oct 26 22:28:28 2011
(r226818)
+++ stable/9/sys/i386/conf/GENERIC  Wed Oct 26 23:05:59 2011
(r226819)
@@ -64,8 +64,8 @@ options   AUDIT   # Security event auditi
 optionsMAC # TrustedBSD MAC Framework
 #options   KDTRACE_HOOKS   # Kernel DTrace hooks
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
-optionsKDB # Kernel debugger related code
-optionsKDB_TRACE   # Print a stack trace for a 
panic
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a panic
 
 # To make an SMP kernel, the next two lines are needed
 optionsSMP # Symmetric MultiProcessor Kernel

Modified: stable/9/sys/ia64/conf/GENERIC
==
--- stable/9/sys/ia64/conf/GENERIC  Wed Oct 26 22:28:28 2011
(r226818)
+++ stable/9/sys/ia64/conf/GENERIC  Wed Oct 26 23:05:59 2011
(r226819)
@@ -59,8 +59,8 @@ options   UFS_ACL # Support for access c
 optionsUFS_DIRHASH # Hash-based directory lookup scheme
 optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
 options_KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B RT extensions
-optionsKDB # Kernel debugger related code
-optionsKDB_TRACE   # Print a stack trace for a panic
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a panic
 
 # Various "busses"
 device firewire# FireWire bus code

Modified: stable/9/sys/pc98/conf/GENERIC
==
--- stable/9/sys/pc98/conf/GENERIC  Wed Oct 26 22:28:28 2011
(r226818)
+++ stable/9/sys/pc98/conf/GENERIC  Wed Oct 26 23:05:59 2011
(r226819)
@@ -65,8 +65,8 @@ options   HWPMC_HOOKS # Necessary kernel
 optionsAUDIT   # Security event auditing
 optionsMAC # TrustedBSD MAC Framework
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
-optionsKDB # Kernel debugger related code
-optionsKDB_TRACE   # Print a stack trace for a 
panic
+optionsKDB # Kernel debugger related code
+optionsKDB_TRACE   # Print a stack trace for a panic
 
 # To make an SMP kernel, the next two lines are needed
 #options   SMP # Symmetric MultiProcessor Kernel

Modified: stable/9/sys/powerpc/conf/GENERIC
==
--- stable/9/sys/powerpc/conf/GENERIC   Wed Oct 26 22:28:28 2011
(r226818)
+++ stable/9/sys/powerpc/conf/GENERIC   Wed Oct 26 23:05:59 2011
(r226819)
@@ -66,8 +66,8 @@ options   HWPMC_HOOKS # Necessary kernel
 optionsAUDIT   # Security event auditing
 optionsMAC # TrustedBSD MAC Framework
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
-options   

svn commit: r226820 - head/sys/dev/bge

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Wed Oct 26 23:22:32 2011
New Revision: 226820
URL: http://svn.freebsd.org/changeset/base/226820

Log:
  Offset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with
  BGE_RX_CPU_EVENT for readability.
  Additionally define BGE_TX_CPU_EVENT for TX-RSIC event register(BCM570[0-4] 
only).

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Wed Oct 26 23:05:59 2011(r226819)
+++ head/sys/dev/bge/if_bge.c   Wed Oct 26 23:22:32 2011(r226820)
@@ -1363,11 +1363,11 @@ bge_stop_fw(struct bge_softc *sc)
 
if (sc->bge_asf_mode) {
bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_PAUSE);
-   CSR_WRITE_4(sc, BGE_CPU_EVENT,
-   CSR_READ_4(sc, BGE_CPU_EVENT) | (1 << 14));
+   CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
+   CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14));
 
for (i = 0; i < 100; i++ ) {
-   if (!(CSR_READ_4(sc, BGE_CPU_EVENT) & (1 << 14)))
+   if (!(CSR_READ_4(sc, BGE_RX_CPU_EVENT) & (1 << 14)))
break;
DELAY(10);
}
@@ -4104,8 +4104,8 @@ bge_asf_driver_up(struct bge_softc *sc)
BGE_FW_DRV_ALIVE);
bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3);
-   CSR_WRITE_4(sc, BGE_CPU_EVENT,
-   CSR_READ_4(sc, BGE_CPU_EVENT) | (1 << 14));
+   CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
+   CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14));
}
}
 }

Modified: head/sys/dev/bge/if_bgereg.h
==
--- head/sys/dev/bge/if_bgereg.hWed Oct 26 23:05:59 2011
(r226819)
+++ head/sys/dev/bge/if_bgereg.hWed Oct 26 23:22:32 2011
(r226820)
@@ -1878,7 +1878,8 @@
 #defineBGE_MODE_CTL0x6800
 #defineBGE_MISC_CFG0x6804
 #defineBGE_MISC_LOCAL_CTL  0x6808
-#defineBGE_CPU_EVENT   0x6810
+#defineBGE_RX_CPU_EVENT0x6810
+#defineBGE_TX_CPU_EVENT0x6820
 #defineBGE_EE_ADDR 0x6838
 #defineBGE_EE_DATA 0x683C
 #defineBGE_EE_CTL  0x6840
___
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: r226665 - head/sys/conf

2011-10-26 Thread Alexander Best
On Thu Oct 27 11, Bruce Evans wrote:
> On Wed, 26 Oct 2011, Alexander Best wrote:
> 
> >On Sun Oct 23 11, Robert Millan wrote:
> >>Log:
> >>  Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are 
> >>  only
> >>  used with FreeBSD GCC.
> >
> >any reason -f* flags were added to CWARNFLAGS in the first place? they 
> >aren't
> >really warnings, are they, so adding them to CFLAGS makes more sense imo.
> 
> -fformat-extensions is added to CWARNFLAGS because it is a modifier
> to -Wformat.  It was originally (in bsd.kern.mk 1.10) placed immediately
> after -Wformat in CWARNFLAGS, and was added in the same commit as
> -Wformat (since -Wformat could not be added before -fformat-extensions
> was developed to allow it to be added without breaking kernel builds).
> This is partially explained in the commit message.  This was obfuscated
> (in bsd.kern.mk 1.14) by removing -Wformat.  1.13 had made -Wformat
> redundant by adding -Wall.  This is not explained in the commit message.
> 
> >diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
> >index a0a595f..91560e0 100644
> >--- a/sys/conf/kern.mk
> >+++ b/sys/conf/kern.mk
> >@@ -3,10 +3,9 @@
> >#
> ># Warning flags for compiling the kernel and components of the kernel:
> >#
> >-CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs 
> >-Wstrict-prototypes \
> >-   -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
> >-   -Wundef -Wno-pointer-sign -fformat-extensions \
> >-   -Wmissing-include-dirs -fdiagnostics-show-option
> >+CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs 
> >-Wstrict-prototypes\
> >+   -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual\
> >+   -Wundef -Wno-pointer-sign -Wmissing-include-dirs
> 
> Neither of these should be moved, except within CWARNFLAGS.
> 
> For -fformat-extensions, see above.
> 
> -fdiagnostics-show option is even more closely related with warning flags
> and even better documented in its commit message, as you should know since
> you submitted it :-).  Actually, the commit message seems to tie it
> more closely with warning flags than it actually is -- it says that
> "it will report which -W* flag was responsible for triggering a certain
> warning", while gcc(1) says that it is for reporting of general diagnostics.
> 
> -Wformat and -fformat-extensions were originally at the end of CWARNFLAGS.
> -fformat-extensions wasn't moved to be with -Wall when that was added.
> Keeping it at the end is reasonable.  But it shouldn't be in the middle
> of random -W flags like it now is.  All of the -W options are unfortunately
> unsorted by adding them to the end of the unsorted list.  Some old versions
> even added -std=c99 to the end.  Since -std has nothing to do with warning
> flags, that was nonsense and has been fixed.
> 
> -fdiagnostics-show-option controls all the warning flags, so it would be
> better placed at the beginning.

thanks for the detailed explanation. how does the following patch look like,
which basically sorts the CWARNINGSFLAGS alphatically and semantically:

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index a0a595f..b45be2a 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -1,12 +1,15 @@
 # $FreeBSD$
 
 #
-# Warning flags for compiling the kernel and components of the kernel:
+# Warning flags for compiling the kernel and components of the kernel.
+# Additionally enable FreeBSD kernel-specific printf format specifiers
+# and instruct gcc to enable some diagnostics, which make it easier to
+# pinpoint tinderbox failures.
 #
-CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-   -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-   -Wundef -Wno-pointer-sign -fformat-extensions \
-   -Wmissing-include-dirs -fdiagnostics-show-option
+CWARNFLAGS?=   -fdiagnostics-show-option -Wall -Wcast-qual -Winline\
+   -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs\
+   -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wundef\
+   -Wno-pointer-sign -fformat-extensions
 #
 # The following flags are next up for working on:
 #  -Wextra
@@ -83,7 +86,7 @@ CFLAGS+=  -mno-sse
 .else
 CFLAGS+=   -mno-aes -mno-avx
 .endif
-CFLAGS+=   -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \
+CFLAGS+=   -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float\
-fno-asynchronous-unwind-tables
 INLINE_LIMIT?= 8000
 .endif

a flag i am unsure about is "-Wno-pointer-sign". one could argue that it should
come right after "-Wpointer-arith", since we use it to back out a certain
warning that is being implied by it. on the other hand one could argue that
it's more intuitive to first enable *all* warnings via -W* flags and then
afterwards set the -Wno* flags. although currently there's only a single -Wno*
flag in CWARNFLAGS, there might be more in the future. that way we would have
all those -

svn commit: r226821 - head/sys/dev/bge

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Wed Oct 26 23:52:02 2011
New Revision: 226821
URL: http://svn.freebsd.org/changeset/base/226821

Log:
  SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware
  about the various driver events like load, unload, reset, suspend,
  restart, and ioctl operations.
  Define driver's event rather than using hard-coded values.  We don't
  still send suspend/resume event to firmware.
  
  Previously bge(4) used BGE_SDI_STATUS to send events. Because driver
  has to access firmware mail box to inform current state, using
  BGE_SDI_STATUS register was wrong. The end result was the same as
  BGE_SDI_STATUS is 0x0C04.
  
  No functional changes.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==
--- head/sys/dev/bge/if_bge.c   Wed Oct 26 23:22:32 2011(r226820)
+++ head/sys/dev/bge/if_bge.c   Wed Oct 26 23:52:02 2011(r226821)
@@ -1314,10 +1314,12 @@ bge_sig_pre_reset(struct bge_softc *sc, 
if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) {
switch (type) {
case BGE_RESET_START:
-   bge_writemem_ind(sc, BGE_SDI_STATUS, 0x1); /* START */
+   bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+   BGE_FW_DRV_STATE_START);
break;
case BGE_RESET_STOP:
-   bge_writemem_ind(sc, BGE_SDI_STATUS, 0x2); /* UNLOAD */
+   bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+   BGE_FW_DRV_STATE_UNLOAD);
break;
}
}
@@ -1330,11 +1332,13 @@ bge_sig_post_reset(struct bge_softc *sc,
if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) {
switch (type) {
case BGE_RESET_START:
-   bge_writemem_ind(sc, BGE_SDI_STATUS, 0x8001);
+   bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+   BGE_FW_DRV_STATE_START_DONE);
/* START DONE */
break;
case BGE_RESET_STOP:
-   bge_writemem_ind(sc, BGE_SDI_STATUS, 0x8002);
+   bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+   BGE_FW_DRV_STATE_UNLOAD_DONE);
break;
}
}
@@ -1347,10 +1351,12 @@ bge_sig_legacy(struct bge_softc *sc, int
if (sc->bge_asf_mode) {
switch (type) {
case BGE_RESET_START:
-   bge_writemem_ind(sc, BGE_SDI_STATUS, 0x1); /* START */
+   bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+   BGE_FW_DRV_STATE_START);
break;
case BGE_RESET_STOP:
-   bge_writemem_ind(sc, BGE_SDI_STATUS, 0x2); /* UNLOAD */
+   bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+   BGE_FW_DRV_STATE_UNLOAD);
break;
}
}

Modified: head/sys/dev/bge/if_bgereg.h
==
--- head/sys/dev/bge/if_bgereg.hWed Oct 26 23:22:32 2011
(r226820)
+++ head/sys/dev/bge/if_bgereg.hWed Oct 26 23:52:02 2011
(r226821)
@@ -77,6 +77,7 @@
 #defineBGE_SRAM_FW_CMD_MB  0x0B78
 #defineBGE_SRAM_FW_CMD_LEN_MB  0x0B7C
 #defineBGE_SRAM_FW_CMD_DATA_MB 0x0B80
+#defineBGE_SRAM_FW_DRV_STATE_MB0x0C04
 #defineBGE_SRAM_MAC_ADDR_HIGH_MB   0x0C14
 #defineBGE_SRAM_MAC_ADDR_LOW_MB0x0C18
 #defineBGE_SOFTWARE_GENCOMM_END0x0FFF
@@ -93,6 +94,13 @@
 #defineBGE_FW_DRV_ALIVE0x0001
 #defineBGE_FW_PAUSE0x0002
 
+#defineBGE_FW_DRV_STATE_START  0x0001
+#defineBGE_FW_DRV_STATE_START_DONE 0x8001
+#defineBGE_FW_DRV_STATE_UNLOAD 0x0002
+#defineBGE_FW_DRV_STATE_UNLOAD_DONE0x8002
+#defineBGE_FW_DRV_STATE_WOL0x0003
+#defineBGE_FW_DRV_STATE_SUSPEND0x0004
+
 /* Mappings for internal memory configuration */
 #defineBGE_STD_RX_RINGS0x6000
 #defineBGE_STD_RX_RINGS_END0x6FFF
___
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: r226822 - stable/9/sys/dev/dc

2011-10-26 Thread Pyun YongHyeon
Author: yongari
Date: Thu Oct 27 02:36:13 2011
New Revision: 226822
URL: http://svn.freebsd.org/changeset/base/226822

Log:
  MFC r226695-226696:
  r226695:
Fix a regression introduced in r218832. For TX status check, driver
should use a TX list DMA tag.
  
  r226696:
Add missing bus_dmamap_sync() in setup frame transmit.
  
  Approved by:  re (kensmith)

Modified:
  stable/9/sys/dev/dc/if_dc.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/dc/if_dc.c
==
--- stable/9/sys/dev/dc/if_dc.c Wed Oct 26 23:52:02 2011(r226821)
+++ stable/9/sys/dev/dc/if_dc.c Thu Oct 27 02:36:13 2011(r226822)
@@ -1136,6 +1136,8 @@ dc_setfilt_21143(struct dc_softc *sc)
sp[41] = DC_SP_MAC(eaddr[2]);
 
sframe->dc_status = htole32(DC_TXSTAT_OWN);
+   bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+   BUS_DMASYNC_PREWRITE);
bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
CSR_WRITE_4(sc, DC_TXSTART, 0x);
 
@@ -1342,6 +1344,8 @@ dc_setfilt_xircom(struct dc_softc *sc)
DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON);
DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON);
sframe->dc_status = htole32(DC_TXSTAT_OWN);
+   bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+   BUS_DMASYNC_PREWRITE);
bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
CSR_WRITE_4(sc, DC_TXSTART, 0x);
 
@@ -2970,7 +2974,7 @@ dc_txeof(struct dc_softc *sc)
 * Go through our tx list and free mbufs for those
 * frames that have been transmitted.
 */
-   bus_dmamap_sync(sc->dc_rx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
+   bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
BUS_DMASYNC_POSTWRITE);
setup = 0;
for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod;
___
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: r226824 - in head/sys: kern vm

2011-10-26 Thread Alan Cox
Author: alc
Date: Thu Oct 27 02:52:24 2011
New Revision: 226824
URL: http://svn.freebsd.org/changeset/base/226824

Log:
  contigmalloc(9) and contigfree(9) are now implemented in terms of other
  more general VM system interfaces.  So, their implementation can now
  reside in kern_malloc.c alongside the other functions that are declared
  in malloc.h.

Modified:
  head/sys/kern/kern_malloc.c
  head/sys/vm/vm_contig.c

Modified: head/sys/kern/kern_malloc.c
==
--- head/sys/kern/kern_malloc.c Thu Oct 27 02:40:43 2011(r226823)
+++ head/sys/kern/kern_malloc.c Thu Oct 27 02:52:24 2011(r226824)
@@ -408,6 +408,43 @@ malloc_type_freed(struct malloc_type *mt
 }
 
 /*
+ * contigmalloc:
+ *
+ * Allocate a block of physically contiguous memory.
+ *
+ * If M_NOWAIT is set, this routine will not block and return NULL if
+ * the allocation fails.
+ */
+void *
+contigmalloc(unsigned long size, struct malloc_type *type, int flags,
+vm_paddr_t low, vm_paddr_t high, unsigned long alignment,
+unsigned long boundary)
+{
+   void *ret;
+
+   ret = (void *)kmem_alloc_contig(kernel_map, size, flags, low, high,
+   alignment, boundary, VM_MEMATTR_DEFAULT);
+   if (ret != NULL)
+   malloc_type_allocated(type, round_page(size));
+   return (ret);
+}
+
+/*
+ * contigfree:
+ *
+ * Free a block of memory allocated by contigmalloc.
+ *
+ * This routine may not block.
+ */
+void
+contigfree(void *addr, unsigned long size, struct malloc_type *type)
+{
+
+   kmem_free(kernel_map, (vm_offset_t)addr, size);
+   malloc_type_freed(type, round_page(size));
+}
+
+/*
  * malloc:
  *
  * Allocate a block of memory.

Modified: head/sys/vm/vm_contig.c
==
--- head/sys/vm/vm_contig.c Thu Oct 27 02:40:43 2011(r226823)
+++ head/sys/vm/vm_contig.c Thu Oct 27 02:52:24 2011(r226824)
@@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -334,25 +333,6 @@ contigmapping(vm_map_t map, vm_size_t si
return (addr);
 }
 
-void *
-contigmalloc(
-   unsigned long size, /* should be size_t here and for malloc() */
-   struct malloc_type *type,
-   int flags,
-   vm_paddr_t low,
-   vm_paddr_t high,
-   unsigned long alignment,
-   unsigned long boundary)
-{
-   void *ret;
-
-   ret = (void *)kmem_alloc_contig(kernel_map, size, flags, low, high,
-   alignment, boundary, VM_MEMATTR_DEFAULT);
-   if (ret != NULL)
-   malloc_type_allocated(type, round_page(size));
-   return (ret);
-}
-
 vm_offset_t
 kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low,
 vm_paddr_t high, unsigned long alignment, unsigned long boundary,
@@ -382,11 +362,3 @@ retry:
}
return (ret);
 }
-
-void
-contigfree(void *addr, unsigned long size, struct malloc_type *type)
-{
-
-   kmem_free(kernel_map, (vm_offset_t)addr, size);
-   malloc_type_freed(type, round_page(size));
-}
___
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"