svn commit: r259161 - head/sys/mips/cavium/octe

2013-12-10 Thread Juli Mallett
Author: jmallett
Date: Tue Dec 10 09:38:18 2013
New Revision: 259161
URL: http://svnweb.freebsd.org/changeset/base/259161

Log:
  Add missing includes.

Modified:
  head/sys/mips/cavium/octe/cavium-ethernet.h
  head/sys/mips/cavium/octe/ethernet-mv88e61xx.c

Modified: head/sys/mips/cavium/octe/cavium-ethernet.h
==
--- head/sys/mips/cavium/octe/cavium-ethernet.h Tue Dec 10 09:14:11 2013
(r259160)
+++ head/sys/mips/cavium/octe/cavium-ethernet.h Tue Dec 10 09:38:18 2013
(r259161)
@@ -38,7 +38,9 @@ AND WITH ALL FAULTS AND CAVIUM  NETWORKS
 #ifndef CAVIUM_ETHERNET_H
 #define CAVIUM_ETHERNET_H
 
+#include sys/taskqueue.h
 #include net/if_media.h
+#include net/ifq.h
 
 /**
  * This is the definition of the Ethernet driver's private

Modified: head/sys/mips/cavium/octe/ethernet-mv88e61xx.c
==
--- head/sys/mips/cavium/octe/ethernet-mv88e61xx.c  Tue Dec 10 09:14:11 
2013(r259160)
+++ head/sys/mips/cavium/octe/ethernet-mv88e61xx.c  Tue Dec 10 09:38:18 
2013(r259161)
@@ -45,6 +45,7 @@ __FBSDID($FreeBSD$);
 
 #include net/ethernet.h
 #include net/if.h
+#include net/if_var.h
 
 #include wrapper-cvmx-includes.h
 #include ethernet-headers.h
___
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: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken

2013-12-10 Thread Ed Schouten
2013/12/10 Aleksandr Rybalko r...@freebsd.org:
 Thanks to Ed, [...]

No, thanks to you! Thanks a lot for pushing forward something that I
should have done years ago. Can't wait to buy you a beer.

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


svn commit: r259168 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2013-12-10 Thread Alexander Motin
Author: mav
Date: Tue Dec 10 12:36:44 2013
New Revision: 259168
URL: http://svnweb.freebsd.org/changeset/base/259168

Log:
  Don't even try to read vdev labels from devices smaller then SPA_MINDEVSIZE
  (64MB).  Even if we would find one somehow, ZFS kernel code rejects such
  devices.  It is funny to look on attempts to read 4 256K vdev labels from
  1.44MB floppy, though it is not very practical and quite slow.

Modified:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
==
--- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue Dec 
10 11:47:38 2013(r259167)
+++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue Dec 
10 12:36:44 2013(r259168)
@@ -995,10 +995,10 @@ nozpool_all_slices(avl_tree_t *r, const 
 #endif /* sun */
 }
 
+#ifdef sun
 static void
 check_slices(avl_tree_t *r, int fd, const char *sname)
 {
-#ifdef sun
struct extvtoc vtoc;
struct dk_gpt *gpt;
char diskname[MAXNAMELEN];
@@ -1028,8 +1028,8 @@ check_slices(avl_tree_t *r, int fd, cons
check_one_slice(r, diskname, i, 0, 1);
efi_free(gpt);
}
-#endif /* sun */
 }
+#endif /* sun */
 
 static void
 zpool_open_func(void *arg)
@@ -1059,6 +1059,7 @@ zpool_open_func(void *arg)
return;
}
/* this file is too small to hold a zpool */
+#ifdef sun
if (S_ISREG(statbuf.st_mode) 
statbuf.st_size  SPA_MINDEVSIZE) {
(void) close(fd);
@@ -1070,6 +1071,12 @@ zpool_open_func(void *arg)
 */
check_slices(rn-rn_avl, fd, rn-rn_name);
}
+#else  /* !sun */
+   if (statbuf.st_size  SPA_MINDEVSIZE) {
+   (void) close(fd);
+   return;
+   }
+#endif /* sun */
 
if ((zpool_read_label(fd, config)) != 0) {
(void) close(fd);

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Dec 
10 11:47:38 2013(r259167)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Dec 
10 12:36:44 2013(r259168)
@@ -401,10 +401,16 @@ vdev_geom_attach_taster(struct g_consume
 
if (pp-flags  G_PF_WITHER)
return (EINVAL);
-   if (pp-sectorsize  VDEV_PAD_SIZE || !ISP2(pp-sectorsize))
-   return (EINVAL);
g_attach(cp, pp);
error = g_access(cp, 1, 0, 0);
+   if (error == 0) {
+   if (pp-sectorsize  VDEV_PAD_SIZE || !ISP2(pp-sectorsize))
+   error = EINVAL;
+   else if (pp-mediasize  SPA_MINDEVSIZE)
+   error = EINVAL;
+   if (error != 0)
+   g_access(cp, -1, 0, 0);
+   }
if (error != 0)
g_detach(cp);
return (error);
___
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: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken

2013-12-10 Thread Luiz Otavio O Souza
On Dec 10, 2013, at 9:30 AM, Ed Schouten e...@80386.nl wrote:
 2013/12/10 Aleksandr Rybalko r...@freebsd.org:
 Thanks to Ed, [...]
 
 No, thanks to you! […]
 Can't wait to buy you a beer.

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


svn commit: r259169 - head/usr.sbin/ndp

2013-12-10 Thread Andrey V. Elsukov
Author: ae
Date: Tue Dec 10 13:14:54 2013
New Revision: 259169
URL: http://svnweb.freebsd.org/changeset/base/259169

Log:
  Ansify function definitions.

Modified:
  head/usr.sbin/ndp/ndp.c

Modified: head/usr.sbin/ndp/ndp.c
==
--- head/usr.sbin/ndp/ndp.c Tue Dec 10 12:36:44 2013(r259168)
+++ head/usr.sbin/ndp/ndp.c Tue Dec 10 13:14:54 2013(r259169)
@@ -168,9 +168,7 @@ int mode = 0;
 char *arg = NULL;
 
 int
-main(argc, argv)
-   int argc;
-   char **argv;
+main(int argc, char **argv)
 {
int ch;
 
@@ -320,8 +318,7 @@ main(argc, argv)
  * Process a file to set standard ndp entries
  */
 int
-file(name)
-   char *name;
+file(char *name)
 {
FILE *fp;
int i, retval;
@@ -378,9 +375,7 @@ struct  {
  * Set an individual neighbor cache entry
  */
 int
-set(argc, argv)
-   int argc;
-   char **argv;
+set(int argc, char **argv)
 {
register struct sockaddr_in6 *sin = sin_m;
register struct sockaddr_dl *sdl;
@@ -455,8 +450,7 @@ overwrite:
  * Display an individual neighbor cache entry
  */
 void
-get(host)
-   char *host;
+get(char *host)
 {
struct sockaddr_in6 *sin = sin_m;
struct addrinfo hints, *res;
@@ -486,8 +480,7 @@ get(host)
  * Delete a neighbor cache entry
  */
 int
-delete(host)
-   char *host;
+delete(char *host)
 {
struct sockaddr_in6 *sin = sin_m;
register struct rt_msghdr *rtm = m_rtmsg.m_rtm;
@@ -555,9 +548,7 @@ delete:
  * Dump the entire neighbor cache
  */
 void
-dump(addr, cflag)
-   struct in6_addr *addr;
-   int cflag;
+dump(struct in6_addr *addr, int cflag)
 {
int mib[6];
size_t needed;
@@ -762,10 +753,7 @@ again:;
 }
 
 static struct in6_nbrinfo *
-getnbrinfo(addr, ifindex, warning)
-   struct in6_addr *addr;
-   int ifindex;
-   int warning;
+getnbrinfo(struct in6_addr *addr, int ifindex, int warning)
 {
static struct in6_nbrinfo nbi;
int s;
@@ -806,9 +794,7 @@ ether_str(struct sockaddr_dl *sdl)
 }
 
 int
-ndp_ether_aton(a, n)
-   char *a;
-   u_char *n;
+ndp_ether_aton(char *a, u_char *n)
 {
int i, o[6];
 
@@ -840,8 +826,7 @@ usage()
 }
 
 int
-rtmsg(cmd)
-   int cmd;
+rtmsg(int cmd)
 {
static int seq;
int rlen;
@@ -906,10 +891,7 @@ doit:
 }
 
 void
-ifinfo(ifname, argc, argv)
-   char *ifname;
-   int argc;
-   char **argv;
+ifinfo(char *ifname, int argc, char **argv)
 {
struct in6_ndireq nd;
int i, s;
@@ -1478,8 +1460,7 @@ harmonize_rtr()
 
 #ifdef SIOCSDEFIFACE_IN6   /* XXX: check SIOCGDEFIFACE_IN6 as well? */
 static void
-setdefif(ifname)
-   char *ifname;
+setdefif(char *ifname)
 {
struct in6_ndifreq ndifreq;
unsigned int ifindex;
@@ -1532,8 +1513,7 @@ getdefif()
 #endif
 
 static char *
-sec2str(total)
-   time_t total;
+sec2str(time_t total)
 {
static char result[256];
int days, hours, mins, secs;
@@ -1578,8 +1558,7 @@ sec2str(total)
  * from tcpdump/util.c
  */
 static void
-ts_print(tvp)
-   const struct timeval *tvp;
+ts_print(const struct timeval *tvp)
 {
int s;
 
___
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: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken

2013-12-10 Thread Aleksandr Rybalko
On Sun, 08 Dec 2013 22:45:09 +0100
Andreas Tobler andre...@freebsd.org wrote:

 Hi Aleksandr,
 
 On 08.12.13 00:59, Aleksandr Rybalko wrote:
  Andreas Tobler andre...@freebsd.org написав(ла):
  On 05.12.13 23:38, Aleksandr Rybalko wrote:
  Author: ray
  Date: Thu Dec  5 22:38:53 2013
  New Revision: 259016
  URL: http://svnweb.freebsd.org/changeset/base/259016
 
  Log:
Merge VT(9) project (a.k.a. newcons).

Reviewed by:nwhitehorn
MFC_to_10_after:re approval

Sponsored by:   The FreeBSD Foundation
 
  Great! Thanks, gives a new look  feel on the console :)
  Have it running on amd64/i386 and PowerMac(32/64-bit).
  The only thing I need to figure is the mapping of the AltGr or in Mac
  world, the alt key mapping. Iow, the third level mapping of the keys.
  e.g. the @ here is on altgr-2...
 
  Again, thanks!
  Andreas
  
 
  I'm glad to fix that, but I've to understand how it is should work :-)
 
 Hehe :)
 
 So do I. I was playing a bit while comparing to syscons.c
 
 And with the below diff I'm able to get what I want. At least when I
 press RALT (Altgr) key I get the third symbol printed on my keyboard.
 I have a couple of Thinkpads here where I play with. (The PowerMac's are
 currently to loud)
 
 For example, on the '2' I have the '' as the second symbol and the '@'
 as third symbol. Yeah, these are european keyboards
 
 Now I do not prepend the 0x1b and then my RALT behaves as used to, at
 least for me.
 
 I do not know the fine details but LALT and RALT are different.
 
 What do you think, others?
 
 For me this is a really important thing since all the 'special' keys are
 not accesible w/o the 'hack' below. If I want the pipe (|), or writing
 code ({}, [], ...) I have to remote login to get the characters I need.
 But I guess I do not need to explain that ;)
 
 TIA,
 Andreas

Hi Andreas!

That keyboards have no Shift key for that? :)
I will be glad to apply your changes, but I have to know how it should
be controlled.

RU and UA PC keyboards have same 3 symbols '2', '', '@'
To get '2' i have to press only '2'
To get '@' I have to press Shift+'2'
To get '' I have to switch to UA or RU and press Shift+'2'

Ahh, or use some called Third-Level (IIRC) in Xorg terms. Temporary
lang switch. Which commonly mapped to one of Alt. Right?
So R-Alt+Shift+'2'?

 
 Index: vt_core.c
 ===
 --- vt_core.c (revision 259095)
 +++ vt_core.c (working copy)
 @@ -408,6 +408,7 @@
   } else {
   switch (c  ~RELKEY) {
   case (SPCLKEY | RALT):
 + break;
   case (SPCLKEY | LALT):
   vd-vd_kbstate |= ALKED;
   }


-- 
Aleksandr Rybalko r...@ddteam.net
___
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: r259170 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb vendor/illumos/dist/cmd/...

2013-12-10 Thread Andriy Gapon
Author: avg
Date: Tue Dec 10 13:33:56 2013
New Revision: 259170
URL: http://svnweb.freebsd.org/changeset/base/259170

Log:
  4370 avoid transmitting holes during zfs send
  
  4371 DMU code clean up
  
  illumos/illumos-gate@43466aae47bfcd2ad9bf501faec8e75c08095e4f

Modified:
  vendor/illumos/dist/cmd/zdb/zdb.c
  vendor/illumos/dist/cmd/zdb/zdb_il.c
  vendor/illumos/dist/cmd/zhack/zhack.c
  vendor/illumos/dist/man/man5/zpool-features.5

Changes in other areas also in this revision:
Modified:
  vendor-sys/illumos/dist/common/zfs/zfeature_common.c
  vendor-sys/illumos/dist/common/zfs/zfeature_common.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/bptree.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/ddt.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfeature.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_cache.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c

Modified: vendor/illumos/dist/cmd/zdb/zdb.c
==
--- vendor/illumos/dist/cmd/zdb/zdb.c   Tue Dec 10 13:14:54 2013
(r259169)
+++ vendor/illumos/dist/cmd/zdb/zdb.c   Tue Dec 10 13:33:56 2013
(r259170)
@@ -764,7 +764,7 @@ dump_dde(const ddt_t *ddt, const ddt_ent
if (ddp-ddp_phys_birth == 0)
continue;
ddt_bp_create(ddt-ddt_checksum, ddk, ddp, blk);
-   sprintf_blkptr(blkbuf, blk);
+   snprintf_blkptr(blkbuf, sizeof (blkbuf), blk);
(void) printf(index %llx refcnt %llu %s %s\n,
(u_longlong_t)index, (u_longlong_t)ddp-ddp_refcnt,
types[p], blkbuf);
@@ -1022,31 +1022,39 @@ blkid2offset(const dnode_phys_t *dnp, co
 }
 
 static void
-sprintf_blkptr_compact(char *blkbuf, const blkptr_t *bp)
+snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp)
 {
const dva_t *dva = bp-blk_dva;
int ndvas = dump_opt['d']  5 ? BP_GET_NDVAS(bp) : 1;
 
if (dump_opt['b'] = 6) {
-   sprintf_blkptr(blkbuf, bp);
+   snprintf_blkptr(blkbuf, buflen, bp);
return;
}
 
blkbuf[0] = '\0';
 
for (int i = 0; i  ndvas; i++)
-   (void) sprintf(blkbuf + strlen(blkbuf), %llu:%llx:%llx ,
+   (void) snprintf(blkbuf + strlen(blkbuf),
+   buflen - strlen(blkbuf), %llu:%llx:%llx ,
(u_longlong_t)DVA_GET_VDEV(dva[i]),
(u_longlong_t)DVA_GET_OFFSET(dva[i]),
(u_longlong_t)DVA_GET_ASIZE(dva[i]));
 
-   (void) sprintf(blkbuf + strlen(blkbuf),
-   %llxL/%llxP F=%llu B=%llu/%llu,
-   (u_longlong_t)BP_GET_LSIZE(bp),
-   (u_longlong_t)BP_GET_PSIZE(bp),
-   (u_longlong_t)bp-blk_fill,
-   (u_longlong_t)bp-blk_birth,
-   (u_longlong_t)BP_PHYSICAL_BIRTH(bp));
+   if (BP_IS_HOLE(bp)) {
+   (void) snprintf(blkbuf + strlen(blkbuf),
+   buflen - strlen(blkbuf), B=%llu,
+   (u_longlong_t)bp-blk_birth);
+   } else {
+   (void) snprintf(blkbuf + strlen(blkbuf),
+   buflen - strlen(blkbuf),
+   %llxL/%llxP F=%llu B=%llu/%llu,
+   (u_longlong_t)BP_GET_LSIZE(bp),
+   (u_longlong_t)BP_GET_PSIZE(bp),
+   (u_longlong_t)bp-blk_fill,
+   (u_longlong_t)bp-blk_birth,
+   (u_longlong_t)BP_PHYSICAL_BIRTH(bp));
+   }
 }
 
 static void
@@ -1071,7 +1079,7 @@ print_indirect(blkptr_t *bp, const zbook
}
}
 
-   sprintf_blkptr_compact(blkbuf, bp);
+   snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp);
(void) 

svn commit: r259170 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zdb vendor/illumos/dist/cmd/...

2013-12-10 Thread Andriy Gapon
Author: avg
Date: Tue Dec 10 13:33:56 2013
New Revision: 259170
URL: http://svnweb.freebsd.org/changeset/base/259170

Log:
  4370 avoid transmitting holes during zfs send
  
  4371 DMU code clean up
  
  illumos/illumos-gate@43466aae47bfcd2ad9bf501faec8e75c08095e4f

Modified:
  vendor-sys/illumos/dist/common/zfs/zfeature_common.c
  vendor-sys/illumos/dist/common/zfs/zfeature_common.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/bptree.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/ddt.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_diff.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zfeature.h
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_cache.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfeature.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zio.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c

Changes in other areas also in this revision:
Modified:
  vendor/illumos/dist/cmd/zdb/zdb.c
  vendor/illumos/dist/cmd/zdb/zdb_il.c
  vendor/illumos/dist/cmd/zhack/zhack.c
  vendor/illumos/dist/man/man5/zpool-features.5

Modified: vendor-sys/illumos/dist/common/zfs/zfeature_common.c
==
--- vendor-sys/illumos/dist/common/zfs/zfeature_common.cTue Dec 10 
13:14:54 2013(r259169)
+++ vendor-sys/illumos/dist/common/zfs/zfeature_common.cTue Dec 10 
13:33:56 2013(r259170)
@@ -115,10 +115,21 @@ zfeature_lookup_name(const char *name, s
return (ENOENT);
 }
 
+boolean_t
+zfeature_depends_on(spa_feature_t fid, spa_feature_t check) {
+   zfeature_info_t *feature = spa_feature_table[fid];
+
+   for (int i = 0; feature-fi_depends[i] != SPA_FEATURE_NONE; i++) {
+   if (feature-fi_depends[i] == check)
+   return (B_TRUE);
+   }
+   return (B_FALSE);
+}
+
 static void
 zfeature_register(spa_feature_t fid, const char *guid, const char *name,
 const char *desc, boolean_t readonly, boolean_t mos,
-const spa_feature_t *deps)
+boolean_t activate_on_enable, const spa_feature_t *deps)
 {
zfeature_info_t *feature = spa_feature_table[fid];
static spa_feature_t nodeps[] = { SPA_FEATURE_NONE };
@@ -138,6 +149,7 @@ zfeature_register(spa_feature_t fid, con
feature-fi_desc = desc;
feature-fi_can_readonly = readonly;
feature-fi_mos = mos;
+   feature-fi_activate_on_enable = activate_on_enable;
feature-fi_depends = deps;
 }
 
@@ -146,21 +158,43 @@ zpool_feature_init(void)
 {
zfeature_register(SPA_FEATURE_ASYNC_DESTROY,
com.delphix:async_destroy, async_destroy,
-   Destroy filesystems asynchronously., B_TRUE, B_FALSE, NULL);
+   Destroy filesystems asynchronously., B_TRUE, B_FALSE,
+   B_FALSE, NULL);
+
zfeature_register(SPA_FEATURE_EMPTY_BPOBJ,
com.delphix:empty_bpobj, empty_bpobj,
-   Snapshots use less space., B_TRUE, B_FALSE, NULL);
+   Snapshots use less space., B_TRUE, B_FALSE,
+   B_FALSE, NULL);
+
zfeature_register(SPA_FEATURE_LZ4_COMPRESS,
org.illumos:lz4_compress, lz4_compress,
-   LZ4 compression algorithm support., B_FALSE, B_FALSE, NULL);
+   LZ4 compression algorithm support., B_FALSE, B_FALSE,
+   B_FALSE, NULL);
+
zfeature_register(SPA_FEATURE_MULTI_VDEV_CRASH_DUMP,
com.joyent:multi_vdev_crash_dump, multi_vdev_crash_dump,
-   Crash dumps to multiple vdev pools., B_FALSE, B_FALSE, NULL);
+   Crash dumps to multiple vdev pools., B_FALSE, B_FALSE,
+   B_FALSE, NULL);
+
zfeature_register(SPA_FEATURE_SPACEMAP_HISTOGRAM,
com.delphix:spacemap_histogram, spacemap_histogram,
-   Spacemaps maintain space histograms., B_TRUE, B_FALSE, NULL);
+   Spacemaps maintain space histograms., B_TRUE, B_FALSE,
+   B_FALSE, NULL);
+
+  

svn commit: r259171 - head/usr.sbin/ndp

2013-12-10 Thread Andrey V. Elsukov
Author: ae
Date: Tue Dec 10 13:34:28 2013
New Revision: 259171
URL: http://svnweb.freebsd.org/changeset/base/259171

Log:
  Remove unused macro ADVANCE() and replace ROUNDUP() macro with ALIGN().
  They aren't the same, but in our use cases ALIGN gives the same results.

Modified:
  head/usr.sbin/ndp/ndp.c

Modified: head/usr.sbin/ndp/ndp.c
==
--- head/usr.sbin/ndp/ndp.c Tue Dec 10 13:33:56 2013(r259170)
+++ head/usr.sbin/ndp/ndp.c Tue Dec 10 13:34:28 2013(r259171)
@@ -109,11 +109,6 @@
 #include unistd.h
 #include gmt2local.h
 
-/* packing rule for routing socket */
-#define ROUNDUP(a) \
-   ((a)  0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-#define ADVANCE(x, n) (x += ROUNDUP((n)-sa_len))
-
 #define NEXTADDR(w, s) \
if (rtm-rtm_addrs  (w)) { \
bcopy((char *)s, cp, sizeof(s)); cp += SA_SIZE(s);}
@@ -421,7 +416,7 @@ set(int argc, char **argv)
/* NOTREACHED */
}
sin = (struct sockaddr_in6 *)(rtm + 1);
-   sdl = (struct sockaddr_dl *)(ROUNDUP(sin-sin6_len) + (char *)sin);
+   sdl = (struct sockaddr_dl *)(ALIGN(sin-sin6_len) + (char *)sin);
if (IN6_ARE_ADDR_EQUAL(sin-sin6_addr, sin_m.sin6_addr)) {
if (sdl-sdl_family == AF_LINK 
!(rtm-rtm_flags  RTF_GATEWAY)) {
@@ -508,7 +503,7 @@ delete(char *host)
/* NOTREACHED */
}
sin = (struct sockaddr_in6 *)(rtm + 1);
-   sdl = (struct sockaddr_dl *)(ROUNDUP(sin-sin6_len) + (char *)sin);
+   sdl = (struct sockaddr_dl *)(ALIGN(sin-sin6_len) + (char *)sin);
if (IN6_ARE_ADDR_EQUAL(sin-sin6_addr, sin_m.sin6_addr)) {
if (sdl-sdl_family == AF_LINK 
!(rtm-rtm_flags  RTF_GATEWAY)) {
@@ -598,7 +593,7 @@ again:;
 
rtm = (struct rt_msghdr *)next;
sin = (struct sockaddr_in6 *)(rtm + 1);
-   sdl = (struct sockaddr_dl *)((char *)sin + 
ROUNDUP(sin-sin6_len));
+   sdl = (struct sockaddr_dl *)((char *)sin + 
ALIGN(sin-sin6_len));
 
/*
 * Some OSes can produce a route that has the LINK flag but
___
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: r259172 - stable/10/sys/net80211

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 13:35:04 2013
New Revision: 259172
URL: http://svnweb.freebsd.org/changeset/base/259172

Log:
  Merge r257754 (by adrian) from head:
  
Don't return ENOBUFS if the transmit path handles the frame but queues
it (eg in power save.)
  
  10.0 candidate.
  
  PR:   kern/183727

Modified:
  stable/10/sys/net80211/ieee80211_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net80211/ieee80211_output.c
==
--- stable/10/sys/net80211/ieee80211_output.c   Tue Dec 10 13:34:28 2013
(r259171)
+++ stable/10/sys/net80211/ieee80211_output.c   Tue Dec 10 13:35:04 2013
(r259172)
@@ -143,8 +143,12 @@ ieee80211_vap_pkt_send_dest(struct ieee8
 */
(void) ieee80211_pwrsave(ni, m);
ieee80211_free_node(ni);
-   /* XXX better status? */
-   return (ENOBUFS);
+
+   /*
+* We queued it fine, so tell the upper layer
+* that we consumed it.
+*/
+   return (0);
}
/* calculate priority so drivers can find the tx queue */
if (ieee80211_classify(ni, m)) {
@@ -155,8 +159,9 @@ ieee80211_vap_pkt_send_dest(struct ieee8
ifp-if_oerrors++;
m_freem(m);
ieee80211_free_node(ni);
+
/* XXX better status? */
-   return (ENOBUFS);
+   return (0);
}
/*
 * Stash the node pointer.  Note that we do this after
@@ -168,7 +173,6 @@ ieee80211_vap_pkt_send_dest(struct ieee8
 
BPF_MTAP(ifp, m);   /* 802.3 tx */
 
-
/*
 * Check if A-MPDU tx aggregation is setup or if we
 * should try to enable it.  The sta must be associated
___
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: r259173 - stable/10/sys/net80211

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 13:36:56 2013
New Revision: 259173
URL: http://svnweb.freebsd.org/changeset/base/259173

Log:
  Merge r258758 (by adrian) from head:
  
Make sure any waiters on the scan results get notified if the scan task
decides to do nothing.
  
If this isn't done, then a scan request whilst a scan occurs in an
active channel set or a completed channel set will hang.
  
  Candidate for 10.0.

Modified:
  stable/10/sys/net80211/ieee80211_scan.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net80211/ieee80211_scan.c
==
--- stable/10/sys/net80211/ieee80211_scan.c Tue Dec 10 13:35:04 2013
(r259172)
+++ stable/10/sys/net80211/ieee80211_scan.c Tue Dec 10 13:36:56 2013
(r259173)
@@ -859,6 +859,7 @@ scan_task(void *arg, int pending)
if (ss-ss_next == ss-ss_last) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
%s: no channels to scan\n, __func__);
+   scandone = 1;
goto done;
}
 
___
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: r259174 - stable/10/sys/net80211

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 13:38:39 2013
New Revision: 259174
URL: http://svnweb.freebsd.org/changeset/base/259174

Log:
  Merge r256294 (by adrian) from head:
  
Fix the am I a net80211 vap check for bpf listeners.
  
I changed it to use if_transmit a while ago but apparently with monitor
mode the if_transmit method is overridden.
  
This is (mostly) a workaround until a more permanent solution can be
found.
  
  Candidate for 10.0.
  
  Submitted by: Patrick Kelsey kel...@ieee.org

Modified:
  stable/10/sys/net80211/ieee80211_freebsd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net80211/ieee80211_freebsd.c
==
--- stable/10/sys/net80211/ieee80211_freebsd.c  Tue Dec 10 13:36:56 2013
(r259173)
+++ stable/10/sys/net80211/ieee80211_freebsd.c  Tue Dec 10 13:38:39 2013
(r259174)
@@ -808,9 +808,9 @@ static eventhandler_tag wlan_ifllevent;
 static void
 bpf_track(void *arg, struct ifnet *ifp, int dlt, int attach)
 {
-   /* NB: identify vap's by if_start */
+   /* NB: identify vap's by if_init */
if (dlt == DLT_IEEE802_11_RADIO 
-   ifp-if_transmit == ieee80211_vap_transmit) {
+   ifp-if_init == ieee80211_init) {
struct ieee80211vap *vap = ifp-if_softc;
/*
 * Track bpf radiotap listener state.  We mark the vap
___
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: r259175 - stable/10/sys/net80211

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 13:42:59 2013
New Revision: 259175
URL: http://svnweb.freebsd.org/changeset/base/259175

Log:
  Merge r257065 (by adrian) from head:
  
Fix a use-after-free node reference issue when waiting for a return
from a management frame transmission.
  
This bug is a bit loopy, so here goes.
  
The underlying cause is pretty easy to understand - the node isn't
referenced before passing into the callout, so if the node is deleted
before the callout fires, it'll dereference free'd memory.
  
The code path however is slightly more convoluted.
  
The functions _say_ mgt_tx - ie management transmit - which is partially
true.  Yes, that callback is attached to the mbuf for some management
frames.  However, it's only for frames relating to scanning and
authentication attempts.  It helpfully drives the VAP state back to
SCAN if the transmission fails _OR_ (as I subsequently found out!)
if the transmission succeeds but the state machine doesn't make progress
towards being authenticated and active.
  
Now, the code itself isn't terribly clear about this.
  
It _looks_ like it's just handling the transmit failure case.
  
However, when you look at what goes on in the transmit success case, it's
moving the VAP state back to SCAN if it hasn't changed state since
the time the callback was scheduled.  Ie, if it's in ASSOC or AUTH still,
it'll go back to SCAN.  But if it has transitioned to the RUN state,
the comparison will fail and it'll not transition things back to the
SCAN state.
  
So, to fix this, I decided to leave everything the way it is and merely
fix the locking and remove the node reference.
  
The _better_ fix would be to turn this callout into a assoc/auth request
timeout callback and make the callout locked, thus eliminating all races.
However, until all the drivers have been fixed so that transmit completions
occur outside of any locking that's going on, it's going to be impossible
to do this without introducing LORs.  So, I leave some of the evilness
in there.
  
  Candidate for 10.0.

Modified:
  stable/10/sys/net80211/ieee80211_output.c
  stable/10/sys/net80211/ieee80211_proto.c
  stable/10/sys/net80211/ieee80211_proto.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/net80211/ieee80211_output.c
==
--- stable/10/sys/net80211/ieee80211_output.c   Tue Dec 10 13:38:39 2013
(r259174)
+++ stable/10/sys/net80211/ieee80211_output.c   Tue Dec 10 13:42:59 2013
(r259175)
@@ -2736,20 +2736,35 @@ ieee80211_alloc_cts(struct ieee80211com 
 static void
 ieee80211_tx_mgt_timeout(void *arg)
 {
-   struct ieee80211_node *ni = arg;
-   struct ieee80211vap *vap = ni-ni_vap;
+   struct ieee80211vap *vap = arg;
 
+   IEEE80211_LOCK(vap-iv_ic);
if (vap-iv_state != IEEE80211_S_INIT 
(vap-iv_ic-ic_flags  IEEE80211_F_SCAN) == 0) {
/*
 * NB: it's safe to specify a timeout as the reason here;
 * it'll only be used in the right state.
 */
-   ieee80211_new_state(vap, IEEE80211_S_SCAN,
+   ieee80211_new_state_locked(vap, IEEE80211_S_SCAN,
IEEE80211_SCAN_FAIL_TIMEOUT);
}
+   IEEE80211_UNLOCK(vap-iv_ic);
 }
 
+/*
+ * This is the callback set on net80211-sourced transmitted
+ * authentication request frames.
+ *
+ * This does a couple of things:
+ *
+ * + If the frame transmitted was a success, it schedules a future
+ *   event which will transition the interface to scan.
+ *   If a state transition _then_ occurs before that event occurs,
+ *   said state transition will cancel this callout.
+ *
+ * + If the frame transmit was a failure, it immediately schedules
+ *   the transition back to scan.
+ */
 static void
 ieee80211_tx_mgt_cb(struct ieee80211_node *ni, void *arg, int status)
 {
@@ -2767,10 +2782,11 @@ ieee80211_tx_mgt_cb(struct ieee80211_nod
 *
 * XXX what happens if !acked but response shows up before callback?
 */
-   if (vap-iv_state == ostate)
+   if (vap-iv_state == ostate) {
callout_reset(vap-iv_mgtsend,
status == 0 ? IEEE80211_TRANS_WAIT*hz : 0,
-   ieee80211_tx_mgt_timeout, ni);
+   ieee80211_tx_mgt_timeout, vap);
+   }
 }
 
 static void

Modified: stable/10/sys/net80211/ieee80211_proto.c
==
--- stable/10/sys/net80211/ieee80211_proto.cTue Dec 10 13:38:39 2013
(r259174)
+++ stable/10/sys/net80211/ieee80211_proto.cTue Dec 10 13:42:59 2013
(r259175)
@@ -107,8 +107,6 @@ static void update_promisc(void *, int);
 static void update_channel(void *, int);
 static void update_chw(void *, int);
 

Re: svn commit: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken

2013-12-10 Thread Tijl Coosemans
On Tue, 10 Dec 2013 15:31:44 +0200 Aleksandr Rybalko wrote:
 That keyboards have no Shift key for that? :)
 I will be glad to apply your changes, but I have to know how it should
 be controlled.
 
 RU and UA PC keyboards have same 3 symbols '2', '', '@'
 To get '2' i have to press only '2'
 To get '@' I have to press Shift+'2'
 To get '' I have to switch to UA or RU and press Shift+'2'
 
 Ahh, or use some called Third-Level (IIRC) in Xorg terms. Temporary
 lang switch. Which commonly mapped to one of Alt. Right?
 So R-Alt+Shift+'2'?

https://en.wikipedia.org/wiki/AltGr
___
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: r259176 - head/usr.sbin/ndp

2013-12-10 Thread Andrey V. Elsukov
Author: ae
Date: Tue Dec 10 14:17:07 2013
New Revision: 259176
URL: http://svnweb.freebsd.org/changeset/base/259176

Log:
  Change the type of addr argument in dump() function to be able
  disambiguate link-local addresses from different zones.

Modified:
  head/usr.sbin/ndp/ndp.c

Modified: head/usr.sbin/ndp/ndp.c
==
--- head/usr.sbin/ndp/ndp.c Tue Dec 10 13:42:59 2013(r259175)
+++ head/usr.sbin/ndp/ndp.c Tue Dec 10 14:17:07 2013(r259176)
@@ -131,7 +131,7 @@ void getsocket(void);
 int set(int, char **);
 void get(char *);
 int delete(char *);
-void dump(struct in6_addr *, int);
+void dump(struct sockaddr_in6 *, int);
 static struct in6_nbrinfo *getnbrinfo(struct in6_addr *, int, int);
 static char *ether_str(struct sockaddr_dl *);
 int ndp_ether_aton(char *, u_char *);
@@ -461,7 +461,9 @@ get(char *host)
return;
}
sin-sin6_addr = ((struct sockaddr_in6 *)res-ai_addr)-sin6_addr;
-   dump(sin-sin6_addr, 0);
+   sin-sin6_scope_id =
+   ((struct sockaddr_in6 *)res-ai_addr)-sin6_scope_id;
+   dump(sin, 0);
if (found_entry == 0) {
getnameinfo((struct sockaddr *)sin, sin-sin6_len, host_buf,
sizeof(host_buf), NULL ,0,
@@ -543,7 +545,7 @@ delete:
  * Dump the entire neighbor cache
  */
 void
-dump(struct in6_addr *addr, int cflag)
+dump(struct sockaddr_in6 *addr, int cflag)
 {
int mib[6];
size_t needed;
@@ -615,7 +617,9 @@ again:;
continue;
 
if (addr) {
-   if (!IN6_ARE_ADDR_EQUAL(addr, sin-sin6_addr))
+   if (IN6_ARE_ADDR_EQUAL(addr-sin6_addr,
+   sin-sin6_addr) == 0 ||
+   addr-sin6_scope_id != sin-sin6_scope_id)
continue;
found_entry = 1;
} else if (IN6_IS_ADDR_MULTICAST(sin-sin6_addr))
___
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: r259178 - in head/sys: conf dev/vt

2013-12-10 Thread Aleksandr Rybalko
Author: ray
Date: Tue Dec 10 15:36:29 2013
New Revision: 259178
URL: http://svnweb.freebsd.org/changeset/base/259178

Log:
  Break build with error in case when both syscons and newcons are enabled.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/conf/options
  head/sys/dev/vt/vt.h

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Tue Dec 10 14:54:11 2013(r259177)
+++ head/sys/conf/options   Tue Dec 10 15:36:29 2013(r259178)
@@ -757,6 +757,9 @@ SC_NORM_REV_ATTRopt_syscons.h
 SC_PIXEL_MODE  opt_syscons.h
 SC_RENDER_DEBUGopt_syscons.h
 SC_TWOBUTTON_MOUSE opt_syscons.h
+DEV_SC opt_syscons.h
+DEV_VT opt_syscons.h
+
 
 # teken terminal emulator options
 TEKEN_CONS25   opt_teken.h

Modified: head/sys/dev/vt/vt.h
==
--- head/sys/dev/vt/vt.hTue Dec 10 14:54:11 2013(r259177)
+++ head/sys/dev/vt/vt.hTue Dec 10 15:36:29 2013(r259178)
@@ -49,6 +49,11 @@
 #include opt_syscons.h
 #include opt_splash.h
 
+#ifdef DEV_SC
+#error Build with both syscons and vt is not supported. Please enable only \
+one 'device sc' or 'device vt'
+#endif
+
 #ifndefVT_MAXWINDOWS
 #ifdef MAXCONS
 #defineVT_MAXWINDOWS   MAXCONS
___
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: r259179 - in head/sys: dev/drm2 modules/drm2/drm2 modules/drm2/i915kms modules/drm2/radeonkms

2013-12-10 Thread Aleksandr Rybalko
Author: ray
Date: Tue Dec 10 15:53:00 2013
New Revision: 259179
URL: http://svnweb.freebsd.org/changeset/base/259179

Log:
  Disable error message about failed attempt to attach fbd when drm2 built with
  syscons.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/drm2/drmP.h
  head/sys/dev/drm2/drm_fb_helper.c
  head/sys/modules/drm2/drm2/Makefile
  head/sys/modules/drm2/i915kms/Makefile
  head/sys/modules/drm2/radeonkms/Makefile

Modified: head/sys/dev/drm2/drmP.h
==
--- head/sys/dev/drm2/drmP.hTue Dec 10 15:36:29 2013(r259178)
+++ head/sys/dev/drm2/drmP.hTue Dec 10 15:53:00 2013(r259179)
@@ -113,6 +113,7 @@ struct drm_device;
 
 #include opt_compat.h
 #include opt_drm.h
+#include opt_syscons.h
 #ifdef DRM_DEBUG
 #undef DRM_DEBUG
 #define DRM_DEBUG_DEFAULT_ON 1

Modified: head/sys/dev/drm2/drm_fb_helper.c
==
--- head/sys/dev/drm2/drm_fb_helper.c   Tue Dec 10 15:36:29 2013
(r259178)
+++ head/sys/dev/drm2/drm_fb_helper.c   Tue Dec 10 15:53:00 2013
(r259179)
@@ -1044,8 +1044,10 @@ int drm_fb_helper_single_fb_probe(struct
kdev = fb_helper-dev-device;
fbd = device_add_child(kdev, fbd, device_get_unit(kdev));
ret = device_probe_and_attach(fbd);
+#ifdef DEV_VT
if (ret != 0)
DRM_ERROR(Failed to attach fbd device: %d\n, ret);
+#endif
}
 #else
if (new_fb) {

Modified: head/sys/modules/drm2/drm2/Makefile
==
--- head/sys/modules/drm2/drm2/Makefile Tue Dec 10 15:36:29 2013
(r259178)
+++ head/sys/modules/drm2/drm2/Makefile Tue Dec 10 15:53:00 2013
(r259179)
@@ -54,6 +54,6 @@ SRCS  += drm_ioc32.c
 .endif
 
 SRCS   +=device_if.h bus_if.h pci_if.h device_if.h iicbus_if.h opt_drm.h \
-   opt_vm.h opt_compat.h
+   opt_vm.h opt_compat.h opt_syscons.h
 
 .include bsd.kmod.mk

Modified: head/sys/modules/drm2/i915kms/Makefile
==
--- head/sys/modules/drm2/i915kms/Makefile  Tue Dec 10 15:36:29 2013
(r259178)
+++ head/sys/modules/drm2/i915kms/Makefile  Tue Dec 10 15:53:00 2013
(r259179)
@@ -35,6 +35,6 @@ SRCS  += i915_ioc32.c
 .endif
 
 SRCS   += device_if.h fb_if.h bus_if.h pci_if.h iicbus_if.h iicbb_if.h \
-opt_drm.h opt_compat.h
+opt_drm.h opt_compat.h opt_syscons.h
 
 .include bsd.kmod.mk

Modified: head/sys/modules/drm2/radeonkms/Makefile
==
--- head/sys/modules/drm2/radeonkms/MakefileTue Dec 10 15:36:29 2013
(r259178)
+++ head/sys/modules/drm2/radeonkms/MakefileTue Dec 10 15:53:00 2013
(r259179)
@@ -94,6 +94,7 @@ SRCS  +=  
\
opt_acpi.h  \
opt_compat.h\
opt_drm.h   \
+   opt_syscons.h   \
acpi_if.h   \
bus_if.h\
fb_if.h \
___
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: r259180 - head/sys/dev/hyperv/netvsc

2013-12-10 Thread Pawel Jakub Dawidek
Author: pjd
Date: Tue Dec 10 17:16:13 2013
New Revision: 259180
URL: http://svnweb.freebsd.org/changeset/base/259180

Log:
  Fix missing new line after:
  
Netvsc initializing...
  
  during boot.

Modified:
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Tue Dec 10 15:53:00 
2013(r259179)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c  Tue Dec 10 17:16:13 
2013(r259180)
@@ -190,6 +190,7 @@ netvsc_init(void)
if (!cold  !g_netvsc_drv.drv_inited) {
g_netvsc_drv.drv_inited = 1;
netvsc_drv_init();
+   printf(done!\n);
} else {
printf(Already initialized!\n);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259182 - head/usr.sbin/ctld

2013-12-10 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Dec 10 17:27:11 2013
New Revision: 259182
URL: http://svnweb.freebsd.org/changeset/base/259182

Log:
  Fix handling for empty auth-groups.  Without it, ctld child process
  would either exit on assertion, or, if assertions are not enabled,
  fail to authenticate the target.
  
  MFC after:2 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/ctld/login.c

Modified: head/usr.sbin/ctld/login.c
==
--- head/usr.sbin/ctld/login.c  Tue Dec 10 17:26:52 2013(r259181)
+++ head/usr.sbin/ctld/login.c  Tue Dec 10 17:27:11 2013(r259182)
@@ -1007,6 +1007,14 @@ login(struct connection *conn)
return;
}
 
+   if (ag-ag_type == AG_TYPE_UNKNOWN) {
+   /*
+* This can happen with empty auth-group.
+*/
+   login_send_error(request, 0x02, 0x01);
+   log_errx(1, auth-group type not set, denying access);
+   }
+
log_debugx(CHAP authentication required);
 
auth_method = keys_find(request_keys, AuthMethod);
___
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: r259181 - releng/10.0/release

2013-12-10 Thread Glen Barber
Author: gjb
Date: Tue Dec 10 17:26:52 2013
New Revision: 259181
URL: http://svnweb.freebsd.org/changeset/base/259181

Log:
  MFstable10 r259151:
Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually
passed to 'make release'.
  
  Approved by:  re (glebius)
  Sponsored by: The FreeBSD Foundation

Modified:
  releng/10.0/release/release.conf.sample
  releng/10.0/release/release.sh
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/release/release.conf.sample
==
--- releng/10.0/release/release.conf.sample Tue Dec 10 17:16:13 2013
(r259180)
+++ releng/10.0/release/release.conf.sample Tue Dec 10 17:26:52 2013
(r259181)
@@ -39,3 +39,4 @@ PORTBRANCH=ports/head@rHEAD
 #NODOC=
 #NOPORTS=
 #RELSTRING=
+#WITH_DVD=

Modified: releng/10.0/release/release.sh
==
--- releng/10.0/release/release.sh  Tue Dec 10 17:16:13 2013
(r259180)
+++ releng/10.0/release/release.sh  Tue Dec 10 17:26:52 2013
(r259181)
@@ -72,6 +72,9 @@ KERNEL=GENERIC
 NODOC=
 NOPORTS=
 
+# Set to non-empty value to build dvd1.iso as part of the release.
+WITH_DVD=
+
 usage() {
echo Usage: $0 [-c release.conf]
exit 1
@@ -129,7 +132,7 @@ CHROOT_DMAKEFLAGS=${CONF_FILES}
 RELEASE_WMAKEFLAGS=${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}
 RELEASE_KMAKEFLAGS=${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\${KERNEL}\ 
${ARCH_FLAGS} ${CONF_FILES}
 RELEASE_RMAKEFLAGS=${ARCH_FLAGS} KERNCONF=\${KERNEL}\ ${CONF_FILES} \
-   ${DOCPORTS}
+   ${DOCPORTS} WITH_DVD=${WITH_DVD}
 
 # Force src checkout if configured
 FORCE_SRC_KEY=
___
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: r259183 - head/sys/dev/iscsi

2013-12-10 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Dec 10 18:18:39 2013
New Revision: 259183
URL: http://svnweb.freebsd.org/changeset/base/259183

Log:
  Properly refuse handoff requests on already connected sessions.  Previously
  this would result in dropping the session.
  
  MFC after:2 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/iscsi/iscsi.c

Modified: head/sys/dev/iscsi/iscsi.c
==
--- head/sys/dev/iscsi/iscsi.c  Tue Dec 10 17:27:11 2013(r259182)
+++ head/sys/dev/iscsi/iscsi.c  Tue Dec 10 18:18:39 2013(r259183)
@@ -1247,6 +1247,18 @@ iscsi_ioctl_daemon_handoff(struct iscsi_
sx_sunlock(sc-sc_lock);
return (EINVAL);
}
+   if (is-is_connected) {
+   /*
+* This might have happened because another iscsid(8)
+* instance handed off the connection in the meantime.
+* Just return.
+*/
+   ISCSI_SESSION_WARN(is, handoff on already connected 
+   session);
+   ISCSI_SESSION_UNLOCK(is);
+   sx_sunlock(sc-sc_lock);
+   return (EBUSY);
+   }
 
strlcpy(is-is_target_alias, handoff-idh_target_alias,
sizeof(is-is_target_alias));
___
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: r259185 - releng/10.0/sys/net80211

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 19:14:19 2013
New Revision: 259185
URL: http://svnweb.freebsd.org/changeset/base/259185

Log:
  Merge r259173 from stable/10 (head r258758 by adrian):
  
Make sure any waiters on the scan results get notified if the scan task
decides to do nothing.
  
If this isn't done, then a scan request whilst a scan occurs in an
active channel set or a completed channel set will hang.
  
  Approved by:  re (glebius)

Modified:
  releng/10.0/sys/net80211/ieee80211_scan.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/net80211/ieee80211_scan.c
==
--- releng/10.0/sys/net80211/ieee80211_scan.c   Tue Dec 10 19:12:16 2013
(r259184)
+++ releng/10.0/sys/net80211/ieee80211_scan.c   Tue Dec 10 19:14:19 2013
(r259185)
@@ -859,6 +859,7 @@ scan_task(void *arg, int pending)
if (ss-ss_next == ss-ss_last) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
%s: no channels to scan\n, __func__);
+   scandone = 1;
goto done;
}
 
___
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: r259184 - releng/10.0/sys/net80211

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 19:12:16 2013
New Revision: 259184
URL: http://svnweb.freebsd.org/changeset/base/259184

Log:
  Merge r259172 from stable/10 (head r257754 by adrian):
  
Don't return ENOBUFS if the transmit path handles the frame but queues
it (eg in power save.)
  
  PR:   kern/183727
  Approved by:  re (glebius)

Modified:
  releng/10.0/sys/net80211/ieee80211_output.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/net80211/ieee80211_output.c
==
--- releng/10.0/sys/net80211/ieee80211_output.c Tue Dec 10 18:18:39 2013
(r259183)
+++ releng/10.0/sys/net80211/ieee80211_output.c Tue Dec 10 19:12:16 2013
(r259184)
@@ -143,8 +143,12 @@ ieee80211_vap_pkt_send_dest(struct ieee8
 */
(void) ieee80211_pwrsave(ni, m);
ieee80211_free_node(ni);
-   /* XXX better status? */
-   return (ENOBUFS);
+
+   /*
+* We queued it fine, so tell the upper layer
+* that we consumed it.
+*/
+   return (0);
}
/* calculate priority so drivers can find the tx queue */
if (ieee80211_classify(ni, m)) {
@@ -155,8 +159,9 @@ ieee80211_vap_pkt_send_dest(struct ieee8
ifp-if_oerrors++;
m_freem(m);
ieee80211_free_node(ni);
+
/* XXX better status? */
-   return (ENOBUFS);
+   return (0);
}
/*
 * Stash the node pointer.  Note that we do this after
@@ -168,7 +173,6 @@ ieee80211_vap_pkt_send_dest(struct ieee8
 
BPF_MTAP(ifp, m);   /* 802.3 tx */
 
-
/*
 * Check if A-MPDU tx aggregation is setup or if we
 * should try to enable it.  The sta must be associated
___
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: r259186 - head/share/man/man4

2013-12-10 Thread Joel Dahl
Author: joel (doc committer)
Date: Tue Dec 10 19:15:26 2013
New Revision: 259186
URL: http://svnweb.freebsd.org/changeset/base/259186

Log:
  Minor mdoc fixes.

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

Modified: head/share/man/man4/netmap.4
==
--- head/share/man/man4/netmap.4Tue Dec 10 19:14:19 2013
(r259185)
+++ head/share/man/man4/netmap.4Tue Dec 10 19:15:26 2013
(r259186)
@@ -77,7 +77,6 @@ sockets or BPF/pcap).
 For a list of devices with native
 .Nm
 support, see the end of this manual page.
-.Pp
 .Sh OPERATION - THE NETMAP API
 .Nm
 clients must first
@@ -99,7 +98,6 @@ interface or on a port of a
 switch, as indicated below. Additional fields in the
 .Pa struct nmreq
 control the details of operation.
-.Pp
 .Bl -tag -width 
 .It Dv Interface name (e.g. 'em0', 'eth1', ... )
 The data path of the interface is disconnected from the host stack.
@@ -237,7 +235,6 @@ accordingly, as shown in the figure belo
 |-- avail --|   (before syscall)
cur
 .Ed
-
 In receive rings, after a system call 'cur' indicates
 the first slot that contains a valid packet,
 and 'avail' reports how many of them are available.
@@ -289,7 +286,6 @@ are normally fixed size (2 Kbyte) buffer
 that contain packet data. Buffers addresses are computed through
 macros.
 .El
-.Pp
 .Bl -tag -width XXX
 Some macros support the access to objects in the shared memory
 region. In particular,
___
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: r259187 - releng/10.0/sys/net80211

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 19:17:31 2013
New Revision: 259187
URL: http://svnweb.freebsd.org/changeset/base/259187

Log:
  Merge r259174 from stable/10 (head r256294 by adrian):
  
Fix the am I a net80211 vap check for bpf listeners.
  
I changed it to use if_transmit a while ago but apparently with monitor
mode the if_transmit method is overridden.
  
This is (mostly) a workaround until a more permanent solution can be
found.
  
  Submitted by: Patrick Kelsey kel...@ieee.org
  Approved by:  re (glebius)

Modified:
  releng/10.0/sys/net80211/ieee80211_freebsd.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/net80211/ieee80211_freebsd.c
==
--- releng/10.0/sys/net80211/ieee80211_freebsd.cTue Dec 10 19:15:26 
2013(r259186)
+++ releng/10.0/sys/net80211/ieee80211_freebsd.cTue Dec 10 19:17:31 
2013(r259187)
@@ -808,9 +808,9 @@ static eventhandler_tag wlan_ifllevent;
 static void
 bpf_track(void *arg, struct ifnet *ifp, int dlt, int attach)
 {
-   /* NB: identify vap's by if_start */
+   /* NB: identify vap's by if_init */
if (dlt == DLT_IEEE802_11_RADIO 
-   ifp-if_transmit == ieee80211_vap_transmit) {
+   ifp-if_init == ieee80211_init) {
struct ieee80211vap *vap = ifp-if_softc;
/*
 * Track bpf radiotap listener state.  We mark the vap
___
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: r259188 - releng/10.0/sys/net80211

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 19:22:02 2013
New Revision: 259188
URL: http://svnweb.freebsd.org/changeset/base/259188

Log:
  Merge r259175 from stable/10 (head r257065 by adrian):
  
  Fix a use-after-free node reference issue when waiting for a return
  from a management frame transmission.
  
  Approved by:  re (glebius)

Modified:
  releng/10.0/sys/net80211/ieee80211_output.c
  releng/10.0/sys/net80211/ieee80211_proto.c
  releng/10.0/sys/net80211/ieee80211_proto.h
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/net80211/ieee80211_output.c
==
--- releng/10.0/sys/net80211/ieee80211_output.c Tue Dec 10 19:17:31 2013
(r259187)
+++ releng/10.0/sys/net80211/ieee80211_output.c Tue Dec 10 19:22:02 2013
(r259188)
@@ -2736,20 +2736,35 @@ ieee80211_alloc_cts(struct ieee80211com 
 static void
 ieee80211_tx_mgt_timeout(void *arg)
 {
-   struct ieee80211_node *ni = arg;
-   struct ieee80211vap *vap = ni-ni_vap;
+   struct ieee80211vap *vap = arg;
 
+   IEEE80211_LOCK(vap-iv_ic);
if (vap-iv_state != IEEE80211_S_INIT 
(vap-iv_ic-ic_flags  IEEE80211_F_SCAN) == 0) {
/*
 * NB: it's safe to specify a timeout as the reason here;
 * it'll only be used in the right state.
 */
-   ieee80211_new_state(vap, IEEE80211_S_SCAN,
+   ieee80211_new_state_locked(vap, IEEE80211_S_SCAN,
IEEE80211_SCAN_FAIL_TIMEOUT);
}
+   IEEE80211_UNLOCK(vap-iv_ic);
 }
 
+/*
+ * This is the callback set on net80211-sourced transmitted
+ * authentication request frames.
+ *
+ * This does a couple of things:
+ *
+ * + If the frame transmitted was a success, it schedules a future
+ *   event which will transition the interface to scan.
+ *   If a state transition _then_ occurs before that event occurs,
+ *   said state transition will cancel this callout.
+ *
+ * + If the frame transmit was a failure, it immediately schedules
+ *   the transition back to scan.
+ */
 static void
 ieee80211_tx_mgt_cb(struct ieee80211_node *ni, void *arg, int status)
 {
@@ -2767,10 +2782,11 @@ ieee80211_tx_mgt_cb(struct ieee80211_nod
 *
 * XXX what happens if !acked but response shows up before callback?
 */
-   if (vap-iv_state == ostate)
+   if (vap-iv_state == ostate) {
callout_reset(vap-iv_mgtsend,
status == 0 ? IEEE80211_TRANS_WAIT*hz : 0,
-   ieee80211_tx_mgt_timeout, ni);
+   ieee80211_tx_mgt_timeout, vap);
+   }
 }
 
 static void

Modified: releng/10.0/sys/net80211/ieee80211_proto.c
==
--- releng/10.0/sys/net80211/ieee80211_proto.c  Tue Dec 10 19:17:31 2013
(r259187)
+++ releng/10.0/sys/net80211/ieee80211_proto.c  Tue Dec 10 19:22:02 2013
(r259188)
@@ -107,8 +107,6 @@ static void update_promisc(void *, int);
 static void update_channel(void *, int);
 static void update_chw(void *, int);
 static void ieee80211_newstate_cb(void *, int);
-static int ieee80211_new_state_locked(struct ieee80211vap *,
-   enum ieee80211_state, int);
 
 static int
 null_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
@@ -1834,7 +1832,7 @@ done:
  * is usually a mistake and indicates lack of proper integration
  * with the net80211 layer.
  */
-static int
+int
 ieee80211_new_state_locked(struct ieee80211vap *vap,
enum ieee80211_state nstate, int arg)
 {

Modified: releng/10.0/sys/net80211/ieee80211_proto.h
==
--- releng/10.0/sys/net80211/ieee80211_proto.h  Tue Dec 10 19:17:31 2013
(r259187)
+++ releng/10.0/sys/net80211/ieee80211_proto.h  Tue Dec 10 19:22:02 2013
(r259188)
@@ -332,6 +332,8 @@ voidieee80211_dturbo_switch(struct ieee
 void   ieee80211_swbmiss(void *arg);
 void   ieee80211_beacon_miss(struct ieee80211com *);
 intieee80211_new_state(struct ieee80211vap *, enum ieee80211_state, int);
+intieee80211_new_state_locked(struct ieee80211vap *, enum ieee80211_state,
+   int);
 void   ieee80211_print_essid(const uint8_t *, int);
 void   ieee80211_dump_pkt(struct ieee80211com *,
const uint8_t *, int, int, int);
___
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: r259150 - head/sys/dev/cxgbe

2013-12-10 Thread Gleb Smirnoff
On Tue, Dec 10, 2013 at 12:07:04AM +, Adrian Chadd wrote:
A Author: adrian
A Date: Tue Dec 10 00:07:04 2013
A New Revision: 259150
A URL: http://svnweb.freebsd.org/changeset/base/259150
A 
A Log:
A   Print out the full PCIe link negotiation during dmesg.
A   
A   I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot
A   or not.
A   
A   Reviewed by:   np
A   Sponsored by:  Netflix, inc.

Shouldn't this be done with common code for all drivers
on PCI bus(es)?

This is definitely useful for all devices, not to cxgbe(4) only.


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


Re: svn commit: r259150 - head/sys/dev/cxgbe

2013-12-10 Thread John Baldwin
On Tuesday, December 10, 2013 2:26:50 pm Gleb Smirnoff wrote:
 On Tue, Dec 10, 2013 at 12:07:04AM +, Adrian Chadd wrote:
 A Author: adrian
 A Date: Tue Dec 10 00:07:04 2013
 A New Revision: 259150
 A URL: http://svnweb.freebsd.org/changeset/base/259150
 A 
 A Log:
 A   Print out the full PCIe link negotiation during dmesg.
 A   
 A   I found this useful when checking whether a NIC is in a PCIE 3.0 8x 
slot
 A   or not.
 A   
 A   Reviewed by: np
 A   Sponsored by:Netflix, inc.
 
 Shouldn't this be done with common code for all drivers
 on PCI bus(es)?
 
 This is definitely useful for all devices, not to cxgbe(4) only.

It's already done in pciconf -lc which is the right place to put this instead 
of adding more noise to dmesg.

-- 
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: r259150 - head/sys/dev/cxgbe

2013-12-10 Thread Alexander Motin

On 10.12.2013 21:26, Gleb Smirnoff wrote:

On Tue, Dec 10, 2013 at 12:07:04AM +, Adrian Chadd wrote:
A Author: adrian
A Date: Tue Dec 10 00:07:04 2013
A New Revision: 259150
A URL: http://svnweb.freebsd.org/changeset/base/259150
A
A Log:
A   Print out the full PCIe link negotiation during dmesg.
A
A   I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot
A   or not.
A
A   Reviewed by:np
A   Sponsored by:   Netflix, inc.

Shouldn't this be done with common code for all drivers
on PCI bus(es)?

This is definitely useful for all devices, not to cxgbe(4) only.


Why not just read `pciconf -lc` output for that?

--
Alexander Motin
___
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: r259189 - head/games/fortune/datfiles

2013-12-10 Thread Gavin Atkinson
Author: gavin
Date: Tue Dec 10 19:42:35 2013
New Revision: 259189
URL: http://svnweb.freebsd.org/changeset/base/259189

Log:
  Fix typo in fortune (go - to)

Modified:
  head/games/fortune/datfiles/fortunes

Modified: head/games/fortune/datfiles/fortunes
==
--- head/games/fortune/datfiles/fortunesTue Dec 10 19:22:02 2013
(r259188)
+++ head/games/fortune/datfiles/fortunesTue Dec 10 19:42:35 2013
(r259189)
@@ -46677,7 +46677,7 @@ they had just discovered that he lived i
 taken another one of those damned Vermont winters!
 %
 THE OLD POOL SHOOTER had won many a game in his life. But now it was time
-to hang up the cue. When he did, all the other cues came crashing go the
+to hang up the cue. When he did, all the other cues came crashing to the
 floor.
 
 Sorry, he said with a smile.
___
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: r259190 - stable/9/sys/arm/arm

2013-12-10 Thread Warner Losh
Author: imp
Date: Tue Dec 10 19:48:48 2013
New Revision: 259190
URL: http://svnweb.freebsd.org/changeset/base/259190

Log:
  Hand merge from current r235717:
  Implement pmap_mincore for arm.  Now programs using it don't cause a
  flood of console messages.
  
  Reviewed by:  alc@

Modified:
  stable/9/sys/arm/arm/pmap.c

Modified: stable/9/sys/arm/arm/pmap.c
==
--- stable/9/sys/arm/arm/pmap.c Tue Dec 10 19:42:35 2013(r259189)
+++ stable/9/sys/arm/arm/pmap.c Tue Dec 10 19:48:48 2013(r259190)
@@ -4675,9 +4675,59 @@ pmap_remove_write(vm_page_t m)
 int
 pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa)
 {
-   printf(pmap_mincore()\n);
-   
-   return (0);
+   struct l2_bucket *l2b;
+   pt_entry_t *ptep, pte;
+   vm_paddr_t pa;
+   vm_page_t m;
+   int val;
+   boolean_t managed;
+
+   PMAP_LOCK(pmap);
+retry:
+   l2b = pmap_get_l2_bucket(pmap, addr);
+if (l2b == NULL) {
+val = 0;
+goto out;
+}
+   ptep = l2b-l2b_kva[l2pte_index(addr)];
+   pte = *ptep;
+   if (!l2pte_valid(pte)) {
+   val = 0;
+   goto out;
+   }
+   val = MINCORE_INCORE;
+   if (pte  L2_S_PROT_W)
+   val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER;
+managed = false;
+   pa = l2pte_pa(pte);
+m = PHYS_TO_VM_PAGE(pa);
+if (m != NULL  !(m-oflags  VPO_UNMANAGED))
+managed = true;
+   if (managed) {
+   /*
+* The ARM pmap tries to maintain a per-mapping
+* reference bit.  The trouble is that it's kept in
+* the PV entry, not the PTE, so it's costly to access
+* here.  You would need to acquire the pvh global
+* lock, call pmap_find_pv(), and introduce a custom
+* version of vm_page_pa_tryrelock() that releases and
+* reacquires the pvh global lock.  In the end, I
+* doubt it's worthwhile.  This may falsely report
+* the given address as referenced.
+*/
+   if ((m-md.pvh_attrs  PVF_REF) != 0)
+   val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER;
+   }
+   if ((val  (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)) !=
+   (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)  managed) {
+   /* Ensure that PHYS_TO_VM_PAGE(pa)-object doesn't change. */
+   if (vm_page_pa_tryrelock(pmap, pa, locked_pa))
+   goto retry;
+   } else
+out:
+   PA_UNLOCK_COND(*locked_pa);
+   PMAP_UNLOCK(pmap);
+   return (val);
 }
 
 
___
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: r259191 - head/sbin/hastd

2013-12-10 Thread Mikolaj Golub
Author: trociny
Date: Tue Dec 10 19:56:26 2013
New Revision: 259191
URL: http://svnweb.freebsd.org/changeset/base/259191

Log:
  For memsync replication, hio_countdown is used not only as an
  indication when a request can be moved to done queue, but also for
  detecting the current state of memsync request.
  
  This approach has problems, e.g. leaking a request if memsynk ack from
  the secondary failed, or racy usage of write_complete, which should be
  called only once per write request, but for memsync can be entered by
  local_send_thread and ggate_send_thread simultaneously.
  
  So the following approach is implemented instead:
  
  1) Use hio_countdown only for counting components we waiting to
 complete, i.e. initially it is always 2 for any replication mode.
  
  2) To distinguish between memsync ack and memsync fin responses
 from the secondary, add and use hio_memsyncacked field.
  
  3) write_complete() in component threads is called only before
 releasing hio_countdown (i.e. before the hio may be returned to the
 done queue).
  
  4) Add and use hio_writecount refcounter to detect when
 write_complete() can be called in memsync case.
  
  Reported by:  Pete French petefrench ingresso.co.uk
  Tested by:Pete French petefrench ingresso.co.uk
  MFC after:2 weeks

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==
--- head/sbin/hastd/primary.c   Tue Dec 10 19:48:48 2013(r259190)
+++ head/sbin/hastd/primary.c   Tue Dec 10 19:56:26 2013(r259191)
@@ -94,6 +94,15 @@ struct hio {
 */
bool hio_done;
/*
+* Number of components we are still waiting before sending write
+* completion ack to GEOM Gate. Used for memsync.
+*/
+   refcnt_t hio_writecount;
+   /*
+* Memsync request was acknowleged by remote.
+*/
+   bool hio_memsyncacked;
+   /*
 * Remember replication from the time the request was initiated,
 * so we won't get confused when replication changes on reload.
 */
@@ -231,6 +240,9 @@ static pthread_mutex_t metadata_lock;
 #defineISSYNCREQ(hio)  ((hio)-hio_ggio.gctl_unit == -1)
 #defineSYNCREQDONE(hio)do { (hio)-hio_ggio.gctl_unit = -2; } 
while (0)
 #defineISSYNCREQDONE(hio)  ((hio)-hio_ggio.gctl_unit == -2)
+#define ISMEMSYNCWRITE(hio)\
+   (((hio)-hio_replication == HAST_REPLICATION_MEMSYNC  \
+   (hio)-hio_ggio.gctl_cmd == BIO_WRITE  !ISSYNCREQ(hio)))
 
 static struct hast_resource *gres;
 
@@ -1344,6 +1356,10 @@ ggate_recv_thread(void *arg)
} else {
mtx_unlock(res-hr_amp_lock);
}
+   if (hio-hio_replication == HAST_REPLICATION_MEMSYNC) {
+   hio-hio_memsyncacked = false;
+   refcnt_init(hio-hio_writecount, ncomps);
+   }
break;
case BIO_DELETE:
res-hr_stat_delete++;
@@ -1354,13 +1370,7 @@ ggate_recv_thread(void *arg)
}
pjdlog_debug(2,
ggate_recv: (%p) Moving request to the send queues., hio);
-   if (hio-hio_replication == HAST_REPLICATION_MEMSYNC 
-   ggio-gctl_cmd == BIO_WRITE) {
-   /* Each remote request needs two responses in memsync. 
*/
-   refcnt_init(hio-hio_countdown, ncomps + 1);
-   } else {
-   refcnt_init(hio-hio_countdown, ncomps);
-   }
+   refcnt_init(hio-hio_countdown, ncomps);
for (ii = ncomp; ii  ncomps; ii++)
QUEUE_INSERT1(hio, send, ii);
}
@@ -1470,42 +1480,13 @@ local_send_thread(void *arg)
}
break;
}
-
-   if (hio-hio_replication != HAST_REPLICATION_MEMSYNC ||
-   ggio-gctl_cmd != BIO_WRITE || ISSYNCREQ(hio)) {
-   if (refcnt_release(hio-hio_countdown)  0)
-   continue;
-   } else {
-   /*
-* Depending on hio_countdown value, requests finished
-* in the following order:
-* 0: remote memsync, remote final, local write
-* 1: remote memsync, local write, (remote final)
-* 2: local write, (remote memsync), (remote final)
-*/
-   switch (refcnt_release(hio-hio_countdown)) {
-   case 0:
-   /*
-* Local write finished as last.
-   

svn commit: r259192 - head/sbin/hastd

2013-12-10 Thread Mikolaj Golub
Author: trociny
Date: Tue Dec 10 19:58:10 2013
New Revision: 259192
URL: http://svnweb.freebsd.org/changeset/base/259192

Log:
  Add some macros to make the code more readable (no functional chages).
  
  MFC after:2 weeks

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==
--- head/sbin/hastd/primary.c   Tue Dec 10 19:56:26 2013(r259191)
+++ head/sbin/hastd/primary.c   Tue Dec 10 19:58:10 2013(r259192)
@@ -233,6 +233,10 @@ static pthread_mutex_t metadata_lock;
mtx_unlock(hio_##name##_list_lock);\
 } while (0)
 
+#define ISFULLSYNC(hio)((hio)-hio_replication == 
HAST_REPLICATION_FULLSYNC)
+#define ISMEMSYNC(hio) ((hio)-hio_replication == HAST_REPLICATION_MEMSYNC)
+#define ISASYNC(hio)   ((hio)-hio_replication == HAST_REPLICATION_ASYNC)
+
 #defineSYNCREQ(hio)do {
\
(hio)-hio_ggio.gctl_unit = -1; \
(hio)-hio_ggio.gctl_seq = 1;   \
@@ -240,9 +244,9 @@ static pthread_mutex_t metadata_lock;
 #defineISSYNCREQ(hio)  ((hio)-hio_ggio.gctl_unit == -1)
 #defineSYNCREQDONE(hio)do { (hio)-hio_ggio.gctl_unit = -2; } 
while (0)
 #defineISSYNCREQDONE(hio)  ((hio)-hio_ggio.gctl_unit == -2)
-#define ISMEMSYNCWRITE(hio)\
-   (((hio)-hio_replication == HAST_REPLICATION_MEMSYNC  \
-   (hio)-hio_ggio.gctl_cmd == BIO_WRITE  !ISSYNCREQ(hio)))
+
+#define ISMEMSYNCWRITE(hio)(ISMEMSYNC(hio)   \
+   (hio)-hio_ggio.gctl_cmd == BIO_WRITE  !ISSYNCREQ(hio))
 
 static struct hast_resource *gres;
 
@@ -1356,7 +1360,7 @@ ggate_recv_thread(void *arg)
} else {
mtx_unlock(res-hr_amp_lock);
}
-   if (hio-hio_replication == HAST_REPLICATION_MEMSYNC) {
+   if (ISMEMSYNC(hio)) {
hio-hio_memsyncacked = false;
refcnt_init(hio-hio_writecount, ncomps);
}
@@ -1441,8 +1445,7 @@ local_send_thread(void *arg)
ret, (intmax_t)ggio-gctl_length);
} else {
hio-hio_errors[ncomp] = 0;
-   if (hio-hio_replication ==
-   HAST_REPLICATION_ASYNC) {
+   if (ISASYNC(hio)) {
ggio-gctl_error = 0;
write_complete(res, hio);
}
___
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: r259193 - head/sbin/hastd

2013-12-10 Thread Mikolaj Golub
Author: trociny
Date: Tue Dec 10 20:02:09 2013
New Revision: 259193
URL: http://svnweb.freebsd.org/changeset/base/259193

Log:
  Fix compiler warnings.
  
  MFC after:2 weeks

Modified:
  head/sbin/hastd/nv.c
  head/sbin/hastd/proto.c

Modified: head/sbin/hastd/nv.c
==
--- head/sbin/hastd/nv.cTue Dec 10 19:58:10 2013(r259192)
+++ head/sbin/hastd/nv.cTue Dec 10 20:02:09 2013(r259193)
@@ -566,7 +566,7 @@ nv_get_string(struct nv *nv, const char 
return (NULL);
PJDLOG_ASSERT((nvh-nvh_type  NV_ORDER_MASK) == NV_ORDER_HOST);
PJDLOG_ASSERT(nvh-nvh_dsize = 1);
-   str = NVH_DATA(nvh);
+   str = (char *)NVH_DATA(nvh);
PJDLOG_ASSERT(str[nvh-nvh_dsize - 1] == '\0');
PJDLOG_ASSERT(strlen(str) == nvh-nvh_dsize - 1);
return (str);

Modified: head/sbin/hastd/proto.c
==
--- head/sbin/hastd/proto.c Tue Dec 10 19:58:10 2013(r259192)
+++ head/sbin/hastd/proto.c Tue Dec 10 20:02:09 2013(r259193)
@@ -298,8 +298,8 @@ proto_connection_send(const struct proto
protoname = mconn-pc_proto-prt_name;
PJDLOG_ASSERT(protoname != NULL);
 
-   ret = conn-pc_proto-prt_send(conn-pc_ctx, protoname,
-   strlen(protoname) + 1, fd);
+   ret = conn-pc_proto-prt_send(conn-pc_ctx,
+   (const unsigned char *)protoname, strlen(protoname) + 1, fd);
proto_close(mconn);
if (ret != 0) {
errno = ret;
@@ -325,7 +325,7 @@ proto_connection_recv(const struct proto
 
bzero(protoname, sizeof(protoname));
 
-   ret = conn-pc_proto-prt_recv(conn-pc_ctx, protoname,
+   ret = conn-pc_proto-prt_recv(conn-pc_ctx, (unsigned char *)protoname,
sizeof(protoname) - 1, fd);
if (ret != 0) {
errno = ret;
___
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: r259194 - head/sbin/hastd

2013-12-10 Thread Mikolaj Golub
Author: trociny
Date: Tue Dec 10 20:05:07 2013
New Revision: 259194
URL: http://svnweb.freebsd.org/changeset/base/259194

Log:
  In remote_send_thread, if sending a request fails don't take the
  request back from the receive queue -- it might already be processed
  by remote_recv_thread, which lead to crashes like below:
  
(primary) Unable to receive reply header: Connection reset by peer.
(primary) Unable to send request (Connection reset by peer):
WRITE(954662912, 131072).
(primary) Disconnected from kopusha:7772.
(primary) Increasing localcnt to 1.
(primary) Assertion failed: (old  0), function refcnt_release,
file refcnt.h, line 62.
  
  Taking the request back was not necessary (it would properly be
  processed by the remote_recv_thread) and only complicated things.
  
  MFC after:2 weeks

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==
--- head/sbin/hastd/primary.c   Tue Dec 10 20:02:09 2013(r259193)
+++ head/sbin/hastd/primary.c   Tue Dec 10 20:05:07 2013(r259194)
@@ -1656,18 +1656,9 @@ remote_send_thread(void *arg)
Unable to send request (%s): ,
strerror(hio-hio_errors[ncomp]));
remote_close(res, ncomp);
-   /*
-* Take request back from the receive queue and move
-* it immediately to the done queue.
-*/
-   mtx_lock(hio_recv_list_lock[ncomp]);
-   TAILQ_REMOVE(hio_recv_list[ncomp], hio,
-   hio_next[ncomp]);
-   hio_recv_list_size[ncomp]--;
-   mtx_unlock(hio_recv_list_lock[ncomp]);
-   goto done_queue;
+   } else {
+   rw_unlock(hio_remote_lock[ncomp]);
}
-   rw_unlock(hio_remote_lock[ncomp]);
nv_free(nv);
if (wakeup)
cv_signal(hio_recv_list_cond[ncomp]);
___
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: r259195 - head/sbin/hastd

2013-12-10 Thread Mikolaj Golub
Author: trociny
Date: Tue Dec 10 20:06:41 2013
New Revision: 259195
URL: http://svnweb.freebsd.org/changeset/base/259195

Log:
  Send wakeup to threads waiting on empty queue before releasing the
  lock to decrease spurious wakeups.
  
  Submitted by: davidxu
  MFC after:2 weeks

Modified:
  head/sbin/hastd/primary.c
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastd/primary.c
==
--- head/sbin/hastd/primary.c   Tue Dec 10 20:05:07 2013(r259194)
+++ head/sbin/hastd/primary.c   Tue Dec 10 20:06:41 2013(r259195)
@@ -180,27 +180,21 @@ static pthread_mutex_t metadata_lock;
((res)-hr_remotein != NULL  (res)-hr_remoteout != NULL)
 
 #defineQUEUE_INSERT1(hio, name, ncomp) do {
\
-   bool _wakeup;   \
-   \
mtx_lock(hio_##name##_list_lock[(ncomp)]); \
-   _wakeup = TAILQ_EMPTY(hio_##name##_list[(ncomp)]); \
+   if (TAILQ_EMPTY(hio_##name##_list[(ncomp)]))   \
+   cv_broadcast(hio_##name##_list_cond[(ncomp)]); \
TAILQ_INSERT_TAIL(hio_##name##_list[(ncomp)], (hio),   \
hio_next[(ncomp)]); \
hio_##name##_list_size[(ncomp)]++;  \
-   mtx_unlock(hio_##name##_list_lock[ncomp]); \
-   if (_wakeup)\
-   cv_broadcast(hio_##name##_list_cond[(ncomp)]); \
+   mtx_unlock(hio_##name##_list_lock[(ncomp)]);   \
 } while (0)
 #defineQUEUE_INSERT2(hio, name)do {
\
-   bool _wakeup;   \
-   \
mtx_lock(hio_##name##_list_lock);  \
-   _wakeup = TAILQ_EMPTY(hio_##name##_list);  \
+   if (TAILQ_EMPTY(hio_##name##_list))\
+   cv_broadcast(hio_##name##_list_cond);  \
TAILQ_INSERT_TAIL(hio_##name##_list, (hio), hio_##name##_next);\
hio_##name##_list_size++;   \
mtx_unlock(hio_##name##_list_lock);\
-   if (_wakeup)\
-   cv_broadcast(hio_##name##_list_cond);  \
 } while (0)
 #defineQUEUE_TAKE1(hio, name, ncomp, timeout)  do {
\
bool _last; \

Modified: head/sbin/hastd/secondary.c
==
--- head/sbin/hastd/secondary.c Tue Dec 10 20:05:07 2013(r259194)
+++ head/sbin/hastd/secondary.c Tue Dec 10 20:06:41 2013(r259195)
@@ -110,15 +110,12 @@ static void *disk_thread(void *arg);
 static void *send_thread(void *arg);
 
 #defineQUEUE_INSERT(name, hio) do {
\
-   bool _wakeup;   \
-   \
mtx_lock(hio_##name##_list_lock);  \
-   _wakeup = TAILQ_EMPTY(hio_##name##_list);  \
+   if (TAILQ_EMPTY(hio_##name##_list))\
+   cv_broadcast(hio_##name##_list_cond);  \
TAILQ_INSERT_TAIL(hio_##name##_list, (hio), hio_next); \
hio_##name##_list_size++;   \
mtx_unlock(hio_##name##_list_lock);\
-   if (_wakeup)\
-   cv_broadcast(hio_##name##_list_cond);  \
 } while (0)
 #defineQUEUE_TAKE(name, hio)   do {
\
mtx_lock(hio_##name##_list_lock);  \
___
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: r259196 - head/sbin/hastd

2013-12-10 Thread Mikolaj Golub
Author: trociny
Date: Tue Dec 10 20:09:49 2013
New Revision: 259196
URL: http://svnweb.freebsd.org/changeset/base/259196

Log:
  Check remote protocol version only for the first connection (when it
  is actually sent by the remote node).
  
  Otherwise it generated confusing Negotiated protocol version 1 debug
  messages when processing the second connection.
  
  MFC after:2 weeks

Modified:
  head/sbin/hastd/hastd.c

Modified: head/sbin/hastd/hastd.c
==
--- head/sbin/hastd/hastd.c Tue Dec 10 20:06:41 2013(r259195)
+++ head/sbin/hastd/hastd.c Tue Dec 10 20:09:49 2013(r259196)
@@ -806,12 +806,6 @@ listen_accept(struct hastd_listen *lst)
 */
version = 1;
}
-   if (version  HAST_PROTO_VERSION) {
-   pjdlog_info(Remote protocol version %hhu is not supported, 
falling back to version %hhu.,
-   version, (unsigned char)HAST_PROTO_VERSION);
-   version = HAST_PROTO_VERSION;
-   }
-   pjdlog_debug(1, Negotiated protocol version %hhu., version);
token = nv_get_uint8_array(nvin, size, token);
/*
 * NULL token means that this is first connection.
@@ -925,6 +919,12 @@ listen_accept(struct hastd_listen *lst)
 */
 
if (token == NULL) {
+   if (version  HAST_PROTO_VERSION) {
+   pjdlog_info(Remote protocol version %hhu is not 
supported, falling back to version %hhu.,
+   version, (unsigned char)HAST_PROTO_VERSION);
+   version = HAST_PROTO_VERSION;
+   }
+   pjdlog_debug(1, Negotiated protocol version %hhu., version);
res-hr_version = version;
arc4random_buf(res-hr_token, sizeof(res-hr_token));
nvout = nv_alloc();
___
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: r259197 - head/sys/x86/cpufreq

2013-12-10 Thread Alexander Motin
Author: mav
Date: Tue Dec 10 20:25:43 2013
New Revision: 259197
URL: http://svnweb.freebsd.org/changeset/base/259197

Log:
  Do not DELAY() for P-state transition unless we want to see the result.
  
  Intel manual says: If a transition is already in progress, transition to
  a new value will subsequently take effect. Reads of IA32_PERF_CTL determine
  the last targeted operating point.  So seems it should be fine to just
  trigger wanted transition and go.  Linux does the same.
  
  MFC after:1 month

Modified:
  head/sys/x86/cpufreq/est.c

Modified: head/sys/x86/cpufreq/est.c
==
--- head/sys/x86/cpufreq/est.c  Tue Dec 10 20:09:49 2013(r259196)
+++ head/sys/x86/cpufreq/est.c  Tue Dec 10 20:25:43 2013(r259197)
@@ -1288,10 +1288,9 @@ est_set_id16(device_t dev, uint16_t id16
msr = (msr  ~0x) | id16;
wrmsr(MSR_PERF_CTL, msr);
 
-   /* Wait a short while for the new setting.  XXX Is this necessary? */
-   DELAY(EST_TRANS_LAT);
-
if  (need_check) {
+   /* Wait a short while and read the new status. */
+   DELAY(EST_TRANS_LAT);
est_get_id16(new_id16);
if (new_id16 != id16) {
if (bootverbose)
___
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: r259198 - head/sys/dev/md

2013-12-10 Thread Konstantin Belousov
Author: kib
Date: Tue Dec 10 20:52:31 2013
New Revision: 259198
URL: http://svnweb.freebsd.org/changeset/base/259198

Log:
  Only assert the length of the passed bio in the mdstart_vnode() when
  the bio is unmapped, so we must map the bio pages into pbuf.  This
  works around the geom classes which do not follow the MAXPHYS limit on
  the i/o size, since such classes do not know about unmapped bios
  either.
  
  Reported by:  Paolo Pinto paolo.pi...@netasq.com
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/dev/md/md.c

Modified: head/sys/dev/md/md.c
==
--- head/sys/dev/md/md.cTue Dec 10 20:25:43 2013(r259197)
+++ head/sys/dev/md/md.cTue Dec 10 20:52:31 2013(r259198)
@@ -746,12 +746,12 @@ mdstart_vnode(struct md_s *sc, struct bi
return (error);
}
 
-   KASSERT(bp-bio_length = MAXPHYS, (bio_length %jd,
-   (uintmax_t)bp-bio_length));
if ((bp-bio_flags  BIO_UNMAPPED) == 0) {
pb = NULL;
aiov.iov_base = bp-bio_data;
} else {
+   KASSERT(bp-bio_length = MAXPHYS, (bio_length %jd,
+   (uintmax_t)bp-bio_length));
pb = getpbuf(md_vnode_pbuf_freecnt);
pmap_qenter((vm_offset_t)pb-b_data, bp-bio_ma, bp-bio_ma_n);
aiov.iov_base = (void *)((vm_offset_t)pb-b_data +
___
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: r259199 - head/sys/dev/ofw

2013-12-10 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Dec 10 21:01:28 2013
New Revision: 259199
URL: http://svnweb.freebsd.org/changeset/base/259199

Log:
  Return the correct IEEE 1275 code for nextprop.

Modified:
  head/sys/dev/ofw/ofw_fdt.c

Modified: head/sys/dev/ofw/ofw_fdt.c
==
--- head/sys/dev/ofw/ofw_fdt.c  Tue Dec 10 20:52:31 2013(r259198)
+++ head/sys/dev/ofw/ofw_fdt.c  Tue Dec 10 21:01:28 2013(r259199)
@@ -267,8 +267,10 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac
 }
 
 /*
- * Get the next property of a package. Return the actual len of retrieved
- * prop name.
+ * Get the next property of a package. Return values:
+ *  -1: package or previous property does not exist
+ *   0: no more properties
+ *   1: success
  */
 static int
 ofw_fdt_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf,
@@ -310,7 +312,7 @@ ofw_fdt_nextprop(ofw_t ofw, phandle_t pa
 
strncpy(buf, fdt_string(fdtp, fdt32_to_cpu(prop-nameoff)), size);
 
-   return (strlen(buf));
+   return (1);
 }
 
 /* Set the value of a property of a package. */
___
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: r259200 - head/sys/kern

2013-12-10 Thread Konstantin Belousov
Author: kib
Date: Tue Dec 10 21:15:18 2013
New Revision: 259200
URL: http://svnweb.freebsd.org/changeset/base/259200

Log:
  Fix detection of EOF in kern_physio().  If bio_length was clipped by
  the excess code in g_io_check(), bio_resid is also truncated by
  g_io_deliver().  As result, bufdonebio() assigns truncated value to
  the buffer b_resid field.
  
  Use the residual bio_completed to calculate buffer b_resid from
  b_bcount in bufdonebio(), instead of bio_resid, calculated from
  bio_length in g_io_deliver().
  
  The issue is seemingly caused by the code rearrange into g_io_check(),
  which is not present in stable/10.  The change still looks as the
  useful change to have in 10 nevertheless.
  
  Reported by:  Stefan Hegnauer stefan.hegna...@gmx.ch
  Tested by:pho, Stefan Hegnauer stefan.hegna...@gmx.ch
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Tue Dec 10 21:01:28 2013(r259199)
+++ head/sys/kern/vfs_bio.c Tue Dec 10 21:15:18 2013(r259200)
@@ -3679,7 +3679,6 @@ bufdonebio(struct bio *bip)
 
bp = bip-bio_caller2;
bp-b_resid = bp-b_bcount - bip-bio_completed;
-   bp-b_resid = bip-bio_resid;   /* XXX: remove */
bp-b_ioflags = bip-bio_flags;
bp-b_error = bip-bio_error;
if (bp-b_error)
___
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: r259201 - stable/9/sys/fs/nfs

2013-12-10 Thread Rick Macklem
Author: rmacklem
Date: Tue Dec 10 22:03:59 2013
New Revision: 259201
URL: http://svnweb.freebsd.org/changeset/base/259201

Log:
  MFC: r257598
  During code inspection, I spotted that there was a code path where
  CLNT_CONTROL() would be called on client after it was
  released via CLNT_RELEASE(). It was unlikely that this
  code path gets executed and I have not heard of any problem
  report caused by this bug. This patch fixes the code so that
  this cannot happen.

Modified:
  stable/9/sys/fs/nfs/nfs_commonkrpc.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/fs/   (props changed)

Modified: stable/9/sys/fs/nfs/nfs_commonkrpc.c
==
--- stable/9/sys/fs/nfs/nfs_commonkrpc.cTue Dec 10 21:15:18 2013
(r259200)
+++ stable/9/sys/fs/nfs/nfs_commonkrpc.cTue Dec 10 22:03:59 2013
(r259201)
@@ -316,24 +316,25 @@ newnfs_connect(struct nfsmount *nmp, str
 
mtx_lock(nrp-nr_mtx);
if (nrp-nr_client != NULL) {
+   mtx_unlock(nrp-nr_mtx);
/*
 * Someone else already connected.
 */
CLNT_RELEASE(client);
} else {
nrp-nr_client = client;
+   /*
+* Protocols that do not require connections may be optionally
+* left unconnected for servers that reply from a port other
+* than NFS_PORT.
+*/
+   if (nmp == NULL || (nmp-nm_flag  NFSMNT_NOCONN) == 0) {
+   mtx_unlock(nrp-nr_mtx);
+   CLNT_CONTROL(client, CLSET_CONNECT, one);
+   } else
+   mtx_unlock(nrp-nr_mtx);
}
 
-   /*
-* Protocols that do not require connections may be optionally left
-* unconnected for servers that reply from a port other than NFS_PORT.
-*/
-   if (nmp == NULL || (nmp-nm_flag  NFSMNT_NOCONN) == 0) {
-   mtx_unlock(nrp-nr_mtx);
-   CLNT_CONTROL(client, CLSET_CONNECT, one);
-   } else {
-   mtx_unlock(nrp-nr_mtx);
-   }
 
/* Restore current thread's credentials. */
td-td_ucred = origcred;
___
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: r259202 - in head/sys/arm: arm versatile xilinx

2013-12-10 Thread John Baldwin
Author: jhb
Date: Tue Dec 10 22:13:36 2013
New Revision: 259202
URL: http://svnweb.freebsd.org/changeset/base/259202

Log:
  Correct license statements to reflect the fact that these files were all
  derived from sys/arm/mv/bus_space.c.
  
  Approved by:  core

Modified:
  head/sys/arm/arm/bus_space-v6.c
  head/sys/arm/versatile/bus_space.c
  head/sys/arm/xilinx/zy7_bus_space.c

Modified: head/sys/arm/arm/bus_space-v6.c
==
--- head/sys/arm/arm/bus_space-v6.c Tue Dec 10 22:03:59 2013
(r259201)
+++ head/sys/arm/arm/bus_space-v6.c Tue Dec 10 22:13:36 2013
(r259202)
@@ -1,7 +1,9 @@
 /*-
- * Copyright (c) 2012 Damjan Marion damjan.mar...@gmail.com
+ * Copyright (C) 2008 MARVELL INTERNATIONAL LTD.
  * All rights reserved.
  *
+ * Developed by Semihalf.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -10,11 +12,14 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of MARVELL nor the names of contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
  *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

Modified: head/sys/arm/versatile/bus_space.c
==
--- head/sys/arm/versatile/bus_space.c  Tue Dec 10 22:03:59 2013
(r259201)
+++ head/sys/arm/versatile/bus_space.c  Tue Dec 10 22:13:36 2013
(r259202)
@@ -1,7 +1,9 @@
 /*-
- * Copyright (C) 2012 FreeBSD Foundation
+ * Copyright (C) 2008 MARVELL INTERNATIONAL LTD.
  * All rights reserved.
  *
+ * Developed by Semihalf.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:

Modified: head/sys/arm/xilinx/zy7_bus_space.c
==
--- head/sys/arm/xilinx/zy7_bus_space.c Tue Dec 10 22:03:59 2013
(r259201)
+++ head/sys/arm/xilinx/zy7_bus_space.c Tue Dec 10 22:13:36 2013
(r259202)
@@ -1,7 +1,9 @@
 /*-
- * Copyright (C) 2012 FreeBSD Foundation
+ * Copyright (C) 2008 MARVELL INTERNATIONAL LTD.
  * All rights reserved.
  *
+ * Developed by Semihalf.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
___
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: r259203 - head/sys/dev/vt

2013-12-10 Thread Konstantin Belousov
Author: kib
Date: Tue Dec 10 22:33:02 2013
New Revision: 259203
URL: http://svnweb.freebsd.org/changeset/base/259203

Log:
  The opt_*.h headers must be included before any system header, except
  sys/cdefs.h.  In particular, in case of COMPAT_43, param.h includes
  sys/types.h, which includes sys/select.h, which includes
  sys/_sigset.h.  The _sigset.h customizes the provided definions based
  on COMPAT_43, eliminating osigset_t if symbol is not defined.  The
  sys/proc.h is included after opt_compat.h and needs osigset_t.
  
  Move opt_compat.h inclusion into the right place.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/vt/vt_core.c

Modified: head/sys/dev/vt/vt_core.c
==
--- head/sys/dev/vt/vt_core.c   Tue Dec 10 22:13:36 2013(r259202)
+++ head/sys/dev/vt/vt_core.c   Tue Dec 10 22:33:02 2013(r259203)
@@ -33,10 +33,9 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
-#include sys/param.h
-
 #include opt_compat.h
 
+#include sys/param.h
 #include sys/consio.h
 #include sys/eventhandler.h
 #include sys/fbio.h
___
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: r259016 - in head/sys: conf dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/fb dev/vt kern modules/drm2/i915kms modules/drm2/radeonkms sparc64/sparc64 sys teken

2013-12-10 Thread Andreas Tobler
On 10.12.13 14:43, Tijl Coosemans wrote:
 On Tue, 10 Dec 2013 15:31:44 +0200 Aleksandr Rybalko wrote:
 That keyboards have no Shift key for that? :)
 I will be glad to apply your changes, but I have to know how it should
 be controlled.

 RU and UA PC keyboards have same 3 symbols '2', '', '@'
 To get '2' i have to press only '2'
 To get '@' I have to press Shift+'2'
 To get '' I have to switch to UA or RU and press Shift+'2'

 Ahh, or use some called Third-Level (IIRC) in Xorg terms. Temporary
 lang switch. Which commonly mapped to one of Alt. Right?
 So R-Alt+Shift+'2'?
 
 https://en.wikipedia.org/wiki/AltGr

Thanks Tijl!

To get the @ I have to press AltGr + '2'.
There are combinations where I have to press AltGr+Shift. e.g to get the
'broken bar, ¦', AltGr+Shift+'7'.

Andreas

___
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: r259204 - in stable/10: lib/libcam sbin/camcontrol sys/cam sys/cam/scsi sys/powerpc/pseries

2013-12-10 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Dec 10 22:55:22 2013
New Revision: 259204
URL: http://svnweb.freebsd.org/changeset/base/259204

Log:
  MFC r257345,257382,257388:
  
  Implement extended LUN support. If PIM_EXTLUNS is set by a SIM, encode
  the upper 32-bits of the LUN, if possible, into the target_lun field as
  passed directly from the REPORT LUNs response. This allows extended LUN
  support to work for all LUNs with zeros in the lower 32-bits, which covers
  most addressing modes without breaking KBI. Behavior for drivers not
  setting PIM_EXTLUNS is unchanged. No user-facing interfaces are modified.
  
  Extended LUNs are stored with swizzled 16-bit word order so that, for
  devices implementing LUN addressing (like SCSI-2), the numerical
  representation of the LUN is identical with and without PIM_EXTLUNS. Thus
  setting PIM_EXTLUNS keeps most behavior, and user-facing LUN IDs, unchanged.
  This follows the strategy used in Solaris. A macro (CAM_EXTLUN_BYTE_SWIZZLE)
  is provided to transform a lun_id_t into a uint64_t ordered for the wire.
  
  This is the second part of work for full 64-bit extended LUN support and is
  designed to a bridge for stable/10 to the final 64-bit LUN code. The
  third and final part will involve widening lun_id_t to 64 bits and will
  not be MFCed. This third part will break the KBI but will keep the KPI
  unchanged so that all drivers that will care about this can be updated now
  and not require code changes between HEAD and stable/10.
  
  Reviewed by:  scottl

Modified:
  stable/10/lib/libcam/camlib.c
  stable/10/sbin/camcontrol/camcontrol.c
  stable/10/sys/cam/cam.h
  stable/10/sys/cam/cam_xpt.c
  stable/10/sys/cam/scsi/scsi_xpt.c
  stable/10/sys/powerpc/pseries/phyp_vscsi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libcam/camlib.c
==
--- stable/10/lib/libcam/camlib.c   Tue Dec 10 22:33:02 2013
(r259203)
+++ stable/10/lib/libcam/camlib.c   Tue Dec 10 22:55:22 2013
(r259204)
@@ -30,6 +30,7 @@ __FBSDID($FreeBSD$);
 #include sys/param.h
 #include stdio.h
 #include stdlib.h
+#include stdint.h
 #include string.h
 #include fcntl.h
 #include unistd.h
@@ -348,16 +349,16 @@ cam_open_btl(path_id_t path_id, target_i
if (ccb.cdm.status == CAM_DEV_MATCH_MORE) {
snprintf(cam_errbuf, CAM_ERRBUF_SIZE,
 %s: CDM reported more than one
- passthrough device at %d:%d:%d!!\n,
-func_name, path_id, target_id, target_lun);
+ passthrough device at %d:%d:%jx!!\n,
+func_name, path_id, target_id, (uintmax_t)target_lun);
goto btl_bailout;
}
 
if (ccb.cdm.num_matches == 0) {
snprintf(cam_errbuf, CAM_ERRBUF_SIZE,
 %s: no passthrough device found at
- %d:%d:%d, func_name, path_id, target_id,
-target_lun);
+ %d:%d:%jx, func_name, path_id, target_id,
+(uintmax_t)target_lun);
goto btl_bailout;
}
 
@@ -687,14 +688,14 @@ cam_path_string(struct cam_device *dev, 
return(str);
}
 
-   snprintf(str, len, (%s%d:%s%d:%d:%d:%d): ,
+   snprintf(str, len, (%s%d:%s%d:%d:%d:%jx): ,
 (dev-device_name[0] != '\0') ? dev-device_name : pass,
 dev-dev_unit_num,
 (dev-sim_name[0] != '\0') ? dev-sim_name : unknown,
 dev-sim_unit_number,
 dev-bus_id,
 dev-target_id,
-dev-target_lun);
+(uintmax_t)dev-target_lun);
 
return(str);
 }

Modified: stable/10/sbin/camcontrol/camcontrol.c
==
--- stable/10/sbin/camcontrol/camcontrol.c  Tue Dec 10 22:33:02 2013
(r259203)
+++ stable/10/sbin/camcontrol/camcontrol.c  Tue Dec 10 22:55:22 2013
(r259204)
@@ -566,11 +566,11 @@ getdevtree(void)
}
 
fprintf(stdout, %-33s  at scbus%d 
-   target %d lun %d (,
+   target %d lun %jx (,
tmpstr,
dev_result-path_id,
dev_result-target_id,
-   dev_result-target_lun);
+   (uintmax_t)dev_result-target_lun);
 
need_close = 1;
 

Modified: stable/10/sys/cam/cam.h
==
--- stable/10/sys/cam/cam.h Tue Dec 10 22:33:02 2013(r259203)
+++ stable/10/sys/cam/cam.h Tue Dec 10 22:55:22 2013

svn commit: r259205 - in head/sys/amd64/vmm: . intel io

2013-12-10 Thread Neel Natu
Author: neel
Date: Tue Dec 10 22:56:51 2013
New Revision: 259205
URL: http://svnweb.freebsd.org/changeset/base/259205

Log:
  Fix x2apic support in bhyve.
  
  When the guest is bringing up the APs in the x2APIC mode a write to the
  ICR register will now trigger a return to userspace with an exitcode of
  VM_EXITCODE_SPINUP_AP. This gets SMP guests working again with x2APIC.
  
  Change the vlapic timer lock to be a spinlock because the vlapic can be
  accessed from within a critical section (vm run loop) when guest is using
  x2apic mode.
  
  Reviewed by:  grehan@

Modified:
  head/sys/amd64/vmm/intel/vmx.c
  head/sys/amd64/vmm/io/vlapic.c
  head/sys/amd64/vmm/io/vlapic.h
  head/sys/amd64/vmm/vmm.c
  head/sys/amd64/vmm/vmm_lapic.c
  head/sys/amd64/vmm/vmm_lapic.h
  head/sys/amd64/vmm/vmm_msr.c
  head/sys/amd64/vmm/vmm_msr.h

Modified: head/sys/amd64/vmm/intel/vmx.c
==
--- head/sys/amd64/vmm/intel/vmx.c  Tue Dec 10 22:55:22 2013
(r259204)
+++ head/sys/amd64/vmm/intel/vmx.c  Tue Dec 10 22:56:51 2013
(r259205)
@@ -1337,6 +1337,7 @@ vmx_exit_process(struct vmx *vmx, int vc
struct vmxctx *vmxctx;
uint32_t eax, ecx, edx, idtvec_info, idtvec_err, reason;
uint64_t qual, gpa, rflags;
+   bool retu;
 
handled = 0;
vmcs = vmx-vmcs[vcpu];
@@ -1382,27 +1383,39 @@ vmx_exit_process(struct vmx *vmx, int vc
break;
case EXIT_REASON_RDMSR:
vmm_stat_incr(vmx-vm, vcpu, VMEXIT_RDMSR, 1);
+   retu = false;
ecx = vmxctx-guest_rcx;
-   error = emulate_rdmsr(vmx-vm, vcpu, ecx);
+   error = emulate_rdmsr(vmx-vm, vcpu, ecx, retu);
if (error) {
vmexit-exitcode = VM_EXITCODE_RDMSR;
vmexit-u.msr.code = ecx;
-   } else
+   } else if (!retu) {
handled = 1;
+   } else {
+   /* Return to userspace with a valid exitcode */
+   KASSERT(vmexit-exitcode != VM_EXITCODE_BOGUS,
+   (emulate_wrmsr retu with bogus exitcode));
+   }
break;
case EXIT_REASON_WRMSR:
vmm_stat_incr(vmx-vm, vcpu, VMEXIT_WRMSR, 1);
+   retu = false;
eax = vmxctx-guest_rax;
ecx = vmxctx-guest_rcx;
edx = vmxctx-guest_rdx;
error = emulate_wrmsr(vmx-vm, vcpu, ecx,
-   (uint64_t)edx  32 | eax);
+   (uint64_t)edx  32 | eax, retu);
if (error) {
vmexit-exitcode = VM_EXITCODE_WRMSR;
vmexit-u.msr.code = ecx;
vmexit-u.msr.wval = (uint64_t)edx  32 | eax;
-   } else
+   } else if (!retu) {
handled = 1;
+   } else {
+   /* Return to userspace with a valid exitcode */
+   KASSERT(vmexit-exitcode != VM_EXITCODE_BOGUS,
+   (emulate_wrmsr retu with bogus exitcode));
+   }
break;
case EXIT_REASON_HLT:
vmm_stat_incr(vmx-vm, vcpu, VMEXIT_HLT, 1);

Modified: head/sys/amd64/vmm/io/vlapic.c
==
--- head/sys/amd64/vmm/io/vlapic.c  Tue Dec 10 22:55:22 2013
(r259204)
+++ head/sys/amd64/vmm/io/vlapic.c  Tue Dec 10 22:56:51 2013
(r259205)
@@ -139,8 +139,8 @@ struct vlapic {
  * Note that the vlapic_callout_handler() does not write to any of these
  * registers so they can be safely read from the vcpu context without locking.
  */
-#defineVLAPIC_TIMER_LOCK(vlapic)   mtx_lock(((vlapic)-timer_mtx))
-#defineVLAPIC_TIMER_UNLOCK(vlapic) 
mtx_unlock(((vlapic)-timer_mtx))
+#defineVLAPIC_TIMER_LOCK(vlapic)   
mtx_lock_spin(((vlapic)-timer_mtx))
+#defineVLAPIC_TIMER_UNLOCK(vlapic) 
mtx_unlock_spin(((vlapic)-timer_mtx))
 #defineVLAPIC_TIMER_LOCKED(vlapic) 
mtx_owned(((vlapic)-timer_mtx))
 
 #define VLAPIC_BUS_FREQtsc_freq
@@ -613,7 +613,7 @@ vlapic_set_icr_timer(struct vlapic *vlap
 static VMM_STAT_ARRAY(IPIS_SENT, VM_MAXCPU, ipis sent to vcpu);
 
 static int
-lapic_process_icr(struct vlapic *vlapic, uint64_t icrval)
+lapic_process_icr(struct vlapic *vlapic, uint64_t icrval, bool *retu)
 {
int i;
cpuset_t dmask;
@@ -688,17 +688,18 @@ lapic_process_icr(struct vlapic *vlapic,
if (vlapic2-boot_state != BS_SIPI)
return (0);
 
-   vmexit = vm_exitinfo(vlapic-vm, vlapic-vcpuid);
-   vmexit-exitcode = VM_EXITCODE_SPINUP_AP;
-   vmexit-u.spinup_ap.vcpu = dest;
-

svn commit: r259206 - stable/10/sys/net

2013-12-10 Thread Navdeep Parhar
Author: np
Date: Wed Dec 11 00:17:13 2013
New Revision: 259206
URL: http://svnweb.freebsd.org/changeset/base/259206

Log:
  MFC r258692 (gnn).
  
  Add constants for use in interrogating various fiber and copper connectors
  most often used with network interfaces.
  
  The SFF-8472 standard defines the information that can be retrieved
  from an optic or a copper cable plugged into a NIC, most often
  referred to as SFP+.  Examples of values that can be read
  include the cable vendor's name, part number, date of manufacture
  as well as running data such as temperature, voltage and tx
  and rx power.
  
  Copious comments on how to use these values with an I2C interface
  are given in the header file itself.
  
  Discussed with:   gnn

Added:
  stable/10/sys/net/sff8472.h
 - copied unchanged from r258692, head/sys/net/sff8472.h
Modified:
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/sys/net/sff8472.h (from r258692, head/sys/net/sff8472.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/net/sff8472.h Wed Dec 11 00:17:13 2013(r259206, copy 
of r258692, head/sys/net/sff8472.h)
@@ -0,0 +1,433 @@
+/*-
+ * Copyright (c) 2013 George V. Neville-Neil
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+/*
+ * The following set of constants are from Document SFF-8472
+ * Diagnostic Monitoring Interface for Optical Transceivers revision
+ * 11.3 published by the SFF Committee on June 11, 2013
+ *
+ * The SFF standard defines two ranges of addresses, each 255 bytes
+ * long for the storage of data and diagnostics on cables, such as
+ * SFP+ optics and TwinAx cables.  The ranges are defined in the
+ * following way:
+ *
+ * Base Address 0xa0 (Identification Data)
+ * 0-95Serial ID Defined by SFP MSA
+ * 96-127  Vendor Specific Data
+ * 128-255 Reserved
+ *
+ * Base Address 0xa2 (Diagnostic Data)
+ * 0-55Alarm and Warning Thresholds
+ * 56-95   Cal Constants
+ * 96-119  Real Time Diagnostic Interface
+ * 120-127 Vendor Specific
+ * 128-247 User Writable EEPROM
+ * 248-255 Vendor Specific
+ *
+ * Note that not all addresses are supported.  Where support is
+ * optional this is noted and instructions for checking for the
+ * support are supplied.
+ *
+ * All these values are read across an I2C (i squared C) bus.  Any
+ * device wishing to read these addresses must first have support for
+ * i2c calls.  The Chelsio T4/T5 driver (dev/cxgbe) is one such
+ * driver.
+ */
+
+
+/* Table 3.1 Two-wire interface ID: Data Fields */
+
+#define SFF_8472_BASE  0xa0   /* Base address for all our queries. */
+#define SFF_8472_ID0  /* Transceiver Type (Table 3.2) */
+#define SFF_8472_EXT_ID1  /* Extended transceiver type (Table 
3.3) */
+#define SFF_8472_CONNECTOR 2  /* Connector type (Table 3.4) */
+#define SFF_8472_TRANS_START   3  /* Elec or Optical Compatibility
+   * (Table 3.5) */
+#define SFF_8472_TRANS_END 10
+#define SFF_8472_ENCODING  11 /* Encoding Code for high speed
+   * serial encoding algorithm (see
+   * Table 3.6) */
+#define SFF_8472_BITRATE   12 /* Nominal signaling rate, units
+   *  of 100MBd.  (see details for
+   *  rates  25.0Gb/s) */
+#define SFF_8472_RATEID13 /* Type of rate select
+   * functionality (see Table
+   * 3.6a) */
+#define SFF_8472_LEN_SMF_KM14 /* Link length 

svn commit: r259207 - stable/10/sys/fs/nfs

2013-12-10 Thread Rick Macklem
Author: rmacklem
Date: Wed Dec 11 00:39:56 2013
New Revision: 259207
URL: http://svnweb.freebsd.org/changeset/base/259207

Log:
  MFC: r257598
  During code inspection, I spotted that there was a code path where
  CLNT_CONTROL() would be called on client after it was
  released via CLNT_RELEASE(). It was unlikely that this
  code path gets executed and I have not heard of any problem
  report caused by this bug. This patch fixes the code so that
  this cannot happen.

Modified:
  stable/10/sys/fs/nfs/nfs_commonkrpc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfs/nfs_commonkrpc.c
==
--- stable/10/sys/fs/nfs/nfs_commonkrpc.c   Wed Dec 11 00:17:13 2013
(r259206)
+++ stable/10/sys/fs/nfs/nfs_commonkrpc.c   Wed Dec 11 00:39:56 2013
(r259207)
@@ -336,24 +336,25 @@ newnfs_connect(struct nfsmount *nmp, str
 
mtx_lock(nrp-nr_mtx);
if (nrp-nr_client != NULL) {
+   mtx_unlock(nrp-nr_mtx);
/*
 * Someone else already connected.
 */
CLNT_RELEASE(client);
} else {
nrp-nr_client = client;
+   /*
+* Protocols that do not require connections may be optionally
+* left unconnected for servers that reply from a port other
+* than NFS_PORT.
+*/
+   if (nmp == NULL || (nmp-nm_flag  NFSMNT_NOCONN) == 0) {
+   mtx_unlock(nrp-nr_mtx);
+   CLNT_CONTROL(client, CLSET_CONNECT, one);
+   } else
+   mtx_unlock(nrp-nr_mtx);
}
 
-   /*
-* Protocols that do not require connections may be optionally left
-* unconnected for servers that reply from a port other than NFS_PORT.
-*/
-   if (nmp == NULL || (nmp-nm_flag  NFSMNT_NOCONN) == 0) {
-   mtx_unlock(nrp-nr_mtx);
-   CLNT_CONTROL(client, CLSET_CONNECT, one);
-   } else {
-   mtx_unlock(nrp-nr_mtx);
-   }
 
/* Restore current thread's credentials. */
td-td_ucred = origcred;
___
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: r259208 - head/share/mk

2013-12-10 Thread Julio Merino
Author: jmmv
Date: Wed Dec 11 03:39:50 2013
New Revision: 259208
URL: http://svnweb.freebsd.org/changeset/base/259208

Log:
  Add tap.test.mk.
  
  This file provides support to build test programs that comply with the
  Test Anything Protocol.  Its main goal is to support the painless
  integration of existing tests from tools/regression/ into the Kyua-based
  test suite.
  
  Approved by:  rpaulo (mentor)

Added:
  head/share/mk/tap.test.mk   (contents, props changed)
Modified:
  head/share/mk/Makefile

Modified: head/share/mk/Makefile
==
--- head/share/mk/Makefile  Wed Dec 11 00:39:56 2013(r259207)
+++ head/share/mk/Makefile  Wed Dec 11 03:39:50 2013(r259208)
@@ -46,6 +46,7 @@ FILESDIR= ${BINDIR}/mk
 .if ${MK_TESTS} != no
 FILES+=atf.test.mk
 FILES+=plain.test.mk
+FILES+=tap.test.mk
 .endif
 
 .include bsd.prog.mk

Added: head/share/mk/tap.test.mk
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/mk/tap.test.mk   Wed Dec 11 03:39:50 2013(r259208)
@@ -0,0 +1,64 @@
+# $FreeBSD$
+#
+# Logic to build and install TAP-compliant test programs.
+#
+# This is provided to support existing tests in the FreeBSD source tree
+# (particularly those coming from tools/regression/) that comply with the
+# Test Anything Protocol.  It should not be used for new tests.
+
+.include bsd.init.mk
+
+# List of C, C++ and shell test programs to build.
+#
+# Programs listed here are built according to the semantics of bsd.prog.mk for
+# PROGS, PROGS_CXX and SCRIPTS, respectively.
+#
+# Test programs registered in this manner are set to be installed into TESTSDIR
+# (which should be overriden by the Makefile) and are not required to provide a
+# manpage.
+TAP_TESTS_C?=
+TAP_TESTS_CXX?=
+TAP_TESTS_SH?=
+
+.if !empty(TAP_TESTS_C)
+PROGS+= ${TAP_TESTS_C}
+_TESTS+= ${TAP_TESTS_C}
+.for _T in ${TAP_TESTS_C}
+BINDIR.${_T}= ${TESTSDIR}
+MAN.${_T}?= # empty
+SRCS.${_T}?= ${_T}.c
+TEST_INTERFACE.${_T}= tap
+.endfor
+.endif
+
+.if !empty(TAP_TESTS_CXX)
+PROGS_CXX+= ${TAP_TESTS_CXX}
+_TESTS+= ${TAP_TESTS_CXX}
+.for _T in ${TAP_TESTS_CXX}
+BINDIR.${_T}= ${TESTSDIR}
+MAN.${_T}?= # empty
+SRCS.${_T}?= ${_T}.cc
+TEST_INTERFACE.${_T}= tap
+.endfor
+.endif
+
+.if !empty(TAP_TESTS_SH)
+SCRIPTS+= ${TAP_TESTS_SH}
+_TESTS+= ${TAP_TESTS_SH}
+.for _T in ${TAP_TESTS_SH}
+SCRIPTSDIR_${_T}= ${TESTSDIR}
+TEST_INTERFACE.${_T}= tap
+CLEANFILES+= ${_T} ${_T}.tmp
+# TODO(jmmv): It seems to me that this SED and SRC functionality should
+# exist in bsd.prog.mk along the support for SCRIPTS.  Move it there if
+# this proves to be useful within the tests.
+TAP_TESTS_SH_SED_${_T}?= # empty
+TAP_TESTS_SH_SRC_${_T}?= ${_T}.sh
+${_T}: ${TAP_TESTS_SH_SRC_${_T}}
+   cat ${.ALLSRC} | sed ${TAP_TESTS_SH_SED_${_T}} ${.TARGET}.tmp
+   chmod +x ${.TARGET}.tmp
+   mv ${.TARGET}.tmp ${.TARGET}
+.endfor
+.endif
+
+.include bsd.test.mk
___
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: r259209 - head/share/mk

2013-12-10 Thread Julio Merino
Author: jmmv
Date: Wed Dec 11 03:41:07 2013
New Revision: 259209
URL: http://svnweb.freebsd.org/changeset/base/259209

Log:
  Make bsd.progs.mk work in directories with SCRIPTS but no PROGS.
  
  This change fixes some cases where bsd.progs.mk would fail to handle
  directories with SCRIPTS but no PROGS.  In particular, install did
  not handle such scripts nor dependent files when bsd.subdir.mk was
  added to the mix.
  
  This is make tinderbox clean.
  
  Reviewed by:  freebsd-testing
  Approved by:  rpaulo (mentor)

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Wed Dec 11 03:39:50 2013(r259208)
+++ head/share/mk/bsd.progs.mk  Wed Dec 11 03:41:07 2013(r259209)
@@ -73,7 +73,7 @@ UPDATE_DEPENDFILE = NO
 # handle being called [bsd.]progs.mk
 .include bsd.prog.mk
 
-.ifndef PROG
+.ifndef _RECURSING_PROGS
 # tell progs.mk we might want to install things
 PROGS_TARGETS+= cleandepend cleandir cleanobj depend install
 
@@ -84,11 +84,13 @@ x.$p= PROG_CXX=$p
 .endif
 
 $p ${p}_p: .PHONY .MAKE
-   (cd ${.CURDIR}  ${MAKE} -f ${MAKEFILE} PROG=$p ${x.$p})
+   (cd ${.CURDIR}  ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
+   SUBDIR= PROG=$p ${x.$p})
 
 .for t in ${PROGS_TARGETS:O:u}
 $p.$t: .PHONY .MAKE
-   (cd ${.CURDIR}  ${MAKE} -f ${MAKEFILE} PROG=$p ${x.$p} ${@:E})
+   (cd ${.CURDIR}  ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
+   SUBDIR= PROG=$p ${x.$p} ${@:E})
 .endfor
 .endfor
 
@@ -96,4 +98,18 @@ $p.$t: .PHONY .MAKE
 $t: ${PROGS:%=%.$t}
 .endfor
 
+SCRIPTS_TARGETS+= cleandepend cleandir cleanobj depend install
+
+.for p in ${SCRIPTS}
+.for t in ${SCRIPTS_TARGETS:O:u}
+$p.$t: .PHONY .MAKE
+   (cd ${.CURDIR}  ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
+   SUBDIR= SCRIPT=$p ${x.$p} ${@:E})
+.endfor
+.endfor
+
+.for t in ${SCRIPTS_TARGETS:O:u}
+$t: ${SCRIPTS:%=%.$t}
+.endfor
+
 .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: r259210 - in head: bin bin/date bin/date/tests bin/mv bin/mv/tests bin/pax bin/pax/tests bin/sh bin/sh/tests bin/sh/tests/builtins bin/sh/tests/errors bin/sh/tests/execution bin/sh/test...

2013-12-10 Thread Julio Merino
Author: jmmv
Date: Wed Dec 11 04:09:17 2013
New Revision: 259210
URL: http://svnweb.freebsd.org/changeset/base/259210

Log:
  Migrate tools/regression/bin/ tests to the new layout.
  
  This change is a proof of concept on how to easily integrate existing
  tests from the tools/regression/ hierarchy into the /usr/tests/ test
  suite and on how to adapt them to the new layout for src.
  
  To achieve these goals, this change:
  
  - Moves tests from tools/regression/bin/tool/ to bin/tool/tests/.
  - Renames the previous regress.sh files to legacy_test.sh.
  - Adds Makefiles to build and install the tests and all their supporting
data files into /usr/tests/bin/.
  - Plugs the legacy_test test programs into the test suite using the new
TAP backend for Kyua (appearing in 0.8) so that the code of the test
programs does not have to change.
  - Registers the new directories in the BSD.test.dist mtree file.
  
  Reviewed by:  freebsd-testing
  Approved by:  rpaulo (mentor)

Added:
  head/bin/date/tests/
  head/bin/date/tests/Makefile   (contents, props changed)
  head/bin/date/tests/legacy_test.sh
 - copied unchanged from r259205, head/tools/regression/bin/date/regress.sh
  head/bin/mv/tests/
  head/bin/mv/tests/Makefile   (contents, props changed)
  head/bin/mv/tests/legacy_test.sh
 - copied unchanged from r258552, head/tools/regression/bin/mv/regress.sh
  head/bin/pax/tests/
  head/bin/pax/tests/Makefile   (contents, props changed)
 - copied unchanged from r258552, head/tools/regression/bin/pax/regress.t
  head/bin/sh/tests/
  head/bin/sh/tests/Makefile   (contents, props changed)
  head/bin/sh/tests/builtins/
 - copied from r258552, head/tools/regression/bin/sh/builtins/
  head/bin/sh/tests/builtins/Makefile   (contents, props changed)
  head/bin/sh/tests/errors/
 - copied from r258552, head/tools/regression/bin/sh/errors/
  head/bin/sh/tests/errors/Makefile   (contents, props changed)
  head/bin/sh/tests/execution/
 - copied from r258552, head/tools/regression/bin/sh/execution/
  head/bin/sh/tests/execution/Makefile   (contents, props changed)
  head/bin/sh/tests/expansion/
 - copied from r258552, head/tools/regression/bin/sh/expansion/
  head/bin/sh/tests/expansion/Makefile   (contents, props changed)
  head/bin/sh/tests/legacy_test.sh
 - copied, changed from r258552, head/tools/regression/bin/sh/regress.sh
  head/bin/sh/tests/parameters/
 - copied from r258552, head/tools/regression/bin/sh/parameters/
  head/bin/sh/tests/parameters/Makefile   (contents, props changed)
  head/bin/sh/tests/parser/
 - copied from r258552, head/tools/regression/bin/sh/parser/
  head/bin/sh/tests/parser/Makefile   (contents, props changed)
  head/bin/sh/tests/set-e/
 - copied from r258552, head/tools/regression/bin/sh/set-e/
  head/bin/sh/tests/set-e/Makefile   (contents, props changed)
  head/bin/test/tests/
  head/bin/test/tests/Makefile   (contents, props changed)
  head/bin/test/tests/legacy_test.sh
 - copied unchanged from r258552, head/tools/regression/bin/test/regress.sh
  head/bin/tests/
  head/bin/tests/Makefile   (contents, props changed)
Directory Properties:
  head/bin/pax/tests/legacy_test.sh   (props changed)
Deleted:
  head/tools/regression/bin/
Modified:
  head/bin/Makefile
  head/bin/date/Makefile
  head/bin/mv/Makefile
  head/bin/pax/Makefile
  head/bin/sh/Makefile
  head/bin/test/Makefile
  head/etc/mtree/BSD.tests.dist

Modified: head/bin/Makefile
==
--- head/bin/Makefile   Wed Dec 11 03:41:07 2013(r259209)
+++ head/bin/Makefile   Wed Dec 11 04:09:17 2013(r259210)
@@ -52,6 +52,10 @@ SUBDIR+= rmail
 SUBDIR+=   csh
 .endif
 
+.if ${MK_TESTS} != no
+SUBDIR+=   tests
+.endif
+
 .include bsd.arch.inc.mk
 
 SUBDIR:=   ${SUBDIR:O}

Modified: head/bin/date/Makefile
==
--- head/bin/date/Makefile  Wed Dec 11 03:41:07 2013(r259209)
+++ head/bin/date/Makefile  Wed Dec 11 04:09:17 2013(r259210)
@@ -1,7 +1,13 @@
 #  @(#)Makefile8.1 (Berkeley) 5/31/93
 # $FreeBSD$
 
+.include bsd.own.mk
+
 PROG=  date
 SRCS=  date.c netdate.c vary.c
 
+.if ${MK_TESTS} != no
+SUBDIR+=tests
+.endif
+
 .include bsd.prog.mk

Added: head/bin/date/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/bin/date/tests/MakefileWed Dec 11 04:09:17 2013
(r259210)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+.include bsd.own.mk
+
+TESTSDIR=  ${TESTSBASE}/bin/date
+
+TAP_TESTS_SH=  legacy_test
+
+.include tap.test.mk

Copied: head/bin/date/tests/legacy_test.sh (from r259205, 
head/tools/regression/bin/date/regress.sh)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly 

svn commit: r259211 - in head/sys/cddl/contrib/opensolaris/uts: intel/dtrace powerpc/dtrace

2013-12-10 Thread Mark Johnston
Author: markj
Date: Wed Dec 11 04:31:40 2013
New Revision: 259211
URL: http://svnweb.freebsd.org/changeset/base/259211

Log:
  Correct the check for errors from proc_rwmem().
  
  MFC after:2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c
  head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c

Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c
==
--- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c   Wed Dec 
11 04:09:17 2013(r259210)
+++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c   Wed Dec 
11 04:31:40 2013(r259211)
@@ -75,7 +75,7 @@ proc_ops(int op, proc_t *p, void *kaddr,
uio.uio_td = curthread;
uio.uio_rw = op;
PHOLD(p);
-   if (proc_rwmem(p, uio)  0) {
+   if (proc_rwmem(p, uio) != 0) {
PRELE(p);
return (-1);
}

Modified: head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
==
--- head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Wed Dec 
11 04:09:17 2013(r259210)
+++ head/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Wed Dec 
11 04:31:40 2013(r259211)
@@ -60,7 +60,7 @@ proc_ops(int op, proc_t *p, void *kaddr,
uio.uio_td = curthread;
uio.uio_rw = op;
PHOLD(p);
-   if (proc_rwmem(p, uio)  0) {
+   if (proc_rwmem(p, uio) != 0) {
PRELE(p);
return (-1);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259212 - head/sys/arm/at91

2013-12-10 Thread Warner Losh
Author: imp
Date: Wed Dec 11 05:32:29 2013
New Revision: 259212
URL: http://svnweb.freebsd.org/changeset/base/259212

Log:
  Fix one race and one fence post error. When the TX buffer was
  completely full, we'd not complete any of the mbufs due to the fence
  post error (this creates a large leak). When this is fixed, we still
  leak, but at a much smaller rate due to a race between ateintr and
  atestart_locked as well as an asymmetry where atestart_locked is
  called from elsewhere.  Ensure that we free in-flight packets that
  have completed there as well. Also remove needless check for NULL on
  mb, checked earlier in the loop and simplify a redundant if.
  
  MFC after:3 days

Modified:
  head/sys/arm/at91/if_ate.c

Modified: head/sys/arm/at91/if_ate.c
==
--- head/sys/arm/at91/if_ate.c  Wed Dec 11 04:31:40 2013(r259211)
+++ head/sys/arm/at91/if_ate.c  Wed Dec 11 05:32:29 2013(r259212)
@@ -947,10 +947,8 @@ ate_intr(void *xsc)
 
} while (!done);
 
-   if (mb != NULL) {
-   ifp-if_ipackets++;
-   (*ifp-if_input)(ifp, mb);
-   }
+   ifp-if_ipackets++;
+   (*ifp-if_input)(ifp, mb);
}
}
 
@@ -974,16 +972,14 @@ ate_intr(void *xsc)
sc-tx_descs[sc-txtail + 1].status |= 
ETHB_TX_USED;
}
 
-   while (sc-txtail != sc-txhead 
-   sc-tx_descs[sc-txtail].status  ETHB_TX_USED ) {
-
+   while ((sc-tx_descs[sc-txtail].status  ETHB_TX_USED) 
+   sc-sent_mbuf[sc-txtail] != NULL) {
bus_dmamap_sync(sc-mtag, sc-tx_map[sc-txtail],
BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(sc-mtag, sc-tx_map[sc-txtail]);
m_freem(sc-sent_mbuf[sc-txtail]);
sc-tx_descs[sc-txtail].addr = 0;
sc-sent_mbuf[sc-txtail] = NULL;
-
ifp-if_opackets++;
sc-txtail = NEXT_TX_IDX(sc, sc-txtail);
}
@@ -1118,12 +1114,10 @@ atestart_locked(struct ifnet *ifp)
 * xmit packets.  We use OACTIVE to indicate we can stuff more
 * into our buffers (clear) or not (set).
 */
-   if (!sc-is_emacb) {
-   /* RM9200 has only two hardware entries */
-   if (!sc-is_emacb  (RD4(sc, ETH_TSR)  ETH_TSR_BNQ) 
== 0) {
-   ifp-if_drv_flags |= IFF_DRV_OACTIVE;
-   return;
-   }
+   /* RM9200 has only two hardware entries */
+   if (!sc-is_emacb  (RD4(sc, ETH_TSR)  ETH_TSR_BNQ) == 0) {
+   ifp-if_drv_flags |= IFF_DRV_OACTIVE;
+   return;
}
 
IFQ_DRV_DEQUEUE(ifp-if_snd, m);
@@ -1146,6 +1140,21 @@ atestart_locked(struct ifnet *ifp)
m_freem(m);
continue;
}
+
+   /*
+* There's a small race between the loop in ate_intr finishing
+* and the check above to see if the packet was finished, as 
well
+* as when atestart gets called via other paths. Loose the race
+* gracefully and free the mbuf...
+*/
+   if (sc-sent_mbuf[sc-txhead] != NULL) {
+   bus_dmamap_sync(sc-mtag, sc-tx_map[sc-txtail],
+   BUS_DMASYNC_POSTWRITE);
+   bus_dmamap_unload(sc-mtag, sc-tx_map[sc-txtail]);
+   m_free(sc-sent_mbuf[sc-txhead]);
+   ifp-if_opackets++;
+   }
+   
sc-sent_mbuf[sc-txhead] = m;
 
bus_dmamap_sync(sc-mtag, sc-tx_map[sc-txhead],
___
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: r259213 - head/sys/amd64/vmm/io

2013-12-10 Thread Neel Natu
Author: neel
Date: Wed Dec 11 06:28:44 2013
New Revision: 259213
URL: http://svnweb.freebsd.org/changeset/base/259213

Log:
  Fix typo when initializing the vlapic version register ('' instead of '').

Modified:
  head/sys/amd64/vmm/io/vlapic.c

Modified: head/sys/amd64/vmm/io/vlapic.c
==
--- head/sys/amd64/vmm/io/vlapic.c  Wed Dec 11 05:32:29 2013
(r259212)
+++ head/sys/amd64/vmm/io/vlapic.c  Wed Dec 11 06:28:44 2013
(r259213)
@@ -260,7 +260,7 @@ vlapic_init_ipi(struct vlapic *vlapic)
 {
struct LAPIC*lapic = vlapic-apic;
lapic-version = VLAPIC_VERSION;
-   lapic-version |= (VLAPIC_MAXLVT_ENTRIES  MAXLVTSHIFT);
+   lapic-version |= (VLAPIC_MAXLVT_ENTRIES  MAXLVTSHIFT);
lapic-dfr = 0x;
lapic-svr = APIC_SVR_VECTOR;
vlapic_mask_lvts(lapic-lvt_timer, VLAPIC_MAXLVT_ENTRIES+1);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259214 - in stable: 10/contrib/llvm/tools/clang/lib/CodeGen 9/contrib/llvm/tools/clang/lib/CodeGen

2013-12-10 Thread Dimitry Andric
Author: dim
Date: Wed Dec 11 07:34:34 2013
New Revision: 259214
URL: http://svnweb.freebsd.org/changeset/base/259214

Log:
  MFC r259100:
  
  Pull in r196658 from upstream clang trunk:
  
CodeGen: Don't emit linkage on thunks that aren't emitted because they're
vararg.
  
This can happen when we're trying to emit a thunk with available_externally
linkage with optimization enabled but bail because it doesn't make sense for
vararg functions.
  
[LLVM] PR18098.
  
  This should fix clang Broken module found, compilation aborted errors when
  building the qt4-based dvbcut port.
  
  Reported by:  se

Modified:
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
Directory Properties:
  stable/9/contrib/llvm/   (props changed)
  stable/9/contrib/llvm/tools/clang/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
==
--- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Wed Dec 11 
06:28:44 2013(r259213)
+++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp Wed Dec 11 
07:34:34 2013(r259214)
@@ -454,10 +454,9 @@ void CodeGenVTables::EmitThunk(GlobalDec
   } else {
 // Normal thunk body generation.
 CodeGenFunction(CGM).GenerateThunk(ThunkFn, FnInfo, GD, Thunk);
+if (UseAvailableExternallyLinkage)
+  ThunkFn-setLinkage(llvm::GlobalValue::AvailableExternallyLinkage);
   }
-
-  if (UseAvailableExternallyLinkage)
-ThunkFn-setLinkage(llvm::GlobalValue::AvailableExternallyLinkage);
 }
 
 void CodeGenVTables::MaybeEmitThunkAvailableExternally(GlobalDecl GD,
___
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: r259214 - in stable: 10/contrib/llvm/tools/clang/lib/CodeGen 9/contrib/llvm/tools/clang/lib/CodeGen

2013-12-10 Thread Dimitry Andric
Author: dim
Date: Wed Dec 11 07:34:34 2013
New Revision: 259214
URL: http://svnweb.freebsd.org/changeset/base/259214

Log:
  MFC r259100:
  
  Pull in r196658 from upstream clang trunk:
  
CodeGen: Don't emit linkage on thunks that aren't emitted because they're
vararg.
  
This can happen when we're trying to emit a thunk with available_externally
linkage with optimization enabled but bail because it doesn't make sense for
vararg functions.
  
[LLVM] PR18098.
  
  This should fix clang Broken module found, compilation aborted errors when
  building the qt4-based dvbcut port.
  
  Reported by:  se

Modified:
  stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
Directory Properties:
  stable/9/contrib/llvm/   (props changed)
  stable/9/contrib/llvm/tools/clang/   (props changed)

Modified: stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
==
--- stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cppWed Dec 
11 06:28:44 2013(r259213)
+++ stable/10/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cppWed Dec 
11 07:34:34 2013(r259214)
@@ -454,10 +454,9 @@ void CodeGenVTables::EmitThunk(GlobalDec
   } else {
 // Normal thunk body generation.
 CodeGenFunction(CGM).GenerateThunk(ThunkFn, FnInfo, GD, Thunk);
+if (UseAvailableExternallyLinkage)
+  ThunkFn-setLinkage(llvm::GlobalValue::AvailableExternallyLinkage);
   }
-
-  if (UseAvailableExternallyLinkage)
-ThunkFn-setLinkage(llvm::GlobalValue::AvailableExternallyLinkage);
 }
 
 void CodeGenVTables::MaybeEmitThunkAvailableExternally(GlobalDecl GD,
___
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: r259216 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386

2013-12-10 Thread Dimitry Andric
Author: dim
Date: Wed Dec 11 07:43:30 2013
New Revision: 259216
URL: http://svnweb.freebsd.org/changeset/base/259216

Log:
  MFC r259111:
  
  Use correct casts in gcc's emmintrin.h for the first arguments of the
  following builtin functions:
  
  * __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
  * __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
  * __builtin_ia32_psradi128() takes __v4si instead of __v8hi
  
  This should fix the following errors when building the LINT kernel with
  gcc:
  
  sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
  '__builtin_ia32_psradi128'
  sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
  '__builtin_ia32_pslldi128'

Modified:
  stable/10/contrib/gcc/config/i386/emmintrin.h
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/9/contrib/gcc/config/i386/emmintrin.h
Directory Properties:
  stable/9/contrib/gcc/   (props changed)

Modified: stable/10/contrib/gcc/config/i386/emmintrin.h
==
--- stable/10/contrib/gcc/config/i386/emmintrin.h   Wed Dec 11 07:41:28 
2013(r259215)
+++ stable/10/contrib/gcc/config/i386/emmintrin.h   Wed Dec 11 07:43:30 
2013(r259216)
@@ -1126,9 +1126,9 @@ _mm_slli_epi64 (__m128i __A, int __B)
 #define _mm_slli_epi16(__A, __B) \
   ((__m128i)__builtin_ia32_psllwi128 ((__v8hi)(__A), __B))
 #define _mm_slli_epi32(__A, __B) \
-  ((__m128i)__builtin_ia32_pslldi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_pslldi128 ((__v4si)(__A), __B))
 #define _mm_slli_epi64(__A, __B) \
-  ((__m128i)__builtin_ia32_psllqi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_psllqi128 ((__v2di)(__A), __B))
 #endif
 
 #if 0
@@ -1147,7 +1147,7 @@ _mm_srai_epi32 (__m128i __A, int __B)
 #define _mm_srai_epi16(__A, __B) \
   ((__m128i)__builtin_ia32_psrawi128 ((__v8hi)(__A), __B))
 #define _mm_srai_epi32(__A, __B) \
-  ((__m128i)__builtin_ia32_psradi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_psradi128 ((__v4si)(__A), __B))
 #endif
 
 #if 0
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r259216 - in stable: 10/contrib/gcc/config/i386 9/contrib/gcc/config/i386

2013-12-10 Thread Dimitry Andric
Author: dim
Date: Wed Dec 11 07:43:30 2013
New Revision: 259216
URL: http://svnweb.freebsd.org/changeset/base/259216

Log:
  MFC r259111:
  
  Use correct casts in gcc's emmintrin.h for the first arguments of the
  following builtin functions:
  
  * __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
  * __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
  * __builtin_ia32_psradi128() takes __v4si instead of __v8hi
  
  This should fix the following errors when building the LINT kernel with
  gcc:
  
  sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
  '__builtin_ia32_psradi128'
  sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
  '__builtin_ia32_pslldi128'

Modified:
  stable/9/contrib/gcc/config/i386/emmintrin.h
Directory Properties:
  stable/9/contrib/gcc/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/contrib/gcc/config/i386/emmintrin.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/contrib/gcc/config/i386/emmintrin.h
==
--- stable/9/contrib/gcc/config/i386/emmintrin.hWed Dec 11 07:41:28 
2013(r259215)
+++ stable/9/contrib/gcc/config/i386/emmintrin.hWed Dec 11 07:43:30 
2013(r259216)
@@ -1126,9 +1126,9 @@ _mm_slli_epi64 (__m128i __A, int __B)
 #define _mm_slli_epi16(__A, __B) \
   ((__m128i)__builtin_ia32_psllwi128 ((__v8hi)(__A), __B))
 #define _mm_slli_epi32(__A, __B) \
-  ((__m128i)__builtin_ia32_pslldi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_pslldi128 ((__v4si)(__A), __B))
 #define _mm_slli_epi64(__A, __B) \
-  ((__m128i)__builtin_ia32_psllqi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_psllqi128 ((__v2di)(__A), __B))
 #endif
 
 #if 0
@@ -1147,7 +1147,7 @@ _mm_srai_epi32 (__m128i __A, int __B)
 #define _mm_srai_epi16(__A, __B) \
   ((__m128i)__builtin_ia32_psrawi128 ((__v8hi)(__A), __B))
 #define _mm_srai_epi32(__A, __B) \
-  ((__m128i)__builtin_ia32_psradi128 ((__v8hi)(__A), __B))
+  ((__m128i)__builtin_ia32_psradi128 ((__v4si)(__A), __B))
 #endif
 
 #if 0
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org