svn commit: r205791 - head/sys/net80211

2010-03-28 Thread Rui Paulo
Author: rpaulo
Date: Sun Mar 28 12:55:31 2010
New Revision: 205791
URL: http://svn.freebsd.org/changeset/base/205791

Log:
  Add a comment explaining the previous commit.
  
  Submitted by: sam
  > Description of fields to fill in above: 76 columns --|
  > PR:If a GNATS PR is affected by the change.
  > Submitted by:  If someone else sent in the change.
  > Reviewed by:   If someone else reviewed your modification.
  > Approved by:   If you needed approval for this commit.
  > Obtained from: If the change is from a third party.
  > MFC after: N [day[s]|week[s]|month[s]].  Request a reminder email.
  > Security:  Vulnerability reference (one per line) or description.
  > Empty fields above will be automatically removed.
  
  Mieee80211_hostap.c

Modified:
  head/sys/net80211/ieee80211_hostap.c

Modified: head/sys/net80211/ieee80211_hostap.c
==
--- head/sys/net80211/ieee80211_hostap.cSun Mar 28 11:22:38 2010
(r205790)
+++ head/sys/net80211/ieee80211_hostap.cSun Mar 28 12:55:31 2010
(r205791)
@@ -883,6 +883,11 @@ hostap_input(struct ieee80211_node *ni, 
wh = mtod(m, struct ieee80211_frame *);
wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
}
+   /*
+* Pass the packet to radiotap before calling iv_recv_mgmt().
+* Otherwise iv_recv_mgmt() might pass another packet to
+* radiotap, resulting in out of order packet captures.
+*/
if (ieee80211_radiotap_active_vap(vap))
ieee80211_radiotap_rx(vap, m);
need_tap = 0;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205792 - in head: lib/libc/sys sys/amd64/linux32 sys/compat/freebsd32 sys/compat/linux sys/compat/svr4 sys/i386/ibcs2 sys/i386/linux sys/kern sys/sys

2010-03-28 Thread Ed Schouten
Author: ed
Date: Sun Mar 28 13:13:22 2010
New Revision: 205792
URL: http://svn.freebsd.org/changeset/base/205792

Log:
  Rename st_*timespec fields to st_*tim for POSIX 2008 compliance.
  
  A nice thing about POSIX 2008 is that it finally standardizes a way to
  obtain file access/modification/change times in sub-second precision,
  namely using struct timespec, which we already have for a very long
  time. Unfortunately POSIX uses different names.
  
  This commit adds compatibility macros, so existing code should still
  build properly. Also change all source code in the kernel to work
  without any of the compatibility macros. This makes it all a less
  ambiguous.
  
  I am also renaming st_birthtime to st_birthtim, even though it was a
  local extension anyway. It seems Cygwin also has a st_birthtim.

Modified:
  head/lib/libc/sys/stat.2
  head/sys/amd64/linux32/linux.h
  head/sys/compat/freebsd32/freebsd32.h
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/compat/linux/linux_stats.c
  head/sys/compat/svr4/svr4_stat.c
  head/sys/i386/ibcs2/ibcs2_stat.c
  head/sys/i386/linux/linux.h
  head/sys/kern/sys_pipe.c
  head/sys/kern/tty_pts.c
  head/sys/kern/uipc_mqueue.c
  head/sys/kern/uipc_sem.c
  head/sys/kern/uipc_shm.c
  head/sys/kern/vfs_syscalls.c
  head/sys/kern/vfs_vnops.c
  head/sys/sys/_timespec.h
  head/sys/sys/stat.h
  head/sys/sys/timespec.h

Modified: head/lib/libc/sys/stat.2
==
--- head/lib/libc/sys/stat.2Sun Mar 28 12:55:31 2010(r205791)
+++ head/lib/libc/sys/stat.2Sun Mar 28 13:13:22 2010(r205792)
@@ -149,8 +149,8 @@ fields together identify the file unique
 The time-related fields of
 .Vt "struct stat"
 are as follows:
-.Bl -tag -width ".Va st_birthtime"
-.It Va st_atime
+.Bl -tag -width ".Va st_birthtim"
+.It Va st_atim
 Time when file data last accessed.
 Changed by the
 .Xr mknod 2 ,
@@ -159,7 +159,7 @@ Changed by the
 and
 .Xr readv 2
 system calls.
-.It Va st_mtime
+.It Va st_mtim
 Time when file data last modified.
 Changed by the
 .Xr mkdir 2 ,
@@ -170,7 +170,7 @@ Changed by the
 and
 .Xr writev 2
 system calls.
-.It Va st_ctime
+.It Va st_ctim
 Time when file status was last changed (inode data modification).
 Changed by the
 .Xr chflags 2 ,
@@ -191,18 +191,24 @@ Changed by the
 and
 .Xr writev 2
 system calls.
-.It Va st_birthtime
+.It Va st_birthtim
 Time when the inode was created.
 .El
 .Pp
-If
-.Dv _POSIX_SOURCE
-is not defined, the time-related fields are defined as:
+The following time-related macros are defined for compatibility:
 .Bd -literal
+#definest_atimest_atim.tv_sec
+#definest_mtimest_mtim.tv_sec
+#definest_ctimest_ctim.tv_sec
 #ifndef _POSIX_SOURCE
-#define st_atime st_atimespec.tv_sec
-#define st_mtime st_mtimespec.tv_sec
-#define st_ctime st_ctimespec.tv_sec
+#definest_birthtimest_birthtim.tv_sec
+#endif
+
+#ifndef _POSIX_SOURCE
+#definest_atimespecst_atim
+#definest_mtimespecst_mtim
+#definest_ctimespecst_ctim
+#definest_birthtimespecst_birthtim
 #endif
 .Ed
 .Pp

Modified: head/sys/amd64/linux32/linux.h
==
--- head/sys/amd64/linux32/linux.h  Sun Mar 28 12:55:31 2010
(r205791)
+++ head/sys/amd64/linux32/linux.h  Sun Mar 28 13:13:22 2010
(r205792)
@@ -203,9 +203,9 @@ struct l_newstat {
l_ulong st_size;
l_ulong st_blksize;
l_ulong st_blocks;
-   struct l_timespec   st_atimespec;
-   struct l_timespec   st_mtimespec;
-   struct l_timespec   st_ctimespec;
+   struct l_timespec   st_atim;
+   struct l_timespec   st_mtim;
+   struct l_timespec   st_ctim;
l_ulong __unused4;
l_ulong __unused5;
 } __packed;
@@ -219,9 +219,9 @@ struct l_stat {
l_ushortst_gid;
l_ushortst_rdev;
l_long  st_size;
-   struct l_timespec   st_atimespec;
-   struct l_timespec   st_mtimespec;
-   struct l_timespec   st_ctimespec;
+   struct l_timespec   st_atim;
+   struct l_timespec   st_mtim;
+   struct l_timespec   st_ctim;
l_long  st_blksize;
l_long  st_blocks;
l_ulong st_flags;
@@ -242,9 +242,9 @@ struct l_stat64 {
l_ulong st_blksize;
l_ulong st_blocks;
l_ulong __pad4;
-   struct l_timespec   st_atimespec;
-   struct l_timespec   st_mtimespec;
-   struct l_timespec   st_ctimespec;
+   struct l_timespec   st_atim;
+   struct l_timespec   st_mtim;
+   struct l_timespec   st_ctim;
l_ulonglong st_ino;
 } __packed;
 

Modified: head/sys/compat/freebsd32/free

svn commit: r205793 - in head: bin/cp bin/ls bin/rcp bin/test gnu/usr.bin/diff usr.bin/compress usr.bin/gzip usr.bin/kdump usr.bin/mail usr.bin/touch usr.sbin/mtree

2010-03-28 Thread Ed Schouten
Author: ed
Date: Sun Mar 28 13:16:08 2010
New Revision: 205793
URL: http://svn.freebsd.org/changeset/base/205793

Log:
  Change all our own code to use st_*tim instead of st_*timespec.
  
  Also remove some local patches to diff(1) which are now unneeded.

Modified:
  head/bin/cp/utils.c
  head/bin/ls/cmp.c
  head/bin/rcp/rcp.c
  head/bin/test/test.c
  head/gnu/usr.bin/diff/context.c.diff
  head/gnu/usr.bin/diff/diff.c.diff
  head/usr.bin/compress/compress.c
  head/usr.bin/gzip/gzip.c
  head/usr.bin/kdump/kdump.c
  head/usr.bin/mail/util.c
  head/usr.bin/touch/touch.c
  head/usr.sbin/mtree/compare.c
  head/usr.sbin/mtree/create.c

Modified: head/bin/cp/utils.c
==
--- head/bin/cp/utils.c Sun Mar 28 13:13:22 2010(r205792)
+++ head/bin/cp/utils.c Sun Mar 28 13:16:08 2010(r205793)
@@ -323,8 +323,8 @@ setfile(struct stat *fs, int fd)
fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX |
   S_IRWXU | S_IRWXG | S_IRWXO;
 
-   TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
-   TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
+   TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim);
+   TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim);
if (islink ? lutimes(to.p_path, tv) : utimes(to.p_path, tv)) {
warn("%sutimes: %s", islink ? "l" : "", to.p_path);
rval = 1;

Modified: head/bin/ls/cmp.c
==
--- head/bin/ls/cmp.c   Sun Mar 28 13:13:22 2010(r205792)
+++ head/bin/ls/cmp.c   Sun Mar 28 13:16:08 2010(r205793)
@@ -66,17 +66,17 @@ int
 modcmp(const FTSENT *a, const FTSENT *b)
 {
 
-   if (b->fts_statp->st_mtimespec.tv_sec >
-   a->fts_statp->st_mtimespec.tv_sec)
+   if (b->fts_statp->st_mtim.tv_sec >
+   a->fts_statp->st_mtim.tv_sec)
return (1);
-   if (b->fts_statp->st_mtimespec.tv_sec <
-   a->fts_statp->st_mtimespec.tv_sec)
+   if (b->fts_statp->st_mtim.tv_sec <
+   a->fts_statp->st_mtim.tv_sec)
return (-1);
-   if (b->fts_statp->st_mtimespec.tv_nsec >
-   a->fts_statp->st_mtimespec.tv_nsec)
+   if (b->fts_statp->st_mtim.tv_nsec >
+   a->fts_statp->st_mtim.tv_nsec)
return (1);
-   if (b->fts_statp->st_mtimespec.tv_nsec <
-   a->fts_statp->st_mtimespec.tv_nsec)
+   if (b->fts_statp->st_mtim.tv_nsec <
+   a->fts_statp->st_mtim.tv_nsec)
return (-1);
return (strcoll(a->fts_name, b->fts_name));
 }
@@ -92,17 +92,17 @@ int
 acccmp(const FTSENT *a, const FTSENT *b)
 {
 
-   if (b->fts_statp->st_atimespec.tv_sec >
-   a->fts_statp->st_atimespec.tv_sec)
+   if (b->fts_statp->st_atim.tv_sec >
+   a->fts_statp->st_atim.tv_sec)
return (1);
-   if (b->fts_statp->st_atimespec.tv_sec <
-   a->fts_statp->st_atimespec.tv_sec)
+   if (b->fts_statp->st_atim.tv_sec <
+   a->fts_statp->st_atim.tv_sec)
return (-1);
-   if (b->fts_statp->st_atimespec.tv_nsec >
-   a->fts_statp->st_atimespec.tv_nsec)
+   if (b->fts_statp->st_atim.tv_nsec >
+   a->fts_statp->st_atim.tv_nsec)
return (1);
-   if (b->fts_statp->st_atimespec.tv_nsec <
-   a->fts_statp->st_atimespec.tv_nsec)
+   if (b->fts_statp->st_atim.tv_nsec <
+   a->fts_statp->st_atim.tv_nsec)
return (-1);
return (strcoll(a->fts_name, b->fts_name));
 }
@@ -118,17 +118,17 @@ int
 birthcmp(const FTSENT *a, const FTSENT *b)
 {
 
-   if (b->fts_statp->st_birthtimespec.tv_sec >
-   a->fts_statp->st_birthtimespec.tv_sec)
+   if (b->fts_statp->st_birthtim.tv_sec >
+   a->fts_statp->st_birthtim.tv_sec)
return (1);
-   if (b->fts_statp->st_birthtimespec.tv_sec <
-   a->fts_statp->st_birthtimespec.tv_sec)
+   if (b->fts_statp->st_birthtim.tv_sec <
+   a->fts_statp->st_birthtim.tv_sec)
return (-1);
-   if (b->fts_statp->st_birthtimespec.tv_nsec >
-   a->fts_statp->st_birthtimespec.tv_nsec)
+   if (b->fts_statp->st_birthtim.tv_nsec >
+   a->fts_statp->st_birthtim.tv_nsec)
return (1);
-   if (b->fts_statp->st_birthtimespec.tv_nsec <
-   a->fts_statp->st_birthtimespec.tv_nsec)
+   if (b->fts_statp->st_birthtim.tv_nsec <
+   a->fts_statp->st_birthtim.tv_nsec)
return (-1);
return (strcoll(a->fts_name, b->fts_name));
 }
@@ -144,17 +144,17 @@ int
 statcmp(const FTSENT *a, const FTSENT *b)
 {
 
-   if (b->fts_statp->st_ctimespec.tv_sec >
-   a->fts_statp->st_ctimespec.tv_sec)
+   if (b->fts_statp->st_ctim.tv_sec >
+   a->fts_statp->st_ctim.tv_sec)
return (1);
-   if (b->fts_statp->st_ctimespec.tv_sec <
-   a->fts_statp->st_ctimespec

svn commit: r205794 - head/lib/libc/sys

2010-03-28 Thread Ed Schouten
Author: ed
Date: Sun Mar 28 13:40:13 2010
New Revision: 205794
URL: http://svn.freebsd.org/changeset/base/205794

Log:
  Don't forget to bump the date in the man page.

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

Modified: head/lib/libc/sys/stat.2
==
--- head/lib/libc/sys/stat.2Sun Mar 28 13:16:08 2010(r205793)
+++ head/lib/libc/sys/stat.2Sun Mar 28 13:40:13 2010(r205794)
@@ -28,7 +28,7 @@
 .\" @(#)stat.2 8.4 (Berkeley) 5/1/95
 .\" $FreeBSD$
 .\"
-.Dd April 10, 2008
+.Dd March 28, 2010
 .Dt STAT 2
 .Os
 .Sh NAME
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205795 - head/sys/powerpc/ofw

2010-03-28 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sun Mar 28 17:17:32 2010
New Revision: 205795
URL: http://svn.freebsd.org/changeset/base/205795

Log:
  Set hw.ofwfb.relax_mmap=1 by default. While these checks may be a good
  idea in principle, X does not work without them on basically any hardware,
  and this is probably the most frequent problem people run into on PowerPC.
  
  Prodded by:   rnoland
  MFC after:1 week

Modified:
  head/sys/powerpc/ofw/ofw_syscons.c

Modified: head/sys/powerpc/ofw/ofw_syscons.c
==
--- head/sys/powerpc/ofw/ofw_syscons.c  Sun Mar 28 13:40:13 2010
(r205794)
+++ head/sys/powerpc/ofw/ofw_syscons.c  Sun Mar 28 17:17:32 2010
(r205795)
@@ -55,10 +55,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-static int ofwfb_ignore_mmap_checks;
+static int ofwfb_ignore_mmap_checks = 1;
 SYSCTL_NODE(_hw, OID_AUTO, ofwfb, CTLFLAG_RD, 0, "ofwfb");
 SYSCTL_INT(_hw_ofwfb, OID_AUTO, relax_mmap, CTLFLAG_RW,
-&ofwfb_ignore_mmap_checks, 0, "relax mmap bounds checking");
+&ofwfb_ignore_mmap_checks, 0, "relaxed mmap bounds checking");
 
 extern u_char dflt_font_16[];
 extern u_char dflt_font_14[];
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205796 - head/lib/libc/posix1e

2010-03-28 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun Mar 28 17:29:15 2010
New Revision: 205796
URL: http://svn.freebsd.org/changeset/base/205796

Log:
  Make acl_to_text_np(3) not crash on long group or user names in NFSv4 ACLs.
  
  PR:   amd64/145091
  MFC after:2 weeks

Modified:
  head/lib/libc/posix1e/acl_to_text_nfs4.c

Modified: head/lib/libc/posix1e/acl_to_text_nfs4.c
==
--- head/lib/libc/posix1e/acl_to_text_nfs4.cSun Mar 28 17:17:32 2010
(r205795)
+++ head/lib/libc/posix1e/acl_to_text_nfs4.cSun Mar 28 17:29:15 2010
(r205796)
@@ -167,7 +167,7 @@ format_additional_id(char *str, size_t s
 static int
 format_entry(char *str, size_t size, const acl_entry_t entry, int flags)
 {
-   size_t off = 0, padding_length, maximum_who_field_length = 18;
+   size_t off = 0, min_who_field_length = 18;
acl_permset_t permset;
acl_flagset_t flagset;
int error, len;
@@ -188,12 +188,9 @@ format_entry(char *str, size_t size, con
if (error)
return (error);
len = strlen(buf);
-   padding_length = maximum_who_field_length - len;
-   if (padding_length > 0) {
-   memset(str, ' ', padding_length);
-   off += padding_length;
-   }
-   off += snprintf(str + off, size - off, "%s:", buf);
+   if (len < min_who_field_length)
+   len = min_who_field_length;
+   off += snprintf(str + off, size - off, "%*s:", len, buf);
 
error = _nfs4_format_access_mask(buf, sizeof(buf), *permset,
flags & ACL_TEXT_VERBOSE);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205801 - head/sys/dev/usb

2010-03-28 Thread Andrew Thompson
Author: thompsa
Date: Sun Mar 28 20:02:13 2010
New Revision: 205801
URL: http://svn.freebsd.org/changeset/base/205801

Log:
  Add a couple of usb product IDs.
  
  Submitted by: Dmitry Luhtionov @ gmail.com

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsSun Mar 28 19:34:57 2010(r205800)
+++ head/sys/dev/usb/usbdevsSun Mar 28 20:02:13 2010(r205801)
@@ -2516,12 +2516,14 @@ product QUALCOMMINC E2003   0x2003  3G mode
 
 /* Quanta products */
 /* Quanta products */
+product QUANTA RW6815_10x00ce  HP iPAQ rw6815
 product QUANTA RT3070  0x0304  RT3070
 product QUANTA Q1010xea02  HSDPA modem
 product QUANTA Q1110xea03  HSDPA modem
 product QUANTA GLX 0xea04  HSDPA modem
 product QUANTA GKE 0xea05  HSDPA modem
 product QUANTA GLE 0xea06  HSDPA modem
+product QUANTA RW6815_20xf003  HP iPAQ rw6815
 
 /* Qtronix products */
 product QTRONIX 980N   0x2011  Scorpion-980N keyboard
@@ -2729,6 +2731,7 @@ product SIERRA AIRCARD875 0x6820  Aircard
 product SIERRA TRUINSTALL  0x0fff  Aircard Tru Installer
 
 /* Sigmatel products */
+product SIGMATEL WBT_3052  0x4200  WBT-3052 IrDA/USB Bridge
 product SIGMATEL I_BEAD100 0x8008  i-Bead 100 MP3 Player
 
 /* SIIG products */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205802 - head/sys/dev/usb/controller

2010-03-28 Thread Andrew Thompson
Author: thompsa
Date: Sun Mar 28 20:02:50 2010
New Revision: 205802
URL: http://svn.freebsd.org/changeset/base/205802

Log:
  Add PCI IDs for two more nForce controllers.
  
  Submitted by: Dmitry Luhtionov @ gmail.com

Modified:
  head/sys/dev/usb/controller/ehci_pci.c
  head/sys/dev/usb/controller/ohci_pci.c

Modified: head/sys/dev/usb/controller/ehci_pci.c
==
--- head/sys/dev/usb/controller/ehci_pci.c  Sun Mar 28 20:02:13 2010
(r205801)
+++ head/sys/dev/usb/controller/ehci_pci.c  Sun Mar 28 20:02:50 2010
(r205802)
@@ -208,6 +208,8 @@ ehci_pci_match(device_t self)
return "NVIDIA nForce3 250 USB 2.0 controller";
case 0x005b10de:
return "NVIDIA nForce4 USB 2.0 controller";
+   case 0x036d10de:
+   return "NVIDIA nForce MCP55 USB 2.0 controller";
case 0x03f210de:
return "NVIDIA nForce MCP61 USB 2.0 controller";
case 0x0aa610de:

Modified: head/sys/dev/usb/controller/ohci_pci.c
==
--- head/sys/dev/usb/controller/ohci_pci.c  Sun Mar 28 20:02:13 2010
(r205801)
+++ head/sys/dev/usb/controller/ohci_pci.c  Sun Mar 28 20:02:50 2010
(r205802)
@@ -166,6 +166,8 @@ ohci_pci_match(device_t self)
case 0x00d710de:
return ("nVidia nForce3 USB Controller");
 
+   case 0x036c10de:
+   return ("nVidia nForce MCP55 USB Controller");
case 0x03f110de:
return ("nVidia nForce MCP61 USB Controller");
case 0x0aa510de:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205803 - head/sys/dev/usb

2010-03-28 Thread Andrew Thompson
Author: thompsa
Date: Sun Mar 28 20:04:03 2010
New Revision: 205803
URL: http://svn.freebsd.org/changeset/base/205803

Log:
  Make sure the bsd_urb_list gets initialised and that new URB's are queued at
  the end of the list.
  
  Submitted by: Hans Petter Selasky

Modified:
  head/sys/dev/usb/usb_compat_linux.c

Modified: head/sys/dev/usb/usb_compat_linux.c
==
--- head/sys/dev/usb/usb_compat_linux.c Sun Mar 28 20:02:50 2010
(r205802)
+++ head/sys/dev/usb/usb_compat_linux.c Sun Mar 28 20:04:03 2010
(r205803)
@@ -435,7 +435,7 @@ usb_submit_urb(struct urb *urb, uint16_t
uhe->bsd_xfer[1]) {
/* we are ready! */
 
-   TAILQ_INSERT_HEAD(&uhe->bsd_urb_list, urb, bsd_urb_list);
+   TAILQ_INSERT_TAIL(&uhe->bsd_urb_list, urb, bsd_urb_list);
 
urb->status = -EINPROGRESS;
 
@@ -908,6 +908,7 @@ usb_linux_create_usb_device(struct usb_d
if (p_uhe) {
bcopy(ed, &p_uhe->desc, 
sizeof(p_uhe->desc));
p_uhe->bsd_iface_index = iface_index - 
1;
+   TAILQ_INIT(&p_uhe->bsd_urb_list);
p_uhe++;
}
if (p_uhi) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205804 - head/sys/dev/usb/input

2010-03-28 Thread Andrew Thompson
Author: thompsa
Date: Sun Mar 28 20:07:08 2010
New Revision: 205804
URL: http://svn.freebsd.org/changeset/base/205804

Log:
  Do not swap Apple keys when detecting Apple-FN keyboards.
  
  Reported by:  Steven Noonan
  Submitted by: Hans Petter Selasky

Modified:
  head/sys/dev/usb/input/ukbd.c

Modified: head/sys/dev/usb/input/ukbd.c
==
--- head/sys/dev/usb/input/ukbd.c   Sun Mar 28 20:04:03 2010
(r205803)
+++ head/sys/dev/usb/input/ukbd.c   Sun Mar 28 20:07:08 2010
(r205804)
@@ -896,8 +896,7 @@ ukbd_attach(device_t dev)
hid_input, 0, &sc->sc_loc_apple_fn, &flags,
&temp_id)) {
if (flags & HIO_VARIABLE)
-   sc->sc_flags |= UKBD_FLAG_APPLE_FN |
-   UKBD_FLAG_APPLE_SWAP;
+   sc->sc_flags |= UKBD_FLAG_APPLE_FN;
DPRINTFN(1, "Found Apple FN-key\n");
apple_keys = 1;
sc->sc_kbd_id = temp_id;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205805 - in head/sys/dev/usb: . quirk

2010-03-28 Thread Andrew Thompson
Author: thompsa
Date: Sun Mar 28 20:09:04 2010
New Revision: 205805
URL: http://svn.freebsd.org/changeset/base/205805

Log:
  Do not sync cache for the PL2506
  
  PR:   usb/144915
  Submitted by: Monty Hall

Modified:
  head/sys/dev/usb/quirk/usb_quirk.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==
--- head/sys/dev/usb/quirk/usb_quirk.c  Sun Mar 28 20:07:08 2010
(r205804)
+++ head/sys/dev/usb/quirk/usb_quirk.c  Sun Mar 28 20:09:04 2010
(r205805)
@@ -318,6 +318,8 @@ static struct usb_quirk_entry usb_quirks
USB_QUIRK(PNY, ATTACHE2, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE,
UQ_MSC_NO_START_STOP),
+   USB_QUIRK(PROLIFIC, PL2506, 0x, 0x,
+   UQ_MSC_NO_SYNC_CACHE),
USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN,
USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY),

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsSun Mar 28 20:07:08 2010(r205804)
+++ head/sys/dev/usb/usbdevsSun Mar 28 20:09:04 2010(r205805)
@@ -2416,6 +2416,7 @@ product PROLIFIC PL2303   0x2303  PL2303 S
 product PROLIFIC PL23050x2305  Parallel printer
 product PROLIFIC ATAPI40x2307  ATAPI-4 Controller
 product PROLIFIC PL25010x2501  PL2501 Host-Host interface
+product PROLIFIC PL25060x2506  PL2506 USB to IDE Bridge
 product PROLIFIC PHAROS0xaaa0  Prolific Pharos
 product PROLIFIC RSAQ3 0xaaa2  PL2303 Serial Adapter (IODATA USB-RSAQ3)
 product PROLIFIC2 WSIM 0x2001  Willcom WSIM
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r205809 - head/usr.sbin/pmcstat

2010-03-28 Thread Fabien Thomas
Author: fabient
Date: Sun Mar 28 22:46:56 2010
New Revision: 205809
URL: http://svn.freebsd.org/changeset/base/205809

Log:
  Wait for pmc name in the log before displaying data.
  This will solve an abort in case of low throughput PMCs.
  
  MFC after: 3days

Modified:
  head/usr.sbin/pmcstat/pmcstat_log.c

Modified: head/usr.sbin/pmcstat/pmcstat_log.c
==
--- head/usr.sbin/pmcstat/pmcstat_log.c Sun Mar 28 22:30:14 2010
(r205808)
+++ head/usr.sbin/pmcstat/pmcstat_log.c Sun Mar 28 22:46:56 2010
(r205809)
@@ -1049,7 +1049,6 @@ pmcstat_pmcindex_to_name(int pmcin)
if (pr->pr_pmcin == pmcin)
return pmcstat_string_unintern(pr->pr_pmcname);
 
-   err(EX_SOFTWARE, "ERROR: cannot find pmcid name");
return NULL;
 }
 
@@ -1789,19 +1788,23 @@ static void
 pmcstat_refresh_top(void)
 {
char pmcname[40];
+   const char *s;
 
/* If in pause mode do not refresh display. */
if (pmcstat_pause)
return;
 
+   /* Wait until PMC pop in the log. */
+   s = pmcstat_pmcindex_to_name(pmcstat_pmcinfilter);
+   if (s == NULL)
+   return;
+
/* Format PMC name. */
if (pmcstat_mergepmc)
-   snprintf(pmcname, sizeof(pmcname), "[%s]",
-   pmcstat_pmcindex_to_name(pmcstat_pmcinfilter));
+   snprintf(pmcname, sizeof(pmcname), "[%s]", s);
else
snprintf(pmcname, sizeof(pmcname), "%s.%d",
-   pmcstat_pmcindex_to_name(pmcstat_pmcinfilter),
-   pmcstat_pmcinfilter);
+   s, pmcstat_pmcinfilter);
 
PMCSTAT_PRINTBEGIN();
PMCSTAT_PRINTW("PMC: %s Samples: %u processed, %u invalid\n\n",
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r205720 - in head/sys: dev/ixgbe modules/ixgbe

2010-03-28 Thread Max Laier
On Saturday 27 March 2010 01:21:40 Jack F Vogel wrote:
> Author: jfv
> Date: Sat Mar 27 00:21:40 2010
> New Revision: 205720
> URL: http://svn.freebsd.org/changeset/base/205720
> 
> Log:
>   Update the driver to Intel version 2.1.6
>   - add some new hardware support for 82599
>   - Big change to interrupt architecture, it now
> uses a queue which contains an RX/TX pair as
> the recipient of the interrupt. This will reduce
> overall system interrupts/msix usage.
>   - Improved RX mbuf handling: the old get_buf routine
> is no longer synchronized with rxeof, this allows
> the elimination of packet discards due to mbuf
> allocation failure.
>   - Much simplified and improved AIM code, it now
> happens in the queue interrupt context and takes
> into account both the traffic on the RX AND TX
> side.
>   - variety of small tweaks, like ring size, that have
> been seen as performance improvements.
>   - Thanks to those that provided feedback or suggested
> changes, I hope I've caught all of them.

This seems to introduce the same error in drbr handling that I just fixed for 
e1000 & friend - c.f. r203834.  This results in ALTQ not working on these 
interfaces.  Let me know if you have any questions, more details in-line.

> Modified: head/sys/dev/ixgbe/ixgbe.c
> ===
> === --- head/sys/dev/ixgbe/ixgbe.cFri Mar 26 23:44:51 2010
> (r205719)
> +++ head/sys/dev/ixgbe/ixgbe.cSat Mar 27 00:21:40 2010
> (r205720)
...
> @@ -849,59 +817,43 @@ ixgbe_mq_start_locked(struct ifnet *ifp,
>  {
>   struct adapter  *adapter = txr->adapter;
>  struct mbuf *next;
> -int err = 0;
> +int enqueued, err = 0;
> 
> - if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) ||
> - (!adapter->link_active)) {
> - err = drbr_enqueue(ifp, txr->br, m);
> + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) !=
> + IFF_DRV_RUNNING || adapter->link_active == 0) {
> + if (m != NULL)
> + err = drbr_enqueue(ifp, txr->br, m);
>   return (err);
>   }
> 
> - if (m == NULL) /* Called by tasklet */
> - goto process;
> -
> - /* If nothing queued go right to xmit */
> - if (!drbr_needs_enqueue(ifp, txr->br)) {
> - if ((err = ixgbe_xmit(txr, &m)) != 0) {
> - if (m != NULL)
> - err = drbr_enqueue(ifp, txr->br, m);
> - return (err);
> - } else {
> - /* Success, update stats */
> - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags);
> - /* Send a copy of the frame to the BPF listener */
> - ETHER_BPF_MTAP(ifp, m);
> - /* Set the watchdog */
> - txr->watchdog_check = TRUE;
> -}
> -
> -} else if ((err = drbr_enqueue(ifp, txr->br, m)) != 0)
> - return (err);
> -
> -process:
> - if (drbr_empty(ifp, txr->br))
> - return (err);
> + enqueued = 0;
> + if (m == NULL)
> + next = drbr_dequeue(ifp, txr->br);
> + else
> + next = m;

The new start_locked logic looks like the old igb.  An adaption of my diff:
http://svn.freebsd.org/viewvc/base/head/sys/dev/e1000/if_igb.c?r1=203834&r2=203833&pathrev=203834
should make things work.

>   /* Process the queue */
> - while (TRUE) {
> - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
> - break;
> - next = drbr_dequeue(ifp, txr->br);
> - if (next == NULL)
> - break;
> + while (next != NULL) {
>   if ((err = ixgbe_xmit(txr, &next)) != 0) {
>   if (next != NULL)
>   err = drbr_enqueue(ifp, txr->br, next);
>   break;
>   }
> + enqueued++;
>   drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags);
> + /* Send a copy of the frame to the BPF listener */
>   ETHER_BPF_MTAP(ifp, next);
> - /* Set the watchdog */
> - txr->watchdog_check = TRUE;
> + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
> + break;
> + if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) {
> + ifp->if_drv_flags |= IFF_DRV_OACTIVE;
> + break;
> + }
> + next = drbr_dequeue(ifp, txr->br);
>   }
> -
> - if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD)
> - ifp->if_drv_flags |= IFF_DRV_OACTIVE;
> +
> + if (enqueued > 0)
> + txr->watchdog_check = TRUE;
> 
>   return (err);
>  }

Regards,
  Max
__

svn commit: r205821 - head/usr.bin/calendar

2010-03-28 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 29 06:49:20 2010
New Revision: 205821
URL: http://svn.freebsd.org/changeset/base/205821

Log:
  Long awaited update to the calendar system:
  
  - Repeating events which span multiple years (because of -A, -B or
just the three days before the end of the year).
  
  - Support for lunar events (full moon, new moon) and solar events
(equinox and solstice, chinese new year). Because of this, the
options -U (UTC offset) and -l (longitude) are available to
compensate if reality doesn't match the calculated values.
  
  MFC after:1 month

Added:
  head/usr.bin/calendar/dates.c   (contents, props changed)
  head/usr.bin/calendar/events.c   (contents, props changed)
  head/usr.bin/calendar/locale.c   (contents, props changed)
  head/usr.bin/calendar/parsedata.c   (contents, props changed)
  head/usr.bin/calendar/pom.c   (contents, props changed)
  head/usr.bin/calendar/sunpos.c   (contents, props changed)
Modified:
  head/usr.bin/calendar/Makefile
  head/usr.bin/calendar/calendar.1
  head/usr.bin/calendar/calendar.c
  head/usr.bin/calendar/calendar.h
  head/usr.bin/calendar/day.c
  head/usr.bin/calendar/io.c
  head/usr.bin/calendar/ostern.c
  head/usr.bin/calendar/paskha.c
  head/usr.bin/calendar/pathnames.h

Modified: head/usr.bin/calendar/Makefile
==
--- head/usr.bin/calendar/Makefile  Mon Mar 29 06:31:58 2010
(r205820)
+++ head/usr.bin/calendar/Makefile  Mon Mar 29 06:49:20 2010
(r205821)
@@ -2,7 +2,9 @@
 # $FreeBSD$
 
 PROG=  calendar
-SRCS=   calendar.c io.c day.c ostern.c paskha.c
+SRCS=  calendar.c locale.c events.c dates.c parsedata.c io.c day.c \
+   ostern.c paskha.c pom.c sunpos.c
+LDADD= -lm
 INTER=  de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \
hr_HR.ISO8859-2 hu_HU.ISO8859-2 ru_RU.KOI8-R uk_UA.KOI8-U
 DE_LINKS=   de_DE.ISO8859-15

Modified: head/usr.bin/calendar/calendar.1
==
--- head/usr.bin/calendar/calendar.1Mon Mar 29 06:31:58 2010
(r205820)
+++ head/usr.bin/calendar/calendar.1Mon Mar 29 06:49:20 2010
(r205821)
@@ -54,6 +54,8 @@
 .Ek
 .Oc
 .Op Fl W Ar num
+.Op Fl U Ar UTC-offset
+.Op Fl l Ar longitude
 .Sh DESCRIPTION
 The
 .Nm
@@ -93,6 +95,12 @@ as the default calendar file.
 .Sm on
 .Xc
 For test purposes only: set date directly to argument values.
+.It Fl l Ar longitude , Fl U Ar UTC-offset
+Only one is needed:
+Perform lunar and solar calculations from this longitude or from
+this UTC offset.
+If neither is specified, the calculations will be based on the
+difference between UTC time and localtime.
 .It Fl W Ar num
 Print lines from today and the next
 .Ar num
@@ -103,12 +111,36 @@ Ignore weekends when calculating the num
 To handle calendars in your national code table you can specify
 .Dq LANG=
 in the calendar file as early as possible.
-To handle national Easter
-names in the calendars
-.Dq Easter=
-(for Catholic Easter) or
-.Dq Paskha=
-(for Orthodox Easter) can be used.
+.Pp
+To handle the local name of sequences, you can specify them as:
+.Dq SEQUENCE= 
+in the calendar file as early as possible.
+.Pp
+The names of the following special days are recognized:
+.Bl -tag -width 123456789012345 -compact
+.It Easter
+Catholic Easter.
+.It Paskha
+Orthodox Easter.
+.It NewMoon
+The lunar New Moon.
+.It FullMoon
+The lunar Full Moon.
+.It MarEquinox
+The solar equinox in March.
+.It JunSolstice
+The solar solstice in June.
+.It SepEquinox
+The solar equinox in March.
+.It DecSolstice
+The solar solstice in December.
+.It ChineseNewYear
+The first day of the Chinese year.
+.El
+These names may be reassigned to their local names via an assignment
+like
+.Dq Easter=Pasen
+in the calendar file.
 .Pp
 Other lines should begin with a month and day.
 They may be entered in almost any format, either numeric or as character
@@ -122,11 +154,11 @@ Two numbers default to the month followe
 Lines with leading tabs default to the last entered date, allowing
 multiple line specifications for a single date.
 .Pp
-``Easter'', is Easter for this year, and may be followed by a positive
-or negative integer.
-.Pp
-``Paskha'', is Orthodox Easter for this year, and may be followed by a
-positive or negative integer.
+The names of the recognized special days may be followed by a
+positive or negative integer, like:
+.Dq Easter+3
+or
+.Dq Pashka-4 .
 .Pp
 Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for
 last, first, second, third, fourth) for moving events like
@@ -191,7 +223,8 @@ calendar file to use if no calendar file
 do not send mail if this file exists.
 .El
 .Pp
-The following default calendar files are provided:
+The following default calendar files are provided in
+.Pa /usr/share/calendars:
 .Pp
 .Bl -tag -width calendar.southafrica -compact
 .It Pa calendar.all
@@ -208,6 +241,8 @@ so that roving holidays are se