From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 07:02:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D19251065673; Sun, 4 Apr 2010 07:02:10 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18DA8FC16; Sun, 4 Apr 2010 07:02:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3472Aid031485; Sun, 4 Apr 2010 07:02:10 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3472AZW031483; Sun, 4 Apr 2010 07:02:10 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004040702.o3472AZW031483@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 4 Apr 2010 07:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206152 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 07:02:10 -0000 Author: ume Date: Sun Apr 4 07:02:10 2010 New Revision: 206152 URL: http://svn.freebsd.org/changeset/base/206152 Log: Stop adding trailing '\n'. The servent_unpack() doesn't expect lines terminated with '\n'. MFC after: 2 weeks Modified: head/lib/libc/net/getservent.c Modified: head/lib/libc/net/getservent.c ============================================================================== --- head/lib/libc/net/getservent.c Sat Apr 3 23:51:41 2010 (r206151) +++ head/lib/libc/net/getservent.c Sun Apr 4 07:02:10 2010 (r206152) @@ -594,15 +594,13 @@ nis_servent(void *retval, void *mdata, v break; }; - /* we need a room for additional \n symbol */ - if (bufsize <= - resultbuflen + 1 + _ALIGNBYTES + sizeof(char *)) { + if (bufsize <= resultbuflen + _ALIGNBYTES + sizeof(char *)) { *errnop = ERANGE; rv = NS_RETURN; break; } - aliases = (char **)_ALIGN(&buffer[resultbuflen + 2]); + aliases = (char **)_ALIGN(&buffer[resultbuflen + 1]); aliases_size = (buffer + bufsize - (char *)aliases) / sizeof(char *); if (aliases_size < 1) { @@ -611,13 +609,8 @@ nis_servent(void *retval, void *mdata, v break; } - /* - * servent_unpack expects lines terminated with \n -- - * make it happy - */ memcpy(buffer, resultbuf, resultbuflen); - buffer[resultbuflen] = '\n'; - buffer[resultbuflen + 1] = '\0'; + buffer[resultbuflen] = '\0'; if (servent_unpack(buffer, serv, aliases, aliases_size, errnop) != 0) { From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 07:21:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B3B0106566B; Sun, 4 Apr 2010 07:21:46 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2D18FC20; Sun, 4 Apr 2010 07:21:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o347Lj9n035756; Sun, 4 Apr 2010 07:21:45 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o347Ljrx035754; Sun, 4 Apr 2010 07:21:45 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004040721.o347Ljrx035754@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 4 Apr 2010 07:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206153 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 07:21:46 -0000 Author: ume Date: Sun Apr 4 07:21:45 2010 New Revision: 206153 URL: http://svn.freebsd.org/changeset/base/206153 Log: Treat '+' as special only when in compat mode, and simplify the logic bit. MFC after: 2 weeks Modified: head/lib/libc/net/getservent.c Modified: head/lib/libc/net/getservent.c ============================================================================== --- head/lib/libc/net/getservent.c Sun Apr 4 07:02:10 2010 (r206152) +++ head/lib/libc/net/getservent.c Sun Apr 4 07:21:45 2010 (r206153) @@ -315,28 +315,8 @@ files_servent(void *retval, void *mdata, break; } - if (*line=='+') { - if (serv_mdata->compat_mode != 0) - st->compat_mode_active = 1; - } else { - if (bufsize <= linesize + _ALIGNBYTES + - sizeof(char *)) { - *errnop = ERANGE; - rv = NS_RETURN; - break; - } - aliases = (char **)_ALIGN(&buffer[linesize+1]); - aliases_size = (buffer + bufsize - - (char *)aliases) / sizeof(char *); - if (aliases_size < 1) { - *errnop = ERANGE; - rv = NS_RETURN; - break; - } - - memcpy(buffer, line, linesize); - buffer[linesize] = '\0'; - } + if (*line=='+' && serv_mdata->compat_mode != 0) + st->compat_mode_active = 1; } if (st->compat_mode_active != 0) { @@ -367,6 +347,23 @@ files_servent(void *retval, void *mdata, continue; } + if (bufsize <= linesize + _ALIGNBYTES + sizeof(char *)) { + *errnop = ERANGE; + rv = NS_RETURN; + break; + } + aliases = (char **)_ALIGN(&buffer[linesize + 1]); + aliases_size = (buffer + bufsize - + (char *)aliases) / sizeof(char *); + if (aliases_size < 1) { + *errnop = ERANGE; + rv = NS_RETURN; + break; + } + + memcpy(buffer, line, linesize); + buffer[linesize] = '\0'; + rv = servent_unpack(buffer, serv, aliases, aliases_size, errnop); if (rv !=0 ) { From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 07:31:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A9C01065672; Sun, 4 Apr 2010 07:31:11 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A45A8FC20; Sun, 4 Apr 2010 07:31:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o347VBBO037867; Sun, 4 Apr 2010 07:31:11 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o347VBgt037865; Sun, 4 Apr 2010 07:31:11 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004040731.o347VBgt037865@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 4 Apr 2010 07:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206154 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 07:31:11 -0000 Author: ume Date: Sun Apr 4 07:31:10 2010 New Revision: 206154 URL: http://svn.freebsd.org/changeset/base/206154 Log: Reduce duplicate code. MFC after: 2 weeks Modified: head/lib/libc/net/getservent.c Modified: head/lib/libc/net/getservent.c ============================================================================== --- head/lib/libc/net/getservent.c Sun Apr 4 07:21:45 2010 (r206153) +++ head/lib/libc/net/getservent.c Sun Apr 4 07:31:10 2010 (r206154) @@ -207,6 +207,32 @@ servent_unpack(char *p, struct servent * return 0; } +static int +parse_result(struct servent *serv, char *buffer, size_t bufsize, + char *resultbuf, size_t resultbuflen, int *errnop) +{ + char **aliases; + int aliases_size; + + if (bufsize <= resultbuflen + _ALIGNBYTES + sizeof(char *)) { + *errnop = ERANGE; + return (NS_RETURN); + } + aliases = (char **)_ALIGN(&buffer[resultbuflen + 1]); + aliases_size = (buffer + bufsize - (char *)aliases) / sizeof(char *); + if (aliases_size < 1) { + *errnop = ERANGE; + return (NS_RETURN); + } + + memcpy(buffer, resultbuf, resultbuflen); + buffer[resultbuflen] = '\0'; + + if (servent_unpack(buffer, serv, aliases, aliases_size, errnop) != 0) + return ((*errnop == 0) ? NS_NOTFOUND : NS_RETURN); + return (NS_SUCCESS); +} + /* files backend implementation */ static void files_endstate(void *p) @@ -258,8 +284,6 @@ files_servent(void *retval, void *mdata, size_t bufsize; int *errnop; - char **aliases; - int aliases_size; size_t linesize; char *line; char **cp; @@ -347,35 +371,12 @@ files_servent(void *retval, void *mdata, continue; } - if (bufsize <= linesize + _ALIGNBYTES + sizeof(char *)) { - *errnop = ERANGE; - rv = NS_RETURN; - break; - } - aliases = (char **)_ALIGN(&buffer[linesize + 1]); - aliases_size = (buffer + bufsize - - (char *)aliases) / sizeof(char *); - if (aliases_size < 1) { - *errnop = ERANGE; - rv = NS_RETURN; - break; - } - - memcpy(buffer, line, linesize); - buffer[linesize] = '\0'; - - rv = servent_unpack(buffer, serv, aliases, aliases_size, + rv = parse_result(serv, buffer, bufsize, line, linesize, errnop); - if (rv !=0 ) { - if (*errnop == 0) { - rv = NS_NOTFOUND; - continue; - } - else { - rv = NS_RETURN; - break; - } - } + if (rv == NS_NOTFOUND) + continue; + if (rv == NS_RETURN) + break; rv = NS_NOTFOUND; switch (serv_mdata->how) { @@ -483,9 +484,6 @@ nis_servent(void *retval, void *mdata, v size_t bufsize; int *errnop; - char **aliases; - int aliases_size; - name = NULL; proto = NULL; how = (enum nss_lookup_type)mdata; @@ -591,32 +589,8 @@ nis_servent(void *retval, void *mdata, v break; }; - if (bufsize <= resultbuflen + _ALIGNBYTES + sizeof(char *)) { - *errnop = ERANGE; - rv = NS_RETURN; - break; - } - - aliases = (char **)_ALIGN(&buffer[resultbuflen + 1]); - aliases_size = - (buffer + bufsize - (char *)aliases) / sizeof(char *); - if (aliases_size < 1) { - *errnop = ERANGE; - rv = NS_RETURN; - break; - } - - memcpy(buffer, resultbuf, resultbuflen); - buffer[resultbuflen] = '\0'; - - if (servent_unpack(buffer, serv, aliases, aliases_size, - errnop) != 0) { - if (*errnop == 0) - rv = NS_NOTFOUND; - else - rv = NS_RETURN; - } else - rv = NS_SUCCESS; + rv = parse_result(serv, buffer, bufsize, resultbuf, + resultbuflen, errnop); free(resultbuf); } while (!(rv & NS_TERMINATE) && how == nss_lt_all); From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 08:31:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17580106566C; Sun, 4 Apr 2010 08:31:04 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04B898FC0A; Sun, 4 Apr 2010 08:31:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o348V3U1050951; Sun, 4 Apr 2010 08:31:03 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o348V3EQ050944; Sun, 4 Apr 2010 08:31:03 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004040831.o348V3EQ050944@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 4 Apr 2010 08:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206155 - in head: include lib/libc/net share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 08:31:04 -0000 Author: ume Date: Sun Apr 4 08:31:03 2010 New Revision: 206155 URL: http://svn.freebsd.org/changeset/base/206155 Log: Add capability to use a db version of services. It is enabled by specifying `db' as source of service in /etc/nsswitch.conf. MFC after: 2 weeks Modified: head/include/netdb.h head/include/nsswitch.h head/lib/libc/net/getservent.c head/lib/libc/net/nsdispatch.3 head/share/man/man5/nsswitch.conf.5 head/share/man/man5/services.5 Modified: head/include/netdb.h ============================================================================== --- head/include/netdb.h Sun Apr 4 07:31:10 2010 (r206154) +++ head/include/netdb.h Sun Apr 4 08:31:03 2010 (r206155) @@ -82,6 +82,7 @@ typedef __uint32_t uint32_t; #define _PATH_NETWORKS "/etc/networks" #define _PATH_PROTOCOLS "/etc/protocols" #define _PATH_SERVICES "/etc/services" +#define _PATH_SERVICES_DB "/var/db/services.db" #define h_errno (*__h_errno()) Modified: head/include/nsswitch.h ============================================================================== --- head/include/nsswitch.h Sun Apr 4 07:31:10 2010 (r206154) +++ head/include/nsswitch.h Sun Apr 4 08:31:03 2010 (r206155) @@ -58,6 +58,7 @@ * currently implemented sources */ #define NSSRC_FILES "files" /* local files */ +#define NSSRC_DB "db" /* database */ #define NSSRC_DNS "dns" /* DNS; IN for hosts, HS for others */ #define NSSRC_NIS "nis" /* YP/NIS */ #define NSSRC_COMPAT "compat" /* passwd,group in YP compat mode */ Modified: head/lib/libc/net/getservent.c ============================================================================== --- head/lib/libc/net/getservent.c Sun Apr 4 07:31:10 2010 (r206154) +++ head/lib/libc/net/getservent.c Sun Apr 4 08:31:03 2010 (r206155) @@ -37,7 +37,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include @@ -94,6 +96,19 @@ NSS_TLS_HANDLING(files); static int files_servent(void *, void *, va_list); static int files_setservent(void *, void *, va_list); +/* db backend declarations */ +struct db_state +{ + DB *db; + int stayopen; + int keynum; +}; +static void db_endstate(void *); +NSS_TLS_HANDLING(db); + +static int db_servent(void *, void *, va_list); +static int db_setservent(void *, void *, va_list); + #ifdef YP /* nis backend declarations */ static int nis_servent(void *, void *, va_list); @@ -263,6 +278,8 @@ files_servent(void *retval, void *mdata, { NULL, 0 } }; ns_dtab compat_dtab[] = { + { NSSRC_DB, db_servent, + (void *)((struct servent_mdata *)mdata)->how }, #ifdef YP { NSSRC_NIS, nis_servent, (void *)((struct servent_mdata *)mdata)->how }, @@ -452,6 +469,185 @@ files_setservent(void *retval, void *mda return (NS_UNAVAIL); } +/* db backend implementation */ +static void +db_endstate(void *p) +{ + DB *db; + + if (p == NULL) + return; + + db = ((struct db_state *)p)->db; + if (db != NULL) + db->close(db); + + free(p); +} + +static int +db_servent(void *retval, void *mdata, va_list ap) +{ + char buf[BUFSIZ]; + DBT key, data; + DB *db; + + char *resultbuf; + + struct db_state *st; + int rv; + int stayopen; + + enum nss_lookup_type how; + char *name; + char *proto; + int port; + + struct servent *serv; + char *buffer; + size_t bufsize; + int *errnop; + + name = NULL; + proto = NULL; + how = (enum nss_lookup_type)mdata; + switch (how) { + case nss_lt_name: + name = va_arg(ap, char *); + proto = va_arg(ap, char *); + break; + case nss_lt_id: + port = va_arg(ap, int); + proto = va_arg(ap, char *); + break; + case nss_lt_all: + break; + default: + return NS_NOTFOUND; + }; + + serv = va_arg(ap, struct servent *); + buffer = va_arg(ap, char *); + bufsize = va_arg(ap, size_t); + errnop = va_arg(ap,int *); + + *errnop = db_getstate(&st); + if (*errnop != 0) + return (NS_UNAVAIL); + + if (how == nss_lt_all && st->keynum < 0) + return (NS_NOTFOUND); + + if (st->db == NULL) { + st->db = dbopen(_PATH_SERVICES_DB, O_RDONLY, 0, DB_HASH, NULL); + if (st->db == NULL) { + *errnop = errno; + return (NS_UNAVAIL); + } + } + + stayopen = (how == nss_lt_all) ? 1 : st->stayopen; + db = st->db; + + do { + switch (how) { + case nss_lt_name: + key.data = buf; + if (proto == NULL) + key.size = snprintf(buf, sizeof(buf), + "\376%s", name); + else + key.size = snprintf(buf, sizeof(buf), + "\376%s/%s", name, proto); + key.size++; + if (db->get(db, &key, &data, 0) != 0 || + db->get(db, &data, &key, 0) != 0) { + rv = NS_NOTFOUND; + goto db_fin; + } + resultbuf = key.data; + break; + case nss_lt_id: + key.data = buf; + port = htons(port); + if (proto == NULL) + key.size = snprintf(buf, sizeof(buf), + "\377%d", port); + else + key.size = snprintf(buf, sizeof(buf), + "\377%d/%s", port, proto); + key.size++; + if (db->get(db, &key, &data, 0) != 0 || + db->get(db, &data, &key, 0) != 0) { + rv = NS_NOTFOUND; + goto db_fin; + } + resultbuf = key.data; + break; + case nss_lt_all: + key.data = buf; + key.size = snprintf(buf, sizeof(buf), "%d", + st->keynum++); + key.size++; + if (db->get(db, &key, &data, 0) != 0) { + st->keynum = -1; + rv = NS_NOTFOUND; + goto db_fin; + } + resultbuf = data.data; + break; + } + + rv = parse_result(serv, buffer, bufsize, resultbuf, + strlen(resultbuf), errnop); + + } while (!(rv & NS_TERMINATE) && how == nss_lt_all); + +db_fin: + if (!stayopen && st->db != NULL) { + db->close(db); + st->db = NULL; + } + + if (rv == NS_SUCCESS && retval != NULL) + *(struct servent **)retval = serv; + + return (rv); +} + +static int +db_setservent(void *retval, void *mdata, va_list ap) +{ + DB *db; + struct db_state *st; + int rv; + int f; + + rv = db_getstate(&st); + if (rv != 0) + return (NS_UNAVAIL); + + switch ((enum constants)mdata) { + case SETSERVENT: + f = va_arg(ap, int); + st->stayopen |= f; + st->keynum = 0; + break; + case ENDSERVENT: + db = st->db; + if (db != NULL) { + db->close(db); + st->db = NULL; + } + st->stayopen = 0; + break; + default: + break; + }; + + return (NS_UNAVAIL); +} + /* nis backend implementation */ #ifdef YP static void @@ -638,6 +834,7 @@ compat_setservent(void *retval, void *md { NULL, 0 } }; ns_dtab compat_dtab[] = { + { NSSRC_DB, db_setservent, mdata }, #ifdef YP { NSSRC_NIS, nis_setservent, mdata }, #endif @@ -924,6 +1121,7 @@ getservbyname_r(const char *name, const #endif /* NS_CACHING */ static const ns_dtab dtab[] = { { NSSRC_FILES, files_servent, (void *)&mdata }, + { NSSRC_DB, db_servent, (void *)nss_lt_name }, #ifdef YP { NSSRC_NIS, nis_servent, (void *)nss_lt_name }, #endif @@ -960,6 +1158,7 @@ getservbyport_r(int port, const char *pr #endif static const ns_dtab dtab[] = { { NSSRC_FILES, files_servent, (void *)&mdata }, + { NSSRC_DB, db_servent, (void *)nss_lt_id }, #ifdef YP { NSSRC_NIS, nis_servent, (void *)nss_lt_id }, #endif @@ -995,6 +1194,7 @@ getservent_r(struct servent *serv, char #endif static const ns_dtab dtab[] = { { NSSRC_FILES, files_servent, (void *)&mdata }, + { NSSRC_DB, db_servent, (void *)nss_lt_all }, #ifdef YP { NSSRC_NIS, nis_servent, (void *)nss_lt_all }, #endif @@ -1027,6 +1227,7 @@ setservent(int stayopen) #endif static const ns_dtab dtab[] = { { NSSRC_FILES, files_setservent, (void *)SETSERVENT }, + { NSSRC_DB, db_setservent, (void *)SETSERVENT }, #ifdef YP { NSSRC_NIS, nis_setservent, (void *)SETSERVENT }, #endif @@ -1051,6 +1252,7 @@ endservent() #endif static const ns_dtab dtab[] = { { NSSRC_FILES, files_setservent, (void *)ENDSERVENT }, + { NSSRC_DB, db_setservent, (void *)ENDSERVENT }, #ifdef YP { NSSRC_NIS, nis_setservent, (void *)ENDSERVENT }, #endif Modified: head/lib/libc/net/nsdispatch.3 ============================================================================== --- head/lib/libc/net/nsdispatch.3 Sun Apr 4 07:31:10 2010 (r206154) +++ head/lib/libc/net/nsdispatch.3 Sun Apr 4 08:31:03 2010 (r206155) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 2007 +.Dd April 4, 2010 .Dt NSDISPATCH 3 .Os .Sh NAME @@ -176,6 +176,7 @@ While there is support for arbitrary sou .Bl -column NSSRC_COMPAT compat -offset indent .It Sy "#define value" .It Dv NSSRC_FILES Ta """files"" +.It Dv NSSRC_DB Ta """db"" .It Dv NSSRC_DNS Ta """dns"" .It Dv NSSRC_NIS Ta """nis"" .It Dv NSSRC_COMPAT Ta """compat"" Modified: head/share/man/man5/nsswitch.conf.5 ============================================================================== --- head/share/man/man5/nsswitch.conf.5 Sun Apr 4 07:31:10 2010 (r206154) +++ head/share/man/man5/nsswitch.conf.5 Sun Apr 4 08:31:03 2010 (r206155) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 23, 2008 +.Dd April 4, 2010 .Dt NSSWITCH.CONF 5 .Os .Sh NAME @@ -72,6 +72,8 @@ Local files, such as .Pa /etc/hosts , and .Pa /etc/passwd . +.It db +Local database. .It dns Internet Domain Name System. .Dq hosts Modified: head/share/man/man5/services.5 ============================================================================== --- head/share/man/man5/services.5 Sun Apr 4 07:31:10 2010 (r206154) +++ head/share/man/man5/services.5 Sun Apr 4 08:31:03 2010 (r206155) @@ -32,7 +32,7 @@ .\" @(#)services.5 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd April 4, 2010 .Dt SERVICES 5 .Os .Sh NAME @@ -65,6 +65,18 @@ not interpreted by the routines which se Service names may contain any printable character other than a field delimiter, newline, or comment character. +.Pp +If +.Dq db +is specified as source in the +.Xr nsswitch.conf 5 , +.Pa /var/db/services.db +is searched. +The database in +.Pa /var/db/services.db +needs to be updated with +.Xr services_mkdb 8 +after changes to the services file have been applied. .Sh NIS INTERACTION Access to the NIS .Pa services.byname @@ -84,6 +96,8 @@ file resides in .El .Sh SEE ALSO .Xr getservent 3 +.Xr nsswitch.conf 5 +.Xr services_mkdb 8 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 08:38:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BEED1065674; Sun, 4 Apr 2010 08:38:14 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68E7A8FC2D; Sun, 4 Apr 2010 08:38:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o348cEWu052565; Sun, 4 Apr 2010 08:38:14 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o348cE2p052559; Sun, 4 Apr 2010 08:38:14 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004040838.o348cE2p052559@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 4 Apr 2010 08:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206156 - in head/usr.sbin: . services_mkdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 08:38:14 -0000 Author: ume Date: Sun Apr 4 08:38:14 2010 New Revision: 206156 URL: http://svn.freebsd.org/changeset/base/206156 Log: services_mkdb; generate db file from services(5) to increase speed of getserv*() Obtained from: NetBSD MFC after: 2 weeks Added: head/usr.sbin/services_mkdb/ head/usr.sbin/services_mkdb/Makefile (contents, props changed) head/usr.sbin/services_mkdb/services_mkdb.8 (contents, props changed) head/usr.sbin/services_mkdb/services_mkdb.c (contents, props changed) head/usr.sbin/services_mkdb/uniq.c (contents, props changed) Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Sun Apr 4 08:31:03 2010 (r206155) +++ head/usr.sbin/Makefile Sun Apr 4 08:38:14 2010 (r206156) @@ -167,6 +167,7 @@ SUBDIR= ${_ac} \ ${_sade} \ ${_sendmail} \ service \ + services_mkdb \ setfib \ setfmac \ setpmac \ Added: head/usr.sbin/services_mkdb/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/services_mkdb/Makefile Sun Apr 4 08:38:14 2010 (r206156) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +PROG= services_mkdb +MAN= services_mkdb.8 +SRCS= services_mkdb.c uniq.c + +DPADD+= ${LIBUTIL} +LDADD+= -lutil + +.include Added: head/usr.sbin/services_mkdb/services_mkdb.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/services_mkdb/services_mkdb.8 Sun Apr 4 08:38:14 2010 (r206156) @@ -0,0 +1,97 @@ +.\" $NetBSD: services_mkdb.8,v 1.9 2009/05/13 22:36:39 wiz Exp $ +.\" +.\" Copyright (c) 1999 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Luke Mewburn. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd April 4, 2010 +.Dt SERVICES_MKDB 8 +.Os +.Sh NAME +.Nm services_mkdb +.Nd generate the services databases +.Sh SYNOPSIS +.Nm +.Op Fl q +.Op Fl o Ar database +.Op file +.Nm +.Fl u +.Op file +.Sh DESCRIPTION +.Nm +creates a +.Xr db 3 +database for the specified file. +If no file is specified, then +.Pa /etc/services +is used. +The database is installed into +.Pa /var/db/services.db . +The file must be in the correct format (see +.Xr services 5 ) . +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl o Ar database +Put the output databases in the named file. +.It Fl q +Don't warn about duplicate services. +.It Fl u +Print the services file to stdout, omitting duplicate entries and comments. +.El +.Pp +The databases are used by the C library services routines (see +.Xr getservent 3 ) . +.Pp +.Nm +exits zero on success, non-zero on failure. +.Sh FILES +.Bl -tag -width 24n -compact +.It Pa /var/db/services.db +The current services database. +.It Pa /var/db/services.db.tmp +A temporary file. +.It Pa /etc/services +The current services file. +.El +.Sh SEE ALSO +.Xr db 3 , +.Xr getservent 3 , +.Xr services 5 +.Sh BUGS +Because +.Nm +guarantees not to install a partial destination file it must +build a temporary file in the same file system and if successful use +.Xr rename 2 +to install over the destination file. +.Pp +If +.Nm +fails it will leave the previous version of the destination file intact. Added: head/usr.sbin/services_mkdb/services_mkdb.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/services_mkdb/services_mkdb.c Sun Apr 4 08:38:14 2010 (r206156) @@ -0,0 +1,428 @@ +/* $NetBSD: services_mkdb.c,v 1.14 2008/04/28 20:24:17 martin Exp $ */ + +/*- + * Copyright (c) 1999 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Luke Mewburn and Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static char tname[MAXPATHLEN]; + +#define PMASK 0xffff +#define PROTOMAX 5 + +extern void uniq(const char *); + +static void add(DB *, StringList *, size_t, const char *, size_t *, int); +static StringList ***parseservices(const char *, StringList *); +static void cleanup(void); +static void store(DB *, DBT *, DBT *, int); +static void killproto(DBT *); +static char *getstring(const char *, size_t, char **, const char *); +static size_t getprotoindex(StringList *, const char *); +static const char *getprotostr(StringList *, size_t); +static const char *mkaliases(StringList *, char *, size_t); +static void usage(void); + +const HASHINFO hinfo = { + .bsize = 256, + .ffactor = 4, + .nelem = 32768, + .cachesize = 1024, + .hash = NULL, + .lorder = 0 +}; + + +int +main(int argc, char *argv[]) +{ + DB *db; + int ch; + const char *fname = _PATH_SERVICES; + const char *dbname = _PATH_SERVICES_DB; + int warndup = 1; + int unique = 0; + int otherflag = 0; + size_t cnt = 0; + StringList *sl, ***svc; + size_t port, proto; + + setprogname(argv[0]); + + while ((ch = getopt(argc, argv, "qo:u")) != -1) + switch (ch) { + case 'q': + otherflag = 1; + warndup = 0; + break; + case 'o': + otherflag = 1; + dbname = optarg; + break; + case 'u': + unique++; + break; + case '?': + default: + usage(); + } + + argc -= optind; + argv += optind; + + if (argc > 1 || (unique && otherflag)) + usage(); + if (argc == 1) + fname = argv[0]; + + if (unique) + uniq(fname); + + svc = parseservices(fname, sl = sl_init()); + + if (atexit(cleanup)) + err(1, "Cannot install exit handler"); + + (void)snprintf(tname, sizeof(tname), "%s.tmp", dbname); + db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL, + (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH), DB_HASH, &hinfo); + if (!db) + err(1, "Error opening temporary database `%s'", tname); + + + for (port = 0; port < PMASK + 1; port++) { + if (svc[port] == NULL) + continue; + + for (proto = 0; proto < PROTOMAX; proto++) { + StringList *s; + if ((s = svc[port][proto]) == NULL) + continue; + add(db, s, port, getprotostr(sl, proto), &cnt, warndup); + } + + free(svc[port]); + } + + free(svc); + sl_free(sl, 1); + + if ((db->close)(db)) + err(1, "Error closing temporary database `%s'", tname); + + if (rename(tname, dbname) == -1) + err(1, "Cannot rename `%s' to `%s'", tname, dbname); + + return 0; +} + +static void +add(DB *db, StringList *sl, size_t port, const char *proto, size_t *cnt, + int warndup) +{ + size_t i; + char keyb[BUFSIZ], datab[BUFSIZ], abuf[BUFSIZ]; + DBT data, key; + key.data = keyb; + data.data = datab; + +#ifdef DEBUG + (void)printf("add %s %zu %s [ ", sl->sl_str[0], port, proto); + for (i = 1; i < sl->sl_cur; i++) + (void)printf("%s ", sl->sl_str[i]); + (void)printf("]\n"); +#endif + + /* key `indirect key', data `full line' */ + data.size = snprintf(datab, sizeof(datab), "%zu", (*cnt)++) + 1; + key.size = snprintf(keyb, sizeof(keyb), "%s %zu/%s %s", + sl->sl_str[0], port, proto, mkaliases(sl, abuf, sizeof(abuf))) + 1; + store(db, &data, &key, warndup); + + /* key `\377port/proto', data = `indirect key' */ + key.size = snprintf(keyb, sizeof(keyb), "\377%zu/%s", + port, proto) + 1; + store(db, &key, &data, warndup); + + /* key `\377port', data = `indirect key' */ + killproto(&key); + store(db, &key, &data, warndup); + + /* add references for service and all aliases */ + for (i = 0; i < sl->sl_cur; i++) { + /* key `\376service/proto', data = `indirect key' */ + key.size = snprintf(keyb, sizeof(keyb), "\376%s/%s", + sl->sl_str[i], proto) + 1; + store(db, &key, &data, warndup); + + /* key `\376service', data = `indirect key' */ + killproto(&key); + store(db, &key, &data, warndup); + } + sl_free(sl, 1); +} + +static StringList *** +parseservices(const char *fname, StringList *sl) +{ + size_t len, line, pindex; + FILE *fp; + StringList ***svc, *s; + char *p, *ep; + + if ((fp = fopen(fname, "r")) == NULL) + err(1, "Cannot open `%s'", fname); + + line = 0; + if ((svc = calloc(PMASK + 1, sizeof(StringList **))) == NULL) + err(1, "Cannot allocate %zu bytes", PMASK + 1); + + /* XXX: change NULL to "\0\0#" when fparseln fixed */ + for (; (p = fparseln(fp, &len, &line, NULL, 0)) != NULL; free(p)) { + char *name, *port, *proto, *aliases, *cp, *alias; + unsigned long pnum; + + if (len == 0) + continue; + + for (cp = p; *cp && isspace((unsigned char)*cp); cp++) + continue; + + if (*cp == '\0' || *cp == '#') + continue; + + if ((name = getstring(fname, line, &cp, "name")) == NULL) + continue; + + if ((port = getstring(fname, line, &cp, "port")) == NULL) + continue; + + if (cp) { + for (aliases = cp; *cp && *cp != '#'; cp++) + continue; + + if (*cp) + *cp = '\0'; + } else + aliases = NULL; + + proto = strchr(port, '/'); + if (proto == NULL || proto[1] == '\0') { + warnx("%s, %zu: no protocol found", fname, line); + continue; + } + *proto++ = '\0'; + + errno = 0; + pnum = strtoul(port, &ep, 0); + if (*port == '\0' || *ep != '\0') { + warnx("%s, %zu: invalid port `%s'", fname, line, port); + continue; + } + if ((errno == ERANGE && pnum == ULONG_MAX) || pnum > PMASK) { + warnx("%s, %zu: port too big `%s'", fname, line, port); + continue; + } + + if (svc[pnum] == NULL) { + svc[pnum] = calloc(PROTOMAX, sizeof(StringList *)); + if (svc[pnum] == NULL) + err(1, "Cannot allocate %zu bytes", PROTOMAX); + } + + pindex = getprotoindex(sl, proto); + if (svc[pnum][pindex] == NULL) + s = svc[pnum][pindex] = sl_init(); + else + s = svc[pnum][pindex]; + + /* build list of aliases */ + if (sl_find(s, name) == NULL) { + char *p; + + if ((p = strdup(name)) == NULL) + err(1, "Cannot copy string"); + (void)sl_add(s, p); + } + + if (aliases) { + while ((alias = strsep(&aliases, " \t")) != NULL) { + if (alias[0] == '\0') + continue; + if (sl_find(s, alias) == NULL) { + char *p; + + if ((p = strdup(alias)) == NULL) + err(1, "Cannot copy string"); + (void)sl_add(s, p); + } + } + } + } + (void)fclose(fp); + return svc; +} + +/* + * cleanup(): Remove temporary files upon exit + */ +static void +cleanup(void) +{ + if (tname[0]) + (void)unlink(tname); +} + +static char * +getstring(const char *fname, size_t line, char **cp, const char *tag) +{ + char *str; + + while ((str = strsep(cp, " \t")) != NULL && *str == '\0') + continue; + + if (str == NULL) + warnx("%s, %zu: no %s found", fname, line, tag); + + return str; +} + +static void +killproto(DBT *key) +{ + char *p, *d = key->data; + + if ((p = strchr(d, '/')) == NULL) + abort(); + *p++ = '\0'; + key->size = p - d; +} + +static void +store(DB *db, DBT *key, DBT *data, int warndup) +{ +#ifdef DEBUG + int k = key->size - 1; + int d = data->size - 1; + (void)printf("store [%*.*s] [%*.*s]\n", + k, k, (char *)key->data + 1, + d, d, (char *)data->data + 1); +#endif + switch ((db->put)(db, key, data, R_NOOVERWRITE)) { + case 0: + break; + case 1: + if (warndup) + warnx("duplicate service `%s'", + &((char *)key->data)[1]); + break; + case -1: + err(1, "put"); + break; + default: + abort(); + break; + } +} + +static size_t +getprotoindex(StringList *sl, const char *str) +{ + size_t i; + char *p; + + for (i= 0; i < sl->sl_cur; i++) + if (strcmp(sl->sl_str[i], str) == 0) + return i; + + if (i == PROTOMAX) + errx(1, "Ran out of protocols adding `%s';" + " recompile with larger PROTOMAX", str); + if ((p = strdup(str)) == NULL) + err(1, "Cannot copy string"); + (void)sl_add(sl, p); + return i; +} + +static const char * +getprotostr(StringList *sl, size_t i) +{ + assert(i < sl->sl_cur); + return sl->sl_str[i]; +} + +static const char * +mkaliases(StringList *sl, char *buf, size_t len) +{ + size_t nc, i, pos; + + buf[0] = 0; + for (i = 1, pos = 0; i < sl->sl_cur; i++) { + nc = strlcpy(buf + pos, sl->sl_str[i], len); + if (nc >= len) + goto out; + pos += nc; + len -= nc; + nc = strlcpy(buf + pos, " ", len); + if (nc >= len) + goto out; + pos += nc; + len -= nc; + } + return buf; +out: + warn("aliases for `%s' truncated", sl->sl_str[0]); + return buf; +} + +static void +usage(void) +{ + (void)fprintf(stderr, "Usage:\t%s [-q] [-o ] []\n" + "\t%s -u []\n", getprogname(), getprogname()); + exit(1); +} Added: head/usr.sbin/services_mkdb/uniq.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/services_mkdb/uniq.c Sun Apr 4 08:38:14 2010 (r206156) @@ -0,0 +1,159 @@ +/* $NetBSD: uniq.c,v 1.4 2008/04/28 20:24:17 martin Exp $ */ + +/*- + * Copyright (c) 2007 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +extern const HASHINFO hinfo; + +void uniq(const char *); +static int comp(const char *, char **, size_t *); + +/* + * Preserve only unique content lines in a file. Input lines that have + * content [alphanumeric characters before a comment] are white-space + * normalized and have their comments removed. Then they are placed + * in a hash table, and only the first instance of them is printed. + * Comment lines without any alphanumeric content are always printed + * since they are there to make the file "pretty". Comment lines with + * alphanumeric content are also placed into the hash table and only + * printed once. + */ +void +uniq(const char *fname) +{ + DB *db; + DBT key; + static const DBT data = { NULL, 0 }; + FILE *fp; + char *line; + size_t len; + + if ((db = dbopen(NULL, O_RDWR, 0, DB_HASH, &hinfo)) == NULL) + err(1, "Cannot create in memory database"); + + if ((fp = fopen(fname, "r")) == NULL) + err(1, "Cannot open `%s'", fname); + while ((line = fgetln(fp, &len)) != NULL) { + size_t complen = len; + char *compline; + if (!comp(line, &compline, &complen)) { + (void)fprintf(stdout, "%*.*s", (int)len, (int)len, + line); + continue; + } + key.data = compline; + key.size = complen; + switch ((db->put)(db, &key, &data, R_NOOVERWRITE)) { + case 0: + (void)fprintf(stdout, "%*.*s", (int)len, (int)len, + line); + break; + case 1: + break; + case -1: + err(1, "put"); + default: + abort(); + break; + } + } + (void)fflush(stdout); + exit(0); +} + +/* + * normalize whitespace in the original line and place a new string + * with whitespace converted to a single space in compline. If the line + * contains just comments, we preserve them. If it contains data and + * comments, we kill the comments. Return 1 if the line had actual + * contents, or 0 if it was just a comment without alphanumeric characters. + */ +static int +comp(const char *origline, char **compline, size_t *len) +{ + const unsigned char *p; + unsigned char *q; + char *cline; + size_t l = *len, complen; + int hasalnum, iscomment; + + /* Eat leading space */ + for (p = (const unsigned char *)origline; l && *p && isspace(*p); + p++, l--) + continue; + if ((cline = malloc(l + 1)) == NULL) + err(1, "Cannot allocate %zu bytes", l + 1); + (void)memcpy(cline, p, l); + cline[l] = '\0'; + if (*cline == '\0') + return 0; + + complen = 0; + hasalnum = 0; + iscomment = 0; + + for (q = (unsigned char *)cline; l && *p; p++, l--) { + if (isspace(*p)) { + if (complen && isspace(q[-1])) + continue; + *q++ = ' '; + complen++; + } else { + if (!iscomment && *p == '#') { + if (hasalnum) + break; + iscomment = 1; + } else + hasalnum |= isalnum(*p); + *q++ = *p; + complen++; + } + } + + /* Eat trailing space */ + while (complen && isspace(q[-1])) { + --q; + --complen; + } + *q = '\0'; + *compline = cline; + *len = complen; + return hasalnum; +} From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 11:23:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D52A106564A; Sun, 4 Apr 2010 11:23:42 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (core.vx.sk [188.40.32.143]) by mx1.freebsd.org (Postfix) with ESMTP id 466928FC16; Sun, 4 Apr 2010 11:23:41 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.1]) by mail.vx.sk (Postfix) with ESMTP id 9D7FE8147E; Sun, 4 Apr 2010 13:23:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk ([127.0.0.1]) by core.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oeEb5brJKUWi; Sun, 4 Apr 2010 13:23:38 +0200 (CEST) Received: from [10.9.8.1] (chello089173000055.chello.sk [89.173.0.55]) by mail.vx.sk (Postfix) with ESMTPSA id 728A481477; Sun, 4 Apr 2010 13:23:38 +0200 (CEST) Message-ID: <4BB876BA.2030607@FreeBSD.org> Date: Sun, 04 Apr 2010 13:23:38 +0200 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Andriy Gapon References: <201003160048.o2G0mReg025652@svn.freebsd.org> <4BB75C8D.8070607@freebsd.org> <4BB75EEF.8060201@freebsd.org> In-Reply-To: <4BB75EEF.8060201@freebsd.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI Subject: Re: svn commit: r205198 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 11:23:42 -0000 The fix is correct. It has been fixed in OpenSolaris rev. 9396. I have filed a PR kern/145377 The PR includes the complete patch from OpenSolaris including their commented code. Link: http://www.freebsd.org/cgi/query-pr.cgi?pr=145377 Dňa 3. 4. 2010 17:29, Andriy Gapon wrote / napísal(a): > on 03/04/2010 18:19 Andriy Gapon said the following: > >> It seems that this commit causes a crash in zfs(1) when e.g. 'zfs list' is >> executed and one of the filesystems has a user property set on it. >> >> The crash is in zfs_prune_proplist function at >> cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c:4291. >> >> Relevant code snippet: >> 4286 >> 4287 while (curr) { >> 4288 zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); >> 4289 nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); >> 4290 >> 4291 if (props[zfs_prop] == B_FALSE) >> 4292 (void) nvlist_remove(zhp->zfs_props, >> 4293 nvpair_name(curr), nvpair_type(curr)); >> 4294 curr = next; >> 4295 } >> >> zfs_prop is (-1) and nvpair_name(curr) is my custom property "avg:nobackup". >> Not sure if this was fixed in OpenSolaris or what. >> > BTW, I use this simplistic change for time being, not sure if this is a correct fix. > > --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c > +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c > @@ -4288,7 +4288,7 @@ zfs_prune_proplist(zfs_handle_t *zhp, uint8_t *props) > zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); > nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); > > - if (props[zfs_prop] == B_FALSE) > + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) > (void) nvlist_remove(zhp->zfs_props, > nvpair_name(curr), nvpair_type(curr)); > curr = next; > > > From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 13:17:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB46106566B; Sun, 4 Apr 2010 13:17:05 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD66E8FC14; Sun, 4 Apr 2010 13:17:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34DH5Ik021200; Sun, 4 Apr 2010 13:17:05 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34DH5hD021198; Sun, 4 Apr 2010 13:17:05 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004041317.o34DH5hD021198@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 4 Apr 2010 13:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206158 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 13:17:06 -0000 Author: jilles Date: Sun Apr 4 13:17:05 2010 New Revision: 206158 URL: http://svn.freebsd.org/changeset/base/206158 Log: sh: Document the expansion changes in the man page. Note that the following sentence > Enclosing the full parameter expansion string in double-quotes does not > cause the following four varieties of pattern characters to be quoted, > whereas quoting characters within the braces has this effect. is now true, but used to be incorrect. Modified: head/bin/sh/sh.1 Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Sun Apr 4 08:47:34 2010 (r206157) +++ head/bin/sh/sh.1 Sun Apr 4 13:17:05 2010 (r206158) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd March 6, 2010 +.Dd April 4, 2010 .Dt SH 1 .Os .Sh NAME @@ -1178,10 +1178,20 @@ consists of all characters until the mat .Ql } . Any .Ql } -escaped by a backslash or within a quoted string, and characters in +escaped by a backslash or within a single-quoted string, and characters in embedded arithmetic expansions, command substitutions, and variable expansions, are not examined in determining the matching .Ql } . +Except for the variants with +.Ql + , +.Ql - , +.Ql = +or +.Ql ?\& , +any +.Ql } +within a double-quoted string is also not examined in determining the matching +.Ql } . .Pp The simplest form for parameter expansion is: .Pp @@ -1265,6 +1275,14 @@ is substituted. In the parameter expansions shown previously, use of the colon in the format results in a test for a parameter that is unset or null; omission of the colon results in a test for a parameter that is only unset. +.Pp +The +.Ar word +inherits the type of quoting +(unquoted, double-quoted or here-document) +from the surroundings, +with the exception that a backslash that quotes a closing brace is removed +during quote removal. .Bl -tag -width indent .It Li ${# Ns Ar parameter Ns Li } String Length. From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 14:23:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3612106566B; Sun, 4 Apr 2010 14:23:28 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C22238FC22; Sun, 4 Apr 2010 14:23:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34ENSgx035632; Sun, 4 Apr 2010 14:23:28 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34ENSju035630; Sun, 4 Apr 2010 14:23:28 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004041423.o34ENSju035630@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 4 Apr 2010 14:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206159 - head/usr.sbin/services_mkdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 14:23:28 -0000 Author: ume Date: Sun Apr 4 14:23:28 2010 New Revision: 206159 URL: http://svn.freebsd.org/changeset/base/206159 Log: Fix compilation error on 9-CURRENT. Reported by: nyan MFC after: 2 weeks Modified: head/usr.sbin/services_mkdb/services_mkdb.c Modified: head/usr.sbin/services_mkdb/services_mkdb.c ============================================================================== --- head/usr.sbin/services_mkdb/services_mkdb.c Sun Apr 4 13:17:05 2010 (r206158) +++ head/usr.sbin/services_mkdb/services_mkdb.c Sun Apr 4 14:23:28 2010 (r206159) @@ -282,11 +282,11 @@ parseservices(const char *fname, StringL /* build list of aliases */ if (sl_find(s, name) == NULL) { - char *p; + char *p2; - if ((p = strdup(name)) == NULL) + if ((p2 = strdup(name)) == NULL) err(1, "Cannot copy string"); - (void)sl_add(s, p); + (void)sl_add(s, p2); } if (aliases) { @@ -294,11 +294,11 @@ parseservices(const char *fname, StringL if (alias[0] == '\0') continue; if (sl_find(s, alias) == NULL) { - char *p; + char *p2; - if ((p = strdup(alias)) == NULL) + if ((p2 = strdup(alias)) == NULL) err(1, "Cannot copy string"); - (void)sl_add(s, p); + (void)sl_add(s, p2); } } } From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 14:48:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC6101065675; Sun, 4 Apr 2010 14:48:43 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBBE98FC16; Sun, 4 Apr 2010 14:48:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34EmhUk041229; Sun, 4 Apr 2010 14:48:43 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34Emhta041227; Sun, 4 Apr 2010 14:48:43 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201004041448.o34Emhta041227@svn.freebsd.org> From: Jaakko Heinonen Date: Sun, 4 Apr 2010 14:48:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206160 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 14:48:44 -0000 Author: jh Date: Sun Apr 4 14:48:43 2010 New Revision: 206160 URL: http://svn.freebsd.org/changeset/base/206160 Log: Add missing MNT_NFS4ACLS. Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Apr 4 14:23:28 2010 (r206159) +++ head/sys/kern/vfs_subr.c Sun Apr 4 14:48:43 2010 (r206160) @@ -2797,6 +2797,7 @@ DB_SHOW_COMMAND(mount, db_show_mount) MNT_FLAG(MNT_NOATIME); MNT_FLAG(MNT_NOCLUSTERR); MNT_FLAG(MNT_NOCLUSTERW); + MNT_FLAG(MNT_NFS4ACLS); MNT_FLAG(MNT_EXRDONLY); MNT_FLAG(MNT_EXPORTED); MNT_FLAG(MNT_DEFEXPORTED); From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 14:57:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDAF01065673; Sun, 4 Apr 2010 14:57:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA66F8FC14; Sun, 4 Apr 2010 14:57:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34Evjdj043259; Sun, 4 Apr 2010 14:57:45 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34EvjWk043256; Sun, 4 Apr 2010 14:57:45 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004041457.o34EvjWk043256@svn.freebsd.org> From: Marius Strobl Date: Sun, 4 Apr 2010 14:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206161 - in stable/7/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 14:57:46 -0000 Author: marius Date: Sun Apr 4 14:57:45 2010 New Revision: 206161 URL: http://svn.freebsd.org/changeset/base/206161 Log: MFC: r205269 o Add support for UltraSparc-IV+: - Swap the configuration of the first and second large dTLB as with US-IV+ these can only hold entries of certain page sizes each, which we happened to chose the non-working way around. - Additionally ensure that the large iTLB is set up to hold 8k pages (currently this happens to be a NOP though). - Add a workaround for US-IV+ erratum #2. - Turn off dTLB parity error reporting as otherwise we get seemingly false positives when copying in the user window by simulating a fill trap on return to usermode. Given that these parity errors can be avoided by disabling multi issue mode and the problem could be reproduced with a second machine this appears to be a silicon bug of some sort. - Add a membar #Sync also before the stores to ASI_DCACHE_TAG. While at it, turn of interrupts across the whole cheetah_cache_flush() for simplicity instead of around every flush. This should have next to no impact as for cheetah-class machines we typically only need to flush the caches a few times during boot when recovering from peeking/poking non-existent PCI devices, if at all. - Just use KERNBASE for FLUSH as we also do elsewhere as the US-IV+ documentation doesn't seem to mention that these CPUs also ignore the address like previous cheetah-class CPUs do. Again the code changing LSU_IC is executed seldom enough that the negligible optimization of using %g0 instead should have no real impact. With these changes FreeBSD runs stable on V890 equipped with US-IV+ and -j128 buildworlds in a loop for days are no problem. Unfortunately, the performance isn't were it should be as a buildworld on a 4x1.5GHz US-IV+ V890 takes nearly 3h while on a V440 with (theoretically) less powerfull 4x1.5GHz US-IIIi it takes just over 1h. It's unclear whether this is related to the supposed silicon bug mentioned above or due to another issue. The documentation (which contains a sever bug in the description of the bits added to the context registers though) at least doesn't mention any requirements for changes in the CPU handling besides those implemented and the cache as well as the TLB configurations and handling look fine. o Re-arrange cheetah_init() so it's easier to add support for SPARC64 V up to VIIIfx CPUs, which only require parts of this initialization. Committed from: EH2010 Modified: stable/7/sys/sparc64/include/dcr.h stable/7/sys/sparc64/sparc64/cheetah.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/sparc64/include/dcr.h ============================================================================== --- stable/7/sys/sparc64/include/dcr.h Sun Apr 4 14:48:43 2010 (r206160) +++ stable/7/sys/sparc64/include/dcr.h Sun Apr 4 14:57:45 2010 (r206161) @@ -57,6 +57,10 @@ #define DCR_BPM_BITS 2 #define DCR_BPM_MASK \ (((1UL << DCR_BPM_BITS) - 1) << DCR_BPM_SHIFT) +#define DCR_BPM_1HIST_GSHARE (0UL << DCR_BPM_SHIFT) +#define DCR_BPM_2HIST_GSHARE (1UL << DCR_BPM_SHIFT) +#define DCR_BPM_PC (2UL << DCR_BPM_SHIFT) +#define DCR_BPM_2HIST_MIXED (3UL << DCR_BPM_SHIFT) #define DCR_JPE (1UL << 15) #define DCR_ITPE (1UL << 16) Modified: stable/7/sys/sparc64/sparc64/cheetah.c ============================================================================== --- stable/7/sys/sparc64/sparc64/cheetah.c Sun Apr 4 14:48:43 2010 (r206160) +++ stable/7/sys/sparc64/sparc64/cheetah.c Sun Apr 4 14:57:45 2010 (r206161) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2003 Jake Burkholder. - * Copyright (c) 2005, 2008 Marius Strobl + * Copyright (c) 2005, 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,9 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* A FLUSH is required after changing LSU_IC (the address is ignored). */ -#define CHEETAH_FLUSH_LSU_IC() __asm __volatile("flush %%g0" : :) - #define CHEETAH_ICACHE_TAG_LOWER 0x30 /* @@ -60,6 +57,7 @@ __FBSDID("$FreeBSD$"); void cheetah_init(u_int cpu_impl) { + u_long val; register_t s; /* @@ -68,14 +66,6 @@ cheetah_init(u_int cpu_impl) */ s = intr_disable(); - /* - * Ensure DCR_IFPOE is disabled as long as we haven't implemented - * support for it (if ever) as most if not all firmware versions - * apparently turn it on. Not making use of DCR_IFPOE should also - * avoid Cheetah erratum #109. - */ - wr(asr18, rd(asr18) & ~DCR_IFPOE, 0); - /* Ensure the TSB Extension Registers hold 0 as TSB_Base. */ stxa(AA_DMMU_TSB_PEXT_REG, ASI_DMMU, 0); @@ -93,25 +83,58 @@ cheetah_init(u_int cpu_impl) membar(Sync); /* - * Ensure that the dt512_0 is set to hold 8k pages for all three - * contexts and configure the dt512_1 to hold 4MB pages for them - * (e.g. for direct mappings). - * NB: according to documentation, this requires a contex demap - * _before_ changing the corresponding page size, but we hardly - * can flush our locked pages here, so we use a demap all instead. + * Configure the first large dTLB to hold 4MB pages (e.g. for direct + * mappings) for all three contexts and ensure the second one is set + * up to hold 8k pages for them. Note that this is constraint by + * US-IV+, whose large dTLBs can only hold entries of certain page + * sizes each. + * For US-IV+, additionally ensure that the large iTLB is set up to + * hold 8k pages for nucleus and primary context (still no secondary + * iMMU context. + * NB: according to documentation, changing the page size of the same + * context requires a context demap before changing the corresponding + * page size, but we hardly can flush our locked pages here, so we use + * a demap all instead. */ stxa(TLB_DEMAP_ALL, ASI_DMMU_DEMAP, 0); membar(Sync); - stxa(AA_DMMU_PCXR, ASI_DMMU, - (TS_8K << TLB_PCXR_N_PGSZ0_SHIFT) | - (TS_4M << TLB_PCXR_N_PGSZ1_SHIFT) | - (TS_8K << TLB_PCXR_P_PGSZ0_SHIFT) | - (TS_4M << TLB_PCXR_P_PGSZ1_SHIFT)); - stxa(AA_DMMU_SCXR, ASI_DMMU, - (TS_8K << TLB_SCXR_S_PGSZ0_SHIFT) | - (TS_4M << TLB_SCXR_S_PGSZ1_SHIFT)); + val = (TS_4M << TLB_PCXR_N_PGSZ0_SHIFT) | + (TS_8K << TLB_PCXR_N_PGSZ1_SHIFT) | + (TS_4M << TLB_PCXR_P_PGSZ0_SHIFT) | + (TS_8K << TLB_PCXR_P_PGSZ1_SHIFT); + if (cpu_impl == CPU_IMPL_ULTRASPARCIVp) + val |= (TS_8K << TLB_PCXR_N_PGSZ_I_SHIFT) | + (TS_8K << TLB_PCXR_P_PGSZ_I_SHIFT); + stxa(AA_DMMU_PCXR, ASI_DMMU, val); + val = (TS_4M << TLB_SCXR_S_PGSZ0_SHIFT) | + (TS_8K << TLB_SCXR_S_PGSZ1_SHIFT); + stxa(AA_DMMU_SCXR, ASI_DMMU, val); flush(KERNBASE); + /* + * Ensure DCR_IFPOE is disabled as long as we haven't implemented + * support for it (if ever) as most if not all firmware versions + * apparently turn it on. Not making use of DCR_IFPOE should also + * avoid Cheetah erratum #109. + */ + val = rd(asr18) & ~DCR_IFPOE; + if (cpu_impl == CPU_IMPL_ULTRASPARCIVp) { + /* + * Ensure the branch prediction mode is set to PC indexing + * in order to work around US-IV+ erratum #2. + */ + val = (val & ~DCR_BPM_MASK) | DCR_BPM_PC; + /* + * XXX disable dTLB parity error reporting as otherwise we + * get seemingly false positives when copying in the user + * window by simulating a fill trap on return to usermode in + * case single issue is disabled, which thus appears to be + * a CPU bug. + */ + val &= ~DCR_DTPE; + } + wr(asr18, val, 0); + intr_restore(s); } @@ -125,11 +148,11 @@ cheetah_cache_enable(u_int cpu_impl) lsu = ldxa(0, ASI_LSU_CTL_REG); if (cpu_impl == CPU_IMPL_ULTRASPARCIII) { - /* Disable P$ due to Cheetah erratum #18. */ + /* Disable P$ due to US-III erratum #18. */ lsu &= ~LSU_PE; } stxa(0, ASI_LSU_CTL_REG, lsu | LSU_IC | LSU_DC); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); } /* @@ -139,21 +162,35 @@ void cheetah_cache_flush(void) { u_long addr, lsu; + register_t s; + s = intr_disable(); for (addr = 0; addr < PCPU_GET(cache.dc_size); addr += PCPU_GET(cache.dc_linesize)) - stxa_sync(addr, ASI_DCACHE_TAG, 0); + /* + * Note that US-IV+ additionally require a membar #Sync before + * a load or store to ASI_DCACHE_TAG. + */ + __asm __volatile( + "membar #Sync;" + "stxa %%g0, [%0] %1;" + "membar #Sync" + : : "r" (addr), "n" (ASI_DCACHE_TAG)); /* The I$ must be disabled when flushing it so ensure it's off. */ lsu = ldxa(0, ASI_LSU_CTL_REG); stxa(0, ASI_LSU_CTL_REG, lsu & ~(LSU_IC)); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); for (addr = CHEETAH_ICACHE_TAG_LOWER; addr < PCPU_GET(cache.ic_size) * 2; addr += PCPU_GET(cache.ic_linesize) * 2) - stxa_sync(addr, ASI_ICACHE_TAG, 0); + __asm __volatile( + "stxa %%g0, [%0] %1;" + "membar #Sync" + : : "r" (addr), "n" (ASI_ICACHE_TAG)); stxa(0, ASI_LSU_CTL_REG, lsu); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); + intr_restore(s); } /* @@ -165,9 +202,11 @@ cheetah_dcache_page_inval(vm_paddr_t spa vm_paddr_t pa; void *cookie; - KASSERT((spa & PAGE_MASK) == 0, ("%s: pa not page aligned", __func__)); + KASSERT((spa & PAGE_MASK) == 0, + ("%s: pa not page aligned", __func__)); cookie = ipi_dcache_page_inval(tl_ipi_cheetah_dcache_page_inval, spa); - for (pa = spa; pa < spa + PAGE_SIZE; pa += PCPU_GET(cache.dc_linesize)) + for (pa = spa; pa < spa + PAGE_SIZE; + pa += PCPU_GET(cache.dc_linesize)) stxa_sync(pa, ASI_DCACHE_INVALIDATE, 0); ipi_wait(cookie); } From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 14:57:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45EE6106564A; Sun, 4 Apr 2010 14:57:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32E328FC15; Sun, 4 Apr 2010 14:57:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34Evlb3043290; Sun, 4 Apr 2010 14:57:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34Evl2H043287; Sun, 4 Apr 2010 14:57:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004041457.o34Evl2H043287@svn.freebsd.org> From: Marius Strobl Date: Sun, 4 Apr 2010 14:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206162 - in stable/8/sys/sparc64: include sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 14:57:47 -0000 Author: marius Date: Sun Apr 4 14:57:46 2010 New Revision: 206162 URL: http://svn.freebsd.org/changeset/base/206162 Log: MFC: r205269 o Add support for UltraSparc-IV+: - Swap the configuration of the first and second large dTLB as with US-IV+ these can only hold entries of certain page sizes each, which we happened to chose the non-working way around. - Additionally ensure that the large iTLB is set up to hold 8k pages (currently this happens to be a NOP though). - Add a workaround for US-IV+ erratum #2. - Turn off dTLB parity error reporting as otherwise we get seemingly false positives when copying in the user window by simulating a fill trap on return to usermode. Given that these parity errors can be avoided by disabling multi issue mode and the problem could be reproduced with a second machine this appears to be a silicon bug of some sort. - Add a membar #Sync also before the stores to ASI_DCACHE_TAG. While at it, turn of interrupts across the whole cheetah_cache_flush() for simplicity instead of around every flush. This should have next to no impact as for cheetah-class machines we typically only need to flush the caches a few times during boot when recovering from peeking/poking non-existent PCI devices, if at all. - Just use KERNBASE for FLUSH as we also do elsewhere as the US-IV+ documentation doesn't seem to mention that these CPUs also ignore the address like previous cheetah-class CPUs do. Again the code changing LSU_IC is executed seldom enough that the negligible optimization of using %g0 instead should have no real impact. With these changes FreeBSD runs stable on V890 equipped with US-IV+ and -j128 buildworlds in a loop for days are no problem. Unfortunately, the performance isn't were it should be as a buildworld on a 4x1.5GHz US-IV+ V890 takes nearly 3h while on a V440 with (theoretically) less powerfull 4x1.5GHz US-IIIi it takes just over 1h. It's unclear whether this is related to the supposed silicon bug mentioned above or due to another issue. The documentation (which contains a sever bug in the description of the bits added to the context registers though) at least doesn't mention any requirements for changes in the CPU handling besides those implemented and the cache as well as the TLB configurations and handling look fine. o Re-arrange cheetah_init() so it's easier to add support for SPARC64 V up to VIIIfx CPUs, which only require parts of this initialization. Committed from: EH2010 Modified: stable/8/sys/sparc64/include/dcr.h stable/8/sys/sparc64/sparc64/cheetah.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/sparc64/include/dcr.h ============================================================================== --- stable/8/sys/sparc64/include/dcr.h Sun Apr 4 14:57:45 2010 (r206161) +++ stable/8/sys/sparc64/include/dcr.h Sun Apr 4 14:57:46 2010 (r206162) @@ -57,6 +57,10 @@ #define DCR_BPM_BITS 2 #define DCR_BPM_MASK \ (((1UL << DCR_BPM_BITS) - 1) << DCR_BPM_SHIFT) +#define DCR_BPM_1HIST_GSHARE (0UL << DCR_BPM_SHIFT) +#define DCR_BPM_2HIST_GSHARE (1UL << DCR_BPM_SHIFT) +#define DCR_BPM_PC (2UL << DCR_BPM_SHIFT) +#define DCR_BPM_2HIST_MIXED (3UL << DCR_BPM_SHIFT) #define DCR_JPE (1UL << 15) #define DCR_ITPE (1UL << 16) Modified: stable/8/sys/sparc64/sparc64/cheetah.c ============================================================================== --- stable/8/sys/sparc64/sparc64/cheetah.c Sun Apr 4 14:57:45 2010 (r206161) +++ stable/8/sys/sparc64/sparc64/cheetah.c Sun Apr 4 14:57:46 2010 (r206162) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2003 Jake Burkholder. - * Copyright (c) 2005, 2008 Marius Strobl + * Copyright (c) 2005, 2008, 2010 Marius Strobl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,9 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* A FLUSH is required after changing LSU_IC (the address is ignored). */ -#define CHEETAH_FLUSH_LSU_IC() __asm __volatile("flush %%g0" : :) - #define CHEETAH_ICACHE_TAG_LOWER 0x30 /* @@ -60,6 +57,7 @@ __FBSDID("$FreeBSD$"); void cheetah_init(u_int cpu_impl) { + u_long val; register_t s; /* @@ -68,14 +66,6 @@ cheetah_init(u_int cpu_impl) */ s = intr_disable(); - /* - * Ensure DCR_IFPOE is disabled as long as we haven't implemented - * support for it (if ever) as most if not all firmware versions - * apparently turn it on. Not making use of DCR_IFPOE should also - * avoid Cheetah erratum #109. - */ - wr(asr18, rd(asr18) & ~DCR_IFPOE, 0); - /* Ensure the TSB Extension Registers hold 0 as TSB_Base. */ stxa(AA_DMMU_TSB_PEXT_REG, ASI_DMMU, 0); @@ -93,25 +83,58 @@ cheetah_init(u_int cpu_impl) membar(Sync); /* - * Ensure that the dt512_0 is set to hold 8k pages for all three - * contexts and configure the dt512_1 to hold 4MB pages for them - * (e.g. for direct mappings). - * NB: according to documentation, this requires a contex demap - * _before_ changing the corresponding page size, but we hardly - * can flush our locked pages here, so we use a demap all instead. + * Configure the first large dTLB to hold 4MB pages (e.g. for direct + * mappings) for all three contexts and ensure the second one is set + * up to hold 8k pages for them. Note that this is constraint by + * US-IV+, whose large dTLBs can only hold entries of certain page + * sizes each. + * For US-IV+, additionally ensure that the large iTLB is set up to + * hold 8k pages for nucleus and primary context (still no secondary + * iMMU context. + * NB: according to documentation, changing the page size of the same + * context requires a context demap before changing the corresponding + * page size, but we hardly can flush our locked pages here, so we use + * a demap all instead. */ stxa(TLB_DEMAP_ALL, ASI_DMMU_DEMAP, 0); membar(Sync); - stxa(AA_DMMU_PCXR, ASI_DMMU, - (TS_8K << TLB_PCXR_N_PGSZ0_SHIFT) | - (TS_4M << TLB_PCXR_N_PGSZ1_SHIFT) | - (TS_8K << TLB_PCXR_P_PGSZ0_SHIFT) | - (TS_4M << TLB_PCXR_P_PGSZ1_SHIFT)); - stxa(AA_DMMU_SCXR, ASI_DMMU, - (TS_8K << TLB_SCXR_S_PGSZ0_SHIFT) | - (TS_4M << TLB_SCXR_S_PGSZ1_SHIFT)); + val = (TS_4M << TLB_PCXR_N_PGSZ0_SHIFT) | + (TS_8K << TLB_PCXR_N_PGSZ1_SHIFT) | + (TS_4M << TLB_PCXR_P_PGSZ0_SHIFT) | + (TS_8K << TLB_PCXR_P_PGSZ1_SHIFT); + if (cpu_impl == CPU_IMPL_ULTRASPARCIVp) + val |= (TS_8K << TLB_PCXR_N_PGSZ_I_SHIFT) | + (TS_8K << TLB_PCXR_P_PGSZ_I_SHIFT); + stxa(AA_DMMU_PCXR, ASI_DMMU, val); + val = (TS_4M << TLB_SCXR_S_PGSZ0_SHIFT) | + (TS_8K << TLB_SCXR_S_PGSZ1_SHIFT); + stxa(AA_DMMU_SCXR, ASI_DMMU, val); flush(KERNBASE); + /* + * Ensure DCR_IFPOE is disabled as long as we haven't implemented + * support for it (if ever) as most if not all firmware versions + * apparently turn it on. Not making use of DCR_IFPOE should also + * avoid Cheetah erratum #109. + */ + val = rd(asr18) & ~DCR_IFPOE; + if (cpu_impl == CPU_IMPL_ULTRASPARCIVp) { + /* + * Ensure the branch prediction mode is set to PC indexing + * in order to work around US-IV+ erratum #2. + */ + val = (val & ~DCR_BPM_MASK) | DCR_BPM_PC; + /* + * XXX disable dTLB parity error reporting as otherwise we + * get seemingly false positives when copying in the user + * window by simulating a fill trap on return to usermode in + * case single issue is disabled, which thus appears to be + * a CPU bug. + */ + val &= ~DCR_DTPE; + } + wr(asr18, val, 0); + intr_restore(s); } @@ -125,11 +148,11 @@ cheetah_cache_enable(u_int cpu_impl) lsu = ldxa(0, ASI_LSU_CTL_REG); if (cpu_impl == CPU_IMPL_ULTRASPARCIII) { - /* Disable P$ due to Cheetah erratum #18. */ + /* Disable P$ due to US-III erratum #18. */ lsu &= ~LSU_PE; } stxa(0, ASI_LSU_CTL_REG, lsu | LSU_IC | LSU_DC); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); } /* @@ -139,21 +162,35 @@ void cheetah_cache_flush(void) { u_long addr, lsu; + register_t s; + s = intr_disable(); for (addr = 0; addr < PCPU_GET(cache.dc_size); addr += PCPU_GET(cache.dc_linesize)) - stxa_sync(addr, ASI_DCACHE_TAG, 0); + /* + * Note that US-IV+ additionally require a membar #Sync before + * a load or store to ASI_DCACHE_TAG. + */ + __asm __volatile( + "membar #Sync;" + "stxa %%g0, [%0] %1;" + "membar #Sync" + : : "r" (addr), "n" (ASI_DCACHE_TAG)); /* The I$ must be disabled when flushing it so ensure it's off. */ lsu = ldxa(0, ASI_LSU_CTL_REG); stxa(0, ASI_LSU_CTL_REG, lsu & ~(LSU_IC)); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); for (addr = CHEETAH_ICACHE_TAG_LOWER; addr < PCPU_GET(cache.ic_size) * 2; addr += PCPU_GET(cache.ic_linesize) * 2) - stxa_sync(addr, ASI_ICACHE_TAG, 0); + __asm __volatile( + "stxa %%g0, [%0] %1;" + "membar #Sync" + : : "r" (addr), "n" (ASI_ICACHE_TAG)); stxa(0, ASI_LSU_CTL_REG, lsu); - CHEETAH_FLUSH_LSU_IC(); + flush(KERNBASE); + intr_restore(s); } /* @@ -165,9 +202,11 @@ cheetah_dcache_page_inval(vm_paddr_t spa vm_paddr_t pa; void *cookie; - KASSERT((spa & PAGE_MASK) == 0, ("%s: pa not page aligned", __func__)); + KASSERT((spa & PAGE_MASK) == 0, + ("%s: pa not page aligned", __func__)); cookie = ipi_dcache_page_inval(tl_ipi_cheetah_dcache_page_inval, spa); - for (pa = spa; pa < spa + PAGE_SIZE; pa += PCPU_GET(cache.dc_linesize)) + for (pa = spa; pa < spa + PAGE_SIZE; + pa += PCPU_GET(cache.dc_linesize)) stxa_sync(pa, ASI_DCACHE_INVALIDATE, 0); ipi_wait(cookie); } From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 15:21:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CF1B106566C; Sun, 4 Apr 2010 15:21:10 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BF7B8FC16; Sun, 4 Apr 2010 15:21:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34FL9a5048510; Sun, 4 Apr 2010 15:21:09 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34FL9js048508; Sun, 4 Apr 2010 15:21:09 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004041521.o34FL9js048508@svn.freebsd.org> From: Hajimu UMEMOTO Date: Sun, 4 Apr 2010 15:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206163 - head/usr.sbin/services_mkdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 15:21:10 -0000 Author: ume Date: Sun Apr 4 15:21:09 2010 New Revision: 206163 URL: http://svn.freebsd.org/changeset/base/206163 Log: Fix compilation error on amd64. Reported by: stefanf MFC after: 2 weeks Modified: head/usr.sbin/services_mkdb/services_mkdb.c Modified: head/usr.sbin/services_mkdb/services_mkdb.c ============================================================================== --- head/usr.sbin/services_mkdb/services_mkdb.c Sun Apr 4 14:57:46 2010 (r206162) +++ head/usr.sbin/services_mkdb/services_mkdb.c Sun Apr 4 15:21:09 2010 (r206163) @@ -219,7 +219,7 @@ parseservices(const char *fname, StringL line = 0; if ((svc = calloc(PMASK + 1, sizeof(StringList **))) == NULL) - err(1, "Cannot allocate %zu bytes", PMASK + 1); + err(1, "Cannot allocate %zu bytes", (size_t)(PMASK + 1)); /* XXX: change NULL to "\0\0#" when fparseln fixed */ for (; (p = fparseln(fp, &len, &line, NULL, 0)) != NULL; free(p)) { @@ -271,7 +271,8 @@ parseservices(const char *fname, StringL if (svc[pnum] == NULL) { svc[pnum] = calloc(PROTOMAX, sizeof(StringList *)); if (svc[pnum] == NULL) - err(1, "Cannot allocate %zu bytes", PROTOMAX); + err(1, "Cannot allocate %zu bytes", + (size_t)PROTOMAX); } pindex = getprotoindex(sl, proto); From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 15:36:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C94C106567F; Sun, 4 Apr 2010 15:36:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 01B0B8FC14; Sun, 4 Apr 2010 15:36:57 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o34FasRl080696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Apr 2010 18:36:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o34FasYB086259; Sun, 4 Apr 2010 18:36:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o34FarNI086258; Sun, 4 Apr 2010 18:36:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Apr 2010 18:36:53 +0300 From: Kostik Belousov To: Alexander Leidinger Message-ID: <20100404153653.GD2415@deviant.kiev.zoral.com.ua> References: <201004020655.o326tWax079882@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWtvayRuroyN98H5" Content-Disposition: inline In-Reply-To: <201004020655.o326tWax079882@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 15:36:58 -0000 --cWtvayRuroyN98H5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 02, 2010 at 06:55:32AM +0000, Alexander Leidinger wrote: > Author: netchild > Date: Fri Apr 2 06:55:31 2010 > New Revision: 206082 > URL: http://svn.freebsd.org/changeset/base/206082 >=20 > Log: > WITH_CTF can now be specified in src.conf (not recommended, there > are some problems with static executables), make.conf (would also > affect ports which do not use GNU make and do not override the > compile targets) or in the kernel config (via "makeoptions > WITH_CTF=3Dyes"). I think this commit started the kernel build to emit lines like this [ -z "ctfconvert" -o -n "1" ] || ctfconvert -L VERSION -g vm_init.o after compilation of each file from the kernel (but not modules) source. Could you, please, look for missed '@' ? --cWtvayRuroyN98H5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAku4shQACgkQC3+MBN1Mb4g4RQCgyA3y2LpxP3Ba45PKfL11B8l2 wZoAoK1VMRS8jO3dgAS23STMt5vDxUzS =0GNW -----END PGP SIGNATURE----- --cWtvayRuroyN98H5-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 15:37:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3C61106566B; Sun, 4 Apr 2010 15:37:47 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D19548FC1D; Sun, 4 Apr 2010 15:37:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34Fbl11052189; Sun, 4 Apr 2010 15:37:47 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34FblJg052187; Sun, 4 Apr 2010 15:37:47 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201004041537.o34FblJg052187@svn.freebsd.org> From: Robert Noland Date: Sun, 4 Apr 2010 15:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206164 - stable/8/sys/dev/agp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 15:37:48 -0000 Author: rnoland Date: Sun Apr 4 15:37:47 2010 New Revision: 206164 URL: http://svn.freebsd.org/changeset/base/206164 Log: MFC r205096, r205102 Add AGP support for Intel Pineview and Ironlake chipsets. Modified: stable/8/sys/dev/agp/agp_i810.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/agp/agp_i810.c ============================================================================== --- stable/8/sys/dev/agp/agp_i810.c Sun Apr 4 15:21:09 2010 (r206163) +++ stable/8/sys/dev/agp/agp_i810.c Sun Apr 4 15:37:47 2010 (r206164) @@ -70,6 +70,7 @@ enum { CHIP_I915, /* 915G/915GM */ CHIP_I965, /* G965 */ CHIP_G33, /* G33/Q33/Q35 */ + CHIP_IGD, /* Pineview */ CHIP_G4X, /* G45/Q45 */ }; @@ -163,6 +164,10 @@ static const struct agp_i810_match { "Intel G33 SVGA controller"}, {0x29D28086, CHIP_G33, 0x00020000, "Intel Q33 SVGA controller"}, + {0xA0018086, CHIP_IGD, 0x00010000, + "Intel Pineview SVGA controller"}, + {0xA0118086, CHIP_IGD, 0x00010000, + "Intel Pineview (M) SVGA controller"}, {0x2A028086, CHIP_I965, 0x00020000, "Intel GM965 SVGA controller"}, {0x2A128086, CHIP_I965, 0x00020000, @@ -170,13 +175,17 @@ static const struct agp_i810_match { {0x2A428086, CHIP_G4X, 0x00020000, "Intel GM45 SVGA controller"}, {0x2E028086, CHIP_G4X, 0x00020000, - "Intel 4 Series SVGA controller"}, + "Intel Eaglelake SVGA controller"}, {0x2E128086, CHIP_G4X, 0x00020000, "Intel Q45 SVGA controller"}, {0x2E228086, CHIP_G4X, 0x00020000, "Intel G45 SVGA controller"}, {0x2E328086, CHIP_G4X, 0x00020000, "Intel G41 SVGA controller"}, + {0x00428086, CHIP_G4X, 0x00020000, + "Intel Ironlake (D) SVGA controller"}, + {0x00468086, CHIP_G4X, 0x00020000, + "Intel Ironlake (M) SVGA controller"}, {0, 0, 0, NULL} }; @@ -286,6 +295,7 @@ agp_i810_probe(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_IGD: case CHIP_G4X: deven = pci_read_config(bdev, AGP_I915_DEVEN, 4); if ((deven & AGP_I915_DEVEN_D2F0) == @@ -351,6 +361,7 @@ agp_i810_dump_regs(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_IGD: case CHIP_G4X: device_printf(dev, "AGP_I855_GCC1: 0x%02x\n", pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); @@ -386,6 +397,7 @@ agp_i810_attach(device_t dev) break; case CHIP_I915: case CHIP_G33: + case CHIP_IGD: sc->sc_res_spec = agp_i915_res_spec; agp_set_aperture_resource(dev, AGP_I915_GMADR); break; @@ -401,7 +413,8 @@ agp_i810_attach(device_t dev) return error; if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 && - sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) + sc->chiptype != CHIP_IGD && sc->chiptype != CHIP_G4X && + ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) { device_printf(dev, "agp_i810.c does not support physical " "memory above 4GB.\n"); @@ -491,7 +504,7 @@ agp_i810_attach(device_t dev) gatt->ag_physical = pgtblctl & ~1; } else if (sc->chiptype == CHIP_I855 || sc->chiptype == CHIP_I915 || sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || - sc->chiptype == CHIP_G4X) { + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { unsigned int gcc1, pgtblctl, stolen, gtt_size; /* Stolen memory is set up at the beginning of the aperture by @@ -553,6 +566,7 @@ agp_i810_attach(device_t dev) return EINVAL; } break; + case CHIP_IGD: case CHIP_G4X: gtt_size = 0; break; @@ -587,6 +601,7 @@ agp_i810_attach(device_t dev) if (sc->chiptype == CHIP_I915 || sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { stolen = 48 * 1024; } else { @@ -597,6 +612,7 @@ agp_i810_attach(device_t dev) if (sc->chiptype == CHIP_I915 || sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { stolen = 64 * 1024; } else { @@ -606,6 +622,7 @@ agp_i810_attach(device_t dev) case AGP_G33_GCC1_GMS_STOLEN_128M: if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { stolen = 128 * 1024; } else { @@ -615,6 +632,7 @@ agp_i810_attach(device_t dev) case AGP_G33_GCC1_GMS_STOLEN_256M: if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { stolen = 256 * 1024; } else { @@ -783,6 +801,7 @@ agp_i810_set_aperture(device_t dev, u_in case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_IGD: case CHIP_G4X: return agp_generic_set_aperture(dev, aperture); } @@ -803,7 +822,7 @@ agp_i810_write_gtt_entry(device_t dev, i pte = (u_int32_t)physical | 1; if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || - sc->chiptype == CHIP_G4X) { + sc->chiptype == CHIP_IGD || sc->chiptype == CHIP_G4X) { pte |= (physical & 0x0000000f00000000ull) >> 28; } else { /* If we do actually have memory above 4GB on an older system, @@ -823,6 +842,7 @@ agp_i810_write_gtt_entry(device_t dev, i break; case CHIP_I915: case CHIP_G33: + case CHIP_IGD: bus_write_4(sc->sc_res[1], (offset >> AGP_PAGE_SHIFT) * 4, pte); break; From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 15:42:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E85106566B; Sun, 4 Apr 2010 15:42:53 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7B0F8FC08; Sun, 4 Apr 2010 15:42:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34FgqPR053371; Sun, 4 Apr 2010 15:42:52 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34Fgqvm053368; Sun, 4 Apr 2010 15:42:52 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201004041542.o34Fgqvm053368@svn.freebsd.org> From: Robert Noland Date: Sun, 4 Apr 2010 15:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206165 - in stable/8/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 15:42:53 -0000 Author: rnoland Date: Sun Apr 4 15:42:52 2010 New Revision: 206165 URL: http://svn.freebsd.org/changeset/base/206165 Log: MFC r203289,r203367 Enable MTRR on all VIA CPUs that claim support Modified: stable/8/sys/amd64/amd64/amd64_mem.c stable/8/sys/i386/i386/i686_mem.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/amd64/amd64/amd64_mem.c ============================================================================== --- stable/8/sys/amd64/amd64/amd64_mem.c Sun Apr 4 15:37:47 2010 (r206164) +++ stable/8/sys/amd64/amd64/amd64_mem.c Sun Apr 4 15:42:52 2010 (r206165) @@ -707,11 +707,8 @@ amd64_mem_drvinit(void *unused) switch (cpu_vendor_id) { case CPU_VENDOR_INTEL: case CPU_VENDOR_AMD: - break; case CPU_VENDOR_CENTAUR: - if (cpu_exthigh >= 0x80000008) - break; - /* FALLTHROUGH */ + break; default: return; } Modified: stable/8/sys/i386/i386/i686_mem.c ============================================================================== --- stable/8/sys/i386/i386/i686_mem.c Sun Apr 4 15:37:47 2010 (r206164) +++ stable/8/sys/i386/i386/i686_mem.c Sun Apr 4 15:42:52 2010 (r206165) @@ -707,11 +707,8 @@ i686_mem_drvinit(void *unused) switch (cpu_vendor_id) { case CPU_VENDOR_INTEL: case CPU_VENDOR_AMD: - break; case CPU_VENDOR_CENTAUR: - if (cpu_exthigh >= 0x80000008) - break; - /* FALLTHROUGH */ + break; default: return; } From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 15:46:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F822106566B; Sun, 4 Apr 2010 15:46:46 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DE8D8FC21; Sun, 4 Apr 2010 15:46:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34FkkGP054281; Sun, 4 Apr 2010 15:46:46 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34Fkkgh054277; Sun, 4 Apr 2010 15:46:46 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <201004041546.o34Fkkgh054277@svn.freebsd.org> From: Robert Noland Date: Sun, 4 Apr 2010 15:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206166 - stable/8/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 15:46:46 -0000 Author: rnoland Date: Sun Apr 4 15:46:46 2010 New Revision: 206166 URL: http://svn.freebsd.org/changeset/base/206166 Log: MFC r205120,r205126 Add drm support for Intel Pineview chips. Modified: stable/8/sys/dev/drm/drm_pciids.h stable/8/sys/dev/drm/i915_drv.h stable/8/sys/dev/drm/i915_reg.h 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/drm/drm_pciids.h ============================================================================== --- stable/8/sys/dev/drm/drm_pciids.h Sun Apr 4 15:42:52 2010 (r206165) +++ stable/8/sys/dev/drm/drm_pciids.h Sun Apr 4 15:46:46 2010 (r206166) @@ -549,7 +549,9 @@ {0x8086, 0x29B2, CHIP_I9XX|CHIP_I915, "Intel Q35"}, \ {0x8086, 0x29D2, CHIP_I9XX|CHIP_I915, "Intel Q33"}, \ {0x8086, 0x2A42, CHIP_I9XX|CHIP_I965, "Mobile Intel® GM45 Express Chipset"}, \ - {0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, "Intel Integrated Graphics Device"}, \ + {0x8086, 0x2E02, CHIP_I9XX|CHIP_I965, "Intel Eaglelake"}, \ + {0x8086, 0xA001, CHIP_I9XX|CHIP_I965, "Intel Pineview"}, \ + {0x8086, 0xA011, CHIP_I9XX|CHIP_I965, "Intel Pineview (M)"}, \ {0x8086, 0x2E12, CHIP_I9XX|CHIP_I965, "Intel Q45/Q43"}, \ {0x8086, 0x2E22, CHIP_I9XX|CHIP_I965, "Intel G45/G43"}, \ {0x8086, 0x2E32, CHIP_I9XX|CHIP_I965, "Intel G41"}, \ Modified: stable/8/sys/dev/drm/i915_drv.h ============================================================================== --- stable/8/sys/dev/drm/i915_drv.h Sun Apr 4 15:42:52 2010 (r206165) +++ stable/8/sys/dev/drm/i915_drv.h Sun Apr 4 15:46:46 2010 (r206166) @@ -657,15 +657,21 @@ extern int i915_wait_ring(struct drm_dev (dev)->pci_device == 0x2E32 || \ IS_GM45(dev)) +#define IS_IGDG(dev) ((dev)->pci_device == 0xa001) +#define IS_IGDGM(dev) ((dev)->pci_device == 0xa011) +#define IS_IGD(dev) (IS_IGDG(dev) || IS_IGDGM(dev)) + #define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \ (dev)->pci_device == 0x29B2 || \ - (dev)->pci_device == 0x29D2) + (dev)->pci_device == 0x29D2 || \ + IS_IGD(dev)) #define IS_I9XX(dev) (IS_I915G(dev) || IS_I915GM(dev) || IS_I945G(dev) || \ IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev)) #define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \ - IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev)) + IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev) || \ + IS_IGD(dev)) #define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev)) Modified: stable/8/sys/dev/drm/i915_reg.h ============================================================================== --- stable/8/sys/dev/drm/i915_reg.h Sun Apr 4 15:42:52 2010 (r206165) +++ stable/8/sys/dev/drm/i915_reg.h Sun Apr 4 15:46:46 2010 (r206166) @@ -362,6 +362,7 @@ __FBSDID("$FreeBSD$"); #define DPLLB_LVDS_P2_CLOCK_DIV_7 (1 << 24) /* i915 */ #define DPLL_P2_CLOCK_DIV_MASK 0x03000000 /* i915 */ #define DPLL_FPA01_P1_POST_DIV_MASK 0x00ff0000 /* i915 */ +#define DPLL_FPA01_P1_POST_DIV_MASK_IGD 0x00ff8000 /* IGD */ #define I915_FIFO_UNDERRUN_STATUS (1UL<<31) #define I915_CRC_ERROR_ENABLE (1UL<<29) @@ -438,6 +439,7 @@ __FBSDID("$FreeBSD$"); */ #define DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS 0x003f0000 #define DPLL_FPA01_P1_POST_DIV_SHIFT 16 +#define DPLL_FPA01_P1_POST_DIV_SHIFT_IGD 15 /* i830, required in DVO non-gang */ #define PLL_P2_DIVIDE_BY_4 (1 << 23) #define PLL_P1_DIVIDE_BY_TWO (1 << 21) /* i830 */ @@ -504,10 +506,12 @@ __FBSDID("$FreeBSD$"); #define FPB0 0x06048 #define FPB1 0x0604c #define FP_N_DIV_MASK 0x003f0000 +#define FP_N_IGD_DIV_MASK 0x00ff0000 #define FP_N_DIV_SHIFT 16 #define FP_M1_DIV_MASK 0x00003f00 #define FP_M1_DIV_SHIFT 8 #define FP_M2_DIV_MASK 0x0000003f +#define FP_M2_IGD_DIV_MASK 0x000000ff #define FP_M2_DIV_SHIFT 0 #define DPLL_TEST 0x606c #define DPLLB_TEST_SDVO_DIV_1 (0 << 22) From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 16:29:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22D1B1065702; Sun, 4 Apr 2010 16:29:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 108D78FC15; Sun, 4 Apr 2010 16:29:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34GTmCD063693; Sun, 4 Apr 2010 16:29:48 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34GTmWv063692; Sun, 4 Apr 2010 16:29:48 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004041629.o34GTmWv063692@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 4 Apr 2010 16:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206167 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 16:29:49 -0000 Author: jilles Date: Sun Apr 4 16:29:48 2010 New Revision: 206167 URL: http://svn.freebsd.org/changeset/base/206167 Log: sh: Add test for some associativity in arithmetic. Added: head/tools/regression/bin/sh/expansion/arith4.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/arith4.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/arith4.0 Sun Apr 4 16:29:48 2010 (r206167) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +failures=0 + +check() { + if [ $(($1)) != $2 ]; then + failures=$((failures+1)) + echo "For $1, expected $2 actual $(($1))" + fi +} + +check '20 / 2 / 2' 5 +check '20 - 2 - 2' 16 +unset a b c d +check "a = b = c = d = 1" 1 +check "a == 1 && b == 1 && c == 1 && d == 1" 1 +check "a += b += c += d" 4 +check "a == 4 && b == 3 && c == 2 && d == 1" 1 + +exit $((failures != 0)) From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 16:48:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88A551065670; Sun, 4 Apr 2010 16:48:33 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77B488FC1B; Sun, 4 Apr 2010 16:48:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34GmXF2067898; Sun, 4 Apr 2010 16:48:33 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34GmXqC067897; Sun, 4 Apr 2010 16:48:33 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004041648.o34GmXqC067897@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 4 Apr 2010 16:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206168 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 16:48:33 -0000 Author: jilles Date: Sun Apr 4 16:48:33 2010 New Revision: 206168 URL: http://svn.freebsd.org/changeset/base/206168 Log: sh: Add test for nested arithmetic substitution. Pre-r206145 sh changes nested arithmetic substitution to parentheses, which is not always correct, as exercised by this test. Added: head/tools/regression/bin/sh/expansion/arith5.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/arith5.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/arith5.0 Sun Apr 4 16:48:33 2010 (r206168) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +failures=0 + +check() { + if [ "$2" != "$3" ]; then + failures=$((failures+1)) + echo "For $1, expected $3 actual $2" + fi +} + +unset a +check '$((1+${a:-$((7+2))}))' "$((1+${a:-$((7+2))}))" 10 +check '$((1+${a:=$((2+2))}))' "$((1+${a:=$((2+2))}))" 5 +check '$a' "$a" 4 + +exit $((failures != 0)) From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 21:03:21 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACDB41065670; Sun, 4 Apr 2010 21:03:21 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au [211.29.132.197]) by mx1.freebsd.org (Postfix) with ESMTP id 332828FC0C; Sun, 4 Apr 2010 21:03:20 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149]) by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o34L3IrY030865 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Apr 2010 07:03:19 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o34L3EJZ020091; Mon, 5 Apr 2010 07:03:14 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o34L3EuR020090; Mon, 5 Apr 2010 07:03:14 +1000 (EST) (envelope-from peter) Date: Mon, 5 Apr 2010 07:03:14 +1000 From: Peter Jeremy To: Andriy Gapon Message-ID: <20100404210314.GH86236@server.vk2pj.dyndns.org> References: <201004030839.o338d0VV032828@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDnEQgWzhgf+8aPe" Content-Disposition: inline In-Reply-To: <201004030839.o338d0VV032828@svn.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) X-CMAE-Score: 0 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206129 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 21:03:21 -0000 --dDnEQgWzhgf+8aPe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Apr-03 08:39:00 +0000, Andriy Gapon wrote: >Author: avg >Date: Sat Apr 3 08:39:00 2010 >New Revision: 206129 >URL: http://svn.freebsd.org/changeset/base/206129 > >Log: > vn_stat: take into account va_blocksize when setting st_blksize > =20 > As currently st_blksize is always PAGE_SIZE, it is playing safe to not > use any smaller value. For some cases this might not be optimal, but > at least nothing should get broken. I haven't verified it but, based on a quick look at the change, I suspect this will trigger the problem in bin/144446. Quick summary: db(3) has restrictions on its internal bucket size but initializes it =66rom st_blksize with no sanity checking and ZFS can report blocksizes outside the allowed bucket size range for db(3). --=20 Peter Jeremy --dDnEQgWzhgf+8aPe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAku4/pIACgkQ/opHv/APuIfvfQCdG7RX5Nzp7WF8w9JqV4oBT8dM 5UAAoKe1eBlDcW4jxTW4JeppZVfZ7zns =O8CR -----END PGP SIGNATURE----- --dDnEQgWzhgf+8aPe-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 21:11:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A378C106564A; Sun, 4 Apr 2010 21:11:13 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7C9B58FC0A; Sun, 4 Apr 2010 21:11:12 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA29759; Mon, 05 Apr 2010 00:11:08 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1NyX64-000CmQ-2R; Mon, 05 Apr 2010 00:11:08 +0300 Message-ID: <4BB9006A.8080301@freebsd.org> Date: Mon, 05 Apr 2010 00:11:06 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Peter Jeremy References: <201004030839.o338d0VV032828@svn.freebsd.org> <20100404210314.GH86236@server.vk2pj.dyndns.org> In-Reply-To: <20100404210314.GH86236@server.vk2pj.dyndns.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206129 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 21:11:13 -0000 on 05/04/2010 00:03 Peter Jeremy said the following: > On 2010-Apr-03 08:39:00 +0000, Andriy Gapon wrote: >> Author: avg >> Date: Sat Apr 3 08:39:00 2010 >> New Revision: 206129 >> URL: http://svn.freebsd.org/changeset/base/206129 >> >> Log: >> vn_stat: take into account va_blocksize when setting st_blksize >> >> As currently st_blksize is always PAGE_SIZE, it is playing safe to not >> use any smaller value. For some cases this might not be optimal, but >> at least nothing should get broken. > > I haven't verified it but, based on a quick look at the change, I > suspect this will trigger the problem in bin/144446. Quick summary: > db(3) has restrictions on its internal bucket size but initializes it > from st_blksize with no sanity checking and ZFS can report blocksizes > outside the allowed bucket size range for db(3). > Thank you for pointing this out. If no one objects or provides a better patch, I will commit yours. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 21:27:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B7921065674; Sun, 4 Apr 2010 21:27:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id D890D8FC12; Sun, 4 Apr 2010 21:27:50 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o34LRgNI006133 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Apr 2010 00:27:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o34LRgZ6088214; Mon, 5 Apr 2010 00:27:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o34LRgVJ088213; Mon, 5 Apr 2010 00:27:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 Apr 2010 00:27:42 +0300 From: Kostik Belousov To: Andriy Gapon Message-ID: <20100404212742.GJ2415@deviant.kiev.zoral.com.ua> References: <201004030839.o338d0VV032828@svn.freebsd.org> <20100404210314.GH86236@server.vk2pj.dyndns.org> <4BB9006A.8080301@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SWXyBy1zHAaCX+aB" Content-Disposition: inline In-Reply-To: <4BB9006A.8080301@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Peter Jeremy Subject: Re: svn commit: r206129 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 21:27:51 -0000 --SWXyBy1zHAaCX+aB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 05, 2010 at 12:11:06AM +0300, Andriy Gapon wrote: > on 05/04/2010 00:03 Peter Jeremy said the following: > > On 2010-Apr-03 08:39:00 +0000, Andriy Gapon wrote: > >> Author: avg > >> Date: Sat Apr 3 08:39:00 2010 > >> New Revision: 206129 > >> URL: http://svn.freebsd.org/changeset/base/206129 > >> > >> Log: > >> vn_stat: take into account va_blocksize when setting st_blksize > >> =20 > >> As currently st_blksize is always PAGE_SIZE, it is playing safe to not > >> use any smaller value. For some cases this might not be optimal, but > >> at least nothing should get broken. > >=20 > > I haven't verified it but, based on a quick look at the change, I > > suspect this will trigger the problem in bin/144446. Quick summary: > > db(3) has restrictions on its internal bucket size but initializes it > > from st_blksize with no sanity checking and ZFS can report blocksizes > > outside the allowed bucket size range for db(3). > >=20 >=20 > Thank you for pointing this out. > If no one objects or provides a better patch, I will commit yours. I do not think this is very satisfying solution. Pre-patched libc still suffer from the problem. You cannot run stable/8 libc on this kernel. --SWXyBy1zHAaCX+aB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAku5BE0ACgkQC3+MBN1Mb4i8PACeLAJrwJXYW1GK9k/0c6aWDoE9 VW4An3RkW13AXI7KoamKOB96AnT0uIXi =Dk4l -----END PGP SIGNATURE----- --SWXyBy1zHAaCX+aB-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 22:12:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30273106566C; Sun, 4 Apr 2010 22:12:38 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail17.syd.optusnet.com.au (mail17.syd.optusnet.com.au [211.29.132.198]) by mx1.freebsd.org (Postfix) with ESMTP id ABEA28FC0C; Sun, 4 Apr 2010 22:12:37 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149]) by mail17.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o34MCZPu008494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Apr 2010 08:12:35 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id o34MCWDr020602; Mon, 5 Apr 2010 08:12:32 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id o34MCWjh020601; Mon, 5 Apr 2010 08:12:32 +1000 (EST) (envelope-from peter) Date: Mon, 5 Apr 2010 08:12:32 +1000 From: Peter Jeremy To: Kostik Belousov Message-ID: <20100404221232.GJ86236@server.vk2pj.dyndns.org> References: <201004030839.o338d0VV032828@svn.freebsd.org> <20100404210314.GH86236@server.vk2pj.dyndns.org> <4BB9006A.8080301@freebsd.org> <20100404212742.GJ2415@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iRjOs3ViPWHdlw/I" Content-Disposition: inline In-Reply-To: <20100404212742.GJ2415@deviant.kiev.zoral.com.ua> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.20 (2009-06-14) X-CMAE-Score: 0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon Subject: Re: svn commit: r206129 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 22:12:38 -0000 --iRjOs3ViPWHdlw/I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010-Apr-05 00:27:42 +0300, Kostik Belousov wrote: >On Mon, Apr 05, 2010 at 12:11:06AM +0300, Andriy Gapon wrote: >> on 05/04/2010 00:03 Peter Jeremy said the following: >> > On 2010-Apr-03 08:39:00 +0000, Andriy Gapon wrote: >> >> vn_stat: take into account va_blocksize when setting st_blksize =2E.. >> > I haven't verified it but, based on a quick look at the change, I >> > suspect this will trigger the problem in bin/144446. Quick summary: >> > db(3) has restrictions on its internal bucket size but initializes it >> > from st_blksize with no sanity checking and ZFS can report blocksizes >> > outside the allowed bucket size range for db(3). >>=20 >> Thank you for pointing this out. >> If no one objects or provides a better patch, I will commit yours. > >I do not think this is very satisfying solution. Pre-patched libc >still suffer from the problem. You cannot run stable/8 libc on this >kernel. Firstly, has someone with a post-r206129 kernel verified that it does actually trigger the issue I reported in bin/144446? I'm not in a position to do so easily and it's possible that the problem is masked elsewhere. Also, Kostik's comment is a slight exaggeration: You can't create a db(3) database from scratch in a ZFS filesystem using db(3) defaults. Note that as of now, it's exactly the same situation as running -current libc with a post-r206129 kernel. -current is expected to include occasions of bumpiness so I don't see this as an immediate reason to revert r206129 - though if buildworld or installworld are affected, it at least needs a heads-up. OTOH, I think some care needs to taken over any MFC of this change. At the very least, the db(3) problem needs to be fixed and there probably needs to be an extended shakedown of r206129 to ensure that there aren't any other similar nasties lurking elsewhere. The problem I reported in bin/144446 is a bug in a userland utility and IMHO, it's not the kernel's responsibility to work around userland bugs. --=20 Peter Jeremy --iRjOs3ViPWHdlw/I Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAku5DtAACgkQ/opHv/APuIegqwCfT+ZGgoZyA1TQDgHIHS30qpmx dUUAoLk9nNoBsQhOe1p7Csib8uOpVwtD =/Drm -----END PGP SIGNATURE----- --iRjOs3ViPWHdlw/I-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 23:13:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD4D4106566B; Sun, 4 Apr 2010 23:13:26 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 876FB8FC18; Sun, 4 Apr 2010 23:13:25 +0000 (UTC) Received: by bwz8 with SMTP id 8so2679372bwz.3 for ; Sun, 04 Apr 2010 16:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=jNy5vvkmf5uPe+kn7cm96kcxXZ469iEn73EXN2nzNbk=; b=Upf3453ElwzJJ6aAKPEXWGLBG4Y4jR9bW1HiD2Tqh7BxuzZ5yKekDd+VkoA7TPdOYD MNareDcYm5/hyJ7Td+P/TwlDxPSz+6kGVjfGa8w7cYr4pWOekBI6dOHr2CTXtmQWWymo 3xtcJ4HQaHwgPClFwJw3toAqU0BcPjTppSOLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=rz50ejuPck2UZILTKHInNkzFMgxVhjRUsFY+JnSeNxssfftlfCyAe+K9N3zexSn6zW 9XYgYdvBtBpQK19vyAQr3UtUqmnVs4sk5/4Xutbk6uMy/cbbwvP+A1t6xaY1pG+bnmpR I8osTJimy4eVEZgG1ehskRhR2DUoQqscQ/Dt0= MIME-Version: 1.0 Received: by 10.204.119.11 with HTTP; Sun, 4 Apr 2010 16:13:24 -0700 (PDT) In-Reply-To: <201003271815.o2RIFIKH063154@svn.freebsd.org> References: <201003271815.o2RIFIKH063154@svn.freebsd.org> Date: Mon, 5 Apr 2010 00:13:24 +0100 Received: by 10.204.16.73 with SMTP id n9mr1645941bka.21.1270422804278; Sun, 04 Apr 2010 16:13:24 -0700 (PDT) Message-ID: From: Oliver Pinter To: Edward Tomasz Napierala Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r205772 - in stable/8/sbin/geom: class/cache core X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 23:13:26 -0000 hi! can you this man pages add to 7-STABLE? On 3/27/10, Edward Tomasz Napierala wrote: > Author: trasz > Date: Sat Mar 27 18:15:18 2010 > New Revision: 205772 > URL: http://svn.freebsd.org/changeset/base/205772 > > Log: > MFC r201432: > > Add manual page for gcache(8). > > Added: > stable/8/sbin/geom/class/cache/gcache.8 > - copied unchanged from r201432, head/sbin/geom/class/cache/gcache.8 > Modified: > stable/8/sbin/geom/class/cache/Makefile > stable/8/sbin/geom/core/geom.8 > Directory Properties: > stable/8/sbin/geom/ (props changed) > stable/8/sbin/geom/class/stripe/ (props changed) > > Modified: stable/8/sbin/geom/class/cache/Makefile > ============================================================================== > --- stable/8/sbin/geom/class/cache/Makefile Sat Mar 27 18:12:00 > 2010 (r205771) > +++ stable/8/sbin/geom/class/cache/Makefile Sat Mar 27 18:15:18 > 2010 (r205772) > @@ -3,6 +3,5 @@ > .PATH: ${.CURDIR}/../../misc > > CLASS= cache > -NO_MAN= # notyet > > .include > > Copied: stable/8/sbin/geom/class/cache/gcache.8 (from r201432, > head/sbin/geom/class/cache/gcache.8) > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ stable/8/sbin/geom/class/cache/gcache.8 Sat Mar 27 18:15:18 > 2010 (r205772, copy of r201432, head/sbin/geom/class/cache/gcache.8) > @@ -0,0 +1,192 @@ > +.\"- > +.\" Copyright (c) 2010 Edward Tomasz Napierala > +.\" All rights reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD > BE > +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR > BUSINESS > +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF > THE > +.\" POSSIBILITY OF SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd January 3, 2010 > +.Dt GCACHE 8 > +.Os > +.Sh NAME > +.Nm gcache > +.Nd "control utility for CACHE GEOM class" > +.Sh SYNOPSIS > +.Nm > +.Cm create > +.Op Fl v > +.Op Fl b Ar blocksize > +.Op Fl s Ar size > +.Ar name > +.Ar prov > +.Nm > +.Cm configure > +.Op Fl v > +.Op Fl b Ar blocksize > +.Op Fl s Ar size > +.Ar name > +.Nm > +.Cm destroy > +.Op Fl fv > +.Ar name > +.Nm > +.Cm label > +.Op Fl v > +.Op Fl b Ar blocksize > +.Op Fl s Ar size > +.Ar name > +.Ar prov > +.Nm > +.Cm stop > +.Op Fl fv > +.Ar name ... > +.Nm > +.Cm clear > +.Op Fl v > +.Ar prov ... > +.Nm > +.Cm dump > +.Ar prov ... > +.Nm > +.Cm list > +.Nm > +.Cm status > +.Op Fl s Ar name > +.Nm > +.Cm load > +.Op Fl v > +.Nm > +.Cm unload > +.Op Fl v > +.Sh DESCRIPTION > +The > +.Nm > +utility is used to control GEOM cache, which can > +speed up read performance by sending fixed size > +read requests to its consumer. It has been developed to address > +the problem of a horrible read performance of a 64k blocksize FS > +residing on a RAID3 array with 8 data components, where a single > +disk component would only get 8k read requests, thus effectively > +killing disk performance under high load. > +.Pp > +Caching can be configured using two different methods: > +.Dq manual > +or > +.Dq automatic . > +When using the > +.Dq manual > +method, no metadata are stored on the devices, so the cached > +device has to be configured by hand every time it is needed. > +The > +.Dq automatic > +method uses on-disk metadata to detect devices. > +Once devices are labeled, they will be automatically detected and > +configured. > +.Pp > +The first argument to > +.Nm > +indicates an action to be performed: > +.Bl -tag -width ".Cm destroy" > +.It Cm create > +Cache the given devices with specified > +.Ar name . > +This is the > +.Dq manual > +method. > +The kernel module > +.Pa geom_cache.ko > +will be loaded if it is not loaded already. > +.It Cm label > +Cache the given devices with the specified > +.Ar name . > +This is the > +.Dq automatic > +method, where metadata are stored in every device's last sector. > +The kernel module > +.Pa geom_cache.ko > +will be loaded if it is not loaded already. > +.It Cm stop > +Turn off existing cache device by its > +.Ar name . > +This command does not touch on-disk metadata! > +.It Cm destroy > +Same as > +.Cm stop . > +.It Cm clear > +Clear metadata on the given devices. > +.It Cm dump > +Dump metadata stored on the given devices. > +.It Cm list > +See > +.Xr geom 8 . > +.It Cm status > +See > +.Xr geom 8 . > +.It Cm load > +See > +.Xr geom 8 . > +.It Cm unload > +See > +.Xr geom 8 . > +.El > +.Pp > +Additional options: > +.Bl -tag -width indent > +.It Fl f > +Force the removal of the specified cache device. > +.It Fl v > +Be more verbose. > +.El > +.Sh SYSCTL VARIABLES > +The following > +.Xr sysctl 8 > +variables can be used to control the behavior of the > +.Nm CACHE > +GEOM class. > +The default value is shown next to each variable. > +.Bl -tag -width indent > +.It Va kern.geom.cache.used_hi : No 20 > +.It Va kern.geom.cache.used_lo : No 5 > +.It Va kern.geom.cache.idletime : No 5 > +.It Va kern.geom.cache.timeout : No 10 > +.It Va kern.geom.cache.enable : No 1 > +.It Va kern.geom.cache.debug : No 0 > +Debug level of the > +.Nm CACHE > +GEOM class. > +This can be set to a number between 0 and 3 inclusive. > +If set to 0 minimal debug information is printed, and if set to 3 the > +maximum amount of debug information is printed. > +.El > +.Sh EXIT STATUS > +Exit status is 0 on success, and 1 if the command fails. > +.Sh SEE ALSO > +.Xr geom 4 , > +.Xr geom 8 > +.Sh HISTORY > +The > +.Nm > +utility appeared in > +.Fx 7.0 . > +.Sh AUTHORS > +.An Ruslan Ermilov Aq ru@FreeBSD.org > > Modified: stable/8/sbin/geom/core/geom.8 > ============================================================================== > --- stable/8/sbin/geom/core/geom.8 Sat Mar 27 18:12:00 2010 (r205771) > +++ stable/8/sbin/geom/core/geom.8 Sat Mar 27 18:15:18 2010 (r205772) > @@ -166,7 +166,7 @@ geom md unload > .Sh SEE ALSO > .Xr libgeom 3 , > .Xr geom 4 , > -.\" .Xr gcache 8 , > +.Xr gcache 8 , > .Xr gconcat 8 , > .Xr geli 8 , > .Xr gjournal 8 , > _______________________________________________ > svn-src-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Sun Apr 4 23:19:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D4971065674; Sun, 4 Apr 2010 23:19:11 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1C58FC1A; Sun, 4 Apr 2010 23:19:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o34NJBX7053230; Sun, 4 Apr 2010 23:19:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o34NJB3R053228; Sun, 4 Apr 2010 23:19:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004042319.o34NJB3R053228@svn.freebsd.org> From: Rick Macklem Date: Sun, 4 Apr 2010 23:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206170 - head/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Apr 2010 23:19:11 -0000 Author: rmacklem Date: Sun Apr 4 23:19:11 2010 New Revision: 206170 URL: http://svn.freebsd.org/changeset/base/206170 Log: Harden the experimental NFS server a little, by adding extra checks in the readdir functions for non-positive byte count arguments. For the negative case, set it to the maximum allowable, since it was actually a large positive value (unsigned) on the wire. Also, fix up the readdir function comment a bit. Suggested by: dillon AT apollo.backplane.com MFC after: 2 weeks Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 4 23:12:03 2010 (r206169) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 4 23:19:11 2010 (r206170) @@ -1397,24 +1397,16 @@ nfsvno_fillattr(struct nfsrv_descript *n * nfs readdir service * - mallocs what it thinks is enough to read * count rounded up to a multiple of DIRBLKSIZ <= NFS_MAXREADDIR - * - calls nfsvno_readdir() + * - calls VOP_READDIR() * - loops around building the reply * if the output generated exceeds count break out of loop * The NFSM_CLGET macro is used here so that the reply will be packed * tightly in mbuf clusters. - * - it only knows that it has encountered eof when the nfsvno_readdir() - * reads nothing - * - as such one readdir rpc will return eof false although you are there - * and then the next will return eof * - it trims out records with d_fileno == 0 * this doesn't matter for Unix clients, but they might confuse clients * for other os'. * - it trims out records with d_type == DT_WHT * these cannot be seen through NFS (unless we extend the protocol) - * NB: It is tempting to set eof to true if the nfsvno_readdir() reads less - * than requested, but this may not apply to all filesystems. For - * example, client NFS does not { although it is never remote mounted - * anyhow } * The alternate call nfsrvd_readdirplus() does lookups as well. * PS: The NFS protocol spec. does not clarify what the "count" byte * argument is a count of.. just name strings and file id's or the @@ -1456,7 +1448,7 @@ nfsrvd_readdir(struct nfsrv_descript *nd } toff = off; cnt = fxdr_unsigned(int, *tl); - if (cnt > NFS_SRVMAXDATA(nd)) + if (cnt > NFS_SRVMAXDATA(nd) || cnt < 0) cnt = NFS_SRVMAXDATA(nd); siz = ((cnt + DIRBLKSIZ - 1) & ~(DIRBLKSIZ - 1)); fullsiz = siz; @@ -1474,6 +1466,13 @@ nfsrvd_readdir(struct nfsrv_descript *nd nd->nd_repstat = NFSERR_BAD_COOKIE; #endif } + if (nd->nd_repstat == 0 && cnt == 0) { + if (nd->nd_flag & ND_NFSV2) + /* NFSv2 does not have NFSERR_TOOSMALL */ + nd->nd_repstat = EPERM; + else + nd->nd_repstat = NFSERR_TOOSMALL; + } if (!nd->nd_repstat) nd->nd_repstat = nfsvno_accchk(vp, VEXEC, nd->nd_cred, exp, p, NFSACCCHK_NOOVERRIDE, @@ -1696,7 +1695,7 @@ nfsrvd_readdirplus(struct nfsrv_descript * Use the server's maximum data transfer size as the upper bound * on reply datalen. */ - if (cnt > NFS_SRVMAXDATA(nd)) + if (cnt > NFS_SRVMAXDATA(nd) || cnt < 0) cnt = NFS_SRVMAXDATA(nd); /* @@ -1705,7 +1704,7 @@ nfsrvd_readdirplus(struct nfsrv_descript * so I set it to cnt for that case. I also round it up to the * next multiple of DIRBLKSIZ. */ - if (siz == 0) + if (siz <= 0) siz = cnt; siz = ((siz + DIRBLKSIZ - 1) & ~(DIRBLKSIZ - 1)); From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 03:56:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E09B61065673 for ; Mon, 5 Apr 2010 03:56:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 8493D8FC19 for ; Mon, 5 Apr 2010 03:56:30 +0000 (UTC) Received: (qmail 22498 invoked by uid 399); 5 Apr 2010 03:56:29 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Apr 2010 03:56:29 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BB95F6C.7070202@FreeBSD.org> Date: Sun, 04 Apr 2010 20:56:28 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: Jilles Tjoelker References: <201003282019.o2SKJfPg033857@svn.freebsd.org> <4BAFBBFA.7020701@FreeBSD.org> <20100328210630.GA2086@stack.nl> <4BAFE1EE.9040908@FreeBSD.org> <20100329173214.GA17249@stack.nl> In-Reply-To: <20100329173214.GA17249@stack.nl> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: multipart/mixed; boundary="------------070707050009090200000503" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r205806 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 03:56:31 -0000 This is a multi-part message in MIME format. --------------070707050009090200000503 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 03/29/10 10:32, Jilles Tjoelker wrote: > On Sun, Mar 28, 2010 at 04:10:38PM -0700, Doug Barton wrote: >> On 03/28/10 14:06, Jilles Tjoelker wrote: >>> On Sun, Mar 28, 2010 at 01:28:42PM -0700, Doug Barton wrote: >>>> Probably my fault for not saying something sooner, but there is a >>>> problem with the code in head that sometimes causes it to loop >>>> repeatedly even though pwait exits successfully. I am trying to track it >>>> down, but since it only happens about once every 10 shutdowns it's been >>>> difficult. > >>> There is a difference between the two methods in what is waited for >>> exactly. pwait(1) will wait for the process to terminate; if it is >>> applied to a zombie it will return immediately (printing the exit status >>> if -v was given). On the other hand, kill(1) will continue to return >>> success until the process has been waited for by its parent. > >> The process that I see this with most often is devd, does that fit the >> model you're describing? > > Possibly. This would mainly happen because init has been busy, I think > (or if the parent isn't init). > >> What are the implications of moving on after a >> successful pwait even though there is still a zombie process? > > For shutdown/stop, nothing. > > For restart, there may be problems if a restarted daemon checks the > validity of the pid in the pidfile using kill(). Ok, in that case I'm not really comfortable with the idea of ignoring the results of kill -0, however I've come up with what I think is a good solution in the attached patch. Based on your description and my ongoing analysis the problem I was seeing with the long string of the same pid repeated over and over seems to be a side effect of pwait returning successfully (thus the || sleep 2 never kicks in) but 'kill -0' still being able to see the pid. So, I've moved the sleep up so that if we're not in the first pass but kill -0 is still seeing the pid that we sleep for 1 second, then proceed. I think that'll handle both the problem I saw, and the odd case where pwait doesn't return successfully. Sound good? Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ --------------070707050009090200000503 Content-Type: text/plain; name="wait_for_pids.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="wait_for_pids.diff" Index: rc.subr =================================================================== --- rc.subr (revision 206117) +++ rc.subr (working copy) @@ -359,12 +359,14 @@ if [ -z "$_list" ]; then return fi - _prefix= + + local _prefix= while true; do _nlist=""; for _j in $_list; do if kill -0 $_j 2>/dev/null; then _nlist="${_nlist}${_nlist:+ }$_j" + [ -n "$_prefix" ] && sleep 1 fi done if [ -z "$_nlist" ]; then @@ -373,7 +375,7 @@ _list=$_nlist echo -n ${_prefix:-"Waiting for PIDS: "}$_list _prefix=", " - pwait $_list 2>/dev/null || sleep 2 + pwait $_list 2>/dev/null done if [ -n "$_prefix" ]; then echo "." --------------070707050009090200000503-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 06:23:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7476106566B; Mon, 5 Apr 2010 06:23:31 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6D6A8FC08; Mon, 5 Apr 2010 06:23:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o356NVVK046406; Mon, 5 Apr 2010 06:23:31 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o356NVPo046404; Mon, 5 Apr 2010 06:23:31 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004050623.o356NVPo046404@svn.freebsd.org> From: Alan Cox Date: Mon, 5 Apr 2010 06:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206174 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 06:23:31 -0000 Author: alc Date: Mon Apr 5 06:23:31 2010 New Revision: 206174 URL: http://svn.freebsd.org/changeset/base/206174 Log: vm_reserv_alloc_page() should never be called on an OBJT_SG object, just as it is never called on an OBJT_DEVICE object. (This change should have been included in r195840.) Reported by: dougb@, avg@ MFC after: 3 days Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Apr 5 01:51:11 2010 (r206173) +++ head/sys/vm/vm_page.c Mon Apr 5 06:23:31 2010 (r206174) @@ -1084,6 +1084,7 @@ vm_page_alloc(vm_object_t object, vm_pin return (NULL); #if VM_NRESERVLEVEL > 0 } else if (object == NULL || object->type == OBJT_DEVICE || + object->type == OBJT_SG || (object->flags & OBJ_COLORED) == 0 || (m = vm_reserv_alloc_page(object, pindex)) == NULL) { #else From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 08:27:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99C9F1065675; Mon, 5 Apr 2010 08:27:15 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 57FDB8FC0C; Mon, 5 Apr 2010 08:27:13 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA04757; Mon, 05 Apr 2010 11:27:08 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1NyheF-000FFr-Va; Mon, 05 Apr 2010 11:27:08 +0300 Message-ID: <4BB99EDB.8030105@freebsd.org> Date: Mon, 05 Apr 2010 11:27:07 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Peter Jeremy References: <201004030839.o338d0VV032828@svn.freebsd.org> <20100404210314.GH86236@server.vk2pj.dyndns.org> <4BB9006A.8080301@freebsd.org> <20100404212742.GJ2415@deviant.kiev.zoral.com.ua> <20100404221232.GJ86236@server.vk2pj.dyndns.org> In-Reply-To: <20100404221232.GJ86236@server.vk2pj.dyndns.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206129 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 08:27:15 -0000 on 05/04/2010 01:12 Peter Jeremy said the following: > On 2010-Apr-05 00:27:42 +0300, Kostik Belousov wrote: >> On Mon, Apr 05, 2010 at 12:11:06AM +0300, Andriy Gapon wrote: >>> on 05/04/2010 00:03 Peter Jeremy said the following: >>>> On 2010-Apr-03 08:39:00 +0000, Andriy Gapon wrote: >>>>> vn_stat: take into account va_blocksize when setting st_blksize > ... >>>> I haven't verified it but, based on a quick look at the change, I >>>> suspect this will trigger the problem in bin/144446. Quick summary: >>>> db(3) has restrictions on its internal bucket size but initializes it >>>> from st_blksize with no sanity checking and ZFS can report blocksizes >>>> outside the allowed bucket size range for db(3). >>> Thank you for pointing this out. >>> If no one objects or provides a better patch, I will commit yours. >> I do not think this is very satisfying solution. Pre-patched libc >> still suffer from the problem. You cannot run stable/8 libc on this >> kernel. > > Firstly, has someone with a post-r206129 kernel verified that it > does actually trigger the issue I reported in bin/144446? I'm not > in a position to do so easily and it's possible that the problem > is masked elsewhere. Sorry for my lack of knowledge, but what is the best way to test this? As I understand, a new db needs to be initialized in an existing file? > Also, Kostik's comment is a slight exaggeration: You can't create a > db(3) database from scratch in a ZFS filesystem using db(3) defaults. > Note that as of now, it's exactly the same situation as running > -current libc with a post-r206129 kernel. Additionally, as noted above (and if I am not mistaken), the problem would manifest itself when creating a new db in an existing file and the file has to be large enough. > -current is expected to include occasions of bumpiness so I don't see > this as an immediate reason to revert r206129 - though if buildworld > or installworld are affected, it at least needs a heads-up. OTOH, I > think some care needs to taken over any MFC of this change. At the > very least, the db(3) problem needs to be fixed and there probably > needs to be an extended shakedown of r206129 to ensure that there > aren't any other similar nasties lurking elsewhere. I agree about the MFC. > The problem I reported in bin/144446 is a bug in a userland utility > and IMHO, it's not the kernel's responsibility to work around userland > bugs. But Kostik has a good point here. Value of st_blksize is kind of interface from kernel to userland and when it's changing it could be considered an A?I change with all the release engineering consequences. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 09:17:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E357106564A; Mon, 5 Apr 2010 09:17:19 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 04CB88FC1B; Mon, 5 Apr 2010 09:17:17 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA05163; Mon, 05 Apr 2010 12:17:13 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1NyiQi-000FHX-NL; Mon, 05 Apr 2010 12:17:12 +0300 Message-ID: <4BB9AA98.1000701@freebsd.org> Date: Mon, 05 Apr 2010 12:17:12 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Peter Jeremy , Kostik Belousov References: <201004030839.o338d0VV032828@svn.freebsd.org> <20100404210314.GH86236@server.vk2pj.dyndns.org> <4BB9006A.8080301@freebsd.org> <20100404212742.GJ2415@deviant.kiev.zoral.com.ua> <20100404221232.GJ86236@server.vk2pj.dyndns.org> <4BB99EDB.8030105@freebsd.org> In-Reply-To: <4BB99EDB.8030105@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206129 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 09:17:19 -0000 on 05/04/2010 11:27 Andriy Gapon said the following: > Additionally, as noted above (and if I am not mistaken), the problem would > manifest itself when creating a new db in an existing file and the file has to > be large enough. OK, this is a nonsense, I misunderstood the code. The problem should manifest itself upon creating a new hash db in a (new) file. E.g. something like: dbopen("filename", O_RDWR | ..., ..., DB_HASH, ...) The good news is that the last optional argument (as in can be NULL) to dbopen provides overrides for certain parameters including block size. And it seems that in all places where dbopen is used by FreeBSD userland utilities in the above fashion, that last argument is indeed specified and has a sufficiently small block size value. And I've been wondering why I have never seen any problems with this change locally - I've been using it for quite a while before committing it. P.S. here is a command that I used for searching: $ find . -name "*.c" | xargs fgrep -w -A1 dbopen /dev/null | grep -v '^--' | paste - - | fgrep DB_HASH | fgrep O_RDWR -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 09:24:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C62D5106566C; Mon, 5 Apr 2010 09:24:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B60D48FC14; Mon, 5 Apr 2010 09:24:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o359OO7l086007; Mon, 5 Apr 2010 09:24:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o359OOuZ086005; Mon, 5 Apr 2010 09:24:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004050924.o359OOuZ086005@svn.freebsd.org> From: Andriy Gapon Date: Mon, 5 Apr 2010 09:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206175 - head/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 09:24:24 -0000 Author: avg Date: Mon Apr 5 09:24:24 2010 New Revision: 206175 URL: http://svn.freebsd.org/changeset/base/206175 Log: indent.pro example: correctly place -ta option The options are sorted, leading 'n' (for 'off') should be ignored. Pointed out by: bde MFC after: 7 days Modified: head/share/examples/indent/indent.pro Modified: head/share/examples/indent/indent.pro ============================================================================== --- head/share/examples/indent/indent.pro Mon Apr 5 06:23:31 2010 (r206174) +++ head/share/examples/indent/indent.pro Mon Apr 5 09:24:24 2010 (r206175) @@ -15,5 +15,4 @@ -TSLIST_HEAD -TSLIST_ENTRY -bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj --ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -nv --ta +-ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -ta -nv From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 09:26:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FA47106564A; Mon, 5 Apr 2010 09:26:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3BDA8FC2F; Mon, 5 Apr 2010 09:26:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o359Q3cf086403; Mon, 5 Apr 2010 09:26:03 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o359Q3Sm086401; Mon, 5 Apr 2010 09:26:03 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004050926.o359Q3Sm086401@svn.freebsd.org> From: Andriy Gapon Date: Mon, 5 Apr 2010 09:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206176 - head/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 09:26:04 -0000 Author: avg Date: Mon Apr 5 09:26:03 2010 New Revision: 206176 URL: http://svn.freebsd.org/changeset/base/206176 Log: indent.pro example: put all options one per line This should help with modification tracking. Discussed with: bde MFC after: 7 days Modified: head/share/examples/indent/indent.pro Modified: head/share/examples/indent/indent.pro ============================================================================== --- head/share/examples/indent/indent.pro Mon Apr 5 09:24:24 2010 (r206175) +++ head/share/examples/indent/indent.pro Mon Apr 5 09:26:03 2010 (r206176) @@ -14,5 +14,33 @@ -TSTAILQ_ENTRY -TSLIST_HEAD -TSLIST_ENTRY --bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -ndj --ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -ta -nv +-bad +-bap +-nbbb +-nbc +-br +-nbs +-c41 +-cd41 +-cdb +-ce +-ci4 +-cli0 +-d0 +-di8 +-ndj +-ei +-nfc1 +-nfcb +-i8 +-ip8 +-l79 +-lc77 +-ldi0 +-nlp +-npcs +-psl +-sc +-nsob +-ta +-nv From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 09:34:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0F9C1065672; Mon, 5 Apr 2010 09:34:57 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 22F128FC13; Mon, 5 Apr 2010 09:34:56 +0000 (UTC) Received: by qyk11 with SMTP id 11so3793308qyk.13 for ; Mon, 05 Apr 2010 02:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=O0DziPVMemi2w5DIABFriNYrZ1BkZBLRT5sDGG7/eOw=; b=hIdIjYQMrbV7ImoHNj1tuxEhon4+6JXf9wbmVhYw218qID+wSn8IUL43i+K7A/gNKG XLXVv3bWMhStOCkW1tL2UcOK3tGRUvWEnxGtkSYI6ltDuL7U+jfzwtAWJ15Pa5u7IXyV 5aDuJlh3z9aelMjPQ8Exl5RjjAmgbJ8aBvKI4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Gsozgm4nOgAKirrHW0O7qwhC2K/f1eUVnTiaR/xq4JfjPPS4lmca1Ja45mtpjF0Onl UMaMxRbEwOaJ5Lzwi9DegxuXdlYhCy/Igb88x7+zvV5Rlqqg2h+iyR/ONMLLmyUfYRT0 H1z1Qiq/gNb6enUhDhY7E2enAegs+YqM7oNIA= MIME-Version: 1.0 Received: by 10.229.33.72 with HTTP; Mon, 5 Apr 2010 02:34:56 -0700 (PDT) In-Reply-To: <201004050926.o359Q3Sm086401@svn.freebsd.org> References: <201004050926.o359Q3Sm086401@svn.freebsd.org> Date: Mon, 5 Apr 2010 02:34:56 -0700 Received: by 10.229.221.78 with SMTP id ib14mr8946576qcb.28.1270460096364; Mon, 05 Apr 2010 02:34:56 -0700 (PDT) Message-ID: From: Garrett Cooper To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206176 - head/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 09:34:58 -0000 On Mon, Apr 5, 2010 at 2:26 AM, Andriy Gapon wrote: > Author: avg > Date: Mon Apr =A05 09:26:03 2010 > New Revision: 206176 > URL: http://svn.freebsd.org/changeset/base/206176 > > Log: > =A0indent.pro example: put all options one per line > > =A0This should help with modification tracking. > > =A0Discussed with: =A0 =A0 =A0 bde > =A0MFC after: =A0 =A07 days > > Modified: > =A0head/share/examples/indent/indent.pro > > Modified: head/share/examples/indent/indent.pro > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/examples/indent/indent.pro =A0 =A0 =A0 Mon Apr =A05 09:24:= 24 2010 =A0 =A0 =A0 =A0(r206175) > +++ head/share/examples/indent/indent.pro =A0 =A0 =A0 Mon Apr =A05 09:26:= 03 2010 =A0 =A0 =A0 =A0(r206176) > @@ -14,5 +14,33 @@ > =A0-TSTAILQ_ENTRY > =A0-TSLIST_HEAD > =A0-TSLIST_ENTRY > --bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -di8 -n= dj > --ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nsob -ta = -nv > +-bad > +-bap > +-nbbb > +-nbc > +-br > +-nbs > +-c41 > +-cd41 > +-cdb > +-ce > +-ci4 > +-cli0 > +-d0 > +-di8 > +-ndj > +-ei > +-nfc1 > +-nfcb > +-i8 > +-ip8 > +-l79 > +-lc77 > +-ldi0 > +-nlp > +-npcs > +-psl > +-sc > +-nsob > +-ta > +-nv Isn't doing something like this going to make merge collisions more prevalent? Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 09:48:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8644106564A; Mon, 5 Apr 2010 09:48:03 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1D0618FC12; Mon, 5 Apr 2010 09:48:01 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA05462; Mon, 05 Apr 2010 12:47:59 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1NyiuV-000FIy-4t; Mon, 05 Apr 2010 12:47:59 +0300 Message-ID: <4BB9B1CE.2060102@freebsd.org> Date: Mon, 05 Apr 2010 12:47:58 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Garrett Cooper References: <201004050926.o359Q3Sm086401@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206176 - head/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 09:48:03 -0000 on 05/04/2010 12:34 Garrett Cooper said the following: > On Mon, Apr 5, 2010 at 2:26 AM, Andriy Gapon wrote: >> Author: avg >> Date: Mon Apr 5 09:26:03 2010 >> New Revision: 206176 >> URL: http://svn.freebsd.org/changeset/base/206176 [snip] >> +-sc >> +-nsob >> +-ta >> +-nv > > Isn't doing something like this going to make merge collisions > more prevalent? Not sure if I am following you. Do you suggest that it's easier to merge multiple changes to the same line than multiple changes on the separate lines? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 10:01:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36EE8106567B; Mon, 5 Apr 2010 10:01:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26D5E8FC14; Mon, 5 Apr 2010 10:01:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35A1sDn094327; Mon, 5 Apr 2010 10:01:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35A1sE3094325; Mon, 5 Apr 2010 10:01:54 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004051001.o35A1sE3094325@svn.freebsd.org> From: Andriy Gapon Date: Mon, 5 Apr 2010 10:01:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206177 - head/lib/libc/db/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 10:01:54 -0000 Author: avg Date: Mon Apr 5 10:01:53 2010 New Revision: 206177 URL: http://svn.freebsd.org/changeset/base/206177 Log: hash.3: fix a factual mistake in the man page PR: bin/144446 Submitted by: Peter Jeremy MFC after: 3 days Modified: head/lib/libc/db/man/hash.3 Modified: head/lib/libc/db/man/hash.3 ============================================================================== --- head/lib/libc/db/man/hash.3 Mon Apr 5 09:26:03 2010 (r206176) +++ head/lib/libc/db/man/hash.3 Mon Apr 5 10:01:53 2010 (r206177) @@ -78,7 +78,7 @@ The element defines the .Nm -table bucket size, and is, by default, 256 bytes. +table bucket size, and is, by default, 4096 bytes. It may be preferable to increase the page size for disk-resident tables and tables with large data items. .It Va ffactor From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 10:12:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CD34106566B; Mon, 5 Apr 2010 10:12:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C7388FC15; Mon, 5 Apr 2010 10:12:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35ACLqo096655; Mon, 5 Apr 2010 10:12:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35ACLYD096652; Mon, 5 Apr 2010 10:12:21 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004051012.o35ACLYD096652@svn.freebsd.org> From: Andriy Gapon Date: Mon, 5 Apr 2010 10:12:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206178 - head/lib/libc/db/hash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 10:12:21 -0000 Author: avg Date: Mon Apr 5 10:12:21 2010 New Revision: 206178 URL: http://svn.freebsd.org/changeset/base/206178 Log: libc/db/hash: cap auto-tuned block size with a value that actually works This fix mostly matters after r206129 that made it possible for st_blksize to be greater than 4K. For this reason, this change should be MFC-ed before r206129. Also, it seems that all FreeBSD uitlities that use db(3) hash databases and create new databases in files, specify their own block size value and thus do not depend on block size autotuning. PR: bin/144446 Submitted by: Peter Jeremy MFC after: 5 days Modified: head/lib/libc/db/hash/hash.c head/lib/libc/db/hash/hash.h Modified: head/lib/libc/db/hash/hash.c ============================================================================== --- head/lib/libc/db/hash/hash.c Mon Apr 5 10:01:53 2010 (r206177) +++ head/lib/libc/db/hash/hash.c Mon Apr 5 10:12:21 2010 (r206178) @@ -293,6 +293,8 @@ init_hash(HTAB *hashp, const char *file, if (stat(file, &statbuf)) return (NULL); hashp->BSIZE = statbuf.st_blksize; + if (hashp->BSIZE > MAX_BSIZE) + hashp->BSIZE = MAX_BSIZE; hashp->BSHIFT = __log2(hashp->BSIZE); } Modified: head/lib/libc/db/hash/hash.h ============================================================================== --- head/lib/libc/db/hash/hash.h Mon Apr 5 10:01:53 2010 (r206177) +++ head/lib/libc/db/hash/hash.h Mon Apr 5 10:12:21 2010 (r206178) @@ -118,7 +118,7 @@ typedef struct htab { /* Memory reside /* * Constants */ -#define MAX_BSIZE 65536 /* 2^16 */ +#define MAX_BSIZE 32768 /* 2^15 but should be 65536 */ #define MIN_BUFFERS 6 #define MINHDRSIZE 512 #define DEF_BUFSIZE 65536 /* 64 K */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 11:00:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A2C4106567A; Mon, 5 Apr 2010 11:00:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A1168FC1D; Mon, 5 Apr 2010 11:00:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35B0MwS009046; Mon, 5 Apr 2010 11:00:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35B0MsK009044; Mon, 5 Apr 2010 11:00:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004051100.o35B0MsK009044@svn.freebsd.org> From: Warner Losh Date: Mon, 5 Apr 2010 11:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206179 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 11:00:22 -0000 Author: imp Date: Mon Apr 5 11:00:21 2010 New Revision: 206179 URL: http://svn.freebsd.org/changeset/base/206179 Log: Add missing @ to the NORMAL_CTFCONVERT line to keep it from appearing in the output. Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Apr 5 10:12:21 2010 (r206178) +++ head/sys/conf/kern.pre.mk Mon Apr 5 11:00:21 2010 (r206179) @@ -128,7 +128,7 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c -NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +NORMAL_CTFCONVERT= @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 11:02:11 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E992106566B; Mon, 5 Apr 2010 11:02:11 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 00E8E8FC13; Mon, 5 Apr 2010 11:02:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o35As4AN092959; Mon, 5 Apr 2010 04:54:05 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 05 Apr 2010 04:49:39 -0600 (MDT) Message-Id: <20100405.044939.260300876916215875.imp@bsdimp.com> To: yanefbsd@gmail.com From: "M. Warner Losh" In-Reply-To: References: <201004050926.o359Q3Sm086401@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, avg@FreeBSD.org Subject: Re: svn commit: r206176 - head/share/examples/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 11:02:11 -0000 In message: Garrett Cooper writes: : On Mon, Apr 5, 2010 at 2:26 AM, Andriy Gapon wrote:= : > Author: avg : > Date: Mon Apr =A05 09:26:03 2010 : > New Revision: 206176 : > URL: http://svn.freebsd.org/changeset/base/206176 : > : > Log: : > =A0indent.pro example: put all options one per line : > : > =A0This should help with modification tracking. : > : > =A0Discussed with: =A0 =A0 =A0 bde : > =A0MFC after: =A0 =A07 days : > : > Modified: : > =A0head/share/examples/indent/indent.pro : > : > Modified: head/share/examples/indent/indent.pro : > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D : > --- head/share/examples/indent/indent.pro =A0 =A0 =A0 Mon Apr =A05 = 09:24:24 2010 =A0 =A0 =A0 =A0(r206175) : > +++ head/share/examples/indent/indent.pro =A0 =A0 =A0 Mon Apr =A05 = 09:26:03 2010 =A0 =A0 =A0 =A0(r206176) : > @@ -14,5 +14,33 @@ : > =A0-TSTAILQ_ENTRY : > =A0-TSLIST_HEAD : > =A0-TSLIST_ENTRY : > --bad -bap -nbbb -nbc -br -nbs -c41 -cd41 -cdb -ce -ci4 -cli0 -d0 -= di8 -ndj : > --ei -nfc1 -nfcb -i8 -ip8 -l79 -lc77 -ldi0 -nlp -npcs -psl -sc -nso= b -ta -nv : > +-bad : > +-bap : > +-nbbb : > +-nbc : > +-br : > +-nbs : > +-c41 : > +-cd41 : > +-cdb : > +-ce : > +-ci4 : > +-cli0 : > +-d0 : > +-di8 : > +-ndj : > +-ei : > +-nfc1 : > +-nfcb : > +-i8 : > +-ip8 : > +-l79 : > +-lc77 : > +-ldi0 : > +-nlp : > +-npcs : > +-psl : > +-sc : > +-nsob : > +-ta : > +-nv : = : Isn't doing something like this going to make merge collisions : more prevalent? Actually, it will allow merging more easily. If I wanted to add -nld to the list and joe wanted to add -l4d, then those would be on lines by themselves (which makes merging easier) rather than on the same line (which makes merging impossible with today's tools). Warner From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 12:31:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 011DC106566B; Mon, 5 Apr 2010 12:31:37 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id A40248FC13; Mon, 5 Apr 2010 12:31:36 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CB1A.dip.t-dialin.net [217.226.203.26]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id B9050844267; Mon, 5 Apr 2010 14:31:29 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 4EEFA5147; Mon, 5 Apr 2010 14:31:24 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o35CVOoE046824; Mon, 5 Apr 2010 14:31:24 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from p5DD456EA.dip.t-dialin.net (p5DD456EA.dip.t-dialin.net [93.212.86.234]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 05 Apr 2010 14:31:23 +0200 Message-ID: <20100405143123.14716pelm4tos2kg@webmail.leidinger.net> Date: Mon, 05 Apr 2010 14:31:23 +0200 From: Alexander Leidinger To: Kostik Belousov References: <201004020655.o326tWax079882@svn.freebsd.org> <20100404153653.GD2415@deviant.kiev.zoral.com.ua> In-Reply-To: <20100404153653.GD2415@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: B9050844267.C6D73 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1271075491.99263@cy9MJSzsnns1B8CoyelW8A X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 12:31:37 -0000 Quoting Kostik Belousov (from Sun, 4 Apr 2010 18:36:53 +0300): > On Fri, Apr 02, 2010 at 06:55:32AM +0000, Alexander Leidinger wrote: >> Author: netchild >> Date: Fri Apr 2 06:55:31 2010 >> New Revision: 206082 >> URL: http://svn.freebsd.org/changeset/base/206082 >> >> Log: >> WITH_CTF can now be specified in src.conf (not recommended, there >> are some problems with static executables), make.conf (would also >> affect ports which do not use GNU make and do not override the >> compile targets) or in the kernel config (via "makeoptions >> WITH_CTF=yes"). > > I think this commit started the kernel build to emit lines like this > [ -z "ctfconvert" -o -n "1" ] || ctfconvert -L VERSION -g vm_init.o > after compilation of each file from the kernel (but not modules) > source. Could you, please, look for missed '@' ? I just reviewed the diff again and there is only one place where no @ is, this is for NORMAL_CTFCONVERT. Before I committed the patch, I searched where it is used, but I didn't find a place where it is used. Maybe I overlooked something (I didn't review the Makfile which is generated by running the config program on the kernel-config, and I will not get time to do this today). Can you please confirm that you did an installworld before building the kernel? Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 BOFH excuse #396: Mail server hit by UniSpammer From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 13:33:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20A271065694; Mon, 5 Apr 2010 13:33:55 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F1EA8FC16; Mon, 5 Apr 2010 13:33:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35DXs2d042654; Mon, 5 Apr 2010 13:33:54 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35DXs5X042651; Mon, 5 Apr 2010 13:33:54 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004051333.o35DXs5X042651@svn.freebsd.org> From: Randall Stewart Date: Mon, 5 Apr 2010 13:33:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206180 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 13:33:55 -0000 Author: rrs Date: Mon Apr 5 13:33:54 2010 New Revision: 206180 URL: http://svn.freebsd.org/changeset/base/206180 Log: MFC of 204670: ------------------------- sched_getparam was just plain broke for time-share processes. It did not return an error but instead just let garbage be passed back. This I fix so it actually properly translates the priority the process is at to a posix's high means more priority. I also fix it so that if the ULE scheduler has bumped it up to a realtime process you get back a sane value i.e. the highest priority (63 for time-share). sched_setscheduler() had the setting of the timeshare class priority disabled. With some notes about rejecting the posix high numbers is greater priority and use nice instead. This fix also adjusts that to work, with the cavet that a t-s process may well get bumped up or down i.e. the setscheduler() will NOT change the nice value only the current priority. I think this is reasonable considering if the user wants to play with nice then he can. At least all the posix'ish interfaces now respond sanely. ----------------------- Modified: stable/8/sys/kern/kern_resource.c stable/8/sys/kern/ksched.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/kern/kern_resource.c ============================================================================== --- stable/8/sys/kern/kern_resource.c Mon Apr 5 11:00:21 2010 (r206179) +++ stable/8/sys/kern/kern_resource.c Mon Apr 5 13:33:54 2010 (r206180) @@ -471,14 +471,20 @@ rtp_to_pri(struct rtprio *rtp, struct th u_char newpri; u_char oldpri; - if (rtp->prio > RTP_PRIO_MAX) - return (EINVAL); thread_lock(td); switch (RTP_PRIO_BASE(rtp->type)) { case RTP_PRIO_REALTIME: + if (rtp->prio > RTP_PRIO_MAX) { + thread_unlock(td); + return (EINVAL); + } newpri = PRI_MIN_REALTIME + rtp->prio; break; case RTP_PRIO_NORMAL: + if (rtp->prio > (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE)) { + thread_unlock(td); + return (EINVAL); + } newpri = PRI_MIN_TIMESHARE + rtp->prio; break; case RTP_PRIO_IDLE: Modified: stable/8/sys/kern/ksched.c ============================================================================== --- stable/8/sys/kern/ksched.c Mon Apr 5 11:00:21 2010 (r206179) +++ stable/8/sys/kern/ksched.c Mon Apr 5 13:33:54 2010 (r206180) @@ -81,9 +81,8 @@ ksched_detach(struct ksched *ks) * higher priority. It also permits sched_setparam to be * implementation defined for SCHED_OTHER. I don't like * the notion of inverted priorites for normal processes when - * you can use "setpriority" for that. + * you can use "setpriority" for that. * - * I'm rejecting sched_setparam for SCHED_OTHER with EINVAL. */ /* Macros to convert between the unix (lower numerically is higher priority) @@ -93,6 +92,9 @@ ksched_detach(struct ksched *ks) #define p4prio_to_rtpprio(P) (RTP_PRIO_MAX - (P)) #define rtpprio_to_p4prio(P) (RTP_PRIO_MAX - (P)) +#define p4prio_to_tsprio(P) ((PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE) - (P)) +#define tsprio_to_p4prio(P) ((PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE) - (P)) + /* These improve readability a bit for me: */ #define P1B_PRIO_MIN rtpprio_to_p4prio(RTP_PRIO_MAX) @@ -134,9 +136,6 @@ ksched_setparam(struct ksched *ksched, if (e == 0) { - if (policy == SCHED_OTHER) - e = EINVAL; - else e = ksched_setscheduler(ksched, td, policy, param); } @@ -152,7 +151,16 @@ ksched_getparam(struct ksched *ksched, pri_to_rtp(td, &rtp); if (RTP_PRIO_IS_REALTIME(rtp.type)) param->sched_priority = rtpprio_to_p4prio(rtp.prio); - + else { + if (PRI_MIN_TIMESHARE < rtp.prio) + /* + * The interactive score has it to min realtime + * so we must show max (64 most likely + */ + param->sched_priority = (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE); + else + param->sched_priority = tsprio_to_p4prio(rtp.prio); + } return 0; } @@ -191,11 +199,14 @@ ksched_setscheduler(struct ksched *ksche break; case SCHED_OTHER: - { + if (param->sched_priority >= 0 && + param->sched_priority <= (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE)) { rtp.type = RTP_PRIO_NORMAL; rtp.prio = p4prio_to_rtpprio(param->sched_priority); rtp_to_pri(&rtp, td); - } + } else + e = EINVAL; + break; default: From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 13:35:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D10E106566C; Mon, 5 Apr 2010 13:35:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id BEDDE8FC0C; Mon, 5 Apr 2010 13:35:11 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o35DZ5Bf081360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Apr 2010 16:35:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o35DZ5fc003447; Mon, 5 Apr 2010 16:35:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o35DZ5Fn003446; Mon, 5 Apr 2010 16:35:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 Apr 2010 16:35:05 +0300 From: Kostik Belousov To: Alexander Leidinger Message-ID: <20100405133505.GK2415@deviant.kiev.zoral.com.ua> References: <201004020655.o326tWax079882@svn.freebsd.org> <20100404153653.GD2415@deviant.kiev.zoral.com.ua> <20100405143123.14716pelm4tos2kg@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="giYBXacdduNkOBLu" Content-Disposition: inline In-Reply-To: <20100405143123.14716pelm4tos2kg@webmail.leidinger.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, imp@freebsd.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 13:35:12 -0000 --giYBXacdduNkOBLu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 05, 2010 at 02:31:23PM +0200, Alexander Leidinger wrote: > Quoting Kostik Belousov (from Sun, 4 Apr 2010 =20 > 18:36:53 +0300): >=20 > >On Fri, Apr 02, 2010 at 06:55:32AM +0000, Alexander Leidinger wrote: > >>Author: netchild > >>Date: Fri Apr 2 06:55:31 2010 > >>New Revision: 206082 > >>URL: http://svn.freebsd.org/changeset/base/206082 > >> > >>Log: > >> WITH_CTF can now be specified in src.conf (not recommended, there > >> are some problems with static executables), make.conf (would also > >> affect ports which do not use GNU make and do not override the > >> compile targets) or in the kernel config (via "makeoptions > >> WITH_CTF=3Dyes"). > > > >I think this commit started the kernel build to emit lines like this > >[ -z "ctfconvert" -o -n "1" ] || ctfconvert -L VERSION -g vm_init.o > >after compilation of each file from the kernel (but not modules) > >source. Could you, please, look for missed '@' ? >=20 > I just reviewed the diff again and there is only one place where no @ =20 > is, this is for NORMAL_CTFCONVERT. Before I committed the patch, I =20 > searched where it is used, but I didn't find a place where it is used. = =20 > Maybe I overlooked something (I didn't review the Makfile which is =20 > generated by running the config program on the kernel-config, and I =20 > will not get time to do this today). >=20 > Can you please confirm that you did an installworld before building =20 > the kernel? I can confirm that r206179 fixed the issue. To answer your question, no, I did not performed installworld. I do buildkernel in cross-build environment, i.e. I do buildworld and then buildkernel. --giYBXacdduNkOBLu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAku55wkACgkQC3+MBN1Mb4idugCeN/pxoVRmCOuGIbEoEIYl4Gq0 NhEAoPL5hCcQIjArDrE3+1bYIzJ99vRL =7hNG -----END PGP SIGNATURE----- --giYBXacdduNkOBLu-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 13:48:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB5A9106564A; Mon, 5 Apr 2010 13:48:23 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8FD58FC15; Mon, 5 Apr 2010 13:48:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35DmNdG045926; Mon, 5 Apr 2010 13:48:23 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35DmNot045918; Mon, 5 Apr 2010 13:48:23 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201004051348.o35DmNot045918@svn.freebsd.org> From: Randall Stewart Date: Mon, 5 Apr 2010 13:48:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206181 - in stable/8/sys: dev/xen/netback netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 13:48:23 -0000 Author: rrs Date: Mon Apr 5 13:48:23 2010 New Revision: 206181 URL: http://svn.freebsd.org/changeset/base/206181 Log: MFC of 2 items to fix the csum for v6 issue: Revision 205075 and 205104: ---------205075---------- With the recent change of the sctp checksum to support offload, no delayed checksum was added to the ip6 output code. This causes cards that do not support SCTP checksum offload to have SCTP packets that are IPv6 NOT have the sctp checksum performed. Thus you could not communicate with a peer. This adds the missing bits to make the checksum happen for these cards. ------------------------- ---------205104---------- The proper fix for the delayed SCTP checksum is to have the delayed function take an argument as to the offset to the SCTP header. This allows it to work for V4 and V6. This of course means changing all callers of the function to either pass the header len, if they have it, or create it (ip_hl << 2 or sizeof(ip6_hdr)). ------------------------- PR: 144529 Modified: stable/8/sys/dev/xen/netback/netback.c stable/8/sys/netinet/ip_divert.c stable/8/sys/netinet/ip_ipsec.c stable/8/sys/netinet/ip_output.c stable/8/sys/netinet/sctp_crc32.c stable/8/sys/netinet/sctp_crc32.h stable/8/sys/netinet6/ip6_output.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/xen/netback/netback.c ============================================================================== --- stable/8/sys/dev/xen/netback/netback.c Mon Apr 5 13:33:54 2010 (r206180) +++ stable/8/sys/dev/xen/netback/netback.c Mon Apr 5 13:48:23 2010 (r206181) @@ -302,7 +302,7 @@ fixup_checksum(struct mbuf *m) m->m_pkthdr.csum_flags &= ~CSUM_TCP; #ifdef SCTP } else if (sw_csum & CSUM_SCTP) { - sctp_delayed_cksum(m); + sctp_delayed_cksum(m, iphlen); sw_csum &= ~CSUM_SCTP; #endif } else { Modified: stable/8/sys/netinet/ip_divert.c ============================================================================== --- stable/8/sys/netinet/ip_divert.c Mon Apr 5 13:33:54 2010 (r206180) +++ stable/8/sys/netinet/ip_divert.c Mon Apr 5 13:48:23 2010 (r206181) @@ -234,7 +234,7 @@ divert_packet(struct mbuf *m, int incomi #ifdef SCTP if (m->m_pkthdr.csum_flags & CSUM_SCTP) { ip->ip_len = ntohs(ip->ip_len); - sctp_delayed_cksum(m); + sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; ip->ip_len = htons(ip->ip_len); } Modified: stable/8/sys/netinet/ip_ipsec.c ============================================================================== --- stable/8/sys/netinet/ip_ipsec.c Mon Apr 5 13:33:54 2010 (r206180) +++ stable/8/sys/netinet/ip_ipsec.c Mon Apr 5 13:48:23 2010 (r206181) @@ -343,7 +343,7 @@ ip_ipsec_output(struct mbuf **m, struct } #ifdef SCTP if ((*m)->m_pkthdr.csum_flags & CSUM_SCTP) { - sctp_delayed_cksum(*m); + sctp_delayed_cksum(*m, (uint32_t)(ip->ip_hl << 2)); (*m)->m_pkthdr.csum_flags &= ~CSUM_SCTP; } #endif Modified: stable/8/sys/netinet/ip_output.c ============================================================================== --- stable/8/sys/netinet/ip_output.c Mon Apr 5 13:33:54 2010 (r206180) +++ stable/8/sys/netinet/ip_output.c Mon Apr 5 13:48:23 2010 (r206181) @@ -589,7 +589,7 @@ passout: } #ifdef SCTP if (sw_csum & CSUM_SCTP) { - sctp_delayed_cksum(m); + sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); sw_csum &= ~CSUM_SCTP; } #endif @@ -731,7 +731,7 @@ ip_fragment(struct ip *ip, struct mbuf * #ifdef SCTP if (m0->m_pkthdr.csum_flags & CSUM_SCTP && (if_hwassist_flags & CSUM_IP_FRAGS) == 0) { - sctp_delayed_cksum(m0); + sctp_delayed_cksum(m0, hlen); m0->m_pkthdr.csum_flags &= ~CSUM_SCTP; } #endif Modified: stable/8/sys/netinet/sctp_crc32.c ============================================================================== --- stable/8/sys/netinet/sctp_crc32.c Mon Apr 5 13:33:54 2010 (r206180) +++ stable/8/sys/netinet/sctp_crc32.c Mon Apr 5 13:48:23 2010 (r206181) @@ -127,14 +127,12 @@ sctp_calculate_cksum(struct mbuf *m, uin void -sctp_delayed_cksum(struct mbuf *m) +sctp_delayed_cksum(struct mbuf *m, uint32_t offset) { struct ip *ip; uint32_t checksum; - uint32_t offset; ip = mtod(m, struct ip *); - offset = ip->ip_hl << 2; checksum = sctp_calculate_cksum(m, offset); SCTP_STAT_DECR(sctps_sendhwcrc); SCTP_STAT_INCR(sctps_sendswcrc); Modified: stable/8/sys/netinet/sctp_crc32.h ============================================================================== --- stable/8/sys/netinet/sctp_crc32.h Mon Apr 5 13:33:54 2010 (r206180) +++ stable/8/sys/netinet/sctp_crc32.h Mon Apr 5 13:48:23 2010 (r206181) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #if defined(_KERNEL) || defined(__Userspace__) uint32_t sctp_calculate_cksum(struct mbuf *, uint32_t); -void sctp_delayed_cksum(struct mbuf *); +void sctp_delayed_cksum(struct mbuf *, uint32_t offset); #endif /* _KERNEL */ Modified: stable/8/sys/netinet6/ip6_output.c ============================================================================== --- stable/8/sys/netinet6/ip6_output.c Mon Apr 5 13:33:54 2010 (r206180) +++ stable/8/sys/netinet6/ip6_output.c Mon Apr 5 13:48:23 2010 (r206181) @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" +#include "opt_sctp.h" #include #include @@ -102,6 +103,10 @@ __FBSDID("$FreeBSD$"); #include #include #endif /* IPSEC */ +#ifdef SCTP +#include +#include +#endif #include #include @@ -208,6 +213,9 @@ ip6_output(struct mbuf *m0, struct ip6_p struct route_in6 *ro_pmtu = NULL; int hdrsplit = 0; int needipsec = 0; +#ifdef SCTP + int sw_csum; +#endif #ifdef IPSEC struct ipsec_output_state state; struct ip6_rthdr *rh = NULL; @@ -829,6 +837,10 @@ again: } m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | CSUM_IP_VALID; +#ifdef SCTP + if (m->m_pkthdr.csum_flags & CSUM_SCTP) + m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID; +#endif error = netisr_queue(NETISR_IPV6, m); goto done; } else @@ -857,6 +869,13 @@ passout: * 4: if dontfrag == 1 && alwaysfrag == 1 * error, as we cannot handle this conflicting request */ +#ifdef SCTP + sw_csum = m->m_pkthdr.csum_flags & ~ifp->if_hwassist; + if (sw_csum & CSUM_SCTP) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); + sw_csum &= ~CSUM_SCTP; + } +#endif tlen = m->m_pkthdr.len; if (opt && (opt->ip6po_flags & IP6PO_DONTFRAG)) From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 13:58:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF3CE1065670; Mon, 5 Apr 2010 13:58:58 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-fx0-f209.google.com (mail-fx0-f209.google.com [209.85.220.209]) by mx1.freebsd.org (Postfix) with ESMTP id F14898FC17; Mon, 5 Apr 2010 13:58:57 +0000 (UTC) Received: by fxm1 with SMTP id 1so2693003fxm.13 for ; Mon, 05 Apr 2010 06:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=f/fIzMCSm9UE1U7gFy8sJpgyiY5L3YcPPNenNKJz+wo=; b=sCXcICoMdtORZZv6mBZ4wWN5OQgpkA1sc4o4DKZSLh8S4Saf7F7Y8glz7/u+9Qt/R/ Fs9j9zmkKDxTB/tGDWMdDvH2ztu4b+x639koWTz/q7d1XOaw1v6CUX7f8eM4LHV4dXmk 2JT3bW+ZCIP11mynMrgK9tgF7NcxYNtCWf2MY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=HTT0AOX5erPKNolRDuXNattcVmQsS/rXGPZsevI88eo+iG/AbQkjGfKOhvhRzd9/Be qCWQdh/YbEEQ8PBeDi5UfVvF8WXMktfCVl9iAjx2jct0npGjhIzakTtHEADZ6rqr7yyL CL/2+DgEofKB6M7riQiEgIMy9p/lfubTVVWpg= Received: by 10.223.56.212 with SMTP id z20mr5826610fag.56.1270475936831; Mon, 05 Apr 2010 06:58:56 -0700 (PDT) Received: from [10.0.10.2] (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id 16sm7961364fxm.8.2010.04.05.06.58.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Apr 2010 06:58:55 -0700 (PDT) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <201004031620.o33GKM0n037332@svn.freebsd.org> Date: Mon, 5 Apr 2010 14:58:53 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201004031620.o33GKM0n037332@svn.freebsd.org> To: Alan Cox X-Mailer: Apple Mail (2.1078) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206140 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 13:58:59 -0000 Hi, On 3 Apr 2010, at 17:20, Alan Cox wrote: > Author: alc > Date: Sat Apr 3 16:20:22 2010 > New Revision: 206140 > URL: http://svn.freebsd.org/changeset/base/206140 >=20 > Log: > Re-enable the call to pmap_release() by vmspace_dofree(). The = accounting > problem that is described in the comment has been addressed. >=20 > Submitted by: kib > Tested by: pho (a few months ago) > MFC after: 6 weeks >=20 > Modified: > head/sys/vm/vm_map.c >=20 > Modified: head/sys/vm/vm_map.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/vm/vm_map.c Sat Apr 3 15:52:32 2010 = (r206139) > +++ head/sys/vm/vm_map.c Sat Apr 3 16:20:22 2010 = (r206140) > @@ -313,6 +313,7 @@ vm_init2(void) > static inline void > vmspace_dofree(struct vmspace *vm) > { > + > CTR1(KTR_VM, "vmspace_free: %p", vm); >=20 > /* > @@ -329,12 +330,8 @@ vmspace_dofree(struct vmspace *vm) > (void)vm_map_remove(&vm->vm_map, vm->vm_map.min_offset, > vm->vm_map.max_offset); >=20 > - /* > - * XXX Comment out the pmap_release call for now. The > - * vmspace_zone is marked as UMA_ZONE_NOFREE, and bugs cause > - * pmap.resident_count to be !=3D 0 on exit sometimes. > - */ > -/* pmap_release(vmspace_pmap(vm)); */ > + pmap_release(vmspace_pmap(vm)); > + vm->vm_map.pmap =3D NULL; > uma_zfree(vmspace_zone, vm); > } >=20 Unfortunately, this causes a panic on MIPS. I don't know enough about = the VM subsystem to help with fixing this but if you want me to = investigate something, I can do it. NFS ROOT: 192.168.5.1:/zoo/rpaulo/millipede1 warning: no time-of-day clock registered, system time will not be set = accurately warning: no time-of-day clock registered, system time will not be set = accurately Interface rge1 IP-Address 192.168.5.16 Broadcast 192.168.5.255=20 panic: lock "pmap" 0xc6c320dc already initialized KDB: enter: panic [ thread pid 31 tid 100042 ] Stopped at kdb_enter+0x50: lui at,0x8047 db> bt Tracing pid 31 tid 100042 td 0xc829e260 db_trace_thread+30 (?,?,?,?) ra 8011ee48 sp d37ed820 sz 24 8011ed2c+11c (0,?,ffffffff,?) ra 8011e4f0 sp d37ed838 sz 32 8011e15c+394 (?,?,?,?) ra 8011e680 sp d37ed858 sz 168 db_command_loop+78 (?,?,?,?) ra 80120c98 sp d37ed900 sz 24 80120b90+108 (?,?,?,?) ra 80227c74 sp d37ed918 sz 424 kdb_trap+10c (?,?,?,?) ra 8038b8fc sp d37edac0 sz 32 trap+b88 (?,?,?,?) ra 80383fa8 sp d37edae0 sz 168 MipsKernGenException+10c (0,a,804c2fe4,109) ra 80227ecc sp d37edb88 sz = 200 kdb_enter+50 (?,?,?,?) ra 801f2184 sp d37edc50 sz 24 panic+f8 (?,803fb4e0,c6c320dc,c6c320dc) ra 80228a74 sp d37edc68 sz 40 lock_init+30 (?,?,?,?) ra 801e2114 sp d37edc90 sz 24 mtx_init+100 (?,?,?,?) ra 80386fd4 sp d37edca8 sz 32 pmap_pinit+34 (?,?,?,?) ra 8036dab8 sp d37edcc8 sz 48 vmspace_alloc+48 (?,?,?,?) ra 8036dc08 sp d37edcf8 sz 32 vmspace_fork+58 (c6c320f0,d37edd78,?,?) ra 801c7240 sp d37edd18 sz 72 fork1+234 (?,?,?,d37eddc8) ra 801c845c sp d37edd60 sz 88 fork+20 (?,?,?,?) ra 8038b694 sp d37eddb8 sz 32 trap+920 (?,?,?,?) ra 80384174 sp d37eddd8 sz 168 MipsUserGenException+10c (?,?,?,501dbd30) ra 0 sp d37ede80 sz 0 pid 31 =20 db> ps =20 pid ppid pgrp uid state wmesg wchan cmd 31 17 17 0 R+ CPU 0 sh 18 0 0 0 SL - 0x8047b804 [nfsiod 0] 17 1 17 0 Ss+ wait 0xc82a1590 sh 16 0 0 0 DL - 0x80471354 [schedcpu] 15 0 0 0 DL syncer 0x80476d14 [syncer] 9 0 0 0 DL vlruwt 0xc82a4000 [vnlru] 8 0 0 0 DL psleep 0x80476a3c [bufdaemon] 7 0 0 0 DL pgzero 0x8047c95c [pagezero] 6 0 0 0 DL psleep 0x8047c588 [pagedaemon] 5 0 0 0 DL ccb_scan 0x8046b57c [xpt_thrd] 14 0 0 0 WL [msg_intr0] 13 0 0 0 DL (threaded) [usb] 100021 D - 0xc6cb0d0c [usbus0] 100020 D - 0xc6cb0cdc [usbus0] 100019 D - 0xc6cb0cac [usbus0] 100018 D - 0xc6cb0c7c [usbus0] 12 0 0 0 DL - 0x80471354 [yarrow] 4 0 0 0 DL - 0x8046f280 [g_down] 3 0 0 0 DL - 0x8046f27c [g_up] 2 0 0 0 DL - 0x8046f274 [g_event] 11 0 0 0 RL (threaded) [intr] 100031 I [hard intr35: mskc] 100030 I [hard intr32: rge] 100029 I [hard intr31: rge] 100028 I [hard intr30: rge] 100027 I [hard intr29: rge] 100026 I [hard intr28: rge] 100025 I [hard intr27: rge] 100024 I [hard intr26: rge] 100022 I [hard intr25: rge] 100017 I [hard intr39: ehci] 100016 I [swi0: uart] 100015 I [swi6: Giant taskq] 100013 I [swi5: +] 100011 I [swi2: cambio] 100010 I [swi6: task queue] 100005 RunQ [swi4: clock] 100004 I [swi3: vm] 100003 I [swi1: netisr 0] 10 0 0 0 RL [idle] 1 0 1 0 SLs wait 0xc6c2f000 [init] 0 0 0 0 DLs (threaded) [kernel] 100014 D - 0xc6c99080 [thread taskq] 100012 D - 0xc6c99140 [kqueue taskq] 100000 D sched 0x8046f2d8 [swapper] Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 14:15:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA77A106566C; Mon, 5 Apr 2010 14:15:51 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B9568FC08; Mon, 5 Apr 2010 14:15:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35EFpEM051984; Mon, 5 Apr 2010 14:15:51 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35EFpiJ051981; Mon, 5 Apr 2010 14:15:51 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201004051415.o35EFpiJ051981@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 5 Apr 2010 14:15:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206182 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 14:15:51 -0000 Author: jilles Date: Mon Apr 5 14:15:51 2010 New Revision: 206182 URL: http://svn.freebsd.org/changeset/base/206182 Log: sh: Automatically enable -o emacs in interactive shells with terminals. This makes sh a bit more friendly in single user mode, make buildenv, chroot and the like, and matches other shells. The -o emacs can be overridden on the command line or in the ENV file. Modified: head/bin/sh/options.c head/bin/sh/sh.1 Modified: head/bin/sh/options.c ============================================================================== --- head/bin/sh/options.c Mon Apr 5 13:48:23 2010 (r206181) +++ head/bin/sh/options.c Mon Apr 5 14:15:51 2010 (r206182) @@ -93,8 +93,11 @@ procargs(int argc, char **argv) options(1); if (*argptr == NULL && minusc == NULL) sflag = 1; - if (iflag == 2 && sflag == 1 && isatty(0) && isatty(1)) + if (iflag != 0 && sflag == 1 && isatty(0) && isatty(1)) { iflag = 1; + if (Eflag == 2) + Eflag = 1; + } if (mflag == 2) mflag = iflag; for (i = 0; i < NOPTS; i++) Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Mon Apr 5 13:48:23 2010 (r206181) +++ head/bin/sh/sh.1 Mon Apr 5 14:15:51 2010 (r206182) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd April 4, 2010 +.Dd April 5, 2010 .Dt SH 1 .Os .Sh NAME @@ -210,7 +210,8 @@ Enable the built-in .Xr emacs 1 command line editor (disables the .Fl V -option if it has been set). +option if it has been set; +set automatically when interactive on terminals). .It Fl e Li errexit Exit immediately if any untested command fails in non-interactive mode. The exit status of a command is considered to be From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 14:30:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A32B01065676; Mon, 5 Apr 2010 14:30:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3466C8FC1B; Mon, 5 Apr 2010 14:30:02 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o35ETxo7085744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Apr 2010 17:29:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o35ETxG7003815; Mon, 5 Apr 2010 17:29:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o35ETxff003814; Mon, 5 Apr 2010 17:29:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 Apr 2010 17:29:59 +0300 From: Kostik Belousov To: Rui Paulo Message-ID: <20100405142959.GN2415@deviant.kiev.zoral.com.ua> References: <201004031620.o33GKM0n037332@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QiPs+vIMjk/XMT1Q" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Alan Cox , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206140 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 14:30:03 -0000 --QiPs+vIMjk/XMT1Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 05, 2010 at 02:58:53PM +0100, Rui Paulo wrote: > Hi, >=20 > On 3 Apr 2010, at 17:20, Alan Cox wrote: >=20 > > Author: alc > > Date: Sat Apr 3 16:20:22 2010 > > New Revision: 206140 > > URL: http://svn.freebsd.org/changeset/base/206140 > >=20 > > Log: > > Re-enable the call to pmap_release() by vmspace_dofree(). The account= ing > > problem that is described in the comment has been addressed. > >=20 > > Submitted by: kib > > Tested by: pho (a few months ago) > > MFC after: 6 weeks > >=20 > > Modified: > > head/sys/vm/vm_map.c > >=20 > > Modified: head/sys/vm/vm_map.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/vm/vm_map.c Sat Apr 3 15:52:32 2010 (r206139) > > +++ head/sys/vm/vm_map.c Sat Apr 3 16:20:22 2010 (r206140) > > @@ -313,6 +313,7 @@ vm_init2(void) > > static inline void > > vmspace_dofree(struct vmspace *vm) > > { > > + > > CTR1(KTR_VM, "vmspace_free: %p", vm); > >=20 > > /* > > @@ -329,12 +330,8 @@ vmspace_dofree(struct vmspace *vm) > > (void)vm_map_remove(&vm->vm_map, vm->vm_map.min_offset, > > vm->vm_map.max_offset); > >=20 > > - /* > > - * XXX Comment out the pmap_release call for now. The > > - * vmspace_zone is marked as UMA_ZONE_NOFREE, and bugs cause > > - * pmap.resident_count to be !=3D 0 on exit sometimes. > > - */ > > -/* pmap_release(vmspace_pmap(vm)); */ > > + pmap_release(vmspace_pmap(vm)); > > + vm->vm_map.pmap =3D NULL; > > uma_zfree(vmspace_zone, vm); > > } > >=20 >=20 > Unfortunately, this causes a panic on MIPS. I don't know enough about the= VM subsystem to help with fixing this but if you want me to investigate so= mething, I can do it. >=20 > NFS ROOT: 192.168.5.1:/zoo/rpaulo/millipede1 > warning: no time-of-day clock registered, system time will not be set acc= urately > warning: no time-of-day clock registered, system time will not be set acc= urately > Interface rge1 IP-Address 192.168.5.16 Broadcast 192.168.5.255=20 > panic: lock "pmap" 0xc6c320dc already initialized > KDB: enter: panic > [ thread pid 31 tid 100042 ] > Stopped at kdb_enter+0x50: lui at,0x8047 > db> bt > Tracing pid 31 tid 100042 td 0xc829e260 > db_trace_thread+30 (?,?,?,?) ra 8011ee48 sp d37ed820 sz 24 > 8011ed2c+11c (0,?,ffffffff,?) ra 8011e4f0 sp d37ed838 sz 32 > 8011e15c+394 (?,?,?,?) ra 8011e680 sp d37ed858 sz 168 > db_command_loop+78 (?,?,?,?) ra 80120c98 sp d37ed900 sz 24 > 80120b90+108 (?,?,?,?) ra 80227c74 sp d37ed918 sz 424 > kdb_trap+10c (?,?,?,?) ra 8038b8fc sp d37edac0 sz 32 > trap+b88 (?,?,?,?) ra 80383fa8 sp d37edae0 sz 168 > MipsKernGenException+10c (0,a,804c2fe4,109) ra 80227ecc sp d37edb88 sz 200 > kdb_enter+50 (?,?,?,?) ra 801f2184 sp d37edc50 sz 24 > panic+f8 (?,803fb4e0,c6c320dc,c6c320dc) ra 80228a74 sp d37edc68 sz 40 > lock_init+30 (?,?,?,?) ra 801e2114 sp d37edc90 sz 24 > mtx_init+100 (?,?,?,?) ra 80386fd4 sp d37edca8 sz 32 > pmap_pinit+34 (?,?,?,?) ra 8036dab8 sp d37edcc8 sz 48 > vmspace_alloc+48 (?,?,?,?) ra 8036dc08 sp d37edcf8 sz 32 > vmspace_fork+58 (c6c320f0,d37edd78,?,?) ra 801c7240 sp d37edd18 sz 72 > fork1+234 (?,?,?,d37eddc8) ra 801c845c sp d37edd60 sz 88 > fork+20 (?,?,?,?) ra 8038b694 sp d37eddb8 sz 32 > trap+920 (?,?,?,?) ra 80384174 sp d37eddd8 sz 168 > MipsUserGenException+10c (?,?,?,501dbd30) ra 0 sp d37ede80 sz 0 > pid 31 =20 I did not even compiled the change below. diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 73f57e4..d5765ea 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -1263,6 +1263,7 @@ pmap_release(pmap_t pmap) ptdpg->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(ptdpg); + PMAP_LOCK_DESTROY(pmap); } =20 /* --QiPs+vIMjk/XMT1Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAku58+YACgkQC3+MBN1Mb4jRDQCgwwuEAg+hqxoTzKldpWDh/fpi 2wkAn2p6nDldQDvtm3o8Fn83qMsJ8vmy =4MxC -----END PGP SIGNATURE----- --QiPs+vIMjk/XMT1Q-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 14:59:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5D1B106566C; Mon, 5 Apr 2010 14:59:39 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by mx1.freebsd.org (Postfix) with ESMTP id 417FE8FC0A; Mon, 5 Apr 2010 14:59:39 +0000 (UTC) Received: from mail3.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o35Exbf3026500; Mon, 5 Apr 2010 16:59:37 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o35ExbUL001367; Mon, 5 Apr 2010 16:59:37 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id o35Exb0p035261; Date: Mon, 5 Apr 2010 16:59:37 +0200 From: Andre Albsmeier To: Pyun YongHyeon Message-ID: <20100405145937.GA78871@curry.mchp.siemens.de> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003241721.o2OHL5K9063538@svn.freebsd.org> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "svn-src-stable-7@freebsd.org" , Andre.Albsmeier@siemens.com Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 14:59:39 -0000 On Wed, 24-Mar-2010 at 18:21:05 +0100, Pyun YongHyeon wrote: > Author: yongari > Date: Wed Mar 24 17:21:05 2010 > New Revision: 205614 > URL: http://svn.freebsd.org/changeset/base/205614 > > Log: > MFC r204545: > Remove taskqueue based interrupt handling. After r204541 msk(4) > does not generate excessive interrupts any more so we don't need > to have two copies of interrupt handler. > While I'm here remove two STAT_PUT_IDX register accesses in LE > status event handler. After r204539 msk(4) always sync status LEs > so there is no need to resort to reading STAT_PUT_IDX register to > know the end of status LE processing. Just trust status LE's > ownership bit. This ruined the performance on my system heavily. I noticed it when unpacking a local tar archive onto an NFS-mounted location on an em(4)-based box. This archive is about 50MB of size with a bit over 5600 files so files have an average size of 9 kB. I also noticed the slowdown when doing rdist-based updates (again lots of small files) onto the other box. Just pumping bytes over the network shows no problems -- I can transmit 100-105 MB/s and receive 95-100 MB/s when talking to this em(4)-based box without problem (and as it was before). When copying a few big files (several GBs of size) over NFS I get something between 70 and 90 MB/s which is the same as what I had got before. If have made some tests to track down when the issues began. Problems started with rev. 1.18.2.37 of if_msk.c but could be alleviated by setting dev.mskc.0.int_holdoff to 1 or 0. Things really got problematic with rev. 1.18.2.38 -- adjusting dev.mskc.0.int_holdoff helped a lot but we are far from what we had with 1.18.2.36 or earlier. I did 5 rounds of testing, each with the same set of if_msk.c revisions and values for int_holdoff (where appropriate) just to check reproducibility: if_msk.c rev. round1 round2 round3 round4 round5 -------------------------------------------------------- 1.18.2.34 17,115 18,408 17,977 16,412 19,170 1.18.2.35 18,414 17,863 17,000 18,428 18,093 1.18.2.36 19,631 18,167 18,105 18,401 17,995 1.18.2.37 22,707 24,830 24,322 23,613 22,498 int_holdoff=10 19,259 19,870 19,355 18,725 19,273 int_holdoff=1 18,464 18,218 17,862 16,701 17,798 int_holdoff=0 19,423 18,507 19,505 20,714 20,460 1.18.2.38 57,169 53,394 58,721 not done int_holdoff=10 30,266 33,493 33,240 33,247 30,470 int_holdoff=1 27,013 28,777 28,047 25,858 27,615 int_holdoff=0 40,284 33,040 33,726 36,834 35,235 All this is on FreeBSD-7.3-STABLE CPU: Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz (3001.18-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10 dev.mskc.0.%desc: Marvell Yukon 88E8053 Gigabit Ethernet dev.msk.0.%desc: Marvell Technology Group Ltd. Yukon EC Id 0xb6 Rev 0x02 hw.msk.msi_disable was set to 1 but didn't change results when commenting it out. Any ideas or things I can try? Thanks, -Andre From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 16:11:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D183E106564A; Mon, 5 Apr 2010 16:11:42 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD0E28FC18; Mon, 5 Apr 2010 16:11:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35GBgLR077692; Mon, 5 Apr 2010 16:11:42 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35GBgmJ077683; Mon, 5 Apr 2010 16:11:42 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004051611.o35GBgmJ077683@svn.freebsd.org> From: Alan Cox Date: Mon, 5 Apr 2010 16:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206183 - in stable/8/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 16:11:42 -0000 Author: alc Date: Mon Apr 5 16:11:42 2010 New Revision: 206183 URL: http://svn.freebsd.org/changeset/base/206183 Log: MFC r204907, r204913, r205402, r205573, r205573 Implement AMD's recommended workaround for Erratum 383 on Family 10h processors. Enable machine check exceptions by default. Modified: stable/8/sys/amd64/amd64/mca.c stable/8/sys/amd64/amd64/pmap.c stable/8/sys/amd64/include/md_var.h stable/8/sys/amd64/include/specialreg.h stable/8/sys/i386/i386/mca.c stable/8/sys/i386/i386/pmap.c stable/8/sys/i386/include/md_var.h stable/8/sys/i386/include/specialreg.h 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/amd64/amd64/mca.c ============================================================================== --- stable/8/sys/amd64/amd64/mca.c Mon Apr 5 14:15:51 2010 (r206182) +++ stable/8/sys/amd64/amd64/mca.c Mon Apr 5 16:11:42 2010 (r206183) @@ -60,11 +60,20 @@ static int mca_count; /* Number of reco SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); -static int mca_enabled = 0; +static int mca_enabled = 1; TUNABLE_INT("hw.mca.enabled", &mca_enabled); SYSCTL_INT(_hw_mca, OID_AUTO, enabled, CTLFLAG_RDTUN, &mca_enabled, 0, "Administrative toggle for machine check support"); +static int amd10h_L1TP = 1; +TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10h_L1TP); +SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, + "Administrative toggle for logging of level one TLB parity (L1TP) errors"); + +int workaround_erratum383; +SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, + "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); + static STAILQ_HEAD(, mca_internal) mca_records; static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ @@ -527,7 +536,7 @@ void mca_init(void) { uint64_t mcg_cap; - uint64_t ctl; + uint64_t ctl, mask; int skip; int i; @@ -535,6 +544,15 @@ mca_init(void) if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; + /* + * On AMD Family 10h processors, unless logging of level one TLB + * parity (L1TP) errors is disabled, enable the recommended workaround + * for Erratum 383. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + if (cpu_feature & CPUID_MCA) { if (PCPU_GET(cpuid) == 0) mca_setup(); @@ -545,6 +563,19 @@ mca_init(void) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); + /* + * Disable logging of level one TLB parity (L1TP) errors by + * the data cache as an alternative workaround for AMD Family + * 10h Erratum 383. Unlike the recommended workaround, there + * is no performance penalty to this workaround. However, + * L1TP errors will go unreported. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && !amd10h_L1TP) { + mask = rdmsr(MSR_MC0_CTL_MASK); + if ((mask & (1UL << 5)) == 0) + wrmsr(MSR_MC0_CTL_MASK, mask | (1UL << 5)); + } for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) { /* By default enable logging of all errors. */ ctl = 0xffffffffffffffffUL; Modified: stable/8/sys/amd64/amd64/pmap.c ============================================================================== --- stable/8/sys/amd64/amd64/pmap.c Mon Apr 5 14:15:51 2010 (r206182) +++ stable/8/sys/amd64/amd64/pmap.c Mon Apr 5 16:11:42 2010 (r206183) @@ -7,7 +7,7 @@ * All rights reserved. * Copyright (c) 2003 Peter Wemm * All rights reserved. - * Copyright (c) 2005-2008 Alan L. Cox + * Copyright (c) 2005-2010 Alan L. Cox * All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -252,6 +252,9 @@ static void pmap_remove_entry(struct pma static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); +static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, + pd_entry_t newpde); +static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde); static vm_page_t pmap_allocpde(pmap_t pmap, vm_offset_t va, int flags); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); @@ -654,13 +657,13 @@ pmap_init(void) pv_entry_high_water = 9 * (pv_entry_max / 10); /* - * Disable large page mappings by default if the kernel is running in - * a virtual machine on an AMD Family 10h processor. This is a work- - * around for Erratum 383. + * If the kernel is running in a virtual machine on an AMD Family 10h + * processor, then it must assume that MCA is enabled by the virtual + * machine monitor. */ if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && CPUID_TO_FAMILY(cpu_id) == 0x10) - pg_ps_enabled = 0; + workaround_erratum383 = 1; /* * Are large page mappings enabled? @@ -795,6 +798,45 @@ pmap_cache_bits(int mode, boolean_t is_p cache_bits |= PG_NC_PWT; return (cache_bits); } + +/* + * After changing the page size for the specified virtual address in the page + * table, flush the corresponding entries from the processor's TLB. Only the + * calling processor's TLB is affected. + * + * The calling thread must be pinned to a processor. + */ +static void +pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde) +{ + u_long cr4; + + if ((newpde & PG_PS) == 0) + /* Demotion: flush a specific 2MB page mapping. */ + invlpg(va); + else if ((newpde & PG_G) == 0) + /* + * Promotion: flush every 4KB page mapping from the TLB + * because there are too many to flush individually. + */ + invltlb(); + else { + /* + * Promotion: flush every 4KB page mapping from the TLB, + * including any global (PG_G) mappings. + */ + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); + /* + * Although preemption at this point could be detrimental to + * performance, it would not lead to an error. PG_G is simply + * ignored if CR4.PGE is clear. Moreover, in case this block + * is re-entered, the load_cr4() either above or below will + * modify CR4.PGE flushing the TLB. + */ + load_cr4(cr4 | CR4_PGE); + } +} #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -891,6 +933,69 @@ pmap_invalidate_cache(void) smp_cache_flush(); sched_unpin(); } + +struct pde_action { + cpumask_t store; /* processor that updates the PDE */ + cpumask_t invalidate; /* processors that invalidate their TLB */ + vm_offset_t va; + pd_entry_t *pde; + pd_entry_t newpde; +}; + +static void +pmap_update_pde_action(void *arg) +{ + struct pde_action *act = arg; + + if (act->store == PCPU_GET(cpumask)) + pde_store(act->pde, act->newpde); +} + +static void +pmap_update_pde_teardown(void *arg) +{ + struct pde_action *act = arg; + + if ((act->invalidate & PCPU_GET(cpumask)) != 0) + pmap_update_pde_invalidate(act->va, act->newpde); +} + +/* + * Change the page size for the specified virtual address in a way that + * prevents any possibility of the TLB ever having two entries that map the + * same virtual address using different page sizes. This is the recommended + * workaround for Erratum 383 on AMD Family 10h processors. It prevents a + * machine check exception for a TLB state that is improperly diagnosed as a + * hardware error. + */ +static void +pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) +{ + struct pde_action act; + cpumask_t active, cpumask; + + sched_pin(); + cpumask = PCPU_GET(cpumask); + if (pmap == kernel_pmap) + active = all_cpus; + else + active = pmap->pm_active; + if ((active & PCPU_GET(other_cpus)) != 0) { + act.store = cpumask; + act.invalidate = active; + act.va = va; + act.pde = pde; + act.newpde = newpde; + smp_rendezvous_cpus(cpumask | active, + smp_no_rendevous_barrier, pmap_update_pde_action, + pmap_update_pde_teardown, &act); + } else { + pde_store(pde, newpde); + if ((active & cpumask) != 0) + pmap_update_pde_invalidate(va, newpde); + } + sched_unpin(); +} #else /* !SMP */ /* * Normal, non-SMP, invalidation functions. @@ -928,6 +1033,15 @@ pmap_invalidate_cache(void) wbinvd(); } + +static void +pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) +{ + + pde_store(pde, newpde); + if (pmap == kernel_pmap || pmap->pm_active) + pmap_update_pde_invalidate(va, newpde); +} #endif /* !SMP */ static void @@ -2310,7 +2424,10 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t * processor changing the setting of PG_A and/or PG_M between * the read above and the store below. */ - pde_store(pde, newpde); + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, newpde); + else + pde_store(pde, newpde); /* * Invalidate a stale recursive mapping of the page table page. @@ -2926,7 +3043,10 @@ setpte: /* * Map the superpage. */ - pde_store(pde, PG_PS | newpde); + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, PG_PS | newpde); + else + pde_store(pde, PG_PS | newpde); pmap_pde_promotions++; CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#lx" Modified: stable/8/sys/amd64/include/md_var.h ============================================================================== --- stable/8/sys/amd64/include/md_var.h Mon Apr 5 14:15:51 2010 (r206182) +++ stable/8/sys/amd64/include/md_var.h Mon Apr 5 16:11:42 2010 (r206183) @@ -61,6 +61,7 @@ extern char sigcode[]; extern int szsigcode; extern uint64_t *vm_page_dump; extern int vm_page_dump_size; +extern int workaround_erratum383; extern int _udatasel; extern int _ucodesel; extern int _ucode32sel; Modified: stable/8/sys/amd64/include/specialreg.h ============================================================================== --- stable/8/sys/amd64/include/specialreg.h Mon Apr 5 14:15:51 2010 (r206182) +++ stable/8/sys/amd64/include/specialreg.h Mon Apr 5 16:11:42 2010 (r206183) @@ -506,6 +506,7 @@ #define MSR_TOP_MEM 0xc001001a /* boundary for ram below 4G */ #define MSR_TOP_MEM2 0xc001001d /* boundary for ram above 4G */ #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ +#define MSR_MC0_CTL_MASK 0xc0010044 /* VIA ACE crypto featureset: for via_feature_rng */ #define VIA_HAS_RNG 1 /* cpu has RNG */ Modified: stable/8/sys/i386/i386/mca.c ============================================================================== --- stable/8/sys/i386/i386/mca.c Mon Apr 5 14:15:51 2010 (r206182) +++ stable/8/sys/i386/i386/mca.c Mon Apr 5 16:11:42 2010 (r206183) @@ -60,11 +60,20 @@ static int mca_count; /* Number of reco SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); -static int mca_enabled = 0; +static int mca_enabled = 1; TUNABLE_INT("hw.mca.enabled", &mca_enabled); SYSCTL_INT(_hw_mca, OID_AUTO, enabled, CTLFLAG_RDTUN, &mca_enabled, 0, "Administrative toggle for machine check support"); +static int amd10h_L1TP = 1; +TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10h_L1TP); +SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, + "Administrative toggle for logging of level one TLB parity (L1TP) errors"); + +int workaround_erratum383; +SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, + "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); + static STAILQ_HEAD(, mca_internal) mca_records; static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ @@ -527,7 +536,7 @@ void mca_init(void) { uint64_t mcg_cap; - uint64_t ctl; + uint64_t ctl, mask; int skip; int i; @@ -535,6 +544,15 @@ mca_init(void) if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; + /* + * On AMD Family 10h processors, unless logging of level one TLB + * parity (L1TP) errors is disabled, enable the recommended workaround + * for Erratum 383. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + if (cpu_feature & CPUID_MCA) { if (PCPU_GET(cpuid) == 0) mca_setup(); @@ -545,6 +563,19 @@ mca_init(void) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); + /* + * Disable logging of level one TLB parity (L1TP) errors by + * the data cache as an alternative workaround for AMD Family + * 10h Erratum 383. Unlike the recommended workaround, there + * is no performance penalty to this workaround. However, + * L1TP errors will go unreported. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && !amd10h_L1TP) { + mask = rdmsr(MSR_MC0_CTL_MASK); + if ((mask & (1UL << 5)) == 0) + wrmsr(MSR_MC0_CTL_MASK, mask | (1UL << 5)); + } for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) { /* By default enable logging of all errors. */ ctl = 0xffffffffffffffffUL; Modified: stable/8/sys/i386/i386/pmap.c ============================================================================== --- stable/8/sys/i386/i386/pmap.c Mon Apr 5 14:15:51 2010 (r206182) +++ stable/8/sys/i386/i386/pmap.c Mon Apr 5 16:11:42 2010 (r206183) @@ -5,7 +5,7 @@ * All rights reserved. * Copyright (c) 1994 David Greenman * All rights reserved. - * Copyright (c) 2005-2008 Alan L. Cox + * Copyright (c) 2005-2010 Alan L. Cox * All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -293,6 +293,7 @@ static void pmap_insert_pt_page(pmap_t p static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); +static void pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); @@ -311,6 +312,9 @@ static void pmap_remove_entry(struct pma static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); +static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, + pd_entry_t newpde); +static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); @@ -395,6 +399,13 @@ pmap_bootstrap(vm_paddr_t firstaddr) kernel_pmap->pm_active = -1; /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); LIST_INIT(&allpmaps); + + /* + * Request a spin mutex so that changes to allpmaps cannot be + * preempted by smp_rendezvous_cpus(). Otherwise, + * pmap_update_pde_kernel() could access allpmaps while it is + * being changed. + */ mtx_init(&allpmaps_lock, "allpmaps", NULL, MTX_SPIN); mtx_lock_spin(&allpmaps_lock); LIST_INSERT_HEAD(&allpmaps, kernel_pmap, pm_list); @@ -678,19 +689,21 @@ pmap_init(void) pv_entry_high_water = 9 * (pv_entry_max / 10); /* - * Disable large page mappings by default if the kernel is running in - * a virtual machine on an AMD Family 10h processor. This is a work- - * around for Erratum 383. + * If the kernel is running in a virtual machine on an AMD Family 10h + * processor, then it must assume that MCA is enabled by the virtual + * machine monitor. */ if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && CPUID_TO_FAMILY(cpu_id) == 0x10) - pg_ps_enabled = 0; + workaround_erratum383 = 1; /* - * Are large page mappings enabled? + * Are large page mappings supported and enabled? */ TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); - if (pg_ps_enabled) { + if (pseflag == 0) + pg_ps_enabled = 0; + else if (pg_ps_enabled) { KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, ("pmap_init: can't assign to pagesizes[1]")); pagesizes[1] = NBPDR; @@ -836,6 +849,69 @@ pmap_cache_bits(int mode, boolean_t is_p cache_bits |= PG_NC_PWT; return (cache_bits); } + +/* + * The caller is responsible for maintaining TLB consistency. + */ +static void +pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde) +{ + pd_entry_t *pde; + pmap_t pmap; + boolean_t PTD_updated; + + PTD_updated = FALSE; + mtx_lock_spin(&allpmaps_lock); + LIST_FOREACH(pmap, &allpmaps, pm_list) { + if ((pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & + PG_FRAME)) + PTD_updated = TRUE; + pde = pmap_pde(pmap, va); + pde_store(pde, newpde); + } + mtx_unlock_spin(&allpmaps_lock); + KASSERT(PTD_updated, + ("pmap_kenter_pde: current page table is not in allpmaps")); +} + +/* + * After changing the page size for the specified virtual address in the page + * table, flush the corresponding entries from the processor's TLB. Only the + * calling processor's TLB is affected. + * + * The calling thread must be pinned to a processor. + */ +static void +pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde) +{ + u_long cr4; + + if ((newpde & PG_PS) == 0) + /* Demotion: flush a specific 2MB page mapping. */ + invlpg(va); + else if ((newpde & PG_G) == 0) + /* + * Promotion: flush every 4KB page mapping from the TLB + * because there are too many to flush individually. + */ + invltlb(); + else { + /* + * Promotion: flush every 4KB page mapping from the TLB, + * including any global (PG_G) mappings. + */ + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); + /* + * Although preemption at this point could be detrimental to + * performance, it would not lead to an error. PG_G is simply + * ignored if CR4.PGE is clear. Moreover, in case this block + * is re-entered, the load_cr4() either above or below will + * modify CR4.PGE flushing the TLB. + */ + load_cr4(cr4 | CR4_PGE); + } +} #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -932,6 +1008,92 @@ pmap_invalidate_cache(void) smp_cache_flush(); sched_unpin(); } + +struct pde_action { + cpumask_t store; /* processor that updates the PDE */ + cpumask_t invalidate; /* processors that invalidate their TLB */ + vm_offset_t va; + pd_entry_t *pde; + pd_entry_t newpde; +}; + +static void +pmap_update_pde_kernel(void *arg) +{ + struct pde_action *act = arg; + pd_entry_t *pde; + pmap_t pmap; + + if (act->store == PCPU_GET(cpumask)) + /* + * Elsewhere, this operation requires allpmaps_lock for + * synchronization. Here, it does not because it is being + * performed in the context of an all_cpus rendezvous. + */ + LIST_FOREACH(pmap, &allpmaps, pm_list) { + pde = pmap_pde(pmap, act->va); + pde_store(pde, act->newpde); + } +} + +static void +pmap_update_pde_user(void *arg) +{ + struct pde_action *act = arg; + + if (act->store == PCPU_GET(cpumask)) + pde_store(act->pde, act->newpde); +} + +static void +pmap_update_pde_teardown(void *arg) +{ + struct pde_action *act = arg; + + if ((act->invalidate & PCPU_GET(cpumask)) != 0) + pmap_update_pde_invalidate(act->va, act->newpde); +} + +/* + * Change the page size for the specified virtual address in a way that + * prevents any possibility of the TLB ever having two entries that map the + * same virtual address using different page sizes. This is the recommended + * workaround for Erratum 383 on AMD Family 10h processors. It prevents a + * machine check exception for a TLB state that is improperly diagnosed as a + * hardware error. + */ +static void +pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) +{ + struct pde_action act; + cpumask_t active, cpumask; + + sched_pin(); + cpumask = PCPU_GET(cpumask); + if (pmap == kernel_pmap) + active = all_cpus; + else + active = pmap->pm_active; + if ((active & PCPU_GET(other_cpus)) != 0) { + act.store = cpumask; + act.invalidate = active; + act.va = va; + act.pde = pde; + act.newpde = newpde; + smp_rendezvous_cpus(cpumask | active, + smp_no_rendevous_barrier, pmap == kernel_pmap ? + pmap_update_pde_kernel : pmap_update_pde_user, + pmap_update_pde_teardown, &act); + } else { + if (pmap == kernel_pmap) + pmap_kenter_pde(va, newpde); + else + pde_store(pde, newpde); + if ((active & cpumask) != 0) + pmap_update_pde_invalidate(va, newpde); + } + sched_unpin(); +} #else /* !SMP */ /* * Normal, non-SMP, 486+ invalidation functions. @@ -969,6 +1131,18 @@ pmap_invalidate_cache(void) wbinvd(); } + +static void +pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) +{ + + if (pmap == kernel_pmap) + pmap_kenter_pde(va, newpde); + else + pde_store(pde, newpde); + if (pmap == kernel_pmap || pmap->pm_active) + pmap_update_pde_invalidate(va, newpde); +} #endif /* !SMP */ void @@ -1842,12 +2016,9 @@ SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTL void pmap_growkernel(vm_offset_t addr) { - struct pmap *pmap; vm_paddr_t ptppaddr; vm_page_t nkpg; pd_entry_t newpdir; - pt_entry_t *pde; - boolean_t updated_PTD; mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { @@ -1889,18 +2060,7 @@ pmap_growkernel(vm_offset_t addr) newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); pdir_pde(KPTD, kernel_vm_end) = pgeflag | newpdir; - updated_PTD = FALSE; - mtx_lock_spin(&allpmaps_lock); - LIST_FOREACH(pmap, &allpmaps, pm_list) { - if ((pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & - PG_FRAME)) - updated_PTD = TRUE; - pde = pmap_pde(pmap, kernel_vm_end); - pde_store(pde, newpdir); - } - mtx_unlock_spin(&allpmaps_lock); - KASSERT(updated_PTD, - ("pmap_growkernel: current page table is not in allpmaps")); + pmap_kenter_pde(kernel_vm_end, newpdir); kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; @@ -2344,7 +2504,6 @@ static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) { pd_entry_t newpde, oldpde; - pmap_t allpmaps_entry; pt_entry_t *firstpte, newpte; vm_paddr_t mptepa; vm_page_t free, mpte; @@ -2450,25 +2609,11 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t * processor changing the setting of PG_A and/or PG_M between * the read above and the store below. */ - if (pmap == kernel_pmap) { - /* - * A harmless race exists between this loop and the bcopy() - * in pmap_pinit() that initializes the kernel segment of - * the new page table directory. Specifically, that bcopy() - * may copy the new PDE from the PTD to the new page table - * before this loop updates that new page table. - */ - mtx_lock_spin(&allpmaps_lock); - LIST_FOREACH(allpmaps_entry, &allpmaps, pm_list) { - pde = pmap_pde(allpmaps_entry, va); - KASSERT(*pde == newpde || (*pde & PG_PTE_PROMOTE) == - (oldpde & PG_PTE_PROMOTE), - ("pmap_demote_pde: pde was %#jx, expected %#jx", - (uintmax_t)*pde, (uintmax_t)oldpde)); - pde_store(pde, newpde); - } - mtx_unlock_spin(&allpmaps_lock); - } else + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, newpde); + else if (pmap == kernel_pmap) + pmap_kenter_pde(va, newpde); + else pde_store(pde, newpde); if (firstpte == PADDR2) mtx_unlock(&PMAP2mutex); @@ -2987,7 +3132,6 @@ static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) { pd_entry_t newpde; - pmap_t allpmaps_entry; pt_entry_t *firstpte, oldpte, pa, *pte; vm_offset_t oldpteva; vm_page_t mpte; @@ -3091,14 +3235,11 @@ setpte: /* * Map the superpage. */ - if (pmap == kernel_pmap) { - mtx_lock_spin(&allpmaps_lock); - LIST_FOREACH(allpmaps_entry, &allpmaps, pm_list) { - pde = pmap_pde(allpmaps_entry, va); - pde_store(pde, PG_PS | newpde); - } - mtx_unlock_spin(&allpmaps_lock); - } else + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, PG_PS | newpde); + else if (pmap == kernel_pmap) + pmap_kenter_pde(va, PG_PS | newpde); + else pde_store(pde, PG_PS | newpde); pmap_pde_promotions++; Modified: stable/8/sys/i386/include/md_var.h ============================================================================== --- stable/8/sys/i386/include/md_var.h Mon Apr 5 14:15:51 2010 (r206182) +++ stable/8/sys/i386/include/md_var.h Mon Apr 5 16:11:42 2010 (r206183) @@ -73,6 +73,7 @@ extern int szosigcode; #endif extern uint32_t *vm_page_dump; extern int vm_page_dump_size; +extern int workaround_erratum383; typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); struct thread; Modified: stable/8/sys/i386/include/specialreg.h ============================================================================== --- stable/8/sys/i386/include/specialreg.h Mon Apr 5 14:15:51 2010 (r206182) +++ stable/8/sys/i386/include/specialreg.h Mon Apr 5 16:11:42 2010 (r206183) @@ -551,6 +551,7 @@ /* AMD64 MSR's */ #define MSR_EFER 0xc0000080 /* extended features */ #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ +#define MSR_MC0_CTL_MASK 0xc0010044 /* VIA ACE crypto featureset: for via_feature_rng */ #define VIA_HAS_RNG 1 /* cpu has RNG */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 16:15:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A5301065677; Mon, 5 Apr 2010 16:15:03 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8FE3D8FC08; Mon, 5 Apr 2010 16:15:02 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CB1A.dip.t-dialin.net [217.226.203.26]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 08CCA844268; Mon, 5 Apr 2010 18:14:56 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 36B7D505C; Mon, 5 Apr 2010 18:14:51 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o35GEpI9019410; Mon, 5 Apr 2010 18:14:51 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from p5DD456EA.dip.t-dialin.net (p5DD456EA.dip.t-dialin.net [93.212.86.234]) by webmail.leidinger.net (Horde Framework) with HTTP; Mon, 05 Apr 2010 18:14:50 +0200 Message-ID: <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> Date: Mon, 05 Apr 2010 18:14:50 +0200 From: Alexander Leidinger To: Kostik Belousov References: <201004020655.o326tWax079882@svn.freebsd.org> <20100404153653.GD2415@deviant.kiev.zoral.com.ua> <20100405143123.14716pelm4tos2kg@webmail.leidinger.net> <20100405133505.GK2415@deviant.kiev.zoral.com.ua> In-Reply-To: <20100405133505.GK2415@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 08CCA844268.BD35A X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.363, required 6, autolearn=disabled, ALL_TRUSTED -1.44, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1271088898.53636@qLfpmLyWDthUDNjk82s2wQ X-EBL-Spam-Status: No Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, imp@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 16:15:03 -0000 Quoting Kostik Belousov (from Mon, 5 Apr 2010 16:35:05 +0300): > On Mon, Apr 05, 2010 at 02:31:23PM +0200, Alexander Leidinger wrote: >> Quoting Kostik Belousov (from Sun, 4 Apr 2010 >> 18:36:53 +0300): >> >> >On Fri, Apr 02, 2010 at 06:55:32AM +0000, Alexander Leidinger wrote: >> >>Author: netchild >> >>Date: Fri Apr 2 06:55:31 2010 >> >>New Revision: 206082 >> >>URL: http://svn.freebsd.org/changeset/base/206082 >> >> >> >>Log: >> >> WITH_CTF can now be specified in src.conf (not recommended, there >> >> are some problems with static executables), make.conf (would also >> >> affect ports which do not use GNU make and do not override the >> >> compile targets) or in the kernel config (via "makeoptions >> >> WITH_CTF=yes"). >> > >> >I think this commit started the kernel build to emit lines like this >> >[ -z "ctfconvert" -o -n "1" ] || ctfconvert -L VERSION -g vm_init.o >> >after compilation of each file from the kernel (but not modules) >> >source. Could you, please, look for missed '@' ? >> >> I just reviewed the diff again and there is only one place where no @ >> is, this is for NORMAL_CTFCONVERT. Before I committed the patch, I >> searched where it is used, but I didn't find a place where it is used. >> Maybe I overlooked something (I didn't review the Makfile which is >> generated by running the config program on the kernel-config, and I >> will not get time to do this today). >> >> Can you please confirm that you did an installworld before building >> the kernel? > > I can confirm that r206179 fixed the issue. > > To answer your question, no, I did not performed installworld. > I do buildkernel in cross-build environment, i.e. I do buildworld > and then buildkernel. Ok, thanks for the info. Warner, do you mind if I back-out r206082 and change the place where NORMAL_CTFCONVERT is used instead (fist I have to search for it again... not today)? It would make it consistent with all other places (SYSTEM_CTFCONVERT and the plain test and use of CTFxxx). Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 When the doubt vanishes and the issue becomes evident, stupidity reigns. -- Poul Henningsen [1894-1967] From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:26:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 761591065670; Mon, 5 Apr 2010 17:26:24 +0000 (UTC) (envelope-from jacula@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6433F8FC16; Mon, 5 Apr 2010 17:26:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35HQONS094193; Mon, 5 Apr 2010 17:26:24 GMT (envelope-from jacula@svn.freebsd.org) Received: (from jacula@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HQOt0094192; Mon, 5 Apr 2010 17:26:24 GMT (envelope-from jacula@svn.freebsd.org) Message-Id: <201004051726.o35HQOt0094192@svn.freebsd.org> From: Giuseppe Pilichi Date: Mon, 5 Apr 2010 17:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206184 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:26:24 -0000 Author: jacula (ports committer) Date: Mon Apr 5 17:26:23 2010 New Revision: 206184 URL: http://svn.freebsd.org/changeset/base/206184 Log: First steps as committer: - add an entry for myself to committers-ports.dot Approved by: pgj (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Mon Apr 5 16:11:42 2010 (r206183) +++ head/share/misc/committers-ports.dot Mon Apr 5 17:26:23 2010 (r206184) @@ -86,6 +86,7 @@ glewis [label="Greg Lewis\nglewis@FreeBS hq [label="Herve Quiroz\nhq@FreeBSD.org\n2004/08/05"] ijliao [label="Ying-Chieh Liao\nijliao@FreeBSD.org\n2001/01/20"] itetcu [label="Ion-Mihai Tetcu\nitetcu@FreeBSD.org\n2006/06/07"] +jacula [label="Giuseppe Pilichi\njacula@FreeBSD.org\n2010/04/05"] jadawin [label="Philippe Audeoud\njadawin@FreeBSD.org\n2008/03/02"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"] jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"] @@ -316,6 +317,8 @@ pav -> josef pav -> kwm pav -> mnag +pgj -> jacula + philip -> koitsu rafan -> chinsan @@ -341,6 +344,7 @@ steve -> netchild tabthorpe -> avilla tabthorpe -> avl +tabthorpe -> jacula tabthorpe -> jadawin tabthorpe -> pgj From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:32:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE4EB1065676; Mon, 5 Apr 2010 17:32:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBEB68FC13; Mon, 5 Apr 2010 17:32:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35HWn1K095645; Mon, 5 Apr 2010 17:32:49 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HWnUp095643; Mon, 5 Apr 2010 17:32:49 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004051732.o35HWnUp095643@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 5 Apr 2010 17:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206185 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:32:50 -0000 Author: jkim Date: Mon Apr 5 17:32:49 2010 New Revision: 206185 URL: http://svn.freebsd.org/changeset/base/206185 Log: MFC: r205858 Check the pointer to JIT binary filter before its de-allocation. Modified: stable/8/sys/net/bpf.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/net/bpf.c ============================================================================== --- stable/8/sys/net/bpf.c Mon Apr 5 17:26:23 2010 (r206184) +++ stable/8/sys/net/bpf.c Mon Apr 5 17:32:49 2010 (r206185) @@ -1865,13 +1865,14 @@ bpf_freed(struct bpf_d *d) * free. */ bpf_free(d); - if (d->bd_rfilter) { + if (d->bd_rfilter != NULL) { free((caddr_t)d->bd_rfilter, M_BPF); #ifdef BPF_JITTER - bpf_destroy_jit_filter(d->bd_bfilter); + if (d->bd_bfilter != NULL) + bpf_destroy_jit_filter(d->bd_bfilter); #endif } - if (d->bd_wfilter) + if (d->bd_wfilter != NULL) free((caddr_t)d->bd_wfilter, M_BPF); mtx_destroy(&d->bd_mtx); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:33:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3A7E106566C; Mon, 5 Apr 2010 17:33:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16F48FC16; Mon, 5 Apr 2010 17:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35HXXeE095860; Mon, 5 Apr 2010 17:33:33 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HXXaH095858; Mon, 5 Apr 2010 17:33:33 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004051733.o35HXXaH095858@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 5 Apr 2010 17:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206186 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:33:33 -0000 Author: jkim Date: Mon Apr 5 17:33:33 2010 New Revision: 206186 URL: http://svn.freebsd.org/changeset/base/206186 Log: MFC: r205858 Check the pointer to JIT binary filter before its de-allocation. Modified: stable/7/sys/net/bpf.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/net/bpf.c ============================================================================== --- stable/7/sys/net/bpf.c Mon Apr 5 17:32:49 2010 (r206185) +++ stable/7/sys/net/bpf.c Mon Apr 5 17:33:33 2010 (r206186) @@ -1586,13 +1586,14 @@ bpf_freed(struct bpf_d *d) if (d->bd_fbuf != NULL) free(d->bd_fbuf, M_BPF); } - if (d->bd_rfilter) { + if (d->bd_rfilter != NULL) { free((caddr_t)d->bd_rfilter, M_BPF); #ifdef BPF_JITTER - bpf_destroy_jit_filter(d->bd_bfilter); + if (d->bd_bfilter != NULL) + bpf_destroy_jit_filter(d->bd_bfilter); #endif } - if (d->bd_wfilter) + if (d->bd_wfilter != NULL) free((caddr_t)d->bd_wfilter, M_BPF); mtx_destroy(&d->bd_mtx); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:37:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 140F2106566C; Mon, 5 Apr 2010 17:37:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01E3C8FC14; Mon, 5 Apr 2010 17:37:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35HbZqJ096752; Mon, 5 Apr 2010 17:37:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HbZVh096751; Mon, 5 Apr 2010 17:37:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004051737.o35HbZVh096751@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 5 Apr 2010 17:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206187 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:37:36 -0000 Author: jkim Date: Mon Apr 5 17:37:35 2010 New Revision: 206187 URL: http://svn.freebsd.org/changeset/base/206187 Log: MFC: r205095 Fix a style(9) nit. Modified: stable/8/sys/net/bpf.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/net/bpf.c ============================================================================== --- stable/8/sys/net/bpf.c Mon Apr 5 17:33:33 2010 (r206186) +++ stable/8/sys/net/bpf.c Mon Apr 5 17:37:35 2010 (r206187) @@ -1577,8 +1577,7 @@ filt_bpfread(struct knote *kn, long hint kn->kn_data = d->bd_slen; if (d->bd_hbuf) kn->kn_data += d->bd_hlen; - } - else if (d->bd_rtout > 0 && d->bd_state == BPF_IDLE) { + } else if (d->bd_rtout > 0 && d->bd_state == BPF_IDLE) { callout_reset(&d->bd_callout, d->bd_rtout, bpf_timed_out, d); d->bd_state = BPF_WAITING; From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:56:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D291065672; Mon, 5 Apr 2010 17:56:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD968FC1B; Mon, 5 Apr 2010 17:56:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35HufHw001177; Mon, 5 Apr 2010 17:56:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HufsX001172; Mon, 5 Apr 2010 17:56:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004051756.o35HufsX001172@svn.freebsd.org> From: Marius Strobl Date: Mon, 5 Apr 2010 17:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206188 - in stable/8/sys/sparc64: fhc pci sbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:56:41 -0000 Author: marius Date: Mon Apr 5 17:56:40 2010 New Revision: 206188 URL: http://svn.freebsd.org/changeset/base/206188 Log: MFC: r206018 - Take advantage of the INTCLR_* macros. - Right-justify the backslashes as per style(9). Modified: stable/8/sys/sparc64/fhc/fhc.c stable/8/sys/sparc64/pci/psycho.c stable/8/sys/sparc64/pci/schizo.c stable/8/sys/sparc64/sbus/sbus.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/sparc64/fhc/fhc.c ============================================================================== --- stable/8/sys/sparc64/fhc/fhc.c Mon Apr 5 17:37:35 2010 (r206187) +++ stable/8/sys/sparc64/fhc/fhc.c Mon Apr 5 17:56:40 2010 (r206188) @@ -208,7 +208,7 @@ fhc_attach(device_t dev) printf("model unknown\n"); for (i = FHC_FANFAIL; i <= FHC_TOD; i++) { - bus_write_4(sc->sc_memres[i], FHC_ICLR, 0x0); + bus_write_4(sc->sc_memres[i], FHC_ICLR, INTCLR_IDLE); (void)bus_read_4(sc->sc_memres[i], FHC_ICLR); } @@ -391,7 +391,7 @@ fhc_intr_clear(void *arg) struct intr_vector *iv = arg; struct fhc_icarg *fica = iv->iv_icarg; - bus_write_4(fica->fica_memres, FHC_ICLR, 0x0); + bus_write_4(fica->fica_memres, FHC_ICLR, INTCLR_IDLE); (void)bus_read_4(fica->fica_memres, FHC_ICLR); } Modified: stable/8/sys/sparc64/pci/psycho.c ============================================================================== --- stable/8/sys/sparc64/pci/psycho.c Mon Apr 5 17:37:35 2010 (r206187) +++ stable/8/sys/sparc64/pci/psycho.c Mon Apr 5 17:56:40 2010 (r206188) @@ -188,13 +188,13 @@ struct psycho_dma_sync { uint8_t pds_func; /* func. of farest PCI dev. */ }; -#define PSYCHO_READ8(sc, off) \ +#define PSYCHO_READ8(sc, off) \ bus_read_8((sc)->sc_mem_res, (off)) -#define PSYCHO_WRITE8(sc, off, v) \ +#define PSYCHO_WRITE8(sc, off, v) \ bus_write_8((sc)->sc_mem_res, (off), (v)) -#define PCICTL_READ8(sc, off) \ +#define PCICTL_READ8(sc, off) \ PSYCHO_READ8((sc), (sc)->sc_pcictl + (off)) -#define PCICTL_WRITE8(sc, off, v) \ +#define PCICTL_WRITE8(sc, off, v) \ PSYCHO_WRITE8((sc), (sc)->sc_pcictl + (off), (v)) /* @@ -523,7 +523,7 @@ psycho_attach(device_t dev) (u_long)intrmap, (u_long)PSYCHO_READ8(sc, intrmap), (u_long)intrclr); PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, i)); - PSYCHO_WRITE8(sc, intrclr, 0); + PSYCHO_WRITE8(sc, intrclr, INTCLR_IDLE); PSYCHO_WRITE8(sc, intrmap, INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, i), PCPU_GET(mid))); @@ -1137,7 +1137,7 @@ psycho_intr_clear(void *arg) struct intr_vector *iv = arg; struct psycho_icarg *pica = iv->iv_icarg; - PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, 0); + PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, INTCLR_IDLE); } static int Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Mon Apr 5 17:37:35 2010 (r206187) +++ stable/8/sys/sparc64/pci/schizo.c Mon Apr 5 17:56:40 2010 (r206188) @@ -189,26 +189,26 @@ struct schizo_dma_sync { #define SCHIZO_PERF_CNT_QLTY 100 -#define SCHIZO_SPC_READ_8(spc, sc, offs) \ +#define SCHIZO_SPC_READ_8(spc, sc, offs) \ bus_read_8((sc)->sc_mem_res[(spc)], (offs)) -#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ +#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ bus_write_8((sc)->sc_mem_res[(spc)], (offs), (v)) -#define SCHIZO_PCI_READ_8(sc, offs) \ +#define SCHIZO_PCI_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCI, (sc), (offs)) -#define SCHIZO_PCI_WRITE_8(sc, offs, v) \ +#define SCHIZO_PCI_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_PCI, (sc), (offs), (v)) -#define SCHIZO_CTRL_READ_8(sc, offs) \ +#define SCHIZO_CTRL_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_CTRL, (sc), (offs)) -#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \ +#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_CTRL, (sc), (offs), (v)) -#define SCHIZO_PCICFG_READ_8(sc, offs) \ +#define SCHIZO_PCICFG_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCICFG, (sc), (offs)) -#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \ +#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_PCICFG, (sc), (offs), (v)) -#define SCHIZO_ICON_READ_8(sc, offs) \ +#define SCHIZO_ICON_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_ICON, (sc), (offs)) -#define SCHIZO_ICON_WRITE_8(sc, offs, v) \ +#define SCHIZO_ICON_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_ICON, (sc), (offs), (v)) struct schizo_desc { @@ -1054,7 +1054,7 @@ schizo_dma_sync_stub(void *arg) for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, SCHIZO_CDMA_STATE_DONE, SCHIZO_CDMA_STATE_PENDING) == 0;) ; - SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, 1); + SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); end.tv_sec = 1; end.tv_usec = 0; @@ -1139,7 +1139,7 @@ schizo_intr_clear(void *arg) struct intr_vector *iv = arg; struct schizo_icarg *sica = iv->iv_icarg; - SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, 0); + SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE); } static int Modified: stable/8/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/8/sys/sparc64/sbus/sbus.c Mon Apr 5 17:37:35 2010 (r206187) +++ stable/8/sys/sparc64/sbus/sbus.c Mon Apr 5 17:56:40 2010 (r206188) @@ -171,9 +171,9 @@ struct sbus_softc { void *sc_pf_ihand; }; -#define SYSIO_READ8(sc, off) \ +#define SYSIO_READ8(sc, off) \ bus_read_8((sc)->sc_sysio_res, (off)) -#define SYSIO_WRITE8(sc, off, v) \ +#define SYSIO_WRITE8(sc, off, v) \ bus_write_8((sc)->sc_sysio_res, (off), (v)) static device_probe_t sbus_probe; @@ -697,7 +697,7 @@ sbus_intr_clear(void *arg) struct intr_vector *iv = arg; struct sbus_icarg *sica = iv->iv_icarg; - SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, 0); + SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE); } static int From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:57:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05485106567B; Mon, 5 Apr 2010 17:57:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E59668FC1B; Mon, 5 Apr 2010 17:57:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35Hvk5p001489; Mon, 5 Apr 2010 17:57:46 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HvkDN001484; Mon, 5 Apr 2010 17:57:46 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004051757.o35HvkDN001484@svn.freebsd.org> From: Marius Strobl Date: Mon, 5 Apr 2010 17:57:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206189 - in stable/7/sys/sparc64: fhc pci sbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:57:47 -0000 Author: marius Date: Mon Apr 5 17:57:46 2010 New Revision: 206189 URL: http://svn.freebsd.org/changeset/base/206189 Log: MFC: r206018 - Take advantage of the INTCLR_* macros. - Right-justify the backslashes as per style(9). Modified: stable/7/sys/sparc64/fhc/fhc.c stable/7/sys/sparc64/pci/psycho.c stable/7/sys/sparc64/pci/schizo.c stable/7/sys/sparc64/sbus/sbus.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/sparc64/fhc/fhc.c ============================================================================== --- stable/7/sys/sparc64/fhc/fhc.c Mon Apr 5 17:56:40 2010 (r206188) +++ stable/7/sys/sparc64/fhc/fhc.c Mon Apr 5 17:57:46 2010 (r206189) @@ -205,7 +205,7 @@ fhc_attach(device_t dev) printf("model unknown\n"); for (i = FHC_FANFAIL; i <= FHC_TOD; i++) { - bus_write_4(sc->sc_memres[i], FHC_ICLR, 0x0); + bus_write_4(sc->sc_memres[i], FHC_ICLR, INTCLR_IDLE); (void)bus_read_4(sc->sc_memres[i], FHC_ICLR); } @@ -388,7 +388,7 @@ fhc_intr_clear(void *arg) struct intr_vector *iv = arg; struct fhc_icarg *fica = iv->iv_icarg; - bus_write_4(fica->fica_memres, FHC_ICLR, 0x0); + bus_write_4(fica->fica_memres, FHC_ICLR, INTCLR_IDLE); (void)bus_read_4(fica->fica_memres, FHC_ICLR); } Modified: stable/7/sys/sparc64/pci/psycho.c ============================================================================== --- stable/7/sys/sparc64/pci/psycho.c Mon Apr 5 17:56:40 2010 (r206188) +++ stable/7/sys/sparc64/pci/psycho.c Mon Apr 5 17:57:46 2010 (r206189) @@ -189,13 +189,13 @@ struct psycho_dma_sync { uint8_t pds_func; /* func. of farest PCI dev. */ }; -#define PSYCHO_READ8(sc, off) \ +#define PSYCHO_READ8(sc, off) \ bus_read_8((sc)->sc_mem_res, (off)) -#define PSYCHO_WRITE8(sc, off, v) \ +#define PSYCHO_WRITE8(sc, off, v) \ bus_write_8((sc)->sc_mem_res, (off), (v)) -#define PCICTL_READ8(sc, off) \ +#define PCICTL_READ8(sc, off) \ PSYCHO_READ8((sc), (sc)->sc_pcictl + (off)) -#define PCICTL_WRITE8(sc, off, v) \ +#define PCICTL_WRITE8(sc, off, v) \ PSYCHO_WRITE8((sc), (sc)->sc_pcictl + (off), (v)) /* @@ -524,7 +524,7 @@ psycho_attach(device_t dev) (u_long)intrmap, (u_long)PSYCHO_READ8(sc, intrmap), (u_long)intrclr); PSYCHO_WRITE8(sc, intrmap, INTMAP_VEC(sc->sc_ign, i)); - PSYCHO_WRITE8(sc, intrclr, 0); + PSYCHO_WRITE8(sc, intrclr, INTCLR_IDLE); PSYCHO_WRITE8(sc, intrmap, INTMAP_ENABLE(INTMAP_VEC(sc->sc_ign, i), PCPU_GET(mid))); @@ -1138,7 +1138,7 @@ psycho_intr_clear(void *arg) struct intr_vector *iv = arg; struct psycho_icarg *pica = iv->iv_icarg; - PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, 0); + PSYCHO_WRITE8(pica->pica_sc, pica->pica_clr, INTCLR_IDLE); } static int Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Mon Apr 5 17:56:40 2010 (r206188) +++ stable/7/sys/sparc64/pci/schizo.c Mon Apr 5 17:57:46 2010 (r206189) @@ -190,26 +190,26 @@ struct schizo_dma_sync { #define SCHIZO_PERF_CNT_QLTY 100 -#define SCHIZO_SPC_READ_8(spc, sc, offs) \ +#define SCHIZO_SPC_READ_8(spc, sc, offs) \ bus_read_8((sc)->sc_mem_res[(spc)], (offs)) -#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ +#define SCHIZO_SPC_WRITE_8(spc, sc, offs, v) \ bus_write_8((sc)->sc_mem_res[(spc)], (offs), (v)) -#define SCHIZO_PCI_READ_8(sc, offs) \ +#define SCHIZO_PCI_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCI, (sc), (offs)) -#define SCHIZO_PCI_WRITE_8(sc, offs, v) \ +#define SCHIZO_PCI_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_PCI, (sc), (offs), (v)) -#define SCHIZO_CTRL_READ_8(sc, offs) \ +#define SCHIZO_CTRL_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_CTRL, (sc), (offs)) -#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \ +#define SCHIZO_CTRL_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_CTRL, (sc), (offs), (v)) -#define SCHIZO_PCICFG_READ_8(sc, offs) \ +#define SCHIZO_PCICFG_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_PCICFG, (sc), (offs)) -#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \ +#define SCHIZO_PCICFG_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_PCICFG, (sc), (offs), (v)) -#define SCHIZO_ICON_READ_8(sc, offs) \ +#define SCHIZO_ICON_READ_8(sc, offs) \ SCHIZO_SPC_READ_8(STX_ICON, (sc), (offs)) -#define SCHIZO_ICON_WRITE_8(sc, offs, v) \ +#define SCHIZO_ICON_WRITE_8(sc, offs, v) \ SCHIZO_SPC_WRITE_8(STX_ICON, (sc), (offs), (v)) struct schizo_desc { @@ -1055,7 +1055,7 @@ schizo_dma_sync_stub(void *arg) for (; atomic_cmpset_acq_32(&sc->sc_cdma_state, SCHIZO_CDMA_STATE_DONE, SCHIZO_CDMA_STATE_PENDING) == 0;) ; - SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, 1); + SCHIZO_PCI_WRITE_8(sc, sc->sc_cdma_clr, INTCLR_RECEIVED); microuptime(&cur); end.tv_sec = 1; end.tv_usec = 0; @@ -1140,7 +1140,7 @@ schizo_intr_clear(void *arg) struct intr_vector *iv = arg; struct schizo_icarg *sica = iv->iv_icarg; - SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, 0); + SCHIZO_PCI_WRITE_8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE); } static int Modified: stable/7/sys/sparc64/sbus/sbus.c ============================================================================== --- stable/7/sys/sparc64/sbus/sbus.c Mon Apr 5 17:56:40 2010 (r206188) +++ stable/7/sys/sparc64/sbus/sbus.c Mon Apr 5 17:57:46 2010 (r206189) @@ -171,9 +171,9 @@ struct sbus_softc { void *sc_pf_ihand; }; -#define SYSIO_READ8(sc, off) \ +#define SYSIO_READ8(sc, off) \ bus_read_8((sc)->sc_sysio_res, (off)) -#define SYSIO_WRITE8(sc, off, v) \ +#define SYSIO_WRITE8(sc, off, v) \ bus_write_8((sc)->sc_sysio_res, (off), (v)) static device_probe_t sbus_probe; @@ -695,7 +695,7 @@ sbus_intr_clear(void *arg) struct intr_vector *iv = arg; struct sbus_icarg *sica = iv->iv_icarg; - SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, 0); + SYSIO_WRITE8(sica->sica_sc, sica->sica_clr, INTCLR_IDLE); } static int From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:58:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDDC71065670; Mon, 5 Apr 2010 17:58:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0CD18FC08; Mon, 5 Apr 2010 17:58:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35HwlFE001759; Mon, 5 Apr 2010 17:58:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HwlUu001752; Mon, 5 Apr 2010 17:58:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004051758.o35HwlUu001752@svn.freebsd.org> From: Marius Strobl Date: Mon, 5 Apr 2010 17:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206190 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:58:47 -0000 Author: marius Date: Mon Apr 5 17:58:47 2010 New Revision: 206190 URL: http://svn.freebsd.org/changeset/base/206190 Log: MFC: r206019 Don't re-implement device_get_nameunit(9). Modified: stable/7/sys/sparc64/pci/apb.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/sparc64/pci/apb.c ============================================================================== --- stable/7/sys/sparc64/pci/apb.c Mon Apr 5 17:57:46 2010 (r206189) +++ stable/7/sys/sparc64/pci/apb.c Mon Apr 5 17:58:47 2010 (r206190) @@ -224,8 +224,7 @@ apb_alloc_resource(device_t dev, device_ */ if (start == 0 && end == ~0) { device_printf(dev, "can't decode default resource id %d for " - "%s%d, bypassing\n", *rid, device_get_name(child), - device_get_unit(child)); + "%s, bypassing\n", *rid, device_get_nameunit(child)); goto passup; } @@ -237,31 +236,28 @@ apb_alloc_resource(device_t dev, device_ switch (type) { case SYS_RES_IOPORT: if (!apb_checkrange(sc->sc_iomap, APB_IO_SCALE, start, end)) { - device_printf(dev, "device %s%d requested unsupported " - "I/O range 0x%lx-0x%lx\n", device_get_name(child), - device_get_unit(child), start, end); + device_printf(dev, "device %s requested unsupported " + "I/O range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); return (NULL); } if (bootverbose) device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device " - "%s%d requested decoded I/O range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + "%s requested decoded I/O range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); break; case SYS_RES_MEMORY: if (!apb_checkrange(sc->sc_memmap, APB_MEM_SCALE, start, end)) { - device_printf(dev, "device %s%d requested unsupported " + device_printf(dev, "device %s requested unsupported " "memory range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + device_get_nameunit(child), start, end); return (NULL); } if (bootverbose) device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device " - "%s%d requested decoded memory range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + "%s requested decoded memory range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); break; default: From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:58:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FFD0106566B; Mon, 5 Apr 2010 17:58:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1328E8FC16; Mon, 5 Apr 2010 17:58:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35Hwls3001775; Mon, 5 Apr 2010 17:58:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HwlrU001773; Mon, 5 Apr 2010 17:58:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004051758.o35HwlrU001773@svn.freebsd.org> From: Marius Strobl Date: Mon, 5 Apr 2010 17:58:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206191 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:58:48 -0000 Author: marius Date: Mon Apr 5 17:58:47 2010 New Revision: 206191 URL: http://svn.freebsd.org/changeset/base/206191 Log: MFC: r206019 Don't re-implement device_get_nameunit(9). Modified: stable/8/sys/sparc64/pci/apb.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/sparc64/pci/apb.c ============================================================================== --- stable/8/sys/sparc64/pci/apb.c Mon Apr 5 17:58:47 2010 (r206190) +++ stable/8/sys/sparc64/pci/apb.c Mon Apr 5 17:58:47 2010 (r206191) @@ -223,8 +223,7 @@ apb_alloc_resource(device_t dev, device_ */ if (start == 0 && end == ~0) { device_printf(dev, "can't decode default resource id %d for " - "%s%d, bypassing\n", *rid, device_get_name(child), - device_get_unit(child)); + "%s, bypassing\n", *rid, device_get_nameunit(child)); goto passup; } @@ -236,31 +235,28 @@ apb_alloc_resource(device_t dev, device_ switch (type) { case SYS_RES_IOPORT: if (!apb_checkrange(sc->sc_iomap, APB_IO_SCALE, start, end)) { - device_printf(dev, "device %s%d requested unsupported " - "I/O range 0x%lx-0x%lx\n", device_get_name(child), - device_get_unit(child), start, end); + device_printf(dev, "device %s requested unsupported " + "I/O range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); return (NULL); } if (bootverbose) device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device " - "%s%d requested decoded I/O range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + "%s requested decoded I/O range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); break; case SYS_RES_MEMORY: if (!apb_checkrange(sc->sc_memmap, APB_MEM_SCALE, start, end)) { - device_printf(dev, "device %s%d requested unsupported " + device_printf(dev, "device %s requested unsupported " "memory range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + device_get_nameunit(child), start, end); return (NULL); } if (bootverbose) device_printf(sc->sc_bsc.ops_pcib_sc.dev, "device " - "%s%d requested decoded memory range 0x%lx-0x%lx\n", - device_get_name(child), device_get_unit(child), - start, end); + "%s requested decoded memory range 0x%lx-0x%lx\n", + device_get_nameunit(child), start, end); break; default: From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:04:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE0431065672; Mon, 5 Apr 2010 18:04:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFDBF8FC13; Mon, 5 Apr 2010 18:04:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35I41qj003035; Mon, 5 Apr 2010 18:04:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35I413M003032; Mon, 5 Apr 2010 18:04:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004051804.o35I413M003032@svn.freebsd.org> From: Marius Strobl Date: Mon, 5 Apr 2010 18:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206192 - stable/8/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:04:02 -0000 Author: marius Date: Mon Apr 5 18:04:01 2010 New Revision: 206192 URL: http://svn.freebsd.org/changeset/base/206192 Log: MFC: r206020 Use device_get_nameunit(9) rather than device_get_name(9) so one can identify the reporting bridge in machines with multiple PCI domains. Modified: stable/8/sys/sparc64/pci/psycho.c stable/8/sys/sparc64/pci/schizo.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/sparc64/pci/psycho.c ============================================================================== --- stable/8/sys/sparc64/pci/psycho.c Mon Apr 5 17:58:47 2010 (r206191) +++ stable/8/sys/sparc64/pci/psycho.c Mon Apr 5 18:04:01 2010 (r206192) @@ -808,7 +808,7 @@ psycho_ue(void *arg) if ((afsr & UEAFSR_P_DTE) != 0) iommu_decode_fault(sc->sc_is, afar); panic("%s: uncorrectable DMA error AFAR %#lx AFSR %#lx", - device_get_name(sc->sc_dev), (u_long)afar, (u_long)afsr); + device_get_nameunit(sc->sc_dev), (u_long)afar, (u_long)afsr); return (FILTER_HANDLED); } @@ -838,7 +838,7 @@ psycho_pci_bus(void *arg) afar = PCICTL_READ8(sc, PCR_AFA); afsr = PCICTL_READ8(sc, PCR_AFS); panic("%s: PCI bus %c error AFAR %#lx AFSR %#lx", - device_get_name(sc->sc_dev), 'A' + sc->sc_half, (u_long)afar, + device_get_nameunit(sc->sc_dev), 'A' + sc->sc_half, (u_long)afar, (u_long)afsr); return (FILTER_HANDLED); } Modified: stable/8/sys/sparc64/pci/schizo.c ============================================================================== --- stable/8/sys/sparc64/pci/schizo.c Mon Apr 5 17:58:47 2010 (r206191) +++ stable/8/sys/sparc64/pci/schizo.c Mon Apr 5 18:04:01 2010 (r206192) @@ -803,7 +803,7 @@ schizo_pci_bus(void *arg) } panic("%s: PCI bus %c error AFAR %#llx AFSR %#llx PCI CSR %#llx " - "IOMMU %#llx STATUS %#llx", device_get_name(sc->sc_dev), + "IOMMU %#llx STATUS %#llx", device_get_nameunit(sc->sc_dev), 'A' + sc->sc_half, (unsigned long long)afar, (unsigned long long)afsr, (unsigned long long)csr, (unsigned long long)iommu, (unsigned long long)status); @@ -838,7 +838,7 @@ schizo_ue(void *arg) break; mtx_unlock_spin(sc->sc_mtx); panic("%s: uncorrectable DMA error AFAR %#llx AFSR %#llx", - device_get_name(sc->sc_dev), (unsigned long long)afar, + device_get_nameunit(sc->sc_dev), (unsigned long long)afar, (unsigned long long)afsr); return (FILTER_HANDLED); } @@ -872,7 +872,7 @@ schizo_host_bus(void *arg) uint64_t errlog; errlog = SCHIZO_CTRL_READ_8(sc, STX_CTRL_BUS_ERRLOG); - panic("%s: %s error %#llx", device_get_name(sc->sc_dev), + panic("%s: %s error %#llx", device_get_nameunit(sc->sc_dev), sc->sc_mode == SCHIZO_MODE_TOM ? "JBus" : "Safari", (unsigned long long)errlog); return (FILTER_HANDLED); From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:04:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C04D1106575A; Mon, 5 Apr 2010 18:04:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D72A48FC19; Mon, 5 Apr 2010 18:04:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35I48uL003113; Mon, 5 Apr 2010 18:04:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35I48f3003110; Mon, 5 Apr 2010 18:04:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004051804.o35I48f3003110@svn.freebsd.org> From: Marius Strobl Date: Mon, 5 Apr 2010 18:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206194 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:04:09 -0000 Author: marius Date: Mon Apr 5 18:04:08 2010 New Revision: 206194 URL: http://svn.freebsd.org/changeset/base/206194 Log: MFC: r206020 Use device_get_nameunit(9) rather than device_get_name(9) so one can identify the reporting bridge in machines with multiple PCI domains. Modified: stable/7/sys/sparc64/pci/psycho.c stable/7/sys/sparc64/pci/schizo.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/sparc64/pci/psycho.c ============================================================================== --- stable/7/sys/sparc64/pci/psycho.c Mon Apr 5 18:04:01 2010 (r206193) +++ stable/7/sys/sparc64/pci/psycho.c Mon Apr 5 18:04:08 2010 (r206194) @@ -809,7 +809,7 @@ psycho_ue(void *arg) if ((afsr & UEAFSR_P_DTE) != 0) iommu_decode_fault(sc->sc_is, afar); panic("%s: uncorrectable DMA error AFAR %#lx AFSR %#lx", - device_get_name(sc->sc_dev), (u_long)afar, (u_long)afsr); + device_get_nameunit(sc->sc_dev), (u_long)afar, (u_long)afsr); return (FILTER_HANDLED); } @@ -839,7 +839,7 @@ psycho_pci_bus(void *arg) afar = PCICTL_READ8(sc, PCR_AFA); afsr = PCICTL_READ8(sc, PCR_AFS); panic("%s: PCI bus %c error AFAR %#lx AFSR %#lx", - device_get_name(sc->sc_dev), 'A' + sc->sc_half, (u_long)afar, + device_get_nameunit(sc->sc_dev), 'A' + sc->sc_half, (u_long)afar, (u_long)afsr); return (FILTER_HANDLED); } Modified: stable/7/sys/sparc64/pci/schizo.c ============================================================================== --- stable/7/sys/sparc64/pci/schizo.c Mon Apr 5 18:04:01 2010 (r206193) +++ stable/7/sys/sparc64/pci/schizo.c Mon Apr 5 18:04:08 2010 (r206194) @@ -804,7 +804,7 @@ schizo_pci_bus(void *arg) } panic("%s: PCI bus %c error AFAR %#llx AFSR %#llx PCI CSR %#llx " - "IOMMU %#llx STATUS %#llx", device_get_name(sc->sc_dev), + "IOMMU %#llx STATUS %#llx", device_get_nameunit(sc->sc_dev), 'A' + sc->sc_half, (unsigned long long)afar, (unsigned long long)afsr, (unsigned long long)csr, (unsigned long long)iommu, (unsigned long long)status); @@ -839,7 +839,7 @@ schizo_ue(void *arg) break; mtx_unlock_spin(sc->sc_mtx); panic("%s: uncorrectable DMA error AFAR %#llx AFSR %#llx", - device_get_name(sc->sc_dev), (unsigned long long)afar, + device_get_nameunit(sc->sc_dev), (unsigned long long)afar, (unsigned long long)afsr); return (FILTER_HANDLED); } @@ -873,7 +873,7 @@ schizo_host_bus(void *arg) uint64_t errlog; errlog = SCHIZO_CTRL_READ_8(sc, STX_CTRL_BUS_ERRLOG); - panic("%s: %s error %#llx", device_get_name(sc->sc_dev), + panic("%s: %s error %#llx", device_get_nameunit(sc->sc_dev), sc->sc_mode == SCHIZO_MODE_TOM ? "JBus" : "Safari", (unsigned long long)errlog); return (FILTER_HANDLED); From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:06:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B3F5106566C; Mon, 5 Apr 2010 18:06:57 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 9AF4D8FC16; Mon, 5 Apr 2010 18:06:56 +0000 (UTC) Received: by bwz8 with SMTP id 8so3142994bwz.3 for ; Mon, 05 Apr 2010 11:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=tvKaGIwuIPwNPiImEn71GImonyca6FkdNc4iPXp3+iI=; b=kh66sghgidTo39CAvMW4USIy2DS23GhO+S16EXyNT2YCc9Ve1U/aQQvy+3xFisWArh dZ0CVxl3BRbwlf8CGLgM78HlygnXjeGPRKKLZdw6V3CqN6+nxnVrGf4kLt5NVnJTHIK2 QGPq0mqqBoHdtBM/43f+mnCWkPJEuU1roT/pc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=jUwcpdpgOpwMFIl9vgIQMQvh3JwIOO5yEnLaaO8nt5ljwZ1d8FA/r7X32Pzz9E8nEo MVa5sExcU5ldNbCruMb87GruNm823juxlJoqVPhoXHGs0VZMJLX/ZYODpvvTKB2F0rud YybkEGnPD8PtE5go6wHetBENnY+WWVrXfhMk0= Received: by 10.204.24.134 with SMTP id v6mr6887669bkb.204.1270490814637; Mon, 05 Apr 2010 11:06:54 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id x16sm107636520bku.11.2010.04.05.11.06.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Apr 2010 11:06:51 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 5 Apr 2010 11:06:43 -0700 From: Pyun YongHyeon Date: Mon, 5 Apr 2010 11:06:42 -0700 To: Andre Albsmeier Message-ID: <20100405180642.GD1225@michelle.cdnetworks.com> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> <20100405145937.GA78871@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100405145937.GA78871@curry.mchp.siemens.de> User-Agent: Mutt/1.4.2.3i Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , Pyun YongHyeon Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:06:57 -0000 On Mon, Apr 05, 2010 at 04:59:37PM +0200, Andre Albsmeier wrote: > On Wed, 24-Mar-2010 at 18:21:05 +0100, Pyun YongHyeon wrote: > > Author: yongari > > Date: Wed Mar 24 17:21:05 2010 > > New Revision: 205614 > > URL: http://svn.freebsd.org/changeset/base/205614 > > > > Log: > > MFC r204545: > > Remove taskqueue based interrupt handling. After r204541 msk(4) > > does not generate excessive interrupts any more so we don't need > > to have two copies of interrupt handler. > > While I'm here remove two STAT_PUT_IDX register accesses in LE > > status event handler. After r204539 msk(4) always sync status LEs > > so there is no need to resort to reading STAT_PUT_IDX register to > > know the end of status LE processing. Just trust status LE's > > ownership bit. > > This ruined the performance on my system heavily. I noticed it > when unpacking a local tar archive onto an NFS-mounted location > on an em(4)-based box. This archive is about 50MB of size with > a bit over 5600 files so files have an average size of 9 kB. > > I also noticed the slowdown when doing rdist-based updates (again > lots of small files) onto the other box. > > Just pumping bytes over the network shows no problems -- I can > transmit 100-105 MB/s and receive 95-100 MB/s when talking > to this em(4)-based box without problem (and as it was before). > > When copying a few big files (several GBs of size) over NFS > I get something between 70 and 90 MB/s which is the same as > what I had got before. > > If have made some tests to track down when the issues began. > Problems started with rev. 1.18.2.37 of if_msk.c but could > be alleviated by setting dev.mskc.0.int_holdoff to 1 or 0. > Things really got problematic with rev. 1.18.2.38 -- adjusting > dev.mskc.0.int_holdoff helped a lot but we are far from what > we had with 1.18.2.36 or earlier. I did 5 rounds of testing, > each with the same set of if_msk.c revisions and values for > int_holdoff (where appropriate) just to check reproducibility: > > if_msk.c rev. round1 round2 round3 round4 round5 > -------------------------------------------------------- > 1.18.2.34 17,115 18,408 17,977 16,412 19,170 > 1.18.2.35 18,414 17,863 17,000 18,428 18,093 > 1.18.2.36 19,631 18,167 18,105 18,401 17,995 > 1.18.2.37 22,707 24,830 24,322 23,613 22,498 > int_holdoff=10 19,259 19,870 19,355 18,725 19,273 > int_holdoff=1 18,464 18,218 17,862 16,701 17,798 > int_holdoff=0 19,423 18,507 19,505 20,714 20,460 > 1.18.2.38 57,169 53,394 58,721 not done > int_holdoff=10 30,266 33,493 33,240 33,247 30,470 > int_holdoff=1 27,013 28,777 28,047 25,858 27,615 > int_holdoff=0 40,284 33,040 33,726 36,834 35,235 > > All this is on > > FreeBSD-7.3-STABLE > > CPU: Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz (3001.18-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10 > > dev.mskc.0.%desc: Marvell Yukon 88E8053 Gigabit Ethernet > dev.msk.0.%desc: Marvell Technology Group Ltd. Yukon EC Id 0xb6 Rev 0x02 > > hw.msk.msi_disable was set to 1 but didn't change results > when commenting it out. > > Any ideas or things I can try? > Could you narrow down which side(RX or TX) cause the issue you're seeing? From your description it's not clear whether msk(4) is used as sender or receiver. As you know 1.18.2.38 removed taskqueue based interrupt handling so it could be culprit of the issue. But that revision also removed two register accesses in TX path so I'd like to know which one caused the issue. > Thanks, > > -Andre From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:22:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52A0D106564A; Mon, 5 Apr 2010 18:22:43 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4FA8FC0A; Mon, 5 Apr 2010 18:22:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IMhfa007337; Mon, 5 Apr 2010 18:22:43 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35IMhQb007332; Mon, 5 Apr 2010 18:22:43 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004051822.o35IMhQb007332@svn.freebsd.org> From: Matt Jacob Date: Mon, 5 Apr 2010 18:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206196 - stable/8/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:22:43 -0000 Author: mjacob Date: Mon Apr 5 18:22:42 2010 New Revision: 206196 URL: http://svn.freebsd.org/changeset/base/206196 Log: This is an MFC of 205698 Clean up some printing stuff so that we can have a bit finer control on debug output. Add a new platform function requirement to allow for printing based upon the ITL nexus instead of the isp unit plus channel, target and lun. This allows some printouts and error messages from the core code to appear in the same format as the platform's subsystem (in FreeBSD's case, CAM path). Modified: stable/8/sys/dev/isp/isp.c stable/8/sys/dev/isp/isp_freebsd.c stable/8/sys/dev/isp/isp_freebsd.h stable/8/sys/dev/isp/ispvar.h Modified: stable/8/sys/dev/isp/isp.c ============================================================================== --- stable/8/sys/dev/isp/isp.c Mon Apr 5 18:05:09 2010 (r206195) +++ stable/8/sys/dev/isp/isp.c Mon Apr 5 18:22:42 2010 (r206196) @@ -74,14 +74,9 @@ __FBSDID("$FreeBSD$"); */ static const char fconf[] = "Chan %d PortDB[%d] changed:\n current =(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)\n database=(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)"; static const char notresp[] = "Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d"; -static const char xact1[] = "HBA attempted queued transaction with disconnect not set for %d.%d.%d"; -static const char xact2[] = "HBA attempted queued transaction to target routine %d on target %d bus %d"; -static const char xact3[] = "HBA attempted queued cmd for %d.%d.%d when queueing disabled"; -static const char pskip[] = "SCSI phase skipped for target %d.%d.%d"; static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x N-Port Handle %d, Connection '%s'"; -static const char finmsg[] = "%d.%d.%d: FIN dl%d resid %ld STS 0x%x SKEY %c XS_ERR=0x%x"; static const char sc4[] = "NVRAM"; -static const char bun[] = "bad underrun for %d.%d (count %d, resid %d, status %s)"; +static const char bun[] = "bad underrun (count %d, resid %d, status %s)"; static const char lipd[] = "Chan %d LIP destroyed %d active commands"; static const char sacq[] = "unable to acquire scratch area"; @@ -107,6 +102,7 @@ static const uint8_t alpa_map[] = { /* * Local function prototypes. */ +static void isp_prt_endcmd(ispsoftc_t *, XS_T *); static int isp_parse_async(ispsoftc_t *, uint16_t); static int isp_parse_async_fc(ispsoftc_t *, uint16_t); static int isp_handle_other_response(ispsoftc_t *, int, isphdr_t *, uint32_t *); @@ -1431,10 +1427,8 @@ isp_scsi_channel_init(ispsoftc_t *isp, i (sdp->isp_devparam[tgt].goal_offset << 8) | (sdp->isp_devparam[tgt].goal_period); } - isp_prt(isp, ISP_LOGDEBUG0, - "Initial Settings bus%d tgt%d flags 0x%x off 0x%x per 0x%x", - chan, tgt, mbs.param[2], mbs.param[3] >> 8, - mbs.param[3] & 0xff); + isp_prt(isp, ISP_LOGDEBUG0, "Initial Settings bus%d tgt%d flags 0x%x off 0x%x per 0x%x", + chan, tgt, mbs.param[2], mbs.param[3] >> 8, mbs.param[3] & 0xff); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { sdf = DPARM_SAFE_DFLT; @@ -1705,8 +1699,7 @@ isp_fibre_init(ispsoftc_t *isp) isp_prt(isp, ISP_LOGERR, sacq); return; } - isp_prt(isp, ISP_LOGDEBUG0, - "isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x", + isp_prt(isp, ISP_LOGDEBUG0, "isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x", icbp->icb_fwoptions, icbp->icb_xfwoptions, icbp->icb_zfwoptions); isp_put_icb(isp, icbp, (isp_icb_t *)fcp->isp_scratch); @@ -4432,7 +4425,7 @@ isp_start(XS_T *xs) */ return (dmaresult); } - isp_prt(isp, ISP_LOGDEBUG0, "START cmd for %d.%d.%d cmd 0x%x datalen %ld", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), XS_CDBP(xs)[0], (long) XS_XFRLEN(xs)); + isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "START cmd cdb[0]=0x%x datalen %ld", XS_CDBP(xs)[0], (long) XS_XFRLEN(xs)); isp->isp_nactive++; return (CMD_QUEUED); } @@ -5245,7 +5238,7 @@ again: } else { ptr = rnames[resp[FCP_RSPNS_CODE_OFFSET]]; } - isp_prt(isp, ISP_LOGWARN, "%d.%d.%d FCP RESPONSE, LENGTH %u: %s CDB0=0x%02x", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), rlen, ptr, XS_CDBP(xs)[0] & 0xff); + isp_xs_prt(isp, xs, ISP_LOGWARN, "FCP RESPONSE, LENGTH %u: %s CDB0=0x%02x", rlen, ptr, XS_CDBP(xs)[0] & 0xff); if (resp[FCP_RSPNS_CODE_OFFSET] != 0) { XS_SETERR(xs, HBA_BOTCH); } @@ -5322,25 +5315,9 @@ again: isp_destroy_handle(isp, sp->req_handle); if (((isp->isp_dblev & (ISP_LOGDEBUG1|ISP_LOGDEBUG2|ISP_LOGDEBUG3))) || - ((isp->isp_dblev & ISP_LOGDEBUG0) && ((!XS_NOERR(xs)) || - (*XS_STSP(xs) != SCSI_GOOD)))) { - char skey; - if (req_state_flags & RQSF_GOT_SENSE) { - skey = XS_SNSKEY(xs) & 0xf; - if (skey < 10) - skey += '0'; - else - skey += 'a' - 10; - } else if (*XS_STSP(xs) == SCSI_CHECK) { - skey = '?'; - } else { - skey = '.'; - } - isp_prt(isp, ISP_LOGALL, finmsg, XS_CHANNEL(xs), - XS_TGT(xs), XS_LUN(xs), XS_XFRLEN(xs), (long) XS_GET_RESID(xs), - *XS_STSP(xs), skey, XS_ERR(xs)); + ((isp->isp_dblev & (ISP_LOGDEBUG0|ISP_LOG_CWARN) && ((!XS_NOERR(xs)) || (*XS_STSP(xs) != SCSI_GOOD))))) { + isp_prt_endcmd(isp, xs); } - if (isp->isp_nactive > 0) { isp->isp_nactive--; } @@ -5390,6 +5367,25 @@ out: * Support routines. */ +static void +isp_prt_endcmd(ispsoftc_t *isp, XS_T *xs) +{ + char cdbstr[16 * 5 + 1]; + int i, lim; + + lim = XS_CDBLEN(xs) > 16? 16 : XS_CDBLEN(xs); + ISP_SNPRINTF(cdbstr, sizeof (cdbstr), "0x%02x ", XS_CDBP(xs)[0]); + for (i = 1; i < lim; i++) { + ISP_SNPRINTF(cdbstr, sizeof (cdbstr), "%s0x%02x ", cdbstr, XS_CDBP(xs)[i]); + } + if (XS_SENSE_VALID(xs)) { + isp_xs_prt(isp, xs, ISP_LOGALL, "FIN dl%d resid %ld CDB=%s KEY/ASC/ASCQ=0x%02x/0x%02x/0x%02x", + XS_XFRLEN(xs), (long) XS_GET_RESID(xs), cdbstr, XS_SNSKEY(xs), XS_SNSASC(xs), XS_SNSASCQ(xs)); + } else { + isp_xs_prt(isp, xs, ISP_LOGALL, "FIN dl%d resid %ld CDB=%s STS 0x%x XS_ERR=0x%x", XS_XFRLEN(xs), (long) XS_GET_RESID(xs), cdbstr, *XS_STSP(xs), XS_ERR(xs)); + } +} + /* * Parse an ASYNC mailbox complete * @@ -5934,8 +5930,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint */ static int -isp_handle_other_response(ispsoftc_t *isp, int type, - isphdr_t *hp, uint32_t *optrp) +isp_handle_other_response(ispsoftc_t *isp, int type, isphdr_t *hp, uint32_t *optrp) { switch (type) { case RQSTYPE_STATUS_CONT: @@ -6007,24 +6002,18 @@ isp_parse_status(ispsoftc_t *isp, ispsta case RQCS_INCOMPLETE: if ((sp->req_state_flags & RQSF_GOT_TARGET) == 0) { - isp_prt(isp, ISP_LOGDEBUG1, - "Selection Timeout for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGDEBUG1, "Selection Timeout"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_SELTIMEOUT); *rp = XS_XFRLEN(xs); } return; } - isp_prt(isp, ISP_LOGERR, - "command incomplete for %d.%d.%d, state 0x%x", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), - sp->req_state_flags); + isp_xs_prt(isp, xs, ISP_LOGERR, "Command Incomplete, state 0x%x", sp->req_state_flags); break; case RQCS_DMA_ERROR: - isp_prt(isp, ISP_LOGERR, "DMA error for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "DMA Error"); *rp = XS_XFRLEN(xs); break; @@ -6078,18 +6067,14 @@ isp_parse_status(ispsoftc_t *isp, ispsta if (sp->req_status_flags & RQSTF_NEGOTIATION) { ISP_SNPRINTF(buf, sizeof (buf), "%s Negotiation", buf); } - isp_prt(isp, ISP_LOGERR, "%s", buf); - isp_prt(isp, ISP_LOGERR, "transport error for %d.%d.%d:\n%s", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), buf); + isp_xs_prt(isp, xs, ISP_LOGERR, "Transport Error: %s", buf); *rp = XS_XFRLEN(xs); break; } case RQCS_RESET_OCCURRED: { int chan; - isp_prt(isp, ISP_LOGWARN, - "bus reset destroyed command for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "Bus Reset destroyed command"); for (chan = 0; chan < isp->isp_nchan; chan++) { FCPARAM(isp, chan)->sendmarker = 1; } @@ -6100,8 +6085,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta return; } case RQCS_ABORTED: - isp_prt(isp, ISP_LOGERR, "command aborted for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Command Aborted"); ISP_SET_SENDMARKER(isp, XS_CHANNEL(xs), 1); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_ABORTED); @@ -6109,8 +6093,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta return; case RQCS_TIMEOUT: - isp_prt(isp, ISP_LOGWARN, "command timed out for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "Command timed out"); /* * XXX: Check to see if we logged out of the device. */ @@ -6121,83 +6104,62 @@ isp_parse_status(ispsoftc_t *isp, ispsta case RQCS_DATA_OVERRUN: XS_SET_RESID(xs, sp->req_resid); - isp_prt(isp, ISP_LOGERR, "data overrun (%ld) for command on %d.%d.%d", - (long) XS_GET_RESID(xs), XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "data overrun (%ld)", (long) XS_GET_RESID(xs)); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_DATAOVR); } return; case RQCS_COMMAND_OVERRUN: - isp_prt(isp, ISP_LOGERR, - "command overrun for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "command overrun"); break; case RQCS_STATUS_OVERRUN: - isp_prt(isp, ISP_LOGERR, - "status overrun for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "status overrun"); break; case RQCS_BAD_MESSAGE: - isp_prt(isp, ISP_LOGERR, - "msg not COMMAND COMPLETE after status %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "msg not COMMAND COMPLETE after status"); break; case RQCS_NO_MESSAGE_OUT: - isp_prt(isp, ISP_LOGERR, - "No MESSAGE OUT phase after selection on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "No MESSAGE OUT phase after selection"); break; case RQCS_EXT_ID_FAILED: - isp_prt(isp, ISP_LOGERR, "EXTENDED IDENTIFY failed %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "EXTENDED IDENTIFY failed"); break; case RQCS_IDE_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, - "INITIATOR DETECTED ERROR rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "INITIATOR DETECTED ERROR rejected"); break; case RQCS_ABORT_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, "ABORT OPERATION rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "ABORT OPERATION rejected"); break; case RQCS_REJECT_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, "MESSAGE REJECT rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "MESSAGE REJECT rejected"); break; case RQCS_NOP_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, "NOP rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "NOP rejected"); break; case RQCS_PARITY_ERROR_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, - "MESSAGE PARITY ERROR rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "MESSAGE PARITY ERROR rejected"); break; case RQCS_DEVICE_RESET_MSG_FAILED: - isp_prt(isp, ISP_LOGWARN, - "BUS DEVICE RESET rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "BUS DEVICE RESET rejected"); break; case RQCS_ID_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, "IDENTIFY rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "IDENTIFY rejected"); break; case RQCS_UNEXP_BUS_FREE: - isp_prt(isp, ISP_LOGERR, "%d.%d.%d had an unexpected bus free", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Unexpected Bus Free"); break; case RQCS_DATA_UNDERRUN: @@ -6205,9 +6167,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta if (IS_FC(isp)) { int ru_marked = (sp->req_scsi_status & RQCS_RU) != 0; if (!ru_marked || sp->req_resid > XS_XFRLEN(xs)) { - isp_prt(isp, ISP_LOGWARN, bun, XS_TGT(xs), - XS_LUN(xs), XS_XFRLEN(xs), sp->req_resid, - (ru_marked)? "marked" : "not marked"); + isp_xs_prt(isp, xs, ISP_LOGWARN, bun, XS_XFRLEN(xs), sp->req_resid, (ru_marked)? "marked" : "not marked"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_BOTCH); } @@ -6222,18 +6182,15 @@ isp_parse_status(ispsoftc_t *isp, ispsta } case RQCS_XACT_ERR1: - isp_prt(isp, ISP_LOGERR, xact1, XS_CHANNEL(xs), - XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "HBA attempted queued transaction with disconnect not set"); break; case RQCS_XACT_ERR2: - isp_prt(isp, ISP_LOGERR, xact2, - XS_LUN(xs), XS_TGT(xs), XS_CHANNEL(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "HBA attempted queued transaction to target routine %d", XS_LUN(xs)); break; case RQCS_XACT_ERR3: - isp_prt(isp, ISP_LOGERR, xact3, - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "HBA attempted queued cmd when queueing disabled"); break; case RQCS_BAD_ENTRY: @@ -6241,9 +6198,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta break; case RQCS_QUEUE_FULL: - isp_prt(isp, ISP_LOGDEBUG0, - "internal queues full for %d.%d.%d status 0x%x", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), *XS_STSP(xs)); + isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "internal queues full status 0x%x", *XS_STSP(xs)); /* * If QFULL or some other status byte is set, then this @@ -6267,23 +6222,18 @@ isp_parse_status(ispsoftc_t *isp, ispsta return; case RQCS_PHASE_SKIPPED: - isp_prt(isp, ISP_LOGERR, pskip, XS_CHANNEL(xs), - XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "SCSI phase skipped"); break; case RQCS_ARQS_FAILED: - isp_prt(isp, ISP_LOGERR, - "Auto Request Sense failed for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Auto Request Sense Failed"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_ARQFAIL); } return; case RQCS_WIDE_FAILED: - isp_prt(isp, ISP_LOGERR, - "Wide Negotiation failed for %d.%d.%d", - XS_TGT(xs), XS_LUN(xs), XS_CHANNEL(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Wide Negotiation Failed"); if (IS_SCSI(isp)) { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); sdp->isp_devparam[XS_TGT(xs)].goal_flags &= ~DPARM_WIDE; @@ -6296,9 +6246,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta return; case RQCS_SYNCXFER_FAILED: - isp_prt(isp, ISP_LOGERR, - "SDTR Message failed for target %d.%d.%d", - XS_TGT(xs), XS_LUN(xs), XS_CHANNEL(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "SDTR Message Failed"); if (IS_SCSI(isp)) { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); sdp += XS_CHANNEL(xs); @@ -6309,9 +6257,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta break; case RQCS_LVD_BUSERR: - isp_prt(isp, ISP_LOGERR, - "Bad LVD condition while talking to %d.%d.%d", - XS_TGT(xs), XS_LUN(xs), XS_CHANNEL(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Bad LVD condition"); break; case RQCS_PORT_UNAVAILABLE: @@ -6381,8 +6327,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta } static void -isp_parse_status_24xx(ispsoftc_t *isp, isp24xx_statusreq_t *sp, - XS_T *xs, long *rp) +isp_parse_status_24xx(ispsoftc_t *isp, isp24xx_statusreq_t *sp, XS_T *xs, long *rp) { int ru_marked, sv_marked; int chan = XS_CHANNEL(xs); @@ -6395,19 +6340,15 @@ isp_parse_status_24xx(ispsoftc_t *isp, i return; case RQCS_DMA_ERROR: - isp_prt(isp, ISP_LOGERR, "DMA error for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "DMA error"); break; case RQCS_TRANSPORT_ERROR: - isp_prt(isp, ISP_LOGERR, "transport error for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Transport Error"); break; case RQCS_RESET_OCCURRED: - isp_prt(isp, ISP_LOGWARN, - "reset destroyed command for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "reset destroyed command"); FCPARAM(isp, chan)->sendmarker = 1; if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_BUSRESET); @@ -6415,8 +6356,7 @@ isp_parse_status_24xx(ispsoftc_t *isp, i return; case RQCS_ABORTED: - isp_prt(isp, ISP_LOGERR, "command aborted for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Command Aborted"); FCPARAM(isp, chan)->sendmarker = 1; if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_ABORTED); @@ -6424,8 +6364,7 @@ isp_parse_status_24xx(ispsoftc_t *isp, i return; case RQCS_TIMEOUT: - isp_prt(isp, ISP_LOGWARN, "command timed out for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "Command Timed Out"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_CMDTIMEOUT); } @@ -6433,9 +6372,7 @@ isp_parse_status_24xx(ispsoftc_t *isp, i case RQCS_DATA_OVERRUN: XS_SET_RESID(xs, sp->req_resid); - isp_prt(isp, ISP_LOGERR, - "data overrun for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Data Overrun"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_DATAOVR); } @@ -6468,19 +6405,14 @@ isp_parse_status_24xx(ispsoftc_t *isp, i sv_marked = (sp->req_scsi_status & (RQCS_SV|RQCS_RV)) != 0; if ((ru_marked == 0 && sv_marked == 0) || (sp->req_resid > XS_XFRLEN(xs))) { - isp_prt(isp, ISP_LOGWARN, bun, XS_TGT(xs), - XS_LUN(xs), XS_XFRLEN(xs), sp->req_resid, - (ru_marked)? "marked" : "not marked"); + isp_xs_prt(isp, xs, ISP_LOGWARN, bun, XS_XFRLEN(xs), sp->req_resid, (ru_marked)? "marked" : "not marked"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_BOTCH); } return; } XS_SET_RESID(xs, sp->req_resid); - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%d.%d data underrun (%d) for command 0x%x", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), - sp->req_resid, XS_CDBP(xs)[0] & 0xff); + isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "Data Underrun (%d) for command 0x%x", sp->req_resid, XS_CDBP(xs)[0] & 0xff); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_NOERROR); } @@ -7381,8 +7313,7 @@ isp_spi_update(ispsoftc_t *isp, int chan if (sdp->isp_devparam[tgt].dev_enable == 0) { sdp->isp_devparam[tgt].dev_update = 0; sdp->isp_devparam[tgt].dev_refresh = 0; - isp_prt(isp, ISP_LOGDEBUG0, - "skipping target %d bus %d update", tgt, chan); + isp_prt(isp, ISP_LOGDEBUG0, "skipping target %d bus %d update", tgt, chan); continue; } /* @@ -7438,10 +7369,8 @@ isp_spi_update(ispsoftc_t *isp, int chan sdp->isp_devparam[tgt].actv_flags &= ~DPARM_TQING; sdp->isp_devparam[tgt].actv_flags |= (sdp->isp_devparam[tgt].goal_flags & DPARM_TQING); - isp_prt(isp, ISP_LOGDEBUG0, - "bus %d set tgt %d flags 0x%x off 0x%x period 0x%x", - chan, tgt, mbs.param[2], mbs.param[3] >> 8, - mbs.param[3] & 0xff); + isp_prt(isp, ISP_LOGDEBUG0, "bus %d set tgt %d flags 0x%x off 0x%x period 0x%x", + chan, tgt, mbs.param[2], mbs.param[3] >> 8, mbs.param[3] & 0xff); get = 0; } else { continue; @@ -7775,8 +7704,7 @@ isp_read_nvram(ispsoftc_t *isp, int bus) nvram_data[2] != 'P') { if (isp->isp_bustype != ISP_BT_SBUS) { isp_prt(isp, ISP_LOGWARN, "invalid NVRAM header"); - isp_prt(isp, ISP_LOGDEBUG0, "%x %x %x", - nvram_data[0], nvram_data[1], nvram_data[2]); + isp_prt(isp, ISP_LOGDEBUG0, "%x %x %x", nvram_data[0], nvram_data[1], nvram_data[2]); } retval = -1; goto out; @@ -8291,8 +8219,7 @@ isp_parse_nvram_2100(ispsoftc_t *isp, ui ISP2100_NVRAM_TOV(nvram_data)); fcp->isp_xfwoptions = ISP2100_XFW_OPTIONS(nvram_data); fcp->isp_zfwoptions = ISP2100_ZFW_OPTIONS(nvram_data); - isp_prt(isp, ISP_LOGDEBUG0, - "xfwoptions 0x%x zfw options 0x%x", + isp_prt(isp, ISP_LOGDEBUG0, "xfwoptions 0x%x zfw options 0x%x", ISP2100_XFW_OPTIONS(nvram_data), ISP2100_ZFW_OPTIONS(nvram_data)); } Modified: stable/8/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.c Mon Apr 5 18:05:09 2010 (r206195) +++ stable/8/sys/dev/isp/isp_freebsd.c Mon Apr 5 18:22:42 2010 (r206196) @@ -5420,6 +5420,20 @@ isp_prt(ispsoftc_t *isp, int level, cons printf("\n"); } +void +isp_xs_prt(ispsoftc_t *isp, XS_T *xs, int level, const char *fmt, ...) +{ + va_list ap; + if (level != ISP_LOGALL && (level & isp->isp_dblev) == 0) { + return; + } + xpt_print_path(xs->ccb_h.path); + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); + printf("\n"); +} + uint64_t isp_nanotime_sub(struct timespec *b, struct timespec *a) { Modified: stable/8/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.h Mon Apr 5 18:05:09 2010 (r206195) +++ stable/8/sys/dev/isp/isp_freebsd.h Mon Apr 5 18:22:42 2010 (r206196) @@ -424,6 +424,8 @@ default: \ imin((sizeof((ccb)->sense_data)), ccb->sense_len) #define XS_SNSKEY(ccb) ((ccb)->sense_data.flags & 0xf) +#define XS_SNSASC(ccb) ((ccb)->sense_data.add_sense_code) +#define XS_SNSASCQ(ccb) ((ccb)->sense_data.add_sense_code_qual) #define XS_TAG_P(ccb) \ (((ccb)->ccb_h.flags & CAM_TAG_ACTION_VALID) && \ (ccb)->tag_action != CAM_TAG_ACTION_NONE) @@ -461,7 +463,7 @@ default: \ (xs)->ccb_h.status |= CAM_AUTOSNS_VALID; \ memcpy(&(xs)->sense_data, sense_ptr, imin(XS_SNSLEN(xs), sense_len)) -#define XS_SET_STATE_STAT(a, b, c) +#define XS_SENSE_VALID(xs) (((xs)->ccb_h.status & CAM_AUTOSNS_VALID) != 0) #define DEFAULT_FRAMESIZE(isp) isp->isp_osinfo.framesize #define DEFAULT_EXEC_THROTTLE(isp) isp->isp_osinfo.exec_throttle @@ -593,6 +595,7 @@ extern int isp_autoconfig; * Platform Library Functions */ void isp_prt(ispsoftc_t *, int level, const char *, ...) __printflike(3, 4); +void isp_xs_prt(ispsoftc_t *, XS_T *, int level, const char *, ...) __printflike(4, 5); uint64_t isp_nanotime_sub(struct timespec *, struct timespec *); int isp_mbox_acquire(ispsoftc_t *); void isp_mbox_wait_complete(ispsoftc_t *, mbreg_t *); Modified: stable/8/sys/dev/isp/ispvar.h ============================================================================== --- stable/8/sys/dev/isp/ispvar.h Mon Apr 5 18:05:09 2010 (r206195) +++ stable/8/sys/dev/isp/ispvar.h Mon Apr 5 18:22:42 2010 (r206196) @@ -954,12 +954,13 @@ void isp_async(ispsoftc_t *, ispasync_t, /* * Platform Dependent Error and Debug Printout * - * Generally this is: + * Two required functions for each platform must be provided: * * void isp_prt(ispsoftc_t *, int level, const char *, ...) + * void isp_xs_prt(ispsoftc_t *, XS_T *, int level, const char *, ...) * * but due to compiler differences on different platforms this won't be - * formally done here. Instead, it goes in each platform definition file. + * formally defined here. Instead, they go in each platform definition file. */ #define ISP_LOGALL 0x0 /* log always */ @@ -972,6 +973,7 @@ void isp_async(ispsoftc_t *, ispasync_t, #define ISP_LOGDEBUG2 0x40 /* log most debug messages */ #define ISP_LOGDEBUG3 0x80 /* log high frequency debug messages */ #define ISP_LOGSANCFG 0x100 /* log SAN configuration */ +#define ISP_LOG_CWARN 0x200 /* log SCSI command "warnings" (e.g., check conditions) */ #define ISP_LOGTINFO 0x1000 /* log informational messages (target mode) */ #define ISP_LOGTDEBUG0 0x2000 /* log simple debug messages (target mode) */ #define ISP_LOGTDEBUG1 0x4000 /* log intermediate debug messages (target) */ @@ -1045,6 +1047,8 @@ void isp_async(ispsoftc_t *, ispasync_t, * XS_SNSP(xs) gets a pointer to the associate sense data * XS_SNSLEN(xs) gets the length of sense data storage * XS_SNSKEY(xs) dereferences XS_SNSP to get the current stored Sense Key + * XS_SNSASC(xs) dereferences XS_SNSP to get the current stored Additional Sense Code + * XS_SNSASCQ(xs) dereferences XS_SNSP to get the current stored Additional Sense Code Qualifier * XS_TAG_P(xs) predicate of whether this command should be tagged * XS_TAG_TYPE(xs) which type of tag to use * XS_SETERR(xs) set error state @@ -1065,6 +1069,8 @@ void isp_async(ispsoftc_t *, ispasync_t, * * XS_SAVE_SENSE(xs, sp, len) save sense data * + * XS_SENSE_VALID(xs) indicates whether sense is valid + * * DEFAULT_FRAMESIZE(ispsoftc_t *) Default Frame Size * DEFAULT_EXEC_THROTTLE(ispsoftc_t *) Default Execution Throttle * From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:22:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C47551065670; Mon, 5 Apr 2010 18:22:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1C6F8FC14; Mon, 5 Apr 2010 18:22:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IMmPq007409; Mon, 5 Apr 2010 18:22:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35IMmQf007407; Mon, 5 Apr 2010 18:22:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004051822.o35IMmQf007407@svn.freebsd.org> From: Marius Strobl Date: Mon, 5 Apr 2010 18:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206197 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:22:49 -0000 Author: marius Date: Mon Apr 5 18:22:48 2010 New Revision: 206197 URL: http://svn.freebsd.org/changeset/base/206197 Log: MFC: r206086 - Try do deal gracefully with correctable ECC errors. - Improve the reporting of unhandled kernel and user traps. Modified: stable/7/sys/sparc64/sparc64/trap.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/sparc64/sparc64/trap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/trap.c Mon Apr 5 18:22:42 2010 (r206196) +++ stable/7/sys/sparc64/sparc64/trap.c Mon Apr 5 18:22:48 2010 (r206197) @@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$"); void trap(struct trapframe *tf); void syscall(struct trapframe *tf); +static int trap_cecc(void); static int trap_pfault(struct thread *td, struct trapframe *tf); extern char copy_fault[]; @@ -229,6 +230,10 @@ int debugger_on_signal = 0; SYSCTL_INT(_debug, OID_AUTO, debugger_on_signal, CTLFLAG_RW, &debugger_on_signal, 0, ""); +u_int corrected_ecc = 0; +SYSCTL_UINT(_machdep, OID_AUTO, corrected_ecc, CTLFLAG_RD, &corrected_ecc, 0, + "corrected ECC errors"); + /* * SUNW,set-trap-table allows to take over %tba from the PROM, which * will turn off interrupts and handle outstanding ones while doing so, @@ -297,10 +302,16 @@ trap(struct trapframe *tf) case T_SPILL: sig = rwindow_save(td); break; + case T_CORRECTED_ECC_ERROR: + sig = trap_cecc(); + break; default: - if (tf->tf_type < 0 || tf->tf_type >= T_MAX || - trap_sig[tf->tf_type] == -1) - panic("trap: bad trap type"); + if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + panic("trap: bad trap type %#lx (user)", + tf->tf_type); + else if (trap_sig[tf->tf_type] == -1) + panic("trap: %s (user)", + trap_msg[tf->tf_type]); sig = trap_sig[tf->tf_type]; break; } @@ -389,18 +400,53 @@ trap(struct trapframe *tf) } error = 1; break; + case T_CORRECTED_ECC_ERROR: + error = trap_cecc(); + break; default: error = 1; break; } - if (error != 0) - panic("trap: %s", trap_msg[tf->tf_type & ~T_KERNEL]); + if (error != 0) { + tf->tf_type &= ~T_KERNEL; + if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + panic("trap: bad trap type %#lx (kernel)", + tf->tf_type); + else if (trap_sig[tf->tf_type] == -1) + panic("trap: %s (kernel)", + trap_msg[tf->tf_type]); + } } CTR1(KTR_TRAP, "trap: td=%p return", td); } static int +trap_cecc(void) +{ + u_long eee; + + /* + * Turn off (non-)correctable error reporting while we're dealing + * with the error. + */ + eee = ldxa(0, ASI_ESTATE_ERROR_EN_REG); + stxa_sync(0, ASI_ESTATE_ERROR_EN_REG, eee & ~(AA_ESTATE_NCEEN | + AA_ESTATE_CEEN)); + /* Flush the caches in order ensure no corrupt data got installed. */ + cache_flush(); + /* Ensure the caches are still turned on (should be). */ + cache_enable(PCPU_GET(impl)); + /* Clear the the error from the AFSR. */ + stxa_sync(0, ASI_AFSR, ldxa(0, ASI_AFSR)); + corrected_ecc++; + printf("corrected ECC error\n"); + /* Turn (non-)correctable error reporting back on. */ + stxa_sync(0, ASI_ESTATE_ERROR_EN_REG, eee); + return (0); +} + +static int trap_pfault(struct thread *td, struct trapframe *tf) { struct vmspace *vm; From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:25:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CC31106564A; Mon, 5 Apr 2010 18:25:30 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F58F8FC0C; Mon, 5 Apr 2010 18:25:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IPUc5008064; Mon, 5 Apr 2010 18:25:30 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35IPUg6008062; Mon, 5 Apr 2010 18:25:30 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004051825.o35IPUg6008062@svn.freebsd.org> From: Marius Strobl Date: Mon, 5 Apr 2010 18:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206198 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:25:30 -0000 Author: marius Date: Mon Apr 5 18:25:30 2010 New Revision: 206198 URL: http://svn.freebsd.org/changeset/base/206198 Log: MFC: r206086 - Try do deal gracefully with correctable ECC errors. - Improve the reporting of unhandled kernel and user traps. Modified: stable/8/sys/sparc64/sparc64/trap.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/sparc64/sparc64/trap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/trap.c Mon Apr 5 18:22:48 2010 (r206197) +++ stable/8/sys/sparc64/sparc64/trap.c Mon Apr 5 18:25:30 2010 (r206198) @@ -106,6 +106,7 @@ void trap(struct trapframe *tf); void syscall(struct trapframe *tf); static int fetch_syscall_args(struct thread *td, struct syscall_args *sa); +static int trap_cecc(void); static int trap_pfault(struct thread *td, struct trapframe *tf); extern char copy_fault[]; @@ -240,6 +241,10 @@ int debugger_on_signal = 0; SYSCTL_INT(_debug, OID_AUTO, debugger_on_signal, CTLFLAG_RW, &debugger_on_signal, 0, ""); +u_int corrected_ecc = 0; +SYSCTL_UINT(_machdep, OID_AUTO, corrected_ecc, CTLFLAG_RD, &corrected_ecc, 0, + "corrected ECC errors"); + /* * SUNW,set-trap-table allows to take over %tba from the PROM, which * will turn off interrupts and handle outstanding ones while doing so, @@ -308,10 +313,16 @@ trap(struct trapframe *tf) case T_SPILL: sig = rwindow_save(td); break; + case T_CORRECTED_ECC_ERROR: + sig = trap_cecc(); + break; default: - if (tf->tf_type < 0 || tf->tf_type >= T_MAX || - trap_sig[tf->tf_type] == -1) - panic("trap: bad trap type"); + if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + panic("trap: bad trap type %#lx (user)", + tf->tf_type); + else if (trap_sig[tf->tf_type] == -1) + panic("trap: %s (user)", + trap_msg[tf->tf_type]); sig = trap_sig[tf->tf_type]; break; } @@ -400,18 +411,53 @@ trap(struct trapframe *tf) } error = 1; break; + case T_CORRECTED_ECC_ERROR: + error = trap_cecc(); + break; default: error = 1; break; } - if (error != 0) - panic("trap: %s", trap_msg[tf->tf_type & ~T_KERNEL]); + if (error != 0) { + tf->tf_type &= ~T_KERNEL; + if (tf->tf_type < 0 || tf->tf_type >= T_MAX) + panic("trap: bad trap type %#lx (kernel)", + tf->tf_type); + else if (trap_sig[tf->tf_type] == -1) + panic("trap: %s (kernel)", + trap_msg[tf->tf_type]); + } } CTR1(KTR_TRAP, "trap: td=%p return", td); } static int +trap_cecc(void) +{ + u_long eee; + + /* + * Turn off (non-)correctable error reporting while we're dealing + * with the error. + */ + eee = ldxa(0, ASI_ESTATE_ERROR_EN_REG); + stxa_sync(0, ASI_ESTATE_ERROR_EN_REG, eee & ~(AA_ESTATE_NCEEN | + AA_ESTATE_CEEN)); + /* Flush the caches in order ensure no corrupt data got installed. */ + cache_flush(); + /* Ensure the caches are still turned on (should be). */ + cache_enable(PCPU_GET(impl)); + /* Clear the the error from the AFSR. */ + stxa_sync(0, ASI_AFSR, ldxa(0, ASI_AFSR)); + corrected_ecc++; + printf("corrected ECC error\n"); + /* Turn (non-)correctable error reporting back on. */ + stxa_sync(0, ASI_ESTATE_ERROR_EN_REG, eee); + return (0); +} + +static int trap_pfault(struct thread *td, struct trapframe *tf) { struct vmspace *vm; @@ -667,7 +713,7 @@ syscall(struct trapframe *tf) */ WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? - syscallnames[sa.code] : "???"); + syscallnames[sa.code] : "???"); KASSERT(td->td_critnest == 0, ("System call %s returning in a critical section", (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ? From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:27:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D92E106564A; Mon, 5 Apr 2010 18:27:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BADA8FC1C; Mon, 5 Apr 2010 18:27:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IRwgk008634; Mon, 5 Apr 2010 18:27:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35IRwVD008632; Mon, 5 Apr 2010 18:27:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004051827.o35IRwVD008632@svn.freebsd.org> From: Xin LI Date: Mon, 5 Apr 2010 18:27:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206199 - head/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:27:58 -0000 Author: delphij Date: Mon Apr 5 18:27:58 2010 New Revision: 206199 URL: http://svn.freebsd.org/changeset/base/206199 Log: Refine previous partial merge of OpenSolaris onnv revision 9396:f41cf682d0d3. This fixes a regression that zfs list would crash on zfs having user properties. PR: kern/145377 Submitted by: mm Approved by: pjd Obtained from: OpenSolaris MFC after: 10 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Apr 5 18:25:30 2010 (r206198) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Apr 5 18:27:58 2010 (r206199) @@ -4288,7 +4288,12 @@ zfs_prune_proplist(zfs_handle_t *zhp, ui zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + /* + * We leave user:props in the nvlist, so there will be + * some ZPROP_INVAL. To be extra safe, don't prune + * those. + */ + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next; From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:29:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73B47106564A; Mon, 5 Apr 2010 18:29:46 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4670D8FC1E; Mon, 5 Apr 2010 18:29:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35ITk7Q009081; Mon, 5 Apr 2010 18:29:46 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35ITkYL009076; Mon, 5 Apr 2010 18:29:46 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004051829.o35ITkYL009076@svn.freebsd.org> From: Matt Jacob Date: Mon, 5 Apr 2010 18:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206200 - stable/7/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:29:46 -0000 Author: mjacob Date: Mon Apr 5 18:29:45 2010 New Revision: 206200 URL: http://svn.freebsd.org/changeset/base/206200 Log: This is an mfs of 205698. Clean up some printing stuff so that we can have a bit finer control on debug output. Add a new platform function requirement to allow for printing based upon the ITL nexus instead of the isp unit plus channel, target and lun. This allows some printouts and error messages from the core code to appear in the same format as the platform's subsystem (in FreeBSD's case, CAM path). Modified: stable/7/sys/dev/isp/isp.c stable/7/sys/dev/isp/isp_freebsd.c stable/7/sys/dev/isp/isp_freebsd.h stable/7/sys/dev/isp/ispvar.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/isp/isp.c ============================================================================== --- stable/7/sys/dev/isp/isp.c Mon Apr 5 18:27:58 2010 (r206199) +++ stable/7/sys/dev/isp/isp.c Mon Apr 5 18:29:45 2010 (r206200) @@ -74,14 +74,9 @@ __FBSDID("$FreeBSD$"); */ static const char fconf[] = "Chan %d PortDB[%d] changed:\n current =(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)\n database=(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)"; static const char notresp[] = "Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d"; -static const char xact1[] = "HBA attempted queued transaction with disconnect not set for %d.%d.%d"; -static const char xact2[] = "HBA attempted queued transaction to target routine %d on target %d bus %d"; -static const char xact3[] = "HBA attempted queued cmd for %d.%d.%d when queueing disabled"; -static const char pskip[] = "SCSI phase skipped for target %d.%d.%d"; static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x N-Port Handle %d, Connection '%s'"; -static const char finmsg[] = "%d.%d.%d: FIN dl%d resid %ld STS 0x%x SKEY %c XS_ERR=0x%x"; static const char sc4[] = "NVRAM"; -static const char bun[] = "bad underrun for %d.%d (count %d, resid %d, status %s)"; +static const char bun[] = "bad underrun (count %d, resid %d, status %s)"; static const char lipd[] = "Chan %d LIP destroyed %d active commands"; static const char sacq[] = "unable to acquire scratch area"; @@ -107,6 +102,7 @@ static const uint8_t alpa_map[] = { /* * Local function prototypes. */ +static void isp_prt_endcmd(ispsoftc_t *, XS_T *); static int isp_parse_async(ispsoftc_t *, uint16_t); static int isp_parse_async_fc(ispsoftc_t *, uint16_t); static int isp_handle_other_response(ispsoftc_t *, int, isphdr_t *, uint32_t *); @@ -1431,10 +1427,8 @@ isp_scsi_channel_init(ispsoftc_t *isp, i (sdp->isp_devparam[tgt].goal_offset << 8) | (sdp->isp_devparam[tgt].goal_period); } - isp_prt(isp, ISP_LOGDEBUG0, - "Initial Settings bus%d tgt%d flags 0x%x off 0x%x per 0x%x", - chan, tgt, mbs.param[2], mbs.param[3] >> 8, - mbs.param[3] & 0xff); + isp_prt(isp, ISP_LOGDEBUG0, "Initial Settings bus%d tgt%d flags 0x%x off 0x%x per 0x%x", + chan, tgt, mbs.param[2], mbs.param[3] >> 8, mbs.param[3] & 0xff); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { sdf = DPARM_SAFE_DFLT; @@ -1705,8 +1699,7 @@ isp_fibre_init(ispsoftc_t *isp) isp_prt(isp, ISP_LOGERR, sacq); return; } - isp_prt(isp, ISP_LOGDEBUG0, - "isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x", + isp_prt(isp, ISP_LOGDEBUG0, "isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x", icbp->icb_fwoptions, icbp->icb_xfwoptions, icbp->icb_zfwoptions); isp_put_icb(isp, icbp, (isp_icb_t *)fcp->isp_scratch); @@ -4435,7 +4428,7 @@ isp_start(XS_T *xs) */ return (dmaresult); } - isp_prt(isp, ISP_LOGDEBUG0, "START cmd for %d.%d.%d cmd 0x%x datalen %ld", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), XS_CDBP(xs)[0], (long) XS_XFRLEN(xs)); + isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "START cmd cdb[0]=0x%x datalen %ld", XS_CDBP(xs)[0], (long) XS_XFRLEN(xs)); isp->isp_nactive++; return (CMD_QUEUED); } @@ -5248,7 +5241,7 @@ again: } else { ptr = rnames[resp[FCP_RSPNS_CODE_OFFSET]]; } - isp_prt(isp, ISP_LOGWARN, "%d.%d.%d FCP RESPONSE, LENGTH %u: %s CDB0=0x%02x", XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), rlen, ptr, XS_CDBP(xs)[0] & 0xff); + isp_xs_prt(isp, xs, ISP_LOGWARN, "FCP RESPONSE, LENGTH %u: %s CDB0=0x%02x", rlen, ptr, XS_CDBP(xs)[0] & 0xff); if (resp[FCP_RSPNS_CODE_OFFSET] != 0) { XS_SETERR(xs, HBA_BOTCH); } @@ -5325,25 +5318,9 @@ again: isp_destroy_handle(isp, sp->req_handle); if (((isp->isp_dblev & (ISP_LOGDEBUG1|ISP_LOGDEBUG2|ISP_LOGDEBUG3))) || - ((isp->isp_dblev & ISP_LOGDEBUG0) && ((!XS_NOERR(xs)) || - (*XS_STSP(xs) != SCSI_GOOD)))) { - char skey; - if (req_state_flags & RQSF_GOT_SENSE) { - skey = XS_SNSKEY(xs) & 0xf; - if (skey < 10) - skey += '0'; - else - skey += 'a' - 10; - } else if (*XS_STSP(xs) == SCSI_CHECK) { - skey = '?'; - } else { - skey = '.'; - } - isp_prt(isp, ISP_LOGALL, finmsg, XS_CHANNEL(xs), - XS_TGT(xs), XS_LUN(xs), XS_XFRLEN(xs), (long) XS_GET_RESID(xs), - *XS_STSP(xs), skey, XS_ERR(xs)); + ((isp->isp_dblev & (ISP_LOGDEBUG0|ISP_LOG_CWARN) && ((!XS_NOERR(xs)) || (*XS_STSP(xs) != SCSI_GOOD))))) { + isp_prt_endcmd(isp, xs); } - if (isp->isp_nactive > 0) { isp->isp_nactive--; } @@ -5393,6 +5370,25 @@ out: * Support routines. */ +static void +isp_prt_endcmd(ispsoftc_t *isp, XS_T *xs) +{ + char cdbstr[16 * 5 + 1]; + int i, lim; + + lim = XS_CDBLEN(xs) > 16? 16 : XS_CDBLEN(xs); + ISP_SNPRINTF(cdbstr, sizeof (cdbstr), "0x%02x ", XS_CDBP(xs)[0]); + for (i = 1; i < lim; i++) { + ISP_SNPRINTF(cdbstr, sizeof (cdbstr), "%s0x%02x ", cdbstr, XS_CDBP(xs)[i]); + } + if (XS_SENSE_VALID(xs)) { + isp_xs_prt(isp, xs, ISP_LOGALL, "FIN dl%d resid %ld CDB=%s KEY/ASC/ASCQ=0x%02x/0x%02x/0x%02x", + XS_XFRLEN(xs), (long) XS_GET_RESID(xs), cdbstr, XS_SNSKEY(xs), XS_SNSASC(xs), XS_SNSASCQ(xs)); + } else { + isp_xs_prt(isp, xs, ISP_LOGALL, "FIN dl%d resid %ld CDB=%s STS 0x%x XS_ERR=0x%x", XS_XFRLEN(xs), (long) XS_GET_RESID(xs), cdbstr, *XS_STSP(xs), XS_ERR(xs)); + } +} + /* * Parse an ASYNC mailbox complete * @@ -5937,8 +5933,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint */ static int -isp_handle_other_response(ispsoftc_t *isp, int type, - isphdr_t *hp, uint32_t *optrp) +isp_handle_other_response(ispsoftc_t *isp, int type, isphdr_t *hp, uint32_t *optrp) { switch (type) { case RQSTYPE_STATUS_CONT: @@ -6010,24 +6005,18 @@ isp_parse_status(ispsoftc_t *isp, ispsta case RQCS_INCOMPLETE: if ((sp->req_state_flags & RQSF_GOT_TARGET) == 0) { - isp_prt(isp, ISP_LOGDEBUG1, - "Selection Timeout for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGDEBUG1, "Selection Timeout"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_SELTIMEOUT); *rp = XS_XFRLEN(xs); } return; } - isp_prt(isp, ISP_LOGERR, - "command incomplete for %d.%d.%d, state 0x%x", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), - sp->req_state_flags); + isp_xs_prt(isp, xs, ISP_LOGERR, "Command Incomplete, state 0x%x", sp->req_state_flags); break; case RQCS_DMA_ERROR: - isp_prt(isp, ISP_LOGERR, "DMA error for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "DMA Error"); *rp = XS_XFRLEN(xs); break; @@ -6081,18 +6070,14 @@ isp_parse_status(ispsoftc_t *isp, ispsta if (sp->req_status_flags & RQSTF_NEGOTIATION) { ISP_SNPRINTF(buf, sizeof (buf), "%s Negotiation", buf); } - isp_prt(isp, ISP_LOGERR, "%s", buf); - isp_prt(isp, ISP_LOGERR, "transport error for %d.%d.%d:\n%s", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), buf); + isp_xs_prt(isp, xs, ISP_LOGERR, "Transport Error: %s", buf); *rp = XS_XFRLEN(xs); break; } case RQCS_RESET_OCCURRED: { int chan; - isp_prt(isp, ISP_LOGWARN, - "bus reset destroyed command for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "Bus Reset destroyed command"); for (chan = 0; chan < isp->isp_nchan; chan++) { FCPARAM(isp, chan)->sendmarker = 1; } @@ -6103,8 +6088,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta return; } case RQCS_ABORTED: - isp_prt(isp, ISP_LOGERR, "command aborted for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Command Aborted"); ISP_SET_SENDMARKER(isp, XS_CHANNEL(xs), 1); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_ABORTED); @@ -6112,8 +6096,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta return; case RQCS_TIMEOUT: - isp_prt(isp, ISP_LOGWARN, "command timed out for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "Command timed out"); /* * XXX: Check to see if we logged out of the device. */ @@ -6124,83 +6107,62 @@ isp_parse_status(ispsoftc_t *isp, ispsta case RQCS_DATA_OVERRUN: XS_SET_RESID(xs, sp->req_resid); - isp_prt(isp, ISP_LOGERR, "data overrun (%ld) for command on %d.%d.%d", - (long) XS_GET_RESID(xs), XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "data overrun (%ld)", (long) XS_GET_RESID(xs)); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_DATAOVR); } return; case RQCS_COMMAND_OVERRUN: - isp_prt(isp, ISP_LOGERR, - "command overrun for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "command overrun"); break; case RQCS_STATUS_OVERRUN: - isp_prt(isp, ISP_LOGERR, - "status overrun for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "status overrun"); break; case RQCS_BAD_MESSAGE: - isp_prt(isp, ISP_LOGERR, - "msg not COMMAND COMPLETE after status %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "msg not COMMAND COMPLETE after status"); break; case RQCS_NO_MESSAGE_OUT: - isp_prt(isp, ISP_LOGERR, - "No MESSAGE OUT phase after selection on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "No MESSAGE OUT phase after selection"); break; case RQCS_EXT_ID_FAILED: - isp_prt(isp, ISP_LOGERR, "EXTENDED IDENTIFY failed %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "EXTENDED IDENTIFY failed"); break; case RQCS_IDE_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, - "INITIATOR DETECTED ERROR rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "INITIATOR DETECTED ERROR rejected"); break; case RQCS_ABORT_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, "ABORT OPERATION rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "ABORT OPERATION rejected"); break; case RQCS_REJECT_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, "MESSAGE REJECT rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "MESSAGE REJECT rejected"); break; case RQCS_NOP_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, "NOP rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "NOP rejected"); break; case RQCS_PARITY_ERROR_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, - "MESSAGE PARITY ERROR rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "MESSAGE PARITY ERROR rejected"); break; case RQCS_DEVICE_RESET_MSG_FAILED: - isp_prt(isp, ISP_LOGWARN, - "BUS DEVICE RESET rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "BUS DEVICE RESET rejected"); break; case RQCS_ID_MSG_FAILED: - isp_prt(isp, ISP_LOGERR, "IDENTIFY rejected by %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "IDENTIFY rejected"); break; case RQCS_UNEXP_BUS_FREE: - isp_prt(isp, ISP_LOGERR, "%d.%d.%d had an unexpected bus free", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Unexpected Bus Free"); break; case RQCS_DATA_UNDERRUN: @@ -6208,9 +6170,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta if (IS_FC(isp)) { int ru_marked = (sp->req_scsi_status & RQCS_RU) != 0; if (!ru_marked || sp->req_resid > XS_XFRLEN(xs)) { - isp_prt(isp, ISP_LOGWARN, bun, XS_TGT(xs), - XS_LUN(xs), XS_XFRLEN(xs), sp->req_resid, - (ru_marked)? "marked" : "not marked"); + isp_xs_prt(isp, xs, ISP_LOGWARN, bun, XS_XFRLEN(xs), sp->req_resid, (ru_marked)? "marked" : "not marked"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_BOTCH); } @@ -6225,18 +6185,15 @@ isp_parse_status(ispsoftc_t *isp, ispsta } case RQCS_XACT_ERR1: - isp_prt(isp, ISP_LOGERR, xact1, XS_CHANNEL(xs), - XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "HBA attempted queued transaction with disconnect not set"); break; case RQCS_XACT_ERR2: - isp_prt(isp, ISP_LOGERR, xact2, - XS_LUN(xs), XS_TGT(xs), XS_CHANNEL(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "HBA attempted queued transaction to target routine %d", XS_LUN(xs)); break; case RQCS_XACT_ERR3: - isp_prt(isp, ISP_LOGERR, xact3, - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "HBA attempted queued cmd when queueing disabled"); break; case RQCS_BAD_ENTRY: @@ -6244,9 +6201,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta break; case RQCS_QUEUE_FULL: - isp_prt(isp, ISP_LOGDEBUG0, - "internal queues full for %d.%d.%d status 0x%x", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), *XS_STSP(xs)); + isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "internal queues full status 0x%x", *XS_STSP(xs)); /* * If QFULL or some other status byte is set, then this @@ -6270,23 +6225,18 @@ isp_parse_status(ispsoftc_t *isp, ispsta return; case RQCS_PHASE_SKIPPED: - isp_prt(isp, ISP_LOGERR, pskip, XS_CHANNEL(xs), - XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "SCSI phase skipped"); break; case RQCS_ARQS_FAILED: - isp_prt(isp, ISP_LOGERR, - "Auto Request Sense failed for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Auto Request Sense Failed"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_ARQFAIL); } return; case RQCS_WIDE_FAILED: - isp_prt(isp, ISP_LOGERR, - "Wide Negotiation failed for %d.%d.%d", - XS_TGT(xs), XS_LUN(xs), XS_CHANNEL(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Wide Negotiation Failed"); if (IS_SCSI(isp)) { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); sdp->isp_devparam[XS_TGT(xs)].goal_flags &= ~DPARM_WIDE; @@ -6299,9 +6249,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta return; case RQCS_SYNCXFER_FAILED: - isp_prt(isp, ISP_LOGERR, - "SDTR Message failed for target %d.%d.%d", - XS_TGT(xs), XS_LUN(xs), XS_CHANNEL(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "SDTR Message Failed"); if (IS_SCSI(isp)) { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); sdp += XS_CHANNEL(xs); @@ -6312,9 +6260,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta break; case RQCS_LVD_BUSERR: - isp_prt(isp, ISP_LOGERR, - "Bad LVD condition while talking to %d.%d.%d", - XS_TGT(xs), XS_LUN(xs), XS_CHANNEL(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Bad LVD condition"); break; case RQCS_PORT_UNAVAILABLE: @@ -6384,8 +6330,7 @@ isp_parse_status(ispsoftc_t *isp, ispsta } static void -isp_parse_status_24xx(ispsoftc_t *isp, isp24xx_statusreq_t *sp, - XS_T *xs, long *rp) +isp_parse_status_24xx(ispsoftc_t *isp, isp24xx_statusreq_t *sp, XS_T *xs, long *rp) { int ru_marked, sv_marked; int chan = XS_CHANNEL(xs); @@ -6398,19 +6343,15 @@ isp_parse_status_24xx(ispsoftc_t *isp, i return; case RQCS_DMA_ERROR: - isp_prt(isp, ISP_LOGERR, "DMA error for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "DMA error"); break; case RQCS_TRANSPORT_ERROR: - isp_prt(isp, ISP_LOGERR, "transport error for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Transport Error"); break; case RQCS_RESET_OCCURRED: - isp_prt(isp, ISP_LOGWARN, - "reset destroyed command for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "reset destroyed command"); FCPARAM(isp, chan)->sendmarker = 1; if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_BUSRESET); @@ -6418,8 +6359,7 @@ isp_parse_status_24xx(ispsoftc_t *isp, i return; case RQCS_ABORTED: - isp_prt(isp, ISP_LOGERR, "command aborted for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Command Aborted"); FCPARAM(isp, chan)->sendmarker = 1; if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_ABORTED); @@ -6427,8 +6367,7 @@ isp_parse_status_24xx(ispsoftc_t *isp, i return; case RQCS_TIMEOUT: - isp_prt(isp, ISP_LOGWARN, "command timed out for %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGWARN, "Command Timed Out"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_CMDTIMEOUT); } @@ -6436,9 +6375,7 @@ isp_parse_status_24xx(ispsoftc_t *isp, i case RQCS_DATA_OVERRUN: XS_SET_RESID(xs, sp->req_resid); - isp_prt(isp, ISP_LOGERR, - "data overrun for command on %d.%d.%d", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs)); + isp_xs_prt(isp, xs, ISP_LOGERR, "Data Overrun"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_DATAOVR); } @@ -6471,19 +6408,14 @@ isp_parse_status_24xx(ispsoftc_t *isp, i sv_marked = (sp->req_scsi_status & (RQCS_SV|RQCS_RV)) != 0; if ((ru_marked == 0 && sv_marked == 0) || (sp->req_resid > XS_XFRLEN(xs))) { - isp_prt(isp, ISP_LOGWARN, bun, XS_TGT(xs), - XS_LUN(xs), XS_XFRLEN(xs), sp->req_resid, - (ru_marked)? "marked" : "not marked"); + isp_xs_prt(isp, xs, ISP_LOGWARN, bun, XS_XFRLEN(xs), sp->req_resid, (ru_marked)? "marked" : "not marked"); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_BOTCH); } return; } XS_SET_RESID(xs, sp->req_resid); - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%d.%d data underrun (%d) for command 0x%x", - XS_CHANNEL(xs), XS_TGT(xs), XS_LUN(xs), - sp->req_resid, XS_CDBP(xs)[0] & 0xff); + isp_xs_prt(isp, xs, ISP_LOGDEBUG0, "Data Underrun (%d) for command 0x%x", sp->req_resid, XS_CDBP(xs)[0] & 0xff); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_NOERROR); } @@ -7384,8 +7316,7 @@ isp_spi_update(ispsoftc_t *isp, int chan if (sdp->isp_devparam[tgt].dev_enable == 0) { sdp->isp_devparam[tgt].dev_update = 0; sdp->isp_devparam[tgt].dev_refresh = 0; - isp_prt(isp, ISP_LOGDEBUG0, - "skipping target %d bus %d update", tgt, chan); + isp_prt(isp, ISP_LOGDEBUG0, "skipping target %d bus %d update", tgt, chan); continue; } /* @@ -7441,10 +7372,8 @@ isp_spi_update(ispsoftc_t *isp, int chan sdp->isp_devparam[tgt].actv_flags &= ~DPARM_TQING; sdp->isp_devparam[tgt].actv_flags |= (sdp->isp_devparam[tgt].goal_flags & DPARM_TQING); - isp_prt(isp, ISP_LOGDEBUG0, - "bus %d set tgt %d flags 0x%x off 0x%x period 0x%x", - chan, tgt, mbs.param[2], mbs.param[3] >> 8, - mbs.param[3] & 0xff); + isp_prt(isp, ISP_LOGDEBUG0, "bus %d set tgt %d flags 0x%x off 0x%x period 0x%x", + chan, tgt, mbs.param[2], mbs.param[3] >> 8, mbs.param[3] & 0xff); get = 0; } else { continue; @@ -7778,8 +7707,7 @@ isp_read_nvram(ispsoftc_t *isp, int bus) nvram_data[2] != 'P') { if (isp->isp_bustype != ISP_BT_SBUS) { isp_prt(isp, ISP_LOGWARN, "invalid NVRAM header"); - isp_prt(isp, ISP_LOGDEBUG0, "%x %x %x", - nvram_data[0], nvram_data[1], nvram_data[2]); + isp_prt(isp, ISP_LOGDEBUG0, "%x %x %x", nvram_data[0], nvram_data[1], nvram_data[2]); } retval = -1; goto out; @@ -8294,8 +8222,7 @@ isp_parse_nvram_2100(ispsoftc_t *isp, ui ISP2100_NVRAM_TOV(nvram_data)); fcp->isp_xfwoptions = ISP2100_XFW_OPTIONS(nvram_data); fcp->isp_zfwoptions = ISP2100_ZFW_OPTIONS(nvram_data); - isp_prt(isp, ISP_LOGDEBUG0, - "xfwoptions 0x%x zfw options 0x%x", + isp_prt(isp, ISP_LOGDEBUG0, "xfwoptions 0x%x zfw options 0x%x", ISP2100_XFW_OPTIONS(nvram_data), ISP2100_ZFW_OPTIONS(nvram_data)); } Modified: stable/7/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/7/sys/dev/isp/isp_freebsd.c Mon Apr 5 18:27:58 2010 (r206199) +++ stable/7/sys/dev/isp/isp_freebsd.c Mon Apr 5 18:29:45 2010 (r206200) @@ -5420,6 +5420,20 @@ isp_prt(ispsoftc_t *isp, int level, cons printf("\n"); } +void +isp_xs_prt(ispsoftc_t *isp, XS_T *xs, int level, const char *fmt, ...) +{ + va_list ap; + if (level != ISP_LOGALL && (level & isp->isp_dblev) == 0) { + return; + } + xpt_print_path(xs->ccb_h.path); + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); + printf("\n"); +} + uint64_t isp_nanotime_sub(struct timespec *b, struct timespec *a) { Modified: stable/7/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/7/sys/dev/isp/isp_freebsd.h Mon Apr 5 18:27:58 2010 (r206199) +++ stable/7/sys/dev/isp/isp_freebsd.h Mon Apr 5 18:29:45 2010 (r206200) @@ -424,6 +424,8 @@ default: \ imin((sizeof((ccb)->sense_data)), ccb->sense_len) #define XS_SNSKEY(ccb) ((ccb)->sense_data.flags & 0xf) +#define XS_SNSASC(ccb) ((ccb)->sense_data.add_sense_code) +#define XS_SNSASCQ(ccb) ((ccb)->sense_data.add_sense_code_qual) #define XS_TAG_P(ccb) \ (((ccb)->ccb_h.flags & CAM_TAG_ACTION_VALID) && \ (ccb)->tag_action != CAM_TAG_ACTION_NONE) @@ -461,7 +463,7 @@ default: \ (xs)->ccb_h.status |= CAM_AUTOSNS_VALID; \ memcpy(&(xs)->sense_data, sense_ptr, imin(XS_SNSLEN(xs), sense_len)) -#define XS_SET_STATE_STAT(a, b, c) +#define XS_SENSE_VALID(xs) (((xs)->ccb_h.status & CAM_AUTOSNS_VALID) != 0) #define DEFAULT_FRAMESIZE(isp) isp->isp_osinfo.framesize #define DEFAULT_EXEC_THROTTLE(isp) isp->isp_osinfo.exec_throttle @@ -593,6 +595,7 @@ extern int isp_autoconfig; * Platform Library Functions */ void isp_prt(ispsoftc_t *, int level, const char *, ...) __printflike(3, 4); +void isp_xs_prt(ispsoftc_t *, XS_T *, int level, const char *, ...) __printflike(4, 5); uint64_t isp_nanotime_sub(struct timespec *, struct timespec *); int isp_mbox_acquire(ispsoftc_t *); void isp_mbox_wait_complete(ispsoftc_t *, mbreg_t *); Modified: stable/7/sys/dev/isp/ispvar.h ============================================================================== --- stable/7/sys/dev/isp/ispvar.h Mon Apr 5 18:27:58 2010 (r206199) +++ stable/7/sys/dev/isp/ispvar.h Mon Apr 5 18:29:45 2010 (r206200) @@ -954,12 +954,13 @@ void isp_async(ispsoftc_t *, ispasync_t, /* * Platform Dependent Error and Debug Printout * - * Generally this is: + * Two required functions for each platform must be provided: * * void isp_prt(ispsoftc_t *, int level, const char *, ...) + * void isp_xs_prt(ispsoftc_t *, XS_T *, int level, const char *, ...) * * but due to compiler differences on different platforms this won't be - * formally done here. Instead, it goes in each platform definition file. + * formally defined here. Instead, they go in each platform definition file. */ #define ISP_LOGALL 0x0 /* log always */ @@ -972,6 +973,7 @@ void isp_async(ispsoftc_t *, ispasync_t, #define ISP_LOGDEBUG2 0x40 /* log most debug messages */ #define ISP_LOGDEBUG3 0x80 /* log high frequency debug messages */ #define ISP_LOGSANCFG 0x100 /* log SAN configuration */ +#define ISP_LOG_CWARN 0x200 /* log SCSI command "warnings" (e.g., check conditions) */ #define ISP_LOGTINFO 0x1000 /* log informational messages (target mode) */ #define ISP_LOGTDEBUG0 0x2000 /* log simple debug messages (target mode) */ #define ISP_LOGTDEBUG1 0x4000 /* log intermediate debug messages (target) */ @@ -1045,6 +1047,8 @@ void isp_async(ispsoftc_t *, ispasync_t, * XS_SNSP(xs) gets a pointer to the associate sense data * XS_SNSLEN(xs) gets the length of sense data storage * XS_SNSKEY(xs) dereferences XS_SNSP to get the current stored Sense Key + * XS_SNSASC(xs) dereferences XS_SNSP to get the current stored Additional Sense Code + * XS_SNSASCQ(xs) dereferences XS_SNSP to get the current stored Additional Sense Code Qualifier * XS_TAG_P(xs) predicate of whether this command should be tagged * XS_TAG_TYPE(xs) which type of tag to use * XS_SETERR(xs) set error state @@ -1065,6 +1069,8 @@ void isp_async(ispsoftc_t *, ispasync_t, * * XS_SAVE_SENSE(xs, sp, len) save sense data * + * XS_SENSE_VALID(xs) indicates whether sense is valid + * * DEFAULT_FRAMESIZE(ispsoftc_t *) Default Frame Size * DEFAULT_EXEC_THROTTLE(ispsoftc_t *) Default Execution Throttle * From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:33:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A082106566B; Mon, 5 Apr 2010 18:33:42 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CB398FC13; Mon, 5 Apr 2010 18:33:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IXguk010001; Mon, 5 Apr 2010 18:33:42 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35IXgKZ010000; Mon, 5 Apr 2010 18:33:42 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004051833.o35IXgKZ010000@svn.freebsd.org> From: Matt Jacob Date: Mon, 5 Apr 2010 18:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206201 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:33:42 -0000 Author: mjacob Date: Mon Apr 5 18:33:42 2010 New Revision: 206201 URL: http://svn.freebsd.org/changeset/base/206201 Log: Handle the missing props changes for my MFC of 205698 (206196) Modified: 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) From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:36:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAE6A106564A; Mon, 5 Apr 2010 18:36:47 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98E878FC14; Mon, 5 Apr 2010 18:36:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IalDX010772; Mon, 5 Apr 2010 18:36:47 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35Ialel010770; Mon, 5 Apr 2010 18:36:47 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004051836.o35Ialel010770@svn.freebsd.org> From: Matt Jacob Date: Mon, 5 Apr 2010 18:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206202 - stable/8/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:36:47 -0000 Author: mjacob Date: Mon Apr 5 18:36:47 2010 New Revision: 206202 URL: http://svn.freebsd.org/changeset/base/206202 Log: This is an MFC of 205712. D'oh- isp_handle_index' logic was reversed (not used in FreeBSD). Modified: stable/8/sys/dev/isp/isp_library.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/isp/isp_library.c ============================================================================== --- stable/8/sys/dev/isp/isp_library.c Mon Apr 5 18:33:42 2010 (r206201) +++ stable/8/sys/dev/isp/isp_library.c Mon Apr 5 18:36:47 2010 (r206202) @@ -294,10 +294,10 @@ uint32_t isp_handle_index(ispsoftc_t *isp, uint32_t handle) { if (!ISP_VALID_HANDLE(isp, handle)) { - return (handle & ISP_HANDLE_CMD_MASK); - } else { isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); return (ISP_BAD_HANDLE_INDEX); + } else { + return (handle & ISP_HANDLE_CMD_MASK); } } From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:38:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA87F106564A; Mon, 5 Apr 2010 18:38:18 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C89558FC1D; Mon, 5 Apr 2010 18:38:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IcIZL011151; Mon, 5 Apr 2010 18:38:18 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35IcIlI011149; Mon, 5 Apr 2010 18:38:18 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004051838.o35IcIlI011149@svn.freebsd.org> From: Matt Jacob Date: Mon, 5 Apr 2010 18:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206203 - stable/7/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:38:19 -0000 Author: mjacob Date: Mon Apr 5 18:38:18 2010 New Revision: 206203 URL: http://svn.freebsd.org/changeset/base/206203 Log: This is an MFC of 205712. D'oh- isp_handle_index' logic was reversed (not used in FreeBSD). Modified: stable/7/sys/dev/isp/isp_library.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/isp/isp_library.c ============================================================================== --- stable/7/sys/dev/isp/isp_library.c Mon Apr 5 18:36:47 2010 (r206202) +++ stable/7/sys/dev/isp/isp_library.c Mon Apr 5 18:38:18 2010 (r206203) @@ -294,10 +294,10 @@ uint32_t isp_handle_index(ispsoftc_t *isp, uint32_t handle) { if (!ISP_VALID_HANDLE(isp, handle)) { - return (handle & ISP_HANDLE_CMD_MASK); - } else { isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle); return (ISP_BAD_HANDLE_INDEX); + } else { + return (handle & ISP_HANDLE_CMD_MASK); } } From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 18:46:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA7881065672; Mon, 5 Apr 2010 18:46:29 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96FAA8FC17; Mon, 5 Apr 2010 18:46:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35IkTS7012970; Mon, 5 Apr 2010 18:46:29 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35IkTFB012966; Mon, 5 Apr 2010 18:46:29 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004051846.o35IkTFB012966@svn.freebsd.org> From: Jack F Vogel Date: Mon, 5 Apr 2010 18:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206204 - stable/8/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 18:46:29 -0000 Author: jfv Date: Mon Apr 5 18:46:29 2010 New Revision: 206204 URL: http://svn.freebsd.org/changeset/base/206204 Log: MFC of version 2.1.7 of the ixgbe driver. Modified: stable/8/sys/dev/ixgbe/LICENSE stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/ixgbe/ixgbe.h stable/8/sys/dev/ixgbe/ixgbe_82598.c stable/8/sys/dev/ixgbe/ixgbe_82599.c stable/8/sys/dev/ixgbe/ixgbe_api.c stable/8/sys/dev/ixgbe/ixgbe_api.h stable/8/sys/dev/ixgbe/ixgbe_common.c stable/8/sys/dev/ixgbe/ixgbe_common.h stable/8/sys/dev/ixgbe/ixgbe_osdep.h stable/8/sys/dev/ixgbe/ixgbe_phy.c stable/8/sys/dev/ixgbe/ixgbe_phy.h stable/8/sys/dev/ixgbe/ixgbe_type.h Modified: stable/8/sys/dev/ixgbe/LICENSE ============================================================================== --- stable/8/sys/dev/ixgbe/LICENSE Mon Apr 5 18:38:18 2010 (r206203) +++ stable/8/sys/dev/ixgbe/LICENSE Mon Apr 5 18:46:29 2010 (r206204) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Mon Apr 5 18:38:18 2010 (r206203) +++ stable/8/sys/dev/ixgbe/ixgbe.c Mon Apr 5 18:46:29 2010 (r206204) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "1.8.9"; +char ixgbe_driver_version[] = "2.1.7"; /********************************************************************* * PCI Device ID Table @@ -64,16 +64,20 @@ static ixgbe_vendor_info_t ixgbe_vendor_ {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR, 0, 0, 0}, - {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, 0, 0, 0}, {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM, 0, 0, 0}, + {IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE, 0, 0, 0}, /* required last entry */ {0, 0, 0, 0, 0} }; @@ -102,9 +106,8 @@ static int ixgbe_mq_start_locked(struct static void ixgbe_qflush(struct ifnet *); #endif static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); -static void ixgbe_watchdog(struct adapter *); -static void ixgbe_init(void *); -static void ixgbe_init_locked(struct adapter *); +static void ixgbe_init(void *); +static int ixgbe_init_locked(struct adapter *); static void ixgbe_stop(void *); static void ixgbe_media_status(struct ifnet *, struct ifmediareq *); static int ixgbe_media_change(struct ifnet *); @@ -116,8 +119,8 @@ static int ixgbe_allocate_queues(struct static int ixgbe_setup_msix(struct adapter *); static void ixgbe_free_pci_resources(struct adapter *); static void ixgbe_local_timer(void *); -static int ixgbe_hardware_init(struct adapter *); static void ixgbe_setup_interface(device_t, struct adapter *); +static void ixgbe_config_link(struct adapter *); static int ixgbe_allocate_transmit_buffers(struct tx_ring *); static int ixgbe_setup_transmit_structures(struct adapter *); @@ -132,21 +135,21 @@ static int ixgbe_setup_receive_ring(stru static void ixgbe_initialize_receive_units(struct adapter *); static void ixgbe_free_receive_structures(struct adapter *); static void ixgbe_free_receive_buffers(struct rx_ring *); +static void ixgbe_setup_hw_rsc(struct rx_ring *); -static void ixgbe_init_moderation(struct adapter *); static void ixgbe_enable_intr(struct adapter *); static void ixgbe_disable_intr(struct adapter *); static void ixgbe_update_stats_counters(struct adapter *); static bool ixgbe_txeof(struct tx_ring *); -static bool ixgbe_rxeof(struct rx_ring *, int); -static void ixgbe_rx_checksum(u32, struct mbuf *); +static bool ixgbe_rxeof(struct ix_queue *, int); +static void ixgbe_rx_checksum(u32, struct mbuf *, u32); static void ixgbe_set_promisc(struct adapter *); static void ixgbe_disable_promisc(struct adapter *); static void ixgbe_set_multi(struct adapter *); static void ixgbe_print_hw_stats(struct adapter *); static void ixgbe_print_debug_info(struct adapter *); static void ixgbe_update_link_status(struct adapter *); -static int ixgbe_get_buf(struct rx_ring *, int, u8); +static void ixgbe_refresh_mbufs(struct rx_ring *, int); static int ixgbe_xmit(struct tx_ring *, struct mbuf **); static int ixgbe_sysctl_stats(SYSCTL_HANDLER_ARGS); static int ixgbe_sysctl_debug(SYSCTL_HANDLER_ARGS); @@ -166,7 +169,9 @@ static void ixgbe_setup_vlan_hw_support( static void ixgbe_register_vlan(void *, struct ifnet *, u16); static void ixgbe_unregister_vlan(void *, struct ifnet *, u16); -static void ixgbe_update_aim(struct rx_ring *); +static __inline void ixgbe_rx_discard(struct rx_ring *, int); +static __inline void ixgbe_rx_input(struct rx_ring *, struct ifnet *, + struct mbuf *, u32); /* Support for pluggable optic modules */ static bool ixgbe_sfp_probe(struct adapter *); @@ -175,17 +180,19 @@ static bool ixgbe_sfp_probe(struct adapt static void ixgbe_legacy_irq(void *); /* The MSI/X Interrupt handlers */ -static void ixgbe_msix_tx(void *); -static void ixgbe_msix_rx(void *); +static void ixgbe_msix_que(void *); static void ixgbe_msix_link(void *); /* Deferred interrupt tasklets */ -static void ixgbe_handle_tx(void *, int); -static void ixgbe_handle_rx(void *, int); +static void ixgbe_handle_que(void *, int); static void ixgbe_handle_link(void *, int); static void ixgbe_handle_msf(void *, int); static void ixgbe_handle_mod(void *, int); +#ifdef IXGBE_FDIR +static void ixgbe_atr(struct tx_ring *, struct mbuf *); +static void ixgbe_reinit_fdir(void *, int); +#endif /********************************************************************* * FreeBSD Device Interface Entry Points @@ -215,23 +222,16 @@ MODULE_DEPEND(ixgbe, ether, 1, 1, 1); */ /* -** These parameters are used in Adaptive -** Interrupt Moderation. The value is set -** into EITR and controls the interrupt -** frequency. They can be modified but -** be careful in tuning them. +** AIM: Adaptive Interrupt Moderation +** which means that the interrupt rate +** is varied over time based on the +** traffic for that interrupt vector */ static int ixgbe_enable_aim = TRUE; TUNABLE_INT("hw.ixgbe.enable_aim", &ixgbe_enable_aim); -static int ixgbe_low_latency = IXGBE_LOW_LATENCY; -TUNABLE_INT("hw.ixgbe.low_latency", &ixgbe_low_latency); -static int ixgbe_ave_latency = IXGBE_AVE_LATENCY; -TUNABLE_INT("hw.ixgbe.ave_latency", &ixgbe_ave_latency); -static int ixgbe_bulk_latency = IXGBE_BULK_LATENCY; -TUNABLE_INT("hw.ixgbe.bulk_latency", &ixgbe_bulk_latency); /* How many packets rxeof tries to clean at a time */ -static int ixgbe_rx_process_limit = 100; +static int ixgbe_rx_process_limit = 128; TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit); /* Flow control setting, default to full */ @@ -239,6 +239,15 @@ static int ixgbe_flow_control = ixgbe_fc TUNABLE_INT("hw.ixgbe.flow_control", &ixgbe_flow_control); /* +** Smart speed setting, default to on +** this only works as a compile option +** right now as its during attach, set +** this to 'ixgbe_smart_speed_off' to +** disable. +*/ +static int ixgbe_smart_speed = ixgbe_smart_speed_on; + +/* * MSIX should be the default for best performance, * but this allows it to be forced off for testing. */ @@ -255,23 +264,27 @@ static bool ixgbe_header_split = TRUE; TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe_header_split); /* - * Number of Queues, should normally - * be left at 0, it then autoconfigures to - * the number of cpus. Each queue is a pair - * of RX and TX rings with a dedicated interrupt + * Number of Queues, can be set to 0, + * it then autoconfigures based on the + * number of cpus. Each queue is a pair + * of RX and TX rings with a msix vector */ static int ixgbe_num_queues = 0; TUNABLE_INT("hw.ixgbe.num_queues", &ixgbe_num_queues); -/* Number of TX descriptors per ring */ -static int ixgbe_txd = DEFAULT_TXD; +/* +** Number of TX descriptors per ring, +** setting higher than RX as this seems +** the better performing choice. +*/ +static int ixgbe_txd = PERFORM_TXD; TUNABLE_INT("hw.ixgbe.txd", &ixgbe_txd); /* Number of RX descriptors per ring */ -static int ixgbe_rxd = DEFAULT_RXD; +static int ixgbe_rxd = PERFORM_RXD; TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); -/* Total number of Interfaces - need for config sanity check */ +/* Keep running tab on them for sanity check */ static int ixgbe_total_ports; /* @@ -288,6 +301,27 @@ static u32 ixgbe_shadow_vfta[IXGBE_VFTA_ */ static int ixgbe_num_segs = IXGBE_82598_SCATTER; +#ifdef IXGBE_FDIR +/* +** For Flow Director: this is the +** number of TX packets we sample +** for the filter pool, this means +** every 20th packet will be probed. +** +** This feature can be disabled by +** setting this to 0. +*/ +static int atr_sample_rate = 20; +/* +** Flow Director actually 'steals' +** part of the packet buffer as its +** filter pool, this variable controls +** how much it uses: +** 0 = 64K, 1 = 128K, 2 = 256K +*/ +static int fdir_pballoc = 1; +#endif + /********************************************************************* * Device identification routine * @@ -356,7 +390,7 @@ ixgbe_attach(device_t dev) struct adapter *adapter; struct ixgbe_hw *hw; int error = 0; - u16 pci_device_id; + u16 pci_device_id, csum; u32 ctrl_ext; INIT_DEBUGOUT("ixgbe_attach: begin"); @@ -376,12 +410,18 @@ ixgbe_attach(device_t dev) case IXGBE_DEV_ID_82598EB_CX4 : adapter->optics = IFM_10G_CX4; break; + case IXGBE_DEV_ID_82598 : case IXGBE_DEV_ID_82598AF_DUAL_PORT : case IXGBE_DEV_ID_82598_DA_DUAL_PORT : case IXGBE_DEV_ID_82598AF_SINGLE_PORT : + case IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM : + case IXGBE_DEV_ID_82598EB_SFP_LOM : case IXGBE_DEV_ID_82598AT : adapter->optics = IFM_10G_SR; break; + case IXGBE_DEV_ID_82598AT2 : + adapter->optics = IFM_10G_T; + break; case IXGBE_DEV_ID_82598EB_XF_LR : adapter->optics = IFM_10G_LR; break; @@ -390,11 +430,18 @@ ixgbe_attach(device_t dev) ixgbe_num_segs = IXGBE_82599_SCATTER; break; case IXGBE_DEV_ID_82599_KX4 : + case IXGBE_DEV_ID_82599_KX4_MEZZ: + case IXGBE_DEV_ID_82599_CX4 : adapter->optics = IFM_10G_CX4; ixgbe_num_segs = IXGBE_82599_SCATTER; break; case IXGBE_DEV_ID_82599_XAUI_LOM : + case IXGBE_DEV_ID_82599_COMBO_BACKPLANE : + ixgbe_num_segs = IXGBE_82599_SCATTER; + break; + case IXGBE_DEV_ID_82599_T3_LOM: ixgbe_num_segs = IXGBE_82599_SCATTER; + adapter->optics = IFM_10G_T; default: break; } @@ -420,21 +467,6 @@ ixgbe_attach(device_t dev) OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, &ixgbe_enable_aim, 1, "Interrupt Moderation"); - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "low_latency", CTLTYPE_INT|CTLFLAG_RW, - &ixgbe_low_latency, 1, "Low Latency"); - - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "ave_latency", CTLTYPE_INT|CTLFLAG_RW, - &ixgbe_ave_latency, 1, "Average Latency"); - - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "bulk_latency", CTLTYPE_INT|CTLFLAG_RW, - &ixgbe_bulk_latency, 1, "Bulk Latency"); - /* Set up the timer callout */ callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); @@ -504,10 +536,37 @@ ixgbe_attach(device_t dev) goto err_late; } - /* Initialize the hardware */ - if (ixgbe_hardware_init(adapter)) { - device_printf(dev,"Unable to initialize the hardware\n"); + /* Make sure we have a good EEPROM before we read from it */ + if (ixgbe_validate_eeprom_checksum(&adapter->hw, &csum) < 0) { + device_printf(dev,"The EEPROM Checksum Is Not Valid\n"); + error = EIO; + goto err_late; + } + + /* Pick up the smart speed setting */ + if (hw->mac.type == ixgbe_mac_82599EB) + hw->phy.smart_speed = ixgbe_smart_speed; + + /* Get Hardware Flow Control setting */ + hw->fc.requested_mode = ixgbe_fc_full; + hw->fc.pause_time = IXGBE_FC_PAUSE; + hw->fc.low_water = IXGBE_FC_LO; + hw->fc.high_water = IXGBE_FC_HI; + hw->fc.send_xon = TRUE; + + error = ixgbe_init_hw(hw); + if (error == IXGBE_ERR_EEPROM_VERSION) { + device_printf(dev, "This device is a pre-production adapter/" + "LOM. Please be aware there may be issues associated " + "with your hardware.\n If you are experiencing problems " + "please contact your Intel or hardware representative " + "who provided you with this hardware.\n"); + } else if (error == IXGBE_ERR_SFP_NOT_SUPPORTED) + device_printf(dev,"Unsupported SFP+ Module\n"); + + if (error) { error = EIO; + device_printf(dev,"Hardware Initialization Failure\n"); goto err_late; } @@ -521,22 +580,6 @@ ixgbe_attach(device_t dev) /* Setup OS specific network interface */ ixgbe_setup_interface(dev, adapter); -#ifdef IXGBE_IEEE1588 - /* - ** Setup the timer: IEEE 1588 support - */ - adapter->cycles.read = ixgbe_read_clock; - adapter->cycles.mask = (u64)-1; - adapter->cycles.mult = 1; - adapter->cycles.shift = IXGBE_TSYNC_SHIFT; - IXGBE_WRITE_REG(&adapter->hw, IXGBE_TIMINCA, (1<<24) | - IXGBE_TSYNC_CYCLE_TIME * IXGBE_TSYNC_SHIFT); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_SYSTIML, 0x00000000); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_SYSTIMH, 0xFF800000); - - // JFV - this is not complete yet -#endif - /* Sysctl for limiting the amount of work done in the taskqueue */ ixgbe_add_rx_process_limit(adapter, "rx_processing_limit", "max number of rx packets to process", &adapter->rx_process_limit, @@ -551,6 +594,25 @@ ixgbe_attach(device_t dev) adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, ixgbe_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST); + /* Print PCIE bus type/speed/width info */ + ixgbe_get_bus_info(hw); + device_printf(dev,"PCI Express Bus: Speed %s %s\n", + ((hw->bus.speed == ixgbe_bus_speed_5000) ? "5.0Gb/s": + (hw->bus.speed == ixgbe_bus_speed_2500) ? "2.5Gb/s":"Unknown"), + (hw->bus.width == ixgbe_bus_width_pcie_x8) ? "Width x8" : + (hw->bus.width == ixgbe_bus_width_pcie_x4) ? "Width x4" : + (hw->bus.width == ixgbe_bus_width_pcie_x1) ? "Width x1" : + ("Unknown")); + + if ((hw->bus.width <= ixgbe_bus_width_pcie_x4) && + (hw->bus.speed == ixgbe_bus_speed_2500)) { + device_printf(dev, "PCI-Express bandwidth available" + " for this card\n is not sufficient for" + " optimal performance.\n"); + device_printf(dev, "For optimal performance a x8 " + "PCIE, or x4 PCIE 2 slot is required.\n"); + } + /* let hardware know driver is loaded */ ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); ctrl_ext |= IXGBE_CTRL_EXT_DRV_LOAD; @@ -581,8 +643,7 @@ static int ixgbe_detach(device_t dev) { struct adapter *adapter = device_get_softc(dev); - struct tx_ring *txr = adapter->tx_rings; - struct rx_ring *rxr = adapter->rx_rings; + struct ix_queue *que = adapter->queues; u32 ctrl_ext; INIT_DEBUGOUT("ixgbe_detach: begin"); @@ -597,17 +658,10 @@ ixgbe_detach(device_t dev) ixgbe_stop(adapter); IXGBE_CORE_UNLOCK(adapter); - for (int i = 0; i < adapter->num_queues; i++, txr++) { - if (txr->tq) { - taskqueue_drain(txr->tq, &txr->tx_task); - taskqueue_free(txr->tq); - } - } - - for (int i = 0; i < adapter->num_queues; i++, rxr++) { - if (rxr->tq) { - taskqueue_drain(rxr->tq, &rxr->rx_task); - taskqueue_free(rxr->tq); + for (int i = 0; i < adapter->num_queues; i++, que++) { + if (que->tq) { + taskqueue_drain(que->tq, &que->que_task); + taskqueue_free(que->tq); } } @@ -616,6 +670,9 @@ ixgbe_detach(device_t dev) taskqueue_drain(adapter->tq, &adapter->link_task); taskqueue_drain(adapter->tq, &adapter->mod_task); taskqueue_drain(adapter->tq, &adapter->msf_task); +#ifdef IXGBE_FDIR + taskqueue_drain(adapter->tq, &adapter->fdir_task); +#endif taskqueue_free(adapter->tq); } @@ -700,8 +757,8 @@ ixgbe_start_locked(struct tx_ring *txr, /* Send a copy of the frame to the BPF listener */ ETHER_BPF_MTAP(ifp, m_head); - /* Set timeout in case hardware has problems transmitting */ - txr->watchdog_timer = IXGBE_TX_TIMEOUT; + /* Set watchdog on */ + txr->watchdog_check = TRUE; } return; @@ -741,6 +798,9 @@ ixgbe_mq_start(struct ifnet *ifp, struct /* Which queue to use */ if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % adapter->num_queues; + else /* use the cpu we're on */ + i = curcpu % adapter->num_queues; + txr = &adapter->tx_rings[i]; if (IXGBE_TX_TRYLOCK(txr)) { @@ -757,53 +817,47 @@ ixgbe_mq_start_locked(struct ifnet *ifp, { struct adapter *adapter = txr->adapter; struct mbuf *next; - int err = 0; + int enqueued, err = 0; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - err = drbr_enqueue(ifp, txr->br, m); + if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING || adapter->link_active == 0) { + if (m != NULL) + err = drbr_enqueue(ifp, txr->br, m); return (err); } - if (m == NULL) /* Called by tasklet */ - goto process; - - /* If nothing queued go right to xmit */ - if (!drbr_needs_enqueue(ifp, txr->br)) { - if (ixgbe_xmit(txr, &m)) { - if (m && (err = drbr_enqueue(ifp, txr->br, m)) != 0) - return (err); - } else { - /* Success, update stats */ - drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); - /* Send a copy of the frame to the BPF listener */ - ETHER_BPF_MTAP(ifp, m); - /* Set the watchdog */ - txr->watchdog_timer = IXGBE_TX_TIMEOUT; - } - - } else if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) - return (err); - -process: - if (drbr_empty(ifp, txr->br)) - return (err); + enqueued = 0; + if (m == NULL) { + next = drbr_dequeue(ifp, txr->br); + } else if (drbr_needs_enqueue(ifp, txr->br)) { + if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) + return (err); + next = drbr_dequeue(ifp, txr->br); + } else + next = m; /* Process the queue */ - while (TRUE) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + while (next != NULL) { + if ((err = ixgbe_xmit(txr, &next)) != 0) { + if (next != NULL) + err = drbr_enqueue(ifp, txr->br, next); break; - next = drbr_dequeue(ifp, txr->br); - if (next == NULL) + } + enqueued++; + drbr_stats_update(ifp, next->m_pkthdr.len, next->m_flags); + /* Send a copy of the frame to the BPF listener */ + ETHER_BPF_MTAP(ifp, next); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; - if (ixgbe_xmit(txr, &next)) + if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; - ETHER_BPF_MTAP(ifp, next); - /* Set the watchdog */ - txr->watchdog_timer = IXGBE_TX_TIMEOUT; + } + next = drbr_dequeue(ifp, txr->br); } - - if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) - ifp->if_drv_flags |= IFF_DRV_OACTIVE; + + if (enqueued > 0) + txr->watchdog_check = TRUE; return (err); } @@ -840,29 +894,12 @@ ixgbe_qflush(struct ifnet *ifp) static int ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) { - struct adapter *adapter = ifp->if_softc; - struct ifreq *ifr = (struct ifreq *) data; -#ifdef INET - struct ifaddr *ifa = (struct ifaddr *) data; -#endif + struct adapter *adapter = ifp->if_softc; + struct ifreq *ifr = (struct ifreq *) data; int error = 0; switch (command) { - case SIOCSIFADDR: -#ifdef INET - IOCTL_DEBUGOUT("ioctl: SIOCxIFADDR (Get/Set Interface Addr)"); - if (ifa->ifa_addr->sa_family == AF_INET) { - ifp->if_flags |= IFF_UP; - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - IXGBE_CORE_LOCK(adapter); - ixgbe_init_locked(adapter); - IXGBE_CORE_UNLOCK(adapter); - } - arp_ifinit(ifp, ifa); - } else -#endif - ether_ioctl(ifp, command, data); - break; + case SIOCSIFMTU: IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) { @@ -872,7 +909,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_mtu = ifr->ifr_mtu; adapter->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - ixgbe_init_locked(adapter); + error = ixgbe_init_locked(adapter); IXGBE_CORE_UNLOCK(adapter); } break; @@ -887,7 +924,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ixgbe_set_promisc(adapter); } } else - ixgbe_init_locked(adapter); + error = ixgbe_init_locked(adapter); } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) ixgbe_stop(adapter); @@ -922,21 +959,15 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c ifp->if_capenable ^= IFCAP_LRO; if (mask & IFCAP_VLAN_HWTAGGING) ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - ixgbe_init(adapter); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + IXGBE_CORE_LOCK(adapter); + error = ixgbe_init_locked(adapter); + IXGBE_CORE_UNLOCK(adapter); + } VLAN_CAPABILITIES(ifp); break; } -#ifdef IXGBE_IEEE1588 - /* - ** IOCTL support for Precision Time (IEEE 1588) Support - */ - case SIOCSHWTSTAMP: - error = ixgbe_hwtstamp_ioctl(adapter, ifp); - break; -#endif - default: IOCTL_DEBUGOUT1("ioctl: UNKNOWN (0x%X)\n", (int)command); error = ether_ioctl(ifp, command, data); @@ -947,84 +978,6 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c } /********************************************************************* - * Watchdog entry point - * - * This routine is called by the local timer - * to detect hardware hangs . - * - **********************************************************************/ - -static void -ixgbe_watchdog(struct adapter *adapter) -{ - device_t dev = adapter->dev; - struct tx_ring *txr = adapter->tx_rings; - struct ixgbe_hw *hw = &adapter->hw; - bool tx_hang = FALSE; - - IXGBE_CORE_LOCK_ASSERT(adapter); - - /* - * The timer is set to 5 every time ixgbe_start() queues a packet. - * Then ixgbe_txeof() keeps resetting to 5 as long as it cleans at - * least one descriptor. - * Finally, anytime all descriptors are clean the timer is - * set to 0. - */ - for (int i = 0; i < adapter->num_queues; i++, txr++) { - u32 head, tail; - - IXGBE_TX_LOCK(txr); - if (txr->watchdog_timer == 0 || --txr->watchdog_timer) { - IXGBE_TX_UNLOCK(txr); - continue; - } else { - head = IXGBE_READ_REG(hw, IXGBE_TDH(i)); - tail = IXGBE_READ_REG(hw, IXGBE_TDT(i)); - if (head == tail) { /* last minute check */ - IXGBE_TX_UNLOCK(txr); - continue; - } - /* Well, seems something is really hung */ - tx_hang = TRUE; - IXGBE_TX_UNLOCK(txr); - break; - } - } - if (tx_hang == FALSE) - return; - - /* - * If we are in this routine because of pause frames, then don't - * reset the hardware. - */ - if (IXGBE_READ_REG(hw, IXGBE_TFCS) & IXGBE_TFCS_TXOFF) { - txr = adapter->tx_rings; /* reset pointer */ - for (int i = 0; i < adapter->num_queues; i++, txr++) { - IXGBE_TX_LOCK(txr); - txr->watchdog_timer = IXGBE_TX_TIMEOUT; - IXGBE_TX_UNLOCK(txr); - } - return; - } - - - device_printf(adapter->dev, "Watchdog timeout -- resetting\n"); - for (int i = 0; i < adapter->num_queues; i++, txr++) { - device_printf(dev,"Queue(%d) tdh = %d, hw tdt = %d\n", i, - IXGBE_READ_REG(hw, IXGBE_TDH(i)), - IXGBE_READ_REG(hw, IXGBE_TDT(i))); - device_printf(dev,"TX(%d) desc avail = %d," - "Next TX to Clean = %d\n", - i, txr->tx_avail, txr->next_tx_to_clean); - } - adapter->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - adapter->watchdog_events++; - - ixgbe_init_locked(adapter); -} - -/********************************************************************* * Init entry point * * This routine is used in two ways. It is used by the stack as @@ -1036,42 +989,39 @@ ixgbe_watchdog(struct adapter *adapter) **********************************************************************/ #define IXGBE_MHADD_MFS_SHIFT 16 -static void +static int ixgbe_init_locked(struct adapter *adapter) { struct ifnet *ifp = adapter->ifp; device_t dev = adapter->dev; - struct ixgbe_hw *hw; + struct ixgbe_hw *hw = &adapter->hw; u32 k, txdctl, mhadd, gpie; u32 rxdctl, rxctrl; - int err; - - INIT_DEBUGOUT("ixgbe_init: begin"); - hw = &adapter->hw; mtx_assert(&adapter->core_mtx, MA_OWNED); + INIT_DEBUGOUT("ixgbe_init: begin"); + ixgbe_reset_hw(hw); + hw->adapter_stopped = FALSE; + ixgbe_stop_adapter(hw); + callout_stop(&adapter->timer); - ixgbe_stop(adapter); + /* reprogram the RAR[0] in case user changed it. */ + ixgbe_set_rar(hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV); /* Get the latest mac address, User can use a LAA */ - bcopy(IF_LLADDR(adapter->ifp), adapter->hw.mac.addr, + bcopy(IF_LLADDR(adapter->ifp), hw->mac.addr, IXGBE_ETH_LENGTH_OF_ADDRESS); - ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, 1); - adapter->hw.addr_ctrl.rar_used_count = 1; - - /* Initialize the hardware */ - if (ixgbe_hardware_init(adapter)) { - device_printf(dev, "Unable to initialize the hardware\n"); - return; - } + ixgbe_set_rar(hw, 0, hw->mac.addr, 0, 1); + hw->addr_ctrl.rar_used_count = 1; /* Prepare transmit descriptors and buffers */ if (ixgbe_setup_transmit_structures(adapter)) { device_printf(dev,"Could not setup transmit structures\n"); ixgbe_stop(adapter); - return; + return (ENOMEM); } + ixgbe_init_hw(hw); ixgbe_initialize_transmit_units(adapter); /* Setup Multicast table */ @@ -1090,18 +1040,15 @@ ixgbe_init_locked(struct adapter *adapte if (ixgbe_setup_receive_structures(adapter)) { device_printf(dev,"Could not setup receive structures\n"); ixgbe_stop(adapter); - return; + return (ENOMEM); } /* Configure RX settings */ ixgbe_initialize_receive_units(adapter); - /* Configure Interrupt Moderation */ - ixgbe_init_moderation(adapter); - gpie = IXGBE_READ_REG(&adapter->hw, IXGBE_GPIE); - if (adapter->hw.mac.type == ixgbe_mac_82599EB) { + if (hw->mac.type == ixgbe_mac_82599EB) { gpie |= IXGBE_SDP1_GPIEN; gpie |= IXGBE_SDP2_GPIEN; } @@ -1116,39 +1063,49 @@ ixgbe_init_locked(struct adapter *adapte gpie |= IXGBE_GPIE_EIAME | IXGBE_GPIE_PBA_SUPPORT | IXGBE_GPIE_OCD; } - IXGBE_WRITE_REG(&adapter->hw, IXGBE_GPIE, gpie); + IXGBE_WRITE_REG(hw, IXGBE_GPIE, gpie); /* Set the various hardware offload abilities */ ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TSO4) ifp->if_hwassist |= CSUM_TSO; if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist = (CSUM_TCP | CSUM_UDP); - + ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); +#if __FreeBSD_version >= 800000 + if (hw->mac.type == ixgbe_mac_82599EB) + ifp->if_hwassist |= CSUM_SCTP; +#endif /* Set MTU size */ if (ifp->if_mtu > ETHERMTU) { - mhadd = IXGBE_READ_REG(&adapter->hw, IXGBE_MHADD); + mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); mhadd &= ~IXGBE_MHADD_MFS_MASK; mhadd |= adapter->max_frame_size << IXGBE_MHADD_MFS_SHIFT; - IXGBE_WRITE_REG(&adapter->hw, IXGBE_MHADD, mhadd); + IXGBE_WRITE_REG(hw, IXGBE_MHADD, mhadd); } /* Now enable all the queues */ for (int i = 0; i < adapter->num_queues; i++) { - txdctl = IXGBE_READ_REG(&adapter->hw, IXGBE_TXDCTL(i)); + txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i)); txdctl |= IXGBE_TXDCTL_ENABLE; /* Set WTHRESH to 8, burst writeback */ txdctl |= (8 << 16); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_TXDCTL(i), txdctl); + IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl); } for (int i = 0; i < adapter->num_queues; i++) { - rxdctl = IXGBE_READ_REG(&adapter->hw, IXGBE_RXDCTL(i)); - /* PTHRESH set to 32 */ - rxdctl |= 0x0020; + rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + if (hw->mac.type == ixgbe_mac_82598EB) { + /* + ** PTHRESH = 21 + ** HTHRESH = 4 + ** WTHRESH = 8 + */ + rxdctl &= ~0x3FFFFF; + rxdctl |= 0x080420; + } rxdctl |= IXGBE_RXDCTL_ENABLE; - IXGBE_WRITE_REG(&adapter->hw, IXGBE_RXDCTL(i), rxdctl); + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), rxdctl); for (k = 0; k < 10; k++) { if (IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)) & IXGBE_RXDCTL_ENABLE) @@ -1165,10 +1122,10 @@ ixgbe_init_locked(struct adapter *adapte /* Enable Receive engine */ rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL); - if (adapter->hw.mac.type == ixgbe_mac_82598EB) + if (hw->mac.type == ixgbe_mac_82598EB) rxctrl |= IXGBE_RXCTRL_DMBYPS; rxctrl |= IXGBE_RXCTRL_RXEN; - IXGBE_WRITE_REG(hw, IXGBE_RXCTRL, rxctrl); + ixgbe_enable_rx_dma(hw, rxctrl); callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter); @@ -1180,33 +1137,36 @@ ixgbe_init_locked(struct adapter *adapte ixgbe_set_ivar(adapter, 0, 0, 1); } - ixgbe_enable_intr(adapter); +#ifdef IXGBE_FDIR + /* Init Flow director */ + if (hw->mac.type == ixgbe_mac_82599EB) + ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); +#endif /* ** Check on any SFP devices that ** need to be kick-started */ - err = hw->phy.ops.identify(hw); - if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { - device_printf(dev, - "Unsupported SFP+ module type was detected.\n"); - ixgbe_detach(dev); - return; - } - if (ixgbe_is_sfp(hw)) { - if (hw->phy.multispeed_fiber) { - hw->mac.ops.setup_sfp(hw); - taskqueue_enqueue(adapter->tq, &adapter->msf_task); - } else - taskqueue_enqueue(adapter->tq, &adapter->mod_task); - } else - taskqueue_enqueue(adapter->tq, &adapter->link_task); + if (hw->phy.type == ixgbe_phy_none) { + int err = hw->phy.ops.identify(hw); + if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) { + device_printf(dev, + "Unsupported SFP+ module type was detected.\n"); + return (EIO); + } + } + + /* Config/Enable Link */ + ixgbe_config_link(adapter); + + /* And now turn on interrupts */ + ixgbe_enable_intr(adapter); /* Now inform the stack we're ready */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - return; + return (0); } static void @@ -1268,7 +1228,7 @@ ixgbe_disable_queue(struct adapter *adap } static inline void -ixgbe_rearm_rx_queues(struct adapter *adapter, u64 queues) +ixgbe_rearm_queues(struct adapter *adapter, u64 queues) { u32 mask; @@ -1283,34 +1243,22 @@ ixgbe_rearm_rx_queues(struct adapter *ad } } -static void -ixgbe_handle_rx(void *context, int pending) -{ - struct rx_ring *rxr = context; - struct adapter *adapter = rxr->adapter; - u32 loop = MAX_LOOP; - bool more; - - do { - more = ixgbe_rxeof(rxr, -1); - } while (loop-- && more); - /* Reenable this interrupt */ - ixgbe_enable_queue(adapter, rxr->msix); -} static void -ixgbe_handle_tx(void *context, int pending) +ixgbe_handle_que(void *context, int pending) { - struct tx_ring *txr = context; - struct adapter *adapter = txr->adapter; + struct ix_queue *que = context; + struct adapter *adapter = que->adapter; + struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; u32 loop = MAX_LOOP; - bool more; + bool more_rx, more_tx; IXGBE_TX_LOCK(txr); do { - more = ixgbe_txeof(txr); - } while (loop-- && more); + more_rx = ixgbe_rxeof(que, adapter->rx_process_limit); + more_tx = ixgbe_txeof(txr); + } while (loop-- && (more_rx || more_tx)); if (ifp->if_drv_flags & IFF_DRV_RUNNING) { #if __FreeBSD_version >= 800000 @@ -1324,7 +1272,7 @@ ixgbe_handle_tx(void *context, int pendi IXGBE_TX_UNLOCK(txr); /* Reenable this interrupt */ - ixgbe_enable_queue(adapter, txr->msix); + ixgbe_enable_queue(adapter, que->msix); } @@ -1337,33 +1285,32 @@ ixgbe_handle_tx(void *context, int pendi static void ixgbe_legacy_irq(void *arg) { - struct adapter *adapter = arg; + struct ix_queue *que = arg; + struct adapter *adapter = que->adapter; struct ixgbe_hw *hw = &adapter->hw; struct tx_ring *txr = adapter->tx_rings; - struct rx_ring *rxr = adapter->rx_rings; - bool more; + bool more_tx, more_rx; u32 reg_eicr, loop = MAX_LOOP; reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICR); + ++que->irqs; if (reg_eicr == 0) { ixgbe_enable_intr(adapter); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 19:40:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15D3C1065670; Mon, 5 Apr 2010 19:40:14 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 050258FC1D; Mon, 5 Apr 2010 19:40:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35JeDxs024985; Mon, 5 Apr 2010 19:40:13 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35JeDIc024983; Mon, 5 Apr 2010 19:40:13 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201004051940.o35JeDIc024983@svn.freebsd.org> From: Robert Watson Date: Mon, 5 Apr 2010 19:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206206 - head/sys/fs/coda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 19:40:14 -0000 Author: rwatson Date: Mon Apr 5 19:40:13 2010 New Revision: 206206 URL: http://svn.freebsd.org/changeset/base/206206 Log: Correct definition of CIOC_KERNEL_VERSION Coda ioctl() for systems where sizeof(int) != sizeof(sizeof(int)), or the ioctl will return EINVAL. MFC after: 3 days Modified: head/sys/fs/coda/coda.h Modified: head/sys/fs/coda/coda.h ============================================================================== --- head/sys/fs/coda/coda.h Mon Apr 5 19:25:29 2010 (r206205) +++ head/sys/fs/coda/coda.h Mon Apr 5 19:40:13 2010 (r206206) @@ -313,7 +313,7 @@ struct coda_statfs { #define VC_MAXMSGSIZE sizeof(union inputArgs)+sizeof(union outputArgs) +\ VC_MAXDATASIZE -#define CIOC_KERNEL_VERSION _IOWR('c', 10, sizeof (int)) +#define CIOC_KERNEL_VERSION _IOWR('c', 10, int) #if 0 /* don't care about kernel version number */ #define CODA_KERNEL_VERSION 0 From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 20:12:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 730C3106566B; Mon, 5 Apr 2010 20:12:54 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61ABA8FC12; Mon, 5 Apr 2010 20:12:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35KCsQG032436; Mon, 5 Apr 2010 20:12:54 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35KCsfG032426; Mon, 5 Apr 2010 20:12:54 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201004052012.o35KCsfG032426@svn.freebsd.org> From: Robert Watson Date: Mon, 5 Apr 2010 20:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206210 - head/sys/fs/coda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 20:12:54 -0000 Author: rwatson Date: Mon Apr 5 20:12:54 2010 New Revision: 206210 URL: http://svn.freebsd.org/changeset/base/206210 Log: Synchronize Coda kernel module definitions in our coda.h to Coda 6's coda.h: - CodaFid typdef -> struct CodaFid throughout. - Use unsigned int instead of unsigned long for venus_dirent and other cosmetic fixes. - Introduce cuid_t and cgid_t and use instead of uid_t and gid_t in RPCs. - Synchronize comments and macros. - Use u_int32_t instead of unsigned long for coda_out_hdr. With these changes, a 64-bit Coda kernel module now works with coda6_client, whereas previous userspace and kernel versions of RPCs differed sufficiently to prevent using the file system. This has been verified only with casual testing, but /coda is now usable for at least basic operations on amd64. MFC after: 1 week Modified: head/sys/fs/coda/cnode.h head/sys/fs/coda/coda.h head/sys/fs/coda/coda_subr.c head/sys/fs/coda/coda_subr.h head/sys/fs/coda/coda_venus.c head/sys/fs/coda/coda_venus.h head/sys/fs/coda/coda_vfsops.c head/sys/fs/coda/coda_vfsops.h head/sys/fs/coda/coda_vnops.c Modified: head/sys/fs/coda/cnode.h ============================================================================== --- head/sys/fs/coda/cnode.h Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/cnode.h Mon Apr 5 20:12:54 2010 (r206210) @@ -94,7 +94,7 @@ extern int coda_vfsop_print_entry; struct cnode { struct vnode *c_vnode; u_short c_flags; /* flags (see below) */ - CodaFid c_fid; /* file handle */ + struct CodaFid c_fid; /* file handle */ struct vnode *c_ovp; /* open vnode pointer */ u_short c_ocount; /* count of openers */ u_short c_owrite; /* count of open for write */ @@ -196,7 +196,8 @@ void coda_unmounting(struct mount *whoIa int coda_vmflush(struct cnode *cp); /* cfs_vnodeops.h */ -struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type); +struct cnode *make_coda_node(struct CodaFid *fid, struct mount *vfsp, + short type); int coda_vnodeopstats_init(void); /* sigh */ Modified: head/sys/fs/coda/coda.h ============================================================================== --- head/sys/fs/coda/coda.h Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/coda.h Mon Apr 5 20:12:54 2010 (r206210) @@ -103,6 +103,8 @@ struct timespec { }; #endif +typedef u_int32_t cuid_t; +typedef u_int32_t cgid_t; /* * Cfs constants @@ -132,14 +134,13 @@ struct timespec { #define C_A_F_OK 0 /* Test for existence. */ - #ifndef _VENUS_DIRENT_T_ #define _VENUS_DIRENT_T_ 1 struct venus_dirent { - unsigned long d_fileno; /* file number of entry */ + unsigned int d_fileno; /* file number of entry */ unsigned short d_reclen; /* length of this record */ - char d_type; /* file type, see below */ - char d_namlen; /* length of string in d_name */ + unsigned char d_type; /* file type, see below */ + unsigned char d_namlen; /* length of string in d_name */ char d_name[CODA_MAXNAMLEN + 1];/* name must be no longer than this */ }; #undef DIRSIZ @@ -169,19 +170,19 @@ struct venus_dirent { #ifdef CODA_COMPAT_5 -typedef struct { +struct CodaFid { u_long Volume; u_long Vnode; u_long Unique; -} CodaFid; +}; -static __inline__ ino_t coda_f2i(CodaFid *fid) +static __inline__ ino_t coda_f2i(struct CodaFid *fid) { if (!fid) return 0; return (fid->Unique + (fid->Vnode<<10) + (fid->Volume<<20)); } -static __inline__ char * coda_f2s(CodaFid *fid) +static __inline__ char * coda_f2s(struct CodaFid *fid) { static char fid_str [35]; snprintf (fid_str, 35, "[%lx.%lx.%lx]", fid->Volume, @@ -189,7 +190,7 @@ static __inline__ char * coda_f2s(CodaFi return fid_str; } -static __inline__ int coda_fid_eq (CodaFid *fid1, CodaFid *fid2) +static __inline__ int coda_fid_eq (struct CodaFid *fid1, struct CodaFid *fid2) { return (fid1->Volume == fid2->Volume && fid1->Vnode == fid2->Vnode && @@ -203,18 +204,18 @@ struct coda_cred { #else /* CODA_COMPAT_5 */ -typedef struct { +struct CodaFid { u_int32_t opaque[4]; -} CodaFid; +}; -static __inline__ ino_t coda_f2i(CodaFid *fid) +static __inline__ ino_t coda_f2i(struct CodaFid *fid) { if ( ! fid ) return 0; return (fid->opaque[3] ^ (fid->opaque[2]<<10) ^ (fid->opaque[1]<<20) ^ fid->opaque[0]); } -static __inline__ char * coda_f2s(CodaFid *fid) +static __inline__ char * coda_f2s(struct CodaFid *fid) { static char fid_str [35]; snprintf (fid_str, 35, "[%x.%x.%x.%x]", fid->opaque[0], @@ -222,7 +223,7 @@ static __inline__ char * coda_f2s(CodaFi return fid_str; } -static __inline__ int coda_fid_eq (CodaFid *fid1, CodaFid *fid2) +static __inline__ int coda_fid_eq (struct CodaFid *fid1, struct CodaFid *fid2) { return (fid1->opaque[0] == fid2->opaque[0] && fid1->opaque[1] == fid2->opaque[1] && @@ -240,11 +241,11 @@ static __inline__ int coda_fid_eq (CodaF enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD }; struct coda_vattr { - int va_type; /* vnode type (for create) */ + long va_type; /* vnode type (for create) */ u_short va_mode; /* files access mode and type */ short va_nlink; /* number of references to file */ - uid_t va_uid; /* owner user id */ - gid_t va_gid; /* owner group id */ + cuid_t va_uid; /* owner user id */ + cgid_t va_gid; /* owner group id */ long va_fileid; /* file id */ u_quad_t va_size; /* file size in bytes */ long va_blocksize; /* blocksize preferred for i/o */ @@ -344,23 +345,23 @@ struct coda_in_hdr { struct coda_in_hdr { u_int32_t opcode; u_int32_t unique; /* Keep multiple outstanding msgs distinct */ - pid_t pid; /* Common to all */ - pid_t pgid; /* Common to all */ - uid_t uid; /* Common to all */ + pid_t pid; + pid_t pgid; + cuid_t uid; }; #endif /* Really important that opcode and unique are 1st two fields! */ struct coda_out_hdr { - unsigned long opcode; - unsigned long unique; - unsigned long result; + u_int32_t opcode; + u_int32_t unique; + u_int32_t result; }; /* coda_root: NO_IN */ struct coda_root_out { struct coda_out_hdr oh; - CodaFid Fid; + struct CodaFid Fid; }; struct coda_root_in { @@ -373,7 +374,7 @@ struct coda_root_in { /* coda_open: */ struct coda_open_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int flags; }; @@ -387,7 +388,7 @@ struct coda_open_out { /* coda_close: */ struct coda_close_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int flags; }; @@ -398,7 +399,7 @@ struct coda_close_out { /* coda_ioctl: */ struct coda_ioctl_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int cmd; int len; int rwflag; @@ -415,7 +416,7 @@ struct coda_ioctl_out { /* coda_getattr: */ struct coda_getattr_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; }; struct coda_getattr_out { @@ -427,7 +428,7 @@ struct coda_getattr_out { /* coda_setattr: NO_OUT */ struct coda_setattr_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; struct coda_vattr attr; }; @@ -438,7 +439,7 @@ struct coda_setattr_out { /* coda_access: NO_OUT */ struct coda_access_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int flags; }; @@ -454,14 +455,14 @@ struct coda_access_out { /* coda_lookup: */ struct coda_lookup_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int name; /* Place holder for data. */ int flags; }; struct coda_lookup_out { struct coda_out_hdr oh; - CodaFid Fid; + struct CodaFid Fid; int vtype; }; @@ -469,7 +470,7 @@ struct coda_lookup_out { /* coda_create: */ struct coda_create_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; struct coda_vattr attr; int excl; int mode; @@ -478,7 +479,7 @@ struct coda_create_in { struct coda_create_out { struct coda_out_hdr oh; - CodaFid Fid; + struct CodaFid Fid; struct coda_vattr attr; }; @@ -486,7 +487,7 @@ struct coda_create_out { /* coda_remove: NO_OUT */ struct coda_remove_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int name; /* Place holder for data. */ }; @@ -497,8 +498,8 @@ struct coda_remove_out { /* coda_link: NO_OUT */ struct coda_link_in { struct coda_in_hdr ih; - CodaFid sourceFid; /* cnode to link *to* */ - CodaFid destFid; /* Directory in which to place link */ + struct CodaFid sourceFid; /* cnode to link *to* */ + struct CodaFid destFid; /* Directory in which to place link */ int tname; /* Place holder for data. */ }; @@ -510,9 +511,9 @@ struct coda_link_out { /* coda_rename: NO_OUT */ struct coda_rename_in { struct coda_in_hdr ih; - CodaFid sourceFid; + struct CodaFid sourceFid; int srcname; - CodaFid destFid; + struct CodaFid destFid; int destname; }; @@ -523,14 +524,14 @@ struct coda_rename_out { /* coda_mkdir: */ struct coda_mkdir_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; struct coda_vattr attr; int name; /* Place holder for data. */ }; struct coda_mkdir_out { struct coda_out_hdr oh; - CodaFid Fid; + struct CodaFid Fid; struct coda_vattr attr; }; @@ -538,7 +539,7 @@ struct coda_mkdir_out { /* coda_rmdir: NO_OUT */ struct coda_rmdir_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int name; /* Place holder for data. */ }; @@ -549,7 +550,7 @@ struct coda_rmdir_out { /* coda_readdir: */ struct coda_readdir_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int count; int offset; }; @@ -563,7 +564,7 @@ struct coda_readdir_out { /* coda_symlink: NO_OUT */ struct coda_symlink_in { struct coda_in_hdr ih; - CodaFid Fid; /* Directory to put symlink in */ + struct CodaFid Fid; /* Directory to put symlink in */ int srcname; struct coda_vattr attr; int tname; @@ -576,7 +577,7 @@ struct coda_symlink_out { /* coda_readlink: */ struct coda_readlink_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; }; struct coda_readlink_out { @@ -589,7 +590,7 @@ struct coda_readlink_out { /* coda_fsync: NO_OUT */ struct coda_fsync_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; }; struct coda_fsync_out { @@ -599,18 +600,18 @@ struct coda_fsync_out { /* coda_inactive: NO_OUT */ struct coda_inactive_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; }; /* coda_vget: */ struct coda_vget_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; }; struct coda_vget_out { struct coda_out_hdr oh; - CodaFid Fid; + struct CodaFid Fid; int vtype; }; @@ -626,7 +627,7 @@ struct coda_purgeuser_out { #ifdef CODA_COMPAT_5 struct coda_cred cred; #else - uid_t uid; + cuid_t uid; #endif }; @@ -634,14 +635,14 @@ struct coda_purgeuser_out { /* CODA_ZAPFILE is a venus->kernel call */ struct coda_zapfile_out { struct coda_out_hdr oh; - CodaFid Fid; + struct CodaFid Fid; }; /* coda_zapdir: */ /* CODA_ZAPDIR is a venus->kernel call */ struct coda_zapdir_out { struct coda_out_hdr oh; - CodaFid Fid; + struct CodaFid Fid; }; /* coda_zapnode: */ @@ -651,41 +652,44 @@ struct coda_zapvnode_out { #ifdef CODA_COMPAT_5 struct coda_cred cred; #endif - CodaFid Fid; + struct CodaFid Fid; }; /* coda_purgefid: */ /* CODA_PURGEFID is a venus->kernel call */ struct coda_purgefid_out { struct coda_out_hdr oh; - CodaFid Fid; + struct CodaFid Fid; }; /* coda_replace: */ /* CODA_REPLACE is a venus->kernel call */ struct coda_replace_out { /* coda_replace is a venus->kernel call */ struct coda_out_hdr oh; - CodaFid NewFid; - CodaFid OldFid; + struct CodaFid NewFid; + struct CodaFid OldFid; }; /* coda_open_by_fd: */ struct coda_open_by_fd_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int flags; }; struct coda_open_by_fd_out { struct coda_out_hdr oh; int fd; +#ifdef _KERNEL + /* not passed from userspace but used in-kernel only */ struct vnode *vp; +#endif }; /* coda_open_by_path: */ struct coda_open_by_path_in { struct coda_in_hdr ih; - CodaFid Fid; + struct CodaFid Fid; int flags; }; @@ -799,6 +803,9 @@ struct PioctlData { #define CODA_CONTROL ".CONTROL" #define CODA_CONTROLLEN 8 +#define CTL_VOL -1 +#define CTL_VNO -1 +#define CTL_UNI -1 #define CTL_INO -1 #define CTL_FILE "/coda/.CONTROL" @@ -810,10 +817,9 @@ struct PioctlData { #define INVAL_FID { 0, 0, 0 } #else #define CTL_FID { { -1, -1, -1, -1 } } -#define IS_CTL_FID(fidp) ((fidp)->opaque[0] == -1 &&\ - (fidp)->opaque[1] == -1 &&\ - (fidp)->opaque[2] == -1 &&\ - (fidp)->opaque[3] == -1) +#define IS_CTL_FID(fidp) ((fidp)->opaque[1] == CTL_VOL && \ + (fidp)->opaque[2] == CTL_VNO && \ + (fidp)->opaque[3] == CTL_UNI) #define INVAL_FID { { 0, 0, 0, 0 } } #endif Modified: head/sys/fs/coda/coda_subr.c ============================================================================== --- head/sys/fs/coda/coda_subr.c Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/coda_subr.c Mon Apr 5 20:12:54 2010 (r206210) @@ -164,7 +164,7 @@ coda_unsave(struct cnode *cp) * NOTE: this allows multiple cnodes with same fid -- dcs 1/25/95 */ struct cnode * -coda_find(CodaFid *fid) +coda_find(struct CodaFid *fid) { struct cnode *cp; Modified: head/sys/fs/coda/coda_subr.h ============================================================================== --- head/sys/fs/coda/coda_subr.h Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/coda_subr.h Mon Apr 5 20:12:54 2010 (r206210) @@ -35,7 +35,7 @@ struct cnode *coda_alloc(void); void coda_free(struct cnode *cp); -struct cnode *coda_find(CodaFid *fid); +struct cnode *coda_find(struct CodaFid *fid); void coda_flush(struct coda_mntinfo *mnt, enum dc_status dcstat); void coda_testflush(void); void coda_checkunmounting(struct mount *mp); Modified: head/sys/fs/coda/coda_venus.c ============================================================================== --- head/sys/fs/coda/coda_venus.c Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/coda_venus.c Mon Apr 5 20:12:54 2010 (r206210) @@ -177,7 +177,7 @@ int coda_kernel_version = CODA_KERNEL_VE int venus_root(void *mdp, struct ucred *cred, struct proc *p, - /*out*/ CodaFid *VFid) + /*out*/ struct CodaFid *VFid) { DECL_NO_IN(coda_root); /* sets Isize & Osize */ ALLOC_NO_IN(coda_root); /* sets inp & outp */ @@ -194,7 +194,7 @@ venus_root(void *mdp, struct ucred *cred } int -venus_open(void *mdp, CodaFid *fid, int flag, struct ucred *cred, +venus_open(void *mdp, struct CodaFid *fid, int flag, struct ucred *cred, struct proc *p, /*out*/ struct vnode **vp) { int cflag; @@ -215,7 +215,7 @@ venus_open(void *mdp, CodaFid *fid, int } int -venus_close(void *mdp, CodaFid *fid, int flag, struct ucred *cred, +venus_close(void *mdp, struct CodaFid *fid, int flag, struct ucred *cred, struct proc *p) { int cflag; @@ -252,7 +252,7 @@ venus_write(void) * normal files. */ int -venus_ioctl(void *mdp, CodaFid *fid, int com, int flag, caddr_t data, +venus_ioctl(void *mdp, struct CodaFid *fid, int com, int flag, caddr_t data, struct ucred *cred, struct proc *p) { DECL(coda_ioctl); /* sets Isize & Osize */ @@ -304,7 +304,8 @@ venus_ioctl(void *mdp, CodaFid *fid, int } int -venus_getattr(void *mdp, CodaFid *fid, struct ucred *cred, struct vattr *vap) +venus_getattr(void *mdp, struct CodaFid *fid, struct ucred *cred, + struct vattr *vap) { struct proc *p; DECL(coda_getattr); /* sets Isize & Osize */ @@ -326,7 +327,8 @@ venus_getattr(void *mdp, CodaFid *fid, s } int -venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, struct ucred *cred) +venus_setattr(void *mdp, struct CodaFid *fid, struct vattr *vap, + struct ucred *cred) { struct proc *p; DECL_NO_OUT(coda_setattr); /* sets Isize & Osize */ @@ -347,8 +349,8 @@ venus_setattr(void *mdp, CodaFid *fid, s } int -venus_access(void *mdp, CodaFid *fid, accmode_t accmode, struct ucred *cred, - struct proc *p) +venus_access(void *mdp, struct CodaFid *fid, accmode_t accmode, + struct ucred *cred, struct proc *p) { DECL_NO_OUT(coda_access); /* sets Isize & Osize */ ALLOC_NO_OUT(coda_access); /* sets inp & outp */ @@ -374,8 +376,8 @@ venus_access(void *mdp, CodaFid *fid, ac } int -venus_readlink(void *mdp, CodaFid *fid, struct ucred *cred, struct proc *p, - /*out*/ char **str, int *len) +venus_readlink(void *mdp, struct CodaFid *fid, struct ucred *cred, + struct proc *p, /*out*/ char **str, int *len) { DECL(coda_readlink); /* sets Isize & Osize */ coda_readlink_size += CODA_MAXPATHLEN; @@ -400,7 +402,7 @@ venus_readlink(void *mdp, CodaFid *fid, } int -venus_fsync(void *mdp, CodaFid *fid, struct proc *p) +venus_fsync(void *mdp, struct CodaFid *fid, struct proc *p) { DECL_NO_OUT(coda_fsync); /* sets Isize & Osize */ ALLOC_NO_OUT(coda_fsync); /* sets inp & outp */ @@ -420,8 +422,9 @@ venus_fsync(void *mdp, CodaFid *fid, str } int -venus_lookup(void *mdp, CodaFid *fid, const char *nm, int len, - struct ucred *cred, struct proc *p, /*out*/ CodaFid *VFid, int *vtype) +venus_lookup(void *mdp, struct CodaFid *fid, const char *nm, int len, + struct ucred *cred, struct proc *p, /*out*/ struct CodaFid *VFid, + int *vtype) { DECL(coda_lookup); /* sets Isize & Osize */ coda_lookup_size += len + 1; @@ -457,9 +460,9 @@ venus_lookup(void *mdp, CodaFid *fid, co } int -venus_create(void *mdp, CodaFid *fid, const char *nm, int len, int exclusive, - int mode, struct vattr *va, struct ucred *cred, struct proc *p, - /*out*/ CodaFid *VFid, struct vattr *attr) +venus_create(void *mdp, struct CodaFid *fid, const char *nm, int len, + int exclusive, int mode, struct vattr *va, struct ucred *cred, + struct proc *p, /*out*/ struct CodaFid *VFid, struct vattr *attr) { DECL(coda_create); /* sets Isize & Osize */ coda_create_size += len + 1; @@ -488,7 +491,7 @@ venus_create(void *mdp, CodaFid *fid, co } int -venus_remove(void *mdp, CodaFid *fid, const char *nm, int len, +venus_remove(void *mdp, struct CodaFid *fid, const char *nm, int len, struct ucred *cred, struct proc *p) { DECL_NO_OUT(coda_remove); /* sets Isize & Osize */ @@ -511,8 +514,8 @@ venus_remove(void *mdp, CodaFid *fid, co } int -venus_link(void *mdp, CodaFid *fid, CodaFid *tfid, const char *nm, int len, - struct ucred *cred, struct proc *p) +venus_link(void *mdp, struct CodaFid *fid, struct CodaFid *tfid, + const char *nm, int len, struct ucred *cred, struct proc *p) { DECL_NO_OUT(coda_link); /* sets Isize & Osize */ coda_link_size += len + 1; @@ -535,8 +538,9 @@ venus_link(void *mdp, CodaFid *fid, Coda } int -venus_rename(void *mdp, CodaFid *fid, CodaFid *tfid, const char *nm, int len, - const char *tnm, int tlen, struct ucred *cred, struct proc *p) +venus_rename(void *mdp, struct CodaFid *fid, struct CodaFid *tfid, + const char *nm, int len, const char *tnm, int tlen, struct ucred *cred, + struct proc *p) { DECL_NO_OUT(coda_rename); /* sets Isize & Osize */ coda_rename_size += len + 1 + tlen + 1; @@ -562,9 +566,9 @@ venus_rename(void *mdp, CodaFid *fid, Co } int -venus_mkdir(void *mdp, CodaFid *fid, const char *nm, int len, +venus_mkdir(void *mdp, struct CodaFid *fid, const char *nm, int len, struct vattr *va, struct ucred *cred, struct proc *p, - /*out*/ CodaFid *VFid, struct vattr *ova) + /*out*/ struct CodaFid *VFid, struct vattr *ova) { DECL(coda_mkdir); /* sets Isize & Osize */ coda_mkdir_size += len + 1; @@ -591,7 +595,7 @@ venus_mkdir(void *mdp, CodaFid *fid, con } int -venus_rmdir(void *mdp, CodaFid *fid, const char *nm, int len, +venus_rmdir(void *mdp, struct CodaFid *fid, const char *nm, int len, struct ucred *cred, struct proc *p) { DECL_NO_OUT(coda_rmdir); /* sets Isize & Osize */ @@ -614,7 +618,7 @@ venus_rmdir(void *mdp, CodaFid *fid, con } int -venus_symlink(void *mdp, CodaFid *fid, const char *lnm, int llen, +venus_symlink(void *mdp, struct CodaFid *fid, const char *lnm, int llen, const char *nm, int len, struct vattr *va, struct ucred *cred, struct proc *p) { @@ -645,7 +649,7 @@ venus_symlink(void *mdp, CodaFid *fid, c * XXX: Unused. */ int -venus_readdir(void *mdp, CodaFid *fid, int count, int offset, +venus_readdir(void *mdp, struct CodaFid *fid, int count, int offset, struct ucred *cred, struct proc *p, /*out*/ char *buffer, int *len) { DECL(coda_readdir); /* sets Isize & Osize */ @@ -672,8 +676,8 @@ venus_readdir(void *mdp, CodaFid *fid, i } int -venus_fhtovp(void *mdp, CodaFid *fid, struct ucred *cred, struct proc *p, - /*out*/ CodaFid *VFid, int *vtype) +venus_fhtovp(void *mdp, struct CodaFid *fid, struct ucred *cred, + struct proc *p, /*out*/ struct CodaFid *VFid, int *vtype) { DECL(coda_vget); /* sets Isize & Osize */ ALLOC(coda_vget); /* sets inp & outp */ Modified: head/sys/fs/coda/coda_venus.h ============================================================================== --- head/sys/fs/coda/coda_venus.h Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/coda_venus.h Mon Apr 5 20:12:54 2010 (r206210) @@ -34,49 +34,50 @@ #define _CODA_VENUS_H_ int venus_root(void *mdp, struct ucred *cred, struct proc *p, - /*out*/ CodaFid *VFid); -int venus_open(void *mdp, CodaFid *fid, int flag, struct ucred *cred, - struct proc *p, /*out*/ struct vnode **vp); -int venus_close(void *mdp, CodaFid *fid, int flag, struct ucred *cred, - struct proc *p); + /*out*/ struct CodaFid *VFid); +int venus_open(void *mdp, struct CodaFid *fid, int flag, + struct ucred *cred, struct proc *p, /*out*/ struct vnode **vp); +int venus_close(void *mdp, struct CodaFid *fid, int flag, + struct ucred *cred, struct proc *p); void venus_read(void); void venus_write(void); -int venus_ioctl(void *mdp, CodaFid *fid, int com, int flag, caddr_t data, - struct ucred *cred, struct proc *p); -int venus_getattr(void *mdp, CodaFid *fid, struct ucred *cred, +int venus_ioctl(void *mdp, struct CodaFid *fid, int com, int flag, + caddr_t data, struct ucred *cred, struct proc *p); +int venus_getattr(void *mdp, struct CodaFid *fid, struct ucred *cred, struct vattr *vap); -int venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, +int venus_setattr(void *mdp, struct CodaFid *fid, struct vattr *vap, struct ucred *cred); -int venus_access(void *mdp, CodaFid *fid, int mode, struct ucred *cred, - struct proc *p); -int venus_readlink(void *mdp, CodaFid *fid, struct ucred *cred, +int venus_access(void *mdp, struct CodaFid *fid, int mode, + struct ucred *cred, struct proc *p); +int venus_readlink(void *mdp, struct CodaFid *fid, struct ucred *cred, struct proc *p, /*out*/ char **str, int *len); -int venus_fsync(void *mdp, CodaFid *fid, struct proc *p); -int venus_lookup(void *mdp, CodaFid *fid, const char *nm, int len, - struct ucred *cred, struct proc *p, /*out*/ CodaFid *VFid, +int venus_fsync(void *mdp, struct CodaFid *fid, struct proc *p); +int venus_lookup(void *mdp, struct CodaFid *fid, const char *nm, int len, + struct ucred *cred, struct proc *p, /*out*/ struct CodaFid *VFid, int *vtype); -int venus_create(void *mdp, CodaFid *fid, const char *nm, int len, +int venus_create(void *mdp, struct CodaFid *fid, const char *nm, int len, int exclusive, int mode, struct vattr *va, struct ucred *cred, - struct proc *p, /*out*/ CodaFid *VFid, struct vattr *attr); -int venus_remove(void *mdp, CodaFid *fid, const char *nm, int len, + struct proc *p, /*out*/ struct CodaFid *VFid, + struct vattr *attr); +int venus_remove(void *mdp, struct CodaFid *fid, const char *nm, int len, struct ucred *cred, struct proc *p); -int venus_link(void *mdp, CodaFid *fid, CodaFid *tfid, const char *nm, - int len, struct ucred *cred, struct proc *p); -int venus_rename(void *mdp, CodaFid *fid, CodaFid *tfid, const char *nm, - int len, const char *tnm, int tlen, struct ucred *cred, - struct proc *p); -int venus_mkdir(void *mdp, CodaFid *fid, const char *nm, int len, +int venus_link(void *mdp, struct CodaFid *fid, struct CodaFid *tfid, + const char *nm, int len, struct ucred *cred, struct proc *p); +int venus_rename(void *mdp, struct CodaFid *fid, struct CodaFid *tfid, + const char *nm, int len, const char *tnm, int tlen, + struct ucred *cred, struct proc *p); +int venus_mkdir(void *mdp, struct CodaFid *fid, const char *nm, int len, struct vattr *va, struct ucred *cred, struct proc *p, - /*out*/ CodaFid *VFid, struct vattr *ova); -int venus_rmdir(void *mdp, CodaFid *fid, const char *nm, int len, + /*out*/ struct CodaFid *VFid, struct vattr *ova); +int venus_rmdir(void *mdp, struct CodaFid *fid, const char *nm, int len, + struct ucred *cred, struct proc *p); +int venus_symlink(void *mdp, struct CodaFid *fid, const char *lnm, + int llen, const char *nm, int len, struct vattr *va, struct ucred *cred, struct proc *p); -int venus_symlink(void *mdp, CodaFid *fid, const char *lnm, int llen, - const char *nm, int len, struct vattr *va, struct ucred *cred, - struct proc *p); -int venus_readdir(void *mdp, CodaFid *fid, int count, int offset, +int venus_readdir(void *mdp, struct CodaFid *fid, int count, int offset, struct ucred *cred, struct proc *p, /*out*/ char *buffer, int *len); -int venus_fhtovp(void *mdp, CodaFid *fid, struct ucred *cred, - struct proc *p, /*out*/ CodaFid *VFid, int *vtype); +int venus_fhtovp(void *mdp, struct CodaFid *fid, struct ucred *cred, + struct proc *p, /*out*/ struct CodaFid *VFid, int *vtype); #endif /* !_CODA_VENUS_H_ */ Modified: head/sys/fs/coda/coda_vfsops.c ============================================================================== --- head/sys/fs/coda/coda_vfsops.c Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/coda_vfsops.c Mon Apr 5 20:12:54 2010 (r206210) @@ -113,8 +113,8 @@ coda_mount(struct mount *vfsp) struct cdev *dev; struct coda_mntinfo *mi; struct vnode *rootvp; - CodaFid rootfid = INVAL_FID; - CodaFid ctlfid = CTL_FID; + struct CodaFid rootfid = INVAL_FID; + struct CodaFid ctlfid = CTL_FID; int error; struct nameidata ndp; ENTRY; @@ -268,8 +268,8 @@ coda_root(struct mount *vfsp, int flags, int error; struct proc *p; struct thread *td; - CodaFid VFid; - static const CodaFid invalfid = INVAL_FID; + struct CodaFid VFid; + static const struct CodaFid invalfid = INVAL_FID; td = curthread; p = td->td_proc; @@ -288,7 +288,7 @@ coda_root(struct mount *vfsp, int flags, * but not in any released versions as of 6 Mar 2003. */ if (memcmp(&VTOC(mi->mi_rootvp)->c_fid, &invalfid, - sizeof(CodaFid)) != 0 || mi->mi_started == 0) { + sizeof(struct CodaFid)) != 0 || mi->mi_started == 0) { /* * Found valid root. */ @@ -407,7 +407,7 @@ coda_fhtovp(struct mount *vfsp, struct f int error; struct thread *td = curthread; /* XXX -mach */ struct proc *p = td->td_proc; - CodaFid VFid; + struct CodaFid VFid; int vtype; ENTRY; Modified: head/sys/fs/coda/coda_vfsops.h ============================================================================== --- head/sys/fs/coda/coda_vfsops.h Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/coda_vfsops.h Mon Apr 5 20:12:54 2010 (r206210) @@ -42,7 +42,7 @@ struct cfid { u_short cfid_len; u_short padding; - CodaFid cfid_fid; + struct CodaFid cfid_fid; }; struct mbuf; Modified: head/sys/fs/coda/coda_vnops.c ============================================================================== --- head/sys/fs/coda/coda_vnops.c Mon Apr 5 20:01:21 2010 (r206209) +++ head/sys/fs/coda/coda_vnops.c Mon Apr 5 20:12:54 2010 (r206210) @@ -872,7 +872,7 @@ coda_lookup(struct vop_cachedlookup_args struct cnode *cp; const char *nm = cnp->cn_nameptr; int len = cnp->cn_namelen; - CodaFid VFid; + struct CodaFid VFid; int vtype; int error = 0; @@ -1009,7 +1009,7 @@ coda_create(struct vop_create_args *ap) struct cnode *cp; const char *nm = cnp->cn_nameptr; int len = cnp->cn_namelen; - CodaFid VFid; + struct CodaFid VFid; struct vattr attr; MARK_ENTRY(CODA_CREATE_STATS); @@ -1278,7 +1278,7 @@ coda_mkdir(struct vop_mkdir_args *ap) const char *nm = cnp->cn_nameptr; int len = cnp->cn_namelen; struct cnode *cp; - CodaFid VFid; + struct CodaFid VFid; struct vattr ova; MARK_ENTRY(CODA_MKDIR_STATS); @@ -1687,7 +1687,7 @@ coda_print_cred(struct ucred *cred) * coda_unsave. */ struct cnode * -make_coda_node(CodaFid *fid, struct mount *vfsp, short type) +make_coda_node(struct CodaFid *fid, struct mount *vfsp, short type) { struct cnode *cp; struct vnode *vp; From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 20:39:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6C36106564A; Mon, 5 Apr 2010 20:39:44 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A44BC8FC0C; Mon, 5 Apr 2010 20:39:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35Kdi2g038462; Mon, 5 Apr 2010 20:39:44 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35KdiVt038451; Mon, 5 Apr 2010 20:39:44 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004052039.o35KdiVt038451@svn.freebsd.org> From: Jack F Vogel Date: Mon, 5 Apr 2010 20:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206211 - in stable/8/sys: conf dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 20:39:44 -0000 Author: jfv Date: Mon Apr 5 20:39:44 2010 New Revision: 206211 URL: http://svn.freebsd.org/changeset/base/206211 Log: MFC of the em/igb drivers Added: stable/8/sys/dev/e1000/if_lem.c (contents, props changed) stable/8/sys/dev/e1000/if_lem.h (contents, props changed) Modified: stable/8/sys/conf/files stable/8/sys/dev/e1000/LICENSE stable/8/sys/dev/e1000/e1000_80003es2lan.c stable/8/sys/dev/e1000/e1000_80003es2lan.h stable/8/sys/dev/e1000/e1000_82540.c stable/8/sys/dev/e1000/e1000_82541.c stable/8/sys/dev/e1000/e1000_82542.c stable/8/sys/dev/e1000/e1000_82543.c stable/8/sys/dev/e1000/e1000_82571.c stable/8/sys/dev/e1000/e1000_82575.c stable/8/sys/dev/e1000/e1000_82575.h stable/8/sys/dev/e1000/e1000_api.c stable/8/sys/dev/e1000/e1000_api.h stable/8/sys/dev/e1000/e1000_defines.h stable/8/sys/dev/e1000/e1000_hw.h stable/8/sys/dev/e1000/e1000_ich8lan.c stable/8/sys/dev/e1000/e1000_ich8lan.h stable/8/sys/dev/e1000/e1000_mac.c stable/8/sys/dev/e1000/e1000_mac.h stable/8/sys/dev/e1000/e1000_manage.c stable/8/sys/dev/e1000/e1000_osdep.h stable/8/sys/dev/e1000/e1000_phy.c stable/8/sys/dev/e1000/e1000_phy.h stable/8/sys/dev/e1000/e1000_regs.h stable/8/sys/dev/e1000/if_em.c stable/8/sys/dev/e1000/if_em.h stable/8/sys/dev/e1000/if_igb.c stable/8/sys/dev/e1000/if_igb.h Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/conf/files Mon Apr 5 20:39:44 2010 (r206211) @@ -899,6 +899,8 @@ dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa dev/e1000/if_em.c optional em inet \ compile-with "${NORMAL_C} -I$S/dev/e1000" +dev/e1000/if_lem.c optional em inet \ + compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/if_igb.c optional igb inet \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_80003es2lan.c optional em | igb \ Modified: stable/8/sys/dev/e1000/LICENSE ============================================================================== --- stable/8/sys/dev/e1000/LICENSE Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/dev/e1000/LICENSE Mon Apr 5 20:39:44 2010 (r206211) @@ -1,6 +1,6 @@ $FreeBSD$ - Copyright (c) 2001-2008, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without Modified: stable/8/sys/dev/e1000/e1000_80003es2lan.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_80003es2lan.c Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/dev/e1000/e1000_80003es2lan.c Mon Apr 5 20:39:44 2010 (r206211) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -171,7 +171,7 @@ static s32 e1000_init_nvm_params_80003es break; } - nvm->type = e1000_nvm_eeprom_spi; + nvm->type = e1000_nvm_eeprom_spi; size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >> E1000_EECD_SIZE_EX_SHIFT); @@ -206,17 +206,22 @@ static s32 e1000_init_nvm_params_80003es static s32 e1000_init_mac_params_80003es2lan(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; - s32 ret_val = E1000_SUCCESS; DEBUGFUNC("e1000_init_mac_params_80003es2lan"); - /* Set media type */ + /* Set media type and media-dependent function pointers */ switch (hw->device_id) { case E1000_DEV_ID_80003ES2LAN_SERDES_DPT: hw->phy.media_type = e1000_media_type_internal_serdes; + mac->ops.check_for_link = e1000_check_for_serdes_link_generic; + mac->ops.setup_physical_interface = + e1000_setup_fiber_serdes_link_generic; break; default: hw->phy.media_type = e1000_media_type_copper; + mac->ops.check_for_link = e1000_check_for_copper_link_generic; + mac->ops.setup_physical_interface = + e1000_setup_copper_link_80003es2lan; break; } @@ -226,10 +231,14 @@ static s32 e1000_init_mac_params_80003es mac->rar_entry_count = E1000_RAR_ENTRIES; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ + /* FWSM register */ + mac->has_fwsm = TRUE; + /* ARC supported; valid only if manageability features are enabled. */ mac->arc_subsystem_valid = (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) ? TRUE : FALSE; + /* Adaptive IFS not supported */ + mac->adaptive_ifs = FALSE; /* Function pointers */ @@ -241,27 +250,6 @@ static s32 e1000_init_mac_params_80003es mac->ops.init_hw = e1000_init_hw_80003es2lan; /* link setup */ mac->ops.setup_link = e1000_setup_link_generic; - /* physical interface link setup */ - mac->ops.setup_physical_interface = - (hw->phy.media_type == e1000_media_type_copper) - ? e1000_setup_copper_link_80003es2lan - : e1000_setup_fiber_serdes_link_generic; - /* check for link */ - switch (hw->phy.media_type) { - case e1000_media_type_copper: - mac->ops.check_for_link = e1000_check_for_copper_link_generic; - break; - case e1000_media_type_fiber: - mac->ops.check_for_link = e1000_check_for_fiber_link_generic; - break; - case e1000_media_type_internal_serdes: - mac->ops.check_for_link = e1000_check_for_serdes_link_generic; - break; - default: - ret_val = -E1000_ERR_CONFIG; - goto out; - break; - } /* check management mode */ mac->ops.check_mng_mode = e1000_check_mng_mode_generic; /* multicast address update */ @@ -270,8 +258,6 @@ static s32 e1000_init_mac_params_80003es mac->ops.write_vfta = e1000_write_vfta_generic; /* clearing VFTA */ mac->ops.clear_vfta = e1000_clear_vfta_generic; - /* setting MTA */ - mac->ops.mta_set = e1000_mta_set_generic; /* read mac address */ mac->ops.read_mac_addr = e1000_read_mac_addr_80003es2lan; /* ID LED init */ @@ -290,8 +276,10 @@ static s32 e1000_init_mac_params_80003es /* link info */ mac->ops.get_link_up_info = e1000_get_link_up_info_80003es2lan; -out: - return ret_val; + /* set lan id for port to determine which phy lock to use */ + hw->mac.ops.set_lan_id(hw); + + return E1000_SUCCESS; } /** @@ -307,7 +295,6 @@ void e1000_init_function_pointers_80003e hw->mac.ops.init_params = e1000_init_mac_params_80003es2lan; hw->nvm.ops.init_params = e1000_init_nvm_params_80003es2lan; hw->phy.ops.init_params = e1000_init_phy_params_80003es2lan; - e1000_get_bus_info_pcie_generic(hw); } /** @@ -342,7 +329,6 @@ static void e1000_release_phy_80003es2la e1000_release_swfw_sync_80003es2lan(hw, mask); } - /** * e1000_acquire_mac_csr_80003es2lan - Acquire rights to access Kumeran register * @hw: pointer to the HW structure @@ -532,28 +518,36 @@ static s32 e1000_read_phy_reg_gg82563_80 goto out; } - /* - * The "ready" bit in the MDIC register may be incorrectly set - * before the device has completed the "Page Select" MDI - * transaction. So we wait 200us after each MDI command... - */ - usec_delay(200); + if (hw->dev_spec._80003es2lan.mdic_wa_enable == TRUE) { + /* + * The "ready" bit in the MDIC register may be incorrectly set + * before the device has completed the "Page Select" MDI + * transaction. So we wait 200us after each MDI command... + */ + usec_delay(200); - /* ...and verify the command was successful. */ - ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); + /* ...and verify the command was successful. */ + ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); - if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { - ret_val = -E1000_ERR_PHY; - e1000_release_phy_80003es2lan(hw); - goto out; - } + if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { + ret_val = -E1000_ERR_PHY; + e1000_release_phy_80003es2lan(hw); + goto out; + } - usec_delay(200); + usec_delay(200); - ret_val = e1000_read_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, - data); + ret_val = e1000_read_phy_reg_mdic(hw, + MAX_PHY_REG_ADDRESS & offset, + data); + + usec_delay(200); + } else { + ret_val = e1000_read_phy_reg_mdic(hw, + MAX_PHY_REG_ADDRESS & offset, + data); + } - usec_delay(200); e1000_release_phy_80003es2lan(hw); out: @@ -599,29 +593,36 @@ static s32 e1000_write_phy_reg_gg82563_8 goto out; } + if (hw->dev_spec._80003es2lan.mdic_wa_enable == TRUE) { + /* + * The "ready" bit in the MDIC register may be incorrectly set + * before the device has completed the "Page Select" MDI + * transaction. So we wait 200us after each MDI command... + */ + usec_delay(200); - /* - * The "ready" bit in the MDIC register may be incorrectly set - * before the device has completed the "Page Select" MDI - * transaction. So we wait 200us after each MDI command... - */ - usec_delay(200); + /* ...and verify the command was successful. */ + ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); - /* ...and verify the command was successful. */ - ret_val = e1000_read_phy_reg_mdic(hw, page_select, &temp); + if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { + ret_val = -E1000_ERR_PHY; + e1000_release_phy_80003es2lan(hw); + goto out; + } - if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) { - ret_val = -E1000_ERR_PHY; - e1000_release_phy_80003es2lan(hw); - goto out; - } + usec_delay(200); - usec_delay(200); + ret_val = e1000_write_phy_reg_mdic(hw, + MAX_PHY_REG_ADDRESS & offset, + data); - ret_val = e1000_write_phy_reg_mdic(hw, MAX_PHY_REG_ADDRESS & offset, - data); + usec_delay(200); + } else { + ret_val = e1000_write_phy_reg_mdic(hw, + MAX_PHY_REG_ADDRESS & offset, + data); + } - usec_delay(200); e1000_release_phy_80003es2lan(hw); out: @@ -802,13 +803,13 @@ static s32 e1000_get_cable_length_80003e index = phy_data & GG82563_DSPD_CABLE_LENGTH; - if (index >= GG82563_CABLE_LENGTH_TABLE_SIZE + 5) { - ret_val = E1000_ERR_PHY; + if (index >= GG82563_CABLE_LENGTH_TABLE_SIZE - 5) { + ret_val = -E1000_ERR_PHY; goto out; } phy->min_cable_length = e1000_gg82563_cable_length_table[index]; - phy->max_cable_length = e1000_gg82563_cable_length_table[index+5]; + phy->max_cable_length = e1000_gg82563_cable_length_table[index + 5]; phy->cable_length = (phy->min_cable_length + phy->max_cable_length) / 2; @@ -916,10 +917,9 @@ static s32 e1000_init_hw_80003es2lan(str /* Initialize identification LED */ ret_val = mac->ops.id_led_init(hw); - if (ret_val) { + if (ret_val) DEBUGOUT("Error initializing identification LED\n"); /* This is not fatal and we should not stop init due to this */ - } /* Disabling VLAN filtering */ DEBUGOUT("Initializing the IEEE VLAN\n"); @@ -969,6 +969,19 @@ static s32 e1000_init_hw_80003es2lan(str reg_data &= ~0x00100000; E1000_WRITE_REG_ARRAY(hw, E1000_FFLT, 0x0001, reg_data); + /* default to TRUE to enable the MDIC W/A */ + hw->dev_spec._80003es2lan.mdic_wa_enable = TRUE; + + ret_val = e1000_read_kmrn_reg_80003es2lan(hw, + E1000_KMRNCTRLSTA_OFFSET >> + E1000_KMRNCTRLSTA_OFFSET_SHIFT, + &i); + if (!ret_val) { + if ((i & E1000_KMRNCTRLSTA_OPMODE_MASK) == + E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO) + hw->dev_spec._80003es2lan.mdic_wa_enable = FALSE; + } + /* * Clear all of the statistics registers (clear on read). It is * important that we do this after we have tried to establish link @@ -1035,72 +1048,73 @@ static s32 e1000_copper_link_setup_gg825 DEBUGFUNC("e1000_copper_link_setup_gg82563_80003es2lan"); - if (!phy->reset_disable) { - ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, - &data); - if (ret_val) - goto out; + if (phy->reset_disable) + goto skip_reset; - data |= GG82563_MSCR_ASSERT_CRS_ON_TX; - /* Use 25MHz for both link down and 1000Base-T for Tx clock. */ - data |= GG82563_MSCR_TX_CLK_1000MBPS_25; + ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, + &data); + if (ret_val) + goto out; - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, - data); - if (ret_val) - goto out; + data |= GG82563_MSCR_ASSERT_CRS_ON_TX; + /* Use 25MHz for both link down and 1000Base-T for Tx clock. */ + data |= GG82563_MSCR_TX_CLK_1000MBPS_25; - /* - * Options: - * MDI/MDI-X = 0 (default) - * 0 - Auto for all speeds - * 1 - MDI mode - * 2 - MDI-X mode - * 3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes) - */ - ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_SPEC_CTRL, &data); - if (ret_val) - goto out; + ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_MAC_SPEC_CTRL, + data); + if (ret_val) + goto out; - data &= ~GG82563_PSCR_CROSSOVER_MODE_MASK; + /* + * Options: + * MDI/MDI-X = 0 (default) + * 0 - Auto for all speeds + * 1 - MDI mode + * 2 - MDI-X mode + * 3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes) + */ + ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_SPEC_CTRL, &data); + if (ret_val) + goto out; - switch (phy->mdix) { - case 1: - data |= GG82563_PSCR_CROSSOVER_MODE_MDI; - break; - case 2: - data |= GG82563_PSCR_CROSSOVER_MODE_MDIX; - break; - case 0: - default: - data |= GG82563_PSCR_CROSSOVER_MODE_AUTO; - break; - } + data &= ~GG82563_PSCR_CROSSOVER_MODE_MASK; - /* - * Options: - * disable_polarity_correction = 0 (default) - * Automatic Correction for Reversed Cable Polarity - * 0 - Disabled - * 1 - Enabled - */ - data &= ~GG82563_PSCR_POLARITY_REVERSAL_DISABLE; - if (phy->disable_polarity_correction) - data |= GG82563_PSCR_POLARITY_REVERSAL_DISABLE; + switch (phy->mdix) { + case 1: + data |= GG82563_PSCR_CROSSOVER_MODE_MDI; + break; + case 2: + data |= GG82563_PSCR_CROSSOVER_MODE_MDIX; + break; + case 0: + default: + data |= GG82563_PSCR_CROSSOVER_MODE_AUTO; + break; + } - ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL, data); - if (ret_val) - goto out; + /* + * Options: + * disable_polarity_correction = 0 (default) + * Automatic Correction for Reversed Cable Polarity + * 0 - Disabled + * 1 - Enabled + */ + data &= ~GG82563_PSCR_POLARITY_REVERSAL_DISABLE; + if (phy->disable_polarity_correction) + data |= GG82563_PSCR_POLARITY_REVERSAL_DISABLE; - /* SW Reset the PHY so all changes take effect */ - ret_val = hw->phy.ops.commit(hw); - if (ret_val) { - DEBUGOUT("Error Resetting the PHY\n"); - goto out; - } + ret_val = hw->phy.ops.write_reg(hw, GG82563_PHY_SPEC_CTRL, data); + if (ret_val) + goto out; + /* SW Reset the PHY so all changes take effect */ + ret_val = hw->phy.ops.commit(hw); + if (ret_val) { + DEBUGOUT("Error Resetting the PHY\n"); + goto out; } +skip_reset: /* Bypass Rx and Tx FIFO's */ ret_val = e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_OFFSET_FIFO_CTRL, @@ -1303,7 +1317,6 @@ static s32 e1000_cfg_kmrn_10_100_80003es tipg |= DEFAULT_TIPG_IPGT_10_100_80003ES2LAN; E1000_WRITE_REG(hw, E1000_TIPG, tipg); - do { ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); @@ -1357,7 +1370,6 @@ static s32 e1000_cfg_kmrn_1000_80003es2l tipg |= DEFAULT_TIPG_IPGT_1000_80003ES2LAN; E1000_WRITE_REG(hw, E1000_TIPG, tipg); - do { ret_val = hw->phy.ops.read_reg(hw, GG82563_PHY_KMRN_MODE_CTRL, ®_data); Modified: stable/8/sys/dev/e1000/e1000_80003es2lan.h ============================================================================== --- stable/8/sys/dev/e1000/e1000_80003es2lan.h Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/dev/e1000/e1000_80003es2lan.h Mon Apr 5 20:39:44 2010 (r206211) @@ -1,6 +1,6 @@ -/******************************************************************************* +/****************************************************************************** - Copyright (c) 2001-2008, Intel Corporation + Copyright (c) 2001-2009, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -29,9 +29,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*******************************************************************************/ -/* $FreeBSD$ */ - +******************************************************************************/ +/*$FreeBSD$*/ #ifndef _E1000_80003ES2LAN_H_ #define _E1000_80003ES2LAN_H_ @@ -49,6 +48,9 @@ #define E1000_KMRNCTRLSTA_HD_CTRL_1000_DEFAULT 0x0000 #define E1000_KMRNCTRLSTA_OPMODE_E_IDLE 0x2000 +#define E1000_KMRNCTRLSTA_OPMODE_MASK 0x000C +#define E1000_KMRNCTRLSTA_OPMODE_INBAND_MDIO 0x0004 + #define E1000_TCTL_EXT_GCEX_MASK 0x000FFC00 /* Gigabit Carry Extend Padding */ #define DEFAULT_TCTL_EXT_GCEX_80003ES2LAN 0x00010000 Modified: stable/8/sys/dev/e1000/e1000_82540.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_82540.c Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/dev/e1000/e1000_82540.c Mon Apr 5 20:39:44 2010 (r206211) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -228,8 +228,6 @@ static s32 e1000_init_mac_params_82540(s mac->ops.write_vfta = e1000_write_vfta_generic; /* clearing VFTA */ mac->ops.clear_vfta = e1000_clear_vfta_generic; - /* setting MTA */ - mac->ops.mta_set = e1000_mta_set_generic; /* read mac address */ mac->ops.read_mac_addr = e1000_read_mac_addr_82540; /* ID LED init */ Modified: stable/8/sys/dev/e1000/e1000_82541.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_82541.c Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/dev/e1000/e1000_82541.c Mon Apr 5 20:39:44 2010 (r206211) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -59,6 +59,7 @@ static s32 e1000_set_d3_lplu_state_8254 static s32 e1000_setup_led_82541(struct e1000_hw *hw); static s32 e1000_cleanup_led_82541(struct e1000_hw *hw); static void e1000_clear_hw_cntrs_82541(struct e1000_hw *hw); +static s32 e1000_read_mac_addr_82541(struct e1000_hw *hw); static s32 e1000_config_dsp_after_link_change_82541(struct e1000_hw *hw, bool link_up); static s32 e1000_phy_init_script_82541(struct e1000_hw *hw); @@ -259,8 +260,8 @@ static s32 e1000_init_mac_params_82541(s mac->ops.write_vfta = e1000_write_vfta_generic; /* clearing VFTA */ mac->ops.clear_vfta = e1000_clear_vfta_generic; - /* setting MTA */ - mac->ops.mta_set = e1000_mta_set_generic; + /* read mac address */ + mac->ops.read_mac_addr = e1000_read_mac_addr_82541; /* ID LED init */ mac->ops.id_led_init = e1000_id_led_init_generic; /* setup LED */ @@ -1292,3 +1293,35 @@ static void e1000_clear_hw_cntrs_82541(s E1000_READ_REG(hw, E1000_MGTPDC); E1000_READ_REG(hw, E1000_MGTPTC); } + +/** + * e1000_read_mac_addr_82541 - Read device MAC address + * @hw: pointer to the HW structure + * + * Reads the device MAC address from the EEPROM and stores the value. + **/ +static s32 e1000_read_mac_addr_82541(struct e1000_hw *hw) +{ + s32 ret_val = E1000_SUCCESS; + u16 offset, nvm_data, i; + + DEBUGFUNC("e1000_read_mac_addr"); + + for (i = 0; i < ETH_ADDR_LEN; i += 2) { + offset = i >> 1; + ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data); + if (ret_val) { + DEBUGOUT("NVM Read Error\n"); + goto out; + } + hw->mac.perm_addr[i] = (u8)(nvm_data & 0xFF); + hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8); + } + + for (i = 0; i < ETH_ADDR_LEN; i++) + hw->mac.addr[i] = hw->mac.perm_addr[i]; + +out: + return ret_val; +} + Modified: stable/8/sys/dev/e1000/e1000_82542.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_82542.c Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/dev/e1000/e1000_82542.c Mon Apr 5 20:39:44 2010 (r206211) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -134,8 +134,6 @@ static s32 e1000_init_mac_params_82542(s mac->ops.write_vfta = e1000_write_vfta_generic; /* clearing VFTA */ mac->ops.clear_vfta = e1000_clear_vfta_generic; - /* setting MTA */ - mac->ops.mta_set = e1000_mta_set_generic; /* read mac address */ mac->ops.read_mac_addr = e1000_read_mac_addr_82542; /* set RAR */ Modified: stable/8/sys/dev/e1000/e1000_82543.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_82543.c Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/dev/e1000/e1000_82543.c Mon Apr 5 20:39:44 2010 (r206211) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2008, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -63,7 +63,6 @@ static s32 e1000_led_on_82543(struct e1 static s32 e1000_led_off_82543(struct e1000_hw *hw); static void e1000_write_vfta_82543(struct e1000_hw *hw, u32 offset, u32 value); -static void e1000_mta_set_82543(struct e1000_hw *hw, u32 hash_value); static void e1000_clear_hw_cntrs_82543(struct e1000_hw *hw); static s32 e1000_config_mac_to_phy_82543(struct e1000_hw *hw); static bool e1000_init_phy_disabled_82543(struct e1000_hw *hw); @@ -75,6 +74,8 @@ static void e1000_shift_out_mdi_bits_825 u16 count); static bool e1000_tbi_compatibility_enabled_82543(struct e1000_hw *hw); static void e1000_set_tbi_sbp_82543(struct e1000_hw *hw, bool state); +static s32 e1000_read_mac_addr_82543(struct e1000_hw *hw); + /** * e1000_init_phy_params_82543 - Init PHY func ptrs. @@ -244,8 +245,8 @@ static s32 e1000_init_mac_params_82543(s mac->ops.write_vfta = e1000_write_vfta_82543; /* clearing VFTA */ mac->ops.clear_vfta = e1000_clear_vfta_generic; - /* setting MTA */ - mac->ops.mta_set = e1000_mta_set_82543; + /* read mac address */ + mac->ops.read_mac_addr = e1000_read_mac_addr_82543; /* turn on/off LED */ mac->ops.led_on = e1000_led_on_82543; mac->ops.led_off = e1000_led_off_82543; @@ -1477,45 +1478,6 @@ static void e1000_write_vfta_82543(struc } /** - * e1000_mta_set_82543 - Set multicast filter table address - * @hw: pointer to the HW structure - * @hash_value: determines the MTA register and bit to set - * - * The multicast table address is a register array of 32-bit registers. - * The hash_value is used to determine what register the bit is in, the - * current value is read, the new bit is OR'd in and the new value is - * written back into the register. - **/ -static void e1000_mta_set_82543(struct e1000_hw *hw, u32 hash_value) -{ - u32 hash_bit, hash_reg, mta, temp; - - DEBUGFUNC("e1000_mta_set_82543"); - - hash_reg = (hash_value >> 5); - - /* - * If we are on an 82544 and we are trying to write an odd offset - * in the MTA, save off the previous entry before writing and - * restore the old value after writing. - */ - if ((hw->mac.type == e1000_82544) && (hash_reg & 1)) { - hash_reg &= (hw->mac.mta_reg_count - 1); - hash_bit = hash_value & 0x1F; - mta = E1000_READ_REG_ARRAY(hw, E1000_MTA, hash_reg); - mta |= (1 << hash_bit); - temp = E1000_READ_REG_ARRAY(hw, E1000_MTA, hash_reg - 1); - - E1000_WRITE_REG_ARRAY(hw, E1000_MTA, hash_reg, mta); - E1000_WRITE_FLUSH(hw); - E1000_WRITE_REG_ARRAY(hw, E1000_MTA, hash_reg - 1, temp); - E1000_WRITE_FLUSH(hw); - } else { - e1000_mta_set_generic(hw, hash_value); - } -} - -/** * e1000_led_on_82543 - Turn on SW controllable LED * @hw: pointer to the HW structure * @@ -1600,3 +1562,41 @@ static void e1000_clear_hw_cntrs_82543(s E1000_READ_REG(hw, E1000_TSCTC); E1000_READ_REG(hw, E1000_TSCTFC); } + +/** + * e1000_read_mac_addr_82543 - Read device MAC address + * @hw: pointer to the HW structure + * + * Reads the device MAC address from the EEPROM and stores the value. + * Since devices with two ports use the same EEPROM, we increment the + * last bit in the MAC address for the second port. + * + **/ +s32 e1000_read_mac_addr_82543(struct e1000_hw *hw) +{ + s32 ret_val = E1000_SUCCESS; + u16 offset, nvm_data, i; + + DEBUGFUNC("e1000_read_mac_addr"); + + for (i = 0; i < ETH_ADDR_LEN; i += 2) { + offset = i >> 1; + ret_val = hw->nvm.ops.read(hw, offset, 1, &nvm_data); + if (ret_val) { + DEBUGOUT("NVM Read Error\n"); + goto out; + } + hw->mac.perm_addr[i] = (u8)(nvm_data & 0xFF); + hw->mac.perm_addr[i+1] = (u8)(nvm_data >> 8); + } + + /* Flip last bit of mac address if we're on second port */ + if (hw->bus.func == E1000_FUNC_1) + hw->mac.perm_addr[5] ^= 1; + + for (i = 0; i < ETH_ADDR_LEN; i++) + hw->mac.addr[i] = hw->mac.perm_addr[i]; + +out: + return ret_val; +} Modified: stable/8/sys/dev/e1000/e1000_82571.c ============================================================================== --- stable/8/sys/dev/e1000/e1000_82571.c Mon Apr 5 20:12:54 2010 (r206210) +++ stable/8/sys/dev/e1000/e1000_82571.c Mon Apr 5 20:39:44 2010 (r206211) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2009, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -46,7 +46,6 @@ * 82573E Gigabit Ethernet Controller (Copper) * 82573L Gigabit Ethernet Controller * 82574L Gigabit Network Connection - * 82574L Gigabit Network Connection * 82583V Gigabit Network Connection */ @@ -106,7 +105,6 @@ static s32 e1000_init_phy_params_82571(s phy->reset_delay_us = 100; phy->ops.acquire = e1000_get_hw_semaphore_82571; - phy->ops.check_polarity = e1000_check_polarity_igp; phy->ops.check_reset_block = e1000_check_reset_block_generic; phy->ops.release = e1000_put_hw_semaphore_82571; phy->ops.reset = e1000_phy_hw_reset_generic; @@ -121,6 +119,7 @@ static s32 e1000_init_phy_params_82571(s phy->type = e1000_phy_igp_2; phy->ops.get_cfg_done = e1000_get_cfg_done_82571; phy->ops.get_info = e1000_get_phy_info_igp; + phy->ops.check_polarity = e1000_check_polarity_igp; phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_igp; phy->ops.get_cable_length = e1000_get_cable_length_igp_2; phy->ops.read_reg = e1000_read_phy_reg_igp; @@ -132,6 +131,7 @@ static s32 e1000_init_phy_params_82571(s /* Verify PHY ID */ if (phy->id != IGP01E1000_I_PHY_ID) { ret_val = -E1000_ERR_PHY; + DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id); goto out; } break; @@ -139,6 +139,7 @@ static s32 e1000_init_phy_params_82571(s phy->type = e1000_phy_m88; phy->ops.get_cfg_done = e1000_get_cfg_done_generic; phy->ops.get_info = e1000_get_phy_info_m88; + phy->ops.check_polarity = e1000_check_polarity_m88; phy->ops.commit = e1000_phy_sw_reset_generic; phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88; phy->ops.get_cable_length = e1000_get_cable_length_m88; @@ -155,11 +156,12 @@ static s32 e1000_init_phy_params_82571(s goto out; } break; - case e1000_82583: case e1000_82574: + case e1000_82583: phy->type = e1000_phy_bm; phy->ops.get_cfg_done = e1000_get_cfg_done_generic; phy->ops.get_info = e1000_get_phy_info_m88; + phy->ops.check_polarity = e1000_check_polarity_m88; phy->ops.commit = e1000_phy_sw_reset_generic; phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88; phy->ops.get_cable_length = e1000_get_cable_length_m88; @@ -266,28 +268,42 @@ static s32 e1000_init_nvm_params_82571(s static s32 e1000_init_mac_params_82571(struct e1000_hw *hw) { struct e1000_mac_info *mac = &hw->mac; - s32 ret_val = E1000_SUCCESS; u32 swsm = 0; u32 swsm2 = 0; bool force_clear_smbi = FALSE; DEBUGFUNC("e1000_init_mac_params_82571"); - /* Set media type */ + /* Set media type and media-dependent function pointers */ switch (hw->device_id) { case E1000_DEV_ID_82571EB_FIBER: case E1000_DEV_ID_82572EI_FIBER: case E1000_DEV_ID_82571EB_QUAD_FIBER: hw->phy.media_type = e1000_media_type_fiber; + mac->ops.setup_physical_interface = + e1000_setup_fiber_serdes_link_82571; + mac->ops.check_for_link = e1000_check_for_fiber_link_generic; + mac->ops.get_link_up_info = + e1000_get_speed_and_duplex_fiber_serdes_generic; break; case E1000_DEV_ID_82571EB_SERDES: case E1000_DEV_ID_82571EB_SERDES_DUAL: case E1000_DEV_ID_82571EB_SERDES_QUAD: case E1000_DEV_ID_82572EI_SERDES: hw->phy.media_type = e1000_media_type_internal_serdes; + mac->ops.setup_physical_interface = + e1000_setup_fiber_serdes_link_82571; + mac->ops.check_for_link = e1000_check_for_serdes_link_82571; + mac->ops.get_link_up_info = + e1000_get_speed_and_duplex_fiber_serdes_generic; break; default: hw->phy.media_type = e1000_media_type_copper; + mac->ops.setup_physical_interface = + e1000_setup_copper_link_82571; + mac->ops.check_for_link = e1000_check_for_copper_link_generic; + mac->ops.get_link_up_info = + e1000_get_speed_and_duplex_copper_generic; break; } @@ -297,70 +313,25 @@ static s32 e1000_init_mac_params_82571(s mac->rar_entry_count = E1000_RAR_ENTRIES; /* Set if part includes ASF firmware */ mac->asf_firmware_present = TRUE; - /* Set if manageability features are enabled. */ - mac->arc_subsystem_valid = - (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) - ? TRUE : FALSE; + /* Adaptive IFS supported */ + mac->adaptive_ifs = TRUE; /* Function pointers */ /* bus type/speed/width */ mac->ops.get_bus_info = e1000_get_bus_info_pcie_generic; - /* function id */ - switch (hw->mac.type) { - case e1000_82573: - case e1000_82574: - case e1000_82583: - mac->ops.set_lan_id = e1000_set_lan_id_single_port; - break; - default: - break; - } /* reset */ mac->ops.reset_hw = e1000_reset_hw_82571; /* hw initialization */ mac->ops.init_hw = e1000_init_hw_82571; /* link setup */ mac->ops.setup_link = e1000_setup_link_82571; - /* physical interface link setup */ - mac->ops.setup_physical_interface = - (hw->phy.media_type == e1000_media_type_copper) - ? e1000_setup_copper_link_82571 - : e1000_setup_fiber_serdes_link_82571; - /* check for link */ - switch (hw->phy.media_type) { - case e1000_media_type_copper: - mac->ops.check_for_link = e1000_check_for_copper_link_generic; - break; - case e1000_media_type_fiber: - mac->ops.check_for_link = e1000_check_for_fiber_link_generic; - break; - case e1000_media_type_internal_serdes: - mac->ops.check_for_link = e1000_check_for_serdes_link_82571; - break; - default: - ret_val = -E1000_ERR_CONFIG; - goto out; - break; - } - /* check management mode */ - switch (hw->mac.type) { - case e1000_82574: - case e1000_82583: - mac->ops.check_mng_mode = e1000_check_mng_mode_82574; - break; - default: - mac->ops.check_mng_mode = e1000_check_mng_mode_generic; - break; - } /* multicast address update */ mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_generic; /* writing VFTA */ mac->ops.write_vfta = e1000_write_vfta_generic; /* clearing VFTA */ mac->ops.clear_vfta = e1000_clear_vfta_82571; - /* setting MTA */ - mac->ops.mta_set = e1000_mta_set_generic; /* read mac address */ mac->ops.read_mac_addr = e1000_read_mac_addr_82571; /* ID LED init */ @@ -371,24 +342,42 @@ static s32 e1000_init_mac_params_82571(s mac->ops.setup_led = e1000_setup_led_generic; /* cleanup LED */ mac->ops.cleanup_led = e1000_cleanup_led_generic; - /* turn on/off LED */ + /* turn off LED */ + mac->ops.led_off = e1000_led_off_generic; + /* clear hardware counters */ + mac->ops.clear_hw_cntrs = e1000_clear_hw_cntrs_82571; + + /* MAC-specific function pointers */ switch (hw->mac.type) { + case e1000_82573: + mac->ops.set_lan_id = e1000_set_lan_id_single_port; + mac->ops.check_mng_mode = e1000_check_mng_mode_generic; + mac->ops.led_on = e1000_led_on_generic; + + /* FWSM register */ + mac->has_fwsm = TRUE; + /* + * ARC supported; valid only if manageability features are + * enabled. + */ + mac->arc_subsystem_valid = + (E1000_READ_REG(hw, E1000_FWSM) & E1000_FWSM_MODE_MASK) + ? TRUE : FALSE; + break; case e1000_82574: case e1000_82583: + mac->ops.set_lan_id = e1000_set_lan_id_single_port; + mac->ops.check_mng_mode = e1000_check_mng_mode_82574; mac->ops.led_on = e1000_led_on_82574; break; default: + mac->ops.check_mng_mode = e1000_check_mng_mode_generic; mac->ops.led_on = e1000_led_on_generic; + + /* FWSM register */ + mac->has_fwsm = TRUE; break; } - mac->ops.led_off = e1000_led_off_generic; - /* clear hardware counters */ - mac->ops.clear_hw_cntrs = e1000_clear_hw_cntrs_82571; - /* link info */ - mac->ops.get_link_up_info = - (hw->phy.media_type == e1000_media_type_copper) - ? e1000_get_speed_and_duplex_copper_generic - : e1000_get_speed_and_duplex_fiber_serdes_generic; /* * Ensure that the inter-port SWSM.SMBI lock bit is clear before @@ -434,8 +423,7 @@ static s32 e1000_init_mac_params_82571(s */ hw->dev_spec._82571.smb_counter = 0; -out: - return ret_val; + return E1000_SUCCESS; } /** @@ -501,7 +489,6 @@ static s32 e1000_get_phy_id_82571(struct ret_val = -E1000_ERR_PHY; break; } - out: return ret_val; } @@ -512,7 +499,7 @@ out: * * Acquire the HW semaphore to access the PHY or NVM **/ -s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) +static s32 e1000_get_hw_semaphore_82571(struct e1000_hw *hw) { u32 swsm; s32 ret_val = E1000_SUCCESS; @@ -577,7 +564,7 @@ out: * * Release hardware semaphore used to access the PHY or NVM **/ -void e1000_put_hw_semaphore_82571(struct e1000_hw *hw) +static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw) { u32 swsm; @@ -610,9 +597,9 @@ static s32 e1000_acquire_nvm_82571(struc goto out; switch (hw->mac.type) { + case e1000_82573: case e1000_82574: case e1000_82583: - case e1000_82573: break; default: ret_val = e1000_acquire_nvm_generic(hw); @@ -831,7 +818,8 @@ static s32 e1000_get_cfg_done_82571(stru DEBUGFUNC("e1000_get_cfg_done_82571"); while (timeout) { - if (E1000_READ_REG(hw, E1000_EEMNGCTL) & E1000_NVM_CFG_DONE_PORT_0) + if (E1000_READ_REG(hw, E1000_EEMNGCTL) & + E1000_NVM_CFG_DONE_PORT_0) break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 21:43:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BB631065687; Mon, 5 Apr 2010 21:43:23 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 405BF8FC0C; Mon, 5 Apr 2010 21:43:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35LhNUU052900; Mon, 5 Apr 2010 21:43:23 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35LhNFt052897; Mon, 5 Apr 2010 21:43:23 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004052143.o35LhNFt052897@svn.freebsd.org> From: Jack F Vogel Date: Mon, 5 Apr 2010 21:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206215 - in stable/8/sys/modules: em ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 21:43:23 -0000 Author: jfv Date: Mon Apr 5 21:43:22 2010 New Revision: 206215 URL: http://svn.freebsd.org/changeset/base/206215 Log: Add missing module Makefile for ixgbe and em MFCs Modified: stable/8/sys/modules/em/Makefile stable/8/sys/modules/ixgbe/Makefile Modified: stable/8/sys/modules/em/Makefile ============================================================================== --- stable/8/sys/modules/em/Makefile Mon Apr 5 21:36:04 2010 (r206214) +++ stable/8/sys/modules/em/Makefile Mon Apr 5 21:43:22 2010 (r206215) @@ -2,15 +2,19 @@ .PATH: ${.CURDIR}/../../dev/e1000 KMOD = if_em SRCS = device_if.h bus_if.h pci_if.h opt_inet.h -SRCS += if_em.c $(SHARED_SRCS) -SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c -SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c -SHARED_SRCS += e1000_82540.c e1000_ich8lan.c e1000_82571.c e1000_osdep.c -SHARED_SRCS += e1000_82575.c +SRCS += $(CORE_SRC) $(LEGACY_SRC) +SRCS += $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED) +CORE_SRC = if_em.c e1000_osdep.c +# This is the Legacy, pre-PCIE source, it can be +# undefined when using modular driver if not needed +LEGACY_SRC += if_lem.c +COMMON_SHARED = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c +PCIE_SHARED = e1000_80003es2lan.c e1000_ich8lan.c e1000_82571.c e1000_82575.c +LEGACY_SHARED = e1000_82540.c e1000_82542.c e1000_82541.c e1000_82543.c -CFLAGS+= -I${.CURDIR}/../../dev/e1000 +CFLAGS += -I${.CURDIR}/../../dev/e1000 -# DEVICE_POLLING gives you Legacy interrupt handling +# DEVICE_POLLING for a non-interrupt-driven method #CFLAGS += -DDEVICE_POLLING clean: Modified: stable/8/sys/modules/ixgbe/Makefile ============================================================================== --- stable/8/sys/modules/ixgbe/Makefile Mon Apr 5 21:36:04 2010 (r206214) +++ stable/8/sys/modules/ixgbe/Makefile Mon Apr 5 21:43:22 2010 (r206215) @@ -6,7 +6,7 @@ SRCS += ixgbe.c # Shared source SRCS += ixgbe_common.c ixgbe_api.c ixgbe_phy.c SRCS += ixgbe_82599.c ixgbe_82598.c -CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP +CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP -DIXGBE_FDIR clean: rm -f device_if.h bus_if.h pci_if.h setdef* *_StripErr From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 22:08:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C6E1065670; Mon, 5 Apr 2010 22:08:52 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 907118FC17; Mon, 5 Apr 2010 22:08:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35M8qDg058633; Mon, 5 Apr 2010 22:08:52 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35M8qv5058629; Mon, 5 Apr 2010 22:08:52 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201004052208.o35M8qv5058629@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 5 Apr 2010 22:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206216 - vendor/tzdata/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 22:08:52 -0000 Author: edwin Date: Mon Apr 5 22:08:52 2010 New Revision: 206216 URL: http://svn.freebsd.org/changeset/base/206216 Log: Vendor import of tzdata2010h From tzdata2010h: - Tunis will not go into DST this year. - Pakistan will not go into DST this year. From tzdata2010g: - Bangladesh cancels DST. - Palestine goes into DST one day later than expected. - Russian timezones update: Europe/Samara goes to Moscow time. Asia/Kamchatka goes to Moscow+8 time. Asia/Anadyr goes to Moscow+8 time. Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/asia vendor/tzdata/dist/europe vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Mon Apr 5 21:43:22 2010 (r206215) +++ vendor/tzdata/dist/asia Mon Apr 5 22:08:52 2010 (r206216) @@ -1,4 +1,4 @@ -# @(#)asia 8.56 +# @(#)asia 8.58 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -214,42 +214,20 @@ Zone Asia/Bahrain 3:22:20 - LMT 1920 # # 2010 midnight. The decision came at a cabinet meeting at the Prime # Minister's Office last night..." -# From Danvin Ruangchan (2009-12-24): -# ...the news mentions DST will be turned off again 7 months after March -# 31st on Oct 31, 2010. - -# From Arthur David Olson (2009-12-26): -# Indeed, "The government will advance again the Banglasdesh Standard -# Time by one one hour on March 31 next year by enforcing the Daylight -# Saving Time (DST) for seven months. It will continue till October 31 -# until further notice." I take that last sentence as the -# establishment of a rule. - -# From Nobutomo Nakano (2010-02-19): -# We received a report from Bangladesh saying that the start/end of -# Bangladesh DST is incorrect. Currently we have only the Bengali version -# of the official mail from BTRC which describes the following: -# -# "From 2010 each year when local standard time is about to reach -# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM) -# and when local daylight time is about to October 31 at 11:59:00 PM -# clocks are turned backward 1 hour (10:59:00 PM)." -# -# So, DST will start/end 1 minute earlier. - -# From Arthur David Olson (2010-03-03): -# The file -# -# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf +# From Alexander Krivenyshev (2010-03-22): +# According to Bangladesh newspaper "The Daily Star," +# Cabinet cancels Daylight Saving Time +# +# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817 +# +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html # -# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59" -# which is consistent with the information provided by Nobutomo Nakano. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Dhaka 2009 only - Jun 19 23:00 1:00 S Rule Dhaka 2009 only - Dec 31 23:59 0 - -Rule Dhaka 2010 max - Mar 31 22:59 1:00 S -Rule Dhaka 2010 max - Oct 31 23:59 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 @@ -2129,6 +2107,32 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html # +# From Alexander Krivenyshev (2010-03-19): +# According to Voice of Palestine DST will last for 191 days, from March +# 26, 2010 till "the last Sunday before the tenth day of Tishri +# (October), each year" (October 03, 2010?) +# +# +# http://palvoice.org/forums/showthread.php?t=245697 +# +# (in Arabic) +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html +# + +# From Steffen Thorsen (2010-03-24): +# ...Ma'an News Agency reports that Hamas cabinet has decided it will +# start one day later, at 12:01am. Not sure if they really mean 12:01am or +# noon though: +# +# +# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178 +# +# (Ma'an News Agency) +# "At 12:01am Friday, clocks in Israel and the West Bank will change to +# 1:01am, while Gaza clocks will change at 12:01am Saturday morning." + # The rules for Egypt are stolen from the `africa' file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2146,7 +2150,8 @@ Rule Palestine 2006 2008 - Apr 1 0:00 1 Rule Palestine 2006 only - Sep 22 0:00 0 - Rule Palestine 2007 only - Sep Thu>=8 2:00 0 - Rule Palestine 2008 only - Aug lastFri 2:00 0 - -Rule Palestine 2009 max - Mar lastFri 0:00 1:00 S +Rule Palestine 2009 only - Mar lastFri 0:00 1:00 S +Rule Palestine 2010 max - Mar lastSat 0:01 1:00 S Rule Palestine 2009 max - Sep Fri>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Modified: vendor/tzdata/dist/europe ============================================================================== --- vendor/tzdata/dist/europe Mon Apr 5 21:43:22 2010 (r206215) +++ vendor/tzdata/dist/europe Mon Apr 5 22:08:52 2010 (r206216) @@ -1,5 +1,5 @@ #
-# @(#)europe	8.25
+# @(#)europe	8.26
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2041,7 +2041,9 @@ Zone Europe/Samara	 3:20:36 -	LMT	1919 J
 			 3:00	Russia	KUY%sT	1991 Mar 31 2:00s
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
-			 4:00	Russia	SAM%sT	# Samara Time
+			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
+			 3:00	Russia	SAM%sT
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Bashkortostan, Komi-Permyatskij avtonomnyj okrug,
@@ -2194,7 +2196,8 @@ Zone Asia/Kamchatka	10:34:36 -	LMT	1922 
 			11:00	-	PETT	1930 Jun 21 # P-K Time
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
-			12:00	Russia	PET%sT
+			12:00	Russia	PET%sT	2010 Mar 28 2:00s
+			11:00	Russia	PET%sT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2202,7 +2205,8 @@ Zone Asia/Anadyr	11:49:56 -	LMT	1924 May
 			13:00	Russia	ANA%sT	1982 Apr  1 0:00s
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
-			12:00	Russia	ANA%sT
+			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
+			11:00	Russia	ANA%sT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Mon Apr  5 21:43:22 2010	(r206215)
+++ vendor/tzdata/dist/zone.tab	Mon Apr  5 22:08:52 2010	(r206216)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.34
+# @(#)zone.tab	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,7 +330,7 @@ RS	+4450+02030	Europe/Belgrade
 RU	+5443+02030	Europe/Kaliningrad	Moscow-01 - Kaliningrad
 RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
 RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
-RU	+5312+05009	Europe/Samara	Moscow+01 - Samara, Udmurtia
+RU	+5312+05009	Europe/Samara	Moscow - Samara, Udmurtia
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
@@ -341,8 +341,8 @@ RU	+6200+12940	Asia/Yakutsk	Moscow+06 - 
 RU	+4310+13156	Asia/Vladivostok	Moscow+07 - Amur River
 RU	+4658+14242	Asia/Sakhalin	Moscow+07 - Sakhalin Island
 RU	+5934+15048	Asia/Magadan	Moscow+08 - Magadan
-RU	+5301+15839	Asia/Kamchatka	Moscow+09 - Kamchatka
-RU	+6445+17729	Asia/Anadyr	Moscow+10 - Bering Sea
+RU	+5301+15839	Asia/Kamchatka	Moscow+08 - Kamchatka
+RU	+6445+17729	Asia/Anadyr	Moscow+08 - Bering Sea
 RW	-0157+03004	Africa/Kigali
 SA	+2438+04643	Asia/Riyadh
 SB	-0932+16012	Pacific/Guadalcanal

From owner-svn-src-all@FreeBSD.ORG  Mon Apr  5 22:09:29 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DCCEA1065670;
	Mon,  5 Apr 2010 22:09:29 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCC578FC1E;
	Mon,  5 Apr 2010 22:09:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35M9Ta7058807;
	Mon, 5 Apr 2010 22:09:29 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35M9TNe058804;
	Mon, 5 Apr 2010 22:09:29 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <201004052209.o35M9TNe058804@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Mon, 5 Apr 2010 22:09:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206217 - head/lib/libc/stdio
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 22:09:30 -0000

Author: obrien
Date: Mon Apr  5 22:09:29 2010
New Revision: 206217
URL: http://svn.freebsd.org/changeset/base/206217

Log:
  I feel this wording of the history is more clear.
  ANSIfy vasprintf() while I'm here.

Modified:
  head/lib/libc/stdio/printf.3
  head/lib/libc/stdio/vasprintf.c

Modified: head/lib/libc/stdio/printf.3
==============================================================================
--- head/lib/libc/stdio/printf.3	Mon Apr  5 22:08:52 2010	(r206216)
+++ head/lib/libc/stdio/printf.3	Mon Apr  5 22:09:29 2010	(r206217)
@@ -891,9 +891,9 @@ in
 .Fx 2.2 ,
 but were later replaced with a different implementation
 from
-.An Todd C. Miller Aq Todd.Miller@courtesan.com
-for
-.Ox 2.3 .
+.Ox 2.3
+by
+.An Todd C. Miller Aq Todd.Miller@courtesan.com .
 The
 .Fn dprintf
 and

Modified: head/lib/libc/stdio/vasprintf.c
==============================================================================
--- head/lib/libc/stdio/vasprintf.c	Mon Apr  5 22:08:52 2010	(r206216)
+++ head/lib/libc/stdio/vasprintf.c	Mon Apr  5 22:09:29 2010	(r206217)
@@ -36,16 +36,13 @@ __FBSDID("$FreeBSD$");
 #include "local.h"
 
 int
-vasprintf(str, fmt, ap)
-	char **str;
-	const char *fmt;
-	__va_list ap;
+vasprintf(char **str, const char *fmt, __va_list ap)
 {
-	int ret;
 	FILE f = FAKE_FILE;
+	int ret;
 
 	f._flags = __SWR | __SSTR | __SALC;
-	f._bf._base = f._p = (unsigned char *)malloc(128);
+	f._bf._base = f._p = malloc(128);
 	if (f._bf._base == NULL) {
 		*str = NULL;
 		errno = ENOMEM;

From owner-svn-src-all@FreeBSD.ORG  Mon Apr  5 22:10:26 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 36420106568B;
	Mon,  5 Apr 2010 22:10:26 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0BD8D8FC1E;
	Mon,  5 Apr 2010 22:10:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35MAP8f059071;
	Mon, 5 Apr 2010 22:10:25 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35MAPvY059070;
	Mon, 5 Apr 2010 22:10:25 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201004052210.o35MAPvY059070@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 5 Apr 2010 22:10:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206218 - vendor/tzdata/tzdata2010h
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 22:10:26 -0000

Author: edwin
Date: Mon Apr  5 22:10:24 2010
New Revision: 206218
URL: http://svn.freebsd.org/changeset/base/206218

Log:
  Tag of tzdata2010h

Added:
  vendor/tzdata/tzdata2010h/
     - copied from r206217, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Mon Apr  5 22:15:06 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EB4E91065672;
	Mon,  5 Apr 2010 22:15:06 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DA20B8FC19;
	Mon,  5 Apr 2010 22:15:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35MF6Vf060259;
	Mon, 5 Apr 2010 22:15:06 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35MF6GO060255;
	Mon, 5 Apr 2010 22:15:06 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201004052215.o35MF6GO060255@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 5 Apr 2010 22:15:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206219 - head/contrib/tzdata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 22:15:07 -0000

Author: edwin
Date: Mon Apr  5 22:15:06 2010
New Revision: 206219
URL: http://svn.freebsd.org/changeset/base/206219

Log:
  MFV of tzdata2010h:
  
  From tzdata2010h:
  
  - Tunis will not go into DST this year.
  - Pakistan will not go into DST this year.
  
  From tzdata2010g:
  
  - Bangladesh cancels DST.
  - Palestine goes into DST one day later than expected.
  
  - Russian timezones update:
    Europe/Samara goes to Moscow time.
    Asia/Kamchatka goes to Moscow+8 time.
    Asia/Anadyr goes to Moscow+8 time.

Modified:
  head/contrib/tzdata/asia
  head/contrib/tzdata/europe
  head/contrib/tzdata/zone.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/asia
==============================================================================
--- head/contrib/tzdata/asia	Mon Apr  5 22:10:24 2010	(r206218)
+++ head/contrib/tzdata/asia	Mon Apr  5 22:15:06 2010	(r206219)
@@ -1,4 +1,4 @@
-# @(#)asia	8.56
+# @(#)asia	8.58
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -214,42 +214,20 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # 2010 midnight. The decision came at a cabinet meeting at the Prime
 # Minister's Office last night..."
 
-# From Danvin Ruangchan (2009-12-24):
-# ...the news mentions DST will be turned off again 7 months after March
-# 31st on Oct 31, 2010.
-
-# From Arthur David Olson (2009-12-26):
-# Indeed, "The government will advance again the Banglasdesh Standard
-# Time by one one hour on March 31 next year by enforcing the Daylight
-# Saving Time (DST) for seven months. It will continue till October 31
-# until further notice." I take that last sentence as the
-# establishment of a rule.
-
-# From Nobutomo Nakano (2010-02-19):
-# We received a report from Bangladesh saying that the start/end of
-# Bangladesh DST is incorrect. Currently we have only the Bengali version
-# of the official mail from BTRC which describes the following:
-#
-# "From 2010 each year when local standard time is about to reach
-# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM)
-# and when local daylight time is about to October 31 at 11:59:00 PM
-# clocks are turned backward 1 hour (10:59:00 PM)."
-#
-# So, DST will start/end 1 minute earlier.
-
-# From Arthur David Olson (2010-03-03):
-# The file
-# 
-# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf
+# From Alexander Krivenyshev (2010-03-22):
+# According to Bangladesh newspaper "The Daily Star,"
+# Cabinet cancels Daylight Saving Time 
+# 
+# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html
 # 
-# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59"
-# which is consistent with the information provided by Nobutomo Nakano.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Dhaka	2009	only	-	Jun	19	23:00	1:00	S
 Rule	Dhaka	2009	only	-	Dec	31	23:59	0	-
-Rule	Dhaka	2010	max	-	Mar	31	22:59	1:00	S
-Rule	Dhaka	2010	max	-	Oct	31	23:59	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
@@ -2129,6 +2107,32 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html
 # 
 
+# From Alexander Krivenyshev (2010-03-19):
+# According to Voice of Palestine DST will last for 191 days, from March
+# 26, 2010 till "the last Sunday before the tenth day of Tishri
+# (October), each year" (October 03, 2010?)
+#
+# 
+# http://palvoice.org/forums/showthread.php?t=245697
+# 
+# (in Arabic)
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html
+# 
+
+# From Steffen Thorsen (2010-03-24):
+# ...Ma'an News Agency reports that Hamas cabinet has decided it will
+# start one day later, at 12:01am. Not sure if they really mean 12:01am or
+# noon though:
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178
+# 
+# (Ma'an News Agency)
+# "At 12:01am Friday, clocks in Israel and the West Bank will change to
+# 1:01am, while Gaza clocks will change at 12:01am Saturday morning."
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -2146,7 +2150,8 @@ Rule Palestine	2006	2008	-	Apr	 1	0:00	1
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
 Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
-Rule Palestine	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: head/contrib/tzdata/europe
==============================================================================
--- head/contrib/tzdata/europe	Mon Apr  5 22:10:24 2010	(r206218)
+++ head/contrib/tzdata/europe	Mon Apr  5 22:15:06 2010	(r206219)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.25
+# @(#)europe	8.26
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2041,7 +2041,9 @@ Zone Europe/Samara	 3:20:36 -	LMT	1919 J
 			 3:00	Russia	KUY%sT	1991 Mar 31 2:00s
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
-			 4:00	Russia	SAM%sT	# Samara Time
+			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
+			 3:00	Russia	SAM%sT
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Bashkortostan, Komi-Permyatskij avtonomnyj okrug,
@@ -2194,7 +2196,8 @@ Zone Asia/Kamchatka	10:34:36 -	LMT	1922 
 			11:00	-	PETT	1930 Jun 21 # P-K Time
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
-			12:00	Russia	PET%sT
+			12:00	Russia	PET%sT	2010 Mar 28 2:00s
+			11:00	Russia	PET%sT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2202,7 +2205,8 @@ Zone Asia/Anadyr	11:49:56 -	LMT	1924 May
 			13:00	Russia	ANA%sT	1982 Apr  1 0:00s
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
-			12:00	Russia	ANA%sT
+			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
+			11:00	Russia	ANA%sT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: head/contrib/tzdata/zone.tab
==============================================================================
--- head/contrib/tzdata/zone.tab	Mon Apr  5 22:10:24 2010	(r206218)
+++ head/contrib/tzdata/zone.tab	Mon Apr  5 22:15:06 2010	(r206219)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.34
+# @(#)zone.tab	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,7 +330,7 @@ RS	+4450+02030	Europe/Belgrade
 RU	+5443+02030	Europe/Kaliningrad	Moscow-01 - Kaliningrad
 RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
 RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
-RU	+5312+05009	Europe/Samara	Moscow+01 - Samara, Udmurtia
+RU	+5312+05009	Europe/Samara	Moscow - Samara, Udmurtia
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
@@ -341,8 +341,8 @@ RU	+6200+12940	Asia/Yakutsk	Moscow+06 - 
 RU	+4310+13156	Asia/Vladivostok	Moscow+07 - Amur River
 RU	+4658+14242	Asia/Sakhalin	Moscow+07 - Sakhalin Island
 RU	+5934+15048	Asia/Magadan	Moscow+08 - Magadan
-RU	+5301+15839	Asia/Kamchatka	Moscow+09 - Kamchatka
-RU	+6445+17729	Asia/Anadyr	Moscow+10 - Bering Sea
+RU	+5301+15839	Asia/Kamchatka	Moscow+08 - Kamchatka
+RU	+6445+17729	Asia/Anadyr	Moscow+08 - Bering Sea
 RW	-0157+03004	Africa/Kigali
 SA	+2438+04643	Asia/Riyadh
 SB	-0932+16012	Pacific/Guadalcanal

From owner-svn-src-all@FreeBSD.ORG  Mon Apr  5 23:29:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D4C16106578C;
	Mon,  5 Apr 2010 23:29:27 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C008C8FC1B;
	Mon,  5 Apr 2010 23:29:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35NTRRp076703;
	Mon, 5 Apr 2010 23:29:27 GMT (envelope-from np@svn.freebsd.org)
Received: (from np@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35NTR8O076698;
	Mon, 5 Apr 2010 23:29:27 GMT (envelope-from np@svn.freebsd.org)
Message-Id: <201004052329.o35NTR8O076698@svn.freebsd.org>
From: Navdeep Parhar 
Date: Mon, 5 Apr 2010 23:29:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206220 - in stable/8/sys: dev/cxgb dev/cxgb/common
	dev/cxgb/ulp/iw_cxgb dev/cxgb/ulp/tom modules/cxgb/cxgb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 23:29:27 -0000

Author: np
Date: Mon Apr  5 23:29:27 2010
New Revision: 206220
URL: http://svn.freebsd.org/changeset/base/206220

Log:
  cxgb(4) MFCs: r204271,r204274,r204348,r204921,r205944,r205945,r205946,r205947,r205948,r205949,r205950,r206109
  
  r204271:
  Accessing an mbuf after it has been handed off to the hardware is a bad
  race as it could already have been tx'd and freed by that time.  Place
  the bpf tap just _before_ writing the gen bit.
  
  This fixes a panic when running tcpdump on a cxgb interface.
  
  r204274:
  There is no need to test __FreeBSD_version for features that have
  been around for a long time now (7.1-ish or even earlier); assume
  they are present.  These includes MSI, TSO, LRO, VLAN, INTR_FILTERS,
  FIRMWARE, etc.
  
  Also, eliminate some dead code and clean up in other places as part
  of this quick once-over.
  
  r204348:
  Support IFCAP_VLANHWTSO in cxgb(4).  It works with or without vlanhwtag.
  While here, remove old DPRINTFs and tidy up the capability code a bit.
  
  r204921:
  Better TwinAx transceiver detection.
  
  Originally submitted by: 
  (This is a rewritten, corrected version of that patch)
  
  r205944:
  Refresh the firmware version immediately after it is upgraded (or downgraded).
  
  r205945:
  Improved PHY EDC settings.
  
  r205946:
  Do not attempt to retrieve interrupt information before it is available.
  
  r205947:
  Fix build with "nooptions INET"
  
  r205948:
  Fix tx drop statistics.
  
  r205949:
  Fix signed/unsigned mix-up that allowed txq->in_use to grow beyond txq->size.
  
  r205950:
  Multiple fixes related to queue set sizing and resources:
  
  - Only the tunnelq (TXQ_ETH) requires a buf_ring, an ifq, and the watchdog/timer
    callouts.  Do not allocate these for the other tx queues.
  
  - Use 16k jumbo clusters only on offload capable cards by default.
  
  - Do not allocate a full tx ring for the offload queue if the card is not
    offload capable.
  
  - Slightly better freelist size calculation.
  
  - Fix nmbjumbo4 typo, remove unneeded global variables.
  
  r206109:
  Increase response queue size to avoid starvation, add a counter
  to track it when it does occur.

Deleted:
  stable/8/sys/dev/cxgb/common/cxgb_version.h
  stable/8/sys/dev/cxgb/cxgb_config.h
Modified:
  stable/8/sys/dev/cxgb/common/cxgb_ael1002.c
  stable/8/sys/dev/cxgb/common/cxgb_common.h
  stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c
  stable/8/sys/dev/cxgb/cxgb_adapter.h
  stable/8/sys/dev/cxgb/cxgb_main.c
  stable/8/sys/dev/cxgb/cxgb_offload.h
  stable/8/sys/dev/cxgb/cxgb_osdep.h
  stable/8/sys/dev/cxgb/cxgb_sge.c
  stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c
  stable/8/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c
  stable/8/sys/modules/cxgb/cxgb/Makefile
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/cxgb/common/cxgb_ael1002.c
==============================================================================
--- stable/8/sys/dev/cxgb/common/cxgb_ael1002.c	Mon Apr  5 22:15:06 2010	(r206219)
+++ stable/8/sys/dev/cxgb/common/cxgb_ael1002.c	Mon Apr  5 23:29:27 2010	(r206220)
@@ -446,7 +446,7 @@ static int ael2xxx_get_module_type(struc
 			return v;
 
 		if (v == 0x1)
-			return phy_modtype_twinax;
+			goto twinax;
 		if (v == 0x10)
 			return phy_modtype_sr;
 		if (v == 0x20)
@@ -454,6 +454,17 @@ static int ael2xxx_get_module_type(struc
 		if (v == 0x40)
 			return phy_modtype_lrm;
 
+		v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 8);
+		if (v < 0)
+			return v;
+		if (v == 4) {
+			v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 60);
+			if (v < 0)
+				return v;
+			if (v & 0x1)
+				goto twinax;
+		}
+
 		v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 6);
 		if (v < 0)
 			return v;
@@ -465,6 +476,7 @@ static int ael2xxx_get_module_type(struc
 			return v;
 
 		if (v & 0x80) {
+twinax:
 			v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0x12);
 			if (v < 0)
 				return v;
@@ -1435,395 +1447,439 @@ static int ael2020_setup_twinax_edc(stru
 		0xd803, 0x40aa,
 		0xd804, 0x401c,
 		0xd805, 0x401e,
-		0xd806, 0x2ff4,
-		0xd807, 0x3dc4,
-		0xd808, 0x2035,
-		0xd809, 0x3035,
-		0xd80a, 0x6524,
-		0xd80b, 0x2cb2,
-		0xd80c, 0x3012,
-		0xd80d, 0x1002,
-		0xd80e, 0x26e2,
-		0xd80f, 0x3022,
-		0xd810, 0x1002,
-		0xd811, 0x27d2,
-		0xd812, 0x3022,
+		0xd806, 0x20c5,
+		0xd807, 0x3c05,
+		0xd808, 0x6536,
+		0xd809, 0x2fe4,
+		0xd80a, 0x3dc4,
+		0xd80b, 0x6624,
+		0xd80c, 0x2ff4,
+		0xd80d, 0x3dc4,
+		0xd80e, 0x2035,
+		0xd80f, 0x30a5,
+		0xd810, 0x6524,
+		0xd811, 0x2ca2,
+		0xd812, 0x3012,
 		0xd813, 0x1002,
-		0xd814, 0x2822,
-		0xd815, 0x3012,
+		0xd814, 0x27e2,
+		0xd815, 0x3022,
 		0xd816, 0x1002,
-		0xd817, 0x2492,
+		0xd817, 0x28d2,
 		0xd818, 0x3022,
 		0xd819, 0x1002,
-		0xd81a, 0x2772,
+		0xd81a, 0x2892,
 		0xd81b, 0x3012,
 		0xd81c, 0x1002,
-		0xd81d, 0x23d2,
+		0xd81d, 0x24e2,
 		0xd81e, 0x3022,
 		0xd81f, 0x1002,
-		0xd820, 0x22cd,
-		0xd821, 0x301d,
-		0xd822, 0x27f2,
-		0xd823, 0x3022,
-		0xd824, 0x1002,
-		0xd825, 0x5553,
-		0xd826, 0x0307,
-		0xd827, 0x2522,
-		0xd828, 0x3022,
-		0xd829, 0x1002,
-		0xd82a, 0x2142,
-		0xd82b, 0x3012,
-		0xd82c, 0x1002,
-		0xd82d, 0x4016,
-		0xd82e, 0x5e63,
-		0xd82f, 0x0344,
-		0xd830, 0x2142,
+		0xd820, 0x27e2,
+		0xd821, 0x3012,
+		0xd822, 0x1002,
+		0xd823, 0x2422,
+		0xd824, 0x3022,
+		0xd825, 0x1002,
+		0xd826, 0x22cd,
+		0xd827, 0x301d,
+		0xd828, 0x28f2,
+		0xd829, 0x3022,
+		0xd82a, 0x1002,
+		0xd82b, 0x5553,
+		0xd82c, 0x0307,
+		0xd82d, 0x2572,
+		0xd82e, 0x3022,
+		0xd82f, 0x1002,
+		0xd830, 0x21a2,
 		0xd831, 0x3012,
 		0xd832, 0x1002,
-		0xd833, 0x400e,
-		0xd834, 0x2522,
-		0xd835, 0x3022,
-		0xd836, 0x1002,
-		0xd837, 0x2b52,
-		0xd838, 0x3012,
-		0xd839, 0x1002,
-		0xd83a, 0x2742,
+		0xd833, 0x4016,
+		0xd834, 0x5e63,
+		0xd835, 0x0344,
+		0xd836, 0x21a2,
+		0xd837, 0x3012,
+		0xd838, 0x1002,
+		0xd839, 0x400e,
+		0xd83a, 0x2572,
 		0xd83b, 0x3022,
 		0xd83c, 0x1002,
-		0xd83d, 0x25e2,
-		0xd83e, 0x3022,
+		0xd83d, 0x2b22,
+		0xd83e, 0x3012,
 		0xd83f, 0x1002,
-		0xd840, 0x2fa4,
-		0xd841, 0x3dc4,
-		0xd842, 0x6624,
-		0xd843, 0x414b,
-		0xd844, 0x56b3,
-		0xd845, 0x03c6,
-		0xd846, 0x866b,
-		0xd847, 0x400c,
-		0xd848, 0x2712,
-		0xd849, 0x3012,
-		0xd84a, 0x1002,
-		0xd84b, 0x2c4b,
-		0xd84c, 0x309b,
-		0xd84d, 0x56b3,
-		0xd84e, 0x03c3,
-		0xd84f, 0x866b,
-		0xd850, 0x400c,
-		0xd851, 0x2272,
-		0xd852, 0x3022,
-		0xd853, 0x1002,
-		0xd854, 0x2742,
-		0xd855, 0x3022,
-		0xd856, 0x1002,
-		0xd857, 0x25e2,
-		0xd858, 0x3022,
-		0xd859, 0x1002,
-		0xd85a, 0x2fb4,
-		0xd85b, 0x3dc4,
-		0xd85c, 0x6624,
-		0xd85d, 0x56b3,
-		0xd85e, 0x03c3,
-		0xd85f, 0x866b,
-		0xd860, 0x401c,
-		0xd861, 0x2c45,
-		0xd862, 0x3095,
-		0xd863, 0x5b53,
-		0xd864, 0x2372,
-		0xd865, 0x3012,
-		0xd866, 0x13c2,
-		0xd867, 0x5cc3,
-		0xd868, 0x2712,
-		0xd869, 0x3012,
-		0xd86a, 0x1312,
-		0xd86b, 0x2b52,
+		0xd840, 0x2842,
+		0xd841, 0x3022,
+		0xd842, 0x1002,
+		0xd843, 0x26e2,
+		0xd844, 0x3022,
+		0xd845, 0x1002,
+		0xd846, 0x2fa4,
+		0xd847, 0x3dc4,
+		0xd848, 0x6624,
+		0xd849, 0x2e8b,
+		0xd84a, 0x303b,
+		0xd84b, 0x56b3,
+		0xd84c, 0x03c6,
+		0xd84d, 0x866b,
+		0xd84e, 0x400c,
+		0xd84f, 0x2782,
+		0xd850, 0x3012,
+		0xd851, 0x1002,
+		0xd852, 0x2c4b,
+		0xd853, 0x309b,
+		0xd854, 0x56b3,
+		0xd855, 0x03c3,
+		0xd856, 0x866b,
+		0xd857, 0x400c,
+		0xd858, 0x22a2,
+		0xd859, 0x3022,
+		0xd85a, 0x1002,
+		0xd85b, 0x2842,
+		0xd85c, 0x3022,
+		0xd85d, 0x1002,
+		0xd85e, 0x26e2,
+		0xd85f, 0x3022,
+		0xd860, 0x1002,
+		0xd861, 0x2fb4,
+		0xd862, 0x3dc4,
+		0xd863, 0x6624,
+		0xd864, 0x56b3,
+		0xd865, 0x03c3,
+		0xd866, 0x866b,
+		0xd867, 0x401c,
+		0xd868, 0x2c45,
+		0xd869, 0x3095,
+		0xd86a, 0x5b53,
+		0xd86b, 0x23d2,
 		0xd86c, 0x3012,
-		0xd86d, 0x1002,
-		0xd86e, 0x2742,
-		0xd86f, 0x3022,
-		0xd870, 0x1002,
-		0xd871, 0x2582,
-		0xd872, 0x3022,
-		0xd873, 0x1002,
-		0xd874, 0x2142,
-		0xd875, 0x3012,
-		0xd876, 0x1002,
-		0xd877, 0x628f,
-		0xd878, 0x2985,
-		0xd879, 0x33a5,
-		0xd87a, 0x25e2,
-		0xd87b, 0x3022,
-		0xd87c, 0x1002,
-		0xd87d, 0x5653,
-		0xd87e, 0x03d2,
-		0xd87f, 0x401e,
-		0xd880, 0x6f72,
-		0xd881, 0x1002,
-		0xd882, 0x628f,
-		0xd883, 0x2304,
-		0xd884, 0x3c84,
-		0xd885, 0x6436,
-		0xd886, 0xdff4,
-		0xd887, 0x6436,
-		0xd888, 0x2ff5,
-		0xd889, 0x3005,
-		0xd88a, 0x8656,
-		0xd88b, 0xdfba,
-		0xd88c, 0x56a3,
-		0xd88d, 0xd05a,
-		0xd88e, 0x2972,
-		0xd88f, 0x3012,
-		0xd890, 0x1392,
-		0xd891, 0xd05a,
-		0xd892, 0x56a3,
-		0xd893, 0xdfba,
-		0xd894, 0x0383,
-		0xd895, 0x6f72,
-		0xd896, 0x1002,
-		0xd897, 0x2b45,
-		0xd898, 0x3005,
-		0xd899, 0x4178,
-		0xd89a, 0x5653,
-		0xd89b, 0x0384,
-		0xd89c, 0x2a62,
-		0xd89d, 0x3012,
-		0xd89e, 0x1002,
-		0xd89f, 0x2f05,
-		0xd8a0, 0x3005,
-		0xd8a1, 0x41c8,
-		0xd8a2, 0x5653,
-		0xd8a3, 0x0382,
-		0xd8a4, 0x0002,
-		0xd8a5, 0x4218,
-		0xd8a6, 0x2474,
-		0xd8a7, 0x3c84,
-		0xd8a8, 0x6437,
-		0xd8a9, 0xdff4,
-		0xd8aa, 0x6437,
-		0xd8ab, 0x2ff5,
-		0xd8ac, 0x3c05,
-		0xd8ad, 0x8757,
-		0xd8ae, 0xb888,
-		0xd8af, 0x9787,
-		0xd8b0, 0xdff4,
-		0xd8b1, 0x6724,
-		0xd8b2, 0x866a,
-		0xd8b3, 0x6f72,
-		0xd8b4, 0x1002,
-		0xd8b5, 0x2641,
-		0xd8b6, 0x3021,
-		0xd8b7, 0x1001,
-		0xd8b8, 0xc620,
-		0xd8b9, 0x0000,
-		0xd8ba, 0xc621,
-		0xd8bb, 0x0000,
-		0xd8bc, 0xc622,
-		0xd8bd, 0x00ce,
-		0xd8be, 0xc623,
-		0xd8bf, 0x007f,
-		0xd8c0, 0xc624,
-		0xd8c1, 0x0032,
-		0xd8c2, 0xc625,
-		0xd8c3, 0x0000,
-		0xd8c4, 0xc627,
-		0xd8c5, 0x0000,
-		0xd8c6, 0xc628,
-		0xd8c7, 0x0000,
-		0xd8c8, 0xc62c,
+		0xd86d, 0x13c2,
+		0xd86e, 0x5cc3,
+		0xd86f, 0x2782,
+		0xd870, 0x3012,
+		0xd871, 0x1312,
+		0xd872, 0x2b22,
+		0xd873, 0x3012,
+		0xd874, 0x1002,
+		0xd875, 0x2842,
+		0xd876, 0x3022,
+		0xd877, 0x1002,
+		0xd878, 0x2622,
+		0xd879, 0x3022,
+		0xd87a, 0x1002,
+		0xd87b, 0x21a2,
+		0xd87c, 0x3012,
+		0xd87d, 0x1002,
+		0xd87e, 0x628f,
+		0xd87f, 0x2985,
+		0xd880, 0x33a5,
+		0xd881, 0x26e2,
+		0xd882, 0x3022,
+		0xd883, 0x1002,
+		0xd884, 0x5653,
+		0xd885, 0x03d2,
+		0xd886, 0x401e,
+		0xd887, 0x6f72,
+		0xd888, 0x1002,
+		0xd889, 0x628f,
+		0xd88a, 0x2304,
+		0xd88b, 0x3c84,
+		0xd88c, 0x6436,
+		0xd88d, 0xdff4,
+		0xd88e, 0x6436,
+		0xd88f, 0x2ff5,
+		0xd890, 0x3005,
+		0xd891, 0x8656,
+		0xd892, 0xdfba,
+		0xd893, 0x56a3,
+		0xd894, 0xd05a,
+		0xd895, 0x29e2,
+		0xd896, 0x3012,
+		0xd897, 0x1392,
+		0xd898, 0xd05a,
+		0xd899, 0x56a3,
+		0xd89a, 0xdfba,
+		0xd89b, 0x0383,
+		0xd89c, 0x6f72,
+		0xd89d, 0x1002,
+		0xd89e, 0x2a64,
+		0xd89f, 0x3014,
+		0xd8a0, 0x2005,
+		0xd8a1, 0x3d75,
+		0xd8a2, 0xc451,
+		0xd8a3, 0x29a2,
+		0xd8a4, 0x3022,
+		0xd8a5, 0x1002,
+		0xd8a6, 0x178c,
+		0xd8a7, 0x1898,
+		0xd8a8, 0x19a4,
+		0xd8a9, 0x1ab0,
+		0xd8aa, 0x1bbc,
+		0xd8ab, 0x1cc8,
+		0xd8ac, 0x1dd3,
+		0xd8ad, 0x1ede,
+		0xd8ae, 0x1fe9,
+		0xd8af, 0x20f4,
+		0xd8b0, 0x21ff,
+		0xd8b1, 0x0000,
+		0xd8b2, 0x2741,
+		0xd8b3, 0x3021,
+		0xd8b4, 0x1001,
+		0xd8b5, 0xc620,
+		0xd8b6, 0x0000,
+		0xd8b7, 0xc621,
+		0xd8b8, 0x0000,
+		0xd8b9, 0xc622,
+		0xd8ba, 0x00e2,
+		0xd8bb, 0xc623,
+		0xd8bc, 0x007f,
+		0xd8bd, 0xc624,
+		0xd8be, 0x00ce,
+		0xd8bf, 0xc625,
+		0xd8c0, 0x0000,
+		0xd8c1, 0xc627,
+		0xd8c2, 0x0000,
+		0xd8c3, 0xc628,
+		0xd8c4, 0x0000,
+		0xd8c5, 0xc90a,
+		0xd8c6, 0x3a7c,
+		0xd8c7, 0xc62c,
+		0xd8c8, 0x0000,
 		0xd8c9, 0x0000,
-		0xd8ca, 0x0000,
-		0xd8cb, 0x2641,
-		0xd8cc, 0x3021,
-		0xd8cd, 0x1001,
-		0xd8ce, 0xc502,
-		0xd8cf, 0x53ac,
-		0xd8d0, 0xc503,
-		0xd8d1, 0x2cd3,
-		0xd8d2, 0xc600,
-		0xd8d3, 0x2a6e,
-		0xd8d4, 0xc601,
-		0xd8d5, 0x2a2c,
-		0xd8d6, 0xc605,
-		0xd8d7, 0x5557,
-		0xd8d8, 0xc60c,
-		0xd8d9, 0x5400,
-		0xd8da, 0xc710,
-		0xd8db, 0x0700,
-		0xd8dc, 0xc711,
-		0xd8dd, 0x0f06,
-		0xd8de, 0xc718,
-		0xd8df, 0x0700,
-		0xd8e0, 0xc719,
-		0xd8e1, 0x0f06,
-		0xd8e2, 0xc720,
-		0xd8e3, 0x4700,
-		0xd8e4, 0xc721,
-		0xd8e5, 0x0f06,
-		0xd8e6, 0xc728,
-		0xd8e7, 0x0700,
-		0xd8e8, 0xc729,
-		0xd8e9, 0x1207,
-		0xd8ea, 0xc801,
-		0xd8eb, 0x7f50,
-		0xd8ec, 0xc802,
-		0xd8ed, 0x7760,
-		0xd8ee, 0xc803,
-		0xd8ef, 0x7fce,
-		0xd8f0, 0xc804,
-		0xd8f1, 0x520e,
-		0xd8f2, 0xc805,
-		0xd8f3, 0x5c11,
-		0xd8f4, 0xc806,
-		0xd8f5, 0x3c51,
-		0xd8f6, 0xc807,
-		0xd8f7, 0x4061,
-		0xd8f8, 0xc808,
-		0xd8f9, 0x49c1,
-		0xd8fa, 0xc809,
-		0xd8fb, 0x3840,
-		0xd8fc, 0xc80a,
-		0xd8fd, 0x0000,
-		0xd8fe, 0xc821,
-		0xd8ff, 0x0002,
-		0xd900, 0xc822,
-		0xd901, 0x0046,
-		0xd902, 0xc844,
-		0xd903, 0x182f,
-		0xd904, 0xc013,
-		0xd905, 0xf341,
-		0xd906, 0xc084,
-		0xd907, 0x0030,
-		0xd908, 0xc904,
-		0xd909, 0x1401,
-		0xd90a, 0xcb0c,
-		0xd90b, 0x0004,
-		0xd90c, 0xcb0e,
-		0xd90d, 0xa00a,
-		0xd90e, 0xcb0f,
-		0xd90f, 0xc0c0,
-		0xd910, 0xcb10,
-		0xd911, 0xc0c0,
-		0xd912, 0xcb11,
-		0xd913, 0x00a0,
-		0xd914, 0xcb12,
-		0xd915, 0x0007,
-		0xd916, 0xc241,
-		0xd917, 0xa000,
-		0xd918, 0xc243,
-		0xd919, 0x7fe0,
-		0xd91a, 0xc604,
-		0xd91b, 0x000e,
-		0xd91c, 0xc609,
-		0xd91d, 0x00f5,
-		0xd91e, 0xc611,
-		0xd91f, 0x000e,
-		0xd920, 0xc660,
-		0xd921, 0x9600,
-		0xd922, 0xc687,
-		0xd923, 0x0004,
-		0xd924, 0xc60a,
-		0xd925, 0x04f5,
-		0xd926, 0x0000,
-		0xd927, 0x2641,
-		0xd928, 0x3021,
-		0xd929, 0x1001,
-		0xd92a, 0xc620,
-		0xd92b, 0x14e5,
-		0xd92c, 0xc621,
-		0xd92d, 0xc53d,
-		0xd92e, 0xc622,
-		0xd92f, 0x3cbe,
-		0xd930, 0xc623,
-		0xd931, 0x4452,
-		0xd932, 0xc624,
-		0xd933, 0xc5c5,
-		0xd934, 0xc625,
-		0xd935, 0xe01e,
-		0xd936, 0xc627,
-		0xd937, 0x0000,
-		0xd938, 0xc628,
-		0xd939, 0x0000,
-		0xd93a, 0xc62c,
-		0xd93b, 0x0000,
+		0xd8ca, 0x2741,
+		0xd8cb, 0x3021,
+		0xd8cc, 0x1001,
+		0xd8cd, 0xc502,
+		0xd8ce, 0x53ac,
+		0xd8cf, 0xc503,
+		0xd8d0, 0x2cd3,
+		0xd8d1, 0xc600,
+		0xd8d2, 0x2a6e,
+		0xd8d3, 0xc601,
+		0xd8d4, 0x2a2c,
+		0xd8d5, 0xc605,
+		0xd8d6, 0x5557,
+		0xd8d7, 0xc60c,
+		0xd8d8, 0x5400,
+		0xd8d9, 0xc710,
+		0xd8da, 0x0700,
+		0xd8db, 0xc711,
+		0xd8dc, 0x0f06,
+		0xd8dd, 0xc718,
+		0xd8de, 0x700,
+		0xd8df, 0xc719,
+		0xd8e0, 0x0f06,
+		0xd8e1, 0xc720,
+		0xd8e2, 0x4700,
+		0xd8e3, 0xc721,
+		0xd8e4, 0x0f06,
+		0xd8e5, 0xc728,
+		0xd8e6, 0x0700,
+		0xd8e7, 0xc729,
+		0xd8e8, 0x1207,
+		0xd8e9, 0xc801,
+		0xd8ea, 0x7f50,
+		0xd8eb, 0xc802,
+		0xd8ec, 0x7760,
+		0xd8ed, 0xc803,
+		0xd8ee, 0x7fce,
+		0xd8ef, 0xc804,
+		0xd8f0, 0x520e,
+		0xd8f1, 0xc805,
+		0xd8f2, 0x5c11,
+		0xd8f3, 0xc806,
+		0xd8f4, 0x3c51,
+		0xd8f5, 0xc807,
+		0xd8f6, 0x4061,
+		0xd8f7, 0xc808,
+		0xd8f8, 0x49c1,
+		0xd8f9, 0xc809,
+		0xd8fa, 0x3840,
+		0xd8fb, 0xc80a,
+		0xd8fc, 0x0000,
+		0xd8fd, 0xc821,
+		0xd8fe, 0x0002,
+		0xd8ff, 0xc822,
+		0xd900, 0x0046,
+		0xd901, 0xc844,
+		0xd902, 0x182f,
+		0xd903, 0xc849,
+		0xd904, 0x0400,
+		0xd905, 0xc84a,
+		0xd906, 0x0002,
+		0xd907, 0xc013,
+		0xd908, 0xf341,
+		0xd909, 0xc084,
+		0xd90a, 0x0030,
+		0xd90b, 0xc904,
+		0xd90c, 0x1401,
+		0xd90d, 0xcb0c,
+		0xd90e, 0x0004,
+		0xd90f, 0xcb0e,
+		0xd910, 0xa00a,
+		0xd911, 0xcb0f,
+		0xd912, 0xc0c0,
+		0xd913, 0xcb10,
+		0xd914, 0xc0c0,
+		0xd915, 0xcb11,
+		0xd916, 0x00a0,
+		0xd917, 0xcb12,
+		0xd918, 0x0007,
+		0xd919, 0xc241,
+		0xd91a, 0xa000,
+		0xd91b, 0xc243,
+		0xd91c, 0x7fe0,
+		0xd91d, 0xc604,
+		0xd91e, 0x000e,
+		0xd91f, 0xc609,
+		0xd920, 0x00f5,
+		0xd921, 0xc611,
+		0xd922, 0x000e,
+		0xd923, 0xc660,
+		0xd924, 0x9600,
+		0xd925, 0xc687,
+		0xd926, 0x0004,
+		0xd927, 0xc60a,
+		0xd928, 0x04f5,
+		0xd929, 0x0000,
+		0xd92a, 0x2741,
+		0xd92b, 0x3021,
+		0xd92c, 0x1001,
+		0xd92d, 0xc620,
+		0xd92e, 0x14e5,
+		0xd92f, 0xc621,
+		0xd930, 0xc53d,
+		0xd931, 0xc622,
+		0xd932, 0x3cbe,
+		0xd933, 0xc623,
+		0xd934, 0x4452,
+		0xd935, 0xc624,
+		0xd936, 0xc5c5,
+		0xd937, 0xc625,
+		0xd938, 0xe01e,
+		0xd939, 0xc627,
+		0xd93a, 0x0000,
+		0xd93b, 0xc628,
 		0xd93c, 0x0000,
-		0xd93d, 0x2b84,
-		0xd93e, 0x3c74,
-		0xd93f, 0x6435,
-		0xd940, 0xdff4,
-		0xd941, 0x6435,
-		0xd942, 0x2806,
-		0xd943, 0x3006,
-		0xd944, 0x8565,
-		0xd945, 0x2b24,
-		0xd946, 0x3c24,
-		0xd947, 0x6436,
-		0xd948, 0x1002,
-		0xd949, 0x2b24,
-		0xd94a, 0x3c24,
-		0xd94b, 0x6436,
-		0xd94c, 0x4045,
-		0xd94d, 0x8656,
-		0xd94e, 0x5663,
-		0xd94f, 0x0302,
-		0xd950, 0x401e,
-		0xd951, 0x1002,
-		0xd952, 0x2807,
-		0xd953, 0x31a7,
-		0xd954, 0x20c4,
-		0xd955, 0x3c24,
-		0xd956, 0x6724,
-		0xd957, 0x1002,
-		0xd958, 0x2807,
-		0xd959, 0x3187,
-		0xd95a, 0x20c4,
-		0xd95b, 0x3c24,
-		0xd95c, 0x6724,
-		0xd95d, 0x1002,
-		0xd95e, 0x24f4,
-		0xd95f, 0x3c64,
-		0xd960, 0x6436,
-		0xd961, 0xdff4,
-		0xd962, 0x6436,
-		0xd963, 0x1002,
-		0xd964, 0x2006,
-		0xd965, 0x3d76,
-		0xd966, 0xc161,
-		0xd967, 0x6134,
-		0xd968, 0x6135,
-		0xd969, 0x5443,
-		0xd96a, 0x0303,
-		0xd96b, 0x6524,
-		0xd96c, 0x00fb,
+		0xd93d, 0xc62c,
+		0xd93e, 0x0000,
+		0xd93f, 0xc90a,
+		0xd940, 0x3a7c,
+		0xd941, 0x0000,
+		0xd942, 0x2b84,
+		0xd943, 0x3c74,
+		0xd944, 0x6435,
+		0xd945, 0xdff4,
+		0xd946, 0x6435,
+		0xd947, 0x2806,
+		0xd948, 0x3006,
+		0xd949, 0x8565,
+		0xd94a, 0x2b24,
+		0xd94b, 0x3c24,
+		0xd94c, 0x6436,
+		0xd94d, 0x1002,
+		0xd94e, 0x2b24,
+		0xd94f, 0x3c24,
+		0xd950, 0x6436,
+		0xd951, 0x4045,
+		0xd952, 0x8656,
+		0xd953, 0x5663,
+		0xd954, 0x0302,
+		0xd955, 0x401e,
+		0xd956, 0x1002,
+		0xd957, 0x2807,
+		0xd958, 0x31a7,
+		0xd959, 0x20c4,
+		0xd95a, 0x3c24,
+		0xd95b, 0x6724,
+		0xd95c, 0x2ff7,
+		0xd95d, 0x30f7,
+		0xd95e, 0x20c4,
+		0xd95f, 0x3c04,
+		0xd960, 0x6724,
+		0xd961, 0x1002,
+		0xd962, 0x2807,
+		0xd963, 0x3187,
+		0xd964, 0x20c4,
+		0xd965, 0x3c24,
+		0xd966, 0x6724,
+		0xd967, 0x2fe4,
+		0xd968, 0x3dc4,
+		0xd969, 0x6437,
+		0xd96a, 0x20c4,
+		0xd96b, 0x3c04,
+		0xd96c, 0x6724,
 		0xd96d, 0x1002,
-		0xd96e, 0x20d4,
-		0xd96f, 0x3c24,
-		0xd970, 0x2025,
-		0xd971, 0x3005,
-		0xd972, 0x6524,
+		0xd96e, 0x24f4,
+		0xd96f, 0x3c64,
+		0xd970, 0x6436,
+		0xd971, 0xdff4,
+		0xd972, 0x6436,
 		0xd973, 0x1002,
-		0xd974, 0xd019,
-		0xd975, 0x2104,
-		0xd976, 0x3c24,
-		0xd977, 0x2105,
-		0xd978, 0x3805,
-		0xd979, 0x6524,
-		0xd97a, 0xdff4,
-		0xd97b, 0x4005,
-		0xd97c, 0x6524,
-		0xd97d, 0x2e8d,
-		0xd97e, 0x303d,
-		0xd97f, 0x2408,
-		0xd980, 0x35d8,
-		0xd981, 0x5dd3,
-		0xd982, 0x0307,
-		0xd983, 0x8887,
-		0xd984, 0x63a7,
-		0xd985, 0x8887,
-		0xd986, 0x63a7,
-		0xd987, 0xdffd,
-		0xd988, 0x00f9,
-		0xd989, 0x1002,
-		0xd98a, 0x0000,
+		0xd974, 0x2006,
+		0xd975, 0x3d76,
+		0xd976, 0xc161,
+		0xd977, 0x6134,
+		0xd978, 0x6135,
+		0xd979, 0x5443,
+		0xd97a, 0x0303,
+		0xd97b, 0x6524,
+		0xd97c, 0x00fb,
+		0xd97d, 0x1002,
+		0xd97e, 0x20d4,
+		0xd97f, 0x3c24,
+		0xd980, 0x2025,
+		0xd981, 0x3005,
+		0xd982, 0x6524,
+		0xd983, 0x1002,
+		0xd984, 0xd019,
+		0xd985, 0x2104,
+		0xd986, 0x3c24,
+		0xd987, 0x2105,
+		0xd988, 0x3805,
+		0xd989, 0x6524,
+		0xd98a, 0xdff4,
+		0xd98b, 0x4005,
+		0xd98c, 0x6524,
+		0xd98d, 0x2e8d,
+		0xd98e, 0x303d,
+		0xd98f, 0x2408,
+		0xd990, 0x35d8,
+		0xd991, 0x5dd3,
+		0xd992, 0x0307,
+		0xd993, 0x8887,
+		0xd994, 0x63a7,
+		0xd995, 0x8887,
+		0xd996, 0x63a7,
+		0xd997, 0xdffd,
+		0xd998, 0x00f9,
+		0xd999, 0x1002,
+		0xd99a, 0x866a,
+		0xd99b, 0x6138,
+		0xd99c, 0x5883,
+		0xd99d, 0x2aa2,
+		0xd99e, 0x3022,
+		0xd99f, 0x1302,
+		0xd9a0, 0x2ff7,
+		0xd9a1, 0x3007,
+		0xd9a2, 0x8785,
+		0xd9a3, 0xb887,
+		0xd9a4, 0x8786,
+		0xd9a5, 0xb8c6,
+		0xd9a6, 0x5a53,
+		0xd9a7, 0x29b2,
+		0xd9a8, 0x3022,
+		0xd9a9, 0x13c2,
+		0xd9aa, 0x2474,
+		0xd9ab, 0x3c84,
+		0xd9ac, 0x64d7,
+		0xd9ad, 0x64d7,
+		0xd9ae, 0x2ff5,
+		0xd9af, 0x3c05,
+		0xd9b0, 0x8757,
+		0xd9b1, 0xb886,
+		0xd9b2, 0x9767,
+		0xd9b3, 0x67c4,
+		0xd9b4, 0x6f72,
+		0xd9b5, 0x1002,
+		0xd9b6, 0x0000,
 	};
 	int i, err;
 
@@ -1944,10 +2000,14 @@ static struct reg_val ael2020_reset_regs
 
 	{ MDIO_DEV_PMA_PMD, 0xcd40, 0xffff, 0x0001 },
 
+	{ MDIO_DEV_PMA_PMD, 0xca12, 0xffff, 0x0100 },
+	{ MDIO_DEV_PMA_PMD, 0xca22, 0xffff, 0x0100 },
+	{ MDIO_DEV_PMA_PMD, 0xca42, 0xffff, 0x0100 },
 	{ MDIO_DEV_PMA_PMD, 0xff02, 0xffff, 0x0023 },
 	{ MDIO_DEV_PMA_PMD, 0xff03, 0xffff, 0x0000 },
 	{ MDIO_DEV_PMA_PMD, 0xff04, 0xffff, 0x0000 },
 
+	{ MDIO_DEV_PMA_PMD, 0xc20d, 0xffff, 0x0002 },
 	/* end */
 	{ 0, 0, 0, 0 }
 };
@@ -1975,6 +2035,7 @@ static int ael2020_reset(struct cphy *ph
 	err = set_phy_regs(phy, ael2020_reset_regs);
 	if (err)
 		return err;
+	msleep(100);
 
 	/* determine module type and perform appropriate initialization */
 	err = ael2020_get_module_type(phy, 0);
@@ -2079,6 +2140,8 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, 
 	err = set_phy_regs(phy, ael2020_reset_regs);
 	if (err)
 		return err;
+	msleep(100);
+
 	err = ael2020_get_module_type(phy, 0);
 	if (err >= 0)
 		phy->modtype = err;

Modified: stable/8/sys/dev/cxgb/common/cxgb_common.h
==============================================================================
--- stable/8/sys/dev/cxgb/common/cxgb_common.h	Mon Apr  5 22:15:06 2010	(r206219)
+++ stable/8/sys/dev/cxgb/common/cxgb_common.h	Mon Apr  5 23:29:27 2010	(r206220)
@@ -314,6 +314,7 @@ struct qset_params {                   /
 	unsigned int rspq_size;        /* # of entries in response queue */
 	unsigned int fl_size;          /* # of entries in regular free list */
 	unsigned int jumbo_size;       /* # of entries in jumbo free list */
+	unsigned int jumbo_buf_size;   /* buffer size of jumbo entry */
 	unsigned int txq_size[SGE_TXQ_PER_SET];  /* Tx queue sizes */
 	unsigned int cong_thres;       /* FL congestion threshold */
 	unsigned int vector;           /* Interrupt (line or vector) number */
@@ -392,11 +393,9 @@ struct adapter_params {
 
 	const struct adapter_info *info;
 
-#ifdef CONFIG_CHELSIO_T3_CORE
 	unsigned short mtus[NMTUS];
 	unsigned short a_wnd[NCCTRL_WIN];
 	unsigned short b_wnd[NCCTRL_WIN];
-#endif
 	unsigned int   nports;              /* # of ethernet ports */
 	unsigned int   chan_map;            /* bitmap of in-use Tx channels */
 	unsigned int   stats_update_period; /* MAC stats accumulation period */
@@ -650,11 +649,7 @@ static inline int is_10G(const adapter_t
 
 static inline int is_offload(const adapter_t *adap)
 {
-#if defined(CONFIG_CHELSIO_T3_CORE)
 	return adap->params.offload;
-#else
-	return 0;
-#endif
 }
 
 static inline unsigned int core_ticks_per_usec(const adapter_t *adap)
@@ -772,7 +767,6 @@ void t3_mc5_intr_handler(struct mc5 *mc5
 int t3_read_mc5_range(const struct mc5 *mc5, unsigned int start, unsigned int n,
 		      u32 *buf);
 
-#ifdef CONFIG_CHELSIO_T3_CORE
 int t3_tp_set_coalescing_size(adapter_t *adap, unsigned int size, int psh);
 void t3_tp_set_max_rxsize(adapter_t *adap, unsigned int size);
 void t3_tp_get_mib_stats(adapter_t *adap, struct tp_mib_stats *tps);
@@ -793,7 +787,6 @@ void t3_get_tx_sched(adapter_t *adap, un
 void t3_read_pace_tbl(adapter_t *adap, unsigned int pace_vals[NTX_SCHED]);
 void t3_set_pace_tbl(adapter_t *adap, unsigned int *pace_vals,
 		     unsigned int start, unsigned int n);
-#endif
 
 int t3_get_up_la(adapter_t *adapter, u32 *stopped, u32 *index,
 		 u32 *size, void *data);

Modified: stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c
==============================================================================
--- stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c	Mon Apr  5 22:15:06 2010	(r206219)
+++ stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c	Mon Apr  5 23:29:27 2010	(r206220)
@@ -3263,7 +3263,6 @@ static void tp_set_timers(adapter_t *ada
 #undef SECONDS
 }
 
-#ifdef CONFIG_CHELSIO_T3_CORE
 /**
  *	t3_tp_set_coalescing_size - set receive coalescing size
  *	@adap: the adapter
@@ -3566,7 +3565,6 @@ int t3_set_proto_sram(adapter_t *adap, c
 	}
 	return 0;
 }
-#endif
 
 /**
  *	t3_config_trace_filter - configure one of the tracing filters
@@ -4150,14 +4148,12 @@ int t3_init_hw(adapter_t *adapter, u32 f
 	if (tp_init(adapter, &adapter->params.tp))
 		goto out_err;
 
-#ifdef CONFIG_CHELSIO_T3_CORE
 	t3_tp_set_coalescing_size(adapter,
 				  min(adapter->params.sge.max_pkt_size,
 				      MAX_RX_COALESCING_LEN), 1);
 	t3_tp_set_max_rxsize(adapter,
 			     min(adapter->params.sge.max_pkt_size, 16384U));
 	ulp_config(adapter, &adapter->params.tp);
-#endif
 	if (is_pcie(adapter))
 		config_pcie(adapter);
 	else
@@ -4471,8 +4467,6 @@ int __devinit t3_prep_adapter(adapter_t 
 	if (reset && t3_reset_adapter(adapter))
 		return -1;
 
-	t3_sge_prep(adapter, &adapter->params.sge);
-
 	if (adapter->params.vpd.mclk) {
 		struct tp_params *p = &adapter->params.tp;
 
@@ -4501,6 +4495,8 @@ int __devinit t3_prep_adapter(adapter_t 
 				  t3_mc7_size(&adapter->pmtx) &&
 				  t3_mc7_size(&adapter->cm);
 
+	t3_sge_prep(adapter, &adapter->params.sge);
+
 	if (is_offload(adapter)) {
 		adapter->params.mc5.nservers = DEFAULT_NSERVERS;
 		/* PR 6487. TOE and filtering are mutually exclusive */
@@ -4508,10 +4504,8 @@ int __devinit t3_prep_adapter(adapter_t 
 		adapter->params.mc5.nroutes = 0;
 		t3_mc5_prep(adapter, &adapter->mc5, MC5_MODE_144_BIT);
 
-#ifdef CONFIG_CHELSIO_T3_CORE
 		init_mtus(adapter->params.mtus);
 		init_cong_ctrl(adapter->params.a_wnd, adapter->params.b_wnd);
-#endif
 	}
 
 	early_hw_init(adapter, ai);

Modified: stable/8/sys/dev/cxgb/cxgb_adapter.h
==============================================================================
--- stable/8/sys/dev/cxgb/cxgb_adapter.h	Mon Apr  5 22:15:06 2010	(r206219)
+++ stable/8/sys/dev/cxgb/cxgb_adapter.h	Mon Apr  5 23:29:27 2010	(r206220)
@@ -46,6 +46,7 @@ $FreeBSD$
 #include 
 #include 
 #include 
+#include 
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Mon Apr  5 23:43:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4E274106564A;
	Mon,  5 Apr 2010 23:43:24 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B6BD8FC0C;
	Mon,  5 Apr 2010 23:43:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35NhONu079942;
	Mon, 5 Apr 2010 23:43:24 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35NhO8B079938;
	Mon, 5 Apr 2010 23:43:24 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201004052343.o35NhO8B079938@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 5 Apr 2010 23:43:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206221 - stable/8/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 23:43:24 -0000

Author: edwin
Date: Mon Apr  5 23:43:23 2010
New Revision: 206221
URL: http://svn.freebsd.org/changeset/base/206221

Log:
  MFC of tzdata2010h:
  
  From tzdata2010h:
  
  - Tunis will not go into DST this year.
  - Pakistan will not go into DST this year.
  
  From tzdata2010g:
  
  - Bangladesh cancels DST.
  - Palestine goes into DST one day later than expected.
  
  - Russian timezones update:
    Europe/Samara goes to Moscow time.
    Asia/Kamchatka goes to Moscow+8 time.
    Asia/Anadyr goes to Moscow+8 time.

Modified:
  stable/8/share/zoneinfo/asia
  stable/8/share/zoneinfo/europe
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/asia
==============================================================================
--- stable/8/share/zoneinfo/asia	Mon Apr  5 23:29:27 2010	(r206220)
+++ stable/8/share/zoneinfo/asia	Mon Apr  5 23:43:23 2010	(r206221)
@@ -1,4 +1,4 @@
-# @(#)asia	8.56
+# @(#)asia	8.58
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -214,42 +214,20 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # 2010 midnight. The decision came at a cabinet meeting at the Prime
 # Minister's Office last night..."
 
-# From Danvin Ruangchan (2009-12-24):
-# ...the news mentions DST will be turned off again 7 months after March
-# 31st on Oct 31, 2010.
-
-# From Arthur David Olson (2009-12-26):
-# Indeed, "The government will advance again the Banglasdesh Standard
-# Time by one one hour on March 31 next year by enforcing the Daylight
-# Saving Time (DST) for seven months. It will continue till October 31
-# until further notice." I take that last sentence as the
-# establishment of a rule.
-
-# From Nobutomo Nakano (2010-02-19):
-# We received a report from Bangladesh saying that the start/end of
-# Bangladesh DST is incorrect. Currently we have only the Bengali version
-# of the official mail from BTRC which describes the following:
-#
-# "From 2010 each year when local standard time is about to reach
-# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM)
-# and when local daylight time is about to October 31 at 11:59:00 PM
-# clocks are turned backward 1 hour (10:59:00 PM)."
-#
-# So, DST will start/end 1 minute earlier.
-
-# From Arthur David Olson (2010-03-03):
-# The file
-# 
-# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf
+# From Alexander Krivenyshev (2010-03-22):
+# According to Bangladesh newspaper "The Daily Star,"
+# Cabinet cancels Daylight Saving Time 
+# 
+# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html
 # 
-# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59"
-# which is consistent with the information provided by Nobutomo Nakano.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Dhaka	2009	only	-	Jun	19	23:00	1:00	S
 Rule	Dhaka	2009	only	-	Dec	31	23:59	0	-
-Rule	Dhaka	2010	max	-	Mar	31	22:59	1:00	S
-Rule	Dhaka	2010	max	-	Oct	31	23:59	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
@@ -2129,6 +2107,32 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html
 # 
 
+# From Alexander Krivenyshev (2010-03-19):
+# According to Voice of Palestine DST will last for 191 days, from March
+# 26, 2010 till "the last Sunday before the tenth day of Tishri
+# (October), each year" (October 03, 2010?)
+#
+# 
+# http://palvoice.org/forums/showthread.php?t=245697
+# 
+# (in Arabic)
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html
+# 
+
+# From Steffen Thorsen (2010-03-24):
+# ...Ma'an News Agency reports that Hamas cabinet has decided it will
+# start one day later, at 12:01am. Not sure if they really mean 12:01am or
+# noon though:
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178
+# 
+# (Ma'an News Agency)
+# "At 12:01am Friday, clocks in Israel and the West Bank will change to
+# 1:01am, while Gaza clocks will change at 12:01am Saturday morning."
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -2146,7 +2150,8 @@ Rule Palestine	2006	2008	-	Apr	 1	0:00	1
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
 Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
-Rule Palestine	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Mon Apr  5 23:29:27 2010	(r206220)
+++ stable/8/share/zoneinfo/europe	Mon Apr  5 23:43:23 2010	(r206221)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.25
+# @(#)europe	8.26
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2041,7 +2041,9 @@ Zone Europe/Samara	 3:20:36 -	LMT	1919 J
 			 3:00	Russia	KUY%sT	1991 Mar 31 2:00s
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
-			 4:00	Russia	SAM%sT	# Samara Time
+			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
+			 3:00	Russia	SAM%sT
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Bashkortostan, Komi-Permyatskij avtonomnyj okrug,
@@ -2194,7 +2196,8 @@ Zone Asia/Kamchatka	10:34:36 -	LMT	1922 
 			11:00	-	PETT	1930 Jun 21 # P-K Time
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
-			12:00	Russia	PET%sT
+			12:00	Russia	PET%sT	2010 Mar 28 2:00s
+			11:00	Russia	PET%sT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2202,7 +2205,8 @@ Zone Asia/Anadyr	11:49:56 -	LMT	1924 May
 			13:00	Russia	ANA%sT	1982 Apr  1 0:00s
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
-			12:00	Russia	ANA%sT
+			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
+			11:00	Russia	ANA%sT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Mon Apr  5 23:29:27 2010	(r206220)
+++ stable/8/share/zoneinfo/zone.tab	Mon Apr  5 23:43:23 2010	(r206221)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.34
+# @(#)zone.tab	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,7 +330,7 @@ RS	+4450+02030	Europe/Belgrade
 RU	+5443+02030	Europe/Kaliningrad	Moscow-01 - Kaliningrad
 RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
 RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
-RU	+5312+05009	Europe/Samara	Moscow+01 - Samara, Udmurtia
+RU	+5312+05009	Europe/Samara	Moscow - Samara, Udmurtia
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
@@ -341,8 +341,8 @@ RU	+6200+12940	Asia/Yakutsk	Moscow+06 - 
 RU	+4310+13156	Asia/Vladivostok	Moscow+07 - Amur River
 RU	+4658+14242	Asia/Sakhalin	Moscow+07 - Sakhalin Island
 RU	+5934+15048	Asia/Magadan	Moscow+08 - Magadan
-RU	+5301+15839	Asia/Kamchatka	Moscow+09 - Kamchatka
-RU	+6445+17729	Asia/Anadyr	Moscow+10 - Bering Sea
+RU	+5301+15839	Asia/Kamchatka	Moscow+08 - Kamchatka
+RU	+6445+17729	Asia/Anadyr	Moscow+08 - Bering Sea
 RW	-0157+03004	Africa/Kigali
 SA	+2438+04643	Asia/Riyadh
 SB	-0932+16012	Pacific/Guadalcanal

From owner-svn-src-all@FreeBSD.ORG  Mon Apr  5 23:44:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 679F51065672;
	Mon,  5 Apr 2010 23:44:39 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 54D658FC0C;
	Mon,  5 Apr 2010 23:44:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35NidBa080310;
	Mon, 5 Apr 2010 23:44:39 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35Nido9080306;
	Mon, 5 Apr 2010 23:44:39 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201004052344.o35Nido9080306@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 5 Apr 2010 23:44:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206222 - stable/7/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 23:44:39 -0000

Author: edwin
Date: Mon Apr  5 23:44:39 2010
New Revision: 206222
URL: http://svn.freebsd.org/changeset/base/206222

Log:
  MFC of tzdata2010h:
  
  From tzdata2010h:
  
  - Tunis will not go into DST this year.
  - Pakistan will not go into DST this year.
  
  From tzdata2010g:
  
  - Bangladesh cancels DST.
  - Palestine goes into DST one day later than expected.
  
  - Russian timezones update:
    Europe/Samara goes to Moscow time.
    Asia/Kamchatka goes to Moscow+8 time.
    Asia/Anadyr goes to Moscow+8 time.

Modified:
  stable/7/share/zoneinfo/asia
  stable/7/share/zoneinfo/europe
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Mon Apr  5 23:43:23 2010	(r206221)
+++ stable/7/share/zoneinfo/asia	Mon Apr  5 23:44:39 2010	(r206222)
@@ -1,4 +1,4 @@
-# @(#)asia	8.56
+# @(#)asia	8.58
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -214,42 +214,20 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # 2010 midnight. The decision came at a cabinet meeting at the Prime
 # Minister's Office last night..."
 
-# From Danvin Ruangchan (2009-12-24):
-# ...the news mentions DST will be turned off again 7 months after March
-# 31st on Oct 31, 2010.
-
-# From Arthur David Olson (2009-12-26):
-# Indeed, "The government will advance again the Banglasdesh Standard
-# Time by one one hour on March 31 next year by enforcing the Daylight
-# Saving Time (DST) for seven months. It will continue till October 31
-# until further notice." I take that last sentence as the
-# establishment of a rule.
-
-# From Nobutomo Nakano (2010-02-19):
-# We received a report from Bangladesh saying that the start/end of
-# Bangladesh DST is incorrect. Currently we have only the Bengali version
-# of the official mail from BTRC which describes the following:
-#
-# "From 2010 each year when local standard time is about to reach
-# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM)
-# and when local daylight time is about to October 31 at 11:59:00 PM
-# clocks are turned backward 1 hour (10:59:00 PM)."
-#
-# So, DST will start/end 1 minute earlier.
-
-# From Arthur David Olson (2010-03-03):
-# The file
-# 
-# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf
+# From Alexander Krivenyshev (2010-03-22):
+# According to Bangladesh newspaper "The Daily Star,"
+# Cabinet cancels Daylight Saving Time 
+# 
+# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html
 # 
-# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59"
-# which is consistent with the information provided by Nobutomo Nakano.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Dhaka	2009	only	-	Jun	19	23:00	1:00	S
 Rule	Dhaka	2009	only	-	Dec	31	23:59	0	-
-Rule	Dhaka	2010	max	-	Mar	31	22:59	1:00	S
-Rule	Dhaka	2010	max	-	Oct	31	23:59	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
@@ -2129,6 +2107,32 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html
 # 
 
+# From Alexander Krivenyshev (2010-03-19):
+# According to Voice of Palestine DST will last for 191 days, from March
+# 26, 2010 till "the last Sunday before the tenth day of Tishri
+# (October), each year" (October 03, 2010?)
+#
+# 
+# http://palvoice.org/forums/showthread.php?t=245697
+# 
+# (in Arabic)
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html
+# 
+
+# From Steffen Thorsen (2010-03-24):
+# ...Ma'an News Agency reports that Hamas cabinet has decided it will
+# start one day later, at 12:01am. Not sure if they really mean 12:01am or
+# noon though:
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178
+# 
+# (Ma'an News Agency)
+# "At 12:01am Friday, clocks in Israel and the West Bank will change to
+# 1:01am, while Gaza clocks will change at 12:01am Saturday morning."
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -2146,7 +2150,8 @@ Rule Palestine	2006	2008	-	Apr	 1	0:00	1
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
 Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
-Rule Palestine	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Mon Apr  5 23:43:23 2010	(r206221)
+++ stable/7/share/zoneinfo/europe	Mon Apr  5 23:44:39 2010	(r206222)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.25
+# @(#)europe	8.26
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2041,7 +2041,9 @@ Zone Europe/Samara	 3:20:36 -	LMT	1919 J
 			 3:00	Russia	KUY%sT	1991 Mar 31 2:00s
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
-			 4:00	Russia	SAM%sT	# Samara Time
+			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
+			 3:00	Russia	SAM%sT
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Bashkortostan, Komi-Permyatskij avtonomnyj okrug,
@@ -2194,7 +2196,8 @@ Zone Asia/Kamchatka	10:34:36 -	LMT	1922 
 			11:00	-	PETT	1930 Jun 21 # P-K Time
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
-			12:00	Russia	PET%sT
+			12:00	Russia	PET%sT	2010 Mar 28 2:00s
+			11:00	Russia	PET%sT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2202,7 +2205,8 @@ Zone Asia/Anadyr	11:49:56 -	LMT	1924 May
 			13:00	Russia	ANA%sT	1982 Apr  1 0:00s
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
-			12:00	Russia	ANA%sT
+			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
+			11:00	Russia	ANA%sT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Mon Apr  5 23:43:23 2010	(r206221)
+++ stable/7/share/zoneinfo/zone.tab	Mon Apr  5 23:44:39 2010	(r206222)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.34
+# @(#)zone.tab	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,7 +330,7 @@ RS	+4450+02030	Europe/Belgrade
 RU	+5443+02030	Europe/Kaliningrad	Moscow-01 - Kaliningrad
 RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
 RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
-RU	+5312+05009	Europe/Samara	Moscow+01 - Samara, Udmurtia
+RU	+5312+05009	Europe/Samara	Moscow - Samara, Udmurtia
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
@@ -341,8 +341,8 @@ RU	+6200+12940	Asia/Yakutsk	Moscow+06 - 
 RU	+4310+13156	Asia/Vladivostok	Moscow+07 - Amur River
 RU	+4658+14242	Asia/Sakhalin	Moscow+07 - Sakhalin Island
 RU	+5934+15048	Asia/Magadan	Moscow+08 - Magadan
-RU	+5301+15839	Asia/Kamchatka	Moscow+09 - Kamchatka
-RU	+6445+17729	Asia/Anadyr	Moscow+10 - Bering Sea
+RU	+5301+15839	Asia/Kamchatka	Moscow+08 - Kamchatka
+RU	+6445+17729	Asia/Anadyr	Moscow+08 - Bering Sea
 RW	-0157+03004	Africa/Kigali
 SA	+2438+04643	Asia/Riyadh
 SB	-0932+16012	Pacific/Guadalcanal

From owner-svn-src-all@FreeBSD.ORG  Mon Apr  5 23:45:25 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9671E106566C;
	Mon,  5 Apr 2010 23:45:25 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 83B918FC19;
	Mon,  5 Apr 2010 23:45:25 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35NjPKa080533;
	Mon, 5 Apr 2010 23:45:25 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35NjPw6080529;
	Mon, 5 Apr 2010 23:45:25 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201004052345.o35NjPw6080529@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 5 Apr 2010 23:45:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206223 - stable/6/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 23:45:25 -0000

Author: edwin
Date: Mon Apr  5 23:45:25 2010
New Revision: 206223
URL: http://svn.freebsd.org/changeset/base/206223

Log:
  MFV of tzdata2010h:
  
  From tzdata2010h:
  
  - Tunis will not go into DST this year.
  - Pakistan will not go into DST this year.
  
  From tzdata2010g:
  
  - Bangladesh cancels DST.
  - Palestine goes into DST one day later than expected.
  
  - Russian timezones update:
    Europe/Samara goes to Moscow time.
    Asia/Kamchatka goes to Moscow+8 time.
    Asia/Anadyr goes to Moscow+8 time.

Modified:
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/zone.tab
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Mon Apr  5 23:44:39 2010	(r206222)
+++ stable/6/share/zoneinfo/asia	Mon Apr  5 23:45:25 2010	(r206223)
@@ -1,4 +1,4 @@
-# @(#)asia	8.56
+# @(#)asia	8.58
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -214,42 +214,20 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # 2010 midnight. The decision came at a cabinet meeting at the Prime
 # Minister's Office last night..."
 
-# From Danvin Ruangchan (2009-12-24):
-# ...the news mentions DST will be turned off again 7 months after March
-# 31st on Oct 31, 2010.
-
-# From Arthur David Olson (2009-12-26):
-# Indeed, "The government will advance again the Banglasdesh Standard
-# Time by one one hour on March 31 next year by enforcing the Daylight
-# Saving Time (DST) for seven months. It will continue till October 31
-# until further notice." I take that last sentence as the
-# establishment of a rule.
-
-# From Nobutomo Nakano (2010-02-19):
-# We received a report from Bangladesh saying that the start/end of
-# Bangladesh DST is incorrect. Currently we have only the Bengali version
-# of the official mail from BTRC which describes the following:
-#
-# "From 2010 each year when local standard time is about to reach
-# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM)
-# and when local daylight time is about to October 31 at 11:59:00 PM
-# clocks are turned backward 1 hour (10:59:00 PM)."
-#
-# So, DST will start/end 1 minute earlier.
-
-# From Arthur David Olson (2010-03-03):
-# The file
-# 
-# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf
+# From Alexander Krivenyshev (2010-03-22):
+# According to Bangladesh newspaper "The Daily Star,"
+# Cabinet cancels Daylight Saving Time 
+# 
+# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html
 # 
-# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59"
-# which is consistent with the information provided by Nobutomo Nakano.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Dhaka	2009	only	-	Jun	19	23:00	1:00	S
 Rule	Dhaka	2009	only	-	Dec	31	23:59	0	-
-Rule	Dhaka	2010	max	-	Mar	31	22:59	1:00	S
-Rule	Dhaka	2010	max	-	Oct	31	23:59	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
@@ -2129,6 +2107,32 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html
 # 
 
+# From Alexander Krivenyshev (2010-03-19):
+# According to Voice of Palestine DST will last for 191 days, from March
+# 26, 2010 till "the last Sunday before the tenth day of Tishri
+# (October), each year" (October 03, 2010?)
+#
+# 
+# http://palvoice.org/forums/showthread.php?t=245697
+# 
+# (in Arabic)
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html
+# 
+
+# From Steffen Thorsen (2010-03-24):
+# ...Ma'an News Agency reports that Hamas cabinet has decided it will
+# start one day later, at 12:01am. Not sure if they really mean 12:01am or
+# noon though:
+#
+# 
+# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178
+# 
+# (Ma'an News Agency)
+# "At 12:01am Friday, clocks in Israel and the West Bank will change to
+# 1:01am, while Gaza clocks will change at 12:01am Saturday morning."
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -2146,7 +2150,8 @@ Rule Palestine	2006	2008	-	Apr	 1	0:00	1
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
 Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
-Rule Palestine	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2009	only	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2010	max	-	Mar	lastSat	0:01	1:00	S
 Rule Palestine	2009	max	-	Sep	Fri>=1	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Mon Apr  5 23:44:39 2010	(r206222)
+++ stable/6/share/zoneinfo/europe	Mon Apr  5 23:45:25 2010	(r206223)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.25
+# @(#)europe	8.26
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2041,7 +2041,9 @@ Zone Europe/Samara	 3:20:36 -	LMT	1919 J
 			 3:00	Russia	KUY%sT	1991 Mar 31 2:00s
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
-			 4:00	Russia	SAM%sT	# Samara Time
+			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
+			 3:00	Russia	SAM%sT
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Bashkortostan, Komi-Permyatskij avtonomnyj okrug,
@@ -2194,7 +2196,8 @@ Zone Asia/Kamchatka	10:34:36 -	LMT	1922 
 			11:00	-	PETT	1930 Jun 21 # P-K Time
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
-			12:00	Russia	PET%sT
+			12:00	Russia	PET%sT	2010 Mar 28 2:00s
+			11:00	Russia	PET%sT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2202,7 +2205,8 @@ Zone Asia/Anadyr	11:49:56 -	LMT	1924 May
 			13:00	Russia	ANA%sT	1982 Apr  1 0:00s
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
-			12:00	Russia	ANA%sT
+			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
+			11:00	Russia	ANA%sT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Mon Apr  5 23:44:39 2010	(r206222)
+++ stable/6/share/zoneinfo/zone.tab	Mon Apr  5 23:45:25 2010	(r206223)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.34
+# @(#)zone.tab	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,7 +330,7 @@ RS	+4450+02030	Europe/Belgrade
 RU	+5443+02030	Europe/Kaliningrad	Moscow-01 - Kaliningrad
 RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
 RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
-RU	+5312+05009	Europe/Samara	Moscow+01 - Samara, Udmurtia
+RU	+5312+05009	Europe/Samara	Moscow - Samara, Udmurtia
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
@@ -341,8 +341,8 @@ RU	+6200+12940	Asia/Yakutsk	Moscow+06 - 
 RU	+4310+13156	Asia/Vladivostok	Moscow+07 - Amur River
 RU	+4658+14242	Asia/Sakhalin	Moscow+07 - Sakhalin Island
 RU	+5934+15048	Asia/Magadan	Moscow+08 - Magadan
-RU	+5301+15839	Asia/Kamchatka	Moscow+09 - Kamchatka
-RU	+6445+17729	Asia/Anadyr	Moscow+10 - Bering Sea
+RU	+5301+15839	Asia/Kamchatka	Moscow+08 - Kamchatka
+RU	+6445+17729	Asia/Anadyr	Moscow+08 - Bering Sea
 RW	-0157+03004	Africa/Kigali
 SA	+2438+04643	Asia/Riyadh
 SB	-0932+16012	Pacific/Guadalcanal

From owner-svn-src-all@FreeBSD.ORG  Mon Apr  5 23:55:04 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 82C8E1065670;
	Mon,  5 Apr 2010 23:55:04 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 69F318FC08;
	Mon,  5 Apr 2010 23:55:04 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35Nt4oT083097;
	Mon, 5 Apr 2010 23:55:04 GMT (envelope-from np@svn.freebsd.org)
Received: (from np@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35Nt4Mc083091;
	Mon, 5 Apr 2010 23:55:04 GMT (envelope-from np@svn.freebsd.org)
Message-Id: <201004052355.o35Nt4Mc083091@svn.freebsd.org>
From: Navdeep Parhar 
Date: Mon, 5 Apr 2010 23:55:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206224 - stable/8/usr.sbin/cxgbtool
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 05 Apr 2010 23:55:04 -0000

Author: np
Date: Mon Apr  5 23:55:04 2010
New Revision: 206224
URL: http://svn.freebsd.org/changeset/base/206224

Log:
  MFC r204267: Allow cxgbtool to build with WARNS=6

Modified:
  stable/8/usr.sbin/cxgbtool/cxgbtool.c
  stable/8/usr.sbin/cxgbtool/reg_defs.c
  stable/8/usr.sbin/cxgbtool/reg_defs_t3.c
  stable/8/usr.sbin/cxgbtool/reg_defs_t3b.c
  stable/8/usr.sbin/cxgbtool/reg_defs_t3c.c
Directory Properties:
  stable/8/usr.sbin/cxgbtool/   (props changed)

Modified: stable/8/usr.sbin/cxgbtool/cxgbtool.c
==============================================================================
--- stable/8/usr.sbin/cxgbtool/cxgbtool.c	Mon Apr  5 23:45:25 2010	(r206223)
+++ stable/8/usr.sbin/cxgbtool/cxgbtool.c	Mon Apr  5 23:55:04 2010	(r206224)
@@ -85,7 +85,8 @@ struct reg_info { 
 
 static const char *progname;
 
-static void __attribute__((noreturn)) usage(FILE *fp)
+static void
+usage(FILE *fp)
 {
 	fprintf(fp, "Usage: %s  [operation]\n", progname);
 	fprintf(fp,
@@ -136,7 +137,8 @@ doit(const char *iff_name, unsigned long
 	return ioctl(fd, cmd, data) < 0 ? -1 : 0;
 }
 
-static int get_int_arg(const char *s, uint32_t *valp)
+static int
+get_int_arg(const char *s, uint32_t *valp)
 {
 	char *p;
 
@@ -172,11 +174,12 @@ write_reg(const char *iff_name, uint32_t
 		err(1, "register write");
 }
 
-static int register_io(int argc, char *argv[], int start_arg,
+static int
+register_io(int argc, char *argv[], int start_arg,
 		       const char *iff_name)
 {
 	char *p;
-	uint32_t addr, val = 0, write = 0;
+	uint32_t addr, val = 0, w = 0;
 
 	if (argc != start_arg + 1) return -1;
 
@@ -184,14 +187,14 @@ static int register_io(int argc, char *a
 	if (p == argv[start_arg]) return -1;
 	if (*p == '=' && p[1]) {
 		val = strtoul(p + 1, &p, 0);
-		write = 1;
+		w = 1;
 	}
 	if (*p) {
 		warnx("bad parameter \"%s\"", argv[start_arg]);
 		return -1;
 	}
 
-	if (write)
+	if (w)
 		write_reg(iff_name, addr, val);
 	else {
 		val = read_reg(iff_name, addr);
@@ -200,9 +203,9 @@ static int register_io(int argc, char *a
 	return 0;
 }
 
-static int mdio_io(int argc, char *argv[], int start_arg, const char *iff_name) 
+static int
+mdio_io(int argc, char *argv[], int start_arg, const char *iff_name) 
 { 
-        struct ifreq ifr; 
         struct ch_mii_data p;
         unsigned int cmd, phy_addr, reg, mmd, val; 
  
@@ -230,12 +233,14 @@ static int mdio_io(int argc, char *argv[
         return 0; 
 } 
 
-static inline uint32_t xtract(uint32_t val, int shift, int len)
+static inline
+uint32_t xtract(uint32_t val, int shift, int len)
 {
 	return (val >> shift) & ((1 << len) - 1);
 }
 
-static int dump_block_regs(const struct reg_info *reg_array, uint32_t *regs)
+static int
+dump_block_regs(const struct reg_info *reg_array, uint32_t *regs)
 {
 	uint32_t reg_val = 0; // silence compiler warning
 
@@ -254,7 +259,8 @@ static int dump_block_regs(const struct 
 	return 1;
 }
 
-static int dump_regs_t2(int argc, char *argv[], int start_arg, uint32_t *regs)
+static int
+dump_regs_t2(int argc, char *argv[], int start_arg, uint32_t *regs)
 {
 	int match = 0;
 	char *block_name = NULL;
@@ -292,8 +298,8 @@ static int dump_regs_t2(int argc, char *
 }
 
 #if defined(CONFIG_T3_REGS)
-static int dump_regs_t3(int argc, char *argv[], int start_arg, uint32_t *regs,
-			int is_pcie)
+static int
+dump_regs_t3(int argc, char *argv[], int start_arg, uint32_t *regs, int is_pcie)
 {
 	int match = 0;
 	char *block_name = NULL;
@@ -353,8 +359,9 @@ static int dump_regs_t3(int argc, char *
 	return 0;
 }
 
-static int dump_regs_t3b(int argc, char *argv[], int start_arg, uint32_t *regs,
-			 int is_pcie)
+static int
+dump_regs_t3b(int argc, char *argv[], int start_arg, uint32_t *regs,
+    int is_pcie)
 {
 	int match = 0;
 	char *block_name = NULL;
@@ -414,8 +421,9 @@ static int dump_regs_t3b(int argc, char 
 	return 0;
 }
 
-static int dump_regs_t3c(int argc, char *argv[], int start_arg, uint32_t *regs,
-			 int is_pcie)
+static int
+dump_regs_t3c(int argc, char *argv[], int start_arg, uint32_t *regs,
+    int is_pcie)
 {
 	int match = 0;
 	char *block_name = NULL;
@@ -479,7 +487,7 @@ static int dump_regs_t3c(int argc, char 
 static int
 dump_regs(int argc, char *argv[], int start_arg, const char *iff_name)
 {
-	int i, vers, revision, is_pcie;
+	int vers, revision, is_pcie;
 	struct ch_ifconf_regs regs;
 
 	regs.len = REGDUMP_SIZE;
@@ -514,7 +522,8 @@ dump_regs(int argc, char *argv[], int st
 	return 0;
 }
 
-static int t3_meminfo(const uint32_t *regs)
+static int
+t3_meminfo(const uint32_t *regs)
 {
 	enum {
 		SG_EGR_CNTX_BADDR       = 0x58,
@@ -592,11 +601,16 @@ static int t3_meminfo(const uint32_t *re
 	return 0;
 }
 
-static int meminfo(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+meminfo(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	int vers;
 	struct ch_ifconf_regs regs;
 
+	(void) argc;
+	(void) argv;
+	(void) start_arg;
+
 	regs.len = REGDUMP_SIZE;
 	if ((regs.data = malloc(regs.len)) == NULL)
 		err(1, "can't malloc");
@@ -612,11 +626,11 @@ static int meminfo(int argc, char *argv[
 	return 0;
 }
 
-static int mtu_tab_op(int argc, char *argv[], int start_arg,
-		      const char *iff_name)
+static int
+mtu_tab_op(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_mtus m;
-	int i;
+	unsigned int i;
 
 	if (argc == start_arg) {
 		if (doit(iff_name, CHELSIO_GETMTUTAB, &m) < 0)
@@ -649,13 +663,14 @@ static int mtu_tab_op(int argc, char *ar
 }
 
 #ifdef CHELSIO_INTERNAL
-static void show_egress_cntxt(uint32_t data[])
+static void
+show_egress_cntxt(uint32_t data[])
 {
 	printf("credits:      %u\n", data[0] & 0x7fff);
 	printf("GTS:          %u\n", (data[0] >> 15) & 1);
 	printf("index:        %u\n", data[0] >> 16);
 	printf("queue size:   %u\n", data[1] & 0xffff);
-	printf("base address: 0x%llx\n",
+	printf("base address: 0x%" PRIx64 "\n",
 	       ((data[1] >> 16) | ((uint64_t)data[2] << 16) |
 	       (((uint64_t)data[3] & 0xf) << 48)) << 12);
 	printf("rsp queue #:  %u\n", (data[3] >> 4) & 7);
@@ -667,9 +682,10 @@ static void show_egress_cntxt(uint32_t d
 	printf("valid:        %u\n", (data[3] >> 31) & 1);
 }
 
-static void show_fl_cntxt(uint32_t data[])
+static void
+show_fl_cntxt(uint32_t data[])
 {
-	printf("base address: 0x%llx\n",
+	printf("base address: 0x%" PRIx64 "\n",
 	       ((uint64_t)data[0] | ((uint64_t)data[1] & 0xfffff) << 32) << 12);
 	printf("index:        %u\n", (data[1] >> 20) | ((data[2] & 0xf) << 12));
 	printf("queue size:   %u\n", (data[2] >> 4) & 0xffff);
@@ -680,11 +696,12 @@ static void show_fl_cntxt(uint32_t data[
 	printf("GTS:          %u\n", (data[3] >> 31) & 1);
 }
 
-static void show_response_cntxt(uint32_t data[])
+static void
+show_response_cntxt(uint32_t data[])
 {
 	printf("index:        %u\n", data[0] & 0xffff);
 	printf("size:         %u\n", data[0] >> 16);
-	printf("base address: 0x%llx\n",
+	printf("base address: 0x%" PRIx64 "\n",
 	       ((uint64_t)data[1] | ((uint64_t)data[2] & 0xfffff) << 32) << 12);
 	printf("MSI-X/RspQ:   %u\n", (data[2] >> 20) & 0x3f);
 	printf("intr enable:  %u\n", (data[2] >> 26) & 1);
@@ -694,11 +711,12 @@ static void show_response_cntxt(uint32_t
 	printf("FL threshold: %u\n", data[3]);
 }
 
-static void show_cq_cntxt(uint32_t data[])
+static void
+show_cq_cntxt(uint32_t data[])
 {
 	printf("index:            %u\n", data[0] & 0xffff);
 	printf("size:             %u\n", data[0] >> 16);
-	printf("base address:     0x%llx\n",
+	printf("base address:     0x%" PRIx64 "\n",
 	       ((uint64_t)data[1] | ((uint64_t)data[2] & 0xfffff) << 32) << 12);
 	printf("rsp queue #:      %u\n", (data[2] >> 20) & 0x3f);
 	printf("AN:               %u\n", (data[2] >> 26) & 1);
@@ -710,8 +728,8 @@ static void show_cq_cntxt(uint32_t data[
 	printf("credit threshold: %u\n", data[3] >> 16);
 }
 
-static int get_sge_context(int argc, char *argv[], int start_arg,
-			   const char *iff_name)
+static int
+get_sge_context(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_cntxt ctx;
 
@@ -750,8 +768,8 @@ static int get_sge_context(int argc, cha
 
 #define ntohll(x) be64toh((x))
 
-static int get_sge_desc(int argc, char *argv[], int start_arg,
-			const char *iff_name)
+static int
+get_sge_desc(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	uint64_t *p, wr_hdr;
 	unsigned int n = 1, qset, qnum;
@@ -796,7 +814,8 @@ static int get_sge_desc(int argc, char *
 }
 #endif
 
-static int get_tcb2(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+get_tcb2(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	uint64_t *d;
 	unsigned int i;
@@ -835,8 +854,9 @@ static int get_tcb2(int argc, char *argv
 	return 0;
 }
 
-static int get_pm_page_spec(const char *s, unsigned int *page_size,
-			    unsigned int *num_pages)
+static int
+get_pm_page_spec(const char *s, unsigned int *page_size,
+    unsigned int *num_pages)
 {
 	char *p;
 	unsigned long val;
@@ -854,7 +874,8 @@ static int get_pm_page_spec(const char *
 	return *p;
 }
 
-static int conf_pm(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+conf_pm(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_pm pm;
 
@@ -884,8 +905,8 @@ static int conf_pm(int argc, char *argv[
 }
 
 #ifdef	CHELSIO_INTERNAL
-static int dump_tcam(int argc, char *argv[], int start_arg,
-		     const char *iff_name)
+static int
+dump_tcam(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	unsigned int nwords;
 	struct ch_tcam_word op;
@@ -907,7 +928,8 @@ static int dump_tcam(int argc, char *arg
 	return 0;
 }
 
-static void hexdump_8b(unsigned int start, uint64_t *data, unsigned int len)
+static void
+hexdump_8b(unsigned int start, uint64_t *data, unsigned int len)
 {
 	int i;
 
@@ -920,8 +942,8 @@ static void hexdump_8b(unsigned int star
 	}
 }
 
-static int dump_mc7(int argc, char *argv[], int start_arg,
-		    const char *iff_name)
+static int
+dump_mc7(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_mem_range mem;
 	unsigned int mem_id, addr, len;
@@ -959,10 +981,11 @@ static int dump_mc7(int argc, char *argv
 }
 #endif
 
-/* Max FW size is 32K including version, +4 bytes for the checksum. */
+/* Max FW size is 64K including version, +4 bytes for the checksum. */
 #define MAX_FW_IMAGE_SIZE (64 * 1024)
 
-static int load_fw(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+load_fw(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	int fd, len;
 	struct ch_mem_range op;
@@ -979,12 +1002,13 @@ static int load_fw(int argc, char *argv[
 	if (!op.buf)
 		err(1, "load firmware");
 
-	op.len = read(fd, op.buf, MAX_FW_IMAGE_SIZE + 1);
-	if (op.len < 0)
+	len = read(fd, op.buf, MAX_FW_IMAGE_SIZE + 1);
+	if (len < 0)
 		err(1, "load firmware");
- 	if (op.len > MAX_FW_IMAGE_SIZE)
+ 	if (len > MAX_FW_IMAGE_SIZE)
 		errx(1, "FW image too large");
 
+	op.len = len;
 	if (doit(iff_name, CHELSIO_LOAD_FW, &op) < 0)
 		err(1, "load firmware");
 	return 0;
@@ -993,8 +1017,8 @@ static int load_fw(int argc, char *argv[
 /* Max BOOT size is 255*512 bytes including the BIOS boot ROM basic header */
 #define MAX_BOOT_IMAGE_SIZE (0xff * 512)
 
-static int load_boot(int argc, char *argv[],
-		     int start_arg, const char *iff_name)
+static int
+load_boot(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	int fd, len;
 	struct ch_mem_range op;
@@ -1024,7 +1048,8 @@ static int load_boot(int argc, char *arg
 	return 0;
 }
 
-static int dump_proto_sram(const char *iff_name)
+static int
+dump_proto_sram(const char *iff_name)
 {
 	int i, j;
 	uint8_t buf[PROTO_SRAM_SIZE];
@@ -1054,15 +1079,20 @@ static int dump_proto_sram(const char *i
 	return 0;
 }
 
-static int proto_sram_op(int argc, char *argv[], int start_arg,
+static int
+proto_sram_op(int argc, char *argv[], int start_arg,
 			 const char *iff_name)
 {
+	(void) argv;
+	(void) start_arg;
+
 	if (argc == start_arg)
 		return dump_proto_sram(iff_name);
 	return -1;
 }
 
-static int dump_qset_params(const char *iff_name)
+static int
+dump_qset_params(const char *iff_name)
 {
 	struct ch_qset_params qp;
 
@@ -1084,10 +1114,10 @@ static int dump_qset_params(const char *
 	return 0;
 }
 
-static int qset_config(int argc, char *argv[], int start_arg,
-		       const char *iff_name)
+static int
+qset_config(int argc, char *argv[], int start_arg, const char *iff_name)
 {
-	struct ch_qset_params qp;
+	(void) argv;
 
 	if (argc == start_arg)
 		return dump_qset_params(iff_name);
@@ -1095,11 +1125,13 @@ static int qset_config(int argc, char *a
 	return -1;
 }
 
-static int qset_num_config(int argc, char *argv[], int start_arg,
-			   const char *iff_name)
+static int
+qset_num_config(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_reg reg;
 
+	(void) argv;
+
 	if (argc == start_arg) {
 		if (doit(iff_name, CHELSIO_GET_QSET_NUM, ®) < 0)
 			err(1, "get qsets");
@@ -1113,7 +1145,8 @@ static int qset_num_config(int argc, cha
 /*
  * Parse a string containing an IP address with an optional network prefix.
  */
-static int parse_ipaddr(const char *s, uint32_t *addr, uint32_t *mask)
+static int
+parse_ipaddr(const char *s, uint32_t *addr, uint32_t *mask)
 {
 	char *p, *slash;
 	struct in_addr ia;
@@ -1143,7 +1176,8 @@ static int parse_ipaddr(const char *s, u
 /*
  * Parse a string containing a value and an optional colon separated mask.
  */
-static int parse_val_mask_param(const char *s, uint32_t *val, uint32_t *mask)
+static int
+parse_val_mask_param(const char *s, uint32_t *val, uint32_t *mask)
 {
 	char *p;
 
@@ -1156,14 +1190,15 @@ static int parse_val_mask_param(const ch
 	return *p ? -1 : 0;
 }
 
-static int parse_trace_param(const char *s, uint32_t *val, uint32_t *mask)
+static int
+parse_trace_param(const char *s, uint32_t *val, uint32_t *mask)
 {
 	return strchr(s, '.') ? parse_ipaddr(s, val, mask) :
 				parse_val_mask_param(s, val, mask);
 }
 
-static int trace_config(int argc, char *argv[], int start_arg,
-			const char *iff_name)
+static int
+trace_config(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	uint32_t val, mask;
 	struct ch_trace trace;
@@ -1238,7 +1273,8 @@ static int trace_config(int argc, char *
 	return 0;
 }
 
-static int get_sched_param(int argc, char *argv[], int pos, unsigned int *valp)
+static int
+get_sched_param(int argc, char *argv[], int pos, unsigned int *valp)
 {
 	if (pos + 1 >= argc)
 		errx(1, "missing value for %s", argv[pos]);
@@ -1247,7 +1283,8 @@ static int get_sched_param(int argc, cha
 	return 0;
 }
 
-static int tx_sched(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+tx_sched(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_hw_sched op;
 	unsigned int idx, val;
@@ -1293,7 +1330,8 @@ static int tx_sched(int argc, char *argv
 	return 0;
 }
 
-static int pktsched(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+pktsched(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_pktsched_params op;
 	unsigned int idx, min = -1, max, binding = -1;
@@ -1333,20 +1371,29 @@ static int pktsched(int argc, char *argv
 	return 0;
 }
 
-static int clear_stats(int argc, char *argv[], int start_arg,
-		       const char *iff_name)
+static int
+clear_stats(int argc, char *argv[], int start_arg, const char *iff_name)
 {
+	(void) argc;
+	(void) argv;
+	(void) start_arg;
+
 	if (doit(iff_name, CHELSIO_CLEAR_STATS, NULL) < 0)
 		 err(1, "clearstats");
 
 	return 0;
 }
 
-static int get_up_la(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+get_up_la(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_up_la la;
 	int i, idx, max_idx, entries;
 
+	(void) argc;
+	(void) argv;
+	(void) start_arg;
+
 	la.stopped = 0;
 	la.idx = -1;
 	la.bufsize = LA_BUFSIZE;
@@ -1372,11 +1419,16 @@ static int get_up_la(int argc, char *arg
 	return 0;
 }
 
-static int get_up_ioqs(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+get_up_ioqs(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_up_ioqs ioqs;
 	int i, entries;
 
+	(void) argc;
+	(void) argv;
+	(void) start_arg;
+
 	bzero(&ioqs, sizeof(ioqs));
 	ioqs.bufsize = IOQS_BUFSIZE;
 	ioqs.data = malloc(IOQS_BUFSIZE);
@@ -1465,10 +1517,12 @@ run_cmd(int argc, char *argv[], const ch
 static int
 run_cmd_loop(int argc, char *argv[], const char *iff_name)
 {
-	int n, i;
+	int n;
+	unsigned int i;
 	char buf[64];
 	char *args[8], *s;
 
+	(void) argc;
 	args[0] = argv[0];
 	args[1] = argv[1];
 
@@ -1481,11 +1535,8 @@ run_cmd_loop(int argc, char *argv[], con
 	for (;;) {
 		fprintf(stdout, "> ");
 		fflush(stdout);
-		n = read(STDIN_FILENO, buf, sizeof(buf));
-		if (n > sizeof(buf) - 1) {
-			fprintf(stdout, "too much input.\n");
-			return (0);
-		} else if (n <= 0)
+		n = read(STDIN_FILENO, buf, sizeof(buf) - 1);
+		if (n <= 0)
 			return (0);
 
 		if (buf[--n] != '\n')

Modified: stable/8/usr.sbin/cxgbtool/reg_defs.c
==============================================================================
--- stable/8/usr.sbin/cxgbtool/reg_defs.c	Mon Apr  5 23:45:25 2010	(r206223)
+++ stable/8/usr.sbin/cxgbtool/reg_defs.c	Mon Apr  5 23:55:04 2010	(r206224)
@@ -106,7 +106,7 @@ struct reg_info sge_regs[] = {
 		{ "Packet_Too_Big", 3, 1 },
 		{ "Packet_Mismatch", 4, 1 },
 	{ "SG_RESPACCUTIMER", 0xc0, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc3_regs[] = {
@@ -196,7 +196,7 @@ struct reg_info mc3_regs[] = {
 		{ "MC3_Uncorr_Err", 1, 1 },
 		{ "MC3_Parity_Err", 2, 8 },
 		{ "MC3_Addr_Err", 10, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc4_regs[] = {
@@ -276,7 +276,7 @@ struct reg_info mc4_regs[] = {
 		{ "MC4_Corr_Err", 0, 1 },
 		{ "MC4_Uncorr_Err", 1, 1 },
 		{ "MC4_Addr_Err", 2, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info tpi_regs[] = {
@@ -290,7 +290,7 @@ struct reg_info tpi_regs[] = {
 		{ "INT_DIR", 31, 1 },
 	{ "TPI_PAR", 0x29c, 0 },
 		{ "TPIPAR", 0, 7 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info tp_regs[] = {
@@ -509,7 +509,7 @@ struct reg_info tp_regs[] = {
 		{ "DROP_TICKS_CNT", 4, 26 },
 		{ "NUM_PKTS_DROPPED", 0, 4 },
 	{ "TP_TX_DROP_COUNT", 0x4bc, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info rat_regs[] = {
@@ -532,7 +532,7 @@ struct reg_info rat_regs[] = {
 		{ "CspiFramingError", 1, 1 },
 		{ "SgeFramingError", 2, 1 },
 		{ "TpFramingError", 3, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info cspi_regs[] = {
@@ -560,7 +560,7 @@ struct reg_info cspi_regs[] = {
 		{ "TXDrop", 2, 1 },
 		{ "RXOverflow", 3, 1 },
 		{ "RAMParityErr", 4, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info espi_regs[] = {
@@ -660,7 +660,7 @@ struct reg_info espi_regs[] = {
 		{ "Error_Ack", 9, 1 },
 		{ "Unmapped_Err", 10, 1 },
 		{ "Transaction_Timer", 16, 8 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info ulp_regs[] = {
@@ -682,7 +682,7 @@ struct reg_info ulp_regs[] = {
 		{ "Pm_E2C_Wrt_Full", 24, 1 },
 		{ "Pm_C2E_Wrt_Full", 25, 1 },
 	{ "ULP_PIO_CTRL", 0x998, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pl_regs[] = {
@@ -712,7 +712,7 @@ struct reg_info pl_regs[] = {
 		{ "PL_Intr_CSPI", 9, 1 },
 		{ "PL_Intr_PCIX", 10, 1 },
 		{ "PL_Intr_EXT", 11, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc5_regs[] = {
@@ -833,5 +833,5 @@ struct reg_info mc5_regs[] = {
 	{ "MC5_DATA_WRITE_CMD", 0xcf4, 0 },
 	{ "MC5_DATA_READ_CMD", 0xcf8, 0 },
 	{ "MC5_MASK_WRITE_CMD", 0xcfc, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };

Modified: stable/8/usr.sbin/cxgbtool/reg_defs_t3.c
==============================================================================
--- stable/8/usr.sbin/cxgbtool/reg_defs_t3.c	Mon Apr  5 23:45:25 2010	(r206223)
+++ stable/8/usr.sbin/cxgbtool/reg_defs_t3.c	Mon Apr  5 23:55:04 2010	(r206224)
@@ -140,7 +140,7 @@ struct reg_info sge3_regs[] = {
 		{ "DrbPriThrsh", 0, 16 },
 	{ "SG_DEBUG_INDEX", 0x78, 0 },
 	{ "SG_DEBUG_DATA", 0x7c, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pcix1_regs[] = {
@@ -212,7 +212,7 @@ struct reg_info pcix1_regs[] = {
 		{ "WakeUp0", 2, 1 },
 		{ "SleepMode1", 1, 1 },
 		{ "SleepMode0", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pcie0_regs[] = {
@@ -411,7 +411,7 @@ struct reg_info pcie0_regs[] = {
 		{ "BISTDone", 24, 8 },
 		{ "BISTCycleThresh", 3, 16 },
 		{ "BISTMode", 0, 3 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3dbg_regs[] = {
@@ -557,7 +557,7 @@ struct reg_info t3dbg_regs[] = {
 		{ "PMON_CDEL_MANUAL", 4, 1 },
 		{ "PMON_MANUAL", 1, 1 },
 		{ "PMON_AUTO", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc7_pmrx_regs[] = {
@@ -674,7 +674,7 @@ struct reg_info mc7_pmrx_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc7_pmtx_regs[] = {
@@ -791,7 +791,7 @@ struct reg_info mc7_pmtx_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc7_cm_regs[] = {
@@ -908,7 +908,7 @@ struct reg_info mc7_cm_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info cim_regs[] = {
@@ -1024,7 +1024,7 @@ struct reg_info cim_regs[] = {
 	{ "CIM_CDEBUGDATA", 0x2d0, 0 },
 		{ "CDebugDataH", 16, 16 },
 		{ "CDebugDataL", 0, 16 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info tp1_regs[] = {
@@ -1384,7 +1384,7 @@ struct reg_info tp1_regs[] = {
 	{ "TP_EMBED_OP_FIELD3", 0x4f4, 0 },
 	{ "TP_EMBED_OP_FIELD4", 0x4f8, 0 },
 	{ "TP_EMBED_OP_FIELD5", 0x4fc, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info ulp2_rx_regs[] = {
@@ -1428,7 +1428,7 @@ struct reg_info ulp2_rx_regs[] = {
 	{ "ULPRX_RQ_ULIMIT", 0x538, 0 },
 	{ "ULPRX_PBL_LLIMIT", 0x53c, 0 },
 	{ "ULPRX_PBL_ULIMIT", 0x540, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info ulp2_tx_regs[] = {
@@ -1456,7 +1456,7 @@ struct reg_info ulp2_tx_regs[] = {
 	{ "ULPTX_DMA_WEIGHT", 0x5ac, 0 },
 		{ "D1_WEIGHT", 16, 16 },
 		{ "D0_WEIGHT", 0, 16 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pm1_rx_regs[] = {
@@ -1500,7 +1500,7 @@ struct reg_info pm1_rx_regs[] = {
 		{ "ocspi1_ofifo2x_Tx_framing_error", 6, 1 },
 		{ "iespi_par_error", 3, 3 },
 		{ "ocspi_par_error", 0, 3 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pm1_tx_regs[] = {
@@ -1544,7 +1544,7 @@ struct reg_info pm1_tx_regs[] = {
 		{ "oespi1_ofifo2x_Tx_framing_error", 6, 1 },
 		{ "icspi_par_error", 3, 3 },
 		{ "oespi_par_error", 0, 3 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mps0_regs[] = {
@@ -1585,7 +1585,7 @@ struct reg_info mps0_regs[] = {
 		{ "RXTpParErr", 4, 2 },
 		{ "TX1TpParErr", 2, 2 },
 		{ "TX0TpParErr", 0, 2 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info cpl_switch_regs[] = {
@@ -1616,7 +1616,7 @@ struct reg_info cpl_switch_regs[] = {
 		{ "cpl_map_tbl_idx", 0, 8 },
 	{ "CPL_MAP_TBL_DATA", 0x65c, 0 },
 		{ "cpl_map_tbl_data", 0, 8 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info smb0_regs[] = {
@@ -1682,7 +1682,7 @@ struct reg_info smb0_regs[] = {
 		{ "DebugDataL", 0, 16 },
 	{ "SMB_DEBUG_LA", 0x69c, 0 },
 		{ "DebugLAReqAddr", 0, 10 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info i2cm0_regs[] = {
@@ -1695,7 +1695,7 @@ struct reg_info i2cm0_regs[] = {
 		{ "Ack", 30, 1 },
 		{ "Cont", 1, 1 },
 		{ "Op", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mi1_regs[] = {
@@ -1714,7 +1714,7 @@ struct reg_info mi1_regs[] = {
 		{ "Busy", 31, 1 },
 		{ "Inc", 2, 1 },
 		{ "Op", 0, 2 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info jm1_regs[] = {
@@ -1727,7 +1727,7 @@ struct reg_info jm1_regs[] = {
 	{ "JM_OP", 0x6cc, 0 },
 		{ "Busy", 31, 1 },
 		{ "Cnt", 0, 5 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info sf1_regs[] = {
@@ -1737,7 +1737,7 @@ struct reg_info sf1_regs[] = {
 		{ "Cont", 3, 1 },
 		{ "ByteCnt", 1, 2 },
 		{ "Op", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pl3_regs[] = {
@@ -1839,7 +1839,7 @@ struct reg_info pl3_regs[] = {
 	{ "PL_REV", 0x6f4, 0 },
 		{ "Rev", 0, 4 },
 	{ "PL_CLI", 0x6f8, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc5a_regs[] = {
@@ -2010,7 +2010,7 @@ struct reg_info mc5a_regs[] = {
 		{ "ReadCmd", 0, 20 },
 	{ "MC5_DB_MASK_WRITE_CMD", 0x7fc, 0 },
 		{ "MaskWr", 0, 16 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info xgmac0_0_regs[] = {
@@ -2341,7 +2341,7 @@ struct reg_info xgmac0_0_regs[] = {
 	{ "XGM_RX_SPI4_SOP_EOP_CNT", 0x9ac, 0 },
 		{ "RxSPI4SopCnt", 16, 16 },
 		{ "RxSPI4EopCnt", 0, 16 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info xgmac0_1_regs[] = {
@@ -2672,5 +2672,5 @@ struct reg_info xgmac0_1_regs[] = {
 	{ "XGM_RX_SPI4_SOP_EOP_CNT", 0xbac, 0 },
 		{ "RxSPI4SopCnt", 16, 16 },
 		{ "RxSPI4EopCnt", 0, 16 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };

Modified: stable/8/usr.sbin/cxgbtool/reg_defs_t3b.c
==============================================================================
--- stable/8/usr.sbin/cxgbtool/reg_defs_t3b.c	Mon Apr  5 23:45:25 2010	(r206223)
+++ stable/8/usr.sbin/cxgbtool/reg_defs_t3b.c	Mon Apr  5 23:55:04 2010	(r206224)
@@ -150,7 +150,7 @@ struct reg_info t3b_sge3_regs[] = {
 		{ "DrbPriThrsh", 0, 16 },
 	{ "SG_DEBUG_INDEX", 0x78, 0 },
 	{ "SG_DEBUG_DATA", 0x7c, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_pcix1_regs[] = {
@@ -222,7 +222,7 @@ struct reg_info t3b_pcix1_regs[] = {
 		{ "WakeUp0", 2, 1 },
 		{ "SleepMode1", 1, 1 },
 		{ "SleepMode0", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_pcie0_regs[] = {
@@ -376,7 +376,7 @@ struct reg_info t3b_pcie0_regs[] = {
 		{ "BeaconDetect", 2, 1 },
 		{ "RxDetect", 1, 1 },
 		{ "TxIdleDetect", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_t3dbg_regs[] = {
@@ -557,7 +557,7 @@ struct reg_info t3b_t3dbg_regs[] = {
 		{ "BSEnLane1", 4, 1 },
 		{ "BSInSelLane0", 1, 2 },
 		{ "BSEnLane0", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_mc7_pmrx_regs[] = {
@@ -678,7 +678,7 @@ struct reg_info t3b_mc7_pmrx_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_mc7_pmtx_regs[] = {
@@ -799,7 +799,7 @@ struct reg_info t3b_mc7_pmtx_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_mc7_cm_regs[] = {
@@ -920,7 +920,7 @@ struct reg_info t3b_mc7_cm_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_cim_regs[] = {
@@ -1047,7 +1047,7 @@ struct reg_info t3b_cim_regs[] = {
 		{ "PILADbgWrPtr", 0, 9 },
 	{ "CIM_PO_LA_DEBUGDATA", 0x2e8, 0 },
 	{ "CIM_PI_LA_DEBUGDATA", 0x2ec, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_tp1_regs[] = {
@@ -1453,7 +1453,7 @@ struct reg_info t3b_tp1_regs[] = {
 	{ "TP_EMBED_OP_FIELD3", 0x4f4, 0 },
 	{ "TP_EMBED_OP_FIELD4", 0x4f8, 0 },
 	{ "TP_EMBED_OP_FIELD5", 0x4fc, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_ulp2_rx_regs[] = {
@@ -1497,7 +1497,7 @@ struct reg_info t3b_ulp2_rx_regs[] = {
 	{ "ULPRX_RQ_ULIMIT", 0x538, 0 },
 	{ "ULPRX_PBL_LLIMIT", 0x53c, 0 },
 	{ "ULPRX_PBL_ULIMIT", 0x540, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_ulp2_tx_regs[] = {
@@ -1525,7 +1525,7 @@ struct reg_info t3b_ulp2_tx_regs[] = {
 	{ "ULPTX_DMA_WEIGHT", 0x5ac, 0 },
 		{ "D1_WEIGHT", 16, 16 },
 		{ "D0_WEIGHT", 0, 16 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3b_pm1_rx_regs[] = {
@@ -1569,7 +1569,7 @@ struct reg_info t3b_pm1_rx_regs[] = {
 		{ "ocspi1_ofifo2x_Tx_framing_error", 6, 1 },
 		{ "iespi_par_error", 3, 3 },
 		{ "ocspi_par_error", 0, 3 },
-	{ NULL }

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 00:46:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B441E1065675;
	Tue,  6 Apr 2010 00:46:49 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A23468FC23;
	Tue,  6 Apr 2010 00:46:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o360kn7v094496;
	Tue, 6 Apr 2010 00:46:49 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o360knnT094494;
	Tue, 6 Apr 2010 00:46:49 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201004060046.o360knnT094494@svn.freebsd.org>
From: Xin LI 
Date: Tue, 6 Apr 2010 00:46:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206225 - stable/8/share/man/man3
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 00:46:49 -0000

Author: delphij
Date: Tue Apr  6 00:46:49 2010
New Revision: 206225
URL: http://svn.freebsd.org/changeset/base/206225

Log:
  MFC r205520:
  
  Correct cross reference.

Modified:
  stable/8/share/man/man3/pthread_affinity_np.3
Directory Properties:
  stable/8/share/man/man3/   (props changed)

Modified: stable/8/share/man/man3/pthread_affinity_np.3
==============================================================================
--- stable/8/share/man/man3/pthread_affinity_np.3	Mon Apr  5 23:55:04 2010	(r206224)
+++ stable/8/share/man/man3/pthread_affinity_np.3	Tue Apr  6 00:46:49 2010	(r206225)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 12, 2010
+.Dd March 23, 2010
 .Dt PTHREAD_AFFINITY_NP 3
 .Os
 .Sh NAME
@@ -125,8 +125,8 @@ operation.
 .Xr cpuset_setid 2 ,
 .Xr CPU_SET 3 ,
 .Xr pthread 3 ,
-.Xr pthread_attr_get_affinity_np 3 ,
-.Xr pthread_attr_set_affinity_np 3
+.Xr pthread_attr_getaffinity_np 3 ,
+.Xr pthread_attr_setaffinity_np 3
 .Sh STANDARDS
 The
 .Nm pthread_getaffinity_np

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 00:47:33 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 693BE106567D;
	Tue,  6 Apr 2010 00:47:33 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5725E8FC16;
	Tue,  6 Apr 2010 00:47:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o360lXPY094715;
	Tue, 6 Apr 2010 00:47:33 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o360lX7J094713;
	Tue, 6 Apr 2010 00:47:33 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201004060047.o360lX7J094713@svn.freebsd.org>
From: Xin LI 
Date: Tue, 6 Apr 2010 00:47:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206226 - stable/7/share/man/man3
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 00:47:33 -0000

Author: delphij
Date: Tue Apr  6 00:47:33 2010
New Revision: 206226
URL: http://svn.freebsd.org/changeset/base/206226

Log:
  MFC r205520:
  
  Correct cross reference.

Modified:
  stable/7/share/man/man3/pthread_affinity_np.3
Directory Properties:
  stable/7/share/man/man3/   (props changed)

Modified: stable/7/share/man/man3/pthread_affinity_np.3
==============================================================================
--- stable/7/share/man/man3/pthread_affinity_np.3	Tue Apr  6 00:46:49 2010	(r206225)
+++ stable/7/share/man/man3/pthread_affinity_np.3	Tue Apr  6 00:47:33 2010	(r206226)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 12, 2010
+.Dd March 23, 2010
 .Dt PTHREAD_AFFINITY_NP 3
 .Os
 .Sh NAME
@@ -125,8 +125,8 @@ operation.
 .Xr cpuset_setid 2 ,
 .Xr CPU_SET 3 ,
 .Xr pthread 3 ,
-.Xr pthread_attr_get_affinity_np 3 ,
-.Xr pthread_attr_set_affinity_np 3
+.Xr pthread_attr_getaffinity_np 3 ,
+.Xr pthread_attr_setaffinity_np 3
 .Sh STANDARDS
 The
 .Nm pthread_getaffinity_np

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 00:50:24 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C7B89106566B;
	Tue,  6 Apr 2010 00:50:23 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B5DB18FC15;
	Tue,  6 Apr 2010 00:50:23 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o360oNHv095359;
	Tue, 6 Apr 2010 00:50:23 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o360oNCS095357;
	Tue, 6 Apr 2010 00:50:23 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201004060050.o360oNCS095357@svn.freebsd.org>
From: Xin LI 
Date: Tue, 6 Apr 2010 00:50:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206227 - stable/8/sys/dev/ppc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 00:50:24 -0000

Author: delphij
Date: Tue Apr  6 00:50:23 2010
New Revision: 206227
URL: http://svn.freebsd.org/changeset/base/206227

Log:
  MFC r205534:
  
  Add PCI ID for MCS9901's parallel port.
  
  PR:		kern/144713
  Submitted by:	gcooper

Modified:
  stable/8/sys/dev/ppc/ppc_pci.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/ppc/ppc_pci.c
==============================================================================
--- stable/8/sys/dev/ppc/ppc_pci.c	Tue Apr  6 00:47:33 2010	(r206226)
+++ stable/8/sys/dev/ppc/ppc_pci.c	Tue Apr  6 00:50:23 2010	(r206227)
@@ -89,6 +89,7 @@ static struct pci_id pci_ids[] = {
 	{ 0x84031415, "Oxford Semiconductor OX12PCI840 Parallel port", 0x10 },
 	{ 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel port", 0x10 },
 	{ 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 },
+	{ 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 },
 	{ 0xffff }
 };
 

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 00:52:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 49C30106567B;
	Tue,  6 Apr 2010 00:52:46 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 376818FC24;
	Tue,  6 Apr 2010 00:52:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o360qjJg095940;
	Tue, 6 Apr 2010 00:52:45 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o360qjpY095938;
	Tue, 6 Apr 2010 00:52:45 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201004060052.o360qjpY095938@svn.freebsd.org>
From: Xin LI 
Date: Tue, 6 Apr 2010 00:52:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206228 - stable/7/sys/dev/ppc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 00:52:46 -0000

Author: delphij
Date: Tue Apr  6 00:52:45 2010
New Revision: 206228
URL: http://svn.freebsd.org/changeset/base/206228

Log:
  MFC r205534:
  
  Add PCI ID for MCS9901's parallel port.
  
  PR:		kern/144713
  Submitted by:	gcooper

Modified:
  stable/7/sys/dev/ppc/ppc_pci.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/ppc/ppc_pci.c
==============================================================================
--- stable/7/sys/dev/ppc/ppc_pci.c	Tue Apr  6 00:50:23 2010	(r206227)
+++ stable/7/sys/dev/ppc/ppc_pci.c	Tue Apr  6 00:52:45 2010	(r206228)
@@ -88,6 +88,7 @@ static struct pci_id pci_ids[] = {
 	{ 0x84031415, "Oxford Semiconductor OX12PCI840 Parallel port", 0x10 },
 	{ 0x95131415, "Oxford Semiconductor OX16PCI954 Parallel port", 0x10 },
 	{ 0x98059710, "NetMos NM9805 1284 Printer port", 0x10 },
+	{ 0x99019710, "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 },
 	{ 0xffff }
 };
 

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 01:14:50 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4C1B5106566B;
	Tue,  6 Apr 2010 01:14:50 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 208ED8FC19;
	Tue,  6 Apr 2010 01:14:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o361Eo7L001314;
	Tue, 6 Apr 2010 01:14:50 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o361EoFd001312;
	Tue, 6 Apr 2010 01:14:50 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201004060114.o361EoFd001312@svn.freebsd.org>
From: Rick Macklem 
Date: Tue, 6 Apr 2010 01:14:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206236 - head/sys/fs/nfsserver
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 01:14:50 -0000

Author: rmacklem
Date: Tue Apr  6 01:14:49 2010
New Revision: 206236
URL: http://svn.freebsd.org/changeset/base/206236

Log:
  Harden the experimental NFS server a little, by adding range
  checks on the length of the client's open/lock owner name. Also,
  add free()'s for one case where they were missing and would
  have caused a leak if NFSERR_BADXDR had been replied. Probably
  never happens, but the leak is now plugged, just in case.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- head/sys/fs/nfsserver/nfs_nfsdserv.c	Tue Apr  6 01:13:29 2010	(r206235)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.c	Tue Apr  6 01:14:49 2010	(r206236)
@@ -2086,6 +2086,10 @@ nfsrvd_lock(struct nfsrv_descript *nd, _
 	if (flags & NFSLCK_OPENTOLOCK) {
 		NFSM_DISSECT(tl, u_int32_t *, 5 * NFSX_UNSIGNED + NFSX_STATEID);
 		i = fxdr_unsigned(int, *(tl+4+(NFSX_STATEID / NFSX_UNSIGNED)));
+		if (i <= 0 || i > NFSV4_OPAQUELIMIT) {
+			nd->nd_repstat = NFSERR_BADXDR;
+			goto nfsmout;
+		}
 		MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
 			M_NFSDSTATE, M_WAITOK);
 		stp->ls_ownerlen = i;
@@ -2229,6 +2233,10 @@ nfsrvd_lockt(struct nfsrv_descript *nd, 
 
 	NFSM_DISSECT(tl, u_int32_t *, 8 * NFSX_UNSIGNED);
 	i = fxdr_unsigned(int, *(tl + 7));
+	if (i <= 0 || i > NFSV4_OPAQUELIMIT) {
+		nd->nd_repstat = NFSERR_BADXDR;
+		goto nfsmout;
+	}
 	MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
 	    M_NFSDSTATE, M_WAITOK);
 	stp->ls_ownerlen = i;
@@ -2350,6 +2358,8 @@ nfsrvd_locku(struct nfsrv_descript *nd, 
 		break;
 	default:
 		nd->nd_repstat = NFSERR_BADXDR;
+		free(stp, M_NFSDSTATE);
+		free(lop, M_NFSDLOCK);
 		goto nfsmout;
 	};
 	stp->ls_ownerlen = 0;
@@ -2439,6 +2449,14 @@ nfsrvd_open(struct nfsrv_descript *nd, _
 	named.ni_cnd.cn_nameiop = 0;
 	NFSM_DISSECT(tl, u_int32_t *, 6 * NFSX_UNSIGNED);
 	i = fxdr_unsigned(int, *(tl + 5));
+	if (i <= 0 || i > NFSV4_OPAQUELIMIT) {
+		nd->nd_repstat = NFSERR_BADXDR;
+		vrele(dp);
+#ifdef NFS4_ACL_EXTATTR_NAME
+		acl_free(aclp);
+#endif
+		return (0);
+	}
 	MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
 	    M_NFSDSTATE, M_WAITOK);
 	stp->ls_ownerlen = i;
@@ -3391,6 +3409,10 @@ nfsrvd_releaselckown(struct nfsrv_descri
 	}
 	NFSM_DISSECT(tl, u_int32_t *, 3 * NFSX_UNSIGNED);
 	len = fxdr_unsigned(int, *(tl + 2));
+	if (len <= 0 || len > NFSV4_OPAQUELIMIT) {
+		nd->nd_repstat = NFSERR_BADXDR;
+		return (0);
+	}
 	MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + len,
 	    M_NFSDSTATE, M_WAITOK);
 	stp->ls_ownerlen = len;

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 01:17:47 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D0BD3106564A;
	Tue,  6 Apr 2010 01:17:47 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BD0438FC0C;
	Tue,  6 Apr 2010 01:17:47 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o361HlmG001992;
	Tue, 6 Apr 2010 01:17:47 GMT (envelope-from np@svn.freebsd.org)
Received: (from np@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o361Hl2L001987;
	Tue, 6 Apr 2010 01:17:47 GMT (envelope-from np@svn.freebsd.org)
Message-Id: <201004060117.o361Hl2L001987@svn.freebsd.org>
From: Navdeep Parhar 
Date: Tue, 6 Apr 2010 01:17:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206237 - stable/7/usr.sbin/cxgbtool
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 01:17:48 -0000

Author: np
Date: Tue Apr  6 01:17:47 2010
New Revision: 206237
URL: http://svn.freebsd.org/changeset/base/206237

Log:
  MFC r189643,r194928,r204267
  
  r189643:
  commands to fetch uP logic analyzer and IOQs information.
  
  r194928:
  "stdio" mode.
  
  r204267:
  Allow cxgbtool to build with WARNS=6

Modified:
  stable/7/usr.sbin/cxgbtool/cxgbtool.c
  stable/7/usr.sbin/cxgbtool/reg_defs.c
  stable/7/usr.sbin/cxgbtool/reg_defs_t3.c
  stable/7/usr.sbin/cxgbtool/reg_defs_t3b.c
  stable/7/usr.sbin/cxgbtool/reg_defs_t3c.c
  stable/7/usr.sbin/cxgbtool/version.h
Directory Properties:
  stable/7/usr.sbin/cxgbtool/   (props changed)

Modified: stable/7/usr.sbin/cxgbtool/cxgbtool.c
==============================================================================
--- stable/7/usr.sbin/cxgbtool/cxgbtool.c	Tue Apr  6 01:14:49 2010	(r206236)
+++ stable/7/usr.sbin/cxgbtool/cxgbtool.c	Tue Apr  6 01:17:47 2010	(r206237)
@@ -1,6 +1,6 @@
 /**************************************************************************
 
-Copyright (c) 2007-2008, Chelsio Inc.
+Copyright (c) 2007-2009, Chelsio Inc.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -85,13 +85,16 @@ struct reg_info { 
 
 static const char *progname;
 
-static void __attribute__((noreturn)) usage(FILE *fp)
+static void
+usage(FILE *fp)
 {
 	fprintf(fp, "Usage: %s  [operation]\n", progname);
 	fprintf(fp,
 	    	"\tclearstats                          clear MAC statistics\n"
 		"\tcontext                   show an SGE context\n"
 		"\tdesc    []   dump SGE descriptors\n"
+		"\tioqs                                dump uP IOQs\n"
+		"\tla                                  dump uP logic analyzer info\n"
 		"\tloadboot                download boot image\n"
 		"\tloadfw                    download firmware\n"
 		"\tmdio  \n"
@@ -134,7 +137,8 @@ doit(const char *iff_name, unsigned long
 	return ioctl(fd, cmd, data) < 0 ? -1 : 0;
 }
 
-static int get_int_arg(const char *s, uint32_t *valp)
+static int
+get_int_arg(const char *s, uint32_t *valp)
 {
 	char *p;
 
@@ -170,11 +174,12 @@ write_reg(const char *iff_name, uint32_t
 		err(1, "register write");
 }
 
-static int register_io(int argc, char *argv[], int start_arg,
+static int
+register_io(int argc, char *argv[], int start_arg,
 		       const char *iff_name)
 {
 	char *p;
-	uint32_t addr, val = 0, write = 0;
+	uint32_t addr, val = 0, w = 0;
 
 	if (argc != start_arg + 1) return -1;
 
@@ -182,14 +187,14 @@ static int register_io(int argc, char *a
 	if (p == argv[start_arg]) return -1;
 	if (*p == '=' && p[1]) {
 		val = strtoul(p + 1, &p, 0);
-		write = 1;
+		w = 1;
 	}
 	if (*p) {
 		warnx("bad parameter \"%s\"", argv[start_arg]);
 		return -1;
 	}
 
-	if (write)
+	if (w)
 		write_reg(iff_name, addr, val);
 	else {
 		val = read_reg(iff_name, addr);
@@ -198,9 +203,9 @@ static int register_io(int argc, char *a
 	return 0;
 }
 
-static int mdio_io(int argc, char *argv[], int start_arg, const char *iff_name) 
+static int
+mdio_io(int argc, char *argv[], int start_arg, const char *iff_name) 
 { 
-        struct ifreq ifr; 
         struct ch_mii_data p;
         unsigned int cmd, phy_addr, reg, mmd, val; 
  
@@ -228,12 +233,14 @@ static int mdio_io(int argc, char *argv[
         return 0; 
 } 
 
-static inline uint32_t xtract(uint32_t val, int shift, int len)
+static inline
+uint32_t xtract(uint32_t val, int shift, int len)
 {
 	return (val >> shift) & ((1 << len) - 1);
 }
 
-static int dump_block_regs(const struct reg_info *reg_array, uint32_t *regs)
+static int
+dump_block_regs(const struct reg_info *reg_array, uint32_t *regs)
 {
 	uint32_t reg_val = 0; // silence compiler warning
 
@@ -252,7 +259,8 @@ static int dump_block_regs(const struct 
 	return 1;
 }
 
-static int dump_regs_t2(int argc, char *argv[], int start_arg, uint32_t *regs)
+static int
+dump_regs_t2(int argc, char *argv[], int start_arg, uint32_t *regs)
 {
 	int match = 0;
 	char *block_name = NULL;
@@ -290,8 +298,8 @@ static int dump_regs_t2(int argc, char *
 }
 
 #if defined(CONFIG_T3_REGS)
-static int dump_regs_t3(int argc, char *argv[], int start_arg, uint32_t *regs,
-			int is_pcie)
+static int
+dump_regs_t3(int argc, char *argv[], int start_arg, uint32_t *regs, int is_pcie)
 {
 	int match = 0;
 	char *block_name = NULL;
@@ -351,8 +359,9 @@ static int dump_regs_t3(int argc, char *
 	return 0;
 }
 
-static int dump_regs_t3b(int argc, char *argv[], int start_arg, uint32_t *regs,
-			 int is_pcie)
+static int
+dump_regs_t3b(int argc, char *argv[], int start_arg, uint32_t *regs,
+    int is_pcie)
 {
 	int match = 0;
 	char *block_name = NULL;
@@ -412,8 +421,9 @@ static int dump_regs_t3b(int argc, char 
 	return 0;
 }
 
-static int dump_regs_t3c(int argc, char *argv[], int start_arg, uint32_t *regs,
-			 int is_pcie)
+static int
+dump_regs_t3c(int argc, char *argv[], int start_arg, uint32_t *regs,
+    int is_pcie)
 {
 	int match = 0;
 	char *block_name = NULL;
@@ -477,7 +487,7 @@ static int dump_regs_t3c(int argc, char 
 static int
 dump_regs(int argc, char *argv[], int start_arg, const char *iff_name)
 {
-	int i, vers, revision, is_pcie;
+	int vers, revision, is_pcie;
 	struct ch_ifconf_regs regs;
 
 	regs.len = REGDUMP_SIZE;
@@ -512,7 +522,8 @@ dump_regs(int argc, char *argv[], int st
 	return 0;
 }
 
-static int t3_meminfo(const uint32_t *regs)
+static int
+t3_meminfo(const uint32_t *regs)
 {
 	enum {
 		SG_EGR_CNTX_BADDR       = 0x58,
@@ -590,11 +601,16 @@ static int t3_meminfo(const uint32_t *re
 	return 0;
 }
 
-static int meminfo(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+meminfo(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	int vers;
 	struct ch_ifconf_regs regs;
 
+	(void) argc;
+	(void) argv;
+	(void) start_arg;
+
 	regs.len = REGDUMP_SIZE;
 	if ((regs.data = malloc(regs.len)) == NULL)
 		err(1, "can't malloc");
@@ -610,11 +626,11 @@ static int meminfo(int argc, char *argv[
 	return 0;
 }
 
-static int mtu_tab_op(int argc, char *argv[], int start_arg,
-		      const char *iff_name)
+static int
+mtu_tab_op(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_mtus m;
-	int i;
+	unsigned int i;
 
 	if (argc == start_arg) {
 		if (doit(iff_name, CHELSIO_GETMTUTAB, &m) < 0)
@@ -647,13 +663,14 @@ static int mtu_tab_op(int argc, char *ar
 }
 
 #ifdef CHELSIO_INTERNAL
-static void show_egress_cntxt(uint32_t data[])
+static void
+show_egress_cntxt(uint32_t data[])
 {
 	printf("credits:      %u\n", data[0] & 0x7fff);
 	printf("GTS:          %u\n", (data[0] >> 15) & 1);
 	printf("index:        %u\n", data[0] >> 16);
 	printf("queue size:   %u\n", data[1] & 0xffff);
-	printf("base address: 0x%llx\n",
+	printf("base address: 0x%" PRIx64 "\n",
 	       ((data[1] >> 16) | ((uint64_t)data[2] << 16) |
 	       (((uint64_t)data[3] & 0xf) << 48)) << 12);
 	printf("rsp queue #:  %u\n", (data[3] >> 4) & 7);
@@ -665,24 +682,26 @@ static void show_egress_cntxt(uint32_t d
 	printf("valid:        %u\n", (data[3] >> 31) & 1);
 }
 
-static void show_fl_cntxt(uint32_t data[])
+static void
+show_fl_cntxt(uint32_t data[])
 {
-	printf("base address: 0x%llx\n",
+	printf("base address: 0x%" PRIx64 "\n",
 	       ((uint64_t)data[0] | ((uint64_t)data[1] & 0xfffff) << 32) << 12);
 	printf("index:        %u\n", (data[1] >> 20) | ((data[2] & 0xf) << 12));
 	printf("queue size:   %u\n", (data[2] >> 4) & 0xffff);
 	printf("generation:   %u\n", (data[2] >> 20) & 1);
 	printf("entry size:   %u\n",
-	       ((data[2] >> 21) & 0x7ff) | (data[3] & 0x1fffff));
+	       (data[2] >> 21) | (data[3] & 0x1fffff) << 11);
 	printf("congest thr:  %u\n", (data[3] >> 21) & 0x3ff);
 	printf("GTS:          %u\n", (data[3] >> 31) & 1);
 }
 
-static void show_response_cntxt(uint32_t data[])
+static void
+show_response_cntxt(uint32_t data[])
 {
 	printf("index:        %u\n", data[0] & 0xffff);
 	printf("size:         %u\n", data[0] >> 16);
-	printf("base address: 0x%llx\n",
+	printf("base address: 0x%" PRIx64 "\n",
 	       ((uint64_t)data[1] | ((uint64_t)data[2] & 0xfffff) << 32) << 12);
 	printf("MSI-X/RspQ:   %u\n", (data[2] >> 20) & 0x3f);
 	printf("intr enable:  %u\n", (data[2] >> 26) & 1);
@@ -692,11 +711,12 @@ static void show_response_cntxt(uint32_t
 	printf("FL threshold: %u\n", data[3]);
 }
 
-static void show_cq_cntxt(uint32_t data[])
+static void
+show_cq_cntxt(uint32_t data[])
 {
 	printf("index:            %u\n", data[0] & 0xffff);
 	printf("size:             %u\n", data[0] >> 16);
-	printf("base address:     0x%llx\n",
+	printf("base address:     0x%" PRIx64 "\n",
 	       ((uint64_t)data[1] | ((uint64_t)data[2] & 0xfffff) << 32) << 12);
 	printf("rsp queue #:      %u\n", (data[2] >> 20) & 0x3f);
 	printf("AN:               %u\n", (data[2] >> 26) & 1);
@@ -708,8 +728,8 @@ static void show_cq_cntxt(uint32_t data[
 	printf("credit threshold: %u\n", data[3] >> 16);
 }
 
-static int get_sge_context(int argc, char *argv[], int start_arg,
-			   const char *iff_name)
+static int
+get_sge_context(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_cntxt ctx;
 
@@ -748,8 +768,8 @@ static int get_sge_context(int argc, cha
 
 #define ntohll(x) be64toh((x))
 
-static int get_sge_desc(int argc, char *argv[], int start_arg,
-			const char *iff_name)
+static int
+get_sge_desc(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	uint64_t *p, wr_hdr;
 	unsigned int n = 1, qset, qnum;
@@ -794,7 +814,8 @@ static int get_sge_desc(int argc, char *
 }
 #endif
 
-static int get_tcb2(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+get_tcb2(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	uint64_t *d;
 	unsigned int i;
@@ -833,8 +854,9 @@ static int get_tcb2(int argc, char *argv
 	return 0;
 }
 
-static int get_pm_page_spec(const char *s, unsigned int *page_size,
-			    unsigned int *num_pages)
+static int
+get_pm_page_spec(const char *s, unsigned int *page_size,
+    unsigned int *num_pages)
 {
 	char *p;
 	unsigned long val;
@@ -852,7 +874,8 @@ static int get_pm_page_spec(const char *
 	return *p;
 }
 
-static int conf_pm(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+conf_pm(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_pm pm;
 
@@ -882,8 +905,8 @@ static int conf_pm(int argc, char *argv[
 }
 
 #ifdef	CHELSIO_INTERNAL
-static int dump_tcam(int argc, char *argv[], int start_arg,
-		     const char *iff_name)
+static int
+dump_tcam(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	unsigned int nwords;
 	struct ch_tcam_word op;
@@ -905,7 +928,8 @@ static int dump_tcam(int argc, char *arg
 	return 0;
 }
 
-static void hexdump_8b(unsigned int start, uint64_t *data, unsigned int len)
+static void
+hexdump_8b(unsigned int start, uint64_t *data, unsigned int len)
 {
 	int i;
 
@@ -918,8 +942,8 @@ static void hexdump_8b(unsigned int star
 	}
 }
 
-static int dump_mc7(int argc, char *argv[], int start_arg,
-		    const char *iff_name)
+static int
+dump_mc7(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_mem_range mem;
 	unsigned int mem_id, addr, len;
@@ -957,10 +981,11 @@ static int dump_mc7(int argc, char *argv
 }
 #endif
 
-/* Max FW size is 32K including version, +4 bytes for the checksum. */
-#define MAX_FW_IMAGE_SIZE (32768 + 4)
+/* Max FW size is 64K including version, +4 bytes for the checksum. */
+#define MAX_FW_IMAGE_SIZE (64 * 1024)
 
-static int load_fw(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+load_fw(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	int fd, len;
 	struct ch_mem_range op;
@@ -977,12 +1002,13 @@ static int load_fw(int argc, char *argv[
 	if (!op.buf)
 		err(1, "load firmware");
 
-	op.len = read(fd, op.buf, MAX_FW_IMAGE_SIZE + 1);
-	if (op.len < 0)
+	len = read(fd, op.buf, MAX_FW_IMAGE_SIZE + 1);
+	if (len < 0)
 		err(1, "load firmware");
- 	if (op.len > MAX_FW_IMAGE_SIZE)
+ 	if (len > MAX_FW_IMAGE_SIZE)
 		errx(1, "FW image too large");
 
+	op.len = len;
 	if (doit(iff_name, CHELSIO_LOAD_FW, &op) < 0)
 		err(1, "load firmware");
 	return 0;
@@ -991,8 +1017,8 @@ static int load_fw(int argc, char *argv[
 /* Max BOOT size is 255*512 bytes including the BIOS boot ROM basic header */
 #define MAX_BOOT_IMAGE_SIZE (0xff * 512)
 
-static int load_boot(int argc, char *argv[],
-		     int start_arg, const char *iff_name)
+static int
+load_boot(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	int fd, len;
 	struct ch_mem_range op;
@@ -1022,7 +1048,8 @@ static int load_boot(int argc, char *arg
 	return 0;
 }
 
-static int dump_proto_sram(const char *iff_name)
+static int
+dump_proto_sram(const char *iff_name)
 {
 	int i, j;
 	uint8_t buf[PROTO_SRAM_SIZE];
@@ -1052,15 +1079,20 @@ static int dump_proto_sram(const char *i
 	return 0;
 }
 
-static int proto_sram_op(int argc, char *argv[], int start_arg,
+static int
+proto_sram_op(int argc, char *argv[], int start_arg,
 			 const char *iff_name)
 {
+	(void) argv;
+	(void) start_arg;
+
 	if (argc == start_arg)
 		return dump_proto_sram(iff_name);
 	return -1;
 }
 
-static int dump_qset_params(const char *iff_name)
+static int
+dump_qset_params(const char *iff_name)
 {
 	struct ch_qset_params qp;
 
@@ -1082,10 +1114,10 @@ static int dump_qset_params(const char *
 	return 0;
 }
 
-static int qset_config(int argc, char *argv[], int start_arg,
-		       const char *iff_name)
+static int
+qset_config(int argc, char *argv[], int start_arg, const char *iff_name)
 {
-	struct ch_qset_params qp;
+	(void) argv;
 
 	if (argc == start_arg)
 		return dump_qset_params(iff_name);
@@ -1093,11 +1125,13 @@ static int qset_config(int argc, char *a
 	return -1;
 }
 
-static int qset_num_config(int argc, char *argv[], int start_arg,
-			   const char *iff_name)
+static int
+qset_num_config(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_reg reg;
 
+	(void) argv;
+
 	if (argc == start_arg) {
 		if (doit(iff_name, CHELSIO_GET_QSET_NUM, ®) < 0)
 			err(1, "get qsets");
@@ -1111,7 +1145,8 @@ static int qset_num_config(int argc, cha
 /*
  * Parse a string containing an IP address with an optional network prefix.
  */
-static int parse_ipaddr(const char *s, uint32_t *addr, uint32_t *mask)
+static int
+parse_ipaddr(const char *s, uint32_t *addr, uint32_t *mask)
 {
 	char *p, *slash;
 	struct in_addr ia;
@@ -1141,7 +1176,8 @@ static int parse_ipaddr(const char *s, u
 /*
  * Parse a string containing a value and an optional colon separated mask.
  */
-static int parse_val_mask_param(const char *s, uint32_t *val, uint32_t *mask)
+static int
+parse_val_mask_param(const char *s, uint32_t *val, uint32_t *mask)
 {
 	char *p;
 
@@ -1154,14 +1190,15 @@ static int parse_val_mask_param(const ch
 	return *p ? -1 : 0;
 }
 
-static int parse_trace_param(const char *s, uint32_t *val, uint32_t *mask)
+static int
+parse_trace_param(const char *s, uint32_t *val, uint32_t *mask)
 {
 	return strchr(s, '.') ? parse_ipaddr(s, val, mask) :
 				parse_val_mask_param(s, val, mask);
 }
 
-static int trace_config(int argc, char *argv[], int start_arg,
-			const char *iff_name)
+static int
+trace_config(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	uint32_t val, mask;
 	struct ch_trace trace;
@@ -1236,7 +1273,8 @@ static int trace_config(int argc, char *
 	return 0;
 }
 
-static int get_sched_param(int argc, char *argv[], int pos, unsigned int *valp)
+static int
+get_sched_param(int argc, char *argv[], int pos, unsigned int *valp)
 {
 	if (pos + 1 >= argc)
 		errx(1, "missing value for %s", argv[pos]);
@@ -1245,7 +1283,8 @@ static int get_sched_param(int argc, cha
 	return 0;
 }
 
-static int tx_sched(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+tx_sched(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_hw_sched op;
 	unsigned int idx, val;
@@ -1291,7 +1330,8 @@ static int tx_sched(int argc, char *argv
 	return 0;
 }
 
-static int pktsched(int argc, char *argv[], int start_arg, const char *iff_name)
+static int
+pktsched(int argc, char *argv[], int start_arg, const char *iff_name)
 {
 	struct ch_pktsched_params op;
 	unsigned int idx, min = -1, max, binding = -1;
@@ -1330,35 +1370,101 @@ static int pktsched(int argc, char *argv
 
 	return 0;
 }
-static int clear_stats(int argc, char *argv[], int start_arg,
-		       const char *iff_name)
+
+static int
+clear_stats(int argc, char *argv[], int start_arg, const char *iff_name)
 {
+	(void) argc;
+	(void) argv;
+	(void) start_arg;
+
 	if (doit(iff_name, CHELSIO_CLEAR_STATS, NULL) < 0)
 		 err(1, "clearstats");
 
 	return 0;
 }
 
-int main(int argc, char *argv[])
+static int
+get_up_la(int argc, char *argv[], int start_arg, const char *iff_name)
 {
-	int r = -1;
-	const char *iff_name;
+	struct ch_up_la la;
+	int i, idx, max_idx, entries;
 
-	progname = argv[0];
+	(void) argc;
+	(void) argv;
+	(void) start_arg;
+
+	la.stopped = 0;
+	la.idx = -1;
+	la.bufsize = LA_BUFSIZE;
+	la.data = malloc(la.bufsize);
+	if (!la.data)
+		err(1, "uP_LA malloc");
+
+	if (doit(iff_name, CHELSIO_GET_UP_LA, &la) < 0)
+		 err(1, "uP_LA");
+
+	if (la.stopped)
+		printf("LA is not running\n");
+
+	entries = la.bufsize / 4;
+	idx = (int)la.idx;
+	max_idx = (entries / 4) - 1;
+	for (i = 0; i < max_idx; i++) {
+		printf("%04x %08x %08x\n",
+		       la.data[idx], la.data[idx+2], la.data[idx+1]);
+		idx = (idx + 4) & (entries - 1);
+	}
 
-	if (argc == 2) {
-		if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))
-			usage(stdout);
-		if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version")) {
-			printf("%s version %s\n", PROGNAME, VERSION);
-			printf("%s\n", COPYRIGHT);
-			exit(0);
-		}
+	return 0;
+}
+
+static int
+get_up_ioqs(int argc, char *argv[], int start_arg, const char *iff_name)
+{
+	struct ch_up_ioqs ioqs;
+	int i, entries;
+
+	(void) argc;
+	(void) argv;
+	(void) start_arg;
+
+	bzero(&ioqs, sizeof(ioqs));
+	ioqs.bufsize = IOQS_BUFSIZE;
+	ioqs.data = malloc(IOQS_BUFSIZE);
+	if (!ioqs.data)
+		err(1, "uP_IOQs malloc");
+
+	if (doit(iff_name, CHELSIO_GET_UP_IOQS, &ioqs) < 0)
+		 err(1, "uP_IOQs");
+
+	printf("ioq_rx_enable   : 0x%08x\n", ioqs.ioq_rx_enable);
+	printf("ioq_tx_enable   : 0x%08x\n", ioqs.ioq_tx_enable);
+	printf("ioq_rx_status   : 0x%08x\n", ioqs.ioq_rx_status);
+	printf("ioq_tx_status   : 0x%08x\n", ioqs.ioq_tx_status);
+	
+	entries = ioqs.bufsize / sizeof(struct t3_ioq_entry);
+	for (i = 0; i < entries; i++) {
+		printf("\nioq[%d].cp       : 0x%08x\n", i,
+		       ioqs.data[i].ioq_cp);
+		printf("ioq[%d].pp       : 0x%08x\n", i,
+		       ioqs.data[i].ioq_pp);
+		printf("ioq[%d].alen     : 0x%08x\n", i,
+		       ioqs.data[i].ioq_alen);
+		printf("ioq[%d].stats    : 0x%08x\n", i,
+		       ioqs.data[i].ioq_stats);
+		printf("  sop %u\n", ioqs.data[i].ioq_stats >> 16);
+		printf("  eop %u\n", ioqs.data[i].ioq_stats  & 0xFFFF);
 	}
 
-	if (argc < 3) usage(stderr);
+	return 0;
+}
+
+static int
+run_cmd(int argc, char *argv[], const char *iff_name)
+{
+	int r = -1;
 
-	iff_name = argv[1];
 	if (!strcmp(argv[2], "reg"))
 		r = register_io(argc, argv, 3, iff_name);
 	else if (!strcmp(argv[2], "mdio"))
@@ -1397,9 +1503,92 @@ int main(int argc, char *argv[])
 		r = get_tcb2(argc, argv, 3, iff_name);
 	else if (!strcmp(argv[2], "clearstats"))
 		r = clear_stats(argc, argv, 3, iff_name);
+	else if (!strcmp(argv[2], "la"))
+		r = get_up_la(argc, argv, 3, iff_name);
+	else if (!strcmp(argv[2], "ioqs"))
+		r = get_up_ioqs(argc, argv, 3, iff_name);
 
 	if (r == -1)
 		usage(stderr);
 
-	return 0;
+	return (0);
+}
+
+static int
+run_cmd_loop(int argc, char *argv[], const char *iff_name)
+{
+	int n;
+	unsigned int i;
+	char buf[64];
+	char *args[8], *s;
+
+	(void) argc;
+	args[0] = argv[0];
+	args[1] = argv[1];
+
+	/*
+	 * Fairly simplistic loop.  Displays a "> " prompt and processes any
+	 * input as a cxgbtool command.  You're supposed to enter only the part
+	 * after "cxgbtool cxgbX".  Use "quit" or "exit" to exit.  Any error in
+	 * the command will also terminate cxgbtool.
+	 */
+	for (;;) {
+		fprintf(stdout, "> ");
+		fflush(stdout);
+		n = read(STDIN_FILENO, buf, sizeof(buf) - 1);
+		if (n <= 0)
+			return (0);
+
+		if (buf[--n] != '\n')
+			continue;
+		else
+			buf[n] = 0;
+
+		s = &buf[0];
+		for (i = 2; i < sizeof(args)/sizeof(args[0]) - 1; i++) {
+			while (s && (*s == ' ' || *s == '\t'))
+				s++;
+			if ((args[i] = strsep(&s, " \t")) == NULL)
+				break;
+		}
+		args[sizeof(args)/sizeof(args[0]) - 1] = 0;
+
+		if (!strcmp(args[2], "quit") || !strcmp(args[2], "exit"))
+			return (0);
+
+		(void) run_cmd(i, args, iff_name);
+	}
+
+	/* Can't really get here */
+	return (0);
+}
+
+int
+main(int argc, char *argv[])
+{
+	int r = -1;
+	const char *iff_name;
+
+	progname = argv[0];
+
+	if (argc == 2) {
+		if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))
+			usage(stdout);
+		if (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version")) {
+			printf("%s version %s\n", PROGNAME, VERSION);
+			printf("%s\n", COPYRIGHT);
+			exit(0);
+		}
+	}
+
+	if (argc < 3) usage(stderr);
+
+	iff_name = argv[1];
+
+	if (argc == 3 && !strcmp(argv[2], "stdio"))
+		r = run_cmd_loop(argc, argv, iff_name);
+	else
+		r = run_cmd(argc, argv, iff_name);
+
+	return (r);
 }

Modified: stable/7/usr.sbin/cxgbtool/reg_defs.c
==============================================================================
--- stable/7/usr.sbin/cxgbtool/reg_defs.c	Tue Apr  6 01:14:49 2010	(r206236)
+++ stable/7/usr.sbin/cxgbtool/reg_defs.c	Tue Apr  6 01:17:47 2010	(r206237)
@@ -106,7 +106,7 @@ struct reg_info sge_regs[] = {
 		{ "Packet_Too_Big", 3, 1 },
 		{ "Packet_Mismatch", 4, 1 },
 	{ "SG_RESPACCUTIMER", 0xc0, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc3_regs[] = {
@@ -196,7 +196,7 @@ struct reg_info mc3_regs[] = {
 		{ "MC3_Uncorr_Err", 1, 1 },
 		{ "MC3_Parity_Err", 2, 8 },
 		{ "MC3_Addr_Err", 10, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc4_regs[] = {
@@ -276,7 +276,7 @@ struct reg_info mc4_regs[] = {
 		{ "MC4_Corr_Err", 0, 1 },
 		{ "MC4_Uncorr_Err", 1, 1 },
 		{ "MC4_Addr_Err", 2, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info tpi_regs[] = {
@@ -290,7 +290,7 @@ struct reg_info tpi_regs[] = {
 		{ "INT_DIR", 31, 1 },
 	{ "TPI_PAR", 0x29c, 0 },
 		{ "TPIPAR", 0, 7 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info tp_regs[] = {
@@ -509,7 +509,7 @@ struct reg_info tp_regs[] = {
 		{ "DROP_TICKS_CNT", 4, 26 },
 		{ "NUM_PKTS_DROPPED", 0, 4 },
 	{ "TP_TX_DROP_COUNT", 0x4bc, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info rat_regs[] = {
@@ -532,7 +532,7 @@ struct reg_info rat_regs[] = {
 		{ "CspiFramingError", 1, 1 },
 		{ "SgeFramingError", 2, 1 },
 		{ "TpFramingError", 3, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info cspi_regs[] = {
@@ -560,7 +560,7 @@ struct reg_info cspi_regs[] = {
 		{ "TXDrop", 2, 1 },
 		{ "RXOverflow", 3, 1 },
 		{ "RAMParityErr", 4, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info espi_regs[] = {
@@ -660,7 +660,7 @@ struct reg_info espi_regs[] = {
 		{ "Error_Ack", 9, 1 },
 		{ "Unmapped_Err", 10, 1 },
 		{ "Transaction_Timer", 16, 8 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info ulp_regs[] = {
@@ -682,7 +682,7 @@ struct reg_info ulp_regs[] = {
 		{ "Pm_E2C_Wrt_Full", 24, 1 },
 		{ "Pm_C2E_Wrt_Full", 25, 1 },
 	{ "ULP_PIO_CTRL", 0x998, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pl_regs[] = {
@@ -712,7 +712,7 @@ struct reg_info pl_regs[] = {
 		{ "PL_Intr_CSPI", 9, 1 },
 		{ "PL_Intr_PCIX", 10, 1 },
 		{ "PL_Intr_EXT", 11, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc5_regs[] = {
@@ -833,5 +833,5 @@ struct reg_info mc5_regs[] = {
 	{ "MC5_DATA_WRITE_CMD", 0xcf4, 0 },
 	{ "MC5_DATA_READ_CMD", 0xcf8, 0 },
 	{ "MC5_MASK_WRITE_CMD", 0xcfc, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };

Modified: stable/7/usr.sbin/cxgbtool/reg_defs_t3.c
==============================================================================
--- stable/7/usr.sbin/cxgbtool/reg_defs_t3.c	Tue Apr  6 01:14:49 2010	(r206236)
+++ stable/7/usr.sbin/cxgbtool/reg_defs_t3.c	Tue Apr  6 01:17:47 2010	(r206237)
@@ -140,7 +140,7 @@ struct reg_info sge3_regs[] = {
 		{ "DrbPriThrsh", 0, 16 },
 	{ "SG_DEBUG_INDEX", 0x78, 0 },
 	{ "SG_DEBUG_DATA", 0x7c, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pcix1_regs[] = {
@@ -212,7 +212,7 @@ struct reg_info pcix1_regs[] = {
 		{ "WakeUp0", 2, 1 },
 		{ "SleepMode1", 1, 1 },
 		{ "SleepMode0", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pcie0_regs[] = {
@@ -411,7 +411,7 @@ struct reg_info pcie0_regs[] = {
 		{ "BISTDone", 24, 8 },
 		{ "BISTCycleThresh", 3, 16 },
 		{ "BISTMode", 0, 3 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info t3dbg_regs[] = {
@@ -557,7 +557,7 @@ struct reg_info t3dbg_regs[] = {
 		{ "PMON_CDEL_MANUAL", 4, 1 },
 		{ "PMON_MANUAL", 1, 1 },
 		{ "PMON_AUTO", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc7_pmrx_regs[] = {
@@ -674,7 +674,7 @@ struct reg_info mc7_pmrx_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc7_pmtx_regs[] = {
@@ -791,7 +791,7 @@ struct reg_info mc7_pmtx_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mc7_cm_regs[] = {
@@ -908,7 +908,7 @@ struct reg_info mc7_cm_regs[] = {
 		{ "PE", 2, 15 },
 		{ "UE", 1, 1 },
 		{ "CE", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info cim_regs[] = {
@@ -1024,7 +1024,7 @@ struct reg_info cim_regs[] = {
 	{ "CIM_CDEBUGDATA", 0x2d0, 0 },
 		{ "CDebugDataH", 16, 16 },
 		{ "CDebugDataL", 0, 16 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info tp1_regs[] = {
@@ -1384,7 +1384,7 @@ struct reg_info tp1_regs[] = {
 	{ "TP_EMBED_OP_FIELD3", 0x4f4, 0 },
 	{ "TP_EMBED_OP_FIELD4", 0x4f8, 0 },
 	{ "TP_EMBED_OP_FIELD5", 0x4fc, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info ulp2_rx_regs[] = {
@@ -1428,7 +1428,7 @@ struct reg_info ulp2_rx_regs[] = {
 	{ "ULPRX_RQ_ULIMIT", 0x538, 0 },
 	{ "ULPRX_PBL_LLIMIT", 0x53c, 0 },
 	{ "ULPRX_PBL_ULIMIT", 0x540, 0 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info ulp2_tx_regs[] = {
@@ -1456,7 +1456,7 @@ struct reg_info ulp2_tx_regs[] = {
 	{ "ULPTX_DMA_WEIGHT", 0x5ac, 0 },
 		{ "D1_WEIGHT", 16, 16 },
 		{ "D0_WEIGHT", 0, 16 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pm1_rx_regs[] = {
@@ -1500,7 +1500,7 @@ struct reg_info pm1_rx_regs[] = {
 		{ "ocspi1_ofifo2x_Tx_framing_error", 6, 1 },
 		{ "iespi_par_error", 3, 3 },
 		{ "ocspi_par_error", 0, 3 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info pm1_tx_regs[] = {
@@ -1544,7 +1544,7 @@ struct reg_info pm1_tx_regs[] = {
 		{ "oespi1_ofifo2x_Tx_framing_error", 6, 1 },
 		{ "icspi_par_error", 3, 3 },
 		{ "oespi_par_error", 0, 3 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mps0_regs[] = {
@@ -1585,7 +1585,7 @@ struct reg_info mps0_regs[] = {
 		{ "RXTpParErr", 4, 2 },
 		{ "TX1TpParErr", 2, 2 },
 		{ "TX0TpParErr", 0, 2 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info cpl_switch_regs[] = {
@@ -1616,7 +1616,7 @@ struct reg_info cpl_switch_regs[] = {
 		{ "cpl_map_tbl_idx", 0, 8 },
 	{ "CPL_MAP_TBL_DATA", 0x65c, 0 },
 		{ "cpl_map_tbl_data", 0, 8 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info smb0_regs[] = {
@@ -1682,7 +1682,7 @@ struct reg_info smb0_regs[] = {
 		{ "DebugDataL", 0, 16 },
 	{ "SMB_DEBUG_LA", 0x69c, 0 },
 		{ "DebugLAReqAddr", 0, 10 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info i2cm0_regs[] = {
@@ -1695,7 +1695,7 @@ struct reg_info i2cm0_regs[] = {
 		{ "Ack", 30, 1 },
 		{ "Cont", 1, 1 },
 		{ "Op", 0, 1 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info mi1_regs[] = {
@@ -1714,7 +1714,7 @@ struct reg_info mi1_regs[] = {
 		{ "Busy", 31, 1 },
 		{ "Inc", 2, 1 },
 		{ "Op", 0, 2 },
-	{ NULL }
+	{ NULL, 0, 0 }
 };
 
 struct reg_info jm1_regs[] = {
@@ -1727,7 +1727,7 @@ struct reg_info jm1_regs[] = {
 	{ "JM_OP", 0x6cc, 0 },
 		{ "Busy", 31, 1 },
 		{ "Cnt", 0, 5 },

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 02:49:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8401D106564A;
	Tue,  6 Apr 2010 02:49:01 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7296C8FC1B;
	Tue,  6 Apr 2010 02:49:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o362n18U022343;
	Tue, 6 Apr 2010 02:49:01 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o362n1xP022309;
	Tue, 6 Apr 2010 02:49:01 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201004060249.o362n1xP022309@svn.freebsd.org>
From: Warner Losh 
Date: Tue, 6 Apr 2010 02:48:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206241 - head/usr.bin/make
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 02:49:01 -0000

Author: imp
Date: Tue Apr  6 02:48:59 2010
New Revision: 206241
URL: http://svn.freebsd.org/changeset/base/206241

Log:
  Remove yet another vestage of alpha support.

Modified:
  head/usr.bin/make/main.c

Modified: head/usr.bin/make/main.c
==============================================================================
--- head/usr.bin/make/main.c	Tue Apr  6 01:42:21 2010	(r206240)
+++ head/usr.bin/make/main.c	Tue Apr  6 02:48:59 2010	(r206241)
@@ -983,8 +983,6 @@ main(int argc, char **argv)
 	if ((machine_cpu = getenv("MACHINE_CPU")) == NULL) {
 		if (!strcmp(machine_arch, "i386"))
 			machine_cpu = "i386";
-		else if (!strcmp(machine_arch, "alpha"))
-			machine_cpu = "ev4";
 		else
 			machine_cpu = "unknown";
 	}

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 03:07:39 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 87DBA1065672;
	Tue,  6 Apr 2010 03:07:39 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 72DB18FC16;
	Tue,  6 Apr 2010 03:07:39 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3637dA6026620;
	Tue, 6 Apr 2010 03:07:39 GMT (envelope-from np@svn.freebsd.org)
Received: (from np@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3637daO026617;
	Tue, 6 Apr 2010 03:07:39 GMT (envelope-from np@svn.freebsd.org)
Message-Id: <201004060307.o3637daO026617@svn.freebsd.org>
From: Navdeep Parhar 
Date: Tue, 6 Apr 2010 03:07:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206242 - in stable/7/sys/dev/cxgb: . common
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 03:07:39 -0000

Author: np
Date: Tue Apr  6 03:07:39 2010
New Revision: 206242
URL: http://svn.freebsd.org/changeset/base/206242

Log:
  MFC r204921,r205944,r205945,r205946
  
  r204921: Better TwinAx transceiver detection.
  r205944: Refresh the firmware version immediately after it is upgraded (or downgraded).
  r205945: Improved PHY EDC settings.
  r205946: Do not attempt to retrieve interrupt information before it is available.

Modified:
  stable/7/sys/dev/cxgb/common/cxgb_ael1002.c
  stable/7/sys/dev/cxgb/cxgb_main.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/cxgb/common/cxgb_ael1002.c
==============================================================================
--- stable/7/sys/dev/cxgb/common/cxgb_ael1002.c	Tue Apr  6 02:48:59 2010	(r206241)
+++ stable/7/sys/dev/cxgb/common/cxgb_ael1002.c	Tue Apr  6 03:07:39 2010	(r206242)
@@ -450,7 +450,7 @@ static int ael2xxx_get_module_type(struc
 			return v;
 
 		if (v == 0x1)
-			return phy_modtype_twinax;
+			goto twinax;
 		if (v == 0x10)
 			return phy_modtype_sr;
 		if (v == 0x20)
@@ -458,6 +458,17 @@ static int ael2xxx_get_module_type(struc
 		if (v == 0x40)
 			return phy_modtype_lrm;
 
+		v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 8);
+		if (v < 0)
+			return v;
+		if (v == 4) {
+			v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 60);
+			if (v < 0)
+				return v;
+			if (v & 0x1)
+				goto twinax;
+		}
+
 		v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 6);
 		if (v < 0)
 			return v;
@@ -469,6 +480,7 @@ static int ael2xxx_get_module_type(struc
 			return v;
 
 		if (v & 0x80) {
+twinax:
 			v = ael_i2c_rd(phy, MODULE_DEV_ADDR, 0x12);
 			if (v < 0)
 				return v;
@@ -1439,395 +1451,439 @@ static int ael2020_setup_twinax_edc(stru
 		0xd803, 0x40aa,
 		0xd804, 0x401c,
 		0xd805, 0x401e,
-		0xd806, 0x2ff4,
-		0xd807, 0x3dc4,
-		0xd808, 0x2035,
-		0xd809, 0x3035,
-		0xd80a, 0x6524,
-		0xd80b, 0x2cb2,
-		0xd80c, 0x3012,
-		0xd80d, 0x1002,
-		0xd80e, 0x26e2,
-		0xd80f, 0x3022,
-		0xd810, 0x1002,
-		0xd811, 0x27d2,
-		0xd812, 0x3022,
+		0xd806, 0x20c5,
+		0xd807, 0x3c05,
+		0xd808, 0x6536,
+		0xd809, 0x2fe4,
+		0xd80a, 0x3dc4,
+		0xd80b, 0x6624,
+		0xd80c, 0x2ff4,
+		0xd80d, 0x3dc4,
+		0xd80e, 0x2035,
+		0xd80f, 0x30a5,
+		0xd810, 0x6524,
+		0xd811, 0x2ca2,
+		0xd812, 0x3012,
 		0xd813, 0x1002,
-		0xd814, 0x2822,
-		0xd815, 0x3012,
+		0xd814, 0x27e2,
+		0xd815, 0x3022,
 		0xd816, 0x1002,
-		0xd817, 0x2492,
+		0xd817, 0x28d2,
 		0xd818, 0x3022,
 		0xd819, 0x1002,
-		0xd81a, 0x2772,
+		0xd81a, 0x2892,
 		0xd81b, 0x3012,
 		0xd81c, 0x1002,
-		0xd81d, 0x23d2,
+		0xd81d, 0x24e2,
 		0xd81e, 0x3022,
 		0xd81f, 0x1002,
-		0xd820, 0x22cd,
-		0xd821, 0x301d,
-		0xd822, 0x27f2,
-		0xd823, 0x3022,
-		0xd824, 0x1002,
-		0xd825, 0x5553,
-		0xd826, 0x0307,
-		0xd827, 0x2522,
-		0xd828, 0x3022,
-		0xd829, 0x1002,
-		0xd82a, 0x2142,
-		0xd82b, 0x3012,
-		0xd82c, 0x1002,
-		0xd82d, 0x4016,
-		0xd82e, 0x5e63,
-		0xd82f, 0x0344,
-		0xd830, 0x2142,
+		0xd820, 0x27e2,
+		0xd821, 0x3012,
+		0xd822, 0x1002,
+		0xd823, 0x2422,
+		0xd824, 0x3022,
+		0xd825, 0x1002,
+		0xd826, 0x22cd,
+		0xd827, 0x301d,
+		0xd828, 0x28f2,
+		0xd829, 0x3022,
+		0xd82a, 0x1002,
+		0xd82b, 0x5553,
+		0xd82c, 0x0307,
+		0xd82d, 0x2572,
+		0xd82e, 0x3022,
+		0xd82f, 0x1002,
+		0xd830, 0x21a2,
 		0xd831, 0x3012,
 		0xd832, 0x1002,
-		0xd833, 0x400e,
-		0xd834, 0x2522,
-		0xd835, 0x3022,
-		0xd836, 0x1002,
-		0xd837, 0x2b52,
-		0xd838, 0x3012,
-		0xd839, 0x1002,
-		0xd83a, 0x2742,
+		0xd833, 0x4016,
+		0xd834, 0x5e63,
+		0xd835, 0x0344,
+		0xd836, 0x21a2,
+		0xd837, 0x3012,
+		0xd838, 0x1002,
+		0xd839, 0x400e,
+		0xd83a, 0x2572,
 		0xd83b, 0x3022,
 		0xd83c, 0x1002,
-		0xd83d, 0x25e2,
-		0xd83e, 0x3022,
+		0xd83d, 0x2b22,
+		0xd83e, 0x3012,
 		0xd83f, 0x1002,
-		0xd840, 0x2fa4,
-		0xd841, 0x3dc4,
-		0xd842, 0x6624,
-		0xd843, 0x414b,
-		0xd844, 0x56b3,
-		0xd845, 0x03c6,
-		0xd846, 0x866b,
-		0xd847, 0x400c,
-		0xd848, 0x2712,
-		0xd849, 0x3012,
-		0xd84a, 0x1002,
-		0xd84b, 0x2c4b,
-		0xd84c, 0x309b,
-		0xd84d, 0x56b3,
-		0xd84e, 0x03c3,
-		0xd84f, 0x866b,
-		0xd850, 0x400c,
-		0xd851, 0x2272,
-		0xd852, 0x3022,
-		0xd853, 0x1002,
-		0xd854, 0x2742,
-		0xd855, 0x3022,
-		0xd856, 0x1002,
-		0xd857, 0x25e2,
-		0xd858, 0x3022,
-		0xd859, 0x1002,
-		0xd85a, 0x2fb4,
-		0xd85b, 0x3dc4,
-		0xd85c, 0x6624,
-		0xd85d, 0x56b3,
-		0xd85e, 0x03c3,
-		0xd85f, 0x866b,
-		0xd860, 0x401c,
-		0xd861, 0x2c45,
-		0xd862, 0x3095,
-		0xd863, 0x5b53,
-		0xd864, 0x2372,
-		0xd865, 0x3012,
-		0xd866, 0x13c2,
-		0xd867, 0x5cc3,
-		0xd868, 0x2712,
-		0xd869, 0x3012,
-		0xd86a, 0x1312,
-		0xd86b, 0x2b52,
+		0xd840, 0x2842,
+		0xd841, 0x3022,
+		0xd842, 0x1002,
+		0xd843, 0x26e2,
+		0xd844, 0x3022,
+		0xd845, 0x1002,
+		0xd846, 0x2fa4,
+		0xd847, 0x3dc4,
+		0xd848, 0x6624,
+		0xd849, 0x2e8b,
+		0xd84a, 0x303b,
+		0xd84b, 0x56b3,
+		0xd84c, 0x03c6,
+		0xd84d, 0x866b,
+		0xd84e, 0x400c,
+		0xd84f, 0x2782,
+		0xd850, 0x3012,
+		0xd851, 0x1002,
+		0xd852, 0x2c4b,
+		0xd853, 0x309b,
+		0xd854, 0x56b3,
+		0xd855, 0x03c3,
+		0xd856, 0x866b,
+		0xd857, 0x400c,
+		0xd858, 0x22a2,
+		0xd859, 0x3022,
+		0xd85a, 0x1002,
+		0xd85b, 0x2842,
+		0xd85c, 0x3022,
+		0xd85d, 0x1002,
+		0xd85e, 0x26e2,
+		0xd85f, 0x3022,
+		0xd860, 0x1002,
+		0xd861, 0x2fb4,
+		0xd862, 0x3dc4,
+		0xd863, 0x6624,
+		0xd864, 0x56b3,
+		0xd865, 0x03c3,
+		0xd866, 0x866b,
+		0xd867, 0x401c,
+		0xd868, 0x2c45,
+		0xd869, 0x3095,
+		0xd86a, 0x5b53,
+		0xd86b, 0x23d2,
 		0xd86c, 0x3012,
-		0xd86d, 0x1002,
-		0xd86e, 0x2742,
-		0xd86f, 0x3022,
-		0xd870, 0x1002,
-		0xd871, 0x2582,
-		0xd872, 0x3022,
-		0xd873, 0x1002,
-		0xd874, 0x2142,
-		0xd875, 0x3012,
-		0xd876, 0x1002,
-		0xd877, 0x628f,
-		0xd878, 0x2985,
-		0xd879, 0x33a5,
-		0xd87a, 0x25e2,
-		0xd87b, 0x3022,
-		0xd87c, 0x1002,
-		0xd87d, 0x5653,
-		0xd87e, 0x03d2,
-		0xd87f, 0x401e,
-		0xd880, 0x6f72,
-		0xd881, 0x1002,
-		0xd882, 0x628f,
-		0xd883, 0x2304,
-		0xd884, 0x3c84,
-		0xd885, 0x6436,
-		0xd886, 0xdff4,
-		0xd887, 0x6436,
-		0xd888, 0x2ff5,
-		0xd889, 0x3005,
-		0xd88a, 0x8656,
-		0xd88b, 0xdfba,
-		0xd88c, 0x56a3,
-		0xd88d, 0xd05a,
-		0xd88e, 0x2972,
-		0xd88f, 0x3012,
-		0xd890, 0x1392,
-		0xd891, 0xd05a,
-		0xd892, 0x56a3,
-		0xd893, 0xdfba,
-		0xd894, 0x0383,
-		0xd895, 0x6f72,
-		0xd896, 0x1002,
-		0xd897, 0x2b45,
-		0xd898, 0x3005,
-		0xd899, 0x4178,
-		0xd89a, 0x5653,
-		0xd89b, 0x0384,
-		0xd89c, 0x2a62,
-		0xd89d, 0x3012,
-		0xd89e, 0x1002,
-		0xd89f, 0x2f05,
-		0xd8a0, 0x3005,
-		0xd8a1, 0x41c8,
-		0xd8a2, 0x5653,
-		0xd8a3, 0x0382,
-		0xd8a4, 0x0002,
-		0xd8a5, 0x4218,
-		0xd8a6, 0x2474,
-		0xd8a7, 0x3c84,
-		0xd8a8, 0x6437,
-		0xd8a9, 0xdff4,
-		0xd8aa, 0x6437,
-		0xd8ab, 0x2ff5,
-		0xd8ac, 0x3c05,
-		0xd8ad, 0x8757,
-		0xd8ae, 0xb888,
-		0xd8af, 0x9787,
-		0xd8b0, 0xdff4,
-		0xd8b1, 0x6724,
-		0xd8b2, 0x866a,
-		0xd8b3, 0x6f72,
-		0xd8b4, 0x1002,
-		0xd8b5, 0x2641,
-		0xd8b6, 0x3021,
-		0xd8b7, 0x1001,
-		0xd8b8, 0xc620,
-		0xd8b9, 0x0000,
-		0xd8ba, 0xc621,
-		0xd8bb, 0x0000,
-		0xd8bc, 0xc622,
-		0xd8bd, 0x00ce,
-		0xd8be, 0xc623,
-		0xd8bf, 0x007f,
-		0xd8c0, 0xc624,
-		0xd8c1, 0x0032,
-		0xd8c2, 0xc625,
-		0xd8c3, 0x0000,
-		0xd8c4, 0xc627,
-		0xd8c5, 0x0000,
-		0xd8c6, 0xc628,
-		0xd8c7, 0x0000,
-		0xd8c8, 0xc62c,
+		0xd86d, 0x13c2,
+		0xd86e, 0x5cc3,
+		0xd86f, 0x2782,
+		0xd870, 0x3012,
+		0xd871, 0x1312,
+		0xd872, 0x2b22,
+		0xd873, 0x3012,
+		0xd874, 0x1002,
+		0xd875, 0x2842,
+		0xd876, 0x3022,
+		0xd877, 0x1002,
+		0xd878, 0x2622,
+		0xd879, 0x3022,
+		0xd87a, 0x1002,
+		0xd87b, 0x21a2,
+		0xd87c, 0x3012,
+		0xd87d, 0x1002,
+		0xd87e, 0x628f,
+		0xd87f, 0x2985,
+		0xd880, 0x33a5,
+		0xd881, 0x26e2,
+		0xd882, 0x3022,
+		0xd883, 0x1002,
+		0xd884, 0x5653,
+		0xd885, 0x03d2,
+		0xd886, 0x401e,
+		0xd887, 0x6f72,
+		0xd888, 0x1002,
+		0xd889, 0x628f,
+		0xd88a, 0x2304,
+		0xd88b, 0x3c84,
+		0xd88c, 0x6436,
+		0xd88d, 0xdff4,
+		0xd88e, 0x6436,
+		0xd88f, 0x2ff5,
+		0xd890, 0x3005,
+		0xd891, 0x8656,
+		0xd892, 0xdfba,
+		0xd893, 0x56a3,
+		0xd894, 0xd05a,
+		0xd895, 0x29e2,
+		0xd896, 0x3012,
+		0xd897, 0x1392,
+		0xd898, 0xd05a,
+		0xd899, 0x56a3,
+		0xd89a, 0xdfba,
+		0xd89b, 0x0383,
+		0xd89c, 0x6f72,
+		0xd89d, 0x1002,
+		0xd89e, 0x2a64,
+		0xd89f, 0x3014,
+		0xd8a0, 0x2005,
+		0xd8a1, 0x3d75,
+		0xd8a2, 0xc451,
+		0xd8a3, 0x29a2,
+		0xd8a4, 0x3022,
+		0xd8a5, 0x1002,
+		0xd8a6, 0x178c,
+		0xd8a7, 0x1898,
+		0xd8a8, 0x19a4,
+		0xd8a9, 0x1ab0,
+		0xd8aa, 0x1bbc,
+		0xd8ab, 0x1cc8,
+		0xd8ac, 0x1dd3,
+		0xd8ad, 0x1ede,
+		0xd8ae, 0x1fe9,
+		0xd8af, 0x20f4,
+		0xd8b0, 0x21ff,
+		0xd8b1, 0x0000,
+		0xd8b2, 0x2741,
+		0xd8b3, 0x3021,
+		0xd8b4, 0x1001,
+		0xd8b5, 0xc620,
+		0xd8b6, 0x0000,
+		0xd8b7, 0xc621,
+		0xd8b8, 0x0000,
+		0xd8b9, 0xc622,
+		0xd8ba, 0x00e2,
+		0xd8bb, 0xc623,
+		0xd8bc, 0x007f,
+		0xd8bd, 0xc624,
+		0xd8be, 0x00ce,
+		0xd8bf, 0xc625,
+		0xd8c0, 0x0000,
+		0xd8c1, 0xc627,
+		0xd8c2, 0x0000,
+		0xd8c3, 0xc628,
+		0xd8c4, 0x0000,
+		0xd8c5, 0xc90a,
+		0xd8c6, 0x3a7c,
+		0xd8c7, 0xc62c,
+		0xd8c8, 0x0000,
 		0xd8c9, 0x0000,
-		0xd8ca, 0x0000,
-		0xd8cb, 0x2641,
-		0xd8cc, 0x3021,
-		0xd8cd, 0x1001,
-		0xd8ce, 0xc502,
-		0xd8cf, 0x53ac,
-		0xd8d0, 0xc503,
-		0xd8d1, 0x2cd3,
-		0xd8d2, 0xc600,
-		0xd8d3, 0x2a6e,
-		0xd8d4, 0xc601,
-		0xd8d5, 0x2a2c,
-		0xd8d6, 0xc605,
-		0xd8d7, 0x5557,
-		0xd8d8, 0xc60c,
-		0xd8d9, 0x5400,
-		0xd8da, 0xc710,
-		0xd8db, 0x0700,
-		0xd8dc, 0xc711,
-		0xd8dd, 0x0f06,
-		0xd8de, 0xc718,
-		0xd8df, 0x0700,
-		0xd8e0, 0xc719,
-		0xd8e1, 0x0f06,
-		0xd8e2, 0xc720,
-		0xd8e3, 0x4700,
-		0xd8e4, 0xc721,
-		0xd8e5, 0x0f06,
-		0xd8e6, 0xc728,
-		0xd8e7, 0x0700,
-		0xd8e8, 0xc729,
-		0xd8e9, 0x1207,
-		0xd8ea, 0xc801,
-		0xd8eb, 0x7f50,
-		0xd8ec, 0xc802,
-		0xd8ed, 0x7760,
-		0xd8ee, 0xc803,
-		0xd8ef, 0x7fce,
-		0xd8f0, 0xc804,
-		0xd8f1, 0x520e,
-		0xd8f2, 0xc805,
-		0xd8f3, 0x5c11,
-		0xd8f4, 0xc806,
-		0xd8f5, 0x3c51,
-		0xd8f6, 0xc807,
-		0xd8f7, 0x4061,
-		0xd8f8, 0xc808,
-		0xd8f9, 0x49c1,
-		0xd8fa, 0xc809,
-		0xd8fb, 0x3840,
-		0xd8fc, 0xc80a,
-		0xd8fd, 0x0000,
-		0xd8fe, 0xc821,
-		0xd8ff, 0x0002,
-		0xd900, 0xc822,
-		0xd901, 0x0046,
-		0xd902, 0xc844,
-		0xd903, 0x182f,
-		0xd904, 0xc013,
-		0xd905, 0xf341,
-		0xd906, 0xc084,
-		0xd907, 0x0030,
-		0xd908, 0xc904,
-		0xd909, 0x1401,
-		0xd90a, 0xcb0c,
-		0xd90b, 0x0004,
-		0xd90c, 0xcb0e,
-		0xd90d, 0xa00a,
-		0xd90e, 0xcb0f,
-		0xd90f, 0xc0c0,
-		0xd910, 0xcb10,
-		0xd911, 0xc0c0,
-		0xd912, 0xcb11,
-		0xd913, 0x00a0,
-		0xd914, 0xcb12,
-		0xd915, 0x0007,
-		0xd916, 0xc241,
-		0xd917, 0xa000,
-		0xd918, 0xc243,
-		0xd919, 0x7fe0,
-		0xd91a, 0xc604,
-		0xd91b, 0x000e,
-		0xd91c, 0xc609,
-		0xd91d, 0x00f5,
-		0xd91e, 0xc611,
-		0xd91f, 0x000e,
-		0xd920, 0xc660,
-		0xd921, 0x9600,
-		0xd922, 0xc687,
-		0xd923, 0x0004,
-		0xd924, 0xc60a,
-		0xd925, 0x04f5,
-		0xd926, 0x0000,
-		0xd927, 0x2641,
-		0xd928, 0x3021,
-		0xd929, 0x1001,
-		0xd92a, 0xc620,
-		0xd92b, 0x14e5,
-		0xd92c, 0xc621,
-		0xd92d, 0xc53d,
-		0xd92e, 0xc622,
-		0xd92f, 0x3cbe,
-		0xd930, 0xc623,
-		0xd931, 0x4452,
-		0xd932, 0xc624,
-		0xd933, 0xc5c5,
-		0xd934, 0xc625,
-		0xd935, 0xe01e,
-		0xd936, 0xc627,
-		0xd937, 0x0000,
-		0xd938, 0xc628,
-		0xd939, 0x0000,
-		0xd93a, 0xc62c,
-		0xd93b, 0x0000,
+		0xd8ca, 0x2741,
+		0xd8cb, 0x3021,
+		0xd8cc, 0x1001,
+		0xd8cd, 0xc502,
+		0xd8ce, 0x53ac,
+		0xd8cf, 0xc503,
+		0xd8d0, 0x2cd3,
+		0xd8d1, 0xc600,
+		0xd8d2, 0x2a6e,
+		0xd8d3, 0xc601,
+		0xd8d4, 0x2a2c,
+		0xd8d5, 0xc605,
+		0xd8d6, 0x5557,
+		0xd8d7, 0xc60c,
+		0xd8d8, 0x5400,
+		0xd8d9, 0xc710,
+		0xd8da, 0x0700,
+		0xd8db, 0xc711,
+		0xd8dc, 0x0f06,
+		0xd8dd, 0xc718,
+		0xd8de, 0x700,
+		0xd8df, 0xc719,
+		0xd8e0, 0x0f06,
+		0xd8e1, 0xc720,
+		0xd8e2, 0x4700,
+		0xd8e3, 0xc721,
+		0xd8e4, 0x0f06,
+		0xd8e5, 0xc728,
+		0xd8e6, 0x0700,
+		0xd8e7, 0xc729,
+		0xd8e8, 0x1207,
+		0xd8e9, 0xc801,
+		0xd8ea, 0x7f50,
+		0xd8eb, 0xc802,
+		0xd8ec, 0x7760,
+		0xd8ed, 0xc803,
+		0xd8ee, 0x7fce,
+		0xd8ef, 0xc804,
+		0xd8f0, 0x520e,
+		0xd8f1, 0xc805,
+		0xd8f2, 0x5c11,
+		0xd8f3, 0xc806,
+		0xd8f4, 0x3c51,
+		0xd8f5, 0xc807,
+		0xd8f6, 0x4061,
+		0xd8f7, 0xc808,
+		0xd8f8, 0x49c1,
+		0xd8f9, 0xc809,
+		0xd8fa, 0x3840,
+		0xd8fb, 0xc80a,
+		0xd8fc, 0x0000,
+		0xd8fd, 0xc821,
+		0xd8fe, 0x0002,
+		0xd8ff, 0xc822,
+		0xd900, 0x0046,
+		0xd901, 0xc844,
+		0xd902, 0x182f,
+		0xd903, 0xc849,
+		0xd904, 0x0400,
+		0xd905, 0xc84a,
+		0xd906, 0x0002,
+		0xd907, 0xc013,
+		0xd908, 0xf341,
+		0xd909, 0xc084,
+		0xd90a, 0x0030,
+		0xd90b, 0xc904,
+		0xd90c, 0x1401,
+		0xd90d, 0xcb0c,
+		0xd90e, 0x0004,
+		0xd90f, 0xcb0e,
+		0xd910, 0xa00a,
+		0xd911, 0xcb0f,
+		0xd912, 0xc0c0,
+		0xd913, 0xcb10,
+		0xd914, 0xc0c0,
+		0xd915, 0xcb11,
+		0xd916, 0x00a0,
+		0xd917, 0xcb12,
+		0xd918, 0x0007,
+		0xd919, 0xc241,
+		0xd91a, 0xa000,
+		0xd91b, 0xc243,
+		0xd91c, 0x7fe0,
+		0xd91d, 0xc604,
+		0xd91e, 0x000e,
+		0xd91f, 0xc609,
+		0xd920, 0x00f5,
+		0xd921, 0xc611,
+		0xd922, 0x000e,
+		0xd923, 0xc660,
+		0xd924, 0x9600,
+		0xd925, 0xc687,
+		0xd926, 0x0004,
+		0xd927, 0xc60a,
+		0xd928, 0x04f5,
+		0xd929, 0x0000,
+		0xd92a, 0x2741,
+		0xd92b, 0x3021,
+		0xd92c, 0x1001,
+		0xd92d, 0xc620,
+		0xd92e, 0x14e5,
+		0xd92f, 0xc621,
+		0xd930, 0xc53d,
+		0xd931, 0xc622,
+		0xd932, 0x3cbe,
+		0xd933, 0xc623,
+		0xd934, 0x4452,
+		0xd935, 0xc624,
+		0xd936, 0xc5c5,
+		0xd937, 0xc625,
+		0xd938, 0xe01e,
+		0xd939, 0xc627,
+		0xd93a, 0x0000,
+		0xd93b, 0xc628,
 		0xd93c, 0x0000,
-		0xd93d, 0x2b84,
-		0xd93e, 0x3c74,
-		0xd93f, 0x6435,
-		0xd940, 0xdff4,
-		0xd941, 0x6435,
-		0xd942, 0x2806,
-		0xd943, 0x3006,
-		0xd944, 0x8565,
-		0xd945, 0x2b24,
-		0xd946, 0x3c24,
-		0xd947, 0x6436,
-		0xd948, 0x1002,
-		0xd949, 0x2b24,
-		0xd94a, 0x3c24,
-		0xd94b, 0x6436,
-		0xd94c, 0x4045,
-		0xd94d, 0x8656,
-		0xd94e, 0x5663,
-		0xd94f, 0x0302,
-		0xd950, 0x401e,
-		0xd951, 0x1002,
-		0xd952, 0x2807,
-		0xd953, 0x31a7,
-		0xd954, 0x20c4,
-		0xd955, 0x3c24,
-		0xd956, 0x6724,
-		0xd957, 0x1002,
-		0xd958, 0x2807,
-		0xd959, 0x3187,
-		0xd95a, 0x20c4,
-		0xd95b, 0x3c24,
-		0xd95c, 0x6724,
-		0xd95d, 0x1002,
-		0xd95e, 0x24f4,
-		0xd95f, 0x3c64,
-		0xd960, 0x6436,
-		0xd961, 0xdff4,
-		0xd962, 0x6436,
-		0xd963, 0x1002,
-		0xd964, 0x2006,
-		0xd965, 0x3d76,
-		0xd966, 0xc161,
-		0xd967, 0x6134,
-		0xd968, 0x6135,
-		0xd969, 0x5443,
-		0xd96a, 0x0303,
-		0xd96b, 0x6524,
-		0xd96c, 0x00fb,
+		0xd93d, 0xc62c,
+		0xd93e, 0x0000,
+		0xd93f, 0xc90a,
+		0xd940, 0x3a7c,
+		0xd941, 0x0000,
+		0xd942, 0x2b84,
+		0xd943, 0x3c74,
+		0xd944, 0x6435,
+		0xd945, 0xdff4,
+		0xd946, 0x6435,
+		0xd947, 0x2806,
+		0xd948, 0x3006,
+		0xd949, 0x8565,
+		0xd94a, 0x2b24,
+		0xd94b, 0x3c24,
+		0xd94c, 0x6436,
+		0xd94d, 0x1002,
+		0xd94e, 0x2b24,
+		0xd94f, 0x3c24,
+		0xd950, 0x6436,
+		0xd951, 0x4045,
+		0xd952, 0x8656,
+		0xd953, 0x5663,
+		0xd954, 0x0302,
+		0xd955, 0x401e,
+		0xd956, 0x1002,
+		0xd957, 0x2807,
+		0xd958, 0x31a7,
+		0xd959, 0x20c4,
+		0xd95a, 0x3c24,
+		0xd95b, 0x6724,
+		0xd95c, 0x2ff7,
+		0xd95d, 0x30f7,
+		0xd95e, 0x20c4,
+		0xd95f, 0x3c04,
+		0xd960, 0x6724,
+		0xd961, 0x1002,
+		0xd962, 0x2807,
+		0xd963, 0x3187,
+		0xd964, 0x20c4,
+		0xd965, 0x3c24,
+		0xd966, 0x6724,
+		0xd967, 0x2fe4,
+		0xd968, 0x3dc4,
+		0xd969, 0x6437,
+		0xd96a, 0x20c4,
+		0xd96b, 0x3c04,
+		0xd96c, 0x6724,
 		0xd96d, 0x1002,
-		0xd96e, 0x20d4,
-		0xd96f, 0x3c24,
-		0xd970, 0x2025,
-		0xd971, 0x3005,
-		0xd972, 0x6524,
+		0xd96e, 0x24f4,
+		0xd96f, 0x3c64,
+		0xd970, 0x6436,
+		0xd971, 0xdff4,
+		0xd972, 0x6436,
 		0xd973, 0x1002,
-		0xd974, 0xd019,
-		0xd975, 0x2104,
-		0xd976, 0x3c24,
-		0xd977, 0x2105,
-		0xd978, 0x3805,
-		0xd979, 0x6524,
-		0xd97a, 0xdff4,
-		0xd97b, 0x4005,
-		0xd97c, 0x6524,
-		0xd97d, 0x2e8d,
-		0xd97e, 0x303d,
-		0xd97f, 0x2408,
-		0xd980, 0x35d8,
-		0xd981, 0x5dd3,
-		0xd982, 0x0307,
-		0xd983, 0x8887,
-		0xd984, 0x63a7,
-		0xd985, 0x8887,
-		0xd986, 0x63a7,
-		0xd987, 0xdffd,
-		0xd988, 0x00f9,
-		0xd989, 0x1002,
-		0xd98a, 0x0000,
+		0xd974, 0x2006,
+		0xd975, 0x3d76,
+		0xd976, 0xc161,
+		0xd977, 0x6134,
+		0xd978, 0x6135,
+		0xd979, 0x5443,
+		0xd97a, 0x0303,
+		0xd97b, 0x6524,
+		0xd97c, 0x00fb,
+		0xd97d, 0x1002,
+		0xd97e, 0x20d4,
+		0xd97f, 0x3c24,
+		0xd980, 0x2025,
+		0xd981, 0x3005,
+		0xd982, 0x6524,
+		0xd983, 0x1002,
+		0xd984, 0xd019,
+		0xd985, 0x2104,
+		0xd986, 0x3c24,
+		0xd987, 0x2105,
+		0xd988, 0x3805,
+		0xd989, 0x6524,
+		0xd98a, 0xdff4,
+		0xd98b, 0x4005,
+		0xd98c, 0x6524,
+		0xd98d, 0x2e8d,
+		0xd98e, 0x303d,
+		0xd98f, 0x2408,
+		0xd990, 0x35d8,
+		0xd991, 0x5dd3,
+		0xd992, 0x0307,
+		0xd993, 0x8887,
+		0xd994, 0x63a7,
+		0xd995, 0x8887,
+		0xd996, 0x63a7,
+		0xd997, 0xdffd,
+		0xd998, 0x00f9,
+		0xd999, 0x1002,
+		0xd99a, 0x866a,
+		0xd99b, 0x6138,
+		0xd99c, 0x5883,
+		0xd99d, 0x2aa2,
+		0xd99e, 0x3022,
+		0xd99f, 0x1302,
+		0xd9a0, 0x2ff7,
+		0xd9a1, 0x3007,
+		0xd9a2, 0x8785,
+		0xd9a3, 0xb887,
+		0xd9a4, 0x8786,
+		0xd9a5, 0xb8c6,
+		0xd9a6, 0x5a53,
+		0xd9a7, 0x29b2,
+		0xd9a8, 0x3022,
+		0xd9a9, 0x13c2,
+		0xd9aa, 0x2474,
+		0xd9ab, 0x3c84,
+		0xd9ac, 0x64d7,
+		0xd9ad, 0x64d7,
+		0xd9ae, 0x2ff5,
+		0xd9af, 0x3c05,
+		0xd9b0, 0x8757,
+		0xd9b1, 0xb886,
+		0xd9b2, 0x9767,
+		0xd9b3, 0x67c4,
+		0xd9b4, 0x6f72,
+		0xd9b5, 0x1002,
+		0xd9b6, 0x0000,
 	};
 	int i, err;
 
@@ -1948,10 +2004,14 @@ static struct reg_val ael2020_reset_regs
 
 	{ MDIO_DEV_PMA_PMD, 0xcd40, 0xffff, 0x0001 },
 
+	{ MDIO_DEV_PMA_PMD, 0xca12, 0xffff, 0x0100 },
+	{ MDIO_DEV_PMA_PMD, 0xca22, 0xffff, 0x0100 },
+	{ MDIO_DEV_PMA_PMD, 0xca42, 0xffff, 0x0100 },
 	{ MDIO_DEV_PMA_PMD, 0xff02, 0xffff, 0x0023 },
 	{ MDIO_DEV_PMA_PMD, 0xff03, 0xffff, 0x0000 },
 	{ MDIO_DEV_PMA_PMD, 0xff04, 0xffff, 0x0000 },
 
+	{ MDIO_DEV_PMA_PMD, 0xc20d, 0xffff, 0x0002 },
 	/* end */
 	{ 0, 0, 0, 0 }
 };
@@ -1979,6 +2039,7 @@ static int ael2020_reset(struct cphy *ph
 	err = set_phy_regs(phy, ael2020_reset_regs);
 	if (err)
 		return err;
+	msleep(100);
 
 	/* determine module type and perform appropriate initialization */
 	err = ael2020_get_module_type(phy, 0);
@@ -2083,6 +2144,8 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, 
 	err = set_phy_regs(phy, ael2020_reset_regs);
 	if (err)
 		return err;
+	msleep(100);
+
 	err = ael2020_get_module_type(phy, 0);
 	if (err >= 0)
 		phy->modtype = err;

Modified: stable/7/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_main.c	Tue Apr  6 02:48:59 2010	(r206241)
+++ stable/7/sys/dev/cxgb/cxgb_main.c	Tue Apr  6 03:07:39 2010	(r206242)
@@ -386,16 +386,25 @@ upgrade_fw(adapter_t *sc)
 	struct firmware *fw;
 #endif	
 	int status;
+	u32 vers;
 	
 	if ((fw = firmware_get(FW_FNAME)) == NULL)  {
 		device_printf(sc->dev, "Could not find firmware image %s\n", FW_FNAME);
 		return (ENOENT);
 	} else
-		device_printf(sc->dev, "updating firmware on card\n");
+		device_printf(sc->dev, "installing firmware on card\n");
 	status = t3_load_fw(sc, (const uint8_t *)fw->data, fw->datasize);
 
-	device_printf(sc->dev, "firmware update returned %s %d\n", (status == 0) ? "success" : "fail", status);
-	
+	if (status != 0) {
+		device_printf(sc->dev, "failed to install firmware: %d\n",
+		    status);
+	} else {
+		t3_get_fw_version(sc, &vers);
+		snprintf(&sc->fw_version[0], sizeof(sc->fw_version), "%d.%d.%d",
+		    G_FW_VERSION_MAJOR(vers), G_FW_VERSION_MINOR(vers),
+		    G_FW_VERSION_MICRO(vers));
+	}
+
 	firmware_put(fw, FIRMWARE_UNLOAD);
 
 	return (status);	
@@ -1272,7 +1281,7 @@ t3_os_link_changed(adapter_t *adapter, i
 void t3_os_phymod_changed(struct adapter *adap, int port_id)
 {
 	static const char *mod_str[] = {
-		NULL, "SR", "LR", "LRM", "TWINAX", "TWINAX", "unknown"
+		NULL, "SR", "LR", "LRM", "TWINAX", "TWINAX-L", "unknown"
 	};
 	struct port_info *pi = &adap->port[port_id];
 	int mod = pi->phy.modtype;
@@ -2742,7 +2751,9 @@ cxgb_extension_ioctl(struct cdev *dev, u
 		t->cong_thres  = q->cong_thres;
 		t->qnum        = i;
 
-		if (sc->flags & USING_MSIX)
+		if ((sc->flags & FULL_INIT_DONE) == 0)
+			t->vector = 0;
+		else if (sc->flags & USING_MSIX)
 			t->vector = rman_get_start(sc->msix_irq_res[i]);
 		else
 			t->vector = rman_get_start(sc->irq_res);

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 04:10:30 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3EC9F1065677;
	Tue,  6 Apr 2010 04:10:30 +0000 (UTC)
	(envelope-from jhay@meraka.csir.co.za)
Received: from zibbi.meraka.csir.co.za (unknown [IPv6:2001:4200:7000:2::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 6DE348FC1E;
	Tue,  6 Apr 2010 04:10:29 +0000 (UTC)
Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973)
	id 28EEF39824; Tue,  6 Apr 2010 06:10:23 +0200 (SAST)
Date: Tue, 6 Apr 2010 06:10:23 +0200
From: John Hay 
To: Jack F Vogel 
Message-ID: <20100406041023.GA4829@zibbi.meraka.csir.co.za>
References: <201004052143.o35LhNFt052897@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201004052143.o35LhNFt052897@svn.freebsd.org>
User-Agent: Mutt/1.4.2.3i
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r206215 - in stable/8/sys/modules: em ixgbe
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 04:10:30 -0000

Hi Jack,

On Mon, Apr 05, 2010 at 09:43:23PM +0000, Jack F Vogel wrote:
> Author: jfv
> Date: Mon Apr  5 21:43:22 2010
> New Revision: 206215
> URL: http://svn.freebsd.org/changeset/base/206215
> 
> Log:
>   Add missing module Makefile for ixgbe and em MFCs
> 
> Modified:
>   stable/8/sys/modules/em/Makefile
>   stable/8/sys/modules/ixgbe/Makefile

I notice that in ixgbe/Makefile KMOD is ixgbe. Should it not be if_ixgbe?
Most other network drivers have if_ in front. It is not because of this
commit because it is like that in current too. I also see ixgbe is not
listed in modules/Makefile, so it will not be built automatically with
the rest. Any reason not to add it?

Thanks

John
-- 
John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 05:20:46 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8B27C106566B;
	Tue,  6 Apr 2010 05:20:46 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7A6868FC19;
	Tue,  6 Apr 2010 05:20:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o365Kk6G056010;
	Tue, 6 Apr 2010 05:20:46 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o365Kkpp056008;
	Tue, 6 Apr 2010 05:20:46 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201004060520.o365Kkpp056008@svn.freebsd.org>
From: Doug Barton 
Date: Tue, 6 Apr 2010 05:20:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206248 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 05:20:46 -0000

Author: dougb
Date: Tue Apr  6 05:20:46 2010
New Revision: 206248
URL: http://svn.freebsd.org/changeset/base/206248

Log:
  In wait_for_pids(), pwait(1) can return when the process exits, but
  still exists as a zombie. The 'kill -0' test in this function can
  therefore return true even if the process isn't actually running.
  This could lead to wait_for_pids() printing an endless string of the
  pid number until the zombie finally exits.
  
  Solve this problem by moving the sleep up to after the 'kill -0' test, but
  only after we've run through the function once already. In the common case
  (only one pid in the list) this will always do the right thing. On the rare
  occasion that there is more than one pid in the list this will sleep 1
  second per zombie process which will allow that process, and any other
  in the list a chance to exit.
  
  While I'm here, local'ize the variables that this function uses.

Modified:
  head/etc/rc.subr

Modified: head/etc/rc.subr
==============================================================================
--- head/etc/rc.subr	Tue Apr  6 05:13:04 2010	(r206247)
+++ head/etc/rc.subr	Tue Apr  6 05:20:46 2010	(r206248)
@@ -355,6 +355,8 @@ _find_processes()
 #
 wait_for_pids()
 {
+	local _list _prefix _nlist _j
+
 	_list="$@"
 	if [ -z "$_list" ]; then
 		return
@@ -365,6 +367,7 @@ wait_for_pids()
 		for _j in $_list; do
 			if kill -0 $_j 2>/dev/null; then
 				_nlist="${_nlist}${_nlist:+ }$_j"
+				[ -n "$_prefix" ] && sleep 1
 			fi
 		done
 		if [ -z "$_nlist" ]; then
@@ -373,7 +376,7 @@ wait_for_pids()
 		_list=$_nlist
 		echo -n ${_prefix:-"Waiting for PIDS: "}$_list
 		_prefix=", "
-		pwait $_list 2>/dev/null || sleep 2
+		pwait $_list 2>/dev/null
 	done
 	if [ -n "$_prefix" ]; then
 		echo "."

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 05:41:49 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BBA9B106566C;
	Tue,  6 Apr 2010 05:41:49 +0000 (UTC)
	(envelope-from jfvogel@gmail.com)
Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com
	[209.85.218.216])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B1F38FC23;
	Tue,  6 Apr 2010 05:41:45 +0000 (UTC)
Received: by bwz8 with SMTP id 8so3493754bwz.3
	for ; Mon, 05 Apr 2010 22:41:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:received:message-id:subject:from:to:cc:content-type;
	bh=wLcajAg9Qzw/OEB7BXrOBeWE0LQgEwX1mE6GdsVmKkg=;
	b=csLRMXz2aJYjP6gPbDRjoJT+QuoDinSiRthVlwG6T2UZyg5/kziJvWOH4hraq6+XwQ
	vKf9NmxdlaJa35rlaOSBzXTc4cSXRGYfFfHu4zm6jReB5qTHcATsqSuzomnl0WomnpSO
	HNMVZABnfT5LRtXZZs/ov0LHqXL0Ruxy9utgQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=J1KAXyT6CIEOswomahzQKac3wNOSxi8KzTmLAIACCBRPnS1MY7bZgNWOqAR6VpVQNm
	e6s1q0Tp27m98/kNHv5+brasj4qJ3lUZl6K0gw9BXODXrwE5suB2jVzrkjzIYFI6hrBf
	SLv/nSLDBnDVr2RbtMEmHEzcxFJmxuEXr+/uo=
MIME-Version: 1.0
Received: by 10.204.59.6 with HTTP; Mon, 5 Apr 2010 22:41:44 -0700 (PDT)
In-Reply-To: <20100406041023.GA4829@zibbi.meraka.csir.co.za>
References: <201004052143.o35LhNFt052897@svn.freebsd.org>
	<20100406041023.GA4829@zibbi.meraka.csir.co.za>
Date: Mon, 5 Apr 2010 22:41:44 -0700
Received: by 10.204.2.196 with SMTP id 4mr726042bkk.121.1270532504548; Mon, 05 
	Apr 2010 22:41:44 -0700 (PDT)
Message-ID: 
From: Jack Vogel 
To: John Hay 
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.5
Cc: Jack F Vogel , svn-src-stable@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r206215 - in stable/8/sys/modules: em ixgbe
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 05:41:49 -0000

Its been without the if_ prefix for a couple years :) However if enough
people's sense of propriety is offended I suppose I could change it.

As for adding it to the modules/Makefile, the main reason it was not
was that the users of 10G were very small, but that is changing so
I suppose its time to add it.  Will take care of that soon.

Jack


On Mon, Apr 5, 2010 at 9:10 PM, John Hay  wrote:

> Hi Jack,
>
> On Mon, Apr 05, 2010 at 09:43:23PM +0000, Jack F Vogel wrote:
> > Author: jfv
> > Date: Mon Apr  5 21:43:22 2010
> > New Revision: 206215
> > URL: http://svn.freebsd.org/changeset/base/206215
> >
> > Log:
> >   Add missing module Makefile for ixgbe and em MFCs
> >
> > Modified:
> >   stable/8/sys/modules/em/Makefile
> >   stable/8/sys/modules/ixgbe/Makefile
>
> I notice that in ixgbe/Makefile KMOD is ixgbe. Should it not be if_ixgbe?
> Most other network drivers have if_ in front. It is not because of this
> commit because it is like that in current too. I also see ixgbe is not
> listed in modules/Makefile, so it will not be built automatically with
> the rest. Any reason not to add it?
>
> Thanks
>
> John
> --
> John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org
>

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 06:03:43 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1DA671065670;
	Tue,  6 Apr 2010 06:03:43 +0000 (UTC)
	(envelope-from peterjeremy@acm.org)
Received: from mail16.syd.optusnet.com.au (mail16.syd.optusnet.com.au
	[211.29.132.197])
	by mx1.freebsd.org (Postfix) with ESMTP id 985EA8FC1A;
	Tue,  6 Apr 2010 06:03:42 +0000 (UTC)
Received: from server.vk2pj.dyndns.org
	(c122-106-253-149.belrs3.nsw.optusnet.com.au [122.106.253.149])
	by mail16.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	o3663dug004540
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 6 Apr 2010 16:03:40 +1000
X-Bogosity: Ham, spamicity=0.000000
Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])
	by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id o3663cSV048739;
	Tue, 6 Apr 2010 16:03:39 +1000 (EST)
	(envelope-from peter@server.vk2pj.dyndns.org)
Received: (from peter@localhost)
	by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id o3663c67048738;
	Tue, 6 Apr 2010 16:03:38 +1000 (EST) (envelope-from peter)
Date: Tue, 6 Apr 2010 16:03:38 +1000
From: Peter Jeremy 
To: Andriy Gapon 
Message-ID: <20100406060338.GA46137@server.vk2pj.dyndns.org>
References: <201004030839.o338d0VV032828@svn.freebsd.org>
	<20100404210314.GH86236@server.vk2pj.dyndns.org>
	<4BB9006A.8080301@freebsd.org>
	<20100404212742.GJ2415@deviant.kiev.zoral.com.ua>
	<20100404221232.GJ86236@server.vk2pj.dyndns.org>
	<4BB99EDB.8030105@freebsd.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="UlVJffcvxoiEqYs2"
Content-Disposition: inline
In-Reply-To: <4BB99EDB.8030105@freebsd.org>
X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc
User-Agent: Mutt/1.5.20 (2009-06-14)
X-CMAE-Score: 0
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r206129 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 06:03:43 -0000


--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2010-Apr-05 11:27:07 +0300, Andriy Gapon  wrote:
>> Firstly, has someone with a post-r206129 kernel verified that it
>> does actually trigger the issue I reported in bin/144446?  I'm not
>> in a position to do so easily and it's possible that the problem
>> is masked elsewhere.
>
>Sorry for my lack of knowledge, but what is the best way to test this?
>As I understand, a new db needs to be initialized in an existing file?

You should be able to demonstrate the problem by using dbopen() to
create a new DB_HASH file with NULL openinfo.  I've updated bin/144446
with a scenario that I believe will demonstrate the problem on FreeBSD
- basically, run the db-hash.t test in perl and it should core-dump
after test 21.

--=20
Peter Jeremy

--UlVJffcvxoiEqYs2
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAku6zroACgkQ/opHv/APuIc0/ACdESTXo0v662VyhSNhB/x/qFYH
QuoAoJXSYEAf9fAs/ZBLhkpZTAwZ+bb4
=aQRe
-----END PGP SIGNATURE-----

--UlVJffcvxoiEqYs2--

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 06:06:32 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8EF61106564A;
	Tue,  6 Apr 2010 06:06:32 +0000 (UTC)
	(envelope-from jhay@meraka.csir.co.za)
Received: from zibbi.meraka.csir.co.za (unknown [IPv6:2001:4200:7000:2::1])
	by mx1.freebsd.org (Postfix) with ESMTP id BC31E8FC15;
	Tue,  6 Apr 2010 06:06:31 +0000 (UTC)
Received: by zibbi.meraka.csir.co.za (Postfix, from userid 3973)
	id 7820F39824; Tue,  6 Apr 2010 08:06:25 +0200 (SAST)
Date: Tue, 6 Apr 2010 08:06:25 +0200
From: John Hay 
To: Jack Vogel 
Message-ID: <20100406060625.GA15546@zibbi.meraka.csir.co.za>
References: <201004052143.o35LhNFt052897@svn.freebsd.org>
	<20100406041023.GA4829@zibbi.meraka.csir.co.za>
	
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.4.2.3i
Cc: Jack F Vogel , svn-src-stable@freebsd.org,
	svn-src-all@freebsd.org, src-committers@freebsd.org,
	svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r206215 - in stable/8/sys/modules: em ixgbe
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 06:06:32 -0000

On Mon, Apr 05, 2010 at 10:41:44PM -0700, Jack Vogel wrote:
> Its been without the if_ prefix for a couple years :) However if enough
> people's sense of propriety is offended I suppose I could change it.

I think because it was not hooked up in modules/Makefile before, it will
not be a problem to change it. :-)
> 
> As for adding it to the modules/Makefile, the main reason it was not
> was that the users of 10G were very small, but that is changing so
> I suppose its time to add it.  Will take care of that soon.

Thanks

John

> 
> Jack
> 
> 
> On Mon, Apr 5, 2010 at 9:10 PM, John Hay  wrote:
> 
> > Hi Jack,
> >
> > On Mon, Apr 05, 2010 at 09:43:23PM +0000, Jack F Vogel wrote:
> > > Author: jfv
> > > Date: Mon Apr  5 21:43:22 2010
> > > New Revision: 206215
> > > URL: http://svn.freebsd.org/changeset/base/206215
> > >
> > > Log:
> > >   Add missing module Makefile for ixgbe and em MFCs
> > >
> > > Modified:
> > >   stable/8/sys/modules/em/Makefile
> > >   stable/8/sys/modules/ixgbe/Makefile
> >
> > I notice that in ixgbe/Makefile KMOD is ixgbe. Should it not be if_ixgbe?
> > Most other network drivers have if_ in front. It is not because of this
> > commit because it is like that in current too. I also see ixgbe is not
> > listed in modules/Makefile, so it will not be built automatically with
> > the rest. Any reason not to add it?
> >
> > Thanks
> >
> > John
> > --
> > John Hay -- jhay@meraka.csir.co.za / jhay@FreeBSD.org
> >

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 10:09:03 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A7E9A106566C;
	Tue,  6 Apr 2010 10:09:03 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 954EE8FC1B;
	Tue,  6 Apr 2010 10:09:03 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36A93Ah026860;
	Tue, 6 Apr 2010 10:09:03 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36A93eA026856;
	Tue, 6 Apr 2010 10:09:03 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201004061009.o36A93eA026856@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 6 Apr 2010 10:09:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206261 - in stable/7/sbin/geom: class/cache core
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 10:09:03 -0000

Author: trasz
Date: Tue Apr  6 10:09:03 2010
New Revision: 206261
URL: http://svn.freebsd.org/changeset/base/206261

Log:
  MFC r201432:
  
  Add manual page for gcache(8).

Added:
  stable/7/sbin/geom/class/cache/gcache.8
     - copied unchanged from r201432, head/sbin/geom/class/cache/gcache.8
Modified:
  stable/7/sbin/geom/class/cache/Makefile
  stable/7/sbin/geom/core/geom.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/class/stripe/   (props changed)
  stable/7/sbin/geom/misc/   (props changed)

Modified: stable/7/sbin/geom/class/cache/Makefile
==============================================================================
--- stable/7/sbin/geom/class/cache/Makefile	Tue Apr  6 09:33:15 2010	(r206260)
+++ stable/7/sbin/geom/class/cache/Makefile	Tue Apr  6 10:09:03 2010	(r206261)
@@ -3,6 +3,5 @@
 .PATH: ${.CURDIR}/../../misc
 
 CLASS=	cache
-NO_MAN=	# notyet
 
 .include 

Copied: stable/7/sbin/geom/class/cache/gcache.8 (from r201432, head/sbin/geom/class/cache/gcache.8)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/7/sbin/geom/class/cache/gcache.8	Tue Apr  6 10:09:03 2010	(r206261, copy of r201432, head/sbin/geom/class/cache/gcache.8)
@@ -0,0 +1,192 @@
+.\"-
+.\" Copyright (c) 2010 Edward Tomasz Napierala
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 3, 2010
+.Dt GCACHE 8
+.Os
+.Sh NAME
+.Nm gcache
+.Nd "control utility for CACHE GEOM class"
+.Sh SYNOPSIS
+.Nm
+.Cm create
+.Op Fl v
+.Op Fl b Ar blocksize
+.Op Fl s Ar size
+.Ar name
+.Ar prov
+.Nm
+.Cm configure
+.Op Fl v
+.Op Fl b Ar blocksize
+.Op Fl s Ar size
+.Ar name
+.Nm
+.Cm destroy
+.Op Fl fv
+.Ar name
+.Nm
+.Cm label
+.Op Fl v
+.Op Fl b Ar blocksize
+.Op Fl s Ar size
+.Ar name
+.Ar prov
+.Nm
+.Cm stop
+.Op Fl fv
+.Ar name ...
+.Nm
+.Cm clear
+.Op Fl v
+.Ar prov ...
+.Nm
+.Cm dump
+.Ar prov ...
+.Nm
+.Cm list
+.Nm
+.Cm status
+.Op Fl s Ar name
+.Nm
+.Cm load
+.Op Fl v
+.Nm
+.Cm unload
+.Op Fl v
+.Sh DESCRIPTION
+The
+.Nm
+utility is used to control GEOM cache, which can
+speed up read performance by sending fixed size
+read requests to its consumer.  It has been developed to address
+the problem of a horrible read performance of a 64k blocksize FS
+residing on a RAID3 array with 8 data components, where a single
+disk component would only get 8k read requests, thus effectively
+killing disk performance under high load.
+.Pp
+Caching can be configured using two different methods:
+.Dq manual
+or
+.Dq automatic .
+When using the
+.Dq manual
+method, no metadata are stored on the devices, so the cached
+device has to be configured by hand every time it is needed.
+The
+.Dq automatic
+method uses on-disk metadata to detect devices.
+Once devices are labeled, they will be automatically detected and
+configured.
+.Pp
+The first argument to
+.Nm
+indicates an action to be performed:
+.Bl -tag -width ".Cm destroy"
+.It Cm create
+Cache the given devices with specified
+.Ar name .
+This is the
+.Dq manual
+method.
+The kernel module
+.Pa geom_cache.ko
+will be loaded if it is not loaded already.
+.It Cm label
+Cache the given devices with the specified
+.Ar name .
+This is the
+.Dq automatic
+method, where metadata are stored in every device's last sector.
+The kernel module
+.Pa geom_cache.ko
+will be loaded if it is not loaded already.
+.It Cm stop
+Turn off existing cache device by its
+.Ar name .
+This command does not touch on-disk metadata!
+.It Cm destroy
+Same as
+.Cm stop .
+.It Cm clear
+Clear metadata on the given devices.
+.It Cm dump
+Dump metadata stored on the given devices.
+.It Cm list
+See
+.Xr geom 8 .
+.It Cm status
+See
+.Xr geom 8 .
+.It Cm load
+See
+.Xr geom 8 .
+.It Cm unload
+See
+.Xr geom 8 .
+.El
+.Pp
+Additional options:
+.Bl -tag -width indent
+.It Fl f
+Force the removal of the specified cache device.
+.It Fl v
+Be more verbose.
+.El
+.Sh SYSCTL VARIABLES
+The following
+.Xr sysctl 8
+variables can be used to control the behavior of the
+.Nm CACHE
+GEOM class.
+The default value is shown next to each variable.
+.Bl -tag -width indent
+.It Va kern.geom.cache.used_hi : No 20
+.It Va kern.geom.cache.used_lo : No 5
+.It Va kern.geom.cache.idletime : No 5
+.It Va kern.geom.cache.timeout : No 10
+.It Va kern.geom.cache.enable : No 1
+.It Va kern.geom.cache.debug : No 0
+Debug level of the
+.Nm CACHE
+GEOM class.
+This can be set to a number between 0 and 3 inclusive.
+If set to 0 minimal debug information is printed, and if set to 3 the
+maximum amount of debug information is printed.
+.El
+.Sh EXIT STATUS
+Exit status is 0 on success, and 1 if the command fails.
+.Sh SEE ALSO
+.Xr geom 4 ,
+.Xr geom 8
+.Sh HISTORY
+The
+.Nm
+utility appeared in
+.Fx 7.0 .
+.Sh AUTHORS
+.An Ruslan Ermilov Aq ru@FreeBSD.org

Modified: stable/7/sbin/geom/core/geom.8
==============================================================================
--- stable/7/sbin/geom/core/geom.8	Tue Apr  6 09:33:15 2010	(r206260)
+++ stable/7/sbin/geom/core/geom.8	Tue Apr  6 10:09:03 2010	(r206261)
@@ -157,6 +157,7 @@ geom md unload
 .Ed
 .Sh SEE ALSO
 .Xr geom 4 ,
+.Xr gcache 8 ,
 .Xr gconcat 8 ,
 .Xr geli 8 ,
 .Xr glabel 8 ,

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 10:32:26 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CB3D51065678;
	Tue,  6 Apr 2010 10:32:26 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BA2008FC15;
	Tue,  6 Apr 2010 10:32:26 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36AWQIc033805;
	Tue, 6 Apr 2010 10:32:26 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36AWQfE033803;
	Tue, 6 Apr 2010 10:32:26 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201004061032.o36AWQfE033803@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 6 Apr 2010 10:32:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206262 - stable/8/secure
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 10:32:26 -0000

Author: trasz
Date: Tue Apr  6 10:32:26 2010
New Revision: 206262
URL: http://svn.freebsd.org/changeset/base/206262

Log:
  MFC r201210:
  
  Remove pppd, it's gone.

Modified:
  stable/8/secure/Makefile
Directory Properties:
  stable/8/secure/   (props changed)
  stable/8/secure/usr.bin/bdes/   (props changed)

Modified: stable/8/secure/Makefile
==============================================================================
--- stable/8/secure/Makefile	Tue Apr  6 10:09:03 2010	(r206261)
+++ stable/8/secure/Makefile	Tue Apr  6 10:32:26 2010	(r206262)
@@ -7,8 +7,7 @@ SUBDIR= lib libexec usr.bin usr.sbin
 # These are the programs which depend on crypto, but not Kerberos.
 SPROGS=	lib/libfetch lib/libpam lib/libradius lib/libtelnet	\
 	bin/ed libexec/telnetd usr.bin/fetch usr.bin/telnet	\
-	usr.sbin/pkg_install usr.sbin/ppp usr.sbin/pppd		\
-	usr.sbin/tcpdump/tcpdump
+	usr.sbin/pkg_install usr.sbin/ppp usr.sbin/tcpdump/tcpdump
 .if ${MK_SENDMAIL} != "no"
 SPROGS+=usr.sbin/sendmail
 .endif

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 10:34:15 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E1F8C106566B;
	Tue,  6 Apr 2010 10:34:15 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D0F7F8FC15;
	Tue,  6 Apr 2010 10:34:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36AYFkO034449;
	Tue, 6 Apr 2010 10:34:15 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36AYFdU034447;
	Tue, 6 Apr 2010 10:34:15 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201004061034.o36AYFdU034447@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 6 Apr 2010 10:34:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206263 - stable/8/usr.sbin/crunch/examples
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 10:34:16 -0000

Author: trasz
Date: Tue Apr  6 10:34:15 2010
New Revision: 206263
URL: http://svn.freebsd.org/changeset/base/206263

Log:
  MFC r201211:
  
  Remove pppd and SLIP-related stuff.

Modified:
  stable/8/usr.sbin/crunch/examples/really-big.conf
Directory Properties:
  stable/8/usr.sbin/crunch/examples/   (props changed)

Modified: stable/8/usr.sbin/crunch/examples/really-big.conf
==============================================================================
--- stable/8/usr.sbin/crunch/examples/really-big.conf	Tue Apr  6 10:32:26 2010	(r206262)
+++ stable/8/usr.sbin/crunch/examples/really-big.conf	Tue Apr  6 10:34:15 2010	(r206263)
@@ -27,7 +27,7 @@ progs badsect bim clri disklabel dmesg d
 progs ifconfig init mknod modload modunload mount mount_isofs
 progs mount_lofs mount_msdosfs mount_portalfs mountd
 progs newfs nfsd nfsiod ping quotacheck reboot restore route routed savecore
-progs shutdown slattach swapon ttyflags tunefs umount
+progs shutdown  swapon ttyflags tunefs umount
 # shell scripts: fastboot
 
 ln dump rdump
@@ -71,7 +71,7 @@ progs ac accton amd arp bad144 catman ch
 progs dev_mkdb diskpart edquota flcopy gettable grfinfo hilinfo htable inetd
 progs iostat iteconfig kvm_mkdb mtree named portmap pppd
 progs pstat pwd_mkdb quot quotaon rarpd rbootd repquota rmt rpc.bootparamd
-progs rwhod sa sliplogin slstats spray sysctl syslogd tcpdump
+progs rwhod sa spray sysctl syslogd tcpdump
 progs traceroute trpt trsp update vipw vnconfig ypbind yppoll ypset
 
 special amd srcdir /usr/src/usr.sbin/amd/amd

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 10:43:01 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 848BB1065672;
	Tue,  6 Apr 2010 10:43:01 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 739B38FC13;
	Tue,  6 Apr 2010 10:43:01 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36Ah1I5037093;
	Tue, 6 Apr 2010 10:43:01 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36Ah1qo037088;
	Tue, 6 Apr 2010 10:43:01 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201004061043.o36Ah1qo037088@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 6 Apr 2010 10:43:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206264 - in head/sys: kern sys vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 10:43:01 -0000

Author: kib
Date: Tue Apr  6 10:43:01 2010
New Revision: 206264
URL: http://svn.freebsd.org/changeset/base/206264

Log:
  When OOM searches for a process to kill, ignore the processes already
  killed by OOM. When killed process waits for a page allocation, try to
  satisfy the request as fast as possible.
  
  This removes the often encountered deadlock, where OOM continously
  selects the same victim process, that sleeps uninterruptibly waiting
  for a page. The killed process may still sleep if page cannot be
  obtained immediately, but testing has shown that system has much
  higher chance to survive in OOM situation with the patch.
  
  In collaboration with:	pho
  Reviewed by:	alc
  MFC after:	4 weeks

Modified:
  head/sys/kern/kern_sig.c
  head/sys/sys/proc.h
  head/sys/vm/vm_fault.c
  head/sys/vm/vm_pageout.c

Modified: head/sys/kern/kern_sig.c
==============================================================================
--- head/sys/kern/kern_sig.c	Tue Apr  6 10:34:15 2010	(r206263)
+++ head/sys/kern/kern_sig.c	Tue Apr  6 10:43:01 2010	(r206264)
@@ -2809,6 +2809,7 @@ killproc(p, why)
 		p, p->p_pid, p->p_comm);
 	log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, p->p_comm,
 		p->p_ucred ? p->p_ucred->cr_uid : -1, why);
+	p->p_flag |= P_WKILLED;
 	psignal(p, SIGKILL);
 }
 

Modified: head/sys/sys/proc.h
==============================================================================
--- head/sys/sys/proc.h	Tue Apr  6 10:34:15 2010	(r206263)
+++ head/sys/sys/proc.h	Tue Apr  6 10:43:01 2010	(r206264)
@@ -573,7 +573,7 @@ struct proc {
 #define	P_WAITED	0x01000	/* Someone is waiting for us. */
 #define	P_WEXIT		0x02000	/* Working on exiting. */
 #define	P_EXEC		0x04000	/* Process called exec. */
-#define	P_UNUSED8000	0x08000	/* available. */
+#define	P_WKILLED	0x08000	/* Killed, go to kernel/user boundary ASAP. */
 #define	P_CONTINUED	0x10000	/* Proc has continued from a stopped state. */
 #define	P_STOPPED_SIG	0x20000	/* Stopped due to SIGSTOP/SIGTSTP. */
 #define	P_STOPPED_TRACE	0x40000	/* Stopped because of tracing. */
@@ -592,6 +592,7 @@ struct proc {
 
 #define	P_STOPPED	(P_STOPPED_SIG|P_STOPPED_SINGLE|P_STOPPED_TRACE)
 #define	P_SHOULDSTOP(p)	((p)->p_flag & P_STOPPED)
+#define	P_KILLED(p)	((p)->p_flag & P_WKILLED)
 
 /*
  * These were process status values (p_stat), now they are only used in

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Tue Apr  6 10:34:15 2010	(r206263)
+++ head/sys/vm/vm_fault.c	Tue Apr  6 10:43:01 2010	(r206264)
@@ -216,7 +216,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr
 	vm_object_t next_object;
 	vm_page_t marray[VM_FAULT_READ];
 	int hardfault;
-	int faultcount, ahead, behind;
+	int faultcount, ahead, behind, alloc_req;
 	struct faultstate fs;
 	struct vnode *vp;
 	int locked, error;
@@ -386,9 +386,14 @@ RetryFault:;
 
 			/*
 			 * Allocate a new page for this object/offset pair.
+			 *
+			 * Unlocked read of the p_flag is harmless. At
+			 * worst, the P_KILLED might be not observed
+			 * there, and allocation can fail, causing
+			 * restart and new reading of the p_flag.
 			 */
 			fs.m = NULL;
-			if (!vm_page_count_severe()) {
+			if (!vm_page_count_severe() || P_KILLED(curproc)) {
 #if VM_NRESERVLEVEL > 0
 				if ((fs.object->flags & OBJ_COLORED) == 0) {
 					fs.object->flags |= OBJ_COLORED;
@@ -396,10 +401,13 @@ RetryFault:;
 					    fs.pindex;
 				}
 #endif
+				alloc_req = P_KILLED(curproc) ?
+				    VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL;
+				if (fs.object->type != OBJT_VNODE &&
+				    fs.object->backing_object == NULL)
+					alloc_req |= VM_ALLOC_ZERO;
 				fs.m = vm_page_alloc(fs.object, fs.pindex,
-				    (fs.object->type == OBJT_VNODE ||
-				     fs.object->backing_object != NULL) ?
-				    VM_ALLOC_NORMAL : VM_ALLOC_ZERO);
+				    alloc_req);
 			}
 			if (fs.m == NULL) {
 				unlock_and_deallocate(&fs);
@@ -424,7 +432,8 @@ readrest:
 			int reqpage = 0;
 			u_char behavior = vm_map_entry_behavior(fs.entry);
 
-			if (behavior == MAP_ENTRY_BEHAV_RANDOM) {
+			if (behavior == MAP_ENTRY_BEHAV_RANDOM ||
+			    P_KILLED(curproc)) {
 				ahead = 0;
 				behind = 0;
 			} else {

Modified: head/sys/vm/vm_pageout.c
==============================================================================
--- head/sys/vm/vm_pageout.c	Tue Apr  6 10:34:15 2010	(r206263)
+++ head/sys/vm/vm_pageout.c	Tue Apr  6 10:43:01 2010	(r206264)
@@ -1206,10 +1206,10 @@ vm_pageout_oom(int shortage)
 		if (PROC_TRYLOCK(p) == 0)
 			continue;
 		/*
-		 * If this is a system or protected process, skip it.
+		 * If this is a system, protected or killed process, skip it.
 		 */
 		if ((p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) ||
-		    (p->p_pid == 1) ||
+		    (p->p_pid == 1) || P_KILLED(p) ||
 		    ((p->p_pid < 48) && (swap_pager_avail != 0))) {
 			PROC_UNLOCK(p);
 			continue;

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 10:58:40 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D9F38106564A;
	Tue,  6 Apr 2010 10:58:40 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C66258FC1A;
	Tue,  6 Apr 2010 10:58:40 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36Awe6s041745;
	Tue, 6 Apr 2010 10:58:40 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36Awex0041740;
	Tue, 6 Apr 2010 10:58:40 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <201004061058.o36Awex0041740@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 6 Apr 2010 10:58:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206265 - in stable/8: . etc/mtree share/examples
	share/examples/pppd share/examples/slattach
	share/examples/sliplogin share/examples/startslip
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 10:58:41 -0000

Author: trasz
Date: Tue Apr  6 10:58:40 2010
New Revision: 206265
URL: http://svn.freebsd.org/changeset/base/206265

Log:
  MFC r201213:
  
  Remove examples for pppd and SLIP-related stuff.
  
  PR:		conf/144950

Deleted:
  stable/8/share/examples/pppd/
  stable/8/share/examples/slattach/
  stable/8/share/examples/sliplogin/
  stable/8/share/examples/startslip/
Modified:
  stable/8/ObsoleteFiles.inc   (contents, props changed)
  stable/8/etc/mtree/BSD.usr.dist
  stable/8/share/examples/Makefile
Directory Properties:
  stable/8/etc/mtree/   (props changed)
  stable/8/share/examples/   (props changed)

Modified: stable/8/ObsoleteFiles.inc
==============================================================================
--- stable/8/ObsoleteFiles.inc	Tue Apr  6 10:43:01 2010	(r206264)
+++ stable/8/ObsoleteFiles.inc	Tue Apr  6 10:58:40 2010	(r206265)
@@ -27,6 +27,29 @@ OLD_FILES+=usr/share/man/man1/gcpio.1.gz
 # 20100301: vesa and dpms promoted to be i386/amd64 common
 OLD_FILES+=usr/include/machine/pc/vesa.h
 OLD_FILES+=usr/share/man/man4/i386/dpms.4.gz
+# 20091229: remove no longer relevant examples
+OLD_FILES+=usr/share/examples/pppd/auth-down.sample
+OLD_FILES+=usr/share/examples/pppd/auth-up.sample
+OLD_FILES+=usr/share/examples/pppd/chap-secrets.sample
+OLD_FILES+=usr/share/examples/pppd/chat.sh.sample
+OLD_FILES+=usr/share/examples/pppd/ip-down.sample
+OLD_FILES+=usr/share/examples/pppd/ip-up.sample
+OLD_FILES+=usr/share/examples/pppd/options.sample
+OLD_FILES+=usr/share/examples/pppd/pap-secrets.sample
+OLD_FILES+=usr/share/examples/pppd/ppp.deny.sample
+OLD_FILES+=usr/share/examples/pppd/ppp.shells.sample
+OLD_DIRS+=usr/share/examples/pppd
+OLD_FILES+=usr/share/examples/slattach/unit-command.sh
+OLD_DIRS+=usr/share/examples/slattach
+OLD_FILES+=usr/share/examples/sliplogin/slip.hosts
+OLD_FILES+=usr/share/examples/sliplogin/slip.login
+OLD_FILES+=usr/share/examples/sliplogin/slip.logout
+OLD_FILES+=usr/share/examples/sliplogin/slip.slparms
+OLD_DIRS+=usr/share/examples/sliplogin
+OLD_FILES+=usr/share/examples/startslip/sldown.sh
+OLD_FILES+=usr/share/examples/startslip/slip.sh
+OLD_FILES+=usr/share/examples/startslip/slup.sh
+OLD_DIRS+=usr/share/examples/startslip
 # 20091218: removal of rc.early(8) link
 OLD_FILES+=usr/share/man/man8/rc.early.8.gz
 # 20091027: pselect.3 implemented as syscall

Modified: stable/8/etc/mtree/BSD.usr.dist
==============================================================================
--- stable/8/etc/mtree/BSD.usr.dist	Tue Apr  6 10:43:01 2010	(r206264)
+++ stable/8/etc/mtree/BSD.usr.dist	Tue Apr  6 10:58:40 2010	(r206265)
@@ -265,8 +265,6 @@
             ..
             ppp
             ..
-            pppd
-            ..
             printing
             ..
             scsi_target
@@ -283,16 +281,10 @@
                 srcs
                 ..
             ..
-            slattach
-            ..
-            sliplogin
-            ..
             smbfs
                 print
                 ..
             ..
-            startslip
-            ..
             sunrpc
                 dir
                 ..

Modified: stable/8/share/examples/Makefile
==============================================================================
--- stable/8/share/examples/Makefile	Tue Apr  6 10:43:01 2010	(r206264)
+++ stable/8/share/examples/Makefile	Tue Apr  6 10:58:40 2010	(r206265)
@@ -24,13 +24,9 @@ LDIRS=	BSD_daemon \
 	portal \
 	ppi \
 	ppp \
-	pppd \
 	printing \
 	ses \
 	scsi_target \
-	slattach \
-	sliplogin \
-	startslip \
 	sunrpc
 
 XFILES=	BSD_daemon/FreeBSD.pfa \
@@ -135,16 +131,6 @@ XFILES=	BSD_daemon/FreeBSD.pfa \
 	ppp/ppp.secret.sample \
 	ppp/ppp.secret.span-isp \
 	ppp/ppp.secret.span-isp.working \
-	pppd/auth-down.sample \
-	pppd/auth-up.sample \
-	pppd/chap-secrets.sample \
-	pppd/chat.sh.sample \
-	pppd/ip-down.sample \
-	pppd/ip-up.sample \
-	pppd/options.sample \
-	pppd/pap-secrets.sample \
-	pppd/ppp.deny.sample \
-	pppd/ppp.shells.sample \
 	printing/README \
 	printing/diablo-if-net \
 	printing/hpdf \
@@ -187,14 +173,6 @@ XFILES=	BSD_daemon/FreeBSD.pfa \
 	scsi_target/scsi_target.h \
 	scsi_target/scsi_target.8 \
 	scsi_target/scsi_cmds.c \
-	slattach/unit-command.sh \
-	sliplogin/slip.hosts \
-	sliplogin/slip.login \
-	sliplogin/slip.logout \
-	sliplogin/slip.slparms \
-	startslip/sldown.sh \
-	startslip/slip.sh \
-	startslip/slup.sh \
 	sunrpc/Makefile \
 	sunrpc/dir/Makefile \
 	sunrpc/dir/dir.x \

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 12:28:08 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 993E9106566B;
	Tue,  6 Apr 2010 12:28:08 +0000 (UTC) (envelope-from ume@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 886A48FC0A;
	Tue,  6 Apr 2010 12:28:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36CS8Sc064143;
	Tue, 6 Apr 2010 12:28:08 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36CS86h064141;
	Tue, 6 Apr 2010 12:28:08 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <201004061228.o36CS86h064141@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Tue, 6 Apr 2010 12:28:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206266 - head/sbin/ipfw
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 12:28:08 -0000

Author: ume
Date: Tue Apr  6 12:28:08 2010
New Revision: 206266
URL: http://svn.freebsd.org/changeset/base/206266

Log:
  Set net.inet6.ip6.fw.enable as well.

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==============================================================================
--- head/sbin/ipfw/ipfw2.c	Tue Apr  6 10:58:40 2010	(r206265)
+++ head/sbin/ipfw/ipfw2.c	Tue Apr  6 12:28:08 2010	(r206266)
@@ -1740,6 +1740,8 @@ ipfw_sysctl_handler(char *av[], int whic
 	} else if (_substrcmp(*av, "firewall") == 0) {
 		sysctlbyname("net.inet.ip.fw.enable", NULL, 0,
 		    &which, sizeof(which));
+		sysctlbyname("net.inet6.ip6.fw.enable", NULL, 0,
+		    &which, sizeof(which));
 	} else if (_substrcmp(*av, "one_pass") == 0) {
 		sysctlbyname("net.inet.ip.fw.one_pass", NULL, 0,
 		    &which, sizeof(which));

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 12:33:05 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 61C771065673;
	Tue,  6 Apr 2010 12:33:05 +0000 (UTC) (envelope-from ume@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 509798FC17;
	Tue,  6 Apr 2010 12:33:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36CX5PT065366;
	Tue, 6 Apr 2010 12:33:05 GMT (envelope-from ume@svn.freebsd.org)
Received: (from ume@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36CX5Lq065364;
	Tue, 6 Apr 2010 12:33:05 GMT (envelope-from ume@svn.freebsd.org)
Message-Id: <201004061233.o36CX5Lq065364@svn.freebsd.org>
From: Hajimu UMEMOTO 
Date: Tue, 6 Apr 2010 12:33:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206267 - head/lib/libc/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 12:33:05 -0000

Author: ume
Date: Tue Apr  6 12:33:05 2010
New Revision: 206267
URL: http://svn.freebsd.org/changeset/base/206267

Log:
  Use the stored length value instead of calculating it by strlen().

Modified:
  head/lib/libc/net/getservent.c

Modified: head/lib/libc/net/getservent.c
==============================================================================
--- head/lib/libc/net/getservent.c	Tue Apr  6 12:28:08 2010	(r206266)
+++ head/lib/libc/net/getservent.c	Tue Apr  6 12:33:05 2010	(r206267)
@@ -489,11 +489,9 @@ static int
 db_servent(void *retval, void *mdata, va_list ap)
 {
 	char buf[BUFSIZ];
-	DBT key, data;
+	DBT key, data, *result;
 	DB *db;
 
-	char *resultbuf;
-
 	struct db_state *st;
 	int rv;
 	int stayopen;
@@ -565,7 +563,7 @@ db_servent(void *retval, void *mdata, va
 				rv = NS_NOTFOUND;
 				goto db_fin;
 			}
-			resultbuf = key.data;
+			result = &key;
 			break;
 		case nss_lt_id:
 			key.data = buf;
@@ -582,7 +580,7 @@ db_servent(void *retval, void *mdata, va
 				rv = NS_NOTFOUND;
 				goto db_fin;
 			}
-			resultbuf = key.data;
+			result = &key;
 			break;
 		case nss_lt_all:
 			key.data = buf;
@@ -594,12 +592,12 @@ db_servent(void *retval, void *mdata, va
 				rv = NS_NOTFOUND;
 				goto db_fin;
 			}
-			resultbuf = data.data;
+			result = &data;
 			break;
 		}
 
-		rv = parse_result(serv, buffer, bufsize, resultbuf,
-		    strlen(resultbuf), errnop);
+		rv = parse_result(serv, buffer, bufsize, result->data,
+		    result->size - 1, errnop);
 
 	} while (!(rv & NS_TERMINATE) && how == nss_lt_all);
 

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 12:44:29 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 249BD106564A;
	Tue,  6 Apr 2010 12:44:29 +0000 (UTC)
	(envelope-from davidch@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1279F8FC16;
	Tue,  6 Apr 2010 12:44:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36CiT8m067895;
	Tue, 6 Apr 2010 12:44:29 GMT (envelope-from davidch@svn.freebsd.org)
Received: (from davidch@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36CiSpf067892;
	Tue, 6 Apr 2010 12:44:28 GMT (envelope-from davidch@svn.freebsd.org)
Message-Id: <201004061244.o36CiSpf067892@svn.freebsd.org>
From: David Christensen 
Date: Tue, 6 Apr 2010 12:44:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206268 - head/sys/dev/bce
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 12:44:29 -0000

Author: davidch
Date: Tue Apr  6 12:44:28 2010
New Revision: 206268
URL: http://svn.freebsd.org/changeset/base/206268

Log:
  - Fixed 5708S 2.5G support broken in last commit.
  - Added some new debug helper routines to systcl.
  - Fixed many of the style(9) violations that have crept into the code
    due to my use of a "smart" editor.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bce/if_bcereg.h

Modified: head/sys/dev/bce/if_bce.c
==============================================================================
--- head/sys/dev/bce/if_bce.c	Tue Apr  6 12:33:05 2010	(r206267)
+++ head/sys/dev/bce/if_bce.c	Tue Apr  6 12:44:28 2010	(r206268)
@@ -39,8 +39,8 @@ __FBSDID("$FreeBSD$");
  *   BCM5708S B1, B2
  *   BCM5709C A1, C0
  *   BCM5709S A1, C0
- * 	 BCM5716C C0
- * 	 BCM5716S C0
+ *   BCM5716C C0
+ *   BCM5716S C0
  *
  * The following controllers are not supported by this driver:
  *   BCM5706C A0, A1 (pre-production)
@@ -277,37 +277,41 @@ static struct flash_spec flash_5709 = {
 /****************************************************************************/
 /* FreeBSD device entry points.                                             */
 /****************************************************************************/
-static int  bce_probe				(device_t);
-static int  bce_attach				(device_t);
-static int  bce_detach				(device_t);
-static int  bce_shutdown			(device_t);
+static int  bce_probe			(device_t);
+static int  bce_attach			(device_t);
+static int  bce_detach			(device_t);
+static int  bce_shutdown		(device_t);
 
 
 /****************************************************************************/
 /* BCE Debug Data Structure Dump Routines                                   */
 /****************************************************************************/
 #ifdef BCE_DEBUG
-static u32	bce_reg_rd				(struct bce_softc *, u32);
-static void	bce_reg_wr				(struct bce_softc *, u32, u32);
-static void	bce_reg_wr16			(struct bce_softc *, u32, u16);
-static u32  bce_ctx_rd				(struct bce_softc *, u32, u32);
-static void bce_dump_enet           (struct bce_softc *, struct mbuf *);
-static void bce_dump_mbuf 			(struct bce_softc *, struct mbuf *);
+static u32  bce_reg_rd			(struct bce_softc *, u32);
+static void bce_reg_wr			(struct bce_softc *, u32, u32);
+static void bce_reg_wr16		(struct bce_softc *, u32, u16);
+static u32  bce_ctx_rd			(struct bce_softc *, u32, u32);
+static void bce_dump_enet		(struct bce_softc *, struct mbuf *);
+static void bce_dump_mbuf		(struct bce_softc *, struct mbuf *);
 static void bce_dump_tx_mbuf_chain	(struct bce_softc *, u16, int);
 static void bce_dump_rx_mbuf_chain	(struct bce_softc *, u16, int);
 #ifdef BCE_JUMBO_HDRSPLIT
 static void bce_dump_pg_mbuf_chain	(struct bce_softc *, u16, int);
 #endif
-static void bce_dump_txbd			(struct bce_softc *, int, struct tx_bd *);
-static void bce_dump_rxbd			(struct bce_softc *, int, struct rx_bd *);
+static void bce_dump_txbd		(struct bce_softc *,
+    int, struct tx_bd *);
+static void bce_dump_rxbd		(struct bce_softc *,
+    int, struct rx_bd *);
 #ifdef BCE_JUMBO_HDRSPLIT
-static void bce_dump_pgbd			(struct bce_softc *, int, struct rx_bd *);
+static void bce_dump_pgbd		(struct bce_softc *, 
+    int, struct rx_bd *);
 #endif
-static void bce_dump_l2fhdr			(struct bce_softc *, int, struct l2_fhdr *);
-static void bce_dump_ctx			(struct bce_softc *, u16);
-static void bce_dump_ftqs			(struct bce_softc *);
+static void bce_dump_l2fhdr		(struct bce_softc *,
+    int, struct l2_fhdr *);
+static void bce_dump_ctx		(struct bce_softc *, u16);
+static void bce_dump_ftqs		(struct bce_softc *);
 static void bce_dump_tx_chain		(struct bce_softc *, u16, int);
-static void bce_dump_rx_chain		(struct bce_softc *, u16, int);
+static void bce_dump_rx_bd_chain	(struct bce_softc *, u16, int);
 #ifdef BCE_JUMBO_HDRSPLIT
 static void bce_dump_pg_chain		(struct bce_softc *, u16, int);
 #endif
@@ -315,7 +319,7 @@ static void bce_dump_status_block	(struc
 static void bce_dump_stats_block	(struct bce_softc *);
 static void bce_dump_driver_state	(struct bce_softc *);
 static void bce_dump_hw_state		(struct bce_softc *);
-static void bce_dump_mq_regs        (struct bce_softc *);
+static void bce_dump_mq_regs		(struct bce_softc *);
 static void bce_dump_bc_state		(struct bce_softc *);
 static void bce_dump_txp_state		(struct bce_softc *, int);
 static void bce_dump_rxp_state		(struct bce_softc *, int);
@@ -323,18 +327,18 @@ static void bce_dump_tpat_state		(struct
 static void bce_dump_cp_state		(struct bce_softc *, int);
 static void bce_dump_com_state		(struct bce_softc *, int);
 static void bce_dump_rv2p_state		(struct bce_softc *);
-static void bce_breakpoint			(struct bce_softc *);
+static void bce_breakpoint		(struct bce_softc *);
 #endif
 
 
 /****************************************************************************/
 /* BCE Register/Memory Access Routines                                      */
 /****************************************************************************/
-static u32  bce_reg_rd_ind			(struct bce_softc *, u32);
-static void bce_reg_wr_ind			(struct bce_softc *, u32, u32);
-static void bce_shmem_wr            (struct bce_softc *, u32, u32);
-static u32  bce_shmem_rd            (struct bce_softc *, u32);
-static void bce_ctx_wr				(struct bce_softc *, u32, u32, u32);
+static u32  bce_reg_rd_ind		(struct bce_softc *, u32);
+static void bce_reg_wr_ind		(struct bce_softc *, u32, u32);
+static void bce_shmem_wr		(struct bce_softc *, u32, u32);
+static u32  bce_shmem_rd		(struct bce_softc *, u32);
+static void bce_ctx_wr			(struct bce_softc *, u32, u32, u32);
 static int  bce_miibus_read_reg		(device_t, int, int);
 static int  bce_miibus_write_reg	(device_t, int, int, int);
 static void bce_miibus_statchg		(device_t);
@@ -346,96 +350,101 @@ static void bce_miibus_statchg		(device_
 static int  bce_acquire_nvram_lock	(struct bce_softc *);
 static int  bce_release_nvram_lock	(struct bce_softc *);
 static void bce_enable_nvram_access	(struct bce_softc *);
-static void	bce_disable_nvram_access(struct bce_softc *);
+static void bce_disable_nvram_access	(struct bce_softc *);
 static int  bce_nvram_read_dword	(struct bce_softc *, u32, u8 *, u32);
-static int  bce_init_nvram			(struct bce_softc *);
-static int  bce_nvram_read			(struct bce_softc *, u32, u8 *, int);
-static int  bce_nvram_test			(struct bce_softc *);
+static int  bce_init_nvram		(struct bce_softc *);
+static int  bce_nvram_read		(struct bce_softc *, u32, u8 *, int);
+static int  bce_nvram_test		(struct bce_softc *);
 #ifdef BCE_NVRAM_WRITE_SUPPORT
 static int  bce_enable_nvram_write	(struct bce_softc *);
 static void bce_disable_nvram_write	(struct bce_softc *);
 static int  bce_nvram_erase_page	(struct bce_softc *, u32);
 static int  bce_nvram_write_dword	(struct bce_softc *, u32, u8 *, u32);
-static int  bce_nvram_write			(struct bce_softc *, u32, u8 *, int);
+static int  bce_nvram_write		(struct bce_softc *, u32, u8 *, int);
 #endif
 
 /****************************************************************************/
 /*                                                                          */
 /****************************************************************************/
-static void bce_get_media			(struct bce_softc *);
-static void bce_init_media			(struct bce_softc *);
-static void bce_dma_map_addr		(void *, bus_dma_segment_t *, int, int);
-static int  bce_dma_alloc			(device_t);
-static void bce_dma_free			(struct bce_softc *);
+static void bce_get_media		(struct bce_softc *);
+static void bce_init_media		(struct bce_softc *);
+static void bce_dma_map_addr		(void *, 
+    bus_dma_segment_t *, int, int);
+static int  bce_dma_alloc		(device_t);
+static void bce_dma_free		(struct bce_softc *);
 static void bce_release_resources	(struct bce_softc *);
 
 /****************************************************************************/
 /* BCE Firmware Synchronization and Load                                    */
 /****************************************************************************/
-static int  bce_fw_sync				(struct bce_softc *, u32);
+static int  bce_fw_sync			(struct bce_softc *, u32);
 static void bce_load_rv2p_fw		(struct bce_softc *, u32 *, u32, u32);
-static void bce_load_cpu_fw			(struct bce_softc *, struct cpu_reg *, struct fw_info *);
-static void bce_start_cpu           (struct bce_softc *, struct cpu_reg *);
-static void bce_halt_cpu            (struct bce_softc *, struct cpu_reg *);
-static void bce_start_rxp_cpu       (struct bce_softc *);
+static void bce_load_cpu_fw		(struct bce_softc *, 
+    struct cpu_reg *, struct fw_info *);
+static void bce_start_cpu		(struct bce_softc *, struct cpu_reg *);
+static void bce_halt_cpu		(struct bce_softc *, struct cpu_reg *);
+static void bce_start_rxp_cpu		(struct bce_softc *);
 static void bce_init_rxp_cpu		(struct bce_softc *);
 static void bce_init_txp_cpu 		(struct bce_softc *);
 static void bce_init_tpat_cpu		(struct bce_softc *);
-static void bce_init_cp_cpu		  	(struct bce_softc *);
+static void bce_init_cp_cpu	  	(struct bce_softc *);
 static void bce_init_com_cpu	  	(struct bce_softc *);
-static void bce_init_cpus			(struct bce_softc *);
+static void bce_init_cpus		(struct bce_softc *);
 
 static void	bce_print_adapter_info	(struct bce_softc *);
 static void bce_probe_pci_caps		(device_t, struct bce_softc *);
-static void bce_stop				(struct bce_softc *);
-static int  bce_reset				(struct bce_softc *, u32);
-static int  bce_chipinit 			(struct bce_softc *);
-static int  bce_blockinit 			(struct bce_softc *);
+static void bce_stop			(struct bce_softc *);
+static int  bce_reset			(struct bce_softc *, u32);
+static int  bce_chipinit 		(struct bce_softc *);
+static int  bce_blockinit 		(struct bce_softc *);
 
 static int  bce_init_tx_chain		(struct bce_softc *);
 static void bce_free_tx_chain		(struct bce_softc *);
 
-static int  bce_get_rx_buf			(struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *);
+static int  bce_get_rx_buf		(struct bce_softc *, 
+    struct mbuf *, u16 *, u16 *, u32 *);
 static int  bce_init_rx_chain		(struct bce_softc *);
 static void bce_fill_rx_chain		(struct bce_softc *);
 static void bce_free_rx_chain		(struct bce_softc *);
 
 #ifdef BCE_JUMBO_HDRSPLIT
-static int  bce_get_pg_buf			(struct bce_softc *, struct mbuf *, u16 *, u16 *);
+static int  bce_get_pg_buf		(struct bce_softc *, 
+    struct mbuf *, u16 *, u16 *);
 static int  bce_init_pg_chain		(struct bce_softc *);
 static void bce_fill_pg_chain		(struct bce_softc *);
 static void bce_free_pg_chain		(struct bce_softc *);
 #endif
 
-static struct mbuf *bce_tso_setup	(struct bce_softc *, struct mbuf **, u16 *);
-static int  bce_tx_encap			(struct bce_softc *, struct mbuf **);
+static struct mbuf *bce_tso_setup	(struct bce_softc *, 
+    struct mbuf **, u16 *);
+static int  bce_tx_encap		(struct bce_softc *, struct mbuf **);
 static void bce_start_locked		(struct ifnet *);
-static void bce_start				(struct ifnet *);
-static int  bce_ioctl				(struct ifnet *, u_long, caddr_t);
-static void bce_watchdog			(struct bce_softc *);
-static int  bce_ifmedia_upd			(struct ifnet *);
+static void bce_start			(struct ifnet *);
+static int  bce_ioctl			(struct ifnet *, u_long, caddr_t);
+static void bce_watchdog		(struct bce_softc *);
+static int  bce_ifmedia_upd		(struct ifnet *);
 static void bce_ifmedia_upd_locked	(struct ifnet *);
-static void bce_ifmedia_sts			(struct ifnet *, struct ifmediareq *);
-static void bce_init_locked			(struct bce_softc *);
-static void bce_init				(void *);
+static void bce_ifmedia_sts		(struct ifnet *, struct ifmediareq *);
+static void bce_init_locked		(struct bce_softc *);
+static void bce_init			(void *);
 static void bce_mgmt_init_locked	(struct bce_softc *sc);
 
-static void bce_init_ctx			(struct bce_softc *);
+static void bce_init_ctx		(struct bce_softc *);
 static void bce_get_mac_addr		(struct bce_softc *);
 static void bce_set_mac_addr		(struct bce_softc *);
-static void bce_phy_intr			(struct bce_softc *);
-static inline u16 bce_get_hw_rx_cons(struct bce_softc *);
-static void bce_rx_intr				(struct bce_softc *);
-static void bce_tx_intr				(struct bce_softc *);
+static void bce_phy_intr		(struct bce_softc *);
+static inline u16 bce_get_hw_rx_cons	(struct bce_softc *);
+static void bce_rx_intr			(struct bce_softc *);
+static void bce_tx_intr			(struct bce_softc *);
 static void bce_disable_intr		(struct bce_softc *);
-static void bce_enable_intr			(struct bce_softc *, int);
+static void bce_enable_intr		(struct bce_softc *, int);
 
-static void bce_intr				(void *);
-static void bce_set_rx_mode			(struct bce_softc *);
+static void bce_intr			(void *);
+static void bce_set_rx_mode		(struct bce_softc *);
 static void bce_stats_update		(struct bce_softc *);
-static void bce_tick				(void *);
-static void bce_pulse				(void *);
-static void bce_add_sysctls			(struct bce_softc *);
+static void bce_tick			(void *);
+static void bce_pulse			(void *);
+static void bce_add_sysctls		(struct bce_softc *);
 
 
 /****************************************************************************/
@@ -540,15 +549,15 @@ bce_probe(device_t dev)
 	sdid = pci_get_subdevice(dev);
 
 	DBPRINT(sc, BCE_EXTREME_LOAD,
-		"%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, "
-		"SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid);
+	    "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, "
+	    "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid);
 
 	/* Look through the list of known devices for a match. */
 	while(t->bce_name != NULL) {
 
 		if ((vid == t->bce_vid) && (did == t->bce_did) &&
-			((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) &&
-			((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) {
+		    ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) &&
+		    ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) {
 
 			descbuf = malloc(BCE_DEVDESC_MAX, M_TEMP, M_NOWAIT);
 
@@ -557,8 +566,8 @@ bce_probe(device_t dev)
 
 			/* Print out the device identity. */
 			snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)",
-				t->bce_name,
-			    (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'),
+			    t->bce_name, (((pci_read_config(dev, 
+			    PCIR_REVID, 4) & 0xf0) >> 4) + 'A'),
 			    (pci_read_config(dev, PCIR_REVID, 4) & 0xf));
 
 			device_set_desc_copy(dev, descbuf);
@@ -590,21 +599,21 @@ bce_print_adapter_info(struct bce_softc 
 
 	BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid);
 	printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A',
-		((BCE_CHIP_ID(sc) & 0x0ff0) >> 4));
+	    ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4));
 
 	/* Bus info. */
 	if (sc->bce_flags & BCE_PCIE_FLAG) {
 		printf("Bus (PCIe x%d, ", sc->link_width);
 		switch (sc->link_speed) {
-			case 1: printf("2.5Gbps); "); break;
-			case 2:	printf("5Gbps); "); break;
-			default: printf("Unknown link speed); ");
+		case 1: printf("2.5Gbps); "); break;
+		case 2:	printf("5Gbps); "); break;
+		default: printf("Unknown link speed); ");
 		}
 	} else {
 		printf("Bus (PCI%s, %s, %dMHz); ",
-			((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""),
-			((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"),
-			sc->bus_speed_mhz);
+		    ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""),
+		    ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? 
+		    "32-bit" : "64-bit"), sc->bus_speed_mhz);
 	}
 
 	/* Firmware version and device features. */
@@ -612,30 +621,30 @@ bce_print_adapter_info(struct bce_softc 
 
 #ifdef BCE_JUMBO_HDRSPLIT
 	printf("SPLT");
-    i++;
+	i++;
 #endif
 
-    if (sc->bce_flags & BCE_USING_MSI_FLAG) {
-        if (i > 0) printf("|");
+	if (sc->bce_flags & BCE_USING_MSI_FLAG) {
+		if (i > 0) printf("|");
 		printf("MSI"); i++;
-    }
+	}
 
-    if (sc->bce_flags & BCE_USING_MSIX_FLAG) {
-        if (i > 0) printf("|");
+	if (sc->bce_flags & BCE_USING_MSIX_FLAG) {
+		if (i > 0) printf("|");
 		printf("MSI-X"); i++;
-    }
+	}
 
-    if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) {
-        if (i > 0) printf("|");
+	if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) {
+		if (i > 0) printf("|");
 		printf("2.5G"); i++;
-    }
+	}
 
-    if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) {
-        if (i > 0) printf("|");
-        printf("MFW); MFW (%s)\n", sc->bce_mfw_ver);
-    } else {
-        printf(")\n");
-    }
+	if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) {
+		if (i > 0) printf("|");
+		printf("MFW); MFW (%s)\n", sc->bce_mfw_ver);
+	} else {
+		printf(")\n");
+	}
 
 	DBEXIT(BCE_VERBOSE_LOAD);
 }
@@ -667,8 +676,8 @@ bce_probe_pci_caps(device_t dev, struct 
 	if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
 		if (reg != 0) {
 			u16 link_status = pci_read_config(dev, reg + 0x12, 2);
-			DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n",
-				link_status);
+			DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = "
+			    "0x%08X\n",	link_status);
 			sc->link_speed = link_status & 0xf;
 			sc->link_width = (link_status >> 4) & 0x3f;
 			sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG;
@@ -730,7 +739,7 @@ bce_attach(device_t dev)
 
 	if (sc->bce_res_mem == NULL) {
 		BCE_PRINTF("%s(%d): PCI memory allocation failed\n",
-			__FILE__, __LINE__);
+		    __FILE__, __LINE__);
 		rc = ENXIO;
 		goto bce_attach_fail;
 	}
@@ -801,14 +810,14 @@ bce_attach(device_t dev)
 	}
 
 	sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ,
-		&rid, RF_SHAREABLE | RF_ACTIVE);
+	    &rid, RF_SHAREABLE | RF_ACTIVE);
 
 	sc->bce_irq_rid = rid;
 
 	/* Report any IRQ allocation errors. */
 	if (sc->bce_res_irq == NULL) {
 		BCE_PRINTF("%s(%d): PCI map interrupt failed!\n",
-			__FILE__, __LINE__);
+		    __FILE__, __LINE__);
 		rc = ENXIO;
 		goto bce_attach_fail;
 	}
@@ -823,28 +832,28 @@ bce_attach(device_t dev)
 	 * valid until this is done.
 	 */
 	pci_write_config(dev, BCE_PCICFG_MISC_CONFIG,
-			       BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA |
-			       BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4);
+	    BCE_PCICFG_MISC_CONFIG_REG_WINDOW_ENA |
+	    BCE_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP, 4);
 
 	/* Save ASIC revsion info. */
 	sc->bce_chipid =  REG_RD(sc, BCE_MISC_ID);
 
 	/* Weed out any non-production controller revisions. */
 	switch(BCE_CHIP_ID(sc)) {
-		case BCE_CHIP_ID_5706_A0:
-		case BCE_CHIP_ID_5706_A1:
-		case BCE_CHIP_ID_5708_A0:
-		case BCE_CHIP_ID_5708_B0:
-		case BCE_CHIP_ID_5709_A0:
-		case BCE_CHIP_ID_5709_B0:
-		case BCE_CHIP_ID_5709_B1:
-		case BCE_CHIP_ID_5709_B2:
-			BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n",
-				__FILE__, __LINE__,
-				(((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'),
-			    (pci_read_config(dev, PCIR_REVID, 4) & 0xf));
-			rc = ENODEV;
-			goto bce_attach_fail;
+	case BCE_CHIP_ID_5706_A0:
+	case BCE_CHIP_ID_5706_A1:
+	case BCE_CHIP_ID_5708_A0:
+	case BCE_CHIP_ID_5708_B0:
+	case BCE_CHIP_ID_5709_A0:
+	case BCE_CHIP_ID_5709_B0:
+	case BCE_CHIP_ID_5709_B1:
+	case BCE_CHIP_ID_5709_B2:
+		BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n",
+		    __FILE__, __LINE__,
+		    (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'),
+		    (pci_read_config(dev, PCIR_REVID, 4) & 0xf));
+		rc = ENODEV;
+		goto bce_attach_fail;
 	}
 
 	/*
@@ -866,58 +875,67 @@ bce_attach(device_t dev)
 	if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG)
 		/* Multi-port devices use different offsets in shared memory. */
 		sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 +
-			(pci_get_function(sc->bce_dev) << 2));
+		    (pci_get_function(sc->bce_dev) << 2));
 	else
 		sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE;
 
 	DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n",
-		__FUNCTION__, sc->bce_shmem_base);
+	    __FUNCTION__, sc->bce_shmem_base);
 
 	/* Fetch the bootcode revision. */
-    val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV);
-    for (int i = 0, j = 0; i < 3; i++) {
-        u8 num;
-
-        num = (u8) (val >> (24 - (i * 8)));
-        for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) {
-            if (num >= k || !skip0 || k == 1) {
-                sc->bce_bc_ver[j++] = (num / k) + '0';
-                skip0 = 0;
-            }
-        }
-        if (i != 2)
-            sc->bce_bc_ver[j++] = '.';
-    }
-
-    /* Check if any management firwmare is running. */
-    val = bce_shmem_rd(sc, BCE_PORT_FEATURE);
-    if (val & BCE_PORT_FEATURE_ASF_ENABLED) {
-        sc->bce_flags |= BCE_MFW_ENABLE_FLAG;
-
-        /* Allow time for firmware to enter the running state. */
-        for (int i = 0; i < 30; i++) {
-            val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION);
-            if (val & BCE_CONDITION_MFW_RUN_MASK)
-                break;
-            DELAY(10000);
-        }
-    }
-
-    /* Check the current bootcode state. */
-    val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION);
-    val &= BCE_CONDITION_MFW_RUN_MASK;
-    if (val != BCE_CONDITION_MFW_RUN_UNKNOWN &&
-        val != BCE_CONDITION_MFW_RUN_NONE) {
-        u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR);
-        int i = 0;
-
-        for (int j = 0; j < 3; j++) {
-            val = bce_reg_rd_ind(sc, addr + j * 4);
-            val = bswap32(val);
-            memcpy(&sc->bce_mfw_ver[i], &val, 4);
-            i += 4;
-        }
-    }
+	val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV);
+	for (int i = 0, j = 0; i < 3; i++) {
+		u8 num;
+
+		num = (u8) (val >> (24 - (i * 8)));
+		for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) {
+			if (num >= k || !skip0 || k == 1) {
+				sc->bce_bc_ver[j++] = (num / k) + '0';
+				skip0 = 0;
+			}
+		}
+
+		if (i != 2)
+			sc->bce_bc_ver[j++] = '.';
+	}
+
+	/* Check if any management firwmare is enabled. */
+	val = bce_shmem_rd(sc, BCE_PORT_FEATURE);
+	if (val & BCE_PORT_FEATURE_ASF_ENABLED) {
+		sc->bce_flags |= BCE_MFW_ENABLE_FLAG;
+
+		/* Allow time for firmware to enter the running state. */
+		for (int i = 0; i < 30; i++) {
+			val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION);
+			if (val & BCE_CONDITION_MFW_RUN_MASK)
+				break;
+			DELAY(10000);
+		}
+
+		/* Check if management firmware is running. */
+		val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION);
+		val &= BCE_CONDITION_MFW_RUN_MASK;
+		if ((val != BCE_CONDITION_MFW_RUN_UNKNOWN) &&
+		    (val != BCE_CONDITION_MFW_RUN_NONE)) {
+			u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR);
+			int i = 0;
+
+			/* Read the management firmware version string. */
+			for (int j = 0; j < 3; j++) {
+				val = bce_reg_rd_ind(sc, addr + j * 4);
+				val = bswap32(val);
+				memcpy(&sc->bce_mfw_ver[i], &val, 4);
+				i += 4;
+			}
+		} else {
+			/* May cause firmware synchronization timeouts. */
+			BCE_PRINTF("%s(%d): Management firmware enabled "
+			    "but not running!\n", __FILE__, __LINE__);
+			strcpy(sc->bce_mfw_ver, "NOT RUNNING!");
+
+			/* ToDo: Any action the driver should take? */
+		}
+	}
 
 	/* Get PCI bus information (speed and type). */
 	val = REG_RD(sc, BCE_PCICFG_MISC_STATUS);
@@ -964,10 +982,10 @@ bce_attach(device_t dev)
 	if (val & BCE_PCICFG_MISC_STATUS_32BIT_DET)
 		sc->bce_flags |= BCE_PCI_32BIT_FLAG;
 
-	/* Reset the controller and announce to bootcode that driver is present. */
+	/* Reset controller and announce to bootcode that driver is present. */
 	if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) {
 		BCE_PRINTF("%s(%d): Controller reset failed!\n",
-			__FILE__, __LINE__);
+		    __FILE__, __LINE__);
 		rc = ENXIO;
 		goto bce_attach_fail;
 	}
@@ -975,7 +993,7 @@ bce_attach(device_t dev)
 	/* Initialize the controller. */
 	if (bce_chipinit(sc)) {
 		BCE_PRINTF("%s(%d): Controller initialization failed!\n",
-			__FILE__, __LINE__);
+		    __FILE__, __LINE__);
 		rc = ENXIO;
 		goto bce_attach_fail;
 	}
@@ -983,7 +1001,7 @@ bce_attach(device_t dev)
 	/* Perform NVRAM test. */
 	if (bce_nvram_test(sc)) {
 		BCE_PRINTF("%s(%d): NVRAM test failed!\n",
-			__FILE__, __LINE__);
+		    __FILE__, __LINE__);
 		rc = ENXIO;
 		goto bce_attach_fail;
 	}
@@ -1024,6 +1042,14 @@ bce_attach(device_t dev)
 	sc->bce_rx_ticks               = 18;
 #endif
 
+	/* Not used for L2. */
+	sc->bce_comp_prod_trip_int = 0;
+	sc->bce_comp_prod_trip = 0;
+	sc->bce_com_ticks_int = 0;
+	sc->bce_com_ticks = 0;
+	sc->bce_cmd_ticks_int = 0;
+	sc->bce_cmd_ticks = 0;
+
 	/* Update statistics once every second. */
 	sc->bce_stats_ticks = 1000000 & 0xffff00;
 
@@ -1507,7 +1533,8 @@ bce_miibus_read_reg(device_t dev, int ph
 
 	/* Make sure we are accessing the correct PHY address. */
 	if (phy != sc->bce_phy_addr) {
-		DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY read!\n", phy);
+		DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d "
+		    "for PHY read!\n", phy);
 		return(0);
 	}
 
@@ -1533,8 +1560,8 @@ bce_miibus_read_reg(device_t dev, int ph
 
 
 	val = BCE_MIPHY(phy) | BCE_MIREG(reg) |
-		BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT |
-		BCE_EMAC_MDIO_COMM_START_BUSY;
+	    BCE_EMAC_MDIO_COMM_COMMAND_READ | BCE_EMAC_MDIO_COMM_DISEXT |
+	    BCE_EMAC_MDIO_COMM_START_BUSY;
 	REG_WR(sc, BCE_EMAC_MDIO_COMM, val);
 
 	for (i = 0; i < BCE_PHY_TIMEOUT; i++) {
@@ -1552,8 +1579,8 @@ bce_miibus_read_reg(device_t dev, int ph
 	}
 
 	if (val & BCE_EMAC_MDIO_COMM_START_BUSY) {
-		BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, reg = 0x%04X\n",
-			__FILE__, __LINE__, phy, reg);
+		BCE_PRINTF("%s(%d): Error: PHY read timeout! phy = %d, "
+		    "reg = 0x%04X\n", __FILE__, __LINE__, phy, reg);
 		val = 0x0;
 	} else {
 		val = REG_RD(sc, BCE_EMAC_MDIO_COMM);
@@ -1595,17 +1622,18 @@ bce_miibus_write_reg(device_t dev, int p
 
 	/* Make sure we are accessing the correct PHY address. */
 	if (phy != sc->bce_phy_addr) {
-		DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d for PHY write!\n", phy);
+		DBPRINT(sc, BCE_INSANE_PHY, "Invalid PHY address %d "
+		    "for PHY write!\n", phy);
 		return(0);
 	}
 
 	DB_PRINT_PHY_REG(reg, val);
 
-    /*
-     * The 5709S PHY is an IEEE Clause 45 PHY
-     * with special mappings to work with IEEE
-     * Clause 22 register accesses.
-     */
+	/*
+	 * The 5709S PHY is an IEEE Clause 45 PHY
+	 * with special mappings to work with IEEE
+	 * Clause 22 register accesses.
+	 */
 	if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) {
 		if (reg >= MII_BMCR && reg <= MII_ANLPRNP)
 			reg += 0x10;
@@ -1622,8 +1650,8 @@ bce_miibus_write_reg(device_t dev, int p
 	}
 
 	val1 = BCE_MIPHY(phy) | BCE_MIREG(reg) | val |
-		BCE_EMAC_MDIO_COMM_COMMAND_WRITE |
-		BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT;
+	    BCE_EMAC_MDIO_COMM_COMMAND_WRITE |
+	    BCE_EMAC_MDIO_COMM_START_BUSY | BCE_EMAC_MDIO_COMM_DISEXT;
 	REG_WR(sc, BCE_EMAC_MDIO_COMM, val1);
 
 	for (i = 0; i < BCE_PHY_TIMEOUT; i++) {
@@ -1638,7 +1666,7 @@ bce_miibus_write_reg(device_t dev, int p
 
 	if (val1 & BCE_EMAC_MDIO_COMM_START_BUSY)
 		BCE_PRINTF("%s(%d): PHY write timeout!\n",
-			__FILE__, __LINE__);
+		    __FILE__, __LINE__);
 
 	if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) {
 		val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE);
@@ -2653,18 +2681,22 @@ bce_get_media(struct bce_softc *sc)
 		 * for Copper or SerDes operation.
 		 */
 		if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_C) {
-			DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for copper.\n");
+			DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded "
+			    "for copper.\n");
 			goto bce_get_media_exit;
 		} else if (bond_id == BCE_MISC_DUAL_MEDIA_CTRL_BOND_ID_S) {
-			DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded for dual media.\n");
+			DBPRINT(sc, BCE_INFO_LOAD, "5709 bonded "
+			    "for dual media.\n");
 			sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
 			goto bce_get_media_exit;
 		}
 
 		if (val & BCE_MISC_DUAL_MEDIA_CTRL_STRAP_OVERRIDE)
-			strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21;
+			strap = (val & 
+			    BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL) >> 21;
 		else
-			strap = (val & BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8;
+			strap = (val & 
+			    BCE_MISC_DUAL_MEDIA_CTRL_PHY_CTRL_STRAP) >> 8;
 
 		if (pci_get_function(sc->bce_dev) == 0) {
 			switch (strap) {
@@ -2672,13 +2704,13 @@ bce_get_media(struct bce_softc *sc)
 			case 0x5:
 			case 0x6:
 				DBPRINT(sc, BCE_INFO_LOAD,
-					"BCM5709 s/w configured for SerDes.\n");
+				    "BCM5709 s/w configured for SerDes.\n");
 				sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
-                break;
+				break;
 			default:
 				DBPRINT(sc, BCE_INFO_LOAD,
-					"BCM5709 s/w configured for Copper.\n");
-                break;
+				    "BCM5709 s/w configured for Copper.\n");
+				break;
 			}
 		} else {
 			switch (strap) {
@@ -2686,13 +2718,13 @@ bce_get_media(struct bce_softc *sc)
 			case 0x2:
 			case 0x4:
 				DBPRINT(sc, BCE_INFO_LOAD,
-					"BCM5709 s/w configured for SerDes.\n");
+				    "BCM5709 s/w configured for SerDes.\n");
 				sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
-                break;
+				break;
 			default:
 				DBPRINT(sc, BCE_INFO_LOAD,
-					"BCM5709 s/w configured for Copper.\n");
-                break;
+				    "BCM5709 s/w configured for Copper.\n");
+				break;
 			}
 		}
 
@@ -2703,21 +2735,23 @@ bce_get_media(struct bce_softc *sc)
 
 		sc->bce_flags |= BCE_NO_WOL_FLAG;
 
-		/* 5708S, 5709S, and 5716S use a separate PHY for SerDes. */
-		if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) 
-			sc->bce_phy_addr = 2;
-
-		if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) {
+		if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709)
 			sc->bce_phy_flags |= BCE_PHY_IEEE_CLAUSE_45_FLAG;
 
+		if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) {
+			/* 5708S/09S/16S use a separate PHY for SerDes. */
+			sc->bce_phy_addr = 2;
+
 			val = bce_shmem_rd(sc, BCE_SHARED_HW_CFG_CONFIG);
 			if (val & BCE_SHARED_HW_CFG_PHY_2_5G) {
-				sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG;
-				DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n");
+				sc->bce_phy_flags |= 
+				    BCE_PHY_2_5G_CAPABLE_FLAG;
+				DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb "
+				    "capable adapter\n");
 			}
-        }
+		}
 	} else if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5706) ||
-		   (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708))
+	    (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708))
 		sc->bce_phy_flags |= BCE_PHY_CRC_FIX_FLAG;
 
 bce_get_media_exit:
@@ -2746,13 +2780,13 @@ bce_init_media(struct bce_softc *sc)
 		 * is done in mii layer.
 		 */
 
-        /* Select auto-negotiation MMD of the PHY. */
-        bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr,
+		/* Select auto-negotiation MMD of the PHY. */
+		bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr,
 		    BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_ADDR_EXT);
 		bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr,
 		    BRGPHY_ADDR_EXT, BRGPHY_ADDR_EXT_AN_MMD);
 
-        /* Select IEEE0 block of AN MMD (assumed in all brgphy(4) code). */
+		/* Set IEEE0 block of AN MMD (assumed in brgphy(4) code). */
 		bce_miibus_write_reg(sc->bce_dev, sc->bce_phy_addr,
 		    BRGPHY_BLOCK_ADDR, BRGPHY_BLOCK_ADDR_COMBO_IEEE0);
 	}
@@ -2778,7 +2812,7 @@ bce_dma_free(struct bce_softc *sc)
 	/* Free, unmap, and destroy the status block. */
 	if (sc->status_block != NULL) {
 		bus_dmamem_free(
-			sc->status_tag,
+		   sc->status_tag,
 		    sc->status_block,
 		    sc->status_map);
 		sc->status_block = NULL;
@@ -2786,7 +2820,7 @@ bce_dma_free(struct bce_softc *sc)
 
 	if (sc->status_map != NULL) {
 		bus_dmamap_unload(
-			sc->status_tag,
+		    sc->status_tag,
 		    sc->status_map);
 		bus_dmamap_destroy(sc->status_tag,
 		    sc->status_map);
@@ -2802,7 +2836,7 @@ bce_dma_free(struct bce_softc *sc)
 	/* Free, unmap, and destroy the statistics block. */
 	if (sc->stats_block != NULL) {
 		bus_dmamem_free(
-			sc->stats_tag,
+		    sc->stats_tag,
 		    sc->stats_block,
 		    sc->stats_map);
 		sc->stats_block = NULL;
@@ -2810,7 +2844,7 @@ bce_dma_free(struct bce_softc *sc)
 
 	if (sc->stats_map != NULL) {
 		bus_dmamap_unload(
-			sc->stats_tag,
+		    sc->stats_tag,
 		    sc->stats_map);
 		bus_dmamap_destroy(sc->stats_tag,
 		    sc->stats_map);
@@ -2829,7 +2863,7 @@ bce_dma_free(struct bce_softc *sc)
 		for (i = 0; i < sc->ctx_pages; i++ ) {
 			if (sc->ctx_block[i] != NULL) {
 				bus_dmamem_free(
-					sc->ctx_tag,
+				    sc->ctx_tag,
 				    sc->ctx_block[i],
 				    sc->ctx_map[i]);
 				sc->ctx_block[i] = NULL;
@@ -2837,10 +2871,10 @@ bce_dma_free(struct bce_softc *sc)
 
 			if (sc->ctx_map[i] != NULL) {
 				bus_dmamap_unload(
-					sc->ctx_tag,
-		    		sc->ctx_map[i]);
+				    sc->ctx_tag,
+				    sc->ctx_map[i]);
 				bus_dmamap_destroy(
-					sc->ctx_tag,
+				    sc->ctx_tag,
 				    sc->ctx_map[i]);
 				sc->ctx_map[i] = NULL;
 			}
@@ -2858,7 +2892,7 @@ bce_dma_free(struct bce_softc *sc)
 	for (i = 0; i < TX_PAGES; i++ ) {
 		if (sc->tx_bd_chain[i] != NULL) {
 			bus_dmamem_free(
-				sc->tx_bd_chain_tag,
+			    sc->tx_bd_chain_tag,
 			    sc->tx_bd_chain[i],
 			    sc->tx_bd_chain_map[i]);
 			sc->tx_bd_chain[i] = NULL;
@@ -2866,10 +2900,10 @@ bce_dma_free(struct bce_softc *sc)
 
 		if (sc->tx_bd_chain_map[i] != NULL) {
 			bus_dmamap_unload(
-				sc->tx_bd_chain_tag,
-		    	sc->tx_bd_chain_map[i]);
+			    sc->tx_bd_chain_tag,
+			    sc->tx_bd_chain_map[i]);
 			bus_dmamap_destroy(
-				sc->tx_bd_chain_tag,
+			    sc->tx_bd_chain_tag,
 			    sc->tx_bd_chain_map[i]);
 			sc->tx_bd_chain_map[i] = NULL;
 		}
@@ -2886,7 +2920,7 @@ bce_dma_free(struct bce_softc *sc)
 	for (i = 0; i < RX_PAGES; i++ ) {
 		if (sc->rx_bd_chain[i] != NULL) {
 			bus_dmamem_free(
-				sc->rx_bd_chain_tag,
+			    sc->rx_bd_chain_tag,
 			    sc->rx_bd_chain[i],
 			    sc->rx_bd_chain_map[i]);
 			sc->rx_bd_chain[i] = NULL;
@@ -2894,10 +2928,10 @@ bce_dma_free(struct bce_softc *sc)
 
 		if (sc->rx_bd_chain_map[i] != NULL) {
 			bus_dmamap_unload(
-				sc->rx_bd_chain_tag,
-		    	sc->rx_bd_chain_map[i]);
+			    sc->rx_bd_chain_tag,
+			    sc->rx_bd_chain_map[i]);
 			bus_dmamap_destroy(
-				sc->rx_bd_chain_tag,
+			    sc->rx_bd_chain_tag,
 			    sc->rx_bd_chain_map[i]);
 			sc->rx_bd_chain_map[i] = NULL;
 		}
@@ -2915,7 +2949,7 @@ bce_dma_free(struct bce_softc *sc)
 	for (i = 0; i < PG_PAGES; i++ ) {
 		if (sc->pg_bd_chain[i] != NULL) {
 			bus_dmamem_free(
-				sc->pg_bd_chain_tag,
+			    sc->pg_bd_chain_tag,
 			    sc->pg_bd_chain[i],
 			    sc->pg_bd_chain_map[i]);
 			sc->pg_bd_chain[i] = NULL;
@@ -2923,10 +2957,10 @@ bce_dma_free(struct bce_softc *sc)
 
 		if (sc->pg_bd_chain_map[i] != NULL) {
 			bus_dmamap_unload(
-				sc->pg_bd_chain_tag,
-		    	sc->pg_bd_chain_map[i]);
+			    sc->pg_bd_chain_tag,
+			    sc->pg_bd_chain_map[i]);
 			bus_dmamap_destroy(
-				sc->pg_bd_chain_tag,
+			    sc->pg_bd_chain_tag,
 			    sc->pg_bd_chain_map[i]);
 			sc->pg_bd_chain_map[i] = NULL;
 		}
@@ -2944,9 +2978,9 @@ bce_dma_free(struct bce_softc *sc)
 	for (i = 0; i < TOTAL_TX_BD; i++) {
 		if (sc->tx_mbuf_map[i] != NULL) {
 			bus_dmamap_unload(sc->tx_mbuf_tag,
-				sc->tx_mbuf_map[i]);
+			    sc->tx_mbuf_map[i]);
 			bus_dmamap_destroy(sc->tx_mbuf_tag,
-	 			sc->tx_mbuf_map[i]);
+	 		    sc->tx_mbuf_map[i]);
 			sc->tx_mbuf_map[i] = NULL;
 		}
 	}
@@ -2961,9 +2995,9 @@ bce_dma_free(struct bce_softc *sc)
 	for (i = 0; i < TOTAL_RX_BD; i++) {
 		if (sc->rx_mbuf_map[i] != NULL) {
 			bus_dmamap_unload(sc->rx_mbuf_tag,
-				sc->rx_mbuf_map[i]);
+			    sc->rx_mbuf_map[i]);
 			bus_dmamap_destroy(sc->rx_mbuf_tag,
-	 			sc->rx_mbuf_map[i]);
+	 		    sc->rx_mbuf_map[i]);
 			sc->rx_mbuf_map[i] = NULL;
 		}
 	}
@@ -2979,9 +3013,9 @@ bce_dma_free(struct bce_softc *sc)
 	for (i = 0; i < TOTAL_PG_BD; i++) {
 		if (sc->pg_mbuf_map[i] != NULL) {
 			bus_dmamap_unload(sc->pg_mbuf_tag,
-				sc->pg_mbuf_map[i]);
+			    sc->pg_mbuf_map[i]);
 			bus_dmamap_destroy(sc->pg_mbuf_tag,
-	 			sc->pg_mbuf_map[i]);
+	 		    sc->pg_mbuf_map[i]);
 			sc->pg_mbuf_map[i] = NULL;
 		}
 	}
@@ -3074,20 +3108,12 @@ bce_dma_alloc(device_t dev)
 	/*
 	 * Allocate the parent bus DMA tag appropriate for PCI.
 	 */
-	if (bus_dma_tag_create(NULL,
-			1,
-			BCE_DMA_BOUNDARY,
-			sc->max_bus_addr,
-			BUS_SPACE_MAXADDR,
-			NULL, NULL,
-			MAXBSIZE,
-			BUS_SPACE_UNRESTRICTED,
-			BUS_SPACE_MAXSIZE_32BIT,
-			0,
-			NULL, NULL,
-			&sc->parent_tag)) {
+	if (bus_dma_tag_create(NULL, 1,	BCE_DMA_BOUNDARY,
+	    sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL,
+	    MAXBSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE_32BIT,
+	    0, NULL, NULL, &sc->parent_tag)) {
 		BCE_PRINTF("%s(%d): Could not allocate parent DMA tag!\n",
-			__FILE__, __LINE__);
+		    __FILE__, __LINE__);
 		rc = ENOMEM;
 		goto bce_dma_alloc_exit;
 	}
@@ -3097,117 +3123,89 @@ bce_dma_alloc(device_t dev)
 	 * memory, map the memory into DMA space, and fetch the physical
 	 * address of the block.
 	 */
-	if (bus_dma_tag_create(sc->parent_tag,
-	    	BCE_DMA_ALIGN,
-	    	BCE_DMA_BOUNDARY,
-	    	sc->max_bus_addr,
-	    	BUS_SPACE_MAXADDR,
-	    	NULL, NULL,
-	    	BCE_STATUS_BLK_SZ,
-	    	1,
-	    	BCE_STATUS_BLK_SZ,
-	    	0,
-	    	NULL, NULL,
-	    	&sc->status_tag)) {
-		BCE_PRINTF("%s(%d): Could not allocate status block DMA tag!\n",
-			__FILE__, __LINE__);
+	if (bus_dma_tag_create(sc->parent_tag, BCE_DMA_ALIGN,
+	    BCE_DMA_BOUNDARY, sc->max_bus_addr,	BUS_SPACE_MAXADDR,

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 13:04:27 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 92EE2106564A;
	Tue,  6 Apr 2010 13:04:27 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 80E4A8FC13;
	Tue,  6 Apr 2010 13:04:27 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36D4RN0072278;
	Tue, 6 Apr 2010 13:04:27 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36D4R3I072276;
	Tue, 6 Apr 2010 13:04:27 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201004061304.o36D4R3I072276@svn.freebsd.org>
From: Rui Paulo 
Date: Tue, 6 Apr 2010 13:04:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206269 - stable/8/sbin/ifconfig
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 13:04:27 -0000

Author: rpaulo
Date: Tue Apr  6 13:04:27 2010
New Revision: 206269
URL: http://svn.freebsd.org/changeset/base/206269

Log:
  MFC r205514:
   Add a missing LINE_BREAK() after printing the roaming parameters in
   verbose mode.
  
   Sponsored by:	iXsystems, inc.

Modified:
  stable/8/sbin/ifconfig/ifieee80211.c
Directory Properties:
  stable/8/sbin/ifconfig/   (props changed)

Modified: stable/8/sbin/ifconfig/ifieee80211.c
==============================================================================
--- stable/8/sbin/ifconfig/ifieee80211.c	Tue Apr  6 12:44:28 2010	(r206268)
+++ stable/8/sbin/ifconfig/ifieee80211.c	Tue Apr  6 13:04:27 2010	(r206269)
@@ -4516,6 +4516,7 @@ end:
 		} else {
 			LINE_BREAK();
 			list_roam(s);
+			LINE_BREAK();
 		}
 	}
 

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 13:12:12 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 72867106566B;
	Tue,  6 Apr 2010 13:12:12 +0000 (UTC)
	(envelope-from n_hibma@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4617F8FC17;
	Tue,  6 Apr 2010 13:12:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36DCCZZ074042;
	Tue, 6 Apr 2010 13:12:12 GMT (envelope-from n_hibma@svn.freebsd.org)
Received: (from n_hibma@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36DCCYA074039;
	Tue, 6 Apr 2010 13:12:12 GMT (envelope-from n_hibma@svn.freebsd.org)
Message-Id: <201004061312.o36DCCYA074039@svn.freebsd.org>
From: Nick Hibma 
Date: Tue, 6 Apr 2010 13:12:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206270 - stable/7/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 13:12:12 -0000

Author: n_hibma
Date: Tue Apr  6 13:12:11 2010
New Revision: 206270
URL: http://svn.freebsd.org/changeset/base/206270

Log:
  Add the ID of the Option GTM382 Mini PCI express module
  
  Approved by:	re (implicit)

Modified:
  stable/7/sys/dev/usb/u3g.c
  stable/7/sys/dev/usb/usbdevs

Modified: stable/7/sys/dev/usb/u3g.c
==============================================================================
--- stable/7/sys/dev/usb/u3g.c	Tue Apr  6 13:04:27 2010	(r206269)
+++ stable/7/sys/dev/usb/u3g.c	Tue Apr  6 13:12:11 2010	(r206270)
@@ -99,11 +99,11 @@ static const struct u3g_speeds_s u3g_spe
 #define U3GSP_UMTS	3
 	{384000,	64000},
 #define U3GSP_HSDPA	4
-	{1200000,	384000},
+	{7200000,	384000},
 #define U3GSP_HSUPA	5
-	{1200000,	384000},
+	{7200000,	2000000},
 #define U3GSP_HSPA	6
-	{7200000,	384000},
+	{7200000,	2000000},
 };
 
 #define U3GIBUFSIZE	1024
@@ -135,6 +135,7 @@ static const struct u3g_dev_type_s u3g_d
 	{{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 },		U3GSP_HSDPA,	U3GINIT_NONE },
 	{{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPA },		U3GSP_HSDPA,	U3GINIT_NONE },
 	{{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G },	U3GSP_UMTS,	U3GINIT_NONE },
+	{{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTM382 },		U3GSP_HSPA,	U3GINIT_NONE },
 	/* OEM: Qualcomm, Inc. */
 	{{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR },	U3GSP_CDMA,	U3GINIT_ZTESTOR },
 	{{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM },	U3GSP_CDMA,	U3GINIT_EJECT },

Modified: stable/7/sys/dev/usb/usbdevs
==============================================================================
--- stable/7/sys/dev/usb/usbdevs	Tue Apr  6 13:04:27 2010	(r206269)
+++ stable/7/sys/dev/usb/usbdevs	Tue Apr  6 13:12:11 2010	(r206270)
@@ -1917,6 +1917,7 @@ product OPTION GT3GPLUS		0x6600	GlobeTro
 product OPTION GTICON322	0xd033	GlobeTrotter Icon322 storage
 product OPTION GTMAX36		0x6701	GlobeTrotter Max 3.6 Modem
 product OPTION GTMAXHSUPA	0x7001	GlobeTrotter HSUPA
+product OPTION GTM382		0x7601	GTM382
 
 /* OQO */
 product OQO WIFI01		0x0002	model 01 WiFi interface

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 13:46:28 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EA4CB106566C;
	Tue,  6 Apr 2010 13:46:28 +0000 (UTC)
	(envelope-from Andre.Albsmeier@siemens.com)
Received: from david.siemens.de (david.siemens.de [192.35.17.14])
	by mx1.freebsd.org (Postfix) with ESMTP id 65F4A8FC1F;
	Tue,  6 Apr 2010 13:46:27 +0000 (UTC)
Received: from mail3.siemens.de (localhost [127.0.0.1])
	by david.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id
	o36DkQhl012954; Tue, 6 Apr 2010 15:46:26 +0200
Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130])
	by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id
	o36DkQBB005506; Tue, 6 Apr 2010 15:46:26 +0200
Received: (from localhost)
	by curry.mchp.siemens.de (8.14.4/8.14.4) id o36DkQ65040266;
Date: Tue, 6 Apr 2010 15:46:26 +0200
From: Andre Albsmeier 
To: Pyun YongHyeon 
Message-ID: <20100406134626.GA1727@curry.mchp.siemens.de>
References: <201003241721.o2OHL5K9063538@svn.freebsd.org>
	<20100405145937.GA78871@curry.mchp.siemens.de>
	<20100405180642.GD1225@michelle.cdnetworks.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20100405180642.GD1225@michelle.cdnetworks.com>
X-Echelon: 
X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses!
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: "svn-src-stable@freebsd.org" ,
	"svn-src-all@freebsd.org" , "Albsmeier,
	Andre" , Pyun YongHyeon 
Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 13:46:29 -0000

On Mon, 05-Apr-2010 at 20:06:42 +0200, Pyun YongHyeon wrote:
> On Mon, Apr 05, 2010 at 04:59:37PM +0200, Andre Albsmeier wrote:
> > On Wed, 24-Mar-2010 at 18:21:05 +0100, Pyun YongHyeon wrote:
> > > Author: yongari
> > > Date: Wed Mar 24 17:21:05 2010
> > > New Revision: 205614
> > > URL: http://svn.freebsd.org/changeset/base/205614
> > > 
> > > Log:
> > >   MFC r204545:
> > >     Remove taskqueue based interrupt handling. After r204541 msk(4)
> > >     does not generate excessive interrupts any more so we don't need
> > >     to have two copies of interrupt handler.
> > >     While I'm here remove two STAT_PUT_IDX register accesses in LE
> > >     status event handler. After r204539 msk(4) always sync status LEs
> > >     so there is no need to resort to reading STAT_PUT_IDX register to
> > >     know the end of status LE processing. Just trust status LE's
> > >     ownership bit.
> > 
> > This ruined the performance on my system heavily. I noticed it
> > when unpacking a local tar archive onto an NFS-mounted location
> > on an em(4)-based box. This archive is about 50MB of size with
> > a bit over 5600 files so files have an average size of 9 kB.
> > 
> > I also noticed the slowdown when doing rdist-based updates (again
> > lots of small files) onto the other box.
> > 
> > Just pumping bytes over the network shows no problems -- I can
> > transmit 100-105 MB/s and receive 95-100 MB/s when talking
> > to this em(4)-based box without problem (and as it was before).
> > 
> > When copying a few big files (several GBs of size) over NFS
> > I get something between 70 and 90 MB/s which is the same as
> > what I had got before.
> > 
> > If have made some tests to track down when the issues began.
> > Problems started with rev. 1.18.2.37 of if_msk.c but could
> > be alleviated by setting dev.mskc.0.int_holdoff to 1 or 0.
> > Things really got problematic with rev. 1.18.2.38 -- adjusting
> > dev.mskc.0.int_holdoff helped a lot but we are far from what
> > we had with 1.18.2.36 or earlier. I did 5 rounds of testing,
> > each with the same set of if_msk.c revisions and values for
> > int_holdoff (where appropriate) just to check reproducibility:
> > 
> > if_msk.c rev.   round1  round2  round3  round4  round5
> > --------------------------------------------------------
> > 1.18.2.34       17,115  18,408  17,977  16,412  19,170
> > 1.18.2.35       18,414  17,863  17,000  18,428  18,093
> > 1.18.2.36       19,631  18,167  18,105  18,401  17,995
> > 1.18.2.37       22,707  24,830  24,322  23,613  22,498
> >  int_holdoff=10 19,259  19,870  19,355  18,725  19,273
> >  int_holdoff=1  18,464  18,218  17,862  16,701  17,798
> >  int_holdoff=0  19,423  18,507  19,505  20,714  20,460
> > 1.18.2.38       57,169  53,394  58,721     not done
> >  int_holdoff=10 30,266  33,493  33,240  33,247  30,470
> >  int_holdoff=1  27,013  28,777  28,047  25,858  27,615
> >  int_holdoff=0  40,284  33,040  33,726  36,834  35,235
> > 
> > All this is on 
> > 
> > FreeBSD-7.3-STABLE
> > 
> > CPU: Intel(R) Core(TM)2 Quad CPU    Q9650  @ 3.00GHz (3001.18-MHz 686-class CPU)
> >   Origin = "GenuineIntel"  Id = 0x1067a  Family = 6  Model = 17  Stepping = 10
> > 
> > dev.mskc.0.%desc: Marvell Yukon 88E8053 Gigabit Ethernet
> > dev.msk.0.%desc: Marvell Technology Group Ltd. Yukon EC Id 0xb6 Rev 0x02
> > 
> > hw.msk.msi_disable was set to 1 but didn't change results
> > when commenting it out.
> > 
> > Any ideas or things I can try?
> > 
> 
> Could you narrow down which side(RX or TX) cause the issue you're
> seeing? From your description it's not clear whether msk(4) is used
> as sender or receiver.

Well, both. I will try to describe the setup more exactly:

On the msk(4)-box a locally residing tar file (48 MB size
containing 5600 files) is unpacked onto an NFS volume.
This NFS volume is mounted from another box which got
an em(4)-based NIC. I have now measured the amounts of
data being sent end received simply by using netstat:

About 62 MB are being sent out of the msk(4)-box to the
em(4)-based NFS box and about 22 MB are received on the
msk(4)-box from the em(4)-based NFS box.

I have now tried the reverse direction as well: The em(4)-
based box mounts an NFS volume from the msk(4)-box and
unpacks the same tar file (now the 62 MB are received on
the msk(4)-box and 22 MB are transmitted from the msk(4)-
box). The results are similar:

rev. 1.18.2.38:	48,243 seconds
rev. 1.18.2.36: 17,536 seconds

But I noticed another thing here at work: If I choose a
remote machine which uses myk(4) (not msk(4)) instead of
em(4) there are no performance issues noticable. Unfortu-
natley I can't test msk(4) on the remote side at the
moment... So the performance issues exist only when the
new msk driver is talking to an em-based NIC...

> As you know 1.18.2.38 removed taskqueue based interrupt handling so
> it could be culprit of the issue. But that revision also removed
> two register accesses in TX path so I'd like to know which one
> caused the issue. 

I have now tried rev. 1.18.2.38 with this patch (no idea if
this is right ;-)):

--- if_msk.c.1.18.2.38	2010-04-06 15:09:19.000000000 +0200
+++ if_msk.c.1.18.2.38.TRY	2010-04-06 15:38:13.000000000 +0200
@@ -3327,6 +3327,11 @@
 	uint32_t control, status;
 	int cons, len, port, rxprog;
 
+	int idx;
+	idx = CSR_READ_2(sc, STAT_PUT_IDX);
+	if (idx == sc->msk_stat_cons)
+		return (0);
+
 	/* Sync status LEs. */
 	bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map,
 	    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
@@ -3407,7 +3412,7 @@
 	if (rxput[MSK_PORT_B] > 0)
 		msk_rxput(sc->msk_if[MSK_PORT_B]);
 
-	return (rxprog > sc->msk_process_limit ? EAGAIN : 0);
+	return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX));
 }
 
 static void

Now performance seems to be the same as with the older
driver (at least here at work) and in both directions!
Some numbers:

em0 writes to rev. 1.18.2.36:				20 seconds
em0 writes to rev. 1.18.2.38:				50 seconds
em0 writes to rev. 1.18.2.38 with patch from above:	23 seconds
same as before but with int_holdoff: 100 -> 1:		20 seconds

rev. 1.18.2.36 writes to em0:				22 seconds
rev. 1.18.2.38 writes to em0:				40 seconds
rev. 1.18.2.38 with patch from above writes to em0:	21 seconds
same as before but with int_holdoff: 100 -> 1:		20 seconds

It seems that these two CSR_READ_2s really help ;-).

As I said, this is at work and with slightly different machines.
I will try things at home later but I am rather confident of
receiving good results there as well...

Thanks,

	-Andre

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 14:07:48 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A67C0106566C;
	Tue,  6 Apr 2010 14:07:48 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 93C0F8FC13;
	Tue,  6 Apr 2010 14:07:48 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36E7mHi086380;
	Tue, 6 Apr 2010 14:07:48 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36E7m67086378;
	Tue, 6 Apr 2010 14:07:48 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201004061407.o36E7m67086378@svn.freebsd.org>
From: Rui Paulo 
Date: Tue, 6 Apr 2010 14:07:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206271 - stable/8/sys/net80211
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 14:07:48 -0000

Author: rpaulo
Date: Tue Apr  6 14:07:48 2010
New Revision: 206271
URL: http://svn.freebsd.org/changeset/base/206271

Log:
  MFC r203422, r205516:
  
   When receiving a management frame, pass the mbuf to bpf before calling
   iv_recv_mgmt(). iv_recv_mgmt() will generate management frame
   responses
   and pass them to bpf before the management frame that triggered the
   response.
  
   PR:		144323
   Submitted by:	Alexander Egorenkov 
   Sponsored by:	iXsystems, inc.

Modified:
  stable/8/sys/net80211/ieee80211_hostap.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/net80211/ieee80211_hostap.c
==============================================================================
--- stable/8/sys/net80211/ieee80211_hostap.c	Tue Apr  6 13:12:11 2010	(r206270)
+++ stable/8/sys/net80211/ieee80211_hostap.c	Tue Apr  6 14:07:48 2010	(r206271)
@@ -884,6 +884,14 @@ hostap_input(struct ieee80211_node *ni, 
 			wh = mtod(m, struct ieee80211_frame *);
 			wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
 		}
+		/*
+		 * Pass the packet to radiotap before calling iv_recv_mgmt().
+		 * Otherwise iv_recv_mgmt() might pass another packet to
+		 * radiotap, resulting in out of order packet captures.
+		 */
+		if (ieee80211_radiotap_active_vap(vap))
+			ieee80211_radiotap_rx(vap, m);
+		need_tap = 0;
 		vap->iv_recv_mgmt(ni, m, subtype, rssi, nf);
 		goto out;
 

From owner-svn-src-all@FreeBSD.ORG  Tue Apr  6 15:52:59 2010
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 42B201065670;
	Tue,  6 Apr 2010 15:52:59 +0000 (UTC)
	(envelope-from rdivacky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2CC7F8FC08;
	Tue,  6 Apr 2010 15:52:59 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36FqxvA009638;
	Tue, 6 Apr 2010 15:52:59 GMT (envelope-from rdivacky@svn.freebsd.org)
Received: (from rdivacky@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36FqwOh009618;
	Tue, 6 Apr 2010 15:52:58 GMT (envelope-from rdivacky@svn.freebsd.org)
Message-Id: <201004061552.o36FqwOh009618@svn.freebsd.org>
From: Roman Divacky 
Date: Tue, 6 Apr 2010 15:52:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r206274 - in vendor/llvm/dist: docs include/llvm
	include/llvm/ADT include/llvm/CodeGen include/llvm/MC
	include/llvm/MC/MCParser include/llvm/Support
	include/llvm/Target include/llvm/Tra...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 06 Apr 2010 15:52:59 -0000

Author: rdivacky
Date: Tue Apr  6 15:52:58 2010
New Revision: 206274
URL: http://svn.freebsd.org/changeset/base/206274

Log:
  Update LLVM to r100520.

Added:
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
  vendor/llvm/dist/test/CodeGen/X86/unreachable-loop-sinking.ll
Deleted:
  vendor/llvm/dist/include/llvm/CodeGen/DwarfWriter.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfPrinter.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
  vendor/llvm/dist/lib/Target/ARM/Disassembler/Makefile
Modified:
  vendor/llvm/dist/docs/HowToReleaseLLVM.html
  vendor/llvm/dist/docs/Lexicon.html
  vendor/llvm/dist/docs/SourceLevelDebugging.html
  vendor/llvm/dist/docs/WritingAnLLVMBackend.html
  vendor/llvm/dist/include/llvm/ADT/OwningPtr.h
  vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h
  vendor/llvm/dist/include/llvm/CodeGen/FastISel.h
  vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h
  vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h
  vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h
  vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h
  vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h
  vendor/llvm/dist/include/llvm/IntrinsicInst.h
  vendor/llvm/dist/include/llvm/Intrinsics.td
  vendor/llvm/dist/include/llvm/LLVMContext.h
  vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h
  vendor/llvm/dist/include/llvm/MC/MCInstPrinter.h
  vendor/llvm/dist/include/llvm/MC/MCParser/AsmParser.h
  vendor/llvm/dist/include/llvm/MC/MCSection.h
  vendor/llvm/dist/include/llvm/MC/MCSectionELF.h
  vendor/llvm/dist/include/llvm/MC/MCStreamer.h
  vendor/llvm/dist/include/llvm/Support/Allocator.h
  vendor/llvm/dist/include/llvm/Support/IRBuilder.h
  vendor/llvm/dist/include/llvm/Support/IRReader.h
  vendor/llvm/dist/include/llvm/Support/MathExtras.h
  vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h
  vendor/llvm/dist/include/llvm/Support/SourceMgr.h
  vendor/llvm/dist/include/llvm/Target/Target.td
  vendor/llvm/dist/include/llvm/Target/TargetLowering.h
  vendor/llvm/dist/include/llvm/Target/TargetRegistry.h
  vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h
  vendor/llvm/dist/lib/Analysis/IVUsers.cpp
  vendor/llvm/dist/lib/AsmParser/Parser.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/CMakeLists.txt
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.cpp
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h
  vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/GCMetadataPrinter.cpp
  vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp
  vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp
  vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp
  vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp
  vendor/llvm/dist/lib/CodeGen/MachineSink.cpp
  vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp
  vendor/llvm/dist/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
  vendor/llvm/dist/lib/MC/MCAsmInfo.cpp
  vendor/llvm/dist/lib/MC/MCAsmInfoCOFF.cpp
  vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp
  vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp
  vendor/llvm/dist/lib/MC/MCStreamer.cpp
  vendor/llvm/dist/lib/Support/MemoryBuffer.cpp
  vendor/llvm/dist/lib/Support/SourceMgr.cpp
  vendor/llvm/dist/lib/Support/regengine.inc
  vendor/llvm/dist/lib/Support/regexec.c
  vendor/llvm/dist/lib/Target/ARM/ARM.td
  vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp
  vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h
  vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td
  vendor/llvm/dist/lib/Target/ARM/ARMMCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
  vendor/llvm/dist/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h
  vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
  vendor/llvm/dist/lib/Target/ARM/Makefile
  vendor/llvm/dist/lib/Target/Alpha/Alpha.td
  vendor/llvm/dist/lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Blackfin/AsmPrinter/BlackfinAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/CellSPU/SPURegisterInfo.cpp
  vendor/llvm/dist/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/MBlaze/MBlaze.td
  vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.cpp
  vendor/llvm/dist/lib/Target/MSP430/AsmPrinter/MSP430InstPrinter.h
  vendor/llvm/dist/lib/Target/MSP430/MSP430.td
  vendor/llvm/dist/lib/Target/MSP430/MSP430InstrFormats.td
  vendor/llvm/dist/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Mips/Mips.td
  vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.h
  vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.cpp
  vendor/llvm/dist/lib/Target/PIC16/PIC16DebugInfo.h
  vendor/llvm/dist/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPC.td
  vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCInstrFormats.td
  vendor/llvm/dist/lib/Target/PowerPC/PPCMCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp
  vendor/llvm/dist/lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/Sparc/Sparc.td
  vendor/llvm/dist/lib/Target/Sparc/SparcMCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86AsmPrinter.h
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h
  vendor/llvm/dist/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
  vendor/llvm/dist/lib/Target/X86/SSEDomainFix.cpp
  vendor/llvm/dist/lib/Target/X86/X86.td
  vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp
  vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h
  vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp
  vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td
  vendor/llvm/dist/lib/Target/X86/X86MCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp
  vendor/llvm/dist/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp
  vendor/llvm/dist/lib/Target/XCore/XCore.td
  vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreMCAsmInfo.cpp
  vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp
  vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp
  vendor/llvm/dist/lib/Transforms/Scalar/SimplifyLibCalls.cpp
  vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp
  vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp
  vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp
  vendor/llvm/dist/lib/VMCore/AutoUpgrade.cpp
  vendor/llvm/dist/lib/VMCore/LLVMContext.cpp
  vendor/llvm/dist/lib/VMCore/LLVMContextImpl.cpp
  vendor/llvm/dist/lib/VMCore/LLVMContextImpl.h
  vendor/llvm/dist/lib/VMCore/Pass.cpp
  vendor/llvm/dist/test/Analysis/BasicAA/modref.ll
  vendor/llvm/dist/test/Bitcode/memcpy.ll
  vendor/llvm/dist/test/CodeGen/X86/memcpy.ll
  vendor/llvm/dist/test/CodeGen/X86/personality.ll
  vendor/llvm/dist/test/MC/Disassembler/arm-tests.txt
  vendor/llvm/dist/test/MC/Disassembler/neon-tests.txt
  vendor/llvm/dist/test/MC/Disassembler/thumb-tests.txt
  vendor/llvm/dist/test/Transforms/InstCombine/memset_chk.ll
  vendor/llvm/dist/test/Transforms/InstCombine/objsize.ll
  vendor/llvm/dist/test/Transforms/MemCpyOpt/align.ll
  vendor/llvm/dist/test/Transforms/SimplifyLibCalls/StrCpy.ll
  vendor/llvm/dist/test/Verifier/2006-12-12-IntrinsicDefine.ll
  vendor/llvm/dist/tools/edis/EDDisassembler.cpp
  vendor/llvm/dist/tools/llc/llc.cpp
  vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp
  vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp
  vendor/llvm/dist/tools/lto/LTOModule.cpp
  vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp
  vendor/llvm/dist/utils/FileCheck/FileCheck.cpp
  vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp
  vendor/llvm/dist/utils/TableGen/AsmWriterInst.cpp
  vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp
  vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.h
  vendor/llvm/dist/utils/TableGen/Record.cpp
  vendor/llvm/dist/utils/TableGen/Record.h

Modified: vendor/llvm/dist/docs/HowToReleaseLLVM.html
==============================================================================
--- vendor/llvm/dist/docs/HowToReleaseLLVM.html	Tue Apr  6 15:02:41 2010	(r206273)
+++ vendor/llvm/dist/docs/HowToReleaseLLVM.html	Tue Apr  6 15:52:58 2010	(r206274)
@@ -362,13 +362,12 @@ Qualification Details
   

- - - + + - - - + + +
ArchitectureOSllvm-gcc baselineclang baseline tests
x86-32Mac OS 10.5last releasenonellvm dejagnu, clang tests, test-suite (including spec)
x86-32Linuxlast releasenonellvm dejagnu, clang tests, test-suite (including spec)
x86-32FreeBSDnonenonellvm dejagnu, clang tests, test-suite
x86-32Linuxlast releaselast releasellvm dejagnu, clang tests, test-suite (including spec)
x86-32FreeBSDnonelast releasellvm dejagnu, clang tests, test-suite
x86-32mingwlast releasenoneQT
x86-64Mac OS 10.5last releasenonellvm dejagnu, clang tests, test-suite (including spec)
x86-64Linuxlast releasenonellvm dejagnu, clang tests, test-suite (including spec)
x86-64FreeBSDnonenonellvm dejagnu, clang tests, test-suite
x86-64Mac OS 10.Xlast releaselast releasellvm dejagnu, clang tests, test-suite (including spec)
x86-64Linuxlast releaselast releasellvm dejagnu, clang tests, test-suite (including spec)
x86-64FreeBSDnonelast releasellvm dejagnu, clang tests, test-suite

@@ -518,7 +517,7 @@ svn copy https://llvm.org/svn/llvm-proje src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> The LLVM Compiler Infrastructure
- Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $ + Last modified: $Date: 2010-04-05 20:35:37 +0200 (Mon, 05 Apr 2010) $ Modified: vendor/llvm/dist/docs/Lexicon.html ============================================================================== --- vendor/llvm/dist/docs/Lexicon.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/Lexicon.html Tue Apr 6 15:52:58 2010 (r206274) @@ -50,6 +50,11 @@ LCSSA LICM Load-VN + LTO + + - M - + + MC - O - @@ -167,15 +172,24 @@ href="http://www.program-transformation.
-
LCSSA
-
Loop-Closed Static Single Assignment Form
+
LCSSA
+
Loop-Closed Static Single Assignment Form
LICM
Loop Invariant Code Motion
Load-VN
Load Value Numbering
+
LTO
+
Link-Time Optimization
+
+
+ + +
+
+
MC
+
Machine Code
-
@@ -255,7 +269,7 @@ href="http://www.program-transformation. src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01">The LLVM Team
The LLVM Compiler Infrastructure
-Last modified: $Date: 2008-12-14 09:01:51 +0100 (Sun, 14 Dec 2008) $ +Last modified: $Date: 2010-04-05 07:48:47 +0200 (Mon, 05 Apr 2010) $ Modified: vendor/llvm/dist/docs/SourceLevelDebugging.html ============================================================================== --- vendor/llvm/dist/docs/SourceLevelDebugging.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/SourceLevelDebugging.html Tue Apr 6 15:52:58 2010 (r206274) @@ -144,7 +144,7 @@ height="369"> an LLVM user a relationship between generated code and the original program source code.

-

Currently, debug information is consumed by the DwarfWriter to produce dwarf +

Currently, debug information is consumed by DwarfDebug to produce dwarf information used by the gdb debugger. Other targets could use the same information to produce stabs or other debug forms.

@@ -1773,7 +1773,7 @@ enum Trees { Chris Lattner
LLVM Compiler Infrastructure
- Last modified: $Date: 2010-03-31 09:50:17 +0200 (Wed, 31 Mar 2010) $ + Last modified: $Date: 2010-04-05 06:11:11 +0200 (Mon, 05 Apr 2010) $ Modified: vendor/llvm/dist/docs/WritingAnLLVMBackend.html ============================================================================== --- vendor/llvm/dist/docs/WritingAnLLVMBackend.html Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/docs/WritingAnLLVMBackend.html Tue Apr 6 15:52:58 2010 (r206274) @@ -561,8 +561,7 @@ def AL : Register<"AL">, DwarfRegN

This defines the register AL and assigns it values (with DwarfRegNum) that are used by gcc, gdb, or a debug -information writer (such as DwarfWriter -in llvm/lib/CodeGen/AsmPrinter) to identify a register. For register +information writer to identify a register. For register AL, DwarfRegNum takes an array of 3 values representing 3 different modes: the first element is for X86-64, the second for exception handling (EH) on X86-32, and the third is generic. -1 is a special Dwarf number @@ -2555,7 +2554,7 @@ with assembler. Mason Woo and Misha Brukman
The LLVM Compiler Infrastructure
- Last modified: $Date: 2010-02-02 19:44:12 +0100 (Tue, 02 Feb 2010) $ + Last modified: $Date: 2010-04-05 06:11:11 +0200 (Mon, 05 Apr 2010) $ Modified: vendor/llvm/dist/include/llvm/ADT/OwningPtr.h ============================================================================== --- vendor/llvm/dist/include/llvm/ADT/OwningPtr.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/ADT/OwningPtr.h Tue Apr 6 15:52:58 2010 (r206274) @@ -128,7 +128,6 @@ inline void swap(OwningArrayPtr &a, O a.swap(b); } - } // end namespace llvm #endif Modified: vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h Tue Apr 6 15:52:58 2010 (r206274) @@ -18,8 +18,6 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/Support/DebugLoc.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/ADT/DenseMap.h" namespace llvm { class BlockAddress; @@ -43,63 +41,33 @@ namespace llvm { class MachineConstantPoolValue; class MachineJumpTableInfo; class MachineModuleInfo; + class MachineMove; + class MCAsmInfo; class MCInst; class MCContext; class MCSection; class MCStreamer; class MCSymbol; - class DwarfWriter; + class DwarfDebug; + class DwarfException; class Mangler; - class MCAsmInfo; class TargetLoweringObjectFile; + class TargetData; class Twine; class Type; - class formatted_raw_ostream; /// AsmPrinter - This class is intended to be used as a driving class for all /// asm writers. class AsmPrinter : public MachineFunctionPass { - static char ID; - - // GCMetadataPrinters - The garbage collection metadata printer table. - typedef DenseMap gcp_map_type; - typedef gcp_map_type::iterator gcp_iterator; - gcp_map_type GCMetadataPrinters; - - /// If VerboseAsm is set, a pointer to the loop info for this - /// function. - /// - MachineLoopInfo *LI; - - public: - /// MMI - If available, this is a pointer to the current MachineModuleInfo. - MachineModuleInfo *MMI; - - protected: - /// DW - If available, this is a pointer to the current dwarf writer. - DwarfWriter *DW; - public: - - /// Output stream on which we're printing assembly code. - /// - formatted_raw_ostream &O; - /// Target machine description. /// TargetMachine &TM; - /// getObjFileLowering - Return information about object file lowering. - TargetLoweringObjectFile &getObjFileLowering() const; - /// Target Asm Printer information. /// const MCAsmInfo *MAI; - /// Target Register Information. - /// - const TargetRegisterInfo *TRI; - /// OutContext - This is the context for the output file that we are /// streaming. This owns all of the global MC-related objects for the /// generated translation unit. @@ -114,6 +82,9 @@ namespace llvm { /// The current machine function. const MachineFunction *MF; + /// MMI - This is a pointer to the current MachineModuleInfo. + MachineModuleInfo *MMI; + /// Name-mangler for global names. /// Mangler *Mang; @@ -123,24 +94,28 @@ namespace llvm { /// MCSymbol *CurrentFnSym; - /// getCurrentSection() - Return the current section we are emitting to. - const MCSection *getCurrentSection() const; + private: + // GCMetadataPrinters - The garbage collection metadata printer table. + void *GCMetadataPrinters; // Really a DenseMap. - /// VerboseAsm - Emit comments in assembly output if this is true. /// bool VerboseAsm; + static char ID; + + /// If VerboseAsm is set, a pointer to the loop info for this + /// function. + MachineLoopInfo *LI; - /// Private state for PrintSpecial() - // Assign a unique ID to this machine instruction. - mutable const MachineInstr *LastMI; - mutable const Function *LastFn; - mutable unsigned Counter; - mutable unsigned SetCounter; + /// DD - If the target supports dwarf debug info, this pointer is non-null. + DwarfDebug *DD; + + /// DE - If the target supports dwarf exception info, this pointer is + /// non-null. + DwarfException *DE; protected: - explicit AsmPrinter(formatted_raw_ostream &o, TargetMachine &TM, - MCStreamer &Streamer); + explicit AsmPrinter(TargetMachine &TM, MCStreamer &Streamer); public: virtual ~AsmPrinter(); @@ -153,7 +128,20 @@ namespace llvm { /// unsigned getFunctionNumber() const; - protected: + /// getObjFileLowering - Return information about object file lowering. + TargetLoweringObjectFile &getObjFileLowering() const; + + /// getTargetData - Return information about data layout. + const TargetData &getTargetData() const; + + /// getCurrentSection() - Return the current section we are emitting to. + const MCSection *getCurrentSection() const; + + + //===------------------------------------------------------------------===// + // MachineFunctionPass Implementation. + //===------------------------------------------------------------------===// + /// getAnalysisUsage - Record analysis usage. /// void getAnalysisUsage(AnalysisUsage &AU) const; @@ -163,41 +151,10 @@ namespace llvm { /// call this implementation. bool doInitialization(Module &M); - /// EmitStartOfAsmFile - This virtual method can be overridden by targets - /// that want to emit something at the start of their file. - virtual void EmitStartOfAsmFile(Module &) {} - - /// EmitEndOfAsmFile - This virtual method can be overridden by targets that - /// want to emit something at the end of their file. - virtual void EmitEndOfAsmFile(Module &) {} - /// doFinalization - Shut down the asmprinter. If you override this in your /// pass, you must make sure to call it explicitly. bool doFinalization(Module &M); - /// PrintSpecial - Print information related to the specified machine instr - /// that is independent of the operand, and may be independent of the instr - /// itself. This can be useful for portably encoding the comment character - /// or other bits of target-specific knowledge into the asmstrings. The - /// syntax used is ${:comment}. Targets can override this to add support - /// for their own strange codes. - virtual void PrintSpecial(const MachineInstr *MI, const char *Code) const; - - /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM - /// instruction, using the specified assembler variant. Targets should - /// override this to format as appropriate. This method can return true if - /// the operand is erroneous. - virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, const char *ExtraCode); - - /// PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM - /// instruction, using the specified assembler variant as an address. - /// Targets should override this to format as appropriate. This method can - /// return true if the operand is erroneous. - virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, - const char *ExtraCode); - /// runOnMachineFunction - Emit the specified function out to the /// OutStreamer. virtual bool runOnMachineFunction(MachineFunction &MF) { @@ -207,6 +164,10 @@ namespace llvm { return false; } + //===------------------------------------------------------------------===// + // Coarse grained IR lowering routines. + //===------------------------------------------------------------------===// + /// SetupMachineFunction - This should be called when a new MachineFunction /// is being processed from runOnMachineFunction. void SetupMachineFunction(MachineFunction &MF); @@ -219,19 +180,6 @@ namespace llvm { /// function. void EmitFunctionBody(); - /// EmitInstruction - Targets should implement this to emit instructions. - virtual void EmitInstruction(const MachineInstr *) { - assert(0 && "EmitInstruction not implemented"); - } - - /// EmitFunctionBodyStart - Targets can override this to emit stuff before - /// the first basic block in the function. - virtual void EmitFunctionBodyStart() {} - - /// EmitFunctionBodyEnd - Targets can override this to emit stuff after - /// the last basic block in the function. - virtual void EmitFunctionBodyEnd() {} - /// EmitConstantPool - Print to the current output stream assembly /// representations of the constants in the constant pool MCP. This is /// used to print out constants which have been "spilled to memory" by @@ -252,36 +200,6 @@ namespace llvm { /// do nothing and return false. bool EmitSpecialLLVMGlobal(const GlobalVariable *GV); - public: - //===------------------------------------------------------------------===// - // Emission and print routines - // - - /// EmitInt8 - Emit a byte directive and value. - /// - void EmitInt8(int Value) const; - - /// EmitInt16 - Emit a short directive and value. - /// - void EmitInt16(int Value) const; - - /// EmitInt32 - Emit a long directive and value. - /// - void EmitInt32(int Value) const; - - /// EmitInt64 - Emit a long long directive and value. - /// - void EmitInt64(uint64_t Value) const; - - - /// EmitLabelDifference - Emit something like ".long Hi-Lo" where the size - /// in bytes of the directive is specified by Size and Hi/Lo specify the - /// labels. This implicitly uses .set if it is available. - void EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, - unsigned Size) const; - - //===------------------------------------------------------------------===// - /// EmitAlignment - Emit an alignment directive to the specified power of /// two boundary. For example, if you pass in 3 here, you will get an 8 /// byte alignment. If a global value is specified, and if that global has @@ -301,11 +219,69 @@ namespace llvm { void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0, unsigned ForcedAlignBits = 0, bool UseFillExpr = true) const; + + /// EmitBasicBlockStart - This method prints the label for the specified + /// MachineBasicBlock, an alignment (if present) and a comment describing + /// it if appropriate. + void EmitBasicBlockStart(const MachineBasicBlock *MBB) const; + + + /// EmitGlobalConstant - Print a general LLVM constant to the .s file. + void EmitGlobalConstant(const Constant *CV, unsigned AddrSpace = 0); + + + //===------------------------------------------------------------------===// + // Overridable Hooks + //===------------------------------------------------------------------===// + + // Targets can, or in the case of EmitInstruction, must implement these to + // customize output. + + /// EmitStartOfAsmFile - This virtual method can be overridden by targets + /// that want to emit something at the start of their file. + virtual void EmitStartOfAsmFile(Module &) {} + + /// EmitEndOfAsmFile - This virtual method can be overridden by targets that + /// want to emit something at the end of their file. + virtual void EmitEndOfAsmFile(Module &) {} + + /// EmitFunctionBodyStart - Targets can override this to emit stuff before + /// the first basic block in the function. + virtual void EmitFunctionBodyStart() {} + + /// EmitFunctionBodyEnd - Targets can override this to emit stuff after + /// the last basic block in the function. + virtual void EmitFunctionBodyEnd() {} + + /// EmitInstruction - Targets should implement this to emit instructions. + virtual void EmitInstruction(const MachineInstr *) { + assert(0 && "EmitInstruction not implemented"); + } + + virtual void EmitFunctionEntryLabel(); + + virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV); + + /// isBlockOnlyReachableByFallthough - Return true if the basic block has + /// exactly one predecessor and the control transfer mechanism between + /// the predecessor and this block is a fall-through. + virtual bool + isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const; + + //===------------------------------------------------------------------===// + // Symbol Lowering Routines. + //===------------------------------------------------------------------===// + public: - /// printDeclare - This method prints a local variable declaration used by - /// debug tables. - void printDeclare(const MachineInstr *MI) const; - + /// GetTempSymbol - Return the MCSymbol corresponding to the assembler + /// temporary label with the specified stem and unique ID. + MCSymbol *GetTempSymbol(StringRef Name, unsigned ID) const; + + /// GetTempSymbol - Return an assembler temporary label with the specified + /// stem. + MCSymbol *GetTempSymbol(StringRef Name) const; + + /// GetSymbolWithGlobalValueBase - Return the MCSymbol for a symbol with /// global value name as its base, with the specified suffix, and where the /// symbol is forced to have private linkage if ForcePrivate is true. @@ -332,49 +308,131 @@ namespace llvm { MCSymbol *GetBlockAddressSymbol(const BlockAddress *BA) const; MCSymbol *GetBlockAddressSymbol(const BasicBlock *BB) const; - /// EmitBasicBlockStart - This method prints the label for the specified - /// MachineBasicBlock, an alignment (if present) and a comment describing - /// it if appropriate. - void EmitBasicBlockStart(const MachineBasicBlock *MBB) const; + //===------------------------------------------------------------------===// + // Emission Helper Routines. + //===------------------------------------------------------------------===// + public: + /// printOffset - This is just convenient handler for printing offsets. + void printOffset(int64_t Offset, raw_ostream &OS) const; + /// EmitInt8 - Emit a byte directive and value. + /// + void EmitInt8(int Value) const; - // Data emission. + /// EmitInt16 - Emit a short directive and value. + /// + void EmitInt16(int Value) const; - /// EmitGlobalConstant - Print a general LLVM constant to the .s file. - void EmitGlobalConstant(const Constant* CV, unsigned AddrSpace = 0); + /// EmitInt32 - Emit a long directive and value. + /// + void EmitInt32(int Value) const; - protected: - virtual void EmitFunctionEntryLabel(); + /// EmitLabelDifference - Emit something like ".long Hi-Lo" where the size + /// in bytes of the directive is specified by Size and Hi/Lo specify the + /// labels. This implicitly uses .set if it is available. + void EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, + unsigned Size) const; + + //===------------------------------------------------------------------===// + // Dwarf Emission Helper Routines + //===------------------------------------------------------------------===// + + /// EmitSLEB128 - emit the specified signed leb128 value. + void EmitSLEB128(int Value, const char *Desc = 0) const; + + /// EmitULEB128 - emit the specified unsigned leb128 value. + void EmitULEB128(unsigned Value, const char *Desc = 0, + unsigned PadTo = 0) const; + + /// EmitCFAByte - Emit a .byte 42 directive for a DW_CFA_xxx value. + void EmitCFAByte(unsigned Val) const; + + /// EmitEncodingByte - Emit a .byte 42 directive that corresponds to an + /// encoding. If verbose assembly output is enabled, we output comments + /// describing the encoding. Desc is a string saying what the encoding is + /// specifying (e.g. "LSDA"). + void EmitEncodingByte(unsigned Val, const char *Desc = 0) const; + + /// GetSizeOfEncodedValue - Return the size of the encoding in bytes. + unsigned GetSizeOfEncodedValue(unsigned Encoding) const; + + /// EmitReference - Emit a reference to a label with a specified encoding. + /// + void EmitReference(const MCSymbol *Sym, unsigned Encoding) const; + void EmitReference(const GlobalValue *GV, unsigned Encoding) const; + + /// EmitSectionOffset - Emit the 4-byte offset of Label from the start of + /// its section. This can be done with a special directive if the target + /// supports it (e.g. cygwin) or by emitting it as an offset from a label at + /// the start of the section. + /// + /// SectionLabel is a temporary label emitted at the start of the section + /// that Label lives in. + void EmitSectionOffset(const MCSymbol *Label, + const MCSymbol *SectionLabel) const; + + //===------------------------------------------------------------------===// + // Dwarf Lowering Routines + //===------------------------------------------------------------------===// + + /// EmitFrameMoves - Emit frame instructions to describe the layout of the + /// frame. + void EmitFrameMoves(const std::vector &Moves, + MCSymbol *BaseLabel, bool isEH) const; + + + //===------------------------------------------------------------------===// + // Inline Asm Support + //===------------------------------------------------------------------===// + public: + // These are hooks that targets can override to implement inline asm + // support. These should probably be moved out of AsmPrinter someday. + + /// PrintSpecial - Print information related to the specified machine instr + /// that is independent of the operand, and may be independent of the instr + /// itself. This can be useful for portably encoding the comment character + /// or other bits of target-specific knowledge into the asmstrings. The + /// syntax used is ${:comment}. Targets can override this to add support + /// for their own strange codes. + virtual void PrintSpecial(const MachineInstr *MI, raw_ostream &OS, + const char *Code) const; + + /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM + /// instruction, using the specified assembler variant. Targets should + /// override this to format as appropriate. This method can return true if + /// the operand is erroneous. + virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, const char *ExtraCode, + raw_ostream &OS); + + /// PrintAsmMemoryOperand - Print the specified operand of MI, an INLINEASM + /// instruction, using the specified assembler variant as an address. + /// Targets should override this to format as appropriate. This method can + /// return true if the operand is erroneous. + virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, + unsigned AsmVariant, + const char *ExtraCode, + raw_ostream &OS); - virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV); - - /// printOffset - This is just convenient handler for printing offsets. - void printOffset(int64_t Offset) const; - - /// isBlockOnlyReachableByFallthough - Return true if the basic block has - /// exactly one predecessor and the control transfer mechanism between - /// the predecessor and this block is a fall-through. - virtual bool isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const; - private: + /// Private state for PrintSpecial() + // Assign a unique ID to this machine instruction. + mutable const MachineInstr *LastMI; + mutable unsigned LastFn; + mutable unsigned Counter; + mutable unsigned SetCounter; - /// processDebugLoc - Processes the debug information of each machine - /// instruction's DebugLoc. - void processDebugLoc(const MachineInstr *MI, bool BeforePrintingInsn); + /// EmitInlineAsm - Emit a blob of inline asm to the output streamer. + void EmitInlineAsm(StringRef Str, unsigned LocCookie) const; - void printLabelInst(const MachineInstr *MI) const; - - /// printInlineAsm - This method formats and prints the specified machine + /// EmitInlineAsm - This method formats and emits the specified machine /// instruction that is an inline asm. - void printInlineAsm(const MachineInstr *MI) const; - - /// printImplicitDef - This method prints the specified machine instruction - /// that is an implicit def. - void printImplicitDef(const MachineInstr *MI) const; - - /// printKill - This method prints the specified kill machine instruction. - void printKill(const MachineInstr *MI) const; + void EmitInlineAsm(const MachineInstr *MI) const; + //===------------------------------------------------------------------===// + // Internal Implementation Details + //===------------------------------------------------------------------===// + /// EmitVisibility - This emits visibility information about symbol, if /// this is suported by the target. void EmitVisibility(MCSymbol *Sym, unsigned Visibility) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/FastISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/FastISel.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,8 +27,6 @@ class MachineBasicBlock; class MachineConstantPool; class MachineFunction; class MachineFrameInfo; -class MachineModuleInfo; -class DwarfWriter; class MachineRegisterInfo; class TargetData; class TargetInstrInfo; @@ -50,8 +48,6 @@ protected: SmallSet &CatchInfoLost; #endif MachineFunction &MF; - MachineModuleInfo *MMI; - DwarfWriter *DW; MachineRegisterInfo &MRI; MachineFrameInfo &MFI; MachineConstantPool &MCP; @@ -116,8 +112,6 @@ public: protected: FastISel(MachineFunction &mf, - MachineModuleInfo *mmi, - DwarfWriter *dw, DenseMap &vm, DenseMap &bm, DenseMap &am Modified: vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,8 +27,6 @@ namespace llvm { class GCMetadataPrinter; - class raw_ostream; - class MCAsmInfo; /// GCMetadataPrinterRegistry - The GC assembly printer registry uses all the /// defaults from Registry. @@ -63,11 +61,9 @@ namespace llvm { iterator end() { return S->end(); } /// beginAssembly/finishAssembly - Emit module metadata as assembly code. - virtual void beginAssembly(raw_ostream &OS, AsmPrinter &AP, - const MCAsmInfo &MAI); + virtual void beginAssembly(AsmPrinter &AP); - virtual void finishAssembly(raw_ostream &OS, AsmPrinter &AP, - const MCAsmInfo &MAI); + virtual void finishAssembly(AsmPrinter &AP); virtual ~GCMetadataPrinter(); }; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h Tue Apr 6 15:52:58 2010 (r206274) @@ -156,8 +156,13 @@ public: inline void splitBlock(MachineBasicBlock* NewBB) { DT->splitBlock(NewBB); } - - + + /// isReachableFromEntry - Return true if A is dominated by the entry + /// block of the function containing it. + bool isReachableFromEntry(MachineBasicBlock *A) { + return DT->isReachableFromEntry(A); + } + virtual void releaseMemory(); virtual void print(raw_ostream &OS, const Module*) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h Tue Apr 6 15:52:58 2010 (r206274) @@ -14,12 +14,9 @@ #ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H #define LLVM_CODEGEN_MACHINEFRAMEINFO_H -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/System/DataTypes.h" #include -#include #include namespace llvm { @@ -27,26 +24,21 @@ class raw_ostream; class TargetData; class TargetRegisterClass; class Type; -class MachineModuleInfo; class MachineFunction; class MachineBasicBlock; class TargetFrameInfo; +class BitVector; /// The CalleeSavedInfo class tracks the information need to locate where a /// callee saved register in the current frame. class CalleeSavedInfo { - -private: unsigned Reg; const TargetRegisterClass *RegClass; int FrameIdx; public: CalleeSavedInfo(unsigned R, const TargetRegisterClass *RC, int FI = 0) - : Reg(R) - , RegClass(RC) - , FrameIdx(FI) - {} + : Reg(R), RegClass(RC), FrameIdx(FI) {} // Accessors. unsigned getReg() const { return Reg; } @@ -188,13 +180,6 @@ class MachineFrameInfo { /// spill slots. SmallVector SpillObjects; - /// MMI - This field is set (via setMachineModuleInfo) by a module info - /// consumer (ex. DwarfWriter) to indicate that frame layout information - /// should be acquired. Typically, it's the responsibility of the target's - /// TargetRegisterInfo prologue/epilogue emitting code to inform - /// MachineModuleInfo of frame layouts. - MachineModuleInfo *MMI; - /// TargetFrameInfo - Target information about frame layout. /// const TargetFrameInfo &TFI; @@ -208,7 +193,6 @@ public: StackProtectorIdx = -1; MaxCallFrameSize = 0; CSIValid = false; - MMI = 0; } /// hasStackObjects - Return true if there are any stack objects in this @@ -451,14 +435,6 @@ public: /// method always returns an empty set. BitVector getPristineRegs(const MachineBasicBlock *MBB) const; - /// getMachineModuleInfo - Used by a prologue/epilogue - /// emitter (TargetRegisterInfo) to provide frame layout information. - MachineModuleInfo *getMachineModuleInfo() const { return MMI; } - - /// setMachineModuleInfo - Used by a meta info consumer (DwarfWriter) to - /// indicate that frame layout information should be gathered. - void setMachineModuleInfo(MachineModuleInfo *mmi) { MMI = mmi; } - /// print - Used by the MachineFunction printer to print information about /// stack objects. Implemented in MachineFunction.cpp /// Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h Tue Apr 6 15:52:58 2010 (r206274) @@ -32,6 +32,7 @@ class MachineRegisterInfo; class MachineFrameInfo; class MachineConstantPool; class MachineJumpTableInfo; +class MachineModuleInfo; class MCContext; class Pass; class TargetMachine; @@ -72,7 +73,8 @@ class MachineFunction { Function *Fn; const TargetMachine &Target; MCContext &Ctx; - + MachineModuleInfo &MMI; + // RegInfo - Information about each register in use in the function. MachineRegisterInfo *RegInfo; @@ -107,8 +109,8 @@ class MachineFunction { typedef ilist BasicBlockListType; BasicBlockListType BasicBlocks; - // Default debug location. Used to print out the debug label at the beginning - // of a function. + /// Default debug location. Used to print out the debug label at the beginning + /// of a function. DebugLoc DefaultDebugLoc; /// FunctionNumber - This provides a unique ID for each function emitted in @@ -116,17 +118,17 @@ class MachineFunction { /// unsigned FunctionNumber; - // The alignment of the function. + /// The alignment of the function. unsigned Alignment; MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT void operator=(const MachineFunction&); // DO NOT IMPLEMENT - public: MachineFunction(Function *Fn, const TargetMachine &TM, unsigned FunctionNum, - MCContext &Ctx); + MachineModuleInfo &MMI); ~MachineFunction(); + MachineModuleInfo &getMMI() const { return MMI; } MCContext &getContext() const { return Ctx; } /// getFunction - Return the LLVM function that this machine code represents Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineFunctionAnalysis.h Tue Apr 6 15:52:58 2010 (r206274) @@ -39,7 +39,7 @@ public: CodeGenOpt::Level getOptLevel() const { return OptLevel; } private: - virtual bool doInitialization(Module &) { NextFnNum = 1; return false; } + virtual bool doInitialization(Module &M); virtual bool runOnFunction(Function &F); virtual void releaseMemory(); virtual void getAnalysisUsage(AnalysisUsage &AU) const; Modified: vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h Tue Apr 6 15:52:58 2010 (r206274) @@ -100,6 +100,9 @@ class MachineModuleInfo : public Immutab /// Context - This is the MCContext used for the entire code generator. MCContext Context; + /// TheModule - This is the LLVM Module being worked on. + Module *TheModule; + /// ObjFileMMI - This is the object-file-format-specific implementation of /// MachineModuleInfoImpl, which lets targets accumulate whatever info they /// want. @@ -176,6 +179,9 @@ public: const MCContext &getContext() const { return Context; } MCContext &getContext() { return Context; } + void setModule(Module *M) { TheModule = M; } + Module *getModule() const { return TheModule; } + /// getInfo - Keep track of various per-function pieces of information for /// backends that would like to do so. /// Modified: vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h Tue Apr 6 15:52:58 2010 (r206274) @@ -27,7 +27,6 @@ namespace llvm { class SUnit; class MachineConstantPool; class MachineFunction; - class MachineModuleInfo; class MachineRegisterInfo; class MachineInstr; class TargetRegisterInfo; Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h Tue Apr 6 15:52:58 2010 (r206274) @@ -29,11 +29,9 @@ namespace llvm { class AliasAnalysis; -class DwarfWriter; class FunctionLoweringInfo; class MachineConstantPoolValue; class MachineFunction; -class MachineModuleInfo; class MDNode; class SDNodeOrdering; class SDDbgValue; @@ -122,9 +120,7 @@ class SelectionDAG { TargetLowering &TLI; MachineFunction *MF; FunctionLoweringInfo &FLI; - MachineModuleInfo *MMI; - DwarfWriter *DW; - LLVMContext* Context; + LLVMContext *Context; /// EntryNode - The starting token. SDNode EntryNode; @@ -182,7 +178,7 @@ public: /// init - Prepare this SelectionDAG to process code in the given /// MachineFunction. /// - void init(MachineFunction &mf, MachineModuleInfo *mmi, DwarfWriter *dw); + void init(MachineFunction &mf); /// clear - Clear state and free memory necessary to make this /// SelectionDAG ready to process a new block. @@ -193,8 +189,6 @@ public: const TargetMachine &getTarget() const; TargetLowering &getTargetLoweringInfo() const { return TLI; } FunctionLoweringInfo &getFunctionLoweringInfo() const { return FLI; } - MachineModuleInfo *getMachineModuleInfo() const { return MMI; } - DwarfWriter *getDwarfWriter() const { return DW; } LLVMContext *getContext() const {return Context; } /// viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'. @@ -532,17 +526,17 @@ public: SDValue getStackArgumentTokenFactor(SDValue Chain); SDValue getMemcpy(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, bool AlwaysInline, + SDValue Size, unsigned Align, bool isVol, bool AlwaysInline, const Value *DstSV, uint64_t DstSVOff, const Value *SrcSV, uint64_t SrcSVOff); SDValue getMemmove(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, + SDValue Size, unsigned Align, bool isVol, const Value *DstSV, uint64_t DstOSVff, const Value *SrcSV, uint64_t SrcSVOff); SDValue getMemset(SDValue Chain, DebugLoc dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, + SDValue Size, unsigned Align, bool isVol, const Value *DstSV, uint64_t DstSVOff); /// getSetCC - Helper function to make it easier to build SetCC's if you just Modified: vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h ============================================================================== --- vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h Tue Apr 6 15:52:58 2010 (r206274) @@ -29,8 +29,6 @@ namespace llvm { class MachineBasicBlock; class MachineFunction; class MachineInstr; - class MachineModuleInfo; - class DwarfWriter; class TargetLowering; class TargetInstrInfo; class FunctionLoweringInfo; @@ -284,8 +282,6 @@ private: const SDValue *Ops, unsigned NumOps, unsigned EmitNodeInfo); void SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, - MachineModuleInfo *MMI, - DwarfWriter *DW, const TargetInstrInfo &TII); void FinishBasicBlock(); Modified: vendor/llvm/dist/include/llvm/IntrinsicInst.h ============================================================================== --- vendor/llvm/dist/include/llvm/IntrinsicInst.h Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/IntrinsicInst.h Tue Apr 6 15:52:58 2010 (r206274) @@ -133,6 +133,13 @@ namespace llvm { return getAlignmentCst()->getZExtValue(); } + ConstantInt *getVolatileCst() const { + return cast(const_cast(getOperand(5))); + } + bool isVolatile() const { + return getVolatileCst()->getZExtValue() != 0; + } + /// getDest - This is just like getRawDest, but it strips off any cast /// instructions that feed it, giving the original input. The returned /// value is guaranteed to be a pointer. @@ -155,7 +162,11 @@ namespace llvm { void setAlignment(Constant* A) { setOperand(4, A); } - + + void setVolatile(Constant* V) { + setOperand(5, V); + } + const Type *getAlignmentType() const { return getOperand(4)->getType(); } Modified: vendor/llvm/dist/include/llvm/Intrinsics.td ============================================================================== --- vendor/llvm/dist/include/llvm/Intrinsics.td Tue Apr 6 15:02:41 2010 (r206273) +++ vendor/llvm/dist/include/llvm/Intrinsics.td Tue Apr 6 15:52:58 2010 (r206274) @@ -224,16 +224,16 @@ def int_stackprotector : Intrinsic<[], // def int_memcpy : Intrinsic<[], *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 15:54:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31368106566C; Tue, 6 Apr 2010 15:54:00 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1858FC12; Tue, 6 Apr 2010 15:54:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36Frx4J009929; Tue, 6 Apr 2010 15:53:59 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36FrxCR009904; Tue, 6 Apr 2010 15:53:59 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004061553.o36FrxCR009904@svn.freebsd.org> From: Roman Divacky Date: Tue, 6 Apr 2010 15:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206275 - in vendor/clang/dist: examples/wpa include/clang/AST include/clang/Basic include/clang/Frontend include/clang/Parse lib/AST lib/Checker lib/CodeGen lib/Frontend lib/Lex lib/Pa... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 15:54:00 -0000 Author: rdivacky Date: Tue Apr 6 15:53:59 2010 New Revision: 206275 URL: http://svn.freebsd.org/changeset/base/206275 Log: Update clang to r100520. Added: vendor/clang/dist/lib/Runtime/ vendor/clang/dist/lib/Runtime/Makefile vendor/clang/dist/test/Analysis/inline4.c vendor/clang/dist/test/CodeGenObjC/property-dbg.m vendor/clang/dist/test/Index/complete-enums.c vendor/clang/dist/test/Index/complete-macros.c Modified: vendor/clang/dist/examples/wpa/clang-wpa.cpp vendor/clang/dist/include/clang/AST/PrettyPrinter.h vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/Checker/BugReporter.cpp vendor/clang/dist/lib/Checker/Environment.cpp vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGRecordLayout.h vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGValue.h vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/PCHReader.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Sema/CodeCompleteConsumer.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/test/CodeGen/asm.c vendor/clang/dist/test/CodeGen/builtin-memfns.c vendor/clang/dist/test/CodeGenCXX/eh.cpp vendor/clang/dist/test/CodeGenCXX/new.cpp vendor/clang/dist/test/CodeGenCXX/value-init.cpp vendor/clang/dist/test/Makefile vendor/clang/dist/test/Parser/cxx-decl.cpp vendor/clang/dist/tools/CIndex/CIndex.cpp vendor/clang/dist/tools/CIndex/CIndexCodeCompletion.cpp vendor/clang/dist/tools/CIndex/CIndexDiagnostic.cpp vendor/clang/dist/tools/driver/cc1_main.cpp Modified: vendor/clang/dist/examples/wpa/clang-wpa.cpp ============================================================================== --- vendor/clang/dist/examples/wpa/clang-wpa.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/examples/wpa/clang-wpa.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -17,6 +17,7 @@ #include "clang/Frontend/ASTUnit.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Index/CallGraph.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/raw_ostream.h" using namespace clang; @@ -34,12 +35,11 @@ int main(int argc, char **argv) { return 0; DiagnosticOptions DiagOpts; - llvm::OwningPtr Diags( - CompilerInstance::createDiagnostics(DiagOpts, argc, argv)); - + llvm::IntrusiveRefCntPtr Diags + = CompilerInstance::createDiagnostics(DiagOpts, argc, argv); for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) { const std::string &InFile = InputFilenames[i]; - llvm::OwningPtr AST(ASTUnit::LoadFromPCHFile(InFile, *Diags)); + llvm::OwningPtr AST(ASTUnit::LoadFromPCHFile(InFile, Diags)); if (!AST) return 1; Modified: vendor/clang/dist/include/clang/AST/PrettyPrinter.h ============================================================================== --- vendor/clang/dist/include/clang/AST/PrettyPrinter.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/AST/PrettyPrinter.h Tue Apr 6 15:53:59 2010 (r206275) @@ -37,7 +37,8 @@ struct PrintingPolicy { PrintingPolicy(const LangOptions &LO) : Indentation(2), LangOpts(LO), SuppressSpecifiers(false), SuppressTag(false), SuppressScope(false), - Dump(false), ConstantArraySizeAsWritten(false) { } + Dump(false), ConstantArraySizeAsWritten(false), + AnonymousTagLocations(true) { } /// \brief The number of spaces to use to indent each line. unsigned Indentation : 8; @@ -97,7 +98,11 @@ struct PrintingPolicy { /// char a[9] = "A string"; /// \endcode bool ConstantArraySizeAsWritten : 1; - + + /// \brief When printing an anonymous tag name, also print the location of + /// that entity (e.g., "enum "). Otherwise, just + /// prints "" for the name. + bool AnonymousTagLocations : 1; }; } // end namespace clang Modified: vendor/clang/dist/include/clang/Basic/Diagnostic.h ============================================================================== --- vendor/clang/dist/include/clang/Basic/Diagnostic.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/Basic/Diagnostic.h Tue Apr 6 15:53:59 2010 (r206275) @@ -15,6 +15,7 @@ #define LLVM_CLANG_DIAGNOSTIC_H #include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/type_traits.h" #include @@ -150,7 +151,7 @@ public: /// problems and issues. It massages the diagnostics (e.g. handling things like /// "report warnings as errors" and passes them off to the DiagnosticClient for /// reporting to the user. -class Diagnostic { +class Diagnostic : public llvm::RefCountedBase { public: /// Level - The level of the diagnostic, after it has been through mapping. enum Level { Modified: vendor/clang/dist/include/clang/Frontend/ASTUnit.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/ASTUnit.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/Frontend/ASTUnit.h Tue Apr 6 15:53:59 2010 (r206275) @@ -16,6 +16,7 @@ #include "clang/Lex/PreprocessingRecord.h" #include "clang/Basic/SourceManager.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/OwningPtr.h" #include "clang/Basic/FileManager.h" #include "clang/Index/ASTLocation.h" @@ -52,10 +53,9 @@ public: typedef std::map > PreprocessedEntitiesByFileMap; private: - - FileManager FileMgr; - - SourceManager SourceMgr; + llvm::IntrusiveRefCntPtr Diagnostics; + llvm::OwningPtr FileMgr; + llvm::OwningPtr SourceMgr; llvm::OwningPtr HeaderInfo; llvm::OwningPtr Target; llvm::OwningPtr PP; @@ -90,7 +90,7 @@ private: /// \brief The set of diagnostics produced when creating this /// translation unit. - llvm::SmallVector Diagnostics; + llvm::SmallVector StoredDiagnostics; /// \brief Temporary files that should be removed when the ASTUnit is /// destroyed. @@ -118,6 +118,8 @@ private: ASTUnit(const ASTUnit&); // DO NOT IMPLEMENT ASTUnit &operator=(const ASTUnit &); // DO NOT IMPLEMENT + explicit ASTUnit(bool MainFileIsAST); + public: class ConcurrencyCheck { volatile ASTUnit &Self; @@ -137,13 +139,15 @@ public: }; friend class ConcurrencyCheck; - ASTUnit(Diagnostic &Diag, bool MainFileIsAST); ~ASTUnit(); bool isMainFileAST() const { return MainFileIsAST; } - const SourceManager &getSourceManager() const { return SourceMgr; } - SourceManager &getSourceManager() { return SourceMgr; } + const Diagnostic &getDiagnostics() const { return *Diagnostics; } + Diagnostic &getDiagnostics() { return *Diagnostics; } + + const SourceManager &getSourceManager() const { return *SourceMgr; } + SourceManager &getSourceManager() { return *SourceMgr; } const Preprocessor &getPreprocessor() const { return *PP.get(); } Preprocessor &getPreprocessor() { return *PP.get(); } @@ -151,8 +155,8 @@ public: const ASTContext &getASTContext() const { return *Ctx.get(); } ASTContext &getASTContext() { return *Ctx.get(); } - const FileManager &getFileManager() const { return FileMgr; } - FileManager &getFileManager() { return FileMgr; } + const FileManager &getFileManager() const { return *FileMgr; } + FileManager &getFileManager() { return *FileMgr; } const std::string &getOriginalSourceFileName(); const std::string &getPCHFileName(); @@ -185,12 +189,17 @@ public: } // Retrieve the diagnostics associated with this AST - typedef const StoredDiagnostic * diag_iterator; - diag_iterator diag_begin() const { return Diagnostics.begin(); } - diag_iterator diag_end() const { return Diagnostics.end(); } - unsigned diag_size() const { return Diagnostics.size(); } - llvm::SmallVector &getDiagnostics() { - return Diagnostics; + typedef const StoredDiagnostic *stored_diag_iterator; + stored_diag_iterator stored_diag_begin() const { + return StoredDiagnostics.begin(); + } + stored_diag_iterator stored_diag_end() const { + return StoredDiagnostics.end(); + } + unsigned stored_diag_size() const { return StoredDiagnostics.size(); } + + llvm::SmallVector &getStoredDiagnostics() { + return StoredDiagnostics; } /// \brief A mapping from a file name to the memory buffer that stores the @@ -206,7 +215,7 @@ public: /// /// \returns - The initialized ASTUnit or null if the PCH failed to load. static ASTUnit *LoadFromPCHFile(const std::string &Filename, - Diagnostic &Diags, + llvm::IntrusiveRefCntPtr Diags, bool OnlyLocalDecls = false, RemappedFile *RemappedFiles = 0, unsigned NumRemappedFiles = 0, @@ -224,7 +233,7 @@ public: // FIXME: Move OnlyLocalDecls, UseBumpAllocator to setters on the ASTUnit, we // shouldn't need to specify them at construction time. static ASTUnit *LoadFromCompilerInvocation(CompilerInvocation *CI, - Diagnostic &Diags, + llvm::IntrusiveRefCntPtr Diags, bool OnlyLocalDecls = false, bool CaptureDiagnostics = false); @@ -244,7 +253,7 @@ public: // shouldn't need to specify them at construction time. static ASTUnit *LoadFromCommandLine(const char **ArgBegin, const char **ArgEnd, - Diagnostic &Diags, + llvm::IntrusiveRefCntPtr Diags, llvm::StringRef ResourceFilesPath, bool OnlyLocalDecls = false, RemappedFile *RemappedFiles = 0, Modified: vendor/clang/dist/include/clang/Frontend/CompilerInstance.h ============================================================================== --- vendor/clang/dist/include/clang/Frontend/CompilerInstance.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/Frontend/CompilerInstance.h Tue Apr 6 15:53:59 2010 (r206275) @@ -11,6 +11,7 @@ #define LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_ #include "clang/Frontend/CompilerInvocation.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/OwningPtr.h" #include @@ -63,7 +64,7 @@ class CompilerInstance { llvm::OwningPtr Invocation; /// The diagnostics engine instance. - llvm::OwningPtr Diagnostics; + llvm::IntrusiveRefCntPtr Diagnostics; /// The diagnostics client instance. llvm::OwningPtr DiagClient; @@ -255,10 +256,6 @@ public: return *Diagnostics; } - /// takeDiagnostics - Remove the current diagnostics engine and give ownership - /// to the caller. - Diagnostic *takeDiagnostics() { return Diagnostics.take(); } - /// setDiagnostics - Replace the current diagnostics engine; the compiler /// instance takes ownership of \arg Value. void setDiagnostics(Diagnostic *Value); @@ -469,8 +466,8 @@ public: /// must extend past that of the diagnostic engine. /// /// \return The new object on success, or null on failure. - static Diagnostic *createDiagnostics(const DiagnosticOptions &Opts, - int Argc, char **Argv); + static llvm::IntrusiveRefCntPtr + createDiagnostics(const DiagnosticOptions &Opts, int Argc, char **Argv); /// Create the file manager and replace any existing one with it. void createFileManager(); Modified: vendor/clang/dist/include/clang/Parse/Parser.h ============================================================================== --- vendor/clang/dist/include/clang/Parse/Parser.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/include/clang/Parse/Parser.h Tue Apr 6 15:53:59 2010 (r206275) @@ -1086,7 +1086,8 @@ private: CXX0XAttributeList Attr); DeclGroupPtrTy ParseSimpleDeclaration(unsigned Context, SourceLocation &DeclEnd, - AttributeList *Attr); + AttributeList *Attr, + bool RequireSemi); DeclGroupPtrTy ParseDeclGroup(ParsingDeclSpec &DS, unsigned Context, bool AllowFunctionDefinitions, SourceLocation *DeclEnd = 0); Modified: vendor/clang/dist/lib/AST/ASTImporter.cpp ============================================================================== --- vendor/clang/dist/lib/AST/ASTImporter.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/AST/ASTImporter.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -3088,8 +3088,7 @@ FileID ASTImporter::Import(FileID FromID // FIXME: We want to re-use the existing MemoryBuffer! const llvm::MemoryBuffer *FromBuf = Cache->getBuffer(getDiags()); llvm::MemoryBuffer *ToBuf - = llvm::MemoryBuffer::getMemBufferCopy(FromBuf->getBufferStart(), - FromBuf->getBufferEnd(), + = llvm::MemoryBuffer::getMemBufferCopy(FromBuf->getBuffer(), FromBuf->getBufferIdentifier()); ToID = ToSM.createFileIDForMemBuffer(ToBuf); } Modified: vendor/clang/dist/lib/AST/Stmt.cpp ============================================================================== --- vendor/clang/dist/lib/AST/Stmt.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/AST/Stmt.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -249,14 +249,18 @@ unsigned AsmStmt::AnalyzeAsmString(llvm: } char CurChar = *CurPtr++; - if (CurChar == '$') { - CurStringPiece += "$$"; - continue; - } else if (CurChar != '%') { + switch (CurChar) { + case '$': CurStringPiece += "$$"; continue; + case '{': CurStringPiece += "$("; continue; + case '|': CurStringPiece += "$|"; continue; + case '}': CurStringPiece += "$)"; continue; + case '%': + break; + default: CurStringPiece += CurChar; continue; } - + // Escaped "%" character in asm string. if (CurPtr == StrEnd) { // % at end of string is invalid (no escape). Modified: vendor/clang/dist/lib/AST/TypePrinter.cpp ============================================================================== --- vendor/clang/dist/lib/AST/TypePrinter.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/AST/TypePrinter.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -442,18 +442,21 @@ void TypePrinter::PrintTag(TagDecl *D, s llvm::raw_string_ostream OS(Buffer); OS << "getKindName(); - - PresumedLoc PLoc = D->getASTContext().getSourceManager().getPresumedLoc( - D->getLocation()); - OS << " at " << PLoc.getFilename() - << ':' << PLoc.getLine() - << ':' << PLoc.getColumn() - << '>'; + if (Policy.AnonymousTagLocations) { + // Suppress the redundant tag keyword if we just printed one. + // We don't have to worry about ElaboratedTypes here because you can't + // refer to an anonymous type with one. + if (!HasKindDecoration) + OS << " " << D->getKindName(); + + PresumedLoc PLoc = D->getASTContext().getSourceManager().getPresumedLoc( + D->getLocation()); + OS << " at " << PLoc.getFilename() + << ':' << PLoc.getLine() + << ':' << PLoc.getColumn(); + } + + OS << '>'; OS.flush(); } Modified: vendor/clang/dist/lib/Checker/BugReporter.cpp ============================================================================== --- vendor/clang/dist/lib/Checker/BugReporter.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/Checker/BugReporter.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -58,7 +58,7 @@ void BugReporterContext::addVisitor(BugR // Helper routines for walking the ExplodedGraph and fetching statements. //===----------------------------------------------------------------------===// -static inline const Stmt* GetStmt(ProgramPoint P) { +static inline const Stmt* GetStmt(const ProgramPoint &P) { if (const StmtPoint* SP = dyn_cast(&P)) return SP->getStmt(); else if (const BlockEdge* BE = dyn_cast(&P)) Modified: vendor/clang/dist/lib/Checker/Environment.cpp ============================================================================== --- vendor/clang/dist/lib/Checker/Environment.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/Checker/Environment.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -96,6 +96,19 @@ public: }; } // end anonymous namespace +static bool isBlockExprInCallers(const Stmt *E, const LocationContext *LC) { + const LocationContext *ParentLC = LC->getParent(); + while (ParentLC) { + CFG &C = *ParentLC->getCFG(); + if (C.isBlkExpr(E)) + return true; + ParentLC = ParentLC->getParent(); + } + + return false; +} + + // RemoveDeadBindings: // - Remove subexpression bindings. // - Remove dead block expression bindings. @@ -122,13 +135,27 @@ EnvironmentManager::RemoveDeadBindings(E I != E; ++I) { const Stmt *BlkExpr = I.getKey(); + const SVal &X = I.getData(); + + // Block-level expressions in callers are assumed always live. + if (isBlockExprInCallers(BlkExpr, SymReaper.getLocationContext())) { + NewEnv.ExprBindings = F.Add(NewEnv.ExprBindings, BlkExpr, X); + + if (isa(X)) { + const MemRegion* R = cast(X).getRegion(); + DRoots.push_back(R); + } + + // Mark all symbols in the block expr's value live. + MarkLiveCallback cb(SymReaper); + ST->scanReachableSymbols(X, cb); + continue; + } // Not a block-level expression? if (!C.isBlkExpr(BlkExpr)) continue; - const SVal &X = I.getData(); - if (SymReaper.isLive(S, BlkExpr)) { // Copy the binding to the new map. NewEnv.ExprBindings = F.Add(NewEnv.ExprBindings, BlkExpr, X); @@ -137,14 +164,6 @@ EnvironmentManager::RemoveDeadBindings(E if (isa(X)) { const MemRegion* R = cast(X).getRegion(); DRoots.push_back(R); - // Mark the super region of the RX as live. - // e.g.: int x; char *y = (char*) &x; if (*y) ... - // 'y' => element region. 'x' is its super region. - // We only add one level super region for now. - - // FIXME: maybe multiple level of super regions should be added. - if (const SubRegion *SR = dyn_cast(R)) - DRoots.push_back(SR->getSuperRegion()); } // Mark all symbols in the block expr's value live. Modified: vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -338,38 +338,50 @@ RValue CodeGenFunction::EmitBuiltinExpr( case Builtin::BIbzero: case Builtin::BI__builtin_bzero: { Value *Address = EmitScalarExpr(E->getArg(0)); - Builder.CreateCall4(CGM.getMemSetFn(), Address, - llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0), - EmitScalarExpr(E->getArg(1)), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1)); + Value *SizeVal = EmitScalarExpr(E->getArg(1)); + Builder.CreateCall5(CGM.getMemSetFn(Address->getType(), SizeVal->getType()), + Address, + llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0), + SizeVal, + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1), + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0)); return RValue::get(Address); } case Builtin::BImemcpy: case Builtin::BI__builtin_memcpy: { Value *Address = EmitScalarExpr(E->getArg(0)); - Builder.CreateCall4(CGM.getMemCpyFn(), Address, - EmitScalarExpr(E->getArg(1)), - EmitScalarExpr(E->getArg(2)), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1)); + Value *SrcAddr = EmitScalarExpr(E->getArg(1)); + Value *SizeVal = EmitScalarExpr(E->getArg(2)); + Builder.CreateCall5(CGM.getMemCpyFn(Address->getType(), SrcAddr->getType(), + SizeVal->getType()), + Address, SrcAddr, SizeVal, + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1), + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0)); return RValue::get(Address); } case Builtin::BImemmove: case Builtin::BI__builtin_memmove: { Value *Address = EmitScalarExpr(E->getArg(0)); - Builder.CreateCall4(CGM.getMemMoveFn(), Address, - EmitScalarExpr(E->getArg(1)), - EmitScalarExpr(E->getArg(2)), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1)); + Value *SrcAddr = EmitScalarExpr(E->getArg(1)); + Value *SizeVal = EmitScalarExpr(E->getArg(2)); + Builder.CreateCall5(CGM.getMemMoveFn(Address->getType(), SrcAddr->getType(), + SizeVal->getType()), + Address, SrcAddr, SizeVal, + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1), + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0)); return RValue::get(Address); } case Builtin::BImemset: case Builtin::BI__builtin_memset: { Value *Address = EmitScalarExpr(E->getArg(0)); - Builder.CreateCall4(CGM.getMemSetFn(), Address, - Builder.CreateTrunc(EmitScalarExpr(E->getArg(1)), - llvm::Type::getInt8Ty(VMContext)), - EmitScalarExpr(E->getArg(2)), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1)); + Value *SizeVal = EmitScalarExpr(E->getArg(2)); + Builder.CreateCall5(CGM.getMemSetFn(Address->getType(), SizeVal->getType()), + Address, + Builder.CreateTrunc(EmitScalarExpr(E->getArg(1)), + llvm::Type::getInt8Ty(VMContext)), + SizeVal, + llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1), + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0)); return RValue::get(Address); } case Builtin::BI__builtin_dwarf_cfa: { Modified: vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -1380,7 +1380,9 @@ void CGDebugInfo::EmitStopPoint(llvm::Fu || (SM.getInstantiationLineNumber(CurLoc) == SM.getInstantiationLineNumber(PrevLoc) && SM.isFromSameFile(CurLoc, PrevLoc))) - return; + // New Builder may not be in sync with CGDebugInfo. + if (!Builder.getCurrentDebugLocation().isUnknown()) + return; // Update last state. PrevLoc = CurLoc; Modified: vendor/clang/dist/lib/CodeGen/CGDecl.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGDecl.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGDecl.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -564,11 +564,15 @@ void CodeGenFunction::EmitLocalBlockVarD if (Loc->getType() != BP) Loc = Builder.CreateBitCast(Loc, BP, "tmp"); + llvm::Value *NotVolatile = + llvm::ConstantInt::get(llvm::Type::getInt1Ty(VMContext), 0); + // If the initializer is all zeros, codegen with memset. if (isa(Init)) { llvm::Value *Zero = - llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0); - Builder.CreateCall4(CGM.getMemSetFn(), Loc, Zero, SizeVal, AlignVal); + llvm::ConstantInt::get(llvm::Type::getInt8Ty(VMContext), 0); + Builder.CreateCall5(CGM.getMemSetFn(Loc->getType(), SizeVal->getType()), + Loc, Zero, SizeVal, AlignVal, NotVolatile); } else { // Otherwise, create a temporary global with the initializer then // memcpy from the global to the alloca. @@ -582,8 +586,10 @@ void CodeGenFunction::EmitLocalBlockVarD llvm::Value *SrcPtr = GV; if (SrcPtr->getType() != BP) SrcPtr = Builder.CreateBitCast(SrcPtr, BP, "tmp"); - - Builder.CreateCall4(CGM.getMemCpyFn(), Loc, SrcPtr, SizeVal, AlignVal); + + Builder.CreateCall5(CGM.getMemCpyFn(Loc->getType(), SrcPtr->getType(), + SizeVal->getType()), + Loc, SrcPtr, SizeVal, AlignVal, NotVolatile); } } else if (Ty->isReferenceType()) { RValue RV = EmitReferenceBindingToExpr(Init, /*IsInitializer=*/true); Modified: vendor/clang/dist/lib/CodeGen/CGExpr.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExpr.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGExpr.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -345,7 +345,7 @@ EmitScalarPrePostIncDec(const UnaryOpera } // Store the updated result through the lvalue. - if (LV.isBitfield()) + if (LV.isBitField()) EmitStoreThroughBitfieldLValue(RValue::get(NextVal), LV, ValTy, &NextVal); else EmitStoreThroughLValue(RValue::get(NextVal), LV, ValTy); @@ -429,7 +429,7 @@ LValue CodeGenFunction::EmitUnsupportedL LValue CodeGenFunction::EmitCheckedLValue(const Expr *E) { LValue LV = EmitLValue(E); - if (!isa(E) && !LV.isBitfield() && LV.isSimple()) + if (!isa(E) && !LV.isBitField() && LV.isSimple()) EmitCheck(LV.getAddress(), getContext().getTypeSize(E->getType()) / 8); return LV; } @@ -593,7 +593,7 @@ RValue CodeGenFunction::EmitLoadOfLValue if (LV.isExtVectorElt()) return EmitLoadOfExtVectorElementLValue(LV, ExprType); - if (LV.isBitfield()) + if (LV.isBitField()) return EmitLoadOfBitfieldLValue(LV, ExprType); if (LV.isPropertyRef()) @@ -605,9 +605,10 @@ RValue CodeGenFunction::EmitLoadOfLValue RValue CodeGenFunction::EmitLoadOfBitfieldLValue(LValue LV, QualType ExprType) { - unsigned StartBit = LV.getBitfieldStartBit(); - unsigned BitfieldSize = LV.getBitfieldSize(); - llvm::Value *Ptr = LV.getBitfieldAddr(); + const CGBitFieldInfo &Info = LV.getBitFieldInfo(); + unsigned StartBit = Info.Start; + unsigned BitfieldSize = Info.Size; + llvm::Value *Ptr = LV.getBitFieldAddr(); const llvm::Type *EltTy = cast(Ptr->getType())->getElementType(); @@ -650,7 +651,7 @@ RValue CodeGenFunction::EmitLoadOfBitfie } // Sign extend if necessary. - if (LV.isBitfieldSigned()) { + if (Info.IsSigned) { llvm::Value *ExtraBits = llvm::ConstantInt::get(EltTy, EltTySize - BitfieldSize); Val = Builder.CreateAShr(Builder.CreateShl(Val, ExtraBits), @@ -733,7 +734,7 @@ void CodeGenFunction::EmitStoreThroughLV if (Dst.isExtVectorElt()) return EmitStoreThroughExtVectorComponentLValue(Src, Dst, Ty); - if (Dst.isBitfield()) + if (Dst.isBitField()) return EmitStoreThroughBitfieldLValue(Src, Dst, Ty); if (Dst.isPropertyRef()) @@ -781,9 +782,10 @@ void CodeGenFunction::EmitStoreThroughLV void CodeGenFunction::EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst, QualType Ty, llvm::Value **Result) { - unsigned StartBit = Dst.getBitfieldStartBit(); - unsigned BitfieldSize = Dst.getBitfieldSize(); - llvm::Value *Ptr = Dst.getBitfieldAddr(); + const CGBitFieldInfo &Info = Dst.getBitFieldInfo(); + unsigned StartBit = Info.Start; + unsigned BitfieldSize = Info.Size; + llvm::Value *Ptr = Dst.getBitFieldAddr(); const llvm::Type *EltTy = cast(Ptr->getType())->getElementType(); @@ -805,7 +807,7 @@ void CodeGenFunction::EmitStoreThroughBi "bf.reload.val"); // Sign extend if necessary. - if (Dst.isBitfieldSigned()) { + if (Info.IsSigned) { unsigned SrcTySize = CGM.getTargetData().getTypeSizeInBits(SrcTy); llvm::Value *ExtraBits = llvm::ConstantInt::get(SrcTy, SrcTySize - BitfieldSize); @@ -1471,7 +1473,7 @@ LValue CodeGenFunction::EmitLValueForBit unsigned CVRQualifiers) { const CGRecordLayout &RL = CGM.getTypes().getCGRecordLayout(Field->getParent()); - const CGRecordLayout::BitFieldInfo &Info = RL.getBitFieldInfo(Field); + const CGBitFieldInfo &Info = RL.getBitFieldInfo(Field); // FIXME: CodeGenTypes should expose a method to get the appropriate type for // FieldTy (the appropriate type is ABI-dependent). @@ -1481,16 +1483,11 @@ LValue CodeGenFunction::EmitLValueForBit cast(BaseValue->getType()); unsigned AS = BaseTy->getAddressSpace(); BaseValue = Builder.CreateBitCast(BaseValue, - llvm::PointerType::get(FieldTy, AS), - "tmp"); + llvm::PointerType::get(FieldTy, AS)); + llvm::Value *V = Builder.CreateConstGEP1_32(BaseValue, Info.FieldNo); - llvm::Value *Idx = - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), Info.FieldNo); - llvm::Value *V = Builder.CreateGEP(BaseValue, Idx, "tmp"); - - return LValue::MakeBitfield(V, Info.Start, Info.Size, - Field->getType()->isSignedIntegerType(), - Field->getType().getCVRQualifiers()|CVRQualifiers); + return LValue::MakeBitfield(V, Info, + Field->getType().getCVRQualifiers()|CVRQualifiers); } LValue CodeGenFunction::EmitLValueForField(llvm::Value* BaseValue, Modified: vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGExprAgg.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -771,12 +771,27 @@ void CodeGenFunction::EmitAggregateCopy( // a = b; // } // - // we need to use a differnt call here. We use isVolatile to indicate when + // we need to use a different call here. We use isVolatile to indicate when // either the source or the destination is volatile. - Builder.CreateCall4(CGM.getMemCpyFn(), + const llvm::Type *I1Ty = llvm::Type::getInt1Ty(VMContext); + const llvm::Type *I8Ty = llvm::Type::getInt8Ty(VMContext); + const llvm::Type *I32Ty = llvm::Type::getInt32Ty(VMContext); + + const llvm::PointerType *DPT = cast(DestPtr->getType()); + const llvm::Type *DBP = llvm::PointerType::get(I8Ty, DPT->getAddressSpace()); + if (DestPtr->getType() != DBP) + DestPtr = Builder.CreateBitCast(DestPtr, DBP, "tmp"); + + const llvm::PointerType *SPT = cast(SrcPtr->getType()); + const llvm::Type *SBP = llvm::PointerType::get(I8Ty, SPT->getAddressSpace()); + if (SrcPtr->getType() != SBP) + SrcPtr = Builder.CreateBitCast(SrcPtr, SBP, "tmp"); + + Builder.CreateCall5(CGM.getMemCpyFn(DestPtr->getType(), SrcPtr->getType(), + IntPtr), DestPtr, SrcPtr, // TypeInfo.first describes size in bits. llvm::ConstantInt::get(IntPtr, TypeInfo.first/8), - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), - TypeInfo.second/8)); + llvm::ConstantInt::get(I32Ty, TypeInfo.second/8), + llvm::ConstantInt::get(I1Ty, isVolatile)); } Modified: vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -1140,7 +1140,7 @@ Value *ScalarExprEmitter::EmitCompoundAs // specially because the result is altered by the store, i.e., [C99 6.5.16p1] // 'An assignment expression has the value of the left operand after the // assignment...'. - if (LHSLV.isBitfield()) { + if (LHSLV.isBitField()) { if (!LHSLV.isVolatileQualified()) { CGF.EmitStoreThroughBitfieldLValue(RValue::get(Result), LHSLV, LHSTy, &Result); @@ -1575,7 +1575,7 @@ Value *ScalarExprEmitter::VisitBinAssign // because the result is altered by the store, i.e., [C99 6.5.16p1] // 'An assignment expression has the value of the left operand after // the assignment...'. - if (LHS.isBitfield()) { + if (LHS.isBitField()) { if (!LHS.isVolatileQualified()) { CGF.EmitStoreThroughBitfieldLValue(RValue::get(RHS), LHS, E->getType(), &RHS); Modified: vendor/clang/dist/lib/CodeGen/CGObjC.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjC.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGObjC.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -108,6 +108,10 @@ RValue CodeGenFunction::EmitObjCMessageE void CodeGenFunction::StartObjCMethod(const ObjCMethodDecl *OMD, const ObjCContainerDecl *CD) { FunctionArgList Args; + // Check if we should generate debug info for this method. + if (CGM.getDebugInfo() && !OMD->hasAttr()) + DebugInfo = CGM.getDebugInfo(); + llvm::Function *Fn = CGM.getObjCRuntime().GenerateMethod(OMD, CD); const CGFunctionInfo &FI = CGM.getTypes().getFunctionInfo(OMD); @@ -128,9 +132,6 @@ void CodeGenFunction::StartObjCMethod(co /// Generate an Objective-C method. An Objective-C method is a C function with /// its pointer, name, and types registered in the class struture. void CodeGenFunction::GenerateObjCMethod(const ObjCMethodDecl *OMD) { - // Check if we should generate debug info for this method. - if (CGM.getDebugInfo() && !OMD->hasAttr()) - DebugInfo = CGM.getDebugInfo(); StartObjCMethod(OMD, OMD->getClassInterface()); EmitStmt(OMD->getBody()); FinishFunction(OMD->getBodyRBrace()); Modified: vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -107,24 +107,31 @@ LValue CGObjCRuntime::EmitValueForIvarAt Qualifiers Quals = CGF.MakeQualifiers(IvarTy); Quals.addCVRQualifiers(CVRQualifiers); - if (Ivar->isBitField()) { - // We need to compute the bit offset for the bit-field, the offset - // is to the byte. Note, there is a subtle invariant here: we can - // only call this routine on non-sythesized ivars but we may be - // called for synthesized ivars. However, a synthesized ivar can - // never be a bit-field so this is safe. - uint64_t BitOffset = LookupFieldBitOffset(CGF.CGM, OID, 0, Ivar) % 8; + if (!Ivar->isBitField()) + return LValue::MakeAddr(V, Quals); - uint64_t BitFieldSize = - Ivar->getBitWidth()->EvaluateAsInt(CGF.getContext()).getZExtValue(); - return LValue::MakeBitfield(V, BitOffset, BitFieldSize, - IvarTy->isSignedIntegerType(), - Quals.getCVRQualifiers()); - } + // We need to compute the bit offset for the bit-field, the offset is to the + // byte. Note, there is a subtle invariant here: we can only call this routine + // on non-synthesized ivars but we may be called for synthesized ivars. + // However, a synthesized ivar can never be a bit-field, so this is safe. + uint64_t BitOffset = LookupFieldBitOffset(CGF.CGM, OID, 0, Ivar) % 8; + uint64_t BitFieldSize = + Ivar->getBitWidth()->EvaluateAsInt(CGF.getContext()).getZExtValue(); - - LValue LV = LValue::MakeAddr(V, Quals); - return LV; + // Allocate a new CGBitFieldInfo object to describe this access. + // + // FIXME: This is incredibly wasteful, these should be uniqued or part of some + // layout object. However, this is blocked on other cleanups to the + // Objective-C code, so for now we just live with allocating a bunch of these + // objects. + unsigned FieldNo = 0; // This value is unused. + CGBitFieldInfo *Info = + new (CGF.CGM.getContext()) CGBitFieldInfo(FieldNo, BitOffset, BitFieldSize, + IvarTy->isSignedIntegerType()); + + // FIXME: We need to set a very conservative alignment on this, or make sure + // that the runtime is doing the right thing. + return LValue::MakeBitfield(V, *Info, Quals.getCVRQualifiers()); } /// @@ -3128,7 +3135,7 @@ void CGObjCCommonMac::BuildAggrIvarLayou const CGRecordLayout &RL = CGM.getTypes().getCGRecordLayout(Field->getParent()); if (Field->isBitField()) { - const CGRecordLayout::BitFieldInfo &Info = RL.getBitFieldInfo(Field); + const CGBitFieldInfo &Info = RL.getBitFieldInfo(Field); const llvm::Type *Ty = CGM.getTypes().ConvertTypeForMemRecursive(Field->getType()); Modified: vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h Tue Apr 6 15:53:59 2010 (r206275) @@ -61,12 +61,11 @@ namespace CodeGen { /// Implements runtime-specific code generation functions. class CGObjCRuntime { -public: +protected: // Utility functions for unified ivar access. These need to // eventually be folded into other places (the structure layout // code). -protected: /// Compute an offset to the given ivar, suitable for passing to /// EmitValueForIvarAtOffset. Note that the correct handling of /// bit-fields is carefully coordinated by these two, use caution! Modified: vendor/clang/dist/lib/CodeGen/CGRecordLayout.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGRecordLayout.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGRecordLayout.h Tue Apr 6 15:53:59 2010 (r206275) @@ -19,6 +19,18 @@ namespace llvm { namespace clang { namespace CodeGen { +class CGBitFieldInfo { +public: + CGBitFieldInfo(unsigned FieldNo, unsigned Start, unsigned Size, + bool IsSigned) + : FieldNo(FieldNo), Start(Start), Size(Size), IsSigned(IsSigned) {} + + unsigned FieldNo; + unsigned Start; + unsigned Size; + bool IsSigned : 1; +}; + /// CGRecordLayout - This class handles struct and union layout info while /// lowering AST types to LLVM types. /// @@ -29,18 +41,6 @@ class CGRecordLayout { CGRecordLayout(const CGRecordLayout&); // DO NOT IMPLEMENT void operator=(const CGRecordLayout&); // DO NOT IMPLEMENT -public: - struct BitFieldInfo { - BitFieldInfo(unsigned FieldNo, - unsigned Start, - unsigned Size) - : FieldNo(FieldNo), Start(Start), Size(Size) {} - - unsigned FieldNo; - unsigned Start; - unsigned Size; - }; - private: /// The LLVMType corresponding to this record layout. const llvm::Type *LLVMType; @@ -51,7 +51,7 @@ private: /// Map from (bit-field) struct field to the corresponding llvm struct type /// field no. This info is populated by record builder. - llvm::DenseMap BitFields; + llvm::DenseMap BitFields; /// Whether one of the fields in this record layout is a pointer to data /// member, or a struct that contains pointer to data member. @@ -80,9 +80,9 @@ public: /// \brief Return llvm::StructType element number that corresponds to the /// field FD. - const BitFieldInfo &getBitFieldInfo(const FieldDecl *FD) const { + const CGBitFieldInfo &getBitFieldInfo(const FieldDecl *FD) const { assert(FD->isBitField() && "Invalid call for non bit-field decl!"); - llvm::DenseMap::const_iterator + llvm::DenseMap::const_iterator it = BitFields.find(FD); assert(it != BitFields.end() && "Unable to find bitfield info"); return it->second; Modified: vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp Tue Apr 6 15:53:59 2010 (r206275) @@ -37,17 +37,7 @@ public: llvm::SmallVector LLVMFields; /// LLVMBitFieldInfo - Holds location and size information about a bit field. - struct LLVMBitFieldInfo { - LLVMBitFieldInfo(const FieldDecl *FD, unsigned FieldNo, unsigned Start, - unsigned Size) - : FD(FD), FieldNo(FieldNo), Start(Start), Size(Size) { } - - const FieldDecl *FD; - - unsigned FieldNo; - unsigned Start; - unsigned Size; - }; + typedef std::pair LLVMBitFieldInfo; llvm::SmallVector LLVMBitFields; /// ContainsPointerToDataMember - Whether one of the fields in this record @@ -188,9 +178,11 @@ void CGRecordLayoutBuilder::LayoutBitFie const llvm::Type *Ty = Types.ConvertTypeForMemRecursive(D->getType()); uint64_t TypeSizeInBits = getTypeSizeInBytes(Ty) * 8; - LLVMBitFields.push_back(LLVMBitFieldInfo(D, FieldOffset / TypeSizeInBits, - FieldOffset % TypeSizeInBits, - FieldSize)); + bool IsSigned = D->getType()->isSignedIntegerType(); + LLVMBitFields.push_back(LLVMBitFieldInfo( + D, CGBitFieldInfo(FieldOffset / TypeSizeInBits, + FieldOffset % TypeSizeInBits, + FieldSize, IsSigned))); AppendBytes(NumBytesToAppend); @@ -288,7 +280,10 @@ void CGRecordLayoutBuilder::LayoutUnion( continue; // Add the bit field info. - LLVMBitFields.push_back(LLVMBitFieldInfo(*Field, 0, 0, FieldSize)); + bool IsSigned = Field->getType()->isSignedIntegerType(); + LLVMBitFields.push_back(LLVMBitFieldInfo( + *Field, CGBitFieldInfo(0, 0, FieldSize, + IsSigned))); } else { LLVMFields.push_back(LLVMFieldInfo(*Field, 0)); } @@ -494,21 +489,12 @@ CGRecordLayout *CodeGenTypes::ComputeRec new CGRecordLayout(Ty, Builder.ContainsPointerToDataMember); // Add all the field numbers. - for (unsigned i = 0, e = Builder.LLVMFields.size(); i != e; ++i) { - const FieldDecl *FD = Builder.LLVMFields[i].first; - unsigned FieldNo = Builder.LLVMFields[i].second; - - RL->FieldInfo.insert(std::make_pair(FD, FieldNo)); - } + for (unsigned i = 0, e = Builder.LLVMFields.size(); i != e; ++i) + RL->FieldInfo.insert(Builder.LLVMFields[i]); // Add bitfield info. - for (unsigned i = 0, e = Builder.LLVMBitFields.size(); i != e; ++i) { - const CGRecordLayoutBuilder::LLVMBitFieldInfo &Info = - Builder.LLVMBitFields[i]; - - CGRecordLayout::BitFieldInfo BFI(Info.FieldNo, Info.Start, Info.Size); - RL->BitFields.insert(std::make_pair(Info.FD, BFI)); - } + for (unsigned i = 0, e = Builder.LLVMBitFields.size(); i != e; ++i) + RL->BitFields.insert(Builder.LLVMBitFields[i]); return RL; } Modified: vendor/clang/dist/lib/CodeGen/CGValue.h ============================================================================== --- vendor/clang/dist/lib/CodeGen/CGValue.h Tue Apr 6 15:52:58 2010 (r206274) +++ vendor/clang/dist/lib/CodeGen/CGValue.h Tue Apr 6 15:53:59 2010 (r206275) @@ -27,6 +27,7 @@ namespace clang { class ObjCImplicitSetterGetterRefExpr; namespace CodeGen { + class CGBitFieldInfo; /// RValue - This trivial value class is used to represent the result of an /// expression that is evaluated. It can be one of three things: either a @@ -128,14 +129,11 @@ class LValue { llvm::Constant *VectorElts; // BitField start bit and size - struct { - unsigned short StartBit; - unsigned short Size; - bool IsSigned; - } BitfieldData; + const CGBitFieldInfo *BitFieldInfo; // Obj-C property reference expression const ObjCPropertyRefExpr *PropertyRefExpr; + // ObjC 'implicit' property reference expression const ObjCImplicitSetterGetterRefExpr *KVCRefExpr; }; @@ -170,7 +168,7 @@ private: public: bool isSimple() const { return LVType == Simple; } bool isVectorElt() const { return LVType == VectorElt; } - bool isBitfield() const { return LVType == BitField; } + bool isBitField() const { return LVType == BitField; } bool isExtVectorElt() const { return LVType == ExtVectorElt; } bool isPropertyRef() const { return LVType == PropertyRef; } bool isKVCRef() const { return LVType == KVCRef; } @@ -209,29 +207,28 @@ public: // simple lvalue llvm::Value *getAddress() const { assert(isSimple()); return V; } + // vector elt lvalue llvm::Value *getVectorAddr() const { assert(isVectorElt()); return V; } llvm::Value *getVectorIdx() const { assert(isVectorElt()); return VectorIdx; } + // extended vector elements. llvm::Value *getExtVectorAddr() const { assert(isExtVectorElt()); return V; } llvm::Constant *getExtVectorElts() const { assert(isExtVectorElt()); return VectorElts; } + // bitfield lvalue - llvm::Value *getBitfieldAddr() const { assert(isBitfield()); return V; } - unsigned short getBitfieldStartBit() const { - assert(isBitfield()); - return BitfieldData.StartBit; - } - unsigned short getBitfieldSize() const { - assert(isBitfield()); - return BitfieldData.Size; - } - bool isBitfieldSigned() const { - assert(isBitfield()); - return BitfieldData.IsSigned; + llvm::Value *getBitFieldAddr() const { + assert(isBitField()); + return V; + } + const CGBitFieldInfo &getBitFieldInfo() const { + assert(isBitField()); + return *BitFieldInfo; } + // property ref lvalue const ObjCPropertyRefExpr *getPropertyRefExpr() const { assert(isPropertyRef()); @@ -272,15 +269,12 @@ public: return R; } - static LValue MakeBitfield(llvm::Value *V, unsigned short StartBit, - unsigned short Size, bool IsSigned, + static LValue MakeBitfield(llvm::Value *V, const CGBitFieldInfo &Info, unsigned CVR) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 16:23:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77F64106566C; Tue, 6 Apr 2010 16:23:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 67A388FC0A; Tue, 6 Apr 2010 16:23:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36GNC9X016551; Tue, 6 Apr 2010 16:23:12 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36GNCEL016549; Tue, 6 Apr 2010 16:23:12 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004061623.o36GNCEL016549@svn.freebsd.org> From: Warner Losh Date: Tue, 6 Apr 2010 16:23:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206276 - head/tools/tools/nanobsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 16:23:12 -0000 Author: imp Date: Tue Apr 6 16:23:12 2010 New Revision: 206276 URL: http://svn.freebsd.org/changeset/base/206276 Log: Fix comment about NANO_ARCH. It can be set now. Also add a warning about how it confuses TARGET and TARGET_ARCH and the need to separate the two out into independent variables. Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Tue Apr 6 15:53:59 2010 (r206275) +++ head/tools/tools/nanobsd/nanobsd.sh Tue Apr 6 16:23:12 2010 (r206276) @@ -132,7 +132,10 @@ NANO_MD_BACKING="file" PPLEVEL=3 ####################################################################### -# Not a variable at this time +# Architecture to build. Corresponds to TARGET_ARCH in a buildworld. +# Unfortunately, there's no way to set TARGET at this time, and it +# conflates the two, so architectures where TARGET != TARGET_ARCH do +# not work. This defaults to the arch of the current machine. NANO_ARCH=`uname -p` From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 17:07:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D76781065670; Tue, 6 Apr 2010 17:07:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 97D388FC13; Tue, 6 Apr 2010 17:07:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o36Gwd1a013258; Tue, 6 Apr 2010 10:58:40 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 06 Apr 2010 10:54:17 -0600 (MDT) Message-Id: <20100406.105417.934842008305588111.imp@bsdimp.com> To: netchild@freebsd.org From: "M. Warner Losh" In-Reply-To: <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> References: <20100405143123.14716pelm4tos2kg@webmail.leidinger.net> <20100405133505.GK2415@deviant.kiev.zoral.com.ua> <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 17:07:18 -0000 In message: <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> Alexander Leidinger writes: : Warner, do you mind if I back-out r206082 and change the place where : NORMAL_CTFCONVERT is used instead (fist I have to search for it : again... not today)? It would make it consistent with all other places : (SYSTEM_CTFCONVERT and the plain test and use of CTFxxx). Go ahead. I just did the fast and dirty fix. I though it was consistent with how other things were done, but if not, feel free to correct it. Also, see bde's commentary :) Warner From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 17:57:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D26FB106564A; Tue, 6 Apr 2010 17:57:27 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7A998FC0A; Tue, 6 Apr 2010 17:57:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36HvRAZ037433; Tue, 6 Apr 2010 17:57:27 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36HvRv7037432; Tue, 6 Apr 2010 17:57:27 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201004061757.o36HvRv7037432@svn.freebsd.org> From: Ken Smith Date: Tue, 6 Apr 2010 17:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206278 - stable/8/release/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 17:57:27 -0000 Author: kensmith Date: Tue Apr 6 17:57:27 2010 New Revision: 206278 URL: http://svn.freebsd.org/changeset/base/206278 Log: Merge r204044: Provide a script that can be used to create the memstick images. Added: stable/8/release/scripts/make-memstick.sh - copied unchanged from r204044, head/release/scripts/make-memstick.sh Modified: Directory Properties: stable/8/release/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/qemu/ (props changed) Copied: stable/8/release/scripts/make-memstick.sh (from r204044, head/release/scripts/make-memstick.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/release/scripts/make-memstick.sh Tue Apr 6 17:57:27 2010 (r206278, copy of r204044, head/release/scripts/make-memstick.sh) @@ -0,0 +1,83 @@ +#!/bin/sh +# +# This script generates a "memstick image" (image that can be copied to a +# USB memory stick) from a directory tree. Note that the script does not +# clean up after itself very well for error conditions on purpose so the +# problem can be diagnosed (full filesystem most likely but ...). +# +# Usage: make-memstick.sh +# +# $FreeBSD$ +# + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +export PATH + +BLOCKSIZE=10240 + +if [ $# -ne 2 ]; then + echo "make-memstick.sh /path/to/directory /path/to/image/file" + exit 1 +fi + +tempfile="${2}.$$" + +if [ ! -d ${1} ]; then + echo "${1} must be a directory" + exit 1 +fi + +if [ -e ${2} ]; then + echo "won't overwrite ${2}" + exit 1 +fi + +rm -f ${tempfile} +makefs ${tempfile} ${1} +if [ $? -ne 0 ]; then + echo "makefs failed" + exit 1 +fi + +# +# Use $BLOCKSIZE for transfers to improve efficiency. When calculating +# how many blocks to transfer "+ 2" is to account for truncation in the +# division and to provide space for the label. +# + +filesize=`stat -f "%z" ${tempfile}` +blocks=$(($filesize / ${BLOCKSIZE} + 2)) +dd if=/dev/zero of=${2} bs=${BLOCKSIZE} count=${blocks} +if [ $? -ne 0 ]; then + echo "creation of image file failed" + exit 1 +fi + +unit=`mdconfig -a -t vnode -f ${2}` +if [ $? -ne 0 ]; then + echo "mdconfig failed" + exit 1 +fi + +fdisk -BIq /dev/${unit} +if [ $? -ne 0 ]; then + echo "fdisk failed" + exit 1 +fi + +bsdlabel -B -w /dev/${unit} +if [ $? -ne 0 ]; then + echo "bsdlabel failed" + exit 1 +fi + +dd if=${tempfile} of=/dev/${unit}a bs=$BLOCKSIZE conv=sync +if [ $? -ne 0 ]; then + echo "copying filesystem into image file failed" + exit 1 +fi + +mdconfig -d -u ${unit} + +rm -f ${tempfile} + From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 18:00:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EE75106564A; Tue, 6 Apr 2010 18:00:30 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id B1F948FC1F; Tue, 6 Apr 2010 18:00:29 +0000 (UTC) Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o36I0S3w000692; Tue, 6 Apr 2010 20:00:28 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o36I0SZs013583; Tue, 6 Apr 2010 20:00:28 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id o36I0S4X041060; Date: Tue, 6 Apr 2010 20:00:27 +0200 From: Andre Albsmeier To: Pyun YongHyeon Message-ID: <20100406180027.GA3724@curry.mchp.siemens.de> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> <20100405145937.GA78871@curry.mchp.siemens.de> <20100405180642.GD1225@michelle.cdnetworks.com> <20100406134626.GA1727@curry.mchp.siemens.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100406134626.GA1727@curry.mchp.siemens.de> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "Albsmeier, Andre" , Pyun YongHyeon Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 18:00:30 -0000 On Tue, 06-Apr-2010 at 15:46:26 +0200, Andre Albsmeier wrote: > On Mon, 05-Apr-2010 at 20:06:42 +0200, Pyun YongHyeon wrote: > > On Mon, Apr 05, 2010 at 04:59:37PM +0200, Andre Albsmeier wrote: > > > On Wed, 24-Mar-2010 at 18:21:05 +0100, Pyun YongHyeon wrote: > > > > Author: yongari > > > > Date: Wed Mar 24 17:21:05 2010 > > > > New Revision: 205614 > > > > URL: http://svn.freebsd.org/changeset/base/205614 > > > > > > > > Log: > > > > MFC r204545: > > > > Remove taskqueue based interrupt handling. After r204541 msk(4) > > > > does not generate excessive interrupts any more so we don't need > > > > to have two copies of interrupt handler. > > > > While I'm here remove two STAT_PUT_IDX register accesses in LE > > > > status event handler. After r204539 msk(4) always sync status LEs > > > > so there is no need to resort to reading STAT_PUT_IDX register to > > > > know the end of status LE processing. Just trust status LE's > > > > ownership bit. > > > > > > This ruined the performance on my system heavily. I noticed it > > > when unpacking a local tar archive onto an NFS-mounted location > > > on an em(4)-based box. This archive is about 50MB of size with > > > a bit over 5600 files so files have an average size of 9 kB. > > > > > > I also noticed the slowdown when doing rdist-based updates (again > > > lots of small files) onto the other box. > > > > > > Just pumping bytes over the network shows no problems -- I can > > > transmit 100-105 MB/s and receive 95-100 MB/s when talking > > > to this em(4)-based box without problem (and as it was before). > > > > > > When copying a few big files (several GBs of size) over NFS > > > I get something between 70 and 90 MB/s which is the same as > > > what I had got before. > > > > > > If have made some tests to track down when the issues began. > > > Problems started with rev. 1.18.2.37 of if_msk.c but could > > > be alleviated by setting dev.mskc.0.int_holdoff to 1 or 0. > > > Things really got problematic with rev. 1.18.2.38 -- adjusting > > > dev.mskc.0.int_holdoff helped a lot but we are far from what > > > we had with 1.18.2.36 or earlier. I did 5 rounds of testing, > > > each with the same set of if_msk.c revisions and values for > > > int_holdoff (where appropriate) just to check reproducibility: > > > > > > if_msk.c rev. round1 round2 round3 round4 round5 > > > -------------------------------------------------------- > > > 1.18.2.34 17,115 18,408 17,977 16,412 19,170 > > > 1.18.2.35 18,414 17,863 17,000 18,428 18,093 > > > 1.18.2.36 19,631 18,167 18,105 18,401 17,995 > > > 1.18.2.37 22,707 24,830 24,322 23,613 22,498 > > > int_holdoff=10 19,259 19,870 19,355 18,725 19,273 > > > int_holdoff=1 18,464 18,218 17,862 16,701 17,798 > > > int_holdoff=0 19,423 18,507 19,505 20,714 20,460 > > > 1.18.2.38 57,169 53,394 58,721 not done > > > int_holdoff=10 30,266 33,493 33,240 33,247 30,470 > > > int_holdoff=1 27,013 28,777 28,047 25,858 27,615 > > > int_holdoff=0 40,284 33,040 33,726 36,834 35,235 > > > > > > All this is on > > > > > > FreeBSD-7.3-STABLE > > > > > > CPU: Intel(R) Core(TM)2 Quad CPU Q9650 @ 3.00GHz (3001.18-MHz 686-class CPU) > > > Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10 > > > > > > dev.mskc.0.%desc: Marvell Yukon 88E8053 Gigabit Ethernet > > > dev.msk.0.%desc: Marvell Technology Group Ltd. Yukon EC Id 0xb6 Rev 0x02 > > > > > > hw.msk.msi_disable was set to 1 but didn't change results > > > when commenting it out. > > > > > > Any ideas or things I can try? > > > > > > > Could you narrow down which side(RX or TX) cause the issue you're > > seeing? From your description it's not clear whether msk(4) is used > > as sender or receiver. > > Well, both. I will try to describe the setup more exactly: > > On the msk(4)-box a locally residing tar file (48 MB size > containing 5600 files) is unpacked onto an NFS volume. > This NFS volume is mounted from another box which got > an em(4)-based NIC. I have now measured the amounts of > data being sent end received simply by using netstat: > > About 62 MB are being sent out of the msk(4)-box to the > em(4)-based NFS box and about 22 MB are received on the > msk(4)-box from the em(4)-based NFS box. > > I have now tried the reverse direction as well: The em(4)- > based box mounts an NFS volume from the msk(4)-box and > unpacks the same tar file (now the 62 MB are received on > the msk(4)-box and 22 MB are transmitted from the msk(4)- > box). The results are similar: > > rev. 1.18.2.38: 48,243 seconds > rev. 1.18.2.36: 17,536 seconds > > But I noticed another thing here at work: If I choose a > remote machine which uses myk(4) (not msk(4)) instead of > em(4) there are no performance issues noticable. Unfortu- > natley I can't test msk(4) on the remote side at the > moment... So the performance issues exist only when the > new msk driver is talking to an em-based NIC... > > > As you know 1.18.2.38 removed taskqueue based interrupt handling so > > it could be culprit of the issue. But that revision also removed > > two register accesses in TX path so I'd like to know which one > > caused the issue. > > I have now tried rev. 1.18.2.38 with this patch (no idea if > this is right ;-)): > > --- if_msk.c.1.18.2.38 2010-04-06 15:09:19.000000000 +0200 > +++ if_msk.c.1.18.2.38.TRY 2010-04-06 15:38:13.000000000 +0200 > @@ -3327,6 +3327,11 @@ > uint32_t control, status; > int cons, len, port, rxprog; > > + int idx; > + idx = CSR_READ_2(sc, STAT_PUT_IDX); > + if (idx == sc->msk_stat_cons) > + return (0); > + > /* Sync status LEs. */ > bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, > BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > @@ -3407,7 +3412,7 @@ > if (rxput[MSK_PORT_B] > 0) > msk_rxput(sc->msk_if[MSK_PORT_B]); > > - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); > + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); > } > > static void > > Now performance seems to be the same as with the older > driver (at least here at work) and in both directions! > Some numbers: > > em0 writes to rev. 1.18.2.36: 20 seconds > em0 writes to rev. 1.18.2.38: 50 seconds > em0 writes to rev. 1.18.2.38 with patch from above: 23 seconds > same as before but with int_holdoff: 100 -> 1: 20 seconds > > rev. 1.18.2.36 writes to em0: 22 seconds > rev. 1.18.2.38 writes to em0: 40 seconds > rev. 1.18.2.38 with patch from above writes to em0: 21 seconds > same as before but with int_holdoff: 100 -> 1: 20 seconds > > It seems that these two CSR_READ_2s really help ;-). > > As I said, this is at work and with slightly different machines. > I will try things at home later but I am rather confident of > receiving good results there as well... OK, tests at home show similar good results with the above patch. When setting int_holdoff to 3, performance seems equal to the older versions. -Andre From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 18:45:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4FBB1065674; Tue, 6 Apr 2010 18:45:09 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id C497C8FC16; Tue, 6 Apr 2010 18:45:08 +0000 (UTC) Received: by bwz8 with SMTP id 8so195158bwz.3 for ; Tue, 06 Apr 2010 11:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=/akSMq50vORihjBykRF6VEluCTlLTzdgS/6EZKY9o7g=; b=nM3pEEsdtNCrossJqq1JTloWZTcgFBVm2UeMnlY4o3svHl3UUtWvILz8fym/izD4vD 5PayI1vNytmxeICjYnYeJPVDHVdkla7p+FkjEkECPZQIYc+HIUGO0cLHyKiEpB9MGuUE x5FtizHinuhScYTu55LGftUBkJQV3CKmSl8As= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=tUTrZXMEBTwzicdbdKwUAyS+ms1oGkfZJ7semeHprn7nQ5xbE48VekzR+iEsE7/0TR cBud5hwzvT5aUJ7x5YlBPj2E8WhaCKGuqYpnjr2HQIVKblGVuhEWeLeO+mICQxt617N3 Q7/FDgpNScMOydrDze79xyWKacyR0ZibuH9wA= Received: by 10.204.33.206 with SMTP id i14mr1894663bkd.52.1270579507240; Tue, 06 Apr 2010 11:45:07 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 13sm6364060bwz.3.2010.04.06.11.45.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 06 Apr 2010 11:45:05 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 6 Apr 2010 11:44:56 -0700 From: Pyun YongHyeon Date: Tue, 6 Apr 2010 11:44:56 -0700 To: Andre Albsmeier Message-ID: <20100406184456.GA1087@michelle.cdnetworks.com> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> <20100405145937.GA78871@curry.mchp.siemens.de> <20100405180642.GD1225@michelle.cdnetworks.com> <20100406134626.GA1727@curry.mchp.siemens.de> <20100406180027.GA3724@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: <20100406180027.GA3724@curry.mchp.siemens.de> User-Agent: Mutt/1.4.2.3i Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , Pyun YongHyeon Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 18:45:09 -0000 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 06, 2010 at 08:00:27PM +0200, Andre Albsmeier wrote: > On Tue, 06-Apr-2010 at 15:46:26 +0200, Andre Albsmeier wrote: > > On Mon, 05-Apr-2010 at 20:06:42 +0200, Pyun YongHyeon wrote: [...] > > > As you know 1.18.2.38 removed taskqueue based interrupt handling so > > > it could be culprit of the issue. But that revision also removed > > > two register accesses in TX path so I'd like to know which one > > > caused the issue. > > > > I have now tried rev. 1.18.2.38 with this patch (no idea if > > this is right ;-)): > > > > --- if_msk.c.1.18.2.38 2010-04-06 15:09:19.000000000 +0200 > > +++ if_msk.c.1.18.2.38.TRY 2010-04-06 15:38:13.000000000 +0200 > > @@ -3327,6 +3327,11 @@ > > uint32_t control, status; > > int cons, len, port, rxprog; > > > > + int idx; > > + idx = CSR_READ_2(sc, STAT_PUT_IDX); > > + if (idx == sc->msk_stat_cons) > > + return (0); > > + > > /* Sync status LEs. */ > > bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, > > BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > > @@ -3407,7 +3412,7 @@ > > if (rxput[MSK_PORT_B] > 0) > > msk_rxput(sc->msk_if[MSK_PORT_B]); > > > > - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); > > + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); > > } > > > > static void > > > > Now performance seems to be the same as with the older > > driver (at least here at work) and in both directions! > > Some numbers: > > > > em0 writes to rev. 1.18.2.36: 20 seconds > > em0 writes to rev. 1.18.2.38: 50 seconds > > em0 writes to rev. 1.18.2.38 with patch from above: 23 seconds > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > rev. 1.18.2.36 writes to em0: 22 seconds > > rev. 1.18.2.38 writes to em0: 40 seconds > > rev. 1.18.2.38 with patch from above writes to em0: 21 seconds > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > It seems that these two CSR_READ_2s really help ;-). > > > > As I said, this is at work and with slightly different machines. > > I will try things at home later but I am rather confident of > > receiving good results there as well... > > OK, tests at home show similar good results with the > above patch. When setting int_holdoff to 3, performance > seems equal to the older versions. > Thanks a lot for narrowing down the issue. Because the msk_handle_events() are called in interrupt handler I'd like to remove the two register accesses in fast path. It seems accessing STAT_PUT_IDX triggers status updates. Would you try attached patch and let me know whether the patch makes any difference? --45Z9DzgjV8m4Oswq Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="msk.status.update.patch" Index: sys/dev/msk/if_msk.c =================================================================== --- sys/dev/msk/if_msk.c (revision 206204) +++ sys/dev/msk/if_msk.c (working copy) @@ -1470,6 +1470,7 @@ /* WA for dev. #4.18 */ CSR_WRITE_1(sc, STAT_FIFO_WM, 0x21); CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x07); + CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 10)); } else { CSR_WRITE_2(sc, STAT_TX_IDX_TH, 0x0a); CSR_WRITE_1(sc, STAT_FIFO_WM, 0x10); @@ -1481,9 +1482,16 @@ CSR_WRITE_4(sc, STAT_ISR_TIMER_INI, 0x0190); } /* - * Use default value for STAT_ISR_TIMER_INI, STAT_LEV_TIMER_INI. + * STAT_TX_TIMER_INI, STAT_ISR_TIMER_INI and STAT_LEV_TIMER_INI + * as well as various water mark registers seem to control when + * controller initiates status LE update. + * It's not clear how these registers interact with interrupt + * state but STAT_TX_TIMER_INI seems to control status update + * time after crossing a threshold(STAT_TX_IDX_TH) value. Due to + * the complexity of various parameters that may affect status + * update just use hardware default until we know better + * the internal things of status updates. */ - CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 1000)); /* Enable status unit. */ CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_OP_ON); --45Z9DzgjV8m4Oswq-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 18:57:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F39421065677; Tue, 6 Apr 2010 18:57:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E431C8FC1B; Tue, 6 Apr 2010 18:57:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36Ivo0C050928; Tue, 6 Apr 2010 18:57:50 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36Ivopc050925; Tue, 6 Apr 2010 18:57:50 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201004061857.o36Ivopc050925@svn.freebsd.org> From: Michael Tuexen Date: Tue, 6 Apr 2010 18:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206281 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 18:57:51 -0000 Author: tuexen Date: Tue Apr 6 18:57:50 2010 New Revision: 206281 URL: http://svn.freebsd.org/changeset/base/206281 Log: Fix a off-by-one bug in zeroing out the mapping arrays. Fix sctp_print_mapping_array(). MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Tue Apr 6 18:39:16 2010 (r206280) +++ head/sys/netinet/sctp_indata.c Tue Apr 6 18:57:50 2010 (r206281) @@ -2275,8 +2275,7 @@ sctp_slide_mapping_arrays(struct sctp_tc asoc->cumulative_tsn = asoc->mapping_array_base_tsn + (at - 1); if (compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_map, MAX_TSN) && - compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN) - ) { + compare_with_wrap(asoc->cumulative_tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) { #ifdef INVARIANTS panic("huh, cumack 0x%x greater than high-tsn 0x%x in map", asoc->cumulative_tsn, asoc->highest_tsn_inside_map); @@ -2378,7 +2377,7 @@ sctp_slide_mapping_arrays(struct sctp_tc asoc->nr_mapping_array[slide_from + ii]; } - for (ii = distance; ii <= asoc->mapping_array_size; ii++) { + for (ii = distance; ii < asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Apr 6 18:39:16 2010 (r206280) +++ head/sys/netinet/sctputil.c Tue Apr 6 18:57:50 2010 (r206281) @@ -1187,50 +1187,38 @@ sctp_init_asoc(struct sctp_inpcb *m, str void sctp_print_mapping_array(struct sctp_association *asoc) { - int i, limit; + unsigned int i, limit; - printf("Mapping size:%d baseTSN:%8.8x cumAck:%8.8x highestTSN:%8.8x\n", + printf("Mapping array size: %d, baseTSN: %8.8x, cumAck: %8.8x, highestTSN: (%8.8x, %8.8x).\n", asoc->mapping_array_size, asoc->mapping_array_base_tsn, asoc->cumulative_tsn, - asoc->highest_tsn_inside_map - ); - limit = asoc->mapping_array_size; - for (i = asoc->mapping_array_size; i >= 0; i--) { - if (asoc->mapping_array[i]) { - limit = i; + asoc->highest_tsn_inside_map, + asoc->highest_tsn_inside_nr_map); + for (limit = asoc->mapping_array_size; limit > 1; limit--) { + if (asoc->mapping_array[limit - 1]) { break; } } - if (limit == 0) - limit = 1; + printf("Renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { - printf("%2.2x ", asoc->mapping_array[i]); + printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); if (((i + 1) % 16) == 0) printf("\n"); } - printf("\n"); - printf("NR Mapping size:%d baseTSN:%8.8x highestTSN:%8.8x\n", - asoc->mapping_array_size, - asoc->mapping_array_base_tsn, - asoc->highest_tsn_inside_nr_map - ); - limit = asoc->mapping_array_size; - for (i = asoc->mapping_array_size; i >= 0; i--) { - if (asoc->nr_mapping_array[i]) { - limit = i; + if (limit % 16) + printf("\n"); + for (limit = asoc->mapping_array_size; limit > 1; limit--) { + if (asoc->nr_mapping_array[limit - 1]) { break; } } - if (limit == 0) - limit = 1; - + printf("Non renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { - printf("%2.2x ", asoc->nr_mapping_array[i]); - if (((i + 1) % 16) == 0) - printf("\n"); + printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); } - printf("\n"); + if (limit % 16) + printf("\n"); } int @@ -1240,9 +1228,7 @@ sctp_expand_mapping_array(struct sctp_as uint8_t *new_array1, *new_array2; uint32_t new_size; - new_size = asoc->mapping_array_size + ((needed + 7) / 8 + SCTP_MAPPING_ARRAY_INCR); - SCTP_MALLOC(new_array1, uint8_t *, new_size, SCTP_M_MAP); SCTP_MALLOC(new_array2, uint8_t *, new_size, SCTP_M_MAP); if ((new_array1 == NULL) || (new_array2 == NULL)) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 19:36:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4EB81065705 for ; Tue, 6 Apr 2010 19:36:27 +0000 (UTC) (envelope-from alfonzoelry4b@hotmail.com) Received: from snt0-omc1-s16.snt0.hotmail.com (snt0-omc1-s16.snt0.hotmail.com [65.55.90.27]) by mx1.freebsd.org (Postfix) with ESMTP id 5EBE48FC2B for ; Tue, 6 Apr 2010 19:36:27 +0000 (UTC) Received: from SNT106-DS24 ([65.55.90.7]) by snt0-omc1-s16.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 6 Apr 2010 12:24:26 -0700 X-Originating-IP: [24.46.49.32] X-Originating-Email: [alfonzoelry4b@hotmail.com] Message-ID: From: Wall, Judith Z. To: Date: Tue, 06 Apr 2010 23:22:16 +0400 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8064.206 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8064.206 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: binary X-OriginalArrivalTime: 06 Apr 2010 19:24:26.0490 (UTC) FILETIME=[C55895A0:01CAD5BE] Subject: 2.5% daily for 200 days with no risk. X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 19:36:27 -0000 Hi svn-src-all@freebsd.org, I wanna inform you about a very solid investment I participate in since seven month. I am in 510% profit by now. they are reliable Hong Kong traders company, active on stock, derivatives, and Forex markets. Their results are very stable, their trading profit is 3% daily and the company pays investors up to 2.5% each day. HYt fund is absolutely transparent, publishing their trading data and offering phone, chat, and email support to investors. I am sure they are the guys to stay with in 2010. Check them out: http://texugauto.com/126dpgp5 From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 19:59:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E56FD106566C; Tue, 6 Apr 2010 19:59:38 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by mx1.freebsd.org (Postfix) with ESMTP id 74D5C8FC16; Tue, 6 Apr 2010 19:59:38 +0000 (UTC) Received: from mail1.siemens.de (localhost [127.0.0.1]) by david.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o36JxaWS007810; Tue, 6 Apr 2010 21:59:37 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o36JxafW027756; Tue, 6 Apr 2010 21:59:36 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id o36JxaBd041399; Date: Tue, 6 Apr 2010 21:59:36 +0200 From: Andre Albsmeier To: Pyun YongHyeon Message-ID: <20100406195936.GA48023@curry.mchp.siemens.de> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> <20100405145937.GA78871@curry.mchp.siemens.de> <20100405180642.GD1225@michelle.cdnetworks.com> <20100406134626.GA1727@curry.mchp.siemens.de> <20100406180027.GA3724@curry.mchp.siemens.de> <20100406184456.GA1087@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100406184456.GA1087@michelle.cdnetworks.com> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "Albsmeier, Andre" , Pyun YongHyeon Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 19:59:39 -0000 On Tue, 06-Apr-2010 at 20:44:56 +0200, Pyun YongHyeon wrote: > On Tue, Apr 06, 2010 at 08:00:27PM +0200, Andre Albsmeier wrote: > > On Tue, 06-Apr-2010 at 15:46:26 +0200, Andre Albsmeier wrote: > > > On Mon, 05-Apr-2010 at 20:06:42 +0200, Pyun YongHyeon wrote: > > [...] > > > > > As you know 1.18.2.38 removed taskqueue based interrupt handling so > > > > it could be culprit of the issue. But that revision also removed > > > > two register accesses in TX path so I'd like to know which one > > > > caused the issue. > > > > > > I have now tried rev. 1.18.2.38 with this patch (no idea if > > > this is right ;-)): > > > > > > --- if_msk.c.1.18.2.38 2010-04-06 15:09:19.000000000 +0200 > > > +++ if_msk.c.1.18.2.38.TRY 2010-04-06 15:38:13.000000000 +0200 > > > @@ -3327,6 +3327,11 @@ > > > uint32_t control, status; > > > int cons, len, port, rxprog; > > > > > > + int idx; > > > + idx = CSR_READ_2(sc, STAT_PUT_IDX); > > > + if (idx == sc->msk_stat_cons) > > > + return (0); > > > + > > > /* Sync status LEs. */ > > > bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, > > > BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > > > @@ -3407,7 +3412,7 @@ > > > if (rxput[MSK_PORT_B] > 0) > > > msk_rxput(sc->msk_if[MSK_PORT_B]); > > > > > > - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); > > > + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); > > > } > > > > > > static void > > > > > > Now performance seems to be the same as with the older > > > driver (at least here at work) and in both directions! > > > Some numbers: > > > > > > em0 writes to rev. 1.18.2.36: 20 seconds > > > em0 writes to rev. 1.18.2.38: 50 seconds > > > em0 writes to rev. 1.18.2.38 with patch from above: 23 seconds > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > rev. 1.18.2.36 writes to em0: 22 seconds > > > rev. 1.18.2.38 writes to em0: 40 seconds > > > rev. 1.18.2.38 with patch from above writes to em0: 21 seconds > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > It seems that these two CSR_READ_2s really help ;-). > > > > > > As I said, this is at work and with slightly different machines. > > > I will try things at home later but I am rather confident of > > > receiving good results there as well... > > > > OK, tests at home show similar good results with the > > above patch. When setting int_holdoff to 3, performance > > seems equal to the older versions. > > > > Thanks a lot for narrowing down the issue. > Because the msk_handle_events() are called in interrupt handler > I'd like to remove the two register accesses in fast path. It seems > accessing STAT_PUT_IDX triggers status updates. Would you try > attached patch and let me know whether the patch makes any > difference? > Index: sys/dev/msk/if_msk.c > =================================================================== > --- sys/dev/msk/if_msk.c (revision 206204) > +++ sys/dev/msk/if_msk.c (working copy) > @@ -1470,6 +1470,7 @@ > /* WA for dev. #4.18 */ > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x21); > CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x07); > + CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 10)); > } else { > CSR_WRITE_2(sc, STAT_TX_IDX_TH, 0x0a); > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x10); > @@ -1481,9 +1482,16 @@ > CSR_WRITE_4(sc, STAT_ISR_TIMER_INI, 0x0190); > } > /* > - * Use default value for STAT_ISR_TIMER_INI, STAT_LEV_TIMER_INI. > + * STAT_TX_TIMER_INI, STAT_ISR_TIMER_INI and STAT_LEV_TIMER_INI > + * as well as various water mark registers seem to control when > + * controller initiates status LE update. > + * It's not clear how these registers interact with interrupt > + * state but STAT_TX_TIMER_INI seems to control status update > + * time after crossing a threshold(STAT_TX_IDX_TH) value. Due to > + * the complexity of various parameters that may affect status > + * update just use hardware default until we know better > + * the internal things of status updates. > */ > - CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 1000)); > > /* Enable status unit. */ > CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_OP_ON); After applying this patch against an original 1.18.2.39 things became even worse. After 4 minutes of waiting I aborted untar'ing the file ;-). Setting int_holdoff=2 made things better, now it took 65 seconds for untar'ing... -Andre From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 20:30:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1522B106566C; Tue, 6 Apr 2010 20:30:00 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 37DDE8FC14; Tue, 6 Apr 2010 20:29:58 +0000 (UTC) Received: by bwz8 with SMTP id 8so283442bwz.3 for ; Tue, 06 Apr 2010 13:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=R+pcMV9nW7wQbkRjuiiHQyLAPu0o9bdGHpJdz3wkxYU=; b=T0vMAly/S6ZTsW4VBp5SFgC1qRi3ddlvYKqfwcTRh/jyv+f3oqkKFhE3xrTH0ixY33 lZ4mzo4B9rdfB0+FbNdhV51N0e6/hgrDfU0oSC44pcyiA0MjS0EIwI0HX5wr37BUn7Vk X4rlvYt3nqmQoLA9dDER/t/JaXbU1e5xV/bfk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=RFeGUgnrUacdIGBgxcIVJODCjvPMNCicKbvY6P8yc9XjyFqVzEx/VN29aWTpbfFiNl fcClsgG7xkUMbWhTHEl3c0cuO6NuosxLOnJPdKpdl0TFTuJA9T/FG0csmwyQdnSoIe7E CEGIhJsj+bS/N2aMnewwkDlxgC53cIL1d55j0= Received: by 10.204.153.24 with SMTP id i24mr7803020bkw.213.1270585798095; Tue, 06 Apr 2010 13:29:58 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 13sm6444457bwz.15.2010.04.06.13.29.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 06 Apr 2010 13:29:56 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 6 Apr 2010 13:29:49 -0700 From: Pyun YongHyeon Date: Tue, 6 Apr 2010 13:29:49 -0700 To: Andre Albsmeier Message-ID: <20100406202949.GB1087@michelle.cdnetworks.com> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> <20100405145937.GA78871@curry.mchp.siemens.de> <20100405180642.GD1225@michelle.cdnetworks.com> <20100406134626.GA1727@curry.mchp.siemens.de> <20100406180027.GA3724@curry.mchp.siemens.de> <20100406184456.GA1087@michelle.cdnetworks.com> <20100406195936.GA48023@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100406195936.GA48023@curry.mchp.siemens.de> User-Agent: Mutt/1.4.2.3i Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , Pyun YongHyeon Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 20:30:00 -0000 On Tue, Apr 06, 2010 at 09:59:36PM +0200, Andre Albsmeier wrote: > On Tue, 06-Apr-2010 at 20:44:56 +0200, Pyun YongHyeon wrote: > > On Tue, Apr 06, 2010 at 08:00:27PM +0200, Andre Albsmeier wrote: > > > On Tue, 06-Apr-2010 at 15:46:26 +0200, Andre Albsmeier wrote: > > > > On Mon, 05-Apr-2010 at 20:06:42 +0200, Pyun YongHyeon wrote: > > > > [...] > > > > > > > As you know 1.18.2.38 removed taskqueue based interrupt handling so > > > > > it could be culprit of the issue. But that revision also removed > > > > > two register accesses in TX path so I'd like to know which one > > > > > caused the issue. > > > > > > > > I have now tried rev. 1.18.2.38 with this patch (no idea if > > > > this is right ;-)): > > > > > > > > --- if_msk.c.1.18.2.38 2010-04-06 15:09:19.000000000 +0200 > > > > +++ if_msk.c.1.18.2.38.TRY 2010-04-06 15:38:13.000000000 +0200 > > > > @@ -3327,6 +3327,11 @@ > > > > uint32_t control, status; > > > > int cons, len, port, rxprog; > > > > > > > > + int idx; > > > > + idx = CSR_READ_2(sc, STAT_PUT_IDX); > > > > + if (idx == sc->msk_stat_cons) > > > > + return (0); > > > > + > > > > /* Sync status LEs. */ > > > > bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, > > > > BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > > > > @@ -3407,7 +3412,7 @@ > > > > if (rxput[MSK_PORT_B] > 0) > > > > msk_rxput(sc->msk_if[MSK_PORT_B]); > > > > > > > > - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); > > > > + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); > > > > } > > > > > > > > static void > > > > > > > > Now performance seems to be the same as with the older > > > > driver (at least here at work) and in both directions! > > > > Some numbers: > > > > > > > > em0 writes to rev. 1.18.2.36: 20 seconds > > > > em0 writes to rev. 1.18.2.38: 50 seconds > > > > em0 writes to rev. 1.18.2.38 with patch from above: 23 seconds > > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > > > rev. 1.18.2.36 writes to em0: 22 seconds > > > > rev. 1.18.2.38 writes to em0: 40 seconds > > > > rev. 1.18.2.38 with patch from above writes to em0: 21 seconds > > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > > > It seems that these two CSR_READ_2s really help ;-). > > > > > > > > As I said, this is at work and with slightly different machines. > > > > I will try things at home later but I am rather confident of > > > > receiving good results there as well... > > > > > > OK, tests at home show similar good results with the > > > above patch. When setting int_holdoff to 3, performance > > > seems equal to the older versions. > > > > > > > Thanks a lot for narrowing down the issue. > > Because the msk_handle_events() are called in interrupt handler > > I'd like to remove the two register accesses in fast path. It seems > > accessing STAT_PUT_IDX triggers status updates. Would you try > > attached patch and let me know whether the patch makes any > > difference? > > > Index: sys/dev/msk/if_msk.c > > =================================================================== > > --- sys/dev/msk/if_msk.c (revision 206204) > > +++ sys/dev/msk/if_msk.c (working copy) > > @@ -1470,6 +1470,7 @@ > > /* WA for dev. #4.18 */ > > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x21); > > CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x07); > > + CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 10)); > > } else { > > CSR_WRITE_2(sc, STAT_TX_IDX_TH, 0x0a); > > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x10); > > @@ -1481,9 +1482,16 @@ > > CSR_WRITE_4(sc, STAT_ISR_TIMER_INI, 0x0190); > > } > > /* > > - * Use default value for STAT_ISR_TIMER_INI, STAT_LEV_TIMER_INI. > > + * STAT_TX_TIMER_INI, STAT_ISR_TIMER_INI and STAT_LEV_TIMER_INI > > + * as well as various water mark registers seem to control when > > + * controller initiates status LE update. > > + * It's not clear how these registers interact with interrupt > > + * state but STAT_TX_TIMER_INI seems to control status update > > + * time after crossing a threshold(STAT_TX_IDX_TH) value. Due to > > + * the complexity of various parameters that may affect status > > + * update just use hardware default until we know better > > + * the internal things of status updates. > > */ > > - CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 1000)); > > > > /* Enable status unit. */ > > CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_OP_ON); > > After applying this patch against an original 1.18.2.39 > things became even worse. After 4 minutes of waiting I > aborted untar'ing the file ;-). Setting int_holdoff=2 > made things better, now it took 65 seconds for untar'ing... > :-( By chance, did you disable MSI(msi_disable=1)? From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 21:39:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94CCD106566C; Tue, 6 Apr 2010 21:39:18 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 806E28FC0A; Tue, 6 Apr 2010 21:39:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36LdIF2087338; Tue, 6 Apr 2010 21:39:18 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36LdISe087335; Tue, 6 Apr 2010 21:39:18 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <201004062139.o36LdISe087335@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Apr 2010 21:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206287 - in stable/8/cddl/contrib/opensolaris/cmd: zfs zpool X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 21:39:18 -0000 Author: danger (doc committer) Date: Tue Apr 6 21:39:18 2010 New Revision: 206287 URL: http://svn.freebsd.org/changeset/base/206287 Log: Merge r205659: - update zfs and zpool manual pages to match the current state of the source PR: 144984 Submitted by: mm@ Approved by: pjd@ Obtained from: OpenSolaris Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zdb/ (props changed) stable/8/cddl/contrib/opensolaris/cmd/zfs/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 6 20:09:13 2010 (r206286) +++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Apr 6 21:39:18 2010 (r206287) @@ -1,24 +1,9 @@ '\" te -.\" CDDL HEADER START -.\" -.\" The contents of this file are subject to the terms of the -.\" Common Development and Distribution License (the "License"). -.\" You may not use this file except in compliance with the License. -.\" -.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -.\" or http://www.opensolaris.org/os/licensing. -.\" See the License for the specific language governing permissions -.\" and limitations under the License. -.\" -.\" When distributing Covered Code, include this CDDL HEADER in each -.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. -.\" If applicable, add the following below this CDDL HEADER, with the -.\" fields enclosed by brackets "[]" replaced with your own identifying -.\" information: Portions Copyright [yyyy] [name of copyright owner] -.\" -.\" CDDL HEADER END -.\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved. -.TH zfs 1M "8 Apr 2008" "SunOS 5.11" "System Administration Commands" +.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH zfs 1M "14 Feb 2009" "SunOS 5.11" "System Administration Commands" .SH NAME zfs \- configures ZFS file systems .SH SYNOPSIS @@ -44,7 +29,8 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBsnapshot\fR [\fB-r\fR] \fIfilesystem@snapname\fR|\fIvolume@snapname\fR +\fBzfs\fR \fBsnapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR]... + \fIfilesystem@snapname\fR|\fIvolume@snapname\fR .fi .LP @@ -54,7 +40,7 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBclone\fR [\fB-p\fR] \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR +\fBzfs\fR \fBclone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR .fi .LP @@ -65,7 +51,7 @@ zfs \- configures ZFS file systems .LP .nf \fBzfs\fR \fBrename\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR - \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR + \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR .fi .LP @@ -81,23 +67,23 @@ zfs \- configures ZFS file systems .LP .nf \fBzfs\fR \fBlist\fR [\fB-rH\fR] [\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] - [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... + [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... .fi .LP .nf -\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR ... +\fBzfs\fR \fBset\fR \fIproperty\fR=\fIvalue\fR \fIfilesystem\fR|\fIvolume\fR|snapshot ... .fi .LP .nf \fBzfs\fR \fBget\fR [\fB-rHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-s\fR \fIsource\fR[,...]] "\fIall\fR" | \fIproperty\fR[,...] - \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... + \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ... .fi .LP .nf -\fBzfs\fR \fBinherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR ... +\fBzfs\fR \fBinherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR ... .fi .LP @@ -132,12 +118,12 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR +\fBzfs\fR \fBunshare\fR \fB-a\fR \fIfilesystem\fR|\fImountpoint\fR .fi .LP .nf -\fBzfs\fR \fBsend\fR [\fB-vR\fR] [\fB-\fR[\fB-iI\fR] \fIsnapshot\fR] \fIsnapshot\fR +\fBzfs\fR \fBsend\fR [\fB-vR\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR .fi .LP @@ -153,7 +139,7 @@ zfs \- configures ZFS file systems .LP .nf \fBzfs\fR \fBallow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] \fIperm\fR|\fI@setname\fR[,...] - \fIfilesystem\fR|\fIvolume\fR + \fIfilesystem\fR|\fIvolume\fR .fi .LP @@ -174,7 +160,7 @@ zfs \- configures ZFS file systems .LP .nf \fBzfs\fR \fBunallow\fR [\fB-rldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...] [\fIperm\fR|@\fIsetname\fR[,... ]] - \fIfilesystem\fR|\fIvolume\fR + \fIfilesystem\fR|\fIvolume\fR .fi .LP @@ -192,20 +178,10 @@ zfs \- configures ZFS file systems \fBzfs\fR \fBunallow\fR [\fB-r\fR] \fB-s\fR @setname [\fIperm\fR|@\fIsetname\fR[,... ]] \fIfilesystem\fR|\fIvolume\fR .fi -.LP -.nf -\fBzfs\fR \fBjail\fR \fBjailid\fR \fB\fIfilesystem\fR\fR -.fi -.LP -.nf -\fBzfs\fR \fBunjail\fR \fBjailid\fR \fB\fIfilesystem\fR\fR -.fi - .SH DESCRIPTION .sp .LP -The \fBzfs\fR command configures \fBZFS\fR datasets within a \fBZFS\fR storage pool, as described in \fBzpool\fR(1M). A -dataset is identified by a unique path within the \fBZFS\fR namespace. For example: +The \fBzfs\fR command configures \fBZFS\fR datasets within a \fBZFS\fR storage pool, as described in \fBzpool\fR(1M). A dataset is identified by a unique path within the \fBZFS\fR namespace. For example: .sp .in +2 .nf @@ -226,9 +202,9 @@ A dataset can be one of the following: .na \fB\fIfile system\fR\fR .ad -.RS 15n -.rt -A standard \fBPOSIX\fR file system. \fBZFS\fR file systems can be mounted within the standard file system namespace and behave like any other file system. +.sp .6 +.RS 4n +A \fBZFS\fR dataset of type "filesystem" that can be mounted within the standard system namespace and behaves like other file systems. While \fBZFS\fR file systems are designed to be \fBPOSIX\fR compliant, known issues exist that prevent compliance in some cases. Applications that depend on standards conformance might fail due to nonstandard behavior when checking file system free space. .RE .sp @@ -237,8 +213,8 @@ A standard \fBPOSIX\fR file system. \fBZ .na \fB\fIvolume\fR\fR .ad -.RS 15n -.rt +.sp .6 +.RS 4n A logical volume exported as a raw or block device. This type of dataset should only be used under special circumstances. File systems are typically used in most environments. Volumes cannot be used in a non-global zone. .RE @@ -248,8 +224,8 @@ A logical volume exported as a raw or bl .na \fB\fIsnapshot\fR\fR .ad -.RS 15n -.rt +.sp .6 +.RS 4n A read-only version of a file system or volume at a given point in time. It is specified as \fIfilesystem@name\fR or \fIvolume@name\fR. .RE @@ -272,20 +248,17 @@ A snapshot is a read-only copy of a file Snapshots can have arbitrary names. Snapshots of volumes can be cloned or rolled back, but cannot be accessed independently. .sp .LP -File system snapshots can be accessed under the ".zfs/snapshot" directory in the root of the file system. Snapshots are automatically mounted on demand and may be unmounted at regular intervals. The visibility of the ".zfs" directory can be controlled by the "snapdir" -property. +File system snapshots can be accessed under the ".zfs/snapshot" directory in the root of the file system. Snapshots are automatically mounted on demand and may be unmounted at regular intervals. The visibility of the ".zfs" directory can be controlled by the "snapdir" property. .SS "Clones" .sp .LP A clone is a writable volume or file system whose initial contents are the same as another dataset. As with snapshots, creating a clone is nearly instantaneous, and initially consumes no additional space. .sp .LP -Clones can only be created from a snapshot. When a snapshot is cloned, it creates an implicit dependency between the parent and child. Even though the clone is created somewhere else in the dataset hierarchy, the original snapshot cannot be destroyed as long as a clone exists. The "origin" -property exposes this dependency, and the \fBdestroy\fR command lists any such dependencies, if they exist. +Clones can only be created from a snapshot. When a snapshot is cloned, it creates an implicit dependency between the parent and child. Even though the clone is created somewhere else in the dataset hierarchy, the original snapshot cannot be destroyed as long as a clone exists. The "origin" property exposes this dependency, and the \fBdestroy\fR command lists any such dependencies, if they exist. .sp .LP -The clone parent-child dependency relationship can be reversed by using the "\fBpromote\fR" subcommand. This causes the "origin" file system to become a clone of the specified file system, which makes it possible to destroy the file system that the clone -was created from. +The clone parent-child dependency relationship can be reversed by using the "\fBpromote\fR" subcommand. This causes the "origin" file system to become a clone of the specified file system, which makes it possible to destroy the file system that the clone was created from. .SS "Mount Points" .sp .LP @@ -301,8 +274,7 @@ A file system can also have a mount poin A file system mountpoint property of "none" prevents the file system from being mounted. .sp .LP -If needed, \fBZFS\fR file systems can also be managed with traditional tools (\fBmount\fR, \fBumount\fR, \fB/etc/vfstab\fR). If a file system's mount point is set to "legacy", \fBZFS\fR makes no attempt to manage -the file system, and the administrator is responsible for mounting and unmounting the file system. +If needed, \fBZFS\fR file systems can also be managed with traditional tools (\fBmount\fR, \fBumount\fR, \fB/etc/vfstab\fR). If a file system's mount point is set to "legacy", \fBZFS\fR makes no attempt to manage the file system, and the administrator is responsible for mounting and unmounting the file system. .SS "Zones" .sp .LP @@ -312,8 +284,7 @@ A \fBZFS\fR file system can be added to The physical properties of an added file system are controlled by the global administrator. However, the zone administrator can create, modify, or destroy files within the added file system, depending on how the file system is mounted. .sp .LP -A dataset can also be delegated to a non-global zone by using zonecfg's "\fBadd dataset\fR" subcommand. You cannot delegate a dataset to one zone and the children of the same dataset to another zone. The zone administrator can change properties of the dataset or -any of its children. However, the "quota" property is controlled by the global administrator. +A dataset can also be delegated to a non-global zone by using zonecfg's "\fBadd dataset\fR" subcommand. You cannot delegate a dataset to one zone and the children of the same dataset to another zone. The zone administrator can change properties of the dataset or any of its children. However, the "quota" property is controlled by the global administrator. .sp .LP A \fBZFS\fR volume can be added as a device to a non-global zone by using zonecfg's "\fBadd device\fR" subcommand. However, its physical properties can only be modified by the global administrator. @@ -329,15 +300,13 @@ The global administrator can forcibly cl .SS "Native Properties" .sp .LP -Properties are divided into two types, native properties and user defined properties. Native properties either export internal statistics or control \fBZFS\fR behavior. In addition, native properties are either editable or read-only. User properties have no effect on \fBZFS\fR behavior, -but you can use them to annotate datasets in a way that is meaningful in your environment. For more information about user properties, see the "User Properties" section. +Properties are divided into two types, native properties and user defined properties. Native properties either export internal statistics or control \fBZFS\fR behavior. In addition, native properties are either editable or read-only. User properties have no effect on \fBZFS\fR behavior, but you can use them to annotate datasets in a way that is meaningful in your environment. For more information about user properties, see the "User Properties" section. .sp .LP -Every dataset has a set of properties that export statistics about the dataset as well as control various behavior. Properties are inherited from the parent unless overridden by the child. Snapshot properties can not be edited; they always inherit their inheritable properties. Properties -that are not applicable to snapshots are not displayed. +Every dataset has a set of properties that export statistics about the dataset as well as control various behavior. Properties are inherited from the parent unless overridden by the child. Some properties only apply to certain types of datasets (file systems, volumes or snapshots). .sp .LP -The values of numeric properties can be specified using the following human-readable suffixes (for example, "k", "KB", "M", "Gb", etc, up to Z for zettabyte). The following are all valid (and equal) specifications: +The values of numeric properties can be specified using human-readable suffixes (for example, "k", "KB", "M", "Gb", etc, up to Z for zettabyte). The following are all valid (and equal) specifications: .sp .in +2 .nf @@ -360,8 +329,7 @@ The following native properties consist .ad .sp .6 .RS 4n -The amount of space available to the dataset and all its children, assuming that there is no other activity in the pool. Because space is shared within a pool, availability can be limited by any number of factors, including physical pool size, quotas, reservations, or other datasets -within the pool. +The amount of space available to the dataset and all its children, assuming that there is no other activity in the pool. Because space is shared within a pool, availability can be limited by any number of factors, including physical pool size, quotas, reservations, or other datasets within the pool. .sp This property can also be referred to by its shortened column name, "avail". .RE @@ -418,8 +386,7 @@ For cloned file systems or volumes, the .ad .sp .6 .RS 4n -The amount of data that is accessible by this dataset, which may or may not be shared with other datasets in the pool. When a snapshot or clone is created, it initially references the same amount of space as the file system or snapshot it was created from, since its contents are -identical. +The amount of data that is accessible by this dataset, which may or may not be shared with other datasets in the pool. When a snapshot or clone is created, it initially references the same amount of space as the file system or snapshot it was created from, since its contents are identical. .sp This property can also be referred to by its shortened column name, "refer". .RE @@ -432,7 +399,7 @@ This property can also be referred to by .ad .sp .6 .RS 4n -The type of dataset: "filesystem", "volume", "snapshot", or "clone". +The type of dataset: "filesystem", "volume", or "snapshot". .RE .sp @@ -443,11 +410,9 @@ The type of dataset: "filesystem", "volu .ad .sp .6 .RS 4n -The amount of space consumed by this dataset and all its descendents. This is the value that is checked against this dataset's quota and reservation. The space used does not include this dataset's reservation, but does take into account the reservations of any descendent datasets. -The amount of space that a dataset consumes from its parent, as well as the amount of space that are freed if this dataset is recursively destroyed, is the greater of its space used and its reservation. +The amount of space consumed by this dataset and all its descendents. This is the value that is checked against this dataset's quota and reservation. The space used does not include this dataset's reservation, but does take into account the reservations of any descendent datasets. The amount of space that a dataset consumes from its parent, as well as the amount of space that are freed if this dataset is recursively destroyed, is the greater of its space used and its reservation. .sp -When snapshots (see the "Snapshots" section) are created, their space is initially shared between the snapshot and the file system, and possibly with previous snapshots. As the file system changes, space that was previously shared becomes unique to the snapshot, and counted in -the snapshot's space used. Additionally, deleting snapshots can increase the amount of space unique to (and used by) other snapshots. +When snapshots (see the "Snapshots" section) are created, their space is initially shared between the snapshot and the file system, and possibly with previous snapshots. As the file system changes, space that was previously shared becomes unique to the snapshot, and counted in the snapshot's space used. Additionally, deleting snapshots can increase the amount of space unique to (and used by) other snapshots. .sp The amount of space used, available, or referenced does not take into account pending changes. Pending changes are generally accounted for within a few seconds. Committing a change to a disk using \fBfsync\fR(3c) or \fBO_SYNC\fR does not necessarily guarantee that the space usage information is updated immediately. .RE @@ -456,12 +421,66 @@ The amount of space used, available, or .ne 2 .mk .na +\fBusedby*\fR +.ad +.sp .6 +.RS 4n +The \fBusedby*\fR snapshots decompose the "used" properties into the various reasons that space is used. Specifically, \fBused\fR = \fBusedbychildren\fR + \fBusedbydataset\fR + \fBusedbyrefreservation\fR +, \fBusedbysnapshots\fR. These properties are only available for datasets created on zpool "version 13" pools. +.RE + +.sp +.ne 2 +.mk +.na +\fBusedbychildren\fR +.ad +.sp .6 +.RS 4n +The amount of space used by children of this dataset, which would be freed if all the dataset's children were destroyed. +.RE + +.sp +.ne 2 +.mk +.na +\fBusedbydataset\fR +.ad +.sp .6 +.RS 4n +The amount of space used by this dataset itself, which would be freed if the dataset were destroyed (after first removing any \fBrefreservation\fR and destroying any necessary snapshots or descendents). +.RE + +.sp +.ne 2 +.mk +.na +\fBusedbyrefreservation\fR +.ad +.sp .6 +.RS 4n +The amount of space used by a \fBrefreservation\fR set on this dataset, which would be freed if the \fBrefreservation\fR was removed. +.RE + +.sp +.ne 2 +.mk +.na +\fBusedbysnapshots\fR +.ad +.sp .6 +.RS 4n +The amount of space consumed by snapshots of this dataset. In particular, it is the amount of space that would be freed if all of this dataset's snapshots were destroyed. Note that this is not simply the sum of the snapshots' "used" properties because space can be shared by multiple snapshots +.RE + +.sp +.ne 2 +.mk +.na \fBvolblocksize=\fIblocksize\fR\fR .ad .sp .6 .RS 4n -For volumes, specifies the block size of the volume. The \fBblocksize\fR cannot be changed once the volume has been written, so it should be set at volume creation time. The default \fBblocksize\fR for volumes is 8 Kbytes. Any power of 2 from 512 bytes -to 128 Kbytes is valid. +For volumes, specifies the block size of the volume. The \fBblocksize\fR cannot be changed once the volume has been written, so it should be set at volume creation time. The default \fBblocksize\fR for volumes is 8 Kbytes. Any power of 2 from 512 bytes to 128 Kbytes is valid. .sp This property can also be referred to by its shortened column name, "volblock". .RE @@ -473,15 +492,13 @@ The following native properties can be u .ne 2 .mk .na -\fBaclinherit=\fBdiscard\fR | \fBnoallow\fR | \fBrestricted\fR | \fBpassthrough\fR\fR +\fBaclinherit=\fBdiscard\fR | \fBnoallow\fR | \fBrestricted\fR | \fBpassthrough\fR | \fBpassthrough-x\fR\fR .ad .sp .6 .RS 4n -Controls how \fBACL\fR entries are inherited when files and directories are created. A file system with an "aclinherit" property of "\fBdiscard\fR" does not inherit any \fBACL\fR entries. A file system with an "aclinherit" -property value of "\fBnoallow\fR" only inherits inheritable \fBACL\fR entries that specify "deny" permissions. The property value "\fBrestricted\fR" (the default) removes the "\fBwrite_acl\fR" and "\fBwrite_owner\fR" permissions when the \fBACL\fR entry is inherited. A file system with an "aclinherit" property value of "\fBpassthrough\fR" inherits all inheritable \fBACL\fR entries without any modifications made to the \fBACL\fR entries when they are inherited. +Controls how \fBACL\fR entries are inherited when files and directories are created. A file system with an "aclinherit" property of "\fBdiscard\fR" does not inherit any \fBACL\fR entries. A file system with an "aclinherit" property value of "\fBnoallow\fR" only inherits inheritable \fBACL\fR entries that specify "deny" permissions. The property value "\fBrestricted\fR" (the default) removes the "\fBwrite_acl\fR" and "\fBwrite_owner\fR" permissions when the \fBACL\fR entry is inherited. A file system with an "aclinherit" property value of "\fBpassthrough\fR" inherits all inheritable \fBACL\fR entries without any modifications made to the \fBACL\fR entries when they are inherited. A file system with an "aclinherit" property value of "\fBpassthrough-x\fR" has the same meaning as "\fBpassthrough\fR", except that the \fBowner@\fR, \fBgroup@\fR, and \fBeveryone@\fR \fBACE\fRs inherit the execute permission only if the file creation mode also requests the execute bit. .sp -When the property value is set to "\fBpassthrough\fR," files are created with a mode determined by the inheritable \fBACE\fRs. If no inheritable \fBACE\fRs exist that affect the mode, then the mode is set in accordance to the requested mode -from the application. +When the property value is set to "\fBpassthrough\fR," files are created with a mode determined by the inheritable \fBACE\fRs. If no inheritable \fBACE\fRs exist that affect the mode, then the mode is set in accordance to the requested mode from the application. .RE .sp @@ -492,9 +509,7 @@ from the application. .ad .sp .6 .RS 4n -Controls how an \fBACL\fR is modified during \fBchmod\fR(2). A file system with an "aclmode" property of "\fBdiscard\fR" -deletes all \fBACL\fR entries that do not represent the mode of the file. An "aclmode" property of "\fBgroupmask\fR" (the default) reduces user or group permissions. The permissions are reduced, such that they are no greater than the group permission -bits, unless it is a user entry that has the same \fBUID\fR as the owner of the file or directory. In this case, the \fBACL\fR permissions are reduced so that they are no greater than owner permission bits. A file system with an "aclmode" property of "\fBpassthrough\fR" indicates that no changes are made to the \fBACL\fR other than generating the necessary \fBACL\fR entries to represent the new mode of the file or directory. +Controls how an \fBACL\fR is modified during \fBchmod\fR(2). A file system with an "aclmode" property of "\fBdiscard\fR" deletes all \fBACL\fR entries that do not represent the mode of the file. An "aclmode" property of "\fBgroupmask\fR" (the default) reduces user or group permissions. The permissions are reduced, such that they are no greater than the group permission bits, unless it is a user entry that has the same \fBUID\fR as the owner of the file or directory. In this case, the \fBACL\fR permissions are reduced so that they are no greater than owner permission bits. A file system with an "aclmode" property of "\fBpassthrough\fR" indicates that no changes are made to the \fBACL\fR other than generating the necessary \fBACL\fR entries to represent the new mode of the file or directory. .RE .sp @@ -505,8 +520,7 @@ bits, unless it is a user entry that has .ad .sp .6 .RS 4n -Controls whether the access time for files is updated when they are read. Turning this property off avoids producing write traffic when reading files and can result in significant performance gains, though it might confuse mailers and other similar utilities. The default value -is "on". +Controls whether the access time for files is updated when they are read. Turning this property off avoids producing write traffic when reading files and can result in significant performance gains, though it might confuse mailers and other similar utilities. The default value is "on". .RE .sp @@ -517,12 +531,9 @@ is "on". .ad .sp .6 .RS 4n -If this property is set to "\fBoff\fR", the file system cannot be mounted, and is ignored by "\fBzfs mount -a\fR". Setting this property to "\fBoff\fR" is similar to setting the "mountpoint" -property to "\fBnone\fR", except that the dataset still has a normal "mountpoint" property, which can be inherited. Setting this property to "\fBoff\fR" allows datasets to be used solely as a mechanism to inherit properties. One example -of setting canmount=\fBoff\fR is to have two datasets with the same mountpoint, so that the children of both datasets appear in the same directory, but might have different inherited characteristics. +If this property is set to "\fBoff\fR", the file system cannot be mounted, and is ignored by "\fBzfs mount -a\fR". Setting this property to "\fBoff\fR" is similar to setting the "mountpoint" property to "\fBnone\fR", except that the dataset still has a normal "mountpoint" property, which can be inherited. Setting this property to "\fBoff\fR" allows datasets to be used solely as a mechanism to inherit properties. One example of setting canmount=\fBoff\fR is to have two datasets with the same mountpoint, so that the children of both datasets appear in the same directory, but might have different inherited characteristics. .sp -When the "\fBnoauto\fR" option is set, a dataset can only be mounted and unmounted explicitly. The dataset is not mounted automatically when the dataset is created or imported, nor is it mounted by the "\fBzfs mount -a\fR" command or unmounted -by the "\fBzfs unmount -a\fR" command. +When the "\fBnoauto\fR" option is set, a dataset can only be mounted and unmounted explicitly. The dataset is not mounted automatically when the dataset is created or imported, nor is it mounted by the "\fBzfs mount -a\fR" command or unmounted by the "\fBzfs unmount -a\fR" command. .sp This property is not inherited. .RE @@ -535,8 +546,7 @@ This property is not inherited. .ad .sp .6 .RS 4n -Controls the checksum used to verify data integrity. The default value is "on", which automatically selects an appropriate algorithm (currently, \fIfletcher4\fR, but this may change in future releases). The value "off" disables integrity -checking on user data. Disabling checksums is NOT a recommended practice. +Controls the checksum used to verify data integrity. The default value is "on", which automatically selects an appropriate algorithm (currently, \fIfletcher2\fR, but this may change in future releases). The value "off" disables integrity checking on user data. Disabling checksums is NOT a recommended practice. .RE .sp @@ -547,9 +557,7 @@ checking on user data. Disabling checksu .ad .sp .6 .RS 4n -Controls the compression algorithm used for this dataset. The "lzjb" compression algorithm is optimized for performance while providing decent data compression. Setting compression to "on" uses the "lzjb" compression algorithm. The "gzip" -compression algorithm uses the same compression as the \fBgzip\fR(1) command. You can specify the "gzip" level by using the value "gzip-\fIN\fR" where \fIN\fR is -an integer from 1 (fastest) to 9 (best compression ratio). Currently, "gzip" is equivalent to "gzip-6" (which is also the default for \fBgzip\fR(1)). +Controls the compression algorithm used for this dataset. The "lzjb" compression algorithm is optimized for performance while providing decent data compression. Setting compression to "on" uses the "lzjb" compression algorithm. The "gzip" compression algorithm uses the same compression as the \fBgzip\fR(1) command. You can specify the "gzip" level by using the value "gzip-\fIN\fR" where \fIN\fR is an integer from 1 (fastest) to 9 (best compression ratio). Currently, "gzip" is equivalent to "gzip-6" (which is also the default for \fBgzip\fR(1)). .sp This property can also be referred to by its shortened column name "compress". .RE @@ -562,8 +570,7 @@ This property can also be referred to by .ad .sp .6 .RS 4n -Controls the number of copies of data stored for this dataset. These copies are in addition to any redundancy provided by the pool, for example, mirroring or raid-z. The copies are stored on different disks, if possible. The space used by multiple copies is charged to the associated -file and dataset, changing the "used" property and counting against quotas and reservations. +Controls the number of copies of data stored for this dataset. These copies are in addition to any redundancy provided by the pool, for example, mirroring or raid-z. The copies are stored on different disks, if possible. The space used by multiple copies is charged to the associated file and dataset, changing the "used" property and counting against quotas and reservations. .sp Changing this property only affects newly-written data. Therefore, set this property at file system creation time by using the "\fB-o\fR copies=" option. .RE @@ -600,8 +607,7 @@ Controls whether processes can be execut .RS 4n Controls the mount point used for this file system. See the "Mount Points" section for more information on how this property is used. .sp -When the mountpoint property is changed for a file system, the file system and any children that inherit the mount point are unmounted. If the new value is "legacy", then they remain unmounted. Otherwise, they are automatically remounted in the new location if the property was -previously "legacy" or "none", or if they were mounted before the property was changed. In addition, any shared file systems are unshared and shared in the new location. +When the mountpoint property is changed for a file system, the file system and any children that inherit the mount point are unmounted. If the new value is "legacy", then they remain unmounted. Otherwise, they are automatically remounted in the new location if the property was previously "legacy" or "none", or if they were mounted before the property was changed. In addition, any shared file systems are unshared and shared in the new location. .RE .sp @@ -612,7 +618,18 @@ previously "legacy" or "none", or if the .ad .sp .6 .RS 4n -Controls whether the file system should be mounted with "\fBnbmand\fR" (Non Blocking mandatory locks). This is used for \fBCIFS\fR clients. Changes to this property only take effect when the file system is umounted and remounted. See \fBmount\fR(1M) for more information on "\fBnbmand\fR" mounts. +Controls whether the file system should be mounted with "\fBnbmand\fR" (Non Blocking mandatory locks). This is used for \fBCIFS\fR clients. Changes to this property only take effect when the file system is umounted and remounted. See \fBmount\fR(1M) for more information on "\fBnbmand\fR" mounts. +.RE + +.sp +.ne 2 +.mk +.na +\fBprimarycache=\fIall\fR | \fInone\fR | \fImetadata\fR\fR +.ad +.sp .6 +.RS 4n +Controls what is cached in the primary cache (ARC). If this property is set to "all", then both user data and metadata is cached. If this property is set to "none", then neither user data nor metadata is cached. If this property is set to "metadata", then only metadata is cached. The default value is "all". .RE .sp @@ -623,8 +640,7 @@ Controls whether the file system should .ad .sp .6 .RS 4n -Limits the amount of space a dataset and its descendents can consume. This property enforces a hard limit on the amount of space used. This includes all space consumed by descendents, including file systems and snapshots. Setting a quota on a descendent of a dataset that already -has a quota does not override the ancestor's quota, but rather imposes an additional limit. +Limits the amount of space a dataset and its descendents can consume. This property enforces a hard limit on the amount of space used. This includes all space consumed by descendents, including file systems and snapshots. Setting a quota on a descendent of a dataset that already has a quota does not override the ancestor's quota, but rather imposes an additional limit. .sp Quotas cannot be set on volumes, as the "volsize" property acts as an implicit quota. .RE @@ -650,11 +666,9 @@ This property can also be referred to by .ad .sp .6 .RS 4n -Specifies a suggested block size for files in the file system. This property is designed solely for use with database workloads that access files in fixed-size records. \fBZFS\fR automatically tunes block sizes according to internal algorithms optimized for typical -access patterns. +Specifies a suggested block size for files in the file system. This property is designed solely for use with database workloads that access files in fixed-size records. \fBZFS\fR automatically tunes block sizes according to internal algorithms optimized for typical access patterns. .sp -For databases that create very large files but access them in small random chunks, these algorithms may be suboptimal. Specifying a "recordsize" greater than or equal to the record size of the database can result in significant performance gains. Use of this property for general -purpose file systems is strongly discouraged, and may adversely affect performance. +For databases that create very large files but access them in small random chunks, these algorithms may be suboptimal. Specifying a "recordsize" greater than or equal to the record size of the database can result in significant performance gains. Use of this property for general purpose file systems is strongly discouraged, and may adversely affect performance. .sp The size specified must be a power of two greater than or equal to 512 and less than or equal to 128 Kbytes. .sp @@ -682,8 +696,7 @@ Limits the amount of space a dataset can .ad .sp .6 .RS 4n -The minimum amount of space guaranteed to a dataset, not including its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by \fBrefreservation\fR. The \fBrefreservation\fR reservation -is accounted for in the parent datasets' space used, and counts against the parent datasets' quotas and reservations. +The minimum amount of space guaranteed to a dataset, not including its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by \fBrefreservation\fR. The \fBrefreservation\fR reservation is accounted for in the parent datasets' space used, and counts against the parent datasets' quotas and reservations. .sp If \fBrefreservation\fR is set, a snapshot is only allowed if there is enough free pool space outside of this reservation to accommodate the current number of "referenced" bytes in the dataset. .sp @@ -698,8 +711,7 @@ This property can also be referred to by .ad .sp .6 .RS 4n -The minimum amount of space guaranteed to a dataset and its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by its reservation. Reservations are accounted for in the parent datasets' space -used, and count against the parent datasets' quotas and reservations. +The minimum amount of space guaranteed to a dataset and its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by its reservation. Reservations are accounted for in the parent datasets' space used, and count against the parent datasets' quotas and reservations. .sp This property can also be referred to by its shortened column name, "reserv". .RE @@ -708,6 +720,17 @@ This property can also be referred to by .ne 2 .mk .na +\fBsecondarycache=\fIall\fR | \fInone\fR | \fImetadata\fR\fR +.ad +.sp .6 +.RS 4n +Controls what is cached in the secondary cache (L2ARC). If this property is set to "all", then both user data and metadata is cached. If this property is set to "none", then neither user data nor metadata is cached. If this property is set to "metadata", then only metadata is cached. The default value is "all". +.RE + +.sp +.ne 2 +.mk +.na \fBsetuid=\fIon\fR | \fIoff\fR\fR .ad .sp .6 @@ -723,8 +746,7 @@ Controls whether the set-\fBUID\fR bit i .ad .sp .6 .RS 4n -Like the "sharenfs" property, "shareiscsi" indicates whether a \fBZFS\fR volume is exported as an \fBiSCSI\fR target. The acceptable values for this property are "on", "off", and "type=disk". -The default value is "off". In the future, other target types might be supported. For example, "tape". +Like the "sharenfs" property, "shareiscsi" indicates whether a \fBZFS\fR volume is exported as an \fBiSCSI\fR target. The acceptable values for this property are "on", "off", and "type=disk". The default value is "off". In the future, other target types might be supported. For example, "tape". .sp You might want to set "shareiscsi=on" for a file system so that all \fBZFS\fR volumes within the file system are shared by default. Setting this property on a file system has no direct effect, however. .RE @@ -737,15 +759,13 @@ You might want to set "shareiscsi=on" fo .ad .sp .6 .RS 4n -Controls whether the file system is shared by using the Solaris \fBCIFS\fR service, and what options are to be used. A file system with the "\fBsharesmb\fR" property set to "off" is managed through traditional tools such as \fBsharemgr\fR(1M). Otherwise, the file system is automatically shared and unshared with the "zfs share" and "zfs unshare" commands. If the property is set to "on", -the \fBsharemgr\fR(1M) command is invoked with no options. Otherwise, the \fBsharemgr\fR(1M) command is invoked with options equivalent to the contents of this property. +Controls whether the file system is shared by using the Solaris \fBCIFS\fR service, and what options are to be used. A file system with the "\fBsharesmb\fR" property set to "off" is managed through traditional tools such as \fBsharemgr\fR(1M). Otherwise, the file system is automatically shared and unshared with the \fBzfs share\fR and \fBzfs unshare\fR commands. If the property is set to \fBon\fR, the \fBsharemgr\fR(1M) command is invoked with no options. Otherwise, the \fBsharemgr\fR(1M) command is invoked with options equivalent to the contents of this property. +.sp +Because \fBSMB\fR shares requires a resource name, a unique resource name is constructed from the dataset name. The constructed name is a copy of the dataset name except that the characters in the dataset name, which would be illegal in the resource name, are replaced with underscore (\fB_\fR) characters. A pseudo property "name" is also supported that allows you to replace the data set name with a specified name. The specified name is then used to replace the prefix dataset in the case of inheritance. For example, if the dataset \fBdata/home/john\fR is set to \fBname=john\fR, then \fBdata/home/john\fR has a resource name of \fBjohn\fR. If a child dataset of \fBdata/home/john/backups\fR, it has a resource name of \fBjohn_backups\fR. .sp -Because \fBSMB\fR shares requires a resource name, a unique resource name is constructed from the dataset name. The constructed name is a copy of the dataset name except that the characters in the dataset name, which would be illegal in the resource name, are replaced with underscore -(_) characters. A pseudo property "name" is also supported that allows you to replace the data set name with a specified name. The specified name is then used to replace the prefix dataset in the case of inheritance. For example, if the dataset "\fBdata/home/john\fR" -is set to "name=john", then "\fBdata/home/john\fR" has a resource name of "john". If a child dataset of "\fBdata/home/john/backups\fR", it has a resource name of "john_backups". +When SMB shares are created, the SMB share name appears as an entry in the \fB\&.zfs/shares\fR directory. You can use the \fBls\fR or \fBchmod\fR command to display the share-level ACLs on the entries in this directory. .sp -When the "sharesmb" property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously set to "off", or if they were shared before the property was changed. If the new property -is set to "off", the file systems are unshared. +When the \fBsharesmb\fR property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously set to \fBoff\fR, or if they were shared before the property was changed. If the new property is set to \fBoff\fR, the file systems are unshared. .RE .sp @@ -756,11 +776,9 @@ is set to "off", the file systems are un .ad .sp .6 .RS 4n -Controls whether the file system is shared via \fBNFS\fR, and what options are used. A file system with a"\fBsharenfs\fR" property of "off" is managed through traditional tools such as \fBshare\fR(1M), \fBunshare\fR(1M), and \fBdfstab\fR(4). Otherwise, the file system is automatically shared and unshared with the "\fBzfs share\fR" and "\fBzfs unshare\fR" commands. If the property is set to "on", -the \fBshare\fR(1M) command is invoked with no options. Otherwise, the \fBshare\fR(1M) command is invoked with options equivalent to the contents of this property. +Controls whether the file system is shared via \fBNFS\fR, and what options are used. A file system with a"\fBsharenfs\fR" property of "off" is managed through traditional tools such as \fBshare\fR(1M), \fBunshare\fR(1M), and \fBdfstab\fR(4). Otherwise, the file system is automatically shared and unshared with the "\fBzfs share\fR" and "\fBzfs unshare\fR" commands. If the property is set to "on", the \fBshare\fR(1M) command is invoked with no options. Otherwise, the \fBshare\fR(1M) command is invoked with options equivalent to the contents of this property. .sp -When the "sharenfs" property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously "off", or if they were shared before the property was changed. If the new property is "off", -the file systems are unshared. +When the "sharenfs" property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously "off", or if they were shared before the property was changed. If the new property is "off", the file systems are unshared. .RE .sp @@ -793,14 +811,11 @@ The on-disk version of this file system, .ad .sp .6 .RS 4n -For volumes, specifies the logical size of the volume. By default, creating a volume establishes a reservation of equal size. For storage pools with a version number of 9 or higher, a \fBrefreservation\fR is set instead. Any changes to \fBvolsize\fR are -reflected in an equivalent change to the reservation (or \fBrefreservation\fR). The \fBvolsize\fR can only be set to a multiple of \fBvolblocksize\fR, and cannot be zero. +For volumes, specifies the logical size of the volume. By default, creating a volume establishes a reservation of equal size. For storage pools with a version number of 9 or higher, a \fBrefreservation\fR is set instead. Any changes to \fBvolsize\fR are reflected in an equivalent change to the reservation (or \fBrefreservation\fR). The \fBvolsize\fR can only be set to a multiple of \fBvolblocksize\fR, and cannot be zero. .sp -The reservation is kept equal to the volume's logical size to prevent unexpected behavior for consumers. Without the reservation, the volume could run out of space, resulting in undefined behavior or data corruption, depending on how the volume is used. These effects can also occur when -the volume size is changed while it is in use (particularly when shrinking the size). Extreme care should be used when adjusting the volume size. +The reservation is kept equal to the volume's logical size to prevent unexpected behavior for consumers. Without the reservation, the volume could run out of space, resulting in undefined behavior or data corruption, depending on how the volume is used. These effects can also occur when the volume size is changed while it is in use (particularly when shrinking the size). Extreme care should be used when adjusting the volume size. .sp -Though not recommended, a "sparse volume" (also known as "thin provisioning") can be created by specifying the \fB-s\fR option to the "\fBzfs create -V\fR" command, or by changing the reservation after the volume has been created. -A "sparse volume" is a volume where the reservation is less then the volume size. Consequently, writes to a sparse volume can fail with \fBENOSPC\fR when the pool is low on space. For a sparse volume, changes to \fBvolsize\fR are not reflected in the reservation. +Though not recommended, a "sparse volume" (also known as "thin provisioning") can be created by specifying the \fB-s\fR option to the "\fBzfs create -V\fR" command, or by changing the reservation after the volume has been created. A "sparse volume" is a volume where the reservation is less then the volume size. Consequently, writes to a sparse volume can fail with \fBENOSPC\fR when the pool is low on space. For a sparse volume, changes to \fBvolsize\fR are not reflected in the reservation. .RE .sp @@ -838,8 +853,7 @@ Controls whether the dataset is managed .sp .LP -The following three properties cannot be changed after the file system is created, and therefore, should be set when the file system is created. If the properties are not set with the "\fBzfs create\fR" command, these properties are inherited from the parent dataset. -If the parent dataset lacks these properties due to having been created prior to these features being supported, the new file system will have the default values for these properties. +The following three properties cannot be changed after the file system is created, and therefore, should be set when the file system is created. If the properties are not set with the "\fBzfs create\fR" or "\fBzpool create\fR" commands, these properties are inherited from the parent dataset. If the parent dataset lacks these properties due to having been created prior to these features being supported, the new file system will have the default values for these properties. .sp .ne 2 .mk @@ -848,11 +862,9 @@ If the parent dataset lacks these proper .ad .sp .6 .RS 4n -Indicates whether the file name matching algorithm used by the file system should be case-sensitive, case-insensitive, or allow a combination of both styles of matching. The default value for the "\fBcasesensitivity\fR" property is "\fBsensitive\fR." -Traditionally, UNIX and POSIX file systems have case-sensitive file names. +Indicates whether the file name matching algorithm used by the file system should be case-sensitive, case-insensitive, or allow a combination of both styles of matching. The default value for the "\fBcasesensitivity\fR" property is "\fBsensitive\fR." Traditionally, UNIX and POSIX file systems have case-sensitive file names. .sp -The "\fBmixed\fR" value for the "\fBcasesensitivity\fR" property indicates that the file system can support requests for both case-sensitive and case-insensitive matching behavior. Currently, case-insensitive matching behavior on a file system -that supports mixed behavior is limited to the Solaris CIFS server product. For more information about the "mixed" value behavior, see the \fIZFS Administration Guide\fR. +The "\fBmixed\fR" value for the "\fBcasesensitivity\fR" property indicates that the file system can support requests for both case-sensitive and case-insensitive matching behavior. Currently, case-insensitive matching behavior on a file system that supports mixed behavior is limited to the Solaris CIFS server product. For more information about the "mixed" value behavior, see the \fIZFS Administration Guide\fR. .RE .sp @@ -863,20 +875,7 @@ that supports mixed behavior is limited .ad .sp .6 .RS 4n -Indicates whether the file system should perform a \fBunicode\fR normalization of file names whenever two file names are compared, and which normalization algorithm should be used. File names are always stored unmodified, names are normalized as part of any comparison -process. If this property is set to a legal value other than "\fBnone\fR," and the "\fButf8only\fR" property was left unspecified, the "\fButf8only\fR" property is automatically set to "\fBon\fR." -The default value of the "\fBnormalization\fR" property is "\fBnone\fR." This property cannot be changed after the file system is created. -.RE - -.sp -.ne 2 -.mk -.na -\fBjailed =\fIon\fR | \fIoff\fR\fR -.ad -.sp .6 -.RS 4n -Controls whether the dataset is managed from within a jail. The default value is "off". +Indicates whether the file system should perform a \fBunicode\fR normalization of file names whenever two file names are compared, and which normalization algorithm should be used. File names are always stored unmodified, names are normalized as part of any comparison process. If this property is set to a legal value other than "\fBnone\fR," and the "\fButf8only\fR" property was left unspecified, the "\fButf8only\fR" property is automatically set to "\fBon\fR." The default value of the "\fBnormalization\fR" property is "\fBnone\fR." This property cannot be changed after the file system is created. .RE .sp @@ -887,63 +886,52 @@ Controls whether the dataset is managed .ad .sp .6 .RS 4n -Indicates whether the file system should reject file names that include characters that are not present in the \fBUTF-8\fR character code set. If this property is explicitly set to "\fBoff\fR," the normalization property must either not be -explicitly set or be set to "\fBnone\fR." The default value for the "\fButf8only\fR" property is "off." This property cannot be changed after the file system is created. +Indicates whether the file system should reject file names that include characters that are not present in the \fBUTF-8\fR character code set. If this property is explicitly set to "\fBoff\fR," the normalization property must either not be explicitly set or be set to "\fBnone\fR." The default value for the "\fButf8only\fR" property is "off." This property cannot be changed after the file system is created. .RE .sp .LP -The "\fBcasesensitivity\fR," "\fBnormalization\fR," and "\fButf8only\fR" properties are also new permissions that can be assigned to non-privileged users by using the \fBZFS\fR delegated administration -feature. +The "\fBcasesensitivity\fR," "\fBnormalization\fR," and "\fButf8only\fR" properties are also new permissions that can be assigned to non-privileged users by using the \fBZFS\fR delegated administration feature. .SS "Temporary Mount Point Properties" .sp .LP -When a file system is mounted, either through \fBmount\fR(1M) for legacy mounts or the "\fBzfs mount\fR" command for normal file systems, -its mount options are set according to its properties. The correlation between properties and mount options is as follows: +When a file system is mounted, either through \fBmount\fR(1M) for legacy mounts or the "\fBzfs mount\fR" command for normal file systems, its mount options are set according to its properties. The correlation between properties and mount options is as follows: .sp .in +2 .nf PROPERTY MOUNT OPTION - devices devices/nodevices - exec exec/noexec - readonly ro/rw - setuid setuid/nosetuid - xattr xattr/noxattr + devices devices/nodevices + exec exec/noexec + readonly ro/rw + setuid setuid/nosetuid + xattr xattr/noxattr .fi .in -2 .sp .sp .LP -In addition, these options can be set on a per-mount basis using the \fB-o\fR option, without affecting the property that is stored on disk. The values specified on the command line override the values stored in the dataset. The \fB-nosuid\fR option is an alias for "nodevices,nosetuid". -These properties are reported as "temporary" by the "\fBzfs get\fR" command. If the properties are changed while the dataset is mounted, the new setting overrides any temporary settings. +In addition, these options can be set on a per-mount basis using the \fB-o\fR option, without affecting the property that is stored on disk. The values specified on the command line override the values stored in the dataset. The \fB-nosuid\fR option is an alias for "nodevices,nosetuid". These properties are reported as "temporary" by the "\fBzfs get\fR" command. If the properties are changed while the dataset is mounted, the new setting overrides any temporary settings. .SS "User Properties" .sp .LP -In addition to the standard native properties, \fBZFS\fR supports arbitrary user properties. User properties have no effect on \fBZFS\fR behavior, but applications or administrators can use them to annotate datasets. -.sp -.LP -User property names must contain a colon (":") character, to distinguish them from native properties. They might contain lowercase letters, numbers, and the following punctuation characters: colon (":"), dash ("-"), period ("."), and underscore -("_"). The expected convention is that the property name is divided into two portions such as "\fImodule\fR:\fIproperty\fR", but this namespace is not enforced by \fBZFS\fR. User property names can be at most 256 characters, -and cannot begin with a dash ("-"). +In addition to the standard native properties, \fBZFS\fR supports arbitrary user properties. User properties have no effect on \fBZFS\fR behavior, but applications or administrators can use them to annotate datasets (file systems, volumes, and snapshots). .sp .LP -When making programmatic use of user properties, it is strongly suggested to use a reversed \fBDNS\fR domain name for the \fImodule\fR component of property names to reduce the chance that two independently-developed packages use the same property name for -different purposes. Property names beginning with "com.sun." are reserved for use by Sun Microsystems. +User property names must contain a colon (":") character to distinguish them from native properties. They may contain lowercase letters, numbers, and the following punctuation characters: colon (":"), dash ("-"), period ("."), and underscore ("_"). The expected convention is that the property name is divided into two portions such as "\fImodule\fR:\fIproperty\fR", but this namespace is not enforced by \fBZFS\fR. User property names can be at most 256 characters, and cannot begin with a dash ("-"). .sp .LP -The values of user properties are arbitrary strings, are always inherited, and are never validated. All of the commands that operate on properties ("zfs list", "zfs get", "zfs set", etc.) can be used to manipulate both native properties and user properties. -Use the "\fBzfs inherit\fR" command to clear a user property . If the property is not defined in any parent dataset, it is removed entirely. Property values are limited to 1024 characters. -.SS "Volumes as Swap or Dump Devices" +When making programmatic use of user properties, it is strongly suggested to use a reversed \fBDNS\fR domain name for the \fImodule\fR component of property names to reduce the chance that two independently-developed packages use the same property name for different purposes. Property names beginning with "com.sun." are reserved for use by Sun Microsystems. .sp .LP -To set up a swap area, create a \fBZFS\fR volume of a specific size and then enable swap on that device. For more information, see the EXAMPLES section. +The values of user properties are arbitrary strings, are always inherited, and are never validated. All of the commands that operate on properties ("zfs list", "zfs get", "zfs set", etc.) can be used to manipulate both native properties and user properties. Use the "\fBzfs inherit\fR" command to clear a user property . If the property is not defined in any parent dataset, it is removed entirely. Property values are limited to 1024 characters. +.SS "ZFS Volumes as Swap or Dump Devices" .sp .LP -Do not swap to a file on a \fBZFS\fR file system. A \fBZFS\fR swap file configuration is not supported. +During an initial installation or a live upgrade from a \fBUFS\fR file system, a swap device and dump device are created on \fBZFS\fR volumes in the \fBZFS\fR root pool. By default, the swap area size is based on 1/2 the size of physical memory up to 2 Gbytes. The size of the dump device depends on the kernel's requirements at installation time. Separate \fBZFS\fR volumes must be used for the swap area and dump devices. Do not swap to a file on a \fBZFS\fR file system. A \fBZFS\fR swap file configuration is not supported. .sp .LP -Using a \fBZFS\fR volume as a dump device is not supported. +If you need to change your swap area or dump device after the system is installed or upgraded, use the \fBswap\fR(1M) and \fBdumpadm\fR(1M) commands. If you need to change the size of your swap area or dump device, see the \fISolaris ZFS Administration Guide\fR. .SH SUBCOMMANDS .sp .LP @@ -974,10 +962,9 @@ Creates a new \fBZFS\fR file system. The .na \fB\fB-p\fR\fR .ad -.RS 21n -.rt -Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the "mountpoint" property inherited from their parent. Any property specified on the command line using the \fB-o\fR option is ignored. If -the target filesystem already exists, the operation completes successfully. +.sp .6 +.RS 4n +Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the "mountpoint" property inherited from their parent. Any property specified on the command line using the \fB-o\fR option is ignored. If the target filesystem already exists, the operation completes successfully. .RE .sp @@ -986,10 +973,9 @@ the target filesystem already exists, th .na \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR .ad -.RS 21n -.rt -Sets the specified property as if "\fBzfs set property=value\fR" was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An -error results if the same property is specified in multiple \fB-o\fR options. +.sp .6 +.RS 4n +Sets the specified property as if "\fBzfs set property=value\fR" was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An error results if the same property is specified in multiple \fB-o\fR options. .RE .RE @@ -1002,8 +988,7 @@ error results if the same property is sp .ad .sp .6 .RS 4n -Creates a volume of the given size. The volume is exported as a block device in \fB/dev/zvol/{dsk,rdsk}/\fIpath\fR\fR, where \fIpath\fR is the name of the volume in the \fBZFS\fR namespace. The size represents -the logical size as exported by the device. By default, a reservation of equal size is created. +Creates a volume of the given size. The volume is exported as a block device in \fB/dev/zvol/{dsk,rdsk}/\fIpath\fR\fR, where \fIpath\fR is the name of the volume in the \fBZFS\fR namespace. The size represents the logical size as exported by the device. By default, a reservation of equal size is created. .sp \fIsize\fR is automatically rounded up to the nearest 128 Kbytes to ensure that the volume has an integral number of blocks regardless of \fIblocksize\fR. .sp @@ -1012,10 +997,9 @@ the logical size as exported by the devi .na \fB\fB-p\fR\fR .ad -.RS 21n -.rt -Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the "mountpoint" property inherited from their parent. Any property specified on the command line using the \fB-o\fR option is ignored. If -the target filesystem already exists, the operation completes successfully. +.sp .6 +.RS 4n +Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the "mountpoint" property inherited from their parent. Any property specified on the command line using the \fB-o\fR option is ignored. If the target filesystem already exists, the operation completes successfully. .RE .sp @@ -1024,8 +1008,8 @@ the target filesystem already exists, th .na \fB\fB-s\fR\fR .ad -.RS 21n -.rt +.sp .6 +.RS 4n Creates a sparse volume with no reservation. See "volsize" in the Native Properties section for more information about sparse volumes. .RE @@ -1035,10 +1019,9 @@ Creates a sparse volume with no reservat .na \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR .ad -.RS 21n -.rt -Sets the specified property as if "\fBzfs set property=value\fR" was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An -error results if the same property is specified in multiple \fB-o\fR options. +.sp .6 +.RS 4n +Sets the specified property as if "\fBzfs set property=value\fR" was invoked at the same time the dataset was created. Any editable \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options can be specified. An error results if the same property is specified in multiple \fB-o\fR options. .RE .sp @@ -1047,10 +1030,9 @@ error results if the same property is sp .na \fB\fB-b\fR \fIblocksize\fR\fR .ad -.RS 21n -.rt -Equivalent to "\fB\fR\fB-o\fR \fBvolblocksize=\fIblocksize\fR\fR". If this option is specified in conjunction with "\fB\fR\fB-o\fR \fBvolblocksize\fR", the resulting -behavior is undefined. +.sp .6 +.RS 4n +Equivalent to "\fB\fR\fB-o\fR \fBvolblocksize=\fIblocksize\fR\fR". If this option is specified in conjunction with "\fB\fR\fB-o\fR \fBvolblocksize\fR", the resulting behavior is undefined. .RE .RE @@ -1070,8 +1052,8 @@ Destroys the given dataset. By default, .na \fB\fB-r\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Recursively destroy all children. If a snapshot is specified, destroy all snapshots with this name in descendent file systems. .RE @@ -1081,8 +1063,8 @@ Recursively destroy all children. If a s .na \fB\fB-R\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Recursively destroy all dependents, including cloned file systems outside the target hierarchy. If a snapshot is specified, destroy all snapshots with this name in descendent file systems. .RE @@ -1092,8 +1074,8 @@ Recursively destroy all dependents, incl .na \fB\fB-f\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Force an unmount of any file systems using the "\fBunmount -f\fR" command. This option has no effect on non-file systems or unmounted file systems. .RE @@ -1104,7 +1086,7 @@ Extreme care should be taken when applyi .ne 2 .mk .na -\fB\fBzfs snapshot\fR [\fB-r\fR] \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR +\fB\fBzfs snapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR .ad .sp .6 .RS 4n @@ -1115,11 +1097,22 @@ Creates a snapshot with the given name. .na \fB\fB-r\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Recursively create snapshots of all descendent datasets. Snapshots are taken atomically, so that all recursive snapshots correspond to the same moment in time. .RE +.sp +.ne 2 +.mk +.na +\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR +.ad +.sp .6 +.RS 4n +Sets the specified property; see "\fBzfs create\fR" for details. +.RE + .RE .sp @@ -1130,16 +1123,15 @@ Recursively create snapshots of all desc .ad .sp .6 .RS 4n -Roll back the given dataset to a previous snapshot. When a dataset is rolled back, all data that has changed since the snapshot is discarded, and the dataset reverts to the state at the time of the snapshot. By default, the command refuses to roll back to a snapshot other than -the most recent one. In order to do so, all intermediate snapshots must be destroyed by specifying the \fB-r\fR option. +Roll back the given dataset to a previous snapshot. When a dataset is rolled back, all data that has changed since the snapshot is discarded, and the dataset reverts to the state at the time of the snapshot. By default, the command refuses to roll back to a snapshot other than the most recent one. In order to do so, all intermediate snapshots must be destroyed by specifying the \fB-r\fR option. .sp .ne 2 .mk .na \fB\fB-r\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Recursively destroy any snapshots more recent than the one specified. .RE @@ -1149,8 +1141,8 @@ Recursively destroy any snapshots more r .na \fB\fB-R\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Recursively destroy any more recent snapshots, as well as any clones of those snapshots. .RE @@ -1160,8 +1152,8 @@ Recursively destroy any more recent snap .na \fB\fB-f\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Used with the \fB-R\fR option to force an unmount of any clone file systems that are to be destroyed. .RE @@ -1171,7 +1163,7 @@ Used with the \fB-R\fR option to force a .ne 2 .mk .na -\fB\fBzfs clone\fR [\fB-p\fR] \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR +\fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ... \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR .ad .sp .6 .RS 4n @@ -1182,11 +1174,22 @@ Creates a clone of the given snapshot. S .na \fB\fB-p\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the "mountpoint" property inherited from their parent. If the target filesystem or volume already exists, the operation completes successfully. .RE +.sp +.ne 2 +.mk +.na +\fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR +.ad +.sp .6 +.RS 4n +Sets the specified property; see "\fBzfs create\fR" for details. +.RE + .RE .sp @@ -1197,11 +1200,9 @@ Creates all the non-existing parent data .ad .sp .6 .RS 4n -Promotes a clone file system to no longer be dependent on its "origin" snapshot. This makes it possible to destroy the file system that the clone was created from. The clone parent-child dependency relationship is reversed, so that the "origin" file system -becomes a clone of the specified file system. +Promotes a clone file system to no longer be dependent on its "origin" snapshot. This makes it possible to destroy the file system that the clone was created from. The clone parent-child dependency relationship is reversed, so that the "origin" file system becomes a clone of the specified file system. .sp -The snapshot that was cloned, and any snapshots previous to this snapshot, are now owned by the promoted clone. The space they use moves from the "origin" file system to the promoted clone, so enough space must be available to accommodate these snapshots. No new space is consumed -by this operation, but the space accounting is adjusted. The promoted clone must not have any conflicting snapshot names of its own. The "\fBrename\fR" subcommand can be used to rename any conflicting snapshots. +The snapshot that was cloned, and any snapshots previous to this snapshot, are now owned by the promoted clone. The space they use moves from the "origin" file system to the promoted clone, so enough space must be available to accommodate these snapshots. No new space is consumed by this operation, but the space accounting is adjusted. The promoted clone must not have any conflicting snapshot names of its own. The "\fBrename\fR" subcommand can be used to rename any conflicting snapshots. .RE .sp @@ -1216,21 +1217,19 @@ by this operation, but the space account .ad .br .na -\fB\fBzfs -rename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR +\fB\fBzfs rename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR .ad .sp .6 .RS 4n -Renames the given dataset. The new target can be located anywhere in the \fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be renamed within the parent file system or volume. When renaming a snapshot, the parent file system of the snapshot does -not need to be specified as part of the second argument. Renamed file systems can inherit new mount points, in which case they are unmounted and remounted at the new mount point. +Renames the given dataset. The new target can be located anywhere in the \fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be renamed within the parent file system or volume. When renaming a snapshot, the parent file system of the snapshot does not need to be specified as part of the second argument. Renamed file systems can inherit new mount points, in which case they are unmounted and remounted at the new mount point. .sp .ne 2 .mk .na \fB\fB-p\fR\fR .ad -.RS 6n -.rt +.sp .6 +.RS 4n Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the "mountpoint" property inherited from their parent. .RE @@ -1259,7 +1258,7 @@ Recursively rename the snapshots of all .ad .sp .6 .RS 4n -Lists the property information for the given datasets in tabular form. If specified, you can list property information by the absolute pathname or the relative pathname. By default, all datasets are displayed and contain the following fields: +Lists the property information for the given datasets in tabular form. If specified, you can list property information by the absolute pathname or the relative pathname. By default, all file systems and volumes are displayed. Snapshots are displayed if the "listsnaps" property is "on" (the default is "off") . The following fields are displayed: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:03:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 171D1106566C; Tue, 6 Apr 2010 23:03:21 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 040838FC14; Tue, 6 Apr 2010 23:03:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36N3K3c005976; Tue, 6 Apr 2010 23:03:20 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36N3KEd005974; Tue, 6 Apr 2010 23:03:20 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004062303.o36N3KEd005974@svn.freebsd.org> From: Rick Macklem Date: Tue, 6 Apr 2010 23:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206288 - stable/8/sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:03:21 -0000 Author: rmacklem Date: Tue Apr 6 23:03:20 2010 New Revision: 206288 URL: http://svn.freebsd.org/changeset/base/206288 Log: MFC: r205562 When the regular NFS server replied to a UDP client out of the replay cache, it did not free the request argument mbuf list, resulting in a leak. This patch fixes that leak. PR: kern/144330 Modified: stable/8/sys/rpc/svc.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/rpc/svc.c ============================================================================== --- stable/8/sys/rpc/svc.c Tue Apr 6 21:39:18 2010 (r206287) +++ stable/8/sys/rpc/svc.c Tue Apr 6 23:03:20 2010 (r206288) @@ -819,9 +819,11 @@ svc_getreq(SVCXPRT *xprt, struct svc_req free(r->rq_addr, M_SONAME); r->rq_addr = NULL; } + m_freem(args); goto call_done; default: + m_freem(args); goto call_done; } } From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:14:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A582106566B; Tue, 6 Apr 2010 23:14:43 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44B518FC13; Tue, 6 Apr 2010 23:14:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NEh9d009230; Tue, 6 Apr 2010 23:14:43 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NEh2o009225; Tue, 6 Apr 2010 23:14:43 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062314.o36NEh2o009225@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206289 - in stable/8/sys: conf contrib/dev/run dev/usb dev/usb/wlan modules modules/runfw modules/usb modules/usb/run X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:14:43 -0000 Author: thompsa Date: Tue Apr 6 23:14:43 2010 New Revision: 206289 URL: http://svn.freebsd.org/changeset/base/206289 Log: MFC r203134 Add run(4), a driver for Ralink RT2700U/RT2800U/RT3000U USB 802.11agn devices. This driver was written for OpenBSD by Damien Bergamini and ported over by Akinori Furukoshi. Added: stable/8/sys/contrib/dev/run/ - copied from r203134, head/sys/contrib/dev/run/ stable/8/sys/dev/usb/wlan/if_run.c - copied unchanged from r203134, head/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_runreg.h - copied unchanged from r203134, head/sys/dev/usb/wlan/if_runreg.h stable/8/sys/dev/usb/wlan/if_runvar.h - copied unchanged from r203134, head/sys/dev/usb/wlan/if_runvar.h stable/8/sys/modules/runfw/ - copied from r203134, head/sys/modules/runfw/ stable/8/sys/modules/usb/run/ - copied from r203134, head/sys/modules/usb/run/ Modified: stable/8/sys/conf/files stable/8/sys/dev/usb/usbdevs stable/8/sys/modules/Makefile stable/8/sys/modules/usb/Makefile 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/conf/files ============================================================================== --- stable/8/sys/conf/files Tue Apr 6 23:03:20 2010 (r206288) +++ stable/8/sys/conf/files Tue Apr 6 23:14:43 2010 (r206289) @@ -1717,6 +1717,7 @@ dev/usb/net/uhso.c optional uhso # USB WLAN drivers # dev/usb/wlan/if_rum.c optional rum +dev/usb/wlan/if_run.c optional run dev/usb/wlan/if_uath.c optional uath dev/usb/wlan/if_upgt.c optional upgt dev/usb/wlan/if_ural.c optional ural Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:03:20 2010 (r206288) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:14:43 2010 (r206289) @@ -524,6 +524,7 @@ vendor ELCON 0x0db7 ELCON Systemtechnik vendor NETAC 0x0dd8 Netac vendor SITECOMEU 0x0df6 Sitecom Europe vendor MOBILEACTION 0x0df7 Mobile Action +vendor AMIGO 0x0e0b Amigo Technology vendor SPEEDDRAGON 0x0e55 Speed Dragon Multimedia vendor HAWKING 0x0e66 Hawking vendor FOSSIL 0x0e67 Fossil, Inc @@ -589,12 +590,14 @@ vendor NETGEAR3 0x1385 Netgear vendor BALTECH 0x13ad Baltech vendor CISCOLINKSYS 0x13b1 Cisco-Linksys vendor SHARK 0x13d2 Shark +vendor AZUREWAVE 0x13d3 AsureWave vendor EMTEC 0x13fe Emtec vendor NOVATEL 0x1410 Novatel Wireless vendor MERLIN 0x1416 Merlin vendor WISTRONNEWEB 0x1435 Wistron NeWeb vendor RADIOSHACK 0x1453 Radio Shack vendor HUAWEI3COM 0x1472 Huawei-3Com +vendor ABOCOM2 0x1482 AboCom Systems vendor SILICOM 0x1485 Silicom vendor RALINK 0x148f Ralink Technology vendor IMAGINATION 0x149a Imagination Technologies @@ -610,6 +613,7 @@ vendor OQO 0x1557 OQO vendor UMEDIA 0x157e U-MEDIA Communications vendor FIBERLINE 0x1582 Fiberline vendor SPARKLAN 0x15a9 SparkLAN +vendor AMIT2 0x15c5 AMIT vendor SOHOWARE 0x15e8 SOHOware vendor UMAX 0x1606 UMAX Data Systems vendor INSIDEOUT 0x1608 Inside Out Networks @@ -617,6 +621,7 @@ vendor AMOI 0x1614 Amoi Electronics vendor GOODWAY 0x1631 Good Way Technology vendor ENTREGA 0x1645 Entrega vendor ACTIONTEC 0x1668 Actiontec Electronics +vendor CISCOLINKSYS2 0x167b Cisco-Linksys vendor ATHEROS 0x168c Atheros Communications vendor GIGASET 0x1690 Gigaset vendor GLOBALSUN 0x16ab Global Sun Technology @@ -626,6 +631,8 @@ vendor CMOTECH 0x16d8 C-motech vendor AXESSTEL 0x1726 Axesstel Co., Ltd. vendor LINKSYS4 0x1737 Linksys vendor SENAO 0x1740 Senao +vendor ASUS2 0x1761 ASUS +vendor SWEEX2 0x177f Sweex vendor METAGEEK 0x1781 MetaGeek vendor AMIT 0x18c5 AMIT vendor QCOM 0x18e8 Qcom @@ -637,11 +644,15 @@ vendor TCTMOBILE 0x1bbb TCT Mobile vendor TELIT 0x1bc7 Telit vendor MPMAN 0x1cae MpMan vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik +vendor PEGATRON 0x1d4d Pegatron vendor QISDA 0x1da5 Qisda vendor ALINK 0x1e0e Alink +vendor AIRTIES 0x1eda AirTies vendor DLINK 0x2001 D-Link vendor PLANEX2 0x2019 Planex Communications vendor TLAYTECH 0x20b9 Tlay Tech +vendor ENCORE 0x203d Encore +vendor PARA 0x20b8 PARA Industrial vendor ERICSSON 0x2282 Ericsson vendor MOTOROLA2 0x22b8 Motorola vendor TRIPPLITE 0x2478 Tripp-Lite @@ -667,6 +678,7 @@ vendor ZINWELL 0x5a57 Zinwell vendor SITECOM 0x6189 Sitecom vendor ARKMICRO 0x6547 Arkmicro Technologies Inc. vendor 3COM2 0x6891 3Com +vendor EDIMAX 0x7392 Edimax vendor INTEL 0x8086 Intel vendor INTEL2 0x8087 Intel vendor SITECOM2 0x9016 Sitecom @@ -701,6 +713,12 @@ product 3COMUSR USR56K 0x3021 U.S. Robo /* AboCom products */ product ABOCOM XX1 0x110c XX1 product ABOCOM XX2 0x200c XX2 +product ABOCOM RT2770 0x2770 RT2770 +product ABOCOM RT2870 0x2870 RT2870 +product ABOCOM RT3070 0x3070 RT3070 +product ABOCOM RT3071 0x3071 RT3071 +product ABOCOM RT3072 0x3072 RT3072 +product ABOCOM2 RT2870_1 0x3c09 RT2870 product ABOCOM URE450 0x4000 URE450 Ethernet Adapter product ABOCOM UFE1000 0x4002 UFE1000 Fast Ethernet Adapter product ABOCOM DSB650TX_PNA 0x4003 1/10/100 Ethernet Adapter @@ -731,6 +749,17 @@ product ACCTON SMCWUSBTG2_NF 0x4507 SMCW product ACCTON SMCWUSBTG2 0x4508 SMCWUSBT-G2 product ACCTON PRISM_GT 0x4521 PrismGT USB 2.0 WLAN product ACCTON SS1001 0x5046 SpeedStream Ethernet Adapter +product ACCTON RT2870_2 0x6618 RT2870 +product ACCTON RT3070 0x7511 RT3070 +product ACCTON RT2770 0x7512 RT2770 +product ACCTON RT2870_3 0x7522 RT2870 +product ACCTON RT2870_5 0x8522 RT2870 +product ACCTON RT3070_4 0xa512 RT3070 +product ACCTON RT2870_4 0xa618 RT2870 +product ACCTON RT3070_1 0xa701 RT3070 +product ACCTON RT3070_2 0xa702 RT3070 +product ACCTON RT2870_1 0xb522 RT2870 +product ACCTON RT3070_3 0xc522 RT3070 product ACCTON ZD1211B 0xe501 ZD1211B /* Aceeca products */ @@ -833,6 +862,9 @@ product AIRPLUS MCD650 0x3198 MCD650 mo /* AirPrime products */ product AIRPRIME PC5220 0x0112 CDMA Wireless PC Card +/* AirTies products */ +product AIRTIES RT3070 0x2310 RT3070 + /* AKS products */ product AKS USBHASP 0x0001 USB-HASP 0.06 @@ -872,8 +904,20 @@ product APC UPS 0x0002 Uninterruptible product AMBIT WLAN 0x0302 WLAN product AMBIT NTL_250 0x6098 NTL 250 cable modem +/* American Power Conversion products */ +product APC UPS 0x0002 Uninterruptible Power Supply + +/* Amigo Technology products */ +product AMIGO RT2870_1 0x9031 RT2870 +product AMIGO RT2870_2 0x9041 RT2870 + /* AMIT products */ product AMIT CGWLUSB2GO 0x0002 CG-WLUSB2GO +product AMIT CGWLUSB2GNR 0x0008 CG-WLUSB2GNR +product AMIT RT2870_1 0x0012 RT2870 + +/* AMIT(2) products */ +product AMIT2 RT2870 0x0008 RT2870 /* Anchor products */ product ANCHOR EZUSB 0x2131 EZUSB @@ -933,6 +977,7 @@ product ASIX AX88772 0x7720 AX88772 product ASIX AX88772A 0x772a AX88772A USB 2.0 10/100 Ethernet /* ASUS products */ +product ASUS2 USBN11 0x0b05 USB-N11 product ASUS WL167G 0x1707 WL-167g Wireless Adapter product ASUS WL159G 0x170c WL-159g product ASUS A9T_WIFI 0x171b A9T wireless @@ -940,6 +985,12 @@ product ASUS P5B_WIFI 0x171d P5B wirele product ASUS RT2573_1 0x1723 RT2573 product ASUS RT2573_2 0x1724 RT2573 product ASUS LCM 0x1726 LCM display +product ASUS RT2870_1 0x1731 RT2870 +product ASUS RT2870_2 0x1732 RT2870 +product ASUS RT2870_3 0x1742 RT2870 +product ASUS RT2870_4 0x1760 RT2870 +product ASUS RT2870_5 0x1761 RT2870 +product ASUS RT3070 0x1784 RT3070 product ASUS P535 0x420f ASUS P535 PDA product ASUS GMSC 0x422f ASUS Generic Mass Storage product ASUS RT2570 0x1706 RT2500USB Wireless Adapter @@ -976,6 +1027,13 @@ product AVISION 1200U 0x0268 1200U scan /* Axesstel products */ product AXESSTEL DATAMODEM 0x1000 Data Modem +/* AsureWave products */ +product AZUREWAVE RT2870_1 0x3247 RT2870 +product AZUREWAVE RT2870_2 0x3262 RT2870 +product AZUREWAVE RT3070_1 0x3273 RT3070 +product AZUREWAVE RT3070_2 0x3284 RT3070 +product AZUREWAVE RT3070_3 0x3305 RT3070 + /* Baltech products */ product BALTECH CARDREADER 0x9999 Card reader @@ -1006,8 +1064,13 @@ product BELKIN F5D7050A 0x705a F5D7050A /* Also sold as 'Ativa 802.11g wireless card' */ product BELKIN F5D7050_V4000 0x705c F5D7050 v4000 Wireless Adapter product BELKIN F5D7050E 0x705e F5D7050E Wireless Adapter +product BELKIN RT2870_1 0x8053 RT2870 +product BELKIN RT2870_2 0x805c RT2870 +product BELKIN F5D8053V3 0x815c F5D8053 v3 +product BELKIN F5D8055 0x825a F5D8055 product BELKIN F5D9050V3 0x905b F5D9050 ver 3 Wireless Adapter product BELKIN2 F5U002 0x0002 F5U002 Parallel printer +product BELKIN F6D4050V1 0x935a F6D4050 v1 /* Billionton products */ product BILLIONTON USB100 0x0986 USB100N 10/100 FastEthernet @@ -1084,6 +1147,7 @@ product CISCOLINKSYS HU200TS 0x001a HU20 product CISCOLINKSYS WUSB54GC 0x0020 WUSB54GC product CISCOLINKSYS WUSB54GR 0x0023 WUSB54GR product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G +product CISCOLINKSYS2 RT3070 0x4001 RT3070 /* CMOTECH products */ product CMOTECH CNU510 0x5141 CDMA Technologies USB modem @@ -1110,6 +1174,15 @@ product CONCEPTRONIC AR5523_2 0x7811 AR5 product CONCEPTRONIC AR5523_2_NF 0x7812 AR5523 (no firmware) product CONCEPTRONIC2 C54RU 0x3c02 C54RU WLAN product CONCEPTRONIC2 C54RU2 0x3c22 C54RU +product CONCEPTRONIC2 VIGORN61 0x3c25 VIGORN61 +product CONCEPTRONIC2 RT2870_1 0x3c06 RT2870 +product CONCEPTRONIC2 RT2870_2 0x3c07 RT2870 +product CONCEPTRONIC2 RT2870_7 0x3c09 RT2870 +product CONCEPTRONIC2 RT2870_8 0x3c12 RT2870 +product CONCEPTRONIC2 RT2870_3 0x3c23 RT2870 +product CONCEPTRONIC2 RT2870_4 0x3c25 RT2870 +product CONCEPTRONIC2 RT2870_5 0x3c27 RT2870 +product CONCEPTRONIC2 RT2870_6 0x3c28 RT2870 /* Connectix products */ product CONNECTIX QUICKCAM 0x0001 QuickCam @@ -1124,6 +1197,12 @@ product COREGA FETHER_USB2_TX 0x0017 FEt product COREGA WLUSB_11_KEY 0x001a ULUSB-11 Key product COREGA CGWLUSB2GL 0x002d CG-WLUSB2GL product COREGA CGWLUSB2GPX 0x002e CG-WLUSB2GPX +product COREGA RT2870_1 0x002f RT2870 +product COREGA RT2870_2 0x003c RT2870 +product COREGA RT2870_3 0x003f RT2870 +product COREGA RT3070 0x0041 RT3070 +product COREGA CGWLUSB300GNM 0x0042 CG-WLUSB300GNM + product COREGA WLUSB_11_STICK 0x7613 WLAN USB Stick 11 product COREGA FETHER_USB_TXC 0x9601 FEther USB-TXC @@ -1152,6 +1231,7 @@ product CYBERPOWER 1500CAVRLCD 0x0501 15 /* CyberTAN Technology products */ product CYBERTAN TG54USB 0x1666 TG54USB +product CYBERTAN RT2870 0x1828 RT2870 /* Cypress Semiconductor products */ product CYPRESS MOUSE 0x0001 mouse @@ -1229,6 +1309,8 @@ product DLINK DWLAG122 0x3a04 DWL-AG122 product DLINK DWLAG122_NF 0x3a05 DWL-AG122 (no firmware) product DLINK DWLG122 0x3c00 DWL-G122 b1 Wireless Adapter product DLINK DUBE100B1 0x3c05 DUB-E100 rev B1 +product DLINK RT2870 0x3c09 RT2870 +product DLINK RT3072 0x3c0a RT3072 product DLINK DSB650C 0x4000 10Mbps Ethernet product DLINK DSB650TX1 0x4001 10/100 Ethernet product DLINK DSB650TX 0x4002 10/100 Ethernet @@ -1241,7 +1323,15 @@ product DLINK2 DWA120 0x3a0e DWA-120 product DLINK2 DWLG122C1 0x3c03 DWL-G122 c1 product DLINK2 WUA1340 0x3c04 WUA-1340 product DLINK2 DWA111 0x3c06 DWA-111 +product DLINK2 RT2870_1 0x3c09 RT2870 product DLINK2 DWA110 0x3c07 DWA-110 +product DLINK2 RT3072 0x3c0a RT3072 +product DLINK2 RT3070_1 0x3c0d RT3070 +product DLINK2 RT3070_2 0x3c0e RT3070 +product DLINK2 RT3070_3 0x3c0f RT3070 +product DLINK2 RT2870_2 0x3c11 RT2870 +product DLINK2 DWA130 0x3c13 DWA-130 +product DLINK2 RT3070_4 0x3c15 RT3070 product DLINK3 DWM652 0x3e04 DWM-652 /* DMI products */ @@ -1257,6 +1347,12 @@ product DRESDENELEKTRONIK WIRELESSHANDHE /* Dynastream Innovations */ product DYNASTREAM ANTDEVBOARD 0x1003 ANT dev board +/* Edimax products */ +product EDIMAX EW7318USG 0x7318 USB Wireless dongle +product EDIMAX RT2870_1 0x7711 RT2870 +product EDIMAX EW7717 0x7717 EW-7717 +product EDIMAX EW7718 0x7718 EW-7718 + /* Eicon Networks */ product EICON DIVA852 0x4905 Diva 852 ISDN TA @@ -1285,6 +1381,11 @@ product ELSA USB2ETHERNET 0x3000 Microli /* EMS products */ product EMS DUAL_SHOOTER 0x0003 PSX gun controller converter +/* Encore products */ +product ENCORE RT3070_1 0x1480 RT3070 +product ENCORE RT3070_2 0x14a1 RT3070 +product ENCORE RT3070_3 0x14a9 RT3070 + /* Entrega products */ product ENTREGA 1S 0x0001 1S serial product ENTREGA 2S 0x0002 2S serial @@ -1429,6 +1530,11 @@ product GIGASET SMCWUSBTG_NF 0x0711 SMCW product GIGASET AR5523 0x0712 AR5523 product GIGASET AR5523_NF 0x0713 AR5523 (no firmware) product GIGASET RT2573 0x0722 RT2573 +product GIGASET RT3070_1 0x0740 RT3070 +product GIGASET RT3070_2 0x0744 RT3070 +product GIGABYTE RT2870_1 0x800b RT2870 +product GIGABYTE GNWB31N 0x800c GN-WB31N +product GIGABYTE GNWB32L 0x800d GN-WB32L /* Global Sun Technology product */ product GLOBALSUN AR5523_1 0x7801 AR5523 @@ -1464,6 +1570,7 @@ product GUILLEMOT DALEADER 0xa300 DA Lea product GUILLEMOT HWGUSB254 0xe000 HWGUSB2-54 WLAN product GUILLEMOT HWGUSB254LB 0xe010 HWGUSB2-54-LB product GUILLEMOT HWGUSB254V2AP 0xe020 HWGUSB2-54V2-AP +product GUILLEMOT HWNU300 0xe030 HWNU-300 /* Hagiwara products */ product HAGIWARA FGSM 0x0002 FlashGate SmartMedia Card Reader @@ -1482,6 +1589,10 @@ product HANDSPRING TREO600 0x0300 Handsp product HAUPPAUGE WINTV_USB_FM 0x4d12 WinTV USB FM /* Hawking Technologies products */ +product HAWKING RT2870_1 0x0001 RT2870 +product HAWKING RT2870_2 0x0003 RT2870 +product HAWKING HWUN2 0x0009 HWUN2 +product HAWKING RT3070 0x000b RT3070 product HAWKING UF100 0x400c 10/100 USB Ethernet /* Hitachi, Ltd. products */ @@ -1528,6 +1639,7 @@ product HP 2215 0x1016 iPAQ 22xx/Jorna product HP 568J 0x1116 Jornada 568 product HP 930C 0x1204 DeskJet 930c product HP P2000U 0x1801 Inkjet P-2000U +product HP HS2300 0x1e1d HS2300 HSDPA (aka MC8775) product HP 640C 0x2004 DeskJet 640c product HP 4670V 0x3005 ScanJet 4670v product HP P1100 0x3102 Photosmart P1100 @@ -1655,6 +1767,10 @@ product IODATA USBETTXS 0x0913 USB ETTX product IODATA USBWNB11A 0x0919 USB WN-B11 product IODATA USBWNB11 0x0922 USB Airport WN-B11 product IODATA ETGUS2 0x0930 ETG-US2 +product IODATA RT3072_1 0x0944 RT3072 +product IODATA RT3072_2 0x0945 RT3072 +product IODATA RT3072_3 0x0947 RT3072 +product IODATA RT3072_4 0x0948 RT3072 product IODATA USBRSAQ 0x0a03 Serial USB-RSAQ1 product IODATA2 USB2SC 0x0a09 USB2.0-SCSI Bridge USB2-SC @@ -1779,7 +1895,11 @@ product LINKSYS2 WUSB11 0x2219 WUSB11 W product LINKSYS2 USB200M 0x2226 USB 2.0 10/100 Ethernet product LINKSYS3 WUSB11v28 0x2233 WUSB11 v2.8 Wireless Adapter product LINKSYS4 USB1000 0x0039 USB1000 +product LINKSYS4 WUSB100 0x0070 WUSB100 +product LINKSYS4 WUSB600N 0x0071 WUSB600N product LINKSYS4 WUSB54GCV2 0x0073 WUSB54GC v2 +product LINKSYS4 WUSB54GCV3 0x0077 WUSB54GC v3 +product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2 /* Logitech products */ product LOGITECH M2452 0x0203 M2452 keyboard @@ -1809,6 +1929,9 @@ product LOGITECH QUICKCAMPRO2 0xd001 Qui /* Logitec Corp. products */ product LOGITEC LDR_H443SU2 0x0033 DVD Multi-plus unit LDR-H443SU2 product LOGITEC LDR_H443U2 0x00b3 DVD Multi-plus unit LDR-H443U2 +product LOGITEC RT2870_1 0x0162 RT2870 +product LOGITEC RT2870_2 0x0163 RT2870 +product LOGITEC RT2870_3 0x0164 RT2870 /* Lucent products */ product LUCENT EVALKIT 0x1001 USS-720 evaluation kit @@ -1846,7 +1969,10 @@ product MELCO PCOPRS1 0x00b3 PC-OP-RS1 product MELCO SG54HP 0x00d8 WLI-U2-SG54HP product MELCO G54HP 0x00d9 WLI-U2-G54HP product MELCO KG54L 0x00da WLI-U2-KG54L +product MELCO WLIUCG300N 0x00e8 WLI-UC-G300N product MELCO SG54HG 0x00f4 WLI-U2-SG54HG +product MELCO WLIUCAG300N 0x012e WLI-UC-AG300N +product MELCO WLIUCGN 0x015d WLI-UC-GN /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 @@ -1864,15 +1990,25 @@ product MGE UPS2 0xffff MGE UPS SYSTEMS /* Micro Star International products */ product MSI BT_DONGLE 0x1967 Bluetooth USB dongle +product MSI RT3070_1 0x3820 RT3070 +product MSI RT3070_2 0x3821 RT3070 +product MSI RT3070_3 0x3870 RT3070 product MSI UB11B 0x6823 UB11B product MSI RT2570 0x6861 RT2570 product MSI RT2570_2 0x6865 RT2570 product MSI RT2570_3 0x6869 RT2570 product MSI RT2573_1 0x6874 RT2573 product MSI RT2573_2 0x6877 RT2573 +product MSI RT3070_4 0x6899 RT3070 +product MSI RT3070_5 0x821a RT3070 +product MSI RT3070_6 0x870a RT3070 +product MSI RT3070_7 0x899a RT3070 product MSI RT2573_3 0xa861 RT2573 product MSI RT2573_4 0xa874 RT2573 +/* Microdia products */ +product MICRODIA TWINKLECAM 0x600d TwinkleCam USB camera + /* Microsoft products */ product MICROSOFT SIDEPREC 0x0008 SideWinder Precision Pro product MICROSOFT INTELLIMOUSE 0x0009 IntelliMouse @@ -2021,8 +2157,12 @@ product NIKON D300 0x041a Digital Came product NOVATECH NV902 0x9020 NovaTech NV-902W product NOVATECH RT2573 0x9021 RT2573 +/* Nokia products */ +product NOKIA N958GB 0x0070 Nokia N95 8GBc + /* Novatel Wireless products */ product NOVATEL V640 0x1100 Merlin V620 +product NOVATEL CDMA_MODEM 0x1110 Novatel Wireless Merlin CDMA product NOVATEL V620 0x1110 Merlin V620 product NOVATEL V740 0x1120 Merlin V740 product NOVATEL V720 0x1130 Merlin V720 @@ -2034,6 +2174,7 @@ product NOVATEL X950D 0x1450 Merlin X95 product NOVATEL ES620 0x2100 Expedite ES620 product NOVATEL E725 0x2120 Expedite E725 product NOVATEL ES620_2 0x2130 Expedite ES620 +product NOVATEL ES620 0x2100 ES620 CDMA product NOVATEL U720 0x2110 Merlin U720 product NOVATEL EU730 0x2400 Expedite EU730 product NOVATEL EU740 0x2410 Expedite EU740 @@ -2140,6 +2281,14 @@ product PANASONIC KXLCB20AN 0x0d0a CD-R product PANASONIC KXLCB35AN 0x0d0e DVD-ROM & CD-R/RW product PANASONIC SDCAAE 0x1b00 MultiMediaCard +/* PARA Industrial products */ +product PARA RT3070 0x8888 RT3070 + +/* Pegatron products */ +product PEGATRON RT2870 0x0002 RT2870 +product PEGATRON RT3070 0x000c RT3070 +product PEGATRON RT3070_2 0x000e RT3070 + /* Peracom products */ product PERACOM SERIAL1 0x0001 Serial product PERACOM ENET 0x0002 Ethernet @@ -2157,6 +2306,7 @@ product PHILIPS SPE3030CC 0x083a USB 2.0 product PHILIPS SNU5600 0x1236 SNU5600 product PHILIPS UM10016 0x1552 ISP 1581 Hi-Speed USB MPEG2 Encoder Reference Kit product PHILIPS DIVAUSB 0x1801 DIVA USB mp3 player +product PHILIPS RT2870 0x200f RT2870 /* Philips Semiconductor products */ product PHILIPSSEMI HUB1122 0x1122 HUB @@ -2172,11 +2322,15 @@ product PLANEX GW_US11H 0x14ea GW-US11H product PLANEX2 GW_US11S 0x3220 GW-US11S WLAN product PLANEX2 GW_US54GXS 0x5303 GW-US54GXS WLAN product PLANEX2 GWUS54HP 0xab01 GW-US54HP +product PLANEX2 GWUS300MINIS 0xab24 GW-US300MiniS +product PLANEX2 RT3070 0xab25 RT3070 product PLANEX2 GWUS54MINI2 0xab50 GW-US54Mini2 product PLANEX2 GWUS54SG 0xc002 GW-US54SG product PLANEX2 GWUS54GZL 0xc007 GW-US54GZL product PLANEX2 GWUS54GD 0xed01 GW-US54GD product PLANEX2 GWUSMM 0xed02 GW-USMM +product PLANEX2 RT2870 0xed06 RT2870 +product PLANEX2 GWUSMICRON 0xed14 GW-USMicroN product PLANEX3 GWUS54GZ 0xab10 GW-US54GZ product PLANEX3 GU1000T 0xab11 GU-1000T product PLANEX3 GWUS54MINI 0xab13 GW-US54Mini @@ -2234,6 +2388,7 @@ product PUTERCOM UPA100 0x047e USB-1284 product QCOM RT2573 0x6196 RT2573 product QCOM RT2573_2 0x6229 RT2573 product QCOM RT2573_3 0x6238 RT2573 +product QCOM RT2870 0x6259 RT2870 /* Qisda products */ product QISDA H21_1 0x4512 3G modem @@ -2320,6 +2475,8 @@ product QUALCOMMINC E2002 0x2002 3G mode product QUALCOMMINC E2003 0x2003 3G modem /* Quanta products */ +/* Quanta products */ +product QUANTA RT3070 0x0304 RT3070 product QUANTA Q101 0xea02 HSDPA modem product QUANTA Q111 0xea03 HSDPA modem product QUANTA GLX 0xea04 HSDPA modem @@ -2340,9 +2497,16 @@ product RAINBOW IKEY2000 0x1200 i-Key 20 /* Ralink Technology products */ product RALINK RT2570 0x1706 RT2500USB Wireless Adapter +product RALINK RT2070 0x2070 RT2070 product RALINK RT2570_2 0x2570 RT2500USB Wireless Adapter product RALINK RT2573 0x2573 RT2501USB Wireless Adapter product RALINK RT2671 0x2671 RT2601USB Wireless Adapter +product RALINK RT2770 0x2770 RT2770 +product RALINK RT2870 0x2870 RT2870 +product RALINK RT3070 0x3070 RT3070 +product RALINK RT3071 0x3071 RT3071 +product RALINK RT3072 0x3072 RT3072 +product RALINK RT3572 0x3572 RT3572 product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter @@ -2383,6 +2547,7 @@ product SAGEM XG76NA 0x0062 XG-76NA product SAMSUNG ML6060 0x3008 ML-6060 laser printer product SAMSUNG YP_U2 0x5050 YP-U2 MP3 Player product SAMSUNG I500 0x6601 I500 Palm USB Phone +product SAMSUNG2 RT2870_1 0x2018 RT2870 /* Samsung Techwin products */ product SAMSUNG_TECHWIN DIGIMAX_410 0x000a Digimax 410 @@ -2406,7 +2571,18 @@ product SCANLOGIC SL11R 0x0002 SL11R ID product SCANLOGIC 336CX 0x0300 Phantom 336CX - C3 scanner /* Senao products */ +product SENAO RT2870_3 0x0605 RT2870 +product SENAO RT2870_4 0x0615 RT2870 product SENAO NUB8301 0x2000 NUB-8301 +product SENAO RT2870_1 0x9701 RT2870 +product SENAO RT2870_2 0x9702 RT2870 +product SENAO RT3070 0x9703 RT3070 +product SENAO RT3071 0x9705 RT3071 +product SENAO RT3072_1 0x9706 RT3072 +product SENAO RT3072_2 0x9707 RT3072 +product SENAO RT3072_3 0x9708 RT3072 +product SENAO RT3072_4 0x9709 RT3072 +product SENAO RT3072_5 0x9801 RT3072 /* ShanTou products */ product SHANTOU ST268 0x0268 ST268 @@ -2453,7 +2629,9 @@ product SIEMENS3 X75 0x0004 X75 product SIERRA EM5625 0x0017 EM5625 product SIERRA MC5720_2 0x0018 MC5720 product SIERRA MC5725 0x0020 MC5725 +product SIERRA AIRCARD580 0x0112 Sierra Wireless AirCard 580 product SIERRA AIRCARD595 0x0019 Sierra Wireless AirCard 595 +product SIERRA AC595U 0x0120 Sierra Wireless AirCard 595U product SIERRA AC597E 0x0021 Sierra Wireless AirCard 597E product SIERRA EM5725 0x0022 EM5725 product SIERRA C597 0x0023 Sierra Wireless Compass 597 @@ -2553,8 +2731,24 @@ product SITECOM SERIAL 0x2068 USB to se product SITECOM2 WL022 0x182d WL-022 /* Sitecom Europe products */ +product SITECOMEU RT2870_1 0x0017 RT2870 product SITECOMEU WL168V1 0x000d WL-168 v1 product SITECOMEU WL168V4 0x0028 WL-168 v4 +product SITECOMEU RT2870_2 0x002b RT2870 +product SITECOMEU RT2870_3 0x002c RT2870 +product SITECOMEU RT2870_4 0x002d RT2870 +product SITECOMEU RT2770 0x0039 RT2770 +product SITECOMEU RT3070_2 0x003b RT3070 +product SITECOMEU RT3070_3 0x003c RT3070 +product SITECOMEU RT3070_4 0x003d RT3070 +product SITECOMEU RT3070 0x003e RT3070 +product SITECOMEU WL608 0x003f WL-608 +product SITECOMEU RT3072_1 0x0041 RT3072 +product SITECOMEU RT3072_2 0x0042 RT3072 +product SITECOMEU RT3072_3 0x0047 RT3072 +product SITECOMEU RT3072_4 0x0048 RT3072 +product SITECOMEU RT3072_5 0x004a RT3072 +product SITECOMEU RT3072_6 0x004d RT3072 product SITECOMEU LN028 0x061c LN-028 product SITECOMEU WL113 0x9071 WL-113 product SITECOMEU ZD1211B 0x9075 ZD1211B @@ -2612,7 +2806,9 @@ product SOURCENEXT KEIKAI8 0x039f Keikai product SOURCENEXT KEIKAI8_CHG 0x012e KeikaiDenwa 8 with charger /* SparkLAN products */ -product SPARKLAN RT2573 0x0004 RT2573 +product SPARKLAN RT2573 0x0004 RT2573 +product SPARKLAN RT2870_1 0x0006 RT2870 +product SPARKLAN RT3070 0x0010 RT3070 /* Sphairon Access Systems GmbH products */ product SPHAIRON UB801R 0x0110 UB801R @@ -2682,6 +2878,8 @@ product SURECOM RT2573 0x31f3 RT2573 /* Sweex products */ product SWEEX ZD1211 0x1809 ZD1211 +product SWEEX2 LW303 0x0302 LW303 +product SWEEX2 LW313 0x0313 LW313 /* System TALKS, Inc. */ product SYSTEMTALKS SGCX2UL 0x1920 SGC-X2UL @@ -2775,6 +2973,7 @@ product UMEDIA TEW444UBEU_NF 0x3007 TEW- product UMEDIA TEW429UB_A 0x300a TEW-429UB_A product UMEDIA TEW429UB 0x300b TEW-429UB product UMEDIA TEW429UBC1 0x300d TEW-429UB C1 +product UMEDIA RT2870_1 0x300e RT2870 product UMEDIA ALL0298V2 0x3204 ALL0298 v2 product UMEDIA AR5523_2 0x3205 AR5523 product UMEDIA AR5523_2_NF 0x3206 AR5523 (no firmware) @@ -2884,9 +3083,16 @@ product ZCOM AR5523 0x0012 AR5523 product ZCOM AR5523_NF 0x0013 AR5523 driver (no firmware) product ZCOM XM142 0x0015 XM-142 product ZCOM ZD1211B 0x001a ZD1211B +product ZCOM RT2870_1 0x0022 RT2870 +product ZCOM RT2870_2 0x0025 RT2870 /* Zinwell products */ product ZINWELL RT2570 0x0260 RT2570 +product ZINWELL RT2870_1 0x0280 RT2870 +product ZINWELL RT2870_2 0x0282 RT2870 +product ZINWELL RT3072_1 0x0283 RT3072 +product ZINWELL RT3072_2 0x0284 RT3072 +product ZINWELL RT3070 0x5257 RT3070 /* Zoom Telephonics, Inc. products */ product ZOOM 2986L 0x9700 2986L Fax modem @@ -2907,3 +3113,4 @@ product ZYXEL AG225H 0x3409 AG-225H product ZYXEL M202 0x340a M-202 product ZYXEL G220V2 0x340f G-220 v2 product ZYXEL G202 0x3410 G-202 +product ZYXEL RT2870_1 0x3416 RT2870 Copied: stable/8/sys/dev/usb/wlan/if_run.c (from r203134, head/sys/dev/usb/wlan/if_run.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/dev/usb/wlan/if_run.c Tue Apr 6 23:14:43 2010 (r206289, copy of r203134, head/sys/dev/usb/wlan/if_run.c) @@ -0,0 +1,4143 @@ +/* $FreeBSD$ */ + +/*- + * Copyright (c) 2008,2009 Damien Bergamini + * ported to FreeBSD by Akinori Furukoshi + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* release date Jan. 09, 2010 */ + +#include +__FBSDID("$FreeBSD$"); + +/*- + * Ralink Technology RT2700U/RT2800U/RT3000U chipset driver. + * http://www.ralinktech.com/ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include "usbdevs.h" + +#define USB_DEBUG_VAR run_debug +#include + +#include "if_runreg.h" /* shared with ral(4) */ +#include "if_runvar.h" + +#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) + +#if USB_DEBUG +#define RUN_DEBUG +#endif + +#ifdef RUN_DEBUG +int run_debug = 0; +SYSCTL_NODE(_hw_usb, OID_AUTO, run, CTLFLAG_RW, 0, "USB run"); +SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, CTLFLAG_RW, &run_debug, 0, + "run debug level"); +#endif + +#define IEEE80211_HAS_ADDR4(wh) \ + (((wh)->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS) + +static const struct usb_device_id run_devs[] = { + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2770) }, + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2870) }, + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3070) }, + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3071) }, + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT3072) }, + { USB_VP(USB_VENDOR_ABOCOM2, USB_PRODUCT_ABOCOM2_RT2870_1) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2770) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_1) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_2) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_3) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_4) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_5) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_1) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_2) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_3) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_4) }, + { USB_VP(USB_VENDOR_AIRTIES, USB_PRODUCT_AIRTIES_RT3070) }, + { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_1) }, + { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_2) }, + { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GNR) }, + { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_RT2870_1) }, + { USB_VP(USB_VENDOR_AMIT2, USB_PRODUCT_AMIT2_RT2870) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_1) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_2) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_3) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_4) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_5) }, + { USB_VP(USB_VENDOR_ASUS2, USB_PRODUCT_ASUS2_USBN11) }, + { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_1) }, + { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_2) }, + { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_1) }, + { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_2) }, + { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT3070_3) }, + { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8053V3) }, + { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D8055) }, + { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6D4050V1) }, + { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_1) }, + { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_2) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_1) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_2) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_3) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_4) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_5) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_6) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_7) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_8) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_VIGORN61) }, + { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB300GNM) }, + { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_1) }, + { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_2) }, + { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_3) }, + { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT3070) }, + { USB_VP(USB_VENDOR_CYBERTAN, USB_PRODUCT_CYBERTAN_RT2870) }, + { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT2870) }, + { USB_VP(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_RT3072) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA130) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_1) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT2870_2) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_1) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_2) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_3) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_4) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072) }, + { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7717) }, + { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7718) }, + { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_RT2870_1) }, + { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_1) }, + { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_2) }, + { USB_VP(USB_VENDOR_ENCORE, USB_PRODUCT_ENCORE_RT3070_3) }, + { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB31N) }, + { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB32L) }, + { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_RT2870_1) }, + { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_1) }, + { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT3070_2) }, + { USB_VP(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWNU300) }, + { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_HWUN2) }, + { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_1) }, + { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT2870_2) }, + { USB_VP(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_RT3070) }, + { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_1) }, + { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_2) }, + { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_3) }, + { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_4) }, + { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB100) }, + { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB54GCV3) }, + { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600N) }, + { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600NV2) }, + { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_1) }, + { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_2) }, + { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_3) }, + { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCAG300N) }, + { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCG300N) }, + { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCGN) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_1) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_2) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_3) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_4) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_5) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_6) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_7) }, + { USB_VP(USB_VENDOR_PARA, USB_PRODUCT_PARA_RT3070) }, + { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT2870) }, + { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070) }, + { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_2) }, + { USB_VP(USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_RT2870) }, + { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS300MINIS) }, + { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMICRON) }, + { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT2870) }, + { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_RT3070) }, + { USB_VP(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2870) }, + { USB_VP(USB_VENDOR_QUANTA, USB_PRODUCT_QUANTA_RT3070) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2070) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2770) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2870) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3070) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3071) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3072) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3572) }, + { USB_VP(USB_VENDOR_SAMSUNG2, USB_PRODUCT_SAMSUNG2_RT2870_1) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_1) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_2) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_3) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_4) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3070) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3071) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_1) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_2) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_3) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_4) }, + { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT3072_5) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2770) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_1) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_2) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_3) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT2870_4) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_2) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_3) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_4) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_1) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_2) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_3) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_4) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_5) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_6) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL608) }, + { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2870_1) }, + { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT3070) }, + { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW303) }, + { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW313) }, + { USB_VP(USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_RT2870_1) }, + { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_1) }, + { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_2) }, + { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_1) }, + { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT2870_2) }, + { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3070) }, + { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_1) }, + { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_2) }, + { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_1) }, +}; + +MODULE_DEPEND(run, wlan, 1, 1, 1); +MODULE_DEPEND(run, wlan_amrr, 1, 1, 1); +MODULE_DEPEND(run, usb, 1, 1, 1); +MODULE_DEPEND(run, firmware, 1, 1, 1); + +static device_probe_t run_match; +static device_attach_t run_attach; +static device_detach_t run_detach; + +static usb_callback_t run_bulk_rx_callback; +static usb_callback_t run_bulk_tx_callback0; +static usb_callback_t run_bulk_tx_callback1; +static usb_callback_t run_bulk_tx_callback2; +static usb_callback_t run_bulk_tx_callback3; +static usb_callback_t run_bulk_tx_callback4; +static usb_callback_t run_bulk_tx_callback5; + +static void run_bulk_tx_callbackN(struct usb_xfer *xfer, + usb_error_t error, unsigned int index); +static struct ieee80211vap *run_vap_create(struct ieee80211com *, + const char name[IFNAMSIZ], int unit, int opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t + mac[IEEE80211_ADDR_LEN]); +static void run_vap_delete(struct ieee80211vap *); +static void run_setup_tx_list(struct run_softc *, + struct run_endpoint_queue *); +static void run_unsetup_tx_list(struct run_softc *, + struct run_endpoint_queue *); +static int run_load_microcode(struct run_softc *); +static int run_reset(struct run_softc *); +static usb_error_t run_do_request(struct run_softc *, + struct usb_device_request *, void *); +static int run_read(struct run_softc *, uint16_t, uint32_t *); +static int run_read_region_1(struct run_softc *, uint16_t, uint8_t *, int); +static int run_write_2(struct run_softc *, uint16_t, uint16_t); +static int run_write(struct run_softc *, uint16_t, uint32_t); +static int run_write_region_1(struct run_softc *, uint16_t, + const uint8_t *, int); +static int run_set_region_4(struct run_softc *, uint16_t, uint32_t, int); +static int run_efuse_read_2(struct run_softc *, uint16_t, uint16_t *); +static int run_eeprom_read_2(struct run_softc *, uint16_t, uint16_t *); +static int run_rt2870_rf_write(struct run_softc *, uint8_t, uint32_t); +static int run_rt3070_rf_read(struct run_softc *, uint8_t, uint8_t *); +static int run_rt3070_rf_write(struct run_softc *, uint8_t, uint8_t); +static int run_bbp_read(struct run_softc *, uint8_t, uint8_t *); +static int run_bbp_write(struct run_softc *, uint8_t, uint8_t); +static int run_mcu_cmd(struct run_softc *, uint8_t, uint16_t); +static const char *run_get_rf(int); +static int run_read_eeprom(struct run_softc *); +static struct ieee80211_node *run_node_alloc(struct ieee80211vap *, + const uint8_t mac[IEEE80211_ADDR_LEN]); +static int run_media_change(struct ifnet *); +static int run_newstate(struct ieee80211vap *, enum ieee80211_state, int); +static int run_wme_update(struct ieee80211com *); +static void run_wme_update_cb(void *, int); +static void run_key_update_begin(struct ieee80211vap *); +static void run_key_update_end(struct ieee80211vap *); +static int run_key_set(struct ieee80211vap *, const struct ieee80211_key *, + const uint8_t mac[IEEE80211_ADDR_LEN]); +static int run_key_delete(struct ieee80211vap *, + const struct ieee80211_key *); +static void run_amrr_start(struct run_softc *, struct ieee80211_node *); +static void run_amrr_to(void *); +static void run_amrr_cb(void *, int); +static void run_iter_func(void *, struct ieee80211_node *); +static void run_newassoc(struct ieee80211_node *, int); +static void run_rx_frame(struct run_softc *, struct mbuf *, uint32_t); +static void run_tx_free(struct run_endpoint_queue *pq, + struct run_tx_data *, int); +static void run_set_tx_desc(struct run_softc *, struct run_tx_data *, + uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t); +static int run_tx(struct run_softc *, struct mbuf *, + struct ieee80211_node *); +static int run_tx_mgt(struct run_softc *, struct mbuf *, + struct ieee80211_node *); +static int run_sendprot(struct run_softc *, const struct mbuf *, + struct ieee80211_node *, int, int); +static int run_tx_param(struct run_softc *, struct mbuf *, + struct ieee80211_node *, + const struct ieee80211_bpf_params *); +static int run_raw_xmit(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_bpf_params *); +static void run_start(struct ifnet *); +static int run_ioctl(struct ifnet *, u_long, caddr_t); +static void run_select_chan_group(struct run_softc *, int); +static void run_set_rx_antenna(struct run_softc *, int); +static void run_rt2870_set_chan(struct run_softc *, u_int); +static void run_rt3070_set_chan(struct run_softc *, u_int); +static int run_set_chan(struct run_softc *, struct ieee80211_channel *); +static void run_set_channel(struct ieee80211com *); +static void run_scan_start(struct ieee80211com *); +static void run_scan_end(struct ieee80211com *); +static uint8_t run_rate2mcs(uint8_t); +static void run_update_beacon(struct ieee80211vap *, int); +static void run_update_beacon_locked(struct ieee80211vap *, int); +static void run_updateprot(struct ieee80211com *); +static void run_usb_timeout_cb(void *, int); +static void run_reset_livelock(struct run_softc *); +static void run_enable_tsf_sync(struct run_softc *); +static void run_enable_mrr(struct run_softc *); +static void run_set_txpreamble(struct run_softc *); +static void run_set_basicrates(struct run_softc *); +static void run_set_leds(struct run_softc *, uint16_t); +static void run_set_bssid(struct run_softc *, const uint8_t *); +static void run_set_macaddr(struct run_softc *, const uint8_t *); +static void run_updateslot(struct ifnet *); +static int8_t run_rssi2dbm(struct run_softc *, uint8_t, uint8_t); +static void run_update_promisc_locked(struct ifnet *); +static void run_update_promisc(struct ifnet *); +static int run_bbp_init(struct run_softc *); +static int run_rt3070_rf_init(struct run_softc *); +static int run_rt3070_filter_calib(struct run_softc *, uint8_t, uint8_t, + uint8_t *); +static int run_txrx_enable(struct run_softc *); +static void run_init(void *); +static void run_init_locked(struct run_softc *); +static void run_stop(void *); +static void run_delay(struct run_softc *, unsigned int); + +static const struct { + uint32_t reg; + uint32_t val; +} rt2870_def_mac[] = { + RT2870_DEF_MAC +}; + +static const struct { + uint8_t reg; + uint8_t val; +} rt2860_def_bbp[] = { + RT2860_DEF_BBP +}; + +static const struct rfprog { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:15:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF7910656A5; Tue, 6 Apr 2010 23:15:17 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED8358FC1B; Tue, 6 Apr 2010 23:15:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NFGjI009425; Tue, 6 Apr 2010 23:15:16 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NFGv9009422; Tue, 6 Apr 2010 23:15:16 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062315.o36NFGv9009422@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206290 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:15:17 -0000 Author: thompsa Date: Tue Apr 6 23:15:16 2010 New Revision: 206290 URL: http://svn.freebsd.org/changeset/base/206290 Log: MFC r203137 Release the firmware after loading to the device. Modified: stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_runvar.h 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/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Tue Apr 6 23:14:43 2010 (r206289) +++ stable/8/sys/dev/usb/wlan/if_run.c Tue Apr 6 23:15:16 2010 (r206290) @@ -803,22 +803,25 @@ int run_load_microcode(struct run_softc *sc) { usb_device_request_t req; + const struct firmware *fw; const u_char *base; uint32_t tmp; int ntries, error; const uint64_t *temp; uint64_t bytes; - if((sc->fwp = firmware_get("runfw")) == NULL){ + fw = firmware_get("runfw"); + if(fw == NULL){ printf("%s: failed loadfirmware of file %s (error %d)\n", device_get_nameunit(sc->sc_dev), "runfw", ENOENT); return ENOENT; } - if (sc->fwp->datasize != 8192) { + if (fw->datasize != 8192) { printf("%s: invalid firmware size (should be 8KB)\n", device_get_nameunit(sc->sc_dev)); - return EINVAL; + error = EINVAL; + goto fail; } /* @@ -827,7 +830,7 @@ run_load_microcode(struct run_softc *sc) * first half (4KB) is for rt2870, * last half is for rt3071. */ - base = sc->fwp->data; + base = fw->data; if ((sc->mac_rev >> 16) != 0x2860 && (sc->mac_rev >> 16) != 0x2872 && (sc->mac_rev >> 16) != 0x3070 && @@ -840,10 +843,14 @@ run_load_microcode(struct run_softc *sc) device_get_nameunit(sc->sc_dev)); /* cheap sanity check */ - temp = sc->fwp->data; + temp = fw->data; bytes = *temp; - if(bytes != be64toh(0xffffff0210280210)) - return EINVAL; + if(bytes != be64toh(0xffffff0210280210)) { + printf("%s: firmware checksum failed\n", + device_get_nameunit(sc->sc_dev)); + error = EINVAL; + goto fail; + } run_read(sc, RT2860_ASIC_VER_ID, &tmp); /* write microcode image */ @@ -856,19 +863,23 @@ run_load_microcode(struct run_softc *sc) USETW(req.wValue, 8); USETW(req.wIndex, 0); USETW(req.wLength, 0); - if ((error = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)) != 0) - return error; + if ((error = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)) != 0) { + printf("%s: firmware reset failed\n", + device_get_nameunit(sc->sc_dev)); + goto fail; + } run_delay(sc, 10); run_write(sc, RT2860_H2M_MAILBOX, 0); if ((error = run_mcu_cmd(sc, RT2860_MCU_CMD_BOOT, 0)) != 0) - return error; + goto fail; /* wait until microcontroller is ready */ for (ntries = 0; ntries < 1000; ntries++) { - if ((error = run_read(sc, RT2860_SYS_CTRL, &tmp)) != 0) - return error; + if ((error = run_read(sc, RT2860_SYS_CTRL, &tmp)) != 0) { + goto fail; + } if (tmp & RT2860_MCU_READY) break; run_delay(sc, 10); @@ -876,11 +887,14 @@ run_load_microcode(struct run_softc *sc) if (ntries == 1000) { printf("%s: timeout waiting for MCU to initialize\n", device_get_nameunit(sc->sc_dev)); - return ETIMEDOUT; + error = ETIMEDOUT; + goto fail; } DPRINTF("microcode successfully loaded after %d tries\n", ntries); - return 0; +fail: + firmware_put(fw, FIRMWARE_UNLOAD); + return (error); } int Modified: stable/8/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- stable/8/sys/dev/usb/wlan/if_runvar.h Tue Apr 6 23:14:43 2010 (r206289) +++ stable/8/sys/dev/usb/wlan/if_runvar.h Tue Apr 6 23:15:16 2010 (r206290) @@ -154,8 +154,6 @@ struct run_softc { int (*sc_srom_read)(struct run_softc *, uint16_t, uint16_t *); - const struct firmware *fwp; - uint32_t mac_rev; uint8_t rf_rev; uint8_t freq; From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:15:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D50461065676; Tue, 6 Apr 2010 23:15:44 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C19948FC28; Tue, 6 Apr 2010 23:15:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NFiLT009598; Tue, 6 Apr 2010 23:15:44 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NFi1w009596; Tue, 6 Apr 2010 23:15:44 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062315.o36NFi1w009596@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206291 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:15:44 -0000 Author: thompsa Date: Tue Apr 6 23:15:44 2010 New Revision: 206291 URL: http://svn.freebsd.org/changeset/base/206291 Log: MFC r203138 Use device_printf rather than printf + device_get_nameunit. Modified: stable/8/sys/dev/usb/wlan/if_run.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/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Tue Apr 6 23:15:16 2010 (r206290) +++ stable/8/sys/dev/usb/wlan/if_run.c Tue Apr 6 23:15:44 2010 (r206291) @@ -535,8 +535,8 @@ run_attach(device_t self) run_delay(sc, 10); } if (ntries == 100) { - printf("%s: timeout waiting for NIC to initialize\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, + "timeout waiting for NIC to initialize\n"); RUN_UNLOCK(sc); goto detach; } @@ -544,14 +544,13 @@ run_attach(device_t self) /* retrieve RF rev. no and various other things from EEPROM */ run_read_eeprom(sc); - printf("%s: MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), " - "address %s\n", device_get_nameunit(sc->sc_dev), sc->mac_rev >> 16, - sc->mac_rev & 0xffff, run_get_rf(sc->rf_rev), sc->ntxchains, - sc->nrxchains, ether_sprintf(sc->sc_bssid)); + device_printf(sc->sc_dev, + "MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), address %s\n", + sc->mac_rev >> 16, sc->mac_rev & 0xffff, run_get_rf(sc->rf_rev), + sc->ntxchains, sc->nrxchains, ether_sprintf(sc->sc_bssid)); if ((error = run_load_microcode(sc)) != 0) { - printf("%s: could not load 8051 microcode\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "could not load 8051 microcode\n"); RUN_UNLOCK(sc); goto detach; } @@ -560,8 +559,7 @@ run_attach(device_t self) ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); if(ifp == NULL){ - printf("%s: can not if_alloc()\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "can not if_alloc()\n"); goto detach; } ic = ifp->if_l2com; @@ -812,14 +810,14 @@ run_load_microcode(struct run_softc *sc) fw = firmware_get("runfw"); if(fw == NULL){ - printf("%s: failed loadfirmware of file %s (error %d)\n", - device_get_nameunit(sc->sc_dev), "runfw", ENOENT); + device_printf(sc->sc_dev, + "failed loadfirmware of file %s\n", "runfw"); return ENOENT; } if (fw->datasize != 8192) { - printf("%s: invalid firmware size (should be 8KB)\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, + "invalid firmware size (should be 8KB)\n"); error = EINVAL; goto fail; } @@ -836,18 +834,15 @@ run_load_microcode(struct run_softc *sc) (sc->mac_rev >> 16) != 0x3070 && (sc->mac_rev >> 16) != 0x3572){ base += 4096; - printf("%s: You are using firmware RT3071.\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "loading RT3071 firmware\n"); } else - printf("%s: You are using firmware RT2870.\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "loading RT2870 firmware\n"); /* cheap sanity check */ temp = fw->data; bytes = *temp; if(bytes != be64toh(0xffffff0210280210)) { - printf("%s: firmware checksum failed\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "firmware checksum failed\n"); error = EINVAL; goto fail; } @@ -864,8 +859,7 @@ run_load_microcode(struct run_softc *sc) USETW(req.wIndex, 0); USETW(req.wLength, 0); if ((error = usbd_do_request(sc->sc_udev, &sc->sc_mtx, &req, NULL)) != 0) { - printf("%s: firmware reset failed\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "firmware reset failed\n"); goto fail; } @@ -885,8 +879,8 @@ run_load_microcode(struct run_softc *sc) run_delay(sc, 10); } if (ntries == 1000) { - printf("%s: timeout waiting for MCU to initialize\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, + "timeout waiting for MCU to initialize\n"); error = ETIMEDOUT; goto fail; } @@ -3892,8 +3886,7 @@ run_init_locked(struct run_softc *sc) run_delay(sc, 10); } if (ntries == 100) { - printf("%s: timeout waiting for DMA engine\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "timeout waiting for DMA engine\n"); goto fail; } tmp &= 0xff0; @@ -3909,8 +3902,7 @@ run_init_locked(struct run_softc *sc) run_write(sc, RT2860_USB_DMA_CFG, 0); if (run_reset(sc) != 0) { - printf("%s: could not reset chipset\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "could not reset chipset\n"); goto fail; } @@ -3954,8 +3946,7 @@ run_init_locked(struct run_softc *sc) run_delay(sc, 10); if (run_bbp_init(sc) != 0) { - printf("%s: could not initialize BBP\n", - device_get_nameunit(sc->sc_dev)); + device_printf(sc->sc_dev, "could not initialize BBP\n"); goto fail; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:16:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02FF7106566C; Tue, 6 Apr 2010 23:16:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3F228FC13; Tue, 6 Apr 2010 23:16:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NG9KM009773; Tue, 6 Apr 2010 23:16:09 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NG9rn009771; Tue, 6 Apr 2010 23:16:09 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062316.o36NG9rn009771@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206292 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:16:10 -0000 Author: thompsa Date: Tue Apr 6 23:16:09 2010 New Revision: 206292 URL: http://svn.freebsd.org/changeset/base/206292 Log: MFC r203139 Add device ID. PR: usb/142427 Modified: stable/8/sys/dev/usb/wlan/if_rum.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/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Tue Apr 6 23:15:44 2010 (r206291) +++ stable/8/sys/dev/usb/wlan/if_rum.c Tue Apr 6 23:16:09 2010 (r206292) @@ -104,6 +104,7 @@ static const struct usb_device_id rum_de RUM_DEV(COREGA, CGWLUSB2GPX), RUM_DEV(DICKSMITH, CWD854F), RUM_DEV(DICKSMITH, RT2573), + RUM_DEV(EDIMAX, EW7318USG), RUM_DEV(DLINK2, DWLG122C1), RUM_DEV(DLINK2, WUA1340), RUM_DEV(DLINK2, DWA111), From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:16:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C59031065691; Tue, 6 Apr 2010 23:16:40 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2B0F8FC24; Tue, 6 Apr 2010 23:16:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NGe3u009978; Tue, 6 Apr 2010 23:16:40 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NGedL009976; Tue, 6 Apr 2010 23:16:40 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062316.o36NGedL009976@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206293 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:16:40 -0000 Author: thompsa Date: Tue Apr 6 23:16:40 2010 New Revision: 206293 URL: http://svn.freebsd.org/changeset/base/206293 Log: MFC r203140 Optimise EHCI ISOC HS done check. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/controller/ehci.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/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Tue Apr 6 23:16:09 2010 (r206292) +++ stable/8/sys/dev/usb/controller/ehci.c Tue Apr 6 23:16:40 2010 (r206293) @@ -1340,25 +1340,22 @@ ehci_check_transfer(struct usb_xfer *xfe } } else if (methods == &ehci_device_isoc_hs_methods) { ehci_itd_t *td; + uint8_t n = (xfer->nframes & 7); /* isochronous high speed transfer */ + /* check last transfer */ td = xfer->td_transfer_last; usb_pc_cpu_invalidate(td->page_cache); - status = - td->itd_status[0] | td->itd_status[1] | - td->itd_status[2] | td->itd_status[3] | - td->itd_status[4] | td->itd_status[5] | - td->itd_status[6] | td->itd_status[7]; + if (n == 0) + status = td->itd_status[7]; + else + status = td->itd_status[n-1]; /* also check first transfer */ td = xfer->td_transfer_first; usb_pc_cpu_invalidate(td->page_cache); - status |= - td->itd_status[0] | td->itd_status[1] | - td->itd_status[2] | td->itd_status[3] | - td->itd_status[4] | td->itd_status[5] | - td->itd_status[6] | td->itd_status[7]; + status |= td->itd_status[0]; /* if no transactions are active we continue */ if (!(status & htohc32(sc, EHCI_ITD_ACTIVE))) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:17:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 680041065676; Tue, 6 Apr 2010 23:17:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A3D08FC1E; Tue, 6 Apr 2010 23:17:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NHErk010169; Tue, 6 Apr 2010 23:17:14 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NHEt7010166; Tue, 6 Apr 2010 23:17:14 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062317.o36NHEt7010166@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206294 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:17:14 -0000 Author: thompsa Date: Tue Apr 6 23:17:13 2010 New Revision: 206294 URL: http://svn.freebsd.org/changeset/base/206294 Log: MFC r203141 Attempt to recover on a TX error rather than stopping all transfers. Submitted by: Hans Petter Selesky Modified: stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_zyd.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/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Tue Apr 6 23:16:40 2010 (r206293) +++ stable/8/sys/dev/usb/wlan/if_rum.c Tue Apr 6 23:17:13 2010 (r206294) @@ -845,13 +845,18 @@ tr_setup: usbd_xfer_set_priv(xfer, NULL); } - if (error == USB_ERR_STALLED) { - /* try to clear stall first */ + if (error != USB_ERR_CANCELLED) { + if (error == USB_ERR_TIMEOUT) + device_printf(sc->sc_dev, "device timeout\n"); + + /* + * Try to clear stall first, also if other + * errors occur, hence clearing stall + * introduces a 50 ms delay: + */ usbd_xfer_set_stall(xfer); goto tr_setup; } - if (error == USB_ERR_TIMEOUT) - device_printf(sc->sc_dev, "device timeout\n"); break; } } Modified: stable/8/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_zyd.c Tue Apr 6 23:16:40 2010 (r206293) +++ stable/8/sys/dev/usb/wlan/if_zyd.c Tue Apr 6 23:17:13 2010 (r206294) @@ -2449,13 +2449,18 @@ tr_setup: if (data != NULL) zyd_tx_free(data, error); - if (error == USB_ERR_STALLED) { - /* try to clear stall first */ + if (error != USB_ERR_CANCELLED) { + if (error == USB_ERR_TIMEOUT) + device_printf(sc->sc_dev, "device timeout\n"); + + /* + * Try to clear stall first, also if other + * errors occur, hence clearing stall + * introduces a 50 ms delay: + */ usbd_xfer_set_stall(xfer); goto tr_setup; } - if (error == USB_ERR_TIMEOUT) - device_printf(sc->sc_dev, "device timeout\n"); break; } } From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:17:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ADF61065674; Tue, 6 Apr 2010 23:17:44 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17CEA8FC18; Tue, 6 Apr 2010 23:17:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NHhcR010379; Tue, 6 Apr 2010 23:17:43 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NHhsC010377; Tue, 6 Apr 2010 23:17:43 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062317.o36NHhsC010377@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:17:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206295 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:17:44 -0000 Author: thompsa Date: Tue Apr 6 23:17:43 2010 New Revision: 206295 URL: http://svn.freebsd.org/changeset/base/206295 Log: MFC r203142 Sync usb products to perforce. Modified: stable/8/sys/dev/usb/usbdevs 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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:17:13 2010 (r206294) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:17:43 2010 (r206295) @@ -1117,6 +1117,7 @@ product CCYU ED1064 0x2136 EasyDisk ED1 /* Century products */ product CENTURY EX35QUAT 0x011e Century USB Disk Enclosure +product CENTURY EX35SW4_SB4 0x011f Century USB Disk Enclosure /* Cherry products */ product CHERRY MY3000KBD 0x0001 My3000 keyboard @@ -1336,6 +1337,7 @@ product DLINK3 DWM652 0x3e04 DWM-652 /* DMI products */ product DMI CFSM_RW 0xa109 CF/SM Reader/Writer +product DMI DISK 0x2bcf Generic Disk /* DrayTek products */ product DRAYTEK VIGOR550 0x0550 Vigor550 @@ -2147,6 +2149,7 @@ product NETGEAR3 WG111T 0x4250 WG111T product NETGEAR3 WG111T_NF 0x4251 WG111T (no firmware) product NETGEAR3 WPN111 0x5f00 WPN111 product NETGEAR3 WPN111_NF 0x5f01 WPN111 (no firmware) +product NETGEAR3 WPN111_2 0x5f02 WPN111 /* Nikon products */ product NIKON E990 0x0102 Digital Camera E990 From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:18:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B921B106567B; Tue, 6 Apr 2010 23:18:09 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5EFC8FC1E; Tue, 6 Apr 2010 23:18:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NI9ug010554; Tue, 6 Apr 2010 23:18:09 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NI9iw010534; Tue, 6 Apr 2010 23:18:09 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062318.o36NI9iw010534@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206296 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:18:09 -0000 Author: thompsa Date: Tue Apr 6 23:18:09 2010 New Revision: 206296 URL: http://svn.freebsd.org/changeset/base/206296 Log: MFC r203143 Add the Netgear WPN111 Modified: stable/8/sys/dev/usb/wlan/if_uath.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/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Tue Apr 6 23:17:43 2010 (r206295) +++ stable/8/sys/dev/usb/wlan/if_uath.c Tue Apr 6 23:18:09 2010 (r206296) @@ -188,6 +188,7 @@ static const struct usb_device_id uath_d UATH_DEV(NETGEAR, WG111U), UATH_DEV(NETGEAR3, WG111T), UATH_DEV(NETGEAR3, WPN111), + UATH_DEV(NETGEAR3, WPN111_2), UATH_DEV(UMEDIA, TEW444UBEU), UATH_DEV(UMEDIA, AR5523_2), UATH_DEV(UMEDIA, AR5523_3), From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:18:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B82B3106566B; Tue, 6 Apr 2010 23:18:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4A718FC1D; Tue, 6 Apr 2010 23:18:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NIf8G010733; Tue, 6 Apr 2010 23:18:41 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NIfTf010731; Tue, 6 Apr 2010 23:18:41 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062318.o36NIfTf010731@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206297 - stable/8/sys/dev/usb/quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:18:41 -0000 Author: thompsa Date: Tue Apr 6 23:18:41 2010 New Revision: 206297 URL: http://svn.freebsd.org/changeset/base/206297 Log: MFC r203144 Add null check on quirk lookup and add a couple of umass quirks. Submitted by: Hans Petter Selesky Modified: stable/8/sys/dev/usb/quirk/usb_quirk.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/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Tue Apr 6 23:18:09 2010 (r206296) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Tue Apr 6 23:18:41 2010 (r206297) @@ -169,12 +169,14 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(CENTURY, EX35QUAT, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_START_STOP, UQ_MSC_IGNORE_RESIDUE), + USB_QUIRK(CENTURY, EX35SW4_SB4, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(CYPRESS, XX6830XX, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(DESKNOTE, UCR_61S2B, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(DMI, CFSM_RW, 0x0000, 0xffff, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), + USB_QUIRK(DMI, DISK, 0x000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(EPSON, STYLUS_875DC, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), USB_QUIRK(EPSON, STYLUS_895, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -259,8 +261,6 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(MITSUMI, CDRRW, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI | UQ_MSC_FORCE_PROTO_ATAPI), - USB_QUIRK(MITSUMI, FDD, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, - UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(MOTOROLA2, E398, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ, UQ_MSC_NO_INQUIRY_EVPD, UQ_MSC_NO_GETMAXLUN), @@ -680,6 +680,10 @@ usb_quirk_ioctl(unsigned long cmd, caddr mtx_lock(&usb_quirk_mtx); pqe = usb_quirk_get_entry(pgq->vid, pgq->pid, pgq->bcdDeviceLow, pgq->bcdDeviceHigh, 1); + if (pqe == NULL) { + mtx_unlock(&usb_quirk_mtx); + return (EINVAL); + } for (x = 0; x != USB_SUB_QUIRKS_MAX; x++) { if (pqe->quirks[x] == UQ_NONE) { pqe->quirks[x] = y; @@ -714,6 +718,10 @@ usb_quirk_ioctl(unsigned long cmd, caddr mtx_lock(&usb_quirk_mtx); pqe = usb_quirk_get_entry(pgq->vid, pgq->pid, pgq->bcdDeviceLow, pgq->bcdDeviceHigh, 0); + if (pqe == NULL) { + mtx_unlock(&usb_quirk_mtx); + return (EINVAL); + } for (x = 0; x != USB_SUB_QUIRKS_MAX; x++) { if (pqe->quirks[x] == y) { pqe->quirks[x] = UQ_NONE; From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:19:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AA6A1065697; Tue, 6 Apr 2010 23:19:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 172698FC27; Tue, 6 Apr 2010 23:19:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NJB3u010911; Tue, 6 Apr 2010 23:19:11 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NJBVT010909; Tue, 6 Apr 2010 23:19:11 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062319.o36NJBVT010909@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:19:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206298 - stable/8/sys/dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:19:12 -0000 Author: thompsa Date: Tue Apr 6 23:19:11 2010 New Revision: 206298 URL: http://svn.freebsd.org/changeset/base/206298 Log: MFC r203145 Simplify attach for UMASS_PROTO_CBI_I mode and change some switch() returns into breaks. Submitted by: Hans Petter Selesky Modified: stable/8/sys/dev/usb/storage/umass.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/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Tue Apr 6 23:18:41 2010 (r206297) +++ stable/8/sys/dev/usb/storage/umass.c Tue Apr 6 23:19:11 2010 (r206298) @@ -671,7 +671,7 @@ static struct usb_config umass_cbi_confi .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .flags = {.short_xfer_ok = 1,}, + .flags = {.short_xfer_ok = 1,.no_pipe_ok = 1,}, .bufsize = sizeof(umass_cbi_sbl_t), .callback = &umass_t_cbi_status_callback, .timeout = 5000, /* ms */ @@ -984,9 +984,7 @@ umass_attach(device_t dev) err = usbd_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, sc->sc_xfer, umass_cbi_config, - (sc->sc_proto & UMASS_PROTO_CBI_I) ? - UMASS_T_CBI_MAX : (UMASS_T_CBI_MAX - 2), sc, - &sc->sc_mtx); + UMASS_T_CBI_MAX, sc, &sc->sc_mtx); /* skip reset first time */ sc->sc_last_xfer_index = UMASS_T_CBI_COMMAND; @@ -1676,7 +1674,7 @@ umass_t_cbi_reset1_callback(struct usb_x switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: umass_transfer_start(sc, UMASS_T_CBI_RESET2); - return; + break; case USB_ST_SETUP: /* @@ -1723,11 +1721,14 @@ umass_t_cbi_reset1_callback(struct usb_x usbd_xfer_set_frame_len(xfer, 1, sizeof(buf)); usbd_xfer_set_frames(xfer, 2); usbd_transfer_submit(xfer); - return; + break; default: /* Error */ - umass_tr_error(xfer, error); - return; + if (error == USB_ERR_CANCELLED) + umass_tr_error(xfer, error); + else + umass_transfer_start(sc, UMASS_T_CBI_RESET2); + break; } } @@ -1772,17 +1773,17 @@ tr_transferred: } else { umass_transfer_start(sc, next_xfer); } - return; + break; case USB_ST_SETUP: if (usbd_clear_stall_callback(xfer, sc->sc_xfer[stall_xfer])) { goto tr_transferred; /* should not happen */ } - return; + break; default: /* Error */ umass_tr_error(xfer, error); - return; + break; } } @@ -1805,7 +1806,7 @@ umass_t_cbi_command_callback(struct usb_ (sc, (sc->sc_transfer.dir == DIR_IN) ? UMASS_T_CBI_DATA_READ : UMASS_T_CBI_DATA_WRITE); } - return; + break; case USB_ST_SETUP: @@ -1844,12 +1845,13 @@ umass_t_cbi_command_callback(struct usb_ usbd_transfer_submit(xfer); } - return; + break; default: /* Error */ umass_tr_error(xfer, error); - return; - + /* skip reset */ + sc->sc_last_xfer_index = UMASS_T_CBI_COMMAND; + break; } } @@ -1885,7 +1887,7 @@ umass_t_cbi_data_read_callback(struct us if (sc->sc_transfer.data_rem == 0) { umass_cbi_start_status(sc); - return; + break; } if (max_bulk > sc->sc_transfer.data_rem) { max_bulk = sc->sc_transfer.data_rem; @@ -1899,7 +1901,7 @@ umass_t_cbi_data_read_callback(struct us usbd_xfer_set_frame_len(xfer, 0, max_bulk); #endif usbd_transfer_submit(xfer); - return; + break; default: /* Error */ if ((error == USB_ERR_CANCELLED) || @@ -1908,7 +1910,7 @@ umass_t_cbi_data_read_callback(struct us } else { umass_transfer_start(sc, UMASS_T_CBI_DATA_RD_CS); } - return; + break; } } @@ -1948,7 +1950,7 @@ umass_t_cbi_data_write_callback(struct u if (sc->sc_transfer.data_rem == 0) { umass_cbi_start_status(sc); - return; + break; } if (max_bulk > sc->sc_transfer.data_rem) { max_bulk = sc->sc_transfer.data_rem; @@ -1965,7 +1967,7 @@ umass_t_cbi_data_write_callback(struct u #endif usbd_transfer_submit(xfer); - return; + break; default: /* Error */ if ((error == USB_ERR_CANCELLED) || @@ -1974,7 +1976,7 @@ umass_t_cbi_data_write_callback(struct u } else { umass_transfer_start(sc, UMASS_T_CBI_DATA_WR_CS); } - return; + break; } } @@ -2035,7 +2037,7 @@ umass_t_cbi_status_callback(struct usb_x (sc->sc_transfer.callback) (sc, ccb, residue, status); - return; + break; } else { @@ -2060,7 +2062,7 @@ umass_t_cbi_status_callback(struct usb_x (sc->sc_transfer.callback) (sc, ccb, residue, status); - return; + break; } } @@ -2070,13 +2072,13 @@ umass_t_cbi_status_callback(struct usb_x tr_setup: usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); usbd_transfer_submit(xfer); - return; + break; default: /* Error */ DPRINTF(sc, UDMASS_CBI, "Failed to read CSW: %s\n", usbd_errstr(error)); umass_tr_error(xfer, error); - return; + break; } } From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:19:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 067FA1065670; Tue, 6 Apr 2010 23:19:43 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAF6F8FC1E; Tue, 6 Apr 2010 23:19:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NJhpM011121; Tue, 6 Apr 2010 23:19:43 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NJhxq011117; Tue, 6 Apr 2010 23:19:43 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062319.o36NJhxq011117@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206299 - stable/8/sys/dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:19:44 -0000 Author: thompsa Date: Tue Apr 6 23:19:43 2010 New Revision: 206299 URL: http://svn.freebsd.org/changeset/base/206299 Log: MFC r203146 Rework cam error handling to fix Mitsumi floppy drives. Submitted by: mav Modified: stable/8/sys/dev/usb/storage/umass.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/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Tue Apr 6 23:19:11 2010 (r206298) +++ stable/8/sys/dev/usb/storage/umass.c Tue Apr 6 23:19:43 2010 (r206299) @@ -2594,11 +2594,19 @@ umass_cam_cb(struct umass_softc *sc, uni default: /* - * the wire protocol failed and will have recovered - * (hopefully). We return an error to CAM and let CAM retry - * the command if necessary. + * The wire protocol failed and will hopefully have + * recovered. We return an error to CAM and let CAM + * retry the command if necessary. In case of SCSI IO + * commands we ask the CAM layer to check the + * condition first. This is a quick hack to make + * certain devices work. */ - ccb->ccb_h.status = CAM_REQ_CMP_ERR; + if (ccb->ccb_h.func_code == XPT_SCSI_IO) { + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; + } else { + ccb->ccb_h.status = CAM_REQ_CMP_ERR; + } xpt_done(ccb); break; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:20:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CFC7106566C; Tue, 6 Apr 2010 23:20:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F35B68FC14; Tue, 6 Apr 2010 23:20:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NKDVG011309; Tue, 6 Apr 2010 23:20:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NKDIn011306; Tue, 6 Apr 2010 23:20:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062320.o36NKDIn011306@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206300 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:20:14 -0000 Author: thompsa Date: Tue Apr 6 23:20:13 2010 New Revision: 206300 URL: http://svn.freebsd.org/changeset/base/206300 Log: MFC r203506 Properly name the 0x0016 ZTE product as MF633R now that its known. Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs 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/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Tue Apr 6 23:19:43 2010 (r206299) +++ stable/8/sys/dev/usb/serial/u3g.c Tue Apr 6 23:20:13 2010 (r206300) @@ -362,7 +362,6 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E0012, 0), U3G_DEV(QUALCOMMINC, E0013, 0), U3G_DEV(QUALCOMMINC, E0014, 0), - U3G_DEV(QUALCOMMINC, E0016, 0), U3G_DEV(QUALCOMMINC, E0017, 0), U3G_DEV(QUALCOMMINC, E0018, 0), U3G_DEV(QUALCOMMINC, E0019, 0), @@ -409,6 +408,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), + U3G_DEV(QUALCOMMINC, MF633R, 0), U3G_DEV(QUANTA, GKE, 0), U3G_DEV(QUANTA, GLE, 0), U3G_DEV(QUANTA, GLX, 0), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:19:43 2010 (r206299) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:20:13 2010 (r206300) @@ -2430,7 +2430,7 @@ product QUALCOMMINC E0012 0x0012 3G mode product QUALCOMMINC E0013 0x0013 3G modem product QUALCOMMINC E0014 0x0014 3G modem product QUALCOMMINC MF628 0x0015 3G modem -product QUALCOMMINC E0016 0x0016 3G modem +product QUALCOMMINC MF633R 0x0016 ZTE WCDMA modem product QUALCOMMINC E0017 0x0017 3G modem product QUALCOMMINC E0018 0x0018 3G modem product QUALCOMMINC E0019 0x0019 3G modem From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:20:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCC07106567B; Tue, 6 Apr 2010 23:20:41 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7DCD8FC16; Tue, 6 Apr 2010 23:20:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NKfPN011492; Tue, 6 Apr 2010 23:20:41 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NKfki011489; Tue, 6 Apr 2010 23:20:41 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062320.o36NKfki011489@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:20:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206301 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:20:42 -0000 Author: thompsa Date: Tue Apr 6 23:20:41 2010 New Revision: 206301 URL: http://svn.freebsd.org/changeset/base/206301 Log: MFC r203507 The ZTE MF633R modem has a different type of cdrom driver disk, add the product ID and use a standard scsi eject. Reported by: Patrick Lamaiziere Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs 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/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Tue Apr 6 23:20:13 2010 (r206300) +++ stable/8/sys/dev/usb/serial/u3g.c Tue Apr 6 23:20:41 2010 (r206301) @@ -498,6 +498,7 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, ZEROCD, U3GINIT_SCSIEJECT), U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), U3G_DEV(QUALCOMMINC, ZTE_STOR, U3GINIT_ZTESTOR), + U3G_DEV(QUALCOMMINC, ZTE_STOR2, U3GINIT_SCSIEJECT), U3G_DEV(SIERRA, TRUINSTALL, U3GINIT_SIERRA), #undef U3G_DEV }; Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:20:13 2010 (r206300) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:20:41 2010 (r206301) @@ -2456,6 +2456,7 @@ product QUALCOMMINC E0048 0x0048 3G mode product QUALCOMMINC E0049 0x0049 3G modem product QUALCOMMINC E0051 0x0051 3G modem product QUALCOMMINC E0052 0x0052 3G modem +product QUALCOMMINC ZTE_STOR2 0x0053 USB ZTE Storage product QUALCOMMINC E0054 0x0054 3G modem product QUALCOMMINC E0055 0x0055 3G modem product QUALCOMMINC E0057 0x0057 3G modem From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:21:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 627E11065670; Tue, 6 Apr 2010 23:21:06 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1378FC0A; Tue, 6 Apr 2010 23:21:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NL696011667; Tue, 6 Apr 2010 23:21:06 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NL6px011663; Tue, 6 Apr 2010 23:21:06 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062321.o36NL6px011663@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206302 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:21:06 -0000 Author: thompsa Date: Tue Apr 6 23:21:06 2010 New Revision: 206302 URL: http://svn.freebsd.org/changeset/base/206302 Log: MFC r203693 Disable the use of the IAAD usb doorbell on NVidia controllers as it can cause the hardware to stall. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/controller/ehci.c stable/8/sys/dev/usb/controller/ehci.h stable/8/sys/dev/usb/controller/ehci_pci.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/usb/controller/ehci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.c Tue Apr 6 23:20:41 2010 (r206301) +++ stable/8/sys/dev/usb/controller/ehci.c Tue Apr 6 23:21:06 2010 (r206302) @@ -92,15 +92,23 @@ __FBSDID("$FreeBSD$"); #if USB_DEBUG static int ehcidebug = 0; static int ehcinohighspeed = 0; +static int ehciiaadbug = 0; +static int ehcilostintrbug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, ehci, CTLFLAG_RW, 0, "USB ehci"); SYSCTL_INT(_hw_usb_ehci, OID_AUTO, debug, CTLFLAG_RW, &ehcidebug, 0, "Debug level"); SYSCTL_INT(_hw_usb_ehci, OID_AUTO, no_hs, CTLFLAG_RW, &ehcinohighspeed, 0, "Disable High Speed USB"); +SYSCTL_INT(_hw_usb_ehci, OID_AUTO, iaadbug, CTLFLAG_RW, + &ehciiaadbug, 0, "Enable doorbell bug workaround"); +SYSCTL_INT(_hw_usb_ehci, OID_AUTO, lostintrbug, CTLFLAG_RW, + &ehcilostintrbug, 0, "Enable lost interrupt bug workaround"); TUNABLE_INT("hw.usb.ehci.debug", &ehcidebug); TUNABLE_INT("hw.usb.ehci.no_hs", &ehcinohighspeed); +TUNABLE_INT("hw.usb.ehci.iaadbug", &ehciiaadbug); +TUNABLE_INT("hw.usb.ehci.lostintrbug", &ehcilostintrbug); static void ehci_dump_regs(ehci_softc_t *sc); static void ehci_dump_sqh(ehci_softc_t *sc, ehci_qh_t *sqh); @@ -251,6 +259,10 @@ ehci_init(ehci_softc_t *sc) usb_callout_init_mtx(&sc->sc_tmo_poll, &sc->sc_bus.bus_mtx, 0); #if USB_DEBUG + if (ehciiaadbug) + sc->sc_flags |= EHCI_SCFLG_IAADBUG; + if (ehcilostintrbug) + sc->sc_flags |= EHCI_SCFLG_LOSTINTRBUG; if (ehcidebug > 2) { ehci_dump_regs(sc); } @@ -2280,6 +2292,13 @@ ehci_device_bulk_start(struct usb_xfer * /* put transfer on interrupt queue */ ehci_transfer_intr_enqueue(xfer); + /* + * XXX Certain nVidia chipsets choke when using the IAAD + * feature too frequently. + */ + if (sc->sc_flags & EHCI_SCFLG_IAADBUG) + return; + /* XXX Performance quirk: Some Host Controllers have a too low * interrupt rate. Issue an IAAD to stimulate the Host * Controller after queueing the BULK transfer. Modified: stable/8/sys/dev/usb/controller/ehci.h ============================================================================== --- stable/8/sys/dev/usb/controller/ehci.h Tue Apr 6 23:20:41 2010 (r206301) +++ stable/8/sys/dev/usb/controller/ehci.h Tue Apr 6 23:21:06 2010 (r206302) @@ -350,6 +350,7 @@ typedef struct ehci_softc { #define EHCI_SCFLG_BIGEMMIO 0x0010 /* big-endian byte order MMIO */ #define EHCI_SCFLG_TT 0x0020 /* transaction translator present */ #define EHCI_SCFLG_LOSTINTRBUG 0x0040 /* workaround for VIA / ATI chipsets */ +#define EHCI_SCFLG_IAADBUG 0x0080 /* workaround for nVidia chipsets */ uint8_t sc_offs; /* offset to operational registers */ uint8_t sc_doorbell_disable; /* set on doorbell failure */ Modified: stable/8/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci_pci.c Tue Apr 6 23:20:41 2010 (r206301) +++ stable/8/sys/dev/usb/controller/ehci_pci.c Tue Apr 6 23:21:06 2010 (r206302) @@ -466,6 +466,19 @@ ehci_pci_attach(device_t self) break; } + /* Doorbell feature workaround */ + switch (pci_get_vendor(self)) { + case PCI_EHCI_VENDORID_NVIDIA: + case PCI_EHCI_VENDORID_NVIDIA2: + sc->sc_flags |= EHCI_SCFLG_IAADBUG; + if (bootverbose) + device_printf(self, + "Doorbell workaround enabled\n"); + break; + default: + break; + } + err = ehci_init(sc); if (!err) { err = device_probe_and_attach(sc->sc_bus.bdev); From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:21:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8680F106564A; Tue, 6 Apr 2010 23:21:30 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 725A28FC13; Tue, 6 Apr 2010 23:21:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NLU10011837; Tue, 6 Apr 2010 23:21:30 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NLUTS011835; Tue, 6 Apr 2010 23:21:30 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062321.o36NLUTS011835@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206303 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:21:30 -0000 Author: thompsa Date: Tue Apr 6 23:21:30 2010 New Revision: 206303 URL: http://svn.freebsd.org/changeset/base/206303 Log: MFC r203896 Detect when we are polling from kernel via cngetc() in the boot process and reserve the keypresses so they do not get passed to syscons. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/input/ukbd.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/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Tue Apr 6 23:21:06 2010 (r206302) +++ stable/8/sys/dev/usb/input/ukbd.c Tue Apr 6 23:21:30 2010 (r206303) @@ -151,6 +151,7 @@ struct ukbd_softc { struct ukbd_data sc_ndata; struct ukbd_data sc_odata; + struct thread *sc_poll_thread; struct usb_device *sc_udev; struct usb_interface *sc_iface; struct usb_xfer *sc_xfer[UKBD_N_TRANSFER]; @@ -174,9 +175,10 @@ struct ukbd_softc { #define UKBD_FLAG_APPLE_SWAP 0x0100 #define UKBD_FLAG_TIMER_RUNNING 0x0200 - int32_t sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ - int32_t sc_state; /* shift/lock key state */ - int32_t sc_accents; /* accent key index (> 0) */ + int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ + int sc_state; /* shift/lock key state */ + int sc_accents; /* accent key index (> 0) */ + int sc_poll_tick_last; uint16_t sc_inputs; uint16_t sc_inputhead; @@ -187,6 +189,7 @@ struct ukbd_softc { uint8_t sc_iface_no; uint8_t sc_kbd_id; uint8_t sc_led_id; + uint8_t sc_poll_detected; }; #define KEY_ERROR 0x01 @@ -281,6 +284,9 @@ static int ukbd_ioctl(keyboard_t *, u_lo static int ukbd_enable(keyboard_t *); static int ukbd_disable(keyboard_t *); static void ukbd_interrupt(struct ukbd_softc *); +static int ukbd_is_polling(struct ukbd_softc *); +static int ukbd_polls_other_thread(struct ukbd_softc *); +static void ukbd_event_keyinput(struct ukbd_softc *); static device_probe_t ukbd_probe; static device_attach_t ukbd_attach; @@ -331,8 +337,21 @@ ukbd_do_poll(struct ukbd_softc *sc, uint { DPRINTFN(2, "polling\n"); - if (kdb_active == 0) + /* update stats about last polling event */ + sc->sc_poll_tick_last = ticks; + sc->sc_poll_detected = 1; + + if (kdb_active == 0) { + while (sc->sc_inputs == 0) { + /* make sure the USB code gets a chance to run */ + pause("UKBD", 1); + + /* check if we should wait */ + if (!wait) + break; + } return; /* Only poll if KDB is active */ + } while (sc->sc_inputs == 0) { @@ -366,9 +385,13 @@ ukbd_get_key(struct ukbd_softc *sc, uint /* start transfer, if not already started */ usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]); } - if (sc->sc_flags & UKBD_FLAG_POLLING) { + + if (ukbd_polls_other_thread(sc)) + return (-1); + + if (sc->sc_flags & UKBD_FLAG_POLLING) ukbd_do_poll(sc, wait); - } + if (sc->sc_inputs == 0) { c = -1; } else { @@ -389,14 +412,13 @@ ukbd_interrupt(struct ukbd_softc *sc) uint32_t o_mod; uint32_t now = sc->sc_time_ms; uint32_t dtime; - uint32_t c; uint8_t key; uint8_t i; uint8_t j; - if (sc->sc_ndata.keycode[0] == KEY_ERROR) { - goto done; - } + if (sc->sc_ndata.keycode[0] == KEY_ERROR) + return; + n_mod = sc->sc_ndata.modifiers; o_mod = sc->sc_odata.modifiers; if (n_mod != o_mod) { @@ -469,14 +491,22 @@ pfound: ; sc->sc_odata = sc->sc_ndata; - bcopy(sc->sc_ntime, sc->sc_otime, sizeof(sc->sc_otime)); + memcpy(sc->sc_otime, sc->sc_ntime, sizeof(sc->sc_otime)); + + ukbd_event_keyinput(sc); +} + +static void +ukbd_event_keyinput(struct ukbd_softc *sc) +{ + int c; + + if (ukbd_is_polling(sc)) + return; + + if (sc->sc_inputs == 0) + return; - if (sc->sc_inputs == 0) { - goto done; - } - if (sc->sc_flags & UKBD_FLAG_POLLING) { - goto done; - } if (KBD_IS_ACTIVE(&sc->sc_kbd) && KBD_IS_BUSY(&sc->sc_kbd)) { /* let the callback function process the input */ @@ -488,8 +518,6 @@ pfound: ; c = ukbd_read_char(&sc->sc_kbd, 0); } while (c != NOKEY); } -done: - return; } static void @@ -499,12 +527,14 @@ ukbd_timeout(void *arg) mtx_assert(&Giant, MA_OWNED); - if (!(sc->sc_flags & UKBD_FLAG_POLLING)) { - sc->sc_time_ms += 25; /* milliseconds */ - } + sc->sc_time_ms += 25; /* milliseconds */ + ukbd_interrupt(sc); - if (ukbd_any_key_pressed(sc)) { + /* Make sure any leftover key events gets read out */ + ukbd_event_keyinput(sc); + + if (ukbd_any_key_pressed(sc) || (sc->sc_inputs != 0)) { ukbd_start_timer(sc); } else { sc->sc_flags &= ~UKBD_FLAG_TIMER_RUNNING; @@ -837,6 +867,18 @@ ukbd_attach(device_t dev) */ KBD_PROBE_DONE(kbd); + /* + * Set boot protocol if we need the quirk. + */ + if (usb_test_quirk(uaa, UQ_KBD_BOOTPROTO)) { + err = usbd_req_set_protocol(sc->sc_udev, NULL, + sc->sc_iface_index, 0); + if (err != USB_ERR_NORMAL_COMPLETION) { + DPRINTF("set protocol error=%s\n", usbd_errstr(err)); + goto detach; + } + } + /* figure out if there is an ID byte in the data */ err = usbd_req_get_hid_desc(uaa->device, NULL, &hid_ptr, &hid_len, M_TEMP, uaa->info.bIfaceIndex); @@ -880,10 +922,14 @@ ukbd_attach(device_t dev) /* ignore if SETIDLE fails, hence it is not crucial */ err = usbd_req_set_idle(sc->sc_udev, NULL, sc->sc_iface_index, 0, 0); + mtx_lock(&Giant); + ukbd_ioctl(kbd, KDSETLED, (caddr_t)&sc->sc_state); KBD_INIT_DONE(kbd); + mtx_unlock(&Giant); + if (kbd_register(kbd) < 0) { goto detach; } @@ -925,9 +971,8 @@ ukbd_detach(device_t dev) DPRINTF("\n"); - if (sc->sc_flags & UKBD_FLAG_POLLING) { - panic("cannot detach polled keyboard\n"); - } + mtx_lock(&Giant); + sc->sc_flags |= UKBD_FLAG_GONE; usb_callout_stop(&sc->sc_callout); @@ -954,6 +999,8 @@ ukbd_detach(device_t dev) } sc->sc_kbd.kb_flags = 0; + mtx_unlock(&Giant); + usbd_transfer_unsetup(sc->sc_xfer, UKBD_N_TRANSFER); usb_callout_drain(&sc->sc_callout); @@ -969,8 +1016,12 @@ ukbd_resume(device_t dev) { struct ukbd_softc *sc = device_get_softc(dev); + mtx_lock(&Giant); + ukbd_clear_state(&sc->sc_kbd); + mtx_unlock(&Giant); + return (0); } @@ -1076,13 +1127,19 @@ ukbd_check(keyboard_t *kbd) mtx_unlock(&Giant); return (retval); } - ukbd_do_poll(sc, 0); } else { /* XXX the keyboard layer requires Giant */ if (!mtx_owned(&Giant)) return (0); } + /* check if key belongs to this thread */ + if (ukbd_polls_other_thread(sc)) + return (0); + + if (sc->sc_flags & UKBD_FLAG_POLLING) + ukbd_do_poll(sc, 0); + #ifdef UKBD_EMULATE_ATSCANCODE if (sc->sc_buffered_char[0]) { return (1); @@ -1118,6 +1175,10 @@ ukbd_check_char(keyboard_t *kbd) return (0); } + /* check if key belongs to this thread */ + if (ukbd_polls_other_thread(sc)) + return (0); + if ((sc->sc_composed_char > 0) && (!(sc->sc_flags & UKBD_FLAG_COMPOSE))) { return (1); @@ -1156,6 +1217,10 @@ ukbd_read(keyboard_t *kbd, int wait) return (-1); } + /* check if key belongs to this thread */ + if (ukbd_polls_other_thread(sc)) + return (-1); + #ifdef UKBD_EMULATE_ATSCANCODE if (sc->sc_buffered_char[0]) { scancode = sc->sc_buffered_char[0]; @@ -1220,6 +1285,10 @@ ukbd_read_char(keyboard_t *kbd, int wait return (NOKEY); } + /* check if key belongs to this thread */ + if (ukbd_polls_other_thread(sc)) + return (NOKEY); + next_code: /* do we have a composed char to return ? */ @@ -1419,7 +1488,17 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, * keyboard system must get out of "Giant" first, before the * CPU can proceed here ... */ - return (EINVAL); + switch (cmd) { + case KDGKBMODE: + case KDSKBMODE: + /* workaround for Geli */ + mtx_lock(&Giant); + i = ukbd_ioctl(kbd, cmd, arg); + mtx_unlock(&Giant); + return (i); + default: + return (EINVAL); + } } switch (cmd) { @@ -1445,7 +1524,8 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, case K_RAW: case K_CODE: if (sc->sc_mode != *(int *)arg) { - ukbd_clear_state(kbd); + if (ukbd_is_polling(sc) == 0) + ukbd_clear_state(kbd); sc->sc_mode = *(int *)arg; } break; @@ -1552,7 +1632,11 @@ ukbd_clear_state(keyboard_t *kbd) struct ukbd_softc *sc = kbd->kb_data; if (!mtx_owned(&Giant)) { - return; /* XXX */ + /* XXX cludge */ + mtx_lock(&Giant); + ukbd_clear_state(kbd); + mtx_unlock(&Giant); + return; } sc->sc_flags &= ~(UKBD_FLAG_COMPOSE | UKBD_FLAG_POLLING); @@ -1563,10 +1647,10 @@ ukbd_clear_state(keyboard_t *kbd) sc->sc_buffered_char[0] = 0; sc->sc_buffered_char[1] = 0; #endif - bzero(&sc->sc_ndata, sizeof(sc->sc_ndata)); - bzero(&sc->sc_odata, sizeof(sc->sc_odata)); - bzero(&sc->sc_ntime, sizeof(sc->sc_ntime)); - bzero(&sc->sc_otime, sizeof(sc->sc_otime)); + memset(&sc->sc_ndata, 0, sizeof(sc->sc_ndata)); + memset(&sc->sc_odata, 0, sizeof(sc->sc_odata)); + memset(&sc->sc_ntime, 0, sizeof(sc->sc_ntime)); + memset(&sc->sc_otime, 0, sizeof(sc->sc_otime)); } /* save the internal state, not used */ @@ -1584,6 +1668,30 @@ ukbd_set_state(keyboard_t *kbd, void *bu } static int +ukbd_is_polling(struct ukbd_softc *sc) +{ + int delta; + + if (sc->sc_flags & UKBD_FLAG_POLLING) + return (1); /* polling */ + + delta = ticks - sc->sc_poll_tick_last; + if ((delta < 0) || (delta >= hz)) { + sc->sc_poll_detected = 0; + return (0); /* not polling */ + } + + return (sc->sc_poll_detected); +} + +static int +ukbd_polls_other_thread(struct ukbd_softc *sc) +{ + return (ukbd_is_polling(sc) && + (sc->sc_poll_thread != curthread)); +} + +static int ukbd_poll(keyboard_t *kbd, int on) { struct ukbd_softc *sc = kbd->kb_data; @@ -1599,8 +1707,10 @@ ukbd_poll(keyboard_t *kbd, int on) if (on) { sc->sc_flags |= UKBD_FLAG_POLLING; + sc->sc_poll_thread = curthread; } else { sc->sc_flags &= ~UKBD_FLAG_POLLING; + ukbd_start_timer(sc); /* start timer */ } return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:21:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45073106564A; Tue, 6 Apr 2010 23:21:55 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31D238FC24; Tue, 6 Apr 2010 23:21:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NLtqo011976; Tue, 6 Apr 2010 23:21:55 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NLtpO011973; Tue, 6 Apr 2010 23:21:55 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062321.o36NLtpO011973@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206304 - stable/8/sys/dev/usb/quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:21:55 -0000 Author: thompsa Date: Tue Apr 6 23:21:54 2010 New Revision: 206304 URL: http://svn.freebsd.org/changeset/base/206304 Log: MFC r203899 Add UQ_KBD_BOOTPROTO quirk needed in r203896 Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/quirk/usb_quirk.h 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/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Tue Apr 6 23:21:30 2010 (r206303) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Tue Apr 6 23:21:54 2010 (r206304) @@ -459,6 +459,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_BUS_POWERED] = "UQ_BUS_POWERED", [UQ_HID_IGNORE] = "UQ_HID_IGNORE", [UQ_KBD_IGNORE] = "UQ_KBD_IGNORE", + [UQ_KBD_BOOTPROTO] = "UQ_KBD_BOOTPROTO", [UQ_MS_BAD_CLASS] = "UQ_MS_BAD_CLASS", [UQ_MS_LEADING_BYTE] = "UQ_MS_LEADING_BYTE", [UQ_MS_REVZ] = "UQ_MS_REVZ", Modified: stable/8/sys/dev/usb/quirk/usb_quirk.h ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.h Tue Apr 6 23:21:30 2010 (r206303) +++ stable/8/sys/dev/usb/quirk/usb_quirk.h Tue Apr 6 23:21:54 2010 (r206304) @@ -45,6 +45,7 @@ enum { /* keep in sync with usb_quirk_st UQ_BUS_POWERED, /* device is bus powered, despite claim */ UQ_HID_IGNORE, /* device should be ignored by hid class */ UQ_KBD_IGNORE, /* device should be ignored by kbd class */ + UQ_KBD_BOOTPROTO, /* device should set the boot protocol */ UQ_MS_BAD_CLASS, /* doesn't identify properly */ UQ_MS_LEADING_BYTE, /* mouse sends an unknown leading byte */ UQ_MS_REVZ, /* mouse has Z-axis reversed */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:22:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 169D7106568D; Tue, 6 Apr 2010 23:22:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 035718FC19; Tue, 6 Apr 2010 23:22:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NMJq8012162; Tue, 6 Apr 2010 23:22:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NMJVN012160; Tue, 6 Apr 2010 23:22:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062322.o36NMJVN012160@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206305 - stable/8/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:22:20 -0000 Author: thompsa Date: Tue Apr 6 23:22:19 2010 New Revision: 206305 URL: http://svn.freebsd.org/changeset/base/206305 Log: MFC r203903 Make umodem more tolerant for devices which modem descriptors are misplaced. Reported by: Erick Wales Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/serial/umodem.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/usb/serial/umodem.c ============================================================================== --- stable/8/sys/dev/usb/serial/umodem.c Tue Apr 6 23:21:54 2010 (r206304) +++ stable/8/sys/dev/usb/serial/umodem.c Tue Apr 6 23:22:19 2010 (r206305) @@ -312,11 +312,16 @@ umodem_attach(device_t dev) 0 - 1, UDESCSUB_CDC_UNION, 0 - 1); if ((cud == NULL) || (cud->bLength < sizeof(*cud))) { - device_printf(dev, "no CM or union descriptor\n"); - goto detach; + device_printf(dev, "Missing descriptor. " + "Assuming data interface is next.\n"); + if (sc->sc_ctrl_iface_no == 0xFF) + goto detach; + else + sc->sc_data_iface_no = + sc->sc_ctrl_iface_no + 1; + } else { + sc->sc_data_iface_no = cud->bSlaveInterface[0]; } - - sc->sc_data_iface_no = cud->bSlaveInterface[0]; } else { sc->sc_data_iface_no = cmd->bDataInterface; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:22:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC5ED1065677; Tue, 6 Apr 2010 23:22:47 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A89FB8FC0A; Tue, 6 Apr 2010 23:22:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NMlpC012337; Tue, 6 Apr 2010 23:22:47 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NMlr9012332; Tue, 6 Apr 2010 23:22:47 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062322.o36NMlr9012332@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206306 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:22:47 -0000 Author: thompsa Date: Tue Apr 6 23:22:47 2010 New Revision: 206306 URL: http://svn.freebsd.org/changeset/base/206306 Log: MFC r203905 Add support for the E1752 3G modem and the required eject command. Submitted by: Milan Obuch Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usb_msctest.c stable/8/sys/dev/usb/usb_msctest.h stable/8/sys/dev/usb/usbdevs 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/usb/serial/u3g.c ============================================================================== --- stable/8/sys/dev/usb/serial/u3g.c Tue Apr 6 23:22:19 2010 (r206305) +++ stable/8/sys/dev/usb/serial/u3g.c Tue Apr 6 23:22:47 2010 (r206306) @@ -92,6 +92,7 @@ SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, #define U3GINIT_CMOTECH 6 /* Requires CMOTECH SCSI command */ #define U3GINIT_WAIT 7 /* Device reappears after a delay */ #define U3GINIT_SAEL_M460 8 /* Requires vendor init */ +#define U3GINIT_HUAWEISCSI 9 /* Requires Huawei SCSI init command */ enum { U3G_BULK_WR, @@ -281,6 +282,7 @@ static const struct usb_device_id u3g_de U3G_DEV(HUAWEI, E220, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, E220BIS, U3GINIT_HUAWEI), U3G_DEV(HUAWEI, MOBILE, U3GINIT_HUAWEI), + U3G_DEV(HUAWEI, E1752, U3GINIT_HUAWEISCSI), U3G_DEV(KYOCERA2, CDMA_MSM_K, 0), U3G_DEV(KYOCERA2, KPC680, 0), U3G_DEV(MERLIN, V620, 0), @@ -649,6 +651,9 @@ u3g_test_autoinst(void *arg, struct usb_ case U3GINIT_HUAWEI: error = u3g_huawei_init(udev); break; + case U3GINIT_HUAWEISCSI: + error = usb_msc_eject(udev, 0, MSC_EJECT_HUAWEI); + break; case U3GINIT_SCSIEJECT: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); break; Modified: stable/8/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.c Tue Apr 6 23:22:19 2010 (r206305) +++ stable/8/sys/dev/usb/usb_msctest.c Tue Apr 6 23:22:47 2010 (r206306) @@ -94,6 +94,9 @@ static uint8_t scsi_ztestor_eject[] = 0x01, 0x01, 0x01, 0x01, 0x00, 0x00 }; static uint8_t scsi_cmotech_eject[] = { 0xff, 0x52, 0x44, 0x45, 0x56, 0x43, 0x48, 0x47 }; +static uint8_t scsi_huawei_eject[] = { 0x11, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -611,6 +614,11 @@ usb_msc_eject(struct usb_device *udev, u &scsi_cmotech_eject, sizeof(scsi_cmotech_eject), USB_MS_HZ); break; + case MSC_EJECT_HUAWEI: + err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, + &scsi_huawei_eject, sizeof(scsi_huawei_eject), + USB_MS_HZ); + break; default: printf("usb_msc_eject: unknown eject method (%d)\n", method); break; Modified: stable/8/sys/dev/usb/usb_msctest.h ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.h Tue Apr 6 23:22:19 2010 (r206305) +++ stable/8/sys/dev/usb/usb_msctest.h Tue Apr 6 23:22:47 2010 (r206306) @@ -31,7 +31,8 @@ enum { MSC_EJECT_STOPUNIT, MSC_EJECT_REZERO, MSC_EJECT_ZTESTOR, - MSC_EJECT_CMOTECH + MSC_EJECT_CMOTECH, + MSC_EJECT_HUAWEI, }; int usb_iface_is_cdrom(struct usb_device *udev, Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:22:19 2010 (r206305) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:22:47 2010 (r206306) @@ -1723,6 +1723,7 @@ product HUAWEI E143C 0x143c 3G modem product HUAWEI E143D 0x143d 3G modem product HUAWEI E143E 0x143e 3G modem product HUAWEI E143F 0x143f 3G modem +product HUAWEI E1752 0x1446 3G modem product HUAWEI E14AC 0x14ac 3G modem /* HUAWEI 3com products */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:23:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20E061065702; Tue, 6 Apr 2010 23:23:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E736F8FC16; Tue, 6 Apr 2010 23:23:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NNJ2N012554; Tue, 6 Apr 2010 23:23:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NNJI4012551; Tue, 6 Apr 2010 23:23:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062323.o36NNJI4012551@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206307 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:23:20 -0000 Author: thompsa Date: Tue Apr 6 23:23:19 2010 New Revision: 206307 URL: http://svn.freebsd.org/changeset/base/206307 Log: MFC r203906 Add device ID for the FTDI 4232H. PR: usb/143832 Submitted by: UEMURA Tetsuya Modified: stable/8/sys/dev/usb/serial/uftdi.c stable/8/sys/dev/usb/usbdevs 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/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Tue Apr 6 23:22:47 2010 (r206306) +++ stable/8/sys/dev/usb/serial/uftdi.c Tue Apr 6 23:23:19 2010 (r206307) @@ -224,6 +224,7 @@ static struct usb_device_id uftdi_devs[] UFTDI_DEV(FTDI, SERIAL_8U100AX, SIO), UFTDI_DEV(FTDI, SERIAL_2232C, 8U232AM), UFTDI_DEV(FTDI, SERIAL_2232D, 8U232AM), + UFTDI_DEV(FTDI, SERIAL_4232H, 8U232AM), UFTDI_DEV(FTDI, SERIAL_8U232AM, 8U232AM), UFTDI_DEV(FTDI, SERIAL_8U232AM4, 8U232AM), UFTDI_DEV(FTDI, SEMC_DSS20, 8U232AM), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:22:47 2010 (r206306) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:23:19 2010 (r206307) @@ -1472,6 +1472,7 @@ product FTDI SERIAL_8U232AM 0x6001 8U232 product FTDI SERIAL_8U232AM4 0x6004 8U232AM Serial product FTDI SERIAL_2232C 0x6010 FT2232C Dual port Serial product FTDI SERIAL_2232D 0x9e90 FT2232D Dual port Serial +product FTDI SERIAL_4232H 0x6011 FT4232H Quad port Serial /* Gude Analog- und Digitalsysteme products also uses FTDI's id: */ product FTDI TACTRIX_OPENPORT_13M 0xcc48 OpenPort 1.3 Mitsubishi product FTDI TACTRIX_OPENPORT_13S 0xcc49 OpenPort 1.3 Subaru From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:23:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 632F01065672; Tue, 6 Apr 2010 23:23:43 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EF478FC27; Tue, 6 Apr 2010 23:23:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NNh9A012689; Tue, 6 Apr 2010 23:23:43 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NNh1t012687; Tue, 6 Apr 2010 23:23:43 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062323.o36NNh1t012687@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:23:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206308 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:23:45 -0000 Author: thompsa Date: Tue Apr 6 23:23:43 2010 New Revision: 206308 URL: http://svn.freebsd.org/changeset/base/206308 Log: MFC r205005 Wrap the proc wakeup special case for ddb in ifdef DDB. Submitted by: Giovanni Trematerra Modified: stable/8/sys/dev/usb/controller/usb_controller.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/usb/controller/usb_controller.c ============================================================================== --- stable/8/sys/dev/usb/controller/usb_controller.c Tue Apr 6 23:23:19 2010 (r206307) +++ stable/8/sys/dev/usb/controller/usb_controller.c Tue Apr 6 23:23:43 2010 (r206308) @@ -24,6 +24,8 @@ * SUCH DAMAGE. */ +#include "opt_ddb.h" + #include #include #include @@ -220,6 +222,7 @@ usb_bus_explore(struct usb_proc_msg *pm) bus->driver_added_refcount = 1; } +#ifdef DDB /* * The following three lines of code are only here to * recover from DDB: @@ -227,6 +230,7 @@ usb_bus_explore(struct usb_proc_msg *pm) usb_proc_rewakeup(&bus->control_xfer_proc); usb_proc_rewakeup(&bus->giant_callback_proc); usb_proc_rewakeup(&bus->non_giant_callback_proc); +#endif USB_BUS_UNLOCK(bus); @@ -289,11 +293,13 @@ usb_power_wdog(void *arg) usb_callout_reset(&bus->power_wdog, 4 * hz, usb_power_wdog, arg); +#ifdef DDB /* * The following line of code is only here to recover from * DDB: */ usb_proc_rewakeup(&bus->explore_proc); /* recover from DDB */ +#endif USB_BUS_UNLOCK(bus); From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:24:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B126F106566C; Tue, 6 Apr 2010 23:24:07 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E0DB8FC21; Tue, 6 Apr 2010 23:24:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NO71l012861; Tue, 6 Apr 2010 23:24:07 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NO7dI012859; Tue, 6 Apr 2010 23:24:07 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062324.o36NO7dI012859@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:24:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206309 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:24:07 -0000 Author: thompsa Date: Tue Apr 6 23:24:07 2010 New Revision: 206309 URL: http://svn.freebsd.org/changeset/base/206309 Log: MFC r205026 Reapply r185998 which was overwritten at some point. Modified: stable/8/sys/dev/usb/usbdevs 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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:23:43 2010 (r206308) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:24:07 2010 (r206309) @@ -2010,9 +2010,6 @@ product MSI RT3070_7 0x899a RT3070 product MSI RT2573_3 0xa861 RT2573 product MSI RT2573_4 0xa874 RT2573 -/* Microdia products */ -product MICRODIA TWINKLECAM 0x600d TwinkleCam USB camera - /* Microsoft products */ product MICROSOFT SIDEPREC 0x0008 SideWinder Precision Pro product MICROSOFT INTELLIMOUSE 0x0009 IntelliMouse From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:24:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0FD61065670; Tue, 6 Apr 2010 23:24:29 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD68D8FC1E; Tue, 6 Apr 2010 23:24:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NOTLt013027; Tue, 6 Apr 2010 23:24:29 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NOToi013025; Tue, 6 Apr 2010 23:24:29 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062324.o36NOToi013025@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206310 - stable/8/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:24:30 -0000 Author: thompsa Date: Tue Apr 6 23:24:29 2010 New Revision: 206310 URL: http://svn.freebsd.org/changeset/base/206310 Log: MFC r205029 Use wMaxPacketSize for the uftdi input buffer size. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/serial/uftdi.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/usb/serial/uftdi.c ============================================================================== --- stable/8/sys/dev/usb/serial/uftdi.c Tue Apr 6 23:24:07 2010 (r206309) +++ stable/8/sys/dev/usb/serial/uftdi.c Tue Apr 6 23:24:29 2010 (r206310) @@ -91,8 +91,6 @@ SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debu #define UFTDI_CONFIG_INDEX 0 #define UFTDI_IFACE_INDEX 0 -#define UFTDI_IBUFSIZE 64 /* bytes, maximum number of bytes per - * frame */ #define UFTDI_OBUFSIZE 64 /* bytes, cannot be increased due to * do size encoding */ @@ -173,7 +171,7 @@ static const struct usb_config uftdi_con .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = UFTDI_IBUFSIZE, + .bufsize = 0, /* use wMaxPacketSize */ .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &uftdi_read_callback, }, From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:24:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14DF41065675; Tue, 6 Apr 2010 23:24:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4C7F8FC26; Tue, 6 Apr 2010 23:24:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NOttp013171; Tue, 6 Apr 2010 23:24:55 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NOt4b013166; Tue, 6 Apr 2010 23:24:55 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062324.o36NOt4b013166@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:24:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206311 - stable/8/sys/dev/usb/template X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:24:56 -0000 Author: thompsa Date: Tue Apr 6 23:24:55 2010 New Revision: 206311 URL: http://svn.freebsd.org/changeset/base/206311 Log: MFC r205030 - make the usb_temp_setup() and usb_temp_unsetup() functions public so that other modules can generate USB descriptors. - extend the vendor specific request function by one length pointer argument, because not all descriptors store the length in the first byte. For example HID descriptors. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/template/usb_template.c stable/8/sys/dev/usb/template/usb_template.h stable/8/sys/dev/usb/template/usb_template_mtp.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/usb/template/usb_template.c ============================================================================== --- stable/8/sys/dev/usb/template/usb_template.c Tue Apr 6 23:24:29 2010 (r206310) +++ stable/8/sys/dev/usb/template/usb_template.c Tue Apr 6 23:24:55 2010 (r206311) @@ -98,13 +98,10 @@ static void *usb_temp_get_config_desc(st static const void *usb_temp_get_string_desc(struct usb_device *, uint16_t, uint8_t); static const void *usb_temp_get_vendor_desc(struct usb_device *, - const struct usb_device_request *); + const struct usb_device_request *, uint16_t *plen); static const void *usb_temp_get_hub_desc(struct usb_device *); static usb_error_t usb_temp_get_desc(struct usb_device *, struct usb_device_request *, const void **, uint16_t *); -static usb_error_t usb_temp_setup(struct usb_device *, - const struct usb_temp_device_desc *); -static void usb_temp_unsetup(struct usb_device *); static usb_error_t usb_temp_setup_by_index(struct usb_device *, uint16_t index); static void usb_temp_init(void *); @@ -1035,7 +1032,7 @@ usb_temp_get_config_desc(struct usb_devi *------------------------------------------------------------------------*/ static const void * usb_temp_get_vendor_desc(struct usb_device *udev, - const struct usb_device_request *req) + const struct usb_device_request *req, uint16_t *plen) { const struct usb_temp_device_desc *tdd; @@ -1046,7 +1043,7 @@ usb_temp_get_vendor_desc(struct usb_devi if (tdd->getVendorDesc == NULL) { return (NULL); } - return ((tdd->getVendorDesc) (req)); + return ((tdd->getVendorDesc) (req, plen)); } /*------------------------------------------------------------------------* @@ -1109,7 +1106,6 @@ usb_temp_get_desc(struct usb_device *ude default: goto tr_stalled; } - break; case UT_READ_CLASS_DEVICE: switch (req->bRequest) { case UR_GET_DESCRIPTOR: @@ -1117,11 +1113,6 @@ usb_temp_get_desc(struct usb_device *ude default: goto tr_stalled; } - break; - case UT_READ_VENDOR_DEVICE: - case UT_READ_VENDOR_OTHER: - buf = usb_temp_get_vendor_desc(udev, req); - goto tr_valid; default: goto tr_stalled; } @@ -1158,7 +1149,6 @@ tr_handle_get_descriptor: default: goto tr_stalled; } - goto tr_stalled; tr_handle_get_class_descriptor: if (req->wValue[0]) { @@ -1168,17 +1158,20 @@ tr_handle_get_class_descriptor: goto tr_valid; tr_valid: - if (buf == NULL) { + if (buf == NULL) goto tr_stalled; - } - if (len == 0) { + if (len == 0) len = buf[0]; - } *pPtr = buf; *pLength = len; return (0); /* success */ tr_stalled: + /* try to get a vendor specific descriptor */ + len = 0; + buf = usb_temp_get_vendor_desc(udev, req, &len); + if (buf != NULL) + goto tr_valid; *pPtr = NULL; *pLength = 0; return (0); /* we ignore failures */ @@ -1195,7 +1188,7 @@ tr_stalled: * 0: Success * Else: Failure *------------------------------------------------------------------------*/ -static usb_error_t +usb_error_t usb_temp_setup(struct usb_device *udev, const struct usb_temp_device_desc *tdd) { @@ -1285,7 +1278,7 @@ error: * This function frees any memory associated with the currently * setup template, if any. *------------------------------------------------------------------------*/ -static void +void usb_temp_unsetup(struct usb_device *udev) { if (udev->usb_template_ptr) { Modified: stable/8/sys/dev/usb/template/usb_template.h ============================================================================== --- stable/8/sys/dev/usb/template/usb_template.h Tue Apr 6 23:24:29 2010 (r206310) +++ stable/8/sys/dev/usb/template/usb_template.h Tue Apr 6 23:24:55 2010 (r206311) @@ -31,7 +31,7 @@ #define _USB_TEMPLATE_H_ typedef const void *(usb_temp_get_string_desc_t)(uint16_t lang_id, uint8_t string_index); -typedef const void *(usb_temp_get_vendor_desc_t)(const struct usb_device_request *req); +typedef const void *(usb_temp_get_vendor_desc_t)(const struct usb_device_request *req, uint16_t *plen); struct usb_temp_packet_size { uint16_t mps[USB_SPEED_MAX]; @@ -98,5 +98,8 @@ extern const struct usb_temp_device_desc extern const struct usb_temp_device_desc usb_template_msc; /* Mass Storage Class */ extern const struct usb_temp_device_desc usb_template_mtp; /* Message Transfer * Protocol */ +usb_error_t usb_temp_setup(struct usb_device *, + const struct usb_temp_device_desc *); +void usb_temp_unsetup(struct usb_device *); #endif /* _USB_TEMPLATE_H_ */ Modified: stable/8/sys/dev/usb/template/usb_template_mtp.c ============================================================================== --- stable/8/sys/dev/usb/template/usb_template_mtp.c Tue Apr 6 23:24:29 2010 (r206310) +++ stable/8/sys/dev/usb/template/usb_template_mtp.c Tue Apr 6 23:24:55 2010 (r206311) @@ -211,7 +211,7 @@ const struct usb_temp_device_desc usb_te * Else: Success. Pointer to vendor descriptor is returned. *------------------------------------------------------------------------*/ static const void * -mtp_get_vendor_desc(const struct usb_device_request *req) +mtp_get_vendor_desc(const struct usb_device_request *req, uint16_t *plen) { static const uint8_t dummy_desc[0x28] = { 0x28, 0, 0, 0, 0, 1, 4, 0, From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:25:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 475761065703; Tue, 6 Apr 2010 23:25:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3417F8FC1A; Tue, 6 Apr 2010 23:25:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NPK1x013347; Tue, 6 Apr 2010 23:25:20 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NPKg6013345; Tue, 6 Apr 2010 23:25:20 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062325.o36NPKg6013345@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:25:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206312 - stable/8/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:25:20 -0000 Author: thompsa Date: Tue Apr 6 23:25:19 2010 New Revision: 206312 URL: http://svn.freebsd.org/changeset/base/206312 Log: MFC r205031 It appears that some UVISOR devices do not handle when the clear stall command is issued at the beginning of the initial IN/OUT data transfers. Reason unknown, probably firmware fault. Now the stall is only cleared on data transfer errors. PR: usb/144199 Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/serial/uvisor.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/usb/serial/uvisor.c ============================================================================== --- stable/8/sys/dev/usb/serial/uvisor.c Tue Apr 6 23:24:55 2010 (r206311) +++ stable/8/sys/dev/usb/serial/uvisor.c Tue Apr 6 23:25:19 2010 (r206312) @@ -345,11 +345,6 @@ uvisor_attach(device_t dev) DPRINTF("could not allocate all pipes\n"); goto detach; } - /* clear stall at first run */ - mtx_lock(&sc->sc_mtx); - usbd_xfer_set_stall(sc->sc_xfer[UVISOR_BULK_DT_WR]); - usbd_xfer_set_stall(sc->sc_xfer[UVISOR_BULK_DT_RD]); - mtx_unlock(&sc->sc_mtx); error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, &uvisor_callback, &sc->sc_mtx); From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:25:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCAE71065672; Tue, 6 Apr 2010 23:25:53 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0BAA8FC22; Tue, 6 Apr 2010 23:25:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NPrvq013558; Tue, 6 Apr 2010 23:25:53 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NPrlt013555; Tue, 6 Apr 2010 23:25:53 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062325.o36NPrlt013555@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:25:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206313 - in stable/8/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:25:54 -0000 Author: thompsa Date: Tue Apr 6 23:25:53 2010 New Revision: 206313 URL: http://svn.freebsd.org/changeset/base/206313 Log: MFC r205032 Add new uvisor(4) device ID. PR: usb/144201 Modified: stable/8/sys/dev/usb/serial/uvisor.c stable/8/sys/dev/usb/usbdevs 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/usb/serial/uvisor.c ============================================================================== --- stable/8/sys/dev/usb/serial/uvisor.c Tue Apr 6 23:25:19 2010 (r206312) +++ stable/8/sys/dev/usb/serial/uvisor.c Tue Apr 6 23:25:53 2010 (r206313) @@ -263,6 +263,7 @@ MODULE_DEPEND(uvisor, usb, 1, 1, 1); static const struct usb_device_id uvisor_devs[] = { #define UVISOR_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } UVISOR_DEV(ACEECA, MEZ1000, UVISOR_FLAG_PALM4), + UVISOR_DEV(ALPHASMART, DANA_SYNC, UVISOR_FLAG_PALM4), UVISOR_DEV(GARMIN, IQUE_3600, UVISOR_FLAG_PALM4), UVISOR_DEV(FOSSIL, WRISTPDA, UVISOR_FLAG_PALM4), UVISOR_DEV(HANDSPRING, VISOR, UVISOR_FLAG_VISOR), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:25:19 2010 (r206312) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:25:53 2010 (r206313) @@ -407,6 +407,7 @@ vendor STSN 0x07ef STSN vendor CENTURY 0x07f7 Century Corp vendor ZOOM 0x0803 Zoom Telephonics vendor PCS 0x0810 Personal Communication Systems +vendor ALPHASMART 0x081e AlphaSmart, Inc. vendor BROADLOGIC 0x0827 BroadLogic vendor HANDSPRING 0x082d Handspring vendor PALM 0x0830 Palm Computing @@ -892,6 +893,10 @@ product ALTEC ASC495 0xff05 ASC495 Spea /* Allied Telesyn International products */ product ALLIEDTELESYN ATUSB100 0xb100 AT-USB100 +/* AlphaSmart, Inc. products */ +product ALPHASMART DANA_KB 0xdbac AlphaSmart Dana Keyboard +product ALPHASMART DANA_SYNC 0xdf00 AlphaSmart Dana HotSync + /* Amoi products */ product AMOI H01 0x0800 H01 3G modem product AMOI H01A 0x7002 H01A 3G modem From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:26:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA7581065697; Tue, 6 Apr 2010 23:26:17 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CBC28FC2C; Tue, 6 Apr 2010 23:26:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NQHGn013731; Tue, 6 Apr 2010 23:26:17 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NQH9E013729; Tue, 6 Apr 2010 23:26:17 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062326.o36NQH9E013729@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206314 - stable/8/sys/dev/usb/template X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:26:17 -0000 Author: thompsa Date: Tue Apr 6 23:26:17 2010 New Revision: 206314 URL: http://svn.freebsd.org/changeset/base/206314 Log: MFC r205033 isochronous endpoint descriptors should have two more bytes which are zero by default. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/template/usb_template.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/usb/template/usb_template.c ============================================================================== --- stable/8/sys/dev/usb/template/usb_template.c Tue Apr 6 23:25:53 2010 (r206313) +++ stable/8/sys/dev/usb/template/usb_template.c Tue Apr 6 23:26:17 2010 (r206314) @@ -162,15 +162,23 @@ usb_make_endpoint_desc(struct usb_temp_s const void **rd; uint16_t old_size; uint16_t mps; - uint8_t ea = 0; /* Endpoint Address */ - uint8_t et = 0; /* Endpiont Type */ + uint8_t ea; /* Endpoint Address */ + uint8_t et; /* Endpiont Type */ /* Reserve memory */ old_size = temp->size; - temp->size += sizeof(*ed); - /* Scan all Raw Descriptors first */ + ea = (ted->bEndpointAddress & (UE_ADDR | UE_DIR_IN | UE_DIR_OUT)); + et = (ted->bmAttributes & UE_XFERTYPE); + + if (et == UE_ISOCHRONOUS) { + /* account for extra byte fields */ + temp->size += sizeof(*ed) + 2; + } else { + temp->size += sizeof(*ed); + } + /* Scan all Raw Descriptors first */ rd = ted->ppRawDesc; if (rd) { while (*rd) { @@ -192,8 +200,6 @@ usb_make_endpoint_desc(struct usb_temp_s /* escape for Zero Max Packet Size */ mps = 0; } - ea = (ted->bEndpointAddress & (UE_ADDR | UE_DIR_IN | UE_DIR_OUT)); - et = (ted->bmAttributes & UE_XFERTYPE); /* * Fill out the real USB endpoint descriptor @@ -201,7 +207,10 @@ usb_make_endpoint_desc(struct usb_temp_s */ if (temp->buf) { ed = USB_ADD_BYTES(temp->buf, old_size); - ed->bLength = sizeof(*ed); + if (et == UE_ISOCHRONOUS) + ed->bLength = sizeof(*ed) + 2; + else + ed->bLength = sizeof(*ed); ed->bDescriptorType = UDESC_ENDPOINT; ed->bEndpointAddress = ea; ed->bmAttributes = ted->bmAttributes; From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:26:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A698C1065690; Tue, 6 Apr 2010 23:26:40 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 929D28FC19; Tue, 6 Apr 2010 23:26:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NQejb013867; Tue, 6 Apr 2010 23:26:40 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NQeuM013865; Tue, 6 Apr 2010 23:26:40 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062326.o36NQeuM013865@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206315 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:26:40 -0000 Author: thompsa Date: Tue Apr 6 23:26:40 2010 New Revision: 206315 URL: http://svn.freebsd.org/changeset/base/206315 Log: MFC r205034 For USS820 driver we need to manually reset TX FIFO at each SETUP transaction because the chip doesn't do this by itself. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/controller/uss820dci.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/usb/controller/uss820dci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uss820dci.c Tue Apr 6 23:26:17 2010 (r206314) +++ stable/8/sys/dev/usb/controller/uss820dci.c Tue Apr 6 23:26:40 2010 (r206315) @@ -333,6 +333,14 @@ uss820dci_setup_rx(struct uss820dci_td * } else { sc->sc_dv_addr = 0xFF; } + + /* reset TX FIFO */ + temp = USS820_READ_1(sc, USS820_TXCON); + temp |= USS820_TXCON_TXCLR; + USS820_WRITE_1(sc, USS820_TXCON, temp); + temp &= ~USS820_TXCON_TXCLR; + USS820_WRITE_1(sc, USS820_TXCON, temp); + return (0); /* complete */ setup_not_complete: From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:27:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E482106567D; Tue, 6 Apr 2010 23:27:05 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 411848FC12; Tue, 6 Apr 2010 23:27:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NR5Fo014038; Tue, 6 Apr 2010 23:27:05 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NR5lk014036; Tue, 6 Apr 2010 23:27:05 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062327.o36NR5lk014036@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206316 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:27:05 -0000 Author: thompsa Date: Tue Apr 6 23:27:04 2010 New Revision: 206316 URL: http://svn.freebsd.org/changeset/base/206316 Log: MFC r205035 Make sure there is a way to reset the endpoint FIFO on transfer errors for ISOCHRONOUS transfers Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/usb_transfer.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/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Tue Apr 6 23:26:40 2010 (r206315) +++ stable/8/sys/dev/usb/usb_transfer.c Tue Apr 6 23:27:04 2010 (r206316) @@ -2410,21 +2410,24 @@ usbd_pipe_start(struct usb_xfer_queue *p * Check if we are supposed to stall the endpoint: */ if (xfer->flags.stall_pipe) { + struct usb_device *udev; + struct usb_xfer_root *info; + /* clear stall command */ xfer->flags.stall_pipe = 0; + /* get pointer to USB device */ + info = xfer->xroot; + udev = info->udev; + /* * Only stall BULK and INTERRUPT endpoints. */ type = (ep->edesc->bmAttributes & UE_XFERTYPE); if ((type == UE_BULK) || (type == UE_INTERRUPT)) { - struct usb_device *udev; - struct usb_xfer_root *info; uint8_t did_stall; - info = xfer->xroot; - udev = info->udev; did_stall = 1; if (udev->flags.usb_mode == USB_MODE_DEVICE) { @@ -2452,6 +2455,17 @@ usbd_pipe_start(struct usb_xfer_queue *p ep->is_stalled = 1; return; } + } else if (type == UE_ISOCHRONOUS) { + + /* + * Make sure any FIFO overflow or other FIFO + * error conditions go away by resetting the + * endpoint FIFO through the clear stall + * method. + */ + if (udev->flags.usb_mode == USB_MODE_DEVICE) { + (udev->bus->methods->clear_stall) (udev, ep); + } } } /* Set or clear stall complete - special case */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:27:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61AFE1065673; Tue, 6 Apr 2010 23:27:31 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E3B08FC20; Tue, 6 Apr 2010 23:27:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NRV1j014209; Tue, 6 Apr 2010 23:27:31 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NRVTt014207; Tue, 6 Apr 2010 23:27:31 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062327.o36NRVTt014207@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206317 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:27:31 -0000 Author: thompsa Date: Tue Apr 6 23:27:31 2010 New Revision: 206317 URL: http://svn.freebsd.org/changeset/base/206317 Log: MFC r205038 add new vendor ID for APACER Submitted by: Paul B Mahol Modified: stable/8/sys/dev/usb/usbdevs 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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:27:04 2010 (r206316) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:27:31 2010 (r206317) @@ -545,6 +545,7 @@ vendor FALCOM 0x0f94 Falcom Wireless Co vendor RIM 0x0fca Research In Motion vendor DYNASTREAM 0x0fcf Dynastream Innovations vendor QUALCOMM 0x1004 Qualcomm +vendor APACER 0x1005 Apacer vendor DESKNOTE 0x1019 Desknote vendor GIGABYTE 0x1044 GIGABYTE vendor WESTERN 0x1058 Western Digital From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:27:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B13321065678; Tue, 6 Apr 2010 23:27:55 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3668FC22; Tue, 6 Apr 2010 23:27:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NRt0d014345; Tue, 6 Apr 2010 23:27:55 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NRt3K014343; Tue, 6 Apr 2010 23:27:55 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062327.o36NRt3K014343@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206318 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:27:55 -0000 Author: thompsa Date: Tue Apr 6 23:27:55 2010 New Revision: 206318 URL: http://svn.freebsd.org/changeset/base/206318 Log: MFC r205039 Add new device ID for the SMC 2514HUB Submitted by: Alexander Best Modified: stable/8/sys/dev/usb/usbdevs 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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:27:31 2010 (r206317) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:27:55 2010 (r206318) @@ -2778,6 +2778,7 @@ product SMC 2202USB 0x0200 10/100 Ether product SMC 2206USB 0x0201 EZ Connect USB Ethernet product SMC 2862WG 0xee13 EZ Connect Wireless Adapter product SMC2 2020HUB 0x2020 USB Hub +product SMC2 2514HUB 0x2514 USB Hub product SMC3 2662WUSB 0xa002 2662W-AR Wireless /* SOHOware products */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:28:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 184AC106567F; Tue, 6 Apr 2010 23:28:19 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E08968FC1D; Tue, 6 Apr 2010 23:28:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NSI5L014519; Tue, 6 Apr 2010 23:28:18 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NSI7p014517; Tue, 6 Apr 2010 23:28:18 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062328.o36NSI7p014517@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:28:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206319 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:28:19 -0000 Author: thompsa Date: Tue Apr 6 23:28:18 2010 New Revision: 206319 URL: http://svn.freebsd.org/changeset/base/206319 Log: MFC r205040 extend search for Apple Function Key. PR: usb/144414 Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/input/ukbd.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/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Tue Apr 6 23:27:55 2010 (r206318) +++ stable/8/sys/dev/usb/input/ukbd.c Tue Apr 6 23:28:18 2010 (r206319) @@ -883,28 +883,33 @@ ukbd_attach(device_t dev) err = usbd_req_get_hid_desc(uaa->device, NULL, &hid_ptr, &hid_len, M_TEMP, uaa->info.bIfaceIndex); if (err == 0) { + uint8_t apple_keys = 0; uint8_t temp_id; /* investigate if this is an Apple Keyboard */ if (hid_locate(hid_ptr, hid_len, HID_USAGE2(HUP_CONSUMER, HUG_APPLE_EJECT), hid_input, 0, &sc->sc_loc_apple_eject, &flags, - &sc->sc_kbd_id)) { + &temp_id)) { if (flags & HIO_VARIABLE) sc->sc_flags |= UKBD_FLAG_APPLE_EJECT | UKBD_FLAG_APPLE_SWAP; - if (hid_locate(hid_ptr, hid_len, - HID_USAGE2(0xFFFF, 0x0003), - hid_input, 0, &sc->sc_loc_apple_fn, &flags, - &temp_id)) { - if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_FN | - UKBD_FLAG_APPLE_SWAP; - if (temp_id != sc->sc_kbd_id) { - DPRINTF("HID IDs mismatch\n"); - } - } - } else { + DPRINTFN(1, "Found Apple eject-key\n"); + apple_keys = 1; + sc->sc_kbd_id = temp_id; + } + if (hid_locate(hid_ptr, hid_len, + HID_USAGE2(0xFFFF, 0x0003), + hid_input, 0, &sc->sc_loc_apple_fn, &flags, + &temp_id)) { + if (flags & HIO_VARIABLE) + sc->sc_flags |= UKBD_FLAG_APPLE_FN | + UKBD_FLAG_APPLE_SWAP; + DPRINTFN(1, "Found Apple FN-key\n"); + apple_keys = 1; + sc->sc_kbd_id = temp_id; + } + if (apple_keys == 0) { /* * Assume the first HID ID contains the * keyboard data From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:28:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 375CE106566C; Tue, 6 Apr 2010 23:28:47 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 231888FC1C; Tue, 6 Apr 2010 23:28:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NSlBO014695; Tue, 6 Apr 2010 23:28:47 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NSlBC014691; Tue, 6 Apr 2010 23:28:47 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062328.o36NSlBC014691@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206320 - in stable/8/sys/dev/usb: . wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:28:47 -0000 Author: thompsa Date: Tue Apr 6 23:28:46 2010 New Revision: 206320 URL: http://svn.freebsd.org/changeset/base/206320 Log: MFC r205042 - Integrate latest driver code from OpenBSD - Drain our tasks from the ieee80211 taskqueue - Add more IDs Submitted by: Akinori Furukoshi Modified: stable/8/sys/dev/usb/usbdevs stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_runreg.h stable/8/sys/dev/usb/wlan/if_runvar.h 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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:28:18 2010 (r206319) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:28:46 2010 (r206320) @@ -277,6 +277,7 @@ vendor LACIE 0x059f LaCie vendor FUJIFILM 0x05a2 Fuji Film vendor ARC 0x05a3 ARC vendor ORTEK 0x05a4 Ortek +vendor CISCOLINKSYS3 0x05a6 Cisco-Linksys vendor BOSE 0x05a7 Bose vendor OMNIVISION 0x05a9 OmniVision vendor INSYSTEM 0x05ab In-System Design @@ -546,6 +547,7 @@ vendor RIM 0x0fca Research In Motion vendor DYNASTREAM 0x0fcf Dynastream Innovations vendor QUALCOMM 0x1004 Qualcomm vendor APACER 0x1005 Apacer +vendor MOTOROLA4 0x100d Motorola vendor DESKNOTE 0x1019 Desknote vendor GIGABYTE 0x1044 GIGABYTE vendor WESTERN 0x1058 Western Digital @@ -642,6 +644,7 @@ vendor LINKSYS3 0x1915 Linksys vendor QUALCOMMINC 0x19d2 Qualcomm, Incorporated vendor WCH2 0x1a86 QinHeng Electronics vendor STELERA 0x1a8d Stelera Wireless +vendor OVISLINK 0x1b75 OvisLink vendor TCTMOBILE 0x1bbb TCT Mobile vendor TELIT 0x1bc7 Telit vendor MPMAN 0x1cae MpMan @@ -683,6 +686,7 @@ vendor 3COM2 0x6891 3Com vendor EDIMAX 0x7392 Edimax vendor INTEL 0x8086 Intel vendor INTEL2 0x8087 Intel +vendor ALLWIN 0x8516 ALLWIN Tech vendor SITECOM2 0x9016 Sitecom vendor MOSCHIP 0x9710 MosChip Semiconductor vendor MARVELL 0x9e88 Marvell Technology Group Ltd. @@ -762,6 +766,7 @@ product ACCTON RT3070_1 0xa701 RT3070 product ACCTON RT3070_2 0xa702 RT3070 product ACCTON RT2870_1 0xb522 RT2870 product ACCTON RT3070_3 0xc522 RT3070 +product ACCTON RT3070_5 0xd522 RT3070 product ACCTON ZD1211B 0xe501 ZD1211B /* Aceeca products */ @@ -894,6 +899,15 @@ product ALTEC ASC495 0xff05 ASC495 Spea /* Allied Telesyn International products */ product ALLIEDTELESYN ATUSB100 0xb100 AT-USB100 +/* ALLWIN Tech products */ +product ALLWIN RT2070 0x2070 RT2070 +product ALLWIN RT2770 0x2770 RT2770 +product ALLWIN RT2870 0x2870 RT2870 +product ALLWIN RT3070 0x3070 RT3070 +product ALLWIN RT3071 0x3071 RT3071 +product ALLWIN RT3072 0x3072 RT3072 +product ALLWIN RT3572 0x3572 RT3572 + /* AlphaSmart, Inc. products */ product ALPHASMART DANA_KB 0xdbac AlphaSmart Dana Keyboard product ALPHASMART DANA_SYNC 0xdf00 AlphaSmart Dana HotSync @@ -996,7 +1010,8 @@ product ASUS RT2870_2 0x1732 RT2870 product ASUS RT2870_3 0x1742 RT2870 product ASUS RT2870_4 0x1760 RT2870 product ASUS RT2870_5 0x1761 RT2870 -product ASUS RT3070 0x1784 RT3070 +product ASUS USBN13 0x1784 USB-N13 +product ASUS RT3070_1 0x1790 RT3070 product ASUS P535 0x420f ASUS P535 PDA product ASUS GMSC 0x422f ASUS Generic Mass Storage product ASUS RT2570 0x1706 RT2500USB Wireless Adapter @@ -1154,7 +1169,8 @@ product CISCOLINKSYS HU200TS 0x001a HU20 product CISCOLINKSYS WUSB54GC 0x0020 WUSB54GC product CISCOLINKSYS WUSB54GR 0x0023 WUSB54GR product CISCOLINKSYS WUSBF54G 0x0024 WUSBF54G -product CISCOLINKSYS2 RT3070 0x4001 RT3070 +product CISCOLINKSYS2 RT3070 0x4001 RT3070 +product CISCOLINKSYS3 RT3070 0x0101 RT3070 /* CMOTECH products */ product CMOTECH CNU510 0x5141 CDMA Technologies USB modem @@ -1181,6 +1197,8 @@ product CONCEPTRONIC AR5523_2 0x7811 AR5 product CONCEPTRONIC AR5523_2_NF 0x7812 AR5523 (no firmware) product CONCEPTRONIC2 C54RU 0x3c02 C54RU WLAN product CONCEPTRONIC2 C54RU2 0x3c22 C54RU +product CONCEPTRONIC2 RT3070_1 0x3c08 RT3070 +product CONCEPTRONIC2 RT3070_2 0x3c11 RT3070 product CONCEPTRONIC2 VIGORN61 0x3c25 VIGORN61 product CONCEPTRONIC2 RT2870_1 0x3c06 RT2870 product CONCEPTRONIC2 RT2870_2 0x3c07 RT2870 @@ -1333,12 +1351,14 @@ product DLINK2 DWA111 0x3c06 DWA-111 product DLINK2 RT2870_1 0x3c09 RT2870 product DLINK2 DWA110 0x3c07 DWA-110 product DLINK2 RT3072 0x3c0a RT3072 +product DLINK2 RT3072_1 0x3c0b RT3072 product DLINK2 RT3070_1 0x3c0d RT3070 product DLINK2 RT3070_2 0x3c0e RT3070 product DLINK2 RT3070_3 0x3c0f RT3070 product DLINK2 RT2870_2 0x3c11 RT2870 product DLINK2 DWA130 0x3c13 DWA-130 product DLINK2 RT3070_4 0x3c15 RT3070 +product DLINK2 RT3070_5 0x3c16 RT3070 product DLINK3 DWM652 0x3e04 DWM-652 /* DMI products */ @@ -1909,6 +1929,7 @@ product LINKSYS4 WUSB100 0x0070 WUSB100 product LINKSYS4 WUSB600N 0x0071 WUSB600N product LINKSYS4 WUSB54GCV2 0x0073 WUSB54GC v2 product LINKSYS4 WUSB54GCV3 0x0077 WUSB54GC v3 +product LINKSYS4 RT3070 0x0078 RT3070 product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2 /* Logitech products */ @@ -1982,6 +2003,8 @@ product MELCO KG54L 0x00da WLI-U2-KG54L product MELCO WLIUCG300N 0x00e8 WLI-UC-G300N product MELCO SG54HG 0x00f4 WLI-U2-SG54HG product MELCO WLIUCAG300N 0x012e WLI-UC-AG300N +product MELCO RT2870_1 0x0148 RT2870 +product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN /* Merlin products */ @@ -2002,7 +2025,9 @@ product MGE UPS2 0xffff MGE UPS SYSTEMS product MSI BT_DONGLE 0x1967 Bluetooth USB dongle product MSI RT3070_1 0x3820 RT3070 product MSI RT3070_2 0x3821 RT3070 +product MSI RT3070_8 0x3822 RT3070 product MSI RT3070_3 0x3870 RT3070 +product MSI RT3070_9 0x3871 RT3070 product MSI UB11B 0x6823 UB11B product MSI RT2570 0x6861 RT2570 product MSI RT2570_2 0x6865 RT2570 @@ -2011,7 +2036,9 @@ product MSI RT2573_1 0x6874 RT2573 product MSI RT2573_2 0x6877 RT2573 product MSI RT3070_4 0x6899 RT3070 product MSI RT3070_5 0x821a RT3070 +product MSI RT3070_10 0x822a RT3070 product MSI RT3070_6 0x870a RT3070 +product MSI RT3070_11 0x871a RT3070 product MSI RT3070_7 0x899a RT3070 product MSI RT2573_3 0xa861 RT2573 product MSI RT2573_4 0xa874 RT2573 @@ -2092,6 +2119,8 @@ product MOTOROLA2 A41XV32X 0x2a22 A41x/V product MOTOROLA2 E398 0x4810 E398 Mobile Phone product MOTOROLA2 USBLAN 0x600c USBLAN product MOTOROLA2 USBLAN2 0x6027 USBLAN +product MOTOROLA4 RT2770 0x9031 RT2770 +product MOTOROLA4 RT3070 0x9032 RT3070 /* MultiTech products */ product MULTITECH ATLAS 0xf101 MT5634ZBA-USB modem @@ -2262,6 +2291,9 @@ product OPTION MODHSXPA 0xd013 Globetro product OPTION ICON321 0xd031 Globetrotter HSUPA product OPTION ICON505 0xd055 Globetrotter iCON 505 +/* OvisLink product */ +product OVISLINK RT3072 0x3072 RT3072 + /* OQO */ product OQO WIFI01 0x0002 model 01 WiFi interface product OQO BT01 0x0003 model 01 Bluetooth interface @@ -2296,6 +2328,7 @@ product PARA RT3070 0x8888 RT3070 product PEGATRON RT2870 0x0002 RT2870 product PEGATRON RT3070 0x000c RT3070 product PEGATRON RT3070_2 0x000e RT3070 +product PEGATRON RT3070_3 0x0010 RT3070 /* Peracom products */ product PERACOM SERIAL1 0x0001 Serial @@ -2515,7 +2548,9 @@ product RALINK RT2870 0x2870 RT2870 product RALINK RT3070 0x3070 RT3070 product RALINK RT3071 0x3071 RT3071 product RALINK RT3072 0x3072 RT3072 +product RALINK RT3370 0x3370 RT3370 product RALINK RT3572 0x3572 RT3572 +product RALINK RT8070 0x8070 RT8070 product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter @@ -2752,6 +2787,7 @@ product SITECOMEU RT3070_3 0x003c RT3070 product SITECOMEU RT3070_4 0x003d RT3070 product SITECOMEU RT3070 0x003e RT3070 product SITECOMEU WL608 0x003f WL-608 +product SITECOMEU RT3071 0x0040 RT3071 product SITECOMEU RT3072_1 0x0041 RT3072 product SITECOMEU RT3072_2 0x0042 RT3072 product SITECOMEU RT3072_3 0x0047 RT3072 @@ -2888,6 +2924,7 @@ product SURECOM RT2573 0x31f3 RT2573 /* Sweex products */ product SWEEX ZD1211 0x1809 ZD1211 +product SWEEX2 LW153 0x0153 LW153 product SWEEX2 LW303 0x0302 LW303 product SWEEX2 LW313 0x0313 LW313 @@ -2943,6 +2980,7 @@ product TOPRE HHKB 0x0100 HHKB Professi /* Toshiba Corporation products */ product TOSHIBA POCKETPC_E740 0x0706 PocketPC e740 +product TOSHIBA RT3070 0x0a07 RT3070 product TOSHIBA G450 0x0d45 G450 modem product TOSHIBA HSDPA 0x1302 G450 modem @@ -3124,3 +3162,4 @@ product ZYXEL M202 0x340a M-202 product ZYXEL G220V2 0x340f G-220 v2 product ZYXEL G202 0x3410 G-202 product ZYXEL RT2870_1 0x3416 RT2870 +product ZYXEL RT2870_2 0x341a RT2870 Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Tue Apr 6 23:28:18 2010 (r206319) +++ stable/8/sys/dev/usb/wlan/if_run.c Tue Apr 6 23:28:46 2010 (r206320) @@ -1,8 +1,9 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2008,2009 Damien Bergamini - * ported to FreeBSD by Akinori Furukoshi + * Copyright (c) 2008,2010 Damien Bergamini + * ported to FreeBSD by Akinori Furukoshi + * USB Consulting, Hans Petter Selasky * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -17,8 +18,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* release date Jan. 09, 2010 */ - #include __FBSDID("$FreeBSD$"); @@ -107,11 +106,20 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_3) }, { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_4) }, { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT2870_5) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070) }, { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_1) }, { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_2) }, { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_3) }, { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_4) }, + { USB_VP(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_RT3070_5) }, { USB_VP(USB_VENDOR_AIRTIES, USB_PRODUCT_AIRTIES_RT3070) }, + { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2070) }, + { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2770) }, + { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT2870) }, + { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3070) }, + { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3071) }, + { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3072) }, + { USB_VP(USB_VENDOR_ALLWIN, USB_PRODUCT_ALLWIN_RT3572) }, { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_1) }, { USB_VP(USB_VENDOR_AMIGO, USB_PRODUCT_AMIGO_RT2870_2) }, { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GNR) }, @@ -122,6 +130,8 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_3) }, { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_4) }, { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2870_5) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_USBN13) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT3070_1) }, { USB_VP(USB_VENDOR_ASUS2, USB_PRODUCT_ASUS2_USBN11) }, { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_1) }, { USB_VP(USB_VENDOR_AZUREWAVE, USB_PRODUCT_AZUREWAVE_RT2870_2) }, @@ -133,6 +143,8 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6D4050V1) }, { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_1) }, { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_RT2870_2) }, + { USB_VP(USB_VENDOR_CISCOLINKSYS2, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, + { USB_VP(USB_VENDOR_CISCOLINKSYS3, USB_PRODUCT_CISCOLINKSYS2_RT3070) }, { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_1) }, { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_2) }, { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_3) }, @@ -141,6 +153,8 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_6) }, { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_7) }, { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT2870_8) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_1) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_RT3070_2) }, { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_VIGORN61) }, { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB300GNM) }, { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_RT2870_1) }, @@ -157,7 +171,9 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_2) }, { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_3) }, { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_4) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3070_5) }, { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_RT3072_1) }, { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7717) }, { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_EW7718) }, { USB_VP(USB_VENDOR_EDIMAX, USB_PRODUCT_EDIMAX_RT2870_1) }, @@ -178,6 +194,7 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_2) }, { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_3) }, { USB_VP(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_RT3072_4) }, + { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_RT3070) }, { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB100) }, { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB54GCV3) }, { USB_VP(USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_WUSB600N) }, @@ -185,9 +202,13 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_1) }, { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_2) }, { USB_VP(USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_RT2870_3) }, + { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_1) }, + { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_RT2870_2) }, { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCAG300N) }, { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCG300N) }, { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_WLIUCGN) }, + { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT2770) }, + { USB_VP(USB_VENDOR_MOTOROLA4, USB_PRODUCT_MOTOROLA4_RT3070) }, { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_1) }, { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_2) }, { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_3) }, @@ -195,10 +216,16 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_5) }, { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_6) }, { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_7) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_8) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_9) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_10) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT3070_11) }, + { USB_VP(USB_VENDOR_OVISLINK, USB_PRODUCT_OVISLINK_RT3072) }, { USB_VP(USB_VENDOR_PARA, USB_PRODUCT_PARA_RT3070) }, { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT2870) }, { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070) }, { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_2) }, + { USB_VP(USB_VENDOR_PEGATRON, USB_PRODUCT_PEGATRON_RT3070_3) }, { USB_VP(USB_VENDOR_PHILIPS, USB_PRODUCT_PHILIPS_RT2870) }, { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS300MINIS) }, { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMICRON) }, @@ -212,7 +239,9 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3070) }, { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3071) }, { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3072) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3370) }, { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT3572) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT8070) }, { USB_VP(USB_VENDOR_SAMSUNG2, USB_PRODUCT_SAMSUNG2_RT2870_1) }, { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_1) }, { USB_VP(USB_VENDOR_SENAO, USB_PRODUCT_SENAO_RT2870_2) }, @@ -234,6 +263,7 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_2) }, { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_3) }, { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3070_4) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3071) }, { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_1) }, { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_2) }, { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_RT3072_3) }, @@ -243,8 +273,10 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL608) }, { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2870_1) }, { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT3070) }, + { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW153) }, { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW303) }, { USB_VP(USB_VENDOR_SWEEX2, USB_PRODUCT_SWEEX2_LW313) }, + { USB_VP(USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_RT3070) }, { USB_VP(USB_VENDOR_UMEDIA, USB_PRODUCT_UMEDIA_RT2870_1) }, { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_1) }, { USB_VP(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_RT2870_2) }, @@ -254,6 +286,7 @@ static const struct usb_device_id run_de { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_1) }, { USB_VP(USB_VENDOR_ZINWELL, USB_PRODUCT_ZINWELL_RT3072_2) }, { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_1) }, + { USB_VP(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_RT2870_2) }, }; MODULE_DEPEND(run, wlan, 1, 1, 1); @@ -340,10 +373,12 @@ static int run_raw_xmit(struct ieee80211 const struct ieee80211_bpf_params *); static void run_start(struct ifnet *); static int run_ioctl(struct ifnet *, u_long, caddr_t); +static void run_set_agc(struct run_softc *, uint8_t); static void run_select_chan_group(struct run_softc *, int); static void run_set_rx_antenna(struct run_softc *, int); static void run_rt2870_set_chan(struct run_softc *, u_int); static void run_rt3070_set_chan(struct run_softc *, u_int); +static void run_rt3572_set_chan(struct run_softc *, u_int); static int run_set_chan(struct run_softc *, struct ieee80211_channel *); static void run_set_channel(struct ieee80211com *); static void run_scan_start(struct ieee80211com *); @@ -369,6 +404,7 @@ static int run_bbp_init(struct run_softc static int run_rt3070_rf_init(struct run_softc *); static int run_rt3070_filter_calib(struct run_softc *, uint8_t, uint8_t, uint8_t *); +static void run_rt3070_rf_setup(struct run_softc *); static int run_txrx_enable(struct run_softc *); static void run_init(void *); static void run_init_locked(struct run_softc *); @@ -398,8 +434,8 @@ static const struct rfprog { struct { uint8_t n, r, k; -} run_rf3020_freqs[] = { - RT3070_RF3020 +} rt3070_freqs[] = { + RT3070_RF3052 }; static const struct { @@ -407,6 +443,8 @@ static const struct { uint8_t val; } rt3070_def_rf[] = { RT3070_DEF_RF +},rt3572_def_rf[] = { + RT3572_DEF_RF }; static const struct usb_config run_config[RUN_N_XFER] = { @@ -502,6 +540,7 @@ run_attach(device_t self) struct usb_attach_arg *uaa = device_get_ivars(self); struct ieee80211com *ic; struct ifnet *ifp; + uint32_t ver; int i, ntries, error; uint8_t iface_index, bands; @@ -513,11 +552,10 @@ run_attach(device_t self) MTX_NETWORK_LOCK, MTX_DEF); iface_index = RT2860_IFACE_INDEX; - /* Rx transfer has own lock */ error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, run_config, RUN_N_XFER, sc, &sc->sc_mtx); if (error) { - device_printf(self, "could not allocate USB Tx transfers, " + device_printf(self, "could not allocate USB transfers, " "err=%s\n", usbd_errstr(error)); goto detach; } @@ -526,11 +564,11 @@ run_attach(device_t self) /* wait for the chip to settle */ for (ntries = 0; ntries < 100; ntries++) { - if (run_read(sc, RT2860_ASIC_VER_ID, &sc->mac_rev) != 0){ + if (run_read(sc, RT2860_ASIC_VER_ID, &ver) != 0){ RUN_UNLOCK(sc); goto detach; } - if (sc->mac_rev != 0 && sc->mac_rev != 0xffffffff) + if (ver != 0 && ver != 0xffffffff) break; run_delay(sc, 10); } @@ -540,13 +578,15 @@ run_attach(device_t self) RUN_UNLOCK(sc); goto detach; } + sc->mac_ver = ver >> 16; + sc->mac_rev = ver & 0xffff; /* retrieve RF rev. no and various other things from EEPROM */ run_read_eeprom(sc); device_printf(sc->sc_dev, "MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), address %s\n", - sc->mac_rev >> 16, sc->mac_rev & 0xffff, run_get_rf(sc->rf_rev), + sc->mac_ver, sc->mac_rev, run_get_rf(sc->rf_rev), sc->ntxchains, sc->nrxchains, ether_sprintf(sc->sc_bssid)); if ((error = run_load_microcode(sc)) != 0) { @@ -609,7 +649,9 @@ run_attach(device_t self) * Do this by own because h/w supports * more channels than ieee80211_init_channels() */ - if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850) { + if (sc->rf_rev == RT2860_RF_2750 || + sc->rf_rev == RT2860_RF_2850 || + sc->rf_rev == RT3070_RF_3052) { /* set supported .11a rates */ for (i = 14; i < nitems(rt2860_rf2850); i++) { uint8_t chan = rt2860_rf2850[i].chan; @@ -743,11 +785,15 @@ run_vap_delete(struct ieee80211vap *vap) sc = ifp->if_softc; - if (ifp && ifp->if_flags & IFF_UP){ - RUN_LOCK(sc); - run_stop(sc); - RUN_UNLOCK(sc); - } + RUN_LOCK(sc); + sc->sc_rvp->amrr_run = RUN_AMRR_OFF; + RUN_UNLOCK(sc); + + /* drain them all */ + usb_callout_drain(&sc->sc_rvp->amrr_ch); + ieee80211_draintask(ic, &sc->sc_rvp->amrr_task); + ieee80211_draintask(ic, &sc->wme_task); + ieee80211_draintask(ic, &sc->usb_timeout_task); ieee80211_amrr_cleanup(&rvp->amrr); ieee80211_vap_detach(vap); @@ -808,7 +854,9 @@ run_load_microcode(struct run_softc *sc) const uint64_t *temp; uint64_t bytes; + RUN_UNLOCK(sc); fw = firmware_get("runfw"); + RUN_LOCK(sc); if(fw == NULL){ device_printf(sc->sc_dev, "failed loadfirmware of file %s\n", "runfw"); @@ -829,14 +877,11 @@ run_load_microcode(struct run_softc *sc) * last half is for rt3071. */ base = fw->data; - if ((sc->mac_rev >> 16) != 0x2860 && - (sc->mac_rev >> 16) != 0x2872 && - (sc->mac_rev >> 16) != 0x3070 && - (sc->mac_rev >> 16) != 0x3572){ + if ((sc->mac_ver) != 0x2860 && + (sc->mac_ver) != 0x2872 && + (sc->mac_ver) != 0x3070){ base += 4096; - device_printf(sc->sc_dev, "loading RT3071 firmware\n"); - } else - device_printf(sc->sc_dev, "loading RT2870 firmware\n"); + } /* cheap sanity check */ temp = fw->data; @@ -866,7 +911,7 @@ run_load_microcode(struct run_softc *sc) run_delay(sc, 10); run_write(sc, RT2860_H2M_MAILBOX, 0); - if ((error = run_mcu_cmd(sc, RT2860_MCU_CMD_BOOT, 0)) != 0) + if ((error = run_mcu_cmd(sc, RT2860_MCU_CMD_RFRESET, 0)) != 0) goto fail; /* wait until microcontroller is ready */ @@ -884,7 +929,8 @@ run_load_microcode(struct run_softc *sc) error = ETIMEDOUT; goto fail; } - DPRINTF("microcode successfully loaded after %d tries\n", ntries); + device_printf(sc->sc_dev, "firmware %s loaded\n", + (base == fw->data) ? "RT2870" : "RT3071"); fail: firmware_put(fw, FIRMWARE_UNLOAD); @@ -1283,7 +1329,7 @@ run_read_eeprom(struct run_softc *sc) /* check whether the ROM is eFUSE ROM or EEPROM */ sc->sc_srom_read = run_eeprom_read_2; - if ((sc->mac_rev & 0xfff00000) >= 0x30700000) { + if (sc->mac_ver >= 0x3070) { run_read(sc, RT3070_EFUSE_CTRL, &tmp); DPRINTF("EFUSE_CTRL=0x%08x\n", tmp); if (tmp & RT3070_SEL_EFUSE) @@ -1305,21 +1351,32 @@ run_read_eeprom(struct run_softc *sc) sc->sc_bssid[4] = val & 0xff; sc->sc_bssid[5] = val >> 8; - /* read default BBP settings */ - for (i = 0; i < 8; i++) { + /* read vender BBP settings */ + for (i = 0; i < 10; i++) { run_srom_read(sc, RT2860_EEPROM_BBP_BASE + i, &val); sc->bbp[i].val = val & 0xff; sc->bbp[i].reg = val >> 8; DPRINTF("BBP%d=0x%02x\n", sc->bbp[i].reg, sc->bbp[i].val); } + if (sc->mac_ver >= 0x3071) { + /* read vendor RF settings */ + for (i = 0; i < 10; i++) { + run_srom_read(sc, RT3071_EEPROM_RF_BASE + i, &val); + sc->rf[i].val = val & 0xff; + sc->rf[i].reg = val >> 8; + DPRINTF("RF%d=0x%02x\n", sc->rf[i].reg, + sc->rf[i].val); + } + } /* read RF frequency offset from EEPROM */ run_srom_read(sc, RT2860_EEPROM_FREQ_LEDS, &val); sc->freq = ((val & 0xff) != 0xff) ? val & 0xff : 0; DPRINTF("EEPROM freq offset %d\n", sc->freq & 0xff); - if ((sc->leds = val >> 8) != 0xff) { + if (val >> 8 != 0xff) { /* read LEDs operating mode */ + sc->leds = val >> 8; run_srom_read(sc, RT2860_EEPROM_LED1, &sc->led[0]); run_srom_read(sc, RT2860_EEPROM_LED2, &sc->led[1]); run_srom_read(sc, RT2860_EEPROM_LED3, &sc->led[2]); @@ -1337,7 +1394,12 @@ run_read_eeprom(struct run_softc *sc) run_srom_read(sc, RT2860_EEPROM_ANTENNA, &val); if (val == 0xffff) { DPRINTF("invalid EEPROM antenna info, using default\n"); - if ((sc->mac_rev >> 16) >= 0x3070) { + if (sc->mac_ver == 0x3572) { + /* default to RF3052 2T2R */ + sc->rf_rev = RT3070_RF_3052; + sc->ntxchains = 2; + sc->nrxchains = 2; + } else if (sc->mac_ver >= 0x3070) { /* default to RF3020 1T1R */ sc->rf_rev = RT3070_RF_3020; sc->ntxchains = 1; @@ -1356,13 +1418,18 @@ run_read_eeprom(struct run_softc *sc) DPRINTF("EEPROM RF rev=0x%02x chains=%dT%dR\n", sc->rf_rev, sc->ntxchains, sc->nrxchains); - /* check if RF supports automatic Tx access gain control */ run_srom_read(sc, RT2860_EEPROM_CONFIG, &val); DPRINTF("EEPROM CFG 0x%04x\n", val); + /* check if driver should patch the DAC issue */ + if ((val >> 8) != 0xff) + sc->patch_dac = (val >> 15) & 1; if ((val & 0xff) != 0xff) { sc->ext_5ghz_lna = (val >> 3) & 1; sc->ext_2ghz_lna = (val >> 2) & 1; + /* check if RF supports automatic Tx access gain control */ sc->calib_2ghz = sc->calib_5ghz = (val >> 1) & 1; + /* check if we have a hardware radio switch */ + sc->rfswitch = val & 1; } /* read power settings for 2GHz channels */ @@ -1385,7 +1452,7 @@ run_read_eeprom(struct run_softc *sc) rt2860_rf2850[i].chan, sc->txpow1[i], sc->txpow2[i]); } /* read power settings for 5GHz channels */ - for (i = 0; i < 36; i += 2) { + for (i = 0; i < 40; i += 2) { run_srom_read(sc, RT2860_EEPROM_PWR5GHZ_BASE1 + i / 2, &val); sc->txpow1[i + 14] = (int8_t)(val & 0xff); sc->txpow1[i + 15] = (int8_t)(val >> 8); @@ -1395,7 +1462,7 @@ run_read_eeprom(struct run_softc *sc) sc->txpow2[i + 15] = (int8_t)(val >> 8); } /* fix broken Tx power entries */ - for (i = 0; i < 36; i++) { + for (i = 0; i < 40; i++) { if (sc->txpow1[14 + i] < -7 || sc->txpow1[14 + i] > 15) sc->txpow1[14 + i] = 5; if (sc->txpow2[14 + i] < -7 || sc->txpow2[14 + i] > 15) @@ -1444,14 +1511,32 @@ run_read_eeprom(struct run_softc *sc) sc->rssi_2ghz[0] = val & 0xff; /* Ant A */ sc->rssi_2ghz[1] = val >> 8; /* Ant B */ run_srom_read(sc, RT2860_EEPROM_RSSI2_2GHZ, &val); - sc->rssi_2ghz[2] = val & 0xff; /* Ant C */ + if (sc->mac_ver >= 0x3070) { + /* + * On RT3070 chips (limited to 2 Rx chains), this ROM + * field contains the Tx mixer gain for the 2GHz band. + */ + if ((val & 0xff) != 0xff) + sc->txmixgain_2ghz = val & 0x7; + DPRINTF("tx mixer gain=%u (2GHz)\n", sc->txmixgain_2ghz); + } else + sc->rssi_2ghz[2] = val & 0xff; /* Ant C */ sc->lna[2] = val >> 8; /* channel group 2 */ run_srom_read(sc, RT2860_EEPROM_RSSI1_5GHZ, &val); sc->rssi_5ghz[0] = val & 0xff; /* Ant A */ sc->rssi_5ghz[1] = val >> 8; /* Ant B */ run_srom_read(sc, RT2860_EEPROM_RSSI2_5GHZ, &val); - sc->rssi_5ghz[2] = val & 0xff; /* Ant C */ + if (sc->mac_ver == 0x3572) { + /* + * On RT3572 chips (limited to 2 Rx chains), this ROM + * field contains the Tx mixer gain for the 5GHz band. + */ + if ((val & 0xff) != 0xff) + sc->txmixgain_5ghz = val & 0x7; + DPRINTF("tx mixer gain=%u (5GHz)\n", sc->txmixgain_5ghz); + } else + sc->rssi_5ghz[2] = val & 0xff; /* Ant C */ sc->lna[3] = val >> 8; /* channel group 3 */ run_srom_read(sc, RT2860_EEPROM_LNA, &val); @@ -2639,7 +2724,7 @@ run_tx(struct run_softc *sc, struct mbuf dur = rt2860_rates[ridx].sp_ack_dur; else dur = rt2860_rates[ridx].lp_ack_dur; - *(uint16_t *)wh->i_dur = htole16(dur + sc->sifs); + *(uint16_t *)wh->i_dur = htole16(dur); } /* reserve slots for mgmt packets, just in case */ @@ -3006,9 +3091,26 @@ run_ioctl(struct ifnet *ifp, u_long cmd, } static void +run_set_agc(struct run_softc *sc, uint8_t agc) +{ + uint8_t bbp; + + if (sc->mac_ver == 0x3572) { + run_bbp_read(sc, 27, &bbp); + bbp &= ~(0x3 << 5); + run_bbp_write(sc, 27, bbp | 0 << 5); /* select Rx0 */ + run_bbp_write(sc, 66, agc); + run_bbp_write(sc, 27, bbp | 1 << 5); /* select Rx1 */ + run_bbp_write(sc, 66, agc); + } else + run_bbp_write(sc, 66, agc); +} + +static void run_select_chan_group(struct run_softc *sc, int group) { uint32_t tmp; + uint8_t agc; run_bbp_write(sc, 62, 0x37 - sc->lna[group]); run_bbp_write(sc, 63, 0x37 - sc->lna[group]); @@ -3024,13 +3126,14 @@ run_select_chan_group(struct run_softc * run_bbp_write(sc, 75, 0x50); } } else { - if (sc->ext_5ghz_lna) { + if (sc->mac_ver == 0x3572) + run_bbp_write(sc, 82, 0x94); + else run_bbp_write(sc, 82, 0xf2); + if (sc->ext_5ghz_lna) run_bbp_write(sc, 75, 0x46); - } else { - run_bbp_write(sc, 82, 0xf2); + else run_bbp_write(sc, 75, 0x50); - } } run_read(sc, RT2860_TX_BAND_CFG, &tmp); @@ -3053,13 +3156,26 @@ run_select_chan_group(struct run_softc * if (sc->nrxchains > 1) tmp |= RT2860_LNA_PE_A1_EN; } - run_write(sc, RT2860_TX_PIN_CFG, tmp); + if (sc->mac_ver == 0x3572) { + run_rt3070_rf_write(sc, 8, 0x00); + run_write(sc, RT2860_TX_PIN_CFG, tmp); + run_rt3070_rf_write(sc, 8, 0x80); + } else + run_write(sc, RT2860_TX_PIN_CFG, tmp); /* set initial AGC value */ - if (group == 0) - run_bbp_write(sc, 66, 0x2e + sc->lna[0]); - else - run_bbp_write(sc, 66, 0x32 + (sc->lna[group] * 5) / 3); + if (group == 0) { /* 2GHz band */ + if (sc->mac_ver >= 0x3070) + agc = 0x1c + sc->lna[0] * 2; + else + agc = 0x2e + sc->lna[0]; + } else { /* 5GHz band */ + if (sc->mac_ver == 0x3572) + agc = 0x22 + (sc->lna[group] * 5) / 3; + else + agc = 0x32 + (sc->lna[group] * 5) / 3; + } + run_set_agc(sc, agc); } static void @@ -3122,18 +3238,22 @@ run_rt3070_set_chan(struct run_softc *sc { int8_t txpow1, txpow2; uint8_t rf; + int i; /* RT3070 is 2GHz only */ KASSERT(chan >= 1 && chan <= 14, ("wrong channel selected\n")); + /* find the settings for this channel (we know it exists) */ + for (i = 0; rt2860_rf2850[i].chan != chan; i++); + /* use Tx power values from EEPROM */ - txpow1 = sc->txpow1[chan - 1]; - txpow2 = sc->txpow2[chan - 1]; + txpow1 = sc->txpow1[i]; + txpow2 = sc->txpow2[i]; - run_rt3070_rf_write(sc, 2, run_rf3020_freqs[chan - 1].n); - run_rt3070_rf_write(sc, 3, run_rf3020_freqs[chan - 1].k); + run_rt3070_rf_write(sc, 2, rt3070_freqs[i].n); + run_rt3070_rf_write(sc, 3, rt3070_freqs[i].k); run_rt3070_rf_read(sc, 6, &rf); - rf = (rf & ~0x03) | run_rf3020_freqs[chan - 1].r; + rf = (rf & ~0x03) | rt3070_freqs[i].r; run_rt3070_rf_write(sc, 6, rf); /* set Tx0 power */ @@ -3164,12 +3284,166 @@ run_rt3070_set_chan(struct run_softc *sc run_rt3070_rf_write(sc, 23, rf); /* program RF filter */ - run_rt3070_rf_write(sc, 24, sc->rf24_20mhz); - run_rt3070_rf_write(sc, 31, sc->rf24_20mhz); + run_rt3070_rf_read(sc, 24, &rf); /* Tx */ + rf = (rf & ~0x3f) | sc->rf24_20mhz; + run_rt3070_rf_write(sc, 24, rf); + run_rt3070_rf_read(sc, 31, &rf); /* Rx */ + rf = (rf & ~0x3f) | sc->rf24_20mhz; + run_rt3070_rf_write(sc, 31, rf); + + /* enable RF tuning */ + run_rt3070_rf_read(sc, 7, &rf); + run_rt3070_rf_write(sc, 7, rf | 0x01); +} + +static void +run_rt3572_set_chan(struct run_softc *sc, u_int chan) +{ + int8_t txpow1, txpow2; + uint32_t tmp; + uint8_t rf; + int i; + + /* find the settings for this channel (we know it exists) */ + for (i = 0; rt2860_rf2850[i].chan != chan; i++); + + /* use Tx power values from EEPROM */ + txpow1 = sc->txpow1[i]; + txpow2 = sc->txpow2[i]; + + if (chan <= 14) { + run_bbp_write(sc, 25, sc->bbp25); + run_bbp_write(sc, 26, sc->bbp26); + } else { + /* enable IQ phase correction */ + run_bbp_write(sc, 25, 0x09); + run_bbp_write(sc, 26, 0xff); + } + + run_rt3070_rf_write(sc, 2, rt3070_freqs[i].n); + run_rt3070_rf_write(sc, 3, rt3070_freqs[i].k); + run_rt3070_rf_read(sc, 6, &rf); + rf = (rf & ~0x0f) | rt3070_freqs[i].r; + rf |= (chan <= 14) ? 0x08 : 0x04; + run_rt3070_rf_write(sc, 6, rf); + + /* set PLL mode */ + run_rt3070_rf_read(sc, 5, &rf); + rf &= ~(0x08 | 0x04); + rf |= (chan <= 14) ? 0x04 : 0x08; + run_rt3070_rf_write(sc, 5, rf); + + /* set Tx power for chain 0 */ + if (chan <= 14) + rf = 0x60 | txpow1; + else + rf = 0xe0 | (txpow1 & 0xc) << 1 | (txpow1 & 0x3); + run_rt3070_rf_write(sc, 12, rf); + + /* set Tx power for chain 1 */ + if (chan <= 14) + rf = 0x60 | txpow2; + else + rf = 0xe0 | (txpow2 & 0xc) << 1 | (txpow2 & 0x3); + run_rt3070_rf_write(sc, 13, rf); + + /* set Tx/Rx streams */ + run_rt3070_rf_read(sc, 1, &rf); + rf &= ~0xfc; + if (sc->ntxchains == 1) + rf |= 1 << 7 | 1 << 5; /* 1T: disable Tx chains 2 & 3 */ + else if (sc->ntxchains == 2) + rf |= 1 << 7; /* 2T: disable Tx chain 3 */ + if (sc->nrxchains == 1) + rf |= 1 << 6 | 1 << 4; /* 1R: disable Rx chains 2 & 3 */ + else if (sc->nrxchains == 2) + rf |= 1 << 6; /* 2R: disable Rx chain 3 */ + run_rt3070_rf_write(sc, 1, rf); + + /* set RF offset */ + run_rt3070_rf_read(sc, 23, &rf); + rf = (rf & ~0x7f) | sc->freq; + run_rt3070_rf_write(sc, 23, rf); + + /* program RF filter */ + rf = sc->rf24_20mhz; + run_rt3070_rf_write(sc, 24, rf); /* Tx */ + run_rt3070_rf_write(sc, 31, rf); /* Rx */ + + /* enable RF tuning */ + run_rt3070_rf_read(sc, 7, &rf); + rf = (chan <= 14) ? 0xd8 : ((rf & ~0xc8) | 0x14); + run_rt3070_rf_write(sc, 7, rf); + + /* TSSI */ + rf = (chan <= 14) ? 0xc3 : 0xc0; + run_rt3070_rf_write(sc, 9, rf); + + /* set loop filter 1 */ + run_rt3070_rf_write(sc, 10, 0xf1); + /* set loop filter 2 */ + run_rt3070_rf_write(sc, 11, (chan <= 14) ? 0xb9 : 0x00); + + /* set tx_mx2_ic */ + run_rt3070_rf_write(sc, 15, (chan <= 14) ? 0x53 : 0x43); + /* set tx_mx1_ic */ + if (chan <= 14) + rf = 0x48 | sc->txmixgain_2ghz; + else + rf = 0x78 | sc->txmixgain_5ghz; + run_rt3070_rf_write(sc, 16, rf); + + /* set tx_lo1 */ + run_rt3070_rf_write(sc, 17, 0x23); + /* set tx_lo2 */ + if (chan <= 14) + rf = 0x93; + else if (chan <= 64) + rf = 0xb7; + else if (chan <= 128) + rf = 0x74; + else + rf = 0x72; + run_rt3070_rf_write(sc, 19, rf); + + /* set rx_lo1 */ + if (chan <= 14) + rf = 0xb3; + else if (chan <= 64) + rf = 0xf6; + else if (chan <= 128) + rf = 0xf4; + else + rf = 0xf3; + run_rt3070_rf_write(sc, 20, rf); + + /* set pfd_delay */ + if (chan <= 14) + rf = 0x15; + else if (chan <= 64) + rf = 0x3d; + else + rf = 0x01; + run_rt3070_rf_write(sc, 25, rf); + + /* set rx_lo2 */ + run_rt3070_rf_write(sc, 26, (chan <= 14) ? 0x85 : 0x87); + /* set ldo_rf_vc */ + run_rt3070_rf_write(sc, 27, (chan <= 14) ? 0x00 : 0x01); + /* set drv_cc */ + run_rt3070_rf_write(sc, 29, (chan <= 14) ? 0x9b : 0x9f); + + run_read(sc, RT2860_GPIO_CTRL, &tmp); + tmp &= ~0x8080; + if (chan <= 14) + tmp |= 0x80; + run_write(sc, RT2860_GPIO_CTRL, tmp); /* enable RF tuning */ run_rt3070_rf_read(sc, 7, &rf); run_rt3070_rf_write(sc, 7, rf | 0x01); + + run_delay(sc, 2); } static void @@ -3178,13 +3452,11 @@ run_set_rx_antenna(struct run_softc *sc, uint32_t tmp; if (aux) { - run_read(sc, RT2860_PCI_EECTRL, &tmp); - run_write(sc, RT2860_PCI_EECTRL, tmp & ~RT2860_C); + run_mcu_cmd(sc, RT2860_MCU_CMD_ANTSEL, 0); run_read(sc, RT2860_GPIO_CTRL, &tmp); run_write(sc, RT2860_GPIO_CTRL, (tmp & ~0x0808) | 0x08); } else { - run_read(sc, RT2860_PCI_EECTRL, &tmp); - run_write(sc, RT2860_PCI_EECTRL, tmp | RT2860_C); + run_mcu_cmd(sc, RT2860_MCU_CMD_ANTSEL, 1); run_read(sc, RT2860_GPIO_CTRL, &tmp); run_write(sc, RT2860_GPIO_CTRL, tmp & ~0x0808); } @@ -3200,14 +3472,13 @@ run_set_chan(struct run_softc *sc, struc if (chan == 0 || chan == IEEE80211_CHAN_ANY) return EINVAL; - if ((sc->mac_rev >> 16) >= 0x3070) + if (sc->mac_ver == 0x3572) + run_rt3572_set_chan(sc, chan); + else if (sc->mac_ver >= 0x3070) run_rt3070_set_chan(sc, chan); else run_rt2870_set_chan(sc, chan); - /* 802.11a uses a 16 microseconds short interframe space */ - sc->sifs = IEEE80211_IS_CHAN_5GHZ(c) ? 16 : 10; - /* determine channel group */ if (chan <= 14) group = 0; @@ -3373,7 +3644,7 @@ run_usb_timeout_cb(void *arg, int pendin struct run_softc *sc = arg; struct ieee80211vap *vap = &sc->sc_rvp->vap; - RUN_LOCK_ASSERT(sc, MA_OWNED); + RUN_LOCK(sc); if(vap->iv_state == IEEE80211_S_RUN && vap->iv_opmode != IEEE80211_M_STA) @@ -3384,6 +3655,8 @@ run_usb_timeout_cb(void *arg, int pendin ieee80211_cancel_scan(vap); } else DPRINTF("timeout by unknown cause\n"); + + RUN_UNLOCK(sc); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:29:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA0421065673; Tue, 6 Apr 2010 23:29:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E3A58FC26; Tue, 6 Apr 2010 23:29:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NTEjw014870; Tue, 6 Apr 2010 23:29:14 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NTEjC014868; Tue, 6 Apr 2010 23:29:14 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062329.o36NTEjC014868@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206321 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:29:14 -0000 Author: thompsa Date: Tue Apr 6 23:29:14 2010 New Revision: 206321 URL: http://svn.freebsd.org/changeset/base/206321 Log: MFC r205043 Add device ID for the NATURAL4000 keyboard Modified: stable/8/sys/dev/usb/usbdevs 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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:28:46 2010 (r206320) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:29:14 2010 (r206321) @@ -2062,6 +2062,7 @@ product MICROSOFT WLNOTEBOOK2 0x00e1 Wir product MICROSOFT WLNOTEBOOK3 0x00d2 Wireless Optical Mouse 3000 (Model 1049) product MICROSOFT WLUSBMOUSE 0x00b9 Wireless USB Mouse product MICROSOFT XBOX360 0x0292 XBOX 360 WLAN +product MICROSOFT NATURAL4000 0x00db Natural Ergonomic Keyboard 4000 /* Microtech products */ product MICROTECH SCSIDB25 0x0004 USB-SCSI-DB25 From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:29:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 972151065680; Tue, 6 Apr 2010 23:29:38 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83F668FC17; Tue, 6 Apr 2010 23:29:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NTcQo015037; Tue, 6 Apr 2010 23:29:38 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NTcno015035; Tue, 6 Apr 2010 23:29:38 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062329.o36NTcno015035@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206322 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:29:38 -0000 Author: thompsa Date: Tue Apr 6 23:29:38 2010 New Revision: 206322 URL: http://svn.freebsd.org/changeset/base/206322 Log: MFC r205801 Add a couple of usb product IDs. Submitted by: Dmitry Luhtionov @ gmail.com Modified: stable/8/sys/dev/usb/usbdevs 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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:29:14 2010 (r206321) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:29:38 2010 (r206322) @@ -2519,12 +2519,14 @@ product QUALCOMMINC E2003 0x2003 3G mode /* Quanta products */ /* Quanta products */ +product QUANTA RW6815_1 0x00ce HP iPAQ rw6815 product QUANTA RT3070 0x0304 RT3070 product QUANTA Q101 0xea02 HSDPA modem product QUANTA Q111 0xea03 HSDPA modem product QUANTA GLX 0xea04 HSDPA modem product QUANTA GKE 0xea05 HSDPA modem product QUANTA GLE 0xea06 HSDPA modem +product QUANTA RW6815_2 0xf003 HP iPAQ rw6815 /* Qtronix products */ product QTRONIX 980N 0x2011 Scorpion-980N keyboard @@ -2732,6 +2734,7 @@ product SIERRA AIRCARD875 0x6820 Aircard product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer /* Sigmatel products */ +product SIGMATEL WBT_3052 0x4200 WBT-3052 IrDA/USB Bridge product SIGMATEL I_BEAD100 0x8008 i-Bead 100 MP3 Player /* SIIG products */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:30:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AECDC106564A; Tue, 6 Apr 2010 23:30:02 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 966C78FC13; Tue, 6 Apr 2010 23:30:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NU2Hd015185; Tue, 6 Apr 2010 23:30:02 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NU2gM015182; Tue, 6 Apr 2010 23:30:02 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062330.o36NU2gM015182@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:30:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206323 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:30:02 -0000 Author: thompsa Date: Tue Apr 6 23:30:02 2010 New Revision: 206323 URL: http://svn.freebsd.org/changeset/base/206323 Log: MFC r205802 Add PCI IDs for two more nForce controllers. Submitted by: Dmitry Luhtionov @ gmail.com Modified: stable/8/sys/dev/usb/controller/ehci_pci.c stable/8/sys/dev/usb/controller/ohci_pci.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/usb/controller/ehci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ehci_pci.c Tue Apr 6 23:29:38 2010 (r206322) +++ stable/8/sys/dev/usb/controller/ehci_pci.c Tue Apr 6 23:30:02 2010 (r206323) @@ -215,6 +215,8 @@ ehci_pci_match(device_t self) return "NVIDIA nForce3 250 USB 2.0 controller"; case 0x005b10de: return "NVIDIA nForce4 USB 2.0 controller"; + case 0x036d10de: + return "NVIDIA nForce MCP55 USB 2.0 controller"; case 0x03f210de: return "NVIDIA nForce MCP61 USB 2.0 controller"; case 0x0aa610de: Modified: stable/8/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/8/sys/dev/usb/controller/ohci_pci.c Tue Apr 6 23:29:38 2010 (r206322) +++ stable/8/sys/dev/usb/controller/ohci_pci.c Tue Apr 6 23:30:02 2010 (r206323) @@ -173,6 +173,8 @@ ohci_pci_match(device_t self) case 0x00d710de: return ("nVidia nForce3 USB Controller"); + case 0x036c10de: + return ("nVidia nForce MCP55 USB Controller"); case 0x03f110de: return ("nVidia nForce MCP61 USB Controller"); case 0x0aa510de: From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:30:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EAD81065672; Tue, 6 Apr 2010 23:30:31 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4DA8FC12; Tue, 6 Apr 2010 23:30:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NUVZk015392; Tue, 6 Apr 2010 23:30:31 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NUVDg015390; Tue, 6 Apr 2010 23:30:31 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062330.o36NUVDg015390@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206324 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:30:31 -0000 Author: thompsa Date: Tue Apr 6 23:30:30 2010 New Revision: 206324 URL: http://svn.freebsd.org/changeset/base/206324 Log: MFC r205803 Make sure the bsd_urb_list gets initialised and that new URB's are queued at the end of the list. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/usb_compat_linux.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/usb/usb_compat_linux.c ============================================================================== --- stable/8/sys/dev/usb/usb_compat_linux.c Tue Apr 6 23:30:02 2010 (r206323) +++ stable/8/sys/dev/usb/usb_compat_linux.c Tue Apr 6 23:30:30 2010 (r206324) @@ -435,7 +435,7 @@ usb_submit_urb(struct urb *urb, uint16_t uhe->bsd_xfer[1]) { /* we are ready! */ - TAILQ_INSERT_HEAD(&uhe->bsd_urb_list, urb, bsd_urb_list); + TAILQ_INSERT_TAIL(&uhe->bsd_urb_list, urb, bsd_urb_list); urb->status = -EINPROGRESS; @@ -908,6 +908,7 @@ usb_linux_create_usb_device(struct usb_d if (p_uhe) { bcopy(ed, &p_uhe->desc, sizeof(p_uhe->desc)); p_uhe->bsd_iface_index = iface_index - 1; + TAILQ_INIT(&p_uhe->bsd_urb_list); p_uhe++; } if (p_uhi) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:30:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2F2B106564A; Tue, 6 Apr 2010 23:30:57 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EEF18FC0C; Tue, 6 Apr 2010 23:30:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NUvKa015537; Tue, 6 Apr 2010 23:30:57 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NUvhM015535; Tue, 6 Apr 2010 23:30:57 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062330.o36NUvhM015535@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206325 - stable/8/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:30:57 -0000 Author: thompsa Date: Tue Apr 6 23:30:57 2010 New Revision: 206325 URL: http://svn.freebsd.org/changeset/base/206325 Log: MFC r205804 Do not swap Apple keys when detecting Apple-FN keyboards. Reported by: Steven Noonan Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/input/ukbd.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/usb/input/ukbd.c ============================================================================== --- stable/8/sys/dev/usb/input/ukbd.c Tue Apr 6 23:30:30 2010 (r206324) +++ stable/8/sys/dev/usb/input/ukbd.c Tue Apr 6 23:30:57 2010 (r206325) @@ -903,8 +903,7 @@ ukbd_attach(device_t dev) hid_input, 0, &sc->sc_loc_apple_fn, &flags, &temp_id)) { if (flags & HIO_VARIABLE) - sc->sc_flags |= UKBD_FLAG_APPLE_FN | - UKBD_FLAG_APPLE_SWAP; + sc->sc_flags |= UKBD_FLAG_APPLE_FN; DPRINTFN(1, "Found Apple FN-key\n"); apple_keys = 1; sc->sc_kbd_id = temp_id; From owner-svn-src-all@FreeBSD.ORG Tue Apr 6 23:31:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A38F1065784; Tue, 6 Apr 2010 23:31:23 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4798FC0A; Tue, 6 Apr 2010 23:31:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o36NVNfw015660; Tue, 6 Apr 2010 23:31:23 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o36NVNIr015657; Tue, 6 Apr 2010 23:31:23 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004062331.o36NVNIr015657@svn.freebsd.org> From: Andrew Thompson Date: Tue, 6 Apr 2010 23:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206326 - in stable/8/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 23:31:23 -0000 Author: thompsa Date: Tue Apr 6 23:31:22 2010 New Revision: 206326 URL: http://svn.freebsd.org/changeset/base/206326 Log: MFC r205805 Do not sync cache for the PL2506 PR: usb/144915 Submitted by: Monty Hall Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs 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/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Tue Apr 6 23:30:57 2010 (r206325) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Tue Apr 6 23:31:22 2010 (r206326) @@ -317,6 +317,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(PNY, ATTACHE2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_START_STOP), + USB_QUIRK(PROLIFIC, PL2506, 0x0000, 0xffff, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:30:57 2010 (r206325) +++ stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:31:22 2010 (r206326) @@ -2419,6 +2419,7 @@ product PROLIFIC PL2303 0x2303 PL2303 S product PROLIFIC PL2305 0x2305 Parallel printer product PROLIFIC ATAPI4 0x2307 ATAPI-4 Controller product PROLIFIC PL2501 0x2501 PL2501 Host-Host interface +product PROLIFIC PL2506 0x2506 PL2506 USB to IDE Bridge product PROLIFIC PHAROS 0xaaa0 Prolific Pharos product PROLIFIC RSAQ3 0xaaa2 PL2303 Serial Adapter (IODATA USB-RSAQ3) product PROLIFIC2 WSIM 0x2001 Willcom WSIM From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 00:25:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7151E1065783; Wed, 7 Apr 2010 00:25:04 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D6498FC15; Wed, 7 Apr 2010 00:25:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o370P4IL027691; Wed, 7 Apr 2010 00:25:04 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o370P4jL027688; Wed, 7 Apr 2010 00:25:04 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004070025.o370P4jL027688@svn.freebsd.org> From: Andrew Thompson Date: Wed, 7 Apr 2010 00:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206327 - in stable/8/sys/dev/usb: . wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 00:25:04 -0000 Author: thompsa Date: Wed Apr 7 00:25:03 2010 New Revision: 206327 URL: http://svn.freebsd.org/changeset/base/206327 Log: MFC r202608 Remove a hack to attach TRENDnet TEW-504UB/EU, this has been solved. Modified: stable/8/sys/dev/usb/usbdevs stable/8/sys/dev/usb/wlan/if_uath.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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Tue Apr 6 23:31:22 2010 (r206326) +++ stable/8/sys/dev/usb/usbdevs Wed Apr 7 00:25:03 2010 (r206327) @@ -3030,7 +3030,6 @@ product UMEDIA RT2870_1 0x300e RT2870 product UMEDIA ALL0298V2 0x3204 ALL0298 v2 product UMEDIA AR5523_2 0x3205 AR5523 product UMEDIA AR5523_2_NF 0x3206 AR5523 (no firmware) -product UMEDIA AR5523_3 0x3207 AR5523 /* Universal Access products */ product UNIACCESS PANACHE 0x0101 Panache Surf USB ISDN Adapter Modified: stable/8/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_uath.c Tue Apr 6 23:31:22 2010 (r206326) +++ stable/8/sys/dev/usb/wlan/if_uath.c Wed Apr 7 00:25:03 2010 (r206327) @@ -191,7 +191,6 @@ static const struct usb_device_id uath_d UATH_DEV(NETGEAR3, WPN111_2), UATH_DEV(UMEDIA, TEW444UBEU), UATH_DEV(UMEDIA, AR5523_2), - UATH_DEV(UMEDIA, AR5523_3), UATH_DEV(WISTRONNEWEB, AR5523_1), UATH_DEV(WISTRONNEWEB, AR5523_2), UATH_DEV(ZCOM, AR5523) From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 00:26:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF847106566C; Wed, 7 Apr 2010 00:26:39 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC3718FC18; Wed, 7 Apr 2010 00:26:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o370QdSq028098; Wed, 7 Apr 2010 00:26:39 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o370Qd95028096; Wed, 7 Apr 2010 00:26:39 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004070026.o370Qd95028096@svn.freebsd.org> From: Andrew Thompson Date: Wed, 7 Apr 2010 00:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206328 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 00:26:39 -0000 Author: thompsa Date: Wed Apr 7 00:26:39 2010 New Revision: 206328 URL: http://svn.freebsd.org/changeset/base/206328 Log: MFC r202609 Product ID of D-Link DWA-120 after loading the firmware is incorrect. Modified: stable/8/sys/dev/usb/usbdevs 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/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Wed Apr 7 00:25:03 2010 (r206327) +++ stable/8/sys/dev/usb/usbdevs Wed Apr 7 00:26:39 2010 (r206328) @@ -1343,8 +1343,8 @@ product DLINK DSB650TX_PNA 0x4003 1/10/1 product DLINK DSB650TX3 0x400b 10/100 Ethernet product DLINK DSB650TX2 0x4102 10/100 Ethernet product DLINK DSB650 0xabc1 10/100 Ethernet +product DLINK2 DWA120 0x3a0c DWA-120 product DLINK2 DWA120_NF 0x3a0d DWA-120 (no firmware) -product DLINK2 DWA120 0x3a0e DWA-120 product DLINK2 DWLG122C1 0x3c03 DWL-G122 c1 product DLINK2 WUA1340 0x3c04 WUA-1340 product DLINK2 DWA111 0x3c06 DWA-111 From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 00:28:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50FFD106566C; Wed, 7 Apr 2010 00:28:00 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CAEA8FC0C; Wed, 7 Apr 2010 00:28:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o370S0Vl028462; Wed, 7 Apr 2010 00:28:00 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o370S0pp028459; Wed, 7 Apr 2010 00:28:00 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004070028.o370S0pp028459@svn.freebsd.org> From: Andrew Thompson Date: Wed, 7 Apr 2010 00:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206329 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 00:28:01 -0000 Author: thompsa Date: Wed Apr 7 00:27:59 2010 New Revision: 206329 URL: http://svn.freebsd.org/changeset/base/206329 Log: MFC r203087 adds sysctl knobs to show rate statistics that it could be useful to debug slow TX speed. Modified: stable/8/sys/dev/usb/wlan/if_urtw.c stable/8/sys/dev/usb/wlan/if_urtwvar.h 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/usb/wlan/if_urtw.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtw.c Wed Apr 7 00:26:39 2010 (r206328) +++ stable/8/sys/dev/usb/wlan/if_urtw.c Wed Apr 7 00:27:59 2010 (r206329) @@ -762,6 +762,7 @@ static int urtw_compute_txtime(uint16_t uint8_t); static void urtw_updateslot(struct ifnet *); static void urtw_updateslottask(void *, int); +static void urtw_sysctl_node(struct urtw_softc *); static int urtw_match(device_t dev) @@ -906,6 +907,8 @@ urtw_attach(device_t dev) &sc->sc_rxtap.wr_ihdr, sizeof(sc->sc_rxtap), URTW_RX_RADIOTAP_PRESENT); + urtw_sysctl_node(sc); + if (bootverbose) ieee80211_announce(ic); return (0); @@ -1703,6 +1706,8 @@ urtw_tx_start(struct urtw_softc *sc, str rate = urtw_rtl2rate(sc->sc_currate); } + sc->sc_stats.txrates[sc->sc_currate]++; + if (IEEE80211_IS_MULTICAST(wh->i_addr1)) txdur = pkttime = urtw_compute_txtime(m0->m_pkthdr.len + IEEE80211_CRC_LEN, rate, 0, 0); @@ -4372,6 +4377,54 @@ fail: URTW_UNLOCK(sc); } +static void +urtw_sysctl_node(struct urtw_softc *sc) +{ +#define URTW_SYSCTL_STAT_ADD32(c, h, n, p, d) \ + SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child, *parent; + struct sysctl_oid *tree; + struct urtw_stats *stats = &sc->sc_stats; + + ctx = device_get_sysctl_ctx(sc->sc_dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)); + + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, + NULL, "URTW statistics"); + parent = SYSCTL_CHILDREN(tree); + + /* Tx statistics. */ + tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "tx", CTLFLAG_RD, + NULL, "Tx MAC statistics"); + child = SYSCTL_CHILDREN(tree); + URTW_SYSCTL_STAT_ADD32(ctx, child, "1m", &stats->txrates[0], + "1 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "2m", &stats->txrates[1], + "2 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "5.5m", &stats->txrates[2], + "5.5 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "6m", &stats->txrates[4], + "6 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "9m", &stats->txrates[5], + "9 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "11m", &stats->txrates[3], + "11 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "12m", &stats->txrates[6], + "12 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "18m", &stats->txrates[7], + "18 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "24m", &stats->txrates[8], + "24 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "36m", &stats->txrates[9], + "36 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "48m", &stats->txrates[10], + "48 Mbit/s"); + URTW_SYSCTL_STAT_ADD32(ctx, child, "54m", &stats->txrates[11], + "54 Mbit/s"); +#undef URTW_SYSCTL_STAT_ADD32 +} + static device_method_t urtw_methods[] = { DEVMETHOD(device_probe, urtw_match), DEVMETHOD(device_attach, urtw_attach), Modified: stable/8/sys/dev/usb/wlan/if_urtwvar.h ============================================================================== --- stable/8/sys/dev/usb/wlan/if_urtwvar.h Wed Apr 7 00:26:39 2010 (r206328) +++ stable/8/sys/dev/usb/wlan/if_urtwvar.h Wed Apr 7 00:27:59 2010 (r206329) @@ -81,6 +81,10 @@ struct urtw_tx_radiotap_header { ((1 << IEEE80211_RADIOTAP_FLAGS) | \ (1 << IEEE80211_RADIOTAP_CHANNEL)) +struct urtw_stats { + unsigned int txrates[12]; +}; + struct urtw_vap { struct ieee80211vap vap; int (*newstate)(struct ieee80211vap *, @@ -169,6 +173,8 @@ struct urtw_softc { uint64_t sc_txstatus; /* only for 8187B */ struct task sc_updateslot_task; + struct urtw_stats sc_stats; + struct urtw_rx_radiotap_header sc_rxtap; int sc_rxtap_len; struct urtw_tx_radiotap_header sc_txtap; From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 00:30:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC4F1106566B; Wed, 7 Apr 2010 00:30:25 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 984538FC0A; Wed, 7 Apr 2010 00:30:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o370UP9h029468; Wed, 7 Apr 2010 00:30:25 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o370UPcl029465; Wed, 7 Apr 2010 00:30:25 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004070030.o370UPcl029465@svn.freebsd.org> From: Andrew Thompson Date: Wed, 7 Apr 2010 00:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206330 - in stable/8/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 00:30:25 -0000 Author: thompsa Date: Wed Apr 7 00:30:25 2010 New Revision: 206330 URL: http://svn.freebsd.org/changeset/base/206330 Log: MFC r205681 - add some usb devices (scanner, printer, usb storage) - add quirks for the usb storage Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs 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/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Wed Apr 7 00:27:59 2010 (r206329) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Wed Apr 7 00:30:25 2010 (r206330) @@ -227,6 +227,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(IOMEGA, ZIP100, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */ + USB_QUIRK(JMICRON, JM20336, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(JMICRON, JM20337, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), @@ -444,6 +445,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(ACTIONS, MP4, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ASUS, GMSC, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), + USB_QUIRK(UNKNOWN4, USBMEMSTICK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), }; #undef USB_QUIRK_VP #undef USB_QUIRK Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Wed Apr 7 00:27:59 2010 (r206329) +++ stable/8/sys/dev/usb/usbdevs Wed Apr 7 00:30:25 2010 (r206330) @@ -65,6 +65,7 @@ $FreeBSD$ vendor UNKNOWN1 0x0053 Unknown vendor vendor UNKNOWN2 0x0105 Unknown vendor vendor EGALAX2 0x0123 eGalax, Inc. +vendor UNKNOWN4 0x0204 Unknown vendor vendor HUMAX 0x02ad HUMAX vendor LTS 0x0386 LTS vendor BWCT 0x03da Bernd Walter Computer Technology @@ -1105,6 +1106,7 @@ product BROADCOM BCM2033 0x2033 BCM2033 /* Brother Industries products */ product BROTHER HL1050 0x0002 HL-1050 laser printer +product BROTHER MFC8600_9650 0x0100 MFC8600/9650 multifunction device /* Behavior Technology Computer products */ product BTC BTC7932 0x6782 Keyboard with mouse port @@ -1819,6 +1821,7 @@ product JABLOTRON PC60B 0x0001 PC-60B product JATON EDA 0x5704 Ethernet /* JMicron products */ +product JMICRON JM20336 0x2336 USB to SATA Bridge product JMICRON JM20337 0x2338 USB to ATA/ATAPI Bridge /* JVC products */ @@ -2134,6 +2137,7 @@ product MUSTEK 1200UB 0x0006 1200 UB sc product MUSTEK 1200USBPLUS 0x0007 1200 USB Plus scanner product MUSTEK 1200CUPLUS 0x0008 1200 CU Plus scanner product MUSTEK BEARPAW1200F 0x0010 BearPaw 1200F scanner +product MUSTEK BEARPAW2400TA 0x0218 BearPaw 2400TA scanner product MUSTEK BEARPAW1200TA 0x021e BearPaw 1200TA scanner product MUSTEK 600USB 0x0873 600 USB scanner product MUSTEK MDC800 0xa800 MDC-800 digital camera @@ -3034,6 +3038,9 @@ product UMEDIA AR5523_2_NF 0x3206 AR5523 /* Universal Access products */ product UNIACCESS PANACHE 0x0101 Panache Surf USB ISDN Adapter +/* Unknown vendors */ +product UNKNOWN4 USBMEMSTICK 0x6025 Flash Disk CBM + /* U.S. Robotics products */ product USR USR5423 0x0121 USR5423 WLAN From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 00:33:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71ED31065673; Wed, 7 Apr 2010 00:33:00 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4369E8FC14; Wed, 7 Apr 2010 00:33:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o370X0k0030270; Wed, 7 Apr 2010 00:33:00 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o370X0Pl030266; Wed, 7 Apr 2010 00:33:00 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004070033.o370X0Pl030266@svn.freebsd.org> From: Andrew Thompson Date: Wed, 7 Apr 2010 00:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206331 - stable/8/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 00:33:00 -0000 Author: thompsa Date: Wed Apr 7 00:32:59 2010 New Revision: 206331 URL: http://svn.freebsd.org/changeset/base/206331 Log: MFC r205036 Implement USB kernel driver detach from userland. Submitted by: Hans Petter Selasky Modified: stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/usb/usb_device.h stable/8/sys/dev/usb/usb_generic.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/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Wed Apr 7 00:30:25 2010 (r206330) +++ stable/8/sys/dev/usb/usb_device.c Wed Apr 7 00:32:59 2010 (r206331) @@ -80,7 +80,6 @@ static void usb_init_endpoint(struct usb_device *, uint8_t, struct usb_endpoint_descriptor *, struct usb_endpoint *); static void usb_unconfigure(struct usb_device *, uint8_t); -static void usb_detach_device(struct usb_device *, uint8_t, uint8_t); static void usb_detach_device_sub(struct usb_device *, device_t *, uint8_t); static uint8_t usb_probe_and_attach_sub(struct usb_device *, Modified: stable/8/sys/dev/usb/usb_device.h ============================================================================== --- stable/8/sys/dev/usb/usb_device.h Wed Apr 7 00:30:25 2010 (r206330) +++ stable/8/sys/dev/usb/usb_device.h Wed Apr 7 00:32:59 2010 (r206331) @@ -196,6 +196,7 @@ struct usb_device *usb_alloc_device(devi enum usb_dev_speed speed, enum usb_hc_mode mode); usb_error_t usb_probe_and_attach(struct usb_device *udev, uint8_t iface_index); +void usb_detach_device(struct usb_device *, uint8_t, uint8_t); usb_error_t usb_reset_iface_endpoints(struct usb_device *udev, uint8_t iface_index); usb_error_t usbd_set_config_index(struct usb_device *udev, uint8_t index); Modified: stable/8/sys/dev/usb/usb_generic.c ============================================================================== --- stable/8/sys/dev/usb/usb_generic.c Wed Apr 7 00:30:25 2010 (r206330) +++ stable/8/sys/dev/usb/usb_generic.c Wed Apr 7 00:32:59 2010 (r206331) @@ -2095,17 +2095,32 @@ ugen_ioctl_post(struct usb_fifo *f, u_lo break; case USB_IFACE_DRIVER_ACTIVE: - /* TODO */ - *u.pint = 0; + + n = *u.pint & 0xFF; + + iface = usbd_get_iface(f->udev, n); + + if (iface && iface->subdev) + error = 0; + else + error = ENXIO; break; case USB_IFACE_DRIVER_DETACH: - /* TODO */ + error = priv_check(curthread, PRIV_DRIVER); - if (error) { + + if (error) + break; + + n = *u.pint & 0xFF; + + if (n == USB_IFACE_INDEX_ANY) { + error = EINVAL; break; } - error = EINVAL; + + usb_detach_device(f->udev, n, 0); break; case USB_SET_POWER_MODE: From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 00:34:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7615F1065674; Wed, 7 Apr 2010 00:34:05 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6216E8FC1A; Wed, 7 Apr 2010 00:34:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o370Y5vA030569; Wed, 7 Apr 2010 00:34:05 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o370Y5gN030563; Wed, 7 Apr 2010 00:34:05 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201004070034.o370Y5gN030563@svn.freebsd.org> From: Andrew Thompson Date: Wed, 7 Apr 2010 00:34:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206332 - stable/8/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 00:34:05 -0000 Author: thompsa Date: Wed Apr 7 00:34:05 2010 New Revision: 206332 URL: http://svn.freebsd.org/changeset/base/206332 Log: MFC r203147 Add a function to check if the usb devices is still connected. Submitted by: Hans Petter Selasky Modified: stable/8/lib/libusb/libusb20.3 stable/8/lib/libusb/libusb20.c stable/8/lib/libusb/libusb20.h stable/8/lib/libusb/libusb20_int.h stable/8/lib/libusb/libusb20_ugen20.c Directory Properties: stable/8/lib/libusb/ (props changed) stable/8/lib/libusb/usb.h (props changed) Modified: stable/8/lib/libusb/libusb20.3 ============================================================================== --- stable/8/lib/libusb/libusb20.3 Wed Apr 7 00:32:59 2010 (r206331) +++ stable/8/lib/libusb/libusb20.3 Wed Apr 7 00:34:05 2010 (r206332) @@ -143,6 +143,8 @@ USB access library (libusb -lusb) .Ft int .Fn libusb20_dev_reset "struct libusb20_device *pdev" .Ft int +.Fn libusb20_dev_check_connected "struct libusb20_device *pdev" +.Ft int .Fn libusb20_dev_set_power_mode "struct libusb20_device *pdev" "uint8_t power_mode" .Ft uint8_t .Fn libusb20_dev_get_power_mode "struct libusb20_device *pdev" @@ -677,6 +679,15 @@ the last set USB configuration. This function returns zero on success else a LIBUSB20_ERROR value is returned. . +. +.Pp +. +.Fn libusb20_dev_check_connected +will check if an opened USB device is still connected. +. +This function returns zero if the device is still connected else a LIBUSB20_ERROR value is returned. +. +. .Pp . .Fn libusb20_dev_set_power_mode Modified: stable/8/lib/libusb/libusb20.c ============================================================================== --- stable/8/lib/libusb/libusb20.c Wed Apr 7 00:32:59 2010 (r206331) +++ stable/8/lib/libusb/libusb20.c Wed Apr 7 00:34:05 2010 (r206332) @@ -67,6 +67,7 @@ dummy_callback(struct libusb20_transfer #define dummy_set_config_index (void *)dummy_int #define dummy_set_alt_index (void *)dummy_int #define dummy_reset_device (void *)dummy_int +#define dummy_check_connected (void *)dummy_int #define dummy_set_power_mode (void *)dummy_int #define dummy_get_power_mode (void *)dummy_int #define dummy_kernel_driver_active (void *)dummy_int @@ -673,6 +674,15 @@ libusb20_dev_reset(struct libusb20_devic } int +libusb20_dev_check_connected(struct libusb20_device *pdev) +{ + int error; + + error = pdev->methods->check_connected(pdev); + return (error); +} + +int libusb20_dev_set_power_mode(struct libusb20_device *pdev, uint8_t power_mode) { int error; Modified: stable/8/lib/libusb/libusb20.h ============================================================================== --- stable/8/lib/libusb/libusb20.h Wed Apr 7 00:32:59 2010 (r206331) +++ stable/8/lib/libusb/libusb20.h Wed Apr 7 00:34:05 2010 (r206332) @@ -250,6 +250,7 @@ int libusb20_dev_request_sync(struct lib int libusb20_dev_req_string_sync(struct libusb20_device *pdev, uint8_t index, uint16_t langid, void *ptr, uint16_t len); int libusb20_dev_req_string_simple_sync(struct libusb20_device *pdev, uint8_t index, void *ptr, uint16_t len); int libusb20_dev_reset(struct libusb20_device *pdev); +int libusb20_dev_check_connected(struct libusb20_device *pdev); int libusb20_dev_set_power_mode(struct libusb20_device *pdev, uint8_t power_mode); uint8_t libusb20_dev_get_power_mode(struct libusb20_device *pdev); int libusb20_dev_set_alt_index(struct libusb20_device *pdev, uint8_t iface_index, uint8_t alt_index); Modified: stable/8/lib/libusb/libusb20_int.h ============================================================================== --- stable/8/lib/libusb/libusb20_int.h Wed Apr 7 00:32:59 2010 (r206331) +++ stable/8/lib/libusb/libusb20_int.h Wed Apr 7 00:34:05 2010 (r206332) @@ -101,6 +101,7 @@ typedef int (libusb20_set_power_mode_t)( typedef int (libusb20_get_power_mode_t)(struct libusb20_device *pdev, uint8_t *power_mode); typedef int (libusb20_set_alt_index_t)(struct libusb20_device *pdev, uint8_t iface_index, uint8_t alt_index); typedef int (libusb20_set_config_index_t)(struct libusb20_device *pdev, uint8_t index); +typedef int (libusb20_check_connected_t)(struct libusb20_device *pdev); /* USB transfer specific */ typedef int (libusb20_tr_open_t)(struct libusb20_transfer *xfer, uint32_t MaxBufSize, uint32_t MaxFrameCount, uint8_t ep_no); @@ -117,6 +118,7 @@ typedef void (libusb20_tr_cancel_async_t m(n, kernel_driver_active) \ m(n, process) \ m(n, reset_device) \ + m(n, check_connected) \ m(n, set_power_mode) \ m(n, get_power_mode) \ m(n, set_alt_index) \ Modified: stable/8/lib/libusb/libusb20_ugen20.c ============================================================================== --- stable/8/lib/libusb/libusb20_ugen20.c Wed Apr 7 00:32:59 2010 (r206331) +++ stable/8/lib/libusb/libusb20_ugen20.c Wed Apr 7 00:34:05 2010 (r206332) @@ -67,6 +67,7 @@ static libusb20_get_config_index_t ugen2 static libusb20_set_config_index_t ugen20_set_config_index; static libusb20_set_alt_index_t ugen20_set_alt_index; static libusb20_reset_device_t ugen20_reset_device; +static libusb20_check_connected_t ugen20_check_connected; static libusb20_set_power_mode_t ugen20_set_power_mode; static libusb20_get_power_mode_t ugen20_get_power_mode; static libusb20_kernel_driver_active_t ugen20_kernel_driver_active; @@ -553,6 +554,25 @@ ugen20_reset_device(struct libusb20_devi } static int +ugen20_check_connected(struct libusb20_device *pdev) +{ + uint32_t plugtime; + int error = 0; + + if (ioctl(pdev->file_ctrl, USB_GET_PLUGTIME, &plugtime)) { + error = LIBUSB20_ERROR_NO_DEVICE; + goto done; + } + + if (pdev->session_data.plugtime != plugtime) { + error = LIBUSB20_ERROR_NO_DEVICE; + goto done; + } +done: + return (error); +} + +static int ugen20_set_power_mode(struct libusb20_device *pdev, uint8_t power_mode) { int temp; From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 02:24:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 829C7106564A; Wed, 7 Apr 2010 02:24:42 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C18D8FC14; Wed, 7 Apr 2010 02:24:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o372Oguo058031; Wed, 7 Apr 2010 02:24:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o372OgHA058011; Wed, 7 Apr 2010 02:24:42 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201004070224.o372OgHA058011@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 7 Apr 2010 02:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206336 - in stable/8: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/amd64/linux32 sys/compat/freebsd32 sys/compat/ia32 sys/conf sys/fs/procfs sys/ia64/conf sys/ia64/ia64 sys/i... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 02:24:42 -0000 Author: nwhitehorn Date: Wed Apr 7 02:24:41 2010 New Revision: 206336 URL: http://svn.freebsd.org/changeset/base/206336 Log: MFC r205014,205015: Provide groundwork for 32-bit binary compatibility on non-x86 platforms, for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32 option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts of the kernel and enhances the freebsd32 compatibility code to support big-endian platforms. This MFC is required for MFCs of later changes to the freebsd32 compatibility from HEAD. Requested by: kib Modified: stable/8/UPDATING stable/8/sys/amd64/amd64/db_trace.c stable/8/sys/amd64/amd64/exception.S stable/8/sys/amd64/amd64/vm_machdep.c stable/8/sys/amd64/conf/GENERIC stable/8/sys/amd64/conf/NOTES stable/8/sys/amd64/conf/XENHVM stable/8/sys/amd64/include/elf.h stable/8/sys/amd64/include/reg.h stable/8/sys/amd64/linux32/linux32_sysvec.c stable/8/sys/compat/freebsd32/freebsd32.h stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/compat/freebsd32/freebsd32_util.h stable/8/sys/compat/freebsd32/syscalls.master stable/8/sys/compat/ia32/ia32_reg.h stable/8/sys/compat/ia32/ia32_sysvec.c stable/8/sys/conf/files.amd64 stable/8/sys/conf/files.ia64 stable/8/sys/conf/options.amd64 stable/8/sys/conf/options.ia64 stable/8/sys/fs/procfs/procfs_dbregs.c stable/8/sys/fs/procfs/procfs_fpregs.c stable/8/sys/fs/procfs/procfs_ioctl.c stable/8/sys/fs/procfs/procfs_map.c stable/8/sys/fs/procfs/procfs_regs.c stable/8/sys/ia64/conf/GENERIC stable/8/sys/ia64/conf/NOTES stable/8/sys/ia64/ia64/exception.S stable/8/sys/ia64/ia64/genassym.c stable/8/sys/ia64/ia64/machdep.c stable/8/sys/ia64/include/elf.h stable/8/sys/ia64/include/reg.h stable/8/sys/kern/imgact_elf.c stable/8/sys/kern/kern_jail.c stable/8/sys/kern/kern_module.c stable/8/sys/kern/kern_thr.c stable/8/sys/kern/kern_umtx.c stable/8/sys/kern/sys_generic.c stable/8/sys/kern/sys_process.c stable/8/sys/kern/uipc_socket.c stable/8/sys/kern/vfs_aio.c stable/8/sys/modules/linux/Makefile stable/8/sys/modules/procfs/Makefile stable/8/sys/sys/ptrace.h 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/UPDATING ============================================================================== --- stable/8/UPDATING Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/UPDATING Wed Apr 7 02:24:41 2010 (r206336) @@ -15,6 +15,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100406: + The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32 + to allow 32-bit compatibility on non-x86 platforms. All kernel + configurations on amd64 and ia64 platforms using these options must + be modified accordingly. + 20100125: Introduce the kernel thread "deadlock resolver" (which can be enabled via the DEADLKRES option, see NOTES for more details) and the Modified: stable/8/sys/amd64/amd64/db_trace.c ============================================================================== --- stable/8/sys/amd64/amd64/db_trace.c Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/amd64/db_trace.c Wed Apr 7 02:24:41 2010 (r206336) @@ -319,7 +319,7 @@ db_nextframe(struct amd64_frame **fp, db frame_type = INTERRUPT; else if (strcmp(name, "Xfast_syscall") == 0) frame_type = SYSCALL; -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 else if (strcmp(name, "Xint0x80_syscall") == 0) frame_type = SYSCALL; #endif Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/amd64/exception.S Wed Apr 7 02:24:41 2010 (r206336) @@ -572,7 +572,7 @@ ENTRY(fork_trampoline) * included. */ -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 .data .p2align 4 .text Modified: stable/8/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/vm_machdep.c Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/amd64/vm_machdep.c Wed Apr 7 02:24:41 2010 (r206336) @@ -439,7 +439,7 @@ cpu_set_upcall_kse(struct thread *td, vo */ cpu_thread_clean(td); -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 if (td->td_proc->p_sysent->sv_flags & SV_ILP32) { /* * Set the trap frame to point at the beginning of the uts @@ -490,7 +490,7 @@ cpu_set_user_tls(struct thread *td, void if ((u_int64_t)tls_base >= VM_MAXUSER_ADDRESS) return (EINVAL); -#ifdef COMPAT_IA32 +#ifdef COMPAT_FREEBSD32 if (td->td_proc->p_sysent->sv_flags & SV_ILP32) { td->td_pcb->pcb_gsbase = (register_t)tls_base; return (0); Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/conf/GENERIC Wed Apr 7 02:24:41 2010 (r206336) @@ -54,7 +54,7 @@ options PSEUDOFS # Pseudo-filesystem f options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) -options COMPAT_IA32 # Compatible with i386 binaries +options COMPAT_FREEBSD32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/conf/NOTES Wed Apr 7 02:24:41 2010 (r206336) @@ -445,7 +445,7 @@ options PMAP_SHPGPERPROC=201 #XXX these 32 bit binaries is added. # Enable 32-bit runtime support for FreeBSD/i386 binaries. -options COMPAT_IA32 +options COMPAT_FREEBSD32 # Enable iBCS2 runtime support for SCO and ISC binaries #XXX#options IBCS2 @@ -456,7 +456,7 @@ options COMPAT_IA32 # Enable Linux ABI emulation #XXX#options COMPAT_LINUX -# Enable 32-bit Linux ABI emulation (requires COMPAT_43 and COMPAT_IA32) +# Enable 32-bit Linux ABI emulation (requires COMPAT_43 and COMPAT_FREEBSD32) options COMPAT_LINUX32 # Enable the linux-like proc filesystem support (requires COMPAT_LINUX32 Modified: stable/8/sys/amd64/conf/XENHVM ============================================================================== --- stable/8/sys/amd64/conf/XENHVM Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/conf/XENHVM Wed Apr 7 02:24:41 2010 (r206336) @@ -55,7 +55,7 @@ options PSEUDOFS # Pseudo-filesystem f options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) -options COMPAT_IA32 # Compatible with i386 binaries +options COMPAT_FREEBSD32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 Modified: stable/8/sys/amd64/include/elf.h ============================================================================== --- stable/8/sys/amd64/include/elf.h Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/include/elf.h Wed Apr 7 02:24:41 2010 (r206336) @@ -42,6 +42,7 @@ #include #define ELF_ARCH EM_X86_64 +#define ELF_ARCH32 EM_386 #define ELF_MACHINE_OK(x) ((x) == EM_X86_64) Modified: stable/8/sys/amd64/include/reg.h ============================================================================== --- stable/8/sys/amd64/include/reg.h Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/include/reg.h Wed Apr 7 02:24:41 2010 (r206336) @@ -37,6 +37,10 @@ #ifndef _MACHINE_REG_H_ #define _MACHINE_REG_H_ +#if defined(_KERNEL) && !defined(_STANDALONE) +#include "opt_compat.h" +#endif + /* * Register set accessible via /proc/$pid/regs and PT_{SET,GET}REGS. */ @@ -116,6 +120,11 @@ struct dbreg { #define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by register number */ +#ifdef COMPAT_FREEBSD32 +#include +#include +#endif + #ifdef _KERNEL /* * XXX these interfaces are MI, so they should be declared in a MI place. Modified: stable/8/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/8/sys/amd64/linux32/linux32_sysvec.c Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/amd64/linux32/linux32_sysvec.c Wed Apr 7 02:24:41 2010 (r206336) @@ -34,8 +34,8 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" -#ifndef COMPAT_IA32 -#error "Unable to compile Linux-emulator due to missing COMPAT_IA32 option!" +#ifndef COMPAT_FREEBSD32 +#error "Unable to compile Linux-emulator due to missing COMPAT_FREEBSD32 option!" #endif #define __ELF_WORD_SIZE 32 Modified: stable/8/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32.h Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/compat/freebsd32/freebsd32.h Wed Apr 7 02:24:41 2010 (r206336) @@ -29,6 +29,9 @@ #ifndef _COMPAT_FREEBSD32_FREEBSD32_H_ #define _COMPAT_FREEBSD32_FREEBSD32_H_ +#include +#include + #define PTRIN(v) (void *)(uintptr_t) (v) #define PTROUT(v) (u_int32_t)(uintptr_t) (v) @@ -197,4 +200,25 @@ struct i386_ldt_args32 { uint32_t num; }; +/* + * Alternative layouts for + */ +struct prstatus32 { + int pr_version; + u_int pr_statussz; + u_int pr_gregsetsz; + u_int pr_fpregsetsz; + int pr_osreldate; + int pr_cursig; + pid_t pr_pid; + struct reg32 pr_reg; +}; + +struct prpsinfo32 { + int pr_version; + u_int pr_psinfosz; + char pr_fname[PRFNAMESZ+1]; + char pr_psargs[PRARGSZ+1]; +}; + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */ Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 02:24:41 2010 (r206336) @@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" +#define __ELF_WORD_SIZE 32 + #include #include #include @@ -44,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include /* Must come after sys/malloc.h */ +#include #include #include #include @@ -91,6 +94,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include @@ -115,6 +119,16 @@ CTASSERT(sizeof(struct sigaction32) == 2 static int freebsd32_kevent_copyout(void *arg, struct kevent *kevp, int count); static int freebsd32_kevent_copyin(void *arg, struct kevent *kevp, int count); +#if BYTE_ORDER == BIG_ENDIAN +#define PAIR32TO64(type, name) ((name ## 2) | ((type)(name ## 1) << 32)) +#define RETVAL_HI 0 +#define RETVAL_LO 1 +#else +#define PAIR32TO64(type, name) ((name ## 1) | ((type)(name ## 2) << 32)) +#define RETVAL_HI 1 +#define RETVAL_LO 0 +#endif + int freebsd32_wait4(struct thread *td, struct freebsd32_wait4_args *uap) { @@ -426,8 +440,7 @@ freebsd32_mmap(struct thread *td, struct int prot = uap->prot; int flags = uap->flags; int fd = uap->fd; - off_t pos = (uap->poslo - | ((off_t)uap->poshi << 32)); + off_t pos = PAIR32TO64(off_t,uap->pos); #ifdef __ia64__ vm_size_t pageoff; int error; @@ -523,8 +536,8 @@ freebsd6_freebsd32_mmap(struct thread *t ap.prot = uap->prot; ap.flags = uap->flags; ap.fd = uap->fd; - ap.poslo = uap->poslo; - ap.poshi = uap->poshi; + ap.pos1 = uap->pos1; + ap.pos2 = uap->pos2; return (freebsd32_mmap(td, &ap)); } @@ -586,7 +599,6 @@ freebsd32_select(struct thread *td, stru } else tvp = NULL; /* - * XXX big-endian needs to convert the fd_sets too. * XXX Do pointers need PTRIN()? */ return (kern_select(td, uap->nd, uap->in, uap->ou, uap->ex, tvp, @@ -620,7 +632,6 @@ freebsd32_pselect(struct thread *td, str } else uset = NULL; /* - * XXX big-endian needs to convert the fd_sets too. * XXX Do pointers need PTRIN()? */ error = kern_pselect(td, uap->nd, uap->in, uap->ou, uap->ex, tvp, @@ -843,7 +854,7 @@ freebsd32_preadv(struct thread *td, stru error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio); if (error) return (error); - error = kern_preadv(td, uap->fd, auio, uap->offset); + error = kern_preadv(td, uap->fd, auio, PAIR32TO64(off_t,uap->offset)); free(auio, M_IOV); return (error); } @@ -857,7 +868,7 @@ freebsd32_pwritev(struct thread *td, str error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio); if (error) return (error); - error = kern_pwritev(td, uap->fd, auio, uap->offset); + error = kern_pwritev(td, uap->fd, auio, PAIR32TO64(off_t,uap->offset)); free(auio, M_IOV); return (error); } @@ -1982,7 +1993,7 @@ freebsd32_pread(struct thread *td, struc ap.fd = uap->fd; ap.buf = uap->buf; ap.nbyte = uap->nbyte; - ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); + ap.offset = PAIR32TO64(off_t,uap->offset); return (pread(td, &ap)); } @@ -1994,7 +2005,7 @@ freebsd32_pwrite(struct thread *td, stru ap.fd = uap->fd; ap.buf = uap->buf; ap.nbyte = uap->nbyte; - ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); + ap.offset = PAIR32TO64(off_t,uap->offset); return (pwrite(td, &ap)); } @@ -2006,13 +2017,13 @@ freebsd32_lseek(struct thread *td, struc off_t pos; ap.fd = uap->fd; - ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); + ap.offset = PAIR32TO64(off_t,uap->offset); ap.whence = uap->whence; error = lseek(td, &ap); /* Expand the quad return into two parts for eax and edx */ pos = *(off_t *)(td->td_retval); - td->td_retval[0] = pos & 0xffffffff; /* %eax */ - td->td_retval[1] = pos >> 32; /* %edx */ + td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */ + td->td_retval[RETVAL_HI] = pos >> 32; /* %edx */ return error; } @@ -2022,7 +2033,7 @@ freebsd32_truncate(struct thread *td, st struct truncate_args ap; ap.path = uap->path; - ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32)); + ap.length = PAIR32TO64(off_t,uap->length); return (truncate(td, &ap)); } @@ -2032,7 +2043,7 @@ freebsd32_ftruncate(struct thread *td, s struct ftruncate_args ap; ap.fd = uap->fd; - ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32)); + ap.length = PAIR32TO64(off_t,uap->length); return (ftruncate(td, &ap)); } @@ -2064,7 +2075,7 @@ freebsd6_freebsd32_pread(struct thread * ap.fd = uap->fd; ap.buf = uap->buf; ap.nbyte = uap->nbyte; - ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); + ap.offset = PAIR32TO64(off_t,uap->offset); return (pread(td, &ap)); } @@ -2076,7 +2087,7 @@ freebsd6_freebsd32_pwrite(struct thread ap.fd = uap->fd; ap.buf = uap->buf; ap.nbyte = uap->nbyte; - ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); + ap.offset = PAIR32TO64(off_t,uap->offset); return (pwrite(td, &ap)); } @@ -2088,13 +2099,13 @@ freebsd6_freebsd32_lseek(struct thread * off_t pos; ap.fd = uap->fd; - ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); + ap.offset = PAIR32TO64(off_t,uap->offset); ap.whence = uap->whence; error = lseek(td, &ap); /* Expand the quad return into two parts for eax and edx */ pos = *(off_t *)(td->td_retval); - td->td_retval[0] = pos & 0xffffffff; /* %eax */ - td->td_retval[1] = pos >> 32; /* %edx */ + td->td_retval[RETVAL_LO] = pos & 0xffffffff; /* %eax */ + td->td_retval[RETVAL_HI] = pos >> 32; /* %edx */ return error; } @@ -2104,7 +2115,7 @@ freebsd6_freebsd32_truncate(struct threa struct truncate_args ap; ap.path = uap->path; - ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32)); + ap.length = PAIR32TO64(off_t,uap->length); return (truncate(td, &ap)); } @@ -2114,7 +2125,7 @@ freebsd6_freebsd32_ftruncate(struct thre struct ftruncate_args ap; ap.fd = uap->fd; - ap.length = (uap->lengthlo | ((off_t)uap->lengthhi << 32)); + ap.length = PAIR32TO64(off_t,uap->length); return (ftruncate(td, &ap)); } #endif /* COMPAT_FREEBSD6 */ @@ -2141,7 +2152,7 @@ freebsd32_do_sendfile(struct thread *td, ap.fd = uap->fd; ap.s = uap->s; - ap.offset = (uap->offsetlo | ((off_t)uap->offsethi << 32)); + ap.offset = PAIR32TO64(off_t,uap->offset); ap.nbytes = uap->nbytes; ap.hdtr = (struct sf_hdtr *)uap->hdtr; /* XXX not used */ ap.sbytes = uap->sbytes; @@ -2879,7 +2890,7 @@ freebsd32_cpuset_setid(struct thread *td struct cpuset_setid_args ap; ap.which = uap->which; - ap.id = (uap->idlo | ((id_t)uap->idhi << 32)); + ap.id = PAIR32TO64(id_t,uap->id); ap.setid = uap->setid; return (cpuset_setid(td, &ap)); @@ -2893,7 +2904,7 @@ freebsd32_cpuset_getid(struct thread *td ap.level = uap->level; ap.which = uap->which; - ap.id = (uap->idlo | ((id_t)uap->idhi << 32)); + ap.id = PAIR32TO64(id_t,uap->id); ap.setid = uap->setid; return (cpuset_getid(td, &ap)); @@ -2907,7 +2918,7 @@ freebsd32_cpuset_getaffinity(struct thre ap.level = uap->level; ap.which = uap->which; - ap.id = (uap->idlo | ((id_t)uap->idhi << 32)); + ap.id = PAIR32TO64(id_t,uap->id); ap.cpusetsize = uap->cpusetsize; ap.mask = uap->mask; @@ -2922,7 +2933,7 @@ freebsd32_cpuset_setaffinity(struct thre ap.level = uap->level; ap.which = uap->which; - ap.id = (uap->idlo | ((id_t)uap->idhi << 32)); + ap.id = PAIR32TO64(id_t,uap->id); ap.cpusetsize = uap->cpusetsize; ap.mask = uap->mask; @@ -3072,3 +3083,123 @@ syscall32_module_handler(struct module * return (error); } } + +register_t * +freebsd32_copyout_strings(struct image_params *imgp) +{ + int argc, envc; + u_int32_t *vectp; + char *stringp, *destp; + u_int32_t *stack_base; + struct freebsd32_ps_strings *arginfo; + size_t execpath_len; + int szsigcode; + + /* + * Calculate string base and vector table pointers. + * Also deal with signal trampoline code for this exec type. + */ + if (imgp->execpath != NULL && imgp->auxargs != NULL) + execpath_len = strlen(imgp->execpath) + 1; + else + execpath_len = 0; + arginfo = (struct freebsd32_ps_strings *)FREEBSD32_PS_STRINGS; + szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); + destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - + roundup(execpath_len, sizeof(char *)) - + roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); + + /* + * install sigcode + */ + if (szsigcode) + copyout(imgp->proc->p_sysent->sv_sigcode, + ((caddr_t)arginfo - szsigcode), szsigcode); + + /* + * Copy the image path for the rtld. + */ + if (execpath_len != 0) { + imgp->execpathp = (uintptr_t)arginfo - szsigcode - execpath_len; + copyout(imgp->execpath, (void *)imgp->execpathp, + execpath_len); + } + + /* + * If we have a valid auxargs ptr, prepare some room + * on the stack. + */ + if (imgp->auxargs) { + /* + * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for + * lower compatibility. + */ + imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size + : (AT_COUNT * 2); + /* + * The '+ 2' is for the null pointers at the end of each of + * the arg and env vector sets,and imgp->auxarg_size is room + * for argument of Runtime loader. + */ + vectp = (u_int32_t *) (destp - (imgp->args->argc + + imgp->args->envc + 2 + imgp->auxarg_size + execpath_len) * + sizeof(u_int32_t)); + } else + /* + * The '+ 2' is for the null pointers at the end of each of + * the arg and env vector sets + */ + vectp = (u_int32_t *) + (destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t)); + + /* + * vectp also becomes our initial stack base + */ + stack_base = vectp; + + stringp = imgp->args->begin_argv; + argc = imgp->args->argc; + envc = imgp->args->envc; + /* + * Copy out strings - arguments and environment. + */ + copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); + + /* + * Fill in "ps_strings" struct for ps, w, etc. + */ + suword32(&arginfo->ps_argvstr, (u_int32_t)(intptr_t)vectp); + suword32(&arginfo->ps_nargvstr, argc); + + /* + * Fill in argument portion of vector table. + */ + for (; argc > 0; --argc) { + suword32(vectp++, (u_int32_t)(intptr_t)destp); + while (*stringp++ != 0) + destp++; + destp++; + } + + /* a null vector table pointer separates the argp's from the envp's */ + suword32(vectp++, 0); + + suword32(&arginfo->ps_envstr, (u_int32_t)(intptr_t)vectp); + suword32(&arginfo->ps_nenvstr, envc); + + /* + * Fill in environment portion of vector table. + */ + for (; envc > 0; --envc) { + suword32(vectp++, (u_int32_t)(intptr_t)destp); + while (*stringp++ != 0) + destp++; + destp++; + } + + /* end of vector table is a null pointer */ + suword32(vectp, 0); + + return ((register_t *)stack_base); +} + Modified: stable/8/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_util.h Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/compat/freebsd32/freebsd32_util.h Wed Apr 7 02:24:41 2010 (r206336) @@ -83,4 +83,6 @@ int syscall32_register(int *offset, s int syscall32_deregister(int *offset, struct sysent *old_sysent); int syscall32_module_handler(struct module *mod, int what, void *arg); +register_t *freebsd32_copyout_strings(struct image_params *imgp); + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ Modified: stable/8/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/8/sys/compat/freebsd32/syscalls.master Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/compat/freebsd32/syscalls.master Wed Apr 7 02:24:41 2010 (r206336) @@ -53,6 +53,10 @@ #include #include +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif + ; Reserved/unimplemented system calls in the range 0-150 inclusive ; are reserved for use in future Berkeley releases. ; Additional system calls implemented in vendor and other @@ -195,7 +199,6 @@ 93 AUE_SELECT STD { int freebsd32_select(int nd, fd_set *in, \ fd_set *ou, fd_set *ex, \ struct timeval32 *tv); } -; XXX need to override for big-endian - little-endian should work fine. 94 AUE_NULL UNIMPL setdopt 95 AUE_FSYNC NOPROTO { int fsync(int fd); } 96 AUE_SETPRIORITY NOPROTO { int setpriority(int which, int who, \ @@ -316,12 +319,10 @@ 172 AUE_NULL UNIMPL nosys 173 AUE_PREAD COMPAT6 { ssize_t freebsd32_pread(int fd, void *buf, \ size_t nbyte, int pad, \ - u_int32_t offsetlo, u_int32_t offsethi); } -; XXX note - bigendian is different + u_int32_t offset1, u_int32_t offset2); } 174 AUE_PWRITE COMPAT6 { ssize_t freebsd32_pwrite(int fd, \ const void *buf, size_t nbyte, int pad, \ - u_int32_t offsetlo, u_int32_t offsethi); } -; XXX note - bigendian is different + u_int32_t offset1, u_int32_t offset2); } 175 AUE_NULL UNIMPL nosys 176 AUE_NTP_ADJTIME NOPROTO { int ntp_adjtime(struct timex *tp); } 177 AUE_NULL UNIMPL sfork (BSD/OS 2.x) @@ -356,21 +357,17 @@ char *buf, u_int count, int32_t *basep); } 197 AUE_MMAP COMPAT6 { caddr_t freebsd32_mmap(caddr_t addr, \ size_t len, int prot, int flags, int fd, \ - int pad, u_int32_t poslo, \ - u_int32_t poshi); } + int pad, u_int32_t pos1, u_int32_t pos2); } 198 AUE_NULL NOPROTO { int nosys(void); } __syscall \ __syscall_args int -; XXX note - bigendian is different 199 AUE_LSEEK COMPAT6 { off_t freebsd32_lseek(int fd, int pad, \ - u_int32_t offsetlo, u_int32_t offsethi, \ + u_int32_t offset1, u_int32_t offset2, \ int whence); } -; XXX note - bigendian is different 200 AUE_TRUNCATE COMPAT6 { int freebsd32_truncate(char *path, \ - int pad, u_int32_t lengthlo, \ - u_int32_t lengthhi); } -; XXX note - bigendian is different + int pad, u_int32_t length1, \ + u_int32_t length2); } 201 AUE_FTRUNCATE COMPAT6 { int freebsd32_ftruncate(int fd, int pad, \ - u_int32_t lengthlo, u_int32_t lengthhi); } + u_int32_t length1, u_int32_t length2); } 202 AUE_SYSCTL STD { int freebsd32_sysctl(int *name, \ u_int namelen, void *old, \ u_int32_t *oldlenp, void *new, \ @@ -403,7 +400,7 @@ ; ; The following were introduced with NetBSD/4.4Lite-2 -; They are initialized by thier respective modules/sysinits +; They are initialized by their respective modules/sysinits ; XXX PROBLEM!! 220 AUE_SEMCTL COMPAT7 { int freebsd32_semctl(int semid, int semnum, \ int cmd, union semun32 *arg); } @@ -504,12 +501,12 @@ ; 289 and 290 from NetBSD (OpenBSD: 267 and 268) 289 AUE_PREADV STD { ssize_t freebsd32_preadv(int fd, \ struct iovec32 *iovp, \ - u_int iovcnt, off_t offset); } -; XXX note - bigendian is different + u_int iovcnt, \ + u_int32_t offset1, u_int32_t offset2); } 290 AUE_PWRITEV STD { ssize_t freebsd32_pwritev(int fd, \ struct iovec32 *iovp, \ - u_int iovcnt, off_t offset); } -; XXX note - bigendian is different + u_int iovcnt, \ + u_int32_t offset1, u_int32_t offset2); } 291 AUE_NULL UNIMPL nosys 292 AUE_NULL UNIMPL nosys 293 AUE_NULL UNIMPL nosys @@ -582,9 +579,8 @@ 334 AUE_NULL NOPROTO { int sched_rr_get_interval (pid_t pid, \ struct timespec *interval); } 335 AUE_NULL NOPROTO { int utrace(const void *addr, size_t len); } -; XXX note - bigendian is different 336 AUE_SENDFILE COMPAT4 { int freebsd32_sendfile(int fd, int s, \ - u_int32_t offsetlo, u_int32_t offsethi, \ + u_int32_t offset1, u_int32_t offset2, \ size_t nbytes, struct sf_hdtr32 *hdtr, \ off_t *sbytes, int flags); } 337 AUE_NULL NOPROTO { int kldsym(int fileid, int cmd, \ @@ -687,7 +683,7 @@ 392 AUE_NULL NOPROTO { int uuidgen(struct uuid *store, \ int count); } 393 AUE_SENDFILE STD { int freebsd32_sendfile(int fd, int s, \ - u_int32_t offsetlo, u_int32_t offsethi, \ + u_int32_t offset1, u_int32_t offset2, \ size_t nbytes, struct sf_hdtr32 *hdtr, \ off_t *sbytes, int flags); } 394 AUE_NULL UNIMPL mac_syscall @@ -821,42 +817,74 @@ 474 AUE_NULL NOPROTO { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ struct sockaddr * from, __socklen_t *fromlenaddr, \ struct sctp_sndrcvinfo *sinfo, int *msg_flags); } +#ifdef PAD64_REQUIRED 475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \ void *buf,size_t nbyte, \ - u_int32_t offsetlo, u_int32_t offsethi); } + int pad, \ + u_int32_t offset1, u_int32_t offset2); } 476 AUE_PWRITE STD { ssize_t freebsd32_pwrite(int fd, \ const void *buf, size_t nbyte, \ - u_int32_t offsetlo, u_int32_t offsethi); } + int pad, \ + u_int32_t offset1, u_int32_t offset2); } 477 AUE_MMAP STD { caddr_t freebsd32_mmap(caddr_t addr, \ size_t len, int prot, int flags, int fd, \ - u_int32_t poslo, u_int32_t poshi); } + int pad, \ + u_int32_t pos1, u_int32_t pos2); } 478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \ - u_int32_t offsetlo, u_int32_t offsethi, \ + int pad, \ + u_int32_t offset1, u_int32_t offset2, \ int whence); } 479 AUE_TRUNCATE STD { int freebsd32_truncate(char *path, \ - u_int32_t lengthlo, u_int32_t lengthhi); } + int pad, \ + u_int32_t length1, u_int32_t length2); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ - u_int32_t lengthlo, u_int32_t lengthhi); } + int pad, \ + u_int32_t length1, u_int32_t length2); } +#else +475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \ + void *buf,size_t nbyte, \ + u_int32_t offset1, u_int32_t offset2); } +476 AUE_PWRITE STD { ssize_t freebsd32_pwrite(int fd, \ + const void *buf, size_t nbyte, \ + u_int32_t offset1, u_int32_t offset2); } +477 AUE_MMAP STD { caddr_t freebsd32_mmap(caddr_t addr, \ + size_t len, int prot, int flags, int fd, \ + u_int32_t pos1, u_int32_t pos2); } +478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \ + u_int32_t offset1, u_int32_t offset2, \ + int whence); } +479 AUE_TRUNCATE STD { int freebsd32_truncate(char *path, \ + u_int32_t length1, u_int32_t length2); } +480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ + u_int32_t length1, u_int32_t length2); } +#endif 481 AUE_KILL NOPROTO { int thr_kill2(pid_t pid, long id, int sig); } 482 AUE_SHMOPEN NOPROTO { int shm_open(const char *path, int flags, \ mode_t mode); } 483 AUE_SHMUNLINK NOPROTO { int shm_unlink(const char *path); } 484 AUE_NULL NOPROTO { int cpuset(cpusetid_t *setid); } +#ifdef PAD64_REQUIRED +485 AUE_NULL STD { int freebsd32_cpuset_setid(cpuwhich_t which, \ + int pad, \ + u_int32_t id1, u_int32_t id2, \ + cpusetid_t setid); } +#else 485 AUE_NULL STD { int freebsd32_cpuset_setid(cpuwhich_t which, \ - uint32_t idlo, uint32_t idhi, \ + u_int32_t id1, u_int32_t id2, \ cpusetid_t setid); } +#endif 486 AUE_NULL STD { int freebsd32_cpuset_getid(cpulevel_t level, \ cpuwhich_t which, \ - uint32_t idlo, uint32_t idhi, \ + u_int32_t id1, u_int32_t id2, \ cpusetid_t *setid); } 487 AUE_NULL STD { int freebsd32_cpuset_getaffinity( \ cpulevel_t level, cpuwhich_t which, \ - uint32_t idlo, uint32_t idhi, \ + u_int32_t id1, u_int32_t id2, \ size_t cpusetsize, \ cpuset_t *mask); } 488 AUE_NULL STD { int freebsd32_cpuset_setaffinity( \ cpulevel_t level, cpuwhich_t which, \ - uint32_t idlo, uint32_t idhi, \ + u_int32_t id1, u_int32_t id2, \ size_t cpusetsize, \ const cpuset_t *mask); } 489 AUE_FACCESSAT NOPROTO { int faccessat(int fd, char *path, int mode, \ Modified: stable/8/sys/compat/ia32/ia32_reg.h ============================================================================== --- stable/8/sys/compat/ia32/ia32_reg.h Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/compat/ia32/ia32_reg.h Wed Apr 7 02:24:41 2010 (r206336) @@ -105,29 +105,6 @@ struct save87 { u_char sv_pad[64]; /* padding; used by emulators */ }; - -/* - * Alternative layouts for - * Used in core dumps, the reason for this file existing. - */ -struct prstatus32 { - int pr_version; - u_int pr_statussz; - u_int pr_gregsetsz; - u_int pr_fpregsetsz; - int pr_osreldate; - int pr_cursig; - pid_t pr_pid; - struct reg32 pr_reg; -}; - -struct prpsinfo32 { - int pr_version; - u_int pr_psinfosz; - char pr_fname[PRFNAMESZ+1]; - char pr_psargs[PRARGSZ+1]; -}; - /* * Wrappers and converters. */ Modified: stable/8/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- stable/8/sys/compat/ia32/ia32_sysvec.c Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/compat/ia32/ia32_sysvec.c Wed Apr 7 02:24:41 2010 (r206336) @@ -93,7 +93,6 @@ CTASSERT(sizeof(struct ia32_ucontext4) = CTASSERT(sizeof(struct ia32_sigframe4) == 408); #endif -static register_t *ia32_copyout_strings(struct image_params *imgp); static void ia32_fixlimit(struct rlimit *rl, int which); SYSCTL_NODE(_compat, OID_AUTO, ia32, CTLFLAG_RW, 0, "ia32 mode"); @@ -132,7 +131,7 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_usrstack = FREEBSD32_USRSTACK, .sv_psstrings = FREEBSD32_PS_STRINGS, .sv_stackprot = VM_PROT_ALL, - .sv_copyout_strings = ia32_copyout_strings, + .sv_copyout_strings = freebsd32_copyout_strings, .sv_setregs = ia32_setregs, .sv_fixlimit = ia32_fixlimit, .sv_maxssiz = &ia32_maxssiz, @@ -194,127 +193,6 @@ elf32_dump_thread(struct thread *td __un { } - -/* XXX may be freebsd32 MI */ -static register_t * -ia32_copyout_strings(struct image_params *imgp) -{ - int argc, envc; - u_int32_t *vectp; - char *stringp, *destp; - u_int32_t *stack_base; - struct freebsd32_ps_strings *arginfo; - size_t execpath_len; - int szsigcode; - - /* - * Calculate string base and vector table pointers. - * Also deal with signal trampoline code for this exec type. - */ - if (imgp->execpath != NULL && imgp->auxargs != NULL) - execpath_len = strlen(imgp->execpath) + 1; - else - execpath_len = 0; - arginfo = (struct freebsd32_ps_strings *)FREEBSD32_PS_STRINGS; - szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); - destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - - roundup(execpath_len, sizeof(char *)) - - roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); - - /* - * install sigcode - */ - if (szsigcode) - copyout(imgp->proc->p_sysent->sv_sigcode, - ((caddr_t)arginfo - szsigcode), szsigcode); - - /* - * Copy the image path for the rtld. - */ - if (execpath_len != 0) { - imgp->execpathp = (uintptr_t)arginfo - szsigcode - execpath_len; - copyout(imgp->execpath, (void *)imgp->execpathp, - execpath_len); - } - - /* - * If we have a valid auxargs ptr, prepare some room - * on the stack. - */ - if (imgp->auxargs) { - /* - * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for - * lower compatibility. - */ - imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size - : (AT_COUNT * 2); - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets,and imgp->auxarg_size is room - * for argument of Runtime loader. - */ - vectp = (u_int32_t *) (destp - (imgp->args->argc + - imgp->args->envc + 2 + imgp->auxarg_size + execpath_len) * - sizeof(u_int32_t)); - } else - /* - * The '+ 2' is for the null pointers at the end of each of - * the arg and env vector sets - */ - vectp = (u_int32_t *) - (destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t)); - - /* - * vectp also becomes our initial stack base - */ - stack_base = vectp; - - stringp = imgp->args->begin_argv; - argc = imgp->args->argc; - envc = imgp->args->envc; - /* - * Copy out strings - arguments and environment. - */ - copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); - - /* - * Fill in "ps_strings" struct for ps, w, etc. - */ - suword32(&arginfo->ps_argvstr, (u_int32_t)(intptr_t)vectp); - suword32(&arginfo->ps_nargvstr, argc); - - /* - * Fill in argument portion of vector table. - */ - for (; argc > 0; --argc) { - suword32(vectp++, (u_int32_t)(intptr_t)destp); - while (*stringp++ != 0) - destp++; - destp++; - } - - /* a null vector table pointer separates the argp's from the envp's */ - suword32(vectp++, 0); - - suword32(&arginfo->ps_envstr, (u_int32_t)(intptr_t)vectp); - suword32(&arginfo->ps_nenvstr, envc); - - /* - * Fill in environment portion of vector table. - */ - for (; envc > 0; --envc) { - suword32(vectp++, (u_int32_t)(intptr_t)destp); - while (*stringp++ != 0) - destp++; - destp++; - } - - /* end of vector table is a null pointer */ - suword32(vectp, 0); - - return ((register_t *)stack_base); -} - static void ia32_fixlimit(struct rlimit *rl, int which) { Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/conf/files.amd64 Wed Apr 7 02:24:41 2010 (r206336) @@ -236,20 +236,20 @@ kern/link_elf_obj.c standard # # IA32 binary support # -#amd64/ia32/ia32_exception.S optional compat_ia32 -amd64/ia32/ia32_reg.c optional compat_ia32 -amd64/ia32/ia32_signal.c optional compat_ia32 -amd64/ia32/ia32_sigtramp.S optional compat_ia32 -amd64/ia32/ia32_syscall.c optional compat_ia32 -amd64/ia32/ia32_misc.c optional compat_ia32 -compat/freebsd32/freebsd32_ioctl.c optional compat_ia32 -compat/freebsd32/freebsd32_misc.c optional compat_ia32 -compat/freebsd32/freebsd32_syscalls.c optional compat_ia32 -compat/freebsd32/freebsd32_sysent.c optional compat_ia32 -compat/ia32/ia32_sysvec.c optional compat_ia32 +#amd64/ia32/ia32_exception.S optional compat_freebsd32 +amd64/ia32/ia32_reg.c optional compat_freebsd32 +amd64/ia32/ia32_signal.c optional compat_freebsd32 +amd64/ia32/ia32_sigtramp.S optional compat_freebsd32 +amd64/ia32/ia32_syscall.c optional compat_freebsd32 +amd64/ia32/ia32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 +compat/ia32/ia32_sysvec.c optional compat_freebsd32 compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs -kern/imgact_elf32.c optional compat_ia32 +kern/imgact_elf32.c optional compat_freebsd32 # # Linux/i386 binary support # Modified: stable/8/sys/conf/files.ia64 ============================================================================== --- stable/8/sys/conf/files.ia64 Wed Apr 7 01:53:00 2010 (r206335) +++ stable/8/sys/conf/files.ia64 Wed Apr 7 02:24:41 2010 (r206336) @@ -28,11 +28,11 @@ ukbdmap.h optional ukbd_dflt_keymap \ no-obj no-implicit-rule before-depend \ clean "ukbdmap.h" # -compat/freebsd32/freebsd32_ioctl.c optional compat_ia32 -compat/freebsd32/freebsd32_misc.c optional compat_ia32 -compat/freebsd32/freebsd32_syscalls.c optional compat_ia32 -compat/freebsd32/freebsd32_sysent.c optional compat_ia32 -compat/ia32/ia32_sysvec.c optional compat_ia32 +compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 +compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 +compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 +compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 +compat/ia32/ia32_sysvec.c optional compat_freebsd32 contrib/ia64/libuwx/src/uwx_bstream.c standard contrib/ia64/libuwx/src/uwx_context.c standard contrib/ia64/libuwx/src/uwx_env.c standard @@ -69,10 +69,10 @@ ia64/acpica/madt.c optional acpi ia64/disasm/disasm_decode.c standard ia64/disasm/disasm_extract.c standard ia64/disasm/disasm_format.c standard -ia64/ia32/ia32_misc.c optional compat_ia32 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 02:25:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE1B01065670; Wed, 7 Apr 2010 02:25:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB25E8FC0A; Wed, 7 Apr 2010 02:25:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o372PaO5058271; Wed, 7 Apr 2010 02:25:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o372Pal4058266; Wed, 7 Apr 2010 02:25:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201004070225.o372Pal4058266@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 7 Apr 2010 02:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206337 - stable/8/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 02:25:36 -0000 Author: nwhitehorn Date: Wed Apr 7 02:25:36 2010 New Revision: 206337 URL: http://svn.freebsd.org/changeset/base/206337 Log: Regen after MFC of COMPAT_FREEBSD32. Modified: stable/8/sys/compat/freebsd32/freebsd32_proto.h stable/8/sys/compat/freebsd32/freebsd32_syscall.h stable/8/sys/compat/freebsd32/freebsd32_syscalls.c stable/8/sys/compat/freebsd32/freebsd32_sysent.c Modified: stable/8/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_proto.h Wed Apr 7 02:24:41 2010 (r206336) +++ stable/8/sys/compat/freebsd32/freebsd32_proto.h Wed Apr 7 02:25:36 2010 (r206337) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 200725 2009-12-19 11:47:00Z kib + * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206336 2010-04-07 02:24:41Z nwhitehorn */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -32,6 +32,9 @@ struct thread; #define PADR_(t) 0 #endif +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif struct freebsd32_wait4_args { char pid_l_[PADL_(int)]; int pid; char pid_r_[PADR_(int)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; @@ -223,13 +226,15 @@ struct freebsd32_preadv_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; - char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; }; struct freebsd32_pwritev_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; - char offset_l_[PADL_(off_t)]; off_t offset; char offset_r_[PADR_(off_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; }; struct freebsd32_modstat_args { char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)]; @@ -294,8 +299,8 @@ struct freebsd32_nmount_args { struct freebsd32_sendfile_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; - char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)]; char hdtr_l_[PADL_(struct sf_hdtr32 *)]; struct sf_hdtr32 * hdtr; char hdtr_r_[PADR_(struct sf_hdtr32 *)]; char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; @@ -343,19 +348,22 @@ struct freebsd32_aio_fsync_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; }; +#ifdef PAD64_REQUIRED struct freebsd32_pread_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; - char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; - char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; + char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; }; struct freebsd32_pwrite_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; - char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; - char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; + char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; }; struct freebsd32_mmap_args { char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; @@ -363,51 +371,106 @@ struct freebsd32_mmap_args { char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)]; - char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)]; + char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)]; + char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)]; }; struct freebsd32_lseek_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; - char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; + char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd32_truncate_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)]; - char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)]; + char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)]; + char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)]; }; struct freebsd32_ftruncate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)]; - char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)]; + char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)]; + char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)]; +}; +#else +struct freebsd32_pread_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; + char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; +}; +struct freebsd32_pwrite_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; + char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; +}; +struct freebsd32_mmap_args { + char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; + char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; + char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)]; + char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)]; +}; +struct freebsd32_lseek_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; + char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; +}; +struct freebsd32_truncate_args { + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)]; + char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)]; +}; +struct freebsd32_ftruncate_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)]; + char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)]; +}; +#endif +#ifdef PAD64_REQUIRED +struct freebsd32_cpuset_setid_args { + char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; + char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)]; + char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)]; + char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)]; }; +#else struct freebsd32_cpuset_setid_args { char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; - char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)]; - char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)]; + char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)]; + char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)]; char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)]; }; +#endif struct freebsd32_cpuset_getid_args { char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)]; char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; - char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)]; - char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)]; + char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)]; + char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)]; char setid_l_[PADL_(cpusetid_t *)]; cpusetid_t * setid; char setid_r_[PADR_(cpusetid_t *)]; }; struct freebsd32_cpuset_getaffinity_args { char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)]; char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; - char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)]; - char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)]; + char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)]; + char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)]; char cpusetsize_l_[PADL_(size_t)]; size_t cpusetsize; char cpusetsize_r_[PADR_(size_t)]; char mask_l_[PADL_(cpuset_t *)]; cpuset_t * mask; char mask_r_[PADR_(cpuset_t *)]; }; struct freebsd32_cpuset_setaffinity_args { char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)]; char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; - char idlo_l_[PADL_(uint32_t)]; uint32_t idlo; char idlo_r_[PADR_(uint32_t)]; - char idhi_l_[PADL_(uint32_t)]; uint32_t idhi; char idhi_r_[PADR_(uint32_t)]; + char id1_l_[PADL_(u_int32_t)]; u_int32_t id1; char id1_r_[PADR_(u_int32_t)]; + char id2_l_[PADL_(u_int32_t)]; u_int32_t id2; char id2_r_[PADR_(u_int32_t)]; char cpusetsize_l_[PADL_(size_t)]; size_t cpusetsize; char cpusetsize_r_[PADR_(size_t)]; char mask_l_[PADL_(const cpuset_t *)]; const cpuset_t * mask; char mask_r_[PADR_(const cpuset_t *)]; }; @@ -461,6 +524,9 @@ struct freebsd32_pselect_args { char ts_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * ts; char ts_r_[PADR_(const struct timespec32 *)]; char sm_l_[PADL_(const sigset_t *)]; const sigset_t * sm; char sm_r_[PADR_(const sigset_t *)]; }; +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *); int freebsd32_recvmsg(struct thread *, struct freebsd32_recvmsg_args *); int freebsd32_sendmsg(struct thread *, struct freebsd32_sendmsg_args *); @@ -526,13 +592,26 @@ int freebsd32_thr_suspend(struct thread int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *); +#ifdef PAD64_REQUIRED int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *); int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *); int freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *); int freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *); int freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *); +#else +int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); +int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *); +int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *); +int freebsd32_lseek(struct thread *, struct freebsd32_lseek_args *); +int freebsd32_truncate(struct thread *, struct freebsd32_truncate_args *); +int freebsd32_ftruncate(struct thread *, struct freebsd32_ftruncate_args *); +#endif +#ifdef PAD64_REQUIRED int freebsd32_cpuset_setid(struct thread *, struct freebsd32_cpuset_setid_args *); +#else +int freebsd32_cpuset_setid(struct thread *, struct freebsd32_cpuset_setid_args *); +#endif int freebsd32_cpuset_getid(struct thread *, struct freebsd32_cpuset_getid_args *); int freebsd32_cpuset_getaffinity(struct thread *, struct freebsd32_cpuset_getaffinity_args *); int freebsd32_cpuset_setaffinity(struct thread *, struct freebsd32_cpuset_setaffinity_args *); @@ -548,6 +627,9 @@ int freebsd32_pselect(struct thread *, s #ifdef COMPAT_43 +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif struct ofreebsd32_sigaction_args { char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; char nsa_l_[PADL_(struct osigaction32 *)]; struct osigaction32 * nsa; char nsa_r_[PADR_(struct osigaction32 *)]; @@ -575,6 +657,12 @@ struct ofreebsd32_sigstack_args { char nss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * nss; char nss_r_[PADR_(struct sigstack32 *)]; char oss_l_[PADL_(struct sigstack32 *)]; struct sigstack32 * oss; char oss_r_[PADR_(struct sigstack32 *)]; }; +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif int ofreebsd32_sigaction(struct thread *, struct ofreebsd32_sigaction_args *); int ofreebsd32_sigprocmask(struct thread *, struct ofreebsd32_sigprocmask_args *); int ofreebsd32_sigpending(struct thread *, struct ofreebsd32_sigpending_args *); @@ -589,6 +677,9 @@ int ofreebsd32_sigstack(struct thread *, #ifdef COMPAT_FREEBSD4 +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif struct freebsd4_freebsd32_getfsstat_args { char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)]; @@ -609,8 +700,8 @@ struct freebsd4_freebsd32_fhstatfs_args struct freebsd4_freebsd32_sendfile_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; - char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; - char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; char nbytes_l_[PADL_(size_t)]; size_t nbytes; char nbytes_r_[PADR_(size_t)]; char hdtr_l_[PADL_(struct sf_hdtr32 *)]; struct sf_hdtr32 * hdtr; char hdtr_r_[PADR_(struct sf_hdtr32 *)]; char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; @@ -624,6 +715,12 @@ struct freebsd4_freebsd32_sigaction_args struct freebsd4_freebsd32_sigreturn_args { char sigcntxp_l_[PADL_(const struct freebsd4_freebsd32_ucontext *)]; const struct freebsd4_freebsd32_ucontext * sigcntxp; char sigcntxp_r_[PADR_(const struct freebsd4_freebsd32_ucontext *)]; }; +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif int freebsd4_freebsd32_getfsstat(struct thread *, struct freebsd4_freebsd32_getfsstat_args *); int freebsd4_freebsd32_statfs(struct thread *, struct freebsd4_freebsd32_statfs_args *); int freebsd4_freebsd32_fstatfs(struct thread *, struct freebsd4_freebsd32_fstatfs_args *); @@ -637,21 +734,24 @@ int freebsd4_freebsd32_sigreturn(struct #ifdef COMPAT_FREEBSD6 +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif struct freebsd6_freebsd32_pread_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; - char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; - char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; }; struct freebsd6_freebsd32_pwrite_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; - char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; - char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; }; struct freebsd6_freebsd32_mmap_args { char addr_l_[PADL_(caddr_t)]; caddr_t addr; char addr_r_[PADR_(caddr_t)]; @@ -660,28 +760,34 @@ struct freebsd6_freebsd32_mmap_args { char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; - char poslo_l_[PADL_(u_int32_t)]; u_int32_t poslo; char poslo_r_[PADR_(u_int32_t)]; - char poshi_l_[PADL_(u_int32_t)]; u_int32_t poshi; char poshi_r_[PADR_(u_int32_t)]; + char pos1_l_[PADL_(u_int32_t)]; u_int32_t pos1; char pos1_r_[PADR_(u_int32_t)]; + char pos2_l_[PADL_(u_int32_t)]; u_int32_t pos2; char pos2_r_[PADR_(u_int32_t)]; }; struct freebsd6_freebsd32_lseek_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; - char offsetlo_l_[PADL_(u_int32_t)]; u_int32_t offsetlo; char offsetlo_r_[PADR_(u_int32_t)]; - char offsethi_l_[PADL_(u_int32_t)]; u_int32_t offsethi; char offsethi_r_[PADR_(u_int32_t)]; + char offset1_l_[PADL_(u_int32_t)]; u_int32_t offset1; char offset1_r_[PADR_(u_int32_t)]; + char offset2_l_[PADL_(u_int32_t)]; u_int32_t offset2; char offset2_r_[PADR_(u_int32_t)]; char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd6_freebsd32_truncate_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; - char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)]; - char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)]; + char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)]; + char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)]; }; struct freebsd6_freebsd32_ftruncate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; - char lengthlo_l_[PADL_(u_int32_t)]; u_int32_t lengthlo; char lengthlo_r_[PADR_(u_int32_t)]; - char lengthhi_l_[PADL_(u_int32_t)]; u_int32_t lengthhi; char lengthhi_r_[PADR_(u_int32_t)]; + char length1_l_[PADL_(u_int32_t)]; u_int32_t length1; char length1_r_[PADR_(u_int32_t)]; + char length2_l_[PADL_(u_int32_t)]; u_int32_t length2; char length2_r_[PADR_(u_int32_t)]; }; +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif int freebsd6_freebsd32_pread(struct thread *, struct freebsd6_freebsd32_pread_args *); int freebsd6_freebsd32_pwrite(struct thread *, struct freebsd6_freebsd32_pwrite_args *); int freebsd6_freebsd32_mmap(struct thread *, struct freebsd6_freebsd32_mmap_args *); @@ -694,6 +800,9 @@ int freebsd6_freebsd32_ftruncate(struct #ifdef COMPAT_FREEBSD7 +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif struct freebsd7_freebsd32_semctl_args { char semid_l_[PADL_(int)]; int semid; char semid_r_[PADR_(int)]; char semnum_l_[PADL_(int)]; int semnum; char semnum_r_[PADR_(int)]; @@ -710,6 +819,12 @@ struct freebsd7_freebsd32_shmctl_args { char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char buf_l_[PADL_(struct shmid_ds32_old *)]; struct shmid_ds32_old * buf; char buf_r_[PADR_(struct shmid_ds32_old *)]; }; +#ifdef PAD64_REQUIRED +#else +#endif +#ifdef PAD64_REQUIRED +#else +#endif int freebsd7_freebsd32_semctl(struct thread *, struct freebsd7_freebsd32_semctl_args *); int freebsd7_freebsd32_msgctl(struct thread *, struct freebsd7_freebsd32_msgctl_args *); int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_args *); @@ -811,6 +926,13 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_lseek AUE_LSEEK #define FREEBSD32_SYS_AUE_freebsd32_truncate AUE_TRUNCATE #define FREEBSD32_SYS_AUE_freebsd32_ftruncate AUE_FTRUNCATE +#define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD +#define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE +#define FREEBSD32_SYS_AUE_freebsd32_mmap AUE_MMAP +#define FREEBSD32_SYS_AUE_freebsd32_lseek AUE_LSEEK +#define FREEBSD32_SYS_AUE_freebsd32_truncate AUE_TRUNCATE +#define FREEBSD32_SYS_AUE_freebsd32_ftruncate AUE_FTRUNCATE +#define FREEBSD32_SYS_AUE_freebsd32_cpuset_setid AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_setid AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_getid AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_cpuset_getaffinity AUE_NULL Modified: stable/8/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_syscall.h Wed Apr 7 02:24:41 2010 (r206336) +++ stable/8/sys/compat/freebsd32/freebsd32_syscall.h Wed Apr 7 02:25:36 2010 (r206337) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 200725 2009-12-19 11:47:00Z kib + * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206336 2010-04-07 02:24:41Z nwhitehorn */ #define FREEBSD32_SYS_syscall 0 @@ -354,11 +354,18 @@ #define FREEBSD32_SYS_freebsd32_lseek 478 #define FREEBSD32_SYS_freebsd32_truncate 479 #define FREEBSD32_SYS_freebsd32_ftruncate 480 +#define FREEBSD32_SYS_freebsd32_pread 475 +#define FREEBSD32_SYS_freebsd32_pwrite 476 +#define FREEBSD32_SYS_freebsd32_mmap 477 +#define FREEBSD32_SYS_freebsd32_lseek 478 +#define FREEBSD32_SYS_freebsd32_truncate 479 +#define FREEBSD32_SYS_freebsd32_ftruncate 480 #define FREEBSD32_SYS_thr_kill2 481 #define FREEBSD32_SYS_shm_open 482 #define FREEBSD32_SYS_shm_unlink 483 #define FREEBSD32_SYS_cpuset 484 #define FREEBSD32_SYS_freebsd32_cpuset_setid 485 +#define FREEBSD32_SYS_freebsd32_cpuset_setid 485 #define FREEBSD32_SYS_freebsd32_cpuset_getid 486 #define FREEBSD32_SYS_freebsd32_cpuset_getaffinity 487 #define FREEBSD32_SYS_freebsd32_cpuset_setaffinity 488 Modified: stable/8/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_syscalls.c Wed Apr 7 02:24:41 2010 (r206336) +++ stable/8/sys/compat/freebsd32/freebsd32_syscalls.c Wed Apr 7 02:25:36 2010 (r206337) @@ -3,10 +3,13 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 200725 2009-12-19 11:47:00Z kib + * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206336 2010-04-07 02:24:41Z nwhitehorn */ const char *freebsd32_syscallnames[] = { +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif "syscall", /* 0 = syscall */ "exit", /* 1 = exit */ "fork", /* 2 = fork */ @@ -482,17 +485,30 @@ const char *freebsd32_syscallnames[] = { "sctp_generic_sendmsg", /* 472 = sctp_generic_sendmsg */ "sctp_generic_sendmsg_iov", /* 473 = sctp_generic_sendmsg_iov */ "sctp_generic_recvmsg", /* 474 = sctp_generic_recvmsg */ +#ifdef PAD64_REQUIRED "freebsd32_pread", /* 475 = freebsd32_pread */ "freebsd32_pwrite", /* 476 = freebsd32_pwrite */ "freebsd32_mmap", /* 477 = freebsd32_mmap */ "freebsd32_lseek", /* 478 = freebsd32_lseek */ "freebsd32_truncate", /* 479 = freebsd32_truncate */ "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ +#else + "freebsd32_pread", /* 475 = freebsd32_pread */ + "freebsd32_pwrite", /* 476 = freebsd32_pwrite */ + "freebsd32_mmap", /* 477 = freebsd32_mmap */ + "freebsd32_lseek", /* 478 = freebsd32_lseek */ + "freebsd32_truncate", /* 479 = freebsd32_truncate */ + "freebsd32_ftruncate", /* 480 = freebsd32_ftruncate */ +#endif "thr_kill2", /* 481 = thr_kill2 */ "shm_open", /* 482 = shm_open */ "shm_unlink", /* 483 = shm_unlink */ "cpuset", /* 484 = cpuset */ +#ifdef PAD64_REQUIRED + "freebsd32_cpuset_setid", /* 485 = freebsd32_cpuset_setid */ +#else "freebsd32_cpuset_setid", /* 485 = freebsd32_cpuset_setid */ +#endif "freebsd32_cpuset_getid", /* 486 = freebsd32_cpuset_getid */ "freebsd32_cpuset_getaffinity", /* 487 = freebsd32_cpuset_getaffinity */ "freebsd32_cpuset_setaffinity", /* 488 = freebsd32_cpuset_setaffinity */ Modified: stable/8/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_sysent.c Wed Apr 7 02:24:41 2010 (r206336) +++ stable/8/sys/compat/freebsd32/freebsd32_sysent.c Wed Apr 7 02:25:36 2010 (r206337) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 200725 2009-12-19 11:47:00Z kib + * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206336 2010-04-07 02:24:41Z nwhitehorn */ #include "opt_compat.h" @@ -44,6 +44,9 @@ /* The casts are bogus but will do for now. */ struct sysent freebsd32_sysent[] = { +#if !defined(PAD64_REQUIRED) && defined(__powerpc__) +#define PAD64_REQUIRED +#endif { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 0 = syscall */ { AS(sys_exit_args), (sy_call_t *)sys_exit, AUE_EXIT, NULL, 0, 0, 0 }, /* 1 = exit */ { 0, (sy_call_t *)fork, AUE_FORK, NULL, 0, 0, 0 }, /* 2 = fork */ @@ -519,17 +522,30 @@ struct sysent freebsd32_sysent[] = { { AS(sctp_generic_sendmsg_args), (sy_call_t *)sctp_generic_sendmsg, AUE_NULL, NULL, 0, 0, 0 }, /* 472 = sctp_generic_sendmsg */ { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)sctp_generic_sendmsg_iov, AUE_NULL, NULL, 0, 0, 0 }, /* 473 = sctp_generic_sendmsg_iov */ { AS(sctp_generic_recvmsg_args), (sy_call_t *)sctp_generic_recvmsg, AUE_NULL, NULL, 0, 0, 0 }, /* 474 = sctp_generic_recvmsg */ +#ifdef PAD64_REQUIRED + { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, 0 }, /* 475 = freebsd32_pread */ + { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, 0 }, /* 476 = freebsd32_pwrite */ + { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, 0 }, /* 477 = freebsd32_mmap */ + { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, 0 }, /* 478 = freebsd32_lseek */ + { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 479 = freebsd32_truncate */ + { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 480 = freebsd32_ftruncate */ +#else { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, 0 }, /* 475 = freebsd32_pread */ { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, 0 }, /* 476 = freebsd32_pwrite */ { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, 0 }, /* 477 = freebsd32_mmap */ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, 0 }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0 }, /* 479 = freebsd32_truncate */ { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0 }, /* 480 = freebsd32_ftruncate */ +#endif { AS(thr_kill2_args), (sy_call_t *)thr_kill2, AUE_KILL, NULL, 0, 0, 0 }, /* 481 = thr_kill2 */ { AS(shm_open_args), (sy_call_t *)shm_open, AUE_SHMOPEN, NULL, 0, 0, 0 }, /* 482 = shm_open */ { AS(shm_unlink_args), (sy_call_t *)shm_unlink, AUE_SHMUNLINK, NULL, 0, 0, 0 }, /* 483 = shm_unlink */ { AS(cpuset_args), (sy_call_t *)cpuset, AUE_NULL, NULL, 0, 0, 0 }, /* 484 = cpuset */ +#ifdef PAD64_REQUIRED { AS(freebsd32_cpuset_setid_args), (sy_call_t *)freebsd32_cpuset_setid, AUE_NULL, NULL, 0, 0, 0 }, /* 485 = freebsd32_cpuset_setid */ +#else + { AS(freebsd32_cpuset_setid_args), (sy_call_t *)freebsd32_cpuset_setid, AUE_NULL, NULL, 0, 0, 0 }, /* 485 = freebsd32_cpuset_setid */ +#endif { AS(freebsd32_cpuset_getid_args), (sy_call_t *)freebsd32_cpuset_getid, AUE_NULL, NULL, 0, 0, 0 }, /* 486 = freebsd32_cpuset_getid */ { AS(freebsd32_cpuset_getaffinity_args), (sy_call_t *)freebsd32_cpuset_getaffinity, AUE_NULL, NULL, 0, 0, 0 }, /* 487 = freebsd32_cpuset_getaffinity */ { AS(freebsd32_cpuset_setaffinity_args), (sy_call_t *)freebsd32_cpuset_setaffinity, AUE_NULL, NULL, 0, 0, 0 }, /* 488 = freebsd32_cpuset_setaffinity */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 05:53:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A021106564A; Wed, 7 Apr 2010 05:53:27 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from thoth.sbs.de (thoth.sbs.de [192.35.17.2]) by mx1.freebsd.org (Postfix) with ESMTP id DC2EE8FC20; Wed, 7 Apr 2010 05:53:26 +0000 (UTC) Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id o375YHMu010875; Wed, 7 Apr 2010 07:34:17 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail1.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o375YHl5008315; Wed, 7 Apr 2010 07:34:17 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id o375YH7t043189; Date: Wed, 7 Apr 2010 07:34:17 +0200 From: Andre Albsmeier To: Pyun YongHyeon Message-ID: <20100407053417.GB2899@curry.mchp.siemens.de> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> <20100405145937.GA78871@curry.mchp.siemens.de> <20100405180642.GD1225@michelle.cdnetworks.com> <20100406134626.GA1727@curry.mchp.siemens.de> <20100406180027.GA3724@curry.mchp.siemens.de> <20100406184456.GA1087@michelle.cdnetworks.com> <20100406195936.GA48023@curry.mchp.siemens.de> <20100406202949.GB1087@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100406202949.GB1087@michelle.cdnetworks.com> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "Albsmeier, Andre" , Pyun YongHyeon Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 05:53:27 -0000 On Tue, 06-Apr-2010 at 22:29:49 +0200, Pyun YongHyeon wrote: > On Tue, Apr 06, 2010 at 09:59:36PM +0200, Andre Albsmeier wrote: > > On Tue, 06-Apr-2010 at 20:44:56 +0200, Pyun YongHyeon wrote: > > > On Tue, Apr 06, 2010 at 08:00:27PM +0200, Andre Albsmeier wrote: > > > > On Tue, 06-Apr-2010 at 15:46:26 +0200, Andre Albsmeier wrote: > > > > > On Mon, 05-Apr-2010 at 20:06:42 +0200, Pyun YongHyeon wrote: > > > > > > [...] > > > > > > > > > As you know 1.18.2.38 removed taskqueue based interrupt handling so > > > > > > it could be culprit of the issue. But that revision also removed > > > > > > two register accesses in TX path so I'd like to know which one > > > > > > caused the issue. > > > > > > > > > > I have now tried rev. 1.18.2.38 with this patch (no idea if > > > > > this is right ;-)): > > > > > > > > > > --- if_msk.c.1.18.2.38 2010-04-06 15:09:19.000000000 +0200 > > > > > +++ if_msk.c.1.18.2.38.TRY 2010-04-06 15:38:13.000000000 +0200 > > > > > @@ -3327,6 +3327,11 @@ > > > > > uint32_t control, status; > > > > > int cons, len, port, rxprog; > > > > > > > > > > + int idx; > > > > > + idx = CSR_READ_2(sc, STAT_PUT_IDX); > > > > > + if (idx == sc->msk_stat_cons) > > > > > + return (0); > > > > > + > > > > > /* Sync status LEs. */ > > > > > bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, > > > > > BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > > > > > @@ -3407,7 +3412,7 @@ > > > > > if (rxput[MSK_PORT_B] > 0) > > > > > msk_rxput(sc->msk_if[MSK_PORT_B]); > > > > > > > > > > - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); > > > > > + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); > > > > > } > > > > > > > > > > static void > > > > > > > > > > Now performance seems to be the same as with the older > > > > > driver (at least here at work) and in both directions! > > > > > Some numbers: > > > > > > > > > > em0 writes to rev. 1.18.2.36: 20 seconds > > > > > em0 writes to rev. 1.18.2.38: 50 seconds > > > > > em0 writes to rev. 1.18.2.38 with patch from above: 23 seconds > > > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > > > > > rev. 1.18.2.36 writes to em0: 22 seconds > > > > > rev. 1.18.2.38 writes to em0: 40 seconds > > > > > rev. 1.18.2.38 with patch from above writes to em0: 21 seconds > > > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > > > > > It seems that these two CSR_READ_2s really help ;-). > > > > > > > > > > As I said, this is at work and with slightly different machines. > > > > > I will try things at home later but I am rather confident of > > > > > receiving good results there as well... > > > > > > > > OK, tests at home show similar good results with the > > > > above patch. When setting int_holdoff to 3, performance > > > > seems equal to the older versions. > > > > > > > > > > Thanks a lot for narrowing down the issue. > > > Because the msk_handle_events() are called in interrupt handler > > > I'd like to remove the two register accesses in fast path. It seems > > > accessing STAT_PUT_IDX triggers status updates. Would you try > > > attached patch and let me know whether the patch makes any > > > difference? > > > > > Index: sys/dev/msk/if_msk.c > > > =================================================================== > > > --- sys/dev/msk/if_msk.c (revision 206204) > > > +++ sys/dev/msk/if_msk.c (working copy) > > > @@ -1470,6 +1470,7 @@ > > > /* WA for dev. #4.18 */ > > > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x21); > > > CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x07); > > > + CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 10)); > > > } else { > > > CSR_WRITE_2(sc, STAT_TX_IDX_TH, 0x0a); > > > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x10); > > > @@ -1481,9 +1482,16 @@ > > > CSR_WRITE_4(sc, STAT_ISR_TIMER_INI, 0x0190); > > > } > > > /* > > > - * Use default value for STAT_ISR_TIMER_INI, STAT_LEV_TIMER_INI. > > > + * STAT_TX_TIMER_INI, STAT_ISR_TIMER_INI and STAT_LEV_TIMER_INI > > > + * as well as various water mark registers seem to control when > > > + * controller initiates status LE update. > > > + * It's not clear how these registers interact with interrupt > > > + * state but STAT_TX_TIMER_INI seems to control status update > > > + * time after crossing a threshold(STAT_TX_IDX_TH) value. Due to > > > + * the complexity of various parameters that may affect status > > > + * update just use hardware default until we know better > > > + * the internal things of status updates. > > > */ > > > - CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 1000)); > > > > > > /* Enable status unit. */ > > > CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_OP_ON); > > > > After applying this patch against an original 1.18.2.39 > > things became even worse. After 4 minutes of waiting I > > aborted untar'ing the file ;-). Setting int_holdoff=2 > > made things better, now it took 65 seconds for untar'ing... > > > > :-( > > By chance, did you disable MSI(msi_disable=1)? Yes. Do you want me to test again with MSI enabled? -Andre -- "Regression testing? What's that? If it compiles, it is good, if it boots up, it is perfect." - Linus Torvalds From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 08:00:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7949B106566C; Wed, 7 Apr 2010 08:00:27 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 03CC48FC17; Wed, 7 Apr 2010 08:00:26 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2D3E3.dip.t-dialin.net [217.226.211.227]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 2BD468442CF; Wed, 7 Apr 2010 10:00:21 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 6E3F7504E; Wed, 7 Apr 2010 10:00:16 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o3780Geb058012; Wed, 7 Apr 2010 10:00:16 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 07 Apr 2010 10:00:15 +0200 Message-ID: <20100407100015.117169nw2iu6xp4w@webmail.leidinger.net> Date: Wed, 07 Apr 2010 10:00:15 +0200 From: Alexander Leidinger To: "M. Warner Losh" References: <20100405143123.14716pelm4tos2kg@webmail.leidinger.net> <20100405133505.GK2415@deviant.kiev.zoral.com.ua> <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> <20100406.105417.934842008305588111.imp@bsdimp.com> In-Reply-To: <20100406.105417.934842008305588111.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 2BD468442CF.62636 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.763, required 6, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_83 0.60, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1271232022.03556@SbFFZiGcYqDht0wdGx+Mow X-EBL-Spam-Status: No Cc: kostikbel@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 08:00:27 -0000 Quoting "M. Warner Losh" (from Tue, 06 Apr 2010 10:54:17 -0600 (MDT)): > In message: <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> > Alexander Leidinger writes: > : Warner, do you mind if I back-out r206082 and change the place where > : NORMAL_CTFCONVERT is used instead (fist I have to search for it > : again... not today)? It would make it consistent with all other places > : (SYSTEM_CTFCONVERT and the plain test and use of CTFxxx). > > Go ahead. I just did the fast and dirty fix. I though it was > consistent with how other things were done, but if not, feel free to > correct it. Also, see bde's commentary :) I can not find it, can you please forward it to me? Here is what I have ATM (copy&paste, so tabs are probably mangled): ---snip--- Index: usr.sbin/config/mkmakefile.c =================================================================== --- usr.sbin/config/mkmakefile.c (revision 206031) +++ usr.sbin/config/mkmakefile.c (working copy) @@ -741,7 +741,7 @@ printf("config: don't know rules for %s\n", np); break; } - snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n.if defined(NORMAL_CTFCONVERT) && !empty(NORMAL_CTFCONVERT)\n\t${NORMAL_CTFCONVERT}\n.endif", ftype, + snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n\t@${NORMAL_CTFCONVERT}", ftype, toupper(och), ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); compilewith = cmd; Index: sys/conf/kern.pre.mk =================================================================== --- sys/conf/kern.pre.mk (revision 206248) +++ sys/conf/kern.pre.mk (working copy) @@ -128,7 +128,7 @@ NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c -NORMAL_CTFCONVERT= @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} ---snip--- Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 Look before you leap. -- Samuel Butler From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 08:23:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D9B106566B; Wed, 7 Apr 2010 08:23:58 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77E748FC0A; Wed, 7 Apr 2010 08:23:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o378Nwk3037903; Wed, 7 Apr 2010 08:23:58 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o378Nwgr037901; Wed, 7 Apr 2010 08:23:58 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004070823.o378Nwgr037901@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 7 Apr 2010 08:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206339 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 08:23:58 -0000 Author: luigi Date: Wed Apr 7 08:23:58 2010 New Revision: 206339 URL: http://svn.freebsd.org/changeset/base/206339 Log: Hopefully fix the recent breakage in rule deletion. A few more tests and this will also go into -stable where the problem is more critical. Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Apr 7 04:51:19 2010 (r206338) +++ head/sys/netinet/ipfw/ip_fw_sockopt.c Wed Apr 7 08:23:58 2010 (r206339) @@ -232,12 +232,49 @@ ipfw_reap_rules(struct ip_fw *head) } } +/* + * Used by del_entry() to check if a rule should be kept. + * Returns 1 if the rule must be kept, 0 otherwise. + * + * Called with cmd = {0,1,5}. + * cmd == 0 matches on rule numbers, excludes rules in RESVD_SET if n == 0 ; + * cmd == 1 matches on set numbers only, rule numbers are ignored; + * cmd == 5 matches on rule and set numbers. + * + * n == 0 is a wildcard for rule numbers, there is no wildcard for sets. + * + * Rules to keep are + * (default || reserved || !match_set || !match_number) + * where + * default ::= (rule->rulenum == IPFW_DEFAULT_RULE) + * // the default rule is always protected + * + * reserved ::= (cmd == 0 && n == 0 && rule->set == RESVD_SET) + * // RESVD_SET is protected only if cmd == 0 and n == 0 ("ipfw flush") + * + * match_set ::= (cmd == 0 || rule->set == set) + * // set number is ignored for cmd == 0 + * + * match_number ::= (cmd == 1 || n == 0 || n == rule->rulenum) + * // number is ignored for cmd == 1 or n == 0 + * + */ +static int +keep_rule(struct ip_fw *rule, uint8_t cmd, uint8_t set, uint32_t n) +{ + return + (rule->rulenum == IPFW_DEFAULT_RULE) || + (cmd == 0 && n == 0 && rule->set == RESVD_SET) || + !(cmd == 0 || rule->set == set) || + !(cmd == 1 || n == 0 || n == rule->rulenum); +} + /** - * Remove all rules with given number, and also do set manipulation. + * Remove all rules with given number, or do set manipulation. * Assumes chain != NULL && *chain != NULL. * - * The argument is an u_int32_t. The low 16 bit are the rule or set number, - * the next 8 bits are the new set, the top 8 bits are the command: + * The argument is an uint32_t. The low 16 bit are the rule or set number; + * the next 8 bits are the new set; the top 8 bits indicate the command: * * 0 delete rules numbered "rulenum" * 1 delete rules in set "rulenum" @@ -247,26 +284,26 @@ ipfw_reap_rules(struct ip_fw *head) * 5 delete rules "rulenum" and set "new_set" */ static int -del_entry(struct ip_fw_chain *chain, u_int32_t arg) +del_entry(struct ip_fw_chain *chain, uint32_t arg) { struct ip_fw *rule; - uint32_t rulenum; /* rule or old_set */ + uint32_t num; /* rule number or old_set */ uint8_t cmd, new_set; - int start, end = 0, i, ofs, n; + int start, end, i, ofs, n; struct ip_fw **map = NULL; int error = 0; - rulenum = arg & 0xffff; + num = arg & 0xffff; cmd = (arg >> 24) & 0xff; new_set = (arg >> 16) & 0xff; if (cmd > 5 || new_set > RESVD_SET) return EINVAL; if (cmd == 0 || cmd == 2 || cmd == 5) { - if (rulenum >= IPFW_DEFAULT_RULE) + if (num >= IPFW_DEFAULT_RULE) return EINVAL; } else { - if (rulenum > RESVD_SET) /* old_set */ + if (num > RESVD_SET) /* old_set */ return EINVAL; } @@ -274,20 +311,24 @@ del_entry(struct ip_fw_chain *chain, u_i chain->reap = NULL; /* prepare for deletions */ switch (cmd) { - case 0: /* delete rules "rulenum" (rulenum == 0 matches all) */ + case 0: /* delete rules "num" (num == 0 matches all) */ case 1: /* delete all rules in set N */ case 5: /* delete rules with number N and set "new_set". */ /* * Locate first rule to delete (start), the rule after * the last one to delete (end), and count how many - * rules to delete (n) + * rules to delete (n). Always use keep_rule() to + * determine which rules to keep. */ n = 0; - if (cmd == 1) { /* look for a specific set, must scan all */ - new_set = rulenum; - for (start = -1, i = 0; i < chain->n_rules; i++) { - if (chain->map[i]->set != new_set) + if (cmd == 1) { + /* look for a specific set including RESVD_SET. + * Must scan the entire range, ignore num. + */ + new_set = num; + for (start = -1, end = i = 0; i < chain->n_rules; i++) { + if (keep_rule(chain->map[i], cmd, new_set, 0)) continue; if (start < 0) start = i; @@ -296,61 +337,54 @@ del_entry(struct ip_fw_chain *chain, u_i } end++; /* first non-matching */ } else { - start = ipfw_find_rule(chain, rulenum, 0); + /* Optimized search on rule numbers */ + start = ipfw_find_rule(chain, num, 0); for (end = start; end < chain->n_rules; end++) { rule = chain->map[end]; - if (rulenum > 0 && rule->rulenum != rulenum) + if (num > 0 && rule->rulenum != num) break; - if (rule->set != RESVD_SET && - (cmd == 0 || rule->set == new_set) ) + if (!keep_rule(rule, cmd, new_set, num)) n++; } } - if (n == 0 && arg == 0) - break; /* special case, flush on empty ruleset */ - /* allocate the map, if needed */ - if (n > 0) - map = get_map(chain, -n, 1 /* locked */); - if (n == 0 || map == NULL) { + + if (n == 0) { + /* A flush request (arg == 0) on empty ruleset + * returns with no error. On the contrary, + * if there is no match on a specific request, + * we return EINVAL. + */ + error = (arg == 0) ? 0 : EINVAL; + break; + } + + /* We have something to delete. Allocate the new map */ + map = get_map(chain, -n, 1 /* locked */); + if (map == NULL) { error = EINVAL; break; } - /* - * bcopy the initial part of the map, then individually - * copy all matching entries between start and end, - * and then bcopy the final part. - * Once we are done we can swap maps and clean up the - * deleted rules (unfortunately we need to repeat a - * convoluted test). Rules to keep are - * (set == RESVD_SET || !match_set || !match_rule) - * where - * match_set ::= (cmd == 0 || rule->set == new_set) - * match_rule ::= (cmd == 1 || rule->rulenum == rulenum) - */ + + /* 1. bcopy the initial part of the map */ if (start > 0) bcopy(chain->map, map, start * sizeof(struct ip_fw *)); + /* 2. copy active rules between start and end */ for (i = ofs = start; i < end; i++) { rule = chain->map[i]; - if (rule->set == RESVD_SET || - !(cmd == 0 || rule->set == new_set) || - !(cmd == 1 || rule->rulenum == rulenum) ) { - map[ofs++] = chain->map[i]; - } + if (keep_rule(rule, cmd, new_set, num)) + map[ofs++] = rule; } + /* 3. copy the final part of the map */ bcopy(chain->map + end, map + ofs, (chain->n_rules - end) * sizeof(struct ip_fw *)); - + /* 4. swap the maps (under BH_LOCK) */ map = swap_map(chain, map, chain->n_rules - n); - /* now remove the rules deleted */ + /* 5. now remove the rules deleted from the old map */ for (i = start; i < end; i++) { int l; rule = map[i]; - /* same test as above */ - if (rule->set == RESVD_SET || - !(cmd == 0 || rule->set == new_set) || - !(cmd == 1 || rule->rulenum == rulenum) ) + if (keep_rule(rule, cmd, new_set, num)) continue; - l = RULESIZE(rule); chain->static_len -= l; ipfw_remove_dyn_children(rule); @@ -359,32 +393,38 @@ del_entry(struct ip_fw_chain *chain, u_i } break; - case 2: /* move rules with given number to new set */ - for (i = 0; i < chain->n_rules; i++) { + /* + * In the next 3 cases the loop stops at (n_rules - 1) + * because the default rule is never eligible.. + */ + + case 2: /* move rules with given RULE number to new set */ + for (i = 0; i < chain->n_rules - 1; i++) { rule = chain->map[i]; - if (rule->rulenum == rulenum) + if (rule->rulenum == num) rule->set = new_set; } break; - case 3: /* move rules with given set number to new set */ - for (i = 0; i < chain->n_rules; i++) { + case 3: /* move rules with given SET number to new set */ + for (i = 0; i < chain->n_rules - 1; i++) { rule = chain->map[i]; - if (rule->set == rulenum) + if (rule->set == num) rule->set = new_set; } break; case 4: /* swap two sets */ - for (i = 0; i < chain->n_rules; i++) { + for (i = 0; i < chain->n_rules - 1; i++) { rule = chain->map[i]; - if (rule->set == rulenum) + if (rule->set == num) rule->set = new_set; else if (rule->set == new_set) - rule->set = rulenum; + rule->set = num; } break; } + rule = chain->reap; chain->reap = NULL; IPFW_UH_WUNLOCK(chain); From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 12:42:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02724106567A; Wed, 7 Apr 2010 12:42:50 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E340B8FC1B; Wed, 7 Apr 2010 12:42:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37Cgnxa097835; Wed, 7 Apr 2010 12:42:49 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37Cgnfs097834; Wed, 7 Apr 2010 12:42:49 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004071242.o37Cgnfs097834@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 7 Apr 2010 12:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206340 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 12:42:50 -0000 Author: luigi Date: Wed Apr 7 12:42:49 2010 New Revision: 206340 URL: http://svn.freebsd.org/changeset/base/206340 Log: fix breakage in ipfw removal. Modified: stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Modified: stable/8/sys/netinet/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Wed Apr 7 08:23:58 2010 (r206339) +++ stable/8/sys/netinet/ipfw/ip_fw_sockopt.c Wed Apr 7 12:42:49 2010 (r206340) @@ -232,12 +232,49 @@ ipfw_reap_rules(struct ip_fw *head) } } +/* + * Used by del_entry() to check if a rule should be kept. + * Returns 1 if the rule must be kept, 0 otherwise. + * + * Called with cmd = {0,1,5}. + * cmd == 0 matches on rule numbers, excludes rules in RESVD_SET if n == 0 ; + * cmd == 1 matches on set numbers only, rule numbers are ignored; + * cmd == 5 matches on rule and set numbers. + * + * n == 0 is a wildcard for rule numbers, there is no wildcard for sets. + * + * Rules to keep are + * (default || reserved || !match_set || !match_number) + * where + * default ::= (rule->rulenum == IPFW_DEFAULT_RULE) + * // the default rule is always protected + * + * reserved ::= (cmd == 0 && n == 0 && rule->set == RESVD_SET) + * // RESVD_SET is protected only if cmd == 0 and n == 0 ("ipfw flush") + * + * match_set ::= (cmd == 0 || rule->set == set) + * // set number is ignored for cmd == 0 + * + * match_number ::= (cmd == 1 || n == 0 || n == rule->rulenum) + * // number is ignored for cmd == 1 or n == 0 + * + */ +static int +keep_rule(struct ip_fw *rule, uint8_t cmd, uint8_t set, uint32_t n) +{ + return + (rule->rulenum == IPFW_DEFAULT_RULE) || + (cmd == 0 && n == 0 && rule->set == RESVD_SET) || + !(cmd == 0 || rule->set == set) || + !(cmd == 1 || n == 0 || n == rule->rulenum); +} + /** - * Remove all rules with given number, and also do set manipulation. + * Remove all rules with given number, or do set manipulation. * Assumes chain != NULL && *chain != NULL. * - * The argument is an u_int32_t. The low 16 bit are the rule or set number, - * the next 8 bits are the new set, the top 8 bits are the command: + * The argument is an uint32_t. The low 16 bit are the rule or set number; + * the next 8 bits are the new set; the top 8 bits indicate the command: * * 0 delete rules numbered "rulenum" * 1 delete rules in set "rulenum" @@ -247,26 +284,26 @@ ipfw_reap_rules(struct ip_fw *head) * 5 delete rules "rulenum" and set "new_set" */ static int -del_entry(struct ip_fw_chain *chain, u_int32_t arg) +del_entry(struct ip_fw_chain *chain, uint32_t arg) { struct ip_fw *rule; - uint32_t rulenum; /* rule or old_set */ + uint32_t num; /* rule number or old_set */ uint8_t cmd, new_set; - int start, end = 0, i, ofs, n; + int start, end, i, ofs, n; struct ip_fw **map = NULL; int error = 0; - rulenum = arg & 0xffff; + num = arg & 0xffff; cmd = (arg >> 24) & 0xff; new_set = (arg >> 16) & 0xff; if (cmd > 5 || new_set > RESVD_SET) return EINVAL; if (cmd == 0 || cmd == 2 || cmd == 5) { - if (rulenum >= IPFW_DEFAULT_RULE) + if (num >= IPFW_DEFAULT_RULE) return EINVAL; } else { - if (rulenum > RESVD_SET) /* old_set */ + if (num > RESVD_SET) /* old_set */ return EINVAL; } @@ -274,20 +311,24 @@ del_entry(struct ip_fw_chain *chain, u_i chain->reap = NULL; /* prepare for deletions */ switch (cmd) { - case 0: /* delete rules "rulenum" (rulenum == 0 matches all) */ + case 0: /* delete rules "num" (num == 0 matches all) */ case 1: /* delete all rules in set N */ case 5: /* delete rules with number N and set "new_set". */ /* * Locate first rule to delete (start), the rule after * the last one to delete (end), and count how many - * rules to delete (n) + * rules to delete (n). Always use keep_rule() to + * determine which rules to keep. */ n = 0; - if (cmd == 1) { /* look for a specific set, must scan all */ - new_set = rulenum; - for (start = -1, i = 0; i < chain->n_rules; i++) { - if (chain->map[i]->set != new_set) + if (cmd == 1) { + /* look for a specific set including RESVD_SET. + * Must scan the entire range, ignore num. + */ + new_set = num; + for (start = -1, end = i = 0; i < chain->n_rules; i++) { + if (keep_rule(chain->map[i], cmd, new_set, 0)) continue; if (start < 0) start = i; @@ -296,61 +337,54 @@ del_entry(struct ip_fw_chain *chain, u_i } end++; /* first non-matching */ } else { - start = ipfw_find_rule(chain, rulenum, 0); + /* Optimized search on rule numbers */ + start = ipfw_find_rule(chain, num, 0); for (end = start; end < chain->n_rules; end++) { rule = chain->map[end]; - if (rulenum > 0 && rule->rulenum != rulenum) + if (num > 0 && rule->rulenum != num) break; - if (rule->set != RESVD_SET && - (cmd == 0 || rule->set == new_set) ) + if (!keep_rule(rule, cmd, new_set, num)) n++; } } - if (n == 0 && arg == 0) - break; /* special case, flush on empty ruleset */ - /* allocate the map, if needed */ - if (n > 0) + + if (n == 0) { + /* A flush request (arg == 0) on empty ruleset + * returns with no error. On the contrary, + * if there is no match on a specific request, + * we return EINVAL. + */ + error = (arg == 0) ? 0 : EINVAL; + break; + } + + /* We have something to delete. Allocate the new map */ map = get_map(chain, -n, 1 /* locked */); - if (n == 0 || map == NULL) { + if (map == NULL) { error = EINVAL; break; } - /* - * bcopy the initial part of the map, then individually - * copy all matching entries between start and end, - * and then bcopy the final part. - * Once we are done we can swap maps and clean up the - * deleted rules (unfortunately we need to repeat a - * convoluted test). Rules to keep are - * (set == RESVD_SET || !match_set || !match_rule) - * where - * match_set ::= (cmd == 0 || rule->set == new_set) - * match_rule ::= (cmd == 1 || rule->rulenum == rulenum) - */ + + /* 1. bcopy the initial part of the map */ if (start > 0) bcopy(chain->map, map, start * sizeof(struct ip_fw *)); + /* 2. copy active rules between start and end */ for (i = ofs = start; i < end; i++) { rule = chain->map[i]; - if (rule->set == RESVD_SET || - !(cmd == 0 || rule->set == new_set) || - !(cmd == 1 || rule->rulenum == rulenum) ) { - map[ofs++] = chain->map[i]; - } + if (keep_rule(rule, cmd, new_set, num)) + map[ofs++] = rule; } + /* 3. copy the final part of the map */ bcopy(chain->map + end, map + ofs, (chain->n_rules - end) * sizeof(struct ip_fw *)); - + /* 4. swap the maps (under BH_LOCK) */ map = swap_map(chain, map, chain->n_rules - n); - /* now remove the rules deleted */ + /* 5. now remove the rules deleted from the old map */ for (i = start; i < end; i++) { int l; rule = map[i]; - /* same test as above */ - if (rule->set == RESVD_SET || - !(cmd == 0 || rule->set == new_set) || - !(cmd == 1 || rule->rulenum == rulenum) ) + if (keep_rule(rule, cmd, new_set, num)) continue; - l = RULESIZE(rule); chain->static_len -= l; ipfw_remove_dyn_children(rule); @@ -359,32 +393,38 @@ del_entry(struct ip_fw_chain *chain, u_i } break; - case 2: /* move rules with given number to new set */ - for (i = 0; i < chain->n_rules; i++) { + /* + * In the next 3 cases the loop stops at (n_rules - 1) + * because the default rule is never eligible.. + */ + + case 2: /* move rules with given RULE number to new set */ + for (i = 0; i < chain->n_rules - 1; i++) { rule = chain->map[i]; - if (rule->rulenum == rulenum) + if (rule->rulenum == num) rule->set = new_set; } break; - case 3: /* move rules with given set number to new set */ - for (i = 0; i < chain->n_rules; i++) { + case 3: /* move rules with given SET number to new set */ + for (i = 0; i < chain->n_rules - 1; i++) { rule = chain->map[i]; - if (rule->set == rulenum) + if (rule->set == num) rule->set = new_set; } break; case 4: /* swap two sets */ - for (i = 0; i < chain->n_rules; i++) { + for (i = 0; i < chain->n_rules - 1; i++) { rule = chain->map[i]; - if (rule->set == rulenum) + if (rule->set == num) rule->set = new_set; else if (rule->set == new_set) - rule->set = rulenum; + rule->set = num; } break; } + rule = chain->reap; chain->reap = NULL; IPFW_UH_WUNLOCK(chain); From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 13:02:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2C6A106567B; Wed, 7 Apr 2010 13:02:20 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C16018FC0C; Wed, 7 Apr 2010 13:02:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37D2KTl002269; Wed, 7 Apr 2010 13:02:20 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37D2KKV002267; Wed, 7 Apr 2010 13:02:20 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004071302.o37D2KKV002267@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 7 Apr 2010 13:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206341 - head/sys/modules/dummynet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 13:02:20 -0000 Author: luigi Date: Wed Apr 7 13:02:20 2010 New Revision: 206341 URL: http://svn.freebsd.org/changeset/base/206341 Log: add priority scheduler to the module Modified: head/sys/modules/dummynet/Makefile Modified: head/sys/modules/dummynet/Makefile ============================================================================== --- head/sys/modules/dummynet/Makefile Wed Apr 7 12:42:49 2010 (r206340) +++ head/sys/modules/dummynet/Makefile Wed Apr 7 13:02:20 2010 (r206341) @@ -7,6 +7,7 @@ KMOD= dummynet SRCS= ip_dummynet.c SRCS+= ip_dn_glue.c ip_dn_io.c SRCS+= dn_heap.c dn_sched_fifo.c dn_sched_qfq.c dn_sched_rr.c dn_sched_wf2q.c +SRCS+= dn_sched_prio.c SRCS+= opt_inet6.h .if !defined(KERNBUILDDIR) From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 13:18:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F96B1065689; Wed, 7 Apr 2010 13:18:59 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B99D8FC1F; Wed, 7 Apr 2010 13:18:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37DIx4W005967; Wed, 7 Apr 2010 13:18:59 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37DIww4005962; Wed, 7 Apr 2010 13:18:58 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004071318.o37DIww4005962@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 7 Apr 2010 13:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206342 - in stable/8/sys: conf modules/dummynet netinet/ipfw netinet/ipfw/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 13:18:59 -0000 Author: luigi Date: Wed Apr 7 13:18:58 2010 New Revision: 206342 URL: http://svn.freebsd.org/changeset/base/206342 Log: add priority scheduler. Added: stable/8/sys/netinet/ipfw/dn_sched_prio.c (contents, props changed) Modified: stable/8/sys/conf/files stable/8/sys/modules/dummynet/Makefile stable/8/sys/netinet/ipfw/test/Makefile Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Wed Apr 7 13:02:20 2010 (r206341) +++ stable/8/sys/conf/files Wed Apr 7 13:18:58 2010 (r206342) @@ -2480,9 +2480,10 @@ netinet/in_rmx.c optional inet netinet/ip_divert.c optional inet ipdivert ipfirewall netinet/ipfw/dn_heap.c optional inet dummynet netinet/ipfw/dn_sched_fifo.c optional inet dummynet +netinet/ipfw/dn_sched_prio.c optional inet dummynet +netinet/ipfw/dn_sched_qfq.c optional inet dummynet netinet/ipfw/dn_sched_rr.c optional inet dummynet netinet/ipfw/dn_sched_wf2q.c optional inet dummynet -netinet/ipfw/dn_sched_qfq.c optional inet dummynet netinet/ipfw/ip_dummynet.c optional inet dummynet netinet/ipfw/ip_dn_io.c optional inet dummynet netinet/ipfw/ip_dn_glue.c optional inet dummynet Modified: stable/8/sys/modules/dummynet/Makefile ============================================================================== --- stable/8/sys/modules/dummynet/Makefile Wed Apr 7 13:02:20 2010 (r206341) +++ stable/8/sys/modules/dummynet/Makefile Wed Apr 7 13:18:58 2010 (r206342) @@ -7,6 +7,7 @@ KMOD= dummynet SRCS= ip_dummynet.c SRCS+= ip_dn_glue.c ip_dn_io.c SRCS+= dn_heap.c dn_sched_fifo.c dn_sched_qfq.c dn_sched_rr.c dn_sched_wf2q.c +SRCS+= dn_sched_prio.c SRCS+= opt_inet6.h .if !defined(KERNBUILDDIR) Added: stable/8/sys/netinet/ipfw/dn_sched_prio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/sys/netinet/ipfw/dn_sched_prio.c Wed Apr 7 13:18:58 2010 (r206342) @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2010 Riccardo Panicucci, Universita` di Pisa + * All rights reserved + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * $FreeBSD$ + */ +#ifdef _KERNEL +#include +#include +#include +#include +#include +#include +#include /* IFNAMSIZ */ +#include +#include /* ipfw_rule_ref */ +#include /* flow_id */ +#include +#include +#include +#include +#else +#include +#endif + +#define DN_SCHED_PRIO 5 //XXX + +#if !defined(_KERNEL) || !defined(__linux__) +#define test_bit(ix, pData) ((*pData) & (1<<(ix))) +#define __set_bit(ix, pData) (*pData) |= (1<<(ix)) +#define __clear_bit(ix, pData) (*pData) &= ~(1<<(ix)) +#endif + +#ifdef __MIPSEL__ +#define __clear_bit(ix, pData) (*pData) &= ~(1<<(ix)) +#endif + +/* Size of the array of queues pointers. */ +#define BITMAP_T unsigned long +#define MAXPRIO (sizeof(BITMAP_T) * 8) + +/* + * The scheduler instance contains an array of pointers to queues, + * one for each priority, and a bitmap listing backlogged queues. + */ +struct prio_si { + BITMAP_T bitmap; /* array bitmap */ + struct dn_queue *q_array[MAXPRIO]; /* Array of queues pointers */ +}; + +/* + * If a queue with the same priority is already backlogged, use + * that one instead of the queue passed as argument. + */ +static int +prio_enqueue(struct dn_sch_inst *_si, struct dn_queue *q, struct mbuf *m) +{ + struct prio_si *si = (struct prio_si *)(_si + 1); + int prio = q->fs->fs.par[0]; + + if (test_bit(prio, &si->bitmap) == 0) { + /* No queue with this priority, insert */ + __set_bit(prio, &si->bitmap); + si->q_array[prio] = q; + } else { /* use the existing queue */ + q = si->q_array[prio]; + } + if (dn_enqueue(q, m, 0)) + return 1; + return 0; +} + +/* + * Packets are dequeued only from the highest priority queue. + * The function ffs() return the lowest bit in the bitmap that rapresent + * the array index (-1) which contains the pointer to the highest priority + * queue. + * After the dequeue, if this queue become empty, it is index is removed + * from the bitmap. + * Scheduler is idle if the bitmap is empty + * + * NOTE: highest priority is 0, lowest is sched->max_prio_q + */ +static struct mbuf * +prio_dequeue(struct dn_sch_inst *_si) +{ + struct prio_si *si = (struct prio_si *)(_si + 1); + struct mbuf *m; + struct dn_queue *q; + int prio; + + if (si->bitmap == 0) /* scheduler idle */ + return NULL; + + prio = ffs(si->bitmap) - 1; + + /* Take the highest priority queue in the scheduler */ + q = si->q_array[prio]; + // assert(q) + + m = dn_dequeue(q); + if (q->mq.head == NULL) { + /* Queue is now empty, remove from scheduler + * and mark it + */ + si->q_array[prio] = NULL; + __clear_bit(prio, &si->bitmap); + } + return m; +} + +static int +prio_new_sched(struct dn_sch_inst *_si) +{ + struct prio_si *si = (struct prio_si *)(_si + 1); + + bzero(si->q_array, sizeof(si->q_array)); + si->bitmap = 0; + + return 0; +} + +static int +prio_new_fsk(struct dn_fsk *fs) +{ + /* Check if the prioritiy is between 0 and MAXPRIO-1 */ + ipdn_bound_var(&fs->fs.par[0], 0, 0, MAXPRIO - 1, "PRIO priority"); + return 0; +} + +static int +prio_new_queue(struct dn_queue *q) +{ + struct prio_si *si = (struct prio_si *)(q->_si + 1); + int prio = q->fs->fs.par[0]; + struct dn_queue *oldq; + + q->ni.oid.subtype = DN_SCHED_PRIO; + + if (q->mq.head == NULL) + return 0; + + /* Queue already full, must insert in the scheduler or append + * mbufs to existing queue. This partly duplicates prio_enqueue + */ + if (test_bit(prio, &si->bitmap) == 0) { + /* No queue with this priority, insert */ + __set_bit(prio, &si->bitmap); + si->q_array[prio] = q; + } else if ( (oldq = si->q_array[prio]) != q) { + /* must append to the existing queue. + * can simply append q->mq.head to q2->... + * and add the counters to those of q2 + */ + oldq->mq.tail->m_nextpkt = q->mq.head; + oldq->mq.tail = q->mq.tail; + oldq->ni.length += q->ni.length; + q->ni.length = 0; + oldq->ni.len_bytes += q->ni.len_bytes; + q->ni.len_bytes = 0; + q->mq.tail = q->mq.head = NULL; + } + return 0; +} + +static int +prio_free_queue(struct dn_queue *q) +{ + int prio = q->fs->fs.par[0]; + struct prio_si *si = (struct prio_si *)(q->_si + 1); + + if (si->q_array[prio] == q) { + si->q_array[prio] = NULL; + __clear_bit(prio, &si->bitmap); + } + return 0; +} + + +static struct dn_alg prio_desc = { + _SI( .type = ) DN_SCHED_PRIO, + _SI( .name = ) "PRIO", + _SI( .flags = ) DN_MULTIQUEUE, + + /* we need extra space in the si and the queue */ + _SI( .schk_datalen = ) 0, + _SI( .si_datalen = ) sizeof(struct prio_si), + _SI( .q_datalen = ) 0, + + _SI( .enqueue = ) prio_enqueue, + _SI( .dequeue = ) prio_dequeue, + + _SI( .config = ) NULL, + _SI( .destroy = ) NULL, + _SI( .new_sched = ) prio_new_sched, + _SI( .free_sched = ) NULL, + + _SI( .new_fsk = ) prio_new_fsk, + _SI( .free_fsk = ) NULL, + + _SI( .new_queue = ) prio_new_queue, + _SI( .free_queue = ) prio_free_queue, +}; + + +DECLARE_DNSCHED_MODULE(dn_prio, &prio_desc); Modified: stable/8/sys/netinet/ipfw/test/Makefile ============================================================================== --- stable/8/sys/netinet/ipfw/test/Makefile Wed Apr 7 13:02:20 2010 (r206341) +++ stable/8/sys/netinet/ipfw/test/Makefile Wed Apr 7 13:18:58 2010 (r206342) @@ -6,9 +6,10 @@ SCHED_SRCS = test_dn_sched.c SCHED_SRCS += dn_sched_fifo.c -SCHED_SRCS += dn_sched_wf2q.c +SCHED_SRCS += dn_sched_prio.c SCHED_SRCS += dn_sched_qfq.c SCHED_SRCS += dn_sched_rr.c +SCHED_SRCS += dn_sched_wf2q.c SCHED_SRCS += dn_heap.c SCHED_SRCS += main.c From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:09:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37D4C106566B; Wed, 7 Apr 2010 14:09:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06AF68FC14; Wed, 7 Apr 2010 14:09:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37E9TVU017136; Wed, 7 Apr 2010 14:09:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37E9T2l017133; Wed, 7 Apr 2010 14:09:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071409.o37E9T2l017133@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206344 - stable/8/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:09:30 -0000 Author: kib Date: Wed Apr 7 14:09:29 2010 New Revision: 206344 URL: http://svn.freebsd.org/changeset/base/206344 Log: MFC r205319: Make freebsd32_copyiniov() available outside of freebsd32_misc. Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/compat/freebsd32/freebsd32_util.h 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/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 13:21:52 2010 (r206343) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:09:29 2010 (r206344) @@ -873,7 +873,7 @@ freebsd32_pwritev(struct thread *td, str return (error); } -static int +int freebsd32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, int error) { Modified: stable/8/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_util.h Wed Apr 7 13:21:52 2010 (r206343) +++ stable/8/sys/compat/freebsd32/freebsd32_util.h Wed Apr 7 14:09:29 2010 (r206344) @@ -84,5 +84,8 @@ int syscall32_deregister(int *offset, int syscall32_module_handler(struct module *mod, int what, void *arg); register_t *freebsd32_copyout_strings(struct image_params *imgp); +struct iovec32; +int freebsd32_copyiniov(struct iovec32 *iovp, u_int iovcnt, + struct iovec **iov, int error); #endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:16:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 679621065680; Wed, 7 Apr 2010 14:16:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C31F8FC22; Wed, 7 Apr 2010 14:16:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37EGFqA018662; Wed, 7 Apr 2010 14:16:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37EGFlw018660; Wed, 7 Apr 2010 14:16:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071416.o37EGFlw018660@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206345 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:16:15 -0000 Author: kib Date: Wed Apr 7 14:16:14 2010 New Revision: 206345 URL: http://svn.freebsd.org/changeset/base/206345 Log: MFC r205318: Properly handle compat32 calls to sctp generic sendmsd/recvmsg functions that take iov. Modified: stable/8/sys/kern/uipc_syscalls.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/kern/uipc_syscalls.c ============================================================================== --- stable/8/sys/kern/uipc_syscalls.c Wed Apr 7 14:09:29 2010 (r206344) +++ stable/8/sys/kern/uipc_syscalls.c Wed Apr 7 14:16:14 2010 (r206345) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -69,6 +70,9 @@ __FBSDID("$FreeBSD$"); #ifdef KTRACE #include #endif +#ifdef COMPAT_FREEBSD32 +#include +#endif #include @@ -2513,7 +2517,13 @@ sctp_generic_sendmsg_iov(td, uap) if (error) goto sctp_bad1; - error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + error = freebsd32_copyiniov((struct iovec32 *)uap->iov, + uap->iovlen, &iov, EMSGSIZE); + else +#endif + error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); if (error) goto sctp_bad1; #ifdef KTRACE @@ -2615,10 +2625,15 @@ sctp_generic_recvmsg(td, uap) if (error) { return (error); } - error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); - if (error) { +#ifdef COMPAT_FREEBSD32 + if (SV_CURPROC_FLAG(SV_ILP32)) + error = freebsd32_copyiniov((struct iovec32 *)uap->iov, + uap->iovlen, &iov, EMSGSIZE); + else +#endif + error = copyiniov(uap->iov, uap->iovlen, &iov, EMSGSIZE); + if (error) goto out1; - } so = fp->f_data; #ifdef MAC From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:22:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF89E1065670; Wed, 7 Apr 2010 14:22:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3F098FC08; Wed, 7 Apr 2010 14:22:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37EMcVj020125; Wed, 7 Apr 2010 14:22:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37EMc38020122; Wed, 7 Apr 2010 14:22:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071422.o37EMc38020122@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:22:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206346 - in stable/8/sys: compat/freebsd32 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:22:39 -0000 Author: kib Date: Wed Apr 7 14:22:38 2010 New Revision: 206346 URL: http://svn.freebsd.org/changeset/base/206346 Log: MFC r205320: For SYSCALL_MODULE_HELPER, use "sys/" module name. For SYSCALL32_MODULE_HELPER, use "sys32/" module name. This avoids modules name conflict when compat32 syscall does not need shims. Modified: stable/8/sys/compat/freebsd32/freebsd32_util.h stable/8/sys/sys/sysent.h 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/compat/freebsd32/freebsd32_util.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_util.h Wed Apr 7 14:16:14 2010 (r206345) +++ stable/8/sys/compat/freebsd32/freebsd32_util.h Wed Apr 7 14:22:38 2010 (r206346) @@ -61,7 +61,7 @@ static struct syscall_module_data name## }; \ \ static moduledata_t name##32_mod = { \ - #name, \ + "sys32/" #name, \ syscall32_module_handler, \ &name##_syscall32_mod \ }; \ Modified: stable/8/sys/sys/sysent.h ============================================================================== --- stable/8/sys/sys/sysent.h Wed Apr 7 14:16:14 2010 (r206345) +++ stable/8/sys/sys/sysent.h Wed Apr 7 14:22:38 2010 (r206346) @@ -149,7 +149,7 @@ static struct syscall_module_data name## }; \ \ static moduledata_t name##_mod = { \ - #name, \ + "sys/" #name, \ syscall_module_handler, \ &name##_syscall_mod \ }; \ From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:28:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B5A81065674; Wed, 7 Apr 2010 14:28:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39B0A8FC14; Wed, 7 Apr 2010 14:28:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37ESmap021628; Wed, 7 Apr 2010 14:28:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37ESmIM021623; Wed, 7 Apr 2010 14:28:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071428.o37ESmIM021623@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206347 - in stable/8/sys: compat/freebsd32 kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:28:48 -0000 Author: kib Date: Wed Apr 7 14:28:47 2010 New Revision: 206347 URL: http://svn.freebsd.org/changeset/base/206347 Log: MFC r205321: Introduce SYSCALL_INIT_HELPER and SYSCALL32_INIT_HELPER macros and neccessary support functions to allow registering dynamically loaded syscalls from the MOD_LOAD handlers. Helpers handle registration failures semi-automatically. Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/compat/freebsd32/freebsd32_util.h stable/8/sys/kern/kern_syscalls.c stable/8/sys/sys/sysent.h 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/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:22:38 2010 (r206346) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:28:47 2010 (r206347) @@ -3084,6 +3084,36 @@ syscall32_module_handler(struct module * } } +int +syscall32_helper_register(struct syscall_helper_data *sd) +{ + struct syscall_helper_data *sd1; + int error; + + for (sd1 = sd; sd1->syscall_no != NO_SYSCALL; sd1++) { + error = syscall32_register(&sd1->syscall_no, &sd1->new_sysent, + &sd1->old_sysent); + if (error != 0) { + syscall32_helper_unregister(sd); + return (error); + } + sd1->registered = 1; + } + return (0); +} + +int +syscall32_helper_unregister(struct syscall_helper_data *sd) +{ + struct syscall_helper_data *sd1; + + for (sd1 = sd; sd1->registered != 0; sd1++) { + syscall32_deregister(&sd1->syscall_no, &sd1->old_sysent); + sd1->registered = 0; + } + return (0); +} + register_t * freebsd32_copyout_strings(struct image_params *imgp) { Modified: stable/8/sys/compat/freebsd32/freebsd32_util.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_util.h Wed Apr 7 14:22:38 2010 (r206346) +++ stable/8/sys/compat/freebsd32/freebsd32_util.h Wed Apr 7 14:28:47 2010 (r206347) @@ -78,10 +78,21 @@ SYSCALL32_MODULE(syscallname, & syscallname##_syscall32, & syscallname##_sysent32,\ NULL, NULL); +#define SYSCALL32_INIT_HELPER(syscallname) { \ + .new_sysent = { \ + .sy_narg = (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ + .sy_call = (sy_call_t *)& syscallname, \ + }, \ + .syscall_no = FREEBSD32_SYS_##syscallname \ +} + int syscall32_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent); int syscall32_deregister(int *offset, struct sysent *old_sysent); int syscall32_module_handler(struct module *mod, int what, void *arg); +int syscall32_helper_register(struct syscall_helper_data *sd); +int syscall32_helper_unregister(struct syscall_helper_data *sd); register_t *freebsd32_copyout_strings(struct image_params *imgp); struct iovec32; Modified: stable/8/sys/kern/kern_syscalls.c ============================================================================== --- stable/8/sys/kern/kern_syscalls.c Wed Apr 7 14:22:38 2010 (r206346) +++ stable/8/sys/kern/kern_syscalls.c Wed Apr 7 14:28:47 2010 (r206347) @@ -135,3 +135,33 @@ syscall_module_handler(struct module *mo else return (0); } + +int +syscall_helper_register(struct syscall_helper_data *sd) +{ + struct syscall_helper_data *sd1; + int error; + + for (sd1 = sd; sd1->syscall_no != NO_SYSCALL; sd1++) { + error = syscall_register(&sd1->syscall_no, &sd1->new_sysent, + &sd1->old_sysent); + if (error != 0) { + syscall_helper_unregister(sd); + return (error); + } + sd1->registered = 1; + } + return (0); +} + +int +syscall_helper_unregister(struct syscall_helper_data *sd) +{ + struct syscall_helper_data *sd1; + + for (sd1 = sd; sd1->registered != 0; sd1++) { + syscall_deregister(&sd1->syscall_no, &sd1->old_sysent); + sd1->registered = 0; + } + return (0); +} Modified: stable/8/sys/sys/sysent.h ============================================================================== --- stable/8/sys/sys/sysent.h Wed Apr 7 14:22:38 2010 (r206346) +++ stable/8/sys/sys/sysent.h Wed Apr 7 14:28:47 2010 (r206347) @@ -166,10 +166,34 @@ SYSCALL_MODULE(syscallname, \ (sysent[SYS_##syscallname].sy_call != (sy_call_t *)lkmnosys && \ sysent[SYS_##syscallname].sy_call != (sy_call_t *)lkmressys) +/* + * Syscall registration helpers with resource allocation handling. + */ +struct syscall_helper_data { + struct sysent new_sysent; + struct sysent old_sysent; + int syscall_no; + int registered; +}; +#define SYSCALL_INIT_HELPER(syscallname) { \ + .new_sysent = { \ + .sy_narg = (sizeof(struct syscallname ## _args ) \ + / sizeof(register_t)), \ + .sy_call = (sy_call_t *)& syscallname, \ + .sy_auevent = SYS_AUE_##syscallname \ + }, \ + .syscall_no = SYS_##syscallname \ +} +#define SYSCALL_INIT_LAST { \ + .syscall_no = NO_SYSCALL \ +} + int syscall_register(int *offset, struct sysent *new_sysent, struct sysent *old_sysent); int syscall_deregister(int *offset, struct sysent *old_sysent); int syscall_module_handler(struct module *mod, int what, void *arg); +int syscall_helper_register(struct syscall_helper_data *sd); +int syscall_helper_unregister(struct syscall_helper_data *sd); /* Special purpose system call functions. */ struct nosys_args; From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:35:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CA41106566B; Wed, 7 Apr 2010 14:35:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B4EF8FC1F; Wed, 7 Apr 2010 14:35:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37EZAnQ023098; Wed, 7 Apr 2010 14:35:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37EZATu023094; Wed, 7 Apr 2010 14:35:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071435.o37EZATu023094@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206348 - in stable/8/sys: compat/freebsd32 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:35:10 -0000 Author: kib Date: Wed Apr 7 14:35:09 2010 New Revision: 206348 URL: http://svn.freebsd.org/changeset/base/206348 Log: MFC r205322: Move SysV IPC freebsd32 compat shims helpers from freebsd32_misc.c to sysv_ipc.c. Modified: stable/8/sys/compat/freebsd32/freebsd32_ipc.h stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/kern/sysv_ipc.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/compat/freebsd32/freebsd32_ipc.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_ipc.h Wed Apr 7 14:28:47 2010 (r206347) +++ stable/8/sys/compat/freebsd32/freebsd32_ipc.h Wed Apr 7 14:35:09 2010 (r206348) @@ -147,6 +147,14 @@ struct shmid_ds32_old { int32_t shm_ctime; uint32_t shm_internal; }; + +void freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, + struct ipc_perm *ip); +void freebsd32_ipcperm_old_out(struct ipc_perm *ip, + struct ipc_perm32_old *ip32); #endif +void freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip); +void freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32); + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_IPC_H_ */ Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:28:47 2010 (r206347) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:35:09 2010 (r206348) @@ -1400,60 +1400,6 @@ freebsd4_freebsd32_fhstatfs(struct threa } #endif -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -static void -freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip) -{ - - CP(*ip32, *ip, cuid); - CP(*ip32, *ip, cgid); - CP(*ip32, *ip, uid); - CP(*ip32, *ip, gid); - CP(*ip32, *ip, mode); - CP(*ip32, *ip, seq); - CP(*ip32, *ip, key); -} - -static void -freebsd32_ipcperm_old_out(struct ipc_perm *ip, struct ipc_perm32_old *ip32) -{ - - CP(*ip, *ip32, cuid); - CP(*ip, *ip32, cgid); - CP(*ip, *ip32, uid); - CP(*ip, *ip32, gid); - CP(*ip, *ip32, mode); - CP(*ip, *ip32, seq); - CP(*ip, *ip32, key); -} -#endif - -static void -freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip) -{ - - CP(*ip32, *ip, cuid); - CP(*ip32, *ip, cgid); - CP(*ip32, *ip, uid); - CP(*ip32, *ip, gid); - CP(*ip32, *ip, mode); - CP(*ip32, *ip, seq); - CP(*ip32, *ip, key); -} - -static void -freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32) -{ - - CP(*ip, *ip32, cuid); - CP(*ip, *ip32, cgid); - CP(*ip, *ip32, uid); - CP(*ip, *ip32, gid); - CP(*ip, *ip32, mode); - CP(*ip, *ip32, seq); - CP(*ip, *ip32, key); -} int freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap) Modified: stable/8/sys/kern/sysv_ipc.c ============================================================================== --- stable/8/sys/kern/sysv_ipc.c Wed Apr 7 14:28:47 2010 (r206347) +++ stable/8/sys/kern/sysv_ipc.c Wed Apr 7 14:35:09 2010 (r206348) @@ -178,3 +178,69 @@ ipcperm_new2old(struct ipc_perm *new, st old->key = new->key; } #endif + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) +void +freebsd32_ipcperm_old_in(struct ipc_perm32_old *ip32, struct ipc_perm *ip) +{ + + CP(*ip32, *ip, cuid); + CP(*ip32, *ip, cgid); + CP(*ip32, *ip, uid); + CP(*ip32, *ip, gid); + CP(*ip32, *ip, mode); + CP(*ip32, *ip, seq); + CP(*ip32, *ip, key); +} + +void +freebsd32_ipcperm_old_out(struct ipc_perm *ip, struct ipc_perm32_old *ip32) +{ + + CP(*ip, *ip32, cuid); + CP(*ip, *ip32, cgid); + CP(*ip, *ip32, uid); + CP(*ip, *ip32, gid); + CP(*ip, *ip32, mode); + CP(*ip, *ip32, seq); + CP(*ip, *ip32, key); +} +#endif + +void +freebsd32_ipcperm_in(struct ipc_perm32 *ip32, struct ipc_perm *ip) +{ + + CP(*ip32, *ip, cuid); + CP(*ip32, *ip, cgid); + CP(*ip32, *ip, uid); + CP(*ip32, *ip, gid); + CP(*ip32, *ip, mode); + CP(*ip32, *ip, seq); + CP(*ip32, *ip, key); +} + +void +freebsd32_ipcperm_out(struct ipc_perm *ip, struct ipc_perm32 *ip32) +{ + + CP(*ip, *ip32, cuid); + CP(*ip, *ip32, cgid); + CP(*ip, *ip32, uid); + CP(*ip, *ip32, gid); + CP(*ip, *ip32, mode); + CP(*ip, *ip32, seq); + CP(*ip, *ip32, key); +} +#endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:46:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32A80106564A; Wed, 7 Apr 2010 14:46:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FE9C8FC1C; Wed, 7 Apr 2010 14:46:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37EkTHh025680; Wed, 7 Apr 2010 14:46:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37EkTZ1025674; Wed, 7 Apr 2010 14:46:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071446.o37EkTZ1025674@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206349 - in stable/8/sys: compat/freebsd32 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:46:29 -0000 Author: kib Date: Wed Apr 7 14:46:28 2010 New Revision: 206349 URL: http://svn.freebsd.org/changeset/base/206349 Log: MFC r205323: Move SysV IPC freebsd32 compat shims from freebsd32_misc.c to corresponding sysv_{msg,sem,shm}.c files. Mark SysV IPC freebsd32 syscalls as NOSTD and add required SYSCALL_INIT_HELPER/SYSCALL32_INIT_HELPERs to provide auto register/unregister on module load. This makes COMPAT_FREEBSD32 functional with SysV IPC compiled and loaded as modules. Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/compat/freebsd32/syscalls.master stable/8/sys/kern/sysv_msg.c stable/8/sys/kern/sysv_sem.c stable/8/sys/kern/sysv_shm.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/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:35:09 2010 (r206348) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:46:28 2010 (r206349) @@ -1402,536 +1402,6 @@ freebsd4_freebsd32_fhstatfs(struct threa int -freebsd32_semsys(struct thread *td, struct freebsd32_semsys_args *uap) -{ - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) - switch (uap->which) { - case 0: - return (freebsd7_freebsd32_semctl(td, - (struct freebsd7_freebsd32_semctl_args *)&uap->a2)); - default: - return (semsys(td, (struct semsys_args *)uap)); - } -#else - return (nosys(td, NULL)); -#endif -} - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -int -freebsd7_freebsd32_semctl(struct thread *td, - struct freebsd7_freebsd32_semctl_args *uap) -{ - struct semid_ds32_old dsbuf32; - struct semid_ds dsbuf; - union semun semun; - union semun32 arg; - register_t rval; - int error; - - switch (uap->cmd) { - case SEM_STAT: - case IPC_SET: - case IPC_STAT: - case GETALL: - case SETVAL: - case SETALL: - error = copyin(uap->arg, &arg, sizeof(arg)); - if (error) - return (error); - break; - } - - switch (uap->cmd) { - case SEM_STAT: - case IPC_STAT: - semun.buf = &dsbuf; - break; - case IPC_SET: - error = copyin(PTRIN(arg.buf), &dsbuf32, sizeof(dsbuf32)); - if (error) - return (error); - freebsd32_ipcperm_old_in(&dsbuf32.sem_perm, &dsbuf.sem_perm); - PTRIN_CP(dsbuf32, dsbuf, sem_base); - CP(dsbuf32, dsbuf, sem_nsems); - CP(dsbuf32, dsbuf, sem_otime); - CP(dsbuf32, dsbuf, sem_ctime); - semun.buf = &dsbuf; - break; - case GETALL: - case SETALL: - semun.array = PTRIN(arg.array); - break; - case SETVAL: - semun.val = arg.val; - break; - } - - error = kern_semctl(td, uap->semid, uap->semnum, uap->cmd, &semun, - &rval); - if (error) - return (error); - - switch (uap->cmd) { - case SEM_STAT: - case IPC_STAT: - bzero(&dsbuf32, sizeof(dsbuf32)); - freebsd32_ipcperm_old_out(&dsbuf.sem_perm, &dsbuf32.sem_perm); - PTROUT_CP(dsbuf, dsbuf32, sem_base); - CP(dsbuf, dsbuf32, sem_nsems); - CP(dsbuf, dsbuf32, sem_otime); - CP(dsbuf, dsbuf32, sem_ctime); - error = copyout(&dsbuf32, PTRIN(arg.buf), sizeof(dsbuf32)); - break; - } - - if (error == 0) - td->td_retval[0] = rval; - return (error); -} -#endif - -int -freebsd32_semctl(struct thread *td, struct freebsd32_semctl_args *uap) -{ - struct semid_ds32 dsbuf32; - struct semid_ds dsbuf; - union semun semun; - union semun32 arg; - register_t rval; - int error; - - switch (uap->cmd) { - case SEM_STAT: - case IPC_SET: - case IPC_STAT: - case GETALL: - case SETVAL: - case SETALL: - error = copyin(uap->arg, &arg, sizeof(arg)); - if (error) - return (error); - break; - } - - switch (uap->cmd) { - case SEM_STAT: - case IPC_STAT: - semun.buf = &dsbuf; - break; - case IPC_SET: - error = copyin(PTRIN(arg.buf), &dsbuf32, sizeof(dsbuf32)); - if (error) - return (error); - freebsd32_ipcperm_in(&dsbuf32.sem_perm, &dsbuf.sem_perm); - PTRIN_CP(dsbuf32, dsbuf, sem_base); - CP(dsbuf32, dsbuf, sem_nsems); - CP(dsbuf32, dsbuf, sem_otime); - CP(dsbuf32, dsbuf, sem_ctime); - semun.buf = &dsbuf; - break; - case GETALL: - case SETALL: - semun.array = PTRIN(arg.array); - break; - case SETVAL: - semun.val = arg.val; - break; - } - - error = kern_semctl(td, uap->semid, uap->semnum, uap->cmd, &semun, - &rval); - if (error) - return (error); - - switch (uap->cmd) { - case SEM_STAT: - case IPC_STAT: - bzero(&dsbuf32, sizeof(dsbuf32)); - freebsd32_ipcperm_out(&dsbuf.sem_perm, &dsbuf32.sem_perm); - PTROUT_CP(dsbuf, dsbuf32, sem_base); - CP(dsbuf, dsbuf32, sem_nsems); - CP(dsbuf, dsbuf32, sem_otime); - CP(dsbuf, dsbuf32, sem_ctime); - error = copyout(&dsbuf32, PTRIN(arg.buf), sizeof(dsbuf32)); - break; - } - - if (error == 0) - td->td_retval[0] = rval; - return (error); -} - -int -freebsd32_msgsys(struct thread *td, struct freebsd32_msgsys_args *uap) -{ - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) - switch (uap->which) { - case 0: - return (freebsd7_freebsd32_msgctl(td, - (struct freebsd7_freebsd32_msgctl_args *)&uap->a2)); - case 2: - return (freebsd32_msgsnd(td, - (struct freebsd32_msgsnd_args *)&uap->a2)); - case 3: - return (freebsd32_msgrcv(td, - (struct freebsd32_msgrcv_args *)&uap->a2)); - default: - return (msgsys(td, (struct msgsys_args *)uap)); - } -#else - return (nosys(td, NULL)); -#endif -} - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -int -freebsd7_freebsd32_msgctl(struct thread *td, - struct freebsd7_freebsd32_msgctl_args *uap) -{ - struct msqid_ds msqbuf; - struct msqid_ds32_old msqbuf32; - int error; - - if (uap->cmd == IPC_SET) { - error = copyin(uap->buf, &msqbuf32, sizeof(msqbuf32)); - if (error) - return (error); - freebsd32_ipcperm_old_in(&msqbuf32.msg_perm, &msqbuf.msg_perm); - PTRIN_CP(msqbuf32, msqbuf, msg_first); - PTRIN_CP(msqbuf32, msqbuf, msg_last); - CP(msqbuf32, msqbuf, msg_cbytes); - CP(msqbuf32, msqbuf, msg_qnum); - CP(msqbuf32, msqbuf, msg_qbytes); - CP(msqbuf32, msqbuf, msg_lspid); - CP(msqbuf32, msqbuf, msg_lrpid); - CP(msqbuf32, msqbuf, msg_stime); - CP(msqbuf32, msqbuf, msg_rtime); - CP(msqbuf32, msqbuf, msg_ctime); - } - error = kern_msgctl(td, uap->msqid, uap->cmd, &msqbuf); - if (error) - return (error); - if (uap->cmd == IPC_STAT) { - bzero(&msqbuf32, sizeof(msqbuf32)); - freebsd32_ipcperm_old_out(&msqbuf.msg_perm, &msqbuf32.msg_perm); - PTROUT_CP(msqbuf, msqbuf32, msg_first); - PTROUT_CP(msqbuf, msqbuf32, msg_last); - CP(msqbuf, msqbuf32, msg_cbytes); - CP(msqbuf, msqbuf32, msg_qnum); - CP(msqbuf, msqbuf32, msg_qbytes); - CP(msqbuf, msqbuf32, msg_lspid); - CP(msqbuf, msqbuf32, msg_lrpid); - CP(msqbuf, msqbuf32, msg_stime); - CP(msqbuf, msqbuf32, msg_rtime); - CP(msqbuf, msqbuf32, msg_ctime); - error = copyout(&msqbuf32, uap->buf, sizeof(struct msqid_ds32)); - } - return (error); -} -#endif - -int -freebsd32_msgctl(struct thread *td, struct freebsd32_msgctl_args *uap) -{ - struct msqid_ds msqbuf; - struct msqid_ds32 msqbuf32; - int error; - - if (uap->cmd == IPC_SET) { - error = copyin(uap->buf, &msqbuf32, sizeof(msqbuf32)); - if (error) - return (error); - freebsd32_ipcperm_in(&msqbuf32.msg_perm, &msqbuf.msg_perm); - PTRIN_CP(msqbuf32, msqbuf, msg_first); - PTRIN_CP(msqbuf32, msqbuf, msg_last); - CP(msqbuf32, msqbuf, msg_cbytes); - CP(msqbuf32, msqbuf, msg_qnum); - CP(msqbuf32, msqbuf, msg_qbytes); - CP(msqbuf32, msqbuf, msg_lspid); - CP(msqbuf32, msqbuf, msg_lrpid); - CP(msqbuf32, msqbuf, msg_stime); - CP(msqbuf32, msqbuf, msg_rtime); - CP(msqbuf32, msqbuf, msg_ctime); - } - error = kern_msgctl(td, uap->msqid, uap->cmd, &msqbuf); - if (error) - return (error); - if (uap->cmd == IPC_STAT) { - freebsd32_ipcperm_out(&msqbuf.msg_perm, &msqbuf32.msg_perm); - PTROUT_CP(msqbuf, msqbuf32, msg_first); - PTROUT_CP(msqbuf, msqbuf32, msg_last); - CP(msqbuf, msqbuf32, msg_cbytes); - CP(msqbuf, msqbuf32, msg_qnum); - CP(msqbuf, msqbuf32, msg_qbytes); - CP(msqbuf, msqbuf32, msg_lspid); - CP(msqbuf, msqbuf32, msg_lrpid); - CP(msqbuf, msqbuf32, msg_stime); - CP(msqbuf, msqbuf32, msg_rtime); - CP(msqbuf, msqbuf32, msg_ctime); - error = copyout(&msqbuf32, uap->buf, sizeof(struct msqid_ds32)); - } - return (error); -} - -int -freebsd32_msgsnd(struct thread *td, struct freebsd32_msgsnd_args *uap) -{ - const void *msgp; - long mtype; - int32_t mtype32; - int error; - - msgp = PTRIN(uap->msgp); - if ((error = copyin(msgp, &mtype32, sizeof(mtype32))) != 0) - return (error); - mtype = mtype32; - return (kern_msgsnd(td, uap->msqid, - (const char *)msgp + sizeof(mtype32), - uap->msgsz, uap->msgflg, mtype)); -} - -int -freebsd32_msgrcv(struct thread *td, struct freebsd32_msgrcv_args *uap) -{ - void *msgp; - long mtype; - int32_t mtype32; - int error; - - msgp = PTRIN(uap->msgp); - if ((error = kern_msgrcv(td, uap->msqid, - (char *)msgp + sizeof(mtype32), uap->msgsz, - uap->msgtyp, uap->msgflg, &mtype)) != 0) - return (error); - mtype32 = (int32_t)mtype; - return (copyout(&mtype32, msgp, sizeof(mtype32))); -} - -int -freebsd32_shmsys(struct thread *td, struct freebsd32_shmsys_args *uap) -{ - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) - switch (uap->which) { - case 0: { /* shmat */ - struct shmat_args ap; - - ap.shmid = uap->a2; - ap.shmaddr = PTRIN(uap->a3); - ap.shmflg = uap->a4; - return (sysent[SYS_shmat].sy_call(td, &ap)); - } - case 2: { /* shmdt */ - struct shmdt_args ap; - - ap.shmaddr = PTRIN(uap->a2); - return (sysent[SYS_shmdt].sy_call(td, &ap)); - } - case 3: { /* shmget */ - struct shmget_args ap; - - ap.key = uap->a2; - ap.size = uap->a3; - ap.shmflg = uap->a4; - return (sysent[SYS_shmget].sy_call(td, &ap)); - } - case 4: { /* shmctl */ - struct freebsd7_freebsd32_shmctl_args ap; - - ap.shmid = uap->a2; - ap.cmd = uap->a3; - ap.buf = PTRIN(uap->a4); - return (freebsd7_freebsd32_shmctl(td, &ap)); - } - case 1: /* oshmctl */ - default: - return (EINVAL); - } -#else - return (nosys(td, NULL)); -#endif -} - -#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ - defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -int -freebsd7_freebsd32_shmctl(struct thread *td, - struct freebsd7_freebsd32_shmctl_args *uap) -{ - int error = 0; - union { - struct shmid_ds shmid_ds; - struct shm_info shm_info; - struct shminfo shminfo; - } u; - union { - struct shmid_ds32_old shmid_ds32; - struct shm_info32 shm_info32; - struct shminfo32 shminfo32; - } u32; - size_t sz; - - if (uap->cmd == IPC_SET) { - if ((error = copyin(uap->buf, &u32.shmid_ds32, - sizeof(u32.shmid_ds32)))) - goto done; - freebsd32_ipcperm_old_in(&u32.shmid_ds32.shm_perm, - &u.shmid_ds.shm_perm); - CP(u32.shmid_ds32, u.shmid_ds, shm_segsz); - CP(u32.shmid_ds32, u.shmid_ds, shm_lpid); - CP(u32.shmid_ds32, u.shmid_ds, shm_cpid); - CP(u32.shmid_ds32, u.shmid_ds, shm_nattch); - CP(u32.shmid_ds32, u.shmid_ds, shm_atime); - CP(u32.shmid_ds32, u.shmid_ds, shm_dtime); - CP(u32.shmid_ds32, u.shmid_ds, shm_ctime); - } - - error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&u, &sz); - if (error) - goto done; - - /* Cases in which we need to copyout */ - switch (uap->cmd) { - case IPC_INFO: - CP(u.shminfo, u32.shminfo32, shmmax); - CP(u.shminfo, u32.shminfo32, shmmin); - CP(u.shminfo, u32.shminfo32, shmmni); - CP(u.shminfo, u32.shminfo32, shmseg); - CP(u.shminfo, u32.shminfo32, shmall); - error = copyout(&u32.shminfo32, uap->buf, - sizeof(u32.shminfo32)); - break; - case SHM_INFO: - CP(u.shm_info, u32.shm_info32, used_ids); - CP(u.shm_info, u32.shm_info32, shm_rss); - CP(u.shm_info, u32.shm_info32, shm_tot); - CP(u.shm_info, u32.shm_info32, shm_swp); - CP(u.shm_info, u32.shm_info32, swap_attempts); - CP(u.shm_info, u32.shm_info32, swap_successes); - error = copyout(&u32.shm_info32, uap->buf, - sizeof(u32.shm_info32)); - break; - case SHM_STAT: - case IPC_STAT: - freebsd32_ipcperm_old_out(&u.shmid_ds.shm_perm, - &u32.shmid_ds32.shm_perm); - if (u.shmid_ds.shm_segsz > INT32_MAX) - u32.shmid_ds32.shm_segsz = INT32_MAX; - else - CP(u.shmid_ds, u32.shmid_ds32, shm_segsz); - CP(u.shmid_ds, u32.shmid_ds32, shm_lpid); - CP(u.shmid_ds, u32.shmid_ds32, shm_cpid); - CP(u.shmid_ds, u32.shmid_ds32, shm_nattch); - CP(u.shmid_ds, u32.shmid_ds32, shm_atime); - CP(u.shmid_ds, u32.shmid_ds32, shm_dtime); - CP(u.shmid_ds, u32.shmid_ds32, shm_ctime); - u32.shmid_ds32.shm_internal = 0; - error = copyout(&u32.shmid_ds32, uap->buf, - sizeof(u32.shmid_ds32)); - break; - } - -done: - if (error) { - /* Invalidate the return value */ - td->td_retval[0] = -1; - } - return (error); -} -#endif - -int -freebsd32_shmctl(struct thread *td, struct freebsd32_shmctl_args *uap) -{ - int error = 0; - union { - struct shmid_ds shmid_ds; - struct shm_info shm_info; - struct shminfo shminfo; - } u; - union { - struct shmid_ds32 shmid_ds32; - struct shm_info32 shm_info32; - struct shminfo32 shminfo32; - } u32; - size_t sz; - - if (uap->cmd == IPC_SET) { - if ((error = copyin(uap->buf, &u32.shmid_ds32, - sizeof(u32.shmid_ds32)))) - goto done; - freebsd32_ipcperm_in(&u32.shmid_ds32.shm_perm, - &u.shmid_ds.shm_perm); - CP(u32.shmid_ds32, u.shmid_ds, shm_segsz); - CP(u32.shmid_ds32, u.shmid_ds, shm_lpid); - CP(u32.shmid_ds32, u.shmid_ds, shm_cpid); - CP(u32.shmid_ds32, u.shmid_ds, shm_nattch); - CP(u32.shmid_ds32, u.shmid_ds, shm_atime); - CP(u32.shmid_ds32, u.shmid_ds, shm_dtime); - CP(u32.shmid_ds32, u.shmid_ds, shm_ctime); - } - - error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&u, &sz); - if (error) - goto done; - - /* Cases in which we need to copyout */ - switch (uap->cmd) { - case IPC_INFO: - CP(u.shminfo, u32.shminfo32, shmmax); - CP(u.shminfo, u32.shminfo32, shmmin); - CP(u.shminfo, u32.shminfo32, shmmni); - CP(u.shminfo, u32.shminfo32, shmseg); - CP(u.shminfo, u32.shminfo32, shmall); - error = copyout(&u32.shminfo32, uap->buf, - sizeof(u32.shminfo32)); - break; - case SHM_INFO: - CP(u.shm_info, u32.shm_info32, used_ids); - CP(u.shm_info, u32.shm_info32, shm_rss); - CP(u.shm_info, u32.shm_info32, shm_tot); - CP(u.shm_info, u32.shm_info32, shm_swp); - CP(u.shm_info, u32.shm_info32, swap_attempts); - CP(u.shm_info, u32.shm_info32, swap_successes); - error = copyout(&u32.shm_info32, uap->buf, - sizeof(u32.shm_info32)); - break; - case SHM_STAT: - case IPC_STAT: - freebsd32_ipcperm_out(&u.shmid_ds.shm_perm, - &u32.shmid_ds32.shm_perm); - if (u.shmid_ds.shm_segsz > INT32_MAX) - u32.shmid_ds32.shm_segsz = INT32_MAX; - else - CP(u.shmid_ds, u32.shmid_ds32, shm_segsz); - CP(u.shmid_ds, u32.shmid_ds32, shm_lpid); - CP(u.shmid_ds, u32.shmid_ds32, shm_cpid); - CP(u.shmid_ds, u32.shmid_ds32, shm_nattch); - CP(u.shmid_ds, u32.shmid_ds32, shm_atime); - CP(u.shmid_ds, u32.shmid_ds32, shm_dtime); - CP(u.shmid_ds, u32.shmid_ds32, shm_ctime); - error = copyout(&u32.shmid_ds32, uap->buf, - sizeof(u32.shmid_ds32)); - break; - } - -done: - if (error) { - /* Invalidate the return value */ - td->td_retval[0] = -1; - } - return (error); -} - -int freebsd32_pread(struct thread *td, struct freebsd32_pread_args *uap) { struct pread_args ap; Modified: stable/8/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/8/sys/compat/freebsd32/syscalls.master Wed Apr 7 14:35:09 2010 (r206348) +++ stable/8/sys/compat/freebsd32/syscalls.master Wed Apr 7 14:46:28 2010 (r206349) @@ -310,11 +310,11 @@ struct rtprio *rtp); } 167 AUE_NULL UNIMPL nosys 168 AUE_NULL UNIMPL nosys -169 AUE_SEMSYS STD { int freebsd32_semsys(int which, int a2, \ +169 AUE_SEMSYS NOSTD { int freebsd32_semsys(int which, int a2, \ int a3, int a4, int a5); } -170 AUE_MSGSYS STD { int freebsd32_msgsys(int which, int a2, \ +170 AUE_MSGSYS NOSTD { int freebsd32_msgsys(int which, int a2, \ int a3, int a4, int a5, int a6); } -171 AUE_SHMSYS STD { int freebsd32_shmsys(uint32_t which, uint32_t a2, \ +171 AUE_SHMSYS NOSTD { int freebsd32_shmsys(uint32_t which, uint32_t a2, \ uint32_t a3, uint32_t a4); } 172 AUE_NULL UNIMPL nosys 173 AUE_PREAD COMPAT6 { ssize_t freebsd32_pread(int fd, void *buf, \ @@ -402,26 +402,29 @@ ; The following were introduced with NetBSD/4.4Lite-2 ; They are initialized by their respective modules/sysinits ; XXX PROBLEM!! -220 AUE_SEMCTL COMPAT7 { int freebsd32_semctl(int semid, int semnum, \ +220 AUE_SEMCTL COMPAT7|NOSTD { int freebsd32_semctl( \ + int semid, int semnum, \ int cmd, union semun32 *arg); } -221 AUE_SEMGET NOPROTO { int semget(key_t key, int nsems, \ +221 AUE_SEMGET NOSTD|NOPROTO { int semget(key_t key, int nsems, \ int semflg); } -222 AUE_SEMOP NOPROTO { int semop(int semid, struct sembuf *sops, \ - u_int nsops); } +222 AUE_SEMOP NOSTD|NOPROTO { int semop(int semid, \ + struct sembuf *sops, u_int nsops); } 223 AUE_NULL UNIMPL semconfig -224 AUE_MSGCTL COMPAT7 { int freebsd32_msgctl(int msqid, int cmd, \ +224 AUE_MSGCTL COMPAT7|NOSTD { int freebsd32_msgctl( \ + int msqid, int cmd, \ struct msqid_ds32_old *buf); } -225 AUE_MSGGET NOPROTO { int msgget(key_t key, int msgflg); } -226 AUE_MSGSND STD { int freebsd32_msgsnd(int msqid, void *msgp, \ +225 AUE_MSGGET NOSTD|NOPROTO { int msgget(key_t key, int msgflg); } +226 AUE_MSGSND NOSTD { int freebsd32_msgsnd(int msqid, void *msgp, \ size_t msgsz, int msgflg); } -227 AUE_MSGRCV STD { int freebsd32_msgrcv(int msqid, void *msgp, \ +227 AUE_MSGRCV NOSTD { int freebsd32_msgrcv(int msqid, void *msgp, \ size_t msgsz, long msgtyp, int msgflg); } -228 AUE_SHMAT NOPROTO { int shmat(int shmid, void *shmaddr, \ +228 AUE_SHMAT NOSTD|NOPROTO { int shmat(int shmid, void *shmaddr, \ int shmflg); } -229 AUE_SHMCTL COMPAT7 { int freebsd32_shmctl(int shmid, int cmd, \ +229 AUE_SHMCTL COMPAT7|NOSTD { int freebsd32_shmctl( \ + int shmid, int cmd, \ struct shmid_ds32_old *buf); } -230 AUE_SHMDT NOPROTO { int shmdt(void *shmaddr); } -231 AUE_SHMGET NOPROTO { int shmget(key_t key, int size, \ +230 AUE_SHMDT NOSTD|NOPROTO { int shmdt(void *shmaddr); } +231 AUE_SHMGET NOSTD|NOPROTO { int shmget(key_t key, int size, \ int shmflg); } ; 232 AUE_NULL STD { int freebsd32_clock_gettime(clockid_t clock_id, \ @@ -926,11 +929,11 @@ unsigned int iovcnt, int flags); } 508 AUE_NULL NOPROTO { int jail_remove(int jid); } 509 AUE_CLOSEFROM NOPROTO { int closefrom(int lowfd); } -510 AUE_SEMCTL STD { int freebsd32_semctl(int semid, int semnum, \ +510 AUE_SEMCTL NOSTD { int freebsd32_semctl(int semid, int semnum, \ int cmd, union semun32 *arg); } -511 AUE_MSGCTL STD { int freebsd32_msgctl(int msqid, int cmd, \ +511 AUE_MSGCTL NOSTD { int freebsd32_msgctl(int msqid, int cmd, \ struct msqid_ds32 *buf); } -512 AUE_SHMCTL STD { int freebsd32_shmctl(int shmid, int cmd, \ +512 AUE_SHMCTL NOSTD { int freebsd32_shmctl(int shmid, int cmd, \ struct shmid_ds32 *buf); } 513 AUE_LPATHCONF NOPROTO { int lpathconf(char *path, int name); } 514 AUE_CAP_NEW UNIMPL cap_new Modified: stable/8/sys/kern/sysv_msg.c ============================================================================== --- stable/8/sys/kern/sysv_msg.c Wed Apr 7 14:35:09 2010 (r206348) +++ stable/8/sys/kern/sysv_msg.c Wed Apr 7 14:46:28 2010 (r206349) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_MSG, "msg", "SVID compatible message queues"); -static void msginit(void); +static int msginit(void); static int msgunload(void); static int sysvmsg_modload(struct module *, int, void *); @@ -152,10 +152,45 @@ static struct msg *msghdrs; /* MSGTQL ms static struct msqid_kernel *msqids; /* MSGMNI msqid_kernel struct's */ static struct mtx msq_mtx; /* global mutex for message queues. */ -static void +static struct syscall_helper_data msg_syscalls[] = { + SYSCALL_INIT_HELPER(msgctl), + SYSCALL_INIT_HELPER(msgget), + SYSCALL_INIT_HELPER(msgsnd), + SYSCALL_INIT_HELPER(msgrcv), +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + SYSCALL_INIT_HELPER(msgsys), + SYSCALL_INIT_HELPER(freebsd7_msgctl), +#endif + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include + +static struct syscall_helper_data msg32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_msgctl), + SYSCALL32_INIT_HELPER(freebsd32_msgsnd), + SYSCALL32_INIT_HELPER(freebsd32_msgrcv), + SYSCALL32_INIT_HELPER(msgget), + SYSCALL32_INIT_HELPER(freebsd32_msgsys), +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + SYSCALL32_INIT_HELPER(freebsd7_freebsd32_msgctl), +#endif + SYSCALL_INIT_LAST +}; +#endif + +static int msginit() { - register int i; + int i, error; TUNABLE_INT_FETCH("kern.ipc.msgseg", &msginfo.msgseg); TUNABLE_INT_FETCH("kern.ipc.msgssz", &msginfo.msgssz); @@ -235,6 +270,16 @@ msginit() #endif } mtx_init(&msq_mtx, "msq", NULL, MTX_DEF); + + error = syscall_helper_register(msg_syscalls); + if (error != 0) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(msg32_syscalls); + if (error != 0) + return (error); +#endif + return (0); } static int @@ -246,6 +291,11 @@ msgunload() int i; #endif + syscall_helper_unregister(msg_syscalls); +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(msg32_syscalls); +#endif + for (msqid = 0; msqid < msginfo.msgmni; msqid++) { /* * Look for an unallocated and unlocked msqid_ds. @@ -283,7 +333,9 @@ sysvmsg_modload(struct module *module, i switch (cmd) { case MOD_LOAD: - msginit(); + error = msginit(); + if (error != 0) + msgunload(); break; case MOD_UNLOAD: error = msgunload(); @@ -303,11 +355,6 @@ static moduledata_t sysvmsg_mod = { NULL }; -SYSCALL_MODULE_HELPER(msgctl); -SYSCALL_MODULE_HELPER(msgget); -SYSCALL_MODULE_HELPER(msgsnd); -SYSCALL_MODULE_HELPER(msgrcv); - DECLARE_MODULE(sysvmsg, sysvmsg_mod, SI_SUB_SYSV_MSG, SI_ORDER_FIRST); MODULE_VERSION(sysvmsg, 1); @@ -1257,10 +1304,159 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD, NULL, 0, sysctl_msqids, "", "Message queue IDs"); +#ifdef COMPAT_FREEBSD32 +int +freebsd32_msgsys(struct thread *td, struct freebsd32_msgsys_args *uap) +{ + +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + switch (uap->which) { + case 0: + return (freebsd7_freebsd32_msgctl(td, + (struct freebsd7_freebsd32_msgctl_args *)&uap->a2)); + case 2: + return (freebsd32_msgsnd(td, + (struct freebsd32_msgsnd_args *)&uap->a2)); + case 3: + return (freebsd32_msgrcv(td, + (struct freebsd32_msgrcv_args *)&uap->a2)); + default: + return (msgsys(td, (struct msgsys_args *)uap)); + } +#else + return (nosys(td, NULL)); +#endif +} + +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) +int +freebsd7_freebsd32_msgctl(struct thread *td, + struct freebsd7_freebsd32_msgctl_args *uap) +{ + struct msqid_ds msqbuf; + struct msqid_ds32_old msqbuf32; + int error; + + if (uap->cmd == IPC_SET) { + error = copyin(uap->buf, &msqbuf32, sizeof(msqbuf32)); + if (error) + return (error); + freebsd32_ipcperm_old_in(&msqbuf32.msg_perm, &msqbuf.msg_perm); + PTRIN_CP(msqbuf32, msqbuf, msg_first); + PTRIN_CP(msqbuf32, msqbuf, msg_last); + CP(msqbuf32, msqbuf, msg_cbytes); + CP(msqbuf32, msqbuf, msg_qnum); + CP(msqbuf32, msqbuf, msg_qbytes); + CP(msqbuf32, msqbuf, msg_lspid); + CP(msqbuf32, msqbuf, msg_lrpid); + CP(msqbuf32, msqbuf, msg_stime); + CP(msqbuf32, msqbuf, msg_rtime); + CP(msqbuf32, msqbuf, msg_ctime); + } + error = kern_msgctl(td, uap->msqid, uap->cmd, &msqbuf); + if (error) + return (error); + if (uap->cmd == IPC_STAT) { + bzero(&msqbuf32, sizeof(msqbuf32)); + freebsd32_ipcperm_old_out(&msqbuf.msg_perm, &msqbuf32.msg_perm); + PTROUT_CP(msqbuf, msqbuf32, msg_first); + PTROUT_CP(msqbuf, msqbuf32, msg_last); + CP(msqbuf, msqbuf32, msg_cbytes); + CP(msqbuf, msqbuf32, msg_qnum); + CP(msqbuf, msqbuf32, msg_qbytes); + CP(msqbuf, msqbuf32, msg_lspid); + CP(msqbuf, msqbuf32, msg_lrpid); + CP(msqbuf, msqbuf32, msg_stime); + CP(msqbuf, msqbuf32, msg_rtime); + CP(msqbuf, msqbuf32, msg_ctime); + error = copyout(&msqbuf32, uap->buf, sizeof(struct msqid_ds32)); + } + return (error); +} +#endif + +int +freebsd32_msgctl(struct thread *td, struct freebsd32_msgctl_args *uap) +{ + struct msqid_ds msqbuf; + struct msqid_ds32 msqbuf32; + int error; + + if (uap->cmd == IPC_SET) { + error = copyin(uap->buf, &msqbuf32, sizeof(msqbuf32)); + if (error) + return (error); + freebsd32_ipcperm_in(&msqbuf32.msg_perm, &msqbuf.msg_perm); + PTRIN_CP(msqbuf32, msqbuf, msg_first); + PTRIN_CP(msqbuf32, msqbuf, msg_last); + CP(msqbuf32, msqbuf, msg_cbytes); + CP(msqbuf32, msqbuf, msg_qnum); + CP(msqbuf32, msqbuf, msg_qbytes); + CP(msqbuf32, msqbuf, msg_lspid); + CP(msqbuf32, msqbuf, msg_lrpid); + CP(msqbuf32, msqbuf, msg_stime); + CP(msqbuf32, msqbuf, msg_rtime); + CP(msqbuf32, msqbuf, msg_ctime); + } + error = kern_msgctl(td, uap->msqid, uap->cmd, &msqbuf); + if (error) + return (error); + if (uap->cmd == IPC_STAT) { + freebsd32_ipcperm_out(&msqbuf.msg_perm, &msqbuf32.msg_perm); + PTROUT_CP(msqbuf, msqbuf32, msg_first); + PTROUT_CP(msqbuf, msqbuf32, msg_last); + CP(msqbuf, msqbuf32, msg_cbytes); + CP(msqbuf, msqbuf32, msg_qnum); + CP(msqbuf, msqbuf32, msg_qbytes); + CP(msqbuf, msqbuf32, msg_lspid); + CP(msqbuf, msqbuf32, msg_lrpid); + CP(msqbuf, msqbuf32, msg_stime); + CP(msqbuf, msqbuf32, msg_rtime); + CP(msqbuf, msqbuf32, msg_ctime); + error = copyout(&msqbuf32, uap->buf, sizeof(struct msqid_ds32)); + } + return (error); +} + +int +freebsd32_msgsnd(struct thread *td, struct freebsd32_msgsnd_args *uap) +{ + const void *msgp; + long mtype; + int32_t mtype32; + int error; + + msgp = PTRIN(uap->msgp); + if ((error = copyin(msgp, &mtype32, sizeof(mtype32))) != 0) + return (error); + mtype = mtype32; + return (kern_msgsnd(td, uap->msqid, + (const char *)msgp + sizeof(mtype32), + uap->msgsz, uap->msgflg, mtype)); +} + +int +freebsd32_msgrcv(struct thread *td, struct freebsd32_msgrcv_args *uap) +{ + void *msgp; + long mtype; + int32_t mtype32; + int error; + + msgp = PTRIN(uap->msgp); + if ((error = kern_msgrcv(td, uap->msqid, + (char *)msgp + sizeof(mtype32), uap->msgsz, + uap->msgtyp, uap->msgflg, &mtype)) != 0) + return (error); + mtype32 = (int32_t)mtype; + return (copyout(&mtype32, msgp, sizeof(mtype32))); +} +#endif + #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) -SYSCALL_MODULE_HELPER(msgsys); -SYSCALL_MODULE_HELPER(freebsd7_msgctl); /* XXX casting to (sy_call_t *) is bogus, as usual. */ static sy_call_t *msgcalls[] = { @@ -1295,7 +1491,9 @@ msgsys(td, uap) return (error); } +#ifndef CP #define CP(src, dst, fld) do { (dst).fld = (src).fld; } while (0) +#endif #ifndef _SYS_SYSPROTO_H_ struct freebsd7_msgctl_args { Modified: stable/8/sys/kern/sysv_sem.c ============================================================================== --- stable/8/sys/kern/sysv_sem.c Wed Apr 7 14:35:09 2010 (r206348) +++ stable/8/sys/kern/sysv_sem.c Wed Apr 7 14:46:28 2010 (r206349) @@ -70,7 +70,7 @@ static MALLOC_DEFINE(M_SEM, "sem", "SVID #define DPRINTF(a) #endif -static void seminit(void); +static int seminit(void); static int sysvsem_modload(struct module *, int, void *); static int semunload(void); static void semexit_myhook(void *arg, struct proc *p); @@ -214,10 +214,43 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD, NULL, 0, sysctl_sema, "", ""); -static void +static struct syscall_helper_data sem_syscalls[] = { + SYSCALL_INIT_HELPER(__semctl), + SYSCALL_INIT_HELPER(semget), + SYSCALL_INIT_HELPER(semop), +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + SYSCALL_INIT_HELPER(semsys), + SYSCALL_INIT_HELPER(freebsd7___semctl), +#endif + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include + +static struct syscall_helper_data sem32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_semctl), + SYSCALL32_INIT_HELPER(semget), + SYSCALL32_INIT_HELPER(semop), + SYSCALL32_INIT_HELPER(freebsd32_semsys), +#if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \ + defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD7) + SYSCALL32_INIT_HELPER(freebsd7_freebsd32_semctl), +#endif + SYSCALL_INIT_LAST +}; +#endif + +static int seminit(void) { - int i; + int i, error; TUNABLE_INT_FETCH("kern.ipc.semmap", &seminfo.semmap); TUNABLE_INT_FETCH("kern.ipc.semmni", &seminfo.semmni); @@ -258,6 +291,16 @@ seminit(void) mtx_init(&sem_undo_mtx, "semu", NULL, MTX_DEF); semexit_tag = EVENTHANDLER_REGISTER(process_exit, semexit_myhook, NULL, EVENTHANDLER_PRI_ANY); + + error = syscall_helper_register(sem_syscalls); + if (error != 0) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(sem32_syscalls); + if (error != 0) + return (error); +#endif + return (0); } static int @@ -269,6 +312,10 @@ semunload(void) if (semtot != 0) return (EBUSY); +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(sem32_syscalls); +#endif + syscall_helper_unregister(sem_syscalls); EVENTHANDLER_DEREGISTER(process_exit, semexit_tag); #ifdef MAC for (i = 0; i < seminfo.semmni; i++) @@ -292,7 +339,9 @@ sysvsem_modload(struct module *module, i switch (cmd) { case MOD_LOAD: - seminit(); + error = seminit(); + if (error != 0) + semunload(); break; case MOD_UNLOAD: error = semunload(); @@ -312,10 +361,6 @@ static moduledata_t sysvsem_mod = { NULL }; -SYSCALL_MODULE_HELPER(__semctl); -SYSCALL_MODULE_HELPER(semget); -SYSCALL_MODULE_HELPER(semop); - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:47:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04DC9106566B; Wed, 7 Apr 2010 14:47:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7A418FC1B; Wed, 7 Apr 2010 14:47:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37EltnX026058; Wed, 7 Apr 2010 14:47:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37Elt9i026055; Wed, 7 Apr 2010 14:47:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071447.o37Elt9i026055@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:47:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206350 - in stable/8/sys: compat/freebsd32 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:47:56 -0000 Author: kib Date: Wed Apr 7 14:47:55 2010 New Revision: 206350 URL: http://svn.freebsd.org/changeset/base/206350 Log: MFC r205324: Implement compat32 shims for ksem syscalls. Modified: stable/8/sys/compat/freebsd32/syscalls.master stable/8/sys/kern/uipc_sem.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/compat/freebsd32/syscalls.master ============================================================================== --- stable/8/sys/compat/freebsd32/syscalls.master Wed Apr 7 14:46:28 2010 (r206349) +++ stable/8/sys/compat/freebsd32/syscalls.master Wed Apr 7 14:47:55 2010 (r206350) @@ -698,16 +698,19 @@ 398 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ struct statfs *buf); } 399 AUE_NULL UNIMPL nosys -; XXX implement these? -400 AUE_NULL UNIMPL ksem_close -401 AUE_NULL UNIMPL ksem_post -402 AUE_NULL UNIMPL ksem_wait -403 AUE_NULL UNIMPL ksem_trywait -404 AUE_NULL UNIMPL ksem_init -405 AUE_NULL UNIMPL ksem_open -406 AUE_NULL UNIMPL ksem_unlink -407 AUE_NULL UNIMPL ksem_getvalue -408 AUE_NULL UNIMPL ksem_destroy +400 AUE_NULL NOSTD|NOPROTO { int ksem_close(semid_t id); } +401 AUE_NULL NOSTD|NOPROTO { int ksem_post(semid_t id); } +402 AUE_NULL NOSTD|NOPROTO { int ksem_wait(semid_t id); } +403 AUE_NULL NOSTD|NOPROTO { int ksem_trywait(semid_t id); } +404 AUE_NULL NOSTD { int freebsd32_ksem_init(semid_t *idp, \ + unsigned int value); } +405 AUE_NULL NOSTD { int freebsd32_ksem_open(semid_t *idp, \ + const char *name, int oflag, \ + mode_t mode, unsigned int value); } +406 AUE_NULL NOSTD|NOPROTO { int ksem_unlink(const char *name); } +407 AUE_NULL NOSTD|NOPROTO { int ksem_getvalue(semid_t id, \ + int *val); } +408 AUE_NULL NOSTD|NOPROTO { int ksem_destroy(semid_t id); } 409 AUE_NULL UNIMPL __mac_get_pid 410 AUE_NULL UNIMPL __mac_get_link 411 AUE_NULL UNIMPL __mac_set_link @@ -766,7 +769,8 @@ const char *path, int attrnamespace, \ void *data, size_t nbytes); } 440 AUE_NULL UNIMPL kse_switchin -441 AUE_NULL UNIMPL ksem_timedwait +441 AUE_NULL NOSTD { int freebsd32_ksem_timedwait(semid_t id, \ + const struct timespec32 *abstime); } 442 AUE_NULL STD { int freebsd32_thr_suspend( \ const struct timespec32 *timeout); } 443 AUE_NULL NOPROTO { int thr_wake(long id); } Modified: stable/8/sys/kern/uipc_sem.c ============================================================================== --- stable/8/sys/kern/uipc_sem.c Wed Apr 7 14:46:28 2010 (r206349) +++ stable/8/sys/kern/uipc_sem.c Wed Apr 7 14:47:55 2010 (r206350) @@ -34,6 +34,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" #include "opt_posix.h" #include @@ -113,7 +114,7 @@ static struct ksem *ksem_alloc(struct uc unsigned int value); static int ksem_create(struct thread *td, const char *path, semid_t *semidp, mode_t mode, unsigned int value, - int flags); + int flags, int compat32); static void ksem_drop(struct ksem *ks); static int ksem_get(struct thread *td, semid_t id, struct file **fpp); static struct ksem *ksem_hold(struct ksem *ks); @@ -375,16 +376,44 @@ ksem_remove(char *path, Fnv32_t fnv, str return (ENOENT); } +static int +ksem_create_copyout_semid(struct thread *td, semid_t *semidp, int fd, + int compat32) +{ + semid_t semid; +#ifdef COMPAT_FREEBSD32 + int32_t semid32; +#endif + void *ptr; + size_t ptrs; + +#ifdef COMPAT_FREEBSD32 + if (compat32) { + semid32 = fd; + ptr = &semid32; + ptrs = sizeof(semid32); + } else { +#endif + semid = fd; + ptr = &semid; + ptrs = sizeof(semid); + compat32 = 0; /* silence gcc */ +#ifdef COMPAT_FREEBSD32 + } +#endif + + return (copyout(ptr, semidp, ptrs)); +} + /* Other helper routines. */ static int ksem_create(struct thread *td, const char *name, semid_t *semidp, mode_t mode, - unsigned int value, int flags) + unsigned int value, int flags, int compat32) { struct filedesc *fdp; struct ksem *ks; struct file *fp; char *path; - semid_t semid; Fnv32_t fnv; int error, fd; @@ -405,8 +434,7 @@ ksem_create(struct thread *td, const cha * premature, but it is a lot easier to handle errors as opposed * to later when we've possibly created a new semaphore, etc. */ - semid = fd; - error = copyout(&semid, semidp, sizeof(semid)); + error = ksem_create_copyout_semid(td, semidp, fd, compat32); if (error) { fdclose(fdp, fp, fd, td); fdrop(fp, td); @@ -531,7 +559,7 @@ ksem_init(struct thread *td, struct ksem { return (ksem_create(td, NULL, uap->idp, S_IRWXU | S_IRWXG, uap->value, - 0)); + 0, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -552,7 +580,7 @@ ksem_open(struct thread *td, struct ksem if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0) return (EINVAL); return (ksem_create(td, uap->name, uap->idp, uap->mode, uap->value, - uap->oflag)); + uap->oflag, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -833,38 +861,85 @@ err: return (error); } -#define SYSCALL_DATA(syscallname) \ -static int syscallname##_syscall = SYS_##syscallname; \ -static int syscallname##_registered; \ -static struct sysent syscallname##_old_sysent; \ -MAKE_SYSENT(syscallname); - -#define SYSCALL_REGISTER(syscallname) do { \ - error = syscall_register(& syscallname##_syscall, \ - & syscallname##_sysent, & syscallname##_old_sysent); \ - if (error) \ - return (error); \ - syscallname##_registered = 1; \ -} while(0) - -#define SYSCALL_DEREGISTER(syscallname) do { \ - if (syscallname##_registered) { \ - syscallname##_registered = 0; \ - syscall_deregister(& syscallname##_syscall, \ - & syscallname##_old_sysent); \ - } \ -} while(0) - -SYSCALL_DATA(ksem_init); -SYSCALL_DATA(ksem_open); -SYSCALL_DATA(ksem_unlink); -SYSCALL_DATA(ksem_close); -SYSCALL_DATA(ksem_post); -SYSCALL_DATA(ksem_wait); -SYSCALL_DATA(ksem_timedwait); -SYSCALL_DATA(ksem_trywait); -SYSCALL_DATA(ksem_getvalue); -SYSCALL_DATA(ksem_destroy); +static struct syscall_helper_data ksem_syscalls[] = { + SYSCALL_INIT_HELPER(ksem_init), + SYSCALL_INIT_HELPER(ksem_open), + SYSCALL_INIT_HELPER(ksem_unlink), + SYSCALL_INIT_HELPER(ksem_close), + SYSCALL_INIT_HELPER(ksem_post), + SYSCALL_INIT_HELPER(ksem_wait), + SYSCALL_INIT_HELPER(ksem_timedwait), + SYSCALL_INIT_HELPER(ksem_trywait), + SYSCALL_INIT_HELPER(ksem_getvalue), + SYSCALL_INIT_HELPER(ksem_destroy), + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include + +int +freebsd32_ksem_init(struct thread *td, struct freebsd32_ksem_init_args *uap) +{ + + return (ksem_create(td, NULL, uap->idp, S_IRWXU | S_IRWXG, uap->value, + 0, 1)); +} + +int +freebsd32_ksem_open(struct thread *td, struct freebsd32_ksem_open_args *uap) +{ + + if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0) + return (EINVAL); + return (ksem_create(td, uap->name, uap->idp, uap->mode, uap->value, + uap->oflag, 1)); +} + +int +freebsd32_ksem_timedwait(struct thread *td, + struct freebsd32_ksem_timedwait_args *uap) +{ + struct timespec32 abstime32; + struct timespec *ts, abstime; + int error; + + /* + * We allow a null timespec (wait forever). + */ + if (uap->abstime == NULL) + ts = NULL; + else { + error = copyin(uap->abstime, &abstime32, sizeof(abstime32)); + if (error != 0) + return (error); + CP(abstime32, abstime, tv_sec); + CP(abstime32, abstime, tv_nsec); + if (abstime.tv_nsec >= 1000000000 || abstime.tv_nsec < 0) + return (EINVAL); + ts = &abstime; + } + return (kern_sem_wait(td, uap->id, 0, ts)); +} + +static struct syscall_helper_data ksem32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_ksem_init), + SYSCALL32_INIT_HELPER(freebsd32_ksem_open), + SYSCALL32_INIT_HELPER(ksem_unlink), + SYSCALL32_INIT_HELPER(ksem_close), + SYSCALL32_INIT_HELPER(ksem_post), + SYSCALL32_INIT_HELPER(ksem_wait), + SYSCALL32_INIT_HELPER(freebsd32_ksem_timedwait), + SYSCALL32_INIT_HELPER(ksem_trywait), + SYSCALL32_INIT_HELPER(ksem_getvalue), + SYSCALL32_INIT_HELPER(ksem_destroy), + SYSCALL_INIT_LAST +}; +#endif static int ksem_module_init(void) @@ -878,16 +953,14 @@ ksem_module_init(void) p31b_setcfg(CTL_P1003_1B_SEM_NSEMS_MAX, SEM_MAX); p31b_setcfg(CTL_P1003_1B_SEM_VALUE_MAX, SEM_VALUE_MAX); - SYSCALL_REGISTER(ksem_init); - SYSCALL_REGISTER(ksem_open); - SYSCALL_REGISTER(ksem_unlink); - SYSCALL_REGISTER(ksem_close); - SYSCALL_REGISTER(ksem_post); - SYSCALL_REGISTER(ksem_wait); - SYSCALL_REGISTER(ksem_timedwait); - SYSCALL_REGISTER(ksem_trywait); - SYSCALL_REGISTER(ksem_getvalue); - SYSCALL_REGISTER(ksem_destroy); + error = syscall_helper_register(ksem_syscalls); + if (error) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(ksem32_syscalls); + if (error) + return (error); +#endif return (0); } @@ -895,16 +968,10 @@ static void ksem_module_destroy(void) { - SYSCALL_DEREGISTER(ksem_init); - SYSCALL_DEREGISTER(ksem_open); - SYSCALL_DEREGISTER(ksem_unlink); - SYSCALL_DEREGISTER(ksem_close); - SYSCALL_DEREGISTER(ksem_post); - SYSCALL_DEREGISTER(ksem_wait); - SYSCALL_DEREGISTER(ksem_timedwait); - SYSCALL_DEREGISTER(ksem_trywait); - SYSCALL_DEREGISTER(ksem_getvalue); - SYSCALL_DEREGISTER(ksem_destroy); +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(ksem32_syscalls); +#endif + syscall_helper_unregister(ksem_syscalls); hashdestroy(ksem_dictionary, M_KSEM, ksem_hash); sx_destroy(&ksem_dict_lock); From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:49:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C06D1065678; Wed, 7 Apr 2010 14:49:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5408FC15; Wed, 7 Apr 2010 14:49:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37EnZ75026471; Wed, 7 Apr 2010 14:49:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37EnZLt026467; Wed, 7 Apr 2010 14:49:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071449.o37EnZLt026467@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206351 - in stable/8/sys: compat/freebsd32 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:49:35 -0000 Author: kib Date: Wed Apr 7 14:49:35 2010 New Revision: 206351 URL: http://svn.freebsd.org/changeset/base/206351 Log: MFC r205325: Implement compat32 shims for mqueuefs. Modified: stable/8/sys/compat/freebsd32/freebsd32.h stable/8/sys/compat/freebsd32/syscalls.master stable/8/sys/kern/uipc_mqueue.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/compat/freebsd32/freebsd32.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32.h Wed Apr 7 14:47:55 2010 (r206350) +++ stable/8/sys/compat/freebsd32/freebsd32.h Wed Apr 7 14:49:35 2010 (r206351) @@ -221,4 +221,12 @@ struct prpsinfo32 { char pr_psargs[PRARGSZ+1]; }; +struct mq_attr32 { + int mq_flags; + int mq_maxmsg; + int mq_msgsize; + int mq_curmsgs; + int __reserved[4]; +}; + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_H_ */ Modified: stable/8/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/8/sys/compat/freebsd32/syscalls.master Wed Apr 7 14:47:55 2010 (r206350) +++ stable/8/sys/compat/freebsd32/syscalls.master Wed Apr 7 14:49:35 2010 (r206351) @@ -798,12 +798,23 @@ int param_size); } 456 AUE_NULL NOPROTO { int sigqueue(pid_t pid, int signum, \ void *value); } -457 AUE_NULL UNIMPL kmq_open -458 AUE_NULL UNIMPL kmq_setattr -459 AUE_NULL UNIMPL kmq_timedreceive -460 AUE_NULL UNIMPL kmq_timedsend -461 AUE_NULL UNIMPL kmq_notify -462 AUE_NULL UNIMPL kmq_unlink +457 AUE_NULL NOSTD { int freebsd32_kmq_open( \ + const char *path, int flags, mode_t mode, \ + const struct mq_attr32 *attr); } +458 AUE_NULL NOSTD { int freebsd32_kmq_setattr(int mqd, \ + const struct mq_attr32 *attr, \ + struct mq_attr32 *oattr); } +459 AUE_NULL NOSTD { int freebsd32_kmq_timedreceive(int mqd, \ + char *msg_ptr, size_t msg_len, \ + unsigned *msg_prio, \ + const struct timespec32 *abs_timeout); } +460 AUE_NULL NOSTD { int freebsd32_kmq_timedsend(int mqd, \ + const char *msg_ptr, size_t msg_len,\ + unsigned msg_prio, \ + const struct timespec32 *abs_timeout);} +461 AUE_NULL NOPROTO|NOSTD { int kmq_notify(int mqd, \ + const struct sigevent *sigev); } +462 AUE_NULL NOPROTO|NOSTD { int kmq_unlink(const char *path); } 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } 464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } 465 AUE_NULL NOSTD { int freebsd32_aio_fsync(int op, \ Modified: stable/8/sys/kern/uipc_mqueue.c ============================================================================== --- stable/8/sys/kern/uipc_mqueue.c Wed Apr 7 14:47:55 2010 (r206350) +++ stable/8/sys/kern/uipc_mqueue.c Wed Apr 7 14:49:35 2010 (r206351) @@ -45,6 +45,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -1616,7 +1618,7 @@ mqueue_send(struct mqueue *mq, const cha const struct timespec *abs_timeout) { struct mqueue_msg *msg; - struct timespec ets, ts, ts2; + struct timespec ts, ts2; struct timeval tv; int error; @@ -1652,15 +1654,12 @@ mqueue_send(struct mqueue *mq, const cha if (error != EAGAIN) goto bad; - error = copyin(abs_timeout, &ets, sizeof(ets)); - if (error != 0) - goto bad; - if (ets.tv_nsec >= 1000000000 || ets.tv_nsec < 0) { + if (abs_timeout->tv_nsec >= 1000000000 || abs_timeout->tv_nsec < 0) { error = EINVAL; goto bad; } for (;;) { - ts2 = ets; + ts2 = *abs_timeout; getnanotime(&ts); timespecsub(&ts2, &ts); if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) { @@ -1767,7 +1766,7 @@ mqueue_receive(struct mqueue *mq, char * const struct timespec *abs_timeout) { struct mqueue_msg *msg; - struct timespec ets, ts, ts2; + struct timespec ts, ts2; struct timeval tv; int error; @@ -1798,16 +1797,13 @@ mqueue_receive(struct mqueue *mq, char * if (error != EAGAIN) return (error); - error = copyin(abs_timeout, &ets, sizeof(ets)); - if (error != 0) - return (error); - if (ets.tv_nsec >= 1000000000 || ets.tv_nsec < 0) { + if (abs_timeout->tv_nsec >= 1000000000 || abs_timeout->tv_nsec < 0) { error = EINVAL; return (error); } for (;;) { - ts2 = ets; + ts2 = *abs_timeout; getnanotime(&ts); timespecsub(&ts2, &ts); if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) { @@ -1928,40 +1924,28 @@ notifier_remove(struct proc *p, struct m PROC_UNLOCK(p); } -/* - * Syscall to open a message queue. - */ -int -kmq_open(struct thread *td, struct kmq_open_args *uap) +static int +kern_kmq_open(struct thread *td, const char *upath, int flags, mode_t mode, + const struct mq_attr *attr) { char path[MQFS_NAMELEN + 1]; - struct mq_attr attr, *pattr; struct mqfs_node *pn; struct filedesc *fdp; struct file *fp; struct mqueue *mq; - int fd, error, len, flags, cmode; - - if ((uap->flags & O_ACCMODE) == O_ACCMODE) - return (EINVAL); + int fd, error, len, cmode; fdp = td->td_proc->p_fd; - flags = FFLAGS(uap->flags); - cmode = (((uap->mode & ~fdp->fd_cmask) & ALLPERMS) & ~S_ISTXT); + cmode = (((mode & ~fdp->fd_cmask) & ALLPERMS) & ~S_ISTXT); mq = NULL; - if ((flags & O_CREAT) && (uap->attr != NULL)) { - error = copyin(uap->attr, &attr, sizeof(attr)); - if (error) - return (error); - if (attr.mq_maxmsg <= 0 || attr.mq_maxmsg > maxmsg) + if ((flags & O_CREAT) != 0 && attr != NULL) { + if (attr->mq_maxmsg <= 0 || attr->mq_maxmsg > maxmsg) return (EINVAL); - if (attr.mq_msgsize <= 0 || attr.mq_msgsize > maxmsgsize) + if (attr->mq_msgsize <= 0 || attr->mq_msgsize > maxmsgsize) return (EINVAL); - pattr = &attr; - } else - pattr = NULL; + } - error = copyinstr(uap->path, path, MQFS_NAMELEN + 1, NULL); + error = copyinstr(upath, path, MQFS_NAMELEN + 1, NULL); if (error) return (error); @@ -1984,7 +1968,7 @@ kmq_open(struct thread *td, struct kmq_o if (!(flags & O_CREAT)) { error = ENOENT; } else { - mq = mqueue_alloc(pattr); + mq = mqueue_alloc(attr); if (mq == NULL) { error = ENFILE; } else { @@ -2039,6 +2023,27 @@ kmq_open(struct thread *td, struct kmq_o } /* + * Syscall to open a message queue. + */ +int +kmq_open(struct thread *td, struct kmq_open_args *uap) +{ + struct mq_attr attr; + int flags, error; + + if ((uap->flags & O_ACCMODE) == O_ACCMODE) + return (EINVAL); + flags = FFLAGS(uap->flags); + if ((flags & O_CREAT) != 0 && uap->attr != NULL) { + error = copyin(uap->attr, &attr, sizeof(attr)); + if (error) + return (error); + } + return (kern_kmq_open(td, uap->path, flags, uap->mode, + uap->attr != NULL ? &attr : NULL)); +} + +/* * Syscall to unlink a message queue. */ int @@ -2114,39 +2119,52 @@ getmq_write(struct thread *td, int fd, s return _getmq(td, fd, fget_write, fpp, ppn, pmq); } -int -kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) +static int +kern_kmq_setattr(struct thread *td, int mqd, const struct mq_attr *attr, + struct mq_attr *oattr) { struct mqueue *mq; struct file *fp; - struct mq_attr attr, oattr; u_int oflag, flag; int error; - if (uap->attr) { - error = copyin(uap->attr, &attr, sizeof(attr)); - if (error) - return (error); - if (attr.mq_flags & ~O_NONBLOCK) - return (EINVAL); - } - error = getmq(td, uap->mqd, &fp, NULL, &mq); + if (attr != NULL && (attr->mq_flags & ~O_NONBLOCK) != 0) + return (EINVAL); + error = getmq(td, mqd, &fp, NULL, &mq); if (error) return (error); - oattr.mq_maxmsg = mq->mq_maxmsg; - oattr.mq_msgsize = mq->mq_msgsize; - oattr.mq_curmsgs = mq->mq_curmsgs; - if (uap->attr) { + oattr->mq_maxmsg = mq->mq_maxmsg; + oattr->mq_msgsize = mq->mq_msgsize; + oattr->mq_curmsgs = mq->mq_curmsgs; + if (attr != NULL) { do { oflag = flag = fp->f_flag; flag &= ~O_NONBLOCK; - flag |= (attr.mq_flags & O_NONBLOCK); + flag |= (attr->mq_flags & O_NONBLOCK); } while (atomic_cmpset_int(&fp->f_flag, oflag, flag) == 0); } else oflag = fp->f_flag; - oattr.mq_flags = (O_NONBLOCK & oflag); + oattr->mq_flags = (O_NONBLOCK & oflag); fdrop(fp, td); - if (uap->oattr) + return (error); +} + +int +kmq_setattr(struct thread *td, struct kmq_setattr_args *uap) +{ + struct mq_attr attr, oattr; + int error; + + if (uap->attr != NULL) { + error = copyin(uap->attr, &attr, sizeof(attr)); + if (error != 0) + return (error); + } + error = kern_kmq_setattr(td, uap->mqd, uap->attr != NULL ? &attr : NULL, + &oattr); + if (error != 0) + return (error); + if (uap->oattr != NULL) error = copyout(&oattr, uap->oattr, sizeof(oattr)); return (error); } @@ -2156,15 +2174,23 @@ kmq_timedreceive(struct thread *td, stru { struct mqueue *mq; struct file *fp; + struct timespec *abs_timeout, ets; int error; int waitok; error = getmq_read(td, uap->mqd, &fp, NULL, &mq); if (error) return (error); + if (uap->abs_timeout != NULL) { + error = copyin(uap->abs_timeout, &ets, sizeof(ets)); + if (error != 0) + return (error); + abs_timeout = &ets; + } else + abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, uap->abs_timeout); + uap->msg_prio, waitok, abs_timeout); fdrop(fp, td); return (error); } @@ -2174,14 +2200,22 @@ kmq_timedsend(struct thread *td, struct { struct mqueue *mq; struct file *fp; + struct timespec *abs_timeout, ets; int error, waitok; error = getmq_write(td, uap->mqd, &fp, NULL, &mq); if (error) return (error); + if (uap->abs_timeout != NULL) { + error = copyin(uap->abs_timeout, &ets, sizeof(ets)); + if (error != 0) + return (error); + abs_timeout = &ets; + } else + abs_timeout = NULL; waitok = !(fp->f_flag & O_NONBLOCK); error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, - uap->msg_prio, waitok, uap->abs_timeout); + uap->msg_prio, waitok, abs_timeout); fdrop(fp, td); return (error); } @@ -2505,12 +2539,219 @@ static struct vfsops mqfs_vfsops = { .vfs_statfs = mqfs_statfs, }; -SYSCALL_MODULE_HELPER(kmq_open); -SYSCALL_MODULE_HELPER(kmq_setattr); -SYSCALL_MODULE_HELPER(kmq_timedsend); -SYSCALL_MODULE_HELPER(kmq_timedreceive); -SYSCALL_MODULE_HELPER(kmq_notify); -SYSCALL_MODULE_HELPER(kmq_unlink); +static struct vfsconf mqueuefs_vfsconf = { + .vfc_version = VFS_VERSION, + .vfc_name = "mqueuefs", + .vfc_vfsops = &mqfs_vfsops, + .vfc_typenum = -1, + .vfc_flags = VFCF_SYNTHETIC +}; + +static struct syscall_helper_data mq_syscalls[] = { + SYSCALL_INIT_HELPER(kmq_open), + SYSCALL_INIT_HELPER(kmq_setattr), + SYSCALL_INIT_HELPER(kmq_timedsend), + SYSCALL_INIT_HELPER(kmq_timedreceive), + SYSCALL_INIT_HELPER(kmq_notify), + SYSCALL_INIT_HELPER(kmq_unlink), + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include + +static void +mq_attr_from32(const struct mq_attr32 *from, struct mq_attr *to) +{ + + to->mq_flags = from->mq_flags; + to->mq_maxmsg = from->mq_maxmsg; + to->mq_msgsize = from->mq_msgsize; + to->mq_curmsgs = from->mq_curmsgs; +} + +static void +mq_attr_to32(const struct mq_attr *from, struct mq_attr32 *to) +{ + + to->mq_flags = from->mq_flags; + to->mq_maxmsg = from->mq_maxmsg; + to->mq_msgsize = from->mq_msgsize; + to->mq_curmsgs = from->mq_curmsgs; +} + +int +freebsd32_kmq_open(struct thread *td, struct freebsd32_kmq_open_args *uap) +{ + struct mq_attr attr; + struct mq_attr32 attr32; + int flags, error; + + if ((uap->flags & O_ACCMODE) == O_ACCMODE) + return (EINVAL); + flags = FFLAGS(uap->flags); + if ((flags & O_CREAT) != 0 && uap->attr != NULL) { + error = copyin(uap->attr, &attr32, sizeof(attr32)); + if (error) + return (error); + mq_attr_from32(&attr32, &attr); + } + return (kern_kmq_open(td, uap->path, flags, uap->mode, + uap->attr != NULL ? &attr : NULL)); +} + +int +freebsd32_kmq_setattr(struct thread *td, struct freebsd32_kmq_setattr_args *uap) +{ + struct mq_attr attr, oattr; + struct mq_attr32 attr32, oattr32; + int error; + + if (uap->attr != NULL) { + error = copyin(uap->attr, &attr32, sizeof(attr32)); + if (error != 0) + return (error); + mq_attr_from32(&attr32, &attr); + } + error = kern_kmq_setattr(td, uap->mqd, uap->attr != NULL ? &attr : NULL, + &oattr); + if (error != 0) + return (error); + if (uap->oattr != NULL) { + mq_attr_to32(&oattr, &oattr32); + error = copyout(&oattr32, uap->oattr, sizeof(oattr32)); + } + return (error); +} + +int +freebsd32_kmq_timedsend(struct thread *td, + struct freebsd32_kmq_timedsend_args *uap) +{ + struct mqueue *mq; + struct file *fp; + struct timespec32 ets32; + struct timespec *abs_timeout, ets; + int error; + int waitok; + + error = getmq_read(td, uap->mqd, &fp, NULL, &mq); + if (error) + return (error); + if (uap->abs_timeout != NULL) { + error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); + if (error != 0) + return (error); + CP(ets32, ets, tv_sec); + CP(ets32, ets, tv_nsec); + abs_timeout = &ets; + } else + abs_timeout = NULL; + waitok = !(fp->f_flag & O_NONBLOCK); + error = mqueue_send(mq, uap->msg_ptr, uap->msg_len, + uap->msg_prio, waitok, abs_timeout); + fdrop(fp, td); + return (error); +} + +int +freebsd32_kmq_timedreceive(struct thread *td, + struct freebsd32_kmq_timedreceive_args *uap) +{ + struct mqueue *mq; + struct file *fp; + struct timespec32 ets32; + struct timespec *abs_timeout, ets; + int error, waitok; + + error = getmq_write(td, uap->mqd, &fp, NULL, &mq); + if (error) + return (error); + if (uap->abs_timeout != NULL) { + error = copyin(uap->abs_timeout, &ets32, sizeof(ets32)); + if (error != 0) + return (error); + CP(ets32, ets, tv_sec); + CP(ets32, ets, tv_nsec); + abs_timeout = &ets; + } else + abs_timeout = NULL; + waitok = !(fp->f_flag & O_NONBLOCK); + error = mqueue_receive(mq, uap->msg_ptr, uap->msg_len, + uap->msg_prio, waitok, abs_timeout); + fdrop(fp, td); + return (error); +} + +static struct syscall_helper_data mq32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_kmq_open), + SYSCALL32_INIT_HELPER(freebsd32_kmq_setattr), + SYSCALL32_INIT_HELPER(freebsd32_kmq_timedsend), + SYSCALL32_INIT_HELPER(freebsd32_kmq_timedreceive), + SYSCALL32_INIT_HELPER(kmq_notify), + SYSCALL32_INIT_HELPER(kmq_unlink), + SYSCALL_INIT_LAST +}; +#endif + +static int +mqinit(void) +{ + int error; + + error = syscall_helper_register(mq_syscalls); + if (error != 0) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(mq32_syscalls); + if (error != 0) + return (error); +#endif + return (0); +} -VFS_SET(mqfs_vfsops, mqueuefs, VFCF_SYNTHETIC); +static int +mqunload(void) +{ + +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(mq32_syscalls); +#endif + syscall_helper_unregister(mq_syscalls); + return (0); +} + +static int +mq_modload(struct module *module, int cmd, void *arg) +{ + int error = 0; + + error = vfs_modevent(module, cmd, arg); + if (error != 0) + return (error); + + switch (cmd) { + case MOD_LOAD: + error = mqinit(); + if (error != 0) + mqunload(); + break; + case MOD_UNLOAD: + error = mqunload(); + break; + default: + break; + } + return (error); +} + +static moduledata_t mqueuefs_mod = { + "mqueuefs", + mq_modload, + &mqueuefs_vfsconf +}; +DECLARE_MODULE(mqueuefs, mqueuefs_mod, SI_SUB_VFS, SI_ORDER_MIDDLE); MODULE_VERSION(mqueuefs, 1); From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:50:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E0521065670; Wed, 7 Apr 2010 14:50:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DBB08FC14; Wed, 7 Apr 2010 14:50:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37EowdL026817; Wed, 7 Apr 2010 14:50:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37EowEZ026815; Wed, 7 Apr 2010 14:50:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071450.o37EowEZ026815@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206352 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:50:58 -0000 Author: kib Date: Wed Apr 7 14:50:58 2010 New Revision: 206352 URL: http://svn.freebsd.org/changeset/base/206352 Log: MFC r205326: Convert aio syscall registration to SYSCALL_INIT_HELPER. Modified: stable/8/sys/kern/vfs_aio.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/kern/vfs_aio.c ============================================================================== --- stable/8/sys/kern/vfs_aio.c Wed Apr 7 14:49:35 2010 (r206351) +++ stable/8/sys/kern/vfs_aio.c Wed Apr 7 14:50:58 2010 (r206352) @@ -334,7 +334,7 @@ static TAILQ_HEAD(,aiocblist) aio_jobs; static struct unrhdr *aiod_unr; void aio_init_aioinfo(struct proc *p); -static void aio_onceonly(void); +static int aio_onceonly(void); static int aio_free_entry(struct aiocblist *aiocbe); static void aio_process(struct aiocblist *aiocbe); static int aio_newproc(int *); @@ -411,18 +411,47 @@ static moduledata_t aio_mod = { NULL }; -SYSCALL_MODULE_HELPER(aio_cancel); -SYSCALL_MODULE_HELPER(aio_error); -SYSCALL_MODULE_HELPER(aio_fsync); -SYSCALL_MODULE_HELPER(aio_read); -SYSCALL_MODULE_HELPER(aio_return); -SYSCALL_MODULE_HELPER(aio_suspend); -SYSCALL_MODULE_HELPER(aio_waitcomplete); -SYSCALL_MODULE_HELPER(aio_write); -SYSCALL_MODULE_HELPER(lio_listio); -SYSCALL_MODULE_HELPER(oaio_read); -SYSCALL_MODULE_HELPER(oaio_write); -SYSCALL_MODULE_HELPER(olio_listio); +static struct syscall_helper_data aio_syscalls[] = { + SYSCALL_INIT_HELPER(aio_cancel), + SYSCALL_INIT_HELPER(aio_error), + SYSCALL_INIT_HELPER(aio_fsync), + SYSCALL_INIT_HELPER(aio_read), + SYSCALL_INIT_HELPER(aio_return), + SYSCALL_INIT_HELPER(aio_suspend), + SYSCALL_INIT_HELPER(aio_waitcomplete), + SYSCALL_INIT_HELPER(aio_write), + SYSCALL_INIT_HELPER(lio_listio), + SYSCALL_INIT_HELPER(oaio_read), + SYSCALL_INIT_HELPER(oaio_write), + SYSCALL_INIT_HELPER(olio_listio), + SYSCALL_INIT_LAST +}; + +#ifdef COMPAT_FREEBSD32 +#include +#include +#include +#include +#include +#include +#include + +static struct syscall_helper_data aio32_syscalls[] = { + SYSCALL32_INIT_HELPER(freebsd32_aio_return), + SYSCALL32_INIT_HELPER(freebsd32_aio_suspend), + SYSCALL32_INIT_HELPER(freebsd32_aio_cancel), + SYSCALL32_INIT_HELPER(freebsd32_aio_error), + SYSCALL32_INIT_HELPER(freebsd32_aio_fsync), + SYSCALL32_INIT_HELPER(freebsd32_aio_read), + SYSCALL32_INIT_HELPER(freebsd32_aio_write), + SYSCALL32_INIT_HELPER(freebsd32_aio_waitcomplete), + SYSCALL32_INIT_HELPER(freebsd32_lio_listio), + SYSCALL32_INIT_HELPER(freebsd32_oaio_read), + SYSCALL32_INIT_HELPER(freebsd32_oaio_write), + SYSCALL32_INIT_HELPER(freebsd32_olio_listio), + SYSCALL_INIT_LAST +}; +#endif DECLARE_MODULE(aio, aio_mod, SI_SUB_VFS, SI_ORDER_ANY); @@ -431,9 +460,10 @@ MODULE_VERSION(aio, 1); /* * Startup initialization */ -static void +static int aio_onceonly(void) { + int error; /* XXX: should probably just use so->callback */ aio_swake = &aio_swake_cb; @@ -466,6 +496,16 @@ aio_onceonly(void) p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, AIO_LISTIO_MAX); p31b_setcfg(CTL_P1003_1B_AIO_MAX, MAX_AIO_QUEUE); p31b_setcfg(CTL_P1003_1B_AIO_PRIO_DELTA_MAX, 0); + + error = syscall_helper_register(aio_syscalls); + if (error) + return (error); +#ifdef COMPAT_FREEBSD32 + error = syscall32_helper_register(aio32_syscalls); + if (error) + return (error); +#endif + return (0); } /* @@ -487,6 +527,11 @@ aio_unload(void) if (!unloadable) return (EOPNOTSUPP); +#ifdef COMPAT_FREEBSD32 + syscall32_helper_unregister(aio32_syscalls); +#endif + syscall_helper_unregister(aio_syscalls); + error = kqueue_del_filteropts(EVFILT_AIO); if (error) return error; @@ -2525,13 +2570,6 @@ filt_lio(struct knote *kn, long hint) } #ifdef COMPAT_FREEBSD32 -#include -#include -#include -#include -#include -#include -#include struct __aiocb_private32 { int32_t status; @@ -2940,16 +2978,4 @@ freebsd32_lio_listio(struct thread *td, return (error); } -SYSCALL32_MODULE_HELPER(freebsd32_aio_return); -SYSCALL32_MODULE_HELPER(freebsd32_aio_suspend); -SYSCALL32_MODULE_HELPER(freebsd32_aio_cancel); -SYSCALL32_MODULE_HELPER(freebsd32_aio_error); -SYSCALL32_MODULE_HELPER(freebsd32_aio_fsync); -SYSCALL32_MODULE_HELPER(freebsd32_aio_read); -SYSCALL32_MODULE_HELPER(freebsd32_aio_write); -SYSCALL32_MODULE_HELPER(freebsd32_aio_waitcomplete); -SYSCALL32_MODULE_HELPER(freebsd32_lio_listio); -SYSCALL32_MODULE_HELPER(freebsd32_oaio_read); -SYSCALL32_MODULE_HELPER(freebsd32_oaio_write); -SYSCALL32_MODULE_HELPER(freebsd32_olio_listio); #endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:52:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5116A1065672; Wed, 7 Apr 2010 14:52:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40E678FC14; Wed, 7 Apr 2010 14:52:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37Eqhu2027268; Wed, 7 Apr 2010 14:52:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37EqhYa027266; Wed, 7 Apr 2010 14:52:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071452.o37EqhYa027266@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206353 - stable/8/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:52:43 -0000 Author: kib Date: Wed Apr 7 14:52:42 2010 New Revision: 206353 URL: http://svn.freebsd.org/changeset/base/206353 Log: MFC r205327: Remove empty line. Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.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/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:50:58 2010 (r206352) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 7 14:52:42 2010 (r206353) @@ -1400,7 +1400,6 @@ freebsd4_freebsd32_fhstatfs(struct threa } #endif - int freebsd32_pread(struct thread *td, struct freebsd32_pread_args *uap) { From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:53:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7146D1065674; Wed, 7 Apr 2010 14:53:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 601E58FC16; Wed, 7 Apr 2010 14:53:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37ErnYu027542; Wed, 7 Apr 2010 14:53:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37ErnTi027537; Wed, 7 Apr 2010 14:53:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004071453.o37ErnTi027537@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Apr 2010 14:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206354 - stable/8/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:53:49 -0000 Author: kib Date: Wed Apr 7 14:53:49 2010 New Revision: 206354 URL: http://svn.freebsd.org/changeset/base/206354 Log: Regen. Modified: stable/8/sys/compat/freebsd32/freebsd32_proto.h stable/8/sys/compat/freebsd32/freebsd32_syscall.h stable/8/sys/compat/freebsd32/freebsd32_syscalls.c stable/8/sys/compat/freebsd32/freebsd32_sysent.c Modified: stable/8/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_proto.h Wed Apr 7 14:52:42 2010 (r206353) +++ stable/8/sys/compat/freebsd32/freebsd32_proto.h Wed Apr 7 14:53:49 2010 (r206354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206336 2010-04-07 02:24:41Z nwhitehorn + * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206351 2010-04-07 14:49:35Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -306,6 +306,17 @@ struct freebsd32_sendfile_args { char sbytes_l_[PADL_(off_t *)]; off_t * sbytes; char sbytes_r_[PADR_(off_t *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; +struct freebsd32_ksem_init_args { + char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; +}; +struct freebsd32_ksem_open_args { + char idp_l_[PADL_(semid_t *)]; semid_t * idp; char idp_r_[PADR_(semid_t *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; + char oflag_l_[PADL_(int)]; int oflag; char oflag_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; + char value_l_[PADL_(unsigned int)]; unsigned int value; char value_r_[PADR_(unsigned int)]; +}; struct freebsd32_sigaction_args { char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; char act_l_[PADL_(struct sigaction32 *)]; struct sigaction32 * act; char act_r_[PADR_(struct sigaction32 *)]; @@ -330,6 +341,10 @@ struct freebsd32_umtx_lock_args { struct freebsd32_umtx_unlock_args { char umtx_l_[PADL_(struct umtx *)]; struct umtx * umtx; char umtx_r_[PADR_(struct umtx *)]; }; +struct freebsd32_ksem_timedwait_args { + char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; + char abstime_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abstime; char abstime_r_[PADR_(const struct timespec32 *)]; +}; struct freebsd32_thr_suspend_args { char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; @@ -344,6 +359,31 @@ struct freebsd32_thr_new_args { char param_l_[PADL_(struct thr_param32 *)]; struct thr_param32 * param; char param_r_[PADR_(struct thr_param32 *)]; char param_size_l_[PADL_(int)]; int param_size; char param_size_r_[PADR_(int)]; }; +struct freebsd32_kmq_open_args { + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; + char attr_l_[PADL_(const struct mq_attr32 *)]; const struct mq_attr32 * attr; char attr_r_[PADR_(const struct mq_attr32 *)]; +}; +struct freebsd32_kmq_setattr_args { + char mqd_l_[PADL_(int)]; int mqd; char mqd_r_[PADR_(int)]; + char attr_l_[PADL_(const struct mq_attr32 *)]; const struct mq_attr32 * attr; char attr_r_[PADR_(const struct mq_attr32 *)]; + char oattr_l_[PADL_(struct mq_attr32 *)]; struct mq_attr32 * oattr; char oattr_r_[PADR_(struct mq_attr32 *)]; +}; +struct freebsd32_kmq_timedreceive_args { + char mqd_l_[PADL_(int)]; int mqd; char mqd_r_[PADR_(int)]; + char msg_ptr_l_[PADL_(char *)]; char * msg_ptr; char msg_ptr_r_[PADR_(char *)]; + char msg_len_l_[PADL_(size_t)]; size_t msg_len; char msg_len_r_[PADR_(size_t)]; + char msg_prio_l_[PADL_(unsigned *)]; unsigned * msg_prio; char msg_prio_r_[PADR_(unsigned *)]; + char abs_timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abs_timeout; char abs_timeout_r_[PADR_(const struct timespec32 *)]; +}; +struct freebsd32_kmq_timedsend_args { + char mqd_l_[PADL_(int)]; int mqd; char mqd_r_[PADR_(int)]; + char msg_ptr_l_[PADL_(const char *)]; const char * msg_ptr; char msg_ptr_r_[PADR_(const char *)]; + char msg_len_l_[PADL_(size_t)]; size_t msg_len; char msg_len_r_[PADR_(size_t)]; + char msg_prio_l_[PADL_(unsigned)]; unsigned msg_prio; char msg_prio_r_[PADR_(unsigned)]; + char abs_timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * abs_timeout; char abs_timeout_r_[PADR_(const struct timespec32 *)]; +}; struct freebsd32_aio_fsync_args { char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; @@ -581,6 +621,8 @@ int freebsd32_aio_waitcomplete(struct th int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *); int freebsd32_nmount(struct thread *, struct freebsd32_nmount_args *); int freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *); +int freebsd32_ksem_init(struct thread *, struct freebsd32_ksem_init_args *); +int freebsd32_ksem_open(struct thread *, struct freebsd32_ksem_open_args *); int freebsd32_sigaction(struct thread *, struct freebsd32_sigaction_args *); int freebsd32_sigreturn(struct thread *, struct freebsd32_sigreturn_args *); int freebsd32_getcontext(struct thread *, struct freebsd32_getcontext_args *); @@ -588,9 +630,14 @@ int freebsd32_setcontext(struct thread * int freebsd32_swapcontext(struct thread *, struct freebsd32_swapcontext_args *); int freebsd32_umtx_lock(struct thread *, struct freebsd32_umtx_lock_args *); int freebsd32_umtx_unlock(struct thread *, struct freebsd32_umtx_unlock_args *); +int freebsd32_ksem_timedwait(struct thread *, struct freebsd32_ksem_timedwait_args *); int freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_args *); int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); +int freebsd32_kmq_open(struct thread *, struct freebsd32_kmq_open_args *); +int freebsd32_kmq_setattr(struct thread *, struct freebsd32_kmq_setattr_args *); +int freebsd32_kmq_timedreceive(struct thread *, struct freebsd32_kmq_timedreceive_args *); +int freebsd32_kmq_timedsend(struct thread *, struct freebsd32_kmq_timedsend_args *); int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *); #ifdef PAD64_REQUIRED int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); @@ -909,6 +956,8 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_kevent AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_nmount AUE_NMOUNT #define FREEBSD32_SYS_AUE_freebsd32_sendfile AUE_SENDFILE +#define FREEBSD32_SYS_AUE_freebsd32_ksem_init AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ksem_open AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_sigaction AUE_SIGACTION #define FREEBSD32_SYS_AUE_freebsd32_sigreturn AUE_SIGRETURN #define FREEBSD32_SYS_AUE_freebsd32_getcontext AUE_NULL @@ -916,9 +965,14 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_swapcontext AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_lock AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_unlock AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_ksem_timedwait AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_new AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_open AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_setattr AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_timedreceive AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_kmq_timedsend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_aio_fsync AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD #define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE Modified: stable/8/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_syscall.h Wed Apr 7 14:52:42 2010 (r206353) +++ stable/8/sys/compat/freebsd32/freebsd32_syscall.h Wed Apr 7 14:53:49 2010 (r206354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206336 2010-04-07 02:24:41Z nwhitehorn + * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206351 2010-04-07 14:49:35Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -303,6 +303,15 @@ #define FREEBSD32_SYS_statfs 396 #define FREEBSD32_SYS_fstatfs 397 #define FREEBSD32_SYS_fhstatfs 398 +#define FREEBSD32_SYS_ksem_close 400 +#define FREEBSD32_SYS_ksem_post 401 +#define FREEBSD32_SYS_ksem_wait 402 +#define FREEBSD32_SYS_ksem_trywait 403 +#define FREEBSD32_SYS_freebsd32_ksem_init 404 +#define FREEBSD32_SYS_freebsd32_ksem_open 405 +#define FREEBSD32_SYS_ksem_unlink 406 +#define FREEBSD32_SYS_ksem_getvalue 407 +#define FREEBSD32_SYS_ksem_destroy 408 #define FREEBSD32_SYS_extattr_set_link 412 #define FREEBSD32_SYS_extattr_get_link 413 #define FREEBSD32_SYS_extattr_delete_link 414 @@ -325,6 +334,7 @@ #define FREEBSD32_SYS_extattr_list_fd 437 #define FREEBSD32_SYS_extattr_list_file 438 #define FREEBSD32_SYS_extattr_list_link 439 +#define FREEBSD32_SYS_freebsd32_ksem_timedwait 441 #define FREEBSD32_SYS_freebsd32_thr_suspend 442 #define FREEBSD32_SYS_thr_wake 443 #define FREEBSD32_SYS_kldunloadf 444 @@ -340,6 +350,12 @@ #define FREEBSD32_SYS_freebsd32_umtx_op 454 #define FREEBSD32_SYS_freebsd32_thr_new 455 #define FREEBSD32_SYS_sigqueue 456 +#define FREEBSD32_SYS_freebsd32_kmq_open 457 +#define FREEBSD32_SYS_freebsd32_kmq_setattr 458 +#define FREEBSD32_SYS_freebsd32_kmq_timedreceive 459 +#define FREEBSD32_SYS_freebsd32_kmq_timedsend 460 +#define FREEBSD32_SYS_kmq_notify 461 +#define FREEBSD32_SYS_kmq_unlink 462 #define FREEBSD32_SYS_abort2 463 #define FREEBSD32_SYS_thr_set_name 464 #define FREEBSD32_SYS_freebsd32_aio_fsync 465 Modified: stable/8/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_syscalls.c Wed Apr 7 14:52:42 2010 (r206353) +++ stable/8/sys/compat/freebsd32/freebsd32_syscalls.c Wed Apr 7 14:53:49 2010 (r206354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206336 2010-04-07 02:24:41Z nwhitehorn + * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206351 2010-04-07 14:49:35Z kib */ const char *freebsd32_syscallnames[] = { @@ -410,15 +410,15 @@ const char *freebsd32_syscallnames[] = { "fstatfs", /* 397 = fstatfs */ "fhstatfs", /* 398 = fhstatfs */ "#399", /* 399 = nosys */ - "#400", /* 400 = ksem_close */ - "#401", /* 401 = ksem_post */ - "#402", /* 402 = ksem_wait */ - "#403", /* 403 = ksem_trywait */ - "#404", /* 404 = ksem_init */ - "#405", /* 405 = ksem_open */ - "#406", /* 406 = ksem_unlink */ - "#407", /* 407 = ksem_getvalue */ - "#408", /* 408 = ksem_destroy */ + "ksem_close", /* 400 = ksem_close */ + "ksem_post", /* 401 = ksem_post */ + "ksem_wait", /* 402 = ksem_wait */ + "ksem_trywait", /* 403 = ksem_trywait */ + "freebsd32_ksem_init", /* 404 = freebsd32_ksem_init */ + "freebsd32_ksem_open", /* 405 = freebsd32_ksem_open */ + "ksem_unlink", /* 406 = ksem_unlink */ + "ksem_getvalue", /* 407 = ksem_getvalue */ + "ksem_destroy", /* 408 = ksem_destroy */ "#409", /* 409 = __mac_get_pid */ "#410", /* 410 = __mac_get_link */ "#411", /* 411 = __mac_set_link */ @@ -451,7 +451,7 @@ const char *freebsd32_syscallnames[] = { "extattr_list_file", /* 438 = extattr_list_file */ "extattr_list_link", /* 439 = extattr_list_link */ "#440", /* 440 = kse_switchin */ - "#441", /* 441 = ksem_timedwait */ + "freebsd32_ksem_timedwait", /* 441 = freebsd32_ksem_timedwait */ "freebsd32_thr_suspend", /* 442 = freebsd32_thr_suspend */ "thr_wake", /* 443 = thr_wake */ "kldunloadf", /* 444 = kldunloadf */ @@ -467,12 +467,12 @@ const char *freebsd32_syscallnames[] = { "freebsd32_umtx_op", /* 454 = freebsd32_umtx_op */ "freebsd32_thr_new", /* 455 = freebsd32_thr_new */ "sigqueue", /* 456 = sigqueue */ - "#457", /* 457 = kmq_open */ - "#458", /* 458 = kmq_setattr */ - "#459", /* 459 = kmq_timedreceive */ - "#460", /* 460 = kmq_timedsend */ - "#461", /* 461 = kmq_notify */ - "#462", /* 462 = kmq_unlink */ + "freebsd32_kmq_open", /* 457 = freebsd32_kmq_open */ + "freebsd32_kmq_setattr", /* 458 = freebsd32_kmq_setattr */ + "freebsd32_kmq_timedreceive", /* 459 = freebsd32_kmq_timedreceive */ + "freebsd32_kmq_timedsend", /* 460 = freebsd32_kmq_timedsend */ + "kmq_notify", /* 461 = kmq_notify */ + "kmq_unlink", /* 462 = kmq_unlink */ "abort2", /* 463 = abort2 */ "thr_set_name", /* 464 = thr_set_name */ "freebsd32_aio_fsync", /* 465 = freebsd32_aio_fsync */ Modified: stable/8/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_sysent.c Wed Apr 7 14:52:42 2010 (r206353) +++ stable/8/sys/compat/freebsd32/freebsd32_sysent.c Wed Apr 7 14:53:49 2010 (r206354) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206336 2010-04-07 02:24:41Z nwhitehorn + * created from FreeBSD: stable/8/sys/compat/freebsd32/syscalls.master 206351 2010-04-07 14:49:35Z kib */ #include "opt_compat.h" @@ -216,9 +216,9 @@ struct sysent freebsd32_sysent[] = { { AS(rtprio_args), (sy_call_t *)rtprio, AUE_RTPRIO, NULL, 0, 0, 0 }, /* 166 = rtprio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 167 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 168 = nosys */ - { AS(freebsd32_semsys_args), (sy_call_t *)freebsd32_semsys, AUE_SEMSYS, NULL, 0, 0, 0 }, /* 169 = freebsd32_semsys */ - { AS(freebsd32_msgsys_args), (sy_call_t *)freebsd32_msgsys, AUE_MSGSYS, NULL, 0, 0, 0 }, /* 170 = freebsd32_msgsys */ - { AS(freebsd32_shmsys_args), (sy_call_t *)freebsd32_shmsys, AUE_SHMSYS, NULL, 0, 0, 0 }, /* 171 = freebsd32_shmsys */ + { AS(freebsd32_semsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 169 = freebsd32_semsys */ + { AS(freebsd32_msgsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 170 = freebsd32_msgsys */ + { AS(freebsd32_shmsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 171 = freebsd32_shmsys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 172 = nosys */ { compat6(AS(freebsd6_freebsd32_pread_args),freebsd32_pread), AUE_PREAD, NULL, 0, 0, 0 }, /* 173 = freebsd6 freebsd32_pread */ { compat6(AS(freebsd6_freebsd32_pwrite_args),freebsd32_pwrite), AUE_PWRITE, NULL, 0, 0, 0 }, /* 174 = freebsd6 freebsd32_pwrite */ @@ -267,18 +267,18 @@ struct sysent freebsd32_sysent[] = { { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 217 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 218 = lkmnosys */ { AS(nosys_args), (sy_call_t *)lkmnosys, AUE_NULL, NULL, 0, 0, 0 }, /* 219 = lkmnosys */ - { compat7(AS(freebsd7_freebsd32_semctl_args),freebsd32_semctl), AUE_SEMCTL, NULL, 0, 0, 0 }, /* 220 = freebsd7 freebsd32_semctl */ - { AS(semget_args), (sy_call_t *)semget, AUE_SEMGET, NULL, 0, 0, 0 }, /* 221 = semget */ - { AS(semop_args), (sy_call_t *)semop, AUE_SEMOP, NULL, 0, 0, 0 }, /* 222 = semop */ + { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 220 = freebsd7 freebsd32_semctl */ + { AS(semget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 221 = semget */ + { AS(semop_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 222 = semop */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 223 = semconfig */ - { compat7(AS(freebsd7_freebsd32_msgctl_args),freebsd32_msgctl), AUE_MSGCTL, NULL, 0, 0, 0 }, /* 224 = freebsd7 freebsd32_msgctl */ - { AS(msgget_args), (sy_call_t *)msgget, AUE_MSGGET, NULL, 0, 0, 0 }, /* 225 = msgget */ - { AS(freebsd32_msgsnd_args), (sy_call_t *)freebsd32_msgsnd, AUE_MSGSND, NULL, 0, 0, 0 }, /* 226 = freebsd32_msgsnd */ - { AS(freebsd32_msgrcv_args), (sy_call_t *)freebsd32_msgrcv, AUE_MSGRCV, NULL, 0, 0, 0 }, /* 227 = freebsd32_msgrcv */ - { AS(shmat_args), (sy_call_t *)shmat, AUE_SHMAT, NULL, 0, 0, 0 }, /* 228 = shmat */ - { compat7(AS(freebsd7_freebsd32_shmctl_args),freebsd32_shmctl), AUE_SHMCTL, NULL, 0, 0, 0 }, /* 229 = freebsd7 freebsd32_shmctl */ - { AS(shmdt_args), (sy_call_t *)shmdt, AUE_SHMDT, NULL, 0, 0, 0 }, /* 230 = shmdt */ - { AS(shmget_args), (sy_call_t *)shmget, AUE_SHMGET, NULL, 0, 0, 0 }, /* 231 = shmget */ + { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 224 = freebsd7 freebsd32_msgctl */ + { AS(msgget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 225 = msgget */ + { AS(freebsd32_msgsnd_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 226 = freebsd32_msgsnd */ + { AS(freebsd32_msgrcv_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 227 = freebsd32_msgrcv */ + { AS(shmat_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 228 = shmat */ + { 0, (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 229 = freebsd7 freebsd32_shmctl */ + { AS(shmdt_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 230 = shmdt */ + { AS(shmget_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 231 = shmget */ { AS(freebsd32_clock_gettime_args), (sy_call_t *)freebsd32_clock_gettime, AUE_NULL, NULL, 0, 0, 0 }, /* 232 = freebsd32_clock_gettime */ { AS(freebsd32_clock_settime_args), (sy_call_t *)freebsd32_clock_settime, AUE_CLOCK_SETTIME, NULL, 0, 0, 0 }, /* 233 = freebsd32_clock_settime */ { AS(freebsd32_clock_getres_args), (sy_call_t *)freebsd32_clock_getres, AUE_NULL, NULL, 0, 0, 0 }, /* 234 = freebsd32_clock_getres */ @@ -447,15 +447,15 @@ struct sysent freebsd32_sysent[] = { { AS(fstatfs_args), (sy_call_t *)fstatfs, AUE_FSTATFS, NULL, 0, 0, 0 }, /* 397 = fstatfs */ { AS(fhstatfs_args), (sy_call_t *)fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0 }, /* 398 = fhstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 399 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 400 = ksem_close */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 401 = ksem_post */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 402 = ksem_wait */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 403 = ksem_trywait */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 404 = ksem_init */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 405 = ksem_open */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 406 = ksem_unlink */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 407 = ksem_getvalue */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 408 = ksem_destroy */ + { AS(ksem_close_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 400 = ksem_close */ + { AS(ksem_post_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 401 = ksem_post */ + { AS(ksem_wait_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 402 = ksem_wait */ + { AS(ksem_trywait_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 403 = ksem_trywait */ + { AS(freebsd32_ksem_init_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 404 = freebsd32_ksem_init */ + { AS(freebsd32_ksem_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 405 = freebsd32_ksem_open */ + { AS(ksem_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 406 = ksem_unlink */ + { AS(ksem_getvalue_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 407 = ksem_getvalue */ + { AS(ksem_destroy_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 408 = ksem_destroy */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 409 = __mac_get_pid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 410 = __mac_get_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 411 = __mac_set_link */ @@ -488,7 +488,7 @@ struct sysent freebsd32_sysent[] = { { AS(extattr_list_file_args), (sy_call_t *)extattr_list_file, AUE_EXTATTR_LIST_FILE, NULL, 0, 0, 0 }, /* 438 = extattr_list_file */ { AS(extattr_list_link_args), (sy_call_t *)extattr_list_link, AUE_EXTATTR_LIST_LINK, NULL, 0, 0, 0 }, /* 439 = extattr_list_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 440 = kse_switchin */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 441 = ksem_timedwait */ + { AS(freebsd32_ksem_timedwait_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 441 = freebsd32_ksem_timedwait */ { AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE_NULL, NULL, 0, 0, 0 }, /* 442 = freebsd32_thr_suspend */ { AS(thr_wake_args), (sy_call_t *)thr_wake, AUE_NULL, NULL, 0, 0, 0 }, /* 443 = thr_wake */ { AS(kldunloadf_args), (sy_call_t *)kldunloadf, AUE_MODUNLOAD, NULL, 0, 0, 0 }, /* 444 = kldunloadf */ @@ -504,12 +504,12 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, 0 }, /* 454 = freebsd32_umtx_op */ { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, 0 }, /* 455 = freebsd32_thr_new */ { AS(sigqueue_args), (sy_call_t *)sigqueue, AUE_NULL, NULL, 0, 0, 0 }, /* 456 = sigqueue */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 457 = kmq_open */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 458 = kmq_setattr */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 459 = kmq_timedreceive */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 460 = kmq_timedsend */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 461 = kmq_notify */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 462 = kmq_unlink */ + { AS(freebsd32_kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 457 = freebsd32_kmq_open */ + { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 458 = freebsd32_kmq_setattr */ + { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 459 = freebsd32_kmq_timedreceive */ + { AS(freebsd32_kmq_timedsend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 460 = freebsd32_kmq_timedsend */ + { AS(kmq_notify_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 461 = kmq_notify */ + { AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 462 = kmq_unlink */ { AS(abort2_args), (sy_call_t *)abort2, AUE_NULL, NULL, 0, 0, 0 }, /* 463 = abort2 */ { AS(thr_set_name_args), (sy_call_t *)thr_set_name, AUE_NULL, NULL, 0, 0, 0 }, /* 464 = thr_set_name */ { AS(freebsd32_aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 465 = freebsd32_aio_fsync */ @@ -570,9 +570,9 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_jail_set_args), (sy_call_t *)freebsd32_jail_set, AUE_NULL, NULL, 0, 0, 0 }, /* 507 = freebsd32_jail_set */ { AS(jail_remove_args), (sy_call_t *)jail_remove, AUE_NULL, NULL, 0, 0, 0 }, /* 508 = jail_remove */ { AS(closefrom_args), (sy_call_t *)closefrom, AUE_CLOSEFROM, NULL, 0, 0, 0 }, /* 509 = closefrom */ - { AS(freebsd32_semctl_args), (sy_call_t *)freebsd32_semctl, AUE_SEMCTL, NULL, 0, 0, 0 }, /* 510 = freebsd32_semctl */ - { AS(freebsd32_msgctl_args), (sy_call_t *)freebsd32_msgctl, AUE_MSGCTL, NULL, 0, 0, 0 }, /* 511 = freebsd32_msgctl */ - { AS(freebsd32_shmctl_args), (sy_call_t *)freebsd32_shmctl, AUE_SHMCTL, NULL, 0, 0, 0 }, /* 512 = freebsd32_shmctl */ + { AS(freebsd32_semctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 510 = freebsd32_semctl */ + { AS(freebsd32_msgctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 511 = freebsd32_msgctl */ + { AS(freebsd32_shmctl_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0 }, /* 512 = freebsd32_shmctl */ { AS(lpathconf_args), (sy_call_t *)lpathconf, AUE_LPATHCONF, NULL, 0, 0, 0 }, /* 513 = lpathconf */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 514 = cap_new */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 }, /* 515 = cap_getrights */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 14:59:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DE181065672; Wed, 7 Apr 2010 14:59:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D0898FC0C; Wed, 7 Apr 2010 14:59:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37Ex8vg028750; Wed, 7 Apr 2010 14:59:08 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37Ex8Eb028747; Wed, 7 Apr 2010 14:59:08 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071459.o37Ex8Eb028747@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 14:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206355 - stable/8/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 14:59:08 -0000 Author: rpaulo Date: Wed Apr 7 14:59:07 2010 New Revision: 206355 URL: http://svn.freebsd.org/changeset/base/206355 Log: MFC r205986: Constify vap argument of ieee80211_{note,discard}* functions. Modified: stable/8/sys/net80211/ieee80211_input.c stable/8/sys/net80211/ieee80211_var.h 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/net80211/ieee80211_input.c ============================================================================== --- stable/8/sys/net80211/ieee80211_input.c Wed Apr 7 14:53:49 2010 (r206354) +++ stable/8/sys/net80211/ieee80211_input.c Wed Apr 7 14:59:07 2010 (r206355) @@ -734,7 +734,8 @@ ieee80211_ssid_mismatch(struct ieee80211 * Return the bssid of a frame. */ static const uint8_t * -ieee80211_getbssid(struct ieee80211vap *vap, const struct ieee80211_frame *wh) +ieee80211_getbssid(const struct ieee80211vap *vap, + const struct ieee80211_frame *wh) { if (vap->iv_opmode == IEEE80211_M_STA) return wh->i_addr2; @@ -748,7 +749,7 @@ ieee80211_getbssid(struct ieee80211vap * #include void -ieee80211_note(struct ieee80211vap *vap, const char *fmt, ...) +ieee80211_note(const struct ieee80211vap *vap, const char *fmt, ...) { char buf[128]; /* XXX */ va_list ap; @@ -761,7 +762,7 @@ ieee80211_note(struct ieee80211vap *vap, } void -ieee80211_note_frame(struct ieee80211vap *vap, +ieee80211_note_frame(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *fmt, ...) { @@ -776,7 +777,7 @@ ieee80211_note_frame(struct ieee80211vap } void -ieee80211_note_mac(struct ieee80211vap *vap, +ieee80211_note_mac(const struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], const char *fmt, ...) { @@ -790,7 +791,7 @@ ieee80211_note_mac(struct ieee80211vap * } void -ieee80211_discard_frame(struct ieee80211vap *vap, +ieee80211_discard_frame(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *type, const char *fmt, ...) { @@ -811,7 +812,7 @@ ieee80211_discard_frame(struct ieee80211 } void -ieee80211_discard_ie(struct ieee80211vap *vap, +ieee80211_discard_ie(const struct ieee80211vap *vap, const struct ieee80211_frame *wh, const char *type, const char *fmt, ...) { @@ -830,7 +831,7 @@ ieee80211_discard_ie(struct ieee80211vap } void -ieee80211_discard_mac(struct ieee80211vap *vap, +ieee80211_discard_mac(const struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], const char *type, const char *fmt, ...) { Modified: stable/8/sys/net80211/ieee80211_var.h ============================================================================== --- stable/8/sys/net80211/ieee80211_var.h Wed Apr 7 14:53:49 2010 (r206354) +++ stable/8/sys/net80211/ieee80211_var.h Wed Apr 7 14:59:07 2010 (r206355) @@ -848,10 +848,10 @@ ieee80211_htchanflags(const struct ieee8 if (ieee80211_msg(_vap, _m)) \ ieee80211_note_frame(_vap, _wh, _fmt, __VA_ARGS__); \ } while (0) -void ieee80211_note(struct ieee80211vap *, const char *, ...); -void ieee80211_note_mac(struct ieee80211vap *, +void ieee80211_note(const struct ieee80211vap *, const char *, ...); +void ieee80211_note_mac(const struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN], const char *, ...); -void ieee80211_note_frame(struct ieee80211vap *, +void ieee80211_note_frame(const struct ieee80211vap *, const struct ieee80211_frame *, const char *, ...); #define ieee80211_msg_debug(_vap) \ ((_vap)->iv_debug & IEEE80211_MSG_DEBUG) @@ -889,11 +889,11 @@ void ieee80211_note_frame(struct ieee802 ieee80211_discard_mac(_vap, _mac, _type, _fmt, __VA_ARGS__);\ } while (0) -void ieee80211_discard_frame(struct ieee80211vap *, +void ieee80211_discard_frame(const struct ieee80211vap *, const struct ieee80211_frame *, const char *type, const char *fmt, ...); -void ieee80211_discard_ie(struct ieee80211vap *, +void ieee80211_discard_ie(const struct ieee80211vap *, const struct ieee80211_frame *, const char *type, const char *fmt, ...); -void ieee80211_discard_mac(struct ieee80211vap *, +void ieee80211_discard_mac(const struct ieee80211vap *, const uint8_t mac[IEEE80211_ADDR_LEN], const char *type, const char *fmt, ...); #else From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 15:19:53 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34045106566B; Wed, 7 Apr 2010 15:19:53 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 240878FC17; Wed, 7 Apr 2010 15:19:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37FJr6h033418; Wed, 7 Apr 2010 15:19:53 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37FJr6x033416; Wed, 7 Apr 2010 15:19:53 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004071519.o37FJr6x033416@svn.freebsd.org> From: Rick Macklem Date: Wed, 7 Apr 2010 15:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206357 - stable/8/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 15:19:53 -0000 Author: rmacklem Date: Wed Apr 7 15:19:52 2010 New Revision: 206357 URL: http://svn.freebsd.org/changeset/base/206357 Log: MFC: r205572 Fix the experimental NFS subsystem so that it uses the correct preprocessor macro name for not requiring strict data alignment. Modified: stable/8/sys/fs/nfs/nfs_commonport.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/fs/nfs/nfs_commonport.c ============================================================================== --- stable/8/sys/fs/nfs/nfs_commonport.c Wed Apr 7 15:09:35 2010 (r206356) +++ stable/8/sys/fs/nfs/nfs_commonport.c Wed Apr 7 15:19:52 2010 (r206357) @@ -117,7 +117,7 @@ struct mtx nfs_slock_mutex; /* local functions */ static int nfssvc_call(struct thread *, struct nfssvc_args *, struct ucred *); -#if defined(__i386__) +#ifdef __NO_STRICT_ALIGNMENT /* * These architectures don't need re-alignment, so just return. */ @@ -127,7 +127,7 @@ newnfs_realign(struct mbuf **pm) return; } -#else +#else /* !__NO_STRICT_ALIGNMENT */ /* * newnfs_realign: * @@ -185,7 +185,7 @@ newnfs_realign(struct mbuf **pm) pm = &m->m_next; } } -#endif /* !__i386__ */ +#endif /* __NO_STRICT_ALIGNMENT */ #ifdef notdef static void From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 15:29:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04516106566B; Wed, 7 Apr 2010 15:29:14 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E699F8FC0A; Wed, 7 Apr 2010 15:29:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37FTDrI035634; Wed, 7 Apr 2010 15:29:13 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37FTDi0035619; Wed, 7 Apr 2010 15:29:13 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071529.o37FTDi0035619@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 15:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206358 - in head/sys: conf dev/bwi dev/bwn dev/iwn dev/ral dev/usb/wlan dev/wpi modules/wlan net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 15:29:14 -0000 Author: rpaulo Date: Wed Apr 7 15:29:13 2010 New Revision: 206358 URL: http://svn.freebsd.org/changeset/base/206358 Log: net80211 rate control framework (net80211 ratectl). This framework allows drivers to abstract the rate control algorithm and just feed the framework with the usable parameters. The rate control framework will now deal with passing the parameters to the selected algorithm. Right now we have AMRR (the default) and RSSADAPT but there's no way to select one with ifconfig, yet. The objective is to have more rate control algorithms in the net80211 stack so all drivers[0] can use it. Ideally, we'll have the well-known sample rate control algorithm in the net80211 at some point so all drivers can use it (not just ath). [0] all drivers that do rate control in software, that is. Reviewed by: bschmidt, thompsa, weyongo MFC after: 1 months Added: head/sys/net80211/ieee80211_ratectl.c (contents, props changed) head/sys/net80211/ieee80211_ratectl.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/bwi/if_bwi.c head/sys/dev/bwi/if_bwivar.h head/sys/dev/bwn/if_bwn.c head/sys/dev/bwn/if_bwnvar.h head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnvar.h head/sys/dev/ral/rt2560.c head/sys/dev/ral/rt2560var.h head/sys/dev/ral/rt2661.c head/sys/dev/ral/rt2661var.h head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_rumvar.h head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_runvar.h head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_uralvar.h head/sys/dev/usb/wlan/if_urtw.c head/sys/dev/usb/wlan/if_zyd.c head/sys/dev/usb/wlan/if_zydreg.h head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h head/sys/modules/wlan/Makefile head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_amrr.c head/sys/net80211/ieee80211_amrr.h head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_rssadapt.c head/sys/net80211/ieee80211_rssadapt.h head/sys/net80211/ieee80211_var.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/conf/files Wed Apr 7 15:29:13 2010 (r206358) @@ -2380,6 +2380,7 @@ net80211/ieee80211_phy.c optional wlan net80211/ieee80211_power.c optional wlan net80211/ieee80211_proto.c optional wlan net80211/ieee80211_radiotap.c optional wlan +net80211/ieee80211_ratectl.c optional wlan net80211/ieee80211_regdomain.c optional wlan net80211/ieee80211_rssadapt.c optional wlan wlan_rssadapt net80211/ieee80211_scan.c optional wlan Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/bwi/if_bwi.c Wed Apr 7 15:29:13 2010 (r206358) @@ -64,8 +64,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include @@ -112,9 +112,6 @@ static void bwi_set_channel(struct ieee8 static void bwi_scan_end(struct ieee80211com *); static int bwi_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void bwi_updateslot(struct ifnet *); -static struct ieee80211_node *bwi_node_alloc(struct ieee80211vap *, - const uint8_t [IEEE80211_ADDR_LEN]); -static void bwi_newassoc(struct ieee80211_node *, int); static int bwi_media_change(struct ifnet *); static void bwi_calibrate(void *); @@ -525,7 +522,6 @@ bwi_attach(struct bwi_softc *sc) ic->ic_vap_delete = bwi_vap_delete; ic->ic_raw_xmit = bwi_raw_xmit; ic->ic_updateslot = bwi_updateslot; - ic->ic_node_alloc = bwi_node_alloc; ic->ic_scan_start = bwi_scan_start; ic->ic_scan_end = bwi_scan_end; ic->ic_set_channel = bwi_set_channel; @@ -621,10 +617,7 @@ bwi_vap_create(struct ieee80211com *ic, #if 0 vap->iv_update_beacon = bwi_beacon_update; #endif - ieee80211_amrr_init(&bvp->bv_amrr, vap, - IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, - IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, - 500 /*ms*/); + ieee80211_ratectl_init(vap); /* complete setup */ ieee80211_vap_attach(vap, bwi_media_change, ieee80211_media_status); @@ -637,7 +630,7 @@ bwi_vap_delete(struct ieee80211vap *vap) { struct bwi_vap *bvp = BWI_VAP(vap); - ieee80211_amrr_cleanup(&bvp->bv_amrr); + ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); free(bvp, M_80211_VAP); } @@ -1831,7 +1824,7 @@ bwi_newstate(struct ieee80211vap *vap, e #endif if (vap->iv_opmode == IEEE80211_M_STA) { /* fake a join to init the tx rate */ - bwi_newassoc(ni, 1); + ic->ic_newassoc(ni, 1); } callout_reset(&sc->sc_calib_ch, hz, bwi_calibrate, sc); @@ -1842,25 +1835,6 @@ back: return error; } -/* ARGUSED */ -static struct ieee80211_node * -bwi_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) -{ - struct bwi_node *bn; - - bn = malloc(sizeof(struct bwi_node), M_80211_NODE, M_NOWAIT | M_ZERO); - return bn != NULL ? &bn->ni : NULL; -} - -static void -bwi_newassoc(struct ieee80211_node *ni, int isnew) -{ - struct ieee80211vap *vap = ni->ni_vap; - - ieee80211_amrr_node_init(&BWI_VAP(vap)->bv_amrr, - &BWI_NODE(ni)->amn, ni); -} - static int bwi_media_change(struct ifnet *ifp) { @@ -3012,7 +2986,7 @@ bwi_encap(struct bwi_softc *sc, int idx, } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { rate = rate_fb = tp->ucastrate; } else { - rix = ieee80211_amrr_choose(ni, &BWI_NODE(ni)->amn); + rix = ieee80211_ratectl_rate(ni, NULL, pkt_len); rate = ni->ni_txrate; if (rix > 0) { @@ -3369,6 +3343,7 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ struct bwi_txbuf *tb; int ring_idx, buf_idx; struct ieee80211_node *ni; + struct ieee80211vap *vap; if (tx_id == 0) { if_printf(ifp, "%s: zero tx id\n", __func__); @@ -3393,8 +3368,8 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ bus_dmamap_unload(sc->sc_buf_dtag, tb->tb_dmap); ni = tb->tb_ni; + vap = ni->ni_vap; if (tb->tb_ni != NULL) { - struct bwi_node *bn = (struct bwi_node *) tb->tb_ni; const struct bwi_txbuf_hdr *hdr = mtod(tb->tb_mbuf, const struct bwi_txbuf_hdr *); @@ -3407,8 +3382,9 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ * well so to avoid over-aggressive downshifting we * treat any number of retries as "1". */ - ieee80211_amrr_tx_complete(&bn->amn, acked, - data_txcnt > 1); + ieee80211_ratectl_tx_complete(vap, ni, + (data_txcnt > 1) ? IEEE80211_RATECTL_TX_SUCCESS : + IEEE80211_RATECTL_TX_FAILURE, &acked, NULL); } /* Modified: head/sys/dev/bwi/if_bwivar.h ============================================================================== --- head/sys/dev/bwi/if_bwivar.h Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/bwi/if_bwivar.h Wed Apr 7 15:29:13 2010 (r206358) @@ -533,15 +533,8 @@ struct bwi_rx_radiotap_hdr { /* TODO: sq */ }; -struct bwi_node { - struct ieee80211_node ni; /* must be the first */ - struct ieee80211_amrr_node amn; -}; -#define BWI_NODE(ni) ((struct bwi_node *)(ni)) - struct bwi_vap { struct ieee80211vap bv_vap; - struct ieee80211_amrr bv_amrr; int (*bv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); }; Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/bwn/if_bwn.c Wed Apr 7 15:29:13 2010 (r206358) @@ -67,8 +67,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include #include @@ -180,18 +180,14 @@ static void bwn_addchannels(struct ieee8 const struct bwn_channelinfo *, int); static int bwn_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -static void bwn_newassoc(struct ieee80211_node *, int); static void bwn_updateslot(struct ifnet *); static void bwn_update_promisc(struct ifnet *); static void bwn_wme_init(struct bwn_mac *); static int bwn_wme_update(struct ieee80211com *); -static struct ieee80211_node *bwn_node_alloc(struct ieee80211vap *, - const uint8_t [IEEE80211_ADDR_LEN]); static void bwn_wme_clear(struct bwn_softc *); static void bwn_wme_load(struct bwn_mac *); static void bwn_wme_loadparams(struct bwn_mac *, const struct wmeParams *, uint16_t); -static void bwn_node_cleanup(struct ieee80211_node *); static void bwn_scan_start(struct ieee80211com *); static void bwn_scan_end(struct ieee80211com *); static void bwn_set_channel(struct ieee80211com *); @@ -1088,15 +1084,10 @@ bwn_attach_post(struct bwn_softc *sc) /* override default methods */ ic->ic_raw_xmit = bwn_raw_xmit; - ic->ic_newassoc = bwn_newassoc; ic->ic_updateslot = bwn_updateslot; ic->ic_update_promisc = bwn_update_promisc; ic->ic_wme.wme_update = bwn_wme_update; - ic->ic_node_alloc = bwn_node_alloc; - sc->sc_node_cleanup = ic->ic_node_cleanup; - ic->ic_node_cleanup = bwn_node_cleanup; - ic->ic_scan_start = bwn_scan_start; ic->ic_scan_end = bwn_scan_end; ic->ic_set_channel = bwn_set_channel; @@ -2772,20 +2763,6 @@ bwn_raw_xmit(struct ieee80211_node *ni, } /* - * Setup driver-specific state for a newly associated node. - * Note that we're called also on a re-associate, the isnew - * param tells us if this is the first time or not. - */ -static void -bwn_newassoc(struct ieee80211_node *ni, int isnew) -{ - struct ieee80211vap *vap = ni->ni_vap; - - ieee80211_amrr_node_init(&BWN_VAP(vap)->bv_amrr, - &BWN_NODE(ni)->bn_amn, ni); -} - -/* * Callback from the 802.11 layer to update the slot time * based on the current setting. We use it to notify the * firmware of ERP changes and the f/w takes care of things @@ -2857,32 +2834,6 @@ bwn_wme_update(struct ieee80211com *ic) return (0); } -static struct ieee80211_node * -bwn_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) -{ - struct ieee80211com *ic = vap->iv_ic; - struct bwn_softc *sc = ic->ic_ifp->if_softc; - const size_t space = sizeof(struct bwn_node); - struct bwn_node *bn; - - bn = malloc(space, M_80211_NODE, M_NOWAIT|M_ZERO); - if (bn == NULL) { - /* XXX stat+msg */ - return (NULL); - } - DPRINTF(sc, BWN_DEBUG_NODE, "%s: bn %p\n", __func__, bn); - return (&bn->bn_node); -} - -static void -bwn_node_cleanup(struct ieee80211_node *ni) -{ - struct ieee80211com *ic = ni->ni_ic; - struct bwn_softc *sc = ic->ic_ifp->if_softc; - - sc->sc_node_cleanup(ni); -} - static void bwn_scan_start(struct ieee80211com *ic) { @@ -3018,10 +2969,7 @@ bwn_vap_create(struct ieee80211com *ic, /* override max aid so sta's cannot assoc when we're out of sta id's */ vap->iv_max_aid = BWN_STAID_MAX; - ieee80211_amrr_init(&bvp->bv_amrr, vap, - IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, - IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, - 500 /*ms*/); + ieee80211_ratectl_init(vap); /* complete setup */ ieee80211_vap_attach(vap, ieee80211_media_change, @@ -3034,7 +2982,7 @@ bwn_vap_delete(struct ieee80211vap *vap) { struct bwn_vap *bvp = BWN_VAP(vap); - ieee80211_amrr_cleanup(&bvp->bv_amrr); + ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); free(bvp, M_80211_VAP); } @@ -9040,12 +8988,12 @@ bwn_handle_txeof(struct bwn_mac *mac, co struct bwn_dma_ring *dr; struct bwn_dmadesc_generic *desc; struct bwn_dmadesc_meta *meta; - struct bwn_node *bn; struct bwn_pio_txqueue *tq; struct bwn_pio_txpkt *tp = NULL; struct bwn_softc *sc = mac->mac_sc; struct bwn_stats *stats = &mac->mac_stats; struct ieee80211_node *ni; + struct ieee80211vap *vap; int slot; BWN_ASSERT_LOCKED(mac->mac_sc); @@ -9074,9 +9022,12 @@ bwn_handle_txeof(struct bwn_mac *mac, co dr->getdesc(dr, slot, &desc, &meta); if (meta->mt_islast) { ni = meta->mt_ni; - bn = (struct bwn_node *)ni; - ieee80211_amrr_tx_complete(&bn->bn_amn, - status->ack, 0); + vap = ni->ni_vap; + ieee80211_ratectl_tx_complete(vap, ni, + status->ack ? + IEEE80211_RATECTL_TX_SUCCESS : + IEEE80211_RATECTL_TX_FAILURE, + NULL, 0); break; } slot = bwn_dma_nextslot(dr, slot); @@ -9092,8 +9043,12 @@ bwn_handle_txeof(struct bwn_mac *mac, co return; } ni = tp->tp_ni; - bn = (struct bwn_node *)ni; - ieee80211_amrr_tx_complete(&bn->bn_amn, status->ack, 0); + vap = ni->ni_vap; + ieee80211_ratectl_tx_complete(vap, ni, + status->ack ? + IEEE80211_RATECTL_TX_SUCCESS : + IEEE80211_RATECTL_TX_FAILURE, + NULL, 0); } bwn_pio_handle_txeof(mac, status); } @@ -9678,7 +9633,7 @@ bwn_set_txhdr(struct bwn_mac *mac, struc else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) rate = rate_fb = tp->ucastrate; else { - rix = ieee80211_amrr_choose(ni, &BWN_NODE(ni)->bn_amn); + rix = ieee80211_ratectl_rate(ni, NULL, 0); rate = ni->ni_txrate; if (rix > 0) Modified: head/sys/dev/bwn/if_bwnvar.h ============================================================================== --- head/sys/dev/bwn/if_bwnvar.h Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/bwn/if_bwnvar.h Wed Apr 7 15:29:13 2010 (r206358) @@ -883,18 +883,11 @@ struct bwn_mac { TAILQ_ENTRY(bwn_mac) mac_list; }; -struct bwn_node { - struct ieee80211_node bn_node; /* must be the first */ - struct ieee80211_amrr_node bn_amn; -}; -#define BWN_NODE(ni) ((struct bwn_node *)(ni)) - /* * Driver-specific vap state. */ struct bwn_vap { struct ieee80211vap bv_vap; /* base class */ - struct ieee80211_amrr bv_amrr; int (*bv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); }; Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/iwn/if_iwn.c Wed Apr 7 15:29:13 2010 (r206358) @@ -65,9 +65,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include +#include #include #include @@ -755,11 +755,7 @@ iwn_vap_create(struct ieee80211com *ic, ivp->iv_newstate = vap->iv_newstate; vap->iv_newstate = iwn_newstate; - ieee80211_amrr_init(&ivp->iv_amrr, vap, - IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, - IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, - 500 /* ms */); - + ieee80211_ratectl_init(vap); /* Complete setup. */ ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); @@ -772,7 +768,7 @@ iwn_vap_delete(struct ieee80211vap *vap) { struct iwn_vap *ivp = IWN_VAP(vap); - ieee80211_amrr_cleanup(&ivp->iv_amrr); + ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); free(ivp, M_80211_VAP); } @@ -1858,11 +1854,8 @@ iwn_node_alloc(struct ieee80211vap *vap, void iwn_newassoc(struct ieee80211_node *ni, int isnew) { - struct ieee80211vap *vap = ni->ni_vap; - struct iwn_node *wn = (void *)ni; - - ieee80211_amrr_node_init(&IWN_VAP(vap)->iv_amrr, - &wn->amn, ni); + /* XXX move */ + ieee80211_ratectl_node_init(ni); } int @@ -2291,9 +2284,9 @@ iwn_tx_done(struct iwn_softc *sc, struct struct ifnet *ifp = sc->sc_ifp; struct iwn_tx_ring *ring = &sc->txq[desc->qid & 0xf]; struct iwn_tx_data *data = &ring->data[desc->idx]; - struct iwn_node *wn = (void *)data->ni; struct mbuf *m; struct ieee80211_node *ni; + struct ieee80211vap *vap; KASSERT(data->ni != NULL, ("no node")); @@ -2302,6 +2295,7 @@ iwn_tx_done(struct iwn_softc *sc, struct bus_dmamap_unload(ring->data_dmat, data->map); m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; + vap = ni->ni_vap; if (m->m_flags & M_TXCB) { /* @@ -2331,11 +2325,11 @@ iwn_tx_done(struct iwn_softc *sc, struct */ if (status & 0x80) { ifp->if_oerrors++; - ieee80211_amrr_tx_complete(&wn->amn, - IEEE80211_AMRR_FAILURE, ackfailcnt); + ieee80211_ratectl_tx_complete(vap, ni, + IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL); } else { - ieee80211_amrr_tx_complete(&wn->amn, - IEEE80211_AMRR_SUCCESS, ackfailcnt); + ieee80211_ratectl_tx_complete(vap, ni, + IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL); } m_freem(m); ieee80211_free_node(ni); @@ -2851,7 +2845,8 @@ iwn_tx_data(struct iwn_softc *sc, struct else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) rate = tp->ucastrate; else { - (void) ieee80211_amrr_choose(ni, &wn->amn); + /* XXX pass pktlen */ + (void) ieee80211_ratectl_rate(ni, NULL, 0); rate = ni->ni_txrate; } ridx = iwn_plcp_signal(rate); @@ -6434,4 +6429,3 @@ DRIVER_MODULE(iwn, pci, iwn_driver, iwn_ MODULE_DEPEND(iwn, pci, 1, 1, 1); MODULE_DEPEND(iwn, firmware, 1, 1, 1); MODULE_DEPEND(iwn, wlan, 1, 1, 1); -MODULE_DEPEND(iwn, wlan_amrr, 1, 1, 1); Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/iwn/if_iwnvar.h Wed Apr 7 15:29:13 2010 (r206358) @@ -99,7 +99,6 @@ struct iwn_rx_ring { struct iwn_node { struct ieee80211_node ni; /* must be the first */ - struct ieee80211_amrr_node amn; uint16_t disable_tid; uint8_t id; uint8_t ridx[IEEE80211_RATE_MAXSIZE]; @@ -193,8 +192,6 @@ struct iwn_hal { struct iwn_vap { struct ieee80211vap iv_vap; - struct ieee80211_amrr iv_amrr; - struct callout iv_amrr_to; uint8_t iv_ridx; int (*iv_newstate)(struct ieee80211vap *, Modified: head/sys/dev/ral/rt2560.c ============================================================================== --- head/sys/dev/ral/rt2560.c Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/ral/rt2560.c Wed Apr 7 15:29:13 2010 (r206358) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -103,8 +103,6 @@ static void rt2560_reset_rx_ring(struct struct rt2560_rx_ring *); static void rt2560_free_rx_ring(struct rt2560_softc *, struct rt2560_rx_ring *); -static struct ieee80211_node *rt2560_node_alloc(struct ieee80211vap *, - const uint8_t [IEEE80211_ADDR_LEN]); static void rt2560_newassoc(struct ieee80211_node *, int); static int rt2560_newstate(struct ieee80211vap *, enum ieee80211_state, int); @@ -307,7 +305,6 @@ rt2560_attach(device_t dev, int id) ic->ic_raw_xmit = rt2560_raw_xmit; ic->ic_updateslot = rt2560_update_slot; ic->ic_update_promisc = rt2560_update_promisc; - ic->ic_node_alloc = rt2560_node_alloc; ic->ic_scan_start = rt2560_scan_start; ic->ic_scan_end = rt2560_scan_end; ic->ic_set_channel = rt2560_set_channel; @@ -430,11 +427,7 @@ rt2560_vap_create(struct ieee80211com *i vap->iv_newstate = rt2560_newstate; vap->iv_update_beacon = rt2560_beacon_update; - ieee80211_amrr_init(&rvp->amrr, vap, - IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, - IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, - 500 /* ms */); - + ieee80211_ratectl_init(vap); /* complete setup */ ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); if (TAILQ_FIRST(&ic->ic_vaps) == vap) @@ -447,7 +440,7 @@ rt2560_vap_delete(struct ieee80211vap *v { struct rt2560_vap *rvp = RT2560_VAP(vap); - ieee80211_amrr_cleanup(&rvp->amrr); + ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); free(rvp, M_80211_VAP); } @@ -764,25 +757,11 @@ rt2560_free_rx_ring(struct rt2560_softc bus_dma_tag_destroy(ring->data_dmat); } -static struct ieee80211_node * -rt2560_node_alloc(struct ieee80211vap *vap, - const uint8_t mac[IEEE80211_ADDR_LEN]) -{ - struct rt2560_node *rn; - - rn = malloc(sizeof (struct rt2560_node), M_80211_NODE, - M_NOWAIT | M_ZERO); - - return (rn != NULL) ? &rn->ni : NULL; -} - static void rt2560_newassoc(struct ieee80211_node *ni, int isnew) { - struct ieee80211vap *vap = ni->ni_vap; - - ieee80211_amrr_node_init(&RT2560_VAP(vap)->amrr, - &RT2560_NODE(ni)->amrr, ni); + /* XXX move */ + ieee80211_ratectl_node_init(ni); } static int @@ -955,10 +934,11 @@ rt2560_tx_intr(struct rt2560_softc *sc) struct ifnet *ifp = sc->sc_ifp; struct rt2560_tx_desc *desc; struct rt2560_tx_data *data; - struct rt2560_node *rn; struct mbuf *m; uint32_t flags; int retrycnt; + struct ieee80211vap *vap; + struct ieee80211_node *ni; bus_dmamap_sync(sc->txq.desc_dmat, sc->txq.desc_map, BUS_DMASYNC_POSTREAD); @@ -973,15 +953,19 @@ rt2560_tx_intr(struct rt2560_softc *sc) !(flags & RT2560_TX_VALID)) break; - rn = (struct rt2560_node *)data->ni; m = data->m; + ni = data->ni; + vap = ni->ni_vap; switch (flags & RT2560_TX_RESULT_MASK) { case RT2560_TX_SUCCESS: + retrycnt = 0; + DPRINTFN(sc, 10, "%s\n", "data frame sent successfully"); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_amrr_tx_complete(&rn->amrr, - IEEE80211_AMRR_SUCCESS, 0); + ieee80211_ratectl_tx_complete(vap, ni, + IEEE80211_RATECTL_TX_SUCCESS, + &retrycnt, NULL); ifp->if_opackets++; break; @@ -991,8 +975,9 @@ rt2560_tx_intr(struct rt2560_softc *sc) DPRINTFN(sc, 9, "data frame sent after %u retries\n", retrycnt); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_amrr_tx_complete(&rn->amrr, - IEEE80211_AMRR_SUCCESS, retrycnt); + ieee80211_ratectl_tx_complete(vap, ni, + IEEE80211_RATECTL_TX_SUCCESS, + &retrycnt, NULL); ifp->if_opackets++; break; @@ -1002,8 +987,9 @@ rt2560_tx_intr(struct rt2560_softc *sc) DPRINTFN(sc, 9, "data frame failed after %d retries\n", retrycnt); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_amrr_tx_complete(&rn->amrr, - IEEE80211_AMRR_FAILURE, retrycnt); + ieee80211_ratectl_tx_complete(vap, ni, + IEEE80211_RATECTL_TX_FAILURE, + &retrycnt, NULL); ifp->if_oerrors++; break; @@ -1022,6 +1008,7 @@ rt2560_tx_intr(struct rt2560_softc *sc) data->m = NULL; ieee80211_free_node(data->ni); data->ni = NULL; + ni = NULL; /* descriptor is no longer valid */ desc->flags &= ~htole32(RT2560_TX_VALID); @@ -1821,7 +1808,7 @@ rt2560_tx_data(struct rt2560_softc *sc, } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { rate = tp->ucastrate; } else { - (void) ieee80211_amrr_choose(ni, &RT2560_NODE(ni)->amrr); + (void) ieee80211_ratectl_rate(ni, NULL, 0); rate = ni->ni_txrate; } Modified: head/sys/dev/ral/rt2560var.h ============================================================================== --- head/sys/dev/ral/rt2560var.h Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/ral/rt2560var.h Wed Apr 7 15:29:13 2010 (r206358) @@ -95,16 +95,9 @@ struct rt2560_rx_ring { int cur_decrypt; }; -struct rt2560_node { - struct ieee80211_node ni; - struct ieee80211_amrr_node amrr; -}; -#define RT2560_NODE(ni) ((struct rt2560_node *)(ni)) - struct rt2560_vap { struct ieee80211vap ral_vap; struct ieee80211_beacon_offsets ral_bo; - struct ieee80211_amrr amrr; int (*ral_newstate)(struct ieee80211vap *, enum ieee80211_state, int); Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/ral/rt2661.c Wed Apr 7 15:29:13 2010 (r206358) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -100,8 +100,6 @@ static void rt2661_reset_rx_ring(struct struct rt2661_rx_ring *); static void rt2661_free_rx_ring(struct rt2661_softc *, struct rt2661_rx_ring *); -static struct ieee80211_node *rt2661_node_alloc(struct ieee80211vap *, - const uint8_t [IEEE80211_ADDR_LEN]); static void rt2661_newassoc(struct ieee80211_node *, int); static int rt2661_newstate(struct ieee80211vap *, enum ieee80211_state, int); @@ -307,7 +305,6 @@ rt2661_attach(device_t dev, int id) ieee80211_ifattach(ic, macaddr); ic->ic_newassoc = rt2661_newassoc; - ic->ic_node_alloc = rt2661_node_alloc; #if 0 ic->ic_wme.wme_update = rt2661_wme_update; #endif @@ -428,11 +425,7 @@ rt2661_vap_create(struct ieee80211com *i vap->iv_update_beacon = rt2661_beacon_update; #endif - ieee80211_amrr_init(&rvp->amrr, vap, - IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, - IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, - 500 /* ms */); - + ieee80211_ratectl_init(vap); /* complete setup */ ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); if (TAILQ_FIRST(&ic->ic_vaps) == vap) @@ -445,7 +438,7 @@ rt2661_vap_delete(struct ieee80211vap *v { struct rt2661_vap *rvp = RT2661_VAP(vap); - ieee80211_amrr_cleanup(&rvp->amrr); + ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); free(rvp, M_80211_VAP); } @@ -771,25 +764,11 @@ rt2661_free_rx_ring(struct rt2661_softc bus_dma_tag_destroy(ring->data_dmat); } -static struct ieee80211_node * -rt2661_node_alloc(struct ieee80211vap *vap, - const uint8_t mac[IEEE80211_ADDR_LEN]) -{ - struct rt2661_node *rn; - - rn = malloc(sizeof (struct rt2661_node), M_80211_NODE, - M_NOWAIT | M_ZERO); - - return (rn != NULL) ? &rn->ni : NULL; -} - static void rt2661_newassoc(struct ieee80211_node *ni, int isnew) { - struct ieee80211vap *vap = ni->ni_vap; - - ieee80211_amrr_node_init(&RT2661_VAP(vap)->amrr, - &RT2661_NODE(ni)->amrr, ni); + /* XXX move */ + ieee80211_ratectl_node_init(ni); } static int @@ -899,9 +878,9 @@ rt2661_tx_intr(struct rt2661_softc *sc) struct ifnet *ifp = sc->sc_ifp; struct rt2661_tx_ring *txq; struct rt2661_tx_data *data; - struct rt2661_node *rn; uint32_t val; int qid, retrycnt; + struct ieee80211vap *vap; for (;;) { struct ieee80211_node *ni; @@ -921,13 +900,12 @@ rt2661_tx_intr(struct rt2661_softc *sc) data->m = NULL; ni = data->ni; data->ni = NULL; + vap = ni->ni_vap; /* if no frame has been sent, ignore */ if (ni == NULL) continue; - rn = RT2661_NODE(ni); - switch (RT2661_TX_RESULT(val)) { case RT2661_TX_SUCCESS: retrycnt = RT2661_TX_RETRYCNT(val); @@ -935,8 +913,9 @@ rt2661_tx_intr(struct rt2661_softc *sc) DPRINTFN(sc, 10, "data frame sent successfully after " "%d retries\n", retrycnt); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_amrr_tx_complete(&rn->amrr, - IEEE80211_AMRR_SUCCESS, retrycnt); + ieee80211_ratectl_tx_complete(vap, ni, + IEEE80211_RATECTL_TX_SUCCESS, + &retrycnt, NULL); ifp->if_opackets++; break; @@ -946,8 +925,9 @@ rt2661_tx_intr(struct rt2661_softc *sc) DPRINTFN(sc, 9, "%s\n", "sending data frame failed (too much retries)"); if (data->rix != IEEE80211_FIXED_RATE_NONE) - ieee80211_amrr_tx_complete(&rn->amrr, - IEEE80211_AMRR_FAILURE, retrycnt); + ieee80211_ratectl_tx_complete(vap, ni, + IEEE80211_RATECTL_TX_FAILURE, + &retrycnt, NULL); ifp->if_oerrors++; break; @@ -1511,7 +1491,7 @@ rt2661_tx_data(struct rt2661_softc *sc, } else if (tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { rate = tp->ucastrate; } else { - (void) ieee80211_amrr_choose(ni, &RT2661_NODE(ni)->amrr); + (void) ieee80211_ratectl_rate(ni, NULL, 0); rate = ni->ni_txrate; } rate &= IEEE80211_RATE_VAL; Modified: head/sys/dev/ral/rt2661var.h ============================================================================== --- head/sys/dev/ral/rt2661var.h Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/ral/rt2661var.h Wed Apr 7 15:29:13 2010 (r206358) @@ -88,15 +88,8 @@ struct rt2661_rx_ring { int next; }; -struct rt2661_node { - struct ieee80211_node ni; - struct ieee80211_amrr_node amrr; -}; -#define RT2661_NODE(ni) ((struct rt2661_node *)(ni)) - struct rt2661_vap { struct ieee80211vap ral_vap; - struct ieee80211_amrr amrr; int (*ral_newstate)(struct ieee80211vap *, enum ieee80211_state, int); Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/usb/wlan/if_rum.c Wed Apr 7 15:29:13 2010 (r206358) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -140,7 +140,6 @@ static const struct usb_device_id rum_de }; MODULE_DEPEND(rum, wlan, 1, 1, 1); -MODULE_DEPEND(rum, wlan_amrr, 1, 1, 1); MODULE_DEPEND(rum, usb, 1, 1, 1); static device_probe_t rum_match; @@ -212,17 +211,14 @@ static int rum_prepare_beacon(struct ru struct ieee80211vap *); static int rum_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); -static struct ieee80211_node *rum_node_alloc(struct ieee80211vap *, - const uint8_t mac[IEEE80211_ADDR_LEN]); -static void rum_newassoc(struct ieee80211_node *, int); static void rum_scan_start(struct ieee80211com *); static void rum_scan_end(struct ieee80211com *); static void rum_set_channel(struct ieee80211com *); static int rum_get_rssi(struct rum_softc *, uint8_t); -static void rum_amrr_start(struct rum_softc *, +static void rum_ratectl_start(struct rum_softc *, struct ieee80211_node *); -static void rum_amrr_timeout(void *); -static void rum_amrr_task(void *, int); +static void rum_ratectl_timeout(void *); +static void rum_ratectl_task(void *, int); static int rum_pause(struct rum_softc *, int); static const struct { @@ -511,9 +507,7 @@ rum_attach(device_t self) ieee80211_ifattach(ic, sc->sc_bssid); ic->ic_update_promisc = rum_update_promisc; - ic->ic_newassoc = rum_newassoc; ic->ic_raw_xmit = rum_raw_xmit; - ic->ic_node_alloc = rum_node_alloc; ic->ic_scan_start = rum_scan_start; ic->ic_scan_end = rum_scan_end; ic->ic_set_channel = rum_set_channel; @@ -608,13 +602,10 @@ rum_vap_create(struct ieee80211com *ic, rvp->newstate = vap->iv_newstate; vap->iv_newstate = rum_newstate; - usb_callout_init_mtx(&rvp->amrr_ch, &sc->sc_mtx, 0); - TASK_INIT(&rvp->amrr_task, 0, rum_amrr_task, rvp); - ieee80211_amrr_init(&rvp->amrr, vap, - IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, - IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, - 1000 /* 1 sec */); - + usb_callout_init_mtx(&rvp->ratectl_ch, &sc->sc_mtx, 0); + TASK_INIT(&rvp->ratectl_task, 0, rum_ratectl_task, rvp); + ieee80211_ratectl_init(vap); + ieee80211_ratectl_setinterval(vap, 1000 /* 1 sec */); /* complete setup */ ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); ic->ic_opmode = opmode; @@ -627,9 +618,9 @@ rum_vap_delete(struct ieee80211vap *vap) struct rum_vap *rvp = RUM_VAP(vap); struct ieee80211com *ic = vap->iv_ic; - usb_callout_drain(&rvp->amrr_ch); - ieee80211_draintask(ic, &rvp->amrr_task); - ieee80211_amrr_cleanup(&rvp->amrr); + usb_callout_drain(&rvp->ratectl_ch); + ieee80211_draintask(ic, &rvp->ratectl_task); + ieee80211_ratectl_deinit(vap); ieee80211_vap_detach(vap); free(rvp, M_80211_VAP); } @@ -716,7 +707,7 @@ rum_newstate(struct ieee80211vap *vap, e IEEE80211_UNLOCK(ic); RUM_LOCK(sc); - usb_callout_stop(&rvp->amrr_ch); + usb_callout_stop(&rvp->ratectl_ch); switch (nstate) { case IEEE80211_S_INIT: @@ -751,7 +742,7 @@ rum_newstate(struct ieee80211vap *vap, e /* enable automatic rate adaptation */ tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; if (tp->ucastrate == IEEE80211_FIXED_RATE_NONE) - rum_amrr_start(sc, ni); + rum_ratectl_start(sc, ni); break; default: break; @@ -2194,7 +2185,7 @@ bad: } static void -rum_amrr_start(struct rum_softc *sc, struct ieee80211_node *ni) +rum_ratectl_start(struct rum_softc *sc, struct ieee80211_node *ni) { struct ieee80211vap *vap = ni->ni_vap; struct rum_vap *rvp = RUM_VAP(vap); @@ -2202,23 +2193,23 @@ rum_amrr_start(struct rum_softc *sc, str /* clear statistic registers (STA_CSR0 to STA_CSR5) */ rum_read_multi(sc, RT2573_STA_CSR0, sc->sta, sizeof sc->sta); - ieee80211_amrr_node_init(&rvp->amrr, &RUM_NODE(ni)->amn, ni); + ieee80211_ratectl_node_init(ni); - usb_callout_reset(&rvp->amrr_ch, hz, rum_amrr_timeout, rvp); + usb_callout_reset(&rvp->ratectl_ch, hz, rum_ratectl_timeout, rvp); } static void -rum_amrr_timeout(void *arg) +rum_ratectl_timeout(void *arg) { struct rum_vap *rvp = arg; struct ieee80211vap *vap = &rvp->vap; struct ieee80211com *ic = vap->iv_ic; - ieee80211_runtask(ic, &rvp->amrr_task); + ieee80211_runtask(ic, &rvp->ratectl_task); } static void -rum_amrr_task(void *arg, int pending) +rum_ratectl_task(void *arg, int pending) { struct rum_vap *rvp = arg; struct ieee80211vap *vap = &rvp->vap; @@ -2227,6 +2218,7 @@ rum_amrr_task(void *arg, int pending) struct rum_softc *sc = ifp->if_softc; struct ieee80211_node *ni = vap->iv_bss; int ok, fail; + int sum, retrycnt; RUM_LOCK(sc); /* read and clear statistic registers (STA_CSR0 to STA_CSR10) */ @@ -2235,36 +2227,18 @@ rum_amrr_task(void *arg, int pending) ok = (le32toh(sc->sta[4]) >> 16) + /* TX ok w/o retry */ (le32toh(sc->sta[5]) & 0xffff); /* TX ok w/ retry */ fail = (le32toh(sc->sta[5]) >> 16); /* TX retry-fail count */ + sum = ok+fail; + retrycnt = (le32toh(sc->sta[5]) & 0xffff) + fail; - ieee80211_amrr_tx_update(&RUM_NODE(ni)->amn, - ok+fail, ok, (le32toh(sc->sta[5]) & 0xffff) + fail); - (void) ieee80211_amrr_choose(ni, &RUM_NODE(ni)->amn); + ieee80211_ratectl_tx_update(vap, ni, &sum, &ok, &retrycnt); + (void) ieee80211_ratectl_rate(ni, NULL, 0); ifp->if_oerrors += fail; /* count TX retry-fail as Tx errors */ - usb_callout_reset(&rvp->amrr_ch, hz, rum_amrr_timeout, rvp); + usb_callout_reset(&rvp->ratectl_ch, hz, rum_ratectl_timeout, rvp); RUM_UNLOCK(sc); } -/* ARGUSED */ -static struct ieee80211_node * -rum_node_alloc(struct ieee80211vap *vap __unused, - const uint8_t mac[IEEE80211_ADDR_LEN] __unused) -{ - struct rum_node *rn; - - rn = malloc(sizeof(struct rum_node), M_80211_NODE, M_NOWAIT | M_ZERO); - return rn != NULL ? &rn->ni : NULL; -} - -static void -rum_newassoc(struct ieee80211_node *ni, int isnew) -{ - struct ieee80211vap *vap = ni->ni_vap; - - ieee80211_amrr_node_init(&RUM_VAP(vap)->amrr, &RUM_NODE(ni)->amn, ni); -} - static void rum_scan_start(struct ieee80211com *ic) { Modified: head/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_rumvar.h Wed Apr 7 15:19:52 2010 (r206357) +++ head/sys/dev/usb/wlan/if_rumvar.h Wed Apr 7 15:29:13 2010 (r206358) @@ -67,18 +67,11 @@ struct rum_tx_data { }; typedef STAILQ_HEAD(, rum_tx_data) rum_txdhead; -struct rum_node { - struct ieee80211_node ni; - struct ieee80211_amrr_node amn; -}; -#define RUM_NODE(ni) ((struct rum_node *)(ni)) - struct rum_vap { struct ieee80211vap vap; struct ieee80211_beacon_offsets bo; - struct ieee80211_amrr amrr; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 15:33:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F9F71065674; Wed, 7 Apr 2010 15:33:20 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4576F8FC2D; Wed, 7 Apr 2010 15:33:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37FXKgd036614; Wed, 7 Apr 2010 15:33:20 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37FXKrg036611; Wed, 7 Apr 2010 15:33:20 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201004071533.o37FXKrg036611@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 7 Apr 2010 15:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206359 - stable/7/sys/gnu/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 15:33:20 -0000 Author: jh Date: Wed Apr 7 15:33:19 2010 New Revision: 206359 URL: http://svn.freebsd.org/changeset/base/206359 Log: MFC r198940: File flags handling fixes for ext2fs: - Disallow setting of flags not supported by ext2fs. - Map EXT2_APPEND_FL to SF_APPEND. - Map EXT2_IMMUTABLE_FL to SF_IMMUTABLE. - Map EXT2_NODUMP_FL to UF_NODUMP. Note that ext2fs doesn't support user settable append and immutable flags. EXT2_NODUMP_FL is an user settable flag also on Linux. PR: kern/122047 Modified: stable/7/sys/gnu/fs/ext2fs/ext2_inode_cnv.c stable/7/sys/gnu/fs/ext2fs/ext2_vnops.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/gnu/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- stable/7/sys/gnu/fs/ext2fs/ext2_inode_cnv.c Wed Apr 7 15:29:13 2010 (r206358) +++ stable/7/sys/gnu/fs/ext2fs/ext2_inode_cnv.c Wed Apr 7 15:33:19 2010 (r206359) @@ -83,8 +83,9 @@ ext2_ei2i(ei, ip) ip->i_mtime = ei->i_mtime; ip->i_ctime = ei->i_ctime; ip->i_flags = 0; - ip->i_flags |= (ei->i_flags & EXT2_APPEND_FL) ? APPEND : 0; - ip->i_flags |= (ei->i_flags & EXT2_IMMUTABLE_FL) ? IMMUTABLE : 0; + ip->i_flags |= (ei->i_flags & EXT2_APPEND_FL) ? SF_APPEND : 0; + ip->i_flags |= (ei->i_flags & EXT2_IMMUTABLE_FL) ? SF_IMMUTABLE : 0; + ip->i_flags |= (ei->i_flags & EXT2_NODUMP_FL) ? UF_NODUMP : 0; ip->i_blocks = ei->i_blocks; ip->i_gen = ei->i_generation; ip->i_uid = ei->i_uid; @@ -121,8 +122,9 @@ ext2_i2ei(ip, ei) ei->i_ctime = ip->i_ctime; ei->i_flags = ip->i_flags; ei->i_flags = 0; - ei->i_flags |= (ip->i_flags & APPEND) ? EXT2_APPEND_FL: 0; - ei->i_flags |= (ip->i_flags & IMMUTABLE) ? EXT2_IMMUTABLE_FL: 0; + ei->i_flags |= (ip->i_flags & SF_APPEND) ? EXT2_APPEND_FL: 0; + ei->i_flags |= (ip->i_flags & SF_IMMUTABLE) ? EXT2_IMMUTABLE_FL: 0; + ei->i_flags |= (ip->i_flags & UF_NODUMP) ? EXT2_NODUMP_FL : 0; ei->i_blocks = ip->i_blocks; ei->i_generation = ip->i_gen; ei->i_uid = ip->i_uid; Modified: stable/7/sys/gnu/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/7/sys/gnu/fs/ext2fs/ext2_vnops.c Wed Apr 7 15:29:13 2010 (r206358) +++ stable/7/sys/gnu/fs/ext2fs/ext2_vnops.c Wed Apr 7 15:33:19 2010 (r206359) @@ -399,6 +399,10 @@ ext2_setattr(ap) return (EINVAL); } if (vap->va_flags != VNOVAL) { + /* Disallow flags not supported by ext2fs. */ + if (vap->va_flags & ~(SF_APPEND | SF_IMMUTABLE | UF_NODUMP)) + return (EOPNOTSUPP); + if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); /* From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 16:29:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CAAC106566B; Wed, 7 Apr 2010 16:29:11 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D79478FC13; Wed, 7 Apr 2010 16:29:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37GTAnj048942; Wed, 7 Apr 2010 16:29:10 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37GTAhJ048936; Wed, 7 Apr 2010 16:29:10 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201004071629.o37GTAhJ048936@svn.freebsd.org> From: Joel Dahl Date: Wed, 7 Apr 2010 16:29:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206360 - in head/sys: libkern netgraph vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 16:29:11 -0000 Author: joel (doc committer) Date: Wed Apr 7 16:29:10 2010 New Revision: 206360 URL: http://svn.freebsd.org/changeset/base/206360 Log: Start copyright notice with /*- Modified: head/sys/libkern/iconv_xlat.c head/sys/libkern/strcasecmp.c head/sys/netgraph/ng_pipe.c head/sys/netgraph/ng_pipe.h head/sys/vm/memguard.c head/sys/vm/memguard.h Modified: head/sys/libkern/iconv_xlat.c ============================================================================== --- head/sys/libkern/iconv_xlat.c Wed Apr 7 15:33:19 2010 (r206359) +++ head/sys/libkern/iconv_xlat.c Wed Apr 7 16:29:10 2010 (r206360) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2000-2001, Boris Popov * All rights reserved. * Modified: head/sys/libkern/strcasecmp.c ============================================================================== --- head/sys/libkern/strcasecmp.c Wed Apr 7 15:33:19 2010 (r206359) +++ head/sys/libkern/strcasecmp.c Wed Apr 7 16:29:10 2010 (r206360) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. * Modified: head/sys/netgraph/ng_pipe.c ============================================================================== --- head/sys/netgraph/ng_pipe.c Wed Apr 7 15:33:19 2010 (r206359) +++ head/sys/netgraph/ng_pipe.c Wed Apr 7 16:29:10 2010 (r206360) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004-2008 University of Zagreb * Copyright (c) 2007-2008 FreeBSD Foundation * Modified: head/sys/netgraph/ng_pipe.h ============================================================================== --- head/sys/netgraph/ng_pipe.h Wed Apr 7 15:33:19 2010 (r206359) +++ head/sys/netgraph/ng_pipe.h Wed Apr 7 16:29:10 2010 (r206360) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2004-2008 University of Zagreb * Copyright (c) 2007-2008 FreeBSD Foundation * Modified: head/sys/vm/memguard.c ============================================================================== --- head/sys/vm/memguard.c Wed Apr 7 15:33:19 2010 (r206359) +++ head/sys/vm/memguard.c Wed Apr 7 16:29:10 2010 (r206360) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2005, * Bosko Milekic . All rights reserved. * Modified: head/sys/vm/memguard.h ============================================================================== --- head/sys/vm/memguard.h Wed Apr 7 15:33:19 2010 (r206359) +++ head/sys/vm/memguard.h Wed Apr 7 16:29:10 2010 (r206360) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2005, * Bosko Milekic . All rights reserved. * From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 16:50:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E76106564A; Wed, 7 Apr 2010 16:50:39 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B38F58FC08; Wed, 7 Apr 2010 16:50:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37Godw0053749; Wed, 7 Apr 2010 16:50:39 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37Godqk053693; Wed, 7 Apr 2010 16:50:39 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201004071650.o37Godqk053693@svn.freebsd.org> From: Joel Dahl Date: Wed, 7 Apr 2010 16:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206361 - in head/sys: fs/nwfs fs/smbfs libkern netncp netsmb sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 16:50:39 -0000 Author: joel (doc committer) Date: Wed Apr 7 16:50:38 2010 New Revision: 206361 URL: http://svn.freebsd.org/changeset/base/206361 Log: Switch to our preferred 2-clause BSD license. Approved by: bp Modified: head/sys/fs/nwfs/nwfs.h head/sys/fs/nwfs/nwfs_io.c head/sys/fs/nwfs/nwfs_ioctl.c head/sys/fs/nwfs/nwfs_mount.h head/sys/fs/nwfs/nwfs_node.c head/sys/fs/nwfs/nwfs_node.h head/sys/fs/nwfs/nwfs_subr.c head/sys/fs/nwfs/nwfs_subr.h head/sys/fs/nwfs/nwfs_vfsops.c head/sys/fs/nwfs/nwfs_vnops.c head/sys/fs/smbfs/smbfs.h head/sys/fs/smbfs/smbfs_io.c head/sys/fs/smbfs/smbfs_node.c head/sys/fs/smbfs/smbfs_node.h head/sys/fs/smbfs/smbfs_smb.c head/sys/fs/smbfs/smbfs_subr.c head/sys/fs/smbfs/smbfs_subr.h head/sys/fs/smbfs/smbfs_vfsops.c head/sys/fs/smbfs/smbfs_vnops.c head/sys/libkern/iconv.c head/sys/libkern/iconv_converter_if.m head/sys/libkern/iconv_xlat.c head/sys/netncp/ncp_conn.c head/sys/netncp/ncp_conn.h head/sys/netncp/ncp_file.h head/sys/netncp/ncp_lib.h head/sys/netncp/ncp_login.c head/sys/netncp/ncp_ncp.c head/sys/netncp/ncp_ncp.h head/sys/netncp/ncp_nls.c head/sys/netncp/ncp_nls.h head/sys/netncp/ncp_rcfile.h head/sys/netncp/ncp_rq.c head/sys/netncp/ncp_rq.h head/sys/netncp/ncp_sock.c head/sys/netncp/ncp_sock.h head/sys/netncp/ncp_subr.c head/sys/netncp/ncp_subr.h head/sys/netncp/ncp_user.h head/sys/netsmb/netbios.h head/sys/netsmb/smb.h head/sys/netsmb/smb_conn.c head/sys/netsmb/smb_conn.h head/sys/netsmb/smb_dev.c head/sys/netsmb/smb_dev.h head/sys/netsmb/smb_iod.c head/sys/netsmb/smb_rq.c head/sys/netsmb/smb_rq.h head/sys/netsmb/smb_smb.c head/sys/netsmb/smb_subr.c head/sys/netsmb/smb_subr.h head/sys/netsmb/smb_tran.h head/sys/netsmb/smb_trantcp.c head/sys/netsmb/smb_trantcp.h head/sys/netsmb/smb_usr.c head/sys/sys/iconv.h head/sys/sys/mchain.h Modified: head/sys/fs/nwfs/nwfs.h ============================================================================== --- head/sys/fs/nwfs/nwfs.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_io.c ============================================================================== --- head/sys/fs/nwfs/nwfs_io.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_io.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_ioctl.c ============================================================================== --- head/sys/fs/nwfs/nwfs_ioctl.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_ioctl.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_mount.h ============================================================================== --- head/sys/fs/nwfs/nwfs_mount.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_mount.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_node.c ============================================================================== --- head/sys/fs/nwfs/nwfs_node.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_node.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_node.h ============================================================================== --- head/sys/fs/nwfs/nwfs_node.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_node.h Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_subr.c ============================================================================== --- head/sys/fs/nwfs/nwfs_subr.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_subr.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_subr.h ============================================================================== --- head/sys/fs/nwfs/nwfs_subr.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_subr.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_vfsops.c ============================================================================== --- head/sys/fs/nwfs/nwfs_vfsops.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_vfsops.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/nwfs/nwfs_vnops.c ============================================================================== --- head/sys/fs/nwfs/nwfs_vnops.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/nwfs/nwfs_vnops.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs.h ============================================================================== --- head/sys/fs/smbfs/smbfs.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs_io.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs_node.c ============================================================================== --- head/sys/fs/smbfs/smbfs_node.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs_node.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs_node.h ============================================================================== --- head/sys/fs/smbfs/smbfs_node.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs_node.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs_smb.c ============================================================================== --- head/sys/fs/smbfs/smbfs_smb.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs_smb.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs_subr.c ============================================================================== --- head/sys/fs/smbfs/smbfs_subr.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs_subr.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs_subr.h ============================================================================== --- head/sys/fs/smbfs/smbfs_subr.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs_subr.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs_vfsops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vfsops.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs_vfsops.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/fs/smbfs/smbfs_vnops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vnops.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/fs/smbfs/smbfs_vnops.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/libkern/iconv.c ============================================================================== --- head/sys/libkern/iconv.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/libkern/iconv.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/libkern/iconv_converter_if.m ============================================================================== --- head/sys/libkern/iconv_converter_if.m Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/libkern/iconv_converter_if.m Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ #- -# Copyright (c) 2000-2001, Boris Popov +# Copyright (c) 2000-2001 Boris Popov # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by Boris Popov. -# 4. Neither the name of the author nor the names of any co-contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/libkern/iconv_xlat.c ============================================================================== --- head/sys/libkern/iconv_xlat.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/libkern/iconv_xlat.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_conn.c ============================================================================== --- head/sys/netncp/ncp_conn.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_conn.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_conn.h ============================================================================== --- head/sys/netncp/ncp_conn.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_conn.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_file.h ============================================================================== --- head/sys/netncp/ncp_file.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_file.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_lib.h ============================================================================== --- head/sys/netncp/ncp_lib.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_lib.h Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_login.c ============================================================================== --- head/sys/netncp/ncp_login.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_login.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_ncp.c ============================================================================== --- head/sys/netncp/ncp_ncp.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_ncp.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_ncp.h ============================================================================== --- head/sys/netncp/ncp_ncp.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_ncp.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_nls.c ============================================================================== --- head/sys/netncp/ncp_nls.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_nls.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_nls.h ============================================================================== --- head/sys/netncp/ncp_nls.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_nls.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_rcfile.h ============================================================================== --- head/sys/netncp/ncp_rcfile.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_rcfile.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_rq.c ============================================================================== --- head/sys/netncp/ncp_rq.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_rq.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_rq.h ============================================================================== --- head/sys/netncp/ncp_rq.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_rq.h Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_sock.c ============================================================================== --- head/sys/netncp/ncp_sock.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_sock.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_sock.h ============================================================================== --- head/sys/netncp/ncp_sock.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_sock.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_subr.c ============================================================================== --- head/sys/netncp/ncp_subr.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_subr.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_subr.h ============================================================================== --- head/sys/netncp/ncp_subr.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_subr.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netncp/ncp_user.h ============================================================================== --- head/sys/netncp/ncp_user.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netncp/ncp_user.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999, Boris Popov + * Copyright (c) 1999 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/netbios.h ============================================================================== --- head/sys/netsmb/netbios.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/netbios.h Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb.h ============================================================================== --- head/sys/netsmb/smb.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb.h Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_conn.c ============================================================================== --- head/sys/netsmb/smb_conn.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_conn.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_conn.h ============================================================================== --- head/sys/netsmb/smb_conn.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_conn.h Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_dev.c ============================================================================== --- head/sys/netsmb/smb_dev.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_dev.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_dev.h ============================================================================== --- head/sys/netsmb/smb_dev.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_dev.h Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_iod.c ============================================================================== --- head/sys/netsmb/smb_iod.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_iod.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_rq.c ============================================================================== --- head/sys/netsmb/smb_rq.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_rq.c Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_rq.h ============================================================================== --- head/sys/netsmb/smb_rq.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_rq.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_smb.c ============================================================================== --- head/sys/netsmb/smb_smb.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_smb.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_subr.c ============================================================================== --- head/sys/netsmb/smb_subr.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_subr.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_subr.h ============================================================================== --- head/sys/netsmb/smb_subr.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_subr.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_tran.h ============================================================================== --- head/sys/netsmb/smb_tran.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_tran.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_trantcp.c ============================================================================== --- head/sys/netsmb/smb_trantcp.c Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_trantcp.c Wed Apr 7 16:50:38 2010 (r206361) @@ -10,12 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Boris Popov. - * 4. Neither the name of the author nor the names of any co-contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE Modified: head/sys/netsmb/smb_trantcp.h ============================================================================== --- head/sys/netsmb/smb_trantcp.h Wed Apr 7 16:29:10 2010 (r206360) +++ head/sys/netsmb/smb_trantcp.h Wed Apr 7 16:50:38 2010 (r206361) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2001, Boris Popov + * Copyright (c) 2000-2001 Boris Popov * All rights reserved. * * Redistribution and use in source and binary forms, with or without *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:03:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BC69106564A; Wed, 7 Apr 2010 17:03:05 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59C918FC12; Wed, 7 Apr 2010 17:03:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37H351O056558; Wed, 7 Apr 2010 17:03:05 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37H35oh056555; Wed, 7 Apr 2010 17:03:05 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004071703.o37H35oh056555@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Apr 2010 17:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206362 - head/sys/dev/syscons/logo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:03:05 -0000 Author: jkim Date: Wed Apr 7 17:03:05 2010 New Revision: 206362 URL: http://svn.freebsd.org/changeset/base/206362 Log: Copy Beastie image file to prepare for an official logo image. Added: head/sys/dev/syscons/logo/beastie.c - copied unchanged from r206361, head/sys/dev/syscons/logo/logo.c Copied: head/sys/dev/syscons/logo/beastie.c (from r206361, head/sys/dev/syscons/logo/logo.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscons/logo/beastie.c Wed Apr 7 17:03:05 2010 (r206362, copy of r206361, head/sys/dev/syscons/logo/logo.c) @@ -0,0 +1,358 @@ +/* $FreeBSD$ */ + +#define logo_width 88 +#define logo_height 88 + +unsigned int logo_w = logo_width; +unsigned int logo_h = logo_height; + +unsigned char logo_pal[768] = { + 0x00, 0x00, 0x00, + 0x33, 0x33, 0x33, + 0x66, 0x66, 0x66, + 0x99, 0x99, 0x99, + 0xcc, 0xcc, 0xcc, + 0xff, 0xff, 0xff, + 0x90, 0x8f, 0x90, + 0x56, 0x4b, 0x55, + 0xa3, 0xa5, 0xab, + 0xfd, 0xfd, 0xfd, + 0x6d, 0x6e, 0x74, + 0x41, 0x2b, 0x39, + 0xcb, 0xc8, 0xcb, + 0xcf, 0xbb, 0xba, + 0x8e, 0x82, 0x87, + 0x5c, 0x5d, 0x60, + 0x52, 0x2a, 0x37, + 0x7f, 0x76, 0x7d, + 0x82, 0x82, 0x85, + 0x7a, 0x3e, 0x45, + 0x7f, 0x6e, 0x70, + 0xef, 0xef, 0xed, + 0x53, 0x41, 0x4b, + 0x67, 0x2b, 0x35, + 0x6a, 0x55, 0x62, + 0xe7, 0xe2, 0xe3, + 0x64, 0x35, 0x3f, + 0xf7, 0xe0, 0xe7, + 0xb1, 0xb2, 0xb2, + 0x31, 0x2b, 0x35, + 0x7a, 0x2d, 0x37, + 0x69, 0x4c, 0x56, + 0x95, 0x9d, 0xa4, + 0x85, 0x61, 0x69, + 0x40, 0x34, 0x41, + 0x8f, 0x2e, 0x39, + 0x7a, 0x50, 0x5a, + 0xde, 0xe1, 0xe0, + 0x32, 0x33, 0x3d, + 0xa0, 0x9b, 0x9c, + 0x68, 0x63, 0x67, + 0x76, 0x60, 0x67, + 0xba, 0xb6, 0xb8, + 0x29, 0x24, 0x41, + 0x38, 0x21, 0x29, + 0x42, 0x21, 0x27, + 0xa2, 0x2a, 0x32, + 0x56, 0x55, 0x58, + 0x55, 0x21, 0x2b, + 0x7a, 0x20, 0x2a, + 0x37, 0x16, 0x21, + 0x4d, 0x18, 0x37, + 0x8a, 0x3a, 0x3e, + 0xc0, 0xc2, 0xc4, + 0x64, 0x23, 0x2c, + 0x37, 0x1a, 0x24, + 0x42, 0x18, 0x20, + 0x4c, 0x21, 0x2b, + 0xa0, 0x23, 0x2e, + 0x95, 0x6c, 0x76, + 0x26, 0x16, 0x1c, + 0xa5, 0x18, 0x23, + 0x84, 0x20, 0x2b, + 0x6d, 0x3f, 0x49, + 0xae, 0xa7, 0xac, + 0x2a, 0x1f, 0x24, + 0x90, 0x21, 0x30, + 0xa0, 0x39, 0x3e, + 0x95, 0x0f, 0x1c, + 0x84, 0x13, 0x1e, + 0x4e, 0x17, 0x24, + 0x8c, 0x56, 0x5f, + 0xe0, 0xc4, 0xcb, + 0xa5, 0x7f, 0x8e, + 0xff, 0xff, 0xf1, + 0x3d, 0x3d, 0x5d, + 0x61, 0x19, 0x26, + 0xd5, 0xd5, 0xd5, + 0xff, 0xf1, 0xed, + 0xb6, 0x9c, 0xa5, + 0x87, 0x4c, 0x5a, + 0xa0, 0x76, 0x76, + 0xc8, 0xa0, 0xa0, + 0xa2, 0xc1, 0xc8, + 0x91, 0xae, 0xb6, + 0x52, 0x8b, 0xae, + 0xb3, 0xd2, 0xd4, + 0x95, 0xb7, 0xc1, + 0x54, 0x6e, 0x83, + 0x67, 0x90, 0xa6, + 0x44, 0x3e, 0x45, + 0x23, 0x40, 0x6a, + 0x41, 0x6e, 0x97, + 0x7e, 0x8e, 0x91, + 0x52, 0x33, 0x41, + 0x39, 0x49, 0x68, + 0x1d, 0x2a, 0x48, + 0x17, 0x21, 0x45, + 0x90, 0x17, 0x1f, + 0x38, 0x54, 0x71, + 0x1c, 0x33, 0x58, + 0x1c, 0x1e, 0x23, + 0x6c, 0x17, 0x21, + 0xb0, 0xc5, 0xc1, + 0x5d, 0x7f, 0x96, + 0xe9, 0xbf, 0xc1, + 0x96, 0x06, 0x0f, + 0x78, 0x16, 0x1e, + 0xab, 0x0e, 0x18, + 0xa6, 0x06, 0x0e, + 0x4c, 0x4c, 0x54, + 0x61, 0x42, 0x4c, + 0x48, 0x5f, 0x84, + 0xa0, 0xb8, 0xbe, + 0x5c, 0x66, 0x7f, + 0x7b, 0x9e, 0xa9, + 0x6f, 0x75, 0x7f, + 0x45, 0x54, 0x74, + 0x32, 0x3e, 0x63, + 0xb1, 0xb4, 0xb3, + 0x66, 0x9d, 0xb4, + 0x7a, 0x9f, 0xbb, + 0x82, 0xaa, 0xba, + 0x13, 0x15, 0x17, + 0x0b, 0x0b, 0x0a, + 0x37, 0x66, 0x92, + 0x4c, 0x7f, 0xa5, + 0x24, 0x4c, 0x7b, + 0x25, 0x5f, 0x91, + 0x40, 0x7d, 0xa5, + 0x1d, 0x56, 0x88, + 0x2d, 0x6f, 0xa0, + 0x70, 0x81, 0x8f, + 0x58, 0x97, 0xbd, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, +}; + +unsigned char logo_img[logo_width*logo_height] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x09, 0x0a, 0x0b, 0x07, 0x0c, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0d, 0x0e, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x09, 0x0f, 0x0b, 0x10, 0x11, 0x09, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x12, 0x13, 0x14, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x15, 0x16, 0x0b, 0x17, 0x18, 0x19, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x11, 0x13, 0x1a, 0x1b, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x1c, 0x1d, 0x10, 0x1e, 0x1f, 0x19, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x20, 0x0b, 0x1e, 0x21, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x19, 0x22, 0x0b, 0x17, 0x23, 0x24, 0x15, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x25, 0x26, 0x10, 0x23, 0x27, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x05, 0x05, 0x25, 0x27, 0x11, 0x28, 0x29, 0x11, 0x06, 0x0d, 0x09, 0x05, 0x2a, 0x2b, 0x2c, 0x2d, 0x1e, 0x2e, 0x21, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2f, 0x0b, 0x30, 0x31, 0x0c, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x15, 0x06, 0x16, 0x22, 0x1d, 0x2c, 0x32, 0x33, 0x17, 0x17, 0x17, 0x22, 0x14, 0x16, 0x1d, 0x2c, 0x2d, 0x1e, 0x2e, 0x34, 0x0c, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x2b, 0x2c, 0x36, 0x36, 0x35, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x27, 0x0b, 0x2c, 0x2c, 0x37, 0x32, 0x38, 0x2c, 0x2d, 0x39, 0x36, 0x17, 0x30, 0x2c, 0x2c, 0x2d, 0x2c, 0x2c, 0x1a, 0x3a, 0x3a, 0x3b, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0a, 0x2d, 0x2b, 0x33, 0x31, 0x0e, 0x05, 0x05, 0x05, 0x05, 0x09, 0x28, 0x2c, 0x37, 0x3c, 0x32, 0x38, 0x38, 0x37, 0x2c, 0x30, 0x36, 0x36, 0x17, 0x31, 0x36, 0x23, 0x23, 0x17, 0x2c, 0x17, 0x3a, 0x3d, 0x13, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x22, 0x2c, 0x37, 0x33, 0x3e, 0x31, 0x3f, 0x40, 0x19, 0x05, 0x11, 0x2c, 0x2c, 0x32, 0x32, 0x32, 0x38, 0x37, 0x41, 0x30, 0x3a, 0x3a, 0x2e, 0x42, 0x43, 0x17, 0x1a, 0x13, 0x23, 0x31, 0x1a, 0x2e, 0x3d, 0x1a, 0x09, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0b, 0x37, 0x32, 0x37, 0x33, 0x44, 0x44, 0x45, 0x17, 0x1a, 0x10, 0x2d, 0x37, 0x38, 0x46, 0x33, 0x46, 0x32, 0x2c, 0x23, 0x23, 0x47, 0x21, 0x13, 0x43, 0x34, 0x48, 0x19, 0x49, 0x34, 0x17, 0x1e, 0x3a, 0x13, 0x4a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4b, 0x32, 0x32, 0x32, 0x32, 0x4c, 0x45, 0x44, 0x44, 0x42, 0x36, 0x30, 0x33, 0x46, 0x38, 0x33, 0x46, 0x38, 0x31, 0x23, 0x27, 0x09, 0x4a, 0x4d, 0x47, 0x43, 0x0d, 0x4e, 0x4a, 0x4f, 0x34, 0x1a, 0x2e, 0x29, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x11, 0x33, 0x32, 0x32, 0x32, 0x33, 0x4c, 0x31, 0x45, 0x3e, 0x31, 0x36, 0x46, 0x46, 0x33, 0x33, 0x39, 0x30, 0x23, 0x50, 0x4a, 0x4a, 0x4a, 0x4a, 0x4d, 0x47, 0x51, 0x4e, 0x4a, 0x4a, 0x0e, 0x13, 0x1a, 0x27, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x2b, 0x32, 0x32, 0x2b, 0x32, 0x33, 0x4c, 0x33, 0x4c, 0x4c, 0x36, 0x30, 0x30, 0x30, 0x30, 0x31, 0x23, 0x3a, 0x49, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4f, 0x50, 0x1b, 0x4e, 0x4a, 0x19, 0x50, 0x16, 0x0c, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x32, 0x32, 0x32, 0x32, 0x2b, 0x33, 0x33, 0x30, 0x2d, 0x39, 0x30, 0x30, 0x30, 0x4c, 0x36, 0x42, 0x3a, 0x52, 0x05, 0x4a, 0x4a, 0x4a, 0x4a, 0x09, 0x3b, 0x52, 0x4e, 0x4a, 0x4a, 0x4f, 0x1a, 0x2a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4d, 0x2b, 0x2b, 0x32, 0x32, 0x32, 0x37, 0x2c, 0x2c, 0x2c, 0x2c, 0x2d, 0x10, 0x30, 0x30, 0x3e, 0x23, 0x3a, 0x0d, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x40, 0x51, 0x4a, 0x4a, 0x25, 0x15, 0x1f, 0x27, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x40, 0x22, 0x2c, 0x32, 0x32, 0x32, 0x38, 0x2d, 0x2c, 0x41, 0x32, 0x39, 0x46, 0x4c, 0x31, 0x2e, 0x2e, 0x0c, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x25, 0x53, 0x18, 0x4a, 0x54, 0x55, 0x56, 0x51, 0x11, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2a, 0x22, 0x32, 0x32, 0x32, 0x38, 0x38, 0x32, 0x2c, 0x37, 0x38, 0x30, 0x30, 0x3e, 0x3a, 0x3a, 0x2a, 0x4a, 0x4a, 0x05, 0x4a, 0x57, 0x58, 0x59, 0x5a, 0x35, 0x58, 0x5b, 0x5c, 0x5d, 0x5e, 0x4a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4d, 0x07, 0x37, 0x32, 0x38, 0x38, 0x32, 0x32, 0x41, 0x38, 0x30, 0x30, 0x3e, 0x3a, 0x3d, 0x27, 0x05, 0x4a, 0x4a, 0x4a, 0x5c, 0x5f, 0x59, 0x1d, 0x29, 0x2f, 0x60, 0x61, 0x26, 0x0b, 0x1c, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4e, 0x0a, 0x2d, 0x38, 0x38, 0x32, 0x37, 0x32, 0x2d, 0x39, 0x36, 0x31, 0x62, 0x3d, 0x0e, 0x4a, 0x4a, 0x4a, 0x09, 0x63, 0x64, 0x64, 0x61, 0x2d, 0x1d, 0x65, 0x61, 0x2b, 0x17, 0x16, 0x4a, 0x05, 0x05, 0x04, 0x03, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x27, 0x2c, 0x38, 0x38, 0x37, 0x37, 0x38, 0x2d, 0x30, 0x31, 0x42, 0x3a, 0x18, 0x09, 0x05, 0x05, 0x4a, 0x63, 0x60, 0x60, 0x2b, 0x10, 0x2d, 0x41, 0x41, 0x30, 0x42, 0x3e, 0x29, 0x09, 0x05, 0x05, 0x04, 0x03, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2a, 0x37, 0x32, 0x38, 0x32, 0x41, 0x38, 0x38, 0x30, 0x66, 0x31, 0x3a, 0x1e, 0x67, 0x4a, 0x4a, 0x05, 0x68, 0x64, 0x61, 0x2b, 0x17, 0x36, 0x10, 0x33, 0x31, 0x42, 0x3d, 0x45, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x1c, 0x2c, 0x32, 0x32, 0x37, 0x41, 0x2c, 0x46, 0x30, 0x36, 0x36, 0x42, 0x42, 0x29, 0x1b, 0x4a, 0x4a, 0x4d, 0x26, 0x60, 0x0b, 0x17, 0x36, 0x44, 0x45, 0x66, 0x3e, 0x44, 0x44, 0x1a, 0x05, 0x05, 0x05, 0x05, 0x05, 0x15, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0c, 0x2c, 0x32, 0x32, 0x38, 0x37, 0x32, 0x37, 0x30, 0x36, 0x4c, 0x31, 0x1e, 0x10, 0x1f, 0x52, 0x69, 0x52, 0x07, 0x2c, 0x10, 0x36, 0x62, 0x6a, 0x44, 0x6b, 0x3e, 0x44, 0x6c, 0x30, 0x09, 0x05, 0x05, 0x25, 0x54, 0x19, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x25, 0x2c, 0x37, 0x38, 0x37, 0x2c, 0x32, 0x32, 0x46, 0x30, 0x46, 0x4c, 0x31, 0x66, 0x4c, 0x36, 0x1a, 0x1a, 0x17, 0x37, 0x37, 0x10, 0x31, 0x62, 0x45, 0x4c, 0x3e, 0x44, 0x62, 0x30, 0x09, 0x05, 0x0a, 0x70, 0x71, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x22, 0x32, 0x32, 0x38, 0x41, 0x41, 0x38, 0x2d, 0x46, 0x66, 0x44, 0x6c, 0x6c, 0x6c, 0x3d, 0x3a, 0x42, 0x31, 0x32, 0x32, 0x32, 0x33, 0x33, 0x30, 0x36, 0x3e, 0x3e, 0x31, 0x07, 0x05, 0x12, 0x6e, 0x72, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x2d, 0x2c, 0x38, 0x32, 0x41, 0x37, 0x2d, 0x46, 0x66, 0x6a, 0x6c, 0x6d, 0x6d, 0x6c, 0x3d, 0x3d, 0x31, 0x38, 0x38, 0x39, 0x33, 0x39, 0x36, 0x30, 0x30, 0x66, 0x30, 0x40, 0x4d, 0x5f, 0x4d, 0x4d, 0x05, 0x05, 0x05, 0x15, 0x04, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x5a, 0x2d, 0x32, 0x32, 0x37, 0x37, 0x32, 0x38, 0x46, 0x46, 0x66, 0x45, 0x44, 0x62, 0x44, 0x44, 0x3e, 0x31, 0x31, 0x31, 0x31, 0x31, 0x33, 0x37, 0x30, 0x10, 0x06, 0x05, 0x12, 0x0a, 0x05, 0x05, 0x05, 0x08, 0x68, 0x73, 0x05, 0x04, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x22, 0x32, 0x32, 0x32, 0x3c, 0x37, 0x37, 0x2d, 0x39, 0x39, 0x39, 0x36, 0x36, 0x6b, 0x3e, 0x3e, 0x3e, 0x3e, 0x31, 0x4c, 0x39, 0x2d, 0x10, 0x16, 0x2a, 0x05, 0x05, 0x74, 0x74, 0x05, 0x05, 0x0c, 0x75, 0x5f, 0x1c, 0x05, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x40, 0x2c, 0x32, 0x32, 0x32, 0x41, 0x37, 0x41, 0x2c, 0x2c, 0x41, 0x2c, 0x33, 0x36, 0x31, 0x36, 0x31, 0x31, 0x17, 0x46, 0x2c, 0x16, 0x40, 0x05, 0x05, 0x05, 0x05, 0x20, 0x5f, 0x4d, 0x72, 0x76, 0x06, 0x25, 0x4a, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x40, 0x0b, 0x2d, 0x37, 0x2d, 0x2c, 0x2c, 0x37, 0x37, 0x38, 0x2c, 0x37, 0x2c, 0x10, 0x10, 0x39, 0x30, 0x0b, 0x2c, 0x11, 0x09, 0x05, 0x09, 0x4a, 0x05, 0x05, 0x19, 0x1d, 0x26, 0x76, 0x08, 0x05, 0x05, 0x05, 0x15, 0x25, 0x4d, 0x53, 0x77, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4d, 0x5a, 0x2c, 0x37, 0x2d, 0x2c, 0x37, 0x37, 0x39, 0x39, 0x33, 0x38, 0x2c, 0x2d, 0x2d, 0x2c, 0x5e, 0x2a, 0x05, 0x15, 0x3b, 0x17, 0x1f, 0x19, 0x05, 0x06, 0x26, 0x60, 0x5f, 0x0c, 0x05, 0x05, 0x05, 0x35, 0x68, 0x78, 0x56, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x2c, 0x2c, 0x2c, 0x37, 0x32, 0x37, 0x2c, 0x37, 0x32, 0x46, 0x33, 0x46, 0x39, 0x11, 0x15, 0x05, 0x05, 0x18, 0x31, 0x44, 0x6a, 0x30, 0x6e, 0x2b, 0x4b, 0x11, 0x5f, 0x63, 0x72, 0x54, 0x20, 0x74, 0x58, 0x25, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x15, 0x0b, 0x2c, 0x38, 0x2d, 0x39, 0x39, 0x2d, 0x37, 0x3c, 0x32, 0x37, 0x0b, 0x18, 0x05, 0x05, 0x05, 0x4e, 0x26, 0x32, 0x45, 0x6a, 0x46, 0x2b, 0x72, 0x4e, 0x05, 0x35, 0x0a, 0x75, 0x5f, 0x70, 0x08, 0x09, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x22, 0x2d, 0x30, 0x6b, 0x6b, 0x66, 0x36, 0x30, 0x36, 0x4c, 0x36, 0x30, 0x18, 0x05, 0x05, 0x05, 0x09, 0x4b, 0x32, 0x46, 0x66, 0x38, 0x0b, 0x09, 0x05, 0x05, 0x05, 0x05, 0x09, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0a, 0x2c, 0x2c, 0x31, 0x62, 0x62, 0x6b, 0x31, 0x45, 0x44, 0x44, 0x45, 0x31, 0x10, 0x0c, 0x4d, 0x0c, 0x08, 0x0b, 0x3c, 0x32, 0x33, 0x66, 0x17, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x22, 0x2c, 0x2d, 0x31, 0x45, 0x6b, 0x36, 0x31, 0x6b, 0x62, 0x45, 0x6a, 0x66, 0x30, 0x0b, 0x2c, 0x2c, 0x2c, 0x2c, 0x37, 0x46, 0x6b, 0x44, 0x62, 0x5e, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0c, 0x1d, 0x2c, 0x39, 0x36, 0x4c, 0x30, 0x30, 0x30, 0x36, 0x4c, 0x66, 0x4c, 0x36, 0x30, 0x37, 0x41, 0x2c, 0x2d, 0x2c, 0x3c, 0x33, 0x6b, 0x44, 0x44, 0x39, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x2d, 0x2d, 0x2d, 0x36, 0x39, 0x2d, 0x32, 0x38, 0x38, 0x46, 0x6a, 0x6d, 0x3d, 0x62, 0x46, 0x3c, 0x37, 0x2d, 0x32, 0x32, 0x32, 0x38, 0x4c, 0x30, 0x16, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0a, 0x37, 0x38, 0x38, 0x39, 0x37, 0x2c, 0x37, 0x37, 0x30, 0x45, 0x6d, 0x6d, 0x62, 0x62, 0x38, 0x3c, 0x3c, 0x32, 0x37, 0x32, 0x32, 0x32, 0x2c, 0x14, 0x15, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x6e, 0x37, 0x38, 0x38, 0x38, 0x37, 0x2c, 0x2d, 0x30, 0x31, 0x62, 0x6a, 0x6d, 0x6a, 0x6a, 0x46, 0x32, 0x32, 0x37, 0x37, 0x32, 0x30, 0x17, 0x29, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4a, 0x0b, 0x38, 0x38, 0x38, 0x2c, 0x2c, 0x0b, 0x2d, 0x39, 0x4c, 0x45, 0x6a, 0x6a, 0x6a, 0x6a, 0x6a, 0x38, 0x37, 0x2c, 0x41, 0x18, 0x1c, 0x0c, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x15, 0x0b, 0x2d, 0x38, 0x38, 0x37, 0x2c, 0x2c, 0x2c, 0x37, 0x32, 0x4c, 0x6b, 0x44, 0x44, 0x45, 0x6a, 0x45, 0x38, 0x37, 0x1c, 0x09, 0x05, 0x05, 0x04, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x1d, 0x38, 0x38, 0x38, 0x38, 0x2c, 0x3c, 0x37, 0x37, 0x32, 0x32, 0x46, 0x36, 0x1e, 0x6b, 0x4c, 0x46, 0x32, 0x22, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x37, 0x32, 0x37, 0x38, 0x38, 0x37, 0x32, 0x3c, 0x32, 0x32, 0x37, 0x38, 0x2d, 0x2d, 0x38, 0x2c, 0x2c, 0x4f, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x08, 0x3c, 0x37, 0x41, 0x38, 0x2d, 0x37, 0x37, 0x3c, 0x32, 0x3c, 0x32, 0x37, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0c, 0x41, 0x3c, 0x3c, 0x38, 0x32, 0x3c, 0x3c, 0x3c, 0x41, 0x32, 0x41, 0x37, 0x2c, 0x2c, 0x41, 0x38, 0x45, 0x18, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2a, 0x2c, 0x3c, 0x37, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x37, 0x2c, 0x2c, 0x2c, 0x2c, 0x4c, 0x45, 0x6a, 0x1a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x11, 0x2c, 0x37, 0x41, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x41, 0x37, 0x37, 0x4c, 0x44, 0x6d, 0x6a, 0x1a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x5a, 0x2c, 0x41, 0x3c, 0x3c, 0x3c, 0x32, 0x2c, 0x32, 0x2c, 0x2c, 0x38, 0x38, 0x36, 0x45, 0x62, 0x44, 0x45, 0x29, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2a, 0x2c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x37, 0x37, 0x32, 0x37, 0x39, 0x4c, 0x4c, 0x45, 0x62, 0x44, 0x62, 0x30, 0x2a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4a, 0x5a, 0x41, 0x3c, 0x3c, 0x3c, 0x3c, 0x32, 0x3c, 0x37, 0x37, 0x2d, 0x46, 0x4c, 0x6b, 0x6b, 0x45, 0x3e, 0x36, 0x29, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x27, 0x3c, 0x37, 0x3c, 0x3c, 0x37, 0x37, 0x32, 0x38, 0x37, 0x37, 0x37, 0x38, 0x39, 0x36, 0x4c, 0x30, 0x10, 0x16, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x04, 0x05, 0x05, 0x25, 0x1d, 0x37, 0x37, 0x41, 0x32, 0x3c, 0x32, 0x41, 0x37, 0x32, 0x2c, 0x41, 0x37, 0x2c, 0x32, 0x37, 0x2c, 0x2c, 0x5a, 0x0c, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x05, 0x05, 0x15, 0x5a, 0x37, 0x2c, 0x41, 0x2c, 0x2c, 0x41, 0x37, 0x41, 0x41, 0x3c, 0x2c, 0x41, 0x41, 0x3c, 0x37, 0x2c, 0x39, 0x0b, 0x0b, 0x25, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x2a, 0x22, 0x2d, 0x37, 0x2c, 0x3c, 0x1d, 0x2c, 0x38, 0x2c, 0x41, 0x2c, 0x2c, 0x2d, 0x39, 0x37, 0x3c, 0x37, 0x30, 0x1a, 0x5e, 0x6e, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x2a, 0x6e, 0x0b, 0x2d, 0x38, 0x41, 0x41, 0x6e, 0x5a, 0x2c, 0x41, 0x32, 0x38, 0x32, 0x39, 0x3f, 0x6f, 0x16, 0x37, 0x1a, 0x1f, 0x1f, 0x16, 0x1d, 0x0c, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x09, 0x40, 0x07, 0x2c, 0x37, 0x2c, 0x2d, 0x2c, 0x1d, 0x0e, 0x09, 0x0b, 0x4b, 0x07, 0x41, 0x38, 0x2d, 0x10, 0x2d, 0x10, 0x0b, 0x2b, 0x33, 0x3f, 0x21, 0x29, 0x07, 0x5e, 0x2f, 0x12, 0x08, 0x2a, 0x0c, 0x25, 0x09, 0x09, 0x09, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x19, 0x40, 0x28, 0x22, 0x2c, 0x38, 0x32, 0x32, 0x32, 0x1d, 0x0e, 0x19, 0x05, 0x35, 0x2c, 0x4b, 0x70, 0x0b, 0x32, 0x2c, 0x16, 0x16, 0x16, 0x0b, 0x22, 0x26, 0x0b, 0x10, 0x3f, 0x29, 0x1f, 0x47, 0x1f, 0x1f, 0x5e, 0x0b, 0x4b, 0x74, 0x84, 0x74, 0x84, 0x06, 0x35, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x09, 0x4d, 0x27, 0x0a, 0x22, 0x1d, 0x2c, 0x2c, 0x37, 0x32, 0x41, 0x41, 0x16, 0x27, 0x15, 0x09, 0x4a, 0x09, 0x28, 0x2d, 0x0b, 0x76, 0x2c, 0x37, 0x2d, 0x37, 0x32, 0x37, 0x0b, 0x0b, 0x5e, 0x5a, 0x4b, 0x0b, 0x0b, 0x07, 0x6e, 0x16, 0x5e, 0x10, 0x76, 0x5c, 0x68, 0x79, 0x7a, 0x53, 0x71, 0x54, 0x5d, 0x08, 0x4d, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x25, 0x27, 0x28, 0x0b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x41, 0x41, 0x41, 0x22, 0x11, 0x35, 0x4d, 0x4d, 0x35, 0x1c, 0x06, 0x0a, 0x22, 0x38, 0x38, 0x37, 0x38, 0x38, 0x38, 0x2d, 0x39, 0x39, 0x39, 0x10, 0x39, 0x10, 0x4b, 0x12, 0x08, 0x35, 0x67, 0x2a, 0x08, 0x74, 0x70, 0x81, 0x55, 0x78, 0x79, 0x57, 0x53, 0x71, 0x71, 0x73, 0x84, 0x25, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x05, 0x09, 0x27, 0x16, 0x0b, 0x2c, 0x2d, 0x2c, 0x41, 0x41, 0x1d, 0x22, 0x5a, 0x0f, 0x14, 0x0a, 0x28, 0x0a, 0x28, 0x28, 0x28, 0x6e, 0x5a, 0x65, 0x1d, 0x0b, 0x2d, 0x38, 0x46, 0x38, 0x38, 0x38, 0x39, 0x2d, 0x46, 0x39, 0x30, 0x39, 0x4b, 0x68, 0x79, 0x7a, 0x57, 0x67, 0x67, 0x56, 0x53, 0x71, 0x68, 0x7e, 0x85, 0x59, 0x73, 0x79, 0x54, 0x7a, 0x54, 0x06, 0x1c, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x4d, 0x16, 0x0b, 0x10, 0x39, 0x2d, 0x0b, 0x28, 0x06, 0x2a, 0x25, 0x35, 0x06, 0x11, 0x0a, 0x28, 0x07, 0x5a, 0x22, 0x26, 0x5a, 0x41, 0x7b, 0x7c, 0x60, 0x76, 0x22, 0x1d, 0x32, 0x38, 0x46, 0x46, 0x46, 0x38, 0x38, 0x38, 0x38, 0x2b, 0x75, 0x7d, 0x7e, 0x55, 0x78, 0x7a, 0x57, 0x57, 0x57, 0x71, 0x20, 0x68, 0x55, 0x85, 0x7a, 0x57, 0x53, 0x71, 0x57, 0x5d, 0x19, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x0c, 0x16, 0x0b, 0x30, 0x39, 0x18, 0x2a, 0x09, 0x05, 0x4e, 0x19, 0x25, 0x0c, 0x27, 0x11, 0x0a, 0x0a, 0x2f, 0x5a, 0x5a, 0x26, 0x5a, 0x7b, 0x7c, 0x7c, 0x61, 0x7f, 0x7f, 0x7f, 0x76, 0x22, 0x22, 0x0b, 0x2d, 0x0b, 0x2d, 0x2d, 0x33, 0x0b, 0x5f, 0x80, 0x7d, 0x5c, 0x81, 0x55, 0x59, 0x59, 0x73, 0x73, 0x54, 0x5c, 0x5c, 0x7e, 0x55, 0x59, 0x73, 0x7a, 0x71, 0x19, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x09, 0x25, 0x08, 0x07, 0x5e, 0x10, 0x22, 0x1c, 0x4a, 0x05, 0x09, 0x05, 0x15, 0x4d, 0x19, 0x19, 0x4d, 0x08, 0x12, 0x74, 0x0f, 0x6e, 0x5a, 0x26, 0x1d, 0x7b, 0x7b, 0x7c, 0x7c, 0x7c, 0x61, 0x5b, 0x82, 0x82, 0x80, 0x80, 0x82, 0x7f, 0x7f, 0x7f, 0x7f, 0x5b, 0x7f, 0x82, 0x80, 0x7d, 0x5c, 0x7e, 0x79, 0x54, 0x54, 0x7a, 0x73, 0x0f, 0x2a, 0x25, 0x19, 0x09, 0x4a, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x4d, 0x2a, 0x06, 0x74, 0x28, 0x22, 0x22, 0x2d, 0x2c, 0x0e, 0x05, 0x05, 0x05, 0x05, 0x05, 0x3b, 0x07, 0x19, 0x09, 0x25, 0x0c, 0x27, 0x12, 0x0f, 0x2f, 0x26, 0x26, 0x1d, 0x65, 0x65, 0x7c, 0x7c, 0x7b, 0x7c, 0x7b, 0x7b, 0x60, 0x5b, 0x7f, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x80, 0x80, 0x83, 0x83, 0x81, 0x7e, 0x59, 0x73, 0x73, 0x84, 0x5d, 0x25, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x19, 0x08, 0x12, 0x0a, 0x0f, 0x6e, 0x5a, 0x26, 0x22, 0x2c, 0x2c, 0x0b, 0x27, 0x05, 0x05, 0x05, 0x15, 0x1e, 0x1e, 0x6f, 0x0c, 0x09, 0x15, 0x0c, 0x20, 0x12, 0x0f, 0x6e, 0x5a, 0x26, 0x26, 0x26, 0x65, 0x65, 0x65, 0x65, 0x7b, 0x7c, 0x7b, 0x65, 0x7b, 0x61, 0x61, 0x60, 0x64, 0x64, 0x64, 0x5b, 0x5b, 0x5f, 0x63, 0x70, 0x63, 0x58, 0x5d, 0x2a, 0x15, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x4a, 0x4d, 0x27, 0x11, 0x0a, 0x28, 0x6e, 0x5a, 0x26, 0x65, 0x41, 0x1d, 0x2c, 0x2c, 0x5e, 0x29, 0x0e, 0x14, 0x17, 0x31, 0x6b, 0x30, 0x14, 0x25, 0x09, 0x15, 0x4d, 0x08, 0x74, 0x0a, 0x0f, 0x2f, 0x5a, 0x26, 0x26, 0x1d, 0x1d, 0x1d, 0x2b, 0x65, 0x1d, 0x41, 0x65, 0x65, 0x7b, 0x65, 0x65, 0x1d, 0x6e, 0x74, 0x5d, 0x1c, 0x25, 0x15, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x19, 0x4d, 0x08, 0x06, 0x0a, 0x2f, 0x6e, 0x2f, 0x6e, 0x26, 0x41, 0x7b, 0x65, 0x41, 0x37, 0x33, 0x30, 0x36, 0x36, 0x4c, 0x6b, 0x66, 0x30, 0x14, 0x35, 0x4a, 0x09, 0x15, 0x15, 0x25, 0x25, 0x0c, 0x1c, 0x08, 0x06, 0x5d, 0x5d, 0x5d, 0x0e, 0x06, 0x12, 0x06, 0x08, 0x1c, 0x2a, 0x0c, 0x19, 0x09, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x09, 0x19, 0x35, 0x08, 0x12, 0x28, 0x2f, 0x2f, 0x6e, 0x5a, 0x41, 0x7c, 0x3c, 0x3c, 0x2c, 0x41, 0x2d, 0x2d, 0x39, 0x30, 0x4c, 0x4c, 0x66, 0x66, 0x31, 0x24, 0x20, 0x4a, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x4a, 0x09, 0x4a, 0x09, 0x09, 0x05, 0x09, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x15, 0x0c, 0x1c, 0x12, 0x28, 0x2f, 0x5a, 0x1d, 0x7c, 0x7b, 0x41, 0x7b, 0x3c, 0x7b, 0x3c, 0x41, 0x41, 0x5a, 0x16, 0x28, 0x14, 0x14, 0x14, 0x3b, 0x12, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x4a, 0x09, 0x15, 0x1c, 0x12, 0x12, 0x0a, 0x0f, 0x2f, 0x07, 0x2f, 0x0a, 0x12, 0x27, 0x0c, 0x4d, 0x15, 0x09, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x09, 0x15, 0x15, 0x15, 0x19, 0x4e, 0x4e, 0x05, 0x4a, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +unsigned int logo_img_size = sizeof(logo_img); From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:04:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69E7C106564A; Wed, 7 Apr 2010 17:04:18 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 8447F8FC16; Wed, 7 Apr 2010 17:04:17 +0000 (UTC) Received: by bwz8 with SMTP id 8so1092055bwz.3 for ; Wed, 07 Apr 2010 10:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=518jgS9y1AShbWeOMopy8YgYE8eUjczskn60D0QQ0Hs=; b=S1VgwmM4gBmgSCdXQktDTvpOdFhnRFhmwx535xR6zVeALzzoEBCyx+oslTwNxhYuVU tMKFRROaSwlqV76MBi1+EVVQIUClypGV31cRWTACYWbEnkY3ACdGSMU4GROVCevqKlU8 GuSqA7qa/hXYgVix5KlzvKiHnmZz/sa/25NHQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=CZddijdok6gDStTG/jrtGMetJcgMrbu4wXZCI/4bSQW0fUlJMq4ntSEJ+Xded3Thow KeQvrRle6oPdTqe6NezSi0nddRWQxXFhajqJIMd2S9FWxruvqVrpY8w3zM4g3lRH3xKr O75HPYiACXpMaNh6EhHB43MqjblFzSHW9gAOg= Received: by 10.204.136.156 with SMTP id r28mr158881bkt.112.1270659856120; Wed, 07 Apr 2010 10:04:16 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id x16sm18725788bku.17.2010.04.07.10.04.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Apr 2010 10:04:14 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 7 Apr 2010 10:04:04 -0700 From: Pyun YongHyeon Date: Wed, 7 Apr 2010 10:04:04 -0700 To: Andre Albsmeier Message-ID: <20100407170404.GA5734@michelle.cdnetworks.com> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> <20100405145937.GA78871@curry.mchp.siemens.de> <20100405180642.GD1225@michelle.cdnetworks.com> <20100406134626.GA1727@curry.mchp.siemens.de> <20100406180027.GA3724@curry.mchp.siemens.de> <20100406184456.GA1087@michelle.cdnetworks.com> <20100406195936.GA48023@curry.mchp.siemens.de> <20100406202949.GB1087@michelle.cdnetworks.com> <20100407053417.GB2899@curry.mchp.siemens.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100407053417.GB2899@curry.mchp.siemens.de> User-Agent: Mutt/1.4.2.3i Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , Pyun YongHyeon Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:04:18 -0000 On Wed, Apr 07, 2010 at 07:34:17AM +0200, Andre Albsmeier wrote: > On Tue, 06-Apr-2010 at 22:29:49 +0200, Pyun YongHyeon wrote: > > On Tue, Apr 06, 2010 at 09:59:36PM +0200, Andre Albsmeier wrote: > > > On Tue, 06-Apr-2010 at 20:44:56 +0200, Pyun YongHyeon wrote: > > > > On Tue, Apr 06, 2010 at 08:00:27PM +0200, Andre Albsmeier wrote: > > > > > On Tue, 06-Apr-2010 at 15:46:26 +0200, Andre Albsmeier wrote: > > > > > > On Mon, 05-Apr-2010 at 20:06:42 +0200, Pyun YongHyeon wrote: > > > > > > > > [...] > > > > > > > > > > > As you know 1.18.2.38 removed taskqueue based interrupt handling so > > > > > > > it could be culprit of the issue. But that revision also removed > > > > > > > two register accesses in TX path so I'd like to know which one > > > > > > > caused the issue. > > > > > > > > > > > > I have now tried rev. 1.18.2.38 with this patch (no idea if > > > > > > this is right ;-)): > > > > > > > > > > > > --- if_msk.c.1.18.2.38 2010-04-06 15:09:19.000000000 +0200 > > > > > > +++ if_msk.c.1.18.2.38.TRY 2010-04-06 15:38:13.000000000 +0200 > > > > > > @@ -3327,6 +3327,11 @@ > > > > > > uint32_t control, status; > > > > > > int cons, len, port, rxprog; > > > > > > > > > > > > + int idx; > > > > > > + idx = CSR_READ_2(sc, STAT_PUT_IDX); > > > > > > + if (idx == sc->msk_stat_cons) > > > > > > + return (0); > > > > > > + > > > > > > /* Sync status LEs. */ > > > > > > bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, > > > > > > BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > > > > > > @@ -3407,7 +3412,7 @@ > > > > > > if (rxput[MSK_PORT_B] > 0) > > > > > > msk_rxput(sc->msk_if[MSK_PORT_B]); > > > > > > > > > > > > - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); > > > > > > + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); > > > > > > } > > > > > > > > > > > > static void > > > > > > > > > > > > Now performance seems to be the same as with the older > > > > > > driver (at least here at work) and in both directions! > > > > > > Some numbers: > > > > > > > > > > > > em0 writes to rev. 1.18.2.36: 20 seconds > > > > > > em0 writes to rev. 1.18.2.38: 50 seconds > > > > > > em0 writes to rev. 1.18.2.38 with patch from above: 23 seconds > > > > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > > > > > > > rev. 1.18.2.36 writes to em0: 22 seconds > > > > > > rev. 1.18.2.38 writes to em0: 40 seconds > > > > > > rev. 1.18.2.38 with patch from above writes to em0: 21 seconds > > > > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > > > > > > > It seems that these two CSR_READ_2s really help ;-). > > > > > > > > > > > > As I said, this is at work and with slightly different machines. > > > > > > I will try things at home later but I am rather confident of > > > > > > receiving good results there as well... > > > > > > > > > > OK, tests at home show similar good results with the > > > > > above patch. When setting int_holdoff to 3, performance > > > > > seems equal to the older versions. > > > > > > > > > > > > > Thanks a lot for narrowing down the issue. > > > > Because the msk_handle_events() are called in interrupt handler > > > > I'd like to remove the two register accesses in fast path. It seems > > > > accessing STAT_PUT_IDX triggers status updates. Would you try > > > > attached patch and let me know whether the patch makes any > > > > difference? > > > > > > > Index: sys/dev/msk/if_msk.c > > > > =================================================================== > > > > --- sys/dev/msk/if_msk.c (revision 206204) > > > > +++ sys/dev/msk/if_msk.c (working copy) > > > > @@ -1470,6 +1470,7 @@ > > > > /* WA for dev. #4.18 */ > > > > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x21); > > > > CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x07); > > > > + CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 10)); > > > > } else { > > > > CSR_WRITE_2(sc, STAT_TX_IDX_TH, 0x0a); > > > > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x10); > > > > @@ -1481,9 +1482,16 @@ > > > > CSR_WRITE_4(sc, STAT_ISR_TIMER_INI, 0x0190); > > > > } > > > > /* > > > > - * Use default value for STAT_ISR_TIMER_INI, STAT_LEV_TIMER_INI. > > > > + * STAT_TX_TIMER_INI, STAT_ISR_TIMER_INI and STAT_LEV_TIMER_INI > > > > + * as well as various water mark registers seem to control when > > > > + * controller initiates status LE update. > > > > + * It's not clear how these registers interact with interrupt > > > > + * state but STAT_TX_TIMER_INI seems to control status update > > > > + * time after crossing a threshold(STAT_TX_IDX_TH) value. Due to > > > > + * the complexity of various parameters that may affect status > > > > + * update just use hardware default until we know better > > > > + * the internal things of status updates. > > > > */ > > > > - CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 1000)); > > > > > > > > /* Enable status unit. */ > > > > CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_OP_ON); > > > > > > After applying this patch against an original 1.18.2.39 > > > things became even worse. After 4 minutes of waiting I > > > aborted untar'ing the file ;-). Setting int_holdoff=2 > > > made things better, now it took 65 seconds for untar'ing... > > > > > > > :-( > > > > By chance, did you disable MSI(msi_disable=1)? > > Yes. Do you want me to test again with MSI enabled? > Hmm, after reading code again MSI does not seem to trigger the issue. I'll revert that part of code. Thank you very much for testing and reporting! From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:07:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AD021065688; Wed, 7 Apr 2010 17:07:06 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38B448FC20; Wed, 7 Apr 2010 17:07:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37H76Pc057494; Wed, 7 Apr 2010 17:07:06 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37H76OW057492; Wed, 7 Apr 2010 17:07:06 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004071707.o37H76OW057492@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Apr 2010 17:07:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206363 - head/sys/dev/syscons/logo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:07:06 -0000 Author: jkim Date: Wed Apr 7 17:07:06 2010 New Revision: 206363 URL: http://svn.freebsd.org/changeset/base/206363 Log: Add the official FreeBSD logo image file for logo_saver. Modified: head/sys/dev/syscons/logo/logo.c Modified: head/sys/dev/syscons/logo/logo.c ============================================================================== --- head/sys/dev/syscons/logo/logo.c Wed Apr 7 17:03:05 2010 (r206362) +++ head/sys/dev/syscons/logo/logo.c Wed Apr 7 17:07:06 2010 (r206363) @@ -1,358 +1,841 @@ /* $FreeBSD$ */ -#define logo_width 88 -#define logo_height 88 +#define LOGO_WIDTH 66 +#define LOGO_HEIGHT 69 -unsigned int logo_w = logo_width; -unsigned int logo_h = logo_height; +unsigned int logo_w = LOGO_WIDTH; +unsigned int logo_h = LOGO_HEIGHT; -unsigned char logo_pal[768] = { - 0x00, 0x00, 0x00, - 0x33, 0x33, 0x33, - 0x66, 0x66, 0x66, - 0x99, 0x99, 0x99, - 0xcc, 0xcc, 0xcc, - 0xff, 0xff, 0xff, - 0x90, 0x8f, 0x90, - 0x56, 0x4b, 0x55, - 0xa3, 0xa5, 0xab, - 0xfd, 0xfd, 0xfd, - 0x6d, 0x6e, 0x74, - 0x41, 0x2b, 0x39, - 0xcb, 0xc8, 0xcb, - 0xcf, 0xbb, 0xba, - 0x8e, 0x82, 0x87, - 0x5c, 0x5d, 0x60, - 0x52, 0x2a, 0x37, - 0x7f, 0x76, 0x7d, - 0x82, 0x82, 0x85, - 0x7a, 0x3e, 0x45, - 0x7f, 0x6e, 0x70, - 0xef, 0xef, 0xed, - 0x53, 0x41, 0x4b, - 0x67, 0x2b, 0x35, - 0x6a, 0x55, 0x62, - 0xe7, 0xe2, 0xe3, - 0x64, 0x35, 0x3f, - 0xf7, 0xe0, 0xe7, - 0xb1, 0xb2, 0xb2, - 0x31, 0x2b, 0x35, - 0x7a, 0x2d, 0x37, - 0x69, 0x4c, 0x56, - 0x95, 0x9d, 0xa4, - 0x85, 0x61, 0x69, - 0x40, 0x34, 0x41, - 0x8f, 0x2e, 0x39, - 0x7a, 0x50, 0x5a, - 0xde, 0xe1, 0xe0, - 0x32, 0x33, 0x3d, - 0xa0, 0x9b, 0x9c, - 0x68, 0x63, 0x67, - 0x76, 0x60, 0x67, - 0xba, 0xb6, 0xb8, - 0x29, 0x24, 0x41, - 0x38, 0x21, 0x29, - 0x42, 0x21, 0x27, - 0xa2, 0x2a, 0x32, - 0x56, 0x55, 0x58, - 0x55, 0x21, 0x2b, - 0x7a, 0x20, 0x2a, - 0x37, 0x16, 0x21, - 0x4d, 0x18, 0x37, - 0x8a, 0x3a, 0x3e, - 0xc0, 0xc2, 0xc4, - 0x64, 0x23, 0x2c, - 0x37, 0x1a, 0x24, - 0x42, 0x18, 0x20, - 0x4c, 0x21, 0x2b, - 0xa0, 0x23, 0x2e, - 0x95, 0x6c, 0x76, - 0x26, 0x16, 0x1c, - 0xa5, 0x18, 0x23, - 0x84, 0x20, 0x2b, - 0x6d, 0x3f, 0x49, - 0xae, 0xa7, 0xac, - 0x2a, 0x1f, 0x24, - 0x90, 0x21, 0x30, - 0xa0, 0x39, 0x3e, - 0x95, 0x0f, 0x1c, - 0x84, 0x13, 0x1e, - 0x4e, 0x17, 0x24, - 0x8c, 0x56, 0x5f, - 0xe0, 0xc4, 0xcb, - 0xa5, 0x7f, 0x8e, - 0xff, 0xff, 0xf1, - 0x3d, 0x3d, 0x5d, - 0x61, 0x19, 0x26, - 0xd5, 0xd5, 0xd5, - 0xff, 0xf1, 0xed, - 0xb6, 0x9c, 0xa5, - 0x87, 0x4c, 0x5a, - 0xa0, 0x76, 0x76, - 0xc8, 0xa0, 0xa0, - 0xa2, 0xc1, 0xc8, - 0x91, 0xae, 0xb6, - 0x52, 0x8b, 0xae, - 0xb3, 0xd2, 0xd4, - 0x95, 0xb7, 0xc1, - 0x54, 0x6e, 0x83, - 0x67, 0x90, 0xa6, - 0x44, 0x3e, 0x45, - 0x23, 0x40, 0x6a, - 0x41, 0x6e, 0x97, - 0x7e, 0x8e, 0x91, - 0x52, 0x33, 0x41, - 0x39, 0x49, 0x68, - 0x1d, 0x2a, 0x48, - 0x17, 0x21, 0x45, - 0x90, 0x17, 0x1f, - 0x38, 0x54, 0x71, - 0x1c, 0x33, 0x58, - 0x1c, 0x1e, 0x23, - 0x6c, 0x17, 0x21, - 0xb0, 0xc5, 0xc1, - 0x5d, 0x7f, 0x96, - 0xe9, 0xbf, 0xc1, - 0x96, 0x06, 0x0f, - 0x78, 0x16, 0x1e, - 0xab, 0x0e, 0x18, - 0xa6, 0x06, 0x0e, - 0x4c, 0x4c, 0x54, - 0x61, 0x42, 0x4c, - 0x48, 0x5f, 0x84, - 0xa0, 0xb8, 0xbe, - 0x5c, 0x66, 0x7f, - 0x7b, 0x9e, 0xa9, - 0x6f, 0x75, 0x7f, - 0x45, 0x54, 0x74, - 0x32, 0x3e, 0x63, - 0xb1, 0xb4, 0xb3, - 0x66, 0x9d, 0xb4, - 0x7a, 0x9f, 0xbb, - 0x82, 0xaa, 0xba, - 0x13, 0x15, 0x17, - 0x0b, 0x0b, 0x0a, - 0x37, 0x66, 0x92, - 0x4c, 0x7f, 0xa5, - 0x24, 0x4c, 0x7b, - 0x25, 0x5f, 0x91, - 0x40, 0x7d, 0xa5, - 0x1d, 0x56, 0x88, - 0x2d, 0x6f, 0xa0, - 0x70, 0x81, 0x8f, - 0x58, 0x97, 0xbd, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, +unsigned char logo_pal[256 * 3] = { + 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, + 0x0b, 0x0b, 0x0b, + 0x13, 0x01, 0x01, + 0x1b, 0x05, 0x04, + 0x13, 0x13, 0x13, + 0x1b, 0x1b, 0x1b, + 0x1c, 0x15, 0x14, + 0x25, 0x03, 0x01, + 0x33, 0x0e, 0x0c, + 0x23, 0x21, 0x1a, + 0x23, 0x23, 0x23, + 0x2b, 0x2b, 0x2b, + 0x3c, 0x3c, 0x3c, + 0x34, 0x32, 0x32, + 0x35, 0x30, 0x2a, + 0x58, 0x00, 0x00, + 0x4c, 0x0f, 0x0d, + 0x47, 0x24, 0x15, + 0x6c, 0x01, 0x01, + 0x66, 0x09, 0x09, + 0x66, 0x17, 0x15, + 0x74, 0x01, 0x00, + 0x7b, 0x00, 0x00, + 0x77, 0x09, 0x08, + 0x79, 0x19, 0x17, + 0x6e, 0x3e, 0x3e, + 0x76, 0x35, 0x35, + 0x72, 0x2b, 0x26, + 0x65, 0x2a, 0x20, + 0x5a, 0x4f, 0x32, + 0x44, 0x44, 0x44, + 0x4b, 0x4a, 0x4a, + 0x57, 0x56, 0x56, + 0x56, 0x4d, 0x4c, + 0x77, 0x45, 0x45, + 0x6d, 0x5d, 0x4f, + 0x6c, 0x6c, 0x6c, + 0x62, 0x62, 0x62, + 0x76, 0x75, 0x75, + 0x72, 0x67, 0x55, + 0x84, 0x00, 0x00, + 0x8b, 0x00, 0x00, + 0x88, 0x0c, 0x0b, + 0x89, 0x18, 0x17, + 0x93, 0x00, 0x00, + 0x9b, 0x00, 0x00, + 0x99, 0x0a, 0x06, + 0x95, 0x17, 0x16, + 0x95, 0x11, 0x0c, + 0x87, 0x2a, 0x29, + 0x99, 0x29, 0x27, + 0x98, 0x37, 0x37, + 0x86, 0x39, 0x34, + 0xa4, 0x00, 0x00, + 0xab, 0x00, 0x00, + 0xab, 0x0c, 0x01, + 0xa7, 0x0b, 0x06, + 0xa8, 0x13, 0x0a, + 0xa6, 0x16, 0x15, + 0xb3, 0x00, 0x00, + 0xbb, 0x00, 0x00, + 0xb7, 0x0a, 0x03, + 0xb3, 0x12, 0x00, + 0xba, 0x15, 0x03, + 0xb5, 0x18, 0x17, + 0xb7, 0x27, 0x03, + 0xb9, 0x27, 0x18, + 0xa8, 0x2a, 0x16, + 0xa8, 0x26, 0x25, + 0xb9, 0x2a, 0x29, + 0xb6, 0x39, 0x37, + 0xab, 0x35, 0x2f, + 0xae, 0x4c, 0x36, + 0x93, 0x5d, 0x39, + 0x90, 0x4e, 0x4b, + 0x91, 0x67, 0x56, + 0x8a, 0x75, 0x70, + 0xa8, 0x49, 0x47, + 0xb4, 0x5a, 0x58, + 0xb2, 0x53, 0x4b, + 0xac, 0x71, 0x53, + 0xb8, 0x7a, 0x78, + 0xb2, 0x65, 0x64, + 0xc3, 0x01, 0x00, + 0xc3, 0x0a, 0x00, + 0xcb, 0x00, 0x00, + 0xca, 0x0b, 0x00, + 0xc7, 0x08, 0x08, + 0xc5, 0x13, 0x00, + 0xcb, 0x12, 0x00, + 0xcb, 0x1a, 0x01, + 0xc3, 0x18, 0x05, + 0xc9, 0x17, 0x14, + 0xd3, 0x00, 0x00, + 0xd2, 0x0b, 0x00, + 0xdb, 0x00, 0x00, + 0xd8, 0x0c, 0x05, + 0xd3, 0x14, 0x00, + 0xd3, 0x1b, 0x01, + 0xdb, 0x1c, 0x01, + 0xd9, 0x14, 0x03, + 0xd5, 0x18, 0x15, + 0xc8, 0x25, 0x01, + 0xd4, 0x23, 0x02, + 0xd3, 0x2b, 0x01, + 0xdb, 0x22, 0x01, + 0xdb, 0x2a, 0x01, + 0xd5, 0x27, 0x1c, + 0xd6, 0x33, 0x02, + 0xdb, 0x33, 0x02, + 0xda, 0x3a, 0x03, + 0xd4, 0x3c, 0x1a, + 0xc8, 0x33, 0x17, + 0xca, 0x29, 0x24, + 0xc8, 0x32, 0x2b, + 0xd3, 0x35, 0x2d, + 0xe3, 0x00, 0x00, + 0xeb, 0x00, 0x00, + 0xea, 0x0b, 0x00, + 0xe5, 0x18, 0x03, + 0xf1, 0x03, 0x00, + 0xf4, 0x0b, 0x00, + 0xf4, 0x17, 0x01, + 0xe2, 0x24, 0x01, + 0xe3, 0x2a, 0x01, + 0xe9, 0x2c, 0x02, + 0xea, 0x28, 0x07, + 0xe3, 0x33, 0x01, + 0xe3, 0x3b, 0x02, + 0xea, 0x33, 0x02, + 0xeb, 0x3c, 0x02, + 0xe9, 0x3c, 0x09, + 0xf4, 0x25, 0x04, + 0xf3, 0x34, 0x0e, + 0xed, 0x35, 0x29, + 0xd9, 0x45, 0x0b, + 0xd7, 0x43, 0x14, + 0xc8, 0x40, 0x19, + 0xd7, 0x56, 0x3a, + 0xcf, 0x46, 0x34, + 0xec, 0x43, 0x03, + 0xeb, 0x4c, 0x04, + 0xe4, 0x47, 0x05, + 0xe9, 0x58, 0x17, + 0xf0, 0x47, 0x03, + 0xf1, 0x4f, 0x11, + 0xee, 0x4a, 0x2d, + 0xee, 0x6d, 0x19, + 0xee, 0x6c, 0x34, + 0xcf, 0x66, 0x33, + 0xc9, 0x4b, 0x49, + 0xc6, 0x57, 0x57, + 0xdb, 0x55, 0x4a, + 0xd7, 0x58, 0x52, + 0xcf, 0x4e, 0x49, + 0xd3, 0x69, 0x54, + 0xc9, 0x69, 0x67, + 0xc9, 0x77, 0x76, + 0xda, 0x7a, 0x77, + 0xd3, 0x72, 0x6d, + 0xf5, 0x59, 0x4c, + 0xed, 0x71, 0x51, + 0xe5, 0x74, 0x65, + 0xef, 0x76, 0x6e, + 0xb6, 0x8c, 0x6b, + 0xa4, 0x8c, 0x63, + 0xf2, 0x98, 0x28, + 0xf2, 0x92, 0x36, + 0xf3, 0xa8, 0x2b, + 0xf6, 0xb4, 0x35, + 0xed, 0xaa, 0x34, + 0xdb, 0x95, 0x2c, + 0xf1, 0x8f, 0x52, + 0xfa, 0x87, 0x67, + 0xfa, 0x97, 0x75, + 0xef, 0x8e, 0x73, + 0xf2, 0xb1, 0x4f, + 0xf5, 0xa6, 0x79, + 0xf0, 0xae, 0x71, + 0xd1, 0x88, 0x76, + 0xf6, 0xcc, 0x69, + 0xfc, 0xe9, 0x76, + 0x89, 0x89, 0x89, + 0x98, 0x97, 0x97, + 0x90, 0x8f, 0x8f, + 0xb3, 0x94, 0x89, + 0xa6, 0xa6, 0xa5, + 0xb8, 0xb8, 0xb8, + 0xb2, 0xa8, 0xa6, + 0xc3, 0x8c, 0x8b, + 0xd5, 0x88, 0x87, + 0xd7, 0x99, 0x98, + 0xcd, 0x9a, 0x9a, + 0xd0, 0xa6, 0x93, + 0xc6, 0xaa, 0xa4, + 0xd5, 0xa7, 0xa7, + 0xd9, 0xb8, 0xb6, + 0xc6, 0xb9, 0xb5, + 0xfa, 0x9a, 0x8a, + 0xef, 0x94, 0x8d, + 0xed, 0xa6, 0x93, + 0xf7, 0xa7, 0x86, + 0xf5, 0xa9, 0x98, + 0xf6, 0xb7, 0x87, + 0xf6, 0xb5, 0x97, + 0xec, 0xab, 0x93, + 0xe5, 0xa7, 0xa6, + 0xe2, 0xb4, 0xb4, + 0xfa, 0xac, 0xa3, + 0xf3, 0xb6, 0xa6, + 0xfa, 0xba, 0xb5, + 0xe8, 0xb6, 0xac, + 0xf5, 0xc2, 0x94, + 0xfa, 0xc7, 0xa8, + 0xf8, 0xc7, 0xba, + 0xfa, 0xd4, 0xab, + 0xf9, 0xd5, 0xb8, + 0xeb, 0xc5, 0xb1, + 0xfd, 0xea, 0x8b, + 0xfd, 0xeb, 0xba, + 0xfd, 0xef, 0xae, + 0xd2, 0xc7, 0xbf, + 0xca, 0xc8, 0xc7, + 0xd5, 0xc7, 0xc7, + 0xd7, 0xd6, 0xd6, + 0xd3, 0xd1, 0xc4, + 0xea, 0xc6, 0xc6, + 0xec, 0xd3, 0xd3, + 0xe8, 0xda, 0xd9, + 0xf8, 0xca, 0xc8, + 0xfa, 0xd8, 0xc7, + 0xf1, 0xd5, 0xd4, + 0xf3, 0xda, 0xda, + 0xfb, 0xdb, 0xd3, + 0xfb, 0xdd, 0xdb, + 0xf8, 0xd7, 0xd5, + 0xef, 0xde, 0xc8, + 0xfb, 0xe4, 0xcd, + 0xfc, 0xe8, 0xc9, + 0xfc, 0xe4, 0xdc, + 0xfb, 0xeb, 0xdb, + 0xf8, 0xe6, 0xd6, + 0xfd, 0xf7, 0xcb, + 0xf1, 0xe9, 0xd9, + 0xe9, 0xe6, 0xe6, + 0xfa, 0xe4, 0xe3, + 0xfb, 0xeb, 0xe3, + 0xfa, 0xec, 0xea, + 0xf4, 0xe7, 0xe4, + 0xfc, 0xf1, 0xe3, + 0xfc, 0xf2, 0xec, + 0xf4, 0xf4, 0xf4, + 0xfc, 0xf4, 0xf2, + 0xfd, 0xf9, 0xf5, + 0xfd, 0xfc, 0xfb }; -unsigned char logo_img[logo_width*logo_height] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x09, 0x0a, 0x0b, 0x07, 0x0c, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0d, 0x0e, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x09, 0x0f, 0x0b, 0x10, 0x11, 0x09, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x12, 0x13, 0x14, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x15, 0x16, 0x0b, 0x17, 0x18, 0x19, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x11, 0x13, 0x1a, 0x1b, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x1c, 0x1d, 0x10, 0x1e, 0x1f, 0x19, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x20, 0x0b, 0x1e, 0x21, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x19, 0x22, 0x0b, 0x17, 0x23, 0x24, 0x15, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x25, 0x26, 0x10, 0x23, 0x27, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x05, 0x05, 0x25, 0x27, 0x11, 0x28, 0x29, 0x11, 0x06, 0x0d, 0x09, 0x05, 0x2a, 0x2b, 0x2c, 0x2d, 0x1e, 0x2e, 0x21, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2f, 0x0b, 0x30, 0x31, 0x0c, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x15, 0x06, 0x16, 0x22, 0x1d, 0x2c, 0x32, 0x33, 0x17, 0x17, 0x17, 0x22, 0x14, 0x16, 0x1d, 0x2c, 0x2d, 0x1e, 0x2e, 0x34, 0x0c, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x2b, 0x2c, 0x36, 0x36, 0x35, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x27, 0x0b, 0x2c, 0x2c, 0x37, 0x32, 0x38, 0x2c, 0x2d, 0x39, 0x36, 0x17, 0x30, 0x2c, 0x2c, 0x2d, 0x2c, 0x2c, 0x1a, 0x3a, 0x3a, 0x3b, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0a, 0x2d, 0x2b, 0x33, 0x31, 0x0e, 0x05, 0x05, 0x05, 0x05, 0x09, 0x28, 0x2c, 0x37, 0x3c, 0x32, 0x38, 0x38, 0x37, 0x2c, 0x30, 0x36, 0x36, 0x17, 0x31, 0x36, 0x23, 0x23, 0x17, 0x2c, 0x17, 0x3a, 0x3d, 0x13, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x22, 0x2c, 0x37, 0x33, 0x3e, 0x31, 0x3f, 0x40, 0x19, 0x05, 0x11, 0x2c, 0x2c, 0x32, 0x32, 0x32, 0x38, 0x37, 0x41, 0x30, 0x3a, 0x3a, 0x2e, 0x42, 0x43, 0x17, 0x1a, 0x13, 0x23, 0x31, 0x1a, 0x2e, 0x3d, 0x1a, 0x09, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0b, 0x37, 0x32, 0x37, 0x33, 0x44, 0x44, 0x45, 0x17, 0x1a, 0x10, 0x2d, 0x37, 0x38, 0x46, 0x33, 0x46, 0x32, 0x2c, 0x23, 0x23, 0x47, 0x21, 0x13, 0x43, 0x34, 0x48, 0x19, 0x49, 0x34, 0x17, 0x1e, 0x3a, 0x13, 0x4a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4b, 0x32, 0x32, 0x32, 0x32, 0x4c, 0x45, 0x44, 0x44, 0x42, 0x36, 0x30, 0x33, 0x46, 0x38, 0x33, 0x46, 0x38, 0x31, 0x23, 0x27, 0x09, 0x4a, 0x4d, 0x47, 0x43, 0x0d, 0x4e, 0x4a, 0x4f, 0x34, 0x1a, 0x2e, 0x29, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x11, 0x33, 0x32, 0x32, 0x32, 0x33, 0x4c, 0x31, 0x45, 0x3e, 0x31, 0x36, 0x46, 0x46, 0x33, 0x33, 0x39, 0x30, 0x23, 0x50, 0x4a, 0x4a, 0x4a, 0x4a, 0x4d, 0x47, 0x51, 0x4e, 0x4a, 0x4a, 0x0e, 0x13, 0x1a, 0x27, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x2b, 0x32, 0x32, 0x2b, 0x32, 0x33, 0x4c, 0x33, 0x4c, 0x4c, 0x36, 0x30, 0x30, 0x30, 0x30, 0x31, 0x23, 0x3a, 0x49, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4f, 0x50, 0x1b, 0x4e, 0x4a, 0x19, 0x50, 0x16, 0x0c, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x32, 0x32, 0x32, 0x32, 0x2b, 0x33, 0x33, 0x30, 0x2d, 0x39, 0x30, 0x30, 0x30, 0x4c, 0x36, 0x42, 0x3a, 0x52, 0x05, 0x4a, 0x4a, 0x4a, 0x4a, 0x09, 0x3b, 0x52, 0x4e, 0x4a, 0x4a, 0x4f, 0x1a, 0x2a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4d, 0x2b, 0x2b, 0x32, 0x32, 0x32, 0x37, 0x2c, 0x2c, 0x2c, 0x2c, 0x2d, 0x10, 0x30, 0x30, 0x3e, 0x23, 0x3a, 0x0d, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x40, 0x51, 0x4a, 0x4a, 0x25, 0x15, 0x1f, 0x27, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x40, 0x22, 0x2c, 0x32, 0x32, 0x32, 0x38, 0x2d, 0x2c, 0x41, 0x32, 0x39, 0x46, 0x4c, 0x31, 0x2e, 0x2e, 0x0c, 0x4a, 0x4a, 0x4a, 0x4a, 0x4a, 0x25, 0x53, 0x18, 0x4a, 0x54, 0x55, 0x56, 0x51, 0x11, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2a, 0x22, 0x32, 0x32, 0x32, 0x38, 0x38, 0x32, 0x2c, 0x37, 0x38, 0x30, 0x30, 0x3e, 0x3a, 0x3a, 0x2a, 0x4a, 0x4a, 0x05, 0x4a, 0x57, 0x58, 0x59, 0x5a, 0x35, 0x58, 0x5b, 0x5c, 0x5d, 0x5e, 0x4a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4d, 0x07, 0x37, 0x32, 0x38, 0x38, 0x32, 0x32, 0x41, 0x38, 0x30, 0x30, 0x3e, 0x3a, 0x3d, 0x27, 0x05, 0x4a, 0x4a, 0x4a, 0x5c, 0x5f, 0x59, 0x1d, 0x29, 0x2f, 0x60, 0x61, 0x26, 0x0b, 0x1c, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4e, 0x0a, 0x2d, 0x38, 0x38, 0x32, 0x37, 0x32, 0x2d, 0x39, 0x36, 0x31, 0x62, 0x3d, 0x0e, 0x4a, 0x4a, 0x4a, 0x09, 0x63, 0x64, 0x64, 0x61, 0x2d, 0x1d, 0x65, 0x61, 0x2b, 0x17, 0x16, 0x4a, 0x05, 0x05, 0x04, 0x03, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x27, 0x2c, 0x38, 0x38, 0x37, 0x37, 0x38, 0x2d, 0x30, 0x31, 0x42, 0x3a, 0x18, 0x09, 0x05, 0x05, 0x4a, 0x63, 0x60, 0x60, 0x2b, 0x10, 0x2d, 0x41, 0x41, 0x30, 0x42, 0x3e, 0x29, 0x09, 0x05, 0x05, 0x04, 0x03, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2a, 0x37, 0x32, 0x38, 0x32, 0x41, 0x38, 0x38, 0x30, 0x66, 0x31, 0x3a, 0x1e, 0x67, 0x4a, 0x4a, 0x05, 0x68, 0x64, 0x61, 0x2b, 0x17, 0x36, 0x10, 0x33, 0x31, 0x42, 0x3d, 0x45, 0x06, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x1c, 0x2c, 0x32, 0x32, 0x37, 0x41, 0x2c, 0x46, 0x30, 0x36, 0x36, 0x42, 0x42, 0x29, 0x1b, 0x4a, 0x4a, 0x4d, 0x26, 0x60, 0x0b, 0x17, 0x36, 0x44, 0x45, 0x66, 0x3e, 0x44, 0x44, 0x1a, 0x05, 0x05, 0x05, 0x05, 0x05, 0x15, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0c, 0x2c, 0x32, 0x32, 0x38, 0x37, 0x32, 0x37, 0x30, 0x36, 0x4c, 0x31, 0x1e, 0x10, 0x1f, 0x52, 0x69, 0x52, 0x07, 0x2c, 0x10, 0x36, 0x62, 0x6a, 0x44, 0x6b, 0x3e, 0x44, 0x6c, 0x30, 0x09, 0x05, 0x05, 0x25, 0x54, 0x19, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x25, 0x2c, 0x37, 0x38, 0x37, 0x2c, 0x32, 0x32, 0x46, 0x30, 0x46, 0x4c, 0x31, 0x66, 0x4c, 0x36, 0x1a, 0x1a, 0x17, 0x37, 0x37, 0x10, 0x31, 0x62, 0x45, 0x4c, 0x3e, 0x44, 0x62, 0x30, 0x09, 0x05, 0x0a, 0x70, 0x71, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x22, 0x32, 0x32, 0x38, 0x41, 0x41, 0x38, 0x2d, 0x46, 0x66, 0x44, 0x6c, 0x6c, 0x6c, 0x3d, 0x3a, 0x42, 0x31, 0x32, 0x32, 0x32, 0x33, 0x33, 0x30, 0x36, 0x3e, 0x3e, 0x31, 0x07, 0x05, 0x12, 0x6e, 0x72, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x2d, 0x2c, 0x38, 0x32, 0x41, 0x37, 0x2d, 0x46, 0x66, 0x6a, 0x6c, 0x6d, 0x6d, 0x6c, 0x3d, 0x3d, 0x31, 0x38, 0x38, 0x39, 0x33, 0x39, 0x36, 0x30, 0x30, 0x66, 0x30, 0x40, 0x4d, 0x5f, 0x4d, 0x4d, 0x05, 0x05, 0x05, 0x15, 0x04, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x5a, 0x2d, 0x32, 0x32, 0x37, 0x37, 0x32, 0x38, 0x46, 0x46, 0x66, 0x45, 0x44, 0x62, 0x44, 0x44, 0x3e, 0x31, 0x31, 0x31, 0x31, 0x31, 0x33, 0x37, 0x30, 0x10, 0x06, 0x05, 0x12, 0x0a, 0x05, 0x05, 0x05, 0x08, 0x68, 0x73, 0x05, 0x04, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x22, 0x32, 0x32, 0x32, 0x3c, 0x37, 0x37, 0x2d, 0x39, 0x39, 0x39, 0x36, 0x36, 0x6b, 0x3e, 0x3e, 0x3e, 0x3e, 0x31, 0x4c, 0x39, 0x2d, 0x10, 0x16, 0x2a, 0x05, 0x05, 0x74, 0x74, 0x05, 0x05, 0x0c, 0x75, 0x5f, 0x1c, 0x05, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x40, 0x2c, 0x32, 0x32, 0x32, 0x41, 0x37, 0x41, 0x2c, 0x2c, 0x41, 0x2c, 0x33, 0x36, 0x31, 0x36, 0x31, 0x31, 0x17, 0x46, 0x2c, 0x16, 0x40, 0x05, 0x05, 0x05, 0x05, 0x20, 0x5f, 0x4d, 0x72, 0x76, 0x06, 0x25, 0x4a, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x40, 0x0b, 0x2d, 0x37, 0x2d, 0x2c, 0x2c, 0x37, 0x37, 0x38, 0x2c, 0x37, 0x2c, 0x10, 0x10, 0x39, 0x30, 0x0b, 0x2c, 0x11, 0x09, 0x05, 0x09, 0x4a, 0x05, 0x05, 0x19, 0x1d, 0x26, 0x76, 0x08, 0x05, 0x05, 0x05, 0x15, 0x25, 0x4d, 0x53, 0x77, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4d, 0x5a, 0x2c, 0x37, 0x2d, 0x2c, 0x37, 0x37, 0x39, 0x39, 0x33, 0x38, 0x2c, 0x2d, 0x2d, 0x2c, 0x5e, 0x2a, 0x05, 0x15, 0x3b, 0x17, 0x1f, 0x19, 0x05, 0x06, 0x26, 0x60, 0x5f, 0x0c, 0x05, 0x05, 0x05, 0x35, 0x68, 0x78, 0x56, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x2c, 0x2c, 0x2c, 0x37, 0x32, 0x37, 0x2c, 0x37, 0x32, 0x46, 0x33, 0x46, 0x39, 0x11, 0x15, 0x05, 0x05, 0x18, 0x31, 0x44, 0x6a, 0x30, 0x6e, 0x2b, 0x4b, 0x11, 0x5f, 0x63, 0x72, 0x54, 0x20, 0x74, 0x58, 0x25, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x15, 0x0b, 0x2c, 0x38, 0x2d, 0x39, 0x39, 0x2d, 0x37, 0x3c, 0x32, 0x37, 0x0b, 0x18, 0x05, 0x05, 0x05, 0x4e, 0x26, 0x32, 0x45, 0x6a, 0x46, 0x2b, 0x72, 0x4e, 0x05, 0x35, 0x0a, 0x75, 0x5f, 0x70, 0x08, 0x09, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x35, 0x22, 0x2d, 0x30, 0x6b, 0x6b, 0x66, 0x36, 0x30, 0x36, 0x4c, 0x36, 0x30, 0x18, 0x05, 0x05, 0x05, 0x09, 0x4b, 0x32, 0x46, 0x66, 0x38, 0x0b, 0x09, 0x05, 0x05, 0x05, 0x05, 0x09, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0a, 0x2c, 0x2c, 0x31, 0x62, 0x62, 0x6b, 0x31, 0x45, 0x44, 0x44, 0x45, 0x31, 0x10, 0x0c, 0x4d, 0x0c, 0x08, 0x0b, 0x3c, 0x32, 0x33, 0x66, 0x17, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x22, 0x2c, 0x2d, 0x31, 0x45, 0x6b, 0x36, 0x31, 0x6b, 0x62, 0x45, 0x6a, 0x66, 0x30, 0x0b, 0x2c, 0x2c, 0x2c, 0x2c, 0x37, 0x46, 0x6b, 0x44, 0x62, 0x5e, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0c, 0x1d, 0x2c, 0x39, 0x36, 0x4c, 0x30, 0x30, 0x30, 0x36, 0x4c, 0x66, 0x4c, 0x36, 0x30, 0x37, 0x41, 0x2c, 0x2d, 0x2c, 0x3c, 0x33, 0x6b, 0x44, 0x44, 0x39, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x2d, 0x2d, 0x2d, 0x36, 0x39, 0x2d, 0x32, 0x38, 0x38, 0x46, 0x6a, 0x6d, 0x3d, 0x62, 0x46, 0x3c, 0x37, 0x2d, 0x32, 0x32, 0x32, 0x38, 0x4c, 0x30, 0x16, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0a, 0x37, 0x38, 0x38, 0x39, 0x37, 0x2c, 0x37, 0x37, 0x30, 0x45, 0x6d, 0x6d, 0x62, 0x62, 0x38, 0x3c, 0x3c, 0x32, 0x37, 0x32, 0x32, 0x32, 0x2c, 0x14, 0x15, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x6e, 0x37, 0x38, 0x38, 0x38, 0x37, 0x2c, 0x2d, 0x30, 0x31, 0x62, 0x6a, 0x6d, 0x6a, 0x6a, 0x46, 0x32, 0x32, 0x37, 0x37, 0x32, 0x30, 0x17, 0x29, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4a, 0x0b, 0x38, 0x38, 0x38, 0x2c, 0x2c, 0x0b, 0x2d, 0x39, 0x4c, 0x45, 0x6a, 0x6a, 0x6a, 0x6a, 0x6a, 0x38, 0x37, 0x2c, 0x41, 0x18, 0x1c, 0x0c, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x15, 0x0b, 0x2d, 0x38, 0x38, 0x37, 0x2c, 0x2c, 0x2c, 0x37, 0x32, 0x4c, 0x6b, 0x44, 0x44, 0x45, 0x6a, 0x45, 0x38, 0x37, 0x1c, 0x09, 0x05, 0x05, 0x04, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x1d, 0x38, 0x38, 0x38, 0x38, 0x2c, 0x3c, 0x37, 0x37, 0x32, 0x32, 0x46, 0x36, 0x1e, 0x6b, 0x4c, 0x46, 0x32, 0x22, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x37, 0x32, 0x37, 0x38, 0x38, 0x37, 0x32, 0x3c, 0x32, 0x32, 0x37, 0x38, 0x2d, 0x2d, 0x38, 0x2c, 0x2c, 0x4f, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x08, 0x3c, 0x37, 0x41, 0x38, 0x2d, 0x37, 0x37, 0x3c, 0x32, 0x3c, 0x32, 0x37, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x0c, 0x41, 0x3c, 0x3c, 0x38, 0x32, 0x3c, 0x3c, 0x3c, 0x41, 0x32, 0x41, 0x37, 0x2c, 0x2c, 0x41, 0x38, 0x45, 0x18, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2a, 0x2c, 0x3c, 0x37, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x37, 0x2c, 0x2c, 0x2c, 0x2c, 0x4c, 0x45, 0x6a, 0x1a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x11, 0x2c, 0x37, 0x41, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x41, 0x37, 0x37, 0x4c, 0x44, 0x6d, 0x6a, 0x1a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x5a, 0x2c, 0x41, 0x3c, 0x3c, 0x3c, 0x32, 0x2c, 0x32, 0x2c, 0x2c, 0x38, 0x38, 0x36, 0x45, 0x62, 0x44, 0x45, 0x29, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x2a, 0x2c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x37, 0x37, 0x32, 0x37, 0x39, 0x4c, 0x4c, 0x45, 0x62, 0x44, 0x62, 0x30, 0x2a, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x4a, 0x5a, 0x41, 0x3c, 0x3c, 0x3c, 0x3c, 0x32, 0x3c, 0x37, 0x37, 0x2d, 0x46, 0x4c, 0x6b, 0x6b, 0x45, 0x3e, 0x36, 0x29, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x27, 0x3c, 0x37, 0x3c, 0x3c, 0x37, 0x37, 0x32, 0x38, 0x37, 0x37, 0x37, 0x38, 0x39, 0x36, 0x4c, 0x30, 0x10, 0x16, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x04, 0x05, 0x05, 0x25, 0x1d, 0x37, 0x37, 0x41, 0x32, 0x3c, 0x32, 0x41, 0x37, 0x32, 0x2c, 0x41, 0x37, 0x2c, 0x32, 0x37, 0x2c, 0x2c, 0x5a, 0x0c, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x05, 0x05, 0x15, 0x5a, 0x37, 0x2c, 0x41, 0x2c, 0x2c, 0x41, 0x37, 0x41, 0x41, 0x3c, 0x2c, 0x41, 0x41, 0x3c, 0x37, 0x2c, 0x39, 0x0b, 0x0b, 0x25, 0x05, 0x05, 0x05, 0x05, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x2a, 0x22, 0x2d, 0x37, 0x2c, 0x3c, 0x1d, 0x2c, 0x38, 0x2c, 0x41, 0x2c, 0x2c, 0x2d, 0x39, 0x37, 0x3c, 0x37, 0x30, 0x1a, 0x5e, 0x6e, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x2a, 0x6e, 0x0b, 0x2d, 0x38, 0x41, 0x41, 0x6e, 0x5a, 0x2c, 0x41, 0x32, 0x38, 0x32, 0x39, 0x3f, 0x6f, 0x16, 0x37, 0x1a, 0x1f, 0x1f, 0x16, 0x1d, 0x0c, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x09, 0x40, 0x07, 0x2c, 0x37, 0x2c, 0x2d, 0x2c, 0x1d, 0x0e, 0x09, 0x0b, 0x4b, 0x07, 0x41, 0x38, 0x2d, 0x10, 0x2d, 0x10, 0x0b, 0x2b, 0x33, 0x3f, 0x21, 0x29, 0x07, 0x5e, 0x2f, 0x12, 0x08, 0x2a, 0x0c, 0x25, 0x09, 0x09, 0x09, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x19, 0x40, 0x28, 0x22, 0x2c, 0x38, 0x32, 0x32, 0x32, 0x1d, 0x0e, 0x19, 0x05, 0x35, 0x2c, 0x4b, 0x70, 0x0b, 0x32, 0x2c, 0x16, 0x16, 0x16, 0x0b, 0x22, 0x26, 0x0b, 0x10, 0x3f, 0x29, 0x1f, 0x47, 0x1f, 0x1f, 0x5e, 0x0b, 0x4b, 0x74, 0x84, 0x74, 0x84, 0x06, 0x35, 0x09, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x09, 0x4d, 0x27, 0x0a, 0x22, 0x1d, 0x2c, 0x2c, 0x37, 0x32, 0x41, 0x41, 0x16, 0x27, 0x15, 0x09, 0x4a, 0x09, 0x28, 0x2d, 0x0b, 0x76, 0x2c, 0x37, 0x2d, 0x37, 0x32, 0x37, 0x0b, 0x0b, 0x5e, 0x5a, 0x4b, 0x0b, 0x0b, 0x07, 0x6e, 0x16, 0x5e, 0x10, 0x76, 0x5c, 0x68, 0x79, 0x7a, 0x53, 0x71, 0x54, 0x5d, 0x08, 0x4d, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x25, 0x27, 0x28, 0x0b, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x41, 0x41, 0x41, 0x22, 0x11, 0x35, 0x4d, 0x4d, 0x35, 0x1c, 0x06, 0x0a, 0x22, 0x38, 0x38, 0x37, 0x38, 0x38, 0x38, 0x2d, 0x39, 0x39, 0x39, 0x10, 0x39, 0x10, 0x4b, 0x12, 0x08, 0x35, 0x67, 0x2a, 0x08, 0x74, 0x70, 0x81, 0x55, 0x78, 0x79, 0x57, 0x53, 0x71, 0x71, 0x73, 0x84, 0x25, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x04, 0x05, 0x09, 0x27, 0x16, 0x0b, 0x2c, 0x2d, 0x2c, 0x41, 0x41, 0x1d, 0x22, 0x5a, 0x0f, 0x14, 0x0a, 0x28, 0x0a, 0x28, 0x28, 0x28, 0x6e, 0x5a, 0x65, 0x1d, 0x0b, 0x2d, 0x38, 0x46, 0x38, 0x38, 0x38, 0x39, 0x2d, 0x46, 0x39, 0x30, 0x39, 0x4b, 0x68, 0x79, 0x7a, 0x57, 0x67, 0x67, 0x56, 0x53, 0x71, 0x68, 0x7e, 0x85, 0x59, 0x73, 0x79, 0x54, 0x7a, 0x54, 0x06, 0x1c, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x05, 0x4d, 0x16, 0x0b, 0x10, 0x39, 0x2d, 0x0b, 0x28, 0x06, 0x2a, 0x25, 0x35, 0x06, 0x11, 0x0a, 0x28, 0x07, 0x5a, 0x22, 0x26, 0x5a, 0x41, 0x7b, 0x7c, 0x60, 0x76, 0x22, 0x1d, 0x32, 0x38, 0x46, 0x46, 0x46, 0x38, 0x38, 0x38, 0x38, 0x2b, 0x75, 0x7d, 0x7e, 0x55, 0x78, 0x7a, 0x57, 0x57, 0x57, 0x71, 0x20, 0x68, 0x55, 0x85, 0x7a, 0x57, 0x53, 0x71, 0x57, 0x5d, 0x19, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x0c, 0x16, 0x0b, 0x30, 0x39, 0x18, 0x2a, 0x09, 0x05, 0x4e, 0x19, 0x25, 0x0c, 0x27, 0x11, 0x0a, 0x0a, 0x2f, 0x5a, 0x5a, 0x26, 0x5a, 0x7b, 0x7c, 0x7c, 0x61, 0x7f, 0x7f, 0x7f, 0x76, 0x22, 0x22, 0x0b, 0x2d, 0x0b, 0x2d, 0x2d, 0x33, 0x0b, 0x5f, 0x80, 0x7d, 0x5c, 0x81, 0x55, 0x59, 0x59, 0x73, 0x73, 0x54, 0x5c, 0x5c, 0x7e, 0x55, 0x59, 0x73, 0x7a, 0x71, 0x19, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x09, 0x25, 0x08, 0x07, 0x5e, 0x10, 0x22, 0x1c, 0x4a, 0x05, 0x09, 0x05, 0x15, 0x4d, 0x19, 0x19, 0x4d, 0x08, 0x12, 0x74, 0x0f, 0x6e, 0x5a, 0x26, 0x1d, 0x7b, 0x7b, 0x7c, 0x7c, 0x7c, 0x61, 0x5b, 0x82, 0x82, 0x80, 0x80, 0x82, 0x7f, 0x7f, 0x7f, 0x7f, 0x5b, 0x7f, 0x82, 0x80, 0x7d, 0x5c, 0x7e, 0x79, 0x54, 0x54, 0x7a, 0x73, 0x0f, 0x2a, 0x25, 0x19, 0x09, 0x4a, 0x05, 0x05, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x4d, 0x2a, 0x06, 0x74, 0x28, 0x22, 0x22, 0x2d, 0x2c, 0x0e, 0x05, 0x05, 0x05, 0x05, 0x05, 0x3b, 0x07, 0x19, 0x09, 0x25, 0x0c, 0x27, 0x12, 0x0f, 0x2f, 0x26, 0x26, 0x1d, 0x65, 0x65, 0x7c, 0x7c, 0x7b, 0x7c, 0x7b, 0x7b, 0x60, 0x5b, 0x7f, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x80, 0x80, 0x83, 0x83, 0x81, 0x7e, 0x59, 0x73, 0x73, 0x84, 0x5d, 0x25, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x19, 0x08, 0x12, 0x0a, 0x0f, 0x6e, 0x5a, 0x26, 0x22, 0x2c, 0x2c, 0x0b, 0x27, 0x05, 0x05, 0x05, 0x15, 0x1e, 0x1e, 0x6f, 0x0c, 0x09, 0x15, 0x0c, 0x20, 0x12, 0x0f, 0x6e, 0x5a, 0x26, 0x26, 0x26, 0x65, 0x65, 0x65, 0x65, 0x7b, 0x7c, 0x7b, 0x65, 0x7b, 0x61, 0x61, 0x60, 0x64, 0x64, 0x64, 0x5b, 0x5b, 0x5f, 0x63, 0x70, 0x63, 0x58, 0x5d, 0x2a, 0x15, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x4a, 0x4d, 0x27, 0x11, 0x0a, 0x28, 0x6e, 0x5a, 0x26, 0x65, 0x41, 0x1d, 0x2c, 0x2c, 0x5e, 0x29, 0x0e, 0x14, 0x17, 0x31, 0x6b, 0x30, 0x14, 0x25, 0x09, 0x15, 0x4d, 0x08, 0x74, 0x0a, 0x0f, 0x2f, 0x5a, 0x26, 0x26, 0x1d, 0x1d, 0x1d, 0x2b, 0x65, 0x1d, 0x41, 0x65, 0x65, 0x7b, 0x65, 0x65, 0x1d, 0x6e, 0x74, 0x5d, 0x1c, 0x25, 0x15, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x19, 0x4d, 0x08, 0x06, 0x0a, 0x2f, 0x6e, 0x2f, 0x6e, 0x26, 0x41, 0x7b, 0x65, 0x41, 0x37, 0x33, 0x30, 0x36, 0x36, 0x4c, 0x6b, 0x66, 0x30, 0x14, 0x35, 0x4a, 0x09, 0x15, 0x15, 0x25, 0x25, 0x0c, 0x1c, 0x08, 0x06, 0x5d, 0x5d, 0x5d, 0x0e, 0x06, 0x12, 0x06, 0x08, 0x1c, 0x2a, 0x0c, 0x19, 0x09, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x09, 0x09, 0x19, 0x35, 0x08, 0x12, 0x28, 0x2f, 0x2f, 0x6e, 0x5a, 0x41, 0x7c, 0x3c, 0x3c, 0x2c, 0x41, 0x2d, 0x2d, 0x39, 0x30, 0x4c, 0x4c, 0x66, 0x66, 0x31, 0x24, 0x20, 0x4a, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x4a, 0x09, 0x4a, 0x09, 0x09, 0x05, 0x09, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x15, 0x0c, 0x1c, 0x12, 0x28, 0x2f, 0x5a, 0x1d, 0x7c, 0x7b, 0x41, 0x7b, 0x3c, 0x7b, 0x3c, 0x41, 0x41, 0x5a, 0x16, 0x28, 0x14, 0x14, 0x14, 0x3b, 0x12, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x05, 0x4a, 0x09, 0x15, 0x1c, 0x12, 0x12, 0x0a, 0x0f, 0x2f, 0x07, 0x2f, 0x0a, 0x12, 0x27, 0x0c, 0x4d, 0x15, 0x09, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x04, 0x05, 0x05, 0x05, 0x09, 0x15, 0x15, 0x15, 0x19, 0x4e, 0x4e, 0x05, 0x4a, 0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +unsigned char logo_img[LOGO_WIDTH * LOGO_HEIGHT] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x02, 0x02, + 0x02, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0b, + 0x0b, 0x06, 0x06, 0x06, 0x05, 0x05, 0x02, 0x02, + 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x10, 0x2c, 0x48, 0x47, 0x33, + 0x14, 0x09, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x05, 0x05, + 0x06, 0x0b, 0x0c, 0x1f, 0x21, 0x25, 0xb7, 0xb9, + 0xb8, 0xb8, 0xb9, 0xb9, 0x27, 0x26, 0x20, 0x0d, + 0x0c, 0x06, 0x06, 0x05, 0x02, 0x02, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x11, 0x2c, 0x45, 0x44, 0x31, 0x18, 0x09, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x2b, 0x45, 0x47, + 0xa0, 0xc8, 0xc8, 0x9c, 0x47, 0x15, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x05, 0x06, + 0x0b, 0x0d, 0x26, 0xb8, 0xbc, 0xe1, 0xf5, 0xfc, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, + 0xf5, 0xdf, 0xbb, 0xb7, 0x21, 0x0e, 0x0b, 0x05, + 0x05, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x01, + 0x11, 0x35, 0x9a, 0xa4, 0xa4, 0x9f, 0x97, 0x3a, + 0x2a, 0x16, 0x08, 0x00, 0x00, 0x04, 0x2a, 0x29, + 0x31, 0x45, 0x97, 0xc8, 0xe6, 0xd3, 0xc7, 0xb0, + 0x9c, 0x1c, 0x08, 0x00, 0x02, 0x02, 0x05, 0x06, + 0x0c, 0x21, 0xb8, 0xe1, 0xfc, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf5, 0xbc, + 0x27, 0x1f, 0x0c, 0x06, 0x02, 0x02, 0x00, 0x01, + 0x12, 0x50, 0xb0, 0xd1, 0xd3, 0xd3, 0xd2, 0x9f, + 0x46, 0x2f, 0x29, 0x2a, 0x10, 0x00, 0x00, 0x08, + 0x2e, 0x29, 0x2a, 0x3a, 0x43, 0x9b, 0xd4, 0xf8, + 0xec, 0xd3, 0xd1, 0xc7, 0xa3, 0x1c, 0x0a, 0x0a, + 0x0c, 0x26, 0xbc, 0xf5, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xfd, 0xfe, + 0xff, 0xff, 0xfc, 0xe1, 0xb7, 0x1f, 0x0c, 0x06, + 0x12, 0x51, 0xd2, 0xed, 0xec, 0xec, 0xf6, 0xeb, + 0xcf, 0x97, 0x41, 0x2d, 0x29, 0x2d, 0x13, 0x00, + 0x00, 0x03, 0x2e, 0x2a, 0x2a, 0x2e, 0x3a, 0x72, + 0x99, 0xd1, 0xe9, 0xec, 0xd7, 0xd7, 0xd6, 0xd5, + 0xb4, 0x4c, 0xbb, 0xf5, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfd, 0xe9, 0xe9, 0xe8, 0xe9, 0xe9, + 0xe9, 0xeb, 0xf0, 0xf8, 0xfc, 0xfe, 0xfd, 0xe1, + 0x4d, 0x51, 0xd2, 0xf0, 0xf6, 0xf7, 0xf6, 0xfd, + 0xf6, 0xd1, 0x9a, 0x73, 0x3a, 0x2d, 0x29, 0x2d, + 0x10, 0x00, 0x00, 0x01, 0x2d, 0x2d, 0x29, 0x2d, + 0x39, 0x40, 0x6c, 0xa1, 0xa4, 0xcb, 0xd3, 0xe6, + 0xe6, 0xe7, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xe9, 0xe9, + 0xe8, 0xec, 0xec, 0xe4, 0xcf, 0xc0, 0xc0, 0xda, + 0xe9, 0xd8, 0xd8, 0xfa, 0xfb, 0xfb, 0xf8, 0xfb, + 0xf8, 0xec, 0xd1, 0xa3, 0x8c, 0x41, 0x2f, 0x2a, + 0x29, 0x2e, 0x11, 0x00, 0x00, 0x00, 0x16, 0x36, + 0x29, 0x2d, 0x2e, 0x3c, 0x5d, 0x6c, 0x87, 0xa1, + 0xa4, 0xcb, 0xe7, 0xf8, 0xfc, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xfd, 0xe9, 0xe8, 0xe8, 0xe8, 0xbf, 0x41, 0x3e, + 0x3b, 0x8c, 0xcd, 0xf1, 0xfe, 0xfd, 0xfd, 0xfb, + 0xfb, 0xf0, 0xe6, 0xc7, 0xa4, 0x9a, 0x73, 0x39, + 0x2d, 0x29, 0x2a, 0x3b, 0x08, 0x00, 0x00, 0x00, + 0x11, 0x37, 0x2a, 0x2a, 0x2d, 0x37, 0x3e, 0x61, + 0x87, 0x87, 0xa1, 0xc7, 0xf6, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, + 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xf9, 0xe5, 0xe3, 0x46, + 0x36, 0x3a, 0x8c, 0xd4, 0xfb, 0xff, 0xfe, 0xff, + 0xfd, 0xf8, 0xf0, 0xe6, 0xd1, 0xc8, 0xa4, 0x74, + 0x3e, 0x36, 0x2a, 0x29, 0x3b, 0x30, 0x01, 0x00, + 0x00, 0x00, 0x08, 0x3b, 0x2f, 0x29, 0x2a, 0x36, + 0x3e, 0x58, 0x6c, 0x87, 0xc7, 0xf9, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, + 0xff, 0xff, 0xfd, 0xff, 0xfc, 0xff, 0xfc, 0xf9, + 0xe3, 0x45, 0x39, 0x8c, 0xe7, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfb, 0xeb, 0xe6, 0xd3, 0xc7, 0xa4, + 0x8c, 0x3e, 0x3c, 0x2f, 0x29, 0x31, 0x47, 0x11, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x41, 0x2a, + 0x29, 0x2f, 0x38, 0x5d, 0x6c, 0xa4, 0xf6, 0xff, + 0xff, 0xff, 0xff, 0xfd, 0xfe, 0xfe, 0xfe, 0xfe, + 0xff, 0xfe, 0xfd, 0xfb, 0xfb, 0xfd, 0xfd, 0xfc, + 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, + 0xfc, 0xff, 0xe9, 0x47, 0x3a, 0xb0, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xfd, 0xf6, 0xec, 0xd3, 0xd1, + 0xc8, 0x8c, 0x58, 0x3e, 0x36, 0x2d, 0x29, 0x45, + 0x47, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x09, + 0x47, 0x2f, 0x29, 0x2f, 0x3a, 0x41, 0x98, 0xe8, + 0xff, 0xff, 0xff, 0xfd, 0xfd, 0xfd, 0xfb, 0xfe, + 0xfd, 0xfe, 0xfe, 0xfb, 0xfb, 0xfb, 0xfa, 0xfb, + 0xfb, 0xfb, 0xfd, 0xfd, 0xf8, 0xf8, 0xfd, 0xfd, + 0xf8, 0xfd, 0xf8, 0xf8, 0xf8, 0xc0, 0x97, 0xcc, + 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xeb, 0xec, + 0xd3, 0xc8, 0x87, 0x5f, 0x3d, 0x37, 0x2f, 0x2a, + 0x30, 0x4f, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x34, 0x46, 0x2b, 0x2b, 0x3b, 0x97, + 0xe3, 0xfd, 0xff, 0xff, 0xfd, 0xf8, 0xfd, 0xfd, + 0xfd, 0xfd, 0xfd, 0xfd, 0xf8, 0xf8, 0xf7, 0xf7, + 0xfa, 0xfa, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, + 0xf8, 0xf8, 0xfa, 0xf7, 0xf7, 0xfa, 0xf1, 0xe3, + 0xbf, 0xca, 0xfd, 0xff, 0xff, 0xff, 0xfd, 0xf6, + 0xeb, 0xd7, 0xaf, 0x87, 0x60, 0x57, 0x3c, 0x36, + 0x2d, 0x2b, 0x4e, 0x9d, 0x09, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x12, 0x98, 0x30, 0x2b, + 0x48, 0xc4, 0xfc, 0xff, 0xff, 0xfd, 0xf8, 0xf8, + 0xfd, 0xfd, 0xfb, 0xfb, 0xfd, 0xfd, 0xf8, 0xf8, + 0xf6, 0xf1, 0xf1, 0xf0, 0xf7, 0xf8, 0xf9, 0xf9, + 0xf7, 0xf4, 0xf1, 0xf1, 0xf1, 0xf1, 0xf1, 0xf4, + 0xf9, 0xf0, 0xd0, 0xce, 0xf0, 0xff, 0xff, 0xfd, + 0xfb, 0xeb, 0xd3, 0xa4, 0x87, 0x61, 0x5e, 0x3e, + 0x38, 0x2e, 0x2a, 0x33, 0x9e, 0x34, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x4e, + 0x50, 0x33, 0xbe, 0xf8, 0xfd, 0xff, 0xfd, 0xf8, + 0xf8, 0xfb, 0xfb, 0xfe, 0xfb, 0xfb, 0xfb, 0xf8, + 0xf6, 0xf6, 0xeb, 0xef, 0xef, 0xf0, 0xf6, 0xf6, + 0xeb, 0xf2, 0xef, 0xee, 0xee, 0xef, 0xef, 0xee, + 0xf2, 0xf6, 0xe9, 0xf4, 0xe8, 0xcf, 0xd1, 0xf7, + 0xf0, 0xea, 0xd3, 0xc7, 0xa1, 0x87, 0x78, 0x5f, + 0x55, 0x3c, 0x36, 0x2a, 0x2c, 0x4f, 0x9e, 0x11, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1d, 0xa0, 0x53, 0xe4, 0xfc, 0xff, 0xfd, + 0xf6, 0xf6, 0xfb, 0xfb, 0xfd, 0xfe, 0xfb, 0xfb, + 0xf8, 0xf6, 0xf6, 0xf6, 0xeb, 0xef, 0xe7, 0xea, + 0xea, 0xe7, 0xe7, 0xe7, 0xd9, 0xef, 0xe7, 0xe7, + 0xe7, 0xea, 0xe9, 0xe9, 0xe9, 0xe9, 0xe4, 0xbf, + 0x97, 0xcb, 0xd2, 0xc7, 0xae, 0xa1, 0x87, 0x78, + 0x61, 0x57, 0x3d, 0x36, 0x2d, 0x2b, 0x4e, 0xbf, + 0x4e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0x53, 0xe4, 0xf6, 0xfe, + 0xfd, 0xf7, 0xf0, 0xf8, 0xfb, 0xfe, 0xff, 0xff, + 0xfe, 0xfb, 0xf7, 0xf6, 0xeb, 0xec, 0xeb, 0xe7, + 0xe7, 0xe7, 0xe7, 0xd9, 0xd9, 0xd9, 0xd9, 0xd7, + 0xd9, 0xd7, 0xe6, 0xe4, 0xe4, 0xe6, 0xe4, 0xe4, + 0xe4, 0xd0, 0x97, 0x99, 0xca, 0xaf, 0xa1, 0x93, + 0x87, 0x61, 0x57, 0x3d, 0x37, 0x2f, 0x2b, 0x34, + 0x9e, 0xbf, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x27, 0xe5, + 0xf9, 0xff, 0xf7, 0xf2, 0xf7, 0xf7, 0xfb, 0xff, + 0xff, 0xff, 0xfe, 0xfa, 0xf1, 0xf6, 0xec, 0xe6, + 0xe6, 0xe6, 0xd7, 0xd6, 0xd8, 0xd6, 0xd6, 0xd6, + 0xd6, 0xd2, 0xd3, 0xe3, 0xe3, 0xda, 0xe3, 0xd0, + 0xe3, 0xe3, 0xe3, 0xe3, 0xc1, 0x49, 0xa1, 0xa1, + 0xa1, 0x87, 0x77, 0x5f, 0x3e, 0x3e, 0x36, 0x2a, + 0x2c, 0x53, 0xc0, 0x9d, 0x0f, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0c, + 0xdf, 0xe8, 0xfd, 0xfb, 0xe7, 0xea, 0xf1, 0xf8, + 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xf1, 0xf0, 0xec, + 0xe6, 0xe6, 0xd7, 0xd6, 0xd6, 0xd2, 0xcd, 0xcd, + 0xcd, 0xcd, 0xcd, 0xd1, 0xcf, 0xcf, 0xcf, 0xcf, + 0xcf, 0xcf, 0xd0, 0xd0, 0xcf, 0xd0, 0xd0, 0xbe, + 0x47, 0x87, 0x87, 0x77, 0x61, 0x3d, 0x3c, 0x2e, + 0x2d, 0x2b, 0x4e, 0xc1, 0xc8, 0xc4, 0x27, 0x02, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x25, 0xe5, 0xe9, 0xfe, 0xec, 0xe7, 0xea, + 0xf0, 0xfb, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xee, + 0xe7, 0xe6, 0xd3, 0xd1, 0xcd, 0xcd, 0xca, 0xca, + 0xcb, 0xca, 0xae, 0xa2, 0xa2, 0xa1, 0x99, 0x9b, + 0x9b, 0x9b, 0x97, 0x97, 0x98, 0x9d, 0x9e, 0xbe, + 0xc0, 0xc0, 0x52, 0x48, 0x66, 0x5e, 0x3d, 0x3c, + 0x36, 0x2d, 0x2b, 0x33, 0x9e, 0xcf, 0x9e, 0xe0, + 0xbc, 0x0b, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0xbc, 0xe4, 0xf8, 0xf6, 0xd7, + 0xd9, 0xea, 0xf0, 0xfb, 0xff, 0xff, 0xff, 0xf7, + 0xee, 0xd9, 0xd7, 0xd3, 0xcb, 0xcc, 0xca, 0xb2, + 0xaf, 0xa2, 0x95, 0x93, 0x86, 0x86, 0x87, 0x72, + 0x72, 0x72, 0x72, 0x72, 0x46, 0x46, 0x46, 0x46, + 0x46, 0x47, 0x4e, 0x53, 0x52, 0x53, 0x48, 0x3e, + 0x3c, 0x36, 0x2e, 0x2a, 0x2c, 0x4f, 0xcf, 0x9d, + 0x52, 0xc6, 0xe1, 0x21, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x20, 0xe5, 0xe3, 0xfd, + 0xd7, 0xd4, 0xd9, 0xea, 0xf4, 0xf7, 0xfb, 0xfb, + 0xfa, 0xee, 0xd9, 0xd6, 0xd2, 0xcb, 0xc7, 0xaf, + 0xae, 0xa1, 0x92, 0x86, 0x85, 0x85, 0x7b, 0x66, + 0x66, 0x66, 0x66, 0x5d, 0x5d, 0x5d, 0x41, 0x41, + 0x41, 0x41, 0x41, 0x45, 0x45, 0x48, 0x34, 0x4e, + 0x4b, 0x34, 0x30, 0x2f, 0x2b, 0x2b, 0x4e, 0xbf, + 0x9f, 0x34, 0x53, 0xbd, 0xe1, 0xbb, 0x05, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xb9, 0xe4, + 0xe4, 0xf7, 0xcd, 0xd2, 0xd7, 0xea, 0xf1, 0xfa, + 0xfa, 0xf1, 0xef, 0xd9, 0xd6, 0xcc, 0xc7, 0xaf, + 0xae, 0x93, 0x86, 0x85, 0x85, 0x7b, 0x7a, 0x7b, + 0x77, 0x61, 0x61, 0x58, 0x58, 0x58, 0x58, 0x3e, + 0x3e, 0x3e, 0x3e, 0x3b, 0x3b, 0x3b, 0x3b, 0x30, + 0x33, 0x33, 0x33, 0x4b, 0x35, 0x32, 0x19, 0x2b, + 0x45, 0x73, 0x34, 0x23, 0x4c, 0xba, 0xdf, 0xdf, + 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, + 0xdf, 0xe3, 0xe9, 0xda, 0xc9, 0xcd, 0xd7, 0xf2, + 0xfa, 0xfb, 0xfa, 0xf1, 0xdc, 0xd5, 0xca, 0xaf, + 0xae, 0x95, 0x86, 0x85, 0x85, 0x7b, 0x7a, 0x7a, + 0x7a, 0x79, 0x75, 0x61, 0x60, 0x5e, 0x56, 0x54, + 0x58, 0x3d, 0x3e, 0x3c, 0x37, 0x39, 0x39, 0x36, + 0x39, 0x2f, 0x30, 0x30, 0x2c, 0x32, 0x35, 0x35, + 0x23, 0x1b, 0x1b, 0x1b, 0x1a, 0x1a, 0x4b, 0xa5, + 0xc3, 0xe1, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0d, 0xe5, 0xd0, 0xe9, 0xce, 0xb2, 0xce, + 0xd9, 0xee, 0xfe, 0xff, 0xfa, 0xdc, 0xd8, 0xb2, + 0xae, 0xa2, 0x86, 0x85, 0x7b, 0x7b, 0x7a, 0x7a, + 0x79, 0x79, 0x79, 0x76, 0x60, 0x5e, 0x5e, 0x5e, + 0x56, 0x54, 0x3d, 0x3d, 0x3c, 0x3c, 0x37, 0x37, + 0x36, 0x2e, 0x2f, 0x2f, 0x2f, 0x2b, 0x2b, 0x2c, + 0x19, 0x1c, 0x35, 0x23, 0x23, 0x1a, 0x1a, 0x23, + 0x4b, 0x4c, 0xba, 0xe1, 0xb9, 0x05, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x25, 0xe9, 0xd0, 0xe6, 0xb4, + 0xb0, 0xcc, 0xd8, 0xfa, 0xff, 0xff, 0xfa, 0xd8, + 0xd5, 0xa2, 0x90, 0x82, 0x85, 0x7b, 0x7a, 0x7a, + 0x79, 0x79, 0x79, 0x79, 0x79, 0x76, 0x60, 0x5e, + 0x5e, 0x58, 0x56, 0x54, 0x3d, 0x3d, 0x3c, 0x37, + 0x37, 0x36, 0x36, 0x2e, 0x2e, 0x2f, 0x2f, 0x2b, + 0x2b, 0x2b, 0x2b, 0x19, 0x19, 0x1c, 0x23, 0x23, + 0x23, 0x23, 0x4b, 0x4b, 0xa5, 0xdf, 0xbc, 0x0b, + 0x00, 0x00, 0x00, 0x00, 0x02, 0xb8, 0xe4, 0xd0, + 0xce, 0xa3, 0xad, 0xcc, 0xd8, 0xfa, 0xff, 0xfb, + 0xe7, 0xd5, 0xad, 0x92, 0x85, 0x85, 0x78, 0x7a, + 0x7a, 0x79, 0x79, 0x79, 0x79, 0x76, 0x76, 0x60, + 0x5e, 0x5e, 0x56, 0x56, 0x54, 0x54, 0x3d, 0x3d, + 0x3c, 0x37, 0x37, 0x36, 0x36, 0x2e, 0x2e, 0x2d, + 0x2d, 0x2a, 0x2a, 0x2b, 0x18, 0x18, 0x19, 0x15, + 0x1c, 0x1a, 0x1a, 0x23, 0x23, 0x4a, 0x51, 0xc5, + 0xe2, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x05, 0xbc, + 0xe3, 0xc4, 0xa3, 0x95, 0xb1, 0xb3, 0xd8, 0xee, + 0xfa, 0xef, 0xd5, 0xad, 0x94, 0x86, 0x78, 0x77, + 0x77, 0x7a, 0x76, 0x76, 0x79, 0x79, 0x76, 0x76, + 0x76, 0x60, 0x5e, 0x56, 0x56, 0x54, 0x54, 0x3d, + 0x3d, 0x3c, 0x3c, 0x37, 0x37, 0x36, 0x2e, 0x2e, + 0x2d, 0x2d, 0x2a, 0x2a, 0x29, 0x29, 0x17, 0x16, + 0x18, 0x14, 0x15, 0x15, 0x1c, 0x1b, 0x35, 0x35, + 0x49, 0xc3, 0xe1, 0x21, 0x00, 0x00, 0x00, 0x00, + 0x0b, 0xe1, 0xd0, 0xc4, 0x8b, 0x94, 0xad, 0xb3, + 0xcd, 0xd6, 0xd8, 0xcd, 0xb1, 0x94, 0x91, 0x7c, + 0x77, 0x77, 0x76, 0x76, 0x76, 0x76, 0x76, 0x76, + 0x76, 0x76, 0x75, 0x5e, 0x56, 0x56, 0x56, 0x54, + 0x54, 0x3d, 0x3d, 0x3c, 0x3c, 0x37, 0x37, 0x36, + 0x2e, 0x2d, 0x2d, 0x2d, 0x2a, 0x2a, 0x29, 0x29, + 0x17, 0x16, 0x18, 0x14, 0x14, 0x14, 0x15, 0x15, + 0x1c, 0x19, 0x49, 0xc2, 0xf4, 0x25, 0x00, 0x00, + 0x00, 0x00, 0x0e, 0xe1, 0xc5, 0xbf, 0x8a, 0x90, + 0xa8, 0xad, 0xb2, 0xcc, 0xb2, 0xad, 0x95, 0x92, + 0x91, 0x78, 0x75, 0x75, 0x75, 0x75, 0x75, 0x76, + 0x76, 0x75, 0x76, 0x75, 0x75, 0x5e, 0x56, 0x56, + 0x54, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, 0x37, 0x36, + 0x36, 0x36, 0x2d, 0x2d, 0x2d, 0x2d, 0x2a, 0x29, + 0x29, 0x17, 0x17, 0x16, 0x16, 0x17, 0x18, 0x14, + 0x14, 0x14, 0x14, 0x18, 0x44, 0xc2, 0xf5, 0xb7, + 0x02, 0x00, 0x00, 0x00, 0x1f, 0xf5, 0xc4, 0xa0, + 0x6f, 0x8f, 0x90, 0x95, 0xad, 0xad, 0x95, 0x94, + 0x92, 0x91, 0x91, 0x78, 0x75, 0x75, 0x75, 0x75, + 0x75, 0x76, 0x75, 0x75, 0x75, 0x75, 0x60, 0x56, + 0x56, 0x54, 0x54, 0x3d, 0x3d, 0x3c, 0x3c, 0x37, + 0x37, 0x36, 0x36, 0x36, 0x2e, 0x2d, 0x2d, 0x2a, + 0x2a, 0x29, 0x29, 0x17, 0x29, 0x2a, 0x2d, 0x2d, + 0x13, 0x13, 0x14, 0x13, 0x14, 0x18, 0x44, 0xc2, + 0xfa, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x20, 0xf5, + 0xc4, 0x9d, 0x6d, 0x80, 0x8f, 0x88, 0x90, 0x90, + 0x92, 0x91, 0x86, 0x83, 0x83, 0x7c, 0x75, 0x75, + 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, + 0x5e, 0x54, 0x54, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, + 0x3c, 0x37, 0x37, 0x36, 0x36, 0x2d, 0x2e, 0x2d, + 0x2d, 0x2a, 0x2a, 0x29, 0x29, 0x2a, 0x36, 0x37, + 0x36, 0x17, 0x13, 0x13, 0x13, 0x13, 0x13, 0x18, + 0x44, 0xd5, 0xf5, 0xbb, 0x02, 0x00, 0x00, 0x00, + 0x21, 0xf5, 0xc0, 0x50, 0x68, 0x6b, 0x80, 0x80, + 0x80, 0x83, 0x80, 0x82, 0x82, 0x82, 0x83, 0x7e, + 0x60, 0x75, 0x60, 0x75, 0x75, 0x75, 0x75, 0x75, + 0x75, 0x60, 0x5e, 0x54, 0x3d, 0x3d, 0x3d, 0x3d, + 0x3c, 0x3c, 0x37, 0x37, 0x36, 0x36, 0x2e, 0x2d, + 0x2d, 0x2d, 0x2a, 0x2a, 0x2a, 0x2d, 0x37, 0x3c, + 0x37, 0x37, 0x2a, 0x13, 0x13, 0x13, 0x16, 0x18, + 0x17, 0x29, 0x44, 0xd8, 0xf4, 0xbb, 0x02, 0x00, + 0x00, 0x00, 0x21, 0xf5, 0xc4, 0x49, 0x68, 0x6a, + 0x7c, 0x7d, 0x7e, 0x7e, 0x7e, 0x7e, 0x82, 0x82, + 0x82, 0x82, 0x75, 0x60, 0x60, 0x60, 0x60, 0x60, + 0x60, 0x60, 0x60, 0x60, 0x56, 0x3d, 0x3d, 0x3d, + 0x3c, 0x3c, 0x37, 0x37, 0x37, 0x36, 0x36, 0x2e, + 0x2e, 0x2d, 0x2d, 0x2d, 0x2d, 0x2e, 0x3c, 0x3c, + 0x3c, 0x3c, 0x37, 0x2e, 0x16, 0x13, 0x16, 0x16, + 0x17, 0x17, 0x29, 0x2a, 0x46, 0xd8, 0xfa, 0xbb, + 0x02, 0x00, 0x00, 0x00, 0x1f, 0xf5, 0xc4, 0x50, + 0x59, 0x6a, 0x6a, 0x7c, 0x7c, 0x7e, 0x7d, 0x7e, + 0x7e, 0x7e, 0x82, 0x82, 0x65, 0x5e, 0x60, 0x60, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x56, 0x3d, + 0x3c, 0x3c, 0x3c, 0x37, 0x37, 0x37, 0x36, 0x36, + 0x2e, 0x2e, 0x2e, 0x2d, 0x2d, 0x36, 0x3c, 0x3d, + 0x3c, 0x3c, 0x3c, 0x37, 0x37, 0x29, 0x13, 0x13, + 0x16, 0x17, 0x17, 0x29, 0x2a, 0x2f, 0x8b, 0xdc, + 0xf9, 0xb8, 0x02, 0x00, 0x00, 0x00, 0x0d, 0xf5, + 0xc4, 0x47, 0x40, 0x63, 0x64, 0x64, 0x64, 0x7c, + 0x7c, 0x7c, 0x7e, 0x85, 0x7e, 0x7e, 0x7c, 0x60, + 0x60, 0x5e, 0x60, 0x5e, 0x60, 0x5e, 0x60, 0x5e, + 0x54, 0x3c, 0x3c, 0x3c, 0x37, 0x37, 0x37, 0x36, + 0x36, 0x36, 0x36, 0x2d, 0x2d, 0x36, 0x3d, 0x3d, + 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x37, 0x36, 0x16, + 0x13, 0x13, 0x16, 0x17, 0x29, 0x2a, 0x2a, 0x2e, + 0xad, 0xdc, 0xf1, 0xb8, 0x02, 0x00, 0x00, 0x00, + 0x0c, 0xe5, 0xe0, 0x4e, 0x3f, 0x5b, 0x65, 0x6a, + 0x64, 0x7c, 0x7c, 0x7c, 0x7d, 0x7c, 0x7e, 0x7e, + 0x7e, 0x61, 0x5e, 0x5e, 0x5e, 0x60, 0x5e, 0x5e, + 0x5e, 0x5e, 0x3d, 0x3c, 0x37, 0x37, 0x37, 0x36, + 0x36, 0x36, 0x36, 0x2e, 0x2d, 0x36, 0x3c, 0x3d, + 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, 0x37, 0x37, 0x37, + 0x2a, 0x13, 0x13, 0x16, 0x17, 0x29, 0x29, 0x2a, + 0x2d, 0x43, 0xd5, 0xdc, 0xf4, 0xb7, 0x00, 0x00, + 0x00, 0x00, 0x06, 0xdf, 0xe4, 0x50, 0x38, 0x40, + 0x62, 0x65, 0x64, 0x64, 0x7c, 0x7c, 0x7c, 0x7e, + 0x7d, 0x7e, 0x7e, 0x64, 0x5e, 0x5e, 0x5e, 0x5e, + 0x5e, 0x5e, 0x5e, 0x5e, 0x3d, 0x37, 0x37, 0x37, + 0x36, 0x36, 0x36, 0x2e, 0x2e, 0x2d, 0x36, 0x3d, + 0x3d, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, 0x3c, 0x37, + 0x37, 0x36, 0x17, 0x13, 0x16, 0x16, 0x17, 0x29, + 0x2a, 0x2d, 0x36, 0x95, 0xdb, 0xdc, 0xf4, 0x25, + 0x00, 0x00, 0x00, 0x00, 0x05, 0xbc, 0xf9, 0x4f, + 0x2f, 0x3f, 0x5c, 0x64, 0x64, 0x64, 0x64, 0x64, + 0x7c, 0x7c, 0x7d, 0x7d, 0x7d, 0x7d, 0x5f, 0x5e, + 0x56, 0x56, 0x5e, 0x5e, 0x5e, 0x56, 0x3c, 0x36, + 0x36, 0x36, 0x36, 0x36, 0x2e, 0x2e, 0x2d, 0x36, + 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, 0x3c, + 0x3c, 0x37, 0x37, 0x2d, 0x16, 0x13, 0x16, 0x17, + 0x29, 0x29, 0x2d, 0x2d, 0x44, 0xb5, 0xdd, 0xef, + 0xe1, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, + 0xfc, 0x52, 0x31, 0x3f, 0x3f, 0x5c, 0x63, 0x65, + 0x64, 0x64, 0x7c, 0x7c, 0x7c, 0x7e, 0x7d, 0x7d, + 0x64, 0x56, 0x5e, 0x56, 0x56, 0x56, 0x56, 0x56, + 0x3c, 0x36, 0x36, 0x2e, 0x2e, 0x2e, 0x2e, 0x2d, + 0x36, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, + 0x3c, 0x37, 0x37, 0x37, 0x37, 0x2a, 0x13, 0x13, + 0x16, 0x17, 0x29, 0x2a, 0x2d, 0x39, 0xad, 0xb6, + 0xdd, 0xf3, 0xe2, 0x0e, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x26, 0xfc, 0xc4, 0x30, 0x2f, 0x3f, 0x3f, + 0x59, 0x62, 0x64, 0x64, 0x6a, 0x64, 0x7c, 0x7c, + 0x7c, 0x7d, 0x7d, 0x65, 0x56, 0x56, 0x56, 0x56, + 0x56, 0x56, 0x37, 0x2e, 0x2e, 0x2e, 0x2e, 0x2d, + 0x2d, 0x36, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3c, + 0x3c, 0x3c, 0x3c, 0x37, 0x37, 0x37, 0x36, 0x29, + 0x13, 0x16, 0x17, 0x29, 0x2a, 0x2a, 0x2e, 0x96, + 0xb6, 0xdb, 0xdd, 0xf3, 0xbd, 0x06, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0e, 0xe1, 0xe5, 0x32, 0x2d, + 0x3f, 0x3f, 0x3f, 0x5a, 0x63, 0x65, 0x64, 0x64, + 0x6a, 0x64, 0x7c, 0x7c, 0x7d, 0x7c, 0x57, 0x56, + 0x54, 0x54, 0x56, 0x54, 0x37, 0x2e, 0x2e, 0x2d, + 0x2d, 0x2d, 0x36, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, + 0x3c, 0x3c, 0x3c, 0x37, 0x3c, 0x37, 0x37, 0x36, + 0x36, 0x17, 0x16, 0x17, 0x29, 0x29, 0x2d, 0x2d, + 0x47, 0xb5, 0xdb, 0xdd, 0xf3, 0xf4, 0xb7, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xbc, 0xfd, + 0x4f, 0x2a, 0x2f, 0x38, 0x3f, 0x59, 0x65, 0x63, + 0x65, 0x64, 0x64, 0x64, 0x6a, 0x7c, 0x6b, 0x7c, + 0x6a, 0x57, 0x54, 0x54, 0x54, 0x54, 0x37, 0x2d, + 0x2d, 0x2d, 0x2d, 0x2d, 0x3c, 0x3d, 0x3d, 0x3d, + 0x3d, 0x3c, 0x3c, 0x3c, 0x37, 0x37, 0x37, 0x37, + 0x36, 0x36, 0x36, 0x17, 0x16, 0x17, 0x29, 0x2a, + 0x2d, 0x43, 0xb1, 0xb6, 0xdb, 0xdd, 0xf3, 0xe5, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:12:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1A5A106564A; Wed, 7 Apr 2010 17:12:57 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A2AF88FC0A; Wed, 7 Apr 2010 17:12:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37HCveg058840; Wed, 7 Apr 2010 17:12:57 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HCvMX058838; Wed, 7 Apr 2010 17:12:57 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004071712.o37HCvMX058838@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 7 Apr 2010 17:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206364 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:12:57 -0000 Author: yongari Date: Wed Apr 7 17:12:57 2010 New Revision: 206364 URL: http://svn.freebsd.org/changeset/base/206364 Log: Partial revert r204545. Just relying on status LE ownership of status block seems to cause poor performance. Always read current status index register first and then check status ownership as we had before. Accessing status index register seems to trigger immediate status update if controller have pending status updates. MFC after: 1 week Reported by: Andre Albsmeier siemens dot com> Tested by: Andre Albsmeier siemens dot com> Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Wed Apr 7 17:07:06 2010 (r206363) +++ head/sys/dev/msk/if_msk.c Wed Apr 7 17:12:57 2010 (r206364) @@ -3473,6 +3473,9 @@ msk_handle_events(struct msk_softc *sc) uint32_t control, status; int cons, len, port, rxprog; + if (sc->msk_stat_cons == CSR_READ_2(sc, STAT_PUT_IDX)) + return (0); + /* Sync status LEs. */ bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); @@ -3556,7 +3559,7 @@ msk_handle_events(struct msk_softc *sc) if (rxput[MSK_PORT_B] > 0) msk_rxput(sc->msk_if[MSK_PORT_B]); - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); } static void From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:13:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19AB71065672; Wed, 7 Apr 2010 17:13:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E49CE8FC1B; Wed, 7 Apr 2010 17:13:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37HDIPT058950; Wed, 7 Apr 2010 17:13:18 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HDIMK058949; Wed, 7 Apr 2010 17:13:18 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004071713.o37HDIMK058949@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Apr 2010 17:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206365 - head/sys/modules/syscons/beastie X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:13:19 -0000 Author: jkim Date: Wed Apr 7 17:13:18 2010 New Revision: 206365 URL: http://svn.freebsd.org/changeset/base/206365 Log: Copy logo_saver module to beastie_saver. Added: head/sys/modules/syscons/beastie/ - copied from r206361, head/sys/modules/syscons/logo/ From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:13:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE43B1065670; Wed, 7 Apr 2010 17:13:34 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2017D8FC16; Wed, 7 Apr 2010 17:13:33 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so323587qwi.7 for ; Wed, 07 Apr 2010 10:13:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=b4Oe76kqTQdc9MCa80nPXcKQHbImGzeKNOq4vJEpxD8=; b=lcoerExxPzos/gcyP7eSp6xBcQ1OniDyODb51Zr9XyxaYYvs6XyBOXdEaeRHFnUA5s yBkSWVgLXKEemYzdlt1vfxW8WFTRCEQhE6NwBCrfsPmD4h1FXB8Fn/HgHUSdaUkuADMO A1kOlTd4ZAOd11t51A1dVY9uIu5tJMyKEofWg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AaA+i7TejP9yDEyNZCmEGUF9JDb4mVNrjQh6qXA5+F3+6Powa5FlO/PS5pLqtlWBZa gFuyBiN31RNZO/Rd6MX/aEU8AA7nXkFkI93Zu1x3xBfsY0z+D6kWL7Hry+Bj0nLIuAFs IcheAl1pRHn+GbAmFNKjS/Jaz3NT5EHROufIQ= MIME-Version: 1.0 Received: by 10.229.33.72 with HTTP; Wed, 7 Apr 2010 10:13:33 -0700 (PDT) In-Reply-To: <201004071707.o37H76OW057492@svn.freebsd.org> References: <201004071707.o37H76OW057492@svn.freebsd.org> Date: Wed, 7 Apr 2010 10:13:33 -0700 Received: by 10.229.190.133 with SMTP id di5mr2051603qcb.23.1270660413253; Wed, 07 Apr 2010 10:13:33 -0700 (PDT) Message-ID: From: Garrett Cooper To: Jung-uk Kim Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206363 - head/sys/dev/syscons/logo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:13:34 -0000 On Wed, Apr 7, 2010 at 10:07 AM, Jung-uk Kim wrote: > Author: jkim > Date: Wed Apr =A07 17:07:06 2010 > New Revision: 206363 > URL: http://svn.freebsd.org/changeset/base/206363 > > Log: > =A0Add the official FreeBSD logo image file for logo_saver. > > Modified: > =A0head/sys/dev/syscons/logo/logo.c Please readd the beastie logo based saver as beastie saver, or something similar. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:20:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8107D1065672; Wed, 7 Apr 2010 17:20:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71A7F8FC1C; Wed, 7 Apr 2010 17:20:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37HKtnk060678; Wed, 7 Apr 2010 17:20:55 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HKtdn060675; Wed, 7 Apr 2010 17:20:55 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004071720.o37HKtdn060675@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Apr 2010 17:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206366 - in head/sys/modules/syscons: . beastie X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:20:55 -0000 Author: jkim Date: Wed Apr 7 17:20:55 2010 New Revision: 206366 URL: http://svn.freebsd.org/changeset/base/206366 Log: Reconnect the old Beastie logo_saver to build as beastie_saver. Modified: head/sys/modules/syscons/Makefile head/sys/modules/syscons/beastie/Makefile Modified: head/sys/modules/syscons/Makefile ============================================================================== --- head/sys/modules/syscons/Makefile Wed Apr 7 17:13:18 2010 (r206365) +++ head/sys/modules/syscons/Makefile Wed Apr 7 17:20:55 2010 (r206366) @@ -1,6 +1,7 @@ # $FreeBSD$ SUBDIR= ${_apm} \ + ${_beastie} \ blank \ ${_daemon} \ ${_dragon} \ @@ -18,6 +19,7 @@ _apm= apm .endif .if ${MACHINE_ARCH} != "sparc64" +_beastie= beastie _daemon= daemon _dragon= dragon _fire= fire Modified: head/sys/modules/syscons/beastie/Makefile ============================================================================== --- head/sys/modules/syscons/beastie/Makefile Wed Apr 7 17:13:18 2010 (r206365) +++ head/sys/modules/syscons/beastie/Makefile Wed Apr 7 17:20:55 2010 (r206366) @@ -2,7 +2,7 @@ .PATH: ${.CURDIR}/../../../dev/syscons/logo -KMOD= logo_saver -SRCS= logo_saver.c logo.c +KMOD= beastie_saver +SRCS= beastie.c logo_saver.c .include From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:31:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 575101065676; Wed, 7 Apr 2010 17:31:56 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4822C8FC16; Wed, 7 Apr 2010 17:31:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37HVuWZ063130; Wed, 7 Apr 2010 17:31:56 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HVuZb063128; Wed, 7 Apr 2010 17:31:56 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071731.o37HVuZb063128@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 17:31:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206367 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:31:56 -0000 Author: rpaulo Date: Wed Apr 7 17:31:56 2010 New Revision: 206367 URL: http://svn.freebsd.org/changeset/base/206367 Log: Fix build. Pointy hat: me MFC after: 1 month Modified: head/sys/net80211/ieee80211_ratectl.h Modified: head/sys/net80211/ieee80211_ratectl.h ============================================================================== --- head/sys/net80211/ieee80211_ratectl.h Wed Apr 7 17:20:55 2010 (r206366) +++ head/sys/net80211/ieee80211_ratectl.h Wed Apr 7 17:31:56 2010 (r206367) @@ -94,7 +94,7 @@ ieee80211_ratectl_rate(struct ieee80211_ const struct ieee80211vap *vap = ni->ni_vap; if (ni->ni_rctls == NULL) /* ratectl not setup */ - return; + return 0; return vap->iv_rate->ir_rate(ni, arg, iarg); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:40:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17E9E106567F; Wed, 7 Apr 2010 17:40:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E21D78FC1F; Wed, 7 Apr 2010 17:40:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37HemN5065139; Wed, 7 Apr 2010 17:40:48 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HemWo065137; Wed, 7 Apr 2010 17:40:48 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004071740.o37HemWo065137@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Apr 2010 17:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206368 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:40:49 -0000 Author: jkim Date: Wed Apr 7 17:40:48 2010 New Revision: 206368 URL: http://svn.freebsd.org/changeset/base/206368 Log: Add an entry for the old Beastie logo saver and re-sort. Modified: head/usr.sbin/sysinstall/menus.c Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Wed Apr 7 17:31:56 2010 (r206367) +++ head/usr.sbin/sysinstall/menus.c Wed Apr 7 17:40:48 2010 (r206368) @@ -1980,26 +1980,28 @@ DMenu MenuSysconsSaver = { NULL, { { "1 Blank", "Simply blank the screen", dmenuVarCheck, configSaver, NULL, "saver=blank" }, - { "2 Daemon", "\"BSD Daemon\" animated screen saver (text)", + { "2 Beastie", "\"BSD Daemon\" animated screen saver (graphics)", + dmenuVarCheck, configSaver, NULL, "saver=beastie" }, + { "3 Daemon", "\"BSD Daemon\" animated screen saver (text)", dmenuVarCheck, configSaver, NULL, "saver=daemon" }, - { "3 Fade", "Fade out effect screen saver", + { "4 Dragon", "Dragon screensaver (graphics)", + dmenuVarCheck, configSaver, NULL, "saver=dragon" }, + { "5 Fade", "Fade out effect screen saver", dmenuVarCheck, configSaver, NULL, "saver=fade" }, - { "4 Fire", "Flames effect screen saver", + { "6 Fire", "Flames effect screen saver", dmenuVarCheck, configSaver, NULL, "saver=fire" }, - { "5 Green", "\"Green\" power saving mode (if supported by monitor)", + { "7 Green", "\"Green\" power saving mode (if supported by monitor)", dmenuVarCheck, configSaver, NULL, "saver=green" }, - { "6 Logo", "\"BSD Daemon\" animated screen saver (graphics)", + { "8 Logo", "FreeBSD \"logo\" animated screen saver (graphics)", dmenuVarCheck, configSaver, NULL, "saver=logo" }, - { "7 Rain", "Rain drops screen saver", + { "9 Rain", "Rain drops screen saver", dmenuVarCheck, configSaver, NULL, "saver=rain" }, - { "8 Snake", "Draw a FreeBSD \"snake\" on your screen", + { "a Snake", "Draw a FreeBSD \"snake\" on your screen", dmenuVarCheck, configSaver, NULL, "saver=snake" }, - { "9 Star", "A \"twinkling stars\" effect", + { "b Star", "A \"twinkling stars\" effect", dmenuVarCheck, configSaver, NULL, "saver=star" }, - { "Warp", "A \"stars warping\" effect", + { "c Warp", "A \"stars warping\" effect", dmenuVarCheck, configSaver, NULL, "saver=warp" }, - { "Dragon", "Dragon screensaver (graphics)", - dmenuVarCheck, configSaver, NULL, "saver=dragon" }, { "Timeout", "Set the screen saver timeout interval", NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' }, { NULL } }, From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:42:30 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88034106566C; Wed, 7 Apr 2010 17:42:30 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw2.york.ac.uk (mail-gw2.york.ac.uk [144.32.128.247]) by mx1.freebsd.org (Postfix) with ESMTP id 36AA38FC2B; Wed, 7 Apr 2010 17:42:29 +0000 (UTC) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw2.york.ac.uk (8.13.6/8.13.6) with ESMTP id o37HgQsf024375; Wed, 7 Apr 2010 18:42:26 +0100 (BST) Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1NzZGk-00036X-AA; Wed, 07 Apr 2010 18:42:26 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.3/8.14.3) with ESMTP id o37HgPkH080636; Wed, 7 Apr 2010 18:42:26 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.3/8.14.3/Submit) id o37HgPqN080635; Wed, 7 Apr 2010 18:42:25 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Rui Paulo In-Reply-To: <201004071529.o37FTDi0035619@svn.freebsd.org> References: <201004071529.o37FTDi0035619@svn.freebsd.org> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Date: Wed, 07 Apr 2010 18:42:24 +0100 Message-ID: <1270662144.74915.108.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206358 - in head/sys: conf dev/bwi dev/bwn dev/iwn dev/ral dev/usb/wlan dev/wpi modules/wlan net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:42:30 -0000 On Wed, 2010-04-07 at 15:29 +0000, Rui Paulo wrote: > Author: rpaulo > Date: Wed Apr 7 15:29:13 2010 > New Revision: 206358 > URL: http://svn.freebsd.org/changeset/base/206358 >=20 > Log: > net80211 rate control framework (net80211 ratectl). This looks to be great work! Thanks for doing this. [...] > MFC after: 1 months The changes change KBI - I don't think it can be MFC'd as-is? (especially the sys/net80211/ieee80211_var.h changes) Also... > @@ -3393,8 +3368,8 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ > bus_dmamap_unload(sc->sc_buf_dtag, tb->tb_dmap); > =20 > ni =3D tb->tb_ni; > + vap =3D ni->ni_vap; > if (tb->tb_ni !=3D NULL) { > - struct bwi_node *bn =3D (struct bwi_node *) tb->tb_ni; If (tb->tb_ni) can indeed be NULL here, we'll now panic. If not, there's no need for the conditional. > @@ -921,13 +900,12 @@ rt2661_tx_intr(struct rt2661_softc *sc) > data->m =3D NULL; > ni =3D data->ni; > data->ni =3D NULL; > + vap =3D ni->ni_vap; > =20 > /* if no frame has been sent, ignore */ > if (ni =3D=3D NULL) > continue; > =20 > - rn =3D RT2661_NODE(ni); > - Same here. Either we'll panic, or the test for (ni =3D=3D NULL) isn't needed. > @@ -1022,6 +1008,7 @@ rt2560_tx_intr(struct rt2560_softc *sc) > data->m =3D NULL; > ieee80211_free_node(data->ni); > data->ni =3D NULL; > + ni =3D NULL; >=20 > /* descriptor is no longer valid */ > desc->flags &=3D ~htole32(RT2560_TX_VALID); This seems unnecessary - we never read "ni" again. Either we fall out of the loop and exit the subroutine, or we go round the loop again and overwrite it. > Index: head/sys/dev/usb/wlan/if_urtw.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- head/sys/dev/usb/wlan/if_urtw.c (revision 206357) > +++ head/sys/dev/usb/wlan/if_urtw.c (revision 206358) > @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); > #include >=20 > SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L")= ; > +#define URTW_DEBUG > #ifdef URTW_DEBUG > int urtw_debug =3D 0; > SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RW, &urtw_debug, 0, Is this change intentional? Thanks, Gavin From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:46:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14E2F106567C; Wed, 7 Apr 2010 17:46:09 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by mx1.freebsd.org (Postfix) with ESMTP id 10BDE8FC1A; Wed, 7 Apr 2010 17:46:07 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id l26so1500160fgb.13 for ; Wed, 07 Apr 2010 10:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=6fkfVUeEUgMl06X+9zefJPnpYAy7QPeLNXVAwqMDyNU=; b=lNaTrks8gJqolLfh08WOJGbqN3rZVckl4hn44Ks8P8/kjeecjYFqR43j4XNDRznFeC a8yHUOfOZBsDcSJOQgtNrkYpI4k0aPweAJei1hCCw+NP91yp3eDm7ICD8u5bYQ9issxu 8MzU+gztpt0La00qIRn/BtUz3dHitAknGle8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=c8ev9HP/t4zYoT3xjXBsEwXP9m48wenDK6VV2jx7/AZo7UEcpLdoUxfY8A2jQiOT0r D6qLXWYcVT4QvOI8VgDrVf/GjY9P1Cy/kZgeAWjqM33YjKASC5i0L0Ffj4Y9C7JdrHoX mWA6DrnHTGnojAieTuoz/HucG+roUL/W/bsTE= Received: by 10.87.35.9 with SMTP id n9mr1004599fgj.45.1270662366906; Wed, 07 Apr 2010 10:46:06 -0700 (PDT) Received: from [10.0.10.2] (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id 16sm9657382fxm.4.2010.04.07.10.46.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Apr 2010 10:46:06 -0700 (PDT) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <1270662144.74915.108.camel@buffy.york.ac.uk> Date: Wed, 7 Apr 2010 18:46:03 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <201004071529.o37FTDi0035619@svn.freebsd.org> <1270662144.74915.108.camel@buffy.york.ac.uk> To: Gavin Atkinson X-Mailer: Apple Mail (2.1078) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206358 - in head/sys: conf dev/bwi dev/bwn dev/iwn dev/ral dev/usb/wlan dev/wpi modules/wlan net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:46:09 -0000 On 7 Apr 2010, at 18:42, Gavin Atkinson wrote: > On Wed, 2010-04-07 at 15:29 +0000, Rui Paulo wrote: >> Author: rpaulo >> Date: Wed Apr 7 15:29:13 2010 >> New Revision: 206358 >> URL: http://svn.freebsd.org/changeset/base/206358 >> >> Log: >> net80211 rate control framework (net80211 ratectl). > > This looks to be great work! Thanks for doing this. > > [...] > >> MFC after: 1 months > > The changes change KBI - I don't think it can be MFC'd as-is? > (especially the sys/net80211/ieee80211_var.h changes) It can be MFC'ed but not as-is. > > Also... > >> @@ -3393,8 +3368,8 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ >> bus_dmamap_unload(sc->sc_buf_dtag, tb->tb_dmap); >> >> ni = tb->tb_ni; >> + vap = ni->ni_vap; >> if (tb->tb_ni != NULL) { >> - struct bwi_node *bn = (struct bwi_node *) tb->tb_ni; > > If (tb->tb_ni) can indeed be NULL here, we'll now panic. If not, there's > no need for the conditional. > >> @@ -921,13 +900,12 @@ rt2661_tx_intr(struct rt2661_softc *sc) >> data->m = NULL; >> ni = data->ni; >> data->ni = NULL; >> + vap = ni->ni_vap; >> >> /* if no frame has been sent, ignore */ >> if (ni == NULL) >> continue; >> >> - rn = RT2661_NODE(ni); >> - > > Same here. Either we'll panic, or the test for (ni == NULL) isn't > needed. Right, this needs to be moved down. > >> @@ -1022,6 +1008,7 @@ rt2560_tx_intr(struct rt2560_softc *sc) >> data->m = NULL; >> ieee80211_free_node(data->ni); >> data->ni = NULL; >> + ni = NULL; >> >> /* descriptor is no longer valid */ >> desc->flags &= ~htole32(RT2560_TX_VALID); > > This seems unnecessary - we never read "ni" again. Either we fall out > of the loop and exit the subroutine, or we go round the loop again and > overwrite it. I'll remove it. > >> Index: head/sys/dev/usb/wlan/if_urtw.c >> =================================================================== >> --- head/sys/dev/usb/wlan/if_urtw.c (revision 206357) >> +++ head/sys/dev/usb/wlan/if_urtw.c (revision 206358) >> @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); >> #include >> >> SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L"); >> +#define URTW_DEBUG >> #ifdef URTW_DEBUG >> int urtw_debug = 0; >> SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RW, &urtw_debug, 0, > > Is this change intentional? No. Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:48:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A2DF1065676; Wed, 7 Apr 2010 17:48:13 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AC298FC21; Wed, 7 Apr 2010 17:48:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37HmDZn066832; Wed, 7 Apr 2010 17:48:13 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HmDZB066830; Wed, 7 Apr 2010 17:48:13 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071748.o37HmDZB066830@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 17:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206369 - head/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:48:13 -0000 Author: rpaulo Date: Wed Apr 7 17:48:13 2010 New Revision: 206369 URL: http://svn.freebsd.org/changeset/base/206369 Log: Remove debugging code that snuck in. Modified: head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Wed Apr 7 17:40:48 2010 (r206368) +++ head/sys/dev/usb/wlan/if_urtw.c Wed Apr 7 17:48:13 2010 (r206369) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); #include SYSCTL_NODE(_hw_usb, OID_AUTO, urtw, CTLFLAG_RW, 0, "USB Realtek 8187L"); -#define URTW_DEBUG #ifdef URTW_DEBUG int urtw_debug = 0; SYSCTL_INT(_hw_usb_urtw, OID_AUTO, debug, CTLFLAG_RW, &urtw_debug, 0, From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:49:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C0E31065687; Wed, 7 Apr 2010 17:49:48 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CCBE8FC21; Wed, 7 Apr 2010 17:49:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37Hnm6A067195; Wed, 7 Apr 2010 17:49:48 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HnmVP067193; Wed, 7 Apr 2010 17:49:48 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071749.o37HnmVP067193@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 17:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206370 - head/sys/dev/bwi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:49:48 -0000 Author: rpaulo Date: Wed Apr 7 17:49:47 2010 New Revision: 206370 URL: http://svn.freebsd.org/changeset/base/206370 Log: Avoid NULL deref. Submitted by: gavin MFC after: 1 month Modified: head/sys/dev/bwi/if_bwi.c Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Wed Apr 7 17:48:13 2010 (r206369) +++ head/sys/dev/bwi/if_bwi.c Wed Apr 7 17:49:47 2010 (r206370) @@ -3368,10 +3368,10 @@ _bwi_txeof(struct bwi_softc *sc, uint16_ bus_dmamap_unload(sc->sc_buf_dtag, tb->tb_dmap); ni = tb->tb_ni; - vap = ni->ni_vap; if (tb->tb_ni != NULL) { const struct bwi_txbuf_hdr *hdr = mtod(tb->tb_mbuf, const struct bwi_txbuf_hdr *); + vap = ni->ni_vap; /* NB: update rate control only for unicast frames */ if (hdr->txh_mac_ctrl & htole32(BWI_TXH_MAC_C_ACK)) { From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:51:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10C591065674; Wed, 7 Apr 2010 17:51:07 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 018DA8FC16; Wed, 7 Apr 2010 17:51:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37Hp6Mf067552; Wed, 7 Apr 2010 17:51:06 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37Hp6kg067550; Wed, 7 Apr 2010 17:51:06 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071751.o37Hp6kg067550@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 17:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206371 - head/sys/dev/ral X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:51:07 -0000 Author: rpaulo Date: Wed Apr 7 17:51:06 2010 New Revision: 206371 URL: http://svn.freebsd.org/changeset/base/206371 Log: Avoid NULL deref. Submitted by: gavin MFC after: 1 month Modified: head/sys/dev/ral/rt2661.c Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Wed Apr 7 17:49:47 2010 (r206370) +++ head/sys/dev/ral/rt2661.c Wed Apr 7 17:51:06 2010 (r206371) @@ -900,11 +900,12 @@ rt2661_tx_intr(struct rt2661_softc *sc) data->m = NULL; ni = data->ni; data->ni = NULL; - vap = ni->ni_vap; /* if no frame has been sent, ignore */ if (ni == NULL) continue; + else + vap = ni->ni_vap; switch (RT2661_TX_RESULT(val)) { case RT2661_TX_SUCCESS: From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:52:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF287106564A; Wed, 7 Apr 2010 17:52:32 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFB4B8FC18; Wed, 7 Apr 2010 17:52:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37HqW5a067928; Wed, 7 Apr 2010 17:52:32 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HqW6Z067926; Wed, 7 Apr 2010 17:52:32 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071752.o37HqW6Z067926@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 17:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206372 - head/sys/dev/ral X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:52:32 -0000 Author: rpaulo Date: Wed Apr 7 17:52:32 2010 New Revision: 206372 URL: http://svn.freebsd.org/changeset/base/206372 Log: Remove unnecessary assignment. Submitted by: gavin MFC after: 1 month Modified: head/sys/dev/ral/rt2560.c Modified: head/sys/dev/ral/rt2560.c ============================================================================== --- head/sys/dev/ral/rt2560.c Wed Apr 7 17:51:06 2010 (r206371) +++ head/sys/dev/ral/rt2560.c Wed Apr 7 17:52:32 2010 (r206372) @@ -1008,7 +1008,6 @@ rt2560_tx_intr(struct rt2560_softc *sc) data->m = NULL; ieee80211_free_node(data->ni); data->ni = NULL; - ni = NULL; /* descriptor is no longer valid */ desc->flags &= ~htole32(RT2560_TX_VALID); From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:54:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77400106564A; Wed, 7 Apr 2010 17:54:49 +0000 (UTC) (envelope-from Andre.Albsmeier@siemens.com) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by mx1.freebsd.org (Postfix) with ESMTP id E967F8FC0A; Wed, 7 Apr 2010 17:54:47 +0000 (UTC) Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o37Hsko2018285; Wed, 7 Apr 2010 19:54:46 +0200 Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.40.130]) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id o37HskkX021817; Wed, 7 Apr 2010 19:54:46 +0200 Received: (from localhost) by curry.mchp.siemens.de (8.14.4/8.14.4) id o37Hsk0a003747; Date: Wed, 7 Apr 2010 19:54:46 +0200 From: Andre Albsmeier To: Pyun YongHyeon Message-ID: <20100407175446.GA28015@curry.mchp.siemens.de> References: <201003241721.o2OHL5K9063538@svn.freebsd.org> <20100405145937.GA78871@curry.mchp.siemens.de> <20100405180642.GD1225@michelle.cdnetworks.com> <20100406134626.GA1727@curry.mchp.siemens.de> <20100406180027.GA3724@curry.mchp.siemens.de> <20100406184456.GA1087@michelle.cdnetworks.com> <20100406195936.GA48023@curry.mchp.siemens.de> <20100406202949.GB1087@michelle.cdnetworks.com> <20100407053417.GB2899@curry.mchp.siemens.de> <20100407170404.GA5734@michelle.cdnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100407170404.GA5734@michelle.cdnetworks.com> X-Echelon: X-Advice: Drop that crappy M$-Outlook, I'm tired of your viruses! User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "Albsmeier, Andre" , Pyun YongHyeon Subject: Re: svn commit: r205614 - stable/7/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:54:49 -0000 On Wed, 07-Apr-2010 at 19:04:04 +0200, Pyun YongHyeon wrote: > On Wed, Apr 07, 2010 at 07:34:17AM +0200, Andre Albsmeier wrote: > > On Tue, 06-Apr-2010 at 22:29:49 +0200, Pyun YongHyeon wrote: > > > On Tue, Apr 06, 2010 at 09:59:36PM +0200, Andre Albsmeier wrote: > > > > On Tue, 06-Apr-2010 at 20:44:56 +0200, Pyun YongHyeon wrote: > > > > > On Tue, Apr 06, 2010 at 08:00:27PM +0200, Andre Albsmeier wrote: > > > > > > On Tue, 06-Apr-2010 at 15:46:26 +0200, Andre Albsmeier wrote: > > > > > > > On Mon, 05-Apr-2010 at 20:06:42 +0200, Pyun YongHyeon wrote: > > > > > > > > > > [...] > > > > > > > > > > > > > As you know 1.18.2.38 removed taskqueue based interrupt handling so > > > > > > > > it could be culprit of the issue. But that revision also removed > > > > > > > > two register accesses in TX path so I'd like to know which one > > > > > > > > caused the issue. > > > > > > > > > > > > > > I have now tried rev. 1.18.2.38 with this patch (no idea if > > > > > > > this is right ;-)): > > > > > > > > > > > > > > --- if_msk.c.1.18.2.38 2010-04-06 15:09:19.000000000 +0200 > > > > > > > +++ if_msk.c.1.18.2.38.TRY 2010-04-06 15:38:13.000000000 +0200 > > > > > > > @@ -3327,6 +3327,11 @@ > > > > > > > uint32_t control, status; > > > > > > > int cons, len, port, rxprog; > > > > > > > > > > > > > > + int idx; > > > > > > > + idx = CSR_READ_2(sc, STAT_PUT_IDX); > > > > > > > + if (idx == sc->msk_stat_cons) > > > > > > > + return (0); > > > > > > > + > > > > > > > /* Sync status LEs. */ > > > > > > > bus_dmamap_sync(sc->msk_stat_tag, sc->msk_stat_map, > > > > > > > BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); > > > > > > > @@ -3407,7 +3412,7 @@ > > > > > > > if (rxput[MSK_PORT_B] > 0) > > > > > > > msk_rxput(sc->msk_if[MSK_PORT_B]); > > > > > > > > > > > > > > - return (rxprog > sc->msk_process_limit ? EAGAIN : 0); > > > > > > > + return (sc->msk_stat_cons != CSR_READ_2(sc, STAT_PUT_IDX)); > > > > > > > } > > > > > > > > > > > > > > static void > > > > > > > > > > > > > > Now performance seems to be the same as with the older > > > > > > > driver (at least here at work) and in both directions! > > > > > > > Some numbers: > > > > > > > > > > > > > > em0 writes to rev. 1.18.2.36: 20 seconds > > > > > > > em0 writes to rev. 1.18.2.38: 50 seconds > > > > > > > em0 writes to rev. 1.18.2.38 with patch from above: 23 seconds > > > > > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > > > > > > > > > rev. 1.18.2.36 writes to em0: 22 seconds > > > > > > > rev. 1.18.2.38 writes to em0: 40 seconds > > > > > > > rev. 1.18.2.38 with patch from above writes to em0: 21 seconds > > > > > > > same as before but with int_holdoff: 100 -> 1: 20 seconds > > > > > > > > > > > > > > It seems that these two CSR_READ_2s really help ;-). > > > > > > > > > > > > > > As I said, this is at work and with slightly different machines. > > > > > > > I will try things at home later but I am rather confident of > > > > > > > receiving good results there as well... > > > > > > > > > > > > OK, tests at home show similar good results with the > > > > > > above patch. When setting int_holdoff to 3, performance > > > > > > seems equal to the older versions. > > > > > > > > > > > > > > > > Thanks a lot for narrowing down the issue. > > > > > Because the msk_handle_events() are called in interrupt handler > > > > > I'd like to remove the two register accesses in fast path. It seems > > > > > accessing STAT_PUT_IDX triggers status updates. Would you try > > > > > attached patch and let me know whether the patch makes any > > > > > difference? > > > > > > > > > Index: sys/dev/msk/if_msk.c > > > > > =================================================================== > > > > > --- sys/dev/msk/if_msk.c (revision 206204) > > > > > +++ sys/dev/msk/if_msk.c (working copy) > > > > > @@ -1470,6 +1470,7 @@ > > > > > /* WA for dev. #4.18 */ > > > > > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x21); > > > > > CSR_WRITE_1(sc, STAT_FIFO_ISR_WM, 0x07); > > > > > + CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 10)); > > > > > } else { > > > > > CSR_WRITE_2(sc, STAT_TX_IDX_TH, 0x0a); > > > > > CSR_WRITE_1(sc, STAT_FIFO_WM, 0x10); > > > > > @@ -1481,9 +1482,16 @@ > > > > > CSR_WRITE_4(sc, STAT_ISR_TIMER_INI, 0x0190); > > > > > } > > > > > /* > > > > > - * Use default value for STAT_ISR_TIMER_INI, STAT_LEV_TIMER_INI. > > > > > + * STAT_TX_TIMER_INI, STAT_ISR_TIMER_INI and STAT_LEV_TIMER_INI > > > > > + * as well as various water mark registers seem to control when > > > > > + * controller initiates status LE update. > > > > > + * It's not clear how these registers interact with interrupt > > > > > + * state but STAT_TX_TIMER_INI seems to control status update > > > > > + * time after crossing a threshold(STAT_TX_IDX_TH) value. Due to > > > > > + * the complexity of various parameters that may affect status > > > > > + * update just use hardware default until we know better > > > > > + * the internal things of status updates. > > > > > */ > > > > > - CSR_WRITE_4(sc, STAT_TX_TIMER_INI, MSK_USECS(sc, 1000)); > > > > > > > > > > /* Enable status unit. */ > > > > > CSR_WRITE_4(sc, STAT_CTRL, SC_STAT_OP_ON); > > > > > > > > After applying this patch against an original 1.18.2.39 > > > > things became even worse. After 4 minutes of waiting I > > > > aborted untar'ing the file ;-). Setting int_holdoff=2 > > > > made things better, now it took 65 seconds for untar'ing... > > > > > > > > > > :-( > > > > > > By chance, did you disable MSI(msi_disable=1)? > > > > Yes. Do you want me to test again with MSI enabled? > > > > Hmm, after reading code again MSI does not seem to trigger the > issue. I'll revert that part of code. > Thank you very much for testing and reporting! No problem. If you want me to do more tests just drop me a note... Thanks for your work on this! -Andre From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 17:58:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E404C1065674; Wed, 7 Apr 2010 17:58:29 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3A078FC16; Wed, 7 Apr 2010 17:58:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37HwTAh069287; Wed, 7 Apr 2010 17:58:29 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37HwTfD069285; Wed, 7 Apr 2010 17:58:29 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004071758.o37HwTfD069285@svn.freebsd.org> From: Matt Jacob Date: Wed, 7 Apr 2010 17:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206373 - stable/8/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 17:58:30 -0000 Author: mjacob Date: Wed Apr 7 17:58:29 2010 New Revision: 206373 URL: http://svn.freebsd.org/changeset/base/206373 Log: This is an MFC of 205993 For unhandled actions in xpt_action_default, remember to call xpt_done for queued requests. This solves the problem of indefinite hangs for unspecified transports when XPT_SCAN_BUS is called. A few minor cosmetics elsewhere. Modified: stable/8/sys/cam/cam_xpt.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/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Wed Apr 7 17:52:32 2010 (r206372) +++ stable/8/sys/cam/cam_xpt.c Wed Apr 7 17:58:29 2010 (r206373) @@ -2375,6 +2375,7 @@ xpt_action_default(union ccb *start_ccb) if (start_ccb->ccb_h.func_code == XPT_ATA_IO) { start_ccb->ataio.resid = 0; } + /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: { @@ -2883,6 +2884,9 @@ xpt_action_default(union ccb *start_ccb) case XPT_ENG_INQ: /* XXX Implement */ start_ccb->ccb_h.status = CAM_PROVIDE_FAIL; + if (start_ccb->ccb_h.func_code & XPT_FC_DEV_QUEUED) { + xpt_done(start_ccb); + } break; } } @@ -3925,7 +3929,7 @@ xpt_dev_async_default(u_int32_t async_co struct cam_et *target, struct cam_ed *device, void *async_arg) { - printf("xpt_dev_async called\n"); + printf("%s called\n", __func__); } u_int32_t @@ -4827,4 +4831,3 @@ camisr_runqueue(void *V_queue) (*ccb_h->cbfcnp)(ccb_h->path->periph, (union ccb *)ccb_h); } } - From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 18:04:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D01151065670; Wed, 7 Apr 2010 18:04:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C025E8FC19; Wed, 7 Apr 2010 18:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37I4Prl070677; Wed, 7 Apr 2010 18:04:25 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37I4PDI070675; Wed, 7 Apr 2010 18:04:25 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004071804.o37I4PDI070675@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Apr 2010 18:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206374 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 18:04:25 -0000 Author: jkim Date: Wed Apr 7 18:04:25 2010 New Revision: 206374 URL: http://svn.freebsd.org/changeset/base/206374 Log: Reflect recent logo_saver changes and mention dragon_saver. Modified: head/share/man/man4/splash.4 Modified: head/share/man/man4/splash.4 ============================================================================== --- head/share/man/man4/splash.4 Wed Apr 7 17:58:29 2010 (r206373) +++ head/share/man/man4/splash.4 Wed Apr 7 18:04:25 2010 (r206374) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2006 +.Dd April 7, 2010 .Dt SPLASH 4 .Os .Sh NAME @@ -99,10 +99,16 @@ Currently the following screen saver mod .Bl -tag -width splash_module.ko -compact .It Pa blank_saver.ko This screen saver simply blanks the screen. +.It Pa beastie_saver.ko +Animated graphical +.Bx +Daemon. .It Pa daemon_saver.ko Animated .Bx Daemon screen saver. +.It Pa dragon_saver.ko +Draws a random dragon curve. .It Pa fade_saver.ko The screen will gradually fade away. .It Pa fire_saver.ko @@ -111,8 +117,8 @@ A fire which becomes higher as load incr If the monitor supports power saving mode, it will be turned off. .It Pa logo_saver.ko Animated graphical -.Bx -Daemon. +.Fx +logo. .It Pa rain_saver.ko Draws a shower on the screen. .It Pa snake_saver.ko From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 18:14:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 042B3106567E; Wed, 7 Apr 2010 18:14:31 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8DD28FC2E; Wed, 7 Apr 2010 18:14:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37IEUb6072972; Wed, 7 Apr 2010 18:14:30 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37IEUCA072970; Wed, 7 Apr 2010 18:14:30 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004071814.o37IEUCA072970@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 7 Apr 2010 18:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206375 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 18:14:31 -0000 Author: ume Date: Wed Apr 7 18:14:30 2010 New Revision: 206375 URL: http://svn.freebsd.org/changeset/base/206375 Log: firewall_trusted_ipv6 was gone by r202460. Remove stale comment about it as well. Modified: head/etc/rc.firewall Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Wed Apr 7 18:04:25 2010 (r206374) +++ head/etc/rc.firewall Wed Apr 7 18:14:30 2010 (r206375) @@ -426,7 +426,7 @@ case ${firewall_type} in # offers services. # firewall_allowservices: List of IPs which has access to # $firewall_myservices. - # firewall_trusted: List of IPv4s which has full access + # firewall_trusted: List of IPs which has full access # to this host. Be very carefull # when setting this. This option can # seriously degrade the level of @@ -437,11 +437,6 @@ case ${firewall_type} in # firewall_nologports: List of TCP/UDP ports for which # denied incomming packets are not # logged. - # firewall_trusted_ipv6: List of IPv6s which has full access - # to this host. Be very carefull - # when setting this. This option can - # seriously degrade the level of - # protection provided by the firewall. # Allow packets for which a state has been built. ${fwcmd} add check-state From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 18:16:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE080106566B; Wed, 7 Apr 2010 18:16:05 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC0BF8FC20; Wed, 7 Apr 2010 18:16:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37IG5mj073360; Wed, 7 Apr 2010 18:16:05 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37IG5Um073349; Wed, 7 Apr 2010 18:16:05 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071816.o37IG5Um073349@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 18:16:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206376 - head/sys/boot/i386/efi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 18:16:06 -0000 Author: rpaulo Date: Wed Apr 7 18:16:05 2010 New Revision: 206376 URL: http://svn.freebsd.org/changeset/base/206376 Log: EFI boot loader for FreeBSD/i386. Doesn't boot a kernel yet, but it can read an ELF file from the EFI FAT partition. Added: head/sys/boot/i386/efi/ head/sys/boot/i386/efi/Makefile (contents, props changed) head/sys/boot/i386/efi/autoload.c (contents, props changed) head/sys/boot/i386/efi/bootinfo.c (contents, props changed) head/sys/boot/i386/efi/conf.c (contents, props changed) head/sys/boot/i386/efi/devicename.c (contents, props changed) head/sys/boot/i386/efi/efimd.c (contents, props changed) head/sys/boot/i386/efi/elf32_freebsd.c (contents, props changed) head/sys/boot/i386/efi/exec.c (contents, props changed) head/sys/boot/i386/efi/i386_copy.c (contents, props changed) head/sys/boot/i386/efi/ldscript.amd64 (contents, props changed) head/sys/boot/i386/efi/ldscript.i386 (contents, props changed) head/sys/boot/i386/efi/main.c (contents, props changed) head/sys/boot/i386/efi/reloc.c (contents, props changed) head/sys/boot/i386/efi/start.S (contents, props changed) head/sys/boot/i386/efi/version (contents, props changed) Added: head/sys/boot/i386/efi/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/Makefile Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,69 @@ +# $FreeBSD$ + +NO_MAN= +WITHOUT_SSP= +BUILDING_EFI= + +.include + +PROG= loader.sym +INTERNALPROG= + +# architecture-specific loader code +SRCS= main.c exec.c conf.c vers.c reloc.c start.S elf32_freebsd.c +SRCS+= i386_copy.c bootinfo.c autoload.c devicename.c efimd.c + +CFLAGS+= -I${.CURDIR}/../../efi/include +CFLAGS+= -I${.CURDIR}/../../efi/include/i386 + +.if ${MK_FORTH} != "no" +BOOT_FORTH= yes +CFLAGS+= -DBOOT_FORTH +CFLAGS+= -I${.CURDIR}/../../ficl +CFLAGS+= -I${.CURDIR}/../../ficl/i386 +LIBFICL= ${.OBJDIR}/../../ficl/libficl.a +.endif + +# Include bcache code. +HAVE_BCACHE= yes + +# Always add MI sources +.PATH: ${.CURDIR}/../../common +.include "${.CURDIR}/../../common/Makefile.inc" +CFLAGS+= -I${.CURDIR}/../../common + +FILES= loader.efi +FILESMODE_loader.efi= ${BINMODE} + +LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH} +LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic + +${PROG}: ${LDSCRIPT} + +CLEANFILES= vers.c loader.efi + +NEWVERSWHAT= "EFI loader" ${MACHINE_ARCH} + +vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version + sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} + +OBJCOPY?= objcopy +OBJDUMP?= objdump + +loader.efi: loader.sym + if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \ + ${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \ + exit 1; \ + fi + ${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \ + -j .rel.dyn -j .reloc -j .sdata -j .text -j set_Xcommand_set \ + --target=efi-app-ia32 ${.ALLSRC} ${.TARGET} + +LIBEFI= ${.OBJDIR}/../../efi/libefi/libefi.a +CFLAGS+= -I${.CURDIR}/../libi386 +CFLAGS+= -I${.CURDIR}/../btx/lib + +DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} +LDADD= ${LIBFICL} ${LIBEFI} -lstand + +.include Added: head/sys/boot/i386/efi/autoload.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/autoload.c Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,9 @@ +#include +__FBSDID("$FreeBSD$"); + +int +i386_autoload(void) +{ + + return (0); +} Added: head/sys/boot/i386/efi/bootinfo.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/bootinfo.c Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,297 @@ +/*- + * Copyright (c) 1998 Michael Smith + * Copyright (c) 2006 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include "bootstrap.h" +#include "libi386.h" +#include + +/* + * Return a 'boothowto' value corresponding to the kernel arguments in + * (kargs) and any relevant environment variables. + */ +static struct +{ + const char *ev; + int mask; +} howto_names[] = { + { "boot_askname", RB_ASKNAME}, + { "boot_cdrom", RB_CDROM}, + { "boot_ddb", RB_KDB}, + { "boot_dfltroot", RB_DFLTROOT}, + { "boot_gdb", RB_GDB}, + { "boot_multicons", RB_MULTIPLE}, + { "boot_mute", RB_MUTE}, + { "boot_pause", RB_PAUSE}, + { "boot_serial", RB_SERIAL}, + { "boot_single", RB_SINGLE}, + { "boot_verbose", RB_VERBOSE}, + { NULL, 0} +}; + +static const char howto_switches[] = "aCdrgDmphsv"; +static int howto_masks[] = { + RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, + RB_MUTE, RB_PAUSE, RB_SERIAL, RB_SINGLE, RB_VERBOSE +}; + +int +bi_getboothowto(char *kargs) +{ + const char *sw; + char *opts; + int howto, i; + + howto = 0; + + /* Get the boot options from the environment first. */ + for (i = 0; howto_names[i].ev != NULL; i++) { + if (getenv(howto_names[i].ev) != NULL) + howto |= howto_names[i].mask; + } + + /* Parse kargs */ + if (kargs == NULL) + return (howto); + + opts = strchr(kargs, '-'); + while (opts != NULL) { + while (*(++opts) != '\0') { + sw = strchr(howto_switches, *opts); + if (sw == NULL) + break; + howto |= howto_masks[sw - howto_switches]; + } + opts = strchr(opts, '-'); + } + + return (howto); +} + +/* + * Copy the environment into the load area starting at (addr). + * Each variable is formatted as =, with a single nul + * separating each variable, and a double nul terminating the environment. + */ +vm_offset_t +bi_copyenv(vm_offset_t start) +{ + struct env_var *ep; + vm_offset_t addr, last; + size_t len; + + addr = last = start; + + /* Traverse the environment. */ + for (ep = environ; ep != NULL; ep = ep->ev_next) { + len = strlen(ep->ev_name); + if (i386_copyin(ep->ev_name, addr, len) != len) + break; + addr += len; + if (i386_copyin("=", addr, 1) != 1) + break; + addr++; + if (ep->ev_value != NULL) { + len = strlen(ep->ev_value); + if (i386_copyin(ep->ev_value, addr, len) != len) + break; + addr += len; + } + if (i386_copyin("", addr, 1) != 1) + break; + last = ++addr; + } + + if (i386_copyin("", last++, 1) != 1) + last = start; + return(last); +} + +/* + * Copy module-related data into the load area, where it can be + * used as a directory for loaded modules. + * + * Module data is presented in a self-describing format. Each datum + * is preceded by a 32-bit identifier and a 32-bit size field. + * + * Currently, the following data are saved: + * + * MOD_NAME (variable) module name (string) + * MOD_TYPE (variable) module type (string) + * MOD_ARGS (variable) module parameters (string) + * MOD_ADDR sizeof(vm_offset_t) module load address + * MOD_SIZE sizeof(size_t) module size + * MOD_METADATA (variable) type-specific metadata + */ +#define COPY32(v, a) { \ + u_int32_t x = (v); \ + i386_copyin(&x, a, sizeof(x)); \ + a += sizeof(x); \ +} + +#define MOD_STR(t, a, s) { \ + COPY32(t, a); \ + COPY32(strlen(s) + 1, a); \ + i386_copyin(s, a, strlen(s) + 1); \ + a += roundup(strlen(s) + 1, sizeof(u_int64_t));\ +} + +#define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s) +#define MOD_TYPE(a, s) MOD_STR(MODINFO_TYPE, a, s) +#define MOD_ARGS(a, s) MOD_STR(MODINFO_ARGS, a, s) + +#define MOD_VAR(t, a, s) { \ + COPY32(t, a); \ + COPY32(sizeof(s), a); \ + i386_copyin(&s, a, sizeof(s)); \ + a += roundup(sizeof(s), sizeof(u_int64_t)); \ +} + +#define MOD_ADDR(a, s) MOD_VAR(MODINFO_ADDR, a, s) +#define MOD_SIZE(a, s) MOD_VAR(MODINFO_SIZE, a, s) + +#define MOD_METADATA(a, mm) { \ + COPY32(MODINFO_METADATA | mm->md_type, a); \ + COPY32(mm->md_size, a); \ + i386_copyin(mm->md_data, a, mm->md_size); \ + a += roundup(mm->md_size, sizeof(u_int64_t));\ +} + +#define MOD_END(a) { \ + COPY32(MODINFO_END, a); \ + COPY32(0, a); \ +} + +vm_offset_t +bi_copymodules(vm_offset_t addr) +{ + struct preloaded_file *fp; + struct file_metadata *md; + + /* Start with the first module on the list, should be the kernel. */ + for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) { + /* The name field must come first. */ + MOD_NAME(addr, fp->f_name); + MOD_TYPE(addr, fp->f_type); + if (fp->f_args) + MOD_ARGS(addr, fp->f_args); + MOD_ADDR(addr, fp->f_addr); + MOD_SIZE(addr, fp->f_size); + for (md = fp->f_metadata; md != NULL; md = md->md_next) { + if (!(md->md_type & MODINFOMD_NOCOPY)) + MOD_METADATA(addr, md); + } + } + MOD_END(addr); + return(addr); +} + +/* + * Load the information expected by the kernel. + * + * - The kernel environment is copied into kernel space. + * - Module metadata are formatted and placed in kernel space. + */ +int +bi_load(struct preloaded_file *fp, uint64_t *bi_addr) +{ + struct bootinfo bi; + struct preloaded_file *xp; + struct file_metadata *md; + struct devdesc *rootdev; + char *rootdevname; + vm_offset_t addr, ssym, esym; + + bzero(&bi, sizeof(struct bootinfo)); + bi.bi_version = 1; +// bi.bi_boothowto = bi_getboothowto(fp->f_args); + + /* + * Allow the environment variable 'rootdev' to override the supplied + * device. This should perhaps go to MI code and/or have $rootdev + * tested/set by MI code before launching the kernel. + */ + rootdevname = getenv("rootdev"); + i386_getdev((void**)&rootdev, rootdevname, NULL); + if (rootdev != NULL) { + /* Try reading /etc/fstab to select the root device. */ + getrootmount(i386_fmtdev(rootdev)); + free(rootdev); + } + + md = file_findmetadata(fp, MODINFOMD_SSYM); + ssym = (md != NULL) ? *((vm_offset_t *)&(md->md_data)) : 0; + md = file_findmetadata(fp, MODINFOMD_ESYM); + esym = (md != NULL) ? *((vm_offset_t *)&(md->md_data)) : 0; + if (ssym != 0 && esym != 0) { + bi.bi_symtab = ssym; + bi.bi_esymtab = esym; + } + + /* Find the last module in the chain. */ + addr = 0; + for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { + if (addr < (xp->f_addr + xp->f_size)) + addr = xp->f_addr + xp->f_size; + } + + addr = (addr + 15) & ~15; + + /* Copy module list and metadata. */ + bi.bi_modulep = addr; + addr = bi_copymodules(addr); + if (addr <= bi.bi_modulep) { + addr = bi.bi_modulep; + bi.bi_modulep = 0; + } + + addr = (addr + 15) & ~15; + + /* Copy our environment. */ + bi.bi_envp = addr; + addr = bi_copyenv(addr); + if (addr <= bi.bi_envp) { + addr = bi.bi_envp; + bi.bi_envp = 0; + } + + addr = (addr + PAGE_MASK) & ~PAGE_MASK; + bi.bi_kernend = addr; + + return (ldr_bootinfo(&bi, bi_addr)); +} Added: head/sys/boot/i386/efi/conf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/conf.c Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,77 @@ +/*- + * Copyright (c) 2006 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +struct devsw *devsw[] = { + &efipart_dev, + &efinet_dev, + NULL +}; + +struct fs_ops *file_system[] = { + &dosfs_fsops, + &ufs_fsops, + &cd9660_fsops, + &nfs_fsops, + &gzipfs_fsops, + NULL +}; + +struct netif_driver *netif_drivers[] = { + &efinetif, + NULL +}; + +#ifdef notyet +extern struct file_format amd64_elf; +extern struct file_format amd64_elf_obj; +#endif +extern struct file_format i386_elf; +extern struct file_format i386_elf_obj; + +struct file_format *file_formats[] = { +#ifdef notyet + &amd64_elf, + &amd64_elf_obj, +#endif + &i386_elf, + &i386_elf_obj, + NULL +}; + +extern struct console efi_console; + +struct console *consoles[] = { + &efi_console, + NULL +}; Added: head/sys/boot/i386/efi/devicename.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/devicename.c Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,169 @@ +/*- + * Copyright (c) 1998 Michael Smith + * Copyright (c) 2006 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include "bootstrap.h" + +#include +#include + +static int i386_parsedev(struct devdesc **, const char *, const char **); + +/* + * Point (dev) at an allocated device specifier for the device matching the + * path in (devspec). If it contains an explicit device specification, + * use that. If not, use the default device. + */ +int +i386_getdev(void **vdev, const char *devspec, const char **path) +{ + struct devdesc **dev = (struct devdesc **)vdev; + int rv; + + /* + * If it looks like this is just a path and no device, then + * use the current device instead. + */ + if (devspec == NULL || *devspec == '/' || !strchr(devspec, ':')) { + rv = i386_parsedev(dev, getenv("currdev"), NULL); + if (rv == 0 && path != NULL) + *path = devspec; + return (rv); + } + + /* Parse the device name off the beginning of the devspec. */ + return (i386_parsedev(dev, devspec, path)); +} + +/* + * Point (dev) at an allocated device specifier matching the string version + * at the beginning of (devspec). Return a pointer to the remaining + * text in (path). + * + * In all cases, the beginning of (devspec) is compared to the names + * of known devices in the device switch, and then any following text + * is parsed according to the rules applied to the device type. + * + * For disk-type devices, the syntax is: + * + * fs: + */ +static int +i386_parsedev(struct devdesc **dev, const char *devspec, const char **path) +{ + struct devdesc *idev; + struct devsw *dv; + char *cp; + const char *np; + int i, err; + + /* minimum length check */ + if (strlen(devspec) < 2) + return (EINVAL); + + /* look for a device that matches */ + for (i = 0; devsw[i] != NULL; i++) { + dv = devsw[i]; + if (!strncmp(devspec, dv->dv_name, strlen(dv->dv_name))) + break; + } + if (devsw[i] == NULL) + return (ENOENT); + + idev = malloc(sizeof(struct devdesc)); + if (idev == NULL) + return (ENOMEM); + + idev->d_dev = dv; + idev->d_type = dv->dv_type; + idev->d_unit = -1; + + err = 0; + np = devspec + strlen(dv->dv_name); + if (*np != '\0' && *np != ':') { + idev->d_unit = strtol(np, &cp, 0); + if (cp == np) { + idev->d_unit = -1; + free(idev); + return (EUNIT); + } + } + if (*cp != '\0' && *cp != ':') { + free(idev); + return (EINVAL); + } + + if (path != NULL) + *path = (*cp == 0) ? cp : cp + 1; + if (dev != NULL) + *dev = idev; + else + free(idev); + return (0); +} + +char * +i386_fmtdev(void *vdev) +{ + struct devdesc *dev = (struct devdesc *)vdev; + static char buf[32]; /* XXX device length constant? */ + + switch(dev->d_type) { + case DEVT_NONE: + strcpy(buf, "(no device)"); + break; + + default: + sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit); + break; + } + + return(buf); +} + +/* + * Set currdev to suit the value being supplied in (value) + */ +int +i386_setcurrdev(struct env_var *ev, int flags, const void *value) +{ + struct devdesc *ncurr; + int rv; + + rv = i386_parsedev(&ncurr, value, NULL); + if (rv != 0) + return(rv); + + free(ncurr); + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); + return (0); +} Added: head/sys/boot/i386/efi/efimd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/efimd.c Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,139 @@ +/*- + * Copyright (c) 2004, 2006 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include + +#include +#include + +#define EFI_INTEL_FPSWA \ + {0xc41b6531,0x97b9,0x11d3,{0x9a,0x29,0x00,0x90,0x27,0x3f,0xc1,0x4d}} + +static EFI_GUID fpswa_guid = EFI_INTEL_FPSWA; + +/* DIG64 Headless Console & Debug Port Table. */ +#define HCDP_TABLE_GUID \ + {0xf951938d,0x620b,0x42ef,{0x82,0x79,0xa8,0x4b,0x79,0x61,0x78,0x98}} + +static EFI_GUID hcdp_guid = HCDP_TABLE_GUID; + +static UINTN mapkey; + +uint64_t +ldr_alloc(vm_offset_t va) +{ + + return (0); +} + +int +ldr_bootinfo(struct bootinfo *bi, uint64_t *bi_addr) +{ + VOID *fpswa; + EFI_MEMORY_DESCRIPTOR *mm; + EFI_PHYSICAL_ADDRESS addr; + EFI_HANDLE handle; + EFI_STATUS status; + size_t bisz; + UINTN mmsz, pages, sz; + UINT32 mmver; + + bi->bi_systab = (uint64_t)ST; + bi->bi_hcdp = (uint64_t)efi_get_table(&hcdp_guid); + + sz = sizeof(EFI_HANDLE); + status = BS->LocateHandle(ByProtocol, &fpswa_guid, 0, &sz, &handle); + if (status == 0) + status = BS->HandleProtocol(handle, &fpswa_guid, &fpswa); + bi->bi_fpswa = (status == 0) ? (uint64_t)fpswa : 0; + + bisz = (sizeof(struct bootinfo) + 0x0f) & ~0x0f; + + /* + * Allocate enough pages to hold the bootinfo block and the memory + * map EFI will return to us. The memory map has an unknown size, + * so we have to determine that first. Note that the AllocatePages + * call can itself modify the memory map, so we have to take that + * into account as well. The changes to the memory map are caused + * by splitting a range of free memory into two (AFAICT), so that + * one is marked as being loader data. + */ + sz = 0; + BS->GetMemoryMap(&sz, NULL, &mapkey, &mmsz, &mmver); + sz += mmsz; + sz = (sz + 15) & ~15; + pages = EFI_SIZE_TO_PAGES(sz + bisz); + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, pages, + &addr); + if (EFI_ERROR(status)) { + printf("%s: AllocatePages() returned 0x%lx\n", __func__, + (long)status); + return (ENOMEM); + } + + /* + * Read the memory map and stash it after bootinfo. Align the + * memory map on a 16-byte boundary (the bootinfo block is page + * aligned). + */ + *bi_addr = addr; + mm = (void *)(addr + bisz); + sz = (EFI_PAGE_SIZE * pages) - bisz; + status = BS->GetMemoryMap(&sz, mm, &mapkey, &mmsz, &mmver); + if (EFI_ERROR(status)) { + printf("%s: GetMemoryMap() returned 0x%lx\n", __func__, + (long)status); + return (EINVAL); + } + bi->bi_memmap = (uint64_t)mm; + bi->bi_memmap_size = sz; + bi->bi_memdesc_size = mmsz; + bi->bi_memdesc_version = mmver; + + bcopy(bi, (void *)(*bi_addr), sizeof(*bi)); + return (0); +} + +int +ldr_enter(const char *kernel) +{ + EFI_STATUS status; + + status = BS->ExitBootServices(IH, mapkey); + if (EFI_ERROR(status)) { + printf("%s: ExitBootServices() returned 0x%lx\n", __func__, + (long)status); + return (EINVAL); + } + + return (0); +} Added: head/sys/boot/i386/efi/elf32_freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/elf32_freebsd.c Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,87 @@ +/*- + * Copyright (c) 1998 Michael Smith + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include "bootstrap.h" +#include "../libi386/libi386.h" +#include "../btx/lib/btxv86.h" + +extern void __exec(caddr_t addr, ...); + + +static int elf32_exec(struct preloaded_file *amp); +static int elf32_obj_exec(struct preloaded_file *amp); + +struct file_format i386_elf = { elf32_loadfile, elf32_exec }; +struct file_format i386_elf_obj = { elf32_obj_loadfile, elf32_obj_exec }; + +/* + * There is an ELF kernel and one or more ELF modules loaded. + * We wish to start executing the kernel image, so make such + * preparations as are required, and do so. + */ +static int +elf32_exec(struct preloaded_file *fp) +{ + struct file_metadata *md; + Elf_Ehdr *ehdr; + vm_offset_t entry, bootinfop, modulep, kernend; + int boothowto, err, bootdev; + + if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) + return(EFTYPE); + ehdr = (Elf_Ehdr *)&(md->md_data); + + err = bi_load(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend); + if (err != 0) + return(err); + entry = ehdr->e_entry & 0xffffff; + + printf("Start @ 0x%lx ...\n", entry); + + ldr_enter(fp->f_name); + + dev_cleanup(); + __exec((void *)entry, boothowto, bootdev, 0, 0, 0, bootinfop, modulep, kernend); + + panic("exec returned"); +} + +static int +elf32_obj_exec(struct preloaded_file *fp) +{ + return (EFTYPE); +} Added: head/sys/boot/i386/efi/exec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/exec.c Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2010 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include "../btx/lib/btxv86.h" + +#include "../../common/bootstrap.h" + +uint32_t __base; +struct __v86 __v86; + +void +__v86int() +{ + printf("%s\n", __func__); + exit(1); +} + +void +__exec(caddr_t addr, ...) +{ + /* XXX this is wrong */ + __asm __volatile("movl %cr0, %eax"); + __asm __volatile("andl $0x7fffffff, %eax"); + __asm __volatile("mov %eax, %cr0"); + __asm __volatile("xorl %eax, %eax"); + __asm __volatile("mov %eax, %cr3"); + __asm __volatile("movl %cr0, %eax"); + __asm __volatile("andl $0xfffffffe, %eax"); + __asm __volatile("movl %eax, %cr0"); + __asm __volatile("jmp %0" :: "r" (addr)); +} Added: head/sys/boot/i386/efi/i386_copy.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/i386_copy.c Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 1998 Michael Smith + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * MD primitives supporting placement of module data + * + * XXX should check load address/size against memory top. + */ +#include + +#include "libi386.h" +#include "btxv86.h" + +ssize_t +i386_copyin(const void *src, vm_offset_t dest, const size_t len) +{ + bcopy(src, PTOV(dest), len); + return(len); +} + +ssize_t +i386_copyout(const vm_offset_t src, void *dest, const size_t len) +{ + bcopy(PTOV(src), dest, len); + return(len); +} + + +ssize_t +i386_readin(const int fd, vm_offset_t dest, const size_t len) +{ + return (read(fd, PTOV(dest), len)); +} Added: head/sys/boot/i386/efi/ldscript.amd64 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/efi/ldscript.amd64 Wed Apr 7 18:16:05 2010 (r206376) @@ -0,0 +1,75 @@ +/* $FreeBSD$ */ +OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") +OUTPUT_ARCH(i386:x86-64) +ENTRY(_start) +SECTIONS *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 18:24:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E12C106566B; Wed, 7 Apr 2010 18:24:39 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D2508FC16; Wed, 7 Apr 2010 18:24:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37IOdxn075328; Wed, 7 Apr 2010 18:24:39 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37IOdUa075326; Wed, 7 Apr 2010 18:24:39 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071824.o37IOdUa075326@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 18:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206378 - head/sys/boot/i386/efi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 18:24:39 -0000 Author: rpaulo Date: Wed Apr 7 18:24:38 2010 New Revision: 206378 URL: http://svn.freebsd.org/changeset/base/206378 Log: Add a copyright. Modified: head/sys/boot/i386/efi/autoload.c Modified: head/sys/boot/i386/efi/autoload.c ============================================================================== --- head/sys/boot/i386/efi/autoload.c Wed Apr 7 18:18:33 2010 (r206377) +++ head/sys/boot/i386/efi/autoload.c Wed Apr 7 18:24:38 2010 (r206378) @@ -1,3 +1,29 @@ +/*- + * Copyright (c) 2010 Rui Paulo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #include __FBSDID("$FreeBSD$"); From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 18:26:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD8C71065700; Wed, 7 Apr 2010 18:26:13 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD50B8FC17; Wed, 7 Apr 2010 18:26:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37IQDcB075733; Wed, 7 Apr 2010 18:26:13 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37IQD0m075731; Wed, 7 Apr 2010 18:26:13 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201004071826.o37IQD0m075731@svn.freebsd.org> From: Joel Dahl Date: Wed, 7 Apr 2010 18:26:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206379 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 18:26:13 -0000 Author: joel (doc committer) Date: Wed Apr 7 18:26:13 2010 New Revision: 206379 URL: http://svn.freebsd.org/changeset/base/206379 Log: Switch to our preferred 2-clause BSD license. Approved by: jfv Modified: head/sys/i386/i386/mpboot.s Modified: head/sys/i386/i386/mpboot.s ============================================================================== --- head/sys/i386/i386/mpboot.s Wed Apr 7 18:24:38 2010 (r206378) +++ head/sys/i386/i386/mpboot.s Wed Apr 7 18:26:13 2010 (r206379) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1995, Jack F. Vogel + * Copyright (c) 1995 Jack F. Vogel * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -10,11 +10,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Jack F. Vogel - * 4. The name of the developer may be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 18:42:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AB5A1065672; Wed, 7 Apr 2010 18:42:22 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 197848FC0C; Wed, 7 Apr 2010 18:42:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37IgLT7079402; Wed, 7 Apr 2010 18:42:21 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37IgLpI079399; Wed, 7 Apr 2010 18:42:21 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004071842.o37IgLpI079399@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Apr 2010 18:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206380 - in head/sys: dev/syscons/logo modules/syscons/beastie X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 18:42:22 -0000 Author: jkim Date: Wed Apr 7 18:42:21 2010 New Revision: 206380 URL: http://svn.freebsd.org/changeset/base/206380 Log: Correct beastie_saver module name. Modified: head/sys/dev/syscons/logo/logo_saver.c head/sys/modules/syscons/beastie/Makefile Modified: head/sys/dev/syscons/logo/logo_saver.c ============================================================================== --- head/sys/dev/syscons/logo/logo_saver.c Wed Apr 7 18:26:13 2010 (r206379) +++ head/sys/dev/syscons/logo/logo_saver.c Wed Apr 7 18:42:21 2010 (r206380) @@ -171,4 +171,8 @@ static scrn_saver_t logo_module = { NULL }; +#ifdef BEASTIE_LOGO +SAVER_MODULE(beastie_saver, logo_module); +#else SAVER_MODULE(logo_saver, logo_module); +#endif Modified: head/sys/modules/syscons/beastie/Makefile ============================================================================== --- head/sys/modules/syscons/beastie/Makefile Wed Apr 7 18:26:13 2010 (r206379) +++ head/sys/modules/syscons/beastie/Makefile Wed Apr 7 18:42:21 2010 (r206380) @@ -5,4 +5,6 @@ KMOD= beastie_saver SRCS= beastie.c logo_saver.c +CFLAGS+=-DBEASTIE_LOGO + .include From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 18:52:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9324B1065672; Wed, 7 Apr 2010 18:52:51 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8237E8FC17; Wed, 7 Apr 2010 18:52:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37IqpZF081802; Wed, 7 Apr 2010 18:52:51 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37Iqp0E081800; Wed, 7 Apr 2010 18:52:51 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004071852.o37Iqp0E081800@svn.freebsd.org> From: Rui Paulo Date: Wed, 7 Apr 2010 18:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206381 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 18:52:51 -0000 Author: rpaulo Date: Wed Apr 7 18:52:51 2010 New Revision: 206381 URL: http://svn.freebsd.org/changeset/base/206381 Log: Add EFI boot info fields. Modified: head/sys/i386/include/bootinfo.h Modified: head/sys/i386/include/bootinfo.h ============================================================================== --- head/sys/i386/include/bootinfo.h Wed Apr 7 18:42:21 2010 (r206380) +++ head/sys/i386/include/bootinfo.h Wed Apr 7 18:52:51 2010 (r206381) @@ -65,6 +65,13 @@ struct bootinfo { u_int32_t bi_kernend; /* end of kernel space */ u_int32_t bi_envp; /* environment */ u_int32_t bi_modulep; /* preloaded modules */ + uint64_t bi_hcdp; /* DIG64 HCDP table */ + uint64_t bi_fpswa; /* FPSWA interface */ + uint64_t bi_systab; /* pa of EFI system table */ + uint64_t bi_memmap; /* pa of EFI memory map */ + uint64_t bi_memmap_size; /* size of EFI memory map */ + uint64_t bi_memdesc_size; /* sizeof EFI memory desc */ + uint32_t bi_memdesc_version; /* EFI memory desc version */ }; #ifdef _KERNEL From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 19:04:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5264106566C; Wed, 7 Apr 2010 19:04:36 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1EA08FC08; Wed, 7 Apr 2010 19:04:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37J4ajH084511; Wed, 7 Apr 2010 19:04:36 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37J4auP084503; Wed, 7 Apr 2010 19:04:36 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004071904.o37J4auP084503@svn.freebsd.org> From: Hajimu UMEMOTO Date: Wed, 7 Apr 2010 19:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206382 - in stable/8: . etc etc/defaults etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 19:04:37 -0000 Author: ume Date: Wed Apr 7 19:04:36 2010 New Revision: 206382 URL: http://svn.freebsd.org/changeset/base/206382 Log: MFC r200028, r201193, r201752, r201930, r202460, r200672, r206375: Unify rc.firewall and rc.firewall6, and obsolete rc.firewall6 and rc.d/ip6fw. Deleted: stable/8/etc/rc.d/ip6fw stable/8/etc/rc.firewall6 Modified: stable/8/ObsoleteFiles.inc (contents, props changed) stable/8/UPDATING (contents, props changed) stable/8/etc/Makefile stable/8/etc/defaults/rc.conf stable/8/etc/rc.d/Makefile stable/8/etc/rc.d/ipfw stable/8/etc/rc.firewall Directory Properties: stable/8/etc/ (props changed) stable/8/etc/mtree/ (props changed) Modified: stable/8/ObsoleteFiles.inc ============================================================================== --- stable/8/ObsoleteFiles.inc Wed Apr 7 18:52:51 2010 (r206381) +++ stable/8/ObsoleteFiles.inc Wed Apr 7 19:04:36 2010 (r206382) @@ -14,6 +14,9 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100408: unify rc.firewall and rc.firewall6. +OLD_FILES+=etc/rc.d/ip6fw +OLD_FILES+=etc/rc.firewall6 # 20100330: [ia64] Sync with 9-current .if ${TARGET_ARCH} == "ia64" OLD_FILES+=usr/include/machine/nexusvar.h Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Wed Apr 7 18:52:51 2010 (r206381) +++ stable/8/UPDATING Wed Apr 7 19:04:36 2010 (r206382) @@ -15,6 +15,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100408: + The rc.firewall and rc.firewall6 were unified, and + rc.firewall6 and rc.d/ip6fw were removed. + According to the removal of rc.d/ip6fw, ipv6_firewall_* rc + variables are obsoleted. Instead, the following new rc + variables are added to rc.d/ipfw: + + firewall_client_net_ipv6, firewall_simple_iif_ipv6, + firewall_simple_inet_ipv6, firewall_simple_oif_ipv6, + firewall_simple_onet_ipv6 + + The meanings correspond to the relevant IPv4 variables. + 20100406: The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32 to allow 32-bit compatibility on non-x86 platforms. All kernel Modified: stable/8/etc/Makefile ============================================================================== --- stable/8/etc/Makefile Wed Apr 7 18:52:51 2010 (r206381) +++ stable/8/etc/Makefile Wed Apr 7 19:04:36 2010 (r206382) @@ -15,7 +15,7 @@ BIN1= auth.conf \ inetd.conf libalias.conf login.access login.conf mac.conf motd \ netconfig network.subr networks newsyslog.conf nsswitch.conf \ phones profile protocols \ - rc rc.bsdextended rc.firewall rc.firewall6 rc.initdiskless \ + rc rc.bsdextended rc.firewall rc.initdiskless \ rc.sendmail rc.shutdown \ rc.subr remote rpc services shells \ sysctl.conf syslog.conf \ Modified: stable/8/etc/defaults/rc.conf ============================================================================== --- stable/8/etc/defaults/rc.conf Wed Apr 7 18:52:51 2010 (r206381) +++ stable/8/etc/defaults/rc.conf Wed Apr 7 19:04:36 2010 (r206382) @@ -120,7 +120,10 @@ firewall_logging="NO" # Set to YES to e firewall_flags="" # Flags passed to ipfw when type is a file firewall_coscripts="" # List of executables/scripts to run after # firewall starts/stops -firewall_client_net="192.0.2.0/24" # Network address for "client" firewall. +firewall_client_net="192.0.2.0/24" # IPv4 Network address for "client" + # firewall. +#firewall_client_net_ipv6="2001:db8:2:1::/64" # IPv6 network prefix for + # "client" firewall. firewall_simple_iif="ed1" # Inside network interface for "simple" # firewall. firewall_simple_inet="192.0.2.16/28" # Inside network address for "simple" @@ -129,6 +132,14 @@ firewall_simple_oif="ed0" # Outside netw # firewall. firewall_simple_onet="192.0.2.0/28" # Outside network address for "simple" # firewall. +#firewall_simple_iif_ipv6="ed1" # Inside IPv6 network interface for "simple" + # firewall. +#firewall_simple_inet_ipv6="2001:db8:2:800::/56" # Inside IPv6 network prefix + # for "simple" firewall. +#firewall_simple_oif_ipv6="ed0" # Outside IPv6 network interface for "simple" + # firewall. +#firewall_simple_onet_ipv6="2001:db8:2:0::/56" # Outside IPv6 network prefix + # for "simple" firewall. firewall_myservices="" # List of TCP ports on which this host # offers services for "workstation" firewall. firewall_allowservices="" # List of IPs which have access to @@ -479,13 +490,6 @@ ipv6_faith_prefix="NO" # Set faith pref # faithd(8) setup. ipv6_ipv4mapping="NO" # Set to "YES" to enable IPv4 mapped IPv6 addr # communication. (like ::ffff:a.b.c.d) -ipv6_firewall_enable="NO" # Set to YES to enable IPv6 firewall - # functionality -ipv6_firewall_script="/etc/rc.firewall6" # Which script to run to set up the IPv6 firewall -ipv6_firewall_type="UNKNOWN" # IPv6 Firewall type (see /etc/rc.firewall6) -ipv6_firewall_quiet="NO" # Set to YES to suppress rule display -ipv6_firewall_logging="NO" # Set to YES to enable events logging -ipv6_firewall_flags="" # Flags passed to ip6fw when type is a file ipv6_ipfilter_rules="/etc/ipf6.rules" # rules definition file for ipfilter, # see /usr/src/contrib/ipfilter/rules # for examples Modified: stable/8/etc/rc.d/Makefile ============================================================================== --- stable/8/etc/rc.d/Makefile Wed Apr 7 18:52:51 2010 (r206381) +++ stable/8/etc/rc.d/Makefile Wed Apr 7 19:04:36 2010 (r206382) @@ -15,7 +15,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI hcsecd \ hostapd hostid hostid_save hostname \ inetd initrandom \ - ip6addrctl ip6fw ipfilter ipfs ipfw ipmon \ + ip6addrctl ipfilter ipfs ipfw ipmon \ ipnat ipsec ipxrouted \ jail \ kadmind kerberos keyserv kldxref kpasswdd \ Modified: stable/8/etc/rc.d/ipfw ============================================================================== --- stable/8/etc/rc.d/ipfw Wed Apr 7 18:52:51 2010 (r206381) +++ stable/8/etc/rc.d/ipfw Wed Apr 7 19:04:36 2010 (r206382) @@ -18,6 +18,8 @@ start_postcmd="ipfw_poststart" stop_cmd="ipfw_stop" required_modules="ipfw" +set_rcvar_obsolete ipv6_firewall_enable + ipfw_prestart() { if checkyesno dummynet_enable; then @@ -72,7 +74,13 @@ ipfw_poststart() # Enable the firewall # if ! ${SYSCTL_W} net.inet.ip.fw.enable=1 1>/dev/null 2>&1; then - warn "failed to enable firewall" + warn "failed to enable IPv4 firewall" + fi + if afexists inet6; then + if ! ${SYSCTL_W} net.inet6.ip6.fw.enable=1 1>/dev/null 2>&1 + then + warn "failed to enable IPv6 firewall" + fi fi } @@ -83,6 +91,9 @@ ipfw_stop() # Disable the firewall # ${SYSCTL_W} net.inet.ip.fw.enable=0 + if afexists inet6; then + ${SYSCTL_W} net.inet6.ip6.fw.enable=0 + fi # Stop firewall coscripts # Modified: stable/8/etc/rc.firewall ============================================================================== --- stable/8/etc/rc.firewall Wed Apr 7 18:52:51 2010 (r206381) +++ stable/8/etc/rc.firewall Wed Apr 7 19:04:36 2010 (r206382) @@ -85,12 +85,42 @@ setup_loopback () { ${fwcmd} add 100 pass all from any to any via lo0 ${fwcmd} add 200 deny all from any to 127.0.0.0/8 ${fwcmd} add 300 deny ip from 127.0.0.0/8 to any + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add 400 deny all from any to ::1 + ${fwcmd} add 500 deny all from ::1 to any + fi +} + +setup_ipv6_mandatory () { + [ $ipv6_available -eq 0 ] || return 0 + + ############ + # Only in rare cases do you want to change these rules + # + # ND + # + # DAD + ${fwcmd} add pass ipv6-icmp from :: to ff02::/16 + # RS, RA, NS, NA, redirect... + ${fwcmd} add pass ipv6-icmp from fe80::/10 to fe80::/10 + ${fwcmd} add pass ipv6-icmp from fe80::/10 to ff02::/16 + + # Allow ICMPv6 destination unreach + ${fwcmd} add pass ipv6-icmp from any to any icmp6types 1 + + # Allow NS/NA/toobig (don't filter it out) + ${fwcmd} add pass ipv6-icmp from any to any icmp6types 2,135,136 } if [ -n "${1}" ]; then firewall_type="${1}" fi +. /etc/rc.subr +. /etc/network.subr +afexists inet6 +ipv6_available=$? + ############ # Set quiet mode if requested # @@ -109,6 +139,7 @@ esac ${fwcmd} -f flush setup_loopback +setup_ipv6_mandatory ############ # Network Address Translation. All packets are passed to natd(8) @@ -166,11 +197,13 @@ case ${firewall_type} in # against people from outside your own network. # # Configuration: - # firewall_client_net: Network address of local network. + # firewall_client_net: Network address of local IPv4 network. + # firewall_client_net_ipv6: Network address of local IPv6 network. ############ # set this to your local network net="$firewall_client_net" + net6="$firewall_client_net_ipv6" # Allow limited broadcast traffic from my own net. ${fwcmd} add pass all from ${net} to 255.255.255.255 @@ -178,6 +211,18 @@ case ${firewall_type} in # Allow any traffic to or from my own net. ${fwcmd} add pass all from me to ${net} ${fwcmd} add pass all from ${net} to me + if [ -n "$net6" ]; then + ${fwcmd} add pass all from me to ${net6} + ${fwcmd} add pass all from ${net6} to me + fi + + if [ -n "$net6" ]; then + # Allow any link-local multicast traffic + ${fwcmd} add pass all from fe80::/10 to ff02::/16 + ${fwcmd} add pass all from ${net6} to ff02::/16 + # Allow DHCPv6 + ${fwcmd} add pass udp from fe80::/10 to me 546 + fi # Allow TCP through if setup succeeded ${fwcmd} add pass tcp from any to any established @@ -212,23 +257,38 @@ case ${firewall_type} in # on the inside at this machine for those services. # # Configuration: - # firewall_simple_iif: Inside network interface. - # firewall_simple_inet: Inside network address. - # firewall_simple_oif: Outside network interface. - # firewall_simple_onet: Outside network address. + # firewall_simple_iif: Inside IPv4 network interface. + # firewall_simple_inet: Inside IPv4 network address. + # firewall_simple_oif: Outside IPv4 network interface. + # firewall_simple_onet: Outside IPv4 network address. + # firewall_simple_iif_ipv6: Inside IPv6 network interface. + # firewall_simple_inet_ipv6: Inside IPv6 network prefix. + # firewall_simple_oif_ipv6: Outside IPv6 network interface. + # firewall_simple_onet_ipv6: Outside IPv6 network prefix. ############ # set these to your outside interface network oif="$firewall_simple_oif" onet="$firewall_simple_onet" + oif6="${firewall_simple_oif_ipv6:-$firewall_simple_oif}" + onet6="$firewall_simple_onet_ipv6" # set these to your inside interface network iif="$firewall_simple_iif" inet="$firewall_simple_inet" + iif6="${firewall_simple_iif_ipv6:-$firewall_simple_iif}" + inet6="$firewall_simple_inet_ipv6" # Stop spoofing ${fwcmd} add deny all from ${inet} to any in via ${oif} ${fwcmd} add deny all from ${onet} to any in via ${iif} + if [ -n "$inet6" ]; then + ${fwcmd} add deny all from ${inet6} to any in via ${oif6} + if [ -n "$onet6" ]; then + ${fwcmd} add deny all from ${onet6} to any in \ + via ${iif6} + fi + fi # Stop RFC1918 nets on the outside interface ${fwcmd} add deny all from any to 10.0.0.0/8 via ${oif} @@ -254,7 +314,7 @@ case ${firewall_type} in case ${natd_enable} in [Yy][Ee][Ss]) if [ -n "${natd_interface}" ]; then - ${fwcmd} add divert natd all from any to any via ${natd_interface} + ${fwcmd} add divert natd ip4 from any to any via ${natd_interface} fi ;; esac @@ -273,6 +333,55 @@ case ${firewall_type} in ${fwcmd} add deny all from 224.0.0.0/4 to any via ${oif} ${fwcmd} add deny all from 240.0.0.0/4 to any via ${oif} + if [ -n "$inet6" ]; then + # Stop unique local unicast address on the outside interface + ${fwcmd} add deny all from fc00::/7 to any via ${oif6} + ${fwcmd} add deny all from any to fc00::/7 via ${oif6} + + # Stop site-local on the outside interface + ${fwcmd} add deny all from fec0::/10 to any via ${oif6} + ${fwcmd} add deny all from any to fec0::/10 via ${oif6} + + # Disallow "internal" addresses to appear on the wire. + ${fwcmd} add deny all from ::ffff:0.0.0.0/96 to any \ + via ${oif6} + ${fwcmd} add deny all from any to ::ffff:0.0.0.0/96 \ + via ${oif6} + + # Disallow packets to malicious IPv4 compatible prefix. + ${fwcmd} add deny all from ::224.0.0.0/100 to any via ${oif6} + ${fwcmd} add deny all from any to ::224.0.0.0/100 via ${oif6} + ${fwcmd} add deny all from ::127.0.0.0/104 to any via ${oif6} + ${fwcmd} add deny all from any to ::127.0.0.0/104 via ${oif6} + ${fwcmd} add deny all from ::0.0.0.0/104 to any via ${oif6} + ${fwcmd} add deny all from any to ::0.0.0.0/104 via ${oif6} + ${fwcmd} add deny all from ::255.0.0.0/104 to any via ${oif6} + ${fwcmd} add deny all from any to ::255.0.0.0/104 via ${oif6} + + ${fwcmd} add deny all from ::0.0.0.0/96 to any via ${oif6} + ${fwcmd} add deny all from any to ::0.0.0.0/96 via ${oif6} + + # Disallow packets to malicious 6to4 prefix. + ${fwcmd} add deny all from 2002:e000::/20 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:e000::/20 via ${oif6} + ${fwcmd} add deny all from 2002:7f00::/24 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:7f00::/24 via ${oif6} + ${fwcmd} add deny all from 2002:0000::/24 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:0000::/24 via ${oif6} + ${fwcmd} add deny all from 2002:ff00::/24 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:ff00::/24 via ${oif6} + + ${fwcmd} add deny all from 2002:0a00::/24 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:0a00::/24 via ${oif6} + ${fwcmd} add deny all from 2002:ac10::/28 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:ac10::/28 via ${oif6} + ${fwcmd} add deny all from 2002:c0a8::/32 to any via ${oif6} + ${fwcmd} add deny all from any to 2002:c0a8::/32 via ${oif6} + + ${fwcmd} add deny all from ff05::/16 to any via ${oif6} + ${fwcmd} add deny all from any to ff05::/16 via ${oif6} + fi + # Allow TCP through if setup succeeded ${fwcmd} add pass tcp from any to any established @@ -291,7 +400,11 @@ case ${firewall_type} in ${fwcmd} add pass tcp from any to me 80 setup # Reject&Log all setup of incoming connections from the outside - ${fwcmd} add deny log tcp from any to any in via ${oif} setup + ${fwcmd} add deny log ip4 from any to any in via ${oif} setup proto tcp + if [ -n "$inet6" ]; then + ${fwcmd} add deny log ip6 from any to any in via ${oif6} \ + setup proto tcp + fi # Allow setup of any other TCP connection ${fwcmd} add pass tcp from any to any setup @@ -324,7 +437,7 @@ case ${firewall_type} in # firewall_nologports: List of TCP/UDP ports for which # denied incomming packets are not # logged. - + # Allow packets for which a state has been built. ${fwcmd} add check-state @@ -335,18 +448,30 @@ case ${firewall_type} in ${fwcmd} add pass tcp from me to any setup keep-state ${fwcmd} add pass udp from me to any keep-state ${fwcmd} add pass icmp from me to any keep-state + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass ipv6-icmp from me to any keep-state + fi # Allow DHCP. ${fwcmd} add pass udp from 0.0.0.0 68 to 255.255.255.255 67 out ${fwcmd} add pass udp from any 67 to me 68 in ${fwcmd} add pass udp from any 67 to 255.255.255.255 68 in + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass udp from fe80::/10 to me 546 in + fi # Some servers will ping the IP while trying to decide if it's # still in use. ${fwcmd} add pass icmp from any to any icmptype 8 + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass ipv6-icmp from any to any icmp6type 128,129 + fi # Allow "mandatory" ICMP in. ${fwcmd} add pass icmp from any to any icmptype 3,4,11 - + if [ $ipv6_available -eq 0 ]; then + ${fwcmd} add pass ipv6-icmp from any to any icmp6type 3 + fi + # Add permits for this workstations published services below # Only IPs and nets in firewall_allowservices is allowed in. # If you really wish to let anyone use services on your @@ -370,7 +495,7 @@ case ${firewall_type} in for i in ${firewall_trusted} ; do ${fwcmd} add pass ip from $i to me done - + ${fwcmd} add 65000 count ip from any to any # Drop packets to ports where we don't want logging From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 19:13:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5838C106566B; Wed, 7 Apr 2010 19:13:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C7E08FC13; Wed, 7 Apr 2010 19:13:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37JDWsK086512; Wed, 7 Apr 2010 19:13:32 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37JDWK4086510; Wed, 7 Apr 2010 19:13:32 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004071913.o37JDWK4086510@svn.freebsd.org> From: Ed Maste Date: Wed, 7 Apr 2010 19:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206383 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 19:13:32 -0000 Author: emaste Date: Wed Apr 7 19:13:31 2010 New Revision: 206383 URL: http://svn.freebsd.org/changeset/base/206383 Log: Remove extraneous '>'. Modified: head/share/man/man9/stack.9 Modified: head/share/man/man9/stack.9 ============================================================================== --- head/share/man/man9/stack.9 Wed Apr 7 19:04:36 2010 (r206382) +++ head/share/man/man9/stack.9 Wed Apr 7 19:13:31 2010 (r206383) @@ -34,7 +34,7 @@ .Nm stack .Nd kernel thread stack tracing routines .Sh SYNOPSIS -.In sys/param.h> +.In sys/param.h .In sys/stack.h In the kernel configuration file: .Cd "options DDB" From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 21:38:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29B491065673; Wed, 7 Apr 2010 21:38:43 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 170168FC1C; Wed, 7 Apr 2010 21:38:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37LcgVH018560; Wed, 7 Apr 2010 21:38:42 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37LcgaL018558; Wed, 7 Apr 2010 21:38:42 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004072138.o37LcgaL018558@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 7 Apr 2010 21:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206384 - head/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 21:38:43 -0000 Author: jkim Date: Wed Apr 7 21:38:42 2010 New Revision: 206384 URL: http://svn.freebsd.org/changeset/base/206384 Log: Allocate memory for VBE info block with malloc(9), not as static local. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Apr 7 19:13:31 2010 (r206383) +++ head/sys/dev/fb/vesa.c Wed Apr 7 21:38:42 2010 (r206384) @@ -763,8 +763,8 @@ vesa_get_bpscanline(struct vesa_mode *vm static int vesa_bios_init(void) { - static struct vesa_info buf; struct vesa_mode vmode; + struct vesa_info *buf; video_info_t *p; x86regs_t regs; size_t bsize; @@ -800,7 +800,7 @@ vesa_bios_init(void) x86bios_init_regs(®s); regs.R_AX = 0x4f00; - vmbuf = x86bios_alloc(&offs, sizeof(buf)); + vmbuf = x86bios_alloc(&offs, sizeof(*buf)); if (vmbuf == NULL) return (1); @@ -813,23 +813,23 @@ vesa_bios_init(void) if (regs.R_AX != 0x004f || bcmp("VESA", vmbuf, 4) != 0) goto fail; - bcopy(vmbuf, &buf, sizeof(buf)); + vesa_adp_info = buf = malloc(sizeof(*buf), M_DEVBUF, M_WAITOK); + bcopy(vmbuf, buf, sizeof(*buf)); - vesa_adp_info = &buf; if (bootverbose) { printf("VESA: information block\n"); - hexdump(&buf, sizeof(buf), NULL, HD_OMIT_CHARS); + hexdump(buf, sizeof(*buf), NULL, HD_OMIT_CHARS); } - vers = buf.v_version = le16toh(buf.v_version); - buf.v_oemstr = le32toh(buf.v_oemstr); - buf.v_flags = le32toh(buf.v_flags); - buf.v_modetable = le32toh(buf.v_modetable); - buf.v_memsize = le16toh(buf.v_memsize); - buf.v_revision = le16toh(buf.v_revision); - buf.v_venderstr = le32toh(buf.v_venderstr); - buf.v_prodstr = le32toh(buf.v_prodstr); - buf.v_revstr = le32toh(buf.v_revstr); + vers = buf->v_version = le16toh(buf->v_version); + buf->v_oemstr = le32toh(buf->v_oemstr); + buf->v_flags = le32toh(buf->v_flags); + buf->v_modetable = le32toh(buf->v_modetable); + buf->v_memsize = le16toh(buf->v_memsize); + buf->v_revision = le16toh(buf->v_revision); + buf->v_venderstr = le32toh(buf->v_venderstr); + buf->v_prodstr = le32toh(buf->v_prodstr); + buf->v_revstr = le32toh(buf->v_revstr); if (vers < 0x0102) { printf("VESA: VBE version %d.%d is not supported; " @@ -839,21 +839,21 @@ vesa_bios_init(void) return (1); } - VESA_STRCPY(vesa_oemstr, buf.v_oemstr); + VESA_STRCPY(vesa_oemstr, buf->v_oemstr); if (vers >= 0x0200) { - VESA_STRCPY(vesa_venderstr, buf.v_venderstr); - VESA_STRCPY(vesa_prodstr, buf.v_prodstr); - VESA_STRCPY(vesa_revstr, buf.v_revstr); + VESA_STRCPY(vesa_venderstr, buf->v_venderstr); + VESA_STRCPY(vesa_prodstr, buf->v_prodstr); + VESA_STRCPY(vesa_revstr, buf->v_revstr); } is_via_cle266 = strncmp(vesa_oemstr, VESA_VIA_CLE266, sizeof(VESA_VIA_CLE266)) == 0; - if (buf.v_modetable == 0) + if (buf->v_modetable == 0) goto fail; - msize = (size_t)buf.v_memsize * 64 * 1024; + msize = (size_t)buf->v_memsize * 64 * 1024; - vesa_vmodetab = x86bios_offset(BIOS_SADDRTOLADDR(buf.v_modetable)); + vesa_vmodetab = x86bios_offset(BIOS_SADDRTOLADDR(buf->v_modetable)); for (i = 0, modes = 0; (i < (M_VESA_MODE_MAX - M_VESA_BASE + 1)) && (vesa_vmodetab[i] != 0xffff); ++i) { @@ -1016,12 +1016,16 @@ vesa_bios_init(void) if (!has_vesa_bios) goto fail; - x86bios_free(vmbuf, sizeof(buf)); + x86bios_free(vmbuf, sizeof(*buf)); return (0); fail: if (vmbuf != NULL) x86bios_free(vmbuf, sizeof(buf)); + if (vesa_adp_info != NULL) { + free(vesa_adp_info, M_DEVBUF); + vesa_adp_info = NULL; + } if (vesa_oemstr != NULL) { free(vesa_oemstr, M_DEVBUF); vesa_oemstr = NULL; @@ -1875,6 +1879,8 @@ vesa_unload(void) } splx(s); + if (vesa_adp_info != NULL) + free(vesa_adp_info, M_DEVBUF); if (vesa_oemstr != NULL) free(vesa_oemstr, M_DEVBUF); if (vesa_venderstr != NULL) From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 22:19:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3765106564A; Wed, 7 Apr 2010 22:19:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9056E8FC1B; Wed, 7 Apr 2010 22:19:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37MJkKD027678; Wed, 7 Apr 2010 22:19:46 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37MJklb027676; Wed, 7 Apr 2010 22:19:46 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004072219.o37MJklb027676@svn.freebsd.org> From: Andriy Gapon Date: Wed, 7 Apr 2010 22:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206385 - stable/8/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 22:19:46 -0000 Author: avg Date: Wed Apr 7 22:19:46 2010 New Revision: 206385 URL: http://svn.freebsd.org/changeset/base/206385 Log: MFC r205988: indent(1): correctly handle case/label at the very start of a function Modified: stable/8/usr.bin/indent/indent.c Directory Properties: stable/8/usr.bin/indent/ (props changed) Modified: stable/8/usr.bin/indent/indent.c ============================================================================== --- stable/8/usr.bin/indent/indent.c Wed Apr 7 21:38:42 2010 (r206384) +++ stable/8/usr.bin/indent/indent.c Wed Apr 7 22:19:46 2010 (r206385) @@ -675,7 +675,7 @@ check_type: ps.want_blank = true; break; } - if (ps.in_decl) { + if (ps.in_or_st) { *e_code++ = ':'; ps.want_blank = false; break; From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 22:28:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E7361065676; Wed, 7 Apr 2010 22:28:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B80A8FC1A; Wed, 7 Apr 2010 22:28:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37MSGq3029621; Wed, 7 Apr 2010 22:28:16 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37MSG2Y029619; Wed, 7 Apr 2010 22:28:16 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004072228.o37MSG2Y029619@svn.freebsd.org> From: Andriy Gapon Date: Wed, 7 Apr 2010 22:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206386 - stable/7/usr.bin/indent X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 22:28:16 -0000 Author: avg Date: Wed Apr 7 22:28:16 2010 New Revision: 206386 URL: http://svn.freebsd.org/changeset/base/206386 Log: MFC r205988: indent(1): correctly handle case/label at the very start of a function Modified: stable/7/usr.bin/indent/indent.c Directory Properties: stable/7/usr.bin/indent/ (props changed) Modified: stable/7/usr.bin/indent/indent.c ============================================================================== --- stable/7/usr.bin/indent/indent.c Wed Apr 7 22:19:46 2010 (r206385) +++ stable/7/usr.bin/indent/indent.c Wed Apr 7 22:28:16 2010 (r206386) @@ -675,7 +675,7 @@ check_type: ps.want_blank = true; break; } - if (ps.in_decl) { + if (ps.in_or_st) { *e_code++ = ':'; ps.want_blank = false; break; From owner-svn-src-all@FreeBSD.ORG Wed Apr 7 22:54:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 055B1106566B; Wed, 7 Apr 2010 22:54:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6F218FC08; Wed, 7 Apr 2010 22:54:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o37MsrRt035491; Wed, 7 Apr 2010 22:54:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o37Msr5j035487; Wed, 7 Apr 2010 22:54:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004072254.o37Msr5j035487@svn.freebsd.org> From: Xin LI Date: Wed, 7 Apr 2010 22:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206387 - head/usr.bin/gzip X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2010 22:54:54 -0000 Author: delphij Date: Wed Apr 7 22:54:53 2010 New Revision: 206387 URL: http://svn.freebsd.org/changeset/base/206387 Log: Diff reduction against NetBSD and add myself to AUTHORS section of the manual page as I wrote the unpack functionality. No actual executable code change verified with md5(1). Modified: head/usr.bin/gzip/gzip.1 head/usr.bin/gzip/gzip.c head/usr.bin/gzip/unbzip2.c Modified: head/usr.bin/gzip/gzip.1 ============================================================================== --- head/usr.bin/gzip/gzip.1 Wed Apr 7 22:28:16 2010 (r206386) +++ head/usr.bin/gzip/gzip.1 Wed Apr 7 22:54:53 2010 (r206387) @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd June 24, 2009 +.Dd April 7, 2010 .Dt GZIP 1 .Os .Sh NAME @@ -205,14 +205,17 @@ This implementation of .Nm was ported based on the .Nx -.Nm -20090412, and first appeared in +.Nm , +and first appeared in .Fx 7.0 . .Sh AUTHORS +.An -nosplit This implementation of .Nm was written by -.An Matthew R. Green Aq mrg@eterna.com.au . +.An Matthew R. Green Aq mrg@eterna.com.au +with unpack support written by +.An Xin LI Aq delphij@FreeBSD.org . .Sh BUGS According to RFC 1952, the recorded file size is stored in a 32-bit integer and therefore it can not represent files that is bigger than Modified: head/usr.bin/gzip/gzip.c ============================================================================== --- head/usr.bin/gzip/gzip.c Wed Apr 7 22:28:16 2010 (r206386) +++ head/usr.bin/gzip/gzip.c Wed Apr 7 22:54:53 2010 (r206387) @@ -1,4 +1,4 @@ -/* $NetBSD: gzip.c,v 1.94 2009/04/12 10:31:14 lukem Exp $ */ +/* $NetBSD: gzip.c,v 1.97 2009/10/11 09:17:21 mrg Exp $ */ /*- * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green @@ -149,10 +149,9 @@ static suffixes_t suffixes[] = { #undef SUFFIX }; #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) - #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "FreeBSD gzip 20090621"; +static const char gzip_version[] = "FreeBSD gzip 20100407"; #ifndef SMALL static const char gzip_copyright[] = \ @@ -206,7 +205,7 @@ static char *infile; /* name of file co static void maybe_err(const char *fmt, ...) __dead2 __attribute__((__format__(__printf__, 1, 2))); -#ifndef NO_BZIP2_SUPPORT +#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) static void maybe_errx(const char *fmt, ...) __dead2 __attribute__((__format__(__printf__, 1, 2))); #endif @@ -461,7 +460,7 @@ maybe_err(const char *fmt, ...) exit(2); } -#ifndef NO_BZIP2_SUPPORT +#if !defined(NO_BZIP2_SUPPORT) || !defined(NO_PACK_SUPPORT) /* ... without an errno. */ void maybe_errx(const char *fmt, ...) @@ -1319,6 +1318,7 @@ file_uncompress(char *file, char *outfil enum filetype method; int fd, ofd, zfd = -1; #ifndef SMALL + ssize_t rv; time_t timestamp = 0; unsigned char name[PATH_MAX + 1]; #endif @@ -1364,7 +1364,6 @@ file_uncompress(char *file, char *outfil #ifndef SMALL if (method == FT_GZIP && Nflag) { unsigned char ts[4]; /* timestamp */ - ssize_t rv; rv = pread(fd, ts, sizeof ts, GZIP_TIMESTAMP); if (rv >= 0 && rv < (ssize_t)(sizeof ts)) @@ -2054,7 +2053,7 @@ static void display_license(void) { - fprintf(stderr, "%s (based on NetBSD gzip 20060927)\n", gzip_version); + fprintf(stderr, "%s (based on NetBSD gzip 20091011)\n", gzip_version); fprintf(stderr, "%s\n", gzip_copyright); exit(0); } @@ -2100,4 +2099,3 @@ read_retry(int fd, void *buf, size_t sz) return sz - left; } - Modified: head/usr.bin/gzip/unbzip2.c ============================================================================== --- head/usr.bin/gzip/unbzip2.c Wed Apr 7 22:28:16 2010 (r206386) +++ head/usr.bin/gzip/unbzip2.c Wed Apr 7 22:54:53 2010 (r206387) @@ -1,4 +1,4 @@ -/* $NetBSD: unbzip2.c,v 1.12 2009/10/11 05:17:20 mrg Exp $ */ +/* $NetBSD: unbzip2.c,v 1.13 2009/12/05 03:23:37 mrg Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 00:50:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C55481065670; Thu, 8 Apr 2010 00:50:43 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B409C8FC1F; Thu, 8 Apr 2010 00:50:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o380ohCm061518; Thu, 8 Apr 2010 00:50:43 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o380ohmO061515; Thu, 8 Apr 2010 00:50:43 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004080050.o380ohmO061515@svn.freebsd.org> From: Jack F Vogel Date: Thu, 8 Apr 2010 00:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206388 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 00:50:43 -0000 Author: jfv Date: Thu Apr 8 00:50:43 2010 New Revision: 206388 URL: http://svn.freebsd.org/changeset/base/206388 Log: Important fix got clobbered in the em driver, keeping VLAN HWFILTER from being used by default, this breaks stacked pseudo devices, and as it turns out, also breaks virtual machines that happen to use VLANS (didn't know that before :). Put the fix back into the em driver, and for good measure add the same code to the igb driver where it should have been anyway. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Apr 7 22:54:53 2010 (r206387) +++ head/sys/dev/e1000/if_em.c Thu Apr 8 00:50:43 2010 (r206388) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.0.0"; +char em_driver_version[] = "7.0.1"; /********************************************************************* @@ -1118,6 +1118,10 @@ em_ioctl(struct ifnet *ifp, u_long comma ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; } + if (mask & IFCAP_VLAN_HWFILTER) { + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + reinit = 1; + } if ((mask & IFCAP_WOL) && (ifp->if_capabilities & IFCAP_WOL) != 0) { if (mask & IFCAP_WOL_MCAST) @@ -1228,8 +1232,18 @@ em_init_locked(struct adapter *adapter) /* Setup VLAN support, basic and offload if available */ E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); - /* Use real VLAN Filter support */ - em_setup_vlan_hw_support(adapter); + /* Use real VLAN Filter support? */ + if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { + if (ifp->if_capenable & IFCAP_VLAN_HWFILTER) + /* Use real VLAN Filter support */ + em_setup_vlan_hw_support(adapter); + else { + u32 ctrl; + ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); + ctrl |= E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); + } + } /* Set hardware offload abilities */ ifp->if_hwassist = 0; @@ -2656,12 +2670,23 @@ em_setup_interface(device_t dev, struct ifp->if_capenable |= IFCAP_TSO4; /* - * Tell the upper layer(s) we support long frames. + * Tell the upper layer(s) we + * support full VLAN capability */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + /* + ** Dont turn this on by default, if vlans are + ** created on another pseudo device (eg. lagg) + ** then vlan events are not passed thru, breaking + ** operation, but with HW FILTER off it works. If + ** using vlans directly on the em driver you can + ** enable this and get full hardware tag filtering. + */ + ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; + #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; #endif Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Apr 7 22:54:53 2010 (r206387) +++ head/sys/dev/e1000/if_igb.c Thu Apr 8 00:50:43 2010 (r206388) @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char igb_driver_version[] = "version - 1.9.3"; +char igb_driver_version[] = "version - 1.9.4"; /********************************************************************* @@ -1055,6 +1055,10 @@ igb_ioctl(struct ifnet *ifp, u_long comm ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; reinit = 1; } + if (mask & IFCAP_VLAN_HWFILTER) { + ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; + reinit = 1; + } if (mask & IFCAP_LRO) { ifp->if_capenable ^= IFCAP_LRO; reinit = 1; @@ -1110,6 +1114,19 @@ igb_init_locked(struct adapter *adapter) E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); + /* Use real VLAN Filter support? */ + if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { + if (ifp->if_capenable & IFCAP_VLAN_HWFILTER) + /* Use real VLAN Filter support */ + igb_setup_vlan_hw_support(adapter); + else { + u32 ctrl; + ctrl = E1000_READ_REG(&adapter->hw, E1000_CTRL); + ctrl |= E1000_CTRL_VME; + E1000_WRITE_REG(&adapter->hw, E1000_CTRL, ctrl); + } + } + /* Set hardware offload abilities */ ifp->if_hwassist = 0; if (ifp->if_capenable & IFCAP_TXCSUM) { @@ -2669,13 +2686,24 @@ igb_setup_interface(device_t dev, struct #endif /* - * Tell the upper layer(s) we support long frames. + * Tell the upper layer(s) we + * support full VLAN capability. */ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; ifp->if_capenable |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; /* + ** Dont turn this on by default, if vlans are + ** created on another pseudo device (eg. lagg) + ** then vlan events are not passed thru, breaking + ** operation, but with HW FILTER off it works. If + ** using vlans directly on the em driver you can + ** enable this and get full hardware tag filtering. + */ + ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; + + /* * Specify the media types supported by this adapter and register * callbacks to update media and link information */ @@ -3779,6 +3807,9 @@ igb_setup_receive_ring(struct rx_ring *r /* Update descriptor */ rxr->rx_base[j].read.pkt_addr = htole64(pseg[0].ds_addr); } + + /* Setup our descriptor indices */ + rxr->next_to_check = 0; rxr->next_to_refresh = 0; rxr->lro_enabled = FALSE; @@ -4672,10 +4703,12 @@ igb_update_stats_counters(struct adapter { struct ifnet *ifp; - if(adapter->hw.phy.media_type == e1000_media_type_copper || + if (adapter->hw.phy.media_type == e1000_media_type_copper || (E1000_READ_REG(&adapter->hw, E1000_STATUS) & E1000_STATUS_LU)) { - adapter->stats.symerrs += E1000_READ_REG(&adapter->hw, E1000_SYMERRS); - adapter->stats.sec += E1000_READ_REG(&adapter->hw, E1000_SEC); + adapter->stats.symerrs += + E1000_READ_REG(&adapter->hw, E1000_SYMERRS); + adapter->stats.sec += + E1000_READ_REG(&adapter->hw, E1000_SEC); } adapter->stats.crcerrs += E1000_READ_REG(&adapter->hw, E1000_CRCERRS); adapter->stats.mpc += E1000_READ_REG(&adapter->hw, E1000_MPC); From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 00:52:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BD421065675; Thu, 8 Apr 2010 00:52:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A7BF8FC13; Thu, 8 Apr 2010 00:52:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o380qSVD062066; Thu, 8 Apr 2010 00:52:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o380qSQW062064; Thu, 8 Apr 2010 00:52:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004080052.o380qSQW062064@svn.freebsd.org> From: Xin LI Date: Thu, 8 Apr 2010 00:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206389 - stable/8/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 00:52:29 -0000 Author: delphij Date: Thu Apr 8 00:52:28 2010 New Revision: 206389 URL: http://svn.freebsd.org/changeset/base/206389 Log: MFC r204901 Remove the check for IFF_DRV_OACTIVE right before adding a port into lagg interface. The check itself seems to be coming from OpenBSD but does not seem to be useful for our code. Discussed with: thomasa Modified: stable/8/sys/net/if_lagg.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/net/if_lagg.c ============================================================================== --- stable/8/sys/net/if_lagg.c Thu Apr 8 00:50:43 2010 (r206388) +++ stable/8/sys/net/if_lagg.c Thu Apr 8 00:52:28 2010 (r206389) @@ -424,10 +424,6 @@ lagg_port_create(struct lagg_softc *sc, if (sc->sc_count >= LAGG_MAX_PORTS) return (ENOSPC); - /* New lagg port has to be in an idle state */ - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) - return (EBUSY); - /* Check if port has already been associated to a lagg */ if (ifp->if_lagg != NULL) return (EBUSY); From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 00:55:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51C4E106564A; Thu, 8 Apr 2010 00:55:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 405D88FC19; Thu, 8 Apr 2010 00:55:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o380t9AY062872; Thu, 8 Apr 2010 00:55:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o380t9Mf062870; Thu, 8 Apr 2010 00:55:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201004080055.o380t9Mf062870@svn.freebsd.org> From: Xin LI Date: Thu, 8 Apr 2010 00:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206390 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 00:55:09 -0000 Author: delphij Date: Thu Apr 8 00:55:08 2010 New Revision: 206390 URL: http://svn.freebsd.org/changeset/base/206390 Log: MFC r204901 Remove the check for IFF_DRV_OACTIVE right before adding a port into lagg interface. The check itself seems to be coming from OpenBSD but does not seem to be useful for our code. Discussed with: thomasa Modified: stable/7/sys/net/if_lagg.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/net/if_lagg.c ============================================================================== --- stable/7/sys/net/if_lagg.c Thu Apr 8 00:52:28 2010 (r206389) +++ stable/7/sys/net/if_lagg.c Thu Apr 8 00:55:08 2010 (r206390) @@ -419,10 +419,6 @@ lagg_port_create(struct lagg_softc *sc, if (sc->sc_count >= LAGG_MAX_PORTS) return (ENOSPC); - /* New lagg port has to be in an idle state */ - if (ifp->if_drv_flags & IFF_DRV_OACTIVE) - return (EBUSY); - /* Check if port has already been associated to a lagg */ if (ifp->if_lagg != NULL) return (EBUSY); From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 02:56:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id B3A371065674; Thu, 8 Apr 2010 02:56:59 +0000 (UTC) Date: Thu, 8 Apr 2010 02:56:59 +0000 From: Alexey Dokuchaev To: Garrett Cooper Message-ID: <20100408025659.GA33361@FreeBSD.org> References: <201004071707.o37H76OW057492@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Jung-uk Kim Subject: Re: svn commit: r206363 - head/sys/dev/syscons/logo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 02:56:59 -0000 On Wed, Apr 07, 2010 at 10:13:33AM -0700, Garrett Cooper wrote: > On Wed, Apr 7, 2010 at 10:07 AM, Jung-uk Kim wrote: > > Author: jkim > > Date: Wed Apr š7 17:07:06 2010 > > New Revision: 206363 > > URL: http://svn.freebsd.org/changeset/base/206363 > > > > Log: > > šAdd the official FreeBSD logo image file for logo_saver. > > > > Modified: > > šhead/sys/dev/syscons/logo/logo.c > > Please readd the beastie logo based saver as beastie saver, or > something similar. Seconded. If your code changes classic logo saver in any way (other than non-functional changes were made), please revive classic logo saver for those who use it and don't want it to be anything else other than cute beastie. Thanks. ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 05:16:51 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id F29E8106566B; Thu, 8 Apr 2010 05:16:49 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Alexey Dokuchaev Date: Thu, 8 Apr 2010 01:16:38 -0400 User-Agent: KMail/1.6.2 References: <201004071707.o37H76OW057492@svn.freebsd.org> <20100408025659.GA33361@FreeBSD.org> In-Reply-To: <20100408025659.GA33361@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <201004080116.42801.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, Garrett Cooper , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206363 - head/sys/dev/syscons/logo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 05:16:51 -0000 On Wednesday 07 April 2010 10:56 pm, Alexey Dokuchaev wrote: > On Wed, Apr 07, 2010 at 10:13:33AM -0700, Garrett Cooper wrote: > > On Wed, Apr 7, 2010 at 10:07 AM, Jung-uk Kim wrote: > > > Author: jkim > > > Date: Wed Apr �7 17:07:06 2010 > > > New Revision: 206363 > > > URL: http://svn.freebsd.org/changeset/base/206363 > > > > > > Log: > > > �Add the official FreeBSD logo image file for logo_saver. > > > > > > Modified: > > > �head/sys/dev/syscons/logo/logo.c > > > > Please readd the beastie logo based saver as beastie saver, or > > something similar. > > Seconded. If your code changes classic logo saver in any way > (other than non-functional changes were made), please revive > classic logo saver for those who use it and don't want it to be > anything else other than cute beastie. JFYI, it was renamed to beastie_saver: http://svn.freebsd.org/changeset/base/206362 http://svn.freebsd.org/changeset/base/206363 http://svn.freebsd.org/changeset/base/206365 http://svn.freebsd.org/changeset/base/206366 http://svn.freebsd.org/changeset/base/206368 http://svn.freebsd.org/changeset/base/206374 http://svn.freebsd.org/changeset/base/206380 Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 05:56:43 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 55EBA106566B; Thu, 8 Apr 2010 05:56:43 +0000 (UTC) Date: Thu, 8 Apr 2010 05:56:43 +0000 From: Alexey Dokuchaev To: Jung-uk Kim Message-ID: <20100408055643.GA55229@FreeBSD.org> References: <201004071707.o37H76OW057492@svn.freebsd.org> <20100408025659.GA33361@FreeBSD.org> <201004080116.42801.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201004080116.42801.jkim@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@FreeBSD.org, Garrett Cooper , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206363 - head/sys/dev/syscons/logo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 05:56:43 -0000 On Thu, Apr 08, 2010 at 01:16:38AM -0400, Jung-uk Kim wrote: > On Wednesday 07 April 2010 10:56 pm, Alexey Dokuchaev wrote: > > On Wed, Apr 07, 2010 at 10:13:33AM -0700, Garrett Cooper wrote: > > > Please readd the beastie logo based saver as beastie saver, or > > > something similar. > > > > Seconded. If your code changes classic logo saver in any way > > (other than non-functional changes were made), please revive > > classic logo saver for those who use it and don't want it to be > > anything else other than cute beastie. > > JFYI, it was renamed to beastie_saver: > > http://svn.freebsd.org/changeset/base/206362 > http://svn.freebsd.org/changeset/base/206363 > http://svn.freebsd.org/changeset/base/206365 > http://svn.freebsd.org/changeset/base/206366 > http://svn.freebsd.org/changeset/base/206368 > http://svn.freebsd.org/changeset/base/206374 > http://svn.freebsd.org/changeset/base/206380 Yup, I've seen those. Thanks, and sorry for the noise. ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 07:43:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10048106564A; Thu, 8 Apr 2010 07:43:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0FE18FC16; Thu, 8 Apr 2010 07:43:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o387hFtl054120; Thu, 8 Apr 2010 07:43:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o387hFlR054118; Thu, 8 Apr 2010 07:43:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004080743.o387hFlR054118@svn.freebsd.org> From: Andriy Gapon Date: Thu, 8 Apr 2010 07:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206393 - stable/8/lib/libc/db/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 07:43:16 -0000 Author: avg Date: Thu Apr 8 07:43:15 2010 New Revision: 206393 URL: http://svn.freebsd.org/changeset/base/206393 Log: MFC r206177: hash.3: fix a factual mistake in the man page Modified: stable/8/lib/libc/db/man/hash.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/db/man/hash.3 ============================================================================== --- stable/8/lib/libc/db/man/hash.3 Thu Apr 8 06:48:20 2010 (r206392) +++ stable/8/lib/libc/db/man/hash.3 Thu Apr 8 07:43:15 2010 (r206393) @@ -78,7 +78,7 @@ The element defines the .Nm -table bucket size, and is, by default, 256 bytes. +table bucket size, and is, by default, 4096 bytes. It may be preferable to increase the page size for disk-resident tables and tables with large data items. .It Va ffactor From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 07:45:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D7F0106566B; Thu, 8 Apr 2010 07:45:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD448FC1E; Thu, 8 Apr 2010 07:45:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o387jhNJ054712; Thu, 8 Apr 2010 07:45:43 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o387jhMc054710; Thu, 8 Apr 2010 07:45:43 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201004080745.o387jhMc054710@svn.freebsd.org> From: Andriy Gapon Date: Thu, 8 Apr 2010 07:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206394 - stable/7/lib/libc/db/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 07:45:43 -0000 Author: avg Date: Thu Apr 8 07:45:42 2010 New Revision: 206394 URL: http://svn.freebsd.org/changeset/base/206394 Log: MFC r206177: hash.3: fix a factual mistake in the man page Modified: stable/7/lib/libc/db/man/hash.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/db/man/hash.3 ============================================================================== --- stable/7/lib/libc/db/man/hash.3 Thu Apr 8 07:43:15 2010 (r206393) +++ stable/7/lib/libc/db/man/hash.3 Thu Apr 8 07:45:42 2010 (r206394) @@ -78,7 +78,7 @@ The element defines the .Nm -table bucket size, and is, by default, 256 bytes. +table bucket size, and is, by default, 4096 bytes. It may be preferable to increase the page size for disk-resident tables and tables with large data items. .It Va ffactor From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 08:58:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AB20106566B; Thu, 8 Apr 2010 08:58:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 792848FC15; Thu, 8 Apr 2010 08:58:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o388wI3n070674; Thu, 8 Apr 2010 08:58:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o388wIHc070673; Thu, 8 Apr 2010 08:58:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004080858.o388wIHc070673@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Apr 2010 08:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206395 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 08:58:18 -0000 Author: kib Date: Thu Apr 8 08:58:18 2010 New Revision: 206395 URL: http://svn.freebsd.org/changeset/base/206395 Log: Do not leak master pty or ptmx vnode. Report and test case by: Petr Salinger Reviewed by: ed MFC after: 1 week Modified: head/sys/kern/tty_pts.c Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Thu Apr 8 07:45:42 2010 (r206394) +++ head/sys/kern/tty_pts.c Thu Apr 8 08:58:18 2010 (r206395) @@ -575,6 +575,15 @@ ptsdev_close(struct file *fp, struct thr tty_lock(tp); tty_rel_gone(tp); + /* + * Open of /dev/ptmx or /dev/ptyXX changes the type of file + * from DTYPE_VNODE to DTYPE_PTS. vn_open() increases vnode + * use count, we need to decrement it, and possibly do other + * required cleanup. + */ + if (fp->f_vnode != NULL) + return (vnops.fo_close(fp, td)); + return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 09:01:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 608AA106566B; Thu, 8 Apr 2010 09:01:20 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F2158FC12; Thu, 8 Apr 2010 09:01:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3891KEE071389; Thu, 8 Apr 2010 09:01:20 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3891KTj071387; Thu, 8 Apr 2010 09:01:20 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201004080901.o3891KTj071387@svn.freebsd.org> From: Colin Percival Date: Thu, 8 Apr 2010 09:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206396 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 09:01:20 -0000 Author: cperciva Date: Thu Apr 8 09:01:20 2010 New Revision: 206396 URL: http://svn.freebsd.org/changeset/base/206396 Log: People working on sysinstall are encouraged to contact randi to coordinate major changes. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Thu Apr 8 08:58:18 2010 (r206395) +++ head/MAINTAINERS Thu Apr 8 09:01:20 2010 (r206396) @@ -123,6 +123,8 @@ usr.sbin/zic edwin Heads-up appreciat maintained by a third party source. lib/libc/stdtime edwin Heads-up appreciated, since parts of this code is maintained by a third party source. +sysinstall randi Please contact about any major changes so that + they can be co-ordinated. Following are the entries from the Makefiles, and a few other sources. Please remove stale entries from both their origin, and this file. From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 12:07:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E65BF1065677; Thu, 8 Apr 2010 12:07:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D41EE8FC20; Thu, 8 Apr 2010 12:07:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o38C7edc014301; Thu, 8 Apr 2010 12:07:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38C7eiK014299; Thu, 8 Apr 2010 12:07:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004081207.o38C7eiK014299@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Apr 2010 12:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206397 - head/crypto/openssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 12:07:41 -0000 Author: kib Date: Thu Apr 8 12:07:40 2010 New Revision: 206397 URL: http://svn.freebsd.org/changeset/base/206397 Log: Enhance r199804 by marking the daemonised child as immune to OOM instead of short-living parent. Only mark the master process that accepts connections, do not protect connection handlers spawned from inetd. Submitted by: Mykola Dzham Reviewed by: attilio MFC after: 1 week Modified: head/crypto/openssh/sshd.c Modified: head/crypto/openssh/sshd.c ============================================================================== --- head/crypto/openssh/sshd.c Thu Apr 8 09:01:20 2010 (r206396) +++ head/crypto/openssh/sshd.c Thu Apr 8 12:07:40 2010 (r206397) @@ -1330,10 +1330,6 @@ main(int ac, char **av) /* Initialize configuration options to their default values. */ initialize_server_options(&options); - /* Avoid killing the process in high-pressure swapping environments. */ - if (madvise(NULL, 0, MADV_PROTECT) != 0) - debug("madvise(): %.200s", strerror(errno)); - /* Parse command-line arguments. */ while ((opt = getopt(ac, av, "f:p:b:k:h:g:u:o:C:dDeiqrtQRT46")) != -1) { switch (opt) { @@ -1749,6 +1745,10 @@ main(int ac, char **av) /* Reinitialize the log (because of the fork above). */ log_init(__progname, options.log_level, options.log_facility, log_stderr); + /* Avoid killing the process in high-pressure swapping environments. */ + if (!inetd_flag && madvise(NULL, 0, MADV_PROTECT) != 0) + debug("madvise(): %.200s", strerror(errno)); + /* Initialize the random number generator. */ arc4random_stir(); From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 13:34:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0AF3106566C; Thu, 8 Apr 2010 13:34:08 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 907768FC15; Thu, 8 Apr 2010 13:34:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o38DY8KP033320; Thu, 8 Apr 2010 13:34:08 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38DY85Y033318; Thu, 8 Apr 2010 13:34:08 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004081334.o38DY85Y033318@svn.freebsd.org> From: Rui Paulo Date: Thu, 8 Apr 2010 13:34:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206398 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 13:34:08 -0000 Author: rpaulo Date: Thu Apr 8 13:34:08 2010 New Revision: 206398 URL: http://svn.freebsd.org/changeset/base/206398 Log: Prevent foot-shooting in ieee80211_ratectl_node_deinit(). MFC after: 1 month Modified: head/sys/net80211/ieee80211_ratectl.h Modified: head/sys/net80211/ieee80211_ratectl.h ============================================================================== --- head/sys/net80211/ieee80211_ratectl.h Thu Apr 8 12:07:40 2010 (r206397) +++ head/sys/net80211/ieee80211_ratectl.h Thu Apr 8 13:34:08 2010 (r206398) @@ -85,6 +85,8 @@ ieee80211_ratectl_node_deinit(struct iee { const struct ieee80211vap *vap = ni->ni_vap; + if (ni->ni_rctls == NULL) /* ratectl not setup */ + return; vap->iv_rate->ir_node_deinit(ni); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 15:19:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2D81106566B; Thu, 8 Apr 2010 15:19:57 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3F088FC13; Thu, 8 Apr 2010 15:19:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o38FJvsw057119; Thu, 8 Apr 2010 15:19:57 GMT (envelope-from ume@svn.freebsd.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38FJvAQ057118; Thu, 8 Apr 2010 15:19:57 GMT (envelope-from ume@svn.freebsd.org) Message-Id: <201004081519.o38FJvAQ057118@svn.freebsd.org> From: Hajimu UMEMOTO Date: Thu, 8 Apr 2010 15:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206399 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 15:19:57 -0000 Author: ume Date: Thu Apr 8 15:19:57 2010 New Revision: 206399 URL: http://svn.freebsd.org/changeset/base/206399 Log: Disambiguate `IPs' to a more specific term. Submitted by: Garrett Cooper MFC after: 3 days Modified: head/etc/rc.firewall Modified: head/etc/rc.firewall ============================================================================== --- head/etc/rc.firewall Thu Apr 8 13:34:08 2010 (r206398) +++ head/etc/rc.firewall Thu Apr 8 15:19:57 2010 (r206399) @@ -424,13 +424,15 @@ case ${firewall_type} in # Configuration: # firewall_myservices: List of TCP ports on which this host # offers services. - # firewall_allowservices: List of IPs which has access to + # firewall_allowservices: List of IPv4 and/or IPv6 addresses + # which has access to # $firewall_myservices. - # firewall_trusted: List of IPs which has full access - # to this host. Be very carefull - # when setting this. This option can - # seriously degrade the level of - # protection provided by the firewall. + # firewall_trusted: List of IPv4 and/or IPv6 addresses + # which has full access to this host. + # Be very carefull when setting this. + # This option can seriously degrade + # the level of protection provided by + # the firewall. # firewall_logdeny: Boolean (YES/NO) specifying if the # default denied packets should be # logged (in /var/log/security). From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 18:32:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A3C2106564A; Thu, 8 Apr 2010 18:32:13 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8952A8FC15; Thu, 8 Apr 2010 18:32:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o38IWDV7099291; Thu, 8 Apr 2010 18:32:13 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38IWDLV099289; Thu, 8 Apr 2010 18:32:13 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201004081832.o38IWDLV099289@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Thu, 8 Apr 2010 18:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206400 - head/sys/mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 18:32:13 -0000 Author: gonzo Date: Thu Apr 8 18:32:13 2010 New Revision: 206400 URL: http://svn.freebsd.org/changeset/base/206400 Log: - Fix mutex type for miibus_mtx: it's not spinlock, it's def lock Modified: head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Thu Apr 8 15:19:57 2010 (r206399) +++ head/sys/mips/atheros/if_arge.c Thu Apr 8 18:32:13 2010 (r206400) @@ -171,7 +171,7 @@ extern uint32_t ar711_base_mac[ETHER_ADD static struct mtx miibus_mtx; -MTX_SYSINIT(miibus_mtx, &miibus_mtx, "arge mii lock", MTX_SPIN); +MTX_SYSINIT(miibus_mtx, &miibus_mtx, "arge mii lock", MTX_DEF); /* From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 18:33:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E12441065675; Thu, 8 Apr 2010 18:33:35 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFBAC8FC1B; Thu, 8 Apr 2010 18:33:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o38IXZH0099639; Thu, 8 Apr 2010 18:33:35 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38IXZZT099637; Thu, 8 Apr 2010 18:33:35 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004081833.o38IXZZT099637@svn.freebsd.org> From: Matt Jacob Date: Thu, 8 Apr 2010 18:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206401 - stable/8/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 18:33:36 -0000 Author: mjacob Date: Thu Apr 8 18:33:35 2010 New Revision: 206401 URL: http://svn.freebsd.org/changeset/base/206401 Log: This is an MFC of 206029 Add a couple missing basic mode page codes. Modified: stable/8/sys/cam/scsi/scsi_all.h 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/cam/scsi/scsi_all.h ============================================================================== --- stable/8/sys/cam/scsi/scsi_all.h Thu Apr 8 18:32:13 2010 (r206400) +++ stable/8/sys/cam/scsi/scsi_all.h Thu Apr 8 18:33:35 2010 (r206401) @@ -170,6 +170,8 @@ struct scsi_mode_sense_6 #define SMS_PAGE_CODE 0x3F #define SMS_VENDOR_SPECIFIC_PAGE 0x00 #define SMS_DISCONNECT_RECONNECT_PAGE 0x02 +#define SMS_FORMAT_DEVICE_PAGE 0x03 +#define SMS_GEOMETRY_PAGE 0x04 #define SMS_CACHE_PAGE 0x08 #define SMS_PERIPHERAL_DEVICE_PAGE 0x09 #define SMS_CONTROL_MODE_PAGE 0x0A From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 18:38:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A61C106564A; Thu, 8 Apr 2010 18:38:51 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68A8F8FC1A; Thu, 8 Apr 2010 18:38:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o38Icpmj000987; Thu, 8 Apr 2010 18:38:51 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38Icp2e000985; Thu, 8 Apr 2010 18:38:51 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201004081838.o38Icp2e000985@svn.freebsd.org> From: Matt Jacob Date: Thu, 8 Apr 2010 18:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206402 - stable/7/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 18:38:51 -0000 Author: mjacob Date: Thu Apr 8 18:38:50 2010 New Revision: 206402 URL: http://svn.freebsd.org/changeset/base/206402 Log: This is an MFC of 206029 Add a couple missing basic mode page codes. Modified: stable/7/sys/cam/scsi/scsi_all.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/cam/scsi/scsi_all.h ============================================================================== --- stable/7/sys/cam/scsi/scsi_all.h Thu Apr 8 18:33:35 2010 (r206401) +++ stable/7/sys/cam/scsi/scsi_all.h Thu Apr 8 18:38:50 2010 (r206402) @@ -170,6 +170,8 @@ struct scsi_mode_sense_6 #define SMS_PAGE_CODE 0x3F #define SMS_VENDOR_SPECIFIC_PAGE 0x00 #define SMS_DISCONNECT_RECONNECT_PAGE 0x02 +#define SMS_FORMAT_DEVICE_PAGE 0x03 +#define SMS_GEOMETRY_PAGE 0x04 #define SMS_CACHE_PAGE 0x08 #define SMS_PERIPHERAL_DEVICE_PAGE 0x09 #define SMS_CONTROL_MODE_PAGE 0x0A From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 19:13:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3D10106566B; Thu, 8 Apr 2010 19:13:42 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 923E18FC08; Thu, 8 Apr 2010 19:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o38JDgs5008644; Thu, 8 Apr 2010 19:13:42 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38JDgb5008642; Thu, 8 Apr 2010 19:13:42 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004081913.o38JDgb5008642@svn.freebsd.org> From: Jack F Vogel Date: Thu, 8 Apr 2010 19:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206403 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 19:13:42 -0000 Author: jfv Date: Thu Apr 8 19:13:42 2010 New Revision: 206403 URL: http://svn.freebsd.org/changeset/base/206403 Log: Three changes: - add CRC stripping to the RX side, this was handled by some obscure code in rxeof previously, its easier to simply have the hardware strip it now. - Add back an ALTQ change that slipped between the cracks - Add an update to the watchdog_time in the xmit code, not doing this in ixgbe caused problems, think its needed here as well. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu Apr 8 18:38:50 2010 (r206402) +++ head/sys/dev/e1000/if_em.c Thu Apr 8 19:13:42 2010 (r206403) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.0.1"; +char em_driver_version[] = "7.0.2"; /********************************************************************* @@ -813,9 +813,13 @@ em_mq_start_locked(struct ifnet *ifp, st } enq = 0; - if (m == NULL) + if (m == NULL) { next = drbr_dequeue(ifp, txr->br); - else + } else if (drbr_needs_enqueue(ifp, txr->br)) { + if ((err = drbr_enqueue(ifp, txr->br, m)) != 0) + return (err); + next = drbr_dequeue(ifp, txr->br); + } else next = m; /* Process the queue */ @@ -1720,13 +1724,6 @@ em_xmit(struct tx_ring *txr, struct mbuf txd_upper = txd_lower = txd_used = txd_saved = 0; do_tso = ((m_head->m_pkthdr.csum_flags & CSUM_TSO) != 0); - /* - * Force a cleanup if number of TX descriptors - * available hits the threshold - */ - if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) - em_txeof(txr); - /* * TSO workaround: * If an mbuf is only header we need @@ -1915,6 +1912,11 @@ em_xmit(struct tx_ring *txr, struct mbuf bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); E1000_WRITE_REG(&adapter->hw, E1000_TDT(txr->me), i); + txr->watchdog_time = ticks; + + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) + em_txeof(txr); return (0); } @@ -3706,6 +3708,8 @@ em_refresh_mbufs(struct rx_ring *rxr, in rxr->next_to_refresh = i; } update: + bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); if (cleaned != -1) /* Update tail index */ E1000_WRITE_REG(&adapter->hw, E1000_RDT(rxr->me), cleaned); @@ -4040,6 +4044,9 @@ em_initialize_receive_unit(struct adapte E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF | (hw->mac.mc_filter_type << E1000_RCTL_MO_SHIFT); + /* Strip the CRC */ + rctl |= E1000_RCTL_SECRC; + /* Make sure VLAN Filters are off */ rctl &= ~E1000_RCTL_VFE; rctl &= ~E1000_RCTL_SBP; From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 19:34:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBF011065686; Thu, 8 Apr 2010 19:34:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAAAB8FC20; Thu, 8 Apr 2010 19:34:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o38JYt5j013441; Thu, 8 Apr 2010 19:34:55 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o38JYtf7013438; Thu, 8 Apr 2010 19:34:55 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201004081934.o38JYtf7013438@svn.freebsd.org> From: Warner Losh Date: Thu, 8 Apr 2010 19:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206404 - in head/sys: arm/include mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 19:34:56 -0000 Author: imp Date: Thu Apr 8 19:34:55 2010 New Revision: 206404 URL: http://svn.freebsd.org/changeset/base/206404 Log: Add BUS_SPACE_UNRESTRICTED and define it to be ~0, just like all the other platforms. Modified: head/sys/arm/include/bus.h head/sys/mips/include/bus.h Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Thu Apr 8 19:13:42 2010 (r206403) +++ head/sys/arm/include/bus.h Thu Apr 8 19:34:55 2010 (r206404) @@ -721,6 +721,8 @@ bs_c_8_proto(f); #define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF #define BUS_SPACE_MAXSIZE 0xFFFFFFFF +#define BUS_SPACE_UNRESTRICTED (~0) + #include #endif /* _MACHINE_BUS_H_ */ Modified: head/sys/mips/include/bus.h ============================================================================== --- head/sys/mips/include/bus.h Thu Apr 8 19:13:42 2010 (r206403) +++ head/sys/mips/include/bus.h Thu Apr 8 19:34:55 2010 (r206404) @@ -713,6 +713,8 @@ void __bs_c(f,_bs_c_8) (void *t, bus_spa #define BUS_SPACE_MAXSIZE_32BIT 0xFFFFFFFF #define BUS_SPACE_MAXSIZE 0xFFFFFFFF +#define BUS_SPACE_UNRESTRICTED (~0) + /* * declare generic bus space, it suits all needs in */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 8 21:18:47 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FCEF106564A; Thu, 8 Apr 2010 21:18:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B35A28FC1D; Thu, 8 Apr 2010 21:18:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o38LC9bk051979; Thu, 8 Apr 2010 15:12:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 08 Apr 2010 15:12:13 -0600 (MDT) Message-Id: <20100408.151213.718265677801106795.imp@bsdimp.com> To: netchild@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20100407100015.117169nw2iu6xp4w@webmail.leidinger.net> References: <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> <20100406.105417.934842008305588111.imp@bsdimp.com> <20100407100015.117169nw2iu6xp4w@webmail.leidinger.net> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2010 21:18:47 -0000 In message: <20100407100015.117169nw2iu6xp4w@webmail.leidinger.net> Alexander Leidinger writes: : Quoting "M. Warner Losh" (from Tue, 06 Apr 2010 : 10:54:17 -0600 (MDT)): : : > In message: <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> : > Alexander Leidinger writes: : > : Warner, do you mind if I back-out r206082 and change the place where : > : NORMAL_CTFCONVERT is used instead (fist I have to search for it : > : again... not today)? It would make it consistent with all other : > places : > : (SYSTEM_CTFCONVERT and the plain test and use of CTFxxx). : > : > Go ahead. I just did the fast and dirty fix. I though it was : > consistent with how other things were done, but if not, feel free to : > correct it. Also, see bde's commentary :) : : I can not find it, can you please forward it to me? Will do. : Here is what I have ATM (copy&paste, so tabs are probably mangled): : ---snip--- : Index: usr.sbin/config/mkmakefile.c : =================================================================== : --- usr.sbin/config/mkmakefile.c (revision 206031) : +++ usr.sbin/config/mkmakefile.c (working copy) : @@ -741,7 +741,7 @@ : printf("config: don't know rules for %s\n", : np); break; : } : - snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n.if : - defined(NORMAL_CTFCONVERT) && : - !empty(NORMAL_CTFCONVERT)\n\t${NORMAL_CTFCONVERT}\n.endif", : - ftype, : + snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n\t@${NORMAL_CTFCONVERT}", : ftype, : toupper(och), : ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); : compilewith = cmd; Uggg, this should have never been put into mkmakefile.c in the first place. I'm concerned that a change like this will have bad effects for people that have cross-threaded config and kernels. :( However, go ahead and fix it. I worry about people with cross-threaded kernels, but that won't be a huge deal, I don't think. Please monitor the lists to make sure... Warner : Index: sys/conf/kern.pre.mk : =================================================================== : --- sys/conf/kern.pre.mk (revision 206248) : +++ sys/conf/kern.pre.mk (working copy) : @@ -128,7 +128,7 @@ : NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ : ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c : : -NORMAL_CTFCONVERT= @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || : -${CTFCONVERT} ${CTFFLAGS} ${.TARGET} : +NORMAL_CTFCONVERT= [ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || : ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} : : NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} : : ---snip--- : : Bye, : Alexander. : : -- : http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 : http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 : Look before you leap. : -- Samuel Butler : From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 01:14:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86ABE106564A; Fri, 9 Apr 2010 01:14:11 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 767CE8FC13; Fri, 9 Apr 2010 01:14:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o391EB09087806; Fri, 9 Apr 2010 01:14:11 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o391EBdc087804; Fri, 9 Apr 2010 01:14:11 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201004090114.o391EBdc087804@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 9 Apr 2010 01:14:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206405 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 01:14:11 -0000 Author: nwhitehorn Date: Fri Apr 9 01:14:11 2010 New Revision: 206405 URL: http://svn.freebsd.org/changeset/base/206405 Log: Fix a bug where bus_dma_load_xxx() would not bounce misaligned buffers due to rounding the buffer's physical address to the beginning of its page. This fixes a panic in arge(4) when using PPPoE. Reported by: Jakob van Santen Reviewed by: gonzo Obtained from: amd64 Modified: head/sys/mips/mips/busdma_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Thu Apr 8 19:34:55 2010 (r206404) +++ head/sys/mips/mips/busdma_machdep.c Fri Apr 9 01:14:11 2010 (r206405) @@ -687,16 +687,21 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm * Count the number of bounce pages * needed in order to complete this transfer */ - vaddr = trunc_page((vm_offset_t)buf); + vaddr = (vm_offset_t)buf; vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { + bus_size_t sg_len; + KASSERT(kernel_pmap == pmap, ("pmap is not kernel pmap")); + sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK); paddr = pmap_kextract(vaddr); if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && - run_filter(dmat, paddr) != 0) + run_filter(dmat, paddr) != 0) { + sg_len = roundup2(sg_len, dmat->alignment); map->pagesneeded++; - vaddr += PAGE_SIZE; + } + vaddr += sg_len; } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 01:14:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 388BB106566C; Fri, 9 Apr 2010 01:14:40 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 280318FC08; Fri, 9 Apr 2010 01:14:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o391Eert087939; Fri, 9 Apr 2010 01:14:40 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o391Eef7087937; Fri, 9 Apr 2010 01:14:40 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004090114.o391Eef7087937@svn.freebsd.org> From: Rick Macklem Date: Fri, 9 Apr 2010 01:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206406 - stable/8/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 01:14:40 -0000 Author: rmacklem Date: Fri Apr 9 01:14:39 2010 New Revision: 206406 URL: http://svn.freebsd.org/changeset/base/206406 Log: MFC: r205661 Patch the regular NFS server so that it returns ESTALE to the client for all errors returned by VFS_FHTOVP(). This is required to ensure that EIO doesn't get returned to the client when ZFS is used as the server file system. Modified: stable/8/sys/nfsserver/nfs_srvsubs.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/nfsserver/nfs_srvsubs.c ============================================================================== --- stable/8/sys/nfsserver/nfs_srvsubs.c Fri Apr 9 01:14:11 2010 (r206405) +++ stable/8/sys/nfsserver/nfs_srvsubs.c Fri Apr 9 01:14:39 2010 (r206406) @@ -1128,6 +1128,9 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockfla } } error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); + if (error != 0) + /* Make sure the server replies ESTALE to the client. */ + error = ESTALE; vfs_unbusy(mp); if (error) goto out; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 01:28:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF632106564A for ; Fri, 9 Apr 2010 01:28:46 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from web51808.mail.re2.yahoo.com (web51808.mail.re2.yahoo.com [206.190.38.239]) by mx1.freebsd.org (Postfix) with SMTP id 1A9308FC0C for ; Fri, 9 Apr 2010 01:28:45 +0000 (UTC) Received: (qmail 15377 invoked by uid 60001); 9 Apr 2010 01:02:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1270774925; bh=cTCs/Rzx13MsC2cuPnH8btnJsQFEMV514E1IYVu+tRQ=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=vKQVkc+YKTmsRNVQIdznQK/UOKc8krwuHX6eRWqFJpJAcVih2Ajlb/l7JM8ihkz4p0piGRwN8XKCUtbnek4uqYXmEKOYdY8zhkjYAhugJk5YsX02fOLsrC3dsU5x2y8nOHD2HprDFLzaizh72vVQdA4UJ6GTs7AOeeHrkVSkIhk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=XbIFZ+NyBKEKhYivuJ9xUURdlUE3rd5YimKrfRVrInXnWEoU2ZdfalMssnEnfnJ23tQpgfVpvphXUYmbTRgthHCjZyct3vKpItt5bIx413GPBPoHPljynt8sKGqQLCeK7WHpNpnFVbG52+Uhmgq+H0fkn/MiqUUo/sCCk3Nf+8Y=; Message-ID: <545454.13807.qm@web51808.mail.re2.yahoo.com> X-YMail-OSG: RZpgZt8VM1mXKBVGHig0M.kI396iJQEBa3XxADYnzgvWwgRpcGU7vxU.wKFjFT3xFkwe14slZP.mBhwyI0U4wX1mRazP15n53tbc5oZcEMhdjBhtcgeBgHljhQ.XQ6KD.ctiPZqoKxZmYKK8rteD1IY1xvVoWdS2CBFXZ8bOkReP6OPsxXkabiv2qzOO7hH0NItY1zof7tfVfPw64StTGjv8MoeCiYtrec22NVJD_NkYCbsSM3dqEm49Benv7678yRDZ9nxYf4g_9WNN4t0nJXQY86F94lYo.lQZ15HAtZ5QboMD2NJtv53nGTI74XcxW2dFkxlgjxvspbS1wfQumUbC9yZQ4AlNxIbjxIDt0GnO Received: from [173.183.132.20] by web51808.mail.re2.yahoo.com via HTTP; Thu, 08 Apr 2010 18:02:05 PDT X-Mailer: YahooMailRC/324.3 YahooMailWebService/0.8.100.260964 References: <20100407165048.8CF9E106566B@hub.freebsd.org> Date: Thu, 8 Apr 2010 18:02:05 -0700 (PDT) From: PseudoCylon To: Rui Paulo , svn-src-head@freebsd.org In-Reply-To: <20100407165048.8CF9E106566B@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206358 - in head/sys: conf dev/bwi dev/bwn dev/iwn dev/ral dev/usb/wlan dev/wpi modules/wlan net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 01:28:47 -0000 >Author: rpaulo >Date: Wed Apr 7 15:29:13 2010 >New Revision: 206358 >URL: http://svn.freebsd.org/changeset/base/206358 > >Log: > net80211 rate control framework (net80211 ratectl). > > This framework allows drivers to abstract the rate control algorithm and > just feed the framework with the usable parameters. The rate control > framework will now deal with passing the parameters to the selected > algorithm. Right now we have AMRR (the default) and RSSADAPT but there's > no way to select one with ifconfig, yet. > The objective is to have more rate control algorithms in the net80211 > stack so all drivers[0] can use it. Ideally, we'll have the well-known > sample rate control algorithm in the net80211 at some point so all > drivers can use it (not just ath). > Hello, I've just tried the commit and run(4) works fine out of the box. It properly updates the rate. Thank you for updating the driver. AK __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 01:33:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2936A106566B; Fri, 9 Apr 2010 01:33:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 186F48FC14; Fri, 9 Apr 2010 01:33:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o391XChu092145; Fri, 9 Apr 2010 01:33:12 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o391XCgH092143; Fri, 9 Apr 2010 01:33:12 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201004090133.o391XCgH092143@svn.freebsd.org> From: Rick Macklem Date: Fri, 9 Apr 2010 01:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206407 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 01:33:13 -0000 Author: rmacklem Date: Fri Apr 9 01:33:12 2010 New Revision: 206407 URL: http://svn.freebsd.org/changeset/base/206407 Log: MFC: r205663 Patch the experimental NFS server in a manner analagous to r205661 for the regular NFS server, to ensure that ESTALE is returned to the client for all errors returned by VFS_FHTOVP(). Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.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/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 9 01:14:39 2010 (r206406) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Fri Apr 9 01:33:12 2010 (r206407) @@ -2443,6 +2443,9 @@ nfsvno_fhtovp(struct mount *mp, fhandle_ *credp = NULL; exp->nes_numsecflavor = 0; error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); + if (error != 0) + /* Make sure the server replies ESTALE to the client. */ + error = ESTALE; if (nam && !error) { error = VFS_CHECKEXP(mp, nam, &exp->nes_exflag, credp, &exp->nes_numsecflavor, &secflavors); From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 01:35:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0F89106566B; Fri, 9 Apr 2010 01:35:09 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFD0A8FC0C; Fri, 9 Apr 2010 01:35:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o391Z9TG092657; Fri, 9 Apr 2010 01:35:09 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o391Z9q2092650; Fri, 9 Apr 2010 01:35:09 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201004090135.o391Z9q2092650@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Apr 2010 01:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206408 - in head: etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 01:35:09 -0000 Author: dougb Date: Fri Apr 9 01:35:09 2010 New Revision: 206408 URL: http://svn.freebsd.org/changeset/base/206408 Log: Improve the handling of IPv6 configuration in rc.d. The ipv6_enable and ipv6_ifconfig_ options have already been deprecated, these changes do not alter that. With these changes any value set for ipv6_enable will emit a warning. In order to avoid a POLA violation for the deprecation of the option ipv6_enable=NO will still disable configuration for all interfaces other than lo0. ipv6_enable=YES will not have any effect, but will emit an additional warning. Support and warnings for this option will be removed in FreeBSD 10.x. Consistent with the current code, in order for IPv6 to be configured on an interface (other than lo0) an ifconfig__ipv6 option will have to be added to /etc/rc.conf[.local]. 1. Clean up and minor optimizations for the following functions: ifconfig_up (the ipv6 elements) ipv6if ipv6_autoconfif get_if_var _ifconfig_getargs The cleanups generally were to move the "easy" tests earlier in the functions, and consolidate duplicate code. 2. Stop overloading ipv6_prefer with the ability to disable IPv6 configuration. 3. Remove noafif() which was only ever called from ipv6_autoconfif. Instead, simplify and integrate the tests into that function, and convert the test to use is_wired_interface() instead of listing wireless interfaces explicitly. 4. Integrate backwards compatibility for ipv6_ifconfig_ into _ifconfig_getargs. This dramatically simplifies the code in all of the callers, and avoids a lot of other code duplication. 5. In rc.d/netoptions, add code for an ipv6_privacy option to use RFC 4193 style pseudo-random addresses (this is what windows does by default, FYI). 6. Add support for the [NO]RTADV options in ifconfig_getargs() and ipv6_autoconfif(). In the latter, include support for the explicit addition of [-]accept_rtadv in ifconfig__ipv6 as is done in the current code. 7. In rc.d/netif add a warning if $ipv6_enable is set, and remove the set_rcvar_obsolete for it. Also remove the latter from rc.d/ip6addrctl. 8. In /etc/defaults/rc.conf: Add an example for RTADV configuration. Set ipv6_network_interfaces to AUTO. Switch ipv6_prefer to YES. If ipv6_enable is not set this will have no effect. Add a default for ipv6_privacy (NO). 9. Document all of this in rc.conf.5. Modified: head/etc/defaults/rc.conf head/etc/network.subr head/etc/rc.d/ip6addrctl head/etc/rc.d/netif head/etc/rc.d/netoptions head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Fri Apr 9 01:33:12 2010 (r206407) +++ head/etc/defaults/rc.conf Fri Apr 9 01:35:09 2010 (r206408) @@ -210,6 +210,7 @@ cloned_interfaces="" # List of cloned n ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration. #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. +#ifconfig_ed0_ipv6="RTADV" # Sample IPv6 entry for RA/rtsol(8) #ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" # Sample IPv6 addr entry #ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" # Sample IPv6 alias #ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0. @@ -439,8 +440,9 @@ rfcomm_pppd_server_two_channel="3" # Ove icmp_bmcastecho="NO" # respond to broadcast ping packets ### IPv6 options: ### -ipv6_network_interfaces="none" # List of IPv6 network interfaces - # (or "auto" or "none"). +ipv6_network_interfaces="AUTO" # List of IPv6 network interfaces +ipv6_prefer="YES" # Use IPv6 when both IPv4 and IPv6 can be used +ipv6_privacy="NO" # Use privacy addresses with RTADV (RFC 4193) ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO). #ipv6_defaultrouter="2002:c058:6301::" # Use this for 6to4 (RFC 3068) ipv6_static_routes="" # Set to static route list (or leave empty). @@ -499,7 +501,6 @@ ipv6_ipfilter_rules="/etc/ipf6.rules" # # for examples ip6addrctl_enable="YES" # Set to YES to enable default address selection ip6addrctl_verbose="NO" # Set to YES to enable verbose configuration messages -ipv6_prefer="NO" # Use IPv6 when both IPv4 and IPv6 can be used ############################################################## ### System console options ################################# Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Fri Apr 9 01:33:12 2010 (r206407) +++ head/etc/network.subr Fri Apr 9 01:35:09 2010 (r206408) @@ -96,44 +96,32 @@ ifconfig_up() # inet6 specific if afexists inet6; then if ipv6if $1; then - if checkyesno ipv6_gateway_enable; then - _ipv6_opts="-accept_rtadv" - fi - else - if checkyesno ipv6_prefer; then - _ipv6_opts="-ifdisabled" - else - _ipv6_opts="ifdisabled" + # Implicitly handles ipv6_gateway_enable + _ipv6_opts='-ifdisabled -accept_rtadv' + + if ipv6_autoconfif $1; then + _ipv6_opts='-ifdisabled accept_rtadv' fi - # backward compatibility: $ipv6_enable - case $ipv6_enable in - [Yy][Ee][Ss]) - _ipv6_opts="${_ipv6_opts} accept_rtadv" - ;; - esac - fi + ifconfig $1 inet6 $_ipv6_opts - if [ -n "${_ipv6_opts}" ]; then - ifconfig $1 inet6 ${_ipv6_opts} - fi + # ifconfig_IF_ipv6 + ifconfig_args=`ifconfig_getargs $1 ipv6` - # ifconfig_IF_ipv6 - ifconfig_args=`ifconfig_getargs $1 ipv6` - if [ -n "${ifconfig_args}" ]; then - ifconfig $1 inet6 -ifdisabled - ifconfig $1 ${ifconfig_args} - _cfg=0 - fi + if [ -n "$ifconfig_args" ]; then + ifconfig $1 $ifconfig_args + _cfg=0 + fi + else + # Remove in FreeBSD 10.x + # Explicit test is necessary here to avoid nonexistence error + case "$ipv6_enable" in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + warn "Interface $1 will NOT be configured for IPv6" + ;; + esac - # backward compatiblity: $ipv6_ifconfig_IF - ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF` - if [ -n "${ifconfig_args}" ]; then - warn "\$ipv6_ifconfig_$1 is obsolete." \ - " Use ifconfig_$1_ipv6 instead." - ifconfig $1 inet6 -ifdisabled - ifconfig $1 inet6 ${ifconfig_args} - _cfg=0 + ifconfig $1 inet6 ifdisabled fi fi @@ -194,7 +182,7 @@ ifconfig_down() # $default if given. get_if_var() { - local _if _punct _var _default prefix suffix + local _if _punct _punct_c _var _default prefix suffix if [ $# -ne 2 -a $# -ne 3 ]; then err 3 'USAGE: get_if_var name var [default]' @@ -219,7 +207,7 @@ get_if_var() # outside this file. _ifconfig_getargs() { - local _ifn _af + local _ifn _af value _ifn=$1 _af=${2+_$2} @@ -227,7 +215,18 @@ _ifconfig_getargs() return 1 fi - get_if_var $_ifn ifconfig_IF$_af "$ifconfig_DEFAULT" + value=`get_if_var $_ifn ifconfig_IF$_af "$ifconfig_DEFAULT"` + + # Remove in FreeBSD 10.x + if [ "$_af" = _ipv6 -a -z "$value" ]; then + value=`get_if_var $_ifn ipv6_ifconfig_IF "$ifconfig_DEFAULT"` + if [ -n "$value" ]; then + warn "\$ipv6_ifconfig_$1 is obsolete." \ + " Use ifconfig_$1_ipv6 instead." + fi + fi + + echo $value } # ifconfig_getargs if [af] @@ -249,6 +248,8 @@ ifconfig_getargs() [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;; [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) ;; [Ww][Pp][Aa]) ;; + [Rr][Tt][Aa][Dd][Vv]) ;; + [Nn][Oo][Rr][Tt][Aa][Dd][Vv]) ;; *) _args="$_args $_arg" ;; @@ -372,77 +373,45 @@ afexists() esac } -# noafif if -# Returns 0 if the interface has no af configuration and 1 otherwise. -noafif() -{ - local _if - _if=$1 - - case $_if in - pflog[0-9]*|\ - pfsync[0-9]*|\ - an[0-9]*|\ - ath[0-9]*|\ - ipw[0-9]*|\ - iwi[0-9]*|\ - iwn[0-9]*|\ - ral[0-9]*|\ - wi[0-9]*|\ - wl[0-9]*|\ - wpi[0-9]*) - return 0 - ;; - esac - - return 1 -} - # ipv6if if # Returns 0 if the interface should be configured for IPv6 and # 1 otherwise. ipv6if() { - local _if _tmpargs i - _if=$1 - if ! afexists inet6; then return 1 fi # lo0 is always IPv6-enabled - case $_if in + case $1 in lo0) return 0 ;; esac - # True if $ifconfig_IF_ipv6 is defined. - _tmpargs=`_ifconfig_getargs $_if ipv6` - if [ -n "${_tmpargs}" ]; then - return 0 - fi - - # backward compatibility: True if $ipv6_ifconfig_IF is defined. - _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` - if [ -n "${_tmpargs}" ]; then - return 0 - fi + local _if _tmpargs i + _if=$1 - case "${ipv6_network_interfaces}" in - [Aa][Uu][Tt][Oo]) - return 0 - ;; + case "$ipv6_network_interfaces" in ''|[Nn][Oo][Nn][Ee]) return 1 ;; + $_if|"$_if "*|*" $_if"|*" $_if "*|[Aa][Uu][Tt][Oo]) + # True if $ifconfig_IF_ipv6 is defined. + _tmpargs=`_ifconfig_getargs $_if ipv6` + ;; esac - for i in ${ipv6_network_interfaces}; do - if [ "$i" = "$_if" ]; then - return 0 - fi - done + if [ -n "$_tmpargs" ]; then + # Remove in FreeBSD 10.x + # Explicit test is necessary here to avoid nonexistence error + case "$ipv6_enable" in + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + ;; + *) return 0 + ;; + esac + fi return 1 } @@ -452,15 +421,24 @@ ipv6if() # Stateless Address Configuration, 1 otherwise. ipv6_autoconfif() { + case $1 in + lo0|\ + stf[0-9]*|\ + faith[0-9]*|\ + lp[0-9]*|\ + sl[0-9]*|\ + pflog[0-9]*|\ + pfsync[0-9]*) + return 1 + ;; + esac + local _if _tmpargs _arg _if=$1 if ! ipv6if $_if; then return 1 fi - if noafif $_if; then - return 1 - fi if checkyesno ipv6_gateway_enable; then return 1 fi @@ -468,45 +446,24 @@ ipv6_autoconfif() if [ -n "${_tmpargs}" ]; then return 1 fi + if ! is_wired_interface $_if; then + case $_if in + wlan[0-9]*) ;; # Allow test to continue + *) return 1 + ;; + esac + fi - case $_if in - lo0|\ - stf[0-9]*|\ - faith[0-9]*|\ - lp[0-9]*|\ - sl[0-9]*|\ - pflog[0-9]*|\ - pfsync[0-9]*) + _tmpargs=`_ifconfig_getargs $_if ipv6` + case "$_tmpargs" in + *inet6\ *|*[Nn][Oo][Rr][Tt][Aa][Dd][Vv]*|*-accept_rtadv*) return 1 ;; - esac - - # backward compatibility: $ipv6_enable - case $ipv6_enable in - [Yy][Ee][Ss]) + *[Rr][Tt][Aa][Dd][Vv]*|*accept_rtadv*) return 0 ;; esac - _tmpargs=`_ifconfig_getargs $_if ipv6` - for _arg in $_tmpargs; do - case $_arg in - accept_rtadv) - return 0 - ;; - esac - done - - # backward compatibility: $ipv6_ifconfig_IF - _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` - for _arg in $_tmpargs; do - case $_arg in - accept_rtadv) - return 0 - ;; - esac - done - return 1 } Modified: head/etc/rc.d/ip6addrctl ============================================================================== --- head/etc/rc.d/ip6addrctl Fri Apr 9 01:33:12 2010 (r206407) +++ head/etc/rc.d/ip6addrctl Fri Apr 9 01:35:09 2010 (r206408) @@ -20,8 +20,6 @@ status_cmd="ip6addrctl" prefer_ipv6_cmd="ip6addrctl_prefer_ipv6" prefer_ipv4_cmd="ip6addrctl_prefer_ipv4" -set_rcvar_obsolete ipv6_enable ipv6_prefer - ip6addrctl_prefer_ipv6() { afexists inet6 || return 0 Modified: head/etc/rc.d/netif ============================================================================== --- head/etc/rc.d/netif Fri Apr 9 01:33:12 2010 (r206407) +++ head/etc/rc.d/netif Fri Apr 9 01:35:09 2010 (r206408) @@ -34,6 +34,7 @@ . /etc/network.subr name="network" +start_precmd="network_prestart" start_cmd="network_start" stop_cmd="network_stop" cloneup_cmd="clone_up" @@ -41,7 +42,13 @@ clonedown_cmd="clone_down" extra_commands="cloneup clonedown" cmdifn= -set_rcvar_obsolete ipv6_enable ipv6_prefer +network_prestart() +{ + if [ -n "$ipv6_enable" ]; then + warn 'The ipv6_enable option is deprecated.' + warn 'See rc.conf(5) for information on disabling IPv6.' + fi +} network_start() { Modified: head/etc/rc.d/netoptions ============================================================================== --- head/etc/rc.d/netoptions Fri Apr 9 01:33:12 2010 (r206407) +++ head/etc/rc.d/netoptions Fri Apr 9 01:35:09 2010 (r206408) @@ -99,6 +99,13 @@ netoptions_inet6() else ${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null fi + + if checkyesno ipv6_privacy; then + netoptions_init + echo -n " IPv6 Privacy Addresses" + ${SYSCTL_W} net.inet6.ip6.use_tempaddr=1 >/dev/null + ${SYSCTL_W} net.inet6.ip6.prefer_tempaddr=1 >/dev/null + fi } load_rc_config $name Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Fri Apr 9 01:33:12 2010 (r206407) +++ head/share/man/man5/rc.conf.5 Fri Apr 9 01:35:09 2010 (r206408) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 05, 2010 +.Dd April 8, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -1292,79 +1292,98 @@ It is also possible to rename an interfa ifconfig_ed0_name="net0" ifconfig_net0="inet 192.0.2.1 netmask 0xffffff00" .Ed +.\" Remove in FreeBSD 10.x .It Va ipv6_enable .Pq Vt bool -If the variable is -.Dq Li YES , -.Dq Li inet6 accept_rtadv -is added to all of -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 -and the -.Va ipv6_prefer -is defined as -.Dq Li YES . .Pp -This variable is deprecated. Use -.Va ipv6_prefer -and -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 . -.It Va ipv6_prefer -.Pq Vt bool -This variable does the following: +This option is deprecated. .Pp If the variable is -.Dq Li YES , -the default policy of the source address selection set by -.Xr ip6addrctl 8 -will be IPv6-preferred. +.Dq Li YES +it has no effect. +To configure IPv6 for an interface see +.Va ipv6_network_interfaces +below. .Pp If the variable is -.Dq Li NO , -the default policy of the source address selection set by -.Xr ip6addrctl 8 -will be IPv4-preferred, and all of interfaces which does not have the -corrsponding -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 -variable will be marked as -.Dq Li IFDISABLED . -This means only IPv6 functionality on that interface is completely -disabled. For more details of -.Dq Li IFDISABLED -flag and keywords -.Dq Li inet6 ifdisabled , -see -.Xr ifconfig 8 . -.Pp +.Dq Li NO +then other than +.Dq Li lo0 +IPv6 will be disabled for each interface, +however the same effect can be achieved by +not configuring the interface. .It Va ipv6_network_interfaces .Pq Vt str This is the IPv6 equivalent of .Va network_interfaces . -Normally manual configuration of this variable is not needed. +Normally configuration of this variable is not needed, +the value should be left as +.Dq Li AUTO . +.Pp +If +.Dq Li INET6 +is configured in the kernel configuration for the +.Dq Li lo0 +interface will always be performed. +It is not necessary to list it in +.Va ipv6_network_interfaces . +.Pp +Example configuration to accept Router Advertisements (RA) for the +.Dq Li ed0 +interface: +.Bd -literal +ifconfig_ed0_ipv6="RTADV" +.Ed +.Pp +To disable RA the +.Dq Li NORTADV +option is available, although not required if manual +configuration is performed as described below. +.Pp +An IPv6 interface can be configured manually with +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 . +For example: +.Bd -literal +ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" +.Ed +.Pp +Manual configuration of an IPv6 address will also +require configuration of the +.Va ipv6_defaultrouter +option. .Pp -IPv6 functionality on an interface should be configured by -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 , -instead of setting ifconfig parameters in -.Va ifconfig_ Ns Aq Ar interface . Aliases should be set by .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n -with +with the .Dq Li inet6 -keyword. For example: +keyword. +For example: +.Pp .Bd -literal -ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" .Ed .Pp -Interfaces that have an -.Dq Li inet6 accept_rtadv -keyword in -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 -setting will be automatically configured by -.Xr rtsol 8 . -Note that this automatic configuration is disabled if the -.Va ipv6_gateway_enable -is set to -.Dq Li YES . +.It Va ipv6_prefer +.Pq Vt bool +If the variable is +.Dq Li YES , +the default policy of the source address selection set by +.Xr ip6addrctl 8 +will be IPv6-preferred. +.Pp +If the variable is +.Dq Li NO , +the default policy of the source address selection set by +.Xr ip6addrctl 8 +will be IPv4-preferred. +.Pp +.It Va ipv6_privacy +.Pq Vt bool +If the variable is +.Dq Li YES +privacy addresses will be generated for each IPv6 +interface as described in RFC 4193. +.Pp .It Va ipv6_prefix_ Ns Aq Ar interface .Pq Vt str If one or more prefixes are defined in From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 01:55:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C08F61065670 for ; Fri, 9 Apr 2010 01:55:24 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 513678FC18 for ; Fri, 9 Apr 2010 01:55:24 +0000 (UTC) Received: (qmail 17891 invoked by uid 399); 9 Apr 2010 01:55:23 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 9 Apr 2010 01:55:23 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4BBE8909.1060102@FreeBSD.org> Date: Thu, 08 Apr 2010 18:55:21 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.9) Gecko/20100330 Thunderbird/3.0.4 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201004090135.o391Z9q2092650@svn.freebsd.org> In-Reply-To: <201004090135.o391Z9q2092650@svn.freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r206408 - in head: etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 01:55:24 -0000 On 04/08/10 18:35, Doug Barton wrote: > Switch ipv6_prefer to YES. If ipv6_enable is not set This should have read "If IPv6 is not configured ..." Sorry for any confusion, Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 02:15:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE4FA1065673 for ; Fri, 9 Apr 2010 02:15:47 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from web51803.mail.re2.yahoo.com (web51803.mail.re2.yahoo.com [206.190.38.234]) by mx1.freebsd.org (Postfix) with SMTP id 4DB568FC18 for ; Fri, 9 Apr 2010 02:15:47 +0000 (UTC) Received: (qmail 56473 invoked by uid 60001); 9 Apr 2010 02:15:46 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1270779346; bh=RwqKaNDoEvaAgbhnyVjH4avP69nT7xBGVCrDV3BBZ4I=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=AGiuUOfqAC1HiyQ6UknR9JLRw4Fjdg7UrOcKpE/hLgt8oV9UMQahUlxpU/x95qh/qSshrVLuz+BWyl37zgkMWTk6srWzDg/qhx0WuAcA7ifx5SB/ggvVmK08NEvRHbYbqCkafz1CNMVcV1fxuHcluR4fL8mF8Ecgff4QrxD0i+o= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=aIRVyraygwGMnWAWkbXKCSLtH4Y00fMpRQZ1RiTbkYuv18yRyaAvTyEFhWKHJWes5u0Th6XBrJ5HDTAYzzA0X6PiB/J1YqUDMsBCU6Fa8EpxNQirOQZEo2ZpOkPeTlC/tU4H563x3pN8RbcSe9dId/eBlkbFALheugKZ31iIsBE=; Message-ID: <488108.55494.qm@web51803.mail.re2.yahoo.com> X-YMail-OSG: eyiRXL8VM1nW1onI1bGt2fx71BEk4GRfbYp3qvaD_apjMWkZJT5xf4hSixcD6TJVy25JqbVHy9_BVKo5w7dPbpI975q1ILuVVhLjwvMrczd0bPW5DY.sjRaSNd05UQqoRG0aXoNKV1oFyPJ9y7udX5m.Gr2Dz.sQeNa3H0KoCfAxdgJJjA16bY8vlKRQihJxOLDQfw.D7tyZ2hVe9hZatWd0gLboj3BbJwJoSAGawLSAbdQYK1KL9CRbQI1MdfwNjy2roGnVbAY3T1O0pqawGIn89_hmrPS9e9IfrK7VIdmz2yzHoSiLIQTG6GWl7HGp4z0VYp.JUWTdWQzJkYaNoHke92LvslIQY.KK7ePl6F81 Received: from [173.183.132.20] by web51803.mail.re2.yahoo.com via HTTP; Thu, 08 Apr 2010 19:15:46 PDT X-Mailer: YahooMailRC/324.3 YahooMailWebService/0.8.100.260964 References: <20100407165048.8CF9E106566B@hub.freebsd.org> Date: Thu, 8 Apr 2010 19:15:46 -0700 (PDT) From: PseudoCylon To: Rui Paulo , svn-src-head@freebsd.org In-Reply-To: <20100407165048.8CF9E106566B@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206358 (patch for if_run) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 02:15:47 -0000 >>Author: rpaulo >>Date: Wed Apr 7 15:29:13 2010 >>New Revision: 206358 >>URL: http://svn.freebsd.org/changeset/base/206358 >> >>Log: >> net80211 rate control framework (net80211 ratectl). >> >> This framework allows drivers to abstract the rate control algorithm and >> just feed the framework with the usable parameters. The rate control >> framework will now deal with passing the parameters to the selected >> algorithm. Right now we have AMRR (the default) and RSSADAPT but there's >> no way to select one with ifconfig, yet. >> The objective is to have more rate control algorithms in the net80211 >> stack so all drivers[0] can use it. Ideally, we'll have the well-known >> sample rate control algorithm in the net80211 at some point so all >> drivers can use it (not just ath). >> > >Hello, > >I've just tried the commit and run(4) works fine out of the box. It properly updates the rate. > >Thank you for updating the driver. > >AK > Sorry, correction. I've got complain from witness uma_zalloc_arg: zone "64" with the following non-sleepable locks held: exclusive sleep mutex run0 (network driver) r = 0 (0xffffff80008de128) locked @ /usr/src/sys/dev/usb/usb_request.c:540 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a _witness_debugger() at _witness_debugger+0x2e witness_warn() at witness_warn+0x2c2 uma_zalloc_arg() at uma_zalloc_arg+0x335 malloc() at malloc+0x9a amrr_node_init() at amrr_node_init+0x38 run_newstate() at run_newstate+0x363 ieee80211_newstate_cb() at ieee80211_newstate_cb+0xac taskqueue_run() at taskqueue_run+0x91 taskqueue_thread_loop() at taskqueue_thread_loop+0x3f fork_exit() at fork_exit+0x12a fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffff803e5d0d30, rbp = 0 --- Just unlocking the mutex before calling ieee80211_ratectl_node_init() fix this. As long as ieee80211_ratectl_node_init() won't be called with the same ni at the same time, unlocking should be safe. Here is patch *** orig_if_run.c 2010-04-08 03:29:31.000000000 -0600 --- fix_if_run.c 2010-04-08 19:52:45.000000000 -0600 *************** *** 1965,1969 **** uint32_t sta[3]; - #if 0 - uint8_t wcid; - #endif --- 1965,1966 ---- *************** *** 1975,1981 **** ! #if 0 ! wcid = RUN_AID2WCID(ni == NULL ? 0 : ni->ni_associd); ! ieee80211_amrr_node_init(&rvp->amrr, &rvp->amn[wcid], ni); ! #endif ieee80211_ratectl_node_init(ni); --- 1972,1976 ---- ! RUN_UNLOCK(sc); ieee80211_ratectl_node_init(ni); + RUN_LOCK(sc); *************** *** 2096,2102 **** - #if 0 - wcid = RUN_AID2WCID(ni == NULL ? 0 : ni->ni_associd); - amn = &rvp->amn[wcid]; - #endif - /* count failed TX as errors */ --- 2091,2092 ---- P.S. #if 0s (amn[]) are no longer needed because now each amrr node is attached to individual ieee80211_node. AK __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com. From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 02:39:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F7C9106564A; Fri, 9 Apr 2010 02:39:21 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F0348FC18; Fri, 9 Apr 2010 02:39:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o392dLTA007455; Fri, 9 Apr 2010 02:39:21 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o392dL1u007454; Fri, 9 Apr 2010 02:39:21 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004090239.o392dL1u007454@svn.freebsd.org> From: Alan Cox Date: Fri, 9 Apr 2010 02:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206409 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 02:39:21 -0000 Author: alc Date: Fri Apr 9 02:39:20 2010 New Revision: 206409 URL: http://svn.freebsd.org/changeset/base/206409 Log: Introduce the function kmem_alloc_attr(), which allocates kernel virtual memory with the specified physical attributes. In particular, like kmem_alloc_contig(), the caller can specify the physical address range from which the physical pages are allocated and the memory attributes (i.e., cache behavior) for these physical pages. However, in contrast to kmem_alloc_contig() or contigmalloc(), the physical pages that are allocated by kmem_alloc_attr() are not necessarily physically contiguous. This function is needed by DRM and VirtualBox. Correct an error in the prototype for kmem_malloc(). The third argument had the wrong type. Tested by: rnoland MFC after: 3 days Modified: head/sys/vm/vm_contig.c head/sys/vm/vm_extern.h Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Fri Apr 9 01:35:09 2010 (r206408) +++ head/sys/vm/vm_contig.c Fri Apr 9 02:39:20 2010 (r206409) @@ -87,6 +87,8 @@ __FBSDID("$FreeBSD$"); #include #include +static void vm_contig_grow_cache(int tries); + static int vm_contig_launder_page(vm_page_t m, vm_page_t *next) { @@ -186,6 +188,99 @@ vm_page_release_contig(vm_page_t m, vm_p } /* + * Increase the number of cached pages. + */ +static void +vm_contig_grow_cache(int tries) +{ + int actl, actmax, inactl, inactmax; + + vm_page_lock_queues(); + inactl = 0; + inactmax = tries < 1 ? 0 : cnt.v_inactive_count; + actl = 0; + actmax = tries < 2 ? 0 : cnt.v_active_count; +again: + if (inactl < inactmax && vm_contig_launder(PQ_INACTIVE)) { + inactl++; + goto again; + } + if (actl < actmax && vm_contig_launder(PQ_ACTIVE)) { + actl++; + goto again; + } + vm_page_unlock_queues(); +} + +/* + * Allocates a region from the kernel address map and pages within the + * specified physical address range to the kernel object, creates a wired + * mapping from the region to these pages, and returns the region's starting + * virtual address. The allocated pages are not necessarily physically + * contiguous. If M_ZERO is specified through the given flags, then the pages + * are zeroed before they are mapped. + */ +vm_offset_t +kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, + vm_paddr_t high, vm_memattr_t memattr) +{ + vm_object_t object = kernel_object; + vm_offset_t addr, i, offset; + vm_page_t m; + int tries; + + size = round_page(size); + vm_map_lock(map); + if (vm_map_findspace(map, vm_map_min(map), size, &addr)) { + vm_map_unlock(map); + return (0); + } + offset = addr - VM_MIN_KERNEL_ADDRESS; + vm_object_reference(object); + vm_map_insert(map, object, offset, addr, addr + size, VM_PROT_ALL, + VM_PROT_ALL, 0); + VM_OBJECT_LOCK(object); + for (i = 0; i < size; i += PAGE_SIZE) { + tries = 0; +retry: + m = vm_phys_alloc_contig(1, low, high, PAGE_SIZE, 0); + if (m == NULL) { + if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_contig_grow_cache(tries); + vm_map_lock(map); + VM_OBJECT_LOCK(object); + goto retry; + } + while (i != 0) { + i -= PAGE_SIZE; + m = vm_page_lookup(object, OFF_TO_IDX(offset + + i)); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); + } + VM_OBJECT_UNLOCK(object); + vm_map_delete(map, addr, addr + size); + vm_map_unlock(map); + return (0); + } + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); + vm_page_insert(m, object, OFF_TO_IDX(offset + i)); + if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->valid = VM_PAGE_BITS_ALL; + } + VM_OBJECT_UNLOCK(object); + vm_map_unlock(map); + vm_map_wire(map, addr, addr + size, VM_MAP_WIRE_SYSTEM | + VM_MAP_WIRE_NOHOLES); + return (addr); +} + +/* * Allocates a region from the kernel address map, inserts the * given physically contiguous pages into the kernel object, * creates a wired mapping from the region to the pages, and @@ -253,7 +348,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ vm_offset_t ret; vm_page_t pages; unsigned long npgs; - int actl, actmax, inactl, inactmax, tries; + int tries; size = round_page(size); npgs = size >> PAGE_SHIFT; @@ -262,23 +357,7 @@ retry: pages = vm_phys_alloc_contig(npgs, low, high, alignment, boundary); if (pages == NULL) { if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { - vm_page_lock_queues(); - inactl = 0; - inactmax = tries < 1 ? 0 : cnt.v_inactive_count; - actl = 0; - actmax = tries < 2 ? 0 : cnt.v_active_count; -again: - if (inactl < inactmax && - vm_contig_launder(PQ_INACTIVE)) { - inactl++; - goto again; - } - if (actl < actmax && - vm_contig_launder(PQ_ACTIVE)) { - actl++; - goto again; - } - vm_page_unlock_queues(); + vm_contig_grow_cache(tries); tries++; goto retry; } Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Fri Apr 9 01:35:09 2010 (r206408) +++ head/sys/vm/vm_extern.h Fri Apr 9 02:39:20 2010 (r206409) @@ -41,6 +41,8 @@ struct vnode; int kernacc(void *, int, int); vm_offset_t kmem_alloc(vm_map_t, vm_size_t); +vm_offset_t kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags, + vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary, vm_memattr_t memattr); @@ -49,7 +51,7 @@ vm_offset_t kmem_alloc_wait(vm_map_t, vm void kmem_free(vm_map_t, vm_offset_t, vm_size_t); void kmem_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); void kmem_init(vm_offset_t, vm_offset_t); -vm_offset_t kmem_malloc(vm_map_t, vm_size_t, boolean_t); +vm_offset_t kmem_malloc(vm_map_t map, vm_size_t size, int flags); vm_map_t kmem_suballoc(vm_map_t, vm_offset_t *, vm_offset_t *, vm_size_t, boolean_t); void swapout_procs(int); From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 06:40:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5561106566B; Fri, 9 Apr 2010 06:40:30 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C430A8FC21; Fri, 9 Apr 2010 06:40:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o396eUkJ042150; Fri, 9 Apr 2010 06:40:30 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o396eUIM042149; Fri, 9 Apr 2010 06:40:30 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004090640.o396eUIM042149@svn.freebsd.org> From: Alan Cox Date: Fri, 9 Apr 2010 06:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206410 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 06:40:30 -0000 Author: alc Date: Fri Apr 9 06:40:30 2010 New Revision: 206410 URL: http://svn.freebsd.org/changeset/base/206410 Log: MFC r206174 vm_reserv_alloc_page() should never be called on an OBJT_SG object, just as it is never called on an OBJT_DEVICE object. (This change should have been included in r195840.) Modified: stable/8/sys/vm/vm_page.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/vm/vm_page.c ============================================================================== --- stable/8/sys/vm/vm_page.c Fri Apr 9 02:39:20 2010 (r206409) +++ stable/8/sys/vm/vm_page.c Fri Apr 9 06:40:30 2010 (r206410) @@ -1084,6 +1084,7 @@ vm_page_alloc(vm_object_t object, vm_pin return (NULL); #if VM_NRESERVLEVEL > 0 } else if (object == NULL || object->type == OBJT_DEVICE || + object->type == OBJT_SG || (object->flags & OBJ_COLORED) == 0 || (m = vm_reserv_alloc_page(object, pindex)) == NULL) { #else From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 06:47:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 043F3106566C; Fri, 9 Apr 2010 06:47:37 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E71E68FC15; Fri, 9 Apr 2010 06:47:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o396laLA048197; Fri, 9 Apr 2010 06:47:36 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o396laFU048195; Fri, 9 Apr 2010 06:47:36 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004090647.o396laFU048195@svn.freebsd.org> From: Alan Cox Date: Fri, 9 Apr 2010 06:47:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206411 - stable/7/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 06:47:37 -0000 Author: alc Date: Fri Apr 9 06:47:36 2010 New Revision: 206411 URL: http://svn.freebsd.org/changeset/base/206411 Log: MFC r206174 vm_reserv_alloc_page() should never be called on an OBJT_SG object, just as it is never called on an OBJT_DEVICE object. (This change should have been included in r195840.) Modified: stable/7/sys/vm/vm_page.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/vm/vm_page.c ============================================================================== --- stable/7/sys/vm/vm_page.c Fri Apr 9 06:40:30 2010 (r206410) +++ stable/7/sys/vm/vm_page.c Fri Apr 9 06:47:36 2010 (r206411) @@ -1065,6 +1065,7 @@ vm_page_alloc(vm_object_t object, vm_pin return (NULL); #if VM_NRESERVLEVEL > 0 } else if (object == NULL || object->type == OBJT_DEVICE || + object->type == OBJT_SG || (object->flags & OBJ_COLORED) == 0 || (m = vm_reserv_alloc_page(object, pindex)) == NULL) { #else From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 06:59:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED1A5106567E; Fri, 9 Apr 2010 06:59:58 +0000 (UTC) (envelope-from bschmidt@mx.techwires.net) Received: from mx.techwires.net (mx.techwires.net [IPv6:2001:4d88:100f:1::3]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1E68FC23; Fri, 9 Apr 2010 06:59:58 +0000 (UTC) Received: by mx.techwires.net (Postfix, from userid 1001) id 2F50A25384; Fri, 9 Apr 2010 08:59:57 +0200 (CEST) Date: Fri, 9 Apr 2010 08:59:57 +0200 From: Bernhard Schmidt To: PseudoCylon Message-ID: <20100409065957.GA6076@mx.techwires.net> References: <20100407165048.8CF9E106566B@hub.freebsd.org> <488108.55494.qm@web51803.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <488108.55494.qm@web51803.mail.re2.yahoo.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo Subject: Re: svn commit: r206358 (patch for if_run) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 06:59:59 -0000 On Thu, Apr 08, 2010 at 07:15:46PM -0700, PseudoCylon wrote: > >>Author: rpaulo > >>Date: Wed Apr 7 15:29:13 2010 > >>New Revision: 206358 > >>URL: http://svn.freebsd.org/changeset/base/206358 > >> > >>Log: > >> net80211 rate control framework (net80211 ratectl). > >> > >> This framework allows drivers to abstract the rate control algorithm and > >> just feed the framework with the usable parameters. The rate control > >> framework will now deal with passing the parameters to the selected > >> algorithm. Right now we have AMRR (the default) and RSSADAPT but there's > >> no way to select one with ifconfig, yet. > >> The objective is to have more rate control algorithms in the net80211 > >> stack so all drivers[0] can use it. Ideally, we'll have the well-known > >> sample rate control algorithm in the net80211 at some point so all > >> drivers can use it (not just ath). > >> > > > >Hello, > > > >I've just tried the commit and run(4) works fine out of the box. It properly updates the rate. > > > >Thank you for updating the driver. > > > >AK > > > > Sorry, correction. > > I've got complain from witness > > uma_zalloc_arg: zone "64" with the following non-sleepable locks held: > exclusive sleep mutex run0 (network driver) r = 0 (0xffffff80008de128) locked @ /usr/src/sys/dev/usb/usb_request.c:540 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a > _witness_debugger() at _witness_debugger+0x2e > witness_warn() at witness_warn+0x2c2 > uma_zalloc_arg() at uma_zalloc_arg+0x335 > malloc() at malloc+0x9a > amrr_node_init() at amrr_node_init+0x38 > run_newstate() at run_newstate+0x363 > ieee80211_newstate_cb() at ieee80211_newstate_cb+0xac > taskqueue_run() at taskqueue_run+0x91 > taskqueue_thread_loop() at taskqueue_thread_loop+0x3f > fork_exit() at fork_exit+0x12a > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip = 0, rsp = 0xffffff803e5d0d30, rbp = 0 --- > > Just unlocking the mutex before calling ieee80211_ratectl_node_init() fix this. As long as ieee80211_ratectl_node_init() won't be called with the same ni at the same time, unlocking should be safe. I'd prefer M_NOWAIT instead of M_WAITOK in amrr_node_init(). Fiddling with locking doesn't feel right. -- Bernhard From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 07:27:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80FB9106566B; Fri, 9 Apr 2010 07:27:31 +0000 (UTC) (envelope-from netchild@freebsd.org) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0C82E8FC0C; Fri, 9 Apr 2010 07:27:30 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CF0E.dip.t-dialin.net [217.226.207.14]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 5895B8442D0; Fri, 9 Apr 2010 09:27:24 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 700A35073; Fri, 9 Apr 2010 09:27:21 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o397RLRQ049614; Fri, 9 Apr 2010 09:27:21 +0200 (CEST) (envelope-from netchild@FreeBSD.org) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 09 Apr 2010 09:27:21 +0200 Message-ID: <20100409092721.19743kgds231hckg@webmail.leidinger.net> Date: Fri, 09 Apr 2010 09:27:21 +0200 From: Alexander Leidinger To: "M. Warner Losh" References: <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> <20100406.105417.934842008305588111.imp@bsdimp.com> <20100407100015.117169nw2iu6xp4w@webmail.leidinger.net> <20100408.151213.718265677801106795.imp@bsdimp.com> In-Reply-To: <20100408.151213.718265677801106795.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 5895B8442D0.557E1 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.763, required 6, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_83 0.60, TW_SV 0.08) X-EBL-MailScanner-From: netchild@freebsd.org X-EBL-MailScanner-Watermark: 1271402847.16232@VQppPvuNkcdH+XrehJAGJg X-EBL-Spam-Status: No Cc: kostikbel@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 07:27:31 -0000 Quoting "M. Warner Losh" (from Thu, 08 Apr 2010 15:12:13 -0600 (MDT)): > In message: <20100407100015.117169nw2iu6xp4w@webmail.leidinger.net> > Alexander Leidinger writes: > : Quoting "M. Warner Losh" (from Tue, 06 Apr 2010 > : 10:54:17 -0600 (MDT)): > : > : > In message: <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> > : > Alexander Leidinger writes: > : > : Warner, do you mind if I back-out r206082 and change the place where > : > : NORMAL_CTFCONVERT is used instead (fist I have to search for it > : > : again... not today)? It would make it consistent with all other > : > places > : > : (SYSTEM_CTFCONVERT and the plain test and use of CTFxxx). > : > > : > Go ahead. I just did the fast and dirty fix. I though it was > : > consistent with how other things were done, but if not, feel free to > : > correct it. Also, see bde's commentary :) > : > : I can not find it, can you please forward it to me? > > Will do. > > : Here is what I have ATM (copy&paste, so tabs are probably mangled): > : ---snip--- > : Index: usr.sbin/config/mkmakefile.c > : =================================================================== > : --- usr.sbin/config/mkmakefile.c (revision 206031) > : +++ usr.sbin/config/mkmakefile.c (working copy) > : @@ -741,7 +741,7 @@ > : printf("config: don't know rules for %s\n", > : np); break; > : } > : - snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n.if > : - defined(NORMAL_CTFCONVERT) && > : - > !empty(NORMAL_CTFCONVERT)\n\t${NORMAL_CTFCONVERT}\n.endif", > : - ftype, > : + snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n\t@${NORMAL_CTFCONVERT}", > : ftype, > : toupper(och), > : ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); > : compilewith = cmd; > > Uggg, this should have never been put into mkmakefile.c in the first > place. I'm concerned that a change like this will have bad effects > for people that have cross-threaded config and kernels. :( You need to have a look at the complete code, there is more than only the use of NORMAL_CTFCONVERT. Regarding the cross-case, I think it can be done by overriding NORMAL_CTFCONVERT (if needed). > However, go ahead and fix it. I worry about people with > cross-threaded kernels, but that won't be a huge deal, I don't think. > Please monitor the lists to make sure... Do I understand this right, that you think I shall do it before I get the forwarded mail? Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 There is a 20% chance of tomorrow. From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 08:20:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DA9A1065672; Fri, 9 Apr 2010 08:20:43 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C43E8FC0A; Fri, 9 Apr 2010 08:20:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o398Kh1W032238; Fri, 9 Apr 2010 08:20:43 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o398KhUn032235; Fri, 9 Apr 2010 08:20:43 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201004090820.o398KhUn032235@svn.freebsd.org> From: Nick Hibma Date: Fri, 9 Apr 2010 08:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206412 - stable/7/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 08:20:43 -0000 Author: n_hibma Date: Fri Apr 9 08:20:43 2010 New Revision: 206412 URL: http://svn.freebsd.org/changeset/base/206412 Log: Add the ID for the Matrix Orbital LCD display MOU-Axxx series. Simplify a switch statement in the uftdi driver to an if-then-else-endif as it encoded those two cases only. Reviewed by: imp Modified: stable/7/sys/dev/usb/uftdi.c stable/7/sys/dev/usb/usbdevs Modified: stable/7/sys/dev/usb/uftdi.c ============================================================================== --- stable/7/sys/dev/usb/uftdi.c Fri Apr 9 06:47:36 2010 (r206411) +++ stable/7/sys/dev/usb/uftdi.c Fri Apr 9 08:20:43 2010 (r206412) @@ -184,6 +184,9 @@ uftdi_match(device_t self) if (uaa->vendor == USB_VENDOR_MELCO && (uaa->product == USB_PRODUCT_MELCO_PCOPRS1)) return (UMATCH_VENDOR_PRODUCT); + if (uaa->vendor == USB_VENDOR_MATRIXORBITAL && + (uaa->product == USB_PRODUCT_MATRIXORBITAL_MOUA)) + return (UMATCH_VENDOR_PRODUCT); return (UMATCH_NONE); } @@ -227,94 +230,13 @@ uftdi_attach(device_t self) id = usbd_get_interface_descriptor(iface); ucom->sc_iface = iface; - switch( uaa->vendor ){ - case USB_VENDOR_FTDI: - switch( uaa->product ){ - case USB_PRODUCT_FTDI_SERIAL_8U100AX: - sc->sc_type = UFTDI_TYPE_SIO; - sc->sc_hdrlen = 1; - break; - case USB_PRODUCT_FTDI_SEMC_DSS20: - case USB_PRODUCT_FTDI_SERIAL_8U232AM: - case USB_PRODUCT_FTDI_SERIAL_2232C: - case USB_PRODUCT_FTDI_CFA_631: - case USB_PRODUCT_FTDI_CFA_632: - case USB_PRODUCT_FTDI_CFA_633: - case USB_PRODUCT_FTDI_CFA_634: - case USB_PRODUCT_FTDI_CFA_635: - case USB_PRODUCT_FTDI_USBSERIAL: - case USB_PRODUCT_FTDI_MX2_3: - case USB_PRODUCT_FTDI_MX4_5: - case USB_PRODUCT_FTDI_LK202: - case USB_PRODUCT_FTDI_LK204: - case USB_PRODUCT_FTDI_TACTRIX_OPENPORT_13M: - case USB_PRODUCT_FTDI_TACTRIX_OPENPORT_13S: - case USB_PRODUCT_FTDI_TACTRIX_OPENPORT_13U: - case USB_PRODUCT_FTDI_EISCOU: - case USB_PRODUCT_FTDI_UOPTBR: - case USB_PRODUCT_FTDI_EMCU2D: - case USB_PRODUCT_FTDI_PCMSFU: - case USB_PRODUCT_FTDI_EMCU2H: - sc->sc_type = UFTDI_TYPE_8U232AM; - sc->sc_hdrlen = 0; - break; - - default: /* Can't happen */ - goto bad; - } - break; - - case USB_VENDOR_INTREPIDCS: - switch( uaa->product ){ - case USB_PRODUCT_INTREPIDCS_VALUECAN: - case USB_PRODUCT_INTREPIDCS_NEOVI: - sc->sc_type = UFTDI_TYPE_8U232AM; - sc->sc_hdrlen = 0; - break; - - default: /* Can't happen */ - goto bad; - } - break; - - case USB_VENDOR_SIIG2: - switch( uaa->product ){ - case USB_PRODUCT_SIIG2_US2308: - sc->sc_type = UFTDI_TYPE_8U232AM; - sc->sc_hdrlen = 0; - break; - default: /* Can't happen */ - goto bad; - } - break; - - case USB_VENDOR_BBELECTRONICS: - switch( uaa->product ){ - case USB_PRODUCT_BBELECTRONICS_USOTL4: - sc->sc_type = UFTDI_TYPE_8U232AM; - sc->sc_hdrlen = 0; - break; - - default: /* Can't happen */ - goto bad; - } - break; - - case USB_VENDOR_MELCO: - switch( uaa->product ){ - case USB_PRODUCT_MELCO_PCOPRS1: - sc->sc_type = UFTDI_TYPE_8U232AM; - sc->sc_hdrlen = 0; - break; - - default: /* Can't happen */ - goto bad; - } - break; - - default: /* Can't happen */ - goto bad; + if (uaa->vendor == USB_VENDOR_FTDI && uaa->product == USB_PRODUCT_FTDI_SERIAL_8U100AX) { + sc->sc_type = UFTDI_TYPE_SIO; + sc->sc_hdrlen = 1; + } else { + sc->sc_type = UFTDI_TYPE_8U232AM; + sc->sc_hdrlen = 0; } ucom->sc_bulkin_no = ucom->sc_bulkout_no = -1; Modified: stable/7/sys/dev/usb/usbdevs ============================================================================== --- stable/7/sys/dev/usb/usbdevs Fri Apr 9 06:47:36 2010 (r206411) +++ stable/7/sys/dev/usb/usbdevs Fri Apr 9 08:20:43 2010 (r206412) @@ -624,6 +624,7 @@ vendor AMIT 0x18c5 AMIT vendor QCOM 0x18e8 Qcom vendor LINKSYS3 0x1915 Linksys vendor QUALCOMMINC 0x19d2 Qualcomm, Incorporated +vendor MATRIXORBITAL 0x1b3d Matrix Orbital vendor STELERA 0x1a8d Stelera Wireless vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik vendor DLINK 0x2001 D-Link @@ -1175,7 +1176,10 @@ product DMI CFSM_RW 0xa109 CF/SM Reader /* DrayTek products */ product DRAYTEK VIGOR550 0x0550 Vigor550 -/* dresden elektronik products */ +/* Matrix Orbital products */ +product MATRIXORBITAL MOUA 0x0153 Martrix Orbital MOU-Axxxx LCD displays + +/* Dresden Elektronik products */ product DRESDENELEKTRONIK SENSORTERMINALBOARD 0x0001 SensorTerminalBoard product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Handheld Terminal From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 08:39:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E03A1065670; Fri, 9 Apr 2010 08:39:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 023F88FC08; Fri, 9 Apr 2010 08:39:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o398dSEE049426; Fri, 9 Apr 2010 08:39:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o398dSlL049421; Fri, 9 Apr 2010 08:39:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004090839.o398dSlL049421@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 9 Apr 2010 08:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206413 - in stable/8/sys: fs/deadfs kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 08:39:29 -0000 Author: kib Date: Fri Apr 9 08:39:28 2010 New Revision: 206413 URL: http://svn.freebsd.org/changeset/base/206413 Log: MFC r206093: Add function vop_rename_fail(9) that performs needed cleanup for locks and references of the VOP_RENAME(9) arguments. Use vop_rename_fail() in deadfs_rename(). Modified: stable/8/sys/fs/deadfs/dead_vnops.c stable/8/sys/kern/vfs_subr.c stable/8/sys/sys/vnode.h 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/fs/deadfs/dead_vnops.c ============================================================================== --- stable/8/sys/fs/deadfs/dead_vnops.c Fri Apr 9 08:20:43 2010 (r206412) +++ stable/8/sys/fs/deadfs/dead_vnops.c Fri Apr 9 08:39:28 2010 (r206413) @@ -225,13 +225,7 @@ dead_rename(ap) struct componentname *a_tcnp; } */ *ap; { - if (ap->a_tvp) - vput(ap->a_tvp); - if (ap->a_tdvp == ap->a_tvp) - vrele(ap->a_tdvp); - else - vput(ap->a_tdvp); - vrele(ap->a_fdvp); - vrele(ap->a_fvp); + + vop_rename_fail(ap); return (EXDEV); } Modified: stable/8/sys/kern/vfs_subr.c ============================================================================== --- stable/8/sys/kern/vfs_subr.c Fri Apr 9 08:20:43 2010 (r206412) +++ stable/8/sys/kern/vfs_subr.c Fri Apr 9 08:39:28 2010 (r206413) @@ -3749,6 +3749,20 @@ assert_vop_slocked(struct vnode *vp, con #endif /* DEBUG_VFS_LOCKS */ void +vop_rename_fail(struct vop_rename_args *ap) +{ + + if (ap->a_tvp != NULL) + vput(ap->a_tvp); + if (ap->a_tdvp == ap->a_tvp) + vrele(ap->a_tdvp); + else + vput(ap->a_tdvp); + vrele(ap->a_fdvp); + vrele(ap->a_fvp); +} + +void vop_rename_pre(void *ap) { struct vop_rename_args *a = ap; Modified: stable/8/sys/sys/vnode.h ============================================================================== --- stable/8/sys/sys/vnode.h Fri Apr 9 08:20:43 2010 (r206412) +++ stable/8/sys/sys/vnode.h Fri Apr 9 08:39:28 2010 (r206413) @@ -720,6 +720,8 @@ void vop_symlink_post(void *a, int rc); void vop_unlock_post(void *a, int rc); void vop_unlock_pre(void *a); +void vop_rename_fail(struct vop_rename_args *ap); + #define VOP_WRITE_PRE(ap) \ struct vattr va; \ int error, osize, ooffset, noffset; \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 08:45:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 823BF106568D; Fri, 9 Apr 2010 08:45:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56B068FC13; Fri, 9 Apr 2010 08:45:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o398jUXw055139; Fri, 9 Apr 2010 08:45:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o398jU6J055136; Fri, 9 Apr 2010 08:45:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004090845.o398jU6J055136@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 9 Apr 2010 08:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206414 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 08:45:30 -0000 Author: kib Date: Fri Apr 9 08:45:30 2010 New Revision: 206414 URL: http://svn.freebsd.org/changeset/base/206414 Log: MFC r206094: Supply default implementation of VOP_RENAME() that does neccessary unlocks and unreferences for argument vnodes, as expected by kern_renameat(9), and returns EOPNOTSUPP. This fixes locks and reference leaks when rename is attempted on fs that does not implement rename. Modified: stable/8/sys/kern/vfs_default.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/kern/vfs_default.c ============================================================================== --- stable/8/sys/kern/vfs_default.c Fri Apr 9 08:39:28 2010 (r206413) +++ stable/8/sys/kern/vfs_default.c Fri Apr 9 08:45:30 2010 (r206414) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include static int vop_nolookup(struct vop_lookup_args *); +static int vop_norename(struct vop_rename_args *); static int vop_nostrategy(struct vop_strategy_args *); static int get_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, int dirbuflen, off_t *off, @@ -113,6 +114,7 @@ struct vop_vector default_vnodeops = { .vop_poll = vop_nopoll, .vop_putpages = vop_stdputpages, .vop_readlink = VOP_EINVAL, + .vop_rename = vop_norename, .vop_revoke = VOP_PANIC, .vop_strategy = vop_nostrategy, .vop_unlock = vop_stdunlock, @@ -206,6 +208,20 @@ vop_nolookup(ap) } /* + * vop_norename: + * + * Handle unlock and reference counting for arguments of vop_rename + * for filesystems that do not implement rename operation. + */ +static int +vop_norename(struct vop_rename_args *ap) +{ + + vop_rename_fail(ap); + return (EOPNOTSUPP); +} + +/* * vop_nostrategy: * * Strategy routine for VFS devices that have none. From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 10:24:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5219F106564A for ; Fri, 9 Apr 2010 10:24:55 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from web51806.mail.re2.yahoo.com (web51806.mail.re2.yahoo.com [206.190.38.237]) by mx1.freebsd.org (Postfix) with SMTP id E5FE18FC12 for ; Fri, 9 Apr 2010 10:24:54 +0000 (UTC) Received: (qmail 37206 invoked by uid 60001); 9 Apr 2010 10:24:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1270808694; bh=CiipFimfeFUmj0wALJ2/aQGe+Kiw73O0iVYEt23OHVw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=tR5/s9xC+tZXrFyzqlRo4C8gGW043Ld/1jIVMqWqo5WCT06gV4TpMB/iP/Ur9u2j10oPq9G+MmgYM+N9SlVvTEjbhbTnYQ6WGpXU0yFuibSY+d/WvnvB56+Oo9Cf4odSoH/xq4LQuyds/WPU99NlziHMUFqRfYw9qyJg+lcklww= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Uz29fUPnHHQnLphf78NA0V5+wPvclKWfYVldub3GeFv7hWXygEQk8NY+fOHgzvSCK/ER1piV0QDM/GJhslt38qjefgTCDdzG+LjH6s0LjXpjl097zGtfYYmWYJnQtD+UPgeDaUKa8mtdFivEAaT/4EAMRjgbNHshWHitMrbvpmU=; Message-ID: <238707.37181.qm@web51806.mail.re2.yahoo.com> X-YMail-OSG: s9qadjIVM1mxrTDzECUAtN3lD7GOGKHPCFZpxvkYv2M9w4F4SjfJJcSTquWqQ8AtYLX4ZIyd6TCARdROwJcHjV0aDMcCPQPYWD3rhVZzBspd17rCt3OAuXBsvy9JEdgNzvPmDW0pLTk0CbsX7cxVSolO.O3QXtCqTghrXK_7EcNkPGuEaiJ66wh27Ky0PpPaD.8EVwBiFAd3e.mBmGP1uIRQABWXBlQF2qJwoq.YP5dMlgpH8C7orTb6NFcETeLjwaoEaV2SobQBh0ZBVA5PD.ig1VE9qQa2cRYqNSCdcoTzK799q6z9MXL7UE78NlyQtloHxDCKDhjWx6umlLh4gaJIJg.XEJ9BFeKJ Received: from [173.183.132.20] by web51806.mail.re2.yahoo.com via HTTP; Fri, 09 Apr 2010 03:24:54 PDT X-Mailer: YahooMailRC/348.3 YahooMailWebService/0.8.100.260964 References: <20100407165048.8CF9E106566B@hub.freebsd.org> Date: Fri, 9 Apr 2010 03:24:54 -0700 (PDT) From: PseudoCylon To: Rui Paulo , svn-src-head@freebsd.org In-Reply-To: <20100407165048.8CF9E106566B@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206358 - in head/sys: conf dev/bwi dev/bwn dev/iwn dev/ral dev/usb/wlan dev/wpi modules/wlan net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 10:24:55 -0000 >Author: rpaulo=0A>Date: Wed Apr 7 15:29:13 2010=0A>New Revision: 206358= =0A>URL: http://svn.freebsd.org/changeset/base/206358=0A>=0A>Log:=0A> net8= 0211 rate control framework (net80211 ratectl).=0A>=0ASorry for frequent po= st.=0A=0Ain amrr_tx_complete() ieee80211_amrr.c:257-258=0Aif (ok)=0A amn= ->amn_success++;=0A=0Ain ieee80211_ratectl.h:36-37=0A#define=09IEEE80211_RA= TECTL_TX_SUCCESS=090=0A#define=09IEEE80211_RATECTL_TX_FAILURE=091=0A=0AAren= 't these other way around? _________^=0A=0AAK=0A=0A=0A _______________= ___________________________________________________=0AMake your browsing fa= ster, safer, and easier with the new Internet Explorer=AE 8. Optimized for = Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplor= er/ From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 11:29:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3686106566C; Fri, 9 Apr 2010 11:29:16 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2DB98FC13; Fri, 9 Apr 2010 11:29:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39BTGAf010965; Fri, 9 Apr 2010 11:29:16 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39BTGi5010963; Fri, 9 Apr 2010 11:29:16 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004091129.o39BTGi5010963@svn.freebsd.org> From: Rui Paulo Date: Fri, 9 Apr 2010 11:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206415 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 11:29:17 -0000 Author: rpaulo Date: Fri Apr 9 11:29:16 2010 New Revision: 206415 URL: http://svn.freebsd.org/changeset/base/206415 Log: Swap IEEE80211_RATECTL_TX_SUCCESS/IEEE80211_RATECTL_TX_FAILURE. Submitted by: PseudoCylon Furukoshi MFC after: 1 month Modified: head/sys/net80211/ieee80211_ratectl.h Modified: head/sys/net80211/ieee80211_ratectl.h ============================================================================== --- head/sys/net80211/ieee80211_ratectl.h Fri Apr 9 08:45:30 2010 (r206414) +++ head/sys/net80211/ieee80211_ratectl.h Fri Apr 9 11:29:16 2010 (r206415) @@ -33,8 +33,8 @@ enum ieee80211_ratealgs { IEEE80211_RATECTL_MAX }; -#define IEEE80211_RATECTL_TX_SUCCESS 0 -#define IEEE80211_RATECTL_TX_FAILURE 1 +#define IEEE80211_RATECTL_TX_SUCCESS 1 +#define IEEE80211_RATECTL_TX_FAILURE 0 struct ieee80211_ratectl { const char *ir_name; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 11:47:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 862C4106564A; Fri, 9 Apr 2010 11:47:03 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75A4B8FC13; Fri, 9 Apr 2010 11:47:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39Bl3MO028037; Fri, 9 Apr 2010 11:47:03 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39Bl3m7028034; Fri, 9 Apr 2010 11:47:03 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004091147.o39Bl3m7028034@svn.freebsd.org> From: Rui Paulo Date: Fri, 9 Apr 2010 11:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206416 - head/sys/dev/wpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 11:47:03 -0000 Author: rpaulo Date: Fri Apr 9 11:47:03 2010 New Revision: 206416 URL: http://svn.freebsd.org/changeset/base/206416 Log: Fix recent breakage: wpi_newassoc() wasn't supposed to be removed and it needs to call ieee80211_ratectl_node_init(). Submitted by: bschmidt MFC after: 1 month Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Fri Apr 9 11:29:16 2010 (r206415) +++ head/sys/dev/wpi/if_wpi.c Fri Apr 9 11:47:03 2010 (r206416) @@ -174,6 +174,7 @@ static int wpi_alloc_tx_ring(struct wpi_ int, int); static void wpi_reset_tx_ring(struct wpi_softc *, struct wpi_tx_ring *); static void wpi_free_tx_ring(struct wpi_softc *, struct wpi_tx_ring *); +static void wpi_newassoc(struct ieee80211_node *, int); static int wpi_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void wpi_mem_lock(struct wpi_softc *); static void wpi_mem_unlock(struct wpi_softc *); @@ -667,6 +668,7 @@ wpi_attach(device_t dev) ieee80211_ifattach(ic, macaddr); /* override default methods */ ic->ic_raw_xmit = wpi_raw_xmit; + ic->ic_newassoc = wpi_newassoc; ic->ic_wme.wme_update = wpi_wme_update; ic->ic_scan_start = wpi_scan_start; ic->ic_scan_end = wpi_scan_end; @@ -3195,6 +3197,14 @@ wpi_stop(struct wpi_softc *sc) } static void +wpi_newassoc(struct ieee80211_node *ni, int isnew) +{ + + /* XXX move */ + ieee80211_ratectl_node_init(ni); +} + +static void wpi_calib_timeout(void *arg) { struct wpi_softc *sc = arg; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 11:56:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FDB3106564A; Fri, 9 Apr 2010 11:56:38 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F0688FC17; Fri, 9 Apr 2010 11:56:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39BucXg036935; Fri, 9 Apr 2010 11:56:38 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39BucKI036931; Fri, 9 Apr 2010 11:56:38 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004091156.o39BucKI036931@svn.freebsd.org> From: Rui Paulo Date: Fri, 9 Apr 2010 11:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206417 - head/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 11:56:38 -0000 Author: rpaulo Date: Fri Apr 9 11:56:38 2010 New Revision: 206417 URL: http://svn.freebsd.org/changeset/base/206417 Log: Remove previously added if 0's. MFC after: 1 month Modified: head/sys/dev/usb/wlan/if_run.c Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Fri Apr 9 11:47:03 2010 (r206416) +++ head/sys/dev/usb/wlan/if_run.c Fri Apr 9 11:56:38 2010 (r206417) @@ -1963,9 +1963,6 @@ run_ratectl_start(struct run_softc *sc, struct ieee80211vap *vap = ni->ni_vap; struct run_vap *rvp = RUN_VAP(vap); uint32_t sta[3]; -#if 0 - uint8_t wcid; -#endif RUN_LOCK_ASSERT(sc, MA_OWNED); @@ -1973,10 +1970,6 @@ run_ratectl_start(struct run_softc *sc, run_read_region_1(sc, RT2860_TX_STA_CNT0, (uint8_t *)sta, sizeof sta); -#if 0 - wcid = RUN_AID2WCID(ni == NULL ? 0 : ni->ni_associd); - ieee80211_amrr_node_init(&rvp->amrr, &rvp->amn[wcid], ni); -#endif ieee80211_ratectl_node_init(ni); /* start at lowest available bit-rate, AMRR will raise */ @@ -2094,11 +2087,6 @@ run_iter_func(void *arg, struct ieee8021 le32toh(sta[1]) >> 16, le32toh(sta[1]) & 0xffff, le32toh(sta[0]) & 0xffff); -#if 0 - wcid = RUN_AID2WCID(ni == NULL ? 0 : ni->ni_associd); - amn = &rvp->amn[wcid]; -#endif - /* count failed TX as errors */ ifp->if_oerrors += le32toh(sta[0]) & 0xffff; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 12:05:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A2B1065670; Fri, 9 Apr 2010 12:05:25 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15D218FC08; Fri, 9 Apr 2010 12:05:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39C5OMd045359; Fri, 9 Apr 2010 12:05:24 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39C5OD5045357; Fri, 9 Apr 2010 12:05:24 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004091205.o39C5OD5045357@svn.freebsd.org> From: Rui Paulo Date: Fri, 9 Apr 2010 12:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206418 - head/sys/modules/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 12:05:25 -0000 Author: rpaulo Date: Fri Apr 9 12:05:24 2010 New Revision: 206418 URL: http://svn.freebsd.org/changeset/base/206418 Log: Add ieee80211_{amrr,rssadapt}.c. MFC after: 1 month Modified: head/sys/modules/wlan/Makefile Modified: head/sys/modules/wlan/Makefile ============================================================================== --- head/sys/modules/wlan/Makefile Fri Apr 9 11:56:38 2010 (r206417) +++ head/sys/modules/wlan/Makefile Fri Apr 9 12:05:24 2010 (r206418) @@ -3,13 +3,13 @@ .PATH: ${.CURDIR}/../../net80211 KMOD= wlan -SRCS= ieee80211.c ieee80211_action.c ieee80211_ageq.c \ +SRCS= ieee80211.c ieee80211_action.c ieee80211_ageq.c ieee80211_amrr.c \ ieee80211_crypto.c ieee80211_crypto_none.c ieee80211_dfs.c \ ieee80211_freebsd.c ieee80211_input.c ieee80211_ioctl.c \ ieee80211_mesh.c ieee80211_node.c ieee80211_output.c ieee80211_phy.c \ ieee80211_power.c ieee80211_proto.c ieee80211_scan.c \ ieee80211_scan_sta.c ieee80211_radiotap.c ieee80211_ratectl.c \ - ieee80211_regdomain.c \ + ieee80211_regdomain.c ieee80211_rssadapt.c \ ieee80211_ht.c ieee80211_hwmp.c ieee80211_adhoc.c ieee80211_hostap.c \ ieee80211_monitor.c ieee80211_sta.c ieee80211_wds.c ieee80211_ddb.c SRCS+= bus_if.h device_if.h opt_inet.h opt_inet6.h opt_ipx.h opt_wlan.h \ From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 12:06:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E0271065674; Fri, 9 Apr 2010 12:06:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 719718FC1A; Fri, 9 Apr 2010 12:06:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39C6JaR046374; Fri, 9 Apr 2010 12:06:19 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39C6JBo046371; Fri, 9 Apr 2010 12:06:19 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004091206.o39C6JBo046371@svn.freebsd.org> From: Rui Paulo Date: Fri, 9 Apr 2010 12:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206419 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 12:06:19 -0000 Author: rpaulo Date: Fri Apr 9 12:06:19 2010 New Revision: 206419 URL: http://svn.freebsd.org/changeset/base/206419 Log: Use M_NOWAIT instead of M_WAITOK to avoid race conditions. MFC after: 1 month Modified: head/sys/net80211/ieee80211_amrr.c head/sys/net80211/ieee80211_rssadapt.c Modified: head/sys/net80211/ieee80211_amrr.c ============================================================================== --- head/sys/net80211/ieee80211_amrr.c Fri Apr 9 12:05:24 2010 (r206418) +++ head/sys/net80211/ieee80211_amrr.c Fri Apr 9 12:06:19 2010 (r206419) @@ -110,9 +110,12 @@ amrr_init(struct ieee80211vap *vap) KASSERT(vap->iv_rs == NULL, ("%s called multiple times", __func__)); - vap->iv_rs = malloc(sizeof(struct ieee80211_amrr), M_80211_RATECTL, - M_WAITOK|M_ZERO); - amrr = vap->iv_rs; + amrr = vap->iv_rs = malloc(sizeof(struct ieee80211_amrr), + M_80211_RATECTL, M_NOWAIT|M_ZERO); + if (amrr == NULL) { + if_printf(vap->iv_ifp, "couldn't alloc ratectl structure\n"); + return; + } amrr->amrr_min_success_threshold = IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD; amrr->amrr_max_success_threshold = IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD; amrr_setinterval(vap, 500 /* ms */); @@ -136,9 +139,13 @@ amrr_node_init(struct ieee80211_node *ni KASSERT(ni->ni_rctls == NULL, ("%s: ni_rctls already initialized", __func__)); - ni->ni_rctls = malloc(sizeof(struct ieee80211_amrr_node), - M_80211_RATECTL, M_WAITOK|M_ZERO); - amn = ni->ni_rctls; + ni->ni_rctls = amn = malloc(sizeof(struct ieee80211_amrr_node), + M_80211_RATECTL, M_NOWAIT|M_ZERO); + if (amn == NULL) { + if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " + "structure\n"); + return; + } amn->amn_amrr = amrr; amn->amn_success = 0; amn->amn_recovery = 0; Modified: head/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- head/sys/net80211/ieee80211_rssadapt.c Fri Apr 9 12:05:24 2010 (r206418) +++ head/sys/net80211/ieee80211_rssadapt.c Fri Apr 9 12:06:19 2010 (r206419) @@ -128,9 +128,12 @@ rssadapt_init(struct ieee80211vap *vap) KASSERT(vap->iv_rs == NULL, ("%s: iv_rs already initialized", __func__)); - rs = malloc(sizeof(struct ieee80211_rssadapt), M_80211_RATECTL, - M_WAITOK|M_ZERO); - vap->iv_rs = rs; + vap->iv_rs = rs = malloc(sizeof(struct ieee80211_rssadapt), + M_80211_RATECTL, M_NOWAIT|M_ZERO); + if (rs == NULL) { + if_printf(vap->iv_ifp, "couldn't alloc ratectl structure\n"); + return; + } rs->vap = vap; rssadapt_setinterval(vap, 500 /* msecs */); rssadapt_sysctlattach(vap, vap->iv_sysctl, vap->iv_oid); @@ -162,12 +165,17 @@ static void rssadapt_node_init(struct ieee80211_node *ni) { struct ieee80211_rssadapt_node *ra; - struct ieee80211_rssadapt *rsa = ni->ni_vap->iv_rs; + struct ieee80211vap *vap = ni->ni_vap; + struct ieee80211_rssadapt *rsa = vap->iv_rs; const struct ieee80211_rateset *rs = &ni->ni_rates; - ra = malloc(sizeof(struct ieee80211_rssadapt_node), M_80211_RATECTL, - M_WAITOK|M_ZERO); - ni->ni_rctls = ra; + ni->ni_rctls = ra = malloc(sizeof(struct ieee80211_rssadapt_node), + M_80211_RATECTL, M_NOWAIT|M_ZERO); + if (ra == NULL) { + if_printf(vap->iv_ifp, "couldn't alloc per-node ratectl " + "structure\n"); + return; + } ra->ra_rs = rsa; ra->ra_rates = *rs; rssadapt_updatestats(ra); From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 12:06:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 746201065672; Fri, 9 Apr 2010 12:06:47 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mx1.freebsd.org (Postfix) with ESMTP id A247F8FC0C; Fri, 9 Apr 2010 12:06:46 +0000 (UTC) Received: by fxm25 with SMTP id 25so688589fxm.3 for ; Fri, 09 Apr 2010 05:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=YV986cjxjarbmKKHzxb3/fQsZ1yseFAPhsVbF1rZfAE=; b=imrbOM4V5XOECXKedSXVL78S7QbO1WCJFFf+9g+bGj61V9wk+Wd3fvSETGi9n6xs8l vo8k0r0HkSJI54iETu00q+QbjL3e3QO4cRGA5oBVh61SI7v2qhapzsKcSafzrFWoAHJy e73PbI1ccAM3UqeuZQI+1DjsWhOg2w0mvCAZY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=TkBlhvzOzejuBGpzzZkaRNNVOn8l5+Mz+JYMa4KKXjMa5qZ5+/Hua9qnAgtpgwpDX8 owEQtdtES2hHk8mp6p8GmzhAtB/r8YYb7U08MVyF4HH4rVT57L6ctVD1oGM962fy56PE t5f8bhD0a6Nc8IvCxu9waLZ8QvtSuISo2KSds= Received: by 10.223.5.207 with SMTP id 15mr1600700faw.6.1270814805682; Fri, 09 Apr 2010 05:06:45 -0700 (PDT) Received: from [10.0.10.2] (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id 16sm706334fxm.0.2010.04.09.05.06.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Apr 2010 05:06:45 -0700 (PDT) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <488108.55494.qm@web51803.mail.re2.yahoo.com> Date: Fri, 9 Apr 2010 13:06:43 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <81BE57A1-3E1E-4BB9-9FCE-080B34B4452C@FreeBSD.org> References: <20100407165048.8CF9E106566B@hub.freebsd.org> <488108.55494.qm@web51803.mail.re2.yahoo.com> To: PseudoCylon X-Mailer: Apple Mail (2.1078) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206358 (patch for if_run) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 12:06:47 -0000 On 9 Apr 2010, at 03:15, PseudoCylon wrote: >>> Author: rpaulo >>> Date: Wed Apr 7 15:29:13 2010 >>> New Revision: 206358 >>> URL: http://svn.freebsd.org/changeset/base/206358 >>>=20 >>> Log: >>> net80211 rate control framework (net80211 ratectl). >>>=20 >>> This framework allows drivers to abstract the rate control algorithm = and >>> just feed the framework with the usable parameters. The rate control >>> framework will now deal with passing the parameters to the selected >>> algorithm. Right now we have AMRR (the default) and RSSADAPT but = there's >>> no way to select one with ifconfig, yet. >>> The objective is to have more rate control algorithms in the = net80211 >>> stack so all drivers[0] can use it. Ideally, we'll have the = well-known >>> sample rate control algorithm in the net80211 at some point so all >>> drivers can use it (not just ath). >>>=20 >>=20 >> Hello, >>=20 >> I've just tried the commit and run(4) works fine out of the box. It = properly updates the rate. >>=20 >> Thank you for updating the driver. >>=20 >> AK >>=20 >=20 > Sorry, correction. >=20 > I've got complain from witness >=20 > uma_zalloc_arg: zone "64" with the following non-sleepable locks held: > exclusive sleep mutex run0 (network driver) r =3D 0 = (0xffffff80008de128) locked @ /usr/src/sys/dev/usb/usb_request.c:540 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a > _witness_debugger() at _witness_debugger+0x2e > witness_warn() at witness_warn+0x2c2 > uma_zalloc_arg() at uma_zalloc_arg+0x335 > malloc() at malloc+0x9a > amrr_node_init() at amrr_node_init+0x38 > run_newstate() at run_newstate+0x363 > ieee80211_newstate_cb() at ieee80211_newstate_cb+0xac > taskqueue_run() at taskqueue_run+0x91 > taskqueue_thread_loop() at taskqueue_thread_loop+0x3f > fork_exit() at fork_exit+0x12a > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip =3D 0, rsp =3D 0xffffff803e5d0d30, rbp =3D 0 --- >=20 > Just unlocking the mutex before calling ieee80211_ratectl_node_init() = fix this. As long as ieee80211_ratectl_node_init() won't be called with = the same ni at the same time, unlocking should be safe. >=20 > Here is patch >=20 > *** orig_if_run.c 2010-04-08 03:29:31.000000000 -0600 > --- fix_if_run.c 2010-04-08 19:52:45.000000000 -0600 > *************** > *** 1965,1969 **** > uint32_t sta[3]; > - #if 0 > - uint8_t wcid; > - #endif >=20 > --- 1965,1966 ---- > *************** > *** 1975,1981 **** >=20 > ! #if 0 > ! wcid =3D RUN_AID2WCID(ni =3D=3D NULL ? 0 : ni->ni_associd); > ! ieee80211_amrr_node_init(&rvp->amrr, &rvp->amn[wcid], ni); > ! #endif > ieee80211_ratectl_node_init(ni); >=20 > --- 1972,1976 ---- >=20 > ! RUN_UNLOCK(sc); > ieee80211_ratectl_node_init(ni); > + RUN_LOCK(sc); >=20 > *************** > *** 2096,2102 **** >=20 > - #if 0 > - wcid =3D RUN_AID2WCID(ni =3D=3D NULL ? 0 : ni->ni_associd); > - amn =3D &rvp->amn[wcid]; > - #endif > -=20 > /* count failed TX as errors */ > --- 2091,2092 ---- >=20 >=20 >=20 > P.S. > #if 0s (amn[]) are no longer needed because now each amrr node is = attached to individual ieee80211_node. Can you try updating and see if everything works for you? Thanks. Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 13:08:12 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57EE9106564A; Fri, 9 Apr 2010 13:08:12 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 088058FC0A; Fri, 9 Apr 2010 13:08:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o39D2uBC062522; Fri, 9 Apr 2010 07:02:56 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 09 Apr 2010 07:03:00 -0600 (MDT) Message-Id: <20100409.070300.771721883854029283.imp@bsdimp.com> To: netchild@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20100409092721.19743kgds231hckg@webmail.leidinger.net> References: <20100407100015.117169nw2iu6xp4w@webmail.leidinger.net> <20100408.151213.718265677801106795.imp@bsdimp.com> <20100409092721.19743kgds231hckg@webmail.leidinger.net> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r206082 - in head: . share/man/man7 share/mk sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 13:08:12 -0000 In message: <20100409092721.19743kgds231hckg@webmail.leidinger.net> Alexander Leidinger writes: : Quoting "M. Warner Losh" (from Thu, 08 Apr 2010 : 15:12:13 -0600 (MDT)): : : > In message: <20100407100015.117169nw2iu6xp4w@webmail.leidinger.net> : > Alexander Leidinger writes: : > : Quoting "M. Warner Losh" (from Tue, 06 Apr 2010 : > : 10:54:17 -0600 (MDT)): : > : : > : > In message: : > <20100405181450.13494itjj2ehj5og@webmail.leidinger.net> : > : > Alexander Leidinger writes: : > : > : Warner, do you mind if I back-out r206082 and change the place : > where : > : > : NORMAL_CTFCONVERT is used instead (fist I have to search for it : > : > : again... not today)? It would make it consistent with all other : > : > places : > : > : (SYSTEM_CTFCONVERT and the plain test and use of CTFxxx). : > : > : > : > Go ahead. I just did the fast and dirty fix. I though it was : > : > consistent with how other things were done, but if not, feel free : > to : > : > correct it. Also, see bde's commentary :) : > : : > : I can not find it, can you please forward it to me? : > : > Will do. : > : > : Here is what I have ATM (copy&paste, so tabs are probably mangled): : > : ---snip--- : > : Index: usr.sbin/config/mkmakefile.c : > : =================================================================== : > : --- usr.sbin/config/mkmakefile.c (revision 206031) : > : +++ usr.sbin/config/mkmakefile.c (working copy) : > : @@ -741,7 +741,7 @@ : > : printf("config: don't know rules for %s\n", : > : np); break; : > : } : > : - snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n.if : > : - defined(NORMAL_CTFCONVERT) && : > : - !empty(NORMAL_CTFCONVERT)\n\t${NORMAL_CTFCONVERT}\n.endif", : > : - ftype, : > : + snprintf(cmd, sizeof(cmd), "${%s_%c%s}\n\t@${NORMAL_CTFCONVERT}", : > : ftype, : > : toupper(och), : > : ftp->f_flags & NOWERROR ? "_NOWERROR" : ""); : > : compilewith = cmd; : > : > Uggg, this should have never been put into mkmakefile.c in the first : > place. I'm concerned that a change like this will have bad effects : > for people that have cross-threaded config and kernels. :( : : You need to have a look at the complete code, there is more than only : the use of NORMAL_CTFCONVERT. Regarding the cross-case, I think it can : be done by overriding NORMAL_CTFCONVERT (if needed). I have looked at the complete code. config has no business knowing about these things. It is a layering violation. It must be removed from config. However, since you didn't put it there, you should do the next best thing and fix the bug in the current implementation. : > However, go ahead and fix it. I worry about people with : > cross-threaded kernels, but that won't be a huge deal, I don't think. : > Please monitor the lists to make sure... : : Do I understand this right, that you think I shall do it before I get : the forwarded mail? I think you should commit this fix. I'll forward you bde's mail and you can work on another fix. In the mean time (after you commit the patch we're talking about right now), please monitor hackers@ and current@ for any problems. Warner From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 13:58:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3CCC106566B; Fri, 9 Apr 2010 13:58:54 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 925678FC12; Fri, 9 Apr 2010 13:58:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39DwsFL056108; Fri, 9 Apr 2010 13:58:54 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39Dwshi056106; Fri, 9 Apr 2010 13:58:54 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004091358.o39Dwshi056106@svn.freebsd.org> From: Rui Paulo Date: Fri, 9 Apr 2010 13:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206420 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 13:58:54 -0000 Author: rpaulo Date: Fri Apr 9 13:58:54 2010 New Revision: 206420 URL: http://svn.freebsd.org/changeset/base/206420 Log: Setup the correct RX/TX chainmask when we play with the antenna settings. MFC after: 1 week Sponsored by: iXsystems, inc Modified: head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Fri Apr 9 12:06:19 2010 (r206419) +++ head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c Fri Apr 9 13:58:54 2010 (r206420) @@ -378,8 +378,8 @@ ar9285SetAntennaSwitch(struct ath_hal *a case HAL_ANT_VARIABLE: /* Restore original chainmask settings */ /* XXX */ - ahp->ah_tx_chainmask = AR5416_DEFAULT_TXCHAINMASK; - ahp->ah_rx_chainmask = AR5416_DEFAULT_RXCHAINMASK; + ahp->ah_tx_chainmask = AR9285_DEFAULT_TXCHAINMASK; + ahp->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK; break; } return AH_TRUE; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 14:22:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02B261065689; Fri, 9 Apr 2010 14:22:10 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E559E8FC1D; Fri, 9 Apr 2010 14:22:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39EM9jx078069; Fri, 9 Apr 2010 14:22:09 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39EM9rW078067; Fri, 9 Apr 2010 14:22:09 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201004091422.o39EM9rW078067@svn.freebsd.org> From: Attilio Rao Date: Fri, 9 Apr 2010 14:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206421 - in head/sys: pc98/cbus x86/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 14:22:10 -0000 Author: attilio Date: Fri Apr 9 14:22:09 2010 New Revision: 206421 URL: http://svn.freebsd.org/changeset/base/206421 Log: Default the machdep.lapic_allclocks to be enabled in order to cope with broken atrtc. Now if you want more correct stats on profhz and stathz it may be disabled by setting to 0. Reported by: A. Akephalos , Jakub Lach MFC: 1 week Modified: head/sys/pc98/cbus/clock.c head/sys/x86/isa/clock.c Modified: head/sys/pc98/cbus/clock.c ============================================================================== --- head/sys/pc98/cbus/clock.c Fri Apr 9 13:58:54 2010 (r206420) +++ head/sys/pc98/cbus/clock.c Fri Apr 9 14:22:09 2010 (r206421) @@ -93,7 +93,7 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq int i8254_max_count; static int i8254_real_max_count; -static int lapic_allclocks; +static int lapic_allclocks = 1; TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); static struct mtx clock_lock; Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Fri Apr 9 13:58:54 2010 (r206420) +++ head/sys/x86/isa/clock.c Fri Apr 9 14:22:09 2010 (r206421) @@ -97,7 +97,7 @@ TUNABLE_INT("hw.i8254.freq", &i8254_freq int i8254_max_count; static int i8254_real_max_count; -static int lapic_allclocks; +static int lapic_allclocks = 1; TUNABLE_INT("machdep.lapic_allclocks", &lapic_allclocks); struct mtx clock_lock; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 14:24:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FCA61065672; Fri, 9 Apr 2010 14:24:01 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EAEE8FC0A; Fri, 9 Apr 2010 14:24:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39EO1eH079842; Fri, 9 Apr 2010 14:24:01 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39EO1Ow079840; Fri, 9 Apr 2010 14:24:01 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201004091424.o39EO1Ow079840@svn.freebsd.org> From: Ken Smith Date: Fri, 9 Apr 2010 14:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206422 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 14:24:01 -0000 Author: kensmith Date: Fri Apr 9 14:24:00 2010 New Revision: 206422 URL: http://svn.freebsd.org/changeset/base/206422 Log: Pass the HTTP_PROXY and FTP_PROXY environment variables through in addition to FTP_PASSIVE_MODE so release building works for a machine that needs to use a proxy. PR: misc/137688 Submitted by: Michael Leun MFC after: 2 weeks Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Fri Apr 9 14:22:09 2010 (r206421) +++ head/release/Makefile Fri Apr 9 14:24:00 2010 (r206422) @@ -575,7 +575,7 @@ release rerelease: echo " for i in ${MAKEINDEXPORTS}" >> ${_MK} echo " do" >> ${_MK} echo " cd /usr/ports/\$${i}" >> ${_MK} - echo " env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} + echo " env -i HTTP_PROXY=$${HTTP_PROXY} FTP_PROXY=$${FTP_PROXY} FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} echo " make all install clean BATCH=yes FORCE_PKG_REGISTER=yes" >> ${_MK} echo " done" >> ${_MK} echo " cd /usr/ports" >> ${_MK} From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 14:27:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F1A71065673; Fri, 9 Apr 2010 14:27:18 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AE388FC1C; Fri, 9 Apr 2010 14:27:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39ERITa082910; Fri, 9 Apr 2010 14:27:18 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39ERIxP082906; Fri, 9 Apr 2010 14:27:18 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201004091427.o39ERIxP082906@svn.freebsd.org> From: Ken Smith Date: Fri, 9 Apr 2010 14:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206423 - head/release X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 14:27:18 -0000 Author: kensmith Date: Fri Apr 9 14:27:17 2010 New Revision: 206423 URL: http://svn.freebsd.org/changeset/base/206423 Log: Shift the version of perl used by the release build process over to perl-5.10. This aligns the release build process with the current default version of perl in the ports tree. I'll MFC this to all active branches. MFC after: 3 days Modified: head/release/Makefile head/release/Makefile.inc.docports Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Fri Apr 9 14:24:00 2010 (r206422) +++ head/release/Makefile Fri Apr 9 14:27:17 2010 (r206423) @@ -171,7 +171,7 @@ NOPORTSATALL= YES # # Doing 'make index' in /usr/ports requires Perl. -MAKEINDEXPORTS= lang/perl5.8 +MAKEINDEXPORTS= lang/perl5.10 DOCPORTS= textproc/docproj # Set this to wherever the distfiles required by release procedures. .if defined(DOCDISTFILES) Modified: head/release/Makefile.inc.docports ============================================================================== --- head/release/Makefile.inc.docports Fri Apr 9 14:24:00 2010 (r206422) +++ head/release/Makefile.inc.docports Fri Apr 9 14:27:17 2010 (r206423) @@ -81,5 +81,5 @@ MINIMALDOCPORTS+= \ ports/textproc/p5-PodParser .else MINIMALDOCPORTS+= \ - ports/lang/perl5.8 + ports/lang/perl5.10 .endif From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 15:21:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6C34106564A; Fri, 9 Apr 2010 15:21:11 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAC768FC14; Fri, 9 Apr 2010 15:21:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39FLBIG035861; Fri, 9 Apr 2010 15:21:11 GMT (envelope-from rdivacky@svn.freebsd.org) Received: (from rdivacky@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39FLBqx035856; Fri, 9 Apr 2010 15:21:11 GMT (envelope-from rdivacky@svn.freebsd.org) Message-Id: <201004091521.o39FLBqx035856@svn.freebsd.org> From: Roman Divacky Date: Fri, 9 Apr 2010 15:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206424 - head/usr.bin/xlint/lint1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 15:21:11 -0000 Author: rdivacky Date: Fri Apr 9 15:21:11 2010 New Revision: 206424 URL: http://svn.freebsd.org/changeset/base/206424 Log: Rename the ALIGN macro to LINT_ALIGN so it does not clash with machine/param.h Bump the alignment to 16bytes because lint1 memory allocator is used for objects that require 16bytes alignment on amd64 (ie. val_t). This makes lint1 work when compiled with compiler(s) that use SSE for memcpy on amd64. (e.g. clang). Approved by: ed (mentor) Modified: head/usr.bin/xlint/lint1/decl.c head/usr.bin/xlint/lint1/lint1.h head/usr.bin/xlint/lint1/mem1.c Modified: head/usr.bin/xlint/lint1/decl.c ============================================================================== --- head/usr.bin/xlint/lint1/decl.c Fri Apr 9 14:27:17 2010 (r206423) +++ head/usr.bin/xlint/lint1/decl.c Fri Apr 9 15:21:11 2010 (r206424) @@ -825,15 +825,15 @@ getbound(type_t *tp) } else if (t == FUNC) { /* compiler takes alignment of function */ error(14); - a = ALIGN(1) * CHAR_BIT; + a = LINT_ALIGN(1) * CHAR_BIT; } else { if ((a = size(t)) == 0) { a = CHAR_BIT; - } else if (a > ALIGN(1) * CHAR_BIT) { - a = ALIGN(1) * CHAR_BIT; + } else if (a > LINT_ALIGN(1) * CHAR_BIT) { + a = LINT_ALIGN(1) * CHAR_BIT; } } - if (a < CHAR_BIT || a > ALIGN(1) * CHAR_BIT) + if (a < CHAR_BIT || a > LINT_ALIGN(1) * CHAR_BIT) lerror("getbound() 1"); return (a); } Modified: head/usr.bin/xlint/lint1/lint1.h ============================================================================== --- head/usr.bin/xlint/lint1/lint1.h Fri Apr 9 14:27:17 2010 (r206423) +++ head/usr.bin/xlint/lint1/lint1.h Fri Apr 9 15:21:11 2010 (r206424) @@ -38,8 +38,8 @@ __FBSDID("$FreeBSD$"); #include "op.h" /* XXX - works for most systems, but the whole ALIGN thing needs to go away */ -#ifndef ALIGN -#define ALIGN(x) (((x) + 7) & ~7) +#ifndef LINT_ALIGN +#define LINT_ALIGN(x) (((x) + 15) & ~15) #endif /* Modified: head/usr.bin/xlint/lint1/mem1.c ============================================================================== --- head/usr.bin/xlint/lint1/mem1.c Fri Apr 9 14:27:17 2010 (r206423) +++ head/usr.bin/xlint/lint1/mem1.c Fri Apr 9 15:21:11 2010 (r206424) @@ -203,7 +203,7 @@ xgetblk(mbl_t **mbp, size_t s) void *p; size_t t = 0; - s = ALIGN(s); + s = LINT_ALIGN(s); if ((mb = *mbp) == NULL || mb->nfree < s) { if ((mb = frmblks) == NULL) { if (s > mblklen) { From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 16:06:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F91A1065670; Fri, 9 Apr 2010 16:06:54 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EC9B8FC16; Fri, 9 Apr 2010 16:06:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39G6s5l079437; Fri, 9 Apr 2010 16:06:54 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39G6s00079427; Fri, 9 Apr 2010 16:06:54 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004091606.o39G6s00079427@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 9 Apr 2010 16:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206425 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 16:06:54 -0000 Author: luigi Date: Fri Apr 9 16:06:53 2010 New Revision: 206425 URL: http://svn.freebsd.org/changeset/base/206425 Log: no need to pass an argument to dn_compat_calc_size() MFC after: 3 days Modified: head/sys/netinet/ipfw/ip_dn_glue.c head/sys/netinet/ipfw/ip_dn_private.h head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dn_glue.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_glue.c Fri Apr 9 15:21:11 2010 (r206424) +++ head/sys/netinet/ipfw/ip_dn_glue.c Fri Apr 9 16:06:53 2010 (r206425) @@ -553,7 +553,7 @@ dn_compat_configure(void *v) } int -dn_compat_calc_size(struct dn_parms dn_cfg) +dn_compat_calc_size(void) { int need = 0; /* XXX use FreeBSD 8 struct size */ Modified: head/sys/netinet/ipfw/ip_dn_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_dn_private.h Fri Apr 9 15:21:11 2010 (r206424) +++ head/sys/netinet/ipfw/ip_dn_private.h Fri Apr 9 16:06:53 2010 (r206425) @@ -392,7 +392,7 @@ int dn_c_copy_fs(struct dn_fsk *f, struc int dn_compat_copy_queue(struct copy_args *a, void *_o); int dn_compat_copy_pipe(struct copy_args *a, void *_o); int copy_data_helper_compat(void *_o, void *_arg); -int dn_compat_calc_size(struct dn_parms dn_cfg); +int dn_compat_calc_size(void); int do_config(void *p, int l); /* function to drain idle object */ Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Fri Apr 9 15:21:11 2010 (r206424) +++ head/sys/netinet/ipfw/ip_dummynet.c Fri Apr 9 16:06:53 2010 (r206425) @@ -1769,7 +1769,7 @@ compute_space(struct dn_id *cmd, struct x = DN_C_FS | DN_C_QUEUE; break; case DN_GET_COMPAT: /* compatibility mode */ - need = dn_compat_calc_size(dn_cfg); + need = dn_compat_calc_size(); break; } a->flags = x; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 16:19:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4279F106566C; Fri, 9 Apr 2010 16:19:32 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31BD48FC12; Fri, 9 Apr 2010 16:19:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39GJWZr091624; Fri, 9 Apr 2010 16:19:32 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39GJWGE091612; Fri, 9 Apr 2010 16:19:32 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004091619.o39GJWGE091612@svn.freebsd.org> From: Rui Paulo Date: Fri, 9 Apr 2010 16:19:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206426 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 16:19:32 -0000 Author: rpaulo Date: Fri Apr 9 16:19:30 2010 New Revision: 206426 URL: http://svn.freebsd.org/changeset/base/206426 Log: Building wlan_amrr is now mandatory. This is an interim fix. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Apr 9 16:06:53 2010 (r206425) +++ head/sys/conf/files Fri Apr 9 16:19:30 2010 (r206426) @@ -2358,7 +2358,7 @@ net80211/ieee80211_action.c optional wla net80211/ieee80211_ageq.c optional wlan net80211/ieee80211_adhoc.c optional wlan net80211/ieee80211_ageq.c optional wlan -net80211/ieee80211_amrr.c optional wlan wlan_amrr +net80211/ieee80211_amrr.c optional wlan | wlan_amrr net80211/ieee80211_crypto.c optional wlan net80211/ieee80211_crypto_ccmp.c optional wlan wlan_ccmp net80211/ieee80211_crypto_none.c optional wlan From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 17:32:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F903106564A; Fri, 9 Apr 2010 17:32:38 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E67C8FC19; Fri, 9 Apr 2010 17:32:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39HWcDE062863; Fri, 9 Apr 2010 17:32:38 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39HWcvZ062859; Fri, 9 Apr 2010 17:32:38 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004091732.o39HWcvZ062859@svn.freebsd.org> From: Rui Paulo Date: Fri, 9 Apr 2010 17:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206427 - in head: etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 17:32:38 -0000 Author: rpaulo Date: Fri Apr 9 17:32:38 2010 New Revision: 206427 URL: http://svn.freebsd.org/changeset/base/206427 Log: Add rc.d/ubthidhci. This small script calls usbconfig(1) to change a USB Bluetooth controller from HID mode to HCI mode. MFC after: 1 week Added: head/etc/rc.d/ubthidhci (contents, props changed) Modified: head/etc/defaults/rc.conf head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Fri Apr 9 16:19:30 2010 (r206426) +++ head/etc/defaults/rc.conf Fri Apr 9 17:32:38 2010 (r206427) @@ -436,6 +436,11 @@ rfcomm_pppd_server_two_channel="3" # Ove #rfcomm_pppd_server_two_register_sp="NO" # Override SP and DUN register #rfcomm_pppd_server_two_register_dun="NO" # for 'two' +#ubthidhci_enable="YES" # Switch an USB BT controller present on +#ubthidhci_busnum="3" # bus 3 and addr 2 from HID mode to HCI mode. +#ubthidhci_addr="2" # Check usbconfig list to find the correct + # numbers for your system. + ### Miscellaneous network options: ### icmp_bmcastecho="NO" # respond to broadcast ping packets Added: head/etc/rc.d/ubthidhci ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/ubthidhci Fri Apr 9 17:32:38 2010 (r206427) @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ubthidhci +# REQUIRE: DAEMON +# BEFORE: bluetooth +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="ubthidhci" +command="/usr/sbin/usbconfig" +rcvar=`set_rcvar` +start_precmd="ubthidhci_prestart" + +ubthidhci_prestart() +{ + + if [ -z ${ubthidhci_busnum} ]; then + warn ubthidhci_busnum is not set + return 1 + fi + if [ -z ${ubthidhci_addr} ]; then + warn ubthidhci_addr is not set + return 1 + fi +} + +load_rc_config $name +# +# We discard the output because: +# 1) we don't want it to show up during boot; and +# 2) the request usually returns an error, but that doesn't mean it failed +# +# NB: 0x40 is UT_VENDOR +command_args="-u ${ubthidhci_busnum} -a ${ubthidhci_addr} do_request 0x40 0 0 0 0 > /dev/null 2>&1" + +run_rc_command "$1" Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Fri Apr 9 16:19:30 2010 (r206426) +++ head/share/man/man5/rc.conf.5 Fri Apr 9 17:32:38 2010 (r206427) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2010 +.Dd April 09, 2010 .Dt RC.CONF 5 .Os .Sh NAME @@ -4268,6 +4268,26 @@ if it should register Dial-Up Networking RFCOMM channel. Default .Dq Li NO . +.It Va ubthidhci_enable +.Pq Vt bool +If set to +.Dq Li YES , +change the USB Bluetooth controller from HID mode to HCI mode. +You also need to specify the location of USB Bluetooth controller with the +.Va ubthidhci_busnum +and +.Va ubthidhci_addr +variables. +.It Va ubthidhci_busnum +Bus number where the USB Bluetooth controller is located. +Check the output of +.Xr usbconfig 1 +on your system to find this information. +.It Va ubthidhci_addr +Bus address of the USB Bluetooth controller. +Check the output of +.Xr usbconfig 1 +on your system to find this information. .El .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact @@ -4283,6 +4303,7 @@ Default .Xr kbdcontrol 1 , .Xr makewhatis 1 , .Xr sh 1 , +.Xr usbconfig 1 , .Xr vi 1 , .Xr vidcontrol 1 , .Xr bridge 4 , From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 18:02:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 804361065670; Fri, 9 Apr 2010 18:02:19 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5E58FC0A; Fri, 9 Apr 2010 18:02:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39I2JMk092039; Fri, 9 Apr 2010 18:02:19 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39I2J0K092034; Fri, 9 Apr 2010 18:02:19 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201004091802.o39I2J0K092034@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 9 Apr 2010 18:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206428 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 18:02:19 -0000 Author: luigi Date: Fri Apr 9 18:02:19 2010 New Revision: 206428 URL: http://svn.freebsd.org/changeset/base/206428 Log: This commit enables partial operation of dummynet with kernels compiled with "options VIMAGE". As it is now, there is still a single instance of the pipes, and it is only usable from vnet0 (the main instance). Trying to use a pipe from a different vimage does not crash the system as it did before, but the traffic coming out from the pipe goes to the wrong place, and i still need to figure out where. Support for per-vimage pipes is almost there (just a matter of uncommenting the VNET_* definitions for dn_cfg, plus putting into the structure the remaining static variables), however i need first to figure out how init/uninit work, and also to understand where packets are ending up on exit from a pipe. In summary: vimage support for dummynet is not complete yet, but we are getting there. Modified: head/sys/netinet/ipfw/ip_dn_io.c head/sys/netinet/ipfw/ip_dn_private.h head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_io.c Fri Apr 9 17:32:38 2010 (r206427) +++ head/sys/netinet/ipfw/ip_dn_io.c Fri Apr 9 18:02:19 2010 (r206428) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); */ struct dn_parms dn_cfg; +//VNET_DEFINE(struct dn_parms, _base_dn_cfg); static long tick_last; /* Last tick duration (usec). */ static long tick_delta; /* Last vs standard tick diff (usec). */ @@ -100,31 +101,34 @@ SYSCTL_DECL(_net_inet); SYSCTL_DECL(_net_inet_ip); SYSCTL_NODE(_net_inet_ip, OID_AUTO, dummynet, CTLFLAG_RW, 0, "Dummynet"); +/* wrapper to pass dn_cfg fields to SYSCTL_* */ +//#define DC(x) (&(VNET_NAME(_base_dn_cfg).x)) +#define DC(x) (&(dn_cfg.x)) /* parameters */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, hash_size, - CTLFLAG_RW, &dn_cfg.hash_size, 0, "Default hash table size"); + CTLFLAG_RW, DC(hash_size), 0, "Default hash table size"); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, pipe_slot_limit, - CTLFLAG_RW, &dn_cfg.slot_limit, 0, + CTLFLAG_RW, DC(slot_limit), 0, "Upper limit in slots for pipe queue."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, pipe_byte_limit, - CTLFLAG_RW, &dn_cfg.byte_limit, 0, + CTLFLAG_RW, DC(byte_limit), 0, "Upper limit in bytes for pipe queue."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, io_fast, - CTLFLAG_RW, &dn_cfg.io_fast, 0, "Enable fast dummynet io."); + CTLFLAG_RW, DC(io_fast), 0, "Enable fast dummynet io."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, - CTLFLAG_RW, &dn_cfg.debug, 0, "Dummynet debug level"); + CTLFLAG_RW, DC(debug), 0, "Dummynet debug level"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire, - CTLFLAG_RW, &dn_cfg.expire, 0, "Expire empty queues/pipes"); + CTLFLAG_RW, DC(expire), 0, "Expire empty queues/pipes"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, - CTLFLAG_RD, &dn_cfg.expire_cycle, 0, "Expire cycle for queues/pipes"); + CTLFLAG_RD, DC(expire_cycle), 0, "Expire cycle for queues/pipes"); /* RED parameters */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_lookup_depth, - CTLFLAG_RD, &dn_cfg.red_lookup_depth, 0, "Depth of RED lookup table"); + CTLFLAG_RD, DC(red_lookup_depth), 0, "Depth of RED lookup table"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_avg_pkt_size, - CTLFLAG_RD, &dn_cfg.red_avg_pkt_size, 0, "RED Medium packet size"); + CTLFLAG_RD, DC(red_avg_pkt_size), 0, "RED Medium packet size"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_max_pkt_size, - CTLFLAG_RD, &dn_cfg.red_max_pkt_size, 0, "RED Max packet size"); + CTLFLAG_RD, DC(red_max_pkt_size), 0, "RED Max packet size"); /* time adjustment */ SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_delta, @@ -142,13 +146,13 @@ SYSCTL_LONG(_net_inet_ip_dummynet, OID_A /* statistics */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, schk_count, - CTLFLAG_RD, &dn_cfg.schk_count, 0, "Number of schedulers"); + CTLFLAG_RD, DC(schk_count), 0, "Number of schedulers"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, si_count, - CTLFLAG_RD, &dn_cfg.si_count, 0, "Number of scheduler instances"); + CTLFLAG_RD, DC(si_count), 0, "Number of scheduler instances"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, fsk_count, - CTLFLAG_RD, &dn_cfg.fsk_count, 0, "Number of flowsets"); + CTLFLAG_RD, DC(fsk_count), 0, "Number of flowsets"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, queue_count, - CTLFLAG_RD, &dn_cfg.queue_count, 0, "Number of queues"); + CTLFLAG_RD, DC(queue_count), 0, "Number of queues"); SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt, CTLFLAG_RD, &io_pkt, 0, "Number of packets passed to dummynet."); @@ -158,7 +162,7 @@ SYSCTL_ULONG(_net_inet_ip_dummynet, OID_ SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt_drop, CTLFLAG_RD, &io_pkt_drop, 0, "Number of packets dropped by dummynet."); - +#undef DC SYSEND #endif @@ -496,6 +500,8 @@ dummynet_task(void *context, int pending struct timeval t; struct mq q = { NULL, NULL }; /* queue to accumulate results */ + CURVNET_SET(context); + DN_BH_WLOCK(); /* Update number of lost(coalesced) ticks. */ @@ -560,6 +566,7 @@ dummynet_task(void *context, int pending dn_reschedule(); if (q.head != NULL) dummynet_send(q.head); + CURVNET_RESTORE(); } /* Modified: head/sys/netinet/ipfw/ip_dn_private.h ============================================================================== --- head/sys/netinet/ipfw/ip_dn_private.h Fri Apr 9 17:32:38 2010 (r206427) +++ head/sys/netinet/ipfw/ip_dn_private.h Fri Apr 9 18:02:19 2010 (r206428) @@ -150,6 +150,8 @@ struct dn_parms { uint32_t expire; uint32_t expire_cycle; /* tick count */ + int init_done; + /* if the upper half is busy doing something long, * can set the busy flag and we will enqueue packets in * a queue for later processing. @@ -354,6 +356,8 @@ enum { }; extern struct dn_parms dn_cfg; +//VNET_DECLARE(struct dn_parms, _base_dn_cfg); +//#define dn_cfg VNET(_base_dn_cfg) int dummynet_io(struct mbuf **, int , struct ip_fw_args *); void dummynet_task(void *context, int pending); Modified: head/sys/netinet/ipfw/ip_dummynet.c ============================================================================== --- head/sys/netinet/ipfw/ip_dummynet.c Fri Apr 9 17:32:38 2010 (r206427) +++ head/sys/netinet/ipfw/ip_dummynet.c Fri Apr 9 18:02:19 2010 (r206428) @@ -2112,14 +2112,10 @@ ip_dn_ctl(struct sockopt *sopt) static void ip_dn_init(void) { - static int init_done = 0; - - if (init_done) + if (dn_cfg.init_done) return; - init_done = 1; - if (bootverbose) - printf("DUMMYNET with IPv6 initialized (100131)\n"); - + printf("DUMMYNET %p with IPv6 initialized (100409)\n", curvnet); + dn_cfg.init_done = 1; /* Set defaults here. MSVC does not accept initializers, * and this is also useful for vimages */ @@ -2156,10 +2152,8 @@ ip_dn_init(void) SLIST_INIT(&dn_cfg.schedlist); DN_LOCK_INIT(); - ip_dn_ctl_ptr = ip_dn_ctl; - ip_dn_io_ptr = dummynet_io; - TASK_INIT(&dn_task, 0, dummynet_task, NULL); + TASK_INIT(&dn_task, 0, dummynet_task, curvnet); dn_tq = taskqueue_create_fast("dummynet", M_NOWAIT, taskqueue_thread_enqueue, &dn_tq); taskqueue_start_threads(&dn_tq, 1, PI_NET, "dummynet"); @@ -2173,13 +2167,16 @@ ip_dn_init(void) #ifdef KLD_MODULE static void -ip_dn_destroy(void) +ip_dn_destroy(int last) { callout_drain(&dn_timeout); DN_BH_WLOCK(); - ip_dn_ctl_ptr = NULL; - ip_dn_io_ptr = NULL; + if (last) { + printf("%s removing last instance\n", __FUNCTION__); + ip_dn_ctl_ptr = NULL; + ip_dn_io_ptr = NULL; + } dummynet_flush(); DN_BH_WUNLOCK(); @@ -2204,13 +2201,15 @@ dummynet_modevent(module_t mod, int type return EEXIST ; } ip_dn_init(); + ip_dn_ctl_ptr = ip_dn_ctl; + ip_dn_io_ptr = dummynet_io; return 0; } else if (type == MOD_UNLOAD) { #if !defined(KLD_MODULE) printf("dummynet statically compiled, cannot unload\n"); return EINVAL ; #else - ip_dn_destroy(); + ip_dn_destroy(1 /* last */); return 0; #endif } else @@ -2288,8 +2287,24 @@ static moduledata_t dummynet_mod = { "dummynet", dummynet_modevent, NULL }; -DECLARE_MODULE(dummynet, dummynet_mod, - SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY-1); +#define DN_SI_SUB SI_SUB_PROTO_IFATTACHDOMAIN +#define DN_MODEV_ORD (SI_ORDER_ANY - 128) /* after ipfw */ +DECLARE_MODULE(dummynet, dummynet_mod, DN_SI_SUB, DN_MODEV_ORD); MODULE_DEPEND(dummynet, ipfw, 2, 2, 2); MODULE_VERSION(dummynet, 1); + +/* + * Starting up. Done in order after dummynet_modevent() has been called. + * VNET_SYSINIT is also called for each existing vnet and each new vnet. + */ +//VNET_SYSINIT(vnet_dn_init, DN_SI_SUB, DN_MODEV_ORD+2, ip_dn_init, NULL); + +/* + * Shutdown handlers up shop. These are done in REVERSE ORDER, but still + * after dummynet_modevent() has been called. Not called on reboot. + * VNET_SYSUNINIT is also called for each exiting vnet as it exits. + * or when the module is unloaded. + */ +//VNET_SYSUNINIT(vnet_dn_uninit, DN_SI_SUB, DN_MODEV_ORD+2, ip_dn_destroy, NULL); + /* end of file */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 18:42:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECBEC1065674; Fri, 9 Apr 2010 18:42:15 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC0B28FC12; Fri, 9 Apr 2010 18:42:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39IgFcj031017; Fri, 9 Apr 2010 18:42:15 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39IgFbb031014; Fri, 9 Apr 2010 18:42:15 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004091842.o39IgFbb031014@svn.freebsd.org> From: Jack F Vogel Date: Fri, 9 Apr 2010 18:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206429 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 18:42:16 -0000 Author: jfv Date: Fri Apr 9 18:42:15 2010 New Revision: 206429 URL: http://svn.freebsd.org/changeset/base/206429 Log: Incorporate suggested improvements from yongari. Also, from feedback, make the multiqueue code an option (EM_MULTIQUEUE) that is off by default. Problems have been seen with UDP when its on. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri Apr 9 18:02:19 2010 (r206428) +++ head/sys/dev/e1000/if_em.c Fri Apr 9 18:42:15 2010 (r206429) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.0.2"; +char em_driver_version[] = "7.0.3"; /********************************************************************* @@ -192,7 +192,7 @@ static int em_suspend(device_t); static int em_resume(device_t); static void em_start(struct ifnet *); static void em_start_locked(struct ifnet *, struct tx_ring *); -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE static int em_mq_start(struct ifnet *, struct mbuf *); static int em_mq_start_locked(struct ifnet *, struct tx_ring *, struct mbuf *); @@ -797,7 +797,7 @@ em_resume(device_t dev) * the packet is requeued. **********************************************************************/ -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE static int em_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr, struct mbuf *m) { @@ -812,6 +812,10 @@ em_mq_start_locked(struct ifnet *ifp, st return (err); } + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) + em_txeof(txr); + enq = 0; if (m == NULL) { next = drbr_dequeue(ifp, txr->br); @@ -834,12 +838,17 @@ em_mq_start_locked(struct ifnet *ifp, st ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; + if (txr->tx_avail < EM_MAX_SCATTER) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } next = drbr_dequeue(ifp, txr->br); } if (enq > 0) { /* Set the watchdog */ txr->watchdog_check = TRUE; + txr->watchdog_time = ticks; } return (err); } @@ -864,8 +873,7 @@ em_mq_start(struct ifnet *ifp, struct mb txr = &adapter->tx_rings[i]; if (EM_TX_TRYLOCK(txr)) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - error = em_mq_start_locked(ifp, txr, m); + error = em_mq_start_locked(ifp, txr, m); EM_TX_UNLOCK(txr); } else error = drbr_enqueue(ifp, txr->br, m); @@ -892,7 +900,7 @@ em_qflush(struct ifnet *ifp) if_qflush(ifp); } -#endif /* FreeBSD_version */ +#endif /* EM_MULTIQUEUE */ static void em_start_locked(struct ifnet *ifp, struct tx_ring *txr) @@ -909,8 +917,15 @@ em_start_locked(struct ifnet *ifp, struc if (!adapter->link_active) return; - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + /* Call cleanup if number of TX descriptors low */ + if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) + em_txeof(txr); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (txr->tx_avail < EM_MAX_SCATTER) { + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; @@ -930,6 +945,7 @@ em_start_locked(struct ifnet *ifp, struc ETHER_BPF_MTAP(ifp, m_head); /* Set timeout in case hardware has problems transmitting. */ + txr->watchdog_time = ticks; txr->watchdog_check = TRUE; } @@ -1359,7 +1375,7 @@ em_poll(struct ifnet *ifp, enum poll_cmd EM_TX_LOCK(txr); em_txeof(txr); -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else @@ -1427,28 +1443,23 @@ em_handle_que(void *context, int pending struct ifnet *ifp = adapter->ifp; struct tx_ring *txr = adapter->tx_rings; struct rx_ring *rxr = adapter->rx_rings; - u32 loop = EM_MAX_LOOP; - bool more_rx, more_tx; + bool more_rx; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + more_rx = em_rxeof(rxr, adapter->rx_process_limit); EM_TX_LOCK(txr); - do { - more_rx = em_rxeof(rxr, adapter->rx_process_limit); - more_tx = em_txeof(txr); - } while (loop-- && (more_rx || more_tx)); - -#if __FreeBSD_version >= 800000 + em_txeof(txr); +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp, txr); #endif - if (more_rx || more_tx) - taskqueue_enqueue(adapter->tq, &adapter->que_task); - EM_TX_UNLOCK(txr); + if (more_rx) + taskqueue_enqueue(adapter->tq, &adapter->que_task); } em_enable_intr(adapter); @@ -1466,17 +1477,12 @@ em_msix_tx(void *arg) { struct tx_ring *txr = arg; struct adapter *adapter = txr->adapter; - bool more; ++txr->tx_irq; EM_TX_LOCK(txr); - more = em_txeof(txr); + em_txeof(txr); EM_TX_UNLOCK(txr); - if (more) - taskqueue_enqueue(txr->tq, &txr->tx_task); - else - /* Reenable this interrupt */ - E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); + E1000_WRITE_REG(&adapter->hw, E1000_IMS, txr->ims); return; } @@ -1531,14 +1537,14 @@ em_handle_rx(void *context, int pending) { struct rx_ring *rxr = context; struct adapter *adapter = rxr->adapter; - u32 loop = EM_MAX_LOOP; bool more; - do { - more = em_rxeof(rxr, adapter->rx_process_limit); - } while (loop-- && more); - /* Reenable this interrupt */ - E1000_WRITE_REG(&adapter->hw, E1000_IMS, rxr->ims); + more = em_rxeof(rxr, adapter->rx_process_limit); + if (more) + taskqueue_enqueue(rxr->tq, &rxr->rx_task); + else + /* Reenable this interrupt */ + E1000_WRITE_REG(&adapter->hw, E1000_IMS, rxr->ims); } static void @@ -1547,16 +1553,13 @@ em_handle_tx(void *context, int pending) struct tx_ring *txr = context; struct adapter *adapter = txr->adapter; struct ifnet *ifp = adapter->ifp; - u32 loop = EM_MAX_LOOP; - bool more; if (!EM_TX_TRYLOCK(txr)) return; - do { - more = em_txeof(txr); - } while (loop-- && more); -#if __FreeBSD_version >= 800000 + em_txeof(txr); + +#ifdef EM_MULTIQUEUE if (!drbr_empty(ifp, txr->br)) em_mq_start_locked(ifp, txr, NULL); #else @@ -1912,11 +1915,6 @@ em_xmit(struct tx_ring *txr, struct mbuf bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); E1000_WRITE_REG(&adapter->hw, E1000_TDT(txr->me), i); - txr->watchdog_time = ticks; - - /* Call cleanup if number of TX descriptors low */ - if (txr->tx_avail <= EM_TX_CLEANUP_THRESHOLD) - em_txeof(txr); return (0); } @@ -2658,7 +2656,7 @@ em_setup_interface(device_t dev, struct ifp->if_capabilities = ifp->if_capenable = 0; -#if __FreeBSD_version >= 800000 +#ifdef EM_MULTIQUEUE /* Multiqueue tx functions */ ifp->if_transmit = em_mq_start; ifp->if_qflush = em_qflush; @@ -4078,9 +4076,9 @@ static int em_rxeof(struct rx_ring *rxr, int count) { struct adapter *adapter = rxr->adapter; - struct ifnet *ifp = adapter->ifp;; + struct ifnet *ifp = adapter->ifp; struct mbuf *mp, *sendmp; - u8 status; + u8 status = 0; u16 len; int i, processed, rxdone = 0; bool eop; @@ -4141,6 +4139,10 @@ em_rxeof(struct rx_ring *rxr, int count) E1000_RXD_SPC_VLAN_MASK); rxr->fmp->m_flags |= M_VLANTAG; } +#ifdef EM_MULTIQUEUE + rxr->fmp->m_pkthdr.flowid = curcpu; + rxr->fmp->m_flags |= M_FLOWID; +#endif #ifndef __NO_STRICT_ALIGNMENT skip: #endif @@ -4193,9 +4195,13 @@ skip: } rxr->next_to_check = i; - EM_RX_UNLOCK(rxr); + +#ifdef DEVICE_POLLING return (rxdone); +#else + return ((status & E1000_RXD_STAT_DD) ? TRUE : FALSE); +#endif } #ifndef __NO_STRICT_ALIGNMENT Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Fri Apr 9 18:02:19 2010 (r206428) +++ head/sys/dev/e1000/if_em.h Fri Apr 9 18:42:15 2010 (r206429) @@ -223,7 +223,7 @@ #define HW_DEBUGOUT1(S, A) if (DEBUG_HW) printf(S "\n", A) #define HW_DEBUGOUT2(S, A, B) if (DEBUG_HW) printf(S "\n", A, B) -#define EM_MAX_SCATTER 64 +#define EM_MAX_SCATTER 32 #define EM_VFTA_SIZE 128 #define EM_TSO_SIZE (65535 + sizeof(struct ether_vlan_header)) #define EM_TSO_SEG_SIZE 4096 /* Max dma segment size */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 21:16:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30775106564A; Fri, 9 Apr 2010 21:16:46 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F7898FC08; Fri, 9 Apr 2010 21:16:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39LGklq069342; Fri, 9 Apr 2010 21:16:46 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39LGkix069340; Fri, 9 Apr 2010 21:16:46 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004092116.o39LGkix069340@svn.freebsd.org> From: Jack F Vogel Date: Fri, 9 Apr 2010 21:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206430 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 21:16:46 -0000 Author: jfv Date: Fri Apr 9 21:16:45 2010 New Revision: 206430 URL: http://svn.freebsd.org/changeset/base/206430 Log: Thanks to Michael Tuexen for catching this, bit set that keeps the clock from being reset when writing to EITR was incorrect, also there is a shared code #define for it anyway. Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Fri Apr 9 18:42:15 2010 (r206429) +++ head/sys/dev/e1000/if_igb.c Fri Apr 9 21:16:45 2010 (r206430) @@ -1453,7 +1453,7 @@ igb_msix_que(void *arg) if (adapter->hw.mac.type == e1000_82575) newitr |= newitr << 16; else - newitr |= 0x8000000; + newitr |= E1000_EITR_CNT_IGNR; /* save for next interrupt */ que->eitr_setting = newitr; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 21:18:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0618D106564A; Fri, 9 Apr 2010 21:18:47 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E92948FC1E; Fri, 9 Apr 2010 21:18:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39LIkGq069801; Fri, 9 Apr 2010 21:18:46 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39LIkGT069799; Fri, 9 Apr 2010 21:18:46 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004092118.o39LIkGT069799@svn.freebsd.org> From: Jack F Vogel Date: Fri, 9 Apr 2010 21:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206431 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 21:18:47 -0000 Author: jfv Date: Fri Apr 9 21:18:46 2010 New Revision: 206431 URL: http://svn.freebsd.org/changeset/base/206431 Log: DUH, must be tired, I missed the second instance... time for the weekend :) Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Fri Apr 9 21:16:45 2010 (r206430) +++ head/sys/dev/e1000/if_igb.c Fri Apr 9 21:18:46 2010 (r206431) @@ -2357,7 +2357,7 @@ igb_configure_queues(struct adapter *ada if (hw->mac.type == e1000_82575) newitr |= newitr << 16; else - newitr |= 0x8000000; + newitr |= E1000_EITR_CNT_IGNR; for (int i = 0; i < adapter->num_queues; i++) { que = &adapter->queues[i]; From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 22:48:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 399C71065673; Fri, 9 Apr 2010 22:48:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26F958FC0A; Fri, 9 Apr 2010 22:48:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39MmSiU090933; Fri, 9 Apr 2010 22:48:28 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39MmSDf090930; Fri, 9 Apr 2010 22:48:28 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004092248.o39MmSDf090930@svn.freebsd.org> From: Ed Maste Date: Fri, 9 Apr 2010 22:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206432 - stable/7/bin/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 22:48:28 -0000 Author: emaste Date: Fri Apr 9 22:48:27 2010 New Revision: 206432 URL: http://svn.freebsd.org/changeset/base/206432 Log: MFC r192862: > Description of fields to fill in above: 76 columns --| Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant. More precisely, this gives precedence to an interpretation not using the '(', ')', '-a' and '-o' in their special meaning, if possible. For example, it is now safe to write [ "$a" = "$b" ] and assume it compares the two strings. The man page already says that test(1) works this way, so does not need to be changed. Interpretation of input with more parameters tries a bit harder to find a valid parse in some cases. Add various additional test cases to TEST.sh. PR: standards/133369 Discussed with: jilles Modified: stable/7/bin/test/TEST.sh stable/7/bin/test/test.c Directory Properties: stable/7/bin/test/ (props changed) Modified: stable/7/bin/test/TEST.sh ============================================================================== --- stable/7/bin/test/TEST.sh Fri Apr 9 21:18:46 2010 (r206431) +++ stable/7/bin/test/TEST.sh Fri Apr 9 22:48:27 2010 (r206432) @@ -133,5 +133,45 @@ t 0 '"a" -a ! ""' t 1 '""' t 0 '! ""' +t 0 '!' +t 0 '\(' +t 0 '\)' + +t 1 '\( = \)' +t 0 '\( != \)' +t 0 '\( ! \)' +t 0 '\( \( \)' +t 0 '\( \) \)' +t 0 '! = !' +t 1 '! != !' +t 1 '-n = \)' +t 0 '! != \)' +t 1 '! = a' +t 0 '! != -n' +t 0 '! -c /etc/passwd' + +t 0 '! \( = \)' +t 1 '! \( != \)' +t 1 '! = = =' +t 0 '! = = \)' +t 0 '! "" -o ""' +t 1 '! "x" -o ""' +t 1 '! "" -o "x"' +t 1 '! "x" -o "x"' +t 0 '\( -f /etc/passwd \)' +t 1 '\( ! = \)' +t 0 '\( ! "" \)' +t 1 '\( ! -e \)' + +t 0 '0 -eq 0 -a -d /' +t 0 '-s = "" -o "" = ""' +t 0 '"" = "" -o -s = ""' +t 1 '-s = "" -o -s = ""' +t 0 '-z x -o x = "#" -o x = x' +t 1 '-z y -o y = "#" -o y = x' +t 0 '0 -ne 0 -o ! -f /' +t 0 '1 -ne 0 -o ! -f /etc/passwd' +t 1 '0 -ne 0 -o ! -f /etc/passwd' + echo "" echo "Syntax errors: $ERROR Failed: $FAILED" Modified: stable/7/bin/test/test.c ============================================================================== --- stable/7/bin/test/test.c Fri Apr 9 21:18:46 2010 (r206431) +++ stable/7/bin/test/test.c Fri Apr 9 22:48:27 2010 (r206432) @@ -163,6 +163,7 @@ struct t_op { struct t_op const *t_wp_op; int nargc; char **t_wp; +int parenlevel; static int aexpr(enum token); static int binop(void); @@ -171,7 +172,9 @@ static int filstat(char *, enum token); static int getn(const char *); static intmax_t getq(const char *); static int intcmp(const char *, const char *); -static int isoperand(void); +static int isunopoperand(void); +static int islparenoperand(void); +static int isrparenoperand(void); static int newerf(const char *, const char *); static int nexpr(enum token); static int oexpr(enum token); @@ -205,7 +208,14 @@ main(int argc, char **argv) #endif nargc = argc; t_wp = &argv[1]; - res = !oexpr(t_lex(*t_wp)); + parenlevel = 0; + if (nargc == 4 && strcmp(*t_wp, "!") == 0) { + /* Things like ! "" -o x do not fit in the normal grammar. */ + --nargc; + ++t_wp; + res = oexpr(t_lex(*t_wp)); + } else + res = !oexpr(t_lex(*t_wp)); if (--nargc > 0) syntax(*t_wp, "unexpected operator"); @@ -268,12 +278,16 @@ primary(enum token n) if (n == EOI) return 0; /* missing expression */ if (n == LPAREN) { + parenlevel++; if ((nn = t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL)) == - RPAREN) + RPAREN) { + parenlevel--; return 0; /* missing expression */ + } res = oexpr(nn); if (t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL) != RPAREN) syntax(NULL, "closing paren expected"); + parenlevel--; return res; } if (t_wp_op && t_wp_op->op_type == UNOP) { @@ -410,8 +424,10 @@ t_lex(char *s) } while (op->op_text) { if (strcmp(s, op->op_text) == 0) { - if ((op->op_type == UNOP && isoperand()) || - (op->op_num == LPAREN && nargc == 1)) + if (((op->op_type == UNOP || op->op_type == BUNOP) + && isunopoperand()) || + (op->op_num == LPAREN && islparenoperand()) || + (op->op_num == RPAREN && isrparenoperand())) break; t_wp_op = op; return op->op_num; @@ -423,7 +439,7 @@ t_lex(char *s) } static int -isoperand(void) +isunopoperand(void) { struct t_op const *op = ops; char *s; @@ -431,19 +447,53 @@ isoperand(void) if (nargc == 1) return 1; - if (nargc == 2) - return 0; s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; t = *(t_wp + 2); while (op->op_text) { if (strcmp(s, op->op_text) == 0) return op->op_type == BINOP && - (t[0] != ')' || t[1] != '\0'); + (parenlevel == 0 || t[0] != ')' || t[1] != '\0'); + op++; + } + return 0; +} + +static int +islparenoperand(void) +{ + struct t_op const *op = ops; + char *s; + + if (nargc == 1) + return 1; + s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; + if (nargc != 3) + return 0; + while (op->op_text) { + if (strcmp(s, op->op_text) == 0) + return op->op_type == BINOP; op++; } return 0; } +static int +isrparenoperand(void) +{ + char *s; + + if (nargc == 1) + return 0; + s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; + return 0; +} + /* atoi with error detection */ static int getn(const char *s) From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 22:50:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEFA6106564A; Fri, 9 Apr 2010 22:50:28 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACDBB8FC1A; Fri, 9 Apr 2010 22:50:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39MoSm1091398; Fri, 9 Apr 2010 22:50:28 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39MoSsK091395; Fri, 9 Apr 2010 22:50:28 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004092250.o39MoSsK091395@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 9 Apr 2010 22:50:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206433 - in head/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 22:50:29 -0000 Author: yongari Date: Fri Apr 9 22:50:28 2010 New Revision: 206433 URL: http://svn.freebsd.org/changeset/base/206433 Log: Add preliminary support for 8168E/8111E PCIe controller. While I'm here simplify device description string. Tested by: Michael Beckmann < michael <> apfel dot de > MFC after: 5 days Modified: head/sys/dev/re/if_re.c head/sys/pci/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Fri Apr 9 22:48:27 2010 (r206432) +++ head/sys/dev/re/if_re.c Fri Apr 9 22:50:28 2010 (r206433) @@ -174,8 +174,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL/8103E PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8168B/8168C/8168CP/8168D/8168DP/" - "8111B/8111C/8111CP/8111DP PCIe Gigabit Ethernet" }, + "RealTek 8168/8111 B/C/CP/D/DP/E PCIe Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169SC, 0, @@ -220,6 +219,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"}, { RL_HWREV_8168D, RL_8169, "8168D/8111D"}, { RL_HWREV_8168DP, RL_8169, "8168DP/8111DP"}, + { RL_HWREV_8168E, RL_8169, "8168E/8111E"}, { 0, 0, NULL } }; @@ -1310,6 +1310,11 @@ re_attach(device_t dev) */ sc->rl_flags |= RL_FLAG_NOJUMBO; break; + case RL_HWREV_8168E: + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHYWAKE_PM | + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD | RL_FLAG_NOJUMBO; + break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SBL: case RL_HWREV_8169_8110SC: @@ -1393,6 +1398,8 @@ re_attach(device_t dev) } /* Take PHY out of power down mode. */ + if ((sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) | 0x80); if ((sc->rl_flags & RL_FLAG_PHYWAKE) != 0) { re_gmii_writereg(dev, 1, 0x1f, 0); re_gmii_writereg(dev, 1, 0x0e, 0); @@ -3135,6 +3142,9 @@ re_setwol(struct rl_softc *sc) v |= RL_CFG5_WOL_LANWAKE; CSR_WRITE_1(sc, RL_CFG5, v); + if ((ifp->if_capenable & IFCAP_WOL) != 0 && + (sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0) + CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) & ~0x80); /* * It seems that hardware resets its link speed to 100Mbps in * power down mode so switching to 100Mbps in driver is not Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Fri Apr 9 22:48:27 2010 (r206432) +++ head/sys/pci/if_rlreg.h Fri Apr 9 22:50:28 2010 (r206433) @@ -133,6 +133,7 @@ #define RL_GMEDIASTAT 0x006C /* 8 bits */ #define RL_MACDBG 0x006D /* 8 bits, 8168C SPIN2 only */ #define RL_GPIO 0x006E /* 8 bits, 8168C SPIN2 only */ +#define RL_PMCH 0x006F /* 8 bits */ #define RL_MAXRXPKTLEN 0x00DA /* 16 bits, chip multiplies by 8 */ #define RL_GTXSTART 0x0038 /* 8 bits */ @@ -162,6 +163,7 @@ #define RL_HWREV_8102EL_SPIN1 0x24c00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 +#define RL_HWREV_8168E 0x2C000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 @@ -884,6 +886,7 @@ struct rl_softc { uint32_t rl_flags; #define RL_FLAG_MSI 0x0001 #define RL_FLAG_AUTOPAD 0x0002 +#define RL_FLAG_PHYWAKE_PM 0x0004 #define RL_FLAG_PHYWAKE 0x0008 #define RL_FLAG_NOJUMBO 0x0010 #define RL_FLAG_PAR 0x0020 From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 22:50:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB792106566C; Fri, 9 Apr 2010 22:50:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A91DB8FC18; Fri, 9 Apr 2010 22:50:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39Moaud091466; Fri, 9 Apr 2010 22:50:36 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39Moa3I091464; Fri, 9 Apr 2010 22:50:36 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004092250.o39Moa3I091464@svn.freebsd.org> From: Ed Maste Date: Fri, 9 Apr 2010 22:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206434 - stable/8/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 22:50:36 -0000 Author: emaste Date: Fri Apr 9 22:50:36 2010 New Revision: 206434 URL: http://svn.freebsd.org/changeset/base/206434 Log: MFC r206383: Remove extraneous '>'. Modified: stable/8/share/man/man9/stack.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/stack.9 ============================================================================== --- stable/8/share/man/man9/stack.9 Fri Apr 9 22:50:28 2010 (r206433) +++ stable/8/share/man/man9/stack.9 Fri Apr 9 22:50:36 2010 (r206434) @@ -34,7 +34,7 @@ .Nm stack .Nd kernel thread stack tracing routines .Sh SYNOPSIS -.In sys/param.h> +.In sys/param.h .In sys/stack.h In the kernel configuration file: .Cd "options DDB" From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 22:51:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EAB0106566C; Fri, 9 Apr 2010 22:51:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C19A8FC14; Fri, 9 Apr 2010 22:51:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39MpJEI091705; Fri, 9 Apr 2010 22:51:19 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39MpJo9091703; Fri, 9 Apr 2010 22:51:19 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201004092251.o39MpJo9091703@svn.freebsd.org> From: Ed Maste Date: Fri, 9 Apr 2010 22:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206435 - stable/7/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 22:51:19 -0000 Author: emaste Date: Fri Apr 9 22:51:19 2010 New Revision: 206435 URL: http://svn.freebsd.org/changeset/base/206435 Log: MFC r206383: Remove extraneous '>'. Modified: stable/7/share/man/man9/stack.9 Directory Properties: stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man9/stack.9 ============================================================================== --- stable/7/share/man/man9/stack.9 Fri Apr 9 22:50:36 2010 (r206434) +++ stable/7/share/man/man9/stack.9 Fri Apr 9 22:51:19 2010 (r206435) @@ -34,7 +34,7 @@ .Nm stack .Nd kernel thread stack tracing routines .Sh SYNOPSIS -.In sys/param.h> +.In sys/param.h .In sys/stack.h In the kernel configuration file: .Cd "options DDB" From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 23:00:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53BFD106566B; Fri, 9 Apr 2010 23:00:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4230D8FC15; Fri, 9 Apr 2010 23:00:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39N0P3A094045; Fri, 9 Apr 2010 23:00:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39N0Pxr094043; Fri, 9 Apr 2010 23:00:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201004092300.o39N0Pxr094043@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 9 Apr 2010 23:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206436 - head/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 23:00:25 -0000 Author: yongari Date: Fri Apr 9 23:00:24 2010 New Revision: 206436 URL: http://svn.freebsd.org/changeset/base/206436 Log: Consistently use capital letters. Modified: head/sys/pci/if_rlreg.h Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Fri Apr 9 22:51:19 2010 (r206435) +++ head/sys/pci/if_rlreg.h Fri Apr 9 23:00:24 2010 (r206436) @@ -160,7 +160,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 -#define RL_HWREV_8102EL_SPIN1 0x24c00000 +#define RL_HWREV_8102EL_SPIN1 0x24C00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168DP 0x28800000 #define RL_HWREV_8168E 0x2C000000 @@ -182,7 +182,7 @@ #define RL_HWREV_8139C 0x74000000 #define RL_HWREV_8139D 0x74400000 #define RL_HWREV_8139CPLUS 0x74800000 -#define RL_HWREV_8101 0x74c00000 +#define RL_HWREV_8101 0x74C00000 #define RL_HWREV_8100 0x78800000 #define RL_HWREV_8169_8110SBL 0x7CC00000 #define RL_HWREV_8169_8110SCE 0x98000000 From owner-svn-src-all@FreeBSD.ORG Fri Apr 9 23:15:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E3A51065670; Fri, 9 Apr 2010 23:15:37 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C9288FC13; Fri, 9 Apr 2010 23:15:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o39NFbBf097598; Fri, 9 Apr 2010 23:15:37 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o39NFb3p097595; Fri, 9 Apr 2010 23:15:37 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004092315.o39NFb3p097595@svn.freebsd.org> From: Jack F Vogel Date: Fri, 9 Apr 2010 23:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206437 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 23:15:37 -0000 Author: jfv Date: Fri Apr 9 23:15:37 2010 New Revision: 206437 URL: http://svn.freebsd.org/changeset/base/206437 Log: A few more changes from yongari: - code flow in handler could let interrupt be reenabled when not wanted. - change where the RX lock is taken to improve performance. - adapter->msix is true for MSI systems also, it needs to explicitly test for 82574, good one :) Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Fri Apr 9 23:00:24 2010 (r206436) +++ head/sys/dev/e1000/if_em.c Fri Apr 9 23:15:37 2010 (r206437) @@ -93,7 +93,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.0.3"; +char em_driver_version[] = "7.0.4"; /********************************************************************* @@ -1458,8 +1458,10 @@ em_handle_que(void *context, int pending em_start_locked(ifp, txr); #endif EM_TX_UNLOCK(txr); - if (more_rx) + if (more_rx) { taskqueue_enqueue(adapter->tq, &adapter->que_task); + return; + } } em_enable_intr(adapter); @@ -1499,8 +1501,10 @@ em_msix_rx(void *arg) struct adapter *adapter = rxr->adapter; bool more; + EM_RX_LOCK(rxr); ++rxr->rx_irq; more = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); if (more) taskqueue_enqueue(rxr->tq, &rxr->rx_task); else @@ -1539,7 +1543,9 @@ em_handle_rx(void *context, int pending) struct adapter *adapter = rxr->adapter; bool more; + EM_RX_LOCK(rxr); more = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); if (more) taskqueue_enqueue(rxr->tq, &rxr->rx_task); else @@ -3999,7 +4005,7 @@ em_initialize_receive_unit(struct adapte ** When using MSIX interrupts we need to throttle ** using the EITR register (82574 only) */ - if (adapter->msix) + if (hw->mac.type == e1000_82574) for (int i = 0; i < 4; i++) E1000_WRITE_REG(hw, E1000_EITR_82574(i), DEFAULT_ITR); @@ -4084,7 +4090,7 @@ em_rxeof(struct rx_ring *rxr, int count) bool eop; struct e1000_rx_desc *cur; - EM_RX_LOCK(rxr); + EM_RX_LOCK_ASSERT(rxr); for (i = rxr->next_to_check, processed = 0; count != 0;) { @@ -4195,7 +4201,6 @@ skip: } rxr->next_to_check = i; - EM_RX_UNLOCK(rxr); #ifdef DEVICE_POLLING return (rxdone); @@ -4384,7 +4389,7 @@ em_enable_intr(struct adapter *adapter) struct e1000_hw *hw = &adapter->hw; u32 ims_mask = IMS_ENABLE_MASK; - if (adapter->msix) { + if (hw->mac.type == e1000_82574) E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); ims_mask |= EM_MSIX_MASK; } @@ -4396,7 +4401,7 @@ em_disable_intr(struct adapter *adapter) { struct e1000_hw *hw = &adapter->hw; - if (adapter->msix) + if (hw->mac.type == e1000_82574) E1000_WRITE_REG(hw, EM_EIAC, 0); E1000_WRITE_REG(&adapter->hw, E1000_IMC, 0xffffffff); } Modified: head/sys/dev/e1000/if_em.h ============================================================================== --- head/sys/dev/e1000/if_em.h Fri Apr 9 23:00:24 2010 (r206436) +++ head/sys/dev/e1000/if_em.h Fri Apr 9 23:15:37 2010 (r206437) @@ -453,5 +453,6 @@ struct em_buffer { #define EM_RX_UNLOCK(_sc) mtx_unlock(&(_sc)->rx_mtx) #define EM_CORE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->core_mtx, MA_OWNED) #define EM_TX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->tx_mtx, MA_OWNED) +#define EM_RX_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->rx_mtx, MA_OWNED) #endif /* _EM_H_DEFINED_ */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 06:26:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03E6C1065744 for ; Sat, 10 Apr 2010 06:26:37 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from web51806.mail.re2.yahoo.com (web51806.mail.re2.yahoo.com [206.190.38.237]) by mx1.freebsd.org (Postfix) with SMTP id B2CD88FC0C for ; Sat, 10 Apr 2010 06:26:36 +0000 (UTC) Received: (qmail 44884 invoked by uid 60001); 10 Apr 2010 06:26:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1270880796; bh=RfIFvTAQYnfCE+QVKLRSSxwYHbvsd5WRreN53aSGU5k=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=XbVm7CjQ09mofd7RIzWe6rgH1aB/t/mhuKh+b81SEwPo+oNbqEdKIBD2mhvlDmKrXC7SbE/vKjS69ifoMSqwWsmSZPrl+eKzzrno2FYoDba8B5FN3npg7IvEGTNrR8dbx+i30PajL19fhV8Ai5GwKKGnoABCmKNnI21MPBrRnSg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=u+GUMafKpJrE/D311xCPVt4fzmLDXrJ96zJDC/pjaAHytYQGhKzo+FMbcodVzGPUkRFv+6MTOWi/dWwzPYS7wSU0wjuLcdqgopifFFWCbIhid73f9a3I+Ij1pBMr/ow7gEaKG3uPu4gv5dFSztdBjaPJfPh2JPI0pAz1rYwRy+M=; Message-ID: <193853.44645.qm@web51806.mail.re2.yahoo.com> X-YMail-OSG: aKC4__sVM1l639zK9QdrWOhoS31GdDANEgxFK9Z_7pFCthP23s263b8GCCntg3C8pf8pkNMqMu7yTCatHxzqT_bJ8gLwvIckGd0qVlWHTMZtkyMRjq_27Z3ucBEMohzlAOLQYRV00dhntinP785ZvO52gJrBaZactGsRBUjzn9B1ThWduvGIoIVBlN.TeFJ_nq23CUfVH454LyD8V2w2zuyW0p1M0ypoTwvU2JjoIawI0sZJKjlzQhq9WLAlh_Yfbku_IvSZnxRGjCcvg2K20BvNjuOSu1o0tzQDFx.1uzaQ9UVqjVEL4Z_gJ0NiopyVYPv0Kq5DgSjnz3nNZeU45g-- Received: from [173.183.132.20] by web51806.mail.re2.yahoo.com via HTTP; Fri, 09 Apr 2010 23:26:35 PDT X-Mailer: YahooMailRC/348.3 YahooMailWebService/0.8.100.260964 References: <20100407165048.8CF9E106566B@hub.freebsd.org> <488108.55494.qm@web51803.mail.re2.yahoo.com> <81BE57A1-3E1E-4BB9-9FCE-080B34B4452C@FreeBSD.org> Date: Fri, 9 Apr 2010 23:26:35 -0700 (PDT) From: PseudoCylon To: Rui Paulo In-Reply-To: <81BE57A1-3E1E-4BB9-9FCE-080B34B4452C@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206358 (patch for if_run) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 06:26:37 -0000 >>>> Author: rpaulo >>>> Date: Wed Apr 7 15:29:13 2010 >>>> New Revision: 206358 >>>> URL: http://svn.freebsd.org/changeset/base/206358 >>>> >>>> Log: >>>> net80211 rate control framework (net80211 ratectl). >>>> >>>> This framework allows drivers to abstract the rate control algorithm and >>>> just feed the framework with the usable parameters. The rate control >>>> framework will now deal with passing the parameters to the selected >>>> algorithm. Right now we have AMRR (the default) and RSSADAPT but there's >>>> no way to select one with ifconfig, yet. >>>> The objective is to have more rate control algorithms in the net80211 >>>> stack so all drivers[0] can use it. Ideally, we'll have the well-known >>>> sample rate control algorithm in the net80211 at some point so all >>>> drivers can use it (not just ath). >>>> >>> >>> Hello, >>> >>> I've just tried the commit and run(4) works fine out of the box. It properly updates the rate. >>> >>> Thank you for updating the driver. >>> >>> AK >>> >> >> Sorry, correction. >> >> I've got complain from witness >> >> uma_zalloc_arg: zone "64" with the following non-sleepable locks held: >> exclusive sleep mutex run0 (network driver) r = 0 (0xffffff80008de128) locked @ /usr/src>/sys/dev/usb/usb_request.c:540 >> KDB: stack backtrace: >> db_trace_self_wrapper() at db_trace_self_wrapper+0x2a >> _witness_debugger() at _witness_debugger+0x2e >> witness_warn() at witness_warn+0x2c2 >> uma_zalloc_arg() at uma_zalloc_arg+0x335 >> malloc() at malloc+0x9a >> amrr_node_init() at amrr_node_init+0x38 >> run_newstate() at run_newstate+0x363 >> ieee80211_newstate_cb() at ieee80211_newstate_cb+0xac >> taskqueue_run() at taskqueue_run+0x91 >> taskqueue_thread_loop() at taskqueue_thread_loop+0x3f >> fork_exit() at fork_exit+0x12a >> fork_trampoline() at fork_trampoline+0xe >> --- trap 0, rip = 0, rsp = 0xffffff803e5d0d30, rbp = 0 --- >> >> Just unlocking the mutex before calling ieee80211_ratectl_node_init() fix this. As long as >ieee80211_ratectl_node_init() won't be called with the same ni at the same time, unlocking should be safe. >> >> Here is patch > > >Can you try updating and see if everything works for you? Thanks. > >Regards, >-- >Rui Paulo Yes, everything is working. No debug/warning message. Thank you very much. AK __________________________________________________________________ Looking for the perfect gift? Give the gift of Flickr! http://www.flickr.com/gift/ From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 06:55:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4971D106564A; Sat, 10 Apr 2010 06:55:30 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C0568FC08; Sat, 10 Apr 2010 06:55:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3A6tU8l004291; Sat, 10 Apr 2010 06:55:30 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A6tUEW004289; Sat, 10 Apr 2010 06:55:30 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004100655.o3A6tUEW004289@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 10 Apr 2010 06:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206443 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 06:55:30 -0000 Author: bschmidt Date: Sat Apr 10 06:55:29 2010 New Revision: 206443 URL: http://svn.freebsd.org/changeset/base/206443 Log: Small whitespace cleanup. Approved by: rpaulo (mentor) MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Apr 10 04:47:11 2010 (r206442) +++ head/sys/dev/iwn/if_iwn.c Sat Apr 10 06:55:29 2010 (r206443) @@ -839,7 +839,7 @@ iwn_nic_lock(struct iwn_softc *sc) /* Spin until we actually get the lock. */ for (ntries = 0; ntries < 1000; ntries++) { if ((IWN_READ(sc, IWN_GP_CNTRL) & - (IWN_GP_CNTRL_MAC_ACCESS_ENA | IWN_GP_CNTRL_SLEEP)) == + (IWN_GP_CNTRL_MAC_ACCESS_ENA | IWN_GP_CNTRL_SLEEP)) == IWN_GP_CNTRL_MAC_ACCESS_ENA) return 0; DELAY(10); @@ -1092,8 +1092,7 @@ iwn_dma_contig_alloc(struct iwn_softc *s flags | BUS_DMA_ZERO, &dma->map); if (error != 0) { device_printf(sc->sc_dev, - "%s: bus_dmamem_alloc failed, error %d\n", - __func__, error); + "%s: bus_dmamem_alloc failed, error %d\n", __func__, error); goto fail; } error = bus_dmamap_load(dma->tag, dma->map, dma->vaddr, @@ -1243,7 +1242,7 @@ iwn_alloc_rx_ring(struct iwn_softc *sc, data->m = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE); if (data->m == NULL) { device_printf(sc->sc_dev, - "%s: could not allocate rx mbuf\n", __func__); + "%s: could not allocate rx mbuf\n", __func__); error = ENOMEM; goto fail; } @@ -2788,7 +2787,7 @@ iwn5000_reset_sched(struct iwn_softc *sc if (idx < IWN_SCHED_WINSZ) { *(w + IWN_TX_RING_COUNT) = *w; bus_dmamap_sync(sc->sched_dma.tag, sc->sched_dma.map, - BUS_DMASYNC_PREWRITE); + BUS_DMASYNC_PREWRITE); } } @@ -2996,7 +2995,7 @@ iwn_tx_data(struct iwn_softc *sc, struct if (error != 0) { device_printf(sc->sc_dev, "%s: bus_dmamap_load_mbuf_sg failed, error %d\n", - __func__, error); + __func__, error); m_freem(m); return error; } @@ -3191,7 +3190,7 @@ iwn_tx_data_raw(struct iwn_softc *sc, st if (error != 0) { device_printf(sc->sc_dev, "%s: bus_dmamap_load_mbuf_sg failed, error %d\n", - __func__, error); + __func__, error); m_freem(m); return error; } @@ -4326,7 +4325,7 @@ iwn_tune_sensitivity(struct iwn_softc *s if (calib->cck_state != IWN_CCK_STATE_INIT && (((int32_t)calib->noise_ref - (int32_t)noise_ref) > 2 || - calib->low_fa > 100)) { + calib->low_fa > 100)) { inc(calib->energy_cck, 2, limits->min_energy_cck); dec(calib->cck_x4, 3, limits->min_cck_x4); dec(calib->cck_mrc_x4, 3, limits->min_cck_mrc_x4); @@ -4886,7 +4885,6 @@ iwn_run(struct iwn_softc *sc, struct iee __func__, error); return error; } - /* Configuration has changed, set TX power accordingly. */ error = hal->set_txpower(sc, ni->ni_chan, 1); @@ -5599,7 +5597,7 @@ iwn_read_firmware(struct iwn_softc *sc) if (sc->fw_fp == NULL) { device_printf(sc->sc_dev, "%s: could not load firmare image \"%s\"\n", __func__, - sc->fwname); + sc->fwname); IWN_LOCK(sc); return EINVAL; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 06:58:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 527D6106566B; Sat, 10 Apr 2010 06:58:25 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E9918FC12; Sat, 10 Apr 2010 06:58:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3A6wPIf004993; Sat, 10 Apr 2010 06:58:25 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A6wPHH004989; Sat, 10 Apr 2010 06:58:25 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004100658.o3A6wPHH004989@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 10 Apr 2010 06:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206444 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 06:58:25 -0000 Author: bschmidt Date: Sat Apr 10 06:58:24 2010 New Revision: 206444 URL: http://svn.freebsd.org/changeset/base/206444 Log: * Rename bluetooth coexistence flags, no binary change. * Enable DC calibration and crystal calibration on Centrino Advanced-N 6250 parts. * Workaround for a HW bug (does not affect 4965AGN) that may sporadically affect latency under some rare circumstances. From a similar commit to iwlwifi. * Update sensitivity settings for 5000 series to workaround a performance bug in the DSP (1000 is not affected so we keep the old values for 5000). * Update sensitivity settings for 6000 series. * Set differential gains on 6250 too (but use a 1.0 factor, not 1.5). * Init OFDM sensitivity with min value (which depends on the chip) instead of hardcoding it to 90. * Read calibration version from ROM and set IWN_GP_DRIVER_CALIB_VER6 bit on 6x50 if version >= 6. Approved by: rpaulo (mentor) Obtained from: OpenBSD MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Apr 10 06:55:29 2010 (r206443) +++ head/sys/dev/iwn/if_iwn.c Sat Apr 10 06:58:24 2010 (r206444) @@ -562,12 +562,15 @@ iwn_attach(device_t dev) #if IWN_RBUF_SIZE == 8192 IEEE80211_HTCAP_AMSDU7935 | #endif - IEEE80211_HTCAP_SMPS_DIS | IEEE80211_HTCAP_CBW20_40 | IEEE80211_HTCAP_SGI20 | IEEE80211_HTCAP_SGI40; if (sc->hw_type != IWN_HW_REV_TYPE_4965) ic->ic_htcaps |= IEEE80211_HTCAP_GF; + if (sc->hw_type == IWN_HW_REV_TYPE_6050) + ic->ic_htcaps |= IEEE80211_HTCAP_SMPS_DYN; + else + ic->ic_htcaps |= IEEE80211_HTCAP_SMPS_DIS; #endif /* Read MAC address, channels, etc from EEPROM. */ @@ -680,7 +683,7 @@ iwn_hal_attach(struct iwn_softc *sc) break; case IWN_HW_REV_TYPE_1000: sc->sc_hal = &iwn5000_hal; - sc->limits = &iwn5000_sensitivity_limits; + sc->limits = &iwn1000_sensitivity_limits; sc->fwname = "iwn1000fw"; sc->txchainmask = IWN_ANT_A; sc->rxchainmask = IWN_ANT_AB; @@ -1609,6 +1612,7 @@ iwn4965_print_power_group(struct iwn_sof void iwn5000_read_eeprom(struct iwn_softc *sc) { + struct iwn5000_eeprom_calib_hdr hdr; int32_t temp, volt; uint32_t addr, base; int i; @@ -1632,6 +1636,12 @@ iwn5000_read_eeprom(struct iwn_softc *sc iwn_read_prom_data(sc, IWN5000_EEPROM_CAL, &val, 2); base = le16toh(val); + iwn_read_prom_data(sc, base, &hdr, sizeof hdr); + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: calib version=%u pa type=%u voltage=%u\n", + __func__, hdr.version, hdr.pa_type, le16toh(hdr.volt)); + sc->calib_ver = hdr.version; + if (sc->hw_type == IWN_HW_REV_TYPE_5150) { /* Compute temperature offset. */ iwn_read_prom_data(sc, base + IWN5000_EEPROM_TEMP, &val, 2); @@ -2138,7 +2148,8 @@ iwn5000_rx_calib_results(struct iwn_soft switch (calib->code) { case IWN5000_PHY_CALIB_DC: - if (sc->hw_type == IWN_HW_REV_TYPE_5150) + if (sc->hw_type == IWN_HW_REV_TYPE_5150 || + sc->hw_type == IWN_HW_REV_TYPE_6050) idx = 0; break; case IWN5000_PHY_CALIB_LO: @@ -2668,8 +2679,10 @@ iwn_intr(void *arg) sc->ict_cur = (sc->ict_cur + 1) % IWN_ICT_COUNT; } tmp = le32toh(tmp); - if (tmp == 0xffffffff) - tmp = 0; /* Shouldn't happen. */ + if (tmp == 0xffffffff) /* Shouldn't happen. */ + tmp = 0; + else if (tmp & 0xc0000) /* Workaround a HW bug. */ + tmp |= 0x8000; r1 = (tmp & 0xff00) << 16 | (tmp & 0xff); r2 = 0; /* Unused. */ } else { @@ -4022,7 +4035,7 @@ iwn_init_sensitivity(struct iwn_softc *s /* Set initial correlation values. */ calib->ofdm_x1 = sc->limits->min_ofdm_x1; calib->ofdm_mrc_x1 = sc->limits->min_ofdm_mrc_x1; - calib->ofdm_x4 = 90; + calib->ofdm_x4 = sc->limits->min_ofdm_x4; calib->ofdm_mrc_x4 = sc->limits->min_ofdm_mrc_x4; calib->cck_x4 = 125; calib->cck_mrc_x4 = sc->limits->min_cck_mrc_x4; @@ -4115,9 +4128,6 @@ iwn5000_init_gains(struct iwn_softc *sc) { struct iwn_phy_calib cmd; - if (sc->hw_type == IWN_HW_REV_TYPE_6050) - return 0; - memset(&cmd, 0, sizeof cmd); cmd.code = IWN5000_PHY_CALIB_RESET_NOISE_GAIN; cmd.ngroups = 1; @@ -4165,10 +4175,10 @@ iwn5000_set_gains(struct iwn_softc *sc) { struct iwn_calib_state *calib = &sc->calib; struct iwn_phy_calib_gain cmd; - int i, ant, delta; + int i, ant, delta, div; - if (sc->hw_type == IWN_HW_REV_TYPE_6050) - return 0; + /* We collected 20 beacons and !=6050 need a 1.5 factor. */ + div = (sc->hw_type == IWN_HW_REV_TYPE_6050) ? 20 : 30; memset(&cmd, 0, sizeof cmd); cmd.code = IWN5000_PHY_CALIB_NOISE_GAIN; @@ -4181,7 +4191,7 @@ iwn5000_set_gains(struct iwn_softc *sc) if (sc->chainmask & (1 << i)) { /* The delta is relative to antenna "ant". */ delta = ((int32_t)calib->noise[ant] - - (int32_t)calib->noise[i]) / 30; + (int32_t)calib->noise[i]) / div; /* Limit to [-4.5dB,+4.5dB]. */ cmd.gain[i - 1] = MIN(abs(delta), 3); if (delta < 0) @@ -4464,7 +4474,7 @@ iwn_config(struct iwn_softc *sc) /* Configure bluetooth coexistence. */ memset(&bluetooth, 0, sizeof bluetooth); - bluetooth.flags = IWN_BT_COEX_MODE_4WIRE; + bluetooth.flags = IWN_BT_COEX_CHAN_ANN | IWN_BT_COEX_BT_PRIO; bluetooth.lead_time = IWN_BT_LEAD_TIME_DEF; bluetooth.max_kill = IWN_BT_MAX_KILL_DEF; DPRINTF(sc, IWN_DEBUG_RESET, "%s: config bluetooth coexistence\n", @@ -5824,6 +5834,10 @@ iwn5000_nic_config(struct iwn_softc *sc) /* Use internal power amplifier only. */ IWN_WRITE(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_RADIO_2X2_IPA); } + if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) { + /* Indicate that ROM calibration version is >=6. */ + IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6); + } return 0; } Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Sat Apr 10 06:55:29 2010 (r206443) +++ head/sys/dev/iwn/if_iwnreg.h Sat Apr 10 06:58:24 2010 (r206444) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: if_iwnreg.h,v 1.34 2009/11/08 11:54:48 damien Exp $ */ +/* $OpenBSD: if_iwnreg.h,v 1.37 2010/02/17 18:23:00 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -216,6 +216,7 @@ #define IWN_GP_DRIVER_RADIO_3X3_HYB (0 << 0) #define IWN_GP_DRIVER_RADIO_2X2_HYB (1 << 0) #define IWN_GP_DRIVER_RADIO_2X2_IPA (2 << 0) +#define IWN_GP_DRIVER_CALIB_VER6 (1 << 2) /* Possible flags for register IWN_UCODE_GP1_CLR. */ #define IWN_UCODE_GP1_RFKILL (1 << 1) @@ -832,10 +833,9 @@ struct iwn5000_cmd_txpower { /* Structure for command IWN_CMD_BLUETOOTH. */ struct iwn_bluetooth { uint8_t flags; -#define IWN_BT_COEX_DISABLE 0 -#define IWN_BT_COEX_MODE_2WIRE 1 -#define IWN_BT_COEX_MODE_3WIRE 2 -#define IWN_BT_COEX_MODE_4WIRE 3 +#define IWN_BT_COEX_CHAN_ANN (1 << 0) +#define IWN_BT_COEX_BT_PRIO (1 << 1) +#define IWN_BT_COEX_2_WIRE (1 << 2) uint8_t lead_time; #define IWN_BT_LEAD_TIME_DEF 30 @@ -1326,6 +1326,12 @@ struct iwn_eeprom_enhinfo { int8_t mimo3; /* max power in half-dBm */ } __packed; +struct iwn5000_eeprom_calib_hdr { + uint8_t version; + uint8_t pa_type; + uint16_t volt; +} __packed; + #define IWN_NSAMPLES 3 struct iwn4965_eeprom_chan_samples { uint8_t num; @@ -1552,8 +1558,8 @@ static const struct iwn_sensitivity_limi }; static const struct iwn_sensitivity_limits iwn5000_sensitivity_limits = { - 120, 155, - 240, 290, + 120, 120, /* min = max for performance bug in DSP. */ + 240, 240, /* min = max for performance bug in DSP. */ 90, 120, 170, 210, 125, 200, @@ -1575,8 +1581,20 @@ static const struct iwn_sensitivity_limi 95 }; +static const struct iwn_sensitivity_limits iwn1000_sensitivity_limits = { + 120, 155, + 240, 290, + 90, 120, + 170, 210, + 125, 200, + 170, 400, + 95, + 95, + 95 +}; + static const struct iwn_sensitivity_limits iwn6000_sensitivity_limits = { - 105, 145, + 105, 110, 192, 232, 80, 145, 128, 232, @@ -1642,7 +1660,7 @@ static const char * const iwn_fw_errmsg[ "DEBUG_1", "DEBUG_2", "DEBUG_3", - "UNKNOWN" + "ADVANCED_SYSASSERT" }; /* Find least significant bit that is set. */ Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Sat Apr 10 06:55:29 2010 (r206443) +++ head/sys/dev/iwn/if_iwnvar.h Sat Apr 10 06:58:24 2010 (r206444) @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $OpenBSD: if_iwnvar.h,v 1.16 2009/11/04 17:46:52 damien Exp $ */ +/* $OpenBSD: if_iwnvar.h,v 1.17 2010/02/17 18:23:00 damien Exp $ */ /*- * Copyright (c) 2007, 2008 @@ -281,6 +281,7 @@ struct iwn_softc { bands[IWN_NBANDS]; struct iwn_eeprom_chan eeprom_channels[IWN_NBANDS][IWN_MAX_CHAN_PER_BAND]; uint16_t rfcfg; + uint8_t calib_ver; char eeprom_domain[4]; uint32_t eeprom_crystal; int16_t eeprom_voltage; From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 07:00:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEF04106564A; Sat, 10 Apr 2010 07:00:26 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBF088FC18; Sat, 10 Apr 2010 07:00:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3A70QcE005483; Sat, 10 Apr 2010 07:00:26 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A70QG1005481; Sat, 10 Apr 2010 07:00:26 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004100700.o3A70QG1005481@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 10 Apr 2010 07:00:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206445 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 07:00:26 -0000 Author: bschmidt Date: Sat Apr 10 07:00:26 2010 New Revision: 206445 URL: http://svn.freebsd.org/changeset/base/206445 Log: iwn4965_set_txpower() uses maxpwr from EEPROM to calculate the power to set, it make sense to actually initialize that array. This fixes some issues with 4965 adapters where the TX power is crucial. This got lost somewhere while merging with the OpenBSD code. Approved by: rpaulo (mentor) Obtained from: OpenBSD MFC after: 2 weeks Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Apr 10 06:58:24 2010 (r206444) +++ head/sys/dev/iwn/if_iwn.c Sat Apr 10 07:00:26 2010 (r206445) @@ -1711,6 +1711,10 @@ iwn_read_eeprom_band(struct iwn_softc *s c->ic_ieee = chan; c->ic_maxregpower = channels[i].maxpwr; c->ic_maxpower = 2*c->ic_maxregpower; + + /* Save maximum allowed TX power for this channel. */ + sc->maxpwr[chan] = channels[i].maxpwr; + if (n == 0) { /* 2GHz band */ c->ic_freq = ieee80211_ieee2mhz(chan, IEEE80211_CHAN_G); From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 07:07:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01E421065672; Sat, 10 Apr 2010 07:07:09 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E04798FC13; Sat, 10 Apr 2010 07:07:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3A778HJ007000; Sat, 10 Apr 2010 07:07:08 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A778OQ006995; Sat, 10 Apr 2010 07:07:08 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004100707.o3A778OQ006995@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 10 Apr 2010 07:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206446 - in head/sys: conf contrib/dev/iwn modules/iwnfw/iwn6000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 07:07:09 -0000 Author: bschmidt Date: Sat Apr 10 07:07:08 2010 New Revision: 206446 URL: http://svn.freebsd.org/changeset/base/206446 Log: Update firmware for the 6000 series Intel cards to version 9.193.4.1. Approved by: rpaulo (mentor) MFC after: 2 weeks Added: head/sys/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu Deleted: head/sys/contrib/dev/iwn/iwlwifi-6000-9.176.4.1.fw.uu Modified: head/sys/conf/files head/sys/contrib/dev/iwn/LICENSE head/sys/modules/iwnfw/iwn6000/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Apr 10 07:00:26 2010 (r206445) +++ head/sys/conf/files Sat Apr 10 07:07:08 2010 (r206446) @@ -1190,7 +1190,7 @@ iwn6000fw.fwo optional iwn6000fw | iwn clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ dependency ".PHONY" \ - compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.176.4.1.fw.uu" \ + compile-with "uudecode -o ${.TARGET} $S/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu" \ no-obj no-implicit-rule \ clean "iwn6000.fw" dev/ixgb/if_ixgb.c optional ixgb Modified: head/sys/contrib/dev/iwn/LICENSE ============================================================================== --- head/sys/contrib/dev/iwn/LICENSE Sat Apr 10 07:00:26 2010 (r206445) +++ head/sys/contrib/dev/iwn/LICENSE Sat Apr 10 07:07:08 2010 (r206446) @@ -1,39 +1,39 @@ -Copyright (c) 2006-2009, Intel Corporation. +Copyright (c) 2006-2010, Intel Corporation. All rights reserved. -Redistribution. Redistribution and use in binary form, without -modification, are permitted provided that the following conditions are +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are met: -* Redistributions must reproduce the above copyright notice and the - following disclaimer in the documentation and/or other materials - provided with the distribution. -* Neither the name of Intel Corporation nor the names of its suppliers - may be used to endorse or promote products derived from this software - without specific prior written permission. -* No reverse engineering, decompilation, or disassembly of this software +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software is permitted. -Limited patent license. Intel Corporation grants a world-wide, -royalty-free, non-exclusive license under patents it now or hereafter -owns or controls to make, have made, use, import, offer to sell and -sell ("Utilize") this software, but solely to the extent that any -such patent is necessary to Utilize the software alone, or in -combination with an operating system licensed under an approved Open -Source license as listed by the Open Source Initiative at -http://opensource.org/licenses. The patent license shall not apply to -any other combinations which include this software. No hardware per +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per se is licensed hereunder. -DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Added: head/sys/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu Sat Apr 10 07:07:08 2010 (r206446) @@ -0,0 +1,8152 @@ +Copyright (c) 2006-2010, Intel Corporation. +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Intel Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. +begin-base64 644 iwlwifi-6000-9.193.4.1.fw.uu +AQTBCf5MAAAUSAIAAEABAJhFAgAAQAEAAAAAACAggA8AAEAAaSAAAGkgQABpIAAAaSBAACAggA8A +AOgAaSAAAGkgQABpIAAAaSBAACAggA8AAHgGaSAAAGkgQABpIAAASiAAAEohAABKIgAASiMAAEok +AABKJQAASiYAAEonAABKIAAQSiEAEEoiABBKIwAQSiQAEEolABBKJgAQSicAEEogACBKIQAgSiIA +IEojACBKJAAgSiUAIEomACBKJwAgSiAAMEohADAKJIA/gQAAQEEsnDBALJwwQiQcNAoigD+AADCD +CiMANz4IQABKJgBwaSBAAEomAHBKJgBwSiYAcEomAHAAFgBwgABkBEB4ICBAhwAAAAAAAAAAAADh +wOHB4cLPcKAAyB8WEAGGz3KAAJiXIKISEAGGIaITEAGGIqIUEAGGI6IVEAGGJKIkEAGGJqLPcZ8A +uP9WoYoh/w8SGFiAExhYgBQYWIAVGFiAJBhYgMHCwcHBwCAgQIcMyM9yoADIHw4aGIANyA8aGIAO +yBAaGIAPEgE2AcgkeBEaGIAQyC0aGIDgfuHE/BzIvvwcSL7hwOHB4cLhw/wcCLH8HEix/ByIsfwc +yLH8HAiy/BxIsvwciLL8HMiy/BwIv2okgBDhxGokwBDhxPHAz3CgANAbFIDPcYAAYAQEIICPz1EE +4QChCvIvKQEAz3CAANwN8CBAAEB42v/RwMHEayTAEMHEaySAEMHEn3QEFAs0BBQKNAQUCTQEFAg0 +BBQHNAQUBjQEFAU0BBQENMHDwcLBwcHAwcRFLH4QCiZAfsHEaySAFMHEICBAhwzIh7gMGhgwDcib +uA0aGDAOyA4aGDAPyIe4DxoYMBDIEBoYMOB+4HjxwAzIlbgMGhgwDcibuA0aGDAPyIq4jbiQuA8a +GDDPcIAAHA8YiIHgC/QPyM9xAAD0DKy4DxoYMJYOIAAP2GfYdgsgAYohRwbRwOB+8cDPcIAAsMcA +gIYg/oEJ9A/IBSCADwAAANQPGhgwof+KIFUFRgsgAYohhwro8eB4z3EDAEANz3CgAKggLaDPcYAA +jARAgQFqAKHPcKAAOC4FgAQggA/AAAAA13DAAAAACvJI2M9xnwC4/xqhW6Fp2Bi4GaHPcIAAaAgl +gCOBIIHHcQAAiBNFBsAJ4HjPcIAAaAjVBcAJ4HjxwLIMAAGA4M93gABgBIh1BfKB4AX0AdgC8ADY +C6+A4QXygeEF9AHYAvAA2AqvgOIF8oHiBfQB2ALwANgMrwDYz3agAMgfGB4YkAuPgOCKIRAAD/II +j4DgC/LPcAMAQA1FHhgQMKYC2BgeGJAC8DGmCo+A4BnyCY+A4Bfyz3ACABJIIB4YkM9wgAAoACEe +GJDPcIAAXAQiHhiQGBYAlkUgAAMYHhiQDI+A4AjyGBYAloUgAQQYHhiQgeMH9BgWAJaIuBgeGJDP +cIAAMIwAkI7gzCCiggb0GBYAloC4GB4YkIDlGfIA2JS4z3WAAIAEAKVx2Aa4+g0gAfzZIIXPcAAA +TBzuDSABn7kYFgCWhbgYHhiQCQQAAeB4z3Gqqru7z3CfALj/NqA2oDagNqDPcaAAyDsOgYi4DqFp +IEAA/vHgePHApcFBwELBDBwAMRAcQDHPcYAAfIQ0GcAPMBkADywZwA4oGYAOJBlADs9wgAB8hCAY +QAvPcIAAfIQcGAALz3CAAHyEGBjACs9wgAB8hBQYgArPcIAAfIQQGMAIz3CAAHyEDBiACM9wgAB8 +hAgYQAjPcYAAAISAGQAIfBnAB3gZgAd0GUAHcBkAB2wZAAdoGYAGZBlABmAZAAZcGcAFWBmABVQZ +QAVQGQAFTBnABEgZgAREGUAEQBkABO+hzqGtoYyhLBnAAigZgAIkGUACIBkAAhwZwAEYGYABFBlA +ARAZAAFjoWogAAPYGQAAaiDAAtQZAABqIIAC0BkAAGogQAHIGQAAaiAAAcQZAABqIMAAwBkAAGog +gAC8GQAAaiBAALgZAABqIAAAtBkAAGoggAHMGQAA0NifuM9xnwC4/x2hz3CAAAAAxIBTJcQ1UybF +Nde6AebTvsSgUyPABAUmjh/Q/gAA1qEFIIAPsP4AABahGIFTJ841AN2UuBihQMMBwALByXMMFAYw +WgggARAUBzDPcKAAtA+8oM9xoADIOy6B8g/gAH3YcgiAAU4MIAGpcAjYANn6CyABmbnPcIAAMIwA +kI7gzCCigsoggQ/gAMQxyiEhACQJYQHPIaEF/QXP//HAagkgAXvYqg/gAPDZz3GAAHyENBnADzAZ +AA8sGcAOKBmADiQZQA7PcIAAfIQgGEALz3CAAHyEHBgAC89wgAB8hBgYwArPcIAAfIQUGIAKz3CA +AHyEEBjACM9wgAB8hAwYgAjPcIAAfIQIGEAIz3GAAACEgBkACHwZwAd4GYAHdBlAB3AZAAdsGQAH +aBmABmQZQAZgGQAGXBnABVgZgAVUGUAFUBkABUwZwARIGYAERBlABEAZAATvoc6hraGMoSwZwAIo +GYACJBlAAiAZAAIcGcABGBmAARQZQAEQGQABY6FqIAAD2BkAAGogwALUGQAAaiCAAtAZAABqIEAB +yBkAAGogAAHEGQAAaiDAAMAZAABqIIAAvBkAAGogQAC4GQAAaiAAALQZAABqIIABzBkAAAogwCfP +daAAyB8ZFRKWz3AAAEQcvghgAQohwC96cM9wgAAcQSOAz3afALj/z3CAAAAARICA4QHiUyLDBCTy +GRUCllEiwIAe8l2GQN+fv/2mZKAFI4MP0P4AAHamWB6AFyEVAJYiFQCWBCGBD/8A/P8AgRamCNgZ +HRiQVqZdpvkHwADQ2Z+5PaZkoAUjgw/Q/gAAdqYH2DoIYAEKuFMgQQcH2PoJIAEKuM9woADUCxiA +QiAACEggAADPd4AAgAzPcYAAgAQggdQfABALIcCEyiUiE8ogYgAy9EwigKAP9FEjgKUJ8oDgB/RB +K00lwL0c5QHYJPAE3SHwjCIEoBzyTCIAohTyCvZMIkCgDvJMIgChFPQT3RPwTCIApAryjCIBoAz0 +Ft0L8A3dCfAU3QfwFd0F8BfdA/AP3QDYgeAG9FgewBSyCkACcYepcCpxCnIKJIAEnQPv/wolwATt +Ac//8cBeDcAAddgaDeAAiiFKD8IMAAAaCMACS/6iCAAACiHAD+tyBtiKI4sDSiQAAGUD7/8KJQAB +4HiA4fHAA/Kg4Iv2CiHAD+tyBdj020okQABBA+//uHPPcoAA3A0VeiCi0cDgfgDZnrkZec9ygADU +DQGCJXjgfwGiANmeuRl5z3KAANQNAYImeOB/AaIA2Z65GXnPcIAA1A0BgCR4QiAAgOB/yiBiAOB4 +z3CAANQNAYDgfy8oAQDgePHAog+P/+B44HjgeOB4aSCAAW8hPwBpIAAA9/HxwGrYSgzgAIohBAYA +2I24NglgBQoaGDAUzIYg/4oJ8s9wgAAYBQCIgOCcDkIFsPHxwMIOQAXPcYAAgAjwIQAAQHjPcKAA +0BuA2lCgz3CAAAAAAIBRIACCANkG8s9wnwC4/z2glPHgePHAxg3AAM9xgAAAAACBUSDAgBvyAYFR +IMCAQNjPIOIHyiCBDwAA0ADPIOEHz3KfALj/HaIEgQHg07gEoQUggA/Q/gAAFqLPcIAAYASggM9w +gAAcDwiABCWNHw8AAODruAHeBvT+CwAMgOAO9M9xoAC0RwDYSxkYgHcZmIMA2J64VBkYgM9ygACY +BCCC4YIEJYQfAQAAAEAsgACkeAQlgx8AAABAB3kDuyCipHsEeWd/BiVAEOGiBCWBHwAAAIAvIgIB +RXkCueR7BCWNHwIAAABmeKR5JngvKAEATiBBBM9wgAB0g/AgQgDPcIAATM2EKgsMMCBADlMgQIAb +GlgwLfTPcJ8AuP84oIbhGfTPcoAAiJYJkoDgDPIbGpgzyXHPcoAAgAwcggHgHKIX8AySgOAT8gTZ +GxpYMPPxhOHMIWKAC/TPcIAAiJYOkIDgBfIG2RsaWDDl8c9yoAAUBCqiz3CAAOQHAIiB4AX0CYK4 +4ADYgvcB2IDgCPTPcKAAiCA1eMCgOfDPcYAAIAUA2AChANmRuc9woADIHxMYWIDPcIAA0AIQeM91 +oAC0R0kdGJDPcYAAZKbPcIAAJAUgoG8nQxBUHdiTGg8gBQoamDOWCgAMgOAR9ADYkbjPcaAAyB8T +GRiAz3CAAAAEEHhJHRiQVB3Ykz0EwADgePHAzgvAAM9xgABYDYARAADPdaAAyB8vLgEQz3ADAEAN +n+ZFHRgQAN8f8s9ygAAAAACC8rgZ8gGC8rhA288j4gfKI4EPAADQAM8j4QfPcJ8AuP99oGSCAePT +u2SiBSODD9D+AAB2oPAhgANAeJ/mDPLPcIAAAAAAgPK4BvLPcJ8AuP/9oIDYFR0YkK0DwADgePHA +z3GAAGAEfNhWCeAAIIEKIcAP63IF2IojhANKJAAArQev/wolAAHxwOHFz3CAAGAEoIBr2AQljR8P +AADgIgngAIohCAgvKEEDGgjgD04gQAQKJQCAyiHCD8oiwgfKIGIByiOCDwAAJgJkB6L/yiRiAH/Y +CrjPcaAA0BsToX/YEKE1A8AA4HjxwOHFz3WAAAAAAIXvuBryAYXvuEDYzyDiB8oggQ8AANAAzyDh +B89xnwC4/x2hBIUB4NO4BKUFIIAP0P4AABaha9iWCOAAiiHIDJIPoA8E2AolAIDKIcIPyiLCB8og +YgHKI4IPAAA1AtwGov/KJGIAAIXvuAbyANnPcJ8AuP89oK0CwABKJAB2ANmoIMADz3CAAFwONnhh +gECAz3CAAFgNAeFVeGCg4H7gfuB4USFAxwXyDci9uA0aGDAA2Z25z3CgANAbMaDgfuB+4HjxwIHg +zCCigAX0z3KAABwPBPDPcoAAYMrPcYAAtJeB4Mwg4oAp9GiCYKFpgmGhfIpoqX2KaakqEoMAaqkr +EoMAa6ksEoMAbKl0knapbZJnsXeSaLFogsC7dKloggQjgw8ABgAAgOMB28B7cqmEEgIAVBmYABzw +YIFoomGBaaJoiXyqaYl9qmqJKhrCAGuJKxrCAGyJLBrCAHaJdLJnkW2yaJF3slQRAwaEGsAAguAG +9O4MIAFAIQAG0cDgfs9wgABgyiCAz3KgAIAlJqIikCeiIoAqoiaQK6LPcYAAsMcggVEhQIAggBX0 +KKIikCmiIoAxoiaQMqIigDeiJpA4oiKAO6ImkDyiIIA5oiKQOqIggDWiIpA2olkEABDgePHAzgjA +AM9wgAB4rgDe1KjPcIAAsMcAgFEgQIAT8gjfyXWA5cwlopDMJSKRzCVikdgI4gXKIEIDYb+A5wHl +M/cc8IokAXHPcYAAiJaoIEABBBmQA+B4ANlKJAByz3KAAOCYqCAAAxYiQAB2kM9wgAAAlzR4AeFg +sM91gABgys93gADwqkAlABIkb9IN4AAG2qlwQCeBEsYN4AAG2kAlABJAJwEUtg3gAAbaGI2E4A/0 +iiAPCjoOoACKIdoMKBWAEK4LIBEohTIKwA8JhVEgQIEJ8ooghw4aDqAAiiGbAn4PwAnPcIAAsMcA +gFEgQIBgDoEDz3EAAP//z3CAAKSnLKAroAUamDOn/y0AwADxwMIPoAAA2oQoCwwAIYN/gABgyrUb +mADPdoAAAGy0aLpmUoIChgAhgX+AAFzMz3eAAASZuhuYAGGG3BnAAGWG4BkAAAaG5BnAAOgZAAAW +J4AQFiaBEAjgBOGyDeAFCNrdZRSFFn4Wf0AnABIkbp4N4AUI2rUHgADxwADY4f82D+AFANjPcIAA +rEVKCYAJz3CAAOxFPgmACcIJAAb2C0AEAdgA2YIOIA+A2uoPQAzyD4APSg7ACY4IAAuWDUAKANha +DCAQCHHPcIAAXGMAiFEggIAI8s9xoADAHQCBoLgAoXoIAA0KDwAKqQXP//HA4cUA3c9wgABMBaCg +z3CAAFyurLBqCSAKqXCiCY//SgqgDKlwMgxABvoLwAWqD0ALzgrgDKlwmgrADBEHgADxwJoOgACC +4KPBBvTPdYAAHA8I8IQoCwwAIY1/gABgyoLgBvTPdoAArLQJ8M9xgAAozYQoCwwAIU4OLZU8eihw +hiHxD0e5wrqGIP4DJHpEuFBxyiHCD8oiwgfKIGIByiOCDwAAUATKJCIAvAKi/8olAgFIhTu6UyIC +gECuTZXAukGuDPJ3lYYj/wlDu2eud5WGI/4HRbtoroDiEvLPcoAA9E4VIgMAAIs1egKuAYsDrgKL +BK4DiwWuA4oL8AHZKa4C2AKuI64A2ASuA9gFrgaui3DJcQoM4AUM2gDAAcGiCyANAsKLcMlx9gvg +BQzaAMABwQ4MIA0Cws9xgADABgChDZVEuOC4ANkvpQXyiiEIAC+l4bgD8ou5L6VRIICABPKNuS+l +4QWgAKPA4HjxwGoNoACYcIQoCwwAIYB/gABgylUgRgoogFUgxQtRIcCAiiEIAMohIQDYGEQASiQA +cgDZqCCAD891gABYcPyILmXkfi8qgQNOIoMHz3KAAHxwb2IAJkMA4KtUEI8A5H4vLoETTiaPF+5i +yKvIgFEmwJAP8l2IhuHTIqYALyqBAE4ijQfPcoAAhHCqYhDwz3aAAGxwLmbOZbyIxH1sEI4AxH0v +LUETTiWOF8piUKsB4UokAHIA2qgggQDciM9zgABkcE9jz3WAAHxw5H4vKYEDTiGPB+9lACaBAPyp +VBCPAOR+Ly6BE04mjxfuZSQZggPIgFEmwJAP8n2IgOLTI6EALyvBAE4jjQfPc4AAhHCrYxHwgOID +8slqAvBIds5jfIjEe2wQjgDEey8rwQBOI44Hy2UsGcIAAeJKJABxANqoIEAFz3GAAGBwfYhJYQAl +jAAB4mR5LylBAE4hgwfPcYAAhHBpYSCsJgjgCIhwZQSAAPHA+guAAILgBfTPcYAAHA8H8IQoCwwA +IYF/gABgyumBWIlBL8MQwLsXu8dzAACAHOS/zyMiBuC/Tt3PI6IAyiWCHwAATgGG4s8lYRLlvyz0 +z3KAALSXFhKFAM9ygABszUaSsHLPdoAAYMrFFgQWDPTEFgIWUyIFAM9ygAC0l1SKsHIL8kEsQgFR +IgCABfJJhlEiQIEJ9FEkQIEG9EmGUSJAgQPygbvPcoAAVM1UiofizyPhAFEnAJLPI6IFguCIGcAA +jBlAAwb0z3GAABwPCPCEKAsMACGBf4AAYMppEYMAThEOAQ4jgg8AADoBCbpifkV+WpFiehK6RX5b +kWJ6QCrNBcV9BCW+nwDwAADKIcIPyiLCB8ogYgHKI4IPAADqAM8j4gLKJMIAYAdi/8olQgOC4JAZ +QAMG9M91gAAcDwjwhCgLDAAhjX+AAGDKz3CAADCMAJCO4MwgooIq8gfYDgvgAAq4BCCADwcAAAAw +uIfgZAANADMmAHCAAGRsQCcBchR5AHmKIAQAlB0AEB7wiiAQAJQdABAa8ADYi7iUHQAQFPAA2Iy4 +lB0AEBDwANiNuJQdABAK8APYDLiUHQAQBvAA2I64lB0AEIIgAQGVAqAAlB0AEAohwA/rcgXYz3MA +AB8JSiQAAKUGb/8KJQAB4HjxwAoKgACC4Ah1BvTPdoAAHA8I8IQtCxwAIY5/gABgygHZaB5CEADf +gB7AE0zYTh4EEAXYEKYK2Bu2ENgathTYTB4EEC3YUB4EECbYUh4EEEokAHLpcKgggA3PcoAAuHD0 +IgMAz3KAALyoFHpgss9ygADIcPQiAwDPcoAAzKgUemCyz3KAANhw9CIDAM9ygADcqBR6YLLPcoAA +6HD0IgMAz3KAAOyoFHpgss9ygAD4cPQiAwDPcoAA/KgUegHgYLIIhuW4BfIE2mIeghAD8GIewhPk +uAryCdlqHkQQLtpdtgLaaR6CEArwFNpqHoQQMtpdtmkeQhAU2VmOUSAAgFlhMHlqHkQQGuE8tgry +CthkHgQQBthmHgQQB9gI8BDYZB4EEGYexBMF2BCmqXCS/jyOKHBUHkIQhiADAOa5bB4CEMoiQQAL +8lAhwwFvelQewhBQIMMBb3hsHsIQ5bkH8khzhiMDAG96VB7CEOS5BPKluGweAhBRIcCABPKkulQe +ghCC5RjyqXDH/s9wgAA0zYQtCxwwIEAOUSBAgPHYwCgiAcoggQ8AAJMAwCghAaAeABAY2I24F6YI +hlEgwIDPcIAAYMoG8r4QgACJuATwpRCAABamz3CgAKwvGYAwuMC4Ng8gEFUeAhAIhgQgvo8ABgAA +C/I2uMC4G3gB4G4eBBAC2IAeABAD8G4exBMA2BymHaapcAD/KIYB2khzQSkABTW5UiAAAFIhAQDA +uMC5Lgtv/5hyQQCAAOB4z3CAABwPCIDPcaQAHEDAuBN4wbgSoeB+8cDhxc91gAAcD1eVz3GAAMQG +4LpX2AChA/Jf2ACh4roD8oW4AKFRIkCABPKHuAChz3GAAKy0QIkA2YDiyiBBAM9xpQDoDwahz3Gg +AKQwAYGA4s8g4gDQIOEAAaGmDEANMIXPcKAAyBwooBIOoA0PhcEHQADhxc9wgAAcDymARCGDgADa +JPSQ4ooABgAAIo0PgACYQwCNoLgArYAVgBCguIAdAhBAFYAQoLhAHQIQEI2guBCtkBWAEKC4kB0C +EFAVgBCguFAdAhAB4t/xkOJGAAYAACKND4AAmEMAjYC4AK2AFYAQgLiAHQIQQBWAEIC4QB0CEBCN +gLgQrZAVgBCAuJAdAhBQFYAQgLhQHQIQAeLe8ea5EPLPcoAAmEMIioC4CKqIEoAAgLiIGgIASBKA +AIC4EvCA4xL0z3KAAJhDCIqguAiqiBKAAKC4iBoCAEgSgACguEgaAgBRIQCAANge8kokAHTgeKgg +QAbiuBTyACCDD4AAmEMgE4EAgLkgG0IAoBOBAIC5oBtCAGATgQCAuWAbQgAB4B3wSiQAdOB4qCBA +BuK4FPIAIIMPgACYQyATggCguiAbggCgE4IAoLqgG4IAYBOCAKC6YBuCAAHg4H/BxeB48cDmDWAA +B9rPdqAAyB9IHpiQz3WAABwPgBUAEM9xqwCg/0weGJAA2BmhWqEYoYogBAAPpmoVABHPd4AAMIyw +HgAQtB4AEB/YCLgOpgiFUSAAgADYi7gV8hCmVgzAD89xoACkMAGBhLgBoQSXheAa9ADZlLnPcKAA +BEQloBLwEaZ+DMAPz3GgAKQwAYGkuAGhBJeF4Ab0z3GgAAREANgFoc9wgADMBACA4LgK8oYg/w4i +uBS4z3GgAAREBaFW/8oJAA1b/3f/z3AAAFVVWh4YkAHYWR4YkAiFz3GmACgA87gG8gDYD6GaDAAQ +BPAB2A+hbhUBEc9wpgDoByag/g/ABM4PoAwNlQePgOAL8oog2An2CmAAAdm+CSADAtgE8JIO4AQB +2IgVABDPcaAAxCcPGRiAjBUCEM9woAAwEESgz3CAALShEHiPGRiAz3KAAGSiUHiWIgIAELpFeJAZ +GICKIAQAkhkYgJAVABBAl0AZAIDPcIAAmENTGRiADxEAho7in7gPGRiAzCKiggj0CBEAgIUghAAI +GQCAiuIH9AgRAICKuAgZAIAP2BAZAICUFQAQHBkYgAiF/bgN8rYPoA8A2LoPoA8B2M9xpgD0zwHY +EqED8KIPgA95BEAA4HjxwAYMQAAKJQCQz3CAAGDKGnEF9MUQAQYC8CmAJblRIQCAKPLPcoAAtJfP +cYAAbM0mkXaKMHMI9MQQAQZUisC5UHEL8sUQAQZRIUCBBfIpgFEhQIEO9AohwA/rcgXYz3MAADYJ +SiQAADEAb/8KJQABhC0LHC93z3aAABwP+GDJccoIoAAp2s9xgACstAAngB+AACjNAgmgAAzaz3Cg +ALQPAN/8oEiGUyIAADIJYAw0lkIIAANc/4DlVArhDMogYQAEyFEggIAF8roPAAML8ADZnrnPcKAA +/EQhoM9woAC0D/ygTCAAoGQJ4g/KIGIAz3WAAKAEDI2A4AX0AguADQHYDK1pA0AA4HjxwPYKQAAK +JQCQAdgR8gTIUSCAgAz0CiHAD+tyBdiKIwgDSiQAAG0HL/+4cwDYhC0LHM92gABgygAmTx6EKAsM +QCYBGTAhQA5JhyW4JbpTIBEAUyISAOlwPg9gAA3Zyg+gEKlwCYeA5SW4UyAQAAb0A9gq/HD8BPBa +D4APTCAAoB7yTCIAoMohwg/KIsIHyiOCDwAALwLKIGIBxfXuD0AIHgngAAHYTCEAoM93gACwxwX0 +LgnACjIJwAoX8AIJ4AAA2IDlz3eAALDHBPS7/Anw/g6ADwCHUSBAgAQPgg9MIQCgTAuB/6lwBP6+ +C6ABqXBMIQCgBNgEGhgwMfTPcYAAtJfPcIAAbM0GkFaJEHII9MQWABY0icC4MHAP8sUWABZRIECB +CfIJhlEgQIEF8gCHUSBAgBP0qXAKcXD/f9kRuc9woACwHzSgkglACA/IBSCADwEAAPwPGhgwAIdR +IECAIPLPcYAAtJfPcIAAbM0GkFaJEHIH9MQWABY0icC4MHAJ8sUWABZRIECBCYbRIGKBCPQYjs9x +gAAcDxipCYYJoQHe9gwgDMlwz3CAAKEGDgsgDMCogeUM9M9wgABUzRSIh+AG9EwgAKB0DoIPSg6A +D0IPQAh+DUAAugugAgDYdQFAAOB48cAA2Ib/hgsP/89xgAC0lxaJNgigEDSJ1QdP//HA/ghAAIHg +z3aAAGDKGnAD9KmGA/DFFg0WJb2EKAssACZPHgmHwL1RIECByiHBD8oiwQfKIGEByiOBDwAAwQLK +JCEATAUh/8olAQTPcIAAcA9MIACgAYjMcTT0QIHPcYAAtJdAoQAWA0CA4GGhABaDQGipABaDQGmp +ABYAQQPyD7YAFoBABCKCDwAGAAAKqQAWgECA4gupABaAQAHaDKkAFoBAABYAQcB6B7EAFgBBCLEA +FgBAUqliDm//BNg58CCBz3KAAFjOxB5YEAAWAUCA4MUeWBAAFoFAFBpCgAAWgUAVGkKAzHAH8iCQ +z3CAAGzNIbAC8ACQABaAQM9xgABcziIaAoAAFoBAIxoCgAAWgEAkGgKAABaAQAAWAEEOGQSAABYA +QSIZBIAAFgBALyAHBHL9cgmgAQpwz3GAALSXFomA5c9ygABszUaSHvRQcAf0xBYAFjSJwLgwcBHy +xRYAFlEgQIEN8gmGUSBAgQnyz3CAALDHAIBRIECABvQphwpwJbnAud3+jgyAD8YLQADRBwAA8cAA +2Jr/z3GAALSXFomKDmAQNIkpBk//8cAA2c9woAC0DzygkgwADeoJQA2WDgAM/g1gDQDY/9nPcKsA +oP85oALYfgtgAAQaGDD1BU//4HiEKAsMACGAf4AAXMzgEAIAz3GAALCZ3BADAGAZgIDkEAIA6BAA +AFwZwIBsGYCA4H9wGQCA8cDiDiAAEtmpwQh2Vg1gAItwSiQAcQDaqCCAAhYkgDAoiIHhw/ZhuSio +AeIBwgLBhC4LHAAhgH+AAFzM3BiAAAXC4BhAAAbBtG7kGIAAx3WAAABsSBUREOgYQADPcIAABJkK +IEAuFiBABAjgg8HGDGAFCNr0hc9wgAAEmYfB9ngI4LIMYAUI2gDAACCNL4AAYMpRIACAtR0YEAjy +uh3YE7sVABaAuAfwuh1YFLsVABaguLsdGBDPcIAANMpUiDaIRCo+CwAhgH+AAJDINXgGiBB2/A7h +/8oggQO1FQAWUSBAgPHYwCgiAcoggQ8AAJMAwCghAUYKYACgHQAQRQYgAKnA4HgA2H7x8cClwYtw +cgpgAAXZAMLguhPyz3CAABwPGIiB4A30ANiauM9xoADIHw+hAcCkGQAAw9gauA6hUSKAgBbyBhIC +NgDZSiQAcuB4qCCAA7hxg3EoiREiQIAAIkAxZBhCAAnyQCVBAM4JQAClwNHA4H4KIcAP63IF2Ioj +jwj5AS//SiRAAOB48cDPcIAAHA8JgFEgQIHKIcIPyiLCB8ogYgHKI4IPAAApB8okYgDIASL/yiXC +AMoOQAzWD2AJAdjPcIAAVM0UiIfgI/TPcIAASM0LgFEgQIEb8s9wgADcyAqQz3GAAKiuJYEKuDBw +yiHCD8oiwgfKIGIByiOCDwAAMwfKJCIAcAEi/8olwgDCD8/+agggDADYQg7ACxoJQACVA0//8cAC +2K38tv2JA0//8cC2DAAAAN7PdaAAtA/cpXYKIAxod/j/ogugDOlwBMhRIICABPIKCQADCfAA2Z65 +z3CgAPxEIaDcpeUEAADgeIQoCwzPcYAASM0wIUIOz3CAAOCYVnh2kM9xgAC0l8QZ3AAXkM9zgACw +mcUZHADPcIAABJlWeAyIkBsCgADY4H/HGRwA8cDqDE//+giAD1YNT//1Ak//4HjxwCIMIABE2s91 +gAAAbMRtz3GAAAiZlglgAKlwSiSAcADZqCCACBRp2GBxgIQpCwwAIYJ/gABgygAhgH+AAFzMuhrY +AADbtRrYAGGFQoUB4dwYwABlheAYgABGheQYwADoGIAAKQQAAM9wgAC0l/kEIACKIQUF4HjxwKIL +IAAA2qHBQMIAFo5AABaNQAAWg0AAFpBAgOUd8ql3z3GAANS0I4mGJ/wXRb/DveZ54LnKIkIDYMLh +ucoiQgPKIiEAARyCMFEhgIDKJSEQAhxCM4DgJPTPcIAAtJe2iPSIsXPMJsGTEfIKIcAP63JAKwQE +EL4F2Ioj3gIFJEQDtQfv/gUmxRMAxUAgDgbPd4AAYMpUGFgDhB9AEyHwz3CAAGzNBpAQcwr0z3eA +AGDKxBcAFsC4EHYN8gohwA/rcgXYiiMeBZhzbQfv/kolAAAAxc92gAD8yN0fWBNAIEEgSSEBBjR5 +Ug8gAMlwQiDAJUggAACA4ADby/cA2gAWAUAB4oPivfcB4xBzuPdWJgAZKg8gAAbZz3CAALDHAIBR +IECAGvLPcYAAtJfPcIAAbM0GkFaJEHIH9MQXABY0icC4EHEK8sUXABZRIECBBvIJh1EgQIEO9AIO +YADJcM9wgACYD6KgiiASDV4IIACpcYYOAACRAiAAocDgeADYQvHxwKHBi3C2DiAAAdkAFAUwTCUA +gMohwQ/KIsEHyiBhAcojgQ8AAMwHjAbh/sokYQDPcIAA1LRCDiAAAxhCAaHA0cDgfvHA4gkAAM9z +gABUEEODAN/PdaAALCCwhdJq1H5+ZqWmBKYB4owiEIAmpkOjhfcCg+OjAeACoxUCAADgeADYz3Gg +AMgfGKEZoQHYDqHgfuB48cBqCQAACHe6cdpy+nMKIgAhCiNAIQohgCHPcAAAyBviCWAACiDAIRtw +z3AAAMwb0glAADtwz3AAAAQcxglAAM92oADIH5pwAdgTpgXYz3WAAMAPAKXhpQ7AIB0AFAmlFYYc +HUAUCqUYhhgdwBQLpRmGFB2AFAyloBYAEBAdwBUNpaQWABAMHYAVDqWoFgAQCB1AFQ+lz3ABAMEJ +EKVmCWAAKNgRpV4JYAAA2BKlUyfAdROlAshUHQAXFqUSFgCWUB0AFxelExYAls9ygADADxilFBYA +llMkASMZpRUWAJYQuRqlJBYAlkokQHkbpRYWAJYcpc9wgACADBGAHaXPcIAAwA94GIAKz3CAAMAP +fBjACs9wgAA8EAQYAAuEGkALz3CgAMgcCICIGgAAz3CAAHAFAICMGgAALyAHBgi4BXkvIEcGJXiQ +GgAAANioIEAC8CIDAM9xnwC4/wHgdqFNAAAA4Hj8HIi2/BxItvwcCLb8HMi1/ByItfwcSLX8HAi1 +/BzItPwciLT8HEi0/BwItPwcyLP8HIiz/BxIs+B+4HgE3DjdNfDgeATcNN0z8OB4BNww3THw4HgE +3CzdL/DgeATcKN0t8OB4BNwk3Svw4HgE3CDdKfDgeATcHN0n8OB4BNwY3SXw4HgE3BTdI/DgeATc +EN0h8OB4BNwM3R/w4HgE3AjdHPDgeATcBN0Z8DQUGjAwFBkwLBQYMCgUFzAkFBYwIBQVMBwUFDAY +FBMwFBQSMBAUETAMFBAwAscBxrAkTTOwJB8z4H7xwM9xgACADBGh4HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB40cDgfuB44cXhxkApDQIlfUAtAxSI4qV7CHWQ +91MlfpAG8gEdUhBhuvvxQSqOAMG6QiZOkAQd0BD99YDiCvIvJIlw4HioIIABAR1SEOB4wcbgf8HF +4HgocgDZ1vHgePHArg7P/6HBCHfPdqAArC8ZhgQggA9wAAAA13AgAAAAAdjAeC8mB/AodRpyE/SK +IEkGogzv/4ohTQg5hpYM7/+KIAkGiiAJBooM7/+pcQDYJPARzAAcRDNPIMEDAeAQeAQggA8AAP+/ +j7gCHEQwERocMJ4NoA9AJwASB+cEJ48fAAD8/wUnABSduJ+47HEAoQDB7HAgoAHYeQbv/6HA4Hgi +uQbw7HJgogTgYbmB4WCAOvcA2c9woADUC22gz3CgAEQdNaDgfuB48cDuDc//CHYodShwSHFocsr/ +geDKIIEDwA/h/8ohQQM5Bs//4cXPcoAAsASkioDlz3KfALj/BvLPc9C6/sp+ohqiO6KA5Q7yz3Cg +ADguBYAEIIAPwAAAANdwwAAAAPbzadgYuBmi4H/BxeB48cB+Dc//CHfPcYAAsAQFiQDegOCpwUDG +Q/QB3aWpz3GAAICOz3CgAMwrLaAA2I+4ERocMCEagjMSDCANi3CeCwAIz3ABAMEJQcCKIFAAQsDP +cIAA/HoAiGTFAt0RHAIwAMASHEIzExwCMM9wgABUEEXAz3CAAMAPRsDPcIAAcAUAgEPGINkB2kfA +SMeBwD3bF7vB/wjYAdnI/wQaWDNJBe//qcAD2s9xoAAUBEWhz3GgANQLDaHgfvHA4cXPcqAA1AsD +3bGiANtwogUSAjfXcgAAAEAB2sIiigAXusdyAA4AAEUiAgadup+67HVApQLaIBqCMAgSDTbscqCi +ERICNwHiERqcMOxyAKICEgI27HBAoOxwIKAB2M91oADIHxOlOIXscCCgGYXf/3Qd2JDPcaAAyDsO +gYi4DqG9BM//4HjxwADYCBKBMNz/CBKFMAohwA/rcgfYiiPRCLUA7/5KJAAA4HgA2gPwAeJBKIEA +MHK89+B+z3GAAIAMRBnAB89xoADIH1yBnbieuE0ZGIDgeOB44HjgeOB44HjgeOB4HIHgfuB4A9rP +caAAFARFoc9xoAD8Cwyp4H4D2s9xoAAUBEWhz3GgAAgMALHgfgXMANrXcAAAAEAB2MIgCgAXuMdw +AA4AAE8ggQCduZ+57HAgoM9woAAUBAPZJaACEgE2z3CgANQLLaDPcKAARB1VoOB+gOFU8kAhwgPD +uY/hnAAtACS6MyZBcIAAcGxAJ4NyNHsAewAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUAEGFAA +ABYBQAQYUAAAFgFABBhQAAAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUAEGFAAABYBQAQYUAAA +FgFABBhQAAAWAUAEGFAAABYBQAQYUAAAFgFABBhQAAAWAUBCIkKABBhQAL/14H7geIDi4cUi8mNq +wbqD4jwALQAiuzMmgnCAAIBsQCeNclR9AH0EEAIEBBmQAAQQAgQEGZAABBACBAQZkABCI0OABBAC +BAQZkADv9fcEz/+A4uHFU/JAIsMDw7qP4p4ALQAkuzMmgnCAAIRsQCcNclR9AH0BEIIEARmSAAEQ +ggQBGZIAARCCBAEZkgABEIIEARmSAAEQggQBGZIAARCCBAEZkgABEIIEARmSAAEQggQBGZIAARCC +BAEZkgABEIIEARmSAAEQggQBGZIAARCCBAEZkgABEIIEARmSAAEQggQBGZIAARCCBAEZkgBCI0OA +ARCCBAEZkgC+9UsEz//gePHAygnP/yh2RiHNAB1lIrmS/8G+geYO8oLmCPKD5g30ABaAQAEdEhAA +FoBAAR0SEAAWgEAArQECz//geIDhyiRNcOB46CCtAQAWAUECGFQA4H7geIDhyiRNcOB46CCtAQAW +gUABGFIA4H7gePHAXgnv/1MhQgBOIg0Bz3KgABQEyYIA2w4mgh8AAAAGUHHKIcYPyiLGB8ogZgHK +I4YPAAAMAsokZgCwBab+yiXGAIDhyiRNcMoizQDoIC0CTmDPcaAAOAQB4sipgeUO8oLlCPKD5Q70 +z3CgADgEaKjPcKAAOARoqM9woAA4BGioSQHP/+HFANoP8KCADXOgo6GADXOgo6KADXOgo6OADXOg +oxDgAeJBKQMBcHKv9wDbBvAEEA0EDXKgogHjUyHCACK6UHO39wDbBvABEI0EDXKgqgHjUyFCAFBz +uff7As//ANvPcp8AuP8aonuiPqLPcABsBAAZouB+8cBeCO//ANqhwRpwz3DUuv7KQMDPcZ8AuP9o +GQAEBNgboYtwHqGdus9woADQG1Ggz3AAbQAQGaEF8OII7/+KIEkFUSFAx/vzABQFMAwlgI/Uuv7K +OvQg3c9zoADIH7CjAdhDGxgAANiNuPz+saPPcZ8AuP9oGQAEBNgboYtwHqEA2J24ExsYgM9wAG0A +EBmhBfCKCO//iiAJClEhQMf78wAUBTAMJYCP1Lr+ysohwQ/KIsEHyiBhAcojgQ8AAGwCMASh/sok +AQSBAe//qHDgeM9xgACwBGSJgOPPcp8AuP8F8s9x0Lr+yj6iGqKA4w7yz3CgADguBYAEIIAPwAAA +ANdwwAAAAPbzatgYuBmiHILgfuB48cBSD6//mHAodkh17P8GIIEDiHCleV3+pQeP/89xoAA0HwSh +AdgHoQiBgOD+9QWB4H7gePHAGg+v/0okAAIA3c93AAAEHal2FSKAMxwQAQYA2M9yoAAUBMqiqKIn +ogSiPWWI4Wi5yiEOAOlwR/5CJEQATCQAgCDnAeYo9zkHj/9BKYGACvIvJElw4HioIIABBBACBOxx +QKHgfuB48cC2Do//CHUodgYOYA9AIQACBczXcAAAAEAB2MIgCgAXuAAggQ8ADgAAB24EIIAPAAD8 +/yV4nbifuOxxAKECEgE27HAgoCK+BfDscQChBOVhvoHmAIU792D+yQaP/+B4B9nPcqAA1AcaGliA +gOAO8hkSAYYJIEMADxIBhgIgwIB5YQ8aWID29eB+4HihwfHABRICN9dyAAAAQAHawiKKABe6x3IA +DgAAg7rsc0Cj7HIAoihwSf7RwOB/ocDxwOHFz3CAADCMJoiA4TDyJ4iA4SzyoJBPbYfiCfczJoJw +gACUbEAngXJUeQB5ANkR8CSQB92A4QHZwHkL8CSQCN2F4QHZwHkF8CSQhOEB2cB5geEM8ggQBQEK +IcAP63IQ2IojzwkhAq/+mHUBBo//ocHxwIINj//PcoAA/QdAioDiRMCO8oDhDPQKIcAP63IF2Ioj +Tw1KJEAA7QGv/rhzYIGA4wTyQYGA4gn0z3KAAKyYcIJgoVGCQaEkxoDmyiHBD8oiwQfKI4EPAAD/ +A8ogYQHj84DiyiHBD8oiwQfKI4EPAAAABMogYQHX8+m4F/IEIIAPAQAAwC64z3KAAFBwCGJJIIAA +YbgCuBR4x3CAAASqaqAhgSugRPDouBvyoObKJYITyiUhEAQggg8BAADAz3eAAABwzmcEIIAPBgAA +ADG4LroeZs9wgABQcEhgwngS8FMgwgBdes91gAAwc01lBCCADwEAAMAuuM9ygABQcAhiYbgWfRJt +FHjHcIAADKlgoJjlIYEhoIz3CiHAD+tyBdiKI5AHiiSDD+0Ar/64dQjcvwSP/+B44cXhxs9xgAD9 +ByCJgOEm8gDbSiQAds9ygAAMqagggAMyazR5JWA+YqCmPWChhRlhoaYigQHjIqZIEAEGSBpYAEkQ +AQZJGlgASxABBksaWABMEAAGTBoYADUFj//xwPYLr/+4cc9ygAAohQS5MCJEAFEkQIOiwQbyz3OA +APTNBfDPc4AABMtAIwIGQCMBB1EkQILKIcIPyiLCB8ojgg8AAEUEPACi/sogYgHPdoAAMIhALY0B +pmbovkDGIMUE8sK9qmEP8FEmQJIH8kQlARxEuSpiiboF8FMlwRA8eSpjz3GAADCHFiFBASKJDrlF +eSCgzQOv/6LA4HjlAeAHCNjgePHATguv/4ogVw7PdYAAdEBeCa//IIWKIBcHz3GAACxBTgmv/yGB +AN7ApRDfSiSAc8lxqCAAAhYlQBDhoMKgAeHPcIAA6EBSDK//ENnPcIAA+EBGDK//JNnPcIAALEE6 +DK//INnPcYAAZEDAoeGhAdgIqQmpxbHDoYoglwfyCK//iiFOBs9xgAAQRcChwaEI2AWhxqEC2AKh +A9gDocShz3ARADCMB6HPcAIAIL8JA6//CKHgePHAngqv/wHZz3CAAGRAIKAA3c92gAC4BBYmQBMD +gIDg4iACAEAlTZD48+oLr/4G2NkCj//xwGoKj/8Idc9wgABkQKCgz3aAABBFiiBXC24Ir/8ghoog +VwtiCK//JYaiC6/+BtiC5Q/yAN3PdoAAuAQWJkATBICA4OIgAgBAJU2Q+POJAo//4HjxwBYKj/8I +doog1wwmCK//yXHPdYAAZEA+DmACw6UDhYDgLPKB4BfyguA39CYOQALPcAAAJDrPcYAAuAQAoc9w +AAAAPAGhANjZ/1oI4AcF2CPwz3AAABQ6z3GAALgEAKHPcAAAxDwBocT/5g1AAtINQAIA2AmtEfDG +DUACz3AAABQ6z3GAALgEAKHPcAAAxDwBoQDYxv/tAY//4HjxwIogVweSD2//gNmH/wDY1f/RwOB+ +4HjxwM9wgABkQAOAguDgD6EHyiChAvPx4HjxwOHFCHWKIBcKXg9v/6lxz3GAAGRAA4GC4CD0gOXP +cIAALEEAgA70IrjAuAmpAtjPcYAAEEUCoQPYA6EA2A3wI7jAuAmpBNjPcYAAEEUCoQXYA6EG2ASh +ZQGP//HA7giP/891gABkQAOFguAN8hASBDYKIcAP63IF2IojRQlZBW/+SiUAAM4MQALODGACCHaB +5gHYCK0W9M9wgACMQ8oMQAKSDcAHCHWKINcKug5v/6lxieXMJaKQHA+iB8ogQgP1AI//8cC6DEAC +z3CAAEyZIIjPcIAAgEPPcoAAZEAhqCiKwLkiqADZI6iCDGACIaKSDEACANmbuc9woADQGzGgcfHg +ePHAz3CAAGRAA4CC4A30iiBXB1IOb/+KIUYJANi4/wDYb//o/zT/XfHxwM9xgABkQCOBguHMICGA +mA6hB8ogoQFP8eB48cDPcYAAZEAjgYLhzCAhgHwOoQfKIOEBQfHgePHACiQAgMohwg/KIsIHyiBi +Acojgg8AANkDWARi/solwgDPcIAAuAQWIAABI6BEoCfx4HjxwK4PT/8IdoogmADCDW//yXHPdYAA +ZECKIBcOsg1v/yGFIYUA35DhBPQB38GlyXGB5xPyz3CAAEyZFSCCAzV4IIhgijBzCfYBiCGKEHEF +9gCFgOAN9IogVwd2DW//iiHJDsGl2g2gBwPYAdgC8ADYpQdP//HA4cUIcRDYANtKJIBzz3WAAEyZ +mHOoIAAHESEAgRTyz3KAAHRAFiICAQQSBQBMJQCEUPcVJUIRQIpQc8ogSwHKI4sAQCREAC8kBwFl +B0//CiHAD+tyBdhxA2/+iiPHDfHA2g5v/whxz3aAAGRABBYFEEwlAISM9wohwA/rcgXYiiOKBkUD +b/6KJIMPzgxv/4ogWACKIBcOwgxv/yGGAYbPdYAA6EAJZbIMb/+KIBcHIYYoZYDgigAJAM9wgABM +mTV44YgQ2AGmz3WAAHRAiiBXDooMb/8ghYogFwd+DG//6XEAhYDgyiAhASnyxf8IcQGmkODKIcEP +yiLBB8ogYQHKI4EPAAC7AsokwQC8AmH+yiUhAEYMb/+KIBcOIYbPcIAATJk1eAGIEHfL9oogVwcq +DG//iiGLAAPYkgyAB2UGT//geM9wgABkQAOAgODgf8ogYgDxwNoNT/9acCh3OnJAKAEEiiAYAPIL +b/9FeUwigKPKIcoPyiLKB8ogagHKI4oPAAD8AsokigRAAmr+yiXKAEwhAKTKIcoPyiLKB8ogagHK +I4oPAAD9AsokSgQcAmr+yiXKAM92gAB0QBYmjRQEFZAQiiDXDpILb/8KcQwhAKQH9M9wgABkQACA +XvBMIACkyiBhAELyTCAApMohyg/KIsoHyiBqAcojig8AABEDyiQKBMQBav7KJYoEz3CAAEyZFSAB +BBUgQARgiECJcHKH9gGIIYkQcUAAKgAA2IogVwcqC2//iiGMBQAggi+AAOhAAIqA4AHZDfQAFgUQ +CiHAD+tyBdiKI8wGcQFv/gokAARhuACqKHCB4Az0ACGBL4AA6EAAiQQdQBTipQHgAKkAhg8ggAQA +pipwQf/PcYAAZEAggQO4JXjxBE//8cCeDE//CHUod0h2QCgBBIog2ACqCm//RXnPcYAA+EAgEQQA +TCQAgcohxg/KIsYHyiBmAcojhg8AAEID8ABm/solJgAWIQABpKjgoMWoQCRAAAihsQRv/wLY4Hjx +wOHFz3KAAPhACIKA4BPyz3WAALgEYbgIohZ6YIUEiiCCYHtFis9ygAD4QAiCgODz9YkET//gePHA +AgxP/zpwjuDKIcoPyiLKB8ogagHKI4oPAACyA8okSgR4AGr+yiXKAM92gAB0QBYmTRQEFZAQiiDX +D+4Jb/8qcYog1w7mCW//CnEA2AKlENgBpQDYDyBABKCGTCAApAZ9oKYt8kwgAKTKIcoPyiLKB8og +agHKI4oPAADDA8okCgQYAGr+yiVKBAAggS+AAOhAAImA4MohwQ/KIsEHyiBhAcojgQ8AAMQDyiQB +BOwHIf7KJUEDYbgAqQpwHf+lA0//4HjgfuB44cXhxhDZAN7PdYAATJmfcclzqCAABBEggIMK8hUl +ghNAilBzyiGLA8ojiwAB5s9+KHDBxuB/wcXxwAYLb/+KIJcPSiAAIM93gAB0QBYJb/8ghw7eCnUA +hxEgQIML8hYnQBMCgIDgB/JAeAUgAAQvIAcgYb6A5gHlr30v9wDYAKdMIACgAdgdA2//wiAMAOB4 +8cCuCk//CHbPcKAAZC7wII8DGxIQNhsamDP12AW40gxv/8lxG8jPdaAAFAQKpQmFgOCECkIHz3Cg +AMAvURAAhgsgwIP19c9wAABkHtYKj/8RIICD7fMJhYDg6/UbGhg09dgFuIoMb/8KcRvICqWlAk// +4HjxwI4OT/+hBg/+4HgAFgFBILAAFoJAUyJBACGgQSrBAFIhAQDAuSioQSqBAMC5KahBKgEBwLkw +qAAWgUDPcaAAyBwogeB/I6DxwAGAgOAS8oHgGfKC4BnyCiHAD+tyBdiKI8QDSiQAAGUGL/4KJQAB +AdnPcKAAyBwpoK4Nb/8U2AjwAtn38QHZz3CgAMgcKaDRwOB+gODxwBHygeAS8oLgE/IKIcAP63IF +2IojBQtKJAAAHQYv/golAAEp2BK4CPAV2BO4BPBPeivYErg1eECg4PHgePHA4cUIdU4Nb/8U2COF +z3CgAMgcKKDNAU//4HjxwE4JT/+lwYt36XDE/+lw0v8iwIDgGPIAFg5BJMCA4APyABYAQQDdCfAB +wAAWAkDJcd3/AebQfgHlABQBMTB1tfcU8ADdDfAAFgFBgOIE8gAWAEEBwAAWAkAB5dL/ABQBMTB1 +JMKy9yTAgOAG9FEhAIAE8gAWAEEFzNdwAAAAQAHYwiAKABe4x3AADgAAg7iduJ+47HEAoQISATbs +cCCg6XDR/9ILb/8B2ADZz3CgAEQdNaABAW//pcDgePHAAYCA4BTygeAQ8oLgEPIKIcAP63IF2Ioj +BA1KJAAAAQUv/golAAEC2APwAdjPcaAAyBwJoUYMb/8U2FTx4HiA4PHAEfKB4BXyguAW8gohwA/r +cgXYiiOGB0okAADFBC/+CiUAASnYErjwIEAAAKI68RXYE7j78SvYErj38eB48cASCE//pcGLd+lw +df/pcNz/ABQBMQXMArnXcAAAAEAB2MIgCgAXuMdwAA4AAAvhBCGBDwAA/P8leJ24n7jscQChAhIB +NuxwIKAAFAEx7HAgsAkUgDCA4Afyz3CmAJw/GYCB4Pv1IsCA4BfyABYNQSTAgOAD8gAWAEEA3gjw +7HIBwKlxz/8B5bB9AeYAFAExMHa39xLwAN0L8AAWAUGA4gPyABYAQexyAcDG/wHlABQBMTB1JMKz +9yTAgOAG9FEhAIAE8gAWAEHpcHj/ggtv/wHYANnPcKAARB01oE7x4HjxwDIPL/8B2AAWgkAAFopA +ABaJQAAWhkBEJr6DRCKDE8B4CiFAgsohYgAB4YDjyiOBAMojIgCA4MogQgLKICEAQNwEIguTG2Nv +eyT0BcwB3ddwAAAAQBJrwiVKEwzgF70EIIAPAAD8/8d1AA4AAKV4nbifuOx1AKUCEg027HCgoOx1 +AB2CEuxwYKgA2+xwYLCA4fIALgAA2PhwGXGB4MojgQHKIkECyiOCAkQjgQOC4UolQADCJUIBUiMO +AMC+RCMADJDgAdvAe6DgAdjAeAUgxAAAFg1AgOFhuk96GPSA4gDf0PcghYDmBOUE9AAWDUBMIwCQ +A/TscCCgAedQd7T3IIVMIwCQBPTscCCgBiU+gRLygOIA2M33ABYBQIDmIKUE5QT0ABYNQAHgUHC2 +9wAWAEAApQskQIEe8oDiANjT9wAWAUDghYDjA/LneQLw5XkgpYDmBOUE9AAWDUAB4FBwsPcAFgBA +IIWA4wTyJ3gD8CV4AKVCIEEQgOEgB+3/QCdAAEwjAJAG9NIJb/8B2AfwA9nPcKAAFAQloADZz3Cg +AEQdNaD1BQ//2QFP//HAhg0v/wDZz3CgANAPNaAAFgNBABYCQem7BcwW8tdwAAAAQAHYwiAKABe4 +ACCNDwAOAABAIgEDz3AAAPz/JHileJ24n7gT8NdwAAAAQAHdwiVKExe9x3UADgAAQCIBA89wAAD8 +/yR4pXjscQChAsjscQCh7HBAsOxxANgAsei7QPIjauO7BCGBDwAA/P8J8s91oAA4BAitAdhhuTB5 +5LsM8qFoCL0Ffc92oAAQBLi2AuAPeGK5MHkA3RTww2gYvuJo738Qv+V+4Wjvfwi/5X4Ffs93oAAU +BMunBOAPeAHl2mnRdaz3AN4I8M91oAA4BAitAeAPeAHmUyFNALF2t/fluwjyAdnPcKAA0A8RGFiA +5rsJ8gPYz3GgABQEEKEB2ASh47sG8gAWgUDscCCoYbrkuwnygeLH9wAWAUHscCCwYrpEI4GBQSqA +ABX0AN4L8M91oAAABOyNABaNQOx14K0B5rJosXZH9+e79PUAFo9A9vGC4RT0ANkK8M91oADUA9yV +ABYNQex1wLUB4Rt9sXFG9+e78/UAFg5B9/HiuxXygODKJA1w4HjoIO0D57sJ8s9woACYAz2AABYA +QAPwABYBQOxwIKAA2QbwABaDQOxwYKgB4VMiQAAQcbn30g8v/wHYANjPcaAA0A8RGRiAz3GgABQE +BKEEyM9xoADQDyK4wLgVoekDD//xwIILL/8A2UokAHLgeKgggAIAFgJAFSJAMBwYmAAB4QAWDUAA +Fg5APgxP/89woAAUBKygz3CgANQL3KCSDw//rQMP/+HF4cYkiM9ygACcbKaIwrkuYgDZDyGBA4Dl +z3OAAIyZdhMCBgX0Jnp2G5gAHPBFeXYbWAAliBUjjQN5HVgQJohFiFlhfB1YECCAjCEQgEX3iiEQ +ACCgI7l3G1gAAIAquHgbGAAA2c9woADwNiygeRMBBiWgfBMBBiagehMBBiegfRMBBiigexMBBimg +fhMBBiqgdxMBBiugeBMBBi2gdhMBBiSgwcbgf8HF4HjxwOHFosGLdalwGg8v/wLZqXDR/8oOD//t +Ai//osDgeIDg8cAH9M9wgABkm6oLL/8k2bEAz//gePHAVgov/5hwkODKIcYPyiLGB8ogZgHKI4YP +AABrA8gG5v3KJSYEANpKJAB0z3aAAMwEqCCAD0AsgwFVe8dzgAAwiCCDz3WAACiFQCwAAd25AGUg +o/G40SEiggnyoIvPd4AAAHCtZ4HlCvbPdYAAMIcWJQ0RoI1RJQCQBPKeuRbwLbjAuBUmDxDjh1Ih +TQILJ0CTDfLPdYAAgMqEKAsMMCVAHv647POfuSCjAeIRAg//8cCaCQ//osEAFhFBABYAQUApDiHH +doAAKIUAhkwhAKQtuFMgEgCO9wohwA/rcgXYiiNUA0okQAD9Be/9CiVABM9wgAAwhxYgQAQacO4N +L/8C2c9wgACwhxYgQATeDS//AtlAKY0hACWAH4AAMIjODS//ENmLcMYNL/8B2QCGUSBAggfycg0P +/20BL/+iwAAlgB+AADCIRg2gCxDZARCAIJDgyiHKD8oiygfKI4oPAAA6BYQH6v/KIGoBSiQAdADZ +qCABChUlQhDPcIAAMIgwIIUABCWDjwAAAAEEHEAxRvIhxs9wgAAAcAQlhA8GAAAAQSxCBM9goOb4 +YtEl4YIx8oDjBPKB5wv2BCWEDwAAACQMJICPAAAAJCPyguJCAA0AguIG9IDjHfKC5xv0gOME8szm +F/bPcoAAMIxGklB3EfZRJcCCD/LPc4AAgMqEKgssMCNCDgQivo8ABgAAA/QA2wLwAdtvewTwAdgI +cwQlgg8BAADALrrPdoAAOHNKZlBwAdjCIA0AgOPMICKAEfIB4QIQgCDPcYAAUHAIYYHgHvIKIcAP +63IF2IojVQQQ8M9zgACAyoQqCywwI0QOCiHAD+tyBdhxBO/9iiOVA0okQABlBO/9SiUAAAMQgCAI +YYLgyiHCD8oiwgfKI4IPAABTBQXY7vUqcFf/z3CAALCHFiBABECQz3EAABgVCSJBACCwOvHgePHA +kg/v/gLZz3CAAMwE/g0P/89wgADMBECAz3agAOwnz3egAAREz3WAADCM4Lo+8iuGRCKAAIYi/w4i +uqG5FLq0uQV6BSGDAAQhgQ8QAAIABCKCDxAAAgBrpiV6RacolYfhzCGigRD0gODPcaAAyBwG8gHY +HqFaD8ALBvAA2B6hvg/ACwSVheAv9M9wgADMBACAUSDAgCnyBNnPcKAARB0loCOgJKAh8M9woADI +HAHZPqALhoG4C6YWD8ALBJWF4A70z3CAABwPCIBRIACACPIA2JS4BacLhpS4BvAA2AWnC4a0uAum +/goP/xEHz/7geOHFNGjPcoAAKIUhYi25wLmEKQsMACGBf4AAYMpIgVEiAIDPcoAA1LRBggnyPImA +4cUigQ8AAAoCA/JFIkIDSiQAdADbqCCAAjZodXkAIY0PgAAwiEClAeMA3c9zgAAwhxYjAgCgqqGq +AdkiqgPZI6pKJABxqXGoIMABemEWeqSqAeHgf8HF4HjdA4//2QOP//HAABYAQIHgz3GAABxBAKEN +9AAWAEAMuAQggA8BAADwAaEAFgBAAqER8ILgABYAQAv0RiDCAEOhABYAQM9woADQG16gA/AAFgBA +BczXcAAAAEAB2MIgCgAXuMdwAA4AAIO4nbifuOxxAKECEgE27HAgoMoIL/8B2ADZz3CgAEQdNaDl +A4//4HjxwAAWAkChwUDCARSAMFEgAIAG8s9xgABQqAXwz3GAAGioQKFgiQHaB/AAFgBAFSGMAACk +AeJ9eBBy+fdRIwCACfIAFgBBA/AA2BUhjAAApAHiheL69wXM13AAAABAAdjCIAoAF7jHcAAOAACD +uJ24n7jscgCiAhICNuxwQKA2CS//AokA2c9woABEHTWgocDRwOB+8cDhxQAWA0DPcYAAAABgoQAW +AkAA3UGhABYAQP+7AqEAFgBAA6GkoRDy/7pA2M8g4gfKIIEPAADQAM8g4QfPcZ8AuP8doQbwz3Cf +ALj/vaAFzNdwAAAAQAHYwiAKABe4x3AADgAAg7iduJ+47HEAoQISATbscCCgpg/v/gHYz3CgAEQd +taDpBM/+4HjxwOHFz3WAAMwEBG2aCi//CNkBhc9xoAC4HgKhAoUDoZoID/+9BM/+8cDhxaHBAN1A +xQAWAUAAFgBAgeEa8gXM13AAAABAAdjCIAoAF7jHcAAOAABFIAADnbifuOxxAKECEgE27HAgoOxw +oKCpcCDwxgogDItwBcwB2ddwAAAAQAHYwiAKABe4x3AADgAAhLiduJ+47HIAogISAjbscECg7HAg +oADB7HAgoAHY5g7P/s9woABEHbWgKQTv/qHA4HjxwKILz/4KJgCQOnFQ8i8ogQNOII0H2tiyCe/+ +qXEbGlgzQCUAFEogACAPIBAg9dgFuLYN7/6pcRvIz3egABQECqfPcaAAZC7wIQEACYeA4BH0z3Cg +AMAvURAAhgsgQIAJ9M9wAACwHrILD/8LIACEFfTa2FYJ7/6KIdoHKYdOCe/+2tjPcaAAwC9REQGG +Pgnv/trYrgzgBipwTgvgA6lwANgPIEADBiYOkLP1z3GAAFAFAIEH2ofgGxqYMB3yz3CgADguBYAE +IIAPwAAAANdwwAAAAA3y9dgFuM9znwC4/xqjW6Np2Bi4GaMB2ALwANiB4AP0QKHPcKAAFARKoAUD +z/7gePHA4cUCEg02ABYAQQAWAUHFuIK5uv/iDu/+AhpYMwEDz/7gePHAdgrv/oDYz3egAMAvpRcS +lhQXEZYA3qUfmJPPcqAAZC4UH5iTLysBAE4jgQfwIkMAZX4A2w8jQwAGIMCA9fVPJsAWpB8YkKQX +AJb/uP7zoxcAlgQggA8AAAAPjCAQgPjz89gFuIDZVgzv/p+5GxIQNvXYBbgH3UYM7/6pcc9woAAU +BKqgGxpYMwfwA9nPcKAAFAQloM9woAAUBKmAgOUe8oDl9PNBLYCQCvIvJAlw4HioIIABABYAQOB4 +UyVNkAnyLyRJc+B4qCBAAQAWgEDgeM9woAAUBKmA5fHz2BYKL/8FuP+43/X12AW40gvv/gpxz3Gg +ABQEKBkABIDmGxoYNCTyLyiBA04ggQeU4coiRQCF9yhygCLCAc9woAAYLPAggwCU4coiRQCF9yhy +gCLCBM9woABoLFV4YKAA2A8gQAAGJg6Q4PWA2c9woADQGzCgpR+YlBQfWJR5Ac/+4HjxwBYJ7/4X +2bfBi3eqDe/+6XAjwEohQCBTINIAhiD+A0wiAKRCKBABDByCNI32CiHAD+tyBdiKI88BCiRABHUF +r/0KJYAEEsYtviDAwL5AKg0hx3WAACiFUSAAgACFhiD3Dzf0gODKIcEPyiLBB8ojgQ8AAM4DBdjh +8wHAAsFKclYJIARmbYDgH/LJcE4K4ABKcQ0UgDCFIMEADRwCMIog/w9TwACFqbgApUpwDgrgAOlx +z3CAAIQE1XgggA8hgQQgoCp2AvAC3kpwbv4G8IDgyiZBFMomIhKB5ln0E8EAhRLCJnhEeSV4AKUM +HQIUz3CAAEiGANkWIIAEQIUgoPW6IaAF9ADZi7khoPa6BfIhgIUhAQ4hoCoI4ADpcA0UgTDluQXy +WBQAMQW14bkE8lAUADECtVEhAIEG8kpwygogBFUUgTANFIAwUSDAgB3yNcFWFAIxSnAmCyAEEsO4 +cIwgAoDKIcEPyiLBB8ogYQHKI4EPAAA7BDwEof3KJGEAUSXAgcomIhFKcFH9BczXcAAAAEAB2MIg +CgAXuMdwAA4AAIO4nbifuOxxAKECEgE27HAgoJoK7/7JcADZz3CgAEQdNaCxB6/+t8DxwFIPj/6k +wQHdgcDiC+/+qXEA3k3wgsDWC+/+AtkCwItymg7gAwPBpHgvJQeQQPIAwQDYz3eAACiFDyBAAAS5 +IWcvIQogLblTIRAAz3GAAEwFQIEEIYCgAKEH9IDi5AoiCcogIgggwNYJIAQQ2QDBANiKIwgAVGn6 +YgKyYKKA22iqaarPcoAAhAQVIgIEYIIEI0MEYKLPcoAASIY2egCiAaLPcoAAKIY0egCyAeYhwBB2 +ZgfF/wXM13AAAABAAdjCIAoAF7jHcAAOAACDuJ24n7jscQChAhIBNuxwIKCmCu/+qXDNBq/+pMDg +ePHAZg3AA7oKz/65BE//4HjxwF4Oj/6EKAsMz3KAAIQE8CINAAAhgX+AAGDKaIEEI4IPgAAAAEQj +DwIvuga/RX8EI4IPAAEAAEEqTgMsuuV+RX7PcoAAzAQVegOCEHY18gQjvo+AAQAAI/LPcIAAVM0U +iIfgHfTPcIAAsMcAgFEgQIAX8r67aKFEIwACBrgEI4EPgAAAAC+5JXgEI4MPAAEAAEErQQMleCy7 +BSMOAIDlw6IL8i8pQQNOIYAHECUNENb8gOX49REGj/7gePHAosGLcNoL7/4I2QDAgODPcYAAeAQA +oQfyBhQAMQOxBBQAMQKxzgnP/qLA0cDgfvHApMGLcKoL7/4Q2QXM13AAAABAAdjCIAoAF7jHcAAO +AACDuJ24n7jscQChAhIBNuxwIKAAwFEgAIADwAb0AsF2DWAEANoF8NoIIAUBwU4Iz/4A2c9woABE +HTWgpMDRwOB+4HjB2c9woAAEJSCg4H7xwAYNj/7PcAAARBxmDe/+AN5x2F4N7/4GuM9wAABMHFIN +7/4I3c9wAADIG0YNz/7PcAAAzBs+Dc/+z3AAAAgcMg3P/s9wAAAEHCoNz/7PcKAA1As4gByAz3Cf +ALj/WBgACAAmgB8AAMAbCg3v/gTmYb2A5Tf3AN4F3QAmgB8AAAAc8gzv/gTmYb2A5Tf35QSP/uB4 +z3GgANAPGREAhhwRAIbPcKAAyB8VEAKGHoDPcKAAxCcZEAKGnBECABUQAoYtEAKGLhAChi8QAoYw +EAKGgBECAIQRAgChEAKGkBECAKIQAIaUEQAAmBEAAIwRAACIEQAAGIHPcZ8AuP9YGQAIz3GfALj/ +WBlACM9woADQDzuAOYDPcaYA1AQXEACGLBEAgDARAIA4EQCAz3GgAIgkAIEBgQKBA4EEgQWBBoEH +gWDx4HjxwOHFz3WAAIibqXBGCO/+A9kBhc9xoACAJQyhAoUNoQCNUSAAgADYjrgE8g+hA/AQod4P +j/4BBI/+4HjxwH4Lj/7PdYAA4AQAhc92gAC0oeSQ6XHiCqAChiH8A1EgwIAacAXyH4aAuB+mIIUA +kThgAKVUFoAQgOAV9Olw1gggB4Yg/AOA4AzyUSAAoAvyz3CAABwPCYBRIECABfQfhoK4H6Z9A4/+ +4HjxwBYLj/6iwc9wgAC0oT6ABCGBD///D9AEJYBfAADwLyV4z3WAALSh6gggBx6lgOCEAyEAmB0A +EM9xgAAAAACB67ga8gGB67hA2M8g4gfKIIEPAADQAM8g4QfPcp8AuP8dogSBAeDTuAShBSCAD9D+ +AAAWolElwNEG8s9wgABwDwKIBvADhfIL4AMkhV6FRCIBDKDhlB0CEAT0gNiUHQIQUSDAgUAoAQZp +9FEigNOCuRHyRCI+0wz0z3CAALShAYBRIACABPLeCQAHFfDaCgAHEfBFIQAGz3GAAECiKImGIf0P +UiHBAUW5JXjPcaAAiCQQoc9wgAAIogCIgOAE9FEigNIJ9M9woAAMJBOAUyDAgE3yRCIAU0EogQBN +cIYg/ANBKAIBUSWA0c9wgAC0oQjyBLlZYcdxgACYQxXwUSVA0wjydGlbYwAjgQ+AANhDC/BRJUDS +CfIEuTpiACKBD4AAGESsGEAArBACAIDiH/IgipcYQgA82ACqGfCzul6lUSKA08Uhgg8AAAAHRSEA +Bs9xgABAoiiJhiH9D1IhwQFFuSV4z3GgAIgkEKGKIdYAz3CgAIAlL6DPcaAAxCdBEQCGUSLA088g +4gLQIOECQRkYgM91gAC0oQCVBCCADwAAzIDXcAAAyIAJ9AuFUSAAgAXytg6AAk/wHoXzuFQVghBp +8hoRAIaA4gUggA8AAACaGhkYgAfyAdrPcKAA1AtSoATYEBkYgE1xEg9v/oogRA4G8J4Jr/6KIAYC +USCAxAT0USEAxvjzz3WAALShz3agAMQnLhYBlhaFInhkuBB4hh0EEM9xgAAcD9oIoAcvkRoWAJYE +IIAP////ABoeGJARFgCW67gJ8gDYi7gTHhiQGtgZHhiQHoVRIICBANmZ8hSVUSBAgZX0z3CgACwg +D4CA4I/0ENhBwM9wgACwxwCAUSBAgBLyUSVA0xDyAdhAwA3wgOIG8gHaz3CgANQLUqAE2BAZGIDZ +8UDBK4XPcIAA7MaLcwQhgQ/AAAAAwoA2uREmQJCBwkAgBAsw8uGVx4Bwv/QkQQAIJs4TMHZMAAwA +lBWBEFEhwIEg9M92oAAsIC+GgOEa9MaGPJUwdsj3z3GAAGSqwoElgDB2EPSA4wTyAtkgoyOAgOKD +uSOgBPIggqa5IKIBwg7wI4DjuQHCCvIA3p6+z3OgAPxEwaOjuSOgK4UkoCOFJaBUFYAQgOAH8gDA +guDPImIBAvSHugDBQcJVJUAakgpgAwDbH4WUuB+lHoWQuB6lDfDPcYAAyIwNgQHgDaEQ2c9woACQ +Iz2gtQdv/qLAz3CkAJBBTYDPcYAAiKBCsRqAUSBAxgOxBCCAD/8AAAAwuASxz3CAAIigANoI8s9x +gAC0oTGBUSGAggXyQrBDsESw4H9ZsOB48cD+Dm/+mHDPcYAAtKEOkc92gACIoAC2z3CmAOj/C4DP +daQAtEUDpgwVA5YNFQKWRBGJAC8nxwD/2BC4KXSEJAOcBCMIAAX0USEAkCz0MhUAllMgjwD/ZwG2 +/9j0fwi4739keEAvBRIAJQYAACfHAwUmxgFALwAWBCODDwD/AABALwcUG2MAIMgR/9gFJgYCCLgF +I4MBBCIGAPpiACZAAQV65bZveAQjgw//AAAAKLtleE96A7ZEtgQVAJYCthGBUSAAgg3yz3CAAABw +MiBAAoHgx/bPcKYA6P8NgAPwANgGpgWmANhKJIBwBtqNuqggQAMp2xK78COPAEAmAx8VewHi4KMB +4ACROB4AEVUmQRQats9wgAAAqCYLr/4I2hsVAJbPcaUA2MsZphwVAJYaph0VAJYbpg6BHKYPgR2m +JhUAlh6mz3CkAJB/HIAZBm/+H6bgePHAmg1v/gDbz3GgAMgfQBEABs93oADQDxkXAJbPcqAAxCdP +Eg6GuIHPcIAA7MaooBHMEHbPdYAAtKEG8h+FUSCAgATyAd4F8BEanDNodlISEIYVEhOGG9gWGhiA +USPAoAb0USBAoEoiACAH9B2FAd5adoS4HaVRIwChBvJUFYAQgOAE8gDYBvAdhYW4HaUB2DpwTCIA +oMwhIaBc8s9ynwC4/1gaAAgQh89wgABwDw+IFqIA2s9woAD8RJ66QaBloB6FsLgepagVABBk4B6h +ENgOoQHYFRkYgMoIr/4J2FEgQMcK9M9xgACADAuBAeCGD2ABC6HSCkABTCEAoAvyz3GAAESNBYEB +4JILYAEFoVECAABMIgCgz3WAALShZPIdhVEjwKCEuB2lz3CAAESNCPIigAHhIqCKIIUJB/AhgAHh +IaCKIMUIhgpP/gYPQAFM8EISAIYEIL6PAMAAAETyAbUehfO4PPKKIIQOYgpv/oohkAfKCYAHAJWG +IPwAjCACgDL0HgiAB4DgLvQD2BIfGJDgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4Eh8YkBPMERocMAbwAJUqDqAINJWsFQEQgOEI +8pcVgBAAqQDYrB0AEFQVgBCA4CTyz3agAPwlNIYB2s9zgABEjQaDgOE4YAajBfLPcYAAOQhAqVOG +J4NZYSejgOA+hQHeUPJRIcCBTvIB2c9wgAB0BSCgSPBRIACgDvIB2c9wgAA5CCCoz3GAAESNA4EB +4AOhPoXp8QPZz3CgANQLMaDgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB4MaBMIgCgE8wRGhwwC/Qdhc9xgABEjYK4HaUEgQHgBKEB +3h6F8LgK8pUVgBCkFQEQqXLWD+ABAdsE8MYLQAIfhVEgAIAH8s9wgACAqAoMgATPd4AACK0Zh4Dg +BfKSD8ADANgZp4oJQAHPcIAAHA8IgOu4EfKA5g/0BCCAL/8AX//g/s9wgACIoKDZxNo924YMb/4X +ux6F8LhoCAIEz3CAAOzGAICA4OgNog3KIGIAlQJP/vHAOgpP/s9xgABkos9wgADgBCCgANnPcoAA +MKIpos9wgADsxiSgJaAsos9wAAD/f89xoAAMJAGhG9gEoVEgAMTPdoAAtKEV8h2GhLgdps9wgACQ +BCCABYEB4AWhiiCFCQoIb/4kgQIIQAFpAgAARBaAEPGGwrgEJ48fAAAACFQWghD7f4Diz3WgAMQn +ANkV8uDavx2YkJTalR6CEATbz3KAAEgFYKIC2jwdgJDPcoAAZKohogfwQNm/HViQ1NmVHkIQACCR +D4AAYMrAEYEgACCSD4AAWM64EoCgBSHTA7oIoAEFINADgODoAQEAAdgQHRiQyBGAIM9xgAC8qOV4 +G6ZsFoAQw7gcePQhAABkHsAUXh4EEMASgKDleBymcBaAEMO4HHj0IQAAz3KAANyoYB4EEGQWgBDD +uBx49CIBAGgeABSKHkQQz3GAAOyo9CEAAI4eBBBoFoAQw7gcePQiAgD0IQAAjB6EEJAeBBAUzIYg +/4VMC4EBz3CAABwPCIDruIQJwv8c8M9xgABwqgCBY4FDoWZ4AKEEgQwVAZASeCV4DB0AkADYj7gT +HRiQCBUAkKC4CB0AkBrYGR0YkAYMQAHPdoAAtKEdhlEgwIGC9M91oADEJxEVEJZRIMCjANrV9VEg +QKId9FEggKMy9FEgAKPm9VEgAKBc9FEgwKBs8gjYEx0YkG4OQAGA4GL0Atg8HQCQI4bPcIAAZKoh +oNDxK/2gFgAQkRUBlgHgw7kwcKAeABDG9YoiCAATHZiQkRUAlsO4EHG88xIdmJC68ToVAJZRIICA +H/LPcYAAcKoAgeC4GfSAuAChAdgDoYog/wAEoToVAJaGIP8BA7gBoQwVAJBGIAAPDB0AkAgVAJCA +uAgdAJAA2I64Ex0YkFElANCQ8wTZz3CgAJAjPaCK8SL9Atg8HQCQI4bPcIAAZKohoB6G87h+8xMd +GJR2/gTwEx0YlMEHD/5UFoAQgOAJ9EIVAJYEIL6PAMAAAAT0USAAohHyvxUAlqW4vx0YkIogBAAT +HRiQ+gqADVQWgBCA4Fj1USCAoA70CiHAD+tyBdiKI40GiiSDD7UDL/0KJQAEz3CAAOzGKoDPcKAA +BEQmoMTx4Hjhxc91gACIoAmlKqV4tUulAdgZteB/wcVKJAB6ANmoIIACANrPcIAAiKA1eECgAeHg +fuB48cDWDg/+AN7PcYAAAADAoc9yoADIOx2CwqGA4MGhw6ED9ADYCvAEgddwZYchQ/v1iiCEAACh +AaGA4MShDfLQ2Z+5z3CfALj/PaCC2BSiz3AAgBEUDqKKIMUPz3WgAMgfGR0YkAHYCHEIcghzugkv +/Zhwz3CAABQA13CAABQADPIKIcAP63IF2GrbiiSDD9kCL/24c893oADQD9WnhdgJuM92oADAL3oe +GJAGDcAHKg/ACPoMQAtA2c9wnwC4/zKg/g5P/oDZz3CgABQELKAdH1iQkgmAB9YNwAamCKAHANhO +CwALB9hIHRiQOgoP/soPAArPcIAAMIwAkIfg+A4CCvYJwAoeD4AOKg7ADRWGUiAAAFEgAIAG9FYO +oAoB3xDwA98Thpq4E6Yg3gXY0KVDHRgQANiaCW/+jbjRpc9wgAAwjACQh+CwDgEKcgkP/oIMQAMC +CcAD+gsAABYIgAP6CsADJg7ACfIOQAgaDsAM6giADToKgA2WDE/9iiDGDc9xgAAcDw2xA9htGQIA +G9nPcIAAOE4SCuABMKgyCI//ygiADcILj/6OC8AOJg3ADa4PL/7pcIkFD/7xwAoNL/4B2aXBGnAK +IoAvgADsBJ4Jb/6LcEwgQKAAFIUwARSRMAb0CiKAL4AA8ARMJQCAxPZMJQCBy/YKIcAP63IF2Kzb +aQEv/UokQABMJQCAJgEOAKhwABaOQAAWlEBMJACkenCF9owkw68o9AAWAEEAFo9AABaAQAAWAEFM +JACkfgAKAIDnJfLPcIAA5AQAgEAszSC1fRDguGAWCW/+BNnPcIAA5AQAgEwhQKAdZcwnYZMV9ADY +jLgU8AohwA/rcgXYt9tKJEAA5QAv/QolAAUKIcAP63IF2MDb9fEA2AC1z3CAAOQEIIBALMAgFXgS +YRlhBSJABACxBN0G8IHABN2yCG/+qXEAIowjABwCFc9wgACEBPAgAgQe34DiLymBAAInQBAk8s9z +gAAvhTRoK2MRI4CDCfIAJoEfgACUmxZ5ABkCBQAtgRMLIcCACfIAJoEfgACUmxZ5BBkCBRAiAoAv +KYEAAidAEOD1QiNAIIDg6AbN//oPD/7lAy/+pcAA2EDx8cDhxa3Bi3WpcCYIb/4N2QDAHXhTIAEA +RCk+DalwACGBf4AAyIa2CG/+Ddq+Dw/+4QMv/q3A4HjxwAohwA/rcgXYiiOMCIokgw/hB+/8SiUA +AOB48cDhxSDbz3GgAMgcaaEAFgBAz3KgABAUDKIAFgVAAd1MJQCAyiHBD8oiwQfKIGEByiOBDwAA +CQGcB+H8yiRBAxgaQAFoGUABA9gPormhaqFGDw/+aQMP/vHA7goP/qQQAQD5uaLBcPQg2c9zoADI +HCmjpBABAFEhwIEu8jGIz3WgABAUI7nAuQO5BeED2k+lRoVBwo3hEN7KJuIRBhQPMYwnw58I9AQU +DzHxdswn6pAB3kP2AN6A5ur1xYBFfselsYiGJfwfGL2les91oADMF1qgF/BFgM9xoAAQFEehpBAB +AFEhgIIJ8jGI17qGIfwPGLlFeTqgz3WgAMwXDdkB2gPhDR2YkA4dWJAmgBkdWJAngBodWJAogBsd +WJAD2RQdWJBwEAEBEB1YkHAQAQHPdaAA9AcE4SelR6OkEAEAmbmkGEAAaQIv/qLA4HjxwAPIpBAB +APm5BA/B/wPZz3CgABAUJaDRwOB+ANqA4cokTXDgeOgg7QH/2VxgIKwB4uB+8cDPc4AA7ARocATZ +9/8EawTZ9v/o8eB48cASCSAKENhv2Qe5z3KgAPAXMaLPcQAA8P84onYKAArW8eB48cDx//b/0vGB +4M9xgADsBAP0BGkC8ChwBNnK8Q97SLgPeM9ygAAAbvQiAABAKAECSLgFefQiwAAweeB/J3jgePHA +SgkP/qXBCHYCiyh1mHBkwACLABIGAREcAjB5cAISBwEEEggBEBQAMeSSBhIFAQAgyQMAkS8hSBIH +IEACEHjn/wAgigEBlS8iiBIHIIACEHjj/wAgxgEClS8miAEHIIABEHje/wAgBwIDlS8nyAEHIMAB +EHja/wAlBQAElS8lSAEHIEABEHjV/x9nBZXwf+d4EHjS/yaVIXAQeAd5PHoPuSV6UHoAIoECMHkA +HEQwR5Unelx5D7pFeTB5ACGCAVB6XHkCHIQwD7pFeTB5ACHCAVB6XHkEHIQwD7pFeTB5ACFCAVB6 +XHkGHIQwD7pFeTB5P2fwf/x5CBzEMw+/5XkweThgaXHGuYW5CLkFIcECILYQeCCVChwEMCd4HHgI +uAUgAAEBtgDAAaYBwAKmAsADpoEAL/6lwOB+4HjxwOHFCHU+iM9wgADkBECAQCUAFAO5NXlZYTYN +L/4K2qlw9/9hAA/+8cDeD8/9CHbsiAiQz3KAAOwEtG8Ic4Yj8w9CKxECx3WAACiFYIXtu0hxA/Ik +auu4iiDDLwP0HhaQEE2OUSIAgJzy47g79Ou7FPL/2AetSiQAcQDYqCBAAwphACCDD4AAlJv2e0Sr +CmEB4A94QKta8EwhAKGN9gohwA/rcgXYiiMLBUokQADxA+/8CiVABO64R40yIUAEACGBL4AAlJv2 +eQjyBKkE2AAoQARFeAetPPAAqQ8iQgRHrV7wTCAApJT2jCDDr8ohwg/KIsIHyiBiAcojgg8AAOgC +yiRiAJgD4vzKJQIEyXC9/wiW7rgE8gKOCa0E8AGOCK0Aheu4F/IA2UokAHEnragggAMAIYAPgACU +m/Z4BBgCBAAYAgQB4S95AY4IrQKOCa0o8EwhAKHKIcoPyiLKB8ojig8AAAUDRgfq/wXYCJYAIYEv +gACUm+64B432eQnyBBkCBATZAClBBCZ4B63g8QAZAgQA2Q8hQQQmeAetAY4IrcUGz/1BiQS4x3CA +ACiFSKgiieB/KajgeBGI4H/CuOB44H7geOHFz3KAAOwEgODAIiIB/90UaQAggw+AAC+FoKtKJABx +ANuoIIADbWIAI4APgACUmzZ4pKhtYgHjb3ugqOB/wcXxwAoO7/2YcKXBKHe4cwDeBCOAD/8AAAAY +ugV6b3kIuf/YCLhkeCi4BXlFeQjd9CSAAyd4RMAQFAAxGf8SFAIxYb1AKAEEBXlHeUTBEBQCMRQk +gDOA5UCwAeYr91MlwgVApwAUDQEH2QbwEH0UJ0wQALRhuRQkQDC7e0+9AJCle4HhcHt4YDP3BCCA +DwAAAP8QuAV6XwXv/0Cn4HjxwG4N7/0g2QDaz3WgAMgcKaXPcaAAlBNboc9zgADkBGCD82jPdoAA +tKEMhvV/UyDEBfBj+2NTII8Ag+ekwYtxGvQehpu4HqY0FoAQ4ovxcAr0KHBAIwEERGtAJgMc8v4N +2irwHYaRuJK4HabPcKAAzBcr8IXnDvRBKgJSQCMABMG6iHO4/x6GnLgepg3aFPAsuFMgAgAehgO6 +mbgepuSDBeIFJwARAKEFgwGhBoMCoQeDA6ED4s9woADMF89xoACUE1yhAdqA4gf0HoaXuB6mINgK +pRjwAMED2hgYWIABwRkYWIACwRoYWIADwRsYWIAUGJiAhhYBERAYWIAE2SelFhiYgNEE7/2kwOB4 +4H7gePHAXgzv/QHZocHqCC/+i3AgwM91gAAsQQCliiBXCmIK7/0CEgE2iiBXClYK7/0ghQCFQNlR +IACAQMEG9NINL/4ocCzwz3CAAEyZUgoP/gDbxIVKJAB05oWoIIAHANjPcYAATJl1eUOJDyDAAOG6 +yiECAMohIQAlfuC6yiECAMohIQAlf1EigIDKICEAJ4UB4yV4B6XmpcSlFggP/gCFJ7jAuEAgRADP +cIAAZEAMEAUATCUAgAX0mglv/ohwFvBMJICAzCWhgBLyTCRAgMwlYYDKIcIPyiLCB8ojgg8AAHcA +DADi/MogYgHdA+/9ocDgePHA4cWiwYHgAdjAeEDAiiCXCn4J7/0REgE3iiCXCnIJ7/0AwQDBz3KA +ACxBZYKA4aGCA4IK9CaCZH2keSZ7QcFloiV4A6IK8CSCBH2keSZ4JXtBwQOiZaKA4Q3yMgnv/Yog +lwqLcAjZW9oe2xoN7/0Yu3UD7/2iwPHA4cWhwc91gADABKlwfg/v/QHZiiBXCv4I7/0CEgE2QI2K +IFcKIY0Quu4I7/1Fec9wgABkQACAgeAB2MB4QMCLcAYML/4E2QCNUSAAgAGNBPT+DUAGBPCaDkAG +EQPv/aHA4HjhxeHGmHDPcoAATEEFgiCCZoLIuBC4yLkFIQGAAYLIuxC7yLgFIwUAZ4ICgsi7ELvI +uAUjBwBoggOCyLvIuBC7BSMGACTyABQOAC8oQQBOIIMHANgPIMAAEn0EIEMBpH5lfgAcgAPagqR+ +xXt6onmCBCCOAQQgwAGke8V7eaJ4gqR7BCFBg2V4GKLf9cHG4H/BxeB48cD2Cc/9OnAFgaCByLgQ +uMi9BSUNkAGBJoHIuMi5ELkFIRAAAd4b8gQlgJMU8i8oAQBOIIIH8CGBIIDhAN8PJ48QCfIEJwAU +QiAAgGB5yiBiAOZ9gOXbfuj1/QHP/eB48cChwQHYUglgDUDAz3CAAExBCoBRIACAyiACB8ohIgHK +IoIPAABnAMojYg+IC+L9wCviBaHA0cDgfuB4ocHxwFoJz/2jwQh1SMDPdoAATEEahvuGPIYEfyR/ +p39Bx2IPr/2KINgEiiDYBFYPr/2pcYDnFfSA5Wn0sgrv/AfYgOBj8gohwA/rcgXYiiNGD0okAACd +Ba/8CiUAAQQUATGA4RnyIBQAMQsgQIAN8s9wgAC4BGCAz3EAAJRxDNhgewPaCfCA4Af0z3CAALwE +IIBgeQzYBhQBMYDhGfIiFAAxCyBAgA3yz3CAALgEYIDPcQAAlHEN2GB7BNoJ8IDgB/TPcIAAvAQg +gGB5DdgEJ1CTC/LyCe/8B9iKIBgIpg6v/QpxEvCA5RD0iiDYBJYOr/2KIUcK5gnv/AfYiiAYBIIO +r/3pcbD/vKYI3LcA7/2jwOB48cDhxaPBAdhAwM91gABMQalweg7v/VzZOoUbhSR4PIUEeYHAQcFm +/wHAO4UEeUHBPg6v/YogWARVJUAfqXGF/89wgADEQkAlARuC/4twUgkv/gTZAcCm/6oPAA0AhYDg +BfQFhYDgTA7B/10A7/2jwPHA1g+P/aLBAd3PdoAATEE6hhuGJHg8hgQhEADiDa/9iiCYA0wgAKBV +Jk8XKvID8Lt9BCBAo/7zLygBAE4gkQfwJ0AUXB5AFIDgyiHBD8oiwQfKIGEByiOBDwAAGALKJAEE +DASh/MolQQRAeIogmAOODa/9KnEA2A8gQAQGIBAgCnB//4ogmAN2Da/9PIapB6/9osDxwEIPj/2m +wTpxGnJgwADYARwCMAHYAhwCMAMcAjCLcFYOIAuBwQTBCnAjIEAEBcIDwIDgC/QKIcAP63IF2Ozb +iiTDD5UDr/y4c0B4VQev/abA4HjxwPIOj/0acCh1SHdodjhjZtk92jII7/0XuoHgCfQKcAoIL/6p +celwvgjv/clxKQeP/eB48cDCDo/9CHYA3Yog2APWDK/9yXHPcIAATEFagDuARHkA2g8iggMEIkMA +QiMDgMojYgAvJsfwAd/KIEEDBvIcgCR4RXhH/+lw4QaP/eB/ANjxwGoOj/0acCh3OnLPdoAAHA8U +ls91gABMjBC4IgvgCAClgODKJyIQhSEHKU8hQCefuOxxAKHscQAZAAQIhlEgAIAF8gCFgbgApc9w +gAC8BgCIgOAE9ACFg7gApc9woAAsIBCAAN5tHRgQSiTAcMlxqCAABs9wgAD+BwCIgOAM2MogIQBE +Kb4Dz3KAAEzQJ3AzIgAAACGCD4AAzI0B4QCqgOce8gCFYhUPFqlxYxUEFoC4AKUA2Afw7HNAowQZ +kAMB4PfgQIG6989woADUC02gwKFiHdgTYx0YERDwANmpcgXw7HMAowTiAeH34QCCu/fPcaAA1AsN +odEFr/3UHYAT8cDhxaHBCHXiDq/8F9jPcIAA9AQAgIDgFfSd2AAcBDARzKlxHtoCHAQwAeAQeAQg +gA8AAP+/j7gRGhwwAMAYurD/ugrABaUFr/2hwADY2vHxwOHFABYNQAXMAdrXcAAAAEACyMIiigAX +usdyAA4AAFMlARCj/1ElQJDPcYAA9AQB2MogIQBlBa/9AKHxwOIMr/0A2M9xpwAUSAihR4HPdoAA +lJ5fplCBz3OnADREgB6AEAehz3LzD//8UKEWoaDZmrn1G1gAz3GlAAgMCBEFAEwlAIDKIcIPyiLC +B8ogYgHKI4IPAAAbAxgBovzKJCIAz3KkALg9mxIDBs91oADIH3umphIDBiDffKaSEgMGfaajEgMG +fqZQ22KhmxoYAP/ZphpYAJIaWACjGlgAz3GkAOz/B6HPcAAA//8GoVEVEJYB2FEdGJDwpUMdGBAA +2B4I7/2NuPGliiDEAM9xoADsJwahCoFoHgQQiiDNAAahCoFqHgQQz3AoAAIBBqGKII0ABqFRHRiU +TQSP/eB48cDhxQhyAd2A4cohwQ/KIsEHyiBhAcojgQ8AAKIAyiQhAFQAofzKJQEBgOJE9lN6iiX/ +H4DhRPYzebN9FCGAABoIYAY7eax4FQSv/S9w4HjxwH4Lj/16cJpxSHcacwolACEA2s9xqwCg/1mh +B9gaoVihIN7PdaAAyB/QpQHYQx0YEADYWg+v/Y240aUZ2c9wpwCYRzqgggsgCh7Yz3KnABRIHYK+ +gmwSEQBwEhIAAKcAGEAj97jFIIIPAP8AANMg4QX3vcUlgh8A/wAA0yXhFYohEADL/wh2qXCKIRAA +yf8IdUApACKKIQgAxv8Id0AqACKKIQgAw//ReRnhLHkvcbF6GeJMei9yMHcAG4AjABxAI4T2ANgF +8FBwfvYB2AEDr/0AHQIg4HjxwL4Kr/0A2c9zoAC0D7yDPKPPcIAAlJ5oEAIBELpPIk4AiL7PcqAA +7CfGomoQDgEQvoUmjRDGot+Az3enABRIx6eAEA4A0KfPdqUACAwipvuAz3akALg9mx7YE/yAph7Y +E/2Akh7YEx6Aox4YEM9wpADs/yagiiCKAAaivKMKDCACAdihAo/98cAOCo/9z3CAADCMB4iA4PQE +IQCswc9wqwCg/2QQGQBoEBcAYBAYAAfdSv8A2c9wqwCg/zmguqA4oAIMoAkB2M93oADIH1EXAJbP +dqAA7CdAwAHYUR8YkCDYEKcB2EMfGBAA2MoNr/2NuCDYEafPcacAFEisoQDYDaEOoQ+hz3AAAAEq +BqbPcKUA6A+noCDYEKcF2EMfGBAA2JYNr/2NuCDYEacB2M9xoAC0Dxyhz3AAAAIvBqbPcAAAwjAG +ps9wAABCSAamz3AAAAJKBqbPcAAAAmIGps9wAADCYwamSiAAIM9wgAAwjCSQC4hEKb4HGGAVeGq4 +ACBBDhUgACQ4YMdwgABEQwMQlAAEEJUAARCSAAIQlgAgiBC5BSGBDwAAQi0mpiCIELkFIYEPAACC +RiamAIgQuAUggA8AAEJgBqYg2BCnBdhDHxgQANjiDK/9jbgg2BGnSiEAIBDwz3CAAAiaFiBABEQY +gAFBhUgYQAFAIVEgV6A4oM9wgAAwjAaQMnDoAg4Az3GnABRIXBlABEAqACRPIEEAh7mJuSamCHGF +IYsAJqaFIIwABqZMIQCgE/JMIUCgHfJMIYCgJfRALAAkBSCBDwAAgmAmpgUggA8AAEJiGPBALAAk +BSCBDwAAgi0mpgUggA8AAEIvDPBALAAkBSCBDwAAwkYmpgUggA8AAIJIBqYg2BCnBdhDHxgQANge +DK/9jbgg2BGngcCCwUAkEzuJworDCiTABB3/K8CA4EbyCcBAKU0hx3WAAIyZAKUKwAGlAcAYpQLA +GaVALgAkhSCKAAamINgQpwXYQx8YEADYyguv/Y24INgRp4PAhMGJworDCiTABAr/K8CA4CXyCcBM +IQCgAqUKwAOlA8AapQTAG6Ui8kwhQKAq8kwhgKA09EAtACQFIIEPAACCYCamBSCADwAAQmIn8Aoh +wA/rcgXYiiNEBabwCiHAD+tyBdiKIwQIoPBALQAkBSCBDwAAgi0mpgUggA8AAEIvDfBALQAkBSCB +DwAAwkYmpgUggA8AAIJIBqYg2BCnBdhDHxgQANgaC6/9jbgg2BGnhcCGwYnCisMKJMAE3v4rwIDg +bPIJwAalCsAHpQXAHqUGwB+lINgQpwXYQx8YEADY4gqv/Y24INgRp0AqACSFIIoABqaHwIjBicKK +wwokwATN/ivAgOBW8gnACMEEpQrAAcMFpQfAHKU9pQPBAiHCAAXDWGACIMWATfJieUx5L3Cocaz+ +A8FAKI0gtH0VJU0UAnnHdYAAlJ4CwATCIaUIwwIiAQAGwDtjAiMFgD3yAnosei9wqHGf/gTCBcMC +IgEAA8AnpQIjBoA0HYARNPIGwAIghYBsBeL/TB1AEQohwA/rcgXYiiPFBRvwCiHAD+tyBdiKI0QO +SiQAAK0Cb/wKJQABCiHAD+tyBdiKIwUB9PEKIcAP63IF2IojBQONAm/8iiSDDwohwA/rcgXYiiMF +BPfxCiHAD+tyBdiKIwUFiiSDD2UCb/wKJYABQCBQIEwggKByBMX/ANjPcaAAtA8cob/+z3GrAKD/ +ZBlABmgZwAVgGQAGSiQAcQDZqCDADChwgCCCDRB4BriBuJe4BqYocIAgQg8QeAa4gbiXuAamKHCA +IMQGEHgGuIG4l7gGpihwgCCECBB4BriBuJe4BqYocIAghgAQeAa4gbiXuAamKHCAIEYCEHgGuIG4 +l7gGpgHhAMBRHxiQSQVv/azA4HjxwBoNb/2YcKHBz3KAAPgEIIrPc4AAlJ4BgoQTAwCQccwgwYDq +8nBwBvLPcIAArJ8hiCCqSiTAcEogABCoIMACz3CAAKyfMiAAApBwA/JAIEgQTCDAkKQBBgDPcIAA +rJ8BiJBwBvQEIQEBLyVHAAbwByAAAS8lBwBhogDbz3CgALQPcBASAHygABoCARTwQCCAIRB4BriB +uEApASQleAamQCOBETB5BrmBuUAqABQleAamAePPcIAAMIwGkBBzMgEGAADZDyHBAAshQIEB2Mon +AgAN9AshAIHt889wgACsnwGIkHDn8wonAAKA4xHygeNn8oLjBvSKIIYgiiFGAgzwCiHAD+tyBdiK +Iw8CZPC22r3ZGnJ5cc92oADsJ0ohACBKJABxCiJAFCp1qCCBAgAgQSNUa0AvAAEUeBpitXrHcoAA +DJ8IkjB5QCmJAU8hQRAcfxC/5XkmpsC4uHgFIEAELyEIIAAjTxMJkvB/Br9PJ0YQHHlAKRMEBSOB +ISamwLi4eAUggQIvIkgQRSHAEAamCoaLcQCxCJIvJgEAABQAMdBwFPRFJ88Q5qYKhgCxCZIAFAEx +HHgwcBT0AeVp8YoixAaKIYQIp/EKIcAP63IF2IojDwdKJAAA4Qcv/AolAAEKIcAP63IF2Iojjwf0 +8c9xoAC0D3AZgAR5A2/9ocDgeADZz3CAAKyfIKghqOB/IqjgfuB48cDuCk/9r8HPcIAAHA8IgM91 +gABEQ8C4QMDPcIAAMIwkkAuIRCm+BxhgFXhquAAgQQ4AwBV4OGAZZSOJQcEZZSSJuGACiELBQ8DP +cIAAlJ4AgCK4wLhEwM9wgACUnmQQAQHPcIAAuAYAkBBxSiEAICf0z3KAADhOLYrPdoAArJ+GIf8B +YI5Due6KT4oCIcGAYY6GJ/8RyiFiAEO/DiPDg4Yi/wHKI2IAe3tleXtqQo4OIsKAyiJiAAK6RXkC +8AfZgOEGBCEARcHPcaAAtEdHEQGGgOHyAwEAz3KAADhOLYrPc4AArJ+GIf8BQ7kgqy6KhiH/AUO5 +IasvioYh/wFDuSKrz3GAAJSeZBkEAADZnrnPcKAAtEdTGFiARv3PdqAAyB9RFg+WAdhRHhiQINgQ +pgHYQx4YEADY1g1v/Y24INgRps9xgAAwjASRK4nPcqAA7CdEKL4HOWE1eWq5ACFADgDBNXk4YAll +ELkFIYEPAABCLSaiCWUQuQUhgQ8AAIJGJqIIZRC4BSCADwAAQmAGolEe2JPPcKcAFEgMgM9yDwAA +/M93gACUnkbAAMACuBR4G2cdZxlnACcEEAAnBRAfZwmHYYOnhQbHIBQEAIDnIoEMFQUAG/QKu0R7 +yb2le891pwAUSG2lCrkkeohxyblFec9ypwAUSC6iQC2BAgQhgQ8PAAD8ybgleBrwCr1Efcm7pXvP +dacAFEhtpUAsgwJkesm5RXnPcqcAFEguogq4BCCADw8AAPyoccm5JXjPcacAFEgPoUoiACAD2EfA +CiNAJAXAESCAhDoCAQDPcYAArJ8yIYAEQnFIwc9xoAC0R2AZGIAQuJu4z3GAAKy0IImfuIDhAdnA +eQ+5JXjPcaAAtEdfGRiABfA6CW/9iiCIA89woAC0R3EQAIYEIIAPDgAAAEEofoTx9QDfAvAB589w +gAAwjAaQEHfKAQYACMAAiBEgwIP18wDAArgUeEnAAcECwIDnAiBZAM9wpwAUSPegC/KB53vygucL +9IohhiCKI0YiBfC22L3ZOnB6cUokACGKdUAvWBFhvVEWEJYB2FEeGJAg2BCmAdhDHhgQANjiC2/9 +jbgg2BGmA8A1bSV4EHgQuIUgigDPcaAA7CcGoQAlQBQQeAa4gbiXuAahACXAFBB4BriBuJe4BqFA +IYAhEHgGuIG4BqFAI4AhEHgGuIG4BqFRHhiUQCQEPorAi8GMwo3D/PwuwIDgDfTPcIAAlJ58EAAG +z3GAAJSeAeB8GRgACcAGwfV4gOHHcIAAlJ4a9IvCYIKKwSCBisJgoovCIKKNwmCCjMEggYzCYKKN +wiCiM4A0EBAACfCKIMQGiiGECI3xLYBMEBAAFiBAMwrCACCVD4AAjJkLwPAdgCD0HQAgCCKAD/// +Af8vJkAmBC4+IC9wxPwOIJcPAAAAAQvAiCB8AAQovgUvcApxvvwOIIEPAAAAAQkngC8AAP8BiSHH +D0ggAABIIQEALsJUHRgggeJVHVggBfIEwoDiDPRUb0AqAyF0e3pitXrHcoAADJ8IsimyQiRUIEwk +AKCMBs3/F/EHwGG4gOBAIlIguAXt/0fApgxABe78BfAqDy/9iiCIA89woAC0R3EQAIYEIIAPDgAA +AEEofoTx9WkGL/2vwPHAocGLcIIMb/0E2QDAUSAAgAQMgv8AwFEgQIAYC+L/yiCiAADAUSCAgBAO +QgoAwFEgwIC4CIIKAMBRIACBUAxCBdIPoAEB2M9xgK7gAexwIKACyOxxAKHPcoAAjJmKJIF9ANmo +IMAB8CJDAOxwYKAB4QIJb/0A2KHA0cDgfuB48cDKDQ/9z3CAAIQFAICF4LwABQDPdqAArC8ahlIg +AABRIACAVPTPcYAAjJ8JgQHgCaHPcIAAuLRAgIDiA4AVeQXyCoEB4AqhBPAYgQHgGKEYhs91oADI +HyDfmrgYpgXY8KVDHRgQANhaCW/9jbjxpYz+GIazuLq4GKZk2PClQx0YEADYPglv/Y248aWyDoAJ +jgwACUoIwAEF8OoNL/2KIIgDz3CgAHhFAIAEIIAPDgAAAEEofoTz9c9xgAAcD0iBNJFTIgAAUggv +/QHbdg4v/BHYYQUP/eB48cDyDA/9z3ClAOgPB4DPcqQADEJTIASARCCNAEQgAwECgs92DwAA/Ahx +ybnEeOOCKrjYd8R/QS+FEuSCUyZGAulyybrkfiq+BvKe4YT3jCFPiMT3ANkD8AHZTCQAgATynuBE +9wDYBvCMIE+IPPcB2IDlG3gleAXyTCaAh0P3ANkF8IwmT4g99wHZgOUCuQV5BPJMJYCHRPcA2Abw +jCVPiDz3AdiA4wO4BXkE8p7iRPcA2AbwjCJPiDz3AdiA4wS4BXkE8p7mRPcA2AbwjCZPmDz3AdgF +uCV4QiAAgH0EL/3KIGIA4H8A2OB+4HjPcKAALCAQgOB/CeDgfuB44H8B2ADZlrnPcKAArC88oOB+ +4HjgfuB44H7geOB+4HjgfuB44H8A2OB+4HjgfuB44H7geOB+4HjgfuB4z3KAAHAPVIpZYTB5QWlQ +cMT2IngQeAPwAtjPcaAAyB8eoRDYDqEB2BUZGIDgfuB48cCKCw/9AN/PdaAA0A/1pQPeEvDgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeGG+jCb/n+71A9gapc9wgABwD++oAdgVpaUDD/3x +wDoLL/0F2ADdC7ipcd3/z3GAALShHoHuuGDyHYFRIACAXPL+Dc/7ANmcuc9woADQGzCgAdnPcKQA +mEA8oAQgvs8wAAAAAeXKJSIQUSMAwCf0USBAxQXyUSGAwyjyUSDAxQ7yUSGAwwryz3CqAAAEAYCG +ID8Lg+Aa8s7/IN/PdqAAyB/wpgHYQx4YEADYpg4v/Y248aaE5aYHxf8I8MX/z3GAAMCNCYEB4Amh +USAAxwDZD/IA2s9woADQG5y6UKDPcIAAkARAgBCCAeAQos9wpACYQDygPfBKDc/7USBAxTf0USAA +xQHlyiUiEFEjAMDPdqAAyB8g3w708KYB2EMeGBAA2C4OL/2NuPGmhOVCAAYA5vHPdaAA0A8A2BWl +8KYB2EMeGBAA2AoOL/2NuAPY8aYapQDYz3GAAHAPD6nPcYAAwI0JgQHgCaEB2BWlVQIP/eB48cDm +CQ/9AN/PdqAA0A/1pgPdEvDgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeGG9jCX/n+71 +A9gaps9wgABwD++oAdgVps9xgAC0oR2BgLgdoZX/Hg+AAvEBD/3gePHA4cXPcqAA0A+wgs9wgABw +Dy+IMHUA2wX0A9k6om+oAvDf/9UBD/0A289yoADEJ4ogGAg8GsCAz3GgAMgfDqGAEQAAUSBAgM9w +gABkqg3yQhIChgQivo8AwAAABfJBgIDiA/JCoIAZwADgf2Gg4HgUzAQgvo8AAChARfLjuCHyFRIC +N4DYz3GAAESN67oUGhwwBvIYgQHgGKEF8BCBAeAQoVEiwIAH9ADZz3CgACwgL6AVzEYggALgfxUa +HDBRIECBF/KKIAQAFBocMM9xgABEjQ+BAeAPoRXMANlGIIACFRocMM9woAAsIC+g4H4E2BQaHDDP +cYAAgAwfgQHg4H8foeB+8cB+CA/9AN0g2M92gADsp0AmDxXOCWAGAKbPc6AAyB8B2BOjWIM5g1QT +BAD4EwAAz3OgADAQYYPPc6AADCQCIgKAZ4MDIUEDQaYipgIkAwDPcoAAHA/PcYAAtKFjpkwZRAMU +klAZRANoggm2z3KlAAgMUyMAAAi2ABIEAE4ZRANTJEUBUyRCAEgZQgGD4sohwQ/KIsEHyiOBDwAA +Vg1wBOH7yiBhAQQkhQ8AAADgQS1CA5YZggA+ge65FB4AEQzyBLqBukV4CLYH2AfwFScMEKCkA/AE +2AHgiOC69+u7sAjC/ql3USCAxbrygOe49M9wgAC0oT6ABCGBDwAAAEAEIYBPAAAAQBBxAd/KJyIQ +yiViEM9xgABwDw+JAeAPeA+pz3GgALQPN4EwcADeCPTPcKAAqCAGgIwgg47M9wDfV//PcIAAkAQg +gAHdCIEB4AihgOeG8s9xgADspwWBBCCADwAAAOBBKEQDz3CkAJBBdYBWgFEkAIC4ckihz3KAALSh +Z6EF8kwaxAAI8EwahAMEI4MP//8AAGehUSRAgAXyMLtOGsQABfBOGoQDcHtnoVEkgIAF8lAaRAEI +8FAahAMEJYMP//8AAGihDYAGoQQggA8AAAD+KbhSGgQAHoLuuCPyz3CqAAAEBIAJoc9wgABQqECI +gOJAIAQBMvKA4loALgACEIUA9CSDAxXYE7jwIMMAz3CAACio1XgB5lB2YKC09xvwz3CAAGioQIiA +4kAgBAEW8oDiAhCFAM/39CSDAynYErjwIMMAz3CAACio1XgB5lB2YKCz90GpAhlCAYDnGPQEIL7P +YAAAABL0z3CAAJAEIIAB3QGBYbgBoQeBAeAHoYoghQcaDO/8FBIBN1EjAMAT8gDfAf+KIMUHBgzv +/Olxz3CAAJAEIIAB3QGBYbgBoQeBAeAHoYIO7/yKIEQCBCC+z4ABAADMJyKQzCUhkAzzz3CgADAQ +A4CA4ADZCvLPcIAAkARAgAHdKHcMggHgDKKA5RXyAtnPcKAAyBwqoBz/z3CAALShQNk9oBTMhiD5 +jwX0ANiPuBQaHDDNBe/86XDhxTDbAN3PcKAAyBxpoAPaz3GgAMwXIRmYgE6hp6BqoOB/wcXxwOHF +z3GAAIAMDoEB4A6hz3GgAMQnGREAhoDgANoF8gLYEBkYgM91oADUC1el//7PcYAAtKEdgYe4HaHo +/xCFgOAr8gPYEaXgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB4EaUTzBEaHDCx/iEFz/wKIcAP63IF2M9zAAC8CUokAAAhAe/7CiUA +AVEhAMbxwE30z3CgAAwkB4CA4Efyz3CAADCiC4DPcaAAyB9k4B6hENgOoQHYFRkYgFIIL/0L2FEh +AMYz9FEgQMcA2iTyz3GgANQLFoE4gSTgMHBP91EhAMYE9FEjAMD881EjAMAS9FEggMQQ9BnwANnP +cKAA/ESeuSGgRaDPcYAAgAwPgQHgD6HPcJ8AuP9cGMAIz3CfALj/XBgACK3/0cDgfuB48cDmC8/8 +CHXPdoAAtKEdhi8mCPA89OC9EPSCuM9xgACQBECBHaYDggHgA6IggYogRQnWCe/8I4FRJUCQHYYR +9IS4z3KAAJAEIIIdpgSBAeAEoSCCiiCFCa4J7/wkgc9woAAMJAOAUSDAgB2GEPKEuM9ygACQBCCC +HaYFgQHgBaEggooghQmCCe/8JYE9hi8mSPAA3w70CiHAD+tyBdjPcwAAEQmKJIMPzQev+0olAADP +daAA0A8RFQCWgOCF8kQhfoIT8lEhAIAX8s9ygACQBCCCAoEB4AKhIIKKIEUIKgnv/CKBCfBRIQCB +FfKc/x2GUSDAgWf0z3CgAMQnGRAAhoDgB/IC2c9woACQIz2gPf4b8JP/HYZRIMCBVfQ5helyBfAA +EQBQAeJPekEpgAAQcrn3ANoF8AARgFAB4k96UyFAABByufcD2BIdGJDgeOB44HjgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4Eh0YkBPMERoc +MFD+HobzuAnyz3CAAJyu66jPcIAAXK7ssM9wAAD/f89xoAAMJAGhG9gEoTL/jQLP/AohwA/rcs9z +AABYCQXYaPHgePHA4cVQ3QDaz3OgAMgfr6NeowIgQgBeowHaFRuYgEDaTqMEIL7PAAIAECwOgf9Z +As/84HjxwNoJz/zPcIAAtKExgFEhQIIR8s9xgABwDy6JRBCCAER5USGAgEjayiKBDwAAkAAC8A7a +ANvPcaAAqCAngagQDQBZYbFxwiVFEMol5hKweArZdP0d/s9wgADcRgCQz3agAMQnUSAAgQTyjCUD +kgT3AN8V8M9woAC0D3ygz3CrAKD/eqAWCCAKANgZFgCWgOAE8gLYEB4YkAHfGRYAloDgPvRRIQDG +PPQD2c9woADUCzGg4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeDGgE8zPcYAAgAxqvREaHDAUgQHgFKEVgbhgFaHGDO/8AdiOCmAB +Adi3/SUB7/zpcOB48cC2CO/8wNjPdYAA7KdBjSAaAjASakTgz3GgANQL2IEA20ImDhiA5somzBDR +cEYADgDPcZ8AuP8Ygc9ygACQBJC4GKEYgbC4GKEgggWBAeAFoc9xgAC0oR2Bg7gdoSCCiiDFCHIO +r/wlgQDYGf8A2D3wz3aAABwPyYYD4AQggA8AAPz/Kr7Avhe+x3YADgAAxXjsdgCmCMjsdgCmEczP +dqAAiCRKJMBzAeAQeAQggA8AAP+/j7gRGhwwHqYA3qggAALwJY8T7HDgoAHmgOIA3cv3z3CAACio +8CBOA+xwwKAB5VB1t/dtoQHYNQDP/OB4wdggGgIwz3KAABwPGIoB289xgAC0oYbgFoHCI8EADOAY +IMAAYhkEAGIRAAED4AQggA8AAPz/nbifuOxzAKMIyOxzAKMYijaBhuAB2MIgAQAYIQEA7HAgoOB/ +AdjxwG4Pr/wb2M92oADEJxUWDZYWHhiQA9nPcKAA1AsxoOB44HjgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HgxoBPMERocMIogBAweDa/8 +ANl6/eS9E/LPcIAAkAQggBGBAeARoUD9GRYAloDgBfIC2BAeGJBe/iLwUhYAllMgQQCD4dEl4ZAD +8rf+GPDPcIAAOQgB2SCoz3CAAJAEQIAGggHgBqLPcIAAtKEegFEgwIEG8s9wgAB0BSCg/QaP/PHA +jg6v/ADZz3AAAP9/z3WgAMQnEx0YkBvYFh0YkAHYEB0YkM92gAC0oR6G8bgF8qgeQBAI8BGGNoaW +DmACANqoHgAQb/4dhue4BPIA2CXwLRUBllaGMHIG8oC4HaYA2JH+9vEEJYFfAADwLx6GJXgephEV +AZbpuQXyz3AAALirC/DwuQTyAtiIHgQQ4LkH8s9wAAB4rmUGj/xRIcCAG/II2BMdGJAD/4Dg0vUC +2DwdAJAhFQGWz3CAAGSqIaARFQCWUSCAgAf0Tv4dhlEgwIG+9REVBZZRJYCADPQKIcAP63IF2Ioj +RggxAq/7iiSDDwTYEx0YkIv/qvHgePHA4cXPcoAAtKEWgpjgz3GAAISqBfJUEoAAgOAE8hmCuoIE +8BuCvIJRgs9z/v//P2R4pHsEIoIPAAAAEEV4AKEA2AGhZXpJoQ7aSqHPcYAAYMoaCoABz3CAALDH +AIBRIECACPLPcYAAUM0CCqABAdiVBY/88cAODY/8z3GAAAAAAIFRIACAG/IBgVEgAIBA2M8g4gfK +IIEPAADQAM8g4QfPcp8AuP8dogSBAeDTuAShBSCAD9D+AAAWogDez3WAALSh3aXepVQdghPfpYDY +lB0CEM9wgAAIrdmgz3CAAHCqwKDPcIAA7MbCoBTMgB2AE1EgwICIHYQTqB2AEw7yFcxTIECACvLP +cIAAHA8JgFEgQIBKIUAgBPJKIQAgz3CgAAQl1KAw2c9woABQDCKgEcwTGhwwwPxRIYDDz3eAABwP +z3GAAEyMHfIA2I64HqXPcIAAkARU4SCgG5cctR2Xkh0EEIoghA4etYogRAtCCq/8ANkG2c9woADI +HCmgE/DPcIAAkAQE4SCgGpcctRyXkh0EEE4XABEetYoghAsSCq/8ANnPcYAAkARAgQCCAeAAoiCB +AYEB4AGh+tgeCK//ANnU/IDg6AcBAM9woAAMJM9xAAD/fyGgz3CgANAPERAAhoDgDfIKIcAP63IF +2IojTgyKJIMPKQCv+7hzAdnPcKAA0A8RGFiAaBeBEByVAiBQAB6F7rgaAiEALyAIJEAdhBPPcKoA +AAQCgM9xpQAIDCCBBCCCDwAAAP8ougQhgQ8AAADgO3mJuiV6KIcEIb6PAAYAAFGlA/KMulGlz3OA +AOynTaMMo89xqgAABCCBRBWCEJTiKqMZ8gb2iuIZ9CO5DvC34g7y7uIT9EUp/gJBKcFwUSDAgcIh +YgAA2AvwRSn+AkEpAXH68SK5+PEA2QHYNqXPcqoAAARBgjyzS6PkusogYgDhusogYQCGIv4PQSoE +ARATBQFJHQIRHaUFJQIBSLNVIcMG4LjPcgAAfA8JI4IAA/IA2DvwjuGM96AXAxBwcQj3z3OgANAP +gBMDAHBxCfKAuB2lmgiv/IogBQjr8c9woADQDxkQAIZCIAAISCAAABBy3PfPcZ8AuP8YgZC4GKEY +gbC4GKHPcYAAkARAgQWCAeAFoh2FIIGDuB2liiDFCE4Ir/wlgcfxAdiA4An0AN/PdaAA1AsA2Iz9 +MwYAAApwANkA/mIXgBBEFYEQBCBEAIYh/wNCKQUBRCQCAaByz3GAABzLwbpJYYm5O6VsFYMQSRWB +EAQjDwCGI/8DRLskf39nz3OAAAhx9CPPA0odghNeHcQTz3eAAAzOSmeJulylcBWCEER4hiL/AyR4 +RLpYYPQjAAAEIQEBYB0EEBGFoHHPcoAAKHH0IkMAGaXPcoAAOHH0IkEAih3EEBqljB3EEI4dRBCQ +HUQQYQIgAADfz3CmAAgEAYAEIIAPMAAAADS4USBAxkAdBBBAFQERC/TPcKAAqCAIgBlhMHl+DW// +CnAD8Apwx/0EIIBPgAEAANdwAAEAAADfFvQB2JYVghBKHQIQz3CAAOynKJAEuom6QB3EE0kdwhP2 +pemgRXkosOXwSR3CE89wpgCMA12AUSDAxwQigQ84AAAAQSnABJYdAhAEIoAPAAAA8Cy4JbkleBGl +z3WAALShBfIRhYy4EaVTIsECRBWEEDalUSQAgNEi4ocA2AP0AdjPdoAA7KdJppYVghBolgS6ZXpI +tnGFPLZTJMIAXHrPd4AADMtPZx2l+6VsFY8Qw78vJcEDz3eAALyo9CdPEW2mXh3EE893gAD8zU9n +eaX8pXAVjxDDvy8lwQPPd4AAvKj0J08ReqVgHcQTz3eAANyo9CeFEM9zpgCMA893gADsqPQnghCK +HUQRjB1EEY4dhBCQHYQQfYMEI48PAQAAADC/Sh3CE2mmShWDEIDjANoZ8kwkQIMK8oC4HaWKIEUI ++g1v/IohUQAdhVEgAIAH8nXwggiv/IogkQNRIADG+/NI8FUhzgbguM9zAAB8DwkmwxAE8gDYPPCO +4Y/3z3aAAJgPyYbRcQn3z3egANAPgBcOENFxCPKAuB2log1v/IogBQjq8RkXAJZCIAAIgODKIIwA +EHPb989xnwC4/xiBz3KAAJAEkLgYoRiBsLgYoSCCBYEB4AWhHYUggoO4HaWKIMUIWg1v/CWBxvEB +2IDgJ/IA30whAKDPdoAAtKEH8haGjuAF9B6GkbgepkoWgBCA4Br0yXXPcKAAeCZC2TKgHoXxuLwC +AgCQ/YDgrAIBAMr9gOCsAgIAoQIAAADYvvyZAiAAAN+KIMUA8gxv/IohEQvPcaYA1AQsEQCANBER +gDgRDYDLERIGKnHGualyhiL9Dwa6RXkqcoYi/Q8EukV5BCCCDwIAAAAnukV5RCUCHA26RXmpcoYi +8w8EIIAPOAAAAA66RXkluCV4RCWBEBS5JXiIuEQlARJBKcGAUiBABRGmVB5CEMohgg8AAP//yiGB +DwAAEB8acTaGP7YEIYEv/wMA/yi5NqZ6DiACANryvageABA98kQWghAxhqDi0SHhgjXyBCGEjwAA +AAEI8s9zgAAAcEtjgeMK9gQhgw8AAAAk13MAAAAkI/IEIYMPBgAAADG7guM2AA0AguML9EwkAIAV +8s9zgAAAcEtjguMP9EwkAIAE8sziC/Z2hhJzyiOODwEAiA3MIM6AzffXcAEAiA3H989ygACADDaC +AeE2ogHZGvDPc4AAAHBKY89zgAAwjGaTcHIP9uu5CvLPcYAAHA8ogQQhvo8ABgAABfJKIAAgA/AC +2RpxVBaBEM9ygADspygaQAQHuWiSiLlleSiyNoYwGoAEPLIxhquiBCWNHwgAAgAdsi2i13UIAAAA +1AjhC8ogAQQWhoDgdB4AFAT0tgjAC2rwz3GgANAPgBEBADBwCvJPIAEgPabPcoAARI0gggHhIKJU +FoEQgOFs4AvyCSCBDwAAagbPcKAA0A8iGFiABvDPcQAAfA8JIEEAz3CgANAPGRAAhkIgAAhIIAAA +EHFCAA4Az3GfALj/GIGQuBihGIGwuBihz3GAAJAEQIEFggHgBaIdhiCBg7gdpoogxQiqCm/8JYHP +cYAARI0CgQHgAqEdhkQg/oIU8oYgv40K8oogxQuGCm/8iiESB0ECz//PcYAARI0JgQHgCaGd/ATw +AgoP/s91oADUCy/wbf0KJgCQLvQD2M91oADUCxGl4HjgeOB44HjgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeBGlE8wRGhww8KUxBE/8HoXxuAPy +QH7I8RTMhiD/hQXyA8gBgP24AvKO/e4IwAjz8eB48cDhxQh1z3CAADCiC4DPcaAAyB9k4B6hENgO +oQHYFRkYgAXwTgxv/HvYAYWA4AX0USMAwPjzAYXBuIPgD/TPcIAAOQgB2SCoz3CAAJAEIIAGgQHg +BqEA2BbwAYVRIACAB/TPcYAAtKEdgYK4HaEBhVEgQIAH9M9xgAC0oR2BhLgdoQHYrQNP/PHAz3CA +AGiocgxv/BjZz3CAAFCoZgxv/BjZLwdP/+B4AdoA2c9woAC0D1ygz3CAAMCNKaB1BG/7GNjgeKHB +8cDOCk/8CHdacs9ygAAAAACCmnFRIMCBocE6cxvyAYJRIMCBQNjPIOIHyiCBDwAA0ADPIOEHz3Gf +ALj/HaEEggHg07gEogUggA/Q/gAAFqHPcYAA2K4mgQDYgeEB2cB5gOdAKRMDP/LPc4AAtKGUE4EA +57kJ9M9wgAAohQS5IGAtuMC46XGGIfwAjCEChRR7EfTPcIAASAUAgFEggIAF8iDdjhMOAQjwmN2K +Ew4BBPBeEw4BDt2KIIUAWghv/KlxiiCFAFIIb/zJcc9wgABwqgCA4LjAJSIRsHovIIgjSidAIAnw +z3GAAHCqAKH6cAh1GnAIcs9zgADsxiCDg+EF9CODUSHAgAr0SiEAIAomQCQKIEA0CiVAJIHwwBMC +ADgSgwA3EoEACLtleTkSgwAQu2V5OhKDABi7ZXk0EoMAQCEQBDMSgQAvIAgkCLtleTUSgwAQu2V5 +NhKDAM9yoAD8RBi7ZXlAIRUBXYIA2VEigIHMISKgCfIvIkgFOnH6cdpxG3FL8E8j0yNBLEIjwLoE +ulR6inHGuUkhwQU0elEkwKLPcYAAoHJRYQbyQSkCARQiQQAouQPhz3YAAPz/BCGDA89xgABAokiJ +z3GAACiFBLpBYUAgECHyuS8gCCQH8nt7QCAQIS8gCCRAJcEhJH4II4IDAiKYA1EgAIDAJSERJ20E +IYEPAAD8/wgjQAACIFYAGmJQeoohAiACEgEhQCAAJTBwSPYCIQEESCEBADB5QMEE8ADYQMAvIEgE +inEKc6YKIAJKJAAACiQAoD70CtjPcaAAyB8eoRDYDqEB2BUZGIAG8EoJb/yKIMoHUSAAww30z3Cg +APxEHYAEIL6PMAAAAAX0USMAwO7zUSMAwMohwg/KIsIHyiBiAcojgg8AAKUCyiQiAOAEIvvKJSIA +USAAwwDYCfTPcYAAgAwJgQHgCaEA2Ji4mnBMJACgyiUiEMogQgPI9EwhAKDPdoAAcKoX8s9woAD0 +B62gz3CAAGjHMYBbiRqJCLpFeAS2XYkciQi6RXgFtgCGgbgApgPwANgCpkwnAKCa8gCGUSAAgDvy +z3CAAOyhTIjPcIAAAHAyIIQAH9lMJACAANrc989wAwAUAFZ4z3OjALD/UOBgYM91AwAYAFZ9UOVj +ZS8oAQAB4i8rwQACezBzyiHFAJByqPdALEABQiAACBlhz3CAAGhzKGAhhk8j0yMJuAV5AoYleAKm +BSPAIw1xALENcQDAALEMEgEgDXAgoBASASENcCCwiiCFAGINL/zpcYwnApUU8ownA5Eb8ownA5Uh +8gohwA/rcgXYz3MAAAgMiiSDD6kDL/u4c89wgACQBCCAD4EB4A+hEgngAUpwEPDPcIAAkAQggA6B +AeAOoQjwz3CAAJAEIIANgQHgDaEAhoDgBvIihg1wIKAA2ACmTCEAoM9xoAD0BwDYEvIHoQHYC6ED +2AihTBmABQHYA/AA2KpxC3JKc0YKoAsAFAQwz3KgAPQHANkkogHdgOAB2DIKoAvAeADBACEABM9x +oADIH/gRAgBCeEggAABfgRB4UHBKAAUADBICIM9wgABkqkKgoNgPoQDYH6HPcoAAcA/PcIAAtKFV +ihyQQngAwkwkAKBYYB+hAtgVGRiABfJRIEDGINgC8oDYDqGMJwOVB/TPcIAAtKEckAjwjCcDkQn0 +z3CAACyiDZD6C2//ANnyDA//FMyGIPmPCvSMJwORANjPIKEDyiAiARQaHDDPcIAAAAAAgFEgwIEG +8s9xnwC4/wDYHaHPcYAAcKoA2AChqXAI3N8FL/yhwPHAsg0v/ADZCHUBgMG4g+DKIEEgyiBBAAXy +qXB4/kogQCCB4BHyEIVRIICBRfIQhc92gAC0oVEgwIEa8s9wgABwDwKIGPAB2wDfOfAA31UmQBrp +cZDafgggAQDbQCUAEpweABAA2AW1BNsp8AWFJoWmDkABUSDAgZQeAhAH8h2Glbgdph6Gl7geph+G +BCC+jxBwAADKJyIQ6PWcuB+mz3CAALDHAIBRIECA0vMQhe24zvMB383xAN/pc89ygAC0oVQSjgDP +caAA9CaA5s9wgABkqhH0z3aAABKi9CbOE1yS2mLPdoAAcA/VjsJ6ELqAugLwAtpDoSWFTCAAoCGg +DvTPcIAAOQgB2SCoz3CAAJAEIIAGgQHgBqGOCw//+QQv/Ghw4HjxwI4ML/yQ2aLBCHZBwSGGwbmD +4QDYyiABIAbyyXAv/kogQCDPcaAALCAmgYHgAN8weRzyEIZRIICBNPLPdYAAtKEclRBxyfYlhs9w +gABkqgKAEHGr9BCGUSDAgQjyz3CAAHAPAogI8AHYQvAFhiaGgg1AAT+FBCG+jxBwAACUHQIQEPTP +cYAAsMcggVEhQIAB2UfyUIbtukPyQMEod0PwAN8j8ItwgOAD8gLbYKADgYDig7gDoQXyAIKmuACi +LBYAAAShDBYAAAWhAMEBwlUlQBreDuAAAdsfhZ64H6VAJgASnB0AEJ4KD/8A2M91gAC0oVQVghCA +4s9xoAD0JmX0z3KAABKi9CLDA1yVemLPc4AAcA91i2J6ELqAulbwQMcA31EgwIHT9W2GBYbPcYAA +7MaBwgQjgw/AAAAAAoE2uxEgwIBAJgYSQCEECyHyBZYcEQcAQiAFBPQkwwAIJ0ABcHDX9s9woAAs +IA+AgOAR9M9woAAsIGaAHJVwcCgHxv/PcIAAZKpigAWBEHOM8wOBUSDAgJXzANrPcKAA/ESeukGg +A4GjuAOhi/HPcYAAkARAgQuCAeALoiCBiiBFC/YIL/wrgW7xAtpDoUWGTCAAoM9xgABkqkGhDfTP +cYAAOQgB2kCpz3GAAJAEQIEmggHhJqIBAy/8osDxwJoKD/wIdhXMUyBAgAryBxIBNgDYmBEBAIYK +4AAIcgGGwbiD4MonIRDKJcETBvLJcKz9CHUB34HlyiNhAEPyEIZRIICBBfQA22hwPPAUzFEgwIAs +8hXMUyBAgBsSAjYP9AAigQ+AABCXAdgAqc9xgAA4TjKJUSEAgOgLggAQ2BQaHDDPcYAARI0SgQHg +EqEDyBsSATaEEAIBz3CAAASXNXgpgFlhKaAI3dDxz3CAAMiMK4AB4SugAggv/IogxQkA2wHYAtnP +cqAA9CYjokOGgOfPcYAAZKpBoQ70z3GAADkIAdpAqc9xgACQBECBJoIB4SaigOAK8gDYnrjPcaAA +/EQBoQDYBaGCCA//9QEv/AUjQAPxwIoJD/wIdgGAwbiD4ADdyiBBAwTyyXBt/QHdgeAA2SzyEIZR +IICBKPIUzM9ygABMjFEgQIEZ8kDYFBocMFASAAYB4FAaGAAbyM9ygACIlhR6IKoDEgE2ANiYEQEA +LgngAAhyCvCkEgEAAeGkGkAANg/v+4ogBQoC2c9woAD0JiOgI4aA5c9wgABkqiGgDvTPcIAAOQgB +2SCoz3CAAJAEIIAGgQHgBqHOD8/+SQEv/ADY4HjxwM9ygAC0oVQSgQCA4RT0PJLPcoAAcA9UikJ5 +ELlFIUMBz3GgAPQmY6EA2s9xgABkqkGhOf2B4MogYQAE8oYPz/4A2KMED//xwIYID/wIdRpxQSkA +Ac9xgAAgc8O4CGEklQQhgQ8AAACA13EAAACAAdnAeTV4IZUE4TBwDfKMIAKkCfTPcIAAtKEWgIwg +AoYD8hDYl/AklVoO7/uKIMQLjCACrCLyDvaMIAKgRPKMIAKkZvKMIAKoh/SpcJj+g/CMIAOkFfII +9owgA6B99Klwn/958IwgA6jMIIKvAADwAHP0qXDH/2/wqXDW/mvwz3GAAAAAAIFRIACBG/IBgVEg +AIFA2M8g4gfKIIEPAADQAM8g4QfPcp8AuP8dogSBAeDTuAShBSCAD9D+AAAWoqlwQv9J8M9ygAAA +AACCUSAAgRryAYJRIACBQNjPIOIHyiCBDwAA0ADPIOEHz3GfALj/HaEEggHg07gEogUggA/Q/gAA +FqFqC2ABqXAl8M9xgAAAAACBUSAAgRryAYFRIACBQNjPIOIHyiCBDwAA0ADPIOEHz3KfALj/HaIE +gQHg07gEoQUggA/Q/gAAFqKaDWABqXBxB8/7TXEqDe/7iiCFCGHx4HjxwP4Oz/vPdoAAtKEfhgQg +vo8AcAAAWfIvKQEAz3CAAAAF9CBNAJwWAhAA36QWARBPJYAQ6XP1/IDgEPSMJQOQz3GAAPwMBvQU +gQHgFKE98BOBAeAToTnwH4b+uC/yz3WAADhOEI0ujRBxLfISjVEgwIAp9DCtUgigAAPYUSAAwxn0 +ANmeuc9woAD8RCGgMI2GIf8BQ7kQuU8hwgbPcYAArLQgiZ+6gOEB2cB5D7lFeS2gEo2EuBKtBfDP +cIAAUK7gqEIMgAGhBs/74HjxwOHFpgkv/wDdz3GAALShHYFRIMCBXvTPcKAABCWigAQljR//AF// +UyWAEIfgRfRRIoDTQfIegfq4P/QEIL6PAB4AAA7yB/DPcAAADgqeDs/7USKAwPr1USIAwM8lYhHP +cYAAtKEegfm4zyUiEs8l4hLPJaITIfT7uBLyiL2JvY29TyXAEr2BjrgEJY0fAgAAAFIlTRQqvQV9 +D/D8uMUlgh8AAAAFzyXiEs8lohPFJYEfAAAAB89wgABAogiIxLgYuFEggMQFfWAJIvzKICII2QXv ++6lw4HjxwFoN7/sIcs9xgAC0oQCRiBEDAc91oADQD0QgBAMKJsCQQNsQHdiQQiyEAIYg/APKJmIQ +qBEPAEAuhRXPc4AA7Kfwfv2z/JMQvuV+DB2Yk2GLArtI4xAd2JBiEQ4BiBEDAdtjwJFwe1EmgJJE +uGIZxAAG9C6RUyHBgBDyz3CAABwPCYBRIACAPdjAKOIFyiChB8AoIQYK8EAsAQE4YM9xgACYQwhh +F7gD4wUgQAEEI4MPAAD8/2V4nbifuAwdGJARzAHgEHgEIIAPAAD/v4+4ERocMA4dmJAgFQCWz3CA +ABwPCIDruBDy5LoO9HINb/1IcM9wgACIoKDZxNo923YO7/sXu70Ez/vxwE4M7/uKIQgAz3WAAGSi +z3CgAAwkIaDElc9wgAC0oR6AGnbxuIYg/CNJ8lElgNFF8owgA6RD9APZz3CgANQLMaDgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4 +MaCpcE3+USDAgAbyz3CAAICoFg0AAs9xoADEJxkRAIaA4ATyAtgQGRiABNgTGRiAG9gWGRiAkvAu +CWAECnAId6lwCnHB/gh2I/9EJn6UDvJRJgCRCPLPcYAAtKEdgYC4HaEBhYoPz/568IDnDPJM/89x +gAC0oT2BUSHAgXD0fv8r8APZz3CgANQLMaDgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4MaATzBEaHDBRJsCQB/LPcIAAgKhKDAAC +z3WgAMQnERUAllEggIAA3hr0Ug7P/s9wgAC0oR2AUSDAgSr0ERUFllElgIAM9AohwA/rcgXYiiNJ +DUEHr/qKJIMPBNgTHRiQG9gWHRiQz3WAAAitGYWA4AXygg9AAdmlz3CAAAAAAIBRIACBBvLPcJ8A +uP/doNUCz/vxwHYK7/tN2M9yoADEJy0SDoYJuBoaGIDPcIAACKIgiIDhocEG8gHbz3GgANQLcqEE +2RAaWIBNcYYh8w+MIQyAAdnAeTlhNHkAiB7hgODKJUEQBPJAIQ0DIn4H8M9wAADsD8oKz/tRIIDE +BfRRIQDG9vPPcaAA0A8QGViDJREAhmDAJREAhg95ARwCMAAUADGMINiBzCCCjwAABwjKICIAB/SI +4QHYwHhmDSALLm7PcqAAxCcaEgGGBCGBD////wAaGliAERIBhuu5CfIA2Yu5ExpYgBrZGRpYgAkC +7/uhwPHAjgnP+892gAC0oc9woAAMJDyAVoahwQIiQABkuBB4hh4EEBByyiHOD8oizgfKIG4ByiOO +DwAAJAXKJC4A5AWu+solDgEDyAGA/bgJ8i8ghwqMIAKGBfQehp64HqbPdaAAxCchFRCWJg8ABIDg +HAIhAJgeABDPcoAAAAAAguu4GfIBguu4QNjPIOIHyiCBDwAA0ADPIOEHz3GfALj/HaEEggHg07gE +ogUggA/Q/gAAFqFRJcDRz3WAABwPBPJWFYAQBvADhi4KIAEkhj6GlB4CEEQhAAyg4Af0USXA0gX0 +gNiUHgIQlBaAEFEgwIEE8pe5PqZRIYCBJ/IUllEgQIEj9FoNgAeA4B/0z3CgACwgD4CA4AXyA8gB +gP24FfIehpC4HqbPcIAAsMcAgFEgQIAF8lElQNMB2QL0ANmLcJDabgugAADbz3CAALShlBCBAEAp +AgaGIf0PUiHBAUW5RXnPcqAAiCQwoimF47legATy6boE8gDYA/AB2FEhAIHRImKCANnKIWIA97ol +eA94FvRRIoDTEvKA4BD0RCI+0wz0z3CAALShAYBRIACABPJyDwAEBPBuCEAEz3WAALShHoXzuCPy +BNnPcKAAkCM9oE1x4g2v+4ogRA4F8HII7/uKIFYLUSCAxAX0USEAxvfzz3WAALShhhUAEc9xgAAc +D74PoAQvkRXwAJUEIIAPAADMgNdwAADIgAj0C4VRIACABPJA/wfwBNnPcKAAkCM9oALYz3egAMQn +PB8AkJQVgBDPcYAAZKpRIMCBBBkABAnyHYWVuB2liiAFCVoNr/sA2UH+CHYdhVEgwIEKAgIAUyZA +EIPgB/QVFwCWUSDAgFzyMgvv/slw7wEAAM9xgADIjA2BAeANoQPZz3CgANQLMaDgeOB44HjgeOB4 +4HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB4MaAT +zM9xgABkqhEaHDAQ2BAdGJAC2DwdAJASCu/+BBkABB2GUSDAgbf0ERUFllElgIAL9AohwA/rcgXY +iiPXCAUDr/qKJIMPBNgTHRiQG9gWHRiQofAUzFEgwIA+hQvyBCGADwBAQADXcABAQAAD9Ji5PqXw +uRLyAMHU2KlyQgtv/wHbgOAE8jIMQAEI8M9xgAD8DBOBAeAToc9wgAA5CAHf4KjPcIAAkAQggAaB +AeAGoR6F87iMC8IEHoXwuOQMgf4ehVEgwIEH8gHZz3CAAHQFIKDPcaAAyBwA2AehMNgKoclwHv6K +IIQN6guv+8lxA8gBgP24FfIehfi4E/IQ2BQaHDDPcIAAgKgCD8ABG8gAIIEPgAAQlx6F4Km4uB6l +AJWGIPwAjCACgC70fgnABIDgKvQD2c9woADUCzGg4HjgeOB44HjgeOB44HjgeOB44HjgeOB44Hjg +eOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeOB44HjgeDGgE8wRGhwwHoXzuAX0AJWCD+AF +NJWBBa/7ocDPcoAAcA9UillhMHlBaVBwxPYieBB4A/AC2M9xoADIHx+hiiAYCA6hAtgVGRiA4H7x +wOIMj/vPcIAAAAYAgIDgoAvCBs92gAAAAACGUSDAgEogACAa8gGGUSDAgEDYzyDiB8oggQ8AANAA +zyDhB89xnwC4/x2hBIYB4NO4BKYFIIAP0P4AABahFMzguADfQPLPcaAAyB+wEQIAz3OAABwPahMA +AWO4CCIAAB6hENgOoQHaz3CAAGSmFRmYgAMaGDDPcIAAKKcHGhgwCIPruAnyz3CgALRHSxjYg3cY +mIBSDgACz3CAABAFAIiA4AXy9gqACDYMgAgEIJFPMAAAAM9yoAAsIM91oADIHzPw7bjKJYEfoADI +H8oigQ+gACwgJ/LiDs/+z3CAAMCNCYCMIAKNiPdODa/6GNjPcKAAtA/8oM9wgAAcDwiA67gI8gDZ +nrnPcKAA/EQioBTMz3WgAMgfz3KgACwg77ga9AohACTPcYAAgAzjoeWhA4LTAiAAB6H+DK/6GNgA +389woAC0D/ygz3WgAMgftwIgABp2BNgKGhgwH4WA4IogDADKIIIPAAAAAg6lA9gVuBIdGJDPcIAA +AAYAgIDgOArCBgCGBCC+jwAA33jWAwEAz3CfALj//aDLAwAACsjPcZ8AuP8Woc9wnwC4/1gYAAge +hVEgQMU68grIhiDxjzb0z3WAAIAMA4UB4AOl7g3v/gHez3CAAMCNCYCMIAKNXAfG/89wgAAcDwiA +67gH8gDYnrjPcaAA/EQCoc9wgAC0oR2AhiC+jwXyBYUB4AWlz3CAAAAAAIDruAbyANnPcJ8AuP89 +oEogQCAUzOS4DfTmuBv0hiD/hUzyUSMAwAnyUSBAxQf0HvAVzFMgQIAG9M91oADIHwDf1/AHyAMS +ATYDGhgwBxpYMIIMAALPcIAAEAUAiIDg7fMmCYAIZgqACOnxFMzPdYAARI1RIMCANvKA2BQaHDAV +zOu4B/IYhQHgGKVKIAAgBPAQhQHgEKXPcIAAOE4SiFEgAIDgCyIAyiBiAEwhAKAE8heFAeAXpRTM +57gA31fyFcwEIIAPAAAAGNdwAAAACB30hg0gAQpwUSAAgBXyCNibuBDwiiAEABQaHDAPhUwhAKAB +4A+l4vMWhQHgFqXe8QoaGDBy8ATY/PGSDIAAFcxRIMCAIPLPcaAALCAFgSaBCuAwcDH3AxIBNgLY +FBocMFDY6g0gAJgRAQCaCwACz3CAABAFAIiA4FDyPgiACH4JgAhM8APIoBAAAPC46XAa8vIJgAAA +2Ja4FPDouBXyAgugAIogBAAmDKAA6XUDyKAQAADwuKlwBvLKCYAAANiVuGIMgAC58em4z3KgAMgf +CPKyCaAAAdgA2JC49PHuuAvyUSMAwAfyiiAEAA6iBNgKGhgwFRIBN++5EPJAEgIGz3CAACyiDZAQ +coj3r7kVGlwwz3CAAOzG4KDPdaAAyB8KyAQgvo8DgOhDkAXC/1EgQMWIBcL/P4WgFQAQCSEAAOTg +0vbPcIAACJkAgFEgQIAM8v6lEN5yDaADyXCA4AT0Adgepc6liiAIAKAdwBMOpR+FqOBJ94DgBfSK +IAQADqV2DcAHL9iVuBIdGJDPcAEAwPwVHRiQbgmAAM9ygABQBQCCh+Ag8s9woAA4LgWABCCAD8AA +AADXcMAAAAAP8vXZBbnPcJ8AuP86oAfZO6Bp2Ri5OaAB2ALwANiB4AT0B9gAos9wgAAABgCAgODo +DoIGz3GAAIAMA4FEgQgiAAAEoQWBRoEIIgAABqF8hQeBSIECewDKCCLCAIjgSKEK9APZz3CgAEAt +MKAAGsIzBfAB4AAaAjDPcIAAAAAAgAQgvo8AAN94BvLPcJ8AuP/9oM9wgAAcDwiA67gV8s9wgADc +AxB4z3GgALRHSRkYgM9wAEQUAEsZGIBMGdiDA9h3GRiAyQdP++B4z3CAABgFQIjgugjyz3GgAKwv +GYGKuBmhUSJAgAfyz3GgAKwvGYGOuBmh4H7xwOHFB9kbGlgwz3CgANQHGhhYgA4QDYbPcYAAAABA +gVEiAIILGlgzGvJBgVEiAIJA2s8i4gfKIoEPAADQAM8i4QfPc58AuP9do0SBAeLTukShBSKCD9D+ +AABWo89xoABILL6hHxAAhgIaGDAIypzgzCCCjwAAkQAF8gAWAEAAFgBABczPcZ8AuP8YoYogRgTO +DG/7AhIBNh0Hb/sIyuB48cDhxc9xgAAcD0iBUSIAgCjyhiD/Ac9ygABQcEO4CmIA24DiyiHBD8oi +wQfKIGEByiOBDwAAbADKJMEA8AJh+solIQCB4s9wqgAMUL6Bx/eAvb6hAdkloATwoL2+oWWgtQZP ++/HAMg5P+xpwz3eAADhOEI+GIP8BQijRAM92oAC0Ryp1BfDSDm/7iiCIA3EWAJYEIIAPDgAAAEEo +foT19UMWAJZGIAANQx4YkFcWAJa8uL+4Vx4YkF8WAJa/uF8eGJAA2J64Ux4YkBCPYB4YkMz/z3CA +ADCMB4iA4BTyEI+GIP8Bkggv/kO4z3eAABwFFI8QdQjyz3CAAGhWFoBAeBQfQhQiDYAIQxYAlkwg +wKBFIAANQx4YkIAADQAKcDMmAHCAANRzQCeBchR5AHkQvZu9z3CAAKy0AIifvYDgAdjAeA+4pXhf +HhiQIPDPcIAArLQAiBC9gOAB2MB4D7iYuJ+4pXhFIMABXx4YkA7wEL3PcIAArLQAiJ+9gOAB2MB4 +D7ileF8eGJAKyITgdA5h+sogYQRhBU/7CiHAD+tyBdiKIw4KSiQAAIUBb/oKJQAB8cDuDG/7AdnP +cIAAHA8IgMC4G3gA3s91oAC0R0sdmJN3HViQz3GgAIRE2KEC2XcdWJAA2Z65Ux1YkFQdWJDPcYAA +OAFHHViQjrjPcYAAKABFIAYNSB1YkM9wgAAcD0kdmJMakAK4bLhEHRiQHNhFHRiQz3CAAFxjAYhG +HRiQz3CAADhOEIhz/0okwHDPcYAAhKrJcqgggAPPcIAA1LRWeGGA8mr2fz9nAoBipwHiA6fPd4AA +HAUAh4DgBPJkHRiQQx2YkQHYfP/PcIAAHA8ogOu5EfLPcIAA3AMQeEkdGJDPcABEFABLHRiQTB2Y +kwPYBPBLHZiTAdh3HRiQUSEAgECHDvJTIkEAErlEIgADDrgleIYi/wMKukV4EvBIcIYg8w8KuAQi +gQ8AAAAMBrkleAQigQ8AAAAwArkleM9xgADsYhUEb/sCoaHB8cCOC2/7mHCmwQQgg48AAAAET8EG +8s9wgABYBSCAz3CAANS0AIBAwQhyhiL+AyS6QCqNAw/CwrgOuKZ6BSCGADwcgDEEJoAPAQAAwC64 +QCgNBpy9z3KAABwPSIKfvc93gAAcBVEiAIDPcoAAWEQWegby0ILEp1GCBfDAgkGCxKdRJICBQ6cI +2gvyC9oEJr6PAAAAGMoigg8AAA8EUSQAgTpyzyXiFgX0USQAgs8lYhdRJkCCQfKA48ohwg/KIsIH +yiBiAcojgg8AAG4BaAci+solggEEIYEPAQAAwC65z3KAAFBwLmJJJo4QYb7PcYAAHA9iEYEAL8MI +uFJuVHpkecdygAAMqUgSDwZJEhIGRCEEAUAsQQIleGV4BCaBDwAAABAFIRMAnr0Y5s9+A8i5GIID +dPCA4xXyUSEAgkTBJMEQ8s9wgAAAcChggeDK9oLgBfQG2GDABfAH2GDAA/BgwQDA6Lge8kTAJMKg +4sohggDKISEABCCDDwEAAMDPdoAAAHBKZgQggA8GAAAAMbguuxpiz3CAAFBwaGBCeBPwUyDBAM9y +gAAwcz15KWIEIIAPAQAAwC64z3KAAFBwCGJhuBYhBQBMJQCGjPcKIcAP63IF2IojRgNdBi/6iiSD +D1EmAIIB2AfyL8HPcIAAAHAoYEAtggBUesdygAAMqeCCYbgEJoEP7wAA3Sa5JXhSINMDA8gEEhIA +uRhCAc9xgABMQRqBO4EkeFEgAIIG8iKCz3CnAIhJL6A8FBAwanCGIOMPz3agALRHQSgUAgXwEgpv ++4ogiANxFgCWBCCADw4AAABBKH6E9fWKIP8Pbx4YkGseGJAD2Q+5z3CgAMgfExhYgFkemJRaHtiT +Wx7YlFgeWJT7vUolAAAK8h6AArhCIIUDSCUFAKhwybgFfc9wgADUtAeAANkPIQEFJHjPcYAAzASA +4AHYQIHAeFMiAYCvvQfyhiJ/D116D7pFfQTwgODPJeITVx5Yk4DhB/SA4AbYyiDhAQLwANjPcYAA +HA8ogVEhAIAS8k8gAQKNuZe5FR5YkAUggQ+AAEA6Gh5YkAUggA+AAMBTEvAFIIEPgADAJBUeWJAF +IIEPgAAAPhoeWJAFIIAPgACAVxceGJDPcIAAMIwEkIHgDvSEFgGWUCEAAwQhgQ8AAAAMrbgCuSV4 +BPCEFgCWFh4YkIwlz4/KIcYPyiLGB8ogZgHKI4YPAAAKAaQEJvrKJMYA6XACDqAICnEI3EcAb/um +wKHB8cDmDy/7mHDPcIAA1LRggKTBaHCGIP4DJLgOuAZ5wrsOu2V5TcEEIYMPAQAAwC67geIB2MB4 +BrhWIEAIQCsNBpy9z3KAABwPSIKfvc92gAAcBVEiAIDPcoAAWER2egXy8ILkplGCBPDggkGC5Kbp +uUOmLvIEIYIPAQAAwC66z3aAAFBwSmZJIoIAYbrPdoAAHA9iFo4QLccCulR6x3KAAAyp5H5IEhEG +SRISBoYm/x4Jvgi7xXtlfwQhgQ8AAAAQJX+evU8gFAFPJNQhX/BRJECCzyBiAc8gIQHouZpwIfJD +wSPDoOPKIMIAyiAhAM92gAAAcGtmBCGPDwYAAAAxvwQhgg8BAADA+2Muus93gABQcEpnYnoWIIUA +LcALZhXwUyHAAM9ygAAwcx14CGIEIYIPAQAAwC66z3OAAFBwSmNhuhYghQAB20wlAIaM9wohwA/r +cgXYiiOJCTEDL/qKJIMPQC2CAFR6x3KAAAypABIRAAQSEgBhuwQhgQ/vAADdJrlleVIhzwPPcYAA +TEEagTuBJHhRIACCB/Iigs9wpwCISS+gNBQQMOlwhiDjD892oAC0R0EoEwIG8PoOL/uKIIgDcRYA +lgQggA8OAAAAQSh+hPT1iiD/D28eGJBrHhiQA9kPuc9woADIHxMYWIBZHpiUWh5YlFse2JNYHhiV ++71KJQAAC/IegAK4QiCFA0glBQCocMm4BX0A2c9wgADUtAeADyHBBAR5z3CAAMwEgOEB2UCAwHlT +IgCAr70I8oYifw9deg+6RX0F8IDhzyXiE1ceWJOA4Ab0gOEG2Mog4QED8ADYz3GAABwPKIFRIQCA *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 07:26:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02658106564A; Sat, 10 Apr 2010 07:26:52 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E37BA8FC16; Sat, 10 Apr 2010 07:26:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3A7Qpt8011353; Sat, 10 Apr 2010 07:26:51 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3A7QpII011351; Sat, 10 Apr 2010 07:26:51 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004100726.o3A7QpII011351@svn.freebsd.org> From: Jack F Vogel Date: Sat, 10 Apr 2010 07:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206447 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 07:26:52 -0000 Author: jfv Date: Sat Apr 10 07:26:51 2010 New Revision: 206447 URL: http://svn.freebsd.org/changeset/base/206447 Log: Correct broken build. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sat Apr 10 07:07:08 2010 (r206446) +++ head/sys/dev/e1000/if_em.c Sat Apr 10 07:26:51 2010 (r206447) @@ -4389,7 +4389,7 @@ em_enable_intr(struct adapter *adapter) struct e1000_hw *hw = &adapter->hw; u32 ims_mask = IMS_ENABLE_MASK; - if (hw->mac.type == e1000_82574) + if (hw->mac.type == e1000_82574) { E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); ims_mask |= EM_MSIX_MASK; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 10:44:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D131F106564A; Sat, 10 Apr 2010 10:44:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C02378FC19; Sat, 10 Apr 2010 10:44:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3AAifrZ054588; Sat, 10 Apr 2010 10:44:41 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3AAif4K054586; Sat, 10 Apr 2010 10:44:41 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004101044.o3AAif4K054586@svn.freebsd.org> From: Marius Strobl Date: Sat, 10 Apr 2010 10:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206448 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 10:44:41 -0000 Author: marius Date: Sat Apr 10 10:44:41 2010 New Revision: 206448 URL: http://svn.freebsd.org/changeset/base/206448 Log: Do as the comment suggests and determine the bus space based on the last bus we actually mapped at rather than always based on the last bus we encountered while moving upward in the tree. Otherwise we might use the wrong bus space in case the bridge directly underneath the nexus doesn't require mapping, i.e. was skipped as it's the case for ssm(4) nodes. Modified: head/sys/sparc64/sparc64/ofw_machdep.c Modified: head/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/ofw_machdep.c Sat Apr 10 07:26:51 2010 (r206447) +++ head/sys/sparc64/sparc64/ofw_machdep.c Sat Apr 10 10:44:41 2010 (r206448) @@ -186,13 +186,10 @@ OF_decode_addr(phandle_t node, int bank, name[sizeof(name) - 1] = '\0'; goto skip; } - if (lbus != bus) { - if (OF_getprop(bus, "#size-cells", &szc, - sizeof(szc)) == -1) - szc = 1; - if (szc < 1 || szc > 2) - return (ENXIO); - } + if (OF_getprop(bus, "#size-cells", &szc, sizeof(szc)) == -1) + szc = 1; + if (szc < 1 || szc > 2) + return (ENXIO); nbank /= sizeof(banks[0]) * (addrc + paddrc + szc); bank = 0; for (i = 0; i < nbank; i++) { @@ -232,9 +229,9 @@ OF_decode_addr(phandle_t node, int bank, } if (i == nbank) return (ENXIO); + lbus = bus; skip: addrc = paddrc; - lbus = bus; bus = pbus; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 10:56:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFDBA106566B; Sat, 10 Apr 2010 10:56:59 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF2F8FC20; Sat, 10 Apr 2010 10:56:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3AAuxLH058948; Sat, 10 Apr 2010 10:56:59 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3AAux0j058946; Sat, 10 Apr 2010 10:56:59 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004101056.o3AAux0j058946@svn.freebsd.org> From: Marius Strobl Date: Sat, 10 Apr 2010 10:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206449 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 10:56:59 -0000 Author: marius Date: Sat Apr 10 10:56:59 2010 New Revision: 206449 URL: http://svn.freebsd.org/changeset/base/206449 Log: Unlike the sun4v variant, the sun4u version of SUNW,set-trap-table actually only takes one argument. Modified: head/sys/sparc64/sparc64/trap.c Modified: head/sys/sparc64/sparc64/trap.c ============================================================================== --- head/sys/sparc64/sparc64/trap.c Sat Apr 10 10:44:41 2010 (r206448) +++ head/sys/sparc64/sparc64/trap.c Sat Apr 10 10:56:59 2010 (r206449) @@ -260,7 +260,8 @@ sun4u_set_traptable(void *tba_addr) cell_t tba_addr; } args = { (cell_t)"SUNW,set-trap-table", - 2, + 1, + 0, }; args.tba_addr = (cell_t)tba_addr; From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 11:13:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FB8C106566C; Sat, 10 Apr 2010 11:13:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EEB98FC08; Sat, 10 Apr 2010 11:13:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3ABDp93062703; Sat, 10 Apr 2010 11:13:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ABDpeo062701; Sat, 10 Apr 2010 11:13:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004101113.o3ABDpeo062701@svn.freebsd.org> From: Marius Strobl Date: Sat, 10 Apr 2010 11:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206450 - head/sys/sparc64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 11:13:51 -0000 Author: marius Date: Sat Apr 10 11:13:51 2010 New Revision: 206450 URL: http://svn.freebsd.org/changeset/base/206450 Log: Correct the DCR_IPE macro to refer to the right bit. Also improve the associated comment as besides US-IV+ these bits are only available with US-III++, i.e. the 1.2GHz version of the US-III+. Modified: head/sys/sparc64/include/dcr.h Modified: head/sys/sparc64/include/dcr.h ============================================================================== --- head/sys/sparc64/include/dcr.h Sat Apr 10 10:56:59 2010 (r206449) +++ head/sys/sparc64/include/dcr.h Sat Apr 10 11:13:51 2010 (r206450) @@ -43,8 +43,8 @@ #define DCR_OBSDATA_CT_MASK \ (((1UL << DCR_OBSDATA_CT_BITS) - 1) << DCR_OBSDATA_SHIFT) -/* The following bits are valid for the UltraSPARC-III+/IV+ only. */ -#define DCR_IPE (1UL << 5) +/* The following bits are valid for the UltraSPARC-III++/IV+ only. */ +#define DCR_IPE (1UL << 2) #define DCR_OBSDATA_CTP_BITS 6 #define DCR_OBSDATA_CTP_MASK \ From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 11:52:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 381D1106564A; Sat, 10 Apr 2010 11:52:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 257178FC13; Sat, 10 Apr 2010 11:52:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3ABqD7Q071333; Sat, 10 Apr 2010 11:52:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ABqDfi071326; Sat, 10 Apr 2010 11:52:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004101152.o3ABqDfi071326@svn.freebsd.org> From: Marius Strobl Date: Sat, 10 Apr 2010 11:52:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206451 - in head/sys: conf dev/uart sparc64/conf sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 11:52:13 -0000 Author: marius Date: Sat Apr 10 11:52:12 2010 New Revision: 206451 URL: http://svn.freebsd.org/changeset/base/206451 Log: Add sbbc(4), a driver for the BootBus controller found in Serengeti and StarCat systems which provides time-of-day services for both as well as console service for Serengeti, i.e. Sun Fire V1280. While the latter is described with a device type of serial in the OFW device tree, it isn't actually an UART. Nevertheless the console service is handled by uart(4) as this allowed to re-use quite a bit of MD and MI code. Actually, this idea is stolen from Linux which interfaces the sun4v hypervisor console with the Linux counterpart of uart(4). Added: head/sys/sparc64/pci/sbbc.c (contents, props changed) Modified: head/sys/conf/files.sparc64 head/sys/dev/uart/uart.h head/sys/dev/uart/uart_cpu_sparc64.c head/sys/sparc64/conf/GENERIC head/sys/sparc64/conf/NOTES Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Sat Apr 10 11:13:51 2010 (r206450) +++ head/sys/conf/files.sparc64 Sat Apr 10 11:52:12 2010 (r206451) @@ -79,6 +79,7 @@ sparc64/pci/ofw_pcib.c optional pci sparc64/pci/ofw_pcib_subr.c optional pci sparc64/pci/ofw_pcibus.c optional pci sparc64/pci/psycho.c optional pci +sparc64/pci/sbbc.c optional uart sbbc sparc64/pci/schizo.c optional pci sparc64/sbus/dma_sbus.c optional sbus sparc64/sbus/sbus.c optional sbus Modified: head/sys/dev/uart/uart.h ============================================================================== --- head/sys/dev/uart/uart.h Sat Apr 10 11:13:51 2010 (r206450) +++ head/sys/dev/uart/uart.h Sat Apr 10 11:52:12 2010 (r206451) @@ -67,6 +67,7 @@ struct uart_class; extern struct uart_class uart_ns8250_class __attribute__((weak)); extern struct uart_class uart_quicc_class __attribute__((weak)); extern struct uart_class uart_sab82532_class __attribute__((weak)); +extern struct uart_class uart_sbbc_class __attribute__((weak)); extern struct uart_class uart_z8530_class __attribute__((weak)); #ifdef PC98 Modified: head/sys/dev/uart/uart_cpu_sparc64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_sparc64.c Sat Apr 10 11:13:51 2010 (r206450) +++ head/sys/dev/uart/uart_cpu_sparc64.c Sat Apr 10 11:52:12 2010 (r206451) @@ -133,6 +133,14 @@ uart_cpu_getdev_console(phandle_t option return (-1); if (strcmp(buf, "serial") != 0) return (-1); + /* For a Serengeti console device point to the bootbus controller. */ + if (OF_getprop(input, "name", buf, sizeof(buf)) > 0 && + !strcmp(buf, "sgcn")) { + if ((chosen = OF_finddevice("/chosen")) == -1) + return (-1); + if (OF_getprop(chosen, "iosram", &input, sizeof(input)) == -1) + return (-1); + } return (input); } @@ -258,6 +266,9 @@ uart_cpu_getdev(int devtype, struct uart !strcmp(compat, "su16552")) { class = &uart_ns8250_class; di->bas.chan = 0; + } else if (!strcmp(compat, "sgsbbc")) { + class = &uart_sbbc_class; + di->bas.chan = 0; } if (class == NULL) return (ENXIO); Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Sat Apr 10 11:13:51 2010 (r206450) +++ head/sys/sparc64/conf/GENERIC Sat Apr 10 11:52:12 2010 (r206451) @@ -143,6 +143,9 @@ device mk48txx # Mostek MK48Txx clocks device rtc # rtc (really a front-end for the MC146818) device mc146818 # Motorola MC146818 and compatible clocks device epic # Sun Fire V215/V245 LEDs +device sbbc # Sun BootBus controller (time-of-day clock for + # Serengeti and StarCat, console for Serengeti, + # requires device uart) # Serial (COM) ports device puc # Multi-channel uarts Modified: head/sys/sparc64/conf/NOTES ============================================================================== --- head/sys/sparc64/conf/NOTES Sat Apr 10 11:13:51 2010 (r206450) +++ head/sys/sparc64/conf/NOTES Sat Apr 10 11:52:12 2010 (r206451) @@ -37,6 +37,7 @@ device eeprom # eeprom (really a front device mk48txx # Mostek MK48Txx clocks device rtc # rtc (really a front-end for the MC146818) device mc146818 # Motorola MC146818 and compatible clocks +device sbbc # Sun BootBus controller # # Optional devices: Added: head/sys/sparc64/pci/sbbc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sparc64/pci/sbbc.c Sat Apr 10 11:52:12 2010 (r206451) @@ -0,0 +1,1074 @@ +/* $OpenBSD: sbbc.c,v 1.7 2009/11/09 17:53:39 nicm Exp $ */ +/* + * Copyright (c) 2008 Mark Kettenis + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +/*- + * Copyright (c) 2010 Marius Strobl + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "clock_if.h" +#include "uart_if.h" + +#define SBBC_PCI_BAR PCIR_BAR(0) +#define SBBC_PCI_VENDOR 0x108e +#define SBBC_PCI_PRODUCT 0xc416 + +#define SBBC_REGS_OFFSET 0x800000 +#define SBBC_REGS_SIZE 0x6230 +#define SBBC_EPLD_OFFSET 0x8e0000 +#define SBBC_EPLD_SIZE 0x20 +#define SBBC_SRAM_OFFSET 0x900000 +#define SBBC_SRAM_SIZE 0x20000 /* 128KB SRAM */ + +#define SBBC_PCI_INT_STATUS 0x2320 +#define SBBC_PCI_INT_ENABLE 0x2330 +#define SBBC_PCI_ENABLE_INT_A 0x11 + +#define SBBC_EPLD_INTERRUPT 0x13 +#define SBBC_EPLD_INTERRUPT_ON 0x01 + +#define SBBC_SRAM_CONS_IN 0x00000001 +#define SBBC_SRAM_CONS_OUT 0x00000002 +#define SBBC_SRAM_CONS_BRK 0x00000004 +#define SBBC_SRAM_CONS_SPACE_IN 0x00000008 +#define SBBC_SRAM_CONS_SPACE_OUT 0x00000010 + +#define SBBC_TAG_KEY_SIZE 8 +#define SBBC_TAG_KEY_SCSOLIE "SCSOLIE" /* SC -> OS int. enable */ +#define SBBC_TAG_KEY_SCSOLIR "SCSOLIR" /* SC -> OS int. reason */ +#define SBBC_TAG_KEY_SOLCONS "SOLCONS" /* OS console buffer */ +#define SBBC_TAG_KEY_SOLSCIE "SOLSCIE" /* OS -> SC int. enable */ +#define SBBC_TAG_KEY_SOLSCIR "SOLSCIR" /* OS -> SC int. reason */ +#define SBBC_TAG_KEY_TODDATA "TODDATA" /* OS TOD struct */ +#define SBBC_TAG_OFF(x) offsetof(struct sbbc_sram_tag, x) + +struct sbbc_sram_tag { + char tag_key[SBBC_TAG_KEY_SIZE]; + uint32_t tag_size; + uint32_t tag_offset; +} __packed; + +#define SBBC_TOC_MAGIC "TOCSRAM" +#define SBBC_TOC_MAGIC_SIZE 8 +#define SBBC_TOC_TAGS_MAX 32 +#define SBBC_TOC_OFF(x) offsetof(struct sbbc_sram_toc, x) + +struct sbbc_sram_toc { + char toc_magic[SBBC_TOC_MAGIC_SIZE]; + uint8_t toc_reserved; + uint8_t toc_type; + uint16_t toc_version; + uint32_t toc_ntags; + struct sbbc_sram_tag toc_tag[SBBC_TOC_TAGS_MAX]; +} __packed; + +#define SBBC_TOD_MAGIC 0x54443100 /* "TD1" */ +#define SBBC_TOD_VERSION 1 +#define SBBC_TOD_OFF(x) offsetof(struct sbbc_sram_tod, x) + +struct sbbc_sram_tod { + uint32_t tod_magic; + uint32_t tod_version; + uint64_t tod_time; + uint64_t tod_skew; + uint32_t tod_reserved; + uint32_t tod_heartbeat; + uint32_t tod_timeout; +} __packed; + +#define SBBC_CONS_MAGIC 0x434f4e00 /* "CON" */ +#define SBBC_CONS_VERSION 1 +#define SBBC_CONS_OFF(x) offsetof(struct sbbc_sram_cons, x) + +struct sbbc_sram_cons { + uint32_t cons_magic; + uint32_t cons_version; + uint32_t cons_size; + + uint32_t cons_in_begin; + uint32_t cons_in_end; + uint32_t cons_in_rdptr; + uint32_t cons_in_wrptr; + + uint32_t cons_out_begin; + uint32_t cons_out_end; + uint32_t cons_out_rdptr; + uint32_t cons_out_wrptr; +} __packed; + +struct sbbc_softc { + struct resource *sc_res; +}; + +#define SBBC_READ_N(wdth, offs) \ + bus_space_read_ ## wdth((bst), (bsh), (offs)) +#define SBBC_WRITE_N(wdth, offs, val) \ + bus_space_write_ ## wdth((bst), (bsh), (offs), (val)) + +#define SBBC_READ_1(offs) \ + SBBC_READ_N(1, (offs)) +#define SBBC_READ_2(offs) \ + bswap16(SBBC_READ_N(2, (offs))) +#define SBBC_READ_4(offs) \ + bswap32(SBBC_READ_N(4, (offs))) +#define SBBC_READ_8(offs) \ + bswap64(SBBC_READ_N(8, (offs))) +#define SBBC_WRITE_1(offs, val) \ + SBBC_WRITE_N(1, (offs), (val)) +#define SBBC_WRITE_2(offs, val) \ + SBBC_WRITE_N(2, (offs), bswap16(val)) +#define SBBC_WRITE_4(offs, val) \ + SBBC_WRITE_N(4, (offs), bswap32(val)) +#define SBBC_WRITE_8(offs, val) \ + SBBC_WRITE_N(8, (offs), bswap64(val)) + +#define SBBC_REGS_READ_1(offs) \ + SBBC_READ_1((offs) + SBBC_REGS_OFFSET) +#define SBBC_REGS_READ_2(offs) \ + SBBC_READ_2((offs) + SBBC_REGS_OFFSET) +#define SBBC_REGS_READ_4(offs) \ + SBBC_READ_4((offs) + SBBC_REGS_OFFSET) +#define SBBC_REGS_READ_8(offs) \ + SBBC_READ_8((offs) + SBBC_REGS_OFFSET) +#define SBBC_REGS_WRITE_1(offs, val) \ + SBBC_WRITE_1((offs) + SBBC_REGS_OFFSET, (val)) +#define SBBC_REGS_WRITE_2(offs, val) \ + SBBC_WRITE_2((offs) + SBBC_REGS_OFFSET, (val)) +#define SBBC_REGS_WRITE_4(offs, val) \ + SBBC_WRITE_4((offs) + SBBC_REGS_OFFSET, (val)) +#define SBBC_REGS_WRITE_8(offs, val) \ + SBBC_WRITE_8((offs) + SBBC_REGS_OFFSET, (val)) + +#define SBBC_EPLD_READ_1(offs) \ + SBBC_READ_1((offs) + SBBC_EPLD_OFFSET) +#define SBBC_EPLD_READ_2(offs) \ + SBBC_READ_2((offs) + SBBC_EPLD_OFFSET) +#define SBBC_EPLD_READ_4(offs) \ + SBBC_READ_4((offs) + SBBC_EPLD_OFFSET) +#define SBBC_EPLD_READ_8(offs) \ + SBBC_READ_8((offs) + SBBC_EPLD_OFFSET) +#define SBBC_EPLD_WRITE_1(offs, val) \ + SBBC_WRITE_1((offs) + SBBC_EPLD_OFFSET, (val)) +#define SBBC_EPLD_WRITE_2(offs, val) \ + SBBC_WRITE_2((offs) + SBBC_EPLD_OFFSET, (val)) +#define SBBC_EPLD_WRITE_4(offs, val) \ + SBBC_WRITE_4((offs) + SBBC_EPLD_OFFSET, (val)) +#define SBBC_EPLD_WRITE_8(offs, val) \ + SBBC_WRITE_8((offs) + SBBC_EPLD_OFFSET, (val)) + +#define SBBC_SRAM_READ_1(offs) \ + SBBC_READ_1((offs) + SBBC_SRAM_OFFSET) +#define SBBC_SRAM_READ_2(offs) \ + SBBC_READ_2((offs) + SBBC_SRAM_OFFSET) +#define SBBC_SRAM_READ_4(offs) \ + SBBC_READ_4((offs) + SBBC_SRAM_OFFSET) +#define SBBC_SRAM_READ_8(offs) \ + SBBC_READ_8((offs) + SBBC_SRAM_OFFSET) +#define SBBC_SRAM_WRITE_1(offs, val) \ + SBBC_WRITE_1((offs) + SBBC_SRAM_OFFSET, (val)) +#define SBBC_SRAM_WRITE_2(offs, val) \ + SBBC_WRITE_2((offs) + SBBC_SRAM_OFFSET, (val)) +#define SBBC_SRAM_WRITE_4(offs, val) \ + SBBC_WRITE_4((offs) + SBBC_SRAM_OFFSET, (val)) +#define SBBC_SRAM_WRITE_8(offs, val) \ + SBBC_WRITE_8((offs) + SBBC_SRAM_OFFSET, (val)) + +#define SUNW_SETCONSINPUT "SUNW,set-console-input" +#define SUNW_SETCONSINPUT_CLNT "CON_CLNT" +#define SUNW_SETCONSINPUT_OBP "CON_OBP" + +static u_int sbbc_console; + +static uint32_t sbbc_scsolie; +static uint32_t sbbc_scsolir; +static uint32_t sbbc_solcons; +static uint32_t sbbc_solscie; +static uint32_t sbbc_solscir; +static uint32_t sbbc_toddata; + +/* + * internal helpers + */ +static int sbbc_parse_toc(bus_space_tag_t bst, bus_space_handle_t bsh); +static inline void sbbc_send_intr(bus_space_tag_t bst, + bus_space_handle_t bsh); +static const char *sbbc_serengeti_set_console_input(char *new); + +/* + * SBBC PCI interface + */ +static bus_alloc_resource_t sbbc_bus_alloc_resource; +static bus_release_resource_t sbbc_bus_release_resource; +static bus_get_resource_list_t sbbc_bus_get_resource_list; +static bus_setup_intr_t sbbc_bus_setup_intr; +static bus_teardown_intr_t sbbc_bus_teardown_intr; + +static device_attach_t sbbc_pci_attach; +static device_probe_t sbbc_pci_probe; + +static clock_gettime_t sbbc_tod_gettime; +static clock_settime_t sbbc_tod_settime; + +static device_method_t sbbc_pci_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, sbbc_pci_probe), + DEVMETHOD(device_attach, sbbc_pci_attach), + + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_alloc_resource, sbbc_bus_alloc_resource), + DEVMETHOD(bus_release_resource, sbbc_bus_release_resource), + DEVMETHOD(bus_setup_intr, sbbc_bus_setup_intr), + DEVMETHOD(bus_teardown_intr, sbbc_bus_teardown_intr), + DEVMETHOD(bus_get_resource_list, sbbc_bus_get_resource_list), + + /* clock interface */ + DEVMETHOD(clock_gettime, sbbc_tod_gettime), + DEVMETHOD(clock_settime, sbbc_tod_settime), + + KOBJMETHOD_END +}; + +static devclass_t sbbc_devclass; + +DEFINE_CLASS_0(sbbc, sbbc_driver, sbbc_pci_methods, sizeof(struct sbbc_softc)); +DRIVER_MODULE(sbbc, pci, sbbc_driver, sbbc_devclass, 0, 0); + +static int +sbbc_pci_probe(device_t dev) +{ + + if (pci_get_vendor(dev) == SBBC_PCI_VENDOR && + pci_get_device(dev) == SBBC_PCI_PRODUCT) { + device_set_desc(dev, "Sun BootBus controller"); + return (BUS_PROBE_DEFAULT); + } + return (ENXIO); +} + +static int +sbbc_pci_attach(device_t dev) +{ + struct sbbc_softc *sc; + struct timespec ts; + device_t child; + bus_space_tag_t bst; + bus_space_handle_t bsh; + phandle_t node; + int error, rid; + uint32_t val; + + /* Nothing to to if we're not the chosen one. */ + if ((node = OF_finddevice("/chosen")) == -1) { + device_printf(dev, "failed to find /chosen\n"); + return (ENXIO); + } + if (OF_getprop(node, "iosram", &node, sizeof(node)) == -1) { + device_printf(dev, "failed to get iosram\n"); + return (ENXIO); + } + if (node != ofw_bus_get_node(dev)) + return (0); + + sc = device_get_softc(dev); + rid = SBBC_PCI_BAR; + /* + * Note that we don't activate the resource so it's not mapped twice + * but only once by the the firmware. + */ + sc->sc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0); + if (sc->sc_res == NULL) { + device_printf(dev, "failed to allocate resources\n"); + return (ENXIO); + } + bst = rman_get_bustag(sc->sc_res); + bsh = rman_get_bushandle(sc->sc_res); + if (sbbc_console != 0) { + /* Once again the interrupt pin isn't set. */ + if (pci_get_intpin(dev) == 0) + pci_set_intpin(dev, 1); + child = device_add_child(dev, NULL, -1); + if (child == NULL) + device_printf(dev, "failed to add UART device\n"); + error = bus_generic_attach(dev); + if (error != 0) + device_printf(dev, "failed to attach UART device\n"); + } else { + error = sbbc_parse_toc(rman_get_bustag(sc->sc_res), + rman_get_bushandle(sc->sc_res)); + if (error != 0) { + device_printf(dev, "failed to parse TOC\n"); + if (sbbc_console != 0) { + bus_release_resource(dev, SYS_RES_MEMORY, rid, + sc->sc_res); + return (error); + } + } + } + if (sbbc_toddata != 0) { + if ((val = SBBC_SRAM_READ_4(sbbc_toddata + + SBBC_TOD_OFF(tod_magic))) != SBBC_TOD_MAGIC) + device_printf(dev, "invalid TOD magic %#x\n", val); + else if ((val = SBBC_SRAM_READ_4(sbbc_toddata + + SBBC_TOD_OFF(tod_version))) < SBBC_TOD_VERSION) + device_printf(dev, "invalid TOD version %#x\n", val); + else { + clock_register(dev, 1000000); /* 1 sec. resolution */ + if (bootverbose) { + sbbc_tod_gettime(dev, &ts); + device_printf(dev, + "current time: %ld.%09ld\n", + (long)ts.tv_sec, ts.tv_nsec); + } + } + } + return (0); +} + +/* + * Note that the bus methods don't pass-through the uart(4) requests but act + * as if they would come from sbbc(4) in order to avoid complications with + * pci(4) (actually, uart(4) isn't a real child but rather a function of + * sbbc(4) anyway). + */ + +static struct resource * +sbbc_bus_alloc_resource(device_t dev, device_t child __unused, int type, + int *rid, u_long start, u_long end, u_long count, u_int flags) +{ + struct sbbc_softc *sc; + + sc = device_get_softc(dev); + switch (type) { + case SYS_RES_IRQ: + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, type, + rid, start, end, count, flags)); + case SYS_RES_MEMORY: + return (sc->sc_res); + default: + return (NULL); + /* NOTREACHED */ + } +} + +static int +sbbc_bus_release_resource(device_t dev, device_t child __unused, int type, + int rid, struct resource *res) +{ + + if (type == SYS_RES_IRQ) + return (BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, + type, rid, res)); + return (0); +} + +static struct resource_list * +sbbc_bus_get_resource_list(device_t dev, device_t child __unused) +{ + + return (BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev)); +} + +static int +sbbc_bus_setup_intr(device_t dev, device_t child __unused, + struct resource *res, int flags, driver_filter_t *filt, + driver_intr_t *intr, void *arg, void **cookiep) +{ + + return (BUS_SETUP_INTR(device_get_parent(dev), dev, res, flags, filt, + intr, arg, cookiep)); +} + +static int +sbbc_bus_teardown_intr(device_t dev, device_t child __unused, + struct resource *res, void *cookie) +{ + + return (BUS_TEARDOWN_INTR(device_get_parent(dev), dev, res, cookie)); +} + +/* + * internal helpers + */ +static int +sbbc_parse_toc(bus_space_tag_t bst, bus_space_handle_t bsh) +{ + char buf[MAX(SBBC_TAG_KEY_SIZE, SBBC_TOC_MAGIC_SIZE)]; + bus_size_t tag; + phandle_t node; + uint32_t off, sram_toc; + u_int i, tags; + + if ((node = OF_finddevice("/chosen")) == -1) + return (ENXIO); + /* SRAM TOC offset defaults to 0. */ + if (OF_getprop(node, "iosram-toc", &sram_toc, sizeof(sram_toc)) <= 0) + sram_toc = 0; + + bus_space_read_region_1(bst, bsh, SBBC_SRAM_OFFSET + sram_toc + + SBBC_TOC_OFF(toc_magic), buf, SBBC_TOC_MAGIC_SIZE); + buf[SBBC_TOC_MAGIC_SIZE - 1] = '\0'; + if (strcmp(buf, SBBC_TOC_MAGIC) != 0) + return (ENXIO); + + tags = SBBC_SRAM_READ_4(sram_toc + SBBC_TOC_OFF(toc_ntags)); + for (i = 0; i < tags; i++) { + tag = sram_toc + SBBC_TOC_OFF(toc_tag) + + i * sizeof(struct sbbc_sram_tag); + bus_space_read_region_1(bst, bsh, SBBC_SRAM_OFFSET + tag + + SBBC_TAG_OFF(tag_key), buf, SBBC_TAG_KEY_SIZE); + buf[SBBC_TAG_KEY_SIZE - 1] = '\0'; + off = SBBC_SRAM_READ_4(tag + SBBC_TAG_OFF(tag_offset)); + if (strcmp(buf, SBBC_TAG_KEY_SCSOLIE) == 0) + sbbc_scsolie = off; + else if (strcmp(buf, SBBC_TAG_KEY_SCSOLIR) == 0) + sbbc_scsolir = off; + else if (strcmp(buf, SBBC_TAG_KEY_SOLCONS) == 0) + sbbc_solcons = off; + else if (strcmp(buf, SBBC_TAG_KEY_SOLSCIE) == 0) + sbbc_solscie = off; + else if (strcmp(buf, SBBC_TAG_KEY_SOLSCIR) == 0) + sbbc_solscir = off; + else if (strcmp(buf, SBBC_TAG_KEY_TODDATA) == 0) + sbbc_toddata = off; + } + return (0); +} + +static const char * +sbbc_serengeti_set_console_input(char *new) +{ + struct { + cell_t name; + cell_t nargs; + cell_t nreturns; + cell_t new; + cell_t old; + } args = { + (cell_t)SUNW_SETCONSINPUT, + 1, + 1, + }; + + args.new = (cell_t)new; + if (ofw_entry(&args) == -1) + return (NULL); + return ((const char *)args.old); +} + +static inline void +sbbc_send_intr(bus_space_tag_t bst, bus_space_handle_t bsh) +{ + + SBBC_EPLD_WRITE_1(SBBC_EPLD_INTERRUPT, SBBC_EPLD_INTERRUPT_ON); + bus_space_barrier(bst, bsh, SBBC_EPLD_OFFSET + SBBC_EPLD_INTERRUPT, 1, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); +} + +/* + * TOD interface + */ +static int +sbbc_tod_gettime(device_t dev, struct timespec *ts) +{ + struct sbbc_softc *sc; + bus_space_tag_t bst; + bus_space_handle_t bsh; + + sc = device_get_softc(dev); + bst = rman_get_bustag(sc->sc_res); + bsh = rman_get_bushandle(sc->sc_res); + + ts->tv_sec = SBBC_SRAM_READ_8(sbbc_toddata + SBBC_TOD_OFF(tod_time)) + + SBBC_SRAM_READ_8(sbbc_toddata + SBBC_TOD_OFF(tod_skew)); + ts->tv_nsec = 0; + return (0); +} + +static int +sbbc_tod_settime(device_t dev, struct timespec *ts) +{ + struct sbbc_softc *sc; + bus_space_tag_t bst; + bus_space_handle_t bsh; + + sc = device_get_softc(dev); + bst = rman_get_bustag(sc->sc_res); + bsh = rman_get_bushandle(sc->sc_res); + + SBBC_SRAM_WRITE_8(sbbc_toddata + SBBC_TOD_OFF(tod_skew), ts->tv_sec - + SBBC_SRAM_READ_8(sbbc_toddata + SBBC_TOD_OFF(tod_time))); + return (0); +} + +/* + * UART bus front-end + */ +static device_probe_t sbbc_uart_sbbc_probe; + +static device_method_t sbbc_uart_sbbc_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, sbbc_uart_sbbc_probe), + DEVMETHOD(device_attach, uart_bus_attach), + DEVMETHOD(device_detach, uart_bus_detach), + + KOBJMETHOD_END +}; + +DEFINE_CLASS_0(uart, sbbc_uart_driver, sbbc_uart_sbbc_methods, + sizeof(struct uart_softc)); +DRIVER_MODULE(uart, sbbc, sbbc_uart_driver, uart_devclass, 0, 0); + +static int +sbbc_uart_sbbc_probe(device_t dev) +{ + struct uart_softc *sc; + + sc = device_get_softc(dev); + sc->sc_class = &uart_sbbc_class; + device_set_desc(dev, "Serengeti console"); + return (uart_bus_probe(dev, 0, 0, SBBC_PCI_BAR, 0)); +} + +/* + * Low-level UART interface + */ +static int sbbc_uart_probe(struct uart_bas *bas); +static void sbbc_uart_init(struct uart_bas *bas, int baudrate, int databits, + int stopbits, int parity); +static void sbbc_uart_term(struct uart_bas *bas); +static void sbbc_uart_putc(struct uart_bas *bas, int c); +static int sbbc_uart_rxready(struct uart_bas *bas); +static int sbbc_uart_getc(struct uart_bas *bas, struct mtx *hwmtx); + +static struct uart_ops sbbc_uart_ops = { + .probe = sbbc_uart_probe, + .init = sbbc_uart_init, + .term = sbbc_uart_term, + .putc = sbbc_uart_putc, + .rxready = sbbc_uart_rxready, + .getc = sbbc_uart_getc, +}; + +static int +sbbc_uart_probe(struct uart_bas *bas) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + int error; + + sbbc_console = 1; + bst = bas->bst; + bsh = bas->bsh; + error = sbbc_parse_toc(bst, bsh); + if (error != 0) + return (error); + + if (sbbc_scsolie == 0 || sbbc_scsolir == 0 || sbbc_solcons == 0 || + sbbc_solscie == 0 || sbbc_solscir == 0) + return (ENXIO); + + if (SBBC_SRAM_READ_4(sbbc_solcons + SBBC_CONS_OFF(cons_magic)) != + SBBC_CONS_MAGIC || SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_version)) < SBBC_CONS_VERSION) + return (ENXIO); + return (0); +} + +static void +sbbc_uart_init(struct uart_bas *bas, int baudrate __unused, + int databits __unused, int stopbits __unused, int parity __unused) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + + bst = bas->bst; + bsh = bas->bsh; + + /* Enable output to and space in from the SC interrupts. */ + SBBC_SRAM_WRITE_4(sbbc_solscie, SBBC_SRAM_READ_4(sbbc_solscie) | + SBBC_SRAM_CONS_OUT | SBBC_SRAM_CONS_SPACE_IN); + uart_barrier(bas); + + /* Take over the console input. */ + sbbc_serengeti_set_console_input(SUNW_SETCONSINPUT_CLNT); +} + +static void +sbbc_uart_term(struct uart_bas *bas __unused) +{ + + /* Give back the console input. */ + sbbc_serengeti_set_console_input(SUNW_SETCONSINPUT_OBP); +} + +static void +sbbc_uart_putc(struct uart_bas *bas, int c) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + uint32_t wrptr; + + bst = bas->bst; + bsh = bas->bsh; + + wrptr = SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_wrptr)); + SBBC_SRAM_WRITE_1(sbbc_solcons + wrptr, c); + uart_barrier(bas); + if (++wrptr == SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_end))) + wrptr = SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_begin)); + SBBC_SRAM_WRITE_4(sbbc_solcons + SBBC_CONS_OFF(cons_out_wrptr), + wrptr); + uart_barrier(bas); + + SBBC_SRAM_WRITE_4(sbbc_solscir, SBBC_SRAM_READ_4(sbbc_solscir) | + SBBC_SRAM_CONS_OUT); + uart_barrier(bas); + sbbc_send_intr(bst, bsh); +} + +static int +sbbc_uart_rxready(struct uart_bas *bas) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + + bst = bas->bst; + bsh = bas->bsh; + + if (SBBC_SRAM_READ_4(sbbc_solcons + SBBC_CONS_OFF(cons_in_rdptr)) == + SBBC_SRAM_READ_4(sbbc_solcons + SBBC_CONS_OFF(cons_in_wrptr))) + return (0); + return (1); +} + +static int +sbbc_uart_getc(struct uart_bas *bas, struct mtx *hwmtx) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + int c; + uint32_t rdptr; + + bst = bas->bst; + bsh = bas->bsh; + + uart_lock(hwmtx); + + while (sbbc_uart_rxready(bas) == 0) { + uart_unlock(hwmtx); + DELAY(4); + uart_lock(hwmtx); + } + + rdptr = SBBC_SRAM_READ_4(sbbc_solcons + SBBC_CONS_OFF(cons_in_rdptr)); + c = SBBC_SRAM_READ_1(sbbc_solcons + rdptr); + uart_barrier(bas); + if (++rdptr == SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_in_end))) + rdptr = SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_in_begin)); + SBBC_SRAM_WRITE_4(sbbc_solcons + SBBC_CONS_OFF(cons_in_rdptr), + rdptr); + uart_barrier(bas); + SBBC_SRAM_WRITE_4(sbbc_solscir, SBBC_SRAM_READ_4(sbbc_solscir) | + SBBC_SRAM_CONS_SPACE_IN); + uart_barrier(bas); + sbbc_send_intr(bst, bsh); + + uart_unlock(hwmtx); + return (c); +} + +/* + * High-level UART interface + */ +static int sbbc_uart_bus_attach(struct uart_softc *sc); +static int sbbc_uart_bus_detach(struct uart_softc *sc); +static int sbbc_uart_bus_flush(struct uart_softc *sc, int what); +static int sbbc_uart_bus_getsig(struct uart_softc *sc); +static int sbbc_uart_bus_ioctl(struct uart_softc *sc, int request, + intptr_t data); +static int sbbc_uart_bus_ipend(struct uart_softc *sc); +static int sbbc_uart_bus_param(struct uart_softc *sc, int baudrate, + int databits, int stopbits, int parity); +static int sbbc_uart_bus_probe(struct uart_softc *sc); +static int sbbc_uart_bus_receive(struct uart_softc *sc); +static int sbbc_uart_bus_setsig(struct uart_softc *sc, int sig); +static int sbbc_uart_bus_transmit(struct uart_softc *sc); + +static kobj_method_t sbbc_uart_methods[] = { + KOBJMETHOD(uart_attach, sbbc_uart_bus_attach), + KOBJMETHOD(uart_detach, sbbc_uart_bus_detach), + KOBJMETHOD(uart_flush, sbbc_uart_bus_flush), + KOBJMETHOD(uart_getsig, sbbc_uart_bus_getsig), + KOBJMETHOD(uart_ioctl, sbbc_uart_bus_ioctl), + KOBJMETHOD(uart_ipend, sbbc_uart_bus_ipend), + KOBJMETHOD(uart_param, sbbc_uart_bus_param), + KOBJMETHOD(uart_probe, sbbc_uart_bus_probe), + KOBJMETHOD(uart_receive, sbbc_uart_bus_receive), + KOBJMETHOD(uart_setsig, sbbc_uart_bus_setsig), + KOBJMETHOD(uart_transmit, sbbc_uart_bus_transmit), + + KOBJMETHOD_END +}; + +struct uart_class uart_sbbc_class = { + "sbbc", + sbbc_uart_methods, + sizeof(struct uart_softc), + .uc_ops = &sbbc_uart_ops, + .uc_range = 1, + .uc_rclk = 0x5bbc /* arbitrary */ +}; + +#define SIGCHG(c, i, s, d) \ + if ((c) != 0) { \ + i |= (((i) & (s)) != 0) ? (s) : (s) | (d); \ + } else { \ + i = (((i) & (s)) != 0) ? ((i) & ~(s)) | (d) : (i); \ + } + +static int +sbbc_uart_bus_attach(struct uart_softc *sc) +{ + struct uart_bas *bas; + bus_space_tag_t bst; + bus_space_handle_t bsh; + uint32_t wrptr; + + bas = &sc->sc_bas; + bst = bas->bst; + bsh = bas->bsh; + + sc->sc_rxfifosz = SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_in_end)) - SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_in_begin)) - 1; + sc->sc_txfifosz = SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_end)) - SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_begin)) - 1; + + uart_lock(sc->sc_hwmtx); + + /* + * Let the current output drain before enabling interrupts. Not + * doing so tends to cause lost output when turning them on. + */ + wrptr = SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_wrptr)); + while (SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_rdptr)) != wrptr); + cpu_spinwait(); + + /* Clear and acknowledge possibly outstanding interrupts. */ + SBBC_SRAM_WRITE_4(sbbc_scsolir, 0); + uart_barrier(bas); + SBBC_REGS_WRITE_4(SBBC_PCI_INT_STATUS, + SBBC_SRAM_READ_4(sbbc_scsolir)); + uart_barrier(bas); + /* Enable PCI interrupts. */ + SBBC_REGS_WRITE_4(SBBC_PCI_INT_ENABLE, SBBC_PCI_ENABLE_INT_A); + uart_barrier(bas); + /* Enable input from and output to SC as well as break interrupts. */ + SBBC_SRAM_WRITE_4(sbbc_scsolie, SBBC_SRAM_READ_4(sbbc_scsolie) | + SBBC_SRAM_CONS_IN | SBBC_SRAM_CONS_BRK | + SBBC_SRAM_CONS_SPACE_OUT); + uart_barrier(bas); + + uart_unlock(sc->sc_hwmtx); + return (0); +} + +static int +sbbc_uart_bus_detach(struct uart_softc *sc) +{ + + /* Give back the console input. */ + sbbc_serengeti_set_console_input(SUNW_SETCONSINPUT_OBP); + return (0); +} + +static int +sbbc_uart_bus_flush(struct uart_softc *sc, int what) +{ + struct uart_bas *bas; + bus_space_tag_t bst; + bus_space_handle_t bsh; + + bas = &sc->sc_bas; + bst = bas->bst; + bsh = bas->bsh; + + if ((what & UART_FLUSH_TRANSMITTER) != 0) + return (ENODEV); + if ((what & UART_FLUSH_RECEIVER) != 0) { + SBBC_SRAM_WRITE_4(sbbc_solcons + + SBBC_CONS_OFF(cons_in_rdptr), + SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_in_wrptr))); + uart_barrier(bas); + } + return (0); +} + +static int +sbbc_uart_bus_getsig(struct uart_softc *sc) +{ + uint32_t dummy, new, old, sig; + + do { + old = sc->sc_hwsig; + sig = old; + dummy = 0; + SIGCHG(dummy, sig, SER_CTS, SER_DCTS); + SIGCHG(dummy, sig, SER_DCD, SER_DDCD); + SIGCHG(dummy, sig, SER_DSR, SER_DDSR); + new = sig & ~SER_MASK_DELTA; + } while (!atomic_cmpset_32(&sc->sc_hwsig, old, new)); + return (sig); +} + +static int +sbbc_uart_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) +{ + int error; + + error = 0; + uart_lock(sc->sc_hwmtx); + switch (request) { + case UART_IOCTL_BAUD: + *(int*)data = 9600; /* arbitrary */ + break; + default: + error = EINVAL; + break; + } + uart_unlock(sc->sc_hwmtx); + return (error); +} + +static int +sbbc_uart_bus_ipend(struct uart_softc *sc) +{ + struct uart_bas *bas; + bus_space_tag_t bst; + bus_space_handle_t bsh; + int ipend; + uint32_t reason, status; + + bas = &sc->sc_bas; + bst = bas->bst; + bsh = bas->bsh; + + uart_lock(sc->sc_hwmtx); + status = SBBC_REGS_READ_4(SBBC_PCI_INT_STATUS); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 12:05:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88DB71065673; Sat, 10 Apr 2010 12:05:31 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CEA08FC1E; Sat, 10 Apr 2010 12:05:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3AC5VCv074268; Sat, 10 Apr 2010 12:05:31 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3AC5VGp074266; Sat, 10 Apr 2010 12:05:31 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201004101205.o3AC5VGp074266@svn.freebsd.org> From: Bruce M Simpson Date: Sat, 10 Apr 2010 12:05:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206452 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 12:05:31 -0000 Author: bms Date: Sat Apr 10 12:05:31 2010 New Revision: 206452 URL: http://svn.freebsd.org/changeset/base/206452 Log: Fix a few issues related to the legacy 4.4 BSD multicast APIs. IPv4 addresses can and do change during normal operation. Testing by pfSense developers exposed an issue where OpenOSPFD was using the IPv4 address to leave the OSPF link-scope multicast groups on a dynamic OpenVPN tun interface, rather than using RFC 3678 with the interface index, which won't be raced when the interface's addresses change. In inp_join_group(): If we are already a member of an ASM group, and IP_ADD_MEMBERSHIP or MCAST_JOIN_GROUP ioctls are re-issued, return EADDRINUSE as per the legacy 4.4BSD multicast API. This bends RFC 3678 slightly, but does not violate POLA for apps using the old API. It also stops us falling through to kicking IGMP state transactions in what is otherwise a no-op case. [This has already been dealt with in HEAD, but make it explicit before we MFC the change to 8.] In inp_leave_group(): Fix a bogus conditional. Move the ifp null check to ioctls MCAST_LEAVE* in the switch..case where it actually belongs. If an interface was specified, by primary IPv4 address, for ioctl IP_DROP_MEMBERSHIP or MCAST_LEAVE_GROUP (an ASM full leave operation), then and only then should we look up the ifp from the IPv4 address in mreqs.imr_interface. If not, we fall through to imo_match_group() as before, but only in the IP_DROP_MEMBERSHIP case. With these changes, the legacy 4.4BSD multicast API idempotence should be mostly preserved in the SSM enabled IPv4 stack. Found by: ermal (with pfSense) MFC after: 3 days Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Sat Apr 10 11:52:12 2010 (r206451) +++ head/sys/netinet/in_mcast.c Sat Apr 10 12:05:31 2010 (r206452) @@ -1999,9 +1999,12 @@ inp_join_group(struct inpcb *inp, struct } } else { /* - * MCAST_JOIN_GROUP alone, on any existing membership, - * is rejected, to stop the same inpcb tying up - * multiple refs to the in_multi. + * MCAST_JOIN_GROUP on an existing exclusive + * membership is an error; return EADDRINUSE + * to preserve 4.4BSD API idempotence, and + * avoid tedious detour to code below. + * NOTE: This is bending RFC 3678 a bit. + * * On an existing inclusive membership, this is also * an error; if you want to change filter mode, * you must use the userland API setsourcefilter(). @@ -2010,6 +2013,8 @@ inp_join_group(struct inpcb *inp, struct * is atomic with allocation of a membership. */ error = EINVAL; + if (imf->imf_st[1] == MCAST_EXCLUDE) + error = EADDRINUSE; goto out_inp_locked; } } @@ -2186,7 +2191,14 @@ inp_leave_group(struct inpcb *inp, struc ssa->sin.sin_addr = mreqs.imr_sourceaddr; } - if (!in_nullhost(gsa->sin.sin_addr)) + /* + * Attempt to look up hinted ifp from interface address. + * Fallthrough with null ifp iff lookup fails, to + * preserve 4.4BSD mcast API idempotence. + * XXX NOTE WELL: The RFC 3678 API is preferred because + * using an IPv4 address as a key is racy. + */ + if (!in_nullhost(mreqs.imr_interface)) INADDR_TO_IFP(mreqs.imr_interface, ifp); CTR3(KTR_IGMPV3, "%s: imr_interface = %s, ifp = %p", @@ -2222,6 +2234,9 @@ inp_leave_group(struct inpcb *inp, struc return (EADDRNOTAVAIL); ifp = ifnet_byindex(gsr.gsr_interface); + + if (ifp == NULL) + return (EADDRNOTAVAIL); break; default: @@ -2234,9 +2249,6 @@ inp_leave_group(struct inpcb *inp, struc if (!IN_MULTICAST(ntohl(gsa->sin.sin_addr.s_addr))) return (EINVAL); - if (ifp == NULL) - return (EADDRNOTAVAIL); - /* * Find the membership in the membership array. */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 12:10:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3752C106566B; Sat, 10 Apr 2010 12:10:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F8438FC12; Sat, 10 Apr 2010 12:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3ACABUm075340; Sat, 10 Apr 2010 12:10:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ACABtT075338; Sat, 10 Apr 2010 12:10:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201004101210.o3ACABtT075338@svn.freebsd.org> From: Marius Strobl Date: Sat, 10 Apr 2010 12:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206453 - head/sys/sparc64/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 12:10:12 -0000 Author: marius Date: Sat Apr 10 12:10:11 2010 New Revision: 206453 URL: http://svn.freebsd.org/changeset/base/206453 Log: Add missing copyright shebang. Modified: head/sys/sparc64/pci/sbbc.c Modified: head/sys/sparc64/pci/sbbc.c ============================================================================== --- head/sys/sparc64/pci/sbbc.c Sat Apr 10 12:05:31 2010 (r206452) +++ head/sys/sparc64/pci/sbbc.c Sat Apr 10 12:10:11 2010 (r206453) @@ -1,5 +1,5 @@ /* $OpenBSD: sbbc.c,v 1.7 2009/11/09 17:53:39 nicm Exp $ */ -/* +/*- * Copyright (c) 2008 Mark Kettenis * * Permission to use, copy, modify, and distribute this software for any From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 12:24:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FBC71065672; Sat, 10 Apr 2010 12:24:22 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F35338FC1F; Sat, 10 Apr 2010 12:24:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3ACOL6W078588; Sat, 10 Apr 2010 12:24:21 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ACOLfH078586; Sat, 10 Apr 2010 12:24:21 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201004101224.o3ACOLfH078586@svn.freebsd.org> From: Bruce M Simpson Date: Sat, 10 Apr 2010 12:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206454 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 12:24:22 -0000 Author: bms Date: Sat Apr 10 12:24:21 2010 New Revision: 206454 URL: http://svn.freebsd.org/changeset/base/206454 Log: When embedding the scope ID in MLDv1 output, check if the scope of the address being embedded is in fact link-local, before attempting to embed it. Note that this operation is a side-effect of trying to avoid recursion on the IN6 scope lock. PR: 144560 Submitted by: Petr Lampa MFC after: 3 days Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Sat Apr 10 12:10:11 2010 (r206453) +++ head/sys/netinet6/mld6.c Sat Apr 10 12:24:21 2010 (r206454) @@ -195,8 +195,10 @@ static int sysctl_mld_ifinfo(SYSCTL_HAND static struct mtx mld_mtx; MALLOC_DEFINE(M_MLD, "mld", "mld state"); -#define MLD_EMBEDSCOPE(pin6, zoneid) \ - (pin6)->s6_addr16[1] = htons((zoneid) & 0xFFFF) +#define MLD_EMBEDSCOPE(pin6, zoneid) \ + if (IN6_IS_SCOPE_LINKLOCAL(pin6) || \ + IN6_IS_ADDR_MC_INTFACELOCAL(pin6)) \ + (pin6)->s6_addr16[1] = htons((zoneid) & 0xFFFF) \ /* * VIMAGE-wide globals. From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 12:29:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03990106566B; Sat, 10 Apr 2010 12:29:10 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E77468FC08; Sat, 10 Apr 2010 12:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3ACT9Zh079671; Sat, 10 Apr 2010 12:29:09 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ACT9T3079669; Sat, 10 Apr 2010 12:29:09 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201004101229.o3ACT9T3079669@svn.freebsd.org> From: Bruce M Simpson Date: Sat, 10 Apr 2010 12:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206455 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 12:29:10 -0000 Author: bms Date: Sat Apr 10 12:29:09 2010 New Revision: 206455 URL: http://svn.freebsd.org/changeset/base/206455 Log: Add a comment to MAINTAINERS indicating that sbin/routed is in fact vendor branch code from before contrib existed in FreeBSD's history. Changes should be run by Vernon Schryver at Rhyolite first. Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Sat Apr 10 12:24:21 2010 (r206454) +++ head/MAINTAINERS Sat Apr 10 12:29:09 2010 (r206455) @@ -125,6 +125,7 @@ lib/libc/stdtime edwin Heads-up apprec is maintained by a third party source. sysinstall randi Please contact about any major changes so that they can be co-ordinated. +sbin/routed bms Pre-commit review; notify vendor at rhyolite.com Following are the entries from the Makefiles, and a few other sources. Please remove stale entries from both their origin, and this file. From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 12:47:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03F23106566C; Sat, 10 Apr 2010 12:47:07 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E77458FC13; Sat, 10 Apr 2010 12:47:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3ACl69X083633; Sat, 10 Apr 2010 12:47:06 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ACl6br083631; Sat, 10 Apr 2010 12:47:06 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201004101247.o3ACl6br083631@svn.freebsd.org> From: Rui Paulo Date: Sat, 10 Apr 2010 12:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206456 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 12:47:07 -0000 Author: rpaulo Date: Sat Apr 10 12:47:06 2010 New Revision: 206456 URL: http://svn.freebsd.org/changeset/base/206456 Log: Honor the CE bit even when the CWR bit is set. PR: 145600 Submitted by: Richard Scheffenegger MFC after: 1 week Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sat Apr 10 12:29:09 2010 (r206455) +++ head/sys/netinet/tcp_input.c Sat Apr 10 12:47:06 2010 (r206456) @@ -1134,6 +1134,8 @@ tcp_do_segment(struct mbuf *m, struct tc * TCP ECN processing. */ if (tp->t_flags & TF_ECN_PERMIT) { + if (thflags & TH_CWR) + tp->t_flags &= ~TF_ECN_SND_ECE; switch (iptos & IPTOS_ECN_MASK) { case IPTOS_ECN_CE: tp->t_flags |= TF_ECN_SND_ECE; @@ -1146,10 +1148,6 @@ tcp_do_segment(struct mbuf *m, struct tc TCPSTAT_INC(tcps_ecn_ect1); break; } - - if (thflags & TH_CWR) - tp->t_flags &= ~TF_ECN_SND_ECE; - /* * Congestion experienced. * Ignore if we are already trying to recover. From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 13:54:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7089F106566B; Sat, 10 Apr 2010 13:54:00 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D2088FC08; Sat, 10 Apr 2010 13:54:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3ADs0sO098255; Sat, 10 Apr 2010 13:54:00 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3ADs05a098248; Sat, 10 Apr 2010 13:54:00 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201004101354.o3ADs05a098248@svn.freebsd.org> From: Bernhard Schmidt Date: Sat, 10 Apr 2010 13:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206457 - in head: sys/dev/ath sys/net80211 usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 13:54:00 -0000 Author: bschmidt Date: Sat Apr 10 13:54:00 2010 New Revision: 206457 URL: http://svn.freebsd.org/changeset/base/206457 Log: Add WPA-None support: * WPA-None requires ap_scan=2: The major difference between ap_scan=1 (default) and 2 is, that no IEEE80211_IOC_SCAN* ioctls/functions are called, though, there is a dependency on those. For example the call to wpa_driver_bsd_scan() sets the interface UP, this never happens, therefore the interface must be marked up in wpa_driver_bsd_associate(). IEEE80211_IOC_SSID also is not called, which means that the SSID has not been set prior to the IEEE80211_MLME_ASSOC call. * WPA-None has no support for sequence number updates, it doesn't make sense to check for replay violations.. * I had some crashes right after the switch to RUN state, issue is that sc->sc_lastrs was not yet defined. Approved by: rpaulo (mentor) MFC after: 3 weeks Modified: head/sys/dev/ath/if_ath.c head/sys/net80211/ieee80211_crypto_ccmp.c head/sys/net80211/ieee80211_crypto_tkip.c head/sys/net80211/ieee80211_ioctl.c head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Apr 10 12:47:06 2010 (r206456) +++ head/sys/dev/ath/if_ath.c Sat Apr 10 13:54:00 2010 (r206457) @@ -3654,8 +3654,14 @@ ath_recv_mgmt(struct ieee80211_node *ni, case IEEE80211_FC0_SUBTYPE_PROBE_RESP: if (vap->iv_opmode == IEEE80211_M_IBSS && vap->iv_state == IEEE80211_S_RUN) { - uint32_t rstamp = sc->sc_lastrs->rs_tstamp; - u_int64_t tsf = ath_extend_tsf(rstamp, + uint32_t rstamp; + uint64_t tsf; + + if (sc->sc_lastrs == NULL) + break; + + rstamp = sc->sc_lastrs->rs_tstamp; + tsf = ath_extend_tsf(rstamp, ath_hal_gettsf64(sc->sc_ah)); /* * Handle ibss merge as needed; check the tsf on the Modified: head/sys/net80211/ieee80211_crypto_ccmp.c ============================================================================== --- head/sys/net80211/ieee80211_crypto_ccmp.c Sat Apr 10 12:47:06 2010 (r206456) +++ head/sys/net80211/ieee80211_crypto_ccmp.c Sat Apr 10 13:54:00 2010 (r206457) @@ -226,7 +226,14 @@ ccmp_decap(struct ieee80211_key *k, stru } tid = ieee80211_gettid(wh); pn = READ_6(ivp[0], ivp[1], ivp[4], ivp[5], ivp[6], ivp[7]); - if (pn <= k->wk_keyrsc[tid]) { + /* + * NB: Multiple stations are using the same key in + * IBSS mode, there is currently no way to sync keyrsc + * counters without discarding too many frames. + */ + if (vap->iv_opmode != IEEE80211_M_IBSS && + vap->iv_opmode != IEEE80211_M_AHDEMO && + pn <= k->wk_keyrsc[tid]) { /* * Replay violation. */ Modified: head/sys/net80211/ieee80211_crypto_tkip.c ============================================================================== --- head/sys/net80211/ieee80211_crypto_tkip.c Sat Apr 10 12:47:06 2010 (r206456) +++ head/sys/net80211/ieee80211_crypto_tkip.c Sat Apr 10 13:54:00 2010 (r206457) @@ -281,7 +281,14 @@ tkip_decap(struct ieee80211_key *k, stru tid = ieee80211_gettid(wh); ctx->rx_rsc = READ_6(ivp[2], ivp[0], ivp[4], ivp[5], ivp[6], ivp[7]); - if (ctx->rx_rsc <= k->wk_keyrsc[tid]) { + /* + * NB: Multiple stations are using the same key in + * IBSS mode, there is currently no way to sync keyrsc + * counters without discarding too many frames. + */ + if (vap->iv_opmode != IEEE80211_M_IBSS && + vap->iv_opmode != IEEE80211_M_AHDEMO && + ctx->rx_rsc <= k->wk_keyrsc[tid]) { /* * Replay violation; notify upper layer. */ Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Sat Apr 10 12:47:06 2010 (r206456) +++ head/sys/net80211/ieee80211_ioctl.c Sat Apr 10 13:54:00 2010 (r206457) @@ -70,6 +70,8 @@ __FBSDID("$FreeBSD$"); static const uint8_t zerobssid[IEEE80211_ADDR_LEN]; static struct ieee80211_channel *findchannel(struct ieee80211com *, int ieee, int mode); +static int ieee80211_scanreq(struct ieee80211vap *, + struct ieee80211_scan_req *); static __noinline int ieee80211_ioctl_getkey(struct ieee80211vap *vap, struct ieee80211req *ireq) @@ -1471,14 +1473,15 @@ mlmelookup(void *arg, const struct ieee8 } static __noinline int -setmlme_assoc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], - int ssid_len, const uint8_t ssid[IEEE80211_NWID_LEN]) +setmlme_assoc_sta(struct ieee80211vap *vap, + const uint8_t mac[IEEE80211_ADDR_LEN], int ssid_len, + const uint8_t ssid[IEEE80211_NWID_LEN]) { struct scanlookup lookup; - /* XXX ibss/ahdemo */ - if (vap->iv_opmode != IEEE80211_M_STA) - return EINVAL; + KASSERT(vap->iv_opmode == IEEE80211_M_STA, + ("expected opmode STA not %s", + ieee80211_opmode_name[vap->iv_opmode])); /* NB: this is racey if roaming is !manual */ lookup.se = NULL; @@ -1495,6 +1498,36 @@ setmlme_assoc(struct ieee80211vap *vap, } static __noinline int +setmlme_assoc_adhoc(struct ieee80211vap *vap, + const uint8_t mac[IEEE80211_ADDR_LEN], int ssid_len, + const uint8_t ssid[IEEE80211_NWID_LEN]) +{ + struct ieee80211_scan_req sr; + + KASSERT(vap->iv_opmode == IEEE80211_M_IBSS || + vap->iv_opmode == IEEE80211_M_AHDEMO, + ("expected opmode IBSS or AHDEMO not %s", + ieee80211_opmode_name[vap->iv_opmode])); + + if (ssid_len == 0) + return EINVAL; + + /* NB: IEEE80211_IOC_SSID call missing for ap_scan=2. */ + memset(vap->iv_des_ssid[0].ssid, 0, IEEE80211_NWID_LEN); + vap->iv_des_ssid[0].len = ssid_len; + memcpy(vap->iv_des_ssid[0].ssid, ssid, ssid_len); + vap->iv_des_nssid = 1; + + sr.sr_flags = IEEE80211_IOC_SCAN_ACTIVE | IEEE80211_IOC_SCAN_ONCE; + sr.sr_duration = IEEE80211_IOC_SCAN_FOREVER; + memcpy(sr.sr_ssid[0].ssid, ssid, ssid_len); + sr.sr_ssid[0].len = ssid_len; + sr.sr_nssid = 1; + + return ieee80211_scanreq(vap, &sr); +} + +static __noinline int ieee80211_ioctl_setmlme(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211req_mlme mlme; @@ -1505,9 +1538,13 @@ ieee80211_ioctl_setmlme(struct ieee80211 error = copyin(ireq->i_data, &mlme, sizeof(mlme)); if (error) return error; - if (mlme.im_op == IEEE80211_MLME_ASSOC) - return setmlme_assoc(vap, mlme.im_macaddr, + if (vap->iv_opmode == IEEE80211_M_STA && + mlme.im_op == IEEE80211_MLME_ASSOC) + return setmlme_assoc_sta(vap, mlme.im_macaddr, vap->iv_des_ssid[0].len, vap->iv_des_ssid[0].ssid); + else if (mlme.im_op == IEEE80211_MLME_ASSOC) + return setmlme_assoc_adhoc(vap, mlme.im_macaddr, + mlme.im_ssid_len, mlme.im_ssid); else return setmlme_common(vap, mlme.im_op, mlme.im_macaddr, mlme.im_reason); @@ -2332,8 +2369,8 @@ ieee80211_ioctl_chanswitch(struct ieee80 return error; } -static __noinline int -ieee80211_ioctl_scanreq(struct ieee80211vap *vap, struct ieee80211req *ireq) +static int +ieee80211_scanreq(struct ieee80211vap *vap, struct ieee80211_scan_req *sr) { #define IEEE80211_IOC_SCAN_FLAGS \ (IEEE80211_IOC_SCAN_NOPICK | IEEE80211_IOC_SCAN_ACTIVE | \ @@ -2342,48 +2379,38 @@ ieee80211_ioctl_scanreq(struct ieee80211 IEEE80211_IOC_SCAN_NOJOIN | IEEE80211_IOC_SCAN_FLUSH | \ IEEE80211_IOC_SCAN_CHECK) struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_req sr; /* XXX off stack? */ - int error, i; - - /* NB: parent must be running */ - if ((ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - return ENXIO; + int i; - if (ireq->i_len != sizeof(sr)) - return EINVAL; - error = copyin(ireq->i_data, &sr, sizeof(sr)); - if (error != 0) - return error; /* convert duration */ - if (sr.sr_duration == IEEE80211_IOC_SCAN_FOREVER) - sr.sr_duration = IEEE80211_SCAN_FOREVER; + if (sr->sr_duration == IEEE80211_IOC_SCAN_FOREVER) + sr->sr_duration = IEEE80211_SCAN_FOREVER; else { - if (sr.sr_duration < IEEE80211_IOC_SCAN_DURATION_MIN || - sr.sr_duration > IEEE80211_IOC_SCAN_DURATION_MAX) + if (sr->sr_duration < IEEE80211_IOC_SCAN_DURATION_MIN || + sr->sr_duration > IEEE80211_IOC_SCAN_DURATION_MAX) return EINVAL; - sr.sr_duration = msecs_to_ticks(sr.sr_duration); - if (sr.sr_duration < 1) - sr.sr_duration = 1; + sr->sr_duration = msecs_to_ticks(sr->sr_duration); + if (sr->sr_duration < 1) + sr->sr_duration = 1; } /* convert min/max channel dwell */ - if (sr.sr_mindwell != 0) { - sr.sr_mindwell = msecs_to_ticks(sr.sr_mindwell); - if (sr.sr_mindwell < 1) - sr.sr_mindwell = 1; - } - if (sr.sr_maxdwell != 0) { - sr.sr_maxdwell = msecs_to_ticks(sr.sr_maxdwell); - if (sr.sr_maxdwell < 1) - sr.sr_maxdwell = 1; + if (sr->sr_mindwell != 0) { + sr->sr_mindwell = msecs_to_ticks(sr->sr_mindwell); + if (sr->sr_mindwell < 1) + sr->sr_mindwell = 1; + } + if (sr->sr_maxdwell != 0) { + sr->sr_maxdwell = msecs_to_ticks(sr->sr_maxdwell); + if (sr->sr_maxdwell < 1) + sr->sr_maxdwell = 1; } /* NB: silently reduce ssid count to what is supported */ - if (sr.sr_nssid > IEEE80211_SCAN_MAX_SSID) - sr.sr_nssid = IEEE80211_SCAN_MAX_SSID; - for (i = 0; i < sr.sr_nssid; i++) - if (sr.sr_ssid[i].len > IEEE80211_NWID_LEN) + if (sr->sr_nssid > IEEE80211_SCAN_MAX_SSID) + sr->sr_nssid = IEEE80211_SCAN_MAX_SSID; + for (i = 0; i < sr->sr_nssid; i++) + if (sr->sr_ssid[i].len > IEEE80211_NWID_LEN) return EINVAL; /* cleanse flags just in case, could reject if invalid flags */ - sr.sr_flags &= IEEE80211_IOC_SCAN_FLAGS; + sr->sr_flags &= IEEE80211_IOC_SCAN_FLAGS; /* * Add an implicit NOPICK if the vap is not marked UP. This * allows applications to scan without joining a bss (or picking @@ -2391,13 +2418,13 @@ ieee80211_ioctl_scanreq(struct ieee80211 * roaming mode--you just need to mark the parent device UP. */ if ((vap->iv_ifp->if_flags & IFF_UP) == 0) - sr.sr_flags |= IEEE80211_IOC_SCAN_NOPICK; + sr->sr_flags |= IEEE80211_IOC_SCAN_NOPICK; IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: flags 0x%x%s duration 0x%x mindwell %u maxdwell %u nssid %d\n", - __func__, sr.sr_flags, + __func__, sr->sr_flags, (vap->iv_ifp->if_flags & IFF_UP) == 0 ? " (!IFF_UP)" : "", - sr.sr_duration, sr.sr_mindwell, sr.sr_maxdwell, sr.sr_nssid); + sr->sr_duration, sr->sr_mindwell, sr->sr_maxdwell, sr->sr_nssid); /* * If we are in INIT state then the driver has never had a chance * to setup hardware state to do a scan; we must use the state @@ -2412,13 +2439,13 @@ ieee80211_ioctl_scanreq(struct ieee80211 IEEE80211_LOCK(ic); if (vap->iv_state == IEEE80211_S_INIT) { /* NB: clobbers previous settings */ - vap->iv_scanreq_flags = sr.sr_flags; - vap->iv_scanreq_duration = sr.sr_duration; - vap->iv_scanreq_nssid = sr.sr_nssid; - for (i = 0; i < sr.sr_nssid; i++) { - vap->iv_scanreq_ssid[i].len = sr.sr_ssid[i].len; - memcpy(vap->iv_scanreq_ssid[i].ssid, sr.sr_ssid[i].ssid, - sr.sr_ssid[i].len); + vap->iv_scanreq_flags = sr->sr_flags; + vap->iv_scanreq_duration = sr->sr_duration; + vap->iv_scanreq_nssid = sr->sr_nssid; + for (i = 0; i < sr->sr_nssid; i++) { + vap->iv_scanreq_ssid[i].len = sr->sr_ssid[i].len; + memcpy(vap->iv_scanreq_ssid[i].ssid, + sr->sr_ssid[i].ssid, sr->sr_ssid[i].len); } vap->iv_flags_ext |= IEEE80211_FEXT_SCANREQ; IEEE80211_UNLOCK(ic); @@ -2427,25 +2454,44 @@ ieee80211_ioctl_scanreq(struct ieee80211 vap->iv_flags_ext &= ~IEEE80211_FEXT_SCANREQ; IEEE80211_UNLOCK(ic); /* XXX neeed error return codes */ - if (sr.sr_flags & IEEE80211_IOC_SCAN_CHECK) { - (void) ieee80211_check_scan(vap, sr.sr_flags, - sr.sr_duration, sr.sr_mindwell, sr.sr_maxdwell, - sr.sr_nssid, + if (sr->sr_flags & IEEE80211_IOC_SCAN_CHECK) { + (void) ieee80211_check_scan(vap, sr->sr_flags, + sr->sr_duration, sr->sr_mindwell, sr->sr_maxdwell, + sr->sr_nssid, /* NB: cheat, we assume structures are compatible */ - (const struct ieee80211_scan_ssid *) &sr.sr_ssid[0]); + (const struct ieee80211_scan_ssid *) &sr->sr_ssid[0]); } else { - (void) ieee80211_start_scan(vap, sr.sr_flags, - sr.sr_duration, sr.sr_mindwell, sr.sr_maxdwell, - sr.sr_nssid, + (void) ieee80211_start_scan(vap, sr->sr_flags, + sr->sr_duration, sr->sr_mindwell, sr->sr_maxdwell, + sr->sr_nssid, /* NB: cheat, we assume structures are compatible */ - (const struct ieee80211_scan_ssid *) &sr.sr_ssid[0]); + (const struct ieee80211_scan_ssid *) &sr->sr_ssid[0]); } } - return error; + return 0; #undef IEEE80211_IOC_SCAN_FLAGS } static __noinline int +ieee80211_ioctl_scanreq(struct ieee80211vap *vap, struct ieee80211req *ireq) +{ + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211_scan_req sr; /* XXX off stack? */ + int error; + + /* NB: parent must be running */ + if ((ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return ENXIO; + + if (ireq->i_len != sizeof(sr)) + return EINVAL; + error = copyin(ireq->i_data, &sr, sizeof(sr)); + if (error != 0) + return error; + return ieee80211_scanreq(vap, &sr); +} + +static __noinline int ieee80211_ioctl_setstavlan(struct ieee80211vap *vap, struct ieee80211req *ireq) { struct ieee80211_node *ni; Modified: head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c Sat Apr 10 12:47:06 2010 (r206456) +++ head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c Sat Apr 10 13:54:00 2010 (r206457) @@ -396,7 +396,7 @@ wpa_driver_bsd_associate(void *priv, str { struct wpa_driver_bsd_data *drv = priv; struct ieee80211req_mlme mlme; - int privacy; + int flags, privacy; wpa_printf(MSG_DEBUG, "%s: ssid '%.*s' wpa ie len %u pairwise %u group %u key mgmt %u" @@ -408,6 +408,17 @@ wpa_driver_bsd_associate(void *priv, str , params->key_mgmt_suite ); + /* NB: interface must be marked UP to associate */ + if (getifflags(drv, &flags) != 0) { + wpa_printf(MSG_DEBUG, "%s did not mark interface UP", __func__); + return -1; + } + if ((flags & IFF_UP) == 0 && setifflags(drv, flags | IFF_UP) != 0) { + wpa_printf(MSG_DEBUG, "%s unable to mark interface UP", + __func__); + return -1; + } + /* XXX error handling is wrong but unclear what to do... */ if (wpa_driver_bsd_set_wpa_ie(drv, params->wpa_ie, params->wpa_ie_len) < 0) return -1; Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sat Apr 10 12:47:06 2010 (r206456) +++ head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sat Apr 10 13:54:00 2010 (r206457) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2007 +.Dd April 10, 2010 .Dt WPA_SUPPLICANT.CONF 5 .Os .Sh NAME @@ -153,7 +153,27 @@ Note that IBSS (adhoc) mode can only be .Va key_mgmt set to .Li NONE -(plaintext and static WEP). +(plaintext and static WEP), or +.Va key_mgmt +set to +.Li WPA-NONE +(fixed group key TKIP/CCMP). +In addition, +.Va ap_scan +has to be set to 2 for IBSS. +.Li WPA-NONE +requires +.Va proto +set to WPA, +.Va key_mgmt +set to WPA-NONE, +.Va pairwise +set to NONE, +.Va group +set to either +CCMP or TKIP (but not both), and +.Va psk +must also be set. .It Va proto List of acceptable protocols; one or more of: .Li WPA From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 14:28:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3635F106566B; Sat, 10 Apr 2010 14:28:59 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18CC48FC17; Sat, 10 Apr 2010 14:28:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3AESwcR006094; Sat, 10 Apr 2010 14:28:58 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3AESwLi006092; Sat, 10 Apr 2010 14:28:58 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201004101428.o3AESwLi006092@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 10 Apr 2010 14:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206458 - stable/8/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 14:28:59 -0000 Author: jh Date: Sat Apr 10 14:28:58 2010 New Revision: 206458 URL: http://svn.freebsd.org/changeset/base/206458 Log: MFC r205385: Escape characters unsafe for XML output in GEOM class, instance and provider names. - Characters in range 0x01-0x1f except '\t', '\n', and '\r' are replaced with '?'. Those characters are disallowed in XML. - '&', '<', '>', '\'', '"' and characters in range 0x7f-0xff are replaced with XML numeric character reference. If the kern.geom.confxml sysctl provides invalid XML, libgeom geom_xml2tree() fails and utilities using it do not work. Unsafe characters are common in msdosfs and cd9660 labels. PR: kern/104389 Modified: stable/8/sys/geom/geom_dump.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/geom/geom_dump.c ============================================================================== --- stable/8/sys/geom/geom_dump.c Sat Apr 10 13:54:00 2010 (r206457) +++ stable/8/sys/geom/geom_dump.c Sat Apr 10 14:28:58 2010 (r206458) @@ -154,6 +154,28 @@ g_conftxt(void *p, int flag) static void +g_conf_print_escaped(struct sbuf *sb, const char *fmt, const char *str) +{ + struct sbuf *s; + const u_char *c; + + s = sbuf_new_auto(); + + for (c = str; *c != '\0'; c++) { + if (*c == '&' || *c == '<' || *c == '>' || + *c == '\'' || *c == '"' || *c > 0x7e) + sbuf_printf(s, "&#x%X;", *c); + else if (*c == '\t' || *c == '\n' || *c == '\r' || *c > 0x1f) + sbuf_putc(s, *c); + else + sbuf_putc(s, '?'); + } + sbuf_finish(s); + sbuf_printf(sb, fmt, sbuf_data(s)); + sbuf_delete(s); +} + +static void g_conf_consumer(struct sbuf *sb, struct g_consumer *cp) { @@ -181,7 +203,7 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t \n", pp->geom); sbuf_printf(sb, "\t r%dw%de%d\n", pp->acr, pp->acw, pp->ace); - sbuf_printf(sb, "\t %s\n", pp->name); + g_conf_print_escaped(sb, "\t %s\n", pp->name); sbuf_printf(sb, "\t %jd\n", (intmax_t)pp->mediasize); sbuf_printf(sb, "\t %u\n", pp->sectorsize); @@ -204,7 +226,7 @@ g_conf_geom(struct sbuf *sb, struct g_ge sbuf_printf(sb, " \n", gp); sbuf_printf(sb, " \n", gp->class); - sbuf_printf(sb, " %s\n", gp->name); + g_conf_print_escaped(sb, " %s\n", gp->name); sbuf_printf(sb, " %d\n", gp->rank); if (gp->flags & G_GEOM_WITHER) sbuf_printf(sb, " \n"); @@ -233,7 +255,7 @@ g_conf_class(struct sbuf *sb, struct g_c struct g_geom *gp2; sbuf_printf(sb, " \n", mp); - sbuf_printf(sb, " %s\n", mp->name); + g_conf_print_escaped(sb, " %s\n", mp->name); LIST_FOREACH(gp2, &mp->geom, geom) { if (gp != NULL && gp != gp2) continue; From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 15:55:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F21211065670; Sat, 10 Apr 2010 15:55:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id 7BE448FC08; Sat, 10 Apr 2010 15:55:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id DBB9B41C752; Sat, 10 Apr 2010 17:55:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id H2Krgcn+XOW7; Sat, 10 Apr 2010 17:55:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 5FB1141C751; Sat, 10 Apr 2010 17:55:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 535414448EC; Sat, 10 Apr 2010 15:53:42 +0000 (UTC) Date: Sat, 10 Apr 2010 15:53:42 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Jack F Vogel In-Reply-To: <201004091842.o39IgFbb031014@svn.freebsd.org> Message-ID: <20100410155034.X40281@maildrop.int.zabbadoz.net> References: <201004091842.o39IgFbb031014@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206429 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 15:55:08 -0000 On Fri, 9 Apr 2010, Jack F Vogel wrote: > Author: jfv > Date: Fri Apr 9 18:42:15 2010 > New Revision: 206429 > URL: http://svn.freebsd.org/changeset/base/206429 > > Log: > Incorporate suggested improvements from yongari. > > Also, from feedback, make the multiqueue code an > option (EM_MULTIQUEUE) that is off by default. > Problems have been seen with UDP when its on. > > Modified: > head/sys/dev/e1000/if_em.c > head/sys/dev/e1000/if_em.h > > Modified: head/sys/dev/e1000/if_em.c > ============================================================================== > --- head/sys/dev/e1000/if_em.c Fri Apr 9 18:02:19 2010 (r206428) > +++ head/sys/dev/e1000/if_em.c Fri Apr 9 18:42:15 2010 (r206429) .. > @@ -1427,28 +1443,23 @@ em_handle_que(void *context, int pending > struct ifnet *ifp = adapter->ifp; > struct tx_ring *txr = adapter->tx_rings; > struct rx_ring *rxr = adapter->rx_rings; > - u32 loop = EM_MAX_LOOP; > - bool more_rx, more_tx; > + bool more_rx; > > > if (ifp->if_drv_flags & IFF_DRV_RUNNING) { > + more_rx = em_rxeof(rxr, adapter->rx_process_limit); > EM_TX_LOCK(txr); > - do { > - more_rx = em_rxeof(rxr, adapter->rx_process_limit); Booting with NFS root I got a panic: 208089 Trying to mount root from nfs: .. 208107 panic: mutex em0:rx(0) not owned at /zoo/bz/HEAD_clean.svn/sys/dev/e1000/if_em.c:4093 .. 208138 db> where 208139 Tracing pid 0 tid 100050 td 0xffffff0001c43ab0 208140 kdb_enter() at kdb_enter+0x3d 208141 panic() at panic+0x1cc 208142 _mtx_assert() at _mtx_assert+0x7d 208143 em_rxeof() at em_rxeof+0x3b 208144 em_handle_que() at em_handle_que+0x4a 208145 taskqueue_run() at taskqueue_run+0xeb 208146 taskqueue_thread_loop() at taskqueue_thread_loop+0x50 208147 fork_exit() at fork_exit+0x14a 208148 fork_trampoline() at fork_trampoline+0xe 208149 --- trap 0, rip = 0, rsp = 0xffffff80001c9d30, rbp = 0 --- Not sure if this would be the correct fix locking wise but it might; at least this is where em_rxeof() get's called w/o the locking and triggers the assert. Index: sys/dev/e1000/if_em.c =================================================================== --- sys/dev/e1000/if_em.c (revision 206455) +++ sys/dev/e1000/if_em.c (working copy) @@ -1447,7 +1447,9 @@ em_handle_que(void *context, int pending) if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + EM_RX_LOCK(rxr); more_rx = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); EM_TX_LOCK(txr); em_txeof(txr); #ifdef EM_MULTIQUEUE -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 18:38:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC242106567E; Sat, 10 Apr 2010 18:38:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBE1E8FC1F; Sat, 10 Apr 2010 18:38:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3AIcBs3060482; Sat, 10 Apr 2010 18:38:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3AIcBwZ060479; Sat, 10 Apr 2010 18:38:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201004101838.o3AIcBwZ060479@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 Apr 2010 18:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206459 - in head/sys/amd64: amd64 include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 18:38:12 -0000 Author: kib Date: Sat Apr 10 18:38:11 2010 New Revision: 206459 URL: http://svn.freebsd.org/changeset/base/206459 Log: Handle a case when non-canonical address is loaded into the fsbase or gsbase MSR. MFC after: 3 days Modified: head/sys/amd64/amd64/exception.S head/sys/amd64/amd64/trap.c head/sys/amd64/include/md_var.h Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Sat Apr 10 14:28:58 2010 (r206458) +++ head/sys/amd64/amd64/exception.S Sat Apr 10 18:38:11 2010 (r206459) @@ -668,7 +668,8 @@ ld_fs: movw %ax,%fs movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax movl PCB_FSBASE+4(%r8),%edx - wrmsr + .globl ld_fsbase +ld_fsbase: wrmsr 1: /* Restore %gs and gsbase */ movw TF_GS(%rsp),%si @@ -685,7 +686,8 @@ ld_gs: movw %si,%gs movl $MSR_KGSBASE,%ecx movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx - wrmsr + .globl ld_gsbase +ld_gsbase: wrmsr 1: .globl ld_es ld_es: movw TF_ES(%rsp),%es .globl ld_ds @@ -798,6 +800,30 @@ gs_load_fault: call trap movw $KUG32SEL,TF_GS(%rsp) jmp doreti + + ALIGN_TEXT + .globl fsbase_load_fault +fsbase_load_fault: + movl $T_PROTFLT,TF_TRAPNO(%rsp) + movq %rsp, %rdi + call trap + movq PCPU(CURTHREAD),%r8 + movq TD_PCB(%r8),%r8 + movq $0,PCB_FSBASE(%r8) + jmp doreti + + ALIGN_TEXT + .globl gsbase_load_fault +gsbase_load_fault: + popfq + movl $T_PROTFLT,TF_TRAPNO(%rsp) + movq %rsp, %rdi + call trap + movq PCPU(CURTHREAD),%r8 + movq TD_PCB(%r8),%r8 + movq $0,PCB_GSBASE(%r8) + jmp doreti + #ifdef HWPMC_HOOKS ENTRY(end_exceptions) #endif Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sat Apr 10 14:28:58 2010 (r206458) +++ head/sys/amd64/amd64/trap.c Sat Apr 10 18:38:11 2010 (r206459) @@ -566,6 +566,14 @@ trap(struct trapframe *frame) frame->tf_gs = _ugssel; goto out; } + if (frame->tf_rip == (long)ld_gsbase) { + frame->tf_rip = (long)gsbase_load_fault; + goto out; + } + if (frame->tf_rip == (long)ld_fsbase) { + frame->tf_rip = (long)fsbase_load_fault; + goto out; + } if (PCPU_GET(curpcb)->pcb_onfault != NULL) { frame->tf_rip = (long)PCPU_GET(curpcb)->pcb_onfault; Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Sat Apr 10 14:28:58 2010 (r206458) +++ head/sys/amd64/include/md_var.h Sat Apr 10 18:38:11 2010 (r206459) @@ -83,10 +83,14 @@ void ld_ds(void) __asm(__STRING(ld_ds)); void ld_es(void) __asm(__STRING(ld_es)); void ld_fs(void) __asm(__STRING(ld_fs)); void ld_gs(void) __asm(__STRING(ld_gs)); +void ld_fsbase(void) __asm(__STRING(ld_fsbase)); +void ld_gsbase(void) __asm(__STRING(ld_gsbase)); void ds_load_fault(void) __asm(__STRING(ds_load_fault)); void es_load_fault(void) __asm(__STRING(es_load_fault)); void fs_load_fault(void) __asm(__STRING(fs_load_fault)); void gs_load_fault(void) __asm(__STRING(gs_load_fault)); +void fsbase_load_fault(void) __asm(__STRING(fsbase_load_fault)); +void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void initializecpu(void); From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 19:25:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EB751065670; Sat, 10 Apr 2010 19:25:56 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FCB88FC1D; Sat, 10 Apr 2010 19:25:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3AJPuSI070936; Sat, 10 Apr 2010 19:25:56 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3AJPuaJ070934; Sat, 10 Apr 2010 19:25:56 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201004101925.o3AJPuaJ070934@svn.freebsd.org> From: Jack F Vogel Date: Sat, 10 Apr 2010 19:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206460 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 19:25:56 -0000 Author: jfv Date: Sat Apr 10 19:25:55 2010 New Revision: 206460 URL: http://svn.freebsd.org/changeset/base/206460 Log: The lock move in rxeof necessitated a couple more places to do the locking, fixes a panic. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sat Apr 10 18:38:11 2010 (r206459) +++ head/sys/dev/e1000/if_em.c Sat Apr 10 19:25:55 2010 (r206460) @@ -1371,7 +1371,9 @@ em_poll(struct ifnet *ifp, enum poll_cmd } EM_CORE_UNLOCK(adapter); + EM_RX_LOCK(rxr); rx_done = em_rxeof(rxr, count); + EM_RX_UNLOCK(rxr); EM_TX_LOCK(txr); em_txeof(txr); @@ -1447,7 +1449,10 @@ em_handle_que(void *context, int pending if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + EM_RX_LOCK(rxr); more_rx = em_rxeof(rxr, adapter->rx_process_limit); + EM_RX_UNLOCK(rxr); + EM_TX_LOCK(txr); em_txeof(txr); #ifdef EM_MULTIQUEUE From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 19:42:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E66DB106566B; Sat, 10 Apr 2010 19:42:41 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from mailgate.jr-hosting.nl (mailgate.jr-hosting.nl [78.46.126.30]) by mx1.freebsd.org (Postfix) with ESMTP id A2E8A8FC1A; Sat, 10 Apr 2010 19:42:41 +0000 (UTC) Received: from websrv01.jr-hosting.nl (websrv01 [78.47.69.233]) by mailgate.jr-hosting.nl (Postfix) with ESMTP id B02D71CC26; Sat, 10 Apr 2010 21:42:39 +0200 (CEST) Received: from a83-163-38-147.adsl.xs4all.nl ([83.163.38.147] helo=axantucar.elvandar.int) by websrv01.jr-hosting.nl with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1O0gZj-0000re-HB; Sat, 10 Apr 2010 21:42:39 +0200 Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Remko Lodder In-Reply-To: <201004101205.o3AC5VGp074266@svn.freebsd.org> Date: Sat, 10 Apr 2010 21:42:38 +0200 Content-Transfer-Encoding: 7bit Message-Id: <52B0F06D-E40C-4F55-88F3-6721DF83D470@elvandar.org> References: <201004101205.o3AC5VGp074266@svn.freebsd.org> To: Bruce M Simpson X-Mailer: Apple Mail (2.1078) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r206452 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 19:42:42 -0000 On Apr 10, 2010, at 2:05 PM, Bruce M Simpson wrote: > > Log: > Fix a few issues related to the legacy 4.4 BSD multicast APIs. > > IPv4 addresses can and do change during normal operation. Testing by > pfSense developers exposed an issue where OpenOSPFD was using the IPv4 > address to leave the OSPF link-scope multicast groups on a dynamic > OpenVPN tun interface, rather than using RFC 3678 with the interface > index, which won't be raced when the interface's addresses change. > > > With these changes, the legacy 4.4BSD multicast API idempotence should > be mostly preserved in the SSM enabled IPv4 stack. > > Found by: ermal (with pfSense) > MFC after: 3 days > \o/ great work Ermal and Bruce! -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 22:11:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C3DC1065674; Sat, 10 Apr 2010 22:11:02 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D3FC8FC15; Sat, 10 Apr 2010 22:11:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3AMB2Z6007323; Sat, 10 Apr 2010 22:11:02 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3AMB2Gw007321; Sat, 10 Apr 2010 22:11:02 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201004102211.o3AMB2Gw007321@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 10 Apr 2010 22:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206461 - head/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 22:11:02 -0000 Author: bz Date: Sat Apr 10 22:11:01 2010 New Revision: 206461 URL: http://svn.freebsd.org/changeset/base/206461 Log: Try to help with a virtualized dummynet after r206428. This adds the explicit include (so far probably included through one of the few "hidden" includes in other header files) for vnet.h and adds a cast to unbreak LINT-VIMAGE. Modified: head/sys/netinet/ipfw/ip_dn_io.c Modified: head/sys/netinet/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netinet/ipfw/ip_dn_io.c Sat Apr 10 19:25:55 2010 (r206460) +++ head/sys/netinet/ipfw/ip_dn_io.c Sat Apr 10 22:11:01 2010 (r206461) @@ -45,8 +45,11 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include /* IFNAMSIZ, struct ifaddr, ifq head, lock.h mutex.h */ #include +#include + #include #include /* ip_len, ip_off */ #include /* ip_output(), IP_FORWARDING */ @@ -500,7 +503,7 @@ dummynet_task(void *context, int pending struct timeval t; struct mq q = { NULL, NULL }; /* queue to accumulate results */ - CURVNET_SET(context); + CURVNET_SET((struct vnet *)context); DN_BH_WLOCK(); From owner-svn-src-all@FreeBSD.ORG Sat Apr 10 22:24:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04D4F106566B; Sat, 10 Apr 2010 22:24:04 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E700C8FC08; Sat, 10 Apr 2010 22:24:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3AMO3sE010212; Sat, 10 Apr 2010 22:24:03 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3AMO3BM010203; Sat, 10 Apr 2010 22:24:03 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201004102224.o3AMO3BM010203@svn.freebsd.org> From: Alan Cox Date: Sat, 10 Apr 2010 22:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206462 - in stable/7/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2010 22:24:04 -0000 Author: alc Date: Sat Apr 10 22:24:03 2010 New Revision: 206462 URL: http://svn.freebsd.org/changeset/base/206462 Log: MFC r204907, r204913, r205402, r205573, r205778 Implement AMD's recommended workaround for Erratum 383 on Family 10h processors. Enable machine check exceptions by default. Modified: stable/7/sys/amd64/amd64/mca.c stable/7/sys/amd64/amd64/pmap.c stable/7/sys/amd64/include/md_var.h stable/7/sys/amd64/include/specialreg.h stable/7/sys/i386/i386/mca.c stable/7/sys/i386/i386/pmap.c stable/7/sys/i386/include/md_var.h stable/7/sys/i386/include/specialreg.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/amd64/amd64/mca.c ============================================================================== --- stable/7/sys/amd64/amd64/mca.c Sat Apr 10 22:11:01 2010 (r206461) +++ stable/7/sys/amd64/amd64/mca.c Sat Apr 10 22:24:03 2010 (r206462) @@ -60,11 +60,20 @@ static int mca_count; /* Number of reco SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); -static int mca_enabled = 0; +static int mca_enabled = 1; TUNABLE_INT("hw.mca.enabled", &mca_enabled); SYSCTL_INT(_hw_mca, OID_AUTO, enabled, CTLFLAG_RDTUN, &mca_enabled, 0, "Administrative toggle for machine check support"); +static int amd10h_L1TP = 1; +TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10h_L1TP); +SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, + "Administrative toggle for logging of level one TLB parity (L1TP) errors"); + +int workaround_erratum383; +SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, + "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); + static STAILQ_HEAD(, mca_internal) mca_records; static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ @@ -527,7 +536,7 @@ void mca_init(void) { uint64_t mcg_cap; - uint64_t ctl; + uint64_t ctl, mask; int skip; int i; @@ -535,6 +544,15 @@ mca_init(void) if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; + /* + * On AMD Family 10h processors, unless logging of level one TLB + * parity (L1TP) errors is disabled, enable the recommended workaround + * for Erratum 383. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + if (cpu_feature & CPUID_MCA) { if (PCPU_GET(cpuid) == 0) mca_setup(); @@ -545,6 +563,19 @@ mca_init(void) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); + /* + * Disable logging of level one TLB parity (L1TP) errors by + * the data cache as an alternative workaround for AMD Family + * 10h Erratum 383. Unlike the recommended workaround, there + * is no performance penalty to this workaround. However, + * L1TP errors will go unreported. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && !amd10h_L1TP) { + mask = rdmsr(MSR_MC0_CTL_MASK); + if ((mask & (1UL << 5)) == 0) + wrmsr(MSR_MC0_CTL_MASK, mask | (1UL << 5)); + } for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) { /* By default enable logging of all errors. */ ctl = 0xffffffffffffffffUL; Modified: stable/7/sys/amd64/amd64/pmap.c ============================================================================== --- stable/7/sys/amd64/amd64/pmap.c Sat Apr 10 22:11:01 2010 (r206461) +++ stable/7/sys/amd64/amd64/pmap.c Sat Apr 10 22:24:03 2010 (r206462) @@ -7,7 +7,7 @@ * All rights reserved. * Copyright (c) 2003 Peter Wemm * All rights reserved. - * Copyright (c) 2005-2008 Alan L. Cox + * Copyright (c) 2005-2010 Alan L. Cox * All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -249,6 +249,9 @@ static void pmap_remove_entry(struct pma static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); +static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, + pd_entry_t newpde); +static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde); static vm_page_t pmap_allocpde(pmap_t pmap, vm_offset_t va, int flags); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); @@ -658,13 +661,13 @@ pmap_init(void) pv_entry_high_water = 9 * (pv_entry_max / 10); /* - * Disable large page mappings by default if the kernel is running in - * a virtual machine on an AMD Family 10h processor. This is a work- - * around for Erratum 383. + * If the kernel is running in a virtual machine on an AMD Family 10h + * processor, then it must assume that MCA is enabled by the virtual + * machine monitor. */ if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && CPUID_TO_FAMILY(cpu_id) == 0x10) - pg_ps_enabled = 0; + workaround_erratum383 = 1; /* * Are large page mappings enabled? @@ -809,6 +812,45 @@ pmap_cache_bits(int mode, boolean_t is_p cache_bits |= PG_NC_PWT; return (cache_bits); } + +/* + * After changing the page size for the specified virtual address in the page + * table, flush the corresponding entries from the processor's TLB. Only the + * calling processor's TLB is affected. + * + * The calling thread must be pinned to a processor. + */ +static void +pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde) +{ + u_long cr4; + + if ((newpde & PG_PS) == 0) + /* Demotion: flush a specific 2MB page mapping. */ + invlpg(va); + else if ((newpde & PG_G) == 0) + /* + * Promotion: flush every 4KB page mapping from the TLB + * because there are too many to flush individually. + */ + invltlb(); + else { + /* + * Promotion: flush every 4KB page mapping from the TLB, + * including any global (PG_G) mappings. + */ + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); + /* + * Although preemption at this point could be detrimental to + * performance, it would not lead to an error. PG_G is simply + * ignored if CR4.PGE is clear. Moreover, in case this block + * is re-entered, the load_cr4() either above or below will + * modify CR4.PGE flushing the TLB. + */ + load_cr4(cr4 | CR4_PGE); + } +} #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -905,6 +947,69 @@ pmap_invalidate_cache(void) smp_cache_flush(); sched_unpin(); } + +struct pde_action { + cpumask_t store; /* processor that updates the PDE */ + cpumask_t invalidate; /* processors that invalidate their TLB */ + vm_offset_t va; + pd_entry_t *pde; + pd_entry_t newpde; +}; + +static void +pmap_update_pde_action(void *arg) +{ + struct pde_action *act = arg; + + if (act->store == PCPU_GET(cpumask)) + pde_store(act->pde, act->newpde); +} + +static void +pmap_update_pde_teardown(void *arg) +{ + struct pde_action *act = arg; + + if ((act->invalidate & PCPU_GET(cpumask)) != 0) + pmap_update_pde_invalidate(act->va, act->newpde); +} + +/* + * Change the page size for the specified virtual address in a way that + * prevents any possibility of the TLB ever having two entries that map the + * same virtual address using different page sizes. This is the recommended + * workaround for Erratum 383 on AMD Family 10h processors. It prevents a + * machine check exception for a TLB state that is improperly diagnosed as a + * hardware error. + */ +static void +pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) +{ + struct pde_action act; + cpumask_t active, cpumask; + + sched_pin(); + cpumask = PCPU_GET(cpumask); + if (pmap == kernel_pmap) + active = all_cpus; + else + active = pmap->pm_active; + if ((active & PCPU_GET(other_cpus)) != 0) { + act.store = cpumask; + act.invalidate = active; + act.va = va; + act.pde = pde; + act.newpde = newpde; + smp_rendezvous_cpus(cpumask | active, + smp_no_rendevous_barrier, pmap_update_pde_action, + pmap_update_pde_teardown, &act); + } else { + pde_store(pde, newpde); + if ((active & cpumask) != 0) + pmap_update_pde_invalidate(va, newpde); + } + sched_unpin(); +} #else /* !SMP */ /* * Normal, non-SMP, invalidation functions. @@ -942,6 +1047,15 @@ pmap_invalidate_cache(void) wbinvd(); } + +static void +pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) +{ + + pde_store(pde, newpde); + if (pmap == kernel_pmap || pmap->pm_active) + pmap_update_pde_invalidate(va, newpde); +} #endif /* !SMP */ static void @@ -2324,7 +2438,10 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t * processor changing the setting of PG_A and/or PG_M between * the read above and the store below. */ - pde_store(pde, newpde); + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, newpde); + else + pde_store(pde, newpde); /* * Invalidate a stale recursive mapping of the page table page. @@ -2940,7 +3057,10 @@ setpte: /* * Map the superpage. */ - pde_store(pde, PG_PS | newpde); + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, PG_PS | newpde); + else + pde_store(pde, PG_PS | newpde); pmap_pde_promotions++; CTR2(KTR_PMAP, "pmap_promote_pde: success for va %#lx" Modified: stable/7/sys/amd64/include/md_var.h ============================================================================== --- stable/7/sys/amd64/include/md_var.h Sat Apr 10 22:11:01 2010 (r206461) +++ stable/7/sys/amd64/include/md_var.h Sat Apr 10 22:24:03 2010 (r206462) @@ -61,6 +61,7 @@ extern char sigcode[]; extern int szsigcode; extern uint64_t *vm_page_dump; extern int vm_page_dump_size; +extern int workaround_erratum383; typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); struct thread; Modified: stable/7/sys/amd64/include/specialreg.h ============================================================================== --- stable/7/sys/amd64/include/specialreg.h Sat Apr 10 22:11:01 2010 (r206461) +++ stable/7/sys/amd64/include/specialreg.h Sat Apr 10 22:24:03 2010 (r206462) @@ -499,6 +499,7 @@ #define MSR_TOP_MEM 0xc001001a /* boundary for ram below 4G */ #define MSR_TOP_MEM2 0xc001001d /* boundary for ram above 4G */ #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ +#define MSR_MC0_CTL_MASK 0xc0010044 /* VIA ACE crypto featureset: for via_feature_rng */ #define VIA_HAS_RNG 1 /* cpu has RNG */ Modified: stable/7/sys/i386/i386/mca.c ============================================================================== --- stable/7/sys/i386/i386/mca.c Sat Apr 10 22:11:01 2010 (r206461) +++ stable/7/sys/i386/i386/mca.c Sat Apr 10 22:24:03 2010 (r206462) @@ -60,11 +60,20 @@ static int mca_count; /* Number of reco SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD, NULL, "Machine Check Architecture"); -static int mca_enabled = 0; +static int mca_enabled = 1; TUNABLE_INT("hw.mca.enabled", &mca_enabled); SYSCTL_INT(_hw_mca, OID_AUTO, enabled, CTLFLAG_RDTUN, &mca_enabled, 0, "Administrative toggle for machine check support"); +static int amd10h_L1TP = 1; +TUNABLE_INT("hw.mca.amd10h_L1TP", &amd10h_L1TP); +SYSCTL_INT(_hw_mca, OID_AUTO, amd10h_L1TP, CTLFLAG_RDTUN, &amd10h_L1TP, 0, + "Administrative toggle for logging of level one TLB parity (L1TP) errors"); + +int workaround_erratum383; +SYSCTL_INT(_hw_mca, OID_AUTO, erratum383, CTLFLAG_RD, &workaround_erratum383, 0, + "Is the workaround for Erratum 383 on AMD Family 10h processors enabled?"); + static STAILQ_HEAD(, mca_internal) mca_records; static struct callout mca_timer; static int mca_ticks = 3600; /* Check hourly by default. */ @@ -527,7 +536,7 @@ void mca_init(void) { uint64_t mcg_cap; - uint64_t ctl; + uint64_t ctl, mask; int skip; int i; @@ -535,6 +544,15 @@ mca_init(void) if (!mca_enabled || !(cpu_feature & CPUID_MCE)) return; + /* + * On AMD Family 10h processors, unless logging of level one TLB + * parity (L1TP) errors is disabled, enable the recommended workaround + * for Erratum 383. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && amd10h_L1TP) + workaround_erratum383 = 1; + if (cpu_feature & CPUID_MCA) { if (PCPU_GET(cpuid) == 0) mca_setup(); @@ -545,6 +563,19 @@ mca_init(void) /* Enable MCA features. */ wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE); + /* + * Disable logging of level one TLB parity (L1TP) errors by + * the data cache as an alternative workaround for AMD Family + * 10h Erratum 383. Unlike the recommended workaround, there + * is no performance penalty to this workaround. However, + * L1TP errors will go unreported. + */ + if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x10 && !amd10h_L1TP) { + mask = rdmsr(MSR_MC0_CTL_MASK); + if ((mask & (1UL << 5)) == 0) + wrmsr(MSR_MC0_CTL_MASK, mask | (1UL << 5)); + } for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) { /* By default enable logging of all errors. */ ctl = 0xffffffffffffffffUL; Modified: stable/7/sys/i386/i386/pmap.c ============================================================================== --- stable/7/sys/i386/i386/pmap.c Sat Apr 10 22:11:01 2010 (r206461) +++ stable/7/sys/i386/i386/pmap.c Sat Apr 10 22:24:03 2010 (r206462) @@ -5,7 +5,7 @@ * All rights reserved. * Copyright (c) 1994 David Greenman * All rights reserved. - * Copyright (c) 2005-2008 Alan L. Cox + * Copyright (c) 2005-2010 Alan L. Cox * All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -290,6 +290,7 @@ static void pmap_insert_pt_page(pmap_t p static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); +static void pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits); static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va); @@ -308,6 +309,9 @@ static void pmap_remove_entry(struct pma static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); +static void pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, + pd_entry_t newpde); +static void pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); @@ -392,6 +396,13 @@ pmap_bootstrap(vm_paddr_t firstaddr) kernel_pmap->pm_active = -1; /* don't allow deactivation */ TAILQ_INIT(&kernel_pmap->pm_pvchunk); LIST_INIT(&allpmaps); + + /* + * Request a spin mutex so that changes to allpmaps cannot be + * preempted by smp_rendezvous_cpus(). Otherwise, + * pmap_update_pde_kernel() could access allpmaps while it is + * being changed. + */ mtx_init(&allpmaps_lock, "allpmaps", NULL, MTX_SPIN); mtx_lock_spin(&allpmaps_lock); LIST_INSERT_HEAD(&allpmaps, kernel_pmap, pm_list); @@ -672,19 +683,21 @@ pmap_init(void) pv_entry_high_water = 9 * (pv_entry_max / 10); /* - * Disable large page mappings by default if the kernel is running in - * a virtual machine on an AMD Family 10h processor. This is a work- - * around for Erratum 383. + * If the kernel is running in a virtual machine on an AMD Family 10h + * processor, then it must assume that MCA is enabled by the virtual + * machine monitor. */ if (vm_guest == VM_GUEST_VM && cpu_vendor_id == CPU_VENDOR_AMD && CPUID_TO_FAMILY(cpu_id) == 0x10) - pg_ps_enabled = 0; + workaround_erratum383 = 1; /* - * Are large page mappings enabled? + * Are large page mappings supported and enabled? */ TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); - if (pg_ps_enabled) { + if (pseflag == 0) + pg_ps_enabled = 0; + else if (pg_ps_enabled) { KASSERT(MAXPAGESIZES > 1 && pagesizes[1] == 0, ("pmap_init: can't assign to pagesizes[1]")); pagesizes[1] = NBPDR; @@ -826,6 +839,69 @@ pmap_cache_bits(int mode, boolean_t is_p cache_bits |= PG_NC_PWT; return (cache_bits); } + +/* + * The caller is responsible for maintaining TLB consistency. + */ +static void +pmap_kenter_pde(vm_offset_t va, pd_entry_t newpde) +{ + pd_entry_t *pde; + pmap_t pmap; + boolean_t PTD_updated; + + PTD_updated = FALSE; + mtx_lock_spin(&allpmaps_lock); + LIST_FOREACH(pmap, &allpmaps, pm_list) { + if ((pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & + PG_FRAME)) + PTD_updated = TRUE; + pde = pmap_pde(pmap, va); + pde_store(pde, newpde); + } + mtx_unlock_spin(&allpmaps_lock); + KASSERT(PTD_updated, + ("pmap_kenter_pde: current page table is not in allpmaps")); +} + +/* + * After changing the page size for the specified virtual address in the page + * table, flush the corresponding entries from the processor's TLB. Only the + * calling processor's TLB is affected. + * + * The calling thread must be pinned to a processor. + */ +static void +pmap_update_pde_invalidate(vm_offset_t va, pd_entry_t newpde) +{ + u_long cr4; + + if ((newpde & PG_PS) == 0) + /* Demotion: flush a specific 2MB page mapping. */ + invlpg(va); + else if ((newpde & PG_G) == 0) + /* + * Promotion: flush every 4KB page mapping from the TLB + * because there are too many to flush individually. + */ + invltlb(); + else { + /* + * Promotion: flush every 4KB page mapping from the TLB, + * including any global (PG_G) mappings. + */ + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); + /* + * Although preemption at this point could be detrimental to + * performance, it would not lead to an error. PG_G is simply + * ignored if CR4.PGE is clear. Moreover, in case this block + * is re-entered, the load_cr4() either above or below will + * modify CR4.PGE flushing the TLB. + */ + load_cr4(cr4 | CR4_PGE); + } +} #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -922,6 +998,92 @@ pmap_invalidate_cache(void) smp_cache_flush(); sched_unpin(); } + +struct pde_action { + cpumask_t store; /* processor that updates the PDE */ + cpumask_t invalidate; /* processors that invalidate their TLB */ + vm_offset_t va; + pd_entry_t *pde; + pd_entry_t newpde; +}; + +static void +pmap_update_pde_kernel(void *arg) +{ + struct pde_action *act = arg; + pd_entry_t *pde; + pmap_t pmap; + + if (act->store == PCPU_GET(cpumask)) + /* + * Elsewhere, this operation requires allpmaps_lock for + * synchronization. Here, it does not because it is being + * performed in the context of an all_cpus rendezvous. + */ + LIST_FOREACH(pmap, &allpmaps, pm_list) { + pde = pmap_pde(pmap, act->va); + pde_store(pde, act->newpde); + } +} + +static void +pmap_update_pde_user(void *arg) +{ + struct pde_action *act = arg; + + if (act->store == PCPU_GET(cpumask)) + pde_store(act->pde, act->newpde); +} + +static void +pmap_update_pde_teardown(void *arg) +{ + struct pde_action *act = arg; + + if ((act->invalidate & PCPU_GET(cpumask)) != 0) + pmap_update_pde_invalidate(act->va, act->newpde); +} + +/* + * Change the page size for the specified virtual address in a way that + * prevents any possibility of the TLB ever having two entries that map the + * same virtual address using different page sizes. This is the recommended + * workaround for Erratum 383 on AMD Family 10h processors. It prevents a + * machine check exception for a TLB state that is improperly diagnosed as a + * hardware error. + */ +static void +pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) +{ + struct pde_action act; + cpumask_t active, cpumask; + + sched_pin(); + cpumask = PCPU_GET(cpumask); + if (pmap == kernel_pmap) + active = all_cpus; + else + active = pmap->pm_active; + if ((active & PCPU_GET(other_cpus)) != 0) { + act.store = cpumask; + act.invalidate = active; + act.va = va; + act.pde = pde; + act.newpde = newpde; + smp_rendezvous_cpus(cpumask | active, + smp_no_rendevous_barrier, pmap == kernel_pmap ? + pmap_update_pde_kernel : pmap_update_pde_user, + pmap_update_pde_teardown, &act); + } else { + if (pmap == kernel_pmap) + pmap_kenter_pde(va, newpde); + else + pde_store(pde, newpde); + if ((active & cpumask) != 0) + pmap_update_pde_invalidate(va, newpde); + } + sched_unpin(); +} #else /* !SMP */ /* * Normal, non-SMP, 486+ invalidation functions. @@ -959,6 +1121,18 @@ pmap_invalidate_cache(void) wbinvd(); } + +static void +pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) +{ + + if (pmap == kernel_pmap) + pmap_kenter_pde(va, newpde); + else + pde_store(pde, newpde); + if (pmap == kernel_pmap || pmap->pm_active) + pmap_update_pde_invalidate(va, newpde); +} #endif /* !SMP */ void @@ -1833,12 +2007,9 @@ SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTL void pmap_growkernel(vm_offset_t addr) { - struct pmap *pmap; vm_paddr_t ptppaddr; vm_page_t nkpg; pd_entry_t newpdir; - pt_entry_t *pde; - boolean_t updated_PTD; mtx_assert(&kernel_map->system_mtx, MA_OWNED); if (kernel_vm_end == 0) { @@ -1880,18 +2051,7 @@ pmap_growkernel(vm_offset_t addr) newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); pdir_pde(KPTD, kernel_vm_end) = pgeflag | newpdir; - updated_PTD = FALSE; - mtx_lock_spin(&allpmaps_lock); - LIST_FOREACH(pmap, &allpmaps, pm_list) { - if ((pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & - PG_FRAME)) - updated_PTD = TRUE; - pde = pmap_pde(pmap, kernel_vm_end); - pde_store(pde, newpdir); - } - mtx_unlock_spin(&allpmaps_lock); - KASSERT(updated_PTD, - ("pmap_growkernel: current page table is not in allpmaps")); + pmap_kenter_pde(kernel_vm_end, newpdir); kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; @@ -2335,7 +2495,6 @@ static boolean_t pmap_demote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) { pd_entry_t newpde, oldpde; - pmap_t allpmaps_entry; pt_entry_t *firstpte, newpte; vm_paddr_t mptepa; vm_page_t free, mpte; @@ -2441,25 +2600,11 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t * processor changing the setting of PG_A and/or PG_M between * the read above and the store below. */ - if (pmap == kernel_pmap) { - /* - * A harmless race exists between this loop and the bcopy() - * in pmap_pinit() that initializes the kernel segment of - * the new page table directory. Specifically, that bcopy() - * may copy the new PDE from the PTD to the new page table - * before this loop updates that new page table. - */ - mtx_lock_spin(&allpmaps_lock); - LIST_FOREACH(allpmaps_entry, &allpmaps, pm_list) { - pde = pmap_pde(allpmaps_entry, va); - KASSERT(*pde == newpde || (*pde & PG_PTE_PROMOTE) == - (oldpde & PG_PTE_PROMOTE), - ("pmap_demote_pde: pde was %#jx, expected %#jx", - (uintmax_t)*pde, (uintmax_t)oldpde)); - pde_store(pde, newpde); - } - mtx_unlock_spin(&allpmaps_lock); - } else + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, newpde); + else if (pmap == kernel_pmap) + pmap_kenter_pde(va, newpde); + else pde_store(pde, newpde); if (firstpte == PADDR2) mtx_unlock(&PMAP2mutex); @@ -2978,7 +3123,6 @@ static void pmap_promote_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) { pd_entry_t newpde; - pmap_t allpmaps_entry; pt_entry_t *firstpte, oldpte, pa, *pte; vm_offset_t oldpteva; vm_page_t mpte; @@ -3082,14 +3226,11 @@ setpte: /* * Map the superpage. */ - if (pmap == kernel_pmap) { - mtx_lock_spin(&allpmaps_lock); - LIST_FOREACH(allpmaps_entry, &allpmaps, pm_list) { - pde = pmap_pde(allpmaps_entry, va); - pde_store(pde, PG_PS | newpde); - } - mtx_unlock_spin(&allpmaps_lock); - } else + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, PG_PS | newpde); + else if (pmap == kernel_pmap) + pmap_kenter_pde(va, PG_PS | newpde); + else pde_store(pde, PG_PS | newpde); pmap_pde_promotions++; Modified: stable/7/sys/i386/include/md_var.h ============================================================================== --- stable/7/sys/i386/include/md_var.h Sat Apr 10 22:11:01 2010 (r206461) +++ stable/7/sys/i386/include/md_var.h Sat Apr 10 22:24:03 2010 (r206462) @@ -73,6 +73,7 @@ extern int szosigcode; #endif extern uint32_t *vm_page_dump; extern int vm_page_dump_size; +extern int workaround_erratum383; typedef void alias_for_inthand_t(u_int cs, u_int ef, u_int esp, u_int ss); struct thread; Modified: stable/7/sys/i386/include/specialreg.h ============================================================================== --- stable/7/sys/i386/include/specialreg.h Sat Apr 10 22:11:01 2010 (r206461) +++ stable/7/sys/i386/include/specialreg.h Sat Apr 10 22:24:03 2010 (r206462) @@ -544,6 +544,7 @@ /* AMD64 MSR's */ #define MSR_EFER 0xc0000080 /* extended features */ #define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ +#define MSR_MC0_CTL_MASK 0xc0010044 /* VIA ACE crypto featureset: for via_feature_rng */ #define VIA_HAS_RNG 1 /* cpu has RNG */