svn commit: r272280 - head/lib/libpam/modules/pam_login_access

2014-09-29 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Sep 29 08:57:36 2014
New Revision: 272280
URL: http://svnweb.freebsd.org/changeset/base/272280

Log:
  Instead of failing when neither PAM_TTY nor PAM_RHOST are available, call
  login_access() with **unknown** as the second argument.  This will allow
  ALL rules to match.
  
  Reported by:  Tim Daneliuk tun...@tundraware.com
  Tested by:dim@
  PR:   83099 193927
  MFC after:3 days

Modified:
  head/lib/libpam/modules/pam_login_access/pam_login_access.c

Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c
==
--- head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 
01:17:42 2014(r272279)
+++ head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 
08:57:36 2014(r272280)
@@ -94,8 +94,10 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
PAM_VERBOSE_ERROR(%s is not allowed to log in on %s,
user, tty);
} else {
-   PAM_VERBOSE_ERROR(PAM_RHOST or PAM_TTY required);
-   return (PAM_AUTHINFO_UNAVAIL);
+   PAM_LOG(Checking login.access for user %s, user);
+   if (login_access(user, ***unknown***) != 0)
+   return (PAM_SUCCESS);
+   PAM_VERBOSE_ERROR(%s is not allowed to log in, user);
}
 
return (PAM_AUTH_ERR);
___
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: r272280 - head/lib/libpam/modules/pam_login_access

2014-09-29 Thread Bjoern A. Zeeb

On 29 Sep 2014, at 08:57 , Dag-Erling Smørgrav d...@freebsd.org wrote:

 Author: des
 Date: Mon Sep 29 08:57:36 2014
 New Revision: 272280
 URL: http://svnweb.freebsd.org/changeset/base/272280
 
 Log:
  Instead of failing when neither PAM_TTY nor PAM_RHOST are available, call
  login_access() with **unknown** as the second argument.  This will allow
  “ALL rules to match.
 


/scratch/tmp/bz/head.svn/lib/libpam/modules/pam_login_access/pam_login_access.c:
 In function 'pam_sm_acct_mgmt':
/scratch/tmp/bz/head.svn/lib/libpam/modules/pam_login_access/pam_login_access.c:97:
 warning: format '%s' expects type 'char *', but argument 4 has type 'const 
void *'



  Reported by: Tim Daneliuk tun...@tundraware.com
  Tested by:   dim@
  PR:  83099 193927
  MFC after:   3 days
 
 Modified:
  head/lib/libpam/modules/pam_login_access/pam_login_access.c
 
 Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c
 ==
 --- head/lib/libpam/modules/pam_login_access/pam_login_access.c   Mon Sep 
 29 01:17:42 2014(r272279)
 +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c   Mon Sep 
 29 08:57:36 2014(r272280)
 @@ -94,8 +94,10 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
   PAM_VERBOSE_ERROR(%s is not allowed to log in on %s,
   user, tty);
   } else {
 - PAM_VERBOSE_ERROR(PAM_RHOST or PAM_TTY required);
 - return (PAM_AUTHINFO_UNAVAIL);
 + PAM_LOG(Checking login.access for user %s, user);
 + if (login_access(user, ***unknown***) != 0)
 + return (PAM_SUCCESS);
 + PAM_VERBOSE_ERROR(%s is not allowed to log in, user);
   }
 
   return (PAM_AUTH_ERR);
 

— 
Bjoern A. Zeeb Come on. Learn, goddamn it., WarGames, 1983

___
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: r272281 - head/lib/libpam/modules/pam_login_access

2014-09-29 Thread Bjoern A. Zeeb
Author: bz
Date: Mon Sep 29 10:36:14 2014
New Revision: 272281
URL: http://svnweb.freebsd.org/changeset/base/272281

Log:
  Hopefully fix build breakage with gcc passing void * instead of char *
  to %s format string after r272280.
  
  PR:   83099 193927
  MFC after:3 days
  X-MFC with:   r272280

Modified:
  head/lib/libpam/modules/pam_login_access/pam_login_access.c

Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c
==
--- head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 
08:57:36 2014(r272280)
+++ head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 
10:36:14 2014(r272281)
@@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
PAM_VERBOSE_ERROR(%s is not allowed to log in on %s,
user, tty);
} else {
-   PAM_LOG(Checking login.access for user %s, user);
+   PAM_LOG(Checking login.access for user %s,
+   (const char *)user);
if (login_access(user, ***unknown***) != 0)
return (PAM_SUCCESS);
PAM_VERBOSE_ERROR(%s is not allowed to log in, user);
___
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: r272281 - head/lib/libpam/modules/pam_login_access

2014-09-29 Thread Dimitry Andric
On 29 Sep 2014, at 12:36, Bjoern A. Zeeb b...@freebsd.org wrote:
 Author: bz
 Date: Mon Sep 29 10:36:14 2014
 New Revision: 272281
 URL: http://svnweb.freebsd.org/changeset/base/272281
 
 Log:
  Hopefully fix build breakage with gcc passing void * instead of char *
  to %s format string after r272280.
 
  PR:  83099 193927
  MFC after:   3 days
  X-MFC with:  r272280
 
 Modified:
  head/lib/libpam/modules/pam_login_access/pam_login_access.c
 
 Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c
 ==
 --- head/lib/libpam/modules/pam_login_access/pam_login_access.c   Mon Sep 
 29 08:57:36 2014(r272280)
 +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c   Mon Sep 
 29 10:36:14 2014(r272281)
 @@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
   PAM_VERBOSE_ERROR(%s is not allowed to log in on %s,
   user, tty);
   } else {
 - PAM_LOG(Checking login.access for user %s, user);
 + PAM_LOG(Checking login.access for user %s,
 + (const char *)user);
   if (login_access(user, ***unknown***) != 0)
   return (PAM_SUCCESS);
   PAM_VERBOSE_ERROR(%s is not allowed to log in, user);
 

Just a few lines after the one you fixed it accesses the same variable
again.  Why doesn't it warn there?  And why is 'user' not a char * to
begin with? :)

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r272281 - head/lib/libpam/modules/pam_login_access

2014-09-29 Thread Bjoern A. Zeeb

On 29 Sep 2014, at 11:10 , Dimitry Andric d...@freebsd.org wrote:

 On 29 Sep 2014, at 12:36, Bjoern A. Zeeb b...@freebsd.org wrote:
 Author: bz
 Date: Mon Sep 29 10:36:14 2014
 New Revision: 272281
 URL: http://svnweb.freebsd.org/changeset/base/272281
 
 Log:
 Hopefully fix build breakage with gcc passing void * instead of char *
 to %s format string after r272280.
 
 PR:  83099 193927
 MFC after:   3 days
 X-MFC with:  r272280
 
 Modified:
 head/lib/libpam/modules/pam_login_access/pam_login_access.c
 
 Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c
 ==
 --- head/lib/libpam/modules/pam_login_access/pam_login_access.c  Mon Sep 
 29 08:57:36 2014(r272280)
 +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c  Mon Sep 
 29 10:36:14 2014(r272281)
 @@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
  PAM_VERBOSE_ERROR(%s is not allowed to log in on %s,
  user, tty);
  } else {
 -PAM_LOG(Checking login.access for user %s, user);
 +PAM_LOG(Checking login.access for user %s,
 +(const char *)user);
  if (login_access(user, ***unknown***) != 0)
  return (PAM_SUCCESS);
  PAM_VERBOSE_ERROR(%s is not allowed to log in, user);
 
 
 Just a few lines after the one you fixed it accesses the same variable
 again.  Why doesn't it warn there?  And why is 'user' not a char * to
 begin with? :)

For the latter ask des.

the PAM_VERBOSE_ERROR goes into a function which (if remembering correctly) 
does the va_start and asprintf rather than just being a macro to printf.   The 
arguments are not casted anywhere to that macro but I am, again, sure des will 
have an opinion on it;-)

— 
Bjoern A. Zeeb Come on. Learn, goddamn it., WarGames, 1983

___
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: r271241 - head/lib/libnv

2014-09-29 Thread Pawel Jakub Dawidek
On Sun, Sep 07, 2014 at 10:56:57PM +, Garrett Cooper wrote:
 Author: ngie
 Date: Sun Sep  7 22:56:57 2014
 New Revision: 271241
 URL: http://svnweb.freebsd.org/changeset/base/271241
 
 Log:
   Include src.opts.mk after SHLIBDIR has been defined so libnv is installed to
   /lib , not /usr/lib

Don't forget to add /usr/lib/libnv* to ObsoleteFiles.inc.

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://mobter.com
___
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: r272281 - head/lib/libpam/modules/pam_login_access

2014-09-29 Thread Bruce Evans

On Mon, 29 Sep 2014, Bjoern A. Zeeb wrote:



On 29 Sep 2014, at 11:10 , Dimitry Andric d...@freebsd.org wrote:


On 29 Sep 2014, at 12:36, Bjoern A. Zeeb b...@freebsd.org wrote:

...
Log:
Hopefully fix build breakage with gcc passing void * instead of char *
to %s format string after r272280.

Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c
==
--- head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 
08:57:36 2014(r272280)
+++ head/lib/libpam/modules/pam_login_access/pam_login_access.c Mon Sep 29 
10:36:14 2014(r272281)
@@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
PAM_VERBOSE_ERROR(%s is not allowed to log in on %s,
user, tty);
} else {
-   PAM_LOG(Checking login.access for user %s, user);
+   PAM_LOG(Checking login.access for user %s,
+   (const char *)user);
if (login_access(user, ***unknown***) != 0)
return (PAM_SUCCESS);
PAM_VERBOSE_ERROR(%s is not allowed to log in, user);



Just a few lines after the one you fixed it accesses the same variable
again.  Why doesn't it warn there?  And why is 'user' not a char * to
begin with? :)


For the latter ask des.

the PAM_VERBOSE_ERROR goes into a function which (if remembering correctly) 
does the va_start and asprintf rather than just being a macro to printf.   The 
arguments are not casted anywhere to that macro but I am, again, sure des will 
have an opinion on it;-)


Just another bug.  PAM_LOG() expands to a call to a function that is
declared as __printflike() (but with a worse spelling).
PAM_VERBOSE_ERROR() expands to a call to a function that is missing
this declaration.

Other bugs in PAM_VERBOSE_ERROR()'s function include not checking if
asprintf() succeeded.  malloc() failures can't happen, but it is bad
to do dynamic allocation in an error-reporting routine.  All uses of
PAM_VERBOSE_ERROR() except 2 visible in the patch use a format with no
args, so there aren't many print format errors to fix.  asprintf()
is a heavyweight method for constructing a format for printing these
args (and some others that are automatically added).

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: r272282 - head/share/mk

2014-09-29 Thread Will Andrews
Author: will
Date: Mon Sep 29 15:05:23 2014
New Revision: 272282
URL: http://svnweb.freebsd.org/changeset/base/272282

Log:
  Search for the nearest PORTSDIR where Mk/bsd.ports.mk exists, from .CURDIR.
  This will only take effect if PORTSDIR is not set, as previously supported.
  
  Use .if exists(), for four specific possibilities relative to .CURDIR:
  ., .., ../.., and ../../..  The fourth possibility is primarily in case
  ports ever grows a third level.  If none of these paths exist, fall back to
  the old default of /usr/ports.
  
  This removes the need to set PORTSDIR explicitly (or via wrapper script) if
  one is running out of a ports tree that is not in /usr/ports, but in a
  home directory.
  
  Reviewed by:  bapt, bdrewery (older version)
  CR:   D799
  MFC after:1 week
  Sponsored by: Spectra Logic

Modified:
  head/share/mk/bsd.port.mk
  head/share/mk/bsd.port.subdir.mk

Modified: head/share/mk/bsd.port.mk
==
--- head/share/mk/bsd.port.mk   Mon Sep 29 10:36:14 2014(r272281)
+++ head/share/mk/bsd.port.mk   Mon Sep 29 15:05:23 2014(r272282)
@@ -1,6 +1,22 @@
 # $FreeBSD$
 
-PORTSDIR?= /usr/ports
+.if !defined(PORTSDIR)
+# Autodetect if the command is being run in a ports tree that's not rooted
+# in the default /usr/ports.  The ../../.. case is in case ports ever grows
+# a third level.
+.if exists(${.CURDIR}/Mk/bsd.port.mk)
+PORTSDIR=  ${.CURDIR}
+.elif exists(${.CURDIR}/../Mk/bsd.port.mk)
+PORTSDIR=  ${.CURDIR}/..
+.elif exists(${.CURDIR}/../../Mk/bsd.port.mk)
+PORTSDIR=  ${.CURDIR}/../..
+.elif exists(${.CURDIR}/../../../Mk/bsd.port.mk)
+PORTSDIR=  ${.CURDIR}/../../..
+.else
+PORTSDIR=  /usr/ports
+.endif
+.endif
+
 BSDPORTMK?=${PORTSDIR}/Mk/bsd.port.mk
 
 # Needed to keep bsd.own.mk from reading in /etc/src.conf

Modified: head/share/mk/bsd.port.subdir.mk
==
--- head/share/mk/bsd.port.subdir.mkMon Sep 29 10:36:14 2014
(r272281)
+++ head/share/mk/bsd.port.subdir.mkMon Sep 29 15:05:23 2014
(r272282)
@@ -1,6 +1,22 @@
 # $FreeBSD$
 
-PORTSDIR?= /usr/ports
+.if !defined(PORTSDIR)
+# Autodetect if the command is being run in a ports tree that's not rooted
+# in the default /usr/ports.  The ../../.. case is in case ports ever grows
+# a third level.
+.if exists(${.CURDIR}/Mk/bsd.port.mk)
+PORTSDIR=  ${.CURDIR}
+.elif exists(${.CURDIR}/../Mk/bsd.port.mk)
+PORTSDIR=  ${.CURDIR}/..
+.elif exists(${.CURDIR}/../../Mk/bsd.port.mk)
+PORTSDIR=  ${.CURDIR}/../..
+.elif exists(${.CURDIR}/../../../Mk/bsd.port.mk)
+PORTSDIR=  ${.CURDIR}/../../..
+.else
+PORTSDIR=  /usr/ports
+.endif
+.endif
+
 BSDPORTSUBDIRMK?=  ${PORTSDIR}/Mk/bsd.port.subdir.mk
 
 .include ${BSDPORTSUBDIRMK}
___
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: r272207 - in head/games: factor primes

2014-09-29 Thread John Baldwin
On Saturday, September 27, 2014 06:00:28 AM Colin Percival wrote:
 On 09/27/14 05:52, John Baldwin wrote:
  On Saturday, September 27, 2014 09:00:39 AM Colin Percival wrote:
   #define   BIG ULONG_MAX   /* largest value will sieve */
  
  Should this be UINT64_MAX (or however that is spelled) instead of
  ULONG_MAX
  now?  (or is it even still used?  I know your change removed its use in at
  least one place.)
 
 It's not used any more.  I was resisting the urge to spend time going
 through and removing ancient history (which is why I kept ubig instead of
 changing it to uint64_t everywhere).

It's kind of misleading though as the value is wrong and the comment for it no 
longer applies.  How about this:

Index: primes.c
===
--- primes.c(revision 272281)
+++ primes.c(working copy)
@@ -169,7 +169,7 @@
 
 /*
  * read_num_buf --
- * This routine returns a number n, where 0 = n  n = BIG.
+ * This routine returns a non-negative number n
  */
 static ubig
 read_num_buf(void)
@@ -214,7 +214,7 @@
/*
 * A number of systems can not convert double values into unsigned
 * longs when the values are larger than the largest signed value.
-* We don't have this problem, so we can go all the way to BIG.
+* We don't have this problem, so we can go all the way.
 */
if (start  3) {
start = (ubig)2;
Index: primes.h
===
--- primes.h(revision 272281)
+++ primes.h(working copy)
@@ -45,7 +45,6 @@
 
 /* ubig is the type that holds a large unsigned value */
 typedef uint64_t ubig; /* must be =32 bit unsigned value */
-#defineBIG ULONG_MAX   /* largest value will sieve */
 
 /* bytes in sieve table (must be  3*5*7*11) */
 #defineTABSIZE 256*1024


-- 
John Baldwin
___
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: r272261 - head/sys/net

2014-09-29 Thread Gleb Smirnoff
On Sun, Sep 28, 2014 at 05:09:40PM +, Bjoern A. Zeeb wrote:
B Author: bz
B Date: Sun Sep 28 17:09:40 2014
B New Revision: 272261
B URL: http://svnweb.freebsd.org/changeset/base/272261
B 
B Log:
B   Move the unconditional #include of net/ifq.h to the very end of file.
B   This seems to allow us to pass a universe with either clang or gcc
B   after r272244 (and r272260) and probably makes it easier to untabgle
B   these chained #includes in the future.

Thanks, Bjoern. This is probably the least ugly solution.

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


svn commit: r272284 - head/usr.bin/systat

2014-09-29 Thread Ryan Stone
Author: rstone
Date: Mon Sep 29 17:38:50 2014
New Revision: 272284
URL: http://svnweb.freebsd.org/changeset/base/272284

Log:
  Fix integer truncation in affecting systat -ifstat
  
  The systat -ifstat command was using a u_int to store byte counters.
  With a 10Gbps or faster interface, this overflows within the default
  5 second refresh period.  Switch to using a uint64_t across the board,
  which matches the size used for all counters as of r263102.
  
  PR:   182448
  MFC after:1 week
  Sponsored by: Sandvine Inc

Modified:
  head/usr.bin/systat/ifstat.c

Modified: head/usr.bin/systat/ifstat.c
==
--- head/usr.bin/systat/ifstat.cMon Sep 29 16:24:48 2014
(r272283)
+++ head/usr.bin/systat/ifstat.cMon Sep 29 17:38:50 2014
(r272284)
@@ -68,14 +68,14 @@ struct if_stat {
struct  ifmibdata if_mib;
struct  timeval tv;
struct  timeval tv_lastchanged;
-   u_long  if_in_curtraffic;
-   u_long  if_out_curtraffic;
-   u_long  if_in_traffic_peak;
-   u_long  if_out_traffic_peak;
-   u_long  if_in_curpps;
-   u_long  if_out_curpps;
-   u_long  if_in_pps_peak;
-   u_long  if_out_pps_peak;
+   uint64_t if_in_curtraffic;
+   uint64_t if_out_curtraffic;
+   uint64_t if_in_traffic_peak;
+   uint64_t if_out_traffic_peak;
+   uint64_t if_in_curpps;
+   uint64_t if_out_curpps;
+   uint64_t if_in_pps_peak;
+   uint64_t if_out_pps_peak;
u_int   if_row; /* Index into ifmib sysctl */
int if_ypos;/* -1 if not being displayed */
u_int   display;
@@ -269,8 +269,8 @@ fetchifstat(void)
struct  if_stat *ifp = NULL;
struct  timeval tv, new_tv, old_tv;
double  elapsed = 0.0;
-   u_int   new_inb, new_outb, old_inb, old_outb = 0;
-   u_int   new_inp, new_outp, old_inp, old_outp = 0;
+   uint64_t new_inb, new_outb, old_inb, old_outb = 0;
+   uint64_t new_inp, new_outp, old_inp, old_outp = 0;
 
SLIST_FOREACH(ifp, curlist, link) {
/*
___
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: r272285 - head/sys/dev/ixl

2014-09-29 Thread Ryan Stone
Author: rstone
Date: Mon Sep 29 17:51:39 2014
New Revision: 272285
URL: http://svnweb.freebsd.org/changeset/base/272285

Log:
  Ensure that ixl_flush() uses a defined register on VFs
  
  In some code that is shared between the ixl(4) and ixlv(4) drivers,
  a macro hard-coded a register offset that was not valid on ixlv devices.
  Fix this by having each driver define a variable that contains the correct
  offset.
  
  Reviewed by:  Eric Joyner ricera10 AT gmail.com
  MFC after:3 days
  Sponsored by: Sandvine Inc

Modified:
  head/sys/dev/ixl/i40e_osdep.h
  head/sys/dev/ixl/if_ixl.c
  head/sys/dev/ixl/if_ixlv.c

Modified: head/sys/dev/ixl/i40e_osdep.h
==
--- head/sys/dev/ixl/i40e_osdep.h   Mon Sep 29 17:38:50 2014
(r272284)
+++ head/sys/dev/ixl/i40e_osdep.h   Mon Sep 29 17:51:39 2014
(r272285)
@@ -152,6 +152,7 @@ struct i40e_osdep
bus_space_tag_t mem_bus_space_tag;
bus_space_handle_t  mem_bus_space_handle;
bus_size_t  mem_bus_space_size;
+   uint32_tflush_reg;
struct device   *dev;
 };
 
@@ -208,6 +209,13 @@ wr32_osdep(struct i40e_osdep *osdep, uin
osdep-mem_bus_space_handle, reg, value);
 }
 
+static __inline void
+ixl_flush_osdep(struct i40e_osdep *osdep)
+{
+
+   rd32_osdep(osdep, osdep-flush_reg);
+}
+
 #define rd32(a, reg)   rd32_osdep((a)-back, (reg))
 #define wr32(a, reg, value)wr32_osdep((a)-back, (reg), (value))
 
@@ -221,9 +229,6 @@ wr32_osdep(struct i40e_osdep *osdep, uin
  ((struct i40e_osdep *)(a)-back)-mem_bus_space_handle, \
  reg, value))
 
-#define ixl_flush(a) (\
-   bus_space_read_4( ((struct i40e_osdep *)(a)-back)-mem_bus_space_tag, \
- ((struct i40e_osdep *)(a)-back)-mem_bus_space_handle, \
- I40E_GLGEN_STAT))
+#define ixl_flush(a)   ixl_flush_osdep((a)-back)
 
 #endif /* _I40E_OSDEP_H_ */

Modified: head/sys/dev/ixl/if_ixl.c
==
--- head/sys/dev/ixl/if_ixl.c   Mon Sep 29 17:38:50 2014(r272284)
+++ head/sys/dev/ixl/if_ixl.c   Mon Sep 29 17:51:39 2014(r272285)
@@ -2177,6 +2177,7 @@ ixl_allocate_pci_resources(struct ixl_pf
pf-osdep.mem_bus_space_handle =
rman_get_bushandle(pf-pci_mem);
pf-osdep.mem_bus_space_size = rman_get_size(pf-pci_mem);
+   pf-osdep.flush_reg = I40E_GLGEN_STAT;
pf-hw.hw_addr = (u8 *) pf-osdep.mem_bus_space_handle;
 
pf-hw.back = pf-osdep;

Modified: head/sys/dev/ixl/if_ixlv.c
==
--- head/sys/dev/ixl/if_ixlv.c  Mon Sep 29 17:38:50 2014(r272284)
+++ head/sys/dev/ixl/if_ixlv.c  Mon Sep 29 17:51:39 2014(r272285)
@@ -1137,6 +1137,7 @@ ixlv_allocate_pci_resources(struct ixlv_
sc-osdep.mem_bus_space_handle =
rman_get_bushandle(sc-pci_mem);
sc-osdep.mem_bus_space_size = rman_get_size(sc-pci_mem);
+   sc-osdep.flush_reg = I40E_VFGEN_RSTAT;
sc-hw.hw_addr = (u8 *) sc-osdep.mem_bus_space_handle;
 
sc-hw.back = sc-osdep;
___
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: r272209 - in head/sys/arm: arm include

2014-09-29 Thread Andreas Tobler

Hi Andrew,

On 27.09.14 11:57, Andrew Turner wrote:

Author: andrew
Date: Sat Sep 27 09:57:34 2014
New Revision: 272209
URL: http://svnweb.freebsd.org/changeset/base/272209

Log:
   Add machine/sysreg.h to simplify accessing the system control coprocessor
   registers and use it in the ARMv7 CPU functions.

   The sysreg.h file has been checked by hand, however it may contain errors
   with the comments on when a register was first introduced. The ARMv7 cpu
   functions have been checked by compiling both the previous and this version
   and comparing the md5 of the object files.

   Submitted by:Svatopluk Kraus onwahe at gmail.com
   Submitted by:Michal Meloun meloun at miracle.cz
   Reviewed by: ian, rpaulo
   Differential Revision: https://reviews.freebsd.org/D795

Added:
   head/sys/arm/include/sysreg.h   (contents, props changed)


This one breaks kernel build with gcc-4.2.1.

__ARM_ARCH not defined. On gcc-4.2.1 there is no __ARM_ARCH builtin.
Later gcc do have it.

The include below fixes the build.

Andreas

Index: sys/arm/arm/cpufunc_asm_armv7.S
===
--- sys/arm/arm/cpufunc_asm_armv7.S (revision 272282)
+++ sys/arm/arm/cpufunc_asm_armv7.S (working copy)
@@ -33,6 +33,7 @@
 #include machine/asm.h
 __FBSDID($FreeBSD$);

+#include machine/acle-compat.h
 #include machine/sysreg.h

.cpu cortex-a8
___
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: r272287 - vendor-sys/acpica/20140926

2014-09-29 Thread Jung-uk Kim
Author: jkim
Date: Mon Sep 29 19:54:17 2014
New Revision: 272287
URL: http://svnweb.freebsd.org/changeset/base/272287

Log:
  Tag ACPICA 20140926.

Added:
  vendor-sys/acpica/20140926/
 - copied from r272286, vendor-sys/acpica/dist/
___
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: r272286 - in vendor-sys/acpica/dist: . generate/unix/acpiexamples generate/unix/acpiexec generate/unix/iasl source/common source/compiler source/components/disassembler source/component...

2014-09-29 Thread Jung-uk Kim
Author: jkim
Date: Mon Sep 29 19:53:38 2014
New Revision: 272286
URL: http://svnweb.freebsd.org/changeset/base/272286

Log:
  Import ACPICA 20140926.

Added:
  vendor-sys/acpica/dist/source/compiler/aslmapenter.c   (contents, props 
changed)
  vendor-sys/acpica/dist/source/compiler/aslmapoutput.c   (contents, props 
changed)
  vendor-sys/acpica/dist/source/compiler/aslmaputils.c   (contents, props 
changed)
  vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c   (contents, props 
changed)
Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile
  vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile
  vendor-sys/acpica/dist/generate/unix/iasl/Makefile
  vendor-sys/acpica/dist/source/common/adisasm.c
  vendor-sys/acpica/dist/source/common/ahids.c
  vendor-sys/acpica/dist/source/compiler/aslcompile.c
  vendor-sys/acpica/dist/source/compiler/aslcompiler.h
  vendor-sys/acpica/dist/source/compiler/asldefine.h
  vendor-sys/acpica/dist/source/compiler/aslglobal.h
  vendor-sys/acpica/dist/source/compiler/aslload.c
  vendor-sys/acpica/dist/source/compiler/aslmain.c
  vendor-sys/acpica/dist/source/compiler/aslopcodes.c
  vendor-sys/acpica/dist/source/compiler/asloptions.c
  vendor-sys/acpica/dist/source/compiler/aslparser.y
  vendor-sys/acpica/dist/source/compiler/aslresource.c
  vendor-sys/acpica/dist/source/compiler/aslrestype1.c
  vendor-sys/acpica/dist/source/compiler/aslrestype1i.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2d.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2e.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2q.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2s.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2w.c
  vendor-sys/acpica/dist/source/compiler/aslsupport.y
  vendor-sys/acpica/dist/source/compiler/asltree.c
  vendor-sys/acpica/dist/source/compiler/asltypes.h
  vendor-sys/acpica/dist/source/compiler/aslxref.c
  vendor-sys/acpica/dist/source/compiler/dtcompile.c
  vendor-sys/acpica/dist/source/compiler/dtsubtable.c
  vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c
  vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
  vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c
  vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c
  vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c
  vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c
  vendor-sys/acpica/dist/source/components/events/evgpeinit.c
  vendor-sys/acpica/dist/source/components/events/evregion.c
  vendor-sys/acpica/dist/source/components/events/evxface.c
  vendor-sys/acpica/dist/source/components/events/evxfevnt.c
  vendor-sys/acpica/dist/source/components/executer/exfield.c
  vendor-sys/acpica/dist/source/components/executer/exprep.c
  vendor-sys/acpica/dist/source/components/hardware/hwgpe.c
  vendor-sys/acpica/dist/source/components/tables/tbxfroot.c
  vendor-sys/acpica/dist/source/include/acdisasm.h
  vendor-sys/acpica/dist/source/include/aclocal.h
  vendor-sys/acpica/dist/source/include/acnames.h
  vendor-sys/acpica/dist/source/include/acobject.h
  vendor-sys/acpica/dist/source/include/acpixf.h
  vendor-sys/acpica/dist/source/include/actables.h
  vendor-sys/acpica/dist/source/include/actypes.h
  vendor-sys/acpica/dist/source/include/amlresrc.h
  vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c
  vendor-sys/acpica/dist/source/tools/acpidump/apdump.c
  vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h
  vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c
  vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c
  vendor-sys/acpica/dist/source/tools/acpisrc/astable.c

Modified: vendor-sys/acpica/dist/changes.txt
==
--- vendor-sys/acpica/dist/changes.txt  Mon Sep 29 17:51:39 2014
(r272285)
+++ vendor-sys/acpica/dist/changes.txt  Mon Sep 29 19:53:38 2014
(r272286)
@@ -1,4 +1,71 @@
 
+26 September 2014. Summary of changes for version 20140926:
+
+1) ACPICA kernel-resident subsystem:
+
+Updated the GPIO operation region handler interface (GeneralPurposeIo). 
+In order to support GPIO Connection objects with multiple pins, along 
+with the related Field objects, the following changes to the interface 
+have been made: The Address is now defined to be the offset in bits of 
+the field unit from the previous invocation of a Connection. It can be 
+viewed as a Pin Number Index into the connection resource descriptor. 
+The BitWidth is the exact bit width of the field. It is usually one bit, 
+but not always. See the ACPICA reference guide (section 8.8.6.2.1) for 
+additional information and examples.
+
+GPE support: During ACPICA/GPE initialization, ensure that all GPEs with 
+corresponding _Lxx/_Exx 

svn commit: r272288 - head/usr.bin/at

2014-09-29 Thread Xin LI
Author: delphij
Date: Mon Sep 29 21:45:57 2014
New Revision: 272288
URL: http://svnweb.freebsd.org/changeset/base/272288

Log:
  When setting environment variables in the atrun script, use the
  export foo=bar form instead of foo=bar; export foo since the
  former allows the shell to catch variable names that are not valid
  shell identifiers.  This will cause /bin/sh to exit with an error
  (which gets mailed to the at user) and it will not run the script.
  
  Obtained from:OpenBSD (r1.63 millert)
  MFC after:3 days

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

Modified: head/usr.bin/at/at.c
==
--- head/usr.bin/at/at.cMon Sep 29 19:54:17 2014(r272287)
+++ head/usr.bin/at/at.cMon Sep 29 21:45:57 2014(r272288)
@@ -367,6 +367,7 @@ writefile(time_t runtimer, char queue)
 
if (export)
{
+   (void)fputs(export , fp);
fwrite(*atenv, sizeof(char), eqp-*atenv, fp);
for(ap = eqp;*ap != '\0'; ap++)
{
@@ -389,7 +390,6 @@ writefile(time_t runtimer, char queue)
fputc(*ap, fp);
}
}
-   fputs(; export , fp);
fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp);
fputc('\n', fp);

___
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: r272288 - head/usr.bin/at

2014-09-29 Thread Mateusz Guzik
On Mon, Sep 29, 2014 at 09:45:57PM +, Xin LI wrote:
 Author: delphij
 Date: Mon Sep 29 21:45:57 2014
 New Revision: 272288
 URL: http://svnweb.freebsd.org/changeset/base/272288
 
 Log:
   When setting environment variables in the atrun script, use the
   export foo=bar form instead of foo=bar; export foo since the
   former allows the shell to catch variable names that are not valid
   shell identifiers.  This will cause /bin/sh to exit with an error
   (which gets mailed to the at user) and it will not run the script.
   
   Obtained from:  OpenBSD (r1.63 millert)
   MFC after:  3 days
 
 Modified:
   head/usr.bin/at/at.c
 
 Modified: head/usr.bin/at/at.c
 ==
 --- head/usr.bin/at/at.c  Mon Sep 29 19:54:17 2014(r272287)
 +++ head/usr.bin/at/at.c  Mon Sep 29 21:45:57 2014(r272288)
 @@ -367,6 +367,7 @@ writefile(time_t runtimer, char queue)
  
   if (export)
   {
 + (void)fputs(export , fp);
   fwrite(*atenv, sizeof(char), eqp-*atenv, fp);
   for(ap = eqp;*ap != '\0'; ap++)
   {
 @@ -389,7 +390,6 @@ writefile(time_t runtimer, char queue)
   fputc(*ap, fp);
   }
   }
 - fputs(; export , fp);
   fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp);

Should not this line also be removed?

   fputc('\n', fp);
   
 

-- 
Mateusz Guzik mjguzik gmail.com
___
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: r272289 - head/usr.bin/at

2014-09-29 Thread Xin LI
Author: delphij
Date: Mon Sep 29 21:54:46 2014
New Revision: 272289
URL: http://svnweb.freebsd.org/changeset/base/272289

Log:
  Sigh, remove a line that needs to be removed along with previous commit.
  
  Submitted by: mjg
  MFC after:3 days
  X-MFC-with:   272288

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

Modified: head/usr.bin/at/at.c
==
--- head/usr.bin/at/at.cMon Sep 29 21:45:57 2014(r272288)
+++ head/usr.bin/at/at.cMon Sep 29 21:54:46 2014(r272289)
@@ -390,7 +390,6 @@ writefile(time_t runtimer, char queue)
fputc(*ap, fp);
}
}
-   fwrite(*atenv, sizeof(char), eqp-*atenv -1, fp);
fputc('\n', fp);

}
___
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: r272290 - head/sys/kern

2014-09-29 Thread Mateusz Guzik
Author: mjg
Date: Mon Sep 29 23:59:19 2014
New Revision: 272290
URL: http://svnweb.freebsd.org/changeset/base/272290

Log:
  Use bzero instead of explicitly zeroing stuff in do_execve.
  
  While strictly speaking this is not correct since some fields are pointers,
  it makes no difference on all supported archs and we already rely on it doing
  the right thing in other places.
  
  No functional changes.

Modified:
  head/sys/kern/kern_exec.c

Modified: head/sys/kern/kern_exec.c
==
--- head/sys/kern/kern_exec.c   Mon Sep 29 21:54:46 2014(r272289)
+++ head/sys/kern/kern_exec.c   Mon Sep 29 23:59:19 2014(r272290)
@@ -379,29 +379,10 @@ do_execve(td, args, mac_p)
/*
 * Initialize part of the common data
 */
+   bzero(imgp, sizeof(*imgp));
imgp-proc = p;
-   imgp-execlabel = NULL;
imgp-attr = attr;
-   imgp-entry_addr = 0;
-   imgp-reloc_base = 0;
-   imgp-vmspace_destroyed = 0;
-   imgp-interpreted = 0;
-   imgp-opened = 0;
-   imgp-interpreter_name = NULL;
-   imgp-auxargs = NULL;
-   imgp-vp = NULL;
-   imgp-object = NULL;
-   imgp-firstpage = NULL;
-   imgp-ps_strings = 0;
-   imgp-auxarg_size = 0;
imgp-args = args;
-   imgp-execpath = imgp-freepath = NULL;
-   imgp-execpathp = 0;
-   imgp-canary = 0;
-   imgp-canarylen = 0;
-   imgp-pagesizes = 0;
-   imgp-pagesizeslen = 0;
-   imgp-stack_prot = 0;
 
 #ifdef MAC
error = mac_execve_enter(imgp, mac_p);
@@ -409,8 +390,6 @@ do_execve(td, args, mac_p)
goto exec_fail;
 #endif
 
-   imgp-image_header = NULL;
-
/*
 * Translate the file name. namei() returns a vnode pointer
 *  in ni_vp amoung other things.
___
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: r272291 - head/lib/libc/sys

2014-09-29 Thread Bryan Drewery
Author: bdrewery
Date: Tue Sep 30 00:06:53 2014
New Revision: 272291
URL: http://svnweb.freebsd.org/changeset/base/272291

Log:
  Document [EPERM] for UNIX sockets.
  
  MFC after:2 weeks

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

Modified: head/lib/libc/sys/connect.2
==
--- head/lib/libc/sys/connect.2 Mon Sep 29 23:59:19 2014(r272290)
+++ head/lib/libc/sys/connect.2 Tue Sep 30 00:06:53 2014(r272291)
@@ -28,7 +28,7 @@
 .\ @(#)connect.2  8.1 (Berkeley) 6/4/93
 .\ $FreeBSD$
 .\
-.Dd June 26, 2014
+.Dd September 29, 2014
 .Dt CONNECT 2
 .Os
 .Sh NAME
@@ -160,6 +160,8 @@ Search permission is denied for a compon
 Write access to the named socket is denied.
 .It Bq Er ELOOP
 Too many symbolic links were encountered in translating the pathname.
+.It Bq Er EPERM
+Write access to the named socket is denied.
 .El
 .Sh SEE ALSO
 .Xr accept 2 ,
___
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: r272292 - in head/sys: contrib/dev/ath/ath_hal/ar9300 dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal...

2014-09-29 Thread Adrian Chadd
Author: adrian
Date: Tue Sep 30 03:19:29 2014
New Revision: 272292
URL: http://svnweb.freebsd.org/changeset/base/272292

Log:
  Add initial support for the AR9485 CUS198 / CUS230 variants.
  
  These variants have a few differences from the default AR9485 NIC,
  namely:
  
  * a non-default antenna switch config;
  * slightly different RX gain table setup;
  * an external XLNA hooked up to a GPIO pin;
  * (and not yet done) RSSI threshold differences when
doing slow diversity.
  
  To make this possible:
  
  * Add the PCI device list from Linux ath9k, complete with vendor and
sub-vendor IDs for various things to be enabled;
  * .. and until FreeBSD learns about a PCI device list like this,
write a search function inspired by the USB device enumeration code;
  * add HAL_OPS_CONFIG to the HAL attach methods; the HAL can use this
to initialise its local driver parameters upon attach;
  * copy these parameters over in the AR9300 HAL;
  * don't default to override the antenna switch - only do it for
the chips that require it;
  * I brought over ar9300_attenuation_apply() from ath9k which is cleaner
and easier to read for this particular NIC.
  
  This is a work in progress.  I'm worried that there's some post-AR9380
  NIC out there which doesn't work without the antenna override set as
  I currently haven't implemented bluetooth coexistence for the AR9380
  and later HAL.  But I'd rather have this code in the tree and fix it
  up before 11.0-RELEASE happens versus having a set of newer NICs
  in laptops be effectively RX deaf.
  
  Tested:
  
  * AR9380 (STA)
  * AR9485 CUS198 (STA)
  
  Obtained from:Qualcomm Atheros, Linux ath9k

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.h
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c
  head/sys/dev/ath/ath_hal/ah.c
  head/sys/dev/ath/ath_hal/ah.h
  head/sys/dev/ath/ath_hal/ah_internal.h
  head/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c
  head/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
  head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
  head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c
  head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c
  head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
  head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
  head/sys/dev/ath/if_ath.c
  head/sys/dev/ath/if_ath_lna_div.c
  head/sys/dev/ath/if_ath_pci.c
  head/sys/dev/ath/if_athvar.h

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.hTue Sep 30 00:06:53 
2014(r272291)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.hTue Sep 30 03:19:29 
2014(r272292)
@@ -1181,10 +1181,11 @@ struct ath_hal;
 
 extern  struct ath_hal_9300 * ar9300_new_state(u_int16_t devid,
 HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata,
+HAL_OPS_CONFIG *ah_config,
 HAL_STATUS *status);
 extern  struct ath_hal * ar9300_attach(u_int16_t devid,
 HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, uint16_t *eepromdata,
-HAL_STATUS *status);
+HAL_OPS_CONFIG *ah_config, HAL_STATUS *status);
 extern  void ar9300_detach(struct ath_hal *ah);
 extern void ar9300_read_revisions(struct ath_hal *ah);
 extern  HAL_BOOL ar9300_chip_test(struct ath_hal *ah);

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Tue Sep 30 
00:06:53 2014(r272291)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Tue Sep 30 
03:19:29 2014(r272292)
@@ -618,7 +618,8 @@ ar9300_read_revisions(struct ath_hal *ah
  */
 struct ath_hal *
 ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st,
-  HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_STATUS *status)
+  HAL_BUS_HANDLE sh, uint16_t *eepromdata, HAL_OPS_CONFIG *ah_config,
+  HAL_STATUS *status)
 {
 struct ath_hal_9300 *ahp;
 struct ath_hal  *ah;
@@ -628,7 +629,7 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC
 HAL_NO_INTERSPERSED_READS;
 
 /* NB: memory is returned zero'd */
-ahp = ar9300_new_state(devid, sc, st, sh, eepromdata, status);
+ahp = ar9300_new_state(devid, sc, st, sh, eepromdata, ah_config, status);
 if (ahp == AH_NULL) {
 return AH_NULL;
 }
@@ -654,12 +655,6 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC
 /* XXX FreeBSD: enable RX mitigation */
 ah-ah_config.ath_hal_intr_mitigation_rx = 1;
 
-/*
- 

svn commit: r272293 - head/sys/contrib/dev/ath/ath_hal/ar9300

2014-09-29 Thread Adrian Chadd
Author: adrian
Date: Tue Sep 30 03:29:46 2014
New Revision: 272293
URL: http://svnweb.freebsd.org/changeset/base/272293

Log:
  Remove this stuff - it's no longer needed here.

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c
==
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.cTue Sep 30 
03:19:29 2014(r272292)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.cTue Sep 30 
03:29:46 2014(r272293)
@@ -252,29 +252,6 @@ ar9300_attach_freebsd_ops(struct ath_hal
/* LNA diversity functions */
ah-ah_divLnaConfGet = ar9300_ant_div_comb_get_config;
ah-ah_divLnaConfSet = ar9300_ant_div_comb_set_config;
-
-   /* Setup HAL configuration defaults */
-   /* XXX cus198 defaults from ath9k */
-   /* xlna_gpio = 9 */
-   /* xatten_margin_cfg = true */
-   /* alt_mingainidx = true */
-   /* comm2g_switch_enable = 0x000bbb88 */
-   /* ant_comb.low_rssi_thresh = 20 */
-   /* ant_comb.fast_div_bias = 3 */
-
-#if 0
-   /*
-* The HAL code treats this as a mask.
-* The ath9k code above treats it as a bit offset.
-* So it should be set to 0x200, not 0x9.
-*/
-   ah-ah_config.ath_hal_ext_lna_ctl_gpio = 0x200; /* bit 9 */
-   ah-ah_config.ath_hal_ext_atten_margin_cfg = AH_TRUE;
-   ah-ah_config.ath_hal_min_gainidx = AH_TRUE;
-   ah-ah_config.ath_hal_ant_ctrl_comm2g_switch_enable = 0x000bbb88;
-   /* XXX low_rssi_thresh */
-   /* XXX fast_div_bias */
-#endif
 }
 
 HAL_BOOL
___
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: r272294 - head/share/man/man4

2014-09-29 Thread Gavin Atkinson
Author: gavin
Date: Tue Sep 30 05:36:16 2014
New Revision: 272294
URL: http://svnweb.freebsd.org/changeset/base/272294

Log:
  Make clear in the ipheth(4) hardware notes that this driver is for the
  tethering functionality only.  Add a bugs section to give a pointer
  to usbconfig set_config if the device isn't automatically detected.
  
  MFC after:3 days

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

Modified: head/share/man/man4/ipheth.4
==
--- head/share/man/man4/ipheth.4Tue Sep 30 03:29:46 2014
(r272293)
+++ head/share/man/man4/ipheth.4Tue Sep 30 05:36:16 2014
(r272294)
@@ -27,12 +27,12 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd September 25, 2014
+.Dd September 30, 2014
 .Dt IPHETH 4
 .Os
 .Sh NAME
 .Nm ipheth
-.Nd USB Apple iPhone/iPad Ethernet driver
+.Nd USB Apple iPhone/iPad tethered Ethernet driver
 .Sh SYNOPSIS
 To load the driver as a module at boot time, place the
 following line in
@@ -61,6 +61,7 @@ In most cases this must be explicitly en
 .Pp
 For more information on configuring this device, see
 .Xr ifconfig 8 .
+The device does not support different media types or options.
 .Sh HARDWARE
 The following devices are supported by the
 .Nm
@@ -68,9 +69,9 @@ driver:
 .Pp
 .Bl -bullet -compact
 .It
-Apple iPhone (all models)
+Apple iPhone tethering (all models)
 .It
-Apple iPad (all models)
+Apple iPad tethering (all models)
 .El
 .Sh SEE ALSO
 .Xr arp 4 ,
@@ -80,6 +81,7 @@ Apple iPad (all models)
 .Xr urndis 4 ,
 .Xr usb 4 ,
 .Xr ifconfig 8
+.Xr usbconfig 8
 .Sh HISTORY
 The
 .Nm
@@ -91,3 +93,14 @@ The
 .Nm
 driver was written by
 .An Hans Petter Selasky Aq Mt hsela...@freebsd.org .
+.Sh BUGS
+Some devices may need to be manually configured to use an alternative
+configuration with the
+.Xr usbconfig 8
+utility.
+A command similar to
+.Dl usbconfig -u 1 -a 2 set_config 3
+may be required if the device is not recognised automatically by
+.Nm
+after it is connected.
+
___
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: r272295 - head/sys/dev/ath

2014-09-29 Thread Adrian Chadd
Author: adrian
Date: Tue Sep 30 05:50:34 2014
New Revision: 272295
URL: http://svnweb.freebsd.org/changeset/base/272295

Log:
  Add a missing file from the last commit.
  
  Noticed by: jhibbits

Added:
  head/sys/dev/ath/if_ath_pci_devlist.h   (contents, props changed)

Added: head/sys/dev/ath/if_ath_pci_devlist.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/ath/if_ath_pci_devlist.h   Tue Sep 30 05:50:34 2014
(r272295)
@@ -0,0 +1,669 @@
+/*-
+ * Copyright (c) 2014 Qualcomm Atheros.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer,
+ *without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *similar to the NO WARRANTY disclaimer below (Disclaimer) and any
+ *redistribution must be conditioned upon including a substantially
+ *similar Disclaimer requirement for further binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * $FreeBSD$
+ */
+
+static const struct pci_device_id ath_pci_id_table[] = {
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0023) }, /* PCI   */
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0024) }, /* PCI-E */
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0027) }, /* PCI   */
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x0029) }, /* PCI   */
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002A) }, /* PCI-E */
+
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+PCI_VENDOR_ID_AZWAVE,
+0x1C71),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+PCI_VENDOR_ID_FOXCONN,
+0xE01F),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+0x11AD, /* LITEON */
+0x6632),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+0x11AD, /* LITEON */
+0x6642),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+PCI_VENDOR_ID_QMI,
+0x0306),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+0x185F, /* WNC */
+0x309D),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+0x10CF, /* Fujitsu */
+0x147C),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+0x10CF, /* Fujitsu */
+0x147D),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002A,
+0x10CF, /* Fujitsu */
+0x1536),
+ .driver_data = ATH_PCI_D3_L1_WAR },
+
+   /* AR9285 card for Asus */
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+0x002B,
+PCI_VENDOR_ID_AZWAVE,
+0x2C37),
+ .driver_data = ATH_PCI_BT_ANT_DIV },
+
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002B) }, /* PCI-E */
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded 
out */
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002D) }, /* PCI   */
+   { PCI_VDEVICE(PCI_VENDOR_ID_ATHEROS, 0x002E) }, /* PCI-E */
+
+   /* Killer Wireless (3x3) */
+   { PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+