svn commit: r200353 - head/sys/dev/ata

2009-12-10 Thread Alexander Motin
Author: mav
Date: Thu Dec 10 09:26:56 2009
New Revision: 200353
URL: http://svn.freebsd.org/changeset/base/200353

Log:
  Limit maximum I/O size, depending on command set supported by device.
  It is required to suppot non-LBA48 devices with MAXPHYS above 128K.
  Same is done in ada(4).

Modified:
  head/sys/dev/ata/ata-disk.c

Modified: head/sys/dev/ata/ata-disk.c
==
--- head/sys/dev/ata/ata-disk.c Thu Dec 10 07:48:47 2009(r200352)
+++ head/sys/dev/ata/ata-disk.c Thu Dec 10 09:26:56 2009(r200353)
@@ -126,6 +126,10 @@ ad_attach(device_t dev)
 adp->disk->d_name = "ad";
 adp->disk->d_drv1 = dev;
 adp->disk->d_maxsize = ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS;
+if (atadev->param.support.command2 & ATA_SUPPORT_ADDRESS48)
+   adp->disk->d_maxsize = min(adp->disk->d_maxsize, 65536 * DEV_BSIZE);
+else   /* 28bit ATA command limit */
+   adp->disk->d_maxsize = min(adp->disk->d_maxsize, 256 * DEV_BSIZE);
 adp->disk->d_sectorsize = DEV_BSIZE;
 adp->disk->d_mediasize = DEV_BSIZE * (off_t)adp->total_secs;
 adp->disk->d_fwsectors = adp->sectors;
___
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: r200354 - head/sys/net

2009-12-10 Thread Luigi Rizzo
Author: luigi
Date: Thu Dec 10 10:34:30 2009
New Revision: 200354
URL: http://svn.freebsd.org/changeset/base/200354

Log:
  No functional changes (who dares to touch this code!) but:
  
  - cast the result of LEN() to int as this is the main usage.
  - use LEN() in one place where it was forgotten.
  - Document the use of a static variable in rw mode.
  
  More small changes to follow.
  
  MFC after:7 days

Modified:
  head/sys/net/radix.c

Modified: head/sys/net/radix.c
==
--- head/sys/net/radix.cThu Dec 10 09:26:56 2009(r200353)
+++ head/sys/net/radix.cThu Dec 10 10:34:30 2009(r200354)
@@ -72,6 +72,8 @@ static struct radix_node_head *mask_rnhe
 /*
  * Work area -- the following point to 3 buffers of size max_keylen,
  * allocated in this order in a block of memory malloc'ed by rn_init.
+ * rn_zeros, rn_ones are set in rn_init and used in readonly afterwards.
+ * addmask_key is used in rn_addmask in rw mode and not thread-safe.
  */
 static char *rn_zeros, *rn_ones, *addmask_key;
 
@@ -135,8 +137,9 @@ static int  rn_satisfies_leaf(char *trial
  * To make the assumption more explicit, we use the LEN() macro to access
  * this field. It is safe to pass an expression with side effects
  * to LEN() as the argument is evaluated only once.
+ * We cast the result to int as this is the dominant usage.
  */
-#define LEN(x) (*(const u_char *)(x))
+#define LEN(x) ( (int) (*(const u_char *)(x)) )
 
 /*
  * XXX THIS NEEDS TO BE FIXED
@@ -197,7 +200,7 @@ rn_refines(m_arg, n_arg)
 {
register caddr_t m = m_arg, n = n_arg;
register caddr_t lim, lim2 = lim = n + LEN(n);
-   int longer = LEN(n++) - (int)LEN(m++);
+   int longer = LEN(n++) - LEN(m++);
int masks_are_equal = 1;
 
if (longer > 0)
@@ -250,10 +253,10 @@ rn_satisfies_leaf(trial, leaf, skip)
char *cplim;
int length = min(LEN(cp), LEN(cp2));
 
-   if (cp3 == 0)
+   if (cp3 == NULL)
cp3 = rn_ones;
else
-   length = min(length, *(u_char *)cp3);
+   length = min(length, LEN(cp3));
cplim = cp + length; cp3 += skip; cp2 += skip;
for (cp += skip; cp < cplim; cp++, cp2++, cp3++)
if ((*cp ^ *cp2) & *cp3)
@@ -424,7 +427,7 @@ rn_insert(v_arg, head, dupentry, nodes)
 {
caddr_t v = v_arg;
struct radix_node *top = head->rnh_treetop;
-   int head_off = top->rn_offset, vlen = (int)LEN(v);
+   int head_off = top->rn_offset, vlen = LEN(v);
register struct radix_node *t = rn_search(v_arg, top);
register caddr_t cp = v + head_off;
register int b;
___
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: r200355 - stable/8/contrib/bsnmp/snmp_mibII

2009-12-10 Thread Shteryana Shopova
Author: syrinx
Date: Thu Dec 10 11:52:16 2009
New Revision: 200355
URL: http://svn.freebsd.org/changeset/base/200355

Log:
  MFC r200063
  
  Fix a problem with high CPU consumption (up to 30%) by bsnmpd on a loaded 
system.
  Instead of constantly calling the mibII_idle function when the server is not 
busy
  call the function only once every 10 seconds to avoid bsnmpd constantly doing
  gettimeofday syscalls. Make the idle polling interval confugurable via
  begemotIfDataPoll.

Modified:
  stable/8/contrib/bsnmp/snmp_mibII/BEGEMOT-MIB2-MIB.txt
  stable/8/contrib/bsnmp/snmp_mibII/mibII.c
  stable/8/contrib/bsnmp/snmp_mibII/mibII.h
  stable/8/contrib/bsnmp/snmp_mibII/mibII_begemot.c
  stable/8/contrib/bsnmp/snmp_mibII/mibII_tree.def
Directory Properties:
  stable/8/contrib/bsnmp/   (props changed)

Modified: stable/8/contrib/bsnmp/snmp_mibII/BEGEMOT-MIB2-MIB.txt
==
--- stable/8/contrib/bsnmp/snmp_mibII/BEGEMOT-MIB2-MIB.txt  Thu Dec 10 
10:34:30 2009(r200354)
+++ stable/8/contrib/bsnmp/snmp_mibII/BEGEMOT-MIB2-MIB.txt  Thu Dec 10 
11:52:16 2009(r200355)
@@ -39,7 +39,7 @@ IMPORTS
FROM BEGEMOT-IP-MIB;
 
 begemotMib2 MODULE-IDENTITY
-LAST-UPDATED "20060213Z"
+LAST-UPDATED "20090803Z"
 ORGANIZATION "German Aerospace Center"
 CONTACT-INFO
"   Hartmut Brandt
@@ -54,6 +54,12 @@ begemotMib2 MODULE-IDENTITY
 E-mail:ha...@freebsd.org"
 DESCRIPTION
"The MIB for private mib2 stuff."
+REVISION   "20090803Z"
+DESCRIPTION
+   "Second edition adds begemotIfDataPoll object."
+REVISION   "20060213Z"
+DESCRIPTION
+   "Initial revision."
 ::= { begemotIp 1 }
 
 begemotIfMaxspeed OBJECT-TYPE
@@ -87,4 +93,14 @@ begemotIfForcePoll OBJECT-TYPE
 bit rate in its MIB."
 ::= { begemotMib2 3 }
 
+begemotIfDataPoll OBJECT-TYPE
+SYNTAX TimeTicks
+UNITS  "deciseconds"
+MAX-ACCESS read-write
+STATUS current
+DESCRIPTION
+   "The rate at which the mib2 module will poll interface data."
+DEFVAL { 100 }
+::= { begemotMib2 4 }
+
 END

Modified: stable/8/contrib/bsnmp/snmp_mibII/mibII.c
==
--- stable/8/contrib/bsnmp/snmp_mibII/mibII.c   Thu Dec 10 10:34:30 2009
(r200354)
+++ stable/8/contrib/bsnmp/snmp_mibII/mibII.c   Thu Dec 10 11:52:16 2009
(r200355)
@@ -117,6 +117,15 @@ u_int mibif_hc_update_interval;
 /* HC update timer handle */
 static void *hc_update_timer;
 
+/* Idle poll timer */
+static void *mibII_poll_timer;
+
+/* interfaces' data poll interval */
+u_int mibII_poll_ticks;
+
+/* Idle poll hook */
+static void mibII_idle(void *arg __unused);
+
 /*/
 
 static const struct asn_oid oid_ifMIB = OIDX_ifMIB;
@@ -410,6 +419,20 @@ mibif_reset_hc_timer(void)
mibif_hc_update_interval = ticks;
 }
 
+/**
+ * Restart the idle poll timer.
+ */
+void
+mibif_restart_mibII_poll_timer(void)
+{
+   if (mibII_poll_timer != NULL)
+   timer_stop(mibII_poll_timer);
+
+   if ((mibII_poll_timer = timer_start_repeat(mibII_poll_ticks * 10,
+   mibII_poll_ticks * 10, mibII_idle, NULL, module)) == NULL)
+   syslog(LOG_ERR, "timer_start(%u): %m", mibII_poll_ticks);
+}
+
 /*
  * Fetch new MIB data.
  */
@@ -1553,7 +1576,7 @@ get_cloners(void)
  * Idle function
  */
 static void
-mibII_idle(void)
+mibII_idle(void *arg __unused)
 {
struct mibifa *ifa;
 
@@ -1608,6 +1631,10 @@ mibII_start(void)
ipForward_reg = or_register(&oid_ipForward,
   "The MIB module for the display of CIDR multipath IP Routes.",
   module);
+
+   mibII_poll_timer = NULL;
+   mibII_poll_ticks = MIBII_POLL_TICKS;
+   mibif_restart_mibII_poll_timer();
 }
 
 /*
@@ -1651,6 +1678,11 @@ mibII_init(struct lmodule *mod, int argc
 static int
 mibII_fini(void)
 {
+   if (mibII_poll_timer != NULL ) {
+   timer_stop(mibII_poll_timer);
+   mibII_poll_timer = NULL;
+   }
+
if (route_fd != NULL)
fd_deselect(route_fd);
if (route != -1)
@@ -1690,7 +1722,7 @@ const struct snmp_module config = {
"This module implements the interface and ip groups.",
mibII_init,
mibII_fini,
-   mibII_idle, /* idle */
+   NULL,   /* idle */
NULL,   /* dump */
NULL,   /* config */
mibII_start,

Modified: stable/8/contrib/bsnmp/snmp_mibII/mibII.h
==
--- stable/8/contrib/bsnmp/snmp_mibII/mibII.h   Thu Dec 10 10:34:30 2009
(r200354)
+++ stable/8/contrib/bsnmp/snmp_mibII/mibII.h   Thu Dec 10 11:52:16 2009
(r200355)
@@ -211,6 +211,14 @@ extern u_int mibif_hc_update_interval;
 /* re-compute update i

Re: svn commit: r200274 - head/lib/libc/gen

2009-12-10 Thread John Baldwin
On Wednesday 09 December 2009 7:24:28 pm Robert Watson wrote:
> On Wed, 9 Dec 2009, Andrew Gallatin wrote:
> 
> > John Baldwin wrote:
> >
> >> The fact that we don't fail attempts to use pshared outright is probably 
> >> dubious.  They cannot possibly work as currently implemented aside from 
> >> fork() since the structure embeds a file descriptor and file descriptor 
> >> indices are a per-process namespace, not a global namespace.
> >
> > FWIW, this is what confused me.  It tends to be kind of a land-mine, since 
> > programs can be ported from Linux, and appear to work at first for casual 
> > use.  If we don't support pshared, we should return an error from 
> > sem_init() 
> > to make it obvious.
> >
> > Also, perhaps the sem_init() man page should mention sem_open(), since that 
> > seems to be the only way to really share a semaphore between processes on 
> > FreeBSD.
> 
> It's beginning to sound like our POSIX semaphores should be behaving more 
> like 
> umtx, which requires only a shared page, and less like file descriptors.  Of 
> course, that would make the global namespace more tricky...

I believe even that would be tricky since umtx uses the userland address of
the umtx as a cookie and that is not guaranteed safe aside from the fork(2)
case.  Oh, hmm, I'm wrong on that one.  You can make a PROCESS_SHARED umtx
and it uses the offset relative to the start of the containing vm_object for
it's hash key.  That's cute.  Note that you really only need for the pshared
variant.  The file descriptors do provide many of the desired semantics
(Solaris implements many of the POSIX IPC primitives by mmap()'ing files in
/tmp using the provided name for example).  One possibility is to make sem_t
use the kernel-backed fd-based semaphores for named semaphores and non-pshared
semaphores but to use umtx for pshared semaphores.  The threads library already
does a similar trick where it uses umtx for !pshared semaphores and the kernel
for everything else.

-- 
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"


svn commit: r200356 - head/share/misc

2009-12-10 Thread Konstantin Belousov
Author: kib
Date: Thu Dec 10 14:41:47 2009
New Revision: 200356
URL: http://svn.freebsd.org/changeset/base/200356

Log:
  Record part of history I participated in.
  
  No objections from:   ed, pho

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Thu Dec 10 11:52:16 2009
(r200355)
+++ head/share/misc/committers-src.dot  Thu Dec 10 14:41:47 2009
(r200356)
@@ -123,6 +123,7 @@ julian [label="Julian elischer\njul...@f
 kaiw [label="Kai wang\nk...@freebsd.org\n2007/09/26"]
 kensmith [label="Ken smith\nkensm...@freebsd.org\n2004/01/23"]
 kevlo [label="Kevin lo\nke...@freebsd.org\n2006/07/23"]
+kib [label="Konstantin belousov\n...@freebsd.org\n2006/06/03"]
 kmacy [label="Kip macy\nkm...@freebsd.org\n2005/06/01"]
 le [label="Lukas ertl\...@freebsd.org\n2004/02/02"]
 linimon [label="Mark linimon\nlini...@freebsd.org\n2006/09/30"]
@@ -257,6 +258,7 @@ dwmalone -> snb
 
 ed -> gavin
 ed -> jilles
+ed -> rdivacky
 
 eivind -> des
 eivind -> rwatson
@@ -347,7 +349,14 @@ julian -> archie
 julian -> adrian
 julian -> zec
 
+kan -> kib
+
+kib -> dchagin
 kib -> lulf
+kib -> pho
+kib -> rdivacky
+kib -> rmacklem
+kib -> stas
 
 kmacy -> lstewart
 
@@ -390,6 +399,7 @@ philip -> ed
 philip -> jls
 philip -> matteo
 
+pjd -> kib
 pjd -> lulf
 
 rgrimes -> markm
@@ -416,6 +426,7 @@ rwatson -> jh
 rwatson -> kensmith
 rwatson -> kmacy
 rwatson -> linimon
+rwatson -> rmacklem
 rwatson -> shafeeq
 rwatson -> tmm
 rwatson -> trasz
___
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: r200357 - head/sys/boot/i386/libi386

2009-12-10 Thread John Baldwin
Author: jhb
Date: Thu Dec 10 14:54:29 2009
New Revision: 200357
URL: http://svn.freebsd.org/changeset/base/200357

Log:
  Don't warn about an RSDP with a corrupt checksum.  The kernel does a better
  job about warning about these things later and this message can be
  confusing.
  
  Submitted by: infofarmer
  MFC after:1 week

Modified:
  head/sys/boot/i386/libi386/biosacpi.c

Modified: head/sys/boot/i386/libi386/biosacpi.c
==
--- head/sys/boot/i386/libi386/biosacpi.c   Thu Dec 10 14:41:47 2009
(r200356)
+++ head/sys/boot/i386/libi386/biosacpi.c   Thu Dec 10 14:54:29 2009
(r200357)
@@ -125,10 +125,8 @@ biosacpi_search_rsdp(char *base, int len
sum = 0;
for (idx = 0; idx < RSDP_CHECKSUM_LENGTH; idx++)
sum += *(cp + idx);
-   if (sum != 0) {
-   printf("acpi: bad RSDP checksum (%d)\n", sum);
+   if (sum != 0)
continue;
-   }
return(rsdp);
}
 }
___
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: r200358 - head/sys/netinet/ipfw

2009-12-10 Thread Luigi Rizzo
Author: luigi
Date: Thu Dec 10 15:17:34 2009
New Revision: 200358
URL: http://svn.freebsd.org/changeset/base/200358

Log:
  centralize the code to free a packet (or a chain) while in dummynet.
  Remove an old macro and its stale comment.

Modified:
  head/sys/netinet/ipfw/ip_dummynet.c

Modified: head/sys/netinet/ipfw/ip_dummynet.c
==
--- head/sys/netinet/ipfw/ip_dummynet.c Thu Dec 10 14:54:29 2009
(r200357)
+++ head/sys/netinet/ipfw/ip_dummynet.c Thu Dec 10 15:17:34 2009
(r200358)
@@ -461,6 +461,27 @@ heap_free(struct dn_heap *h)
  */
 
 /*
+ * Dispose a packet in dummynet. Use an inline functions so if we
+ * need to free extra state associated to a packet, this is a
+ * central point to do it.
+ */
+static __inline void *dn_free_pkt(struct mbuf *m)
+{
+   m_freem(m);
+   return NULL;
+}
+
+static __inline void dn_free_pkts(struct mbuf *mnext)
+{
+   struct mbuf *m;
+
+   while ((m = mnext) != NULL) {
+   mnext = m->m_nextpkt;
+   dn_free_pkt(m);
+   }
+}
+
+/*
  * Return the mbuf tag holding the dummynet state.  As an optimization
  * this is assumed to be the first tag on the list.  If this turns out
  * wrong we'll need to search the list.
@@ -1009,12 +1030,12 @@ dummynet_send(struct mbuf *m)
 
case DN_TO_DROP:
/* drop the packet after some time */
-   m_freem(m);
+   dn_free_pkt(m);
break;
 
default:
printf("dummynet: bad switch %d!\n", pkt->dn_dir);
-   m_freem(m);
+   dn_free_pkt(m);
break;
}
}
@@ -1553,20 +1574,11 @@ dropit:
if (q)
q->drops++;
DUMMYNET_UNLOCK();
-   m_freem(m);
-   *m0 = NULL;
+   *m0 = dn_free_pkt(m);
return ((fs && (fs->flags_fs & DN_NOERROR)) ? 0 : ENOBUFS);
 }
 
 /*
- * Below, the rt_unref is only needed when (pkt->dn_dir == DN_TO_IP_OUT)
- * Doing this would probably save us the initial bzero of dn_pkt
- */
-#defineDN_FREE_PKT(_m) do {\
-   m_freem(_m);\
-} while (0)
-
-/*
  * Dispose all packets and flow_queues on a flow_set.
  * If all=1, also remove red lookup table and other storage,
  * including the descriptor itself.
@@ -1582,13 +1594,7 @@ purge_flow_set(struct dn_flow_set *fs, i
 
for (i = 0; i <= fs->rq_size; i++) {
for (q = fs->rq[i]; q != NULL; q = qn) {
-   struct mbuf *m, *mnext;
-
-   mnext = q->head;
-   while ((m = mnext) != NULL) {
-   mnext = m->m_nextpkt;
-   DN_FREE_PKT(m);
-   }
+   dn_free_pkts(q->head);
qn = q->next;
free(q, M_DUMMYNET);
}
@@ -1616,15 +1622,10 @@ purge_flow_set(struct dn_flow_set *fs, i
 static void
 purge_pipe(struct dn_pipe *pipe)
 {
-struct mbuf *m, *mnext;
 
 purge_flow_set( &(pipe->fs), 1 );
 
-mnext = pipe->head;
-while ((m = mnext) != NULL) {
-   mnext = m->m_nextpkt;
-   DN_FREE_PKT(m);
-}
+dn_free_pkts(pipe->head);
 
 heap_free( &(pipe->scheduler_heap) );
 heap_free( &(pipe->not_eligible_heap) );
@@ -1974,7 +1975,6 @@ dummynet_drain(void)
 {
 struct dn_flow_set *fs;
 struct dn_pipe *pipe;
-struct mbuf *m, *mnext;
 int i;
 
 DUMMYNET_LOCK_ASSERT();
@@ -1990,12 +1990,7 @@ dummynet_drain(void)
 for (i = 0; i < HASHSIZE; i++) {
SLIST_FOREACH(pipe, &pipehash[i], next) {
purge_flow_set(&(pipe->fs), 0);
-
-   mnext = pipe->head;
-   while ((m = mnext) != NULL) {
-   mnext = m->m_nextpkt;
-   DN_FREE_PKT(m);
-   }
+   dn_free_pkt(pipe->head);
pipe->head = pipe->tail = NULL;
}
 }
___
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: r200068 - head/usr.bin

2009-12-10 Thread Stefan Farfeleder
On Thu, Dec 03, 2009 at 06:02:55PM +, Roman Divacky wrote:
> Author: rdivacky
> Date: Thu Dec  3 18:02:55 2009
> New Revision: 200068
> URL: http://svn.freebsd.org/changeset/base/200068
> 
> Log:
>   Connect unzip to the build.
>   
>   Approved by:ed (mentor)
>   Approved by:des (unzip author)
>   Tested by:  exp ports build (miwi)

For me this breaks the ooo-3 build with:

unzip: -n, -o and -u are contradictory

The failing command is 'unzip -quo jurt_src.zip'.
___
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: r200359 - head/sys/dev/ata

2009-12-10 Thread Takanori Watanabe
Author: takawata
Date: Thu Dec 10 16:55:16 2009
New Revision: 200359
URL: http://svn.freebsd.org/changeset/base/200359

Log:
  Add module dependency for cam if configured as ATA_CAM.

Modified:
  head/sys/dev/ata/ata-all.c

Modified: head/sys/dev/ata/ata-all.c
==
--- head/sys/dev/ata/ata-all.c  Thu Dec 10 15:17:34 2009(r200358)
+++ head/sys/dev/ata/ata-all.c  Thu Dec 10 16:55:16 2009(r200359)
@@ -1681,6 +1681,9 @@ ata_module_event_handler(module_t mod, i
 static moduledata_t ata_moduledata = { "ata", ata_module_event_handler, NULL };
 DECLARE_MODULE(ata, ata_moduledata, SI_SUB_CONFIGURE, SI_ORDER_SECOND);
 MODULE_VERSION(ata, 1);
+#ifdef ATA_CAM
+MODULE_DEPEND(ata, cam, 1, 1, 1);
+#endif
 
 static void
 ata_init(void)
___
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: r200068 - head/usr.bin

2009-12-10 Thread Roman Divacky
On Thu, Dec 10, 2009 at 05:31:19PM +0100, Stefan Farfeleder wrote:
> On Thu, Dec 03, 2009 at 06:02:55PM +, Roman Divacky wrote:
> > Author: rdivacky
> > Date: Thu Dec  3 18:02:55 2009
> > New Revision: 200068
> > URL: http://svn.freebsd.org/changeset/base/200068
> > 
> > Log:
> >   Connect unzip to the build.
> >   
> >   Approved by:  ed (mentor)
> >   Approved by:  des (unzip author)
> >   Tested by:exp ports build (miwi)
> 
> For me this breaks the ooo-3 build with:
> 
> unzip: -n, -o and -u are contradictory
> 
> The failing command is 'unzip -quo jurt_src.zip'.

I dont see a reason why this check is there:

if (n_opt + o_opt + u_opt > 1)
errorx("-n, -o and -u are contradictory");


dag, can you comment? /usr/local/bin/unzip seems to accept those
together happilly..

___
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: r200360 - head/sys/netinet/ipfw

2009-12-10 Thread Luigi Rizzo
Author: luigi
Date: Thu Dec 10 18:34:07 2009
New Revision: 200360
URL: http://svn.freebsd.org/changeset/base/200360

Log:
  when draining a flowset free the entire chain, not just one packet.

Modified:
  head/sys/netinet/ipfw/ip_dummynet.c

Modified: head/sys/netinet/ipfw/ip_dummynet.c
==
--- head/sys/netinet/ipfw/ip_dummynet.c Thu Dec 10 16:55:16 2009
(r200359)
+++ head/sys/netinet/ipfw/ip_dummynet.c Thu Dec 10 18:34:07 2009
(r200360)
@@ -1990,7 +1990,7 @@ dummynet_drain(void)
 for (i = 0; i < HASHSIZE; i++) {
SLIST_FOREACH(pipe, &pipehash[i], next) {
purge_flow_set(&(pipe->fs), 0);
-   dn_free_pkt(pipe->head);
+   dn_free_pkts(pipe->head);
pipe->head = pipe->tail = NULL;
}
 }
___
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: r200361 - head/sys/netinet/ipfw

2009-12-10 Thread Luigi Rizzo
Author: luigi
Date: Thu Dec 10 18:37:14 2009
New Revision: 200361
URL: http://svn.freebsd.org/changeset/base/200361

Log:
  use div64 when converting back the burst value for userland

Modified:
  head/sys/netinet/ipfw/ip_dummynet.c

Modified: head/sys/netinet/ipfw/ip_dummynet.c
==
--- head/sys/netinet/ipfw/ip_dummynet.c Thu Dec 10 18:34:07 2009
(r200360)
+++ head/sys/netinet/ipfw/ip_dummynet.c Thu Dec 10 18:37:14 2009
(r200361)
@@ -2165,7 +2165,7 @@ dummynet_get(struct sockopt *sopt)
 */
bcopy(pipe, bp, sizeof(*pipe));
pipe_bp->delay = (pipe_bp->delay * 1000) / hz;
-   pipe_bp->burst /= 8 * hz;
+   pipe_bp->burst = div64(pipe_bp->burst, 8 * hz);
/*
 * XXX the following is a hack based on ->next being the
 * first field in dn_pipe and dn_flow_set. The correct
___
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: r200362 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-12-10 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Dec 10 18:38:40 2009
New Revision: 200362
URL: http://svn.freebsd.org/changeset/base/200362

Log:
  MFC r200124,r200126,
  
  r200124:
  
  Avoid using additional variable for storing an error if we are not going
  to do anything with it.
  
  r200126:
  
  Fix deadlock when ZVOLs are present and we are replacing dead component or
  calling scrub when pool is in a degraded state. It will try to taste ZVOLs,
  which will lead to deadlock, as ZVOL will try to acquire the same locks as
  replace/scrub is holding already.
  
  We can't simply skip provider based on their GEOM class, because ZVOL can have
  providers build on top of it and we need to skip those as well.
  
  We do it by asking for ZFS::iszvol attribute. Any ZVOL-based provider will 
give
  us positive answer and we have to skip those providers.
  
  This way we remove possibility to create ZFS pools on top of ZVOLs, but it is
  not very useful anyway.
  
  I believe deadlock is still possible in some very complex situations like when
  we have MD provider on top of UFS file on top of ZVOL. When we try to replace
  dead component in the pool mentioned ZVOL is based on, there might be a
  deadlock when ZFS will try to taste MD provider. There is no easy way to 
detect
  that, but it isn't very common.
  
  r200125,r200158:
  
  Fix order of looking for providers.
  
  Before r200125 the order of looking for providers was wrong. It was:
  1. Find provider by name.
  2. Find provider by guid.
  3. Find provider by name and guid.
  
  Where it should have been:
  1. Find provider by name and guid.
  2. Find provider by guid.
  3. Find provider by name.

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Dec 
10 18:37:14 2009(r200361)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Dec 
10 18:38:40 2009(r200362)
@@ -293,11 +293,16 @@ vdev_geom_read_guid(struct g_consumer *c
uint64_t psize;
off_t offset, size;
uint64_t guid;
-   int error, l, len;
+   int error, l, len, iszvol;
 
g_topology_assert_not();
 
pp = cp->provider;
+   ZFS_LOG(1, "Reading guid from %s...", pp->name);
+   if (g_getattr("ZFS::iszvol", cp, &iszvol) == 0 && iszvol) {
+   ZFS_LOG(1, "Skipping ZVOL-based provider %s.", pp->name);
+   return (0);
+   }
 
psize = pp->mediasize;
psize = P2ALIGN(psize, (uint64_t)sizeof(vdev_label_t));
@@ -316,8 +321,7 @@ vdev_geom_read_guid(struct g_consumer *c
if ((offset % pp->sectorsize) != 0)
continue;
 
-   error = vdev_geom_io(cp, BIO_READ, label, offset, size);
-   if (error != 0)
+   if (vdev_geom_io(cp, BIO_READ, label, offset, size) != 0)
continue;
buf = label->vl_vdev_phys.vp_nvlist;
 
@@ -502,7 +506,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
 
if ((owned = mtx_owned(&Giant)))
mtx_unlock(&Giant);
-   cp = vdev_geom_open_by_path(vd, 0);
+   cp = vdev_geom_open_by_path(vd, 1);
if (cp == NULL) {
/*
 * The device at vd->vdev_path doesn't have the expected guid.
@@ -512,7 +516,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psi
cp = vdev_geom_open_by_guid(vd);
}
if (cp == NULL)
-   cp = vdev_geom_open_by_path(vd, 1);
+   cp = vdev_geom_open_by_path(vd, 0);
if (cp == NULL) {
ZFS_LOG(1, "Provider %s not found.", vd->vdev_path);
vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c  Thu Dec 
10 18:37:14 2009(r200361)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c  Thu Dec 
10 18:38:40 2009(r200362)
@@ -335,8 +335,11 @@ zvol_start(struct bio *bp)
wakeup_one(&zv->zv_queue);
mtx_unlock(&zv->zv_queue_mtx);
break;
-   case BIO_DELETE:
case BIO_GETATTR:
+   if (g_handleattr_int(bp, "ZFS::iszvol", 1))
+   break;
+   /* FALLTHROUGH */
+

svn commit: r200364 - svnadmin/conf

2009-12-10 Thread Xin LI
Author: delphij
Date: Thu Dec 10 21:15:08 2009
New Revision: 200364
URL: http://svn.freebsd.org/changeset/base/200364

Log:
  Allow commits to contrib/expat.

Modified:
  svnadmin/conf/paths

Modified: svnadmin/conf/paths
==
--- svnadmin/conf/paths Thu Dec 10 20:06:37 2009(r200363)
+++ svnadmin/conf/paths Thu Dec 10 21:15:08 2009(r200364)
@@ -60,6 +60,7 @@
 ^vendor/clang
 ^vendor/cpio
 ^vendor/ee
+^vendor/expat
 ^vendor/file
 ^vendor/gdb
 ^vendor/gdtoa
___
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: r200365 - in vendor/expat: 1.95.5 1.95.5/contrib 1.95.5/doc 1.95.5/examples 1.95.5/lib 1.95.5/tests 1.95.5/xmlwf 2.0.1 2.0.1/contrib 2.0.1/doc 2.0.1/examples 2.0.1/lib 2.0.1/tests 2.0.1...

2009-12-10 Thread Xin LI
Author: delphij
Date: Thu Dec 10 21:15:25 2009
New Revision: 200365
URL: http://svn.freebsd.org/changeset/base/200365

Log:
  Flattern all tags and dist tree for expat.

Added:
  vendor/expat/1.95.5/COPYING
 - copied unchanged from r200363, vendor/expat/1.95.5/contrib/expat/COPYING
  vendor/expat/1.95.5/Changes
 - copied unchanged from r200363, vendor/expat/1.95.5/contrib/expat/Changes
  vendor/expat/1.95.5/FREEBSD-upgrade
 - copied unchanged from r200363, 
vendor/expat/1.95.5/contrib/expat/FREEBSD-upgrade
  vendor/expat/1.95.5/MANIFEST
 - copied unchanged from r200363, vendor/expat/1.95.5/contrib/expat/MANIFEST
  vendor/expat/1.95.5/Makefile.in
 - copied unchanged from r200363, 
vendor/expat/1.95.5/contrib/expat/Makefile.in
  vendor/expat/1.95.5/README
 - copied unchanged from r200363, vendor/expat/1.95.5/contrib/expat/README
  vendor/expat/1.95.5/configure
 - copied unchanged from r200363, 
vendor/expat/1.95.5/contrib/expat/configure
  vendor/expat/1.95.5/configure.in
 - copied unchanged from r200363, 
vendor/expat/1.95.5/contrib/expat/configure.in
  vendor/expat/1.95.5/doc/
 - copied from r200363, vendor/expat/1.95.5/contrib/expat/doc/
  vendor/expat/1.95.5/examples/
 - copied from r200363, vendor/expat/1.95.5/contrib/expat/examples/
  vendor/expat/1.95.5/expat_config.h.in
 - copied unchanged from r200363, 
vendor/expat/1.95.5/contrib/expat/expat_config.h.in
  vendor/expat/1.95.5/lib/
 - copied from r200363, vendor/expat/1.95.5/contrib/expat/lib/
  vendor/expat/1.95.5/tests/
 - copied from r200363, vendor/expat/1.95.5/contrib/expat/tests/
  vendor/expat/1.95.5/xmlwf/
 - copied from r200363, vendor/expat/1.95.5/contrib/expat/xmlwf/
  vendor/expat/2.0.1/COPYING
 - copied unchanged from r200363, vendor/expat/2.0.1/contrib/expat/COPYING
  vendor/expat/2.0.1/Changes
 - copied unchanged from r200363, vendor/expat/2.0.1/contrib/expat/Changes
  vendor/expat/2.0.1/MANIFEST
 - copied unchanged from r200363, vendor/expat/2.0.1/contrib/expat/MANIFEST
  vendor/expat/2.0.1/Makefile.in
 - copied unchanged from r200363, 
vendor/expat/2.0.1/contrib/expat/Makefile.in
  vendor/expat/2.0.1/README
 - copied unchanged from r200363, vendor/expat/2.0.1/contrib/expat/README
  vendor/expat/2.0.1/configure
 - copied unchanged from r200363, vendor/expat/2.0.1/contrib/expat/configure
  vendor/expat/2.0.1/configure.in
 - copied unchanged from r200363, 
vendor/expat/2.0.1/contrib/expat/configure.in
  vendor/expat/2.0.1/doc/
 - copied from r200363, vendor/expat/2.0.1/contrib/expat/doc/
  vendor/expat/2.0.1/examples/
 - copied from r200363, vendor/expat/2.0.1/contrib/expat/examples/
  vendor/expat/2.0.1/expat_config.h.in
 - copied unchanged from r200363, 
vendor/expat/2.0.1/contrib/expat/expat_config.h.in
  vendor/expat/2.0.1/lib/
 - copied from r200363, vendor/expat/2.0.1/contrib/expat/lib/
  vendor/expat/2.0.1/tests/
 - copied from r200363, vendor/expat/2.0.1/contrib/expat/tests/
  vendor/expat/2.0.1/xmlwf/
 - copied from r200363, vendor/expat/2.0.1/contrib/expat/xmlwf/
  vendor/expat/dist/COPYING
 - copied unchanged from r200363, vendor/expat/dist/contrib/expat/COPYING
  vendor/expat/dist/Changes
 - copied unchanged from r200363, vendor/expat/dist/contrib/expat/Changes
  vendor/expat/dist/FREEBSD-upgrade
 - copied unchanged from r200363, 
vendor/expat/dist/contrib/expat/FREEBSD-upgrade
  vendor/expat/dist/MANIFEST
 - copied unchanged from r200363, vendor/expat/dist/contrib/expat/MANIFEST
  vendor/expat/dist/Makefile.in
 - copied unchanged from r200363, 
vendor/expat/dist/contrib/expat/Makefile.in
  vendor/expat/dist/README
 - copied unchanged from r200363, vendor/expat/dist/contrib/expat/README
  vendor/expat/dist/configure
 - copied unchanged from r200363, vendor/expat/dist/contrib/expat/configure
  vendor/expat/dist/configure.in
 - copied unchanged from r200363, 
vendor/expat/dist/contrib/expat/configure.in
  vendor/expat/dist/doc/
 - copied from r200363, vendor/expat/dist/contrib/expat/doc/
  vendor/expat/dist/examples/
 - copied from r200363, vendor/expat/dist/contrib/expat/examples/
  vendor/expat/dist/expat_config.h.in
 - copied unchanged from r200363, 
vendor/expat/dist/contrib/expat/expat_config.h.in
  vendor/expat/dist/lib/
 - copied from r200363, vendor/expat/dist/contrib/expat/lib/
  vendor/expat/dist/tests/
 - copied from r200363, vendor/expat/dist/contrib/expat/tests/
  vendor/expat/dist/xmlwf/
 - copied from r200363, vendor/expat/dist/contrib/expat/xmlwf/
Deleted:
  vendor/expat/1.95.5/contrib/
  vendor/expat/2.0.1/contrib/
  vendor/expat/dist/contrib/

Copied: vendor/expat/1.95.5/COPYING (from r200363, 
vendor/expat/1.95.5/contrib/expat/COPYING)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/expat/1.95.5/COPYING Thu Dec 10 21:15:25 2009(r2

svn commit: r200366 - head/lib/libkvm

2009-12-10 Thread Brooks Davis
Author: brooks
Date: Thu Dec 10 21:16:16 2009
New Revision: 200366
URL: http://svn.freebsd.org/changeset/base/200366

Log:
  Add a missing else that negated the truncation of ki_ngroups to
  NGROUPS.
  
  Submitted by: Dmitry Pryanishnikov 

Modified:
  head/lib/libkvm/kvm_proc.c

Modified: head/lib/libkvm/kvm_proc.c
==
--- head/lib/libkvm/kvm_proc.c  Thu Dec 10 21:15:25 2009(r200365)
+++ head/lib/libkvm/kvm_proc.c  Thu Dec 10 21:16:16 2009(r200366)
@@ -149,7 +149,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcn
if (ucred.cr_ngroups > KI_NGROUPS) {
kp->ki_ngroups = KI_NGROUPS;
kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
-   }
+   } else
kp->ki_ngroups = ucred.cr_ngroups;
kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups,
kp->ki_ngroups * sizeof(gid_t));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r200367 - head/contrib/expat

2009-12-10 Thread Xin LI
Author: delphij
Date: Thu Dec 10 21:18:53 2009
New Revision: 200367
URL: http://svn.freebsd.org/changeset/base/200367

Log:
  Bootstrap merge history.

Modified:
Directory Properties:
  head/contrib/expat/   (props changed)
___
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: r195843 - in head: lib/libkvm sys/kern sys/sys

2009-12-10 Thread Brooks Davis
On Tue, Dec 01, 2009 at 02:32:35AM +0200, Dmitry Pryanishnikov wrote:
> 
> Hello!
> 
>> Author: brooks
>> Date: Fri Jul 24 15:03:10 2009
>> New Revision: 195843
>> URL: http://svn.freebsd.org/changeset/base/195843
>> 
>> Log:
>>   Revert the changes to struct kinfo_proc in r194498.  Instead, fill
>>   in up to 16 (KI_NGROUPS) values and steal a bit from ki_cr_flags
>>   (all bits currently unused) to indicate overflow with the new flag
>>   KI_CRF_GRP_OVERFLOW.
>> This fixes procstat -s.
>> Approved by: re (kib)
>> 
>> Modified:
>>   head/lib/libkvm/kvm_proc.c
>>   head/sys/kern/kern_proc.c
>>   head/sys/sys/user.h
>> 
>> Modified: head/lib/libkvm/kvm_proc.c
>> ==
>> --- head/lib/libkvm/kvm_proc.c   Fri Jul 24 14:57:02 2009
>> (r195842)
>> +++ head/lib/libkvm/kvm_proc.c   Fri Jul 24 15:03:10 2009
>> (r195843)
>> @@ -145,8 +145,14 @@ kvm_proclist(kd, what, arg, p, bp, maxcn
>>  kp->ki_svuid = ucred.cr_svuid;
>>  kp->ki_rgid = ucred.cr_rgid;
>>  kp->ki_svgid = ucred.cr_svgid;
>> -kp->ki_ngroups = ucred.cr_ngroups;
>> -kp->ki_groups = ucred.cr_groups;
>> +kp->ki_cr_flags = ucred.cr_flags;
>> +if (ucred.cr_ngroups > KI_NGROUPS) {
>> +kp->ki_ngroups = KI_NGROUPS;
>> +kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
>> +}
>> +kp->ki_ngroups = ucred.cr_ngroups;
> 
>   It seems that 'else' is missing after closing brace of this 'if'? With the
> code as is, 'kp->ki_ngroups = KI_NGROUPS;' is effectively NO-OP...

Yikes, you're right.  Sorry I took so long to fix this.  I'll MFC in
about a week.

-- Brooks


pgpHZ68qRWhfs.pgp
Description: PGP signature


svn commit: r200368 - vendor/expat/dist/lib

2009-12-10 Thread Xin LI
Author: delphij
Date: Thu Dec 10 21:23:46 2009
New Revision: 200368
URL: http://svn.freebsd.org/changeset/base/200368

Log:
  Correct a DoS issue when processing XML document with malformed
  UTF-8 sequences.
  
  Obtained from:expat CVS (revisions 1.14 and 1.15)
  Security: CVE-2009-3560

Modified:
  vendor/expat/dist/lib/xmltok_impl.c

Modified: vendor/expat/dist/lib/xmltok_impl.c
==
--- vendor/expat/dist/lib/xmltok_impl.c Thu Dec 10 21:18:53 2009
(r200367)
+++ vendor/expat/dist/lib/xmltok_impl.c Thu Dec 10 21:23:46 2009
(r200368)
@@ -1744,7 +1744,7 @@ PREFIX(updatePosition)(const ENCODING *e
const char *end,
POSITION *pos)
 {
-  while (ptr != end) {
+  while (ptr < end) {
 switch (BYTE_TYPE(enc, ptr)) {
 #define LEAD_CASE(n) \
 case BT_LEAD ## 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: r200369 - in head: etc share/termcap

2009-12-10 Thread Ed Schouten
Author: ed
Date: Thu Dec 10 22:25:53 2009
New Revision: 200369
URL: http://svn.freebsd.org/changeset/base/200369

Log:
  Update termcap entries for xterm.
  
  It turns out these entries do make Terminal.app behave a little better.
  According to Thomas Dickey, Terminal.app should use TERM=nsterm anyway,
  but we don't support this yet. Already having an improved termcap entry
  helps, so I am going to MFC this change after all.
  
  Suggested by: Leonidas Tsampros 
  MFC after:1 month

Modified:
  head/etc/termcap.small
  head/share/termcap/termcap.src

Modified: head/etc/termcap.small
==
--- head/etc/termcap.small  Thu Dec 10 21:23:46 2009(r200368)
+++ head/etc/termcap.small  Thu Dec 10 22:25:53 2009(r200369)
@@ -291,32 +291,32 @@ pc3|ibmpc3|IBM PC 386BSD Console:\
:up=\E[A:\
:ut:
 
-# $XFree86: xc/programs/xterm/termcap,v 3.28 2001/01/17 23:46:39 dawes Exp $
+# $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $
 #
-xterm-xfree86|XFree86 xterm:\
-   :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
-   :k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:\
-   :k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
-   :@7=\EOF:@8=\EOM:kI=\E[2~:\
-   :kh=\EOH:kP=\E[5~:kN=\E[6~:\
-   :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:Km=\E[M:tc=xterm-basic:
+xterm-new|modern xterm:\
+   :*6=\EOF:@7=\EOF:F1=\E[23~:F2=\E[24~:K2=\EOE:Km=\E[M:\
+   :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
+   :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kH=\EOF:kI=\E[2~:\
+   :kN=\E[6~:kP=\E[5~:kd=\EOB:kh=\EOH:kl=\EOD:kr=\EOC:ku=\EOA:\
+   :tc=xterm-basic:
 #
 # This chunk is used for building the VT220/Sun/PC keyboard variants.
-xterm-basic|xterm common (XFree86):\
-   :li#24:co#80:am:kn#12:km:mi:ms:xn:AX:bl=^G:\
-   :is=\E[!p\E[?3;4l\E[4l\E>:rs=\E[!p\E[?3;4l\E[4l\E>:le=^H:\
-   :AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:al=\E[L:dc=\E[P:dl=\E[M:\
-   :UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:\
-   :ho=\E[H:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:\
-   :im=\E[4h:ei=\E[4l:ks=\E[?1h\E=:ke=\E[?1l\E>:kD=\E[3~:kb=^H:\
-   :sf=\n:sr=\EM:st=\EH:ct=\E[3g:sc=\E7:rc=\E8:\
-   :eA=\E(B\E)0:as=\E(0:ae=\E(B:ml=\El:mu=\Em:up=\E[A:nd=\E[C:\
-   :md=\E[1m:me=\E[m:mr=\E[7m:so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:\
-   :ti=\E[?1049h:te=\E[?1049l:vi=\E[?25l:ve=\E[?25h:\
-   :ut:Co#8:pa#64:op=\E[39;49m:AB=\E[4%dm:AF=\E[3%dm:\
+xterm-basic|modern xterm common:\
+   :am:bs:km:mi:ms:ut:xn:AX:\
+   :Co#8:co#80:kn#12:li#24:pa#64:\
+   :AB=\E[4%dm:AF=\E[3%dm:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:\
+   :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:ae=\E(B:al=\E[L:\
+   :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
+   :cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:\
+   :ei=\E[4l:ho=\E[H:im=\E[4h:is=\E[!p\E[?3;4l\E[4l\E>:\
+   :kD=\E[3~:kb=^H:ke=\E[?1l\E>:ks=\E[?1h\E=:le=^H:md=\E[1m:\
+   :me=\E[m:ml=\El:mr=\E[7m:mu=\Em:nd=\E[C:op=\E[39;49m:\
+   :rc=\E8:rs=\E[!p\E[?3;4l\E[4l\E>:sc=\E7:se=\E[27m:sf=^J:\
+   :so=\E[7m:sr=\EM:st=\EH:te=\E[?1049l:ti=\E[?1049h:\
+   :ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?12;25h:
 #
 # This is the only entry which you should have to customize, since "xterm"
 # is widely used for a variety of incompatible terminal emulations including
 # color_xterm and rxvt.
-xterm|xterm-color|X11 terminal emulator:\
-   :ti@:te@:tc=xterm-xfree86:
+xterm|X11 terminal emulator:\
+   :tc=xterm-new:

Modified: head/share/termcap/termcap.src
==
--- head/share/termcap/termcap.src  Thu Dec 10 21:23:46 2009
(r200368)
+++ head/share/termcap/termcap.src  Thu Dec 10 22:25:53 2009
(r200369)
@@ -2784,48 +2784,46 @@ SH|screen-s|VT 100/ANSI X3.64 virtual te
:ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:
 SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols:\
:co#132:tc=screen:
-# $Xorg: termcap,v 1.3 2000/08/17 19:55:10 cpqbld Exp $
+# $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $
 #
 # Note:
 #  termcap format is limited to 1023 characters.  This set of descriptions
 #  is a subset of the terminfo, since not all features can be fit into
 #  that limit.  The 'xterm' description supports color.  The monochrome
-#  'xtermm' drops color in favor of additional function keys.  If you need
-#  both, use terminfo.
+#  'xterm-mono' drops color in favor of additional function keys.  If you
+#  need both, use terminfo.
 #
 #  The 1023-character limit applies to each entry after resolving the
 #  "tc=" strings.  Some implementations may discount all or part of the
 #  formatting characters in the entry (i.e., the backslash newline tab
 #  colon).  GNU termcap does not have this limit.
 #
-#  I checked the limits using ncurses "captoinfo -CrTv", which print

svn commit: r200372 - stable/8/sbin/geom/class/mirror

2009-12-10 Thread Alexander Motin
Author: mav
Date: Thu Dec 10 23:46:37 2009
New Revision: 200372
URL: http://svn.freebsd.org/changeset/base/200372

Log:
  MFC r197044:
  Actually component with the greatest priority is used by the prefer balance
  algorithm.

Modified:
  stable/8/sbin/geom/class/mirror/gmirror.8
Directory Properties:
  stable/8/sbin/geom/   (props changed)

Modified: stable/8/sbin/geom/class/mirror/gmirror.8
==
--- stable/8/sbin/geom/class/mirror/gmirror.8   Thu Dec 10 23:28:54 2009
(r200371)
+++ stable/8/sbin/geom/class/mirror/gmirror.8   Thu Dec 10 23:46:37 2009
(r200372)
@@ -122,7 +122,7 @@ indicates an action to be performed:
 Create a mirror.
 The order of components is important, because a component's priority is based 
on its position
 (starting from 0 to 255).
-The component with the biggest priority (the lowest number) is used by the
+The component with the biggest priority is used by the
 .Cm prefer
 balance algorithm
 and is also used as a master component when resynchronization is needed,
___
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: r200373 - stable/8/sbin/geom/class/mirror

2009-12-10 Thread Alexander Motin
Author: mav
Date: Thu Dec 10 23:51:24 2009
New Revision: 200373
URL: http://svn.freebsd.org/changeset/base/200373

Log:
  MFC r200282, r200290:
  Change gmirror default balance algorithm from "split" to improved "load".
  "split" is very ineffective for devices with rotating media as HDDs.
  To be effective, it needs that transfer time reduction due to block
  splitting was bigger then access time increase due to non-sequential
  access. For modern HDDs I was able to reproduce it only with read sizes
  of 2MB and above, which is almost not applicable in real life.
  "load" algorithm same time is more universal and effective now.

Modified:
  stable/8/sbin/geom/class/mirror/geom_mirror.c
  stable/8/sbin/geom/class/mirror/gmirror.8
Directory Properties:
  stable/8/sbin/geom/   (props changed)

Modified: stable/8/sbin/geom/class/mirror/geom_mirror.c
==
--- stable/8/sbin/geom/class/mirror/geom_mirror.c   Thu Dec 10 23:46:37 
2009(r200372)
+++ stable/8/sbin/geom/class/mirror/geom_mirror.c   Thu Dec 10 23:51:24 
2009(r200373)
@@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
 uint32_t lib_version = G_LIB_VERSION;
 uint32_t version = G_MIRROR_VERSION;
 
-static char label_balance[] = "split", configure_balance[] = "none";
+static char label_balance[] = "load", configure_balance[] = "none";
 static intmax_t label_slice = 4096, configure_slice = -1;
 static intmax_t insert_priority = 0, configure_priority = -1;
 

Modified: stable/8/sbin/geom/class/mirror/gmirror.8
==
--- stable/8/sbin/geom/class/mirror/gmirror.8   Thu Dec 10 23:46:37 2009
(r200372)
+++ stable/8/sbin/geom/class/mirror/gmirror.8   Thu Dec 10 23:51:24 2009
(r200373)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 1, 2009
+.Dd December 8, 2009
 .Dt GMIRROR 8
 .Os
 .Sh NAME
@@ -135,6 +135,7 @@ Specifies balance algorithm to use, one 
 .Bl -tag -width ".Cm round-robin"
 .It Cm load
 Read from the component with the lowest load.
+This is the default balance algorithm.
 .It Cm prefer
 Read from the component with the biggest priority.
 .It Cm round-robin
@@ -142,7 +143,6 @@ Use round-robin algorithm when choosing 
 .It Cm split
 Split read requests, which are bigger than or equal to slice size on N pieces,
 where N is the number of active components.
-This is the default balance algorithm.
 .El
 .It Fl F
 Do not synchronize after a power failure or system crash.
___
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: r200374 - stable/7/sbin/geom/class/mirror

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 00:00:18 2009
New Revision: 200374
URL: http://svn.freebsd.org/changeset/base/200374

Log:
  MFC r200282, r200290:
  Change gmirror default balance algorithm from "split" to improved "load".
  "split" is very ineffective for devices with rotating media as HDDs.
  To be effective, it needs that transfer time reduction due to block
  splitting was bigger then access time increase due to non-sequential
  access. For modern HDDs I was able to reproduce it only with read sizes
  of 2MB and above, which is almost not applicable in real life.
  "load" algorithm same time is more universal and effective now.

Modified:
  stable/7/sbin/geom/class/mirror/geom_mirror.c
  stable/7/sbin/geom/class/mirror/gmirror.8
Directory Properties:
  stable/7/sbin/geom/   (props changed)
  stable/7/sbin/geom/class/label/   (props changed)
  stable/7/sbin/geom/class/part/   (props changed)
  stable/7/sbin/geom/misc/   (props changed)

Modified: stable/7/sbin/geom/class/mirror/geom_mirror.c
==
--- stable/7/sbin/geom/class/mirror/geom_mirror.c   Thu Dec 10 23:51:24 
2009(r200373)
+++ stable/7/sbin/geom/class/mirror/geom_mirror.c   Fri Dec 11 00:00:18 
2009(r200374)
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$");
 uint32_t lib_version = G_LIB_VERSION;
 uint32_t version = G_MIRROR_VERSION;
 
-static char label_balance[] = "split", configure_balance[] = "none";
+static char label_balance[] = "load", configure_balance[] = "none";
 static intmax_t label_slice = 4096, configure_slice = -1;
 static intmax_t insert_priority = 0;
 

Modified: stable/7/sbin/geom/class/mirror/gmirror.8
==
--- stable/7/sbin/geom/class/mirror/gmirror.8   Thu Dec 10 23:51:24 2009
(r200373)
+++ stable/7/sbin/geom/class/mirror/gmirror.8   Fri Dec 11 00:00:18 2009
(r200374)
@@ -129,6 +129,7 @@ Specifies balance algorithm to use, one 
 .Bl -tag -width ".Cm round-robin"
 .It Cm load
 Read from the component with the lowest load.
+This is the default balance algorithm.
 .It Cm prefer
 Read from the component with the biggest priority.
 .It Cm round-robin
@@ -136,7 +137,6 @@ Use round-robin algorithm when choosing 
 .It Cm split
 Split read requests, which are bigger than or equal to slice size on N pieces,
 where N is the number of active components.
-This is the default balance algorithm.
 .El
 .It Fl F
 Do not synchronize after a power failure or system crash.
___
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: r200375 - head/sys/dev/sound/pci/hda

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 00:38:13 2009
New Revision: 200375
URL: http://svn.freebsd.org/changeset/base/200375

Log:
  Add one more set of codec IDs.

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==
--- head/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 00:00:18 2009
(r200374)
+++ head/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 00:38:13 2009
(r200375)
@@ -610,6 +610,7 @@ static const struct {
 #define CIRRUSLOGIC_VENDORID   0x1013
 #define HDA_CODEC_CS4206   HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4206)
 #define HDA_CODEC_CS4207   HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4207)
+#define HDA_CODEC_CS   HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x)
 
 /* Realtek */
 #define REALTEK_VENDORID   0x10ec
@@ -683,7 +684,9 @@ static const struct {
 #define HDA_CODEC_IDT92HD700D  HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7639)
 #define HDA_CODEC_IDT92HD206X  HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7645)
 #define HDA_CODEC_IDT92HD206D  HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7646)
+#define HDA_CODEC_CXD9872RDK   HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7661)
 #define HDA_CODEC_STAC9872AK   HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7662)
+#define HDA_CODEC_CXD9872AKD   HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7664)
 #define HDA_CODEC_STAC9221 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7680)
 #define HDA_CODEC_STAC922XDHDA_CODEC_CONSTRUCT(SIGMATEL, 0x7681)
 #define HDA_CODEC_STAC9221_A2  HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7682)
@@ -731,6 +734,7 @@ static const struct {
 #define HDA_CODEC_CX20549  HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045)
 #define HDA_CODEC_CX20551  HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047)
 #define HDA_CODEC_CX20561  HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051)
+#define HDA_CODEC_CX20582  HDA_CODEC_CONSTRUCT(CONEXANT, 0x5066)
 #define HDA_CODEC_CX   HDA_CODEC_CONSTRUCT(CONEXANT, 0x)
 
 /* VIA */
@@ -846,6 +850,8 @@ static const struct {
{ HDA_CODEC_AD1988B,   "Analog Devices AD1988B" },
{ HDA_CODEC_AD1989B,   "Analog Devices AD1989B" },
{ HDA_CODEC_CMI9880,   "CMedia CMI9880" },
+   { HDA_CODEC_CXD9872RDK, "Sigmatel CXD9872RD/K" },
+   { HDA_CODEC_CXD9872AKD, "Sigmatel CXD9872AKD" },
{ HDA_CODEC_STAC9200D, "Sigmatel STAC9200D" },
{ HDA_CODEC_STAC9204X, "Sigmatel STAC9204X" },
{ HDA_CODEC_STAC9204D, "Sigmatel STAC9204D" },
@@ -900,6 +906,7 @@ static const struct {
{ HDA_CODEC_CX20549,   "Conexant CX20549 (Venice)" },
{ HDA_CODEC_CX20551,   "Conexant CX20551 (Waikiki)" },
{ HDA_CODEC_CX20561,   "Conexant CX20561 (Hermosa)" },
+   { HDA_CODEC_CX20582,   "Conexant CX20582 (Pebble)" },
{ HDA_CODEC_VT1708_8,  "VIA VT1708_8" },
{ HDA_CODEC_VT1708_9,  "VIA VT1708_9" },
{ HDA_CODEC_VT1708_A,  "VIA VT1708_A" },
@@ -965,6 +972,7 @@ static const struct {
/* Unknown codec */
{ HDA_CODEC_ALC,   "Realtek (Unknown)" },
{ HDA_CODEC_AD,"Analog Devices (Unknown)" },
+   { HDA_CODEC_CS,"Cirrus Logic (Unknown)" },
{ HDA_CODEC_CMI,   "CMedia (Unknown)" },
{ HDA_CODEC_STAC,  "Sigmatel (Unknown)" },
{ HDA_CODEC_SII,   "Silicon Image (Unknown)" },
___
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: r200376 - head/sys/dev/usb/serial

2009-12-10 Thread Andrew Thompson
Author: thompsa
Date: Fri Dec 11 00:57:30 2009
New Revision: 200376
URL: http://svn.freebsd.org/changeset/base/200376

Log:
  Revert r199331, the UM175 is in fact a cdc-acm device handled by umodem(4).

Modified:
  head/sys/dev/usb/serial/u3g.c

Modified: head/sys/dev/usb/serial/u3g.c
==
--- head/sys/dev/usb/serial/u3g.c   Fri Dec 11 00:38:13 2009
(r200375)
+++ head/sys/dev/usb/serial/u3g.c   Fri Dec 11 00:57:30 2009
(r200376)
@@ -173,7 +173,6 @@ MODULE_DEPEND(u3g, usb, 1, 1, 1);
 
 static const struct usb_device_id u3g_devs[] = {
 #defineU3G_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, 
i) }
-   U3G_DEV(CURITEL, UM175, 0),
/* OEM: Huawei */
U3G_DEV(HUAWEI, MOBILE, U3GFL_HUAWEI_INIT),
U3G_DEV(HUAWEI, E180V, U3GFL_HUAWEI_INIT),
___
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: r200377 - head/etc/namedb

2009-12-10 Thread Doug Barton
Author: dougb
Date: Fri Dec 11 01:06:04 2009
New Revision: 200377
URL: http://svn.freebsd.org/changeset/base/200377

Log:
  Update to the December 12, 2008 version of this file. The one
  substantive change is to add the IPv6 address of L. The other
  changes are all CAPS LOCK related.

Modified:
  head/etc/namedb/named.root

Modified: head/etc/namedb/named.root
==
--- head/etc/namedb/named.root  Fri Dec 11 00:57:30 2009(r200376)
+++ head/etc/namedb/named.root  Fri Dec 11 01:06:04 2009(r200377)
@@ -13,8 +13,8 @@
 ;   on server   FTP.INTERNIC.NET
 ;   -OR-RS.INTERNIC.NET
 ;
-;   last update:Feb 04, 2008
-;   related version of root zone:   2008020400
+;   last update:Dec 12, 2008
+;   related version of root zone:   2008121200
 ;
 ; formerly NS.INTERNIC.NET
 ;
@@ -22,68 +22,69 @@
 A.ROOT-SERVERS.NET.  360  A 198.41.0.4
 A.ROOT-SERVERS.NET.  360    2001:503:BA3E::2:30
 ;
-; formerly NS1.ISI.EDU
+; FORMERLY NS1.ISI.EDU
 ;
 .360  NSB.ROOT-SERVERS.NET.
 B.ROOT-SERVERS.NET.  360  A 192.228.79.201
 ;
-; formerly C.PSI.NET
+; FORMERLY C.PSI.NET
 ;
 .360  NSC.ROOT-SERVERS.NET.
 C.ROOT-SERVERS.NET.  360  A 192.33.4.12
 ;
-; formerly TERP.UMD.EDU
+; FORMERLY TERP.UMD.EDU
 ;
 .360  NSD.ROOT-SERVERS.NET.
 D.ROOT-SERVERS.NET.  360  A 128.8.10.90
 ;
-; formerly NS.NASA.GOV
+; FORMERLY NS.NASA.GOV
 ;
 .360  NSE.ROOT-SERVERS.NET.
 E.ROOT-SERVERS.NET.  360  A 192.203.230.10
 ;
-; formerly NS.ISC.ORG
+; FORMERLY NS.ISC.ORG
 ;
 .360  NSF.ROOT-SERVERS.NET.
 F.ROOT-SERVERS.NET.  360  A 192.5.5.241
-F.ROOT-SERVERS.NET.  360    2001:500:2f::f
+F.ROOT-SERVERS.NET.  360    2001:500:2F::F
 ;
-; formerly NS.NIC.DDN.MIL
+; FORMERLY NS.NIC.DDN.MIL
 ;
 .360  NSG.ROOT-SERVERS.NET.
 G.ROOT-SERVERS.NET.  360  A 192.112.36.4
 ;
-; formerly AOS.ARL.ARMY.MIL
+; FORMERLY AOS.ARL.ARMY.MIL
 ;
 .360  NSH.ROOT-SERVERS.NET.
 H.ROOT-SERVERS.NET.  360  A 128.63.2.53
-H.ROOT-SERVERS.NET.  360    2001:500:1::803f:235
+H.ROOT-SERVERS.NET.  360    2001:500:1::803F:235
 ;
-; formerly NIC.NORDU.NET
+; FORMERLY NIC.NORDU.NET
 ;
 .360  NSI.ROOT-SERVERS.NET.
 I.ROOT-SERVERS.NET.  360  A 192.36.148.17
 ;
-; operated by VeriSign, Inc.
+; OPERATED BY VERISIGN, INC.
 ;
 .360  NSJ.ROOT-SERVERS.NET.
 J.ROOT-SERVERS.NET.  360  A 192.58.128.30
 J.ROOT-SERVERS.NET.  360    2001:503:C27::2:30
 ;
-; operated by RIPE NCC
+; OPERATED BY RIPE NCC
 ;
 .360  NSK.ROOT-SERVERS.NET.
 K.ROOT-SERVERS.NET.  360  A 193.0.14.129
-K.ROOT-SERVERS.NET.  360    2001:7fd::1
+K.ROOT-SERVERS.NET.  360    2001:7FD::1
 ;
-; operated by ICANN
+; OPERATED BY ICANN
 ;
 .360  NSL.ROOT-SERVERS.NET.
 L.ROOT-SERVERS.NET.  360  A 199.7.83.42
+L.ROOT-SERVERS.NET.  360    2001:500:3::42
 ;
-; operated by WIDE
+; OPERATED BY WIDE
 ;
 .360  NSM.ROOT-SERVERS.NET.
 M.ROOT-SERVERS.NET.  360  A 202.12.27.33
-M.ROOT-SERVERS.NET.  360    2001:dc3::35
+M.ROOT-SERVERS.NET.  360    2001:DC3::35
 ; End of File
___
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: r200378 - stable/8/sys/dev/sound/pci/hda

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 01:06:30 2009
New Revision: 200378
URL: http://svn.freebsd.org/changeset/base/200378

Log:
  MFC r199846:
  Add two Cirrus Logic codec IDs.
  Add GPIO setting quirk for Apple MacBookPro5,5.
  
  Submitted by:   ed

Modified:
  stable/8/sys/dev/sound/pci/hda/hdac.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/sound/pci/hda/hdac.c
==
--- stable/8/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 01:06:04 2009
(r200377)
+++ stable/8/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 01:06:30 2009
(r200378)
@@ -315,6 +315,7 @@ SND_DECLARE_FILE("$FreeBSD$");
  * (see HDA_CODEC_STAC9221 below).
  */
 #define APPLE_INTEL_MAC0x76808384
+#define APPLE_MACBOOKPRO55 0xcb7910de
 
 /* LG Electronics */
 #define LG_VENDORID0x1854
@@ -605,6 +606,11 @@ static const struct {
 #define HDA_CODEC_CONSTRUCT(vendor, id) \
(((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0x))
 
+/* Cirrus Logic */
+#define CIRRUSLOGIC_VENDORID   0x1013
+#define HDA_CODEC_CS4206   HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4206)
+#define HDA_CODEC_CS4207   HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4207)
+
 /* Realtek */
 #define REALTEK_VENDORID   0x10ec
 #define HDA_CODEC_ALC260   HDA_CODEC_CONSTRUCT(REALTEK, 0x0260)
@@ -804,6 +810,8 @@ static const struct {
uint32_t id;
char *name;
 } hdac_codecs[] = {
+   { HDA_CODEC_CS4206,"Cirrus Logic CS4206" },
+   { HDA_CODEC_CS4207,"Cirrus Logic CS4207" },
{ HDA_CODEC_ALC260,"Realtek ALC260" },
{ HDA_CODEC_ALC262,"Realtek ALC262" },
{ HDA_CODEC_ALC267,"Realtek ALC267" },
@@ -4667,6 +4675,8 @@ static const struct {
HDA_QUIRK_GPIO0 | HDA_QUIRK_OVREF50, 0},
{ APPLE_INTEL_MAC, HDA_CODEC_STAC9221,
HDA_QUIRK_GPIO0 | HDA_QUIRK_GPIO1, 0 },
+   { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206,
+   HDA_QUIRK_GPIO1 | HDA_QUIRK_GPIO3, 0 },
{ DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X,
HDA_QUIRK_GPIO0, 0 },
{ DELL_V1400_SUBVENDOR, HDA_CODEC_STAC9228X,
___
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: r200379 - stable/7/sys/dev/sound/pci/hda

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 01:11:56 2009
New Revision: 200379
URL: http://svn.freebsd.org/changeset/base/200379

Log:
  MFC r196762:
  Improve HDA controller capabilities logging.

Modified:
  stable/7/sys/dev/sound/pci/hda/hdac.c
  stable/7/sys/dev/sound/pci/hda/hdac_private.h
  stable/7/sys/dev/sound/pci/hda/hdac_reg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/sound/pci/hda/hdac.c
==
--- stable/7/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 01:06:30 2009
(r200378)
+++ stable/7/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 01:11:56 2009
(r200379)
@@ -1516,7 +1516,7 @@ hdac_get_capabilities(struct hdac_softc 
sc->num_iss = HDAC_GCAP_ISS(gcap);
sc->num_oss = HDAC_GCAP_OSS(gcap);
sc->num_bss = HDAC_GCAP_BSS(gcap);
-
+   sc->num_sdo = HDAC_GCAP_NSDO(gcap);
sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK);
 
corbsize = HDAC_READ_1(&sc->mem, HDAC_CORBSIZE);
@@ -1551,11 +1551,12 @@ hdac_get_capabilities(struct hdac_softc 
return (ENXIO);
}
 
-   HDA_BOOTHVERBOSE(
-   device_printf(sc->dev, "CORB size: %d\n", sc->corb_size);
-   device_printf(sc->dev, "RIRB size: %d\n", sc->rirb_size);
-   device_printf(sc->dev, "  Streams: ISS=%d OSS=%d BSS=%d\n",
-   sc->num_iss, sc->num_oss, sc->num_bss);
+   HDA_BOOTVERBOSE(
+   device_printf(sc->dev, "Caps: OSS %d, ISS %d, BSS %d, "
+   "NSDO %d%s, CORB %d, RIRB %d\n",
+   sc->num_oss, sc->num_iss, sc->num_bss, 1 << sc->num_sdo,
+   sc->support_64bit ? ", 64bit" : "",
+   sc->corb_size, sc->rirb_size);
);
 
return (0);

Modified: stable/7/sys/dev/sound/pci/hda/hdac_private.h
==
--- stable/7/sys/dev/sound/pci/hda/hdac_private.h   Fri Dec 11 01:06:30 
2009(r200378)
+++ stable/7/sys/dev/sound/pci/hda/hdac_private.h   Fri Dec 11 01:11:56 
2009(r200379)
@@ -339,6 +339,7 @@ struct hdac_softc {
int num_iss;
int num_oss;
int num_bss;
+   int num_sdo;
int support_64bit;
int streamcnt;
 

Modified: stable/7/sys/dev/sound/pci/hda/hdac_reg.h
==
--- stable/7/sys/dev/sound/pci/hda/hdac_reg.h   Fri Dec 11 01:06:30 2009
(r200378)
+++ stable/7/sys/dev/sound/pci/hda/hdac_reg.h   Fri Dec 11 01:11:56 2009
(r200379)
@@ -136,6 +136,8 @@
(((gcap) & HDAC_GCAP_ISS_MASK) >> HDAC_GCAP_ISS_SHIFT)
 #define HDAC_GCAP_OSS(gcap)\
(((gcap) & HDAC_GCAP_OSS_MASK) >> HDAC_GCAP_OSS_SHIFT)
+#define HDAC_GCAP_NSDO(gcap)   \
+   (((gcap) & HDAC_GCAP_NSDO_MASK) >> HDAC_GCAP_NSDO_SHIFT)
 
 /* GCTL - Global Control */
 #define HDAC_GCTL_CRST 0x0001
___
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: r200380 - stable/7/sys/dev/sound/pci/hda

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 01:13:48 2009
New Revision: 200380
URL: http://svn.freebsd.org/changeset/base/200380

Log:
  MFC r197017, r197018
  Add Intel 82801JD (one more ICH10) HDA controller ID.
  Add NVidia MCP89 HDA controller IDs.

Modified:
  stable/7/sys/dev/sound/pci/hda/hdac.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/sound/pci/hda/hdac.c
==
--- stable/7/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 01:11:56 2009
(r200379)
+++ stable/7/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 01:13:48 2009
(r200380)
@@ -142,7 +142,8 @@ SND_DECLARE_FILE("$FreeBSD$");
 #define HDA_INTEL_82801G   HDA_MODEL_CONSTRUCT(INTEL, 0x27d8)
 #define HDA_INTEL_82801H   HDA_MODEL_CONSTRUCT(INTEL, 0x284b)
 #define HDA_INTEL_82801I   HDA_MODEL_CONSTRUCT(INTEL, 0x293e)
-#define HDA_INTEL_82801J   HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e)
+#define HDA_INTEL_82801JI  HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e)
+#define HDA_INTEL_82801JD  HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e)
 #define HDA_INTEL_PCH  HDA_MODEL_CONSTRUCT(INTEL, 0x3b56)
 #define HDA_INTEL_SCH  HDA_MODEL_CONSTRUCT(INTEL, 0x811b)
 #define HDA_INTEL_ALL  HDA_MODEL_CONSTRUCT(INTEL, 0x)
@@ -167,6 +168,10 @@ SND_DECLARE_FILE("$FreeBSD$");
 #define HDA_NVIDIA_MCP79_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1)
 #define HDA_NVIDIA_MCP79_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2)
 #define HDA_NVIDIA_MCP79_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3)
+#define HDA_NVIDIA_MCP89_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d94)
+#define HDA_NVIDIA_MCP89_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d95)
+#define HDA_NVIDIA_MCP89_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d96)
+#define HDA_NVIDIA_MCP89_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0d97)
 #define HDA_NVIDIA_ALL HDA_MODEL_CONSTRUCT(NVIDIA, 0x)
 
 /* ATI */
@@ -482,7 +487,8 @@ static const struct {
{ HDA_INTEL_82801G,  "Intel 82801G",0 },
{ HDA_INTEL_82801H,  "Intel 82801H",0 },
{ HDA_INTEL_82801I,  "Intel 82801I",0 },
-   { HDA_INTEL_82801J,  "Intel 82801J",0 },
+   { HDA_INTEL_82801JI, "Intel 82801JI",   0 },
+   { HDA_INTEL_82801JD, "Intel 82801JD",   0 },
{ HDA_INTEL_PCH, "Intel PCH",   0 },
{ HDA_INTEL_SCH, "Intel SCH",   0 },
{ HDA_NVIDIA_MCP51,  "NVidia MCP51",HDAC_NO_MSI },
@@ -503,6 +509,10 @@ static const struct {
{ HDA_NVIDIA_MCP79_2, "NVidia MCP79",   0 },
{ HDA_NVIDIA_MCP79_3, "NVidia MCP79",   0 },
{ HDA_NVIDIA_MCP79_4, "NVidia MCP79",   0 },
+   { HDA_NVIDIA_MCP89_1, "NVidia MCP89",   0 },
+   { HDA_NVIDIA_MCP89_2, "NVidia MCP89",   0 },
+   { HDA_NVIDIA_MCP89_3, "NVidia MCP89",   0 },
+   { HDA_NVIDIA_MCP89_4, "NVidia MCP89",   0 },
{ HDA_ATI_SB450, "ATI SB450",   0 },
{ HDA_ATI_SB600, "ATI SB600",   0 },
{ HDA_ATI_RS600, "ATI RS600",   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: r200381 - stable/7/sys/dev/sound/pci/hda

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 01:15:53 2009
New Revision: 200381
URL: http://svn.freebsd.org/changeset/base/200381

Log:
  MFC r197611, r197640:
  Add some bits of HDMI/DisplayPort support from later specification updates.
  It may be not enough to make them work, but at least should give some
  information about these beasts.
  Add Realtek ALC887 codec ID.

Modified:
  stable/7/sys/dev/sound/pci/hda/hda_reg.h
  stable/7/sys/dev/sound/pci/hda/hdac.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/sound/pci/hda/hda_reg.h
==
--- stable/7/sys/dev/sound/pci/hda/hda_reg.hFri Dec 11 01:13:48 2009
(r200380)
+++ stable/7/sys/dev/sound/pci/hda/hda_reg.hFri Dec 11 01:15:53 2009
(r200381)
@@ -660,13 +660,49 @@
 #define HDA_CMD_VERB_GET_STRIPE_CONTROL0xf24
 #define HDA_CMD_VERB_SET_STRIPE_CONTROL0x724
 
-#define HDA_CMD_SET_STRIPE_CONTROL(cad, nid)   \
+#define HDA_CMD_GET_STRIPE_CONTROL(cad, nid)   \
 (HDA_CMD_12BIT((cad), (nid),   \
 HDA_CMD_VERB_GET_STRIPE_CONTROL, 0x0))
-#define HDA_CMD_GET_STRIPE_CONTROL(cad, nid, payload)  \
+#define HDA_CMD_SET_STRIPE_CONTROL(cad, nid, payload)  \
 (HDA_CMD_12BIT((cad), (nid),   \
 HDA_CMD_VERB_SET_STRIPE_CONTROL, (payload)))
 
+/* Channel Count Control */
+#define HDA_CMD_VERB_GET_CONV_CHAN_COUNT   0xf2d
+#define HDA_CMD_VERB_SET_CONV_CHAN_COUNT   0x72d 
+
+#define HDA_CMD_GET_CONV_CHAN_COUNT(cad, nid)  \
+(HDA_CMD_12BIT((cad), (nid),   \
+HDA_CMD_VERB_GET_CONV_CHAN_COUNT, 0x0))
+#define HDA_CMD_SET_CONV_CHAN_COUNT(cad, nid, payload) \
+(HDA_CMD_12BIT((cad), (nid),   \
+HDA_CMD_VERB_SET_CONV_CHAN_COUNT, (payload)))
+
+#define HDA_CMD_VERB_GET_HDMI_DIP_SIZE 0xf2e 
+#define HDA_CMD_VERB_GET_HDMI_ELDD 0xf2f 
+
+#define HDA_CMD_VERB_GET_HDMI_DIP_INDEX0xf30 
+#define HDA_CMD_VERB_SET_HDMI_DIP_INDEX0x730 
+
+#define HDA_CMD_VERB_GET_HDMI_DIP_DATA 0xf31 
+#define HDA_CMD_VERB_SET_HDMI_DIP_DATA 0x731 
+
+#define HDA_CMD_VERB_GET_HDMI_DIP_XMIT 0xf32 
+#define HDA_CMD_VERB_SET_HDMI_DIP_XMIT 0x732 
+
+#define HDA_CMD_VERB_GET_HDMI_CP_CTRL  0xf33 
+#define HDA_CMD_VERB_SET_HDMI_CP_CTRL  0x733 
+
+#define HDA_CMD_VERB_GET_HDMI_CHAN_SLOT0xf34 
+#define HDA_CMD_VERB_SET_HDMI_CHAN_SLOT0x734 
+
+#define HDA_CMD_GET_HDMI_CHAN_SLOT(cad, nid)   \
+(HDA_CMD_12BIT((cad), (nid),   \
+HDA_CMD_VERB_GET_HDMI_CHAN_SLOT, 0x0))
+#define HDA_CMD_SET_HDMI_CHAN_SLOT(cad, nid, payload)  \
+(HDA_CMD_12BIT((cad), (nid),   \
+HDA_CMD_VERB_SET_HDMI_CHAN_SLOT, (payload)))
+
 /* Function Reset */
 #define HDA_CMD_VERB_FUNCTION_RESET0x7ff
 
@@ -779,6 +815,10 @@
 #define HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_SHIFT  20
 #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_MASK  0x000f
 #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_SHIFT 16
+#define HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_MASK 0xe000
+#define HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_SHIFT13
+#define HDA_PARAM_AUDIO_WIDGET_CAP_CP_MASK 0x1000
+#define HDA_PARAM_AUDIO_WIDGET_CAP_CP_SHIFT12
 #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_MASK0x0800
 #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP_SHIFT   11
 #define HDA_PARAM_AUDIO_WIDGET_CAP_POWER_CTRL_MASK 0x0400
@@ -810,6 +850,14 @@
 #define HDA_PARAM_AUDIO_WIDGET_CAP_DELAY(param)
\
 (((param) & HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_MASK) >>  \
 HDA_PARAM_AUDIO_WIDGET_CAP_DELAY_SHIFT)
+#define HDA_PARAM_AUDIO_WIDGET_CAP_CC(param)   \
+param) & HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_MASK) >>\
+(HDA_PARAM_AUDIO_WIDGET_CAP_CC_EXT_SHIFT - 1)) |   \
+(((param) & HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_MASK) >> \
+HDA_PARAM_AUDIO_WIDGET_CAP_STEREO_SHIFT))
+#define HDA_PARAM_AUDIO_WIDGET_CAP_CP(param)   \
+(((param) & HDA_PARAM_AUDIO_WIDGET_CAP_CP_MASK) >> \
+HDA_PARAM_AUDIO_WIDGET_CAP_CP_SHIFT)
 #define HDA_PARAM_AUDIO_WIDGET_CAP_LR_SWAP(param

svn commit: r200382 - stable/7/sys/dev/sound/pci/hda

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 01:17:49 2009
New Revision: 200382
URL: http://svn.freebsd.org/changeset/base/200382

Log:
  MFC r199258, r199846:
  Add more codec IDs.
  Add two Cirrus Logic codec IDs.
  Add GPIO setting quirk for Apple MacBookPro5,5.

Modified:
  stable/7/sys/dev/sound/pci/hda/hdac.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/sound/pci/hda/hdac.c
==
--- stable/7/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 01:15:53 2009
(r200381)
+++ stable/7/sys/dev/sound/pci/hda/hdac.c   Fri Dec 11 01:17:49 2009
(r200382)
@@ -82,7 +82,7 @@
 
 #include "mixer_if.h"
 
-#define HDA_DRV_TEST_REV   "20090929_0137"
+#define HDA_DRV_TEST_REV   "20091113_0138"
 
 SND_DECLARE_FILE("$FreeBSD$");
 
@@ -311,6 +311,7 @@ SND_DECLARE_FILE("$FreeBSD$");
  * (see HDA_CODEC_STAC9221 below).
  */
 #define APPLE_INTEL_MAC0x76808384
+#define APPLE_MACBOOKPRO55 0xcb7910de
 
 /* LG Electronics */
 #define LG_VENDORID0x1854
@@ -601,6 +602,11 @@ static const struct {
 #define HDA_CODEC_CONSTRUCT(vendor, id) \
(((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0x))
 
+/* Cirrus Logic */
+#define CIRRUSLOGIC_VENDORID   0x1013
+#define HDA_CODEC_CS4206   HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4206)
+#define HDA_CODEC_CS4207   HDA_CODEC_CONSTRUCT(CIRRUSLOGIC, 0x4207)
+
 /* Realtek */
 #define REALTEK_VENDORID   0x10ec
 #define HDA_CODEC_ALC260   HDA_CODEC_CONSTRUCT(REALTEK, 0x0260)
@@ -760,6 +766,16 @@ static const struct {
 #define HDA_CODEC_VT1702_5 HDA_CODEC_CONSTRUCT(VIA, 0x5398)
 #define HDA_CODEC_VT1702_6 HDA_CODEC_CONSTRUCT(VIA, 0x6398)
 #define HDA_CODEC_VT1702_7 HDA_CODEC_CONSTRUCT(VIA, 0x7398)
+#define HDA_CODEC_VT1716S_0HDA_CODEC_CONSTRUCT(VIA, 0x0433)
+#define HDA_CODEC_VT1716S_1HDA_CODEC_CONSTRUCT(VIA, 0xa721)
+#define HDA_CODEC_VT1718S_0HDA_CODEC_CONSTRUCT(VIA, 0x0428)
+#define HDA_CODEC_VT1718S_1HDA_CODEC_CONSTRUCT(VIA, 0x4428)
+#define HDA_CODEC_VT1812   HDA_CODEC_CONSTRUCT(VIA, 0x0448)
+#define HDA_CODEC_VT1818S  HDA_CODEC_CONSTRUCT(VIA, 0x0440)
+#define HDA_CODEC_VT1828S  HDA_CODEC_CONSTRUCT(VIA, 0x4441)
+#define HDA_CODEC_VT2002P_0HDA_CODEC_CONSTRUCT(VIA, 0x0438)
+#define HDA_CODEC_VT2002P_1HDA_CODEC_CONSTRUCT(VIA, 0x4438)
+#define HDA_CODEC_VT2020   HDA_CODEC_CONSTRUCT(VIA, 0x0441)
 #define HDA_CODEC_VT   HDA_CODEC_CONSTRUCT(VIA, 0x)
 
 /* ATI */
@@ -782,6 +798,7 @@ static const struct {
 #define HDA_CODEC_INTELG45_2   HDA_CODEC_CONSTRUCT(INTEL, 0x2802)
 #define HDA_CODEC_INTELG45_3   HDA_CODEC_CONSTRUCT(INTEL, 0x2803)
 #define HDA_CODEC_INTELG45_4   HDA_CODEC_CONSTRUCT(INTEL, 0x29fb)
+#define HDA_CODEC_INTELQ57 HDA_CODEC_CONSTRUCT(INTEL, 0x0054)
 #define HDA_CODEC_INTELHDA_CODEC_CONSTRUCT(INTEL, 0x)
 
 /* Codecs */
@@ -789,6 +806,8 @@ static const struct {
uint32_t id;
char *name;
 } hdac_codecs[] = {
+   { HDA_CODEC_CS4206,"Cirrus Logic CS4206" },
+   { HDA_CODEC_CS4207,"Cirrus Logic CS4207" },
{ HDA_CODEC_ALC260,"Realtek ALC260" },
{ HDA_CODEC_ALC262,"Realtek ALC262" },
{ HDA_CODEC_ALC267,"Realtek ALC267" },
@@ -913,6 +932,16 @@ static const struct {
{ HDA_CODEC_VT1702_5, "VIA VT1702_5" },
{ HDA_CODEC_VT1702_6, "VIA VT1702_6" },
{ HDA_CODEC_VT1702_7, "VIA VT1702_7" },
+   { HDA_CODEC_VT1716S_0, "VIA VT1716S_0" },
+   { HDA_CODEC_VT1716S_1, "VIA VT1716S_1" },
+   { HDA_CODEC_VT1718S_0, "VIA VT1718S_0" },
+   { HDA_CODEC_VT1718S_1, "VIA VT1718S_1" },
+   { HDA_CODEC_VT1812, "VIA VT1812" },
+   { HDA_CODEC_VT1818S, "VIA VT1818S" },
+   { HDA_CODEC_VT1828S, "VIA VT1828S" },
+   { HDA_CODEC_VT2002P_0, "VIA VT2002P_0" },
+   { HDA_CODEC_VT2002P_1, "VIA VT2002P_1" },
+   { HDA_CODEC_VT2020, "VIA VT2020" },
{ HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" },
{ HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" },
{ HDA_CODEC_ATIRS690,  "ATI RS690/780 HDMI" },
@@ -926,6 +955,7 @@ static const struct {
{ HDA_CODEC_INTELG45_2, "Intel G45 HDMI" },
{ HDA_CODEC_INTELG45_3, "Intel G45 HDMI" },
{ HDA_CODEC_INTELG45_4, "Intel G45 HDMI" },
+   { HDA_CODEC_INTELQ57, "Intel Q57 HDMI" },
{ HDA_CODEC_SII1390,   "Silicon Image SiI1390 HDMI" },
{ HDA_CODEC_SII1392,   "Silicon Image SiI1392 HDMI" },
/* Unknown codec */
@@ -4644,6 +4674,8 @@ static const struct {
HDA_QUIRK_GPIO0 | HDA_QUIRK_OVREF50, 0},
{ APPLE_INTEL_MAC, HDA_CODEC_STAC9221,
HDA_QUIRK_GPIO0 | HDA_QUIRK_GPIO1, 0 },
+   { APPLE_MACBOOKPRO55, HDA_CODEC_CS4206,
+   HDA_QUIRK_GPIO1 | HDA_QUIRK_GPIO3, 0 },
   

svn commit: r200383 - in stable/8: contrib/bind9 contrib/bind9/bin/named contrib/bind9/lib/dns contrib/bind9/lib/dns/include/dns lib/bind

2009-12-10 Thread Doug Barton
Author: dougb
Date: Fri Dec 11 01:23:58 2009
New Revision: 200383
URL: http://svn.freebsd.org/changeset/base/200383

Log:
  MFC r199958:
  
  Update to BIND 9.6.1-P2. The vulnerability this is designed to fix is
  related to DNSSEC validation on a resolving name server that allows
  access to untrusted users. If your system does not fall into all 3 of
  these categories you do not need to update immediately.

Modified:
  stable/8/contrib/bind9/CHANGES
  stable/8/contrib/bind9/bin/named/query.c
  stable/8/contrib/bind9/lib/dns/api
  stable/8/contrib/bind9/lib/dns/include/dns/types.h
  stable/8/contrib/bind9/lib/dns/masterdump.c
  stable/8/contrib/bind9/lib/dns/rbtdb.c
  stable/8/contrib/bind9/lib/dns/resolver.c
  stable/8/contrib/bind9/lib/dns/validator.c
  stable/8/contrib/bind9/version
  stable/8/lib/bind/config.h
Directory Properties:
  stable/8/contrib/bind9/   (props changed)
  stable/8/lib/bind/   (props changed)

Modified: stable/8/contrib/bind9/CHANGES
==
--- stable/8/contrib/bind9/CHANGES  Fri Dec 11 01:17:49 2009
(r200382)
+++ stable/8/contrib/bind9/CHANGES  Fri Dec 11 01:23:58 2009
(r200383)
@@ -1,3 +1,9 @@
+   --- 9.6.1-P2 released ---
+
+2772.  [security]  When validating, track whether pending data was from
+   the additional section or not and only return it if
+   validates as secure. [RT #20438]
+
--- 9.6.1-P1 released ---
 
 2640.  [security]  A specially crafted update packet will cause named

Modified: stable/8/contrib/bind9/bin/named/query.c
==
--- stable/8/contrib/bind9/bin/named/query.cFri Dec 11 01:17:49 2009
(r200382)
+++ stable/8/contrib/bind9/bin/named/query.cFri Dec 11 01:23:58 2009
(r200383)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.313.20.7 2009/03/13 01:38:51 marka Exp $ */
+/* $Id: query.c,v 1.313.20.7.12.1 2009/11/18 23:58:04 marka Exp $ */
 
 /*! \file */
 
@@ -116,6 +116,8 @@
 #define DNS_GETDB_NOLOG 0x02U
 #define DNS_GETDB_PARTIAL 0x04U
 
+#define PENDINGOK(x)   (((x) & DNS_DBFIND_PENDINGOK) != 0)
+
 typedef struct client_additionalctx {
ns_client_t *client;
dns_rdataset_t *rdataset;
@@ -1761,8 +1763,8 @@ query_addadditional2(void *arg, dns_name
 */
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
-   (rdataset->trust == dns_trust_pending ||
-rdataset->trust == dns_trust_glue) &&
+   (DNS_TRUST_PENDING(rdataset->trust) ||
+DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@@ -1801,8 +1803,8 @@ query_addadditional2(void *arg, dns_name
 */
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
-   (rdataset->trust == dns_trust_pending ||
-rdataset->trust == dns_trust_glue) &&
+   (DNS_TRUST_PENDING(rdataset->trust) ||
+DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@@ -2601,14 +2603,14 @@ query_addbestns(ns_client_t *client) {
/*
 * Attempt to validate RRsets that are pending or that are glue.
 */
-   if ((rdataset->trust == dns_trust_pending ||
-(sigrdataset != NULL && sigrdataset->trust == dns_trust_pending))
+   if ((DNS_TRUST_PENDING(rdataset->trust) ||
+(sigrdataset != NULL && DNS_TRUST_PENDING(sigrdataset->trust)))
&& !validate(client, db, fname, rdataset, sigrdataset) &&
-   (client->query.dboptions & DNS_DBFIND_PENDINGOK) == 0)
+   !PENDINGOK(client->query.dboptions))
goto cleanup;
 
-   if ((rdataset->trust == dns_trust_glue ||
-(sigrdataset != NULL && sigrdataset->trust == dns_trust_glue)) &&
+   if ((DNS_TRUST_GLUE(rdataset->trust) ||
+(sigrdataset != NULL && DNS_TRUST_GLUE(sigrdataset->trust))) &&
!validate(client, db, fname, rdataset, sigrdataset) &&
SECURE(client) && WANTDNSSEC(client))
goto cleanup;
@@ -3716,6 +3718,8 @@ query_find(ns_client_t *client, dns_fetc
dns_rdataset_t *noqname;
isc_boolean_t resuming;
int line = -1;
+   dns_rdataset_t tmprdataset;
+   unsigned int dboptions;
 
CTRACE("query_find");
 
@@ -3933,9 +3937,49 @@ query_find(ns_client_t *client, dns_fetc
/*
 * Now look for an answer in the database.
 */
+   dboptions = client->query.dboptions;
+   if (sigrdataset == N

svn commit: r200384 - stable/7/share/man/man4

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 01:25:10 2009
New Revision: 200384
URL: http://svn.freebsd.org/changeset/base/200384

Log:
  MFC r188512:
  Fix spelling a bit.

Modified:
  stable/7/share/man/man4/snd_hda.4
Directory Properties:
  stable/7/share/man/man4/   (props changed)

Modified: stable/7/share/man/man4/snd_hda.4
==
--- stable/7/share/man/man4/snd_hda.4   Fri Dec 11 01:23:58 2009
(r200383)
+++ stable/7/share/man/man4/snd_hda.4   Fri Dec 11 01:25:10 2009
(r200384)
@@ -298,7 +298,7 @@ All codec pins are reversible (could be 
 .Pp
 So high codec uniformity and flexibility allow driver to configure it in many
 different ways, depending on requested pins usage decribed by pins 
configuration.
-Driver reports such default pin configuration when verbose messages enabled:
+The driver reports such default pin configuration when verbose messages 
enabled:
 .Bd -literal
 hdac0: nid 20 0x01014020 as  2 seq  0   Line-out  Jack jack 1 loc  1 color   
Green misc 0
 hdac0: nid 21 0x99130110 as  1 seq  0Speaker Fixed jack 3 loc 25 color 
Unknown misc 1
@@ -313,8 +313,8 @@ hdac0: nid 30 0x41f0 as 15 seq  0   
 hdac0: nid 31 0x41f0 as 15 seq  0Speaker  None jack 1 loc  1 color   
Black misc 1
 .Ed
 .Pp
-Here we can see, that the nodes with ID (nid) 25 and 27 are front pannel
-connectors (Jack, loc 2), nids 20, 24 and 26 are rear pannel connectors
+Here we can see, that the nodes with ID (nid) 25 and 27 are front panel
+connectors (Jack, loc 2), nids 20, 24 and 26 are rear panel connectors
 (Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25).
 Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None"
 connectivity. So the pin count and description matches to connectors that
___
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: r200385 - stable/7/share/man/man4

2009-12-10 Thread Alexander Motin
Author: mav
Date: Fri Dec 11 01:26:09 2009
New Revision: 200385
URL: http://svn.freebsd.org/changeset/base/200385

Log:
  MFC r199247:
  Remove part that HDMI is not implemented. It had different meaning and
  confuse users.
  Extend BUGS section.
  Add some supported chipsets.

Modified:
  stable/7/share/man/man4/snd_hda.4
Directory Properties:
  stable/7/share/man/man4/   (props changed)

Modified: stable/7/share/man/man4/snd_hda.4
==
--- stable/7/share/man/man4/snd_hda.4   Fri Dec 11 01:25:10 2009
(r200384)
+++ stable/7/share/man/man4/snd_hda.4   Fri Dec 11 01:26:09 2009
(r200385)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 7, 2009
+.Dd November 13, 2009
 .Dt SND_HDA 4
 .Os
 .Sh NAME
@@ -59,7 +59,7 @@ driver that allows the generic audio dri
 to be used with this hardware.
 Only audio functions are supported by
 .Nm .
-Modem, HDMI and other possible functions are not implemented.
+Modem and other possible functions are not implemented.
 .Pp
 The
 .Nm
@@ -500,6 +500,14 @@ nVidia MCP68
 .It
 nVidia MCP69
 .It
+nVidia MCP73
+.It
+nVidia MCP78
+.It
+nVidia MCP79
+.It
+nVidia MCP89
+.It
 SiS 966
 .It
 VIA VT8251/8237A
@@ -626,5 +634,11 @@ trying to fix problem that way, make sur
 and the PCM audio device you are using really corresponds to expected
 audio connector.
 .Pp
+Some vendors use non-standardized General Purpose I/O (GPIO) pins of codec
+to control external amplifiers. In some cases setting proper combination of
+GPIO bits may be needed to make sound work on specific device.
+.Pp
+HDMI and DisplayPort audio may also require support from video driver.
+.Pp
 Due to OSS limitation multichannel (not multidevice) playback is not
 supported.
___
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: r200386 - stable/8/sys/ia64/ia64

2009-12-10 Thread Marcel Moolenaar
Author: marcel
Date: Fri Dec 11 01:26:26 2009
New Revision: 200386
URL: http://svn.freebsd.org/changeset/base/200386

Log:
  MFC rev 200240:
  In exception_save, write-back ar.rnat after switching the backing-store.
  
  PR:   ia64/120315

Modified:
  stable/8/sys/ia64/ia64/exception.S
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/ia64/ia64/exception.S
==
--- stable/8/sys/ia64/ia64/exception.S  Fri Dec 11 01:26:09 2009
(r200385)
+++ stable/8/sys/ia64/ia64/exception.S  Fri Dec 11 01:26:26 2009
(r200386)
@@ -219,43 +219,42 @@ exception_save_restart:
 (p13)  dep r20=r20,r21,0,9 // align dirty registers
;;
 }
-   // r20=bspstore, r22=iip, r23=ipsr
+   // r19=rnat, r20=bspstore, r22=iip, r23=ipsr
 {  .mmi
st8 [r31]=r23,16// psr
 (p13)  mov ar.bspstore=r20
nop 0
;;
 }
-{  .mmi
+{  .mmb
+(p13)  mov ar.rnat=r19
mov r18=ar.bsp
-   ;;
-   mov r19=cr.ifs
-   sub r18=r18,r20
+   nop 0
;;
 }
 {  .mmi
+   mov r19=cr.ifs
st8.spill   [r30]=gp,16 // gp
-   st8 [r31]=r18,16// ndirty
-   nop 0
+   sub r18=r18,r20
;;
 }
// r19=ifs, r22=iip
-{  .mmi
+{  .mmb
+   st8 [r31]=r18,16// ndirty
st8 [r30]=r19,16// cfm
-   st8 [r31]=r22,16// iip
nop 0
;;
 }
 {  .mmi
-   st8 [r30]=r17   // ifa
mov r18=cr.isr
+   st8 [r31]=r22,16// iip
add r29=16,r30
;;
 }
-{  .mmi
-   st8 [r31]=r18   // isr
-   add r30=8,r29
-   add r31=16,r29
+{  .mmb
+   st8 [r30]=r17,24// ifa
+   st8 [r31]=r18,24// isr
+   nop 0
;;
 }
 {  .mmi
___
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: r200387 - in vendor/bind9/dist-9.4: . bin/named lib/dns lib/dns/include/dns

2009-12-10 Thread Doug Barton
Author: dougb
Date: Fri Dec 11 01:38:30 2009
New Revision: 200387
URL: http://svn.freebsd.org/changeset/base/200387

Log:
  Vendor import of BIND 9.4.3-P4

Modified:
  vendor/bind9/dist-9.4/CHANGES
  vendor/bind9/dist-9.4/bin/named/query.c
  vendor/bind9/dist-9.4/lib/dns/api
  vendor/bind9/dist-9.4/lib/dns/include/dns/types.h
  vendor/bind9/dist-9.4/lib/dns/masterdump.c
  vendor/bind9/dist-9.4/lib/dns/rbtdb.c
  vendor/bind9/dist-9.4/lib/dns/resolver.c
  vendor/bind9/dist-9.4/lib/dns/validator.c
  vendor/bind9/dist-9.4/version

Modified: vendor/bind9/dist-9.4/CHANGES
==
--- vendor/bind9/dist-9.4/CHANGES   Fri Dec 11 01:26:26 2009
(r200386)
+++ vendor/bind9/dist-9.4/CHANGES   Fri Dec 11 01:38:30 2009
(r200387)
@@ -1,3 +1,9 @@
+   --- 9.4.3-P4 released ---
+
+2772.  [security]  When validating, track whether pending data was from
+   the additional section or not and only return it if
+   validates as secure. [RT #20438]
+
--- 9.4.3-P3 released ---
 
 2640.  [security]  A specially crafted update packet will cause named

Modified: vendor/bind9/dist-9.4/bin/named/query.c
==
--- vendor/bind9/dist-9.4/bin/named/query.c Fri Dec 11 01:26:26 2009
(r200386)
+++ vendor/bind9/dist-9.4/bin/named/query.c Fri Dec 11 01:38:30 2009
(r200387)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.257.18.46 2008/10/15 22:33:01 marka Exp $ */
+/* $Id: query.c,v 1.257.18.46.2.1 2009/11/19 00:25:17 marka Exp $ */
 
 /*! \file */
 
@@ -109,6 +109,8 @@
 #define DNS_GETDB_NOLOG 0x02U
 #define DNS_GETDB_PARTIAL 0x04U
 
+#define PENDINGOK(x)   (((x) & DNS_DBFIND_PENDINGOK) != 0)
+
 typedef struct client_additionalctx {
ns_client_t *client;
dns_rdataset_t *rdataset;
@@ -1721,8 +1723,8 @@ query_addadditional2(void *arg, dns_name
 */
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
-   (rdataset->trust == dns_trust_pending ||
-rdataset->trust == dns_trust_glue) &&
+   (DNS_TRUST_PENDING(rdataset->trust) ||
+DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@@ -1761,8 +1763,8 @@ query_addadditional2(void *arg, dns_name
 */
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
-   (rdataset->trust == dns_trust_pending ||
-rdataset->trust == dns_trust_glue) &&
+   (DNS_TRUST_PENDING(rdataset->trust) ||
+DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@@ -2547,14 +2549,14 @@ query_addbestns(ns_client_t *client) {
/*
 * Attempt to validate RRsets that are pending or that are glue.
 */
-   if ((rdataset->trust == dns_trust_pending ||
-(sigrdataset != NULL && sigrdataset->trust == dns_trust_pending))
+   if ((DNS_TRUST_PENDING(rdataset->trust) ||
+(sigrdataset != NULL && DNS_TRUST_PENDING(sigrdataset->trust)))
&& !validate(client, db, fname, rdataset, sigrdataset) &&
-   (client->query.dboptions & DNS_DBFIND_PENDINGOK) == 0)
+   !PENDINGOK(client->query.dboptions))
goto cleanup;
 
-   if ((rdataset->trust == dns_trust_glue ||
-(sigrdataset != NULL && sigrdataset->trust == dns_trust_glue)) &&
+   if ((DNS_TRUST_GLUE(rdataset->trust) ||
+(sigrdataset != NULL && DNS_TRUST_GLUE(sigrdataset->trust))) &&
!validate(client, db, fname, rdataset, sigrdataset) &&
SECURE(client) && WANTDNSSEC(client))
goto cleanup;
@@ -3344,6 +3346,8 @@ query_find(ns_client_t *client, dns_fetc
isc_boolean_t empty_wild;
dns_rdataset_t *noqname;
isc_boolean_t resuming;
+   dns_rdataset_t tmprdataset;
+   unsigned int dboptions;
 
CTRACE("query_find");
 
@@ -3555,9 +3559,49 @@ query_find(ns_client_t *client, dns_fetc
/*
 * Now look for an answer in the database.
 */
+   dboptions = client->query.dboptions;
+   if (sigrdataset == NULL && client->view->enablednssec) {
+   /*
+* If the client doesn't want DNSSEC we still want to
+* look for any data pending validation to save a remote
+* lookup if possible.
+*/
+   dns_rdataset_init(&tmprdataset);
+   sigrdataset = &tmprdataset;
+   dboptions |= DNS_DBFIND

svn commit: r200388 - vendor/bind9/9.4.3-P4

2009-12-10 Thread Doug Barton
Author: dougb
Date: Fri Dec 11 01:39:28 2009
New Revision: 200388
URL: http://svn.freebsd.org/changeset/base/200388

Log:
  Tag the 9.4.3-P4 release

Added:
  vendor/bind9/9.4.3-P4/
 - copied from r200387, vendor/bind9/dist-9.4/
___
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: stable/8/sbin/geom/class/mirror

2009-12-10 Thread Maxim Sobolev

Alexander Motin wrote:

Author: mav
Date: Thu Dec 10 23:51:24 2009
New Revision: 200373
URL: http://svn.freebsd.org/changeset/base/200373

Log:
  MFC r200282, r200290:
  Change gmirror default balance algorithm from "split" to improved "load".
  "split" is very ineffective for devices with rotating media as HDDs.
  To be effective, it needs that transfer time reduction due to block
  splitting was bigger then access time increase due to non-sequential
  access. For modern HDDs I was able to reproduce it only with read sizes
  of 2MB and above, which is almost not applicable in real life.
  "load" algorithm same time is more universal and effective now.


The other problem with real hard drives is that they usually read much 
more data than requested. Some suggest that they read as much as one 
track each time the data is not in cache even if one sector has been 
requested, therefore splitting request of any reasonable size is 
meaningless, as it would simply cause both drives to load essentially 
the same data, wasting half of available I/O bandwidth and in addition 
you cause both heads to do seek, which makes it even worse.


-Maxim
___
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: r200389 - in stable/7/contrib/bind9: . lib/dns

2009-12-10 Thread Doug Barton
Author: dougb
Date: Fri Dec 11 02:00:18 2009
New Revision: 200389
URL: http://svn.freebsd.org/changeset/base/200389

Log:
  The mergeinfo on these 3 files has already been committed to
  contrib/bind9, so remove it from the individual files.

Modified:
Directory Properties:
  stable/7/contrib/bind9/CHANGES   (props changed)
  stable/7/contrib/bind9/lib/dns/validator.c   (props changed)
  stable/7/contrib/bind9/version   (props changed)
___
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: r200390 - vendor/expat/dist/lib

2009-12-10 Thread Xin LI
Author: delphij
Date: Fri Dec 11 02:06:06 2009
New Revision: 200390
URL: http://svn.freebsd.org/changeset/base/200390

Log:
  Apply a vendor fix (rev 1.165): Don't update next pointer since it could
  confuse tokenizer.
  
  Obtained from:expat CVS
  Security: CVE-2009-3720

Modified:
  vendor/expat/dist/lib/xmlparse.c

Modified: vendor/expat/dist/lib/xmlparse.c
==
--- vendor/expat/dist/lib/xmlparse.cFri Dec 11 02:00:18 2009
(r200389)
+++ vendor/expat/dist/lib/xmlparse.cFri Dec 11 02:06:06 2009
(r200390)
@@ -3725,7 +3725,6 @@ doProlog(XML_Parser parser,
 return XML_ERROR_NO_ELEMENTS;
   default:
 tok = -tok;
-next = end;
 break;
   }
 }
___
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: r200391 - in vendor/expat/2.0.1_1: . contrib doc examples lib tests xmlwf

2009-12-10 Thread Xin LI
Author: delphij
Date: Fri Dec 11 02:07:21 2009
New Revision: 200391
URL: http://svn.freebsd.org/changeset/base/200391

Log:
  Tag the patched version as 2.0.1_1.

Added:
  vendor/expat/2.0.1_1/
 - copied from r200363, vendor/expat/dist/
  vendor/expat/2.0.1_1/COPYING
 - copied unchanged from r200365, vendor/expat/dist/COPYING
  vendor/expat/2.0.1_1/Changes
 - copied unchanged from r200365, vendor/expat/dist/Changes
  vendor/expat/2.0.1_1/FREEBSD-upgrade
 - copied unchanged from r200365, vendor/expat/dist/FREEBSD-upgrade
  vendor/expat/2.0.1_1/MANIFEST
 - copied unchanged from r200365, vendor/expat/dist/MANIFEST
  vendor/expat/2.0.1_1/Makefile.in
 - copied unchanged from r200365, vendor/expat/dist/Makefile.in
  vendor/expat/2.0.1_1/README
 - copied unchanged from r200365, vendor/expat/dist/README
  vendor/expat/2.0.1_1/configure
 - copied unchanged from r200365, vendor/expat/dist/configure
  vendor/expat/2.0.1_1/configure.in
 - copied unchanged from r200365, vendor/expat/dist/configure.in
  vendor/expat/2.0.1_1/doc/
 - copied from r200365, vendor/expat/dist/doc/
  vendor/expat/2.0.1_1/examples/
 - copied from r200365, vendor/expat/dist/examples/
  vendor/expat/2.0.1_1/expat_config.h.in
 - copied unchanged from r200365, vendor/expat/dist/expat_config.h.in
  vendor/expat/2.0.1_1/lib/
 - copied from r200365, vendor/expat/dist/lib/
  vendor/expat/2.0.1_1/tests/
 - copied from r200365, vendor/expat/dist/tests/
  vendor/expat/2.0.1_1/xmlwf/
 - copied from r200365, vendor/expat/dist/xmlwf/
Replaced:
  vendor/expat/2.0.1_1/lib/xmlparse.c
 - copied unchanged from r200390, vendor/expat/dist/lib/xmlparse.c
  vendor/expat/2.0.1_1/lib/xmltok_impl.c
 - copied unchanged from r200368, vendor/expat/dist/lib/xmltok_impl.c
Deleted:
  vendor/expat/2.0.1_1/contrib/

Copied: vendor/expat/2.0.1_1/COPYING (from r200365, vendor/expat/dist/COPYING)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/expat/2.0.1_1/COPYINGFri Dec 11 02:07:21 2009
(r200391, copy of r200365, vendor/expat/dist/COPYING)
@@ -0,0 +1,22 @@
+Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+   and Clark Cooper
+Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copied: vendor/expat/2.0.1_1/Changes (from r200365, vendor/expat/dist/Changes)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ vendor/expat/2.0.1_1/ChangesFri Dec 11 02:07:21 2009
(r200391, copy of r200365, vendor/expat/dist/Changes)
@@ -0,0 +1,169 @@
+Release 2.0.1 Tue June 5 2007
+- Fixed bugs #1515266, 1515600: The character data handler's calling
+  of XML_StopParser() was not handled properly; if the parser was
+  stopped and the handler set to NULL, the parser would segfault.
+- Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed
+  some character constants to be ASCII encoded.
+- Minor cleanups of the test harness.
+- Fixed xmlwf bug #1513566: "out of memory" error on file size zero.
+- Fixed outline.c bug #1543233: missing a final XML_ParserFree() call.
+- Fixes and improvements for Windows platform:
+  bugs #1409451, #1476160, 1548182, 1602769, 1717322.
+- Build fixes for various platforms:
+  HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180.
+  All Unix: #1554618 (refreshed config.sub/config.guess).
+#1490371, #1613457: support both, DESTDIR and INSTALL_ROOT,
+without relying on GNU-Make specific features.
+  #1647805: Patched configure.in to work better with Intel compiler.
+- Fixes to Makefile.in to have make check work corr

svn commit: r200392 - head/contrib/expat/lib

2009-12-10 Thread Xin LI
Author: delphij
Date: Fri Dec 11 02:09:46 2009
New Revision: 200392
URL: http://svn.freebsd.org/changeset/base/200392

Log:
  Apply two vendor fixes for CVE-2009-3720.
  
  Security: CVE-2009-3720
  MFC after:3 days

Modified:
  head/contrib/expat/lib/xmlparse.c
  head/contrib/expat/lib/xmltok_impl.c
Directory Properties:
  head/contrib/expat/   (props changed)

Modified: head/contrib/expat/lib/xmlparse.c
==
--- head/contrib/expat/lib/xmlparse.c   Fri Dec 11 02:07:21 2009
(r200391)
+++ head/contrib/expat/lib/xmlparse.c   Fri Dec 11 02:09:46 2009
(r200392)
@@ -3725,7 +3725,6 @@ doProlog(XML_Parser parser,
 return XML_ERROR_NO_ELEMENTS;
   default:
 tok = -tok;
-next = end;
 break;
   }
 }

Modified: head/contrib/expat/lib/xmltok_impl.c
==
--- head/contrib/expat/lib/xmltok_impl.cFri Dec 11 02:07:21 2009
(r200391)
+++ head/contrib/expat/lib/xmltok_impl.cFri Dec 11 02:09:46 2009
(r200392)
@@ -1744,7 +1744,7 @@ PREFIX(updatePosition)(const ENCODING *e
const char *end,
POSITION *pos)
 {
-  while (ptr != end) {
+  while (ptr < end) {
 switch (BYTE_TYPE(enc, ptr)) {
 #define LEAD_CASE(n) \
 case BT_LEAD ## 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: r200393 - in stable/7/contrib/bind9: . bin/named lib/dns lib/dns/include/dns

2009-12-10 Thread Doug Barton
Author: dougb
Date: Fri Dec 11 02:23:04 2009
New Revision: 200393
URL: http://svn.freebsd.org/changeset/base/200393

Log:
  Update to version 9.4.3-P4. The vulnerability this is designed to fix is
  related to DNSSEC validation on a resolving name server that allows
  access to untrusted users. If your system does not fall into all 3 of
  these categories you do not need to update immediately.

Modified:
  stable/7/contrib/bind9/CHANGES
  stable/7/contrib/bind9/bin/named/query.c
  stable/7/contrib/bind9/lib/dns/api
  stable/7/contrib/bind9/lib/dns/include/dns/types.h
  stable/7/contrib/bind9/lib/dns/masterdump.c
  stable/7/contrib/bind9/lib/dns/rbtdb.c
  stable/7/contrib/bind9/lib/dns/resolver.c
  stable/7/contrib/bind9/lib/dns/validator.c
  stable/7/contrib/bind9/version
Directory Properties:
  stable/7/contrib/bind9/   (props changed)

Modified: stable/7/contrib/bind9/CHANGES
==
--- stable/7/contrib/bind9/CHANGES  Fri Dec 11 02:09:46 2009
(r200392)
+++ stable/7/contrib/bind9/CHANGES  Fri Dec 11 02:23:04 2009
(r200393)
@@ -1,3 +1,9 @@
+   --- 9.4.3-P4 released ---
+
+2772.  [security]  When validating, track whether pending data was from
+   the additional section or not and only return it if
+   validates as secure. [RT #20438]
+
--- 9.4.3-P3 released ---
 
 2640.  [security]  A specially crafted update packet will cause named

Modified: stable/7/contrib/bind9/bin/named/query.c
==
--- stable/7/contrib/bind9/bin/named/query.cFri Dec 11 02:09:46 2009
(r200392)
+++ stable/7/contrib/bind9/bin/named/query.cFri Dec 11 02:23:04 2009
(r200393)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.257.18.46 2008/10/15 22:33:01 marka Exp $ */
+/* $Id: query.c,v 1.257.18.46.2.1 2009/11/19 00:25:17 marka Exp $ */
 
 /*! \file */
 
@@ -109,6 +109,8 @@
 #define DNS_GETDB_NOLOG 0x02U
 #define DNS_GETDB_PARTIAL 0x04U
 
+#define PENDINGOK(x)   (((x) & DNS_DBFIND_PENDINGOK) != 0)
+
 typedef struct client_additionalctx {
ns_client_t *client;
dns_rdataset_t *rdataset;
@@ -1721,8 +1723,8 @@ query_addadditional2(void *arg, dns_name
 */
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
-   (rdataset->trust == dns_trust_pending ||
-rdataset->trust == dns_trust_glue) &&
+   (DNS_TRUST_PENDING(rdataset->trust) ||
+DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@@ -1761,8 +1763,8 @@ query_addadditional2(void *arg, dns_name
 */
if (result == ISC_R_SUCCESS &&
additionaltype == dns_rdatasetadditional_fromcache &&
-   (rdataset->trust == dns_trust_pending ||
-rdataset->trust == dns_trust_glue) &&
+   (DNS_TRUST_PENDING(rdataset->trust) ||
+DNS_TRUST_GLUE(rdataset->trust)) &&
!validate(client, db, fname, rdataset, sigrdataset)) {
dns_rdataset_disassociate(rdataset);
if (dns_rdataset_isassociated(sigrdataset))
@@ -2547,14 +2549,14 @@ query_addbestns(ns_client_t *client) {
/*
 * Attempt to validate RRsets that are pending or that are glue.
 */
-   if ((rdataset->trust == dns_trust_pending ||
-(sigrdataset != NULL && sigrdataset->trust == dns_trust_pending))
+   if ((DNS_TRUST_PENDING(rdataset->trust) ||
+(sigrdataset != NULL && DNS_TRUST_PENDING(sigrdataset->trust)))
&& !validate(client, db, fname, rdataset, sigrdataset) &&
-   (client->query.dboptions & DNS_DBFIND_PENDINGOK) == 0)
+   !PENDINGOK(client->query.dboptions))
goto cleanup;
 
-   if ((rdataset->trust == dns_trust_glue ||
-(sigrdataset != NULL && sigrdataset->trust == dns_trust_glue)) &&
+   if ((DNS_TRUST_GLUE(rdataset->trust) ||
+(sigrdataset != NULL && DNS_TRUST_GLUE(sigrdataset->trust))) &&
!validate(client, db, fname, rdataset, sigrdataset) &&
SECURE(client) && WANTDNSSEC(client))
goto cleanup;
@@ -3344,6 +3346,8 @@ query_find(ns_client_t *client, dns_fetc
isc_boolean_t empty_wild;
dns_rdataset_t *noqname;
isc_boolean_t resuming;
+   dns_rdataset_t tmprdataset;
+   unsigned int dboptions;
 
CTRACE("query_find");
 
@@ -3555,9 +3559,49 @@ query_find(ns_client_t *client, dns_fetc
/*
 * Now look for an answer in the database.
 */
+   dboptions = client->query.dboptions;
+   if (sigrdataset == NULL && client->view->enablednssec) {
+   /*
+  

svn commit: r200394 - stable/6/etc/namedb

2009-12-10 Thread Doug Barton
Author: dougb
Date: Fri Dec 11 02:32:53 2009
New Revision: 200394
URL: http://svn.freebsd.org/changeset/base/200394

Log:
  Add a big honkin' warning about not using DNSSEC with this version
  of BIND. Also point out that it's EOL and give suggestions on upgrading.

Modified:
  stable/6/etc/namedb/named.conf

Modified: stable/6/etc/namedb/named.conf
==
--- stable/6/etc/namedb/named.conf  Fri Dec 11 02:23:04 2009
(r200393)
+++ stable/6/etc/namedb/named.conf  Fri Dec 11 02:32:53 2009
(r200394)
@@ -8,6 +8,28 @@
 // simple mistakes, you can break connectivity for affected parties,
 // or cause huge amounts of useless Internet traffic.
 
+/*
+*
+*   _  _ _ _ _   _ _ ___ ___  _   _*
+* / \|_   _|_   _| | \ | |_   _|_ _/ _ \| \ | |*
+*/ _ \ | |   | | |  _| |  \| | | |  | | | | |  \| |*
+*   / ___ \| |   | | | |___| |\  | | |  | | |_| | |\  |*
+*  /_/   \_\_|   |_| |_|_| \_| |_| |___\___/|_| \_|*
+*  *
+*
+
+The version of BIND in the RELENG_6 branch (FreeBSD 6.x) is NOT suitable
+for use with DNSSEC, either as a validating resolver or an authoritative
+name server.  If you plan to use DNSSEC for any purpose you should use a
+newer version of BIND, preferably version 9.6.x or higher.
+
+Additionally, this version of BIND (9.3.x) is beyond its End Of Life (EOL)
+date and is no longer supported by ISC.
+
+Newer versions are available in the ports tree (e.g., /usr/ports/dns/bind96)
+or by upgrading your FreeBSD installation to version 8.0 or higher.
+*/
+
 options {
// Relative to the chroot directory, if any
directory   "/etc/namedb";
___
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: r200395 - in head/sys/dev/usb: . quirk serial

2009-12-10 Thread Andrew Thompson
Author: thompsa
Date: Fri Dec 11 02:44:15 2009
New Revision: 200395
URL: http://svn.freebsd.org/changeset/base/200395

Log:
  Add a quirk for the Curitel UM175 where setting multiplexing for call
  management over the data endpoint causes communication to die.
  
  Take this one step further and model it on the existing NetBSD quirk and 
import
  other device IDs from them.
  
  Obtained from:NetBSD

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

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==
--- head/sys/dev/usb/quirk/usb_quirk.c  Fri Dec 11 02:32:53 2009
(r200394)
+++ head/sys/dev/usb/quirk/usb_quirk.c  Fri Dec 11 02:44:15 2009
(r200395)
@@ -125,6 +125,24 @@ static struct usb_quirk_entry usb_quirks
/* MS keyboards do weird things */
{USB_QUIRK_ENTRY(USB_VENDOR_MICROSOFT, 
USB_PRODUCT_MICROSOFT_WLINTELLIMOUSE, 0x, 0x, UQ_MS_LEADING_BYTE, 
UQ_NONE)},
{USB_QUIRK_ENTRY(USB_VENDOR_METAGEEK, USB_PRODUCT_METAGEEK_WISPY24X, 
0x, 0x, UQ_KBD_IGNORE, UQ_HID_IGNORE, UQ_NONE)},
+   /* umodem(4) device quirks */
+   {USB_QUIRK_ENTRY(USB_VENDOR_METRICOM, USB_PRODUCT_METRICOM_RICOCHET_GS,
+   0x100, 0x100, UQ_ASSUME_CM_OVER_DATA)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_SANYO, USB_PRODUCT_SANYO_SCP4900,
+   0x000, 0x000, UQ_ASSUME_CM_OVER_DATA)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_T720C,
+   0x001, 0x001, UQ_ASSUME_CM_OVER_DATA)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_EICON, USB_PRODUCT_EICON_DIVA852,
+   0x100, 0x100, UQ_ASSUME_CM_OVER_DATA)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_SIEMENS2, USB_PRODUCT_SIEMENS2_ES75,
+   0x000, 0x000, UQ_ASSUME_CM_OVER_DATA)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_QUALCOMM, USB_PRODUCT_QUALCOMM_CDMA_MSM,
+   0x, 0x, UQ_ASSUME_CM_OVER_DATA)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_QUALCOMM2, USB_PRODUCT_QUALCOMM2_CDMA_MSM,
+   0x, 0x, UQ_ASSUME_CM_OVER_DATA)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_UM175,
+   0x, 0x, UQ_ASSUME_CM_OVER_DATA)},
+
 };
 
 static const char *usb_quirk_str[USB_QUIRK_MAX] = {
@@ -152,6 +170,7 @@ static const char *usb_quirk_str[USB_QUI
[UQ_CFG_INDEX_3]= "UQ_CFG_INDEX_3",
[UQ_CFG_INDEX_4]= "UQ_CFG_INDEX_4",
[UQ_CFG_INDEX_0]= "UQ_CFG_INDEX_0",
+   [UQ_ASSUME_CM_OVER_DATA]= "UQ_ASSUME_CM_OVER_DATA",
 };
 
 /**

Modified: head/sys/dev/usb/quirk/usb_quirk.h
==
--- head/sys/dev/usb/quirk/usb_quirk.h  Fri Dec 11 02:32:53 2009
(r200394)
+++ head/sys/dev/usb/quirk/usb_quirk.h  Fri Dec 11 02:44:15 2009
(r200395)
@@ -53,6 +53,7 @@ enum {/* keep in sync with usb_quirk_st
UQ_CFG_INDEX_3, /* select configuration index 3 by default */
UQ_CFG_INDEX_4, /* select configuration index 4 by default */
UQ_CFG_INDEX_0, /* select configuration index 0 by default */
+   UQ_ASSUME_CM_OVER_DATA, /* modem device breaks on cm over data */
USB_QUIRK_MAX
 };
 

Modified: head/sys/dev/usb/serial/umodem.c
==
--- head/sys/dev/usb/serial/umodem.cFri Dec 11 02:32:53 2009
(r200394)
+++ head/sys/dev/usb/serial/umodem.cFri Dec 11 02:44:15 2009
(r200395)
@@ -112,6 +112,7 @@ __FBSDID("$FreeBSD$");
 #defineUSB_DEBUG_VAR umodem_debug
 #include 
 #include 
+#include 
 
 #include 
 
@@ -349,16 +350,20 @@ umodem_attach(device_t dev)
}
}
 
-   if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) {
-   if (sc->sc_acm_cap & USB_CDC_ACM_HAS_FEATURE) {
+   if (usb_test_quirk(uaa, UQ_ASSUME_CM_OVER_DATA)) {
+   sc->sc_cm_over_data = 1;
+   } else {
+   if (sc->sc_cm_cap & USB_CDC_CM_OVER_DATA) {
+   if (sc->sc_acm_cap & USB_CDC_ACM_HAS_FEATURE) {
 
-   error = umodem_set_comm_feature
-   (uaa->device, sc->sc_ctrl_iface_no,
-   UCDC_ABSTRACT_STATE, UCDC_DATA_MULTIPLEXED);
+   error = umodem_set_comm_feature
+   (uaa->device, sc->sc_ctrl_iface_no,
+UCDC_ABSTRACT_STATE, UCDC_DATA_MULTIPLEXED);
 
-   /* ignore any errors */
+   /* ignore any errors */
+   }
+   sc->sc_cm_over_data = 1;
}
-   sc->sc_cm_over_data = 1;
}
error = usbd_transfer_setup(uaa->device,
sc->sc_iface_index, s

svn commit: r200396 - head/sys/dev/usb/quirk

2009-12-10 Thread Andrew Thompson
Author: thompsa
Date: Fri Dec 11 02:52:14 2009
New Revision: 200396
URL: http://svn.freebsd.org/changeset/base/200396

Log:
  Wrap long lines.

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

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==
--- head/sys/dev/usb/quirk/usb_quirk.c  Fri Dec 11 02:44:15 2009
(r200395)
+++ head/sys/dev/usb/quirk/usb_quirk.c  Fri Dec 11 02:52:14 2009
(r200396)
@@ -80,51 +80,91 @@ struct usb_quirk_entry {
 static struct mtx usb_quirk_mtx;
 
 static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = {
-   {USB_QUIRK_ENTRY(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_LCM, 0x, 0x, 
UQ_HID_IGNORE, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_INSIDEOUT, USB_PRODUCT_INSIDEOUT_EDGEPORT4, 
0x094, 0x094, UQ_SWAP_UNICODE, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_DALLAS, USB_PRODUCT_DALLAS_J6502, 0x0a2, 
0x0a2, UQ_BAD_ADC, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_DALLAS, USB_PRODUCT_DALLAS_J6502, 0x0a2, 
0x0a2, UQ_AU_NO_XU, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_ALTEC, USB_PRODUCT_ALTEC_ADA70, 0x103, 
0x103, UQ_BAD_ADC, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_ALTEC, USB_PRODUCT_ALTEC_ASC495, 0x000, 
0x000, UQ_BAD_AUDIO, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_QTRONIX, USB_PRODUCT_QTRONIX_980N, 0x110, 
0x110, UQ_SPUR_BUT_UP, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_ALCOR2, USB_PRODUCT_ALCOR2_KBD_HUB, 0x001, 
0x001, UQ_SPUR_BUT_UP, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_MCT, USB_PRODUCT_MCT_HUB0100, 0x102, 0x102, 
UQ_BUS_POWERED, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_MCT, USB_PRODUCT_MCT_USB232, 0x102, 0x102, 
UQ_BUS_POWERED, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_TI, USB_PRODUCT_TI_UTUSB41, 0x110, 0x110, 
UQ_POWER_CLAIM, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1, 0x009, 
0x009, UQ_AU_NO_FRAC, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_SILICONPORTALS, 
USB_PRODUCT_SILICONPORTALS_YAPPHONE, 0x100, 0x100, UQ_AU_INP_ASYNC, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, 
0x, 0x, UQ_NO_STRINGS, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_ELSA, USB_PRODUCT_ELSA_MODEM1, 0x, 
0x, UQ_CFG_INDEX_1, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_LCM,
+   0x, 0x, UQ_HID_IGNORE, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_INSIDEOUT, USB_PRODUCT_INSIDEOUT_EDGEPORT4,
+   0x094, 0x094, UQ_SWAP_UNICODE, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_DALLAS, USB_PRODUCT_DALLAS_J6502,
+   0x0a2, 0x0a2, UQ_BAD_ADC, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_DALLAS, USB_PRODUCT_DALLAS_J6502,
+   0x0a2, 0x0a2, UQ_AU_NO_XU, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_ALTEC, USB_PRODUCT_ALTEC_ADA70,
+   0x103, 0x103, UQ_BAD_ADC, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_ALTEC, USB_PRODUCT_ALTEC_ASC495,
+   0x000, 0x000, UQ_BAD_AUDIO, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_QTRONIX, USB_PRODUCT_QTRONIX_980N,
+   0x110, 0x110, UQ_SPUR_BUT_UP, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_ALCOR2, USB_PRODUCT_ALCOR2_KBD_HUB,
+   0x001, 0x001, UQ_SPUR_BUT_UP, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_MCT, USB_PRODUCT_MCT_HUB0100,
+   0x102, 0x102, UQ_BUS_POWERED, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_MCT, USB_PRODUCT_MCT_USB232,
+   0x102, 0x102, UQ_BUS_POWERED, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_TI, USB_PRODUCT_TI_UTUSB41,
+   0x110, 0x110, UQ_POWER_CLAIM, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_TELEX, USB_PRODUCT_TELEX_MIC1,
+   0x009, 0x009, UQ_AU_NO_FRAC, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_SILICONPORTALS,
+   USB_PRODUCT_SILICONPORTALS_YAPPHONE,
+   0x100, 0x100, UQ_AU_INP_ASYNC, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B,
+   0x, 0x, UQ_NO_STRINGS, UQ_NONE)},
+   {USB_QUIRK_ENTRY(USB_VENDOR_ELSA, USB_PRODUCT_ELSA_MODEM1,
+   0x, 0x, UQ_CFG_INDEX_1, UQ_NONE)},
 
/*
 * XXX The following quirks should have a more specific revision
 * number:
 */
-   {USB_QUIRK_ENTRY(USB_VENDOR_HP, USB_PRODUCT_HP_895C, 0x, 0x, 
UQ_BROKEN_BIDIR, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_HP, USB_PRODUCT_HP_880C, 0x, 0x, 
UQ_BROKEN_BIDIR, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_HP, USB_PRODUCT_HP_815C, 0x, 0x, 
UQ_BROKEN_BIDIR, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_HP, USB_PRODUCT_HP_810C, 0x, 0x, 
UQ_BROKEN_BIDIR, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_HP, USB_PRODUCT_HP_830C, 0x, 0x, 
UQ_BROKEN_BIDIR, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_HP, USB_PRODUCT_HP_1220C, 0x, 0x, 
UQ_BROKEN_BIDIR, UQ_NONE)},
-   {USB_QUIRK_ENTRY(USB_VENDOR_XEROX, USB_PRODUCT_XEROX_WCM15, 0x, 
0x

svn commit: r200397 - head/sys/dev/puc

2009-12-10 Thread Marcel Moolenaar
Author: marcel
Date: Fri Dec 11 03:08:07 2009
New Revision: 200397
URL: http://svn.freebsd.org/changeset/base/200397

Log:
  Fix interrupt handling. It started off broken and grew worse over time.
  The rewrite of the interrupt handler includes:
  o   loop until all pending interrupts are handled. This closes a
  race condition.
  o   count the number of interrupt sources we handled so that we can
  properly return FILTER_HANDLED or FILTER_STRAY when we break out
  of the loop.
  o   When matching the interrupt source to the devices that have that
  source pending, check only from the set of devices we found to
  have a pending interrupt.
  
  PR:   kern/140947
  MFC after:3 days

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

Modified: head/sys/dev/puc/puc.c
==
--- head/sys/dev/puc/puc.c  Fri Dec 11 02:52:14 2009(r200396)
+++ head/sys/dev/puc/puc.c  Fri Dec 11 03:08:07 2009(r200397)
@@ -129,62 +129,78 @@ puc_intr(void *arg)
 {
struct puc_port *port;
struct puc_softc *sc = arg;
-   u_long dev, devs;
-   int i, idx, ipend, isrc;
+   u_long ds, dev, devs;
+   int i, idx, ipend, isrc, nints;
uint8_t ilr;
 
-   devs = sc->sc_serdevs;
-   if (sc->sc_ilr == PUC_ILR_DIGI) {
-   idx = 0;
-   while (devs & (0xfful << idx)) {
-   ilr = ~bus_read_1(sc->sc_port[idx].p_rres, 7);
-   devs &= ~0ul ^ ((u_long)ilr << idx);
-   idx += 8;
-   }
-   } else if (sc->sc_ilr == PUC_ILR_QUATECH) {
+   nints = 0;
+   while (1) {
/*
-* Don't trust the value if it's the same as the option
-* register. It may mean that the ILR is not active and
-* we're reading the option register instead. This may
-* lead to false positives on 8-port boards.
+* Obtain the set of devices with pending interrupts.
 */
-   ilr = bus_read_1(sc->sc_port[0].p_rres, 7);
-   if (ilr != (sc->sc_cfg_data & 0xff))
-   devs &= (u_long)ilr;
-   }
-
-   ipend = 0;
-   idx = 0, dev = 1UL;
-   while (devs != 0UL) {
-   while ((devs & dev) == 0UL)
-   idx++, dev <<= 1;
-   devs &= ~dev;
-   port = &sc->sc_port[idx];
-   port->p_ipend = SERDEV_IPEND(port->p_dev);
-   ipend |= port->p_ipend;
-   }
+   devs = sc->sc_serdevs;
+   if (sc->sc_ilr == PUC_ILR_DIGI) {
+   idx = 0;
+   while (devs & (0xfful << idx)) {
+   ilr = ~bus_read_1(sc->sc_port[idx].p_rres, 7);
+   devs &= ~0ul ^ ((u_long)ilr << idx);
+   idx += 8;
+   }
+   } else if (sc->sc_ilr == PUC_ILR_QUATECH) {
+   /*
+* Don't trust the value if it's the same as the option
+* register. It may mean that the ILR is not active and
+* we're reading the option register instead. This may
+* lead to false positives on 8-port boards.
+*/
+   ilr = bus_read_1(sc->sc_port[0].p_rres, 7);
+   if (ilr != (sc->sc_cfg_data & 0xff))
+   devs &= (u_long)ilr;
+   }
+   if (devs == 0UL)
+   break;
 
-   i = 0, isrc = SER_INT_OVERRUN;
-   while (ipend) {
-   while (i < PUC_ISRCCNT && !(ipend & isrc))
-   i++, isrc <<= 1;
-   KASSERT(i < PUC_ISRCCNT, ("%s", __func__));
-   ipend &= ~isrc;
+   /*
+* Obtain the set of interrupt sources from those devices
+* that have pending interrupts.
+*/
+   ipend = 0;
idx = 0, dev = 1UL;
-   devs = sc->sc_serdevs;
-   while (devs != 0UL) {
-   while ((devs & dev) == 0UL)
+   ds = devs;
+   while (ds != 0UL) {
+   while ((ds & dev) == 0UL)
idx++, dev <<= 1;
-   devs &= ~dev;
+   ds &= ~dev;
port = &sc->sc_port[idx];
-   if (!(port->p_ipend & isrc))
-   continue;
-   if (port->p_ihsrc[i] != NULL)
-   (*port->p_ihsrc[i])(port->p_iharg);
+   port->p_ipend = SERDEV_IPEND(port->p_dev);
+   ipend |= port->p_ipend;
+   }
+   if (ipend == 0)
+   break;
+
+

svn commit: r200398 - in vendor/bind9: dist dist-9.4

2009-12-10 Thread Doug Barton
Author: dougb
Date: Fri Dec 11 04:14:44 2009
New Revision: 200398
URL: http://svn.freebsd.org/changeset/base/200398

Log:
  Update these files to match current reality.
  
  BIND 9.6 has diverged sufficiently from 9.4 to warrant slightly different
  procedures, so stop pretending that they are interchangable.

Modified:
  vendor/bind9/dist-9.4/FREEBSD-Upgrade
  vendor/bind9/dist/FREEBSD-Upgrade

Modified: vendor/bind9/dist-9.4/FREEBSD-Upgrade
==
--- vendor/bind9/dist-9.4/FREEBSD-Upgrade   Fri Dec 11 03:08:07 2009
(r200397)
+++ vendor/bind9/dist-9.4/FREEBSD-Upgrade   Fri Dec 11 04:14:44 2009
(r200398)
@@ -1,56 +1,54 @@
 
-   FreeBSD maintainer's guide to updating BIND 9
-   =
+   FreeBSD maintainer's guide to updating BIND 9.4.x
+   =
 
 1) Obtain the latest source distribution from the ISC's FTP server
(ftp://ftp.isc.org/isc/bind9/)
 
 2) Check out the head of the subversion "vendor branch"
 
-   svn co $REPO/vendor/bind9/dist
-
-   NOTE: For RELENG_6 (BIND 9.3.x) s/dist/dist-9.3/ throughout this file
+   svn co $REPO/vendor/bind9/dist-9.4
 
 3) Unpack the tarball in a suitable directory:
 
-   tar zxvf bind-9..tar.gz -X dist/FREEBSD-Xlist
+   tar zxvf bind-9.4..tar.gz -X dist-9.4/FREEBSD-Xlist
 
Check to see if any files have been added or deleted using
-   diff -ur dist bind-9. -x \.svn | grep 'Only in'
+   diff -ur dist-9.4 bind-9.4. -x \.svn | grep 'Only in'
 
 4) Copy new files over the old ones:
 
-   cp -Rp bind-9./* dist/
+   cp -Rp bind-9.4./* dist-9.4/
 
 5) Double-check for changes using 'svn status'
 
 6) Use 'svn add' and 'svn rm' to bring dist up to date for files found above.
Update FREEBSD-Xlist as needed.
-   The files in vendor/bind9/dist should now look exactly like those in the
+   The files in vendor/bind9/dist-9.4 should now look exactly like those in the
   ISC sources, minus the files/directories in FREEBSD-Xlist above.
Carefully check the output of 'svn status' and 'svn diff'
   It's not if you're paranoid, it's if you are paranoid enough
 
 7) Commit the update to the vendor files:
 
-   cd dist ; svn ci -m "Vendor import of BIND 9.X.Y"
-   svn cp $REPO/vendor/bind9/dist $REPO/vendor/bind9/${version}
+   cd dist-9.4 ; svn ci -m "Vendor import of BIND 9.4.X"
+   svn cp $REPO/vendor/bind9/dist-9.4 $REPO/vendor/bind9/${version}
   (this is a server-side operation, you dont have to check it out)
 
-8) Update the files in src/contrib/bind9:
+8) Update the files in stable/7/contrib/bind9:
 
-   cd head/contrib/bind9
+   cd stable/7/contrib/bind9
 
Make sure you are up to date:
svn update ; svn status
 
-   svn merge $REPO/vendor/bind9/dist .
+   svn merge $REPO/vendor/bind9/dist-9.4 .
Resolve conflicts (if any)
Carefully check the output of 'svn status' and 'svn diff'
 
-   NOTE: You may need 2 copies of head/contrib/bind9 at this point,
+   NOTE: You may need 2 copies of stable/7/contrib/bind9 at this point,
  one to do the work in steps 9 and 10 below, and a clean
- version to commit in step 13.
+ version to commit in step 16.
 
 9) Remove any references to the {bin,lib}/tests and docutil
directories from the configure and Makefile templates:
@@ -73,14 +71,14 @@
--with-openssl=/usr --with-randomdev=/dev/random
 
Note that we intentionally disable IPv6 support on the configure
-   command line; src/lib/bind/config.mk will re-enable it at compile
+   command line; stable/7/lib/bind/config.mk will re-enable it at compile
time if WITHOUT_INET6 is not defined.
 
-11) Copy the following generated files to src/lib/bind:
+11) Copy the following generated files to stable/7/lib/bind:
 
-   Path in src/contrib/bind9   Path in src/lib/bind
+   Path in stable/7/contrib/bind9  Path in stable/7/lib/bind

-   s=/usr/src/lib/bind
+   s=../../lib/bind
cp config.h ${s}/config.h
cp lib/bind/config.h${s}/bind/config.h
cp lib/bind/port_after.h${s}/bind/port_after.h
@@ -92,46 +90,46 @@
Do not commit any other file that was modified or created in
steps 6) or 7).
 
-12) cd src/lib/bind/dns && make -DMAINTAINER_MODE generate && rm gen
+12) cd stable/7/lib/bind/dns && make -DMAINTAINER_MODE generate && rm gen
 
 13) Test build the updated files with a clean /usr/obj and empty src.conf
 
The following directories contain Makefiles for bits and pieces of
BIND 9:
 
-   FreeBSD directory   ISC directory
+   FreeBSD directory   ISC directory
   

svn commit: r200399 - head/lib/libtacplus

2009-12-10 Thread Shteryana Shopova
Author: syrinx
Date: Fri Dec 11 07:53:44 2009
New Revision: 200399
URL: http://svn.freebsd.org/changeset/base/200399

Log:
  Add support for TACACS+ accounting to libtacplus(3).
  
  Submitted by: Michael Pounov mi...@aitbg.com
  OKed by:  emaste

Modified:
  head/lib/libtacplus/libtacplus.3
  head/lib/libtacplus/taclib.c
  head/lib/libtacplus/taclib.h
  head/lib/libtacplus/taclib_private.h

Modified: head/lib/libtacplus/libtacplus.3
==
--- head/lib/libtacplus/libtacplus.3Fri Dec 11 04:14:44 2009
(r200398)
+++ head/lib/libtacplus/libtacplus.3Fri Dec 11 07:53:44 2009
(r200399)
@@ -44,6 +44,8 @@
 .Fn tac_create_authen "struct tac_handle *h" "int action" "int type" "int 
service"
 .Ft int
 .Fn tac_create_author "struct tac_handle *h" "int method" "int type" "int 
service"
+.Ft int
+.Fn tac_create_acct "struct tac_handle *h" "int acct" "int action" "int type" 
"int service"
 .Ft char *
 .Fn tac_get_av "struct tac_handle *h" "u_int index"
 .Ft char *
@@ -59,6 +61,8 @@
 .Ft int
 .Fn tac_send_author "struct tac_handle *h"
 .Ft int
+.Fn tac_send_acct "struct tac_handle *h"
+.Ft int
 .Fn tac_set_av "struct tac_handle *h" "u_int index" "const char *av_pair"
 .Ft int
 .Fn tac_set_data "struct tac_handle *h" "const void *data" "size_t data_len"
@@ -193,6 +197,20 @@ TACACS+ protocol specification.
 The
 .In taclib.h
 header file contains symbolic constants for these values.
+.Sh CREATING A TACACS+ ACCOUNTING REQUEST
+To begin constructing a new accounting request, call
+.Fn tac_create_acct .
+The
+.Va acct ,
+.Va action ,
+.Va type ,
+and
+.Va service
+arguments must be set to appropriate values as defined in the
+TACACS+ protocol specification.
+The
+.In taclib.h
+header file contains symbolic constants for these values.
 .Sh SETTING OPTIONAL PARAMETERS ON A REQUEST
 After creating a request,
 various optional parameters may be attached to it through calls to
@@ -354,6 +372,29 @@ include:
 .Pp
 The number of AV pairs received is obtained using
 .Fn TAC_AUTHEN_AV_COUNT .
+.Sh SENDING THE ACCOUNTING REQUEST AND RECEIVING THE RESPONSE
+After the TACACS+ authorization request has been constructed, it
+is sent by means of
+.Fn tac_send_acct .
+This function connects to a server if not already connected, sends
+the request, and waits for a reply.
+On failure,
+.Fn tac_send_acct
+returns \-1.
+Otherwise, it returns the TACACS+ status code 
+Possible status codes, defined in
+.In taclib.h ,
+include:
+.Pp
+.Bl -item -compact -offset indent
+.It
+.Dv TAC_ACCT_STATUS_SUCCESS
+.It
+.Dv TAC_ACCT_STATUS_ERROR
+.It
+.Dv TAC_ACCT_STATUS_FOLLOW
+.El
+.Pp
 .Sh EXTRACTING INFORMATION FROM THE SERVER'S AUTHORIZATION RESPONSE
 Like an authentication response packet, an authorization
 response packet from the
@@ -418,10 +459,14 @@ which can be retrieved using
 .It
 .Fn tac_create_author
 .It
+.Fn tac_create_acct
+.It
 .Fn tac_send_authen
 .It
 .Fn tac_send_author
 .It
+.Fn tac_send_acct
+.It
 .Fn tac_set_av
 .It
 .Fn tac_set_data

Modified: head/lib/libtacplus/taclib.c
==
--- head/lib/libtacplus/taclib.cFri Dec 11 04:14:44 2009
(r200398)
+++ head/lib/libtacplus/taclib.cFri Dec 11 07:53:44 2009
(r200399)
@@ -211,6 +211,8 @@ protocol_version(int msg_type, int var, 
}
 break;
 
+   case TAC_ACCT:
+
default:
minor = 0;
 break;
@@ -967,6 +969,23 @@ tac_create_author(struct tac_handle *h, 
return 0;
 }
 
+int
+tac_create_acct(struct tac_handle *h, int acct, int action, int type, int 
service)
+{
+   struct tac_acct_start *as;
+
+   create_msg(h, TAC_ACCT, action, type);
+
+   as = &h->request.u.acct_start;
+   as->action = acct;
+   as->authen_action = action;
+   as->priv_lvl = TAC_PRIV_LVL_USER;
+   as->authen_type = type;
+   as->authen_service = service;
+
+   return 0;
+}
+
 static void
 create_msg(struct tac_handle *h, int msg_type, int var, int type)
 {
@@ -1158,6 +1177,49 @@ tac_send_author(struct tac_handle *h)
 }
 
 int
+tac_send_acct(struct tac_handle *h)
+{
+   register int i, current;
+   struct tac_acct_start *as = &h->request.u.acct_start;
+   struct tac_acct_reply *ar = &h->response.u.acct_reply;
+
+   /* start */
+   as = &h->request.u.acct_start;
+   h->request.length = htonl(offsetof(struct tac_acct_start, rest[0]));
+   for (as->av_cnt = 0, i = 0; i < MAXAVPAIRS; i++)
+   if (h->avs[i].len && h->avs[i].data)
+   as->av_cnt++;
+   h->request.length = ntohl(htonl(h->request.length) + as->av_cnt);
+
+   if (add_str_8(h, &as->user_len, &h->user) == -1 ||
+   add_str_8(h, &as->port_len, &h->port) == -1 ||
+   add_str_8(h, &as->rem_addr_len, &h->rem_addr) == -1)
+   return -1;
+
+   for (i = current = 0; i < MAXAVPAIRS; i++)
+