This commit is contained in:
attilio 2013-02-26 01:05:25 +00:00
commit 756a9b3e47
143 changed files with 16792 additions and 31134 deletions

View File

@ -1132,7 +1132,8 @@ _lex= usr.bin/lex
.endif
.if ${BOOTSTRAPPING} < 1000013
_yacc= usr.bin/yacc
_yacc= lib/liby \
usr.bin/yacc
.endif
.if ${BOOTSTRAPPING} < 1000026

View File

@ -169,15 +169,65 @@ True if
.Ar file
exists and is a socket.
.It Ar file1 Fl nt Ar file2
True if
True if both
.Ar file1
exists and is newer than
and
.Ar file2
exist and
.Ar file1
is newer than
.Ar file2 .
.It Ar file1 Fl nt Ns Ar X Ns Ar Y Ar file2
True if both
.Ar file1
and
.Ar file2
exist and
.Ar file1
has a more recent last access time
.Pq Ar X Ns = Ns Cm a ,
inode creation time
.Pq Ar X Ns = Ns Cm b ,
change time
.Pq Ar X Ns = Ns Cm c ,
or modification time
.Pq Ar X Ns = Ns Cm m
than the last access time
.Pq Ar Y Ns = Ns Cm a ,
inode creation time
.Pq Ar Y Ns = Ns Cm b ,
change time
.Pq Ar Y Ns = Ns Cm c ,
or modification time
.Pq Ar Y Ns = Ns Cm m
of
.Ar file2 .
Note that
.Ic -ntmm
is equivalent to
.Ic -nt .
.It Ar file1 Fl ot Ar file2
True if
True if both
.Ar file1
exists and is older than
and
.Ar file2
exist and
.Ar file1
is older than
.Ar file2 .
Note that
.Ar file1
.Ic -ot
.Ar file2
is equivalent to
.Ar file2
.Ic -nt
.Ar file1
.It Ar file1 Fl ot Ns Ar X Ns Ar Y Ar file2
Equivalent to
.Ar file2
.Ic -nt Ns Ar Y Ns Ar X
.Ar file1 .
.It Ar file1 Fl ef Ar file2
True if
.Ar file1

View File

@ -63,7 +63,7 @@ error(const char *msg, ...)
"-u"|"-g"|"-k"|"-s"|"-t"|"-z"|"-n"|"-o"|"-O"|"-G"|"-L"|"-S";
binary-operator ::= "="|"!="|"-eq"|"-ne"|"-ge"|"-gt"|"-le"|"-lt"|
"-nt"|"-ot"|"-ef";
"-nt"|"-nt[abcm][abcm]"|"-ot"|"-ot[abcm][abcm])"|"-ef";
operand ::= <any legal UNIX file name>
*/
@ -85,8 +85,38 @@ enum token {
FILSUID,
FILSGID,
FILSTCK,
FILNT,
FILOT,
FILNTAA,
FILNTAB,
FILNTAC,
FILNTAM,
FILNTBA,
FILNTBB,
FILNTBC,
FILNTBM,
FILNTCA,
FILNTCB,
FILNTCC,
FILNTCM,
FILNTMA,
FILNTMB,
FILNTMC,
FILNTMM,
FILOTAA,
FILOTAB,
FILOTAC,
FILOTAM,
FILOTBA,
FILOTBB,
FILOTBC,
FILOTBM,
FILOTCA,
FILOTCB,
FILOTCC,
FILOTCM,
FILOTMA,
FILOTMB,
FILOTMC,
FILOTMM,
FILEQ,
FILUID,
FILGID,
@ -118,9 +148,16 @@ enum token_types {
PAREN
};
enum time_types {
ATIME,
BTIME,
CTIME,
MTIME
};
static struct t_op {
char op_text[4];
short op_num, op_type;
char op_text[6];
char op_num, op_type;
} const ops [] = {
{"-r", FILRD, UNOP},
{"-w", FILWR, UNOP},
@ -154,8 +191,40 @@ static struct t_op {
{"-gt", INTGT, BINOP},
{"-le", INTLE, BINOP},
{"-lt", INTLT, BINOP},
{"-nt", FILNT, BINOP},
{"-ot", FILOT, BINOP},
{"-nt", FILNTMM, BINOP},
{"-ntaa", FILNTAA, BINOP},
{"-ntab", FILNTAB, BINOP},
{"-ntac", FILNTAC, BINOP},
{"-ntam", FILNTAM, BINOP},
{"-ntba", FILNTBA, BINOP},
{"-ntbb", FILNTBB, BINOP},
{"-ntbc", FILNTBC, BINOP},
{"-ntbm", FILNTBM, BINOP},
{"-ntca", FILNTCA, BINOP},
{"-ntcb", FILNTCB, BINOP},
{"-ntcc", FILNTCC, BINOP},
{"-ntcm", FILNTCM, BINOP},
{"-ntma", FILNTMA, BINOP},
{"-ntmb", FILNTMB, BINOP},
{"-ntmc", FILNTMC, BINOP},
{"-ntmm", FILNTMM, BINOP},
{"-ot", FILOTMM, BINOP},
{"-otaa", FILOTAA, BINOP},
{"-otab", FILOTBB, BINOP},
{"-otac", FILOTAC, BINOP},
{"-otam", FILOTAM, BINOP},
{"-otba", FILOTBA, BINOP},
{"-otbb", FILOTBB, BINOP},
{"-otbc", FILOTBC, BINOP},
{"-otbm", FILOTBM, BINOP},
{"-otca", FILOTCA, BINOP},
{"-otcb", FILOTCB, BINOP},
{"-otcc", FILOTCC, BINOP},
{"-otcm", FILOTCM, BINOP},
{"-otma", FILOTMA, BINOP},
{"-otmb", FILOTMB, BINOP},
{"-otmc", FILOTMC, BINOP},
{"-otmm", FILOTMM, BINOP},
{"-ef", FILEQ, BINOP},
{"!", UNOT, BUNOP},
{"-a", BAND, BBINOP},
@ -180,10 +249,10 @@ static int intcmp(const char *, const char *);
static int isunopoperand(void);
static int islparenoperand(void);
static int isrparenoperand(void);
static int newerf(const char *, const char *);
static int newerf(const char *, const char *, enum time_types,
enum time_types);
static int nexpr(enum token);
static int oexpr(enum token);
static int olderf(const char *, const char *);
static int primary(enum token);
static void syntax(const char *, const char *);
static enum token t_lex(char *);
@ -353,10 +422,70 @@ binop(void)
return intcmp(opnd1, opnd2) <= 0;
case INTLT:
return intcmp(opnd1, opnd2) < 0;
case FILNT:
return newerf (opnd1, opnd2);
case FILOT:
return olderf (opnd1, opnd2);
case FILNTAA:
return newerf(opnd1, opnd2, ATIME, ATIME);
case FILNTAB:
return newerf(opnd1, opnd2, ATIME, BTIME);
case FILNTAC:
return newerf(opnd1, opnd2, ATIME, CTIME);
case FILNTAM:
return newerf(opnd1, opnd2, ATIME, MTIME);
case FILNTBA:
return newerf(opnd1, opnd2, BTIME, ATIME);
case FILNTBB:
return newerf(opnd1, opnd2, BTIME, BTIME);
case FILNTBC:
return newerf(opnd1, opnd2, BTIME, CTIME);
case FILNTBM:
return newerf(opnd1, opnd2, BTIME, MTIME);
case FILNTCA:
return newerf(opnd1, opnd2, CTIME, ATIME);
case FILNTCB:
return newerf(opnd1, opnd2, CTIME, BTIME);
case FILNTCC:
return newerf(opnd1, opnd2, CTIME, CTIME);
case FILNTCM:
return newerf(opnd1, opnd2, CTIME, MTIME);
case FILNTMA:
return newerf(opnd1, opnd2, MTIME, ATIME);
case FILNTMB:
return newerf(opnd1, opnd2, MTIME, BTIME);
case FILNTMC:
return newerf(opnd1, opnd2, MTIME, CTIME);
case FILNTMM:
return newerf(opnd1, opnd2, MTIME, MTIME);
case FILOTAA:
return newerf(opnd2, opnd1, ATIME, ATIME);
case FILOTAB:
return newerf(opnd2, opnd1, BTIME, ATIME);
case FILOTAC:
return newerf(opnd2, opnd1, CTIME, ATIME);
case FILOTAM:
return newerf(opnd2, opnd1, MTIME, ATIME);
case FILOTBA:
return newerf(opnd2, opnd1, ATIME, BTIME);
case FILOTBB:
return newerf(opnd2, opnd1, BTIME, BTIME);
case FILOTBC:
return newerf(opnd2, opnd1, CTIME, BTIME);
case FILOTBM:
return newerf(opnd2, opnd1, MTIME, BTIME);
case FILOTCA:
return newerf(opnd2, opnd1, ATIME, CTIME);
case FILOTCB:
return newerf(opnd2, opnd1, BTIME, CTIME);
case FILOTCC:
return newerf(opnd2, opnd1, CTIME, CTIME);
case FILOTCM:
return newerf(opnd2, opnd1, MTIME, CTIME);
case FILOTMA:
return newerf(opnd2, opnd1, ATIME, MTIME);
case FILOTMB:
return newerf(opnd2, opnd1, BTIME, MTIME);
case FILOTMC:
return newerf(opnd2, opnd1, CTIME, MTIME);
case FILOTMM:
return newerf(opnd2, opnd1, MTIME, MTIME);
case FILEQ:
return equalf (opnd1, opnd2);
default:
@ -570,25 +699,34 @@ intcmp (const char *s1, const char *s2)
}
static int
newerf (const char *f1, const char *f2)
newerf (const char *f1, const char *f2, enum time_types t1, enum time_types t2)
{
struct stat b1, b2;
struct timespec *ts1, *ts2;
if (stat(f1, &b1) != 0 || stat(f2, &b2) != 0)
return 0;
if (b1.st_mtim.tv_sec > b2.st_mtim.tv_sec)
switch (t1) {
case ATIME: ts1 = &b1.st_atim; break;
case BTIME: ts1 = &b1.st_birthtim; break;
case CTIME: ts1 = &b1.st_ctim; break;
default: ts1 = &b1.st_mtim; break;
}
switch (t2) {
case ATIME: ts2 = &b2.st_atim; break;
case BTIME: ts2 = &b2.st_birthtim; break;
case CTIME: ts2 = &b2.st_ctim; break;
default: ts2 = &b2.st_mtim; break;
}
if (ts1->tv_sec > ts2->tv_sec)
return 1;
if (b1.st_mtim.tv_sec < b2.st_mtim.tv_sec)
if (ts1->tv_sec < ts2->tv_sec)
return 0;
return (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec);
}
static int
olderf (const char *f1, const char *f2)
{
return (newerf(f2, f1));
return (ts1->tv_nsec > ts2->tv_nsec);
}
static int

View File

@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
#include <libzfs.h>
@ -455,6 +456,20 @@ translate_device(const char *pool, const char *device, err_type_t label_type,
&record->zi_guid) == 0);
}
/*
* Device faults can take on three different forms:
* 1). delayed or hanging I/O
* 2). zfs label faults
* 3). generic disk faults
*/
if (record->zi_timer != 0) {
record->zi_cmd = ZINJECT_DELAY_IO;
} else if (label_type != TYPE_INVAL) {
record->zi_cmd = ZINJECT_LABEL_FAULT;
} else {
record->zi_cmd = ZINJECT_DEVICE_FAULT;
}
switch (label_type) {
case TYPE_LABEL_UBERBLOCK:
record->zi_start = offsetof(vdev_label_t, vl_uberblock[0]);

View File

@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
/*
@ -603,7 +604,7 @@ main(int argc, char **argv)
}
while ((c = getopt(argc, argv,
":aA:b:d:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:")) != -1) {
":aA:b:d:D:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:")) != -1) {
switch (c) {
case 'a':
flags |= ZINJECT_FLUSH_ARC;
@ -629,6 +630,15 @@ main(int argc, char **argv)
case 'd':
device = optarg;
break;
case 'D':
record.zi_timer = strtoull(optarg, &end, 10);
if (errno != 0 || *end != '\0') {
(void) fprintf(stderr, "invalid i/o delay "
"value: '%s'\n", optarg);
usage();
return (1);
}
break;
case 'e':
if (strcasecmp(optarg, "io") == 0) {
error = EIO;
@ -693,6 +703,7 @@ main(int argc, char **argv)
case 'p':
(void) strlcpy(record.zi_func, optarg,
sizeof (record.zi_func));
record.zi_cmd = ZINJECT_PANIC;
break;
case 'q':
quiet = 1;
@ -766,13 +777,15 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
if (record.zi_duration != 0)
record.zi_cmd = ZINJECT_IGNORED_WRITES;
if (cancel != NULL) {
/*
* '-c' is invalid with any other options.
*/
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
level != 0 || record.zi_func[0] != '\0' ||
record.zi_duration != 0) {
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED) {
(void) fprintf(stderr, "cancel (-c) incompatible with "
"any other options\n");
usage();
@ -804,8 +817,7 @@ main(int argc, char **argv)
* for doing injection, so handle it separately here.
*/
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
level != 0 || record.zi_func[0] != '\0' ||
record.zi_duration != 0) {
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED) {
(void) fprintf(stderr, "device (-d) incompatible with "
"data error injection\n");
usage();
@ -839,7 +851,7 @@ main(int argc, char **argv)
} else if (raw != NULL) {
if (range != NULL || type != TYPE_INVAL || level != 0 ||
record.zi_func[0] != '\0' || record.zi_duration != 0) {
record.zi_cmd != ZINJECT_UNINITIALIZED) {
(void) fprintf(stderr, "raw (-b) format with "
"any other options\n");
usage();
@ -862,13 +874,14 @@ main(int argc, char **argv)
return (1);
}
record.zi_cmd = ZINJECT_DATA_FAULT;
if (translate_raw(raw, &record) != 0)
return (1);
if (!error)
error = EIO;
} else if (record.zi_func[0] != '\0') {
} else if (record.zi_cmd == ZINJECT_PANIC) {
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
level != 0 || device != NULL || record.zi_duration != 0) {
level != 0 || device != NULL) {
(void) fprintf(stderr, "panic (-p) incompatible with "
"other options\n");
usage();
@ -886,7 +899,7 @@ main(int argc, char **argv)
if (argv[1] != NULL)
record.zi_type = atoi(argv[1]);
dataset[0] = '\0';
} else if (record.zi_duration != 0) {
} else if (record.zi_cmd == ZINJECT_IGNORED_WRITES) {
if (nowrites == 0) {
(void) fprintf(stderr, "-s or -g meaningless "
"without -I (ignore writes)\n");
@ -940,6 +953,7 @@ main(int argc, char **argv)
return (1);
}
record.zi_cmd = ZINJECT_DATA_FAULT;
if (translate_record(type, argv[0], range, level, &record, pool,
dataset) != 0)
return (1);

View File

@ -45,6 +45,9 @@ int aok;
uint64_t physmem;
vnode_t *rootdir = (vnode_t *)0xabcd1234;
char hw_serial[HW_HOSTID_LEN];
#ifdef illumos
kmutex_t cpu_lock;
#endif
struct utsname utsname = {
"userland", "libzpool", "1", "1", "na"
@ -842,6 +845,28 @@ ddi_strtoull(const char *str, char **nptr, int base, u_longlong_t *result)
return (0);
}
#ifdef illumos
/* ARGSUSED */
cyclic_id_t
cyclic_add(cyc_handler_t *hdlr, cyc_time_t *when)
{
return (1);
}
/* ARGSUSED */
void
cyclic_remove(cyclic_id_t id)
{
}
/* ARGSUSED */
int
cyclic_reprogram(cyclic_id_t id, hrtime_t expiration)
{
return (1);
}
#endif
/*
* =========================================================================
* kernel emulation setup & teardown
@ -875,6 +900,10 @@ kernel_init(int mode)
system_taskq_init();
#ifdef illumos
mutex_init(&cpu_lock, NULL, MUTEX_DEFAULT, NULL);
#endif
spa_init(mode);
}

View File

@ -457,6 +457,9 @@ extern vnode_t *rootdir;
extern void delay(clock_t ticks);
#define SEC_TO_TICK(sec) ((sec) * hz)
#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz))
#define gethrestime_sec() time(NULL)
#define gethrestime(t) \
do {\
@ -624,6 +627,36 @@ typedef uint32_t idmap_rid_t;
#define ERESTART (-1)
#endif
#ifdef illumos
/*
* Cyclic information
*/
extern kmutex_t cpu_lock;
typedef uintptr_t cyclic_id_t;
typedef uint16_t cyc_level_t;
typedef void (*cyc_func_t)(void *);
#define CY_LOW_LEVEL 0
#define CY_INFINITY INT64_MAX
#define CYCLIC_NONE ((cyclic_id_t)0)
typedef struct cyc_time {
hrtime_t cyt_when;
hrtime_t cyt_interval;
} cyc_time_t;
typedef struct cyc_handler {
cyc_func_t cyh_func;
void *cyh_arg;
cyc_level_t cyh_level;
} cyc_handler_t;
extern cyclic_id_t cyclic_add(cyc_handler_t *, cyc_time_t *);
extern void cyclic_remove(cyclic_id_t);
extern int cyclic_reprogram(cyclic_id_t, hrtime_t);
#endif /* illumos */
#ifdef __cplusplus
}
#endif

View File

@ -1,5 +1,41 @@
Release 2.1.0 Sat March 24 2012
- Bug Fixes:
#1742315: Harmful XML_ParserCreateNS suggestion.
#2895533: CVE-2012-1147 - Resource leak in readfilemap.c.
#1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3.
#1983953, 2517952, 2517962, 2649838:
Build modifications using autoreconf instead of buildconf.sh.
#2815947, #2884086: OBJEXT and EXEEXT support while building.
#1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences.
#2517938: xmlwf should return non-zero exit status if not well-formed.
#2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml.
#2855609: Dangling positionPtr after error.
#2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8().
#2958794: CVE-2012-1148 - Memory leak in poolGrow.
#2990652: CMake support.
#3010819: UNEXPECTED_STATE with a trailing "%" in entity value.
#3206497: Unitialized memory returned from XML_Parse.
#3287849: make check fails on mingw-w64.
#3496608: CVE-2012-0876 - Hash DOS attack.
- Patches:
#1749198: pkg-config support.
#3010222: Fix for bug #3010819.
#3312568: CMake support.
#3446384: Report byte offsets for attr names and values.
- New Features / API changes:
Added new API member XML_SetHashSalt() that allows setting an intial
value (salt) for hash calculations. This is part of the fix for
bug #3496608 to randomize hash parameters.
When compiled with XML_ATTR_INFO defined, adds new API member
XML_GetAttributeInfo() that allows retrieving the byte
offsets for attribute names and values (patch #3446384).
Added CMake build system.
See bug #2990652 and patch #3312568.
Added run-benchmark target to Makefile.in - relies on testdata module
present in the same relative location as in the repository.
Release 2.0.1 Tue June 5 2007
- Fixed bugs #1515266, 1515600: The character data handler's calling
- Fixed bugs #1515266, #1515600: The character data handler's calling
of XML_StopParser() was not handled properly; if the parser was
stopped and the handler set to NULL, the parser would segfault.
- Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed
@ -8,7 +44,7 @@ Release 2.0.1 Tue June 5 2007
- Fixed xmlwf bug #1513566: "out of memory" error on file size zero.
- Fixed outline.c bug #1543233: missing a final XML_ParserFree() call.
- Fixes and improvements for Windows platform:
bugs #1409451, #1476160, 1548182, 1602769, 1717322.
bugs #1409451, #1476160, #1548182, #1602769, #1717322.
- Build fixes for various platforms:
HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180.
All Unix: #1554618 (refreshed config.sub/config.guess).
@ -30,8 +66,8 @@ Release 2.0.0 Wed Jan 11 2006
byte indexes and line/column numbers.
- Updated to use libtool 1.5.22 (the most recent).
- Added support for AmigaOS.
- Some mostly minor bug fixes. SF issues include: 1006708,
1021776, 1023646, 1114960, 1156398, 1221160, 1271642.
- Some mostly minor bug fixes. SF issues include: #1006708,
#1021776, #1023646, #1114960, #1156398, #1221160, #1271642.
Release 1.95.8 Fri Jul 23 2004
- Major new feature: suspend/resume. Handlers can now request
@ -40,8 +76,8 @@ Release 1.95.8 Fri Jul 23 2004
documentation for more details.
- Some mostly minor bug fixes, but compilation should no
longer generate warnings on most platforms. SF issues
include: 827319, 840173, 846309, 888329, 896188, 923913,
928113, 961698, 985192.
include: #827319, #840173, #846309, #888329, #896188, #923913,
#928113, #961698, #985192.
Release 1.95.7 Mon Oct 20 2003
- Fixed enum XML_Status issue (reported on SourceForge many
@ -54,19 +90,19 @@ Release 1.95.7 Mon Oct 20 2003
- Improved ability to build without the configure-generated
expat_config.h header. This is useful for applications
which embed Expat rather than linking in the library.
- Fixed a variety of bugs: see SF issues 458907, 609603,
676844, 679754, 692878, 692964, 695401, 699323, 699487,
820946.
- Fixed a variety of bugs: see SF issues #458907, #609603,
#676844, #679754, #692878, #692964, #695401, #699323, #699487,
#820946.
- Improved hash table lookups.
- Added more regression tests and improved documentation.
Release 1.95.6 Tue Jan 28 2003
- Added XML_FreeContentModel().
- Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree().
- Fixed a variety of bugs: see SF issues 615606, 616863,
618199, 653180, 673791.
- Fixed a variety of bugs: see SF issues #615606, #616863,
#618199, #653180, #673791.
- Enhanced the regression test suite.
- Man page improvements: includes SF issue 632146.
- Man page improvements: includes SF issue #632146.
Release 1.95.5 Fri Sep 6 2002
- Added XML_UseForeignDTD() for improved SAX2 support.
@ -84,9 +120,9 @@ Release 1.95.5 Fri Sep 6 2002
- Reduced line-length for all source code and headers to be
no longer than 80 characters, to help with AS/400 support.
- Reduced memory copying during parsing (SF patch #600964).
- Fixed a variety of bugs: see SF issues 580793, 434664,
483514, 580503, 581069, 584041, 584183, 584832, 585537,
596555, 596678, 598352, 598944, 599715, 600479, 600971.
- Fixed a variety of bugs: see SF issues #580793, #434664,
#483514, #580503, #581069, #584041, #584183, #584832, #585537,
#596555, #596678, #598352, #598944, #599715, #600479, #600971.
Release 1.95.4 Fri Jul 12 2002
- Added support for VMS, contributed by Craig Berry. See
@ -95,14 +131,14 @@ Release 1.95.4 Fri Jul 12 2002
contributed by Thomas Wegner and Daryle Walker.
- Added Borland C++ Builder 5 / BCC 5.5 support, contributed
by Patrick McConnell (SF patch #538032).
- Fixed a variety of bugs: see SF issues 441449, 563184,
564342, 566334, 566901, 569461, 570263, 575168, 579196.
- Fixed a variety of bugs: see SF issues #441449, #563184,
#564342, #566334, #566901, #569461, #570263, #575168, #579196.
- Made skippedEntityHandler conform to SAX2 (see source comment)
- Re-implemented WFC: Entity Declared from XML 1.0 spec and
added a new error "entity declared in parameter entity":
see SF bug report 569461 and SF patch 578161
see SF bug report #569461 and SF patch #578161
- Re-implemented section 5.1 from XML 1.0 spec:
see SF bug report 570263 and SF patch 578161
see SF bug report #570263 and SF patch #578161
Release 1.95.3 Mon Jun 3 2002
- Added a project to the MSVC workspace to create a wchar_t
@ -114,9 +150,9 @@ Release 1.95.3 Mon Jun 3 2002
- Made the XML_UNICODE builds usable (thanks, Karl!).
- Allow xmlwf to read from standard input.
- Install a man page for xmlwf on Unix systems.
- Fixed many bugs; see SF bug reports 231864, 461380, 464837,
466885, 469226, 477667, 484419, 487840, 494749, 496505,
547350. Other bugs which we can't test as easily may also
- Fixed many bugs; see SF bug reports #231864, #461380, #464837,
#466885, #469226, #477667, #484419, #487840, #494749, #496505,
#547350. Other bugs which we can't test as easily may also
have been fixed, especially in the area of build support.
Release 1.95.2 Fri Jul 27 2001

View File

@ -0,0 +1,19 @@
# $FreeBSD$
*.MPW
*.cmake
*.def
*.dsp
*.dsw
*.m4
*.pc.in
*config.h
CMake*
Configure*
amiga
bcb5
configure
conftools
doc/valid-xhtml10.png
m4
vms
win32

View File

@ -1,111 +0,0 @@
$FreeBSD$
eXpat from www.libexpat.org
v2.0.1:
This directory contains the virgin sources for the import of the
expat XML processing library, trimmed of the bits realted to other
platforms (the trimmed contents are listed below).
Imported via:
1) Upacking sources
2) cd expat-2.0.1, remove the listed files below
3) cvs import -ko src/contrib/expat EXPAT v2_0_1
The docs say that I should add this FREEBSD-upgrade separately, as
a "cvs add / cvs ci" operation, which is what I have done (but it
differs from the processed used for the 1.95.5 import).
The following files/directories were removed from the distribution:
amiga/
amiga/Makefile
amiga/README.txt
amiga/expat.xml
amiga/expat_lib.c
amiga/expat_vectors.c
amiga/include
amiga/include/inline4
amiga/include/inline4/expat.h
amiga/include/interfaces
amiga/include/interfaces/expat.h
amiga/include/libraries
amiga/include/libraries/expat.h
amiga/include/proto
amiga/include/proto/expat.h
amiga/launch.c
amiga/stdlib.c
bcb5/
bcb5/README.txt
bcb5/all_projects.bpg
bcb5/elements.bpf
bcb5/elements.bpr
bcb5/elements.mak
bcb5/expat.bpf
bcb5/expat.bpr
bcb5/expat.mak
bcb5/expat_static.bpf
bcb5/expat_static.bpr
bcb5/expat_static.mak
bcb5/expatw.bpf
bcb5/expatw.bpr
bcb5/expatw.mak
bcb5/expatw_static.bpf
bcb5/expatw_static.bpr
bcb5/expatw_static.mak
bcb5/libexpat_mtd.def
bcb5/libexpatw_mtd.def
bcb5/makefile.mak
bcb5/outline.bpf
bcb5/outline.bpr
bcb5/outline.mak
bcb5/setup.bat
bcb5/xmlwf.bpf
bcb5/xmlwf.bpr
bcb5/xmlwf.mak
conftools/
conftools/PrintPath
conftools/ac_c_bigendian_cross.m4
conftools/config.guess
conftools/config.sub
conftools/expat.m4
conftools/get-version.sh
conftools/install-sh
conftools/libtool.m4
conftools/ltmain.sh
conftools/mkinstalldirs
examples/elements.dsp
examples/outline.dsp
expat.dsw
lib/Makefile.MPW
lib/amigaconfig.h
lib/expat.dsp
lib/expat_static.dsp
lib/expatw.dsp
lib/expatw_static.dsp
lib/libexpat.def
lib/libexpatw.def
lib/macconfig.h
vms/
vms/README.vms
vms/descrip.mms
vms/expat_config.h
win32/
win32/MANIFEST.txt
win32/README.txt
win32/expat.iss
xmlwf/xmlwf.dsp
v1.95.5:
Imported by:
tar zxvf expat-1.95.5.tar.gz
cd expat-1.95.5
rm -rf bcb5 win32 vms conftools doc/valid-xhtml10.png
vi FREEBSD-upgrade
cvs import -m "Virgin import (trimmed) of eXpat version 1.95.5" \
src/contrib/expat EXPAT v1_95_5
phk@FreeBSD.org

View File

@ -1,5 +1,8 @@
amiga/stdlib.c
amiga/launch.c
amiga/expat_68k.c
amiga/expat_68k.h
amiga/expat_68k_handler_stubs.c
amiga/expat_base.h
amiga/expat_vectors.c
amiga/expat_lib.c
amiga/expat.xml
@ -42,25 +45,35 @@ doc/style.css
doc/valid-xhtml10.png
doc/xmlwf.1
doc/xmlwf.sgml
CMakeLists.txt
CMake.README
COPYING
Changes
ConfigureChecks.cmake
MANIFEST
Makefile.in
README
configure
configure.in
expat_config.h.in
expat_config.h.cmake
expat.pc.in
expat.dsw
aclocal.m4
conftools/PrintPath
conftools/ac_c_bigendian_cross.m4
conftools/config.guess
conftools/config.sub
conftools/expat.m4
conftools/get-version.sh
conftools/install-sh
conftools/libtool.m4
conftools/ltmain.sh
conftools/mkinstalldirs
conftools/config.guess
conftools/config.sub
conftools/install-sh
conftools/ltmain.sh
m4/libtool.m4
m4/ltversion.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/lt~obsolete.m4
examples/elements.c
examples/elements.dsp
examples/outline.c

View File

@ -31,6 +31,7 @@ bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
man1dir = @mandir@/man1
pkgconfigdir = $(libdir)/pkgconfig
top_builddir = .
@ -46,18 +47,18 @@ LIBRARY = libexpat.la
DESTDIR = $(INSTALL_ROOT)
default: buildlib xmlwf/xmlwf
default: buildlib xmlwf/xmlwf@EXEEXT@
buildlib: $(LIBRARY)
buildlib: $(LIBRARY) expat.pc
all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline
all: $(LIBRARY) expat.pc xmlwf/xmlwf@EXEEXT@ examples/elements examples/outline
clean:
cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs
cd xmlwf && rm -f xmlwf *.o *.lo && rm -rf .libs _libs
cd examples && rm -f elements outline *.o *.lo && rm -rf .libs _libs
cd tests && rm -rf .libs runtests runtests.o runtestspp runtestspp.o
cd tests && rm -f chardata.o minicheck.o
cd lib && rm -f $(LIBRARY) *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd xmlwf && rm -f xmlwf *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd examples && rm -f elements outline *.@OBJEXT@ *.lo && rm -rf .libs _libs
cd tests && rm -rf .libs runtests runtests.@OBJEXT@ runtestspp runtestspp.@OBJEXT@
cd tests && rm -f chardata.@OBJEXT@ minicheck.@OBJEXT@
rm -rf .libs libexpat.la
rm -f examples/core tests/core xmlwf/core
@ -65,34 +66,37 @@ clobber: clean
distclean: clean
rm -f expat_config.h config.status config.log config.cache libtool
rm -f Makefile
rm -f Makefile expat.pc
extraclean: distclean
rm -f expat_config.h.in configure
rm -f conftools/ltconfig conftools/ltmain.sh conftools/libtool.m4
rm -f aclocal.m4 m4/*
rm -f conftools/ltmain.sh conftools/install-sh conftools/config.guess conftools/config.sub
check: tests/runtests tests/runtestspp
tests/runtests
tests/runtestspp
install: xmlwf/xmlwf installlib
install: xmlwf/xmlwf@EXEEXT@ installlib
$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf@EXEEXT@ $(DESTDIR)$(bindir)/xmlwf
$(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir)
installlib: $(LIBRARY) $(APIHEADER)
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
installlib: $(LIBRARY) $(APIHEADER) expat.pc
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir)
$(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY)
for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done
$(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc
uninstall: uninstalllib
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf@EXEEXT@
rm -f $(DESTDIR)$(man1dir)/xmlwf.1
uninstalllib:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY)
rm -f $(DESTDIR)$(includedir)/expat.h
rm -f $(DESTDIR)$(includedir)/expat_external.h
rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc
# for VPATH builds (invoked by configure)
mkdir-init:
@ -125,6 +129,9 @@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
$(LIBRARY): $(LIB_OBJS)
$(LINK_LIB) $(LIB_OBJS)
expat.pc: $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@
lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
@ -137,46 +144,53 @@ lib/xmltok.lo: lib/xmltok.c lib/xmltok_impl.c lib/xmltok_ns.c \
$(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h
XMLWF_OBJS = xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/@FILEMAP@.o
xmlwf/xmlwf.o: xmlwf/xmlwf.c
xmlwf/xmlfile.o: xmlwf/xmlfile.c
xmlwf/codepage.o: xmlwf/codepage.c
xmlwf/@FILEMAP@.o: xmlwf/@FILEMAP@.c
xmlwf/xmlwf: $(XMLWF_OBJS) $(LIBRARY)
XMLWF_OBJS = xmlwf/xmlwf.@OBJEXT@ xmlwf/xmlfile.@OBJEXT@ xmlwf/codepage.@OBJEXT@ xmlwf/@FILEMAP@.@OBJEXT@
xmlwf/xmlwf.@OBJEXT@: xmlwf/xmlwf.c
xmlwf/xmlfile.@OBJEXT@: xmlwf/xmlfile.c
xmlwf/codepage.@OBJEXT@: xmlwf/codepage.c
xmlwf/@FILEMAP@.@OBJEXT@: xmlwf/@FILEMAP@.c
xmlwf/xmlwf@EXEEXT@: $(XMLWF_OBJS) $(LIBRARY)
$(LINK_EXE) $(XMLWF_OBJS) $(LIBRARY)
examples/elements.o: examples/elements.c
examples/elements: examples/elements.o $(LIBRARY)
examples/elements.@OBJEXT@: examples/elements.c
examples/elements: examples/elements.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) $< $(LIBRARY)
examples/outline.o: examples/outline.c
examples/outline: examples/outline.o $(LIBRARY)
examples/outline.@OBJEXT@: examples/outline.c
examples/outline: examples/outline.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) $< $(LIBRARY)
tests/chardata.o: tests/chardata.c tests/chardata.h
tests/minicheck.o: tests/minicheck.c tests/minicheck.h
tests/runtests.o: tests/runtests.c tests/chardata.h
tests/runtests: tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
$(LINK_EXE) tests/runtests.o tests/chardata.o tests/minicheck.o $(LIBRARY)
tests/runtestspp.o: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
tests/runtestspp: tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
$(LINK_CXX_EXE) tests/runtestspp.o tests/chardata.o tests/minicheck.o $(LIBRARY)
tests/chardata.@OBJEXT@: tests/chardata.c tests/chardata.h
tests/minicheck.@OBJEXT@: tests/minicheck.c tests/minicheck.h
tests/runtests.@OBJEXT@: tests/runtests.c tests/chardata.h
tests/runtests: tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) tests/runtests.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
tests/runtestspp.@OBJEXT@: tests/runtestspp.cpp tests/runtests.c tests/chardata.h
tests/runtestspp: tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
$(LINK_CXX_EXE) tests/runtestspp.@OBJEXT@ tests/chardata.@OBJEXT@ tests/minicheck.@OBJEXT@ $(LIBRARY)
tests/benchmark/benchmark.@OBJEXT@: tests/benchmark/benchmark.c
tests/benchmark/benchmark: tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
$(LINK_EXE) tests/benchmark/benchmark.@OBJEXT@ $(LIBRARY)
run-benchmark: tests/benchmark/benchmark
tests/benchmark/benchmark@EXEEXT@ -n $(top_srcdir)/../testdata/largefiles/recset.xml 65535 3
tests/xmlts.zip:
wget --output-document=tests/xmlts.zip \
http://www.w3.org/XML/Test/xmlts20020606.zip
http://www.w3.org/XML/Test/xmlts20080827.zip
tests/XML-Test-Suite: tests/xmlts.zip
cd tests && unzip -q xmlts.zip
run-xmltest: xmlwf/xmlwf tests/XML-Test-Suite
run-xmltest: xmlwf/xmlwf@EXEEXT@ tests/XML-Test-Suite
tests/xmltest.sh
.SUFFIXES: .c .cpp .lo .o
.SUFFIXES: .c .cpp .lo .@OBJEXT@
.cpp.o:
.cpp.@OBJEXT@:
$(CXXCOMPILE) -o $@ -c $<
.c.o:
.c.@OBJEXT@:
$(COMPILE) -o $@ -c $<
.c.lo:
$(LTCOMPILE) -o $@ -c $<

View File

@ -1,5 +1,5 @@
Expat, Release 2.0.1
Expat, Release 2.1.0
This is Expat, a C library for parsing XML, written by James Clark.
Expat is a stream-oriented XML parser. This means that you register
@ -25,8 +25,7 @@ intended to be production grade software.
If you are building Expat from a check-out from the CVS repository,
you need to run a script that generates the configure script using the
GNU autoconf and libtool tools. To do this, you need to have
autoconf 2.52 or newer and libtool 1.4 or newer (1.5 or newer preferred).
Run the script like this:
autoconf 2.58 or newer. Run the script like this:
./buildconf.sh
@ -65,8 +64,8 @@ location. Have a look at the "Makefile" to learn about additional
the directories into which things will be installed.
If you are interested in building Expat to provide document
information in UTF-16 rather than the default UTF-8, follow these
instructions (after having run "make distclean"):
information in UTF-16 encoding rather than the default UTF-8, follow
these instructions (after having run "make distclean"):
1. For UTF-16 output as unsigned short (and version/error
strings as char), run:
@ -106,7 +105,10 @@ use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
environment, because variable-setting priority is
1) commandline
2) in-makefile
3) environment
3) environment
Note: This only applies to the Expat library itself, building UTF-16 versions
of xmlwf and the tests is currently not supported.
Note for Solaris users: The "ar" command is usually located in
"/usr/ccs/bin", which is not in the default PATH. You will need to

22017
contrib/expat/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -10,8 +10,8 @@ dnl under the terms of the License (based on the MIT/X license) contained
dnl in the file COPYING that comes with this distribution.
dnl
dnl Ensure that Expat is configured with autoconf 2.52 or newer
AC_PREREQ(2.52)
dnl Ensure that Expat is configured with autoconf 2.58 or newer
AC_PREREQ(2.58)
dnl Get the version number of Expat, using m4's esyscmd() command to run
dnl the command at m4-generation time. This allows us to create an m4
@ -25,12 +25,13 @@ dnl test. I believe this test will work, but I don't have a place with non-
dnl GNU M4 to test it right now.
define([expat_version], ifdef([__gnu__],
[esyscmd(conftools/get-version.sh lib/expat.h)],
[2.0.x]))
[2.1.x]))
AC_INIT(expat, expat_version, expat-bugs@libexpat.org)
undefine([expat_version])
AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_AUX_DIR(conftools)
AC_CONFIG_MACRO_DIR([m4])
dnl
@ -44,13 +45,12 @@ dnl
dnl If the API changes incompatibly set LIBAGE back to 0
dnl
LIBCURRENT=6
LIBREVISION=2
LIBAGE=5
LIBCURRENT=7
LIBREVISION=0
LIBAGE=6
AC_CONFIG_HEADER(expat_config.h)
sinclude(conftools/libtool.m4)
sinclude(conftools/ac_c_bigendian_cross.m4)
AC_LIBTOOL_WIN32_DLL
@ -62,6 +62,7 @@ AC_SUBST(LIBAGE)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
if test "$GCC" = yes ; then
@ -144,7 +145,7 @@ AC_DEFINE([XML_DTD], 1,
AC_DEFINE([XML_CONTEXT_BYTES], 1024,
[Define to specify how much context to retain around the current parse point.])
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES([Makefile expat.pc])
AC_OUTPUT
abs_srcdir="`cd $srcdir && pwd`"

View File

@ -129,8 +129,10 @@ interface.</p>
<li><a href="#XML_GetBase">XML_GetBase</a></li>
<li><a href="#XML_GetSpecifiedAttributeCount">XML_GetSpecifiedAttributeCount</a></li>
<li><a href="#XML_GetIdAttributeIndex">XML_GetIdAttributeIndex</a></li>
<li><a href="#XML_GetAttributeInfo">XML_GetAttributeInfo</a></li>
<li><a href="#XML_SetEncoding">XML_SetEncoding</a></li>
<li><a href="#XML_SetParamEntityParsing">XML_SetParamEntityParsing</a></li>
<li><a href="#XML_SetHashSalt">XML_SetHashSalt</a></li>
<li><a href="#XML_UseForeignDTD">XML_UseForeignDTD</a></li>
<li><a href="#XML_SetReturnNSTriplet">XML_SetReturnNSTriplet</a></li>
<li><a href="#XML_DefaultCurrent">XML_DefaultCurrent</a></li>
@ -369,6 +371,11 @@ footprint and can be faster.</dd>
statically with the code that calls it; this is required to get all
the right MSVC magic annotations correct. This is ignored on other
platforms.</dd>
<dt>XML_ATTR_INFO</dt>
<dd>If defined, makes the the additional function <code><a href=
"#XML_GetAttributeInfo" >XML_GetAttributeInfo</a></code> available
for reporting attribute byte offsets.</dd>
</dl>
<hr />
@ -917,12 +924,15 @@ XML_ParserCreateNS(const XML_Char *encoding,
Constructs a new parser that has namespace processing in effect. Namespace
expanded element names and attribute names are returned as a concatenation
of the namespace URI, <em>sep</em>, and the local part of the name. This
means that you should pick a character for <em>sep</em> that can't be
part of a legal URI. There is a special case when <em>sep</em> is the null
character <code>'\0'</code>: the namespace URI and the local part will be
concatenated without any separator - this is intended to support RDF processors.
It is a programming error to use the null separator with
<a href= "#XML_SetReturnNSTriplet">namespace triplets</a>.</div>
means that you should pick a character for <em>sep</em> that can't be part
of an URI. Since Expat does not check namespace URIs for conformance, the
only safe choice for a namespace separator is a character that is illegal
in XML. For instance, <code>'\xFF'</code> is not legal in UTF-8, and
<code>'\xFFFF'</code> is not legal in UTF-16. There is a special case when
<em>sep</em> is the null character <code>'\0'</code>: the namespace URI and
the local part will be concatenated without any separator - this is intended
to support RDF processors. It is a programming error to use the null separator
with <a href= "#XML_SetReturnNSTriplet">namespace triplets</a>.</div>
<pre class="fcndec" id="XML_ParserCreate_MM">
XML_Parser XMLCALL
@ -2074,6 +2084,27 @@ attribute. If called inside a start handler, then that means the
current call.
</div>
<pre class="fcndec" id="XML_GetAttributeInfo">
const XML_AttrInfo * XMLCALL
XML_GetAttributeInfo(XML_Parser parser);
</pre>
<pre class="signature">
typedef struct {
XML_Index nameStart; /* Offset to beginning of the attribute name. */
XML_Index nameEnd; /* Offset after the attribute name's last byte. */
XML_Index valueStart; /* Offset to beginning of the attribute value. */
XML_Index valueEnd; /* Offset after the attribute value's last byte. */
} XML_AttrInfo;
</pre>
<div class="fcndef">
Returns an array of <code>XML_AttrInfo</code> structures for the
attribute/value pairs passed in the last call to the
<code>XML_StartElementHandler</code> that were specified
in the start-tag rather than defaulted. Each attribute/value pair counts
as 1; thus the number of entries in the array is
<code>XML_GetSpecifiedAttributeCount(parser) / 2</code>.
</div>
<pre class="fcndec" id="XML_SetEncoding">
enum XML_Status XMLCALL
XML_SetEncoding(XML_Parser p,
@ -2104,6 +2135,24 @@ The choices for <code>code</code> are:
<li><code>XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE</code></li>
<li><code>XML_PARAM_ENTITY_PARSING_ALWAYS</code></li>
</ul>
<b>Note:</b> If <code>XML_SetParamEntityParsing</code> is called after
<code>XML_Parse</code> or <code>XML_ParseBuffer</code>, then it has
no effect and will always return 0.
</div>
<pre class="fcndec" id="XML_SetHashSalt">
int XMLCALL
XML_SetHashSalt(XML_Parser p,
unsigned long hash_salt);
</pre>
<div class="fcndef">
Sets the hash salt to use for internal hash calculations.
Helps in preventing DoS attacks based on predicting hash
function behavior. In order to have an effect this must be called
before parsing has started. Returns 1 if successful, 0 when called
after <code>XML_Parse</code> or <code>XML_ParseBuffer</code>.
<p><b>Note:</b> This call is optional, as the parser will auto-generate a new
random salt value if no value has been set at the start of parsing.</p>
</div>
<pre class="fcndec" id="XML_UseForeignDTD">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -388,11 +388,6 @@ supports both.
<refsect1>
<title>BUGS</title>
<para>
According to the W3C standard, an XML file without a
declaration at the beginning is not considered well-formed.
However, <command>&dhpackage;</command> allows this to pass.
</para>
<para>
<command>&dhpackage;</command> returns a 0 - noerr result,
even if the file is not well-formed. There is no good way for

View File

@ -39,6 +39,9 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@ -48,6 +51,10 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
@ -60,6 +67,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@ -85,8 +95,8 @@
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `long' if <sys/types.h> does not define. */
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t

View File

@ -742,6 +742,29 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
XMLPARSEAPI(int)
XML_GetIdAttributeIndex(XML_Parser parser);
#ifdef XML_ATTR_INFO
/* Source file byte offsets for the start and end of attribute names and values.
The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
file an attribute value of "blah" will yield:
info->valueEnd - info->valueStart = 4 bytes.
*/
typedef struct {
XML_Index nameStart; /* Offset to beginning of the attribute name. */
XML_Index nameEnd; /* Offset after the attribute name's last byte. */
XML_Index valueStart; /* Offset to beginning of the attribute value. */
XML_Index valueEnd; /* Offset after the attribute value's last byte. */
} XML_AttrInfo;
/* Returns an array of XML_AttrInfo structures for the attribute/value pairs
passed in last call to the XML_StartElementHandler that were specified
in the start-tag rather than defaulted. Each attribute/value pair counts
as 1; thus the number of entries in the array is
XML_GetSpecifiedAttributeCount(parser) / 2.
*/
XMLPARSEAPI(const XML_AttrInfo *)
XML_GetAttributeInfo(XML_Parser parser);
#endif
/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
detected. The last call to XML_Parse must have isFinal true; len
may be zero for this call (or any other).
@ -883,6 +906,15 @@ XMLPARSEAPI(int)
XML_SetParamEntityParsing(XML_Parser parser,
enum XML_ParamEntityParsing parsing);
/* Sets the hash salt to use for internal hash calculations.
Helps in preventing DoS attacks based on predicting hash
function behavior. This must be called before parsing is started.
Returns 1 if successful, 0 when called after parsing has started.
*/
XMLPARSEAPI(int)
XML_SetHashSalt(XML_Parser parser,
unsigned long hash_salt);
/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
XML_GetErrorCode returns information about the error.
*/
@ -984,7 +1016,8 @@ enum XML_FeatureEnum {
XML_FEATURE_SIZEOF_XML_CHAR,
XML_FEATURE_SIZEOF_XML_LCHAR,
XML_FEATURE_NS,
XML_FEATURE_LARGE_SIZE
XML_FEATURE_LARGE_SIZE,
XML_FEATURE_ATTR_INFO
/* Additional features must be added to the end of this enum. */
};
@ -1004,8 +1037,8 @@ XML_GetFeatureList(void);
change to major or minor version.
*/
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 0
#define XML_MICRO_VERSION 1
#define XML_MINOR_VERSION 1
#define XML_MICRO_VERSION 0
#ifdef __cplusplus
}

View File

@ -1,30 +0,0 @@
/*================================================================
** Copyright 2000, Clark Cooper
** All rights reserved.
**
** This is free software. You are permitted to copy, distribute, or modify
** it under the terms of the MIT/X license (contained in the COPYING file
** with this distribution.)
*/
#ifndef WINCONFIG_H
#define WINCONFIG_H
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#include <memory.h>
#include <string.h>
#define XML_NS 1
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
/* we will assume all Windows platforms are little endian */
#define BYTEORDER 1234
/* Windows has memmove() available. */
#define HAVE_MEMMOVE
#endif /* ndef WINCONFIG_H */

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos4__)
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"

View File

@ -8,7 +8,7 @@
#include "winconfig.h"
#elif defined(MACOS_CLASSIC)
#include "macconfig.h"
#elif defined(__amigaos4__)
#elif defined(__amigaos__)
#include "amigaconfig.h"
#elif defined(__WATCOMC__)
#include "watcomconfig.h"
@ -1345,7 +1345,7 @@ unknown_toUtf16(const ENCODING *enc,
ENCODING *
XmlInitUnknownEncoding(void *mem,
int *table,
CONVERTER convert,
CONVERTER convert,
void *userData)
{
int i;
@ -1639,7 +1639,7 @@ initScan(const ENCODING * const *encodingTable,
ENCODING *
XmlInitUnknownEncodingNS(void *mem,
int *table,
CONVERTER convert,
CONVERTER convert,
void *userData)
{
ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData);

View File

@ -885,7 +885,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
if (ptr == end)
return -XML_TOK_PERCENT;
return XML_TOK_PARTIAL;
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_S: case BT_LF: case BT_CR: case BT_PERCNT:

View File

@ -8,7 +8,6 @@ unit testing framework for C. More information on Check can be found at:
http://check.sourceforge.net/
Expat must be built and installed before "make check" can be executed.
Expat must be built and, depending on platform, must be installed, before "make check" can be executed.
Since both Check and this test suite are young, it can all change in a
later version.
This test suite can all change in a later version.

View File

@ -1,88 +0,0 @@
# Microsoft Developer Studio Project File - Name="benchmark" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=benchmark - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "benchmark.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "benchmark.mak" CFG="benchmark - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "benchmark - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "benchmark - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "benchmark - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x1009 /d "NDEBUG"
# ADD RSC /l 0x1009 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "benchmark - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x1009 /d "_DEBUG"
# ADD RSC /l 0x1009 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "benchmark - Win32 Release"
# Name "benchmark - Win32 Debug"
# Begin Source File
SOURCE=.\benchmark.c
# End Source File
# End Target
# End Project

View File

@ -1,44 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "benchmark"=.\benchmark.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name expat
End Project Dependency
}}}
###############################################################################
Project: "expat"=..\..\lib\expat.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -18,10 +18,11 @@ extern "C" {
#define CK_NORMAL 1
#define CK_VERBOSE 2
/* Workaround for Tru64 Unix systems where the C compiler has a working
__func__, but the C++ compiler only has a working __FUNCTION__. This
could be fixed in configure.in, but it's not worth it right now. */
#if defined(__osf__) && defined(__cplusplus)
/* Workaround for Microsoft's compiler and Tru64 Unix systems where the
C compiler has a working __func__, but the C++ compiler only has a
working __FUNCTION__. This could be fixed in configure.in, but it's
not worth it right now. */
#if defined (_MSC_VER) || (defined(__osf__) && defined(__cplusplus))
#define __func__ __FUNCTION__
#endif

View File

@ -12,6 +12,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include "expat.h"
#include "chardata.h"
@ -1254,7 +1255,7 @@ external_entity_handler(XML_Parser parser,
const XML_Char *systemId,
const XML_Char *publicId)
{
long callno = 1 + (long)XML_GetUserData(parser);
intptr_t callno = 1 + (intptr_t)XML_GetUserData(parser);
char *text;
XML_Parser p2;

View File

@ -6,7 +6,7 @@
# w3c.org xml test suite, available from
# http://www.w3.org/XML/Test/xmlts20020606.zip.
# To run this script, first set XMLWF so that xmlwf can be
# To run this script, first set XMLWF below so that xmlwf can be
# found, then set the output directory with OUTPUT.
# The script lists all test cases where Expat shows a discrepancy
@ -39,7 +39,7 @@ RunXmlwfNotWF() {
$XMLWF -p "$file" > outfile || return $?
read outdata < outfile
if test "$outdata" = "" ; then
echo "Expected well-formed: $reldir$file"
echo "Expected not well-formed: $reldir$file"
return 1
else
return 0
@ -55,7 +55,7 @@ RunXmlwfWF() {
read outdata < outfile
if test "$outdata" = "" ; then
if [ -f "out/$file" ] ; then
diff "$OUTPUT$reldir$file" "out/$file" > outfile
diff -u "$OUTPUT$reldir$file" "out/$file" > outfile
if [ -s outfile ] ; then
cp outfile "$OUTPUT$reldir$file.diff"
echo "Output differs: $reldir$file"
@ -117,6 +117,7 @@ rm outfile
cd "$TS/xmlconf"
for xmldir in ibm/not-wf/P* \
ibm/not-wf/p28a \
ibm/not-wf/misc \
xmltest/not-wf/ext-sa \
xmltest/not-wf/not-sa \

View File

@ -58,10 +58,12 @@ filemap(const char *name,
}
if (fstat(fd, &sb) < 0) {
perror(name);
close(fd);
return 0;
}
if (!S_ISREG(sb.st_mode)) {
fprintf(stderr, "%s: not a regular file\n", name);
close(fd);
return 0;
}
nbytes = sb.st_size;

View File

@ -849,8 +849,10 @@ tmain(int argc, XML_Char **argv)
if (outputType == 'm')
metaEndDocument(parser);
fclose(fp);
if (!result)
if (!result) {
tremove(outName);
exit(2);
}
free(outName);
}
XML_ParserFree(parser);

View File

@ -46,6 +46,8 @@ rtadvd_precmd()
fi
done
;;
[Nn][Oo][Nn][Ee])
;;
*)
command_args="${rtadvd_interfaces}"
;;

View File

@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
#include "gen-private.h"
#include "telldir.h"
static DIR * __opendir_common(int, const char *, int);
static DIR * __opendir_common(int, int);
/*
* Open a directory.
@ -78,7 +78,7 @@ fdopendir(int fd)
}
if (_fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
return (NULL);
return (__opendir_common(fd, NULL, DTF_HIDEW|DTF_NODUP));
return (__opendir_common(fd, DTF_HIDEW|DTF_NODUP));
}
DIR *
@ -92,7 +92,7 @@ __opendir2(const char *name, int flags)
O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC)) == -1)
return (NULL);
dir = __opendir_common(fd, name, flags);
dir = __opendir_common(fd, flags);
if (dir == NULL) {
saved_errno = errno;
_close(fd);
@ -113,7 +113,7 @@ opendir_compar(const void *p1, const void *p2)
* Common routine for opendir(3), __opendir2(3) and fdopendir(3).
*/
static DIR *
__opendir_common(int fd, const char *name, int flags)
__opendir_common(int fd, int flags)
{
DIR *dirp;
int incr;
@ -121,6 +121,8 @@ __opendir_common(int fd, const char *name, int flags)
int unionstack;
int fd2;
fd2 = -1;
if ((dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL)
return (NULL);
@ -165,7 +167,22 @@ __opendir_common(int fd, const char *name, int flags)
* entries into a buffer, sort the buffer, and
* remove duplicate entries by setting the inode
* number to zero.
*
* We reopen the directory because _getdirentries()
* on a MNT_UNION mount modifies the open directory,
* making it refer to the lower directory after the
* upper directory's entries are exhausted.
* This would otherwise break software that uses
* the directory descriptor for fchdir or *at
* functions, such as fts.c.
*/
if ((fd2 = _openat(fd, ".", O_RDONLY | O_CLOEXEC)) == -1) {
saved_errno = errno;
free(buf);
free(dirp);
errno = saved_errno;
return (NULL);
}
do {
/*
@ -181,7 +198,7 @@ __opendir_common(int fd, const char *name, int flags)
ddptr = buf + (len - space);
}
n = _getdirentries(fd, ddptr, space, &dirp->dd_seek);
n = _getdirentries(fd2, ddptr, space, &dirp->dd_seek);
if (n > 0) {
ddptr += n;
space -= n;
@ -191,25 +208,8 @@ __opendir_common(int fd, const char *name, int flags)
ddeptr = ddptr;
flags |= __DTF_READALL;
/*
* Re-open the directory.
* This has the effect of rewinding back to the
* top of the union stack and is needed by
* programs which plan to fchdir to a descriptor
* which has also been read -- see fts.c.
*/
if (flags & DTF_REWIND) {
if ((fd2 = _open(name, O_RDONLY | O_DIRECTORY |
O_CLOEXEC)) == -1) {
saved_errno = errno;
free(buf);
free(dirp);
errno = saved_errno;
return (NULL);
}
(void)_dup2(fd2, fd);
_close(fd2);
}
_close(fd2);
fd2 = -1;
/*
* There is now a buffer full of (possibly) duplicate
@ -293,7 +293,6 @@ __opendir_common(int fd, const char *name, int flags)
if (dirp->dd_buf == NULL)
goto fail;
dirp->dd_seek = 0;
flags &= ~DTF_REWIND;
}
dirp->dd_loc = 0;
@ -310,6 +309,8 @@ __opendir_common(int fd, const char *name, int flags)
fail:
saved_errno = errno;
if (fd2 != -1)
_close(fd2);
free(dirp);
errno = saved_errno;
return (NULL);

View File

@ -45,6 +45,9 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
@ -54,20 +57,27 @@
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "expat-bugs@mail.libexpat.org"
#define PACKAGE_BUGREPORT "expat-bugs@libexpat.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "expat"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "expat 1.95.5"
#define PACKAGE_STRING "expat 2.1.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "expat"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.95.5"
#define PACKAGE_VERSION "2.1.0"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
@ -89,11 +99,14 @@
/* Define to make XML Namespaces functionality available. */
#define XML_NS 1
/* Define to __FUNCTION__ or "" if `__func__' does not conform to ANSI C. */
/* #undef __func__ */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `long' if <sys/types.h> does not define. */
/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

View File

@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"/
.Dd December 12, 2009
.Dd February 26, 2013
.Dt LIBBSDXML 3
.Os
.Sh NAME
@ -36,7 +36,7 @@
.Sh DESCRIPTION
The
.Nm
library is a verbatim copy of the eXpat XML library version 2.0.1.
library is a verbatim copy of the eXpat XML library version 2.1.0.
.Pp
The
.Nm

View File

@ -448,8 +448,8 @@ static void printIOstats(void)
clock_gettime(CLOCK_REALTIME_PRECISE, &finishpass);
timespecsub(&finishpass, &startpass);
printf("Running time: %ld msec\n",
finishpass.tv_sec * 1000 + finishpass.tv_nsec / 1000000);
msec = finishpass.tv_sec * 1000 + finishpass.tv_nsec / 1000000;
printf("Running time: %lld msec\n", msec);
printf("buffer reads by type:\n");
for (totalmsec = 0, i = 0; i < BT_NUMBUFTYPES; i++)
totalmsec += readtime[i].tv_sec * 1000 +

View File

@ -239,11 +239,11 @@ printindir(ufs2_daddr_t blk, int level, char *bufp)
/* for the final indirect level, don't use the cache */
bp = &buf;
bp->b_un.b_buf = bufp;
initbarea(bp);
initbarea(bp, BT_UNKNOWN);
getblk(bp, blk, sblock.fs_bsize);
} else
bp = getdatablk(blk, sblock.fs_bsize);
bp = getdatablk(blk, sblock.fs_bsize, BT_UNKNOWN);
cpl = charsperline();
for (i = charssofar = 0; i < NINDIR(&sblock); i++) {

View File

@ -351,6 +351,12 @@ control_status(struct nv *nv)
(uint64_t)nv_get_uint64(nv, "stat_flush%u", ii));
printf(" activemap updates: %ju\n",
(uint64_t)nv_get_uint64(nv, "stat_activemap_update%u", ii));
printf(" local errors: "
"read: %ju, write: %ju, delete: %ju, flush: %ju\n",
(uintmax_t)nv_get_uint64(nv, "stat_read_error%u", ii),
(uintmax_t)nv_get_uint64(nv, "stat_write_error%u", ii),
(uintmax_t)nv_get_uint64(nv, "stat_delete_error%u", ii),
(uintmax_t)nv_get_uint64(nv, "stat_flush_error%u", ii));
}
return (ret);
}

View File

@ -207,6 +207,14 @@ control_status_worker(struct hast_resource *res, struct nv *nvout,
"stat_flush%u", no);
nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_activemap_update"),
"stat_activemap_update%u", no);
nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_read_error"),
"stat_read_error%u", no);
nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_write_error"),
"stat_write_error%u", no);
nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_delete_error"),
"stat_delete_error%u", no);
nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_flush_error"),
"stat_flush_error%u", no);
end:
if (cnvin != NULL)
nv_free(cnvin);
@ -459,6 +467,16 @@ ctrl_thread(void *arg)
nv_add_uint64(nvout, res->hr_stat_flush, "stat_flush");
nv_add_uint64(nvout, res->hr_stat_activemap_update,
"stat_activemap_update");
nv_add_uint64(nvout, res->hr_stat_read_error,
"stat_read_error");
nv_add_uint64(nvout, res->hr_stat_write_error +
res->hr_stat_activemap_write_error,
"stat_write_error");
nv_add_uint64(nvout, res->hr_stat_delete_error,
"stat_delete_error");
nv_add_uint64(nvout, res->hr_stat_flush_error +
res->hr_stat_activemap_flush_error,
"stat_flush_error");
nv_add_int16(nvout, 0, "error");
break;
case CONTROL_RELOAD:

View File

@ -239,6 +239,18 @@ struct hast_resource {
uint64_t hr_stat_flush;
/* Number of activemap updates. */
uint64_t hr_stat_activemap_update;
/* Number of local read errors. */
uint64_t hr_stat_read_error;
/* Number of local write errors. */
uint64_t hr_stat_write_error;
/* Number of local delete errors. */
uint64_t hr_stat_delete_error;
/* Number of flush errors. */
uint64_t hr_stat_flush_error;
/* Number of activemap write errors. */
uint64_t hr_stat_activemap_write_error;
/* Number of activemap flush errors. */
uint64_t hr_stat_activemap_flush_error;
/* Next resource. */
TAILQ_ENTRY(hast_resource) hr_next;

View File

@ -303,6 +303,7 @@ hast_activemap_flush(struct hast_resource *res)
if (pwrite(res->hr_localfd, buf, size, METADATA_SIZE) !=
(ssize_t)size) {
pjdlog_errno(LOG_ERR, "Unable to flush activemap to disk");
res->hr_stat_activemap_write_error++;
return (-1);
}
if (res->hr_metaflush == 1 && g_flush(res->hr_localfd) == -1) {
@ -313,6 +314,7 @@ hast_activemap_flush(struct hast_resource *res)
} else {
pjdlog_errno(LOG_ERR,
"Unable to flush disk cache on activemap update");
res->hr_stat_activemap_flush_error++;
return (-1);
}
}
@ -1936,6 +1938,22 @@ ggate_send_thread(void *arg)
"G_GATE_CMD_DONE failed");
}
}
if (hio->hio_errors[0]) {
switch (ggio->gctl_cmd) {
case BIO_READ:
res->hr_stat_read_error++;
break;
case BIO_WRITE:
res->hr_stat_write_error++;
break;
case BIO_DELETE:
res->hr_stat_delete_error++;
break;
case BIO_FLUSH:
res->hr_stat_flush_error++;
break;
}
}
pjdlog_debug(2,
"ggate_send: (%p) Moving request to the free queue.", hio);
QUEUE_INSERT2(hio, free);

View File

@ -765,6 +765,7 @@ disk_thread(void *arg)
pjdlog_errno(LOG_WARNING,
"Unable to store cleared activemap");
free(map);
res->hr_stat_activemap_write_error++;
break;
}
free(map);
@ -883,8 +884,23 @@ send_thread(void *arg)
PJDLOG_ABORT("Unexpected command (cmd=%hhu).",
hio->hio_cmd);
}
if (hio->hio_error != 0)
if (hio->hio_error != 0) {
switch (hio->hio_cmd) {
case HIO_READ:
res->hr_stat_read_error++;
break;
case HIO_WRITE:
res->hr_stat_write_error++;
break;
case HIO_DELETE:
res->hr_stat_delete_error++;
break;
case HIO_FLUSH:
res->hr_stat_flush_error++;
break;
}
nv_add_int16(nvout, hio->hio_error, "error");
}
if (hast_proto_send(res, res->hr_remoteout, nvout, data,
length) == -1) {
secondary_exit(EX_TEMPFAIL, "Unable to send reply");

View File

@ -281,7 +281,7 @@ ti_gpio_pin_max(device_t dev, int *maxpin)
banks++;
}
*maxpin = (banks * PINS_PER_BANK);
*maxpin = (banks * PINS_PER_BANK) - 1;
TI_GPIO_UNLOCK(sc);
@ -315,7 +315,7 @@ ti_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps)
TI_GPIO_LOCK(sc);
/* Sanity check the pin number is valid */
if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@ -353,7 +353,7 @@ ti_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags)
TI_GPIO_LOCK(sc);
/* Sanity check the pin number is valid */
if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@ -390,7 +390,7 @@ ti_gpio_pin_getname(device_t dev, uint32_t pin, char *name)
TI_GPIO_LOCK(sc);
/* Sanity check the pin number is valid */
if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@ -445,7 +445,7 @@ ti_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags)
TI_GPIO_LOCK(sc);
/* Sanity check the pin number is valid */
if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@ -494,7 +494,7 @@ ti_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value)
TI_GPIO_LOCK(sc);
/* Sanity check the pin number is valid */
if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@ -533,7 +533,7 @@ ti_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value)
TI_GPIO_LOCK(sc);
/* Sanity check the pin number is valid */
if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@ -541,13 +541,11 @@ ti_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value)
/* Sanity check the pin is not configured as an output */
val = ti_gpio_read_4(sc, bank, TI_GPIO_OE);
if ((val & mask) == mask) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
/* Read the value on the pin */
*value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAIN) & mask) ? 1 : 0;
if (val & mask)
*value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAOUT) & mask) ? 1 : 0;
else
*value = (ti_gpio_read_4(sc, bank, TI_GPIO_DATAIN) & mask) ? 1 : 0;
TI_GPIO_UNLOCK(sc);
@ -577,7 +575,7 @@ ti_gpio_pin_toggle(device_t dev, uint32_t pin)
TI_GPIO_LOCK(sc);
/* Sanity check the pin number is valid */
if ((bank > MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
if ((bank >= MAX_GPIO_BANKS) || (sc->sc_mem_res[bank] == NULL)) {
TI_GPIO_UNLOCK(sc);
return (EINVAL);
}
@ -728,6 +726,7 @@ ti_gpio_attach(device_t dev)
/* Finish of the probe call */
device_add_child(dev, "gpioc", device_get_unit(dev));
device_add_child(dev, "gpiobus", device_get_unit(dev));
return (bus_generic_attach(dev));
}

View File

@ -237,8 +237,6 @@ void file_discard(struct preloaded_file *fp);
void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p);
int file_addmodule(struct preloaded_file *fp, char *modname, int version,
struct kernel_module **newmp);
/* Load from a buffer in memory. */
struct preloaded_file *mem_load_raw(char *type, char *name, const void *p, size_t len);
/* MI module loaders */
#ifdef __elfN

View File

@ -421,42 +421,6 @@ file_loadraw(char *type, char *name)
return(CMD_OK);
}
/*
* Load a chunk of data as if it had been read from a file.
*/
struct preloaded_file *
mem_load_raw(char *type, char *name, const void *p, size_t len)
{
struct preloaded_file *fp;
/* We can't load first */
if ((file_findfile(NULL, NULL)) == NULL) {
command_errmsg = "can't load file before kernel";
return(NULL);
}
if (archsw.arch_loadaddr != NULL)
loadaddr = archsw.arch_loadaddr(LOAD_RAW, name, loadaddr);
archsw.arch_copyin(p, loadaddr, len);
/* Looks OK so far; create & populate control structure */
fp = file_alloc();
fp->f_name = strdup(name);
fp->f_type = strdup(type);
fp->f_args = NULL;
fp->f_metadata = NULL;
fp->f_loader = -1;
fp->f_addr = loadaddr;
fp->f_size = len;
/* recognise space consumption */
loadaddr += len;
/* Add to the list of loaded files */
file_insert_tail(fp);
return fp;
}
/*
* Load the module (name), pass it (argc),(argv), add container file
* to the list of loaded files.

View File

@ -63,12 +63,16 @@ __FBSDID("$FreeBSD$");
#define CMD_REQUIRES_BLOB 0x01
/* Location of FDT yet to be loaded. */
/* This may be in read-only memory, so can't be manipulated directly. */
static struct fdt_header *fdt_to_load = NULL;
/* Local copy of FDT on heap. */
/* Location of FDT on heap. */
/* This is the copy we actually manipulate. */
static struct fdt_header *fdtp = NULL;
/* Size of FDT blob */
static size_t fdtp_size = 0;
/* Location of FDT in kernel or module */
/* Location of FDT in kernel or module. */
/* This won't be set if FDT is loaded from disk or memory. */
/* If it is set, we'll update it when fdt_copy() gets called. */
static vm_offset_t fdtp_va = 0;
static int fdt_load_dtb(vm_offset_t va);
@ -191,7 +195,6 @@ fdt_find_static_dtb()
fdt_start = (vm_offset_t)sym.st_value + offs;
free(strp);
}
printf("fdt_start: 0x%08jX\n", (intmax_t)fdt_start);
return (fdt_start);
}
@ -239,14 +242,19 @@ fdt_load_dtb(vm_offset_t va)
static int
fdt_load_dtb_addr(struct fdt_header *header)
{
struct preloaded_file *bfp;
bfp = mem_load_raw("dtb", "memory.dtb", header, fdt_totalsize(header));
if (bfp == NULL) {
command_errmsg = "unable to copy DTB into module directory";
// TODO: Verify that there really is an FDT at
// the specified location.
fdtp_size = fdt_totalsize(header);
free(fdtp);
if ((fdtp = malloc(fdtp_size)) == NULL) {
command_errmsg = "can't allocate memory for device tree copy";
return (1);
}
return fdt_load_dtb(bfp->f_addr);
fdtp_va = 0; // Don't write this back into module or kernel.
bcopy(header, fdtp, fdtp_size);
return (0);
}
static int
@ -339,7 +347,7 @@ _fdt_strtovect(char *str, void *cellbuf, int lim, unsigned char cellsize,
#define TMP_MAX_ETH 8
void
static void
fixup_ethernet(const char *env, char *ethstr, int *eth_no, int len)
{
char *end, *str;
@ -376,7 +384,7 @@ fixup_ethernet(const char *env, char *ethstr, int *eth_no, int len)
*eth_no = n + 1;
}
void
static void
fixup_cpubusfreqs(unsigned long cpufreq, unsigned long busfreq)
{
int lo, o = 0, o2, maxo = 0, depth;
@ -424,7 +432,7 @@ fixup_cpubusfreqs(unsigned long cpufreq, unsigned long busfreq)
}
}
int
static int
fdt_reg_valid(uint32_t *reg, int len, int addr_cells, int size_cells)
{
int cells_in_tuple, i, tuples, tuple_size;
@ -456,7 +464,7 @@ fdt_reg_valid(uint32_t *reg, int len, int addr_cells, int size_cells)
return (0);
}
void
static void
fixup_memory(struct sys_info *si)
{
struct mem_region *curmr;
@ -611,7 +619,7 @@ fixup_memory(struct sys_info *si)
free(sb);
}
void
static void
fixup_stdout(const char *env)
{
const char *str;
@ -664,7 +672,7 @@ fixup_stdout(const char *env)
/*
* Locate the blob, fix it up and return its location.
*/
static vm_offset_t
static int
fdt_fixup(void)
{
const char *env;
@ -692,7 +700,7 @@ fdt_fixup(void)
/* Value assigned to fixup-applied does not matter. */
if (fdt_getprop(fdtp, chosen, "fixup-applied", NULL))
goto success;
return (1);
/* Acquire sys_info */
si = ub_get_sys_info();
@ -735,15 +743,11 @@ fdt_fixup(void)
fixup_memory(si);
fdt_setprop(fdtp, chosen, "fixup-applied", NULL, 0);
success:
/* Overwrite the FDT with the fixed version. */
COPYIN(fdtp, fdtp_va, fdtp_size);
return (fdtp_va);
return (1);
}
/*
* Copy DTB blob to specified location and its return size
* Copy DTB blob to specified location and return size
*/
int
fdt_copy(vm_offset_t va)
@ -761,6 +765,11 @@ fdt_copy(vm_offset_t va)
if (fdt_fixup() == 0)
return (0);
if (fdtp_va != 0) {
/* Overwrite the FDT with the fixed version. */
/* XXX Is this really appropriate? */
COPYIN(fdtp, fdtp_va, fdtp_size);
}
COPYIN(fdtp, va, fdtp_size);
return (fdtp_size);
}
@ -1334,8 +1343,6 @@ fdt_modprop(int nodeoff, char *propname, void *value, char mode)
else
sprintf(command_errbuf,
"Could not add/modify property!\n");
} else {
COPYIN(fdtp, fdtp_va, fdtp_size);
}
return (rv);
}
@ -1520,7 +1527,6 @@ fdt_cmd_mkprop(int argc, char *argv[])
if (fdt_modprop(o, propname, value, 1))
return (CMD_ERROR);
COPYIN(fdtp, fdtp_va, fdtp_size);
return (CMD_OK);
}
@ -1557,8 +1563,6 @@ fdt_cmd_rm(int argc, char *argv[])
if (rv) {
sprintf(command_errbuf, "could not delete node");
return (CMD_ERROR);
} else {
COPYIN(fdtp, fdtp_va, fdtp_size);
}
return (CMD_OK);
}
@ -1589,8 +1593,6 @@ fdt_cmd_mknode(int argc, char *argv[])
sprintf(command_errbuf,
"Could not add node!\n");
return (CMD_ERROR);
} else {
COPYIN(fdtp, fdtp_va, fdtp_size);
}
return (CMD_OK);
}

View File

@ -46,6 +46,9 @@ typedef longlong_t hrtime_t;
((ts)->tv_sec < INT64_MIN || (ts)->tv_sec > INT64_MAX)
#endif
#define SEC_TO_TICK(sec) ((sec) * hz)
#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz))
#ifdef _KERNEL
static __inline hrtime_t
gethrtime(void) {

View File

@ -22,6 +22,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright (c) 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
*/
/*
@ -141,6 +142,10 @@ uint_t zio_taskq_basedc = 80; /* base duty cycle */
boolean_t spa_create_process = B_TRUE; /* no process ==> no sysdc */
extern int zfs_sync_pass_deferred_free;
#ifndef illumos
extern void spa_deadman(void *arg);
#endif
/*
* This (illegal) pool name is used when temporarily importing a spa_t in order
* to get the vdev stats associated with the imported devices.
@ -6258,6 +6263,17 @@ spa_sync(spa_t *spa, uint64_t txg)
tx = dmu_tx_create_assigned(dp, txg);
spa->spa_sync_starttime = gethrtime();
#ifdef illumos
VERIFY(cyclic_reprogram(spa->spa_deadman_cycid,
spa->spa_sync_starttime + spa->spa_deadman_synctime));
#else /* FreeBSD */
#ifdef _KERNEL
callout_reset(&spa->spa_deadman_cycid,
hz * spa->spa_deadman_synctime / NANOSEC, spa_deadman, spa);
#endif
#endif
/*
* If we are upgrading to SPA_VERSION_RAIDZ_DEFLATE this txg,
* set spa_deflate if we have no raid-z vdevs.
@ -6386,6 +6402,14 @@ spa_sync(spa_t *spa, uint64_t txg)
}
dmu_tx_commit(tx);
#ifdef illumos
VERIFY(cyclic_reprogram(spa->spa_deadman_cycid, CY_INFINITY));
#else /* FreeBSD */
#ifdef _KERNEL
callout_drain(&spa->spa_deadman_cycid);
#endif
#endif
/*
* Clear the dirty config list.
*/

View File

@ -22,10 +22,12 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
*/
#include <sys/zfs_context.h>
#include <sys/spa_impl.h>
#include <sys/spa_boot.h>
#include <sys/zio.h>
#include <sys/zio_checksum.h>
#include <sys/zio_compress.h>
@ -253,6 +255,52 @@ TUNABLE_INT("vfs.zfs.recover", &zfs_recover);
SYSCTL_INT(_vfs_zfs, OID_AUTO, recover, CTLFLAG_RDTUN, &zfs_recover, 0,
"Try to recover from otherwise-fatal errors.");
extern int zfs_txg_synctime_ms;
/*
* Expiration time in units of zfs_txg_synctime_ms. This value has two
* meanings. First it is used to determine when the spa_deadman logic
* should fire. By default the spa_deadman will fire if spa_sync has
* not completed in 1000 * zfs_txg_synctime_ms (i.e. 1000 seconds).
* Secondly, the value determines if an I/O is considered "hung".
* Any I/O that has not completed in zfs_deadman_synctime is considered
* "hung" resulting in a system panic.
* 1000 zfs_txg_synctime_ms (i.e. 1000 seconds).
*/
uint64_t zfs_deadman_synctime = 1000ULL;
TUNABLE_QUAD("vfs.zfs.deadman_synctime", &zfs_deadman_synctime);
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_synctime, CTLFLAG_RDTUN,
&zfs_deadman_synctime, 0,
"Stalled ZFS I/O expiration time in units of vfs.zfs.txg_synctime_ms");
/*
* Default value of -1 for zfs_deadman_enabled is resolved in
* zfs_deadman_init()
*/
int zfs_deadman_enabled = -1;
TUNABLE_INT("vfs.zfs.deadman_enabled", &zfs_deadman_enabled);
SYSCTL_INT(_vfs_zfs, OID_AUTO, deadman_enabled, CTLFLAG_RDTUN,
&zfs_deadman_enabled, 0, "Kernel panic on stalled ZFS I/O");
#ifndef illumos
#ifdef _KERNEL
static void
zfs_deadman_init()
{
/*
* If we are not i386 or amd64 or in a virtual machine,
* disable ZFS deadman thread by default
*/
if (zfs_deadman_enabled == -1) {
#if defined(__amd64__) || defined(__i386__)
zfs_deadman_enabled = (vm_guest == VM_GUEST_NO) ? 1 : 0;
#else
zfs_deadman_enabled = 0;
#endif
}
}
#endif /* _KERNEL */
#endif /* !illumos */
/*
* ==========================================================================
@ -421,6 +469,23 @@ spa_lookup(const char *name)
return (spa);
}
/*
* Fires when spa_sync has not completed within zfs_deadman_synctime_ms.
* If the zfs_deadman_enabled flag is set then it inspects all vdev queues
* looking for potentially hung I/Os.
*/
void
spa_deadman(void *arg)
{
spa_t *spa = arg;
zfs_dbgmsg("slow spa_sync: started %llu seconds ago, calls %llu",
(gethrtime() - spa->spa_sync_starttime) / NANOSEC,
++spa->spa_deadman_calls);
if (zfs_deadman_enabled)
vdev_deadman(spa->spa_root_vdev);
}
/*
* Create an uninitialized spa_t with the given name. Requires
* spa_namespace_lock. The caller must ensure that the spa_t doesn't already
@ -431,6 +496,10 @@ spa_add(const char *name, nvlist_t *config, const char *altroot)
{
spa_t *spa;
spa_config_dirent_t *dp;
#ifdef illumos
cyc_handler_t hdlr;
cyc_time_t when;
#endif
ASSERT(MUTEX_HELD(&spa_namespace_lock));
@ -462,6 +531,32 @@ spa_add(const char *name, nvlist_t *config, const char *altroot)
spa->spa_proc = &p0;
spa->spa_proc_state = SPA_PROC_NONE;
#ifdef illumos
hdlr.cyh_func = spa_deadman;
hdlr.cyh_arg = spa;
hdlr.cyh_level = CY_LOW_LEVEL;
#endif
spa->spa_deadman_synctime = zfs_deadman_synctime *
zfs_txg_synctime_ms * MICROSEC;
#ifdef illumos
/*
* This determines how often we need to check for hung I/Os after
* the cyclic has already fired. Since checking for hung I/Os is
* an expensive operation we don't want to check too frequently.
* Instead wait for 5 synctimes before checking again.
*/
when.cyt_interval = 5ULL * zfs_txg_synctime_ms * MICROSEC;
when.cyt_when = CY_INFINITY;
mutex_enter(&cpu_lock);
spa->spa_deadman_cycid = cyclic_add(&hdlr, &when);
mutex_exit(&cpu_lock);
#else /* !illumos */
#ifdef _KERNEL
callout_init(&spa->spa_deadman_cycid, CALLOUT_MPSAFE);
#endif
#endif
refcount_create(&spa->spa_refcount);
spa_config_lock_init(spa);
@ -544,6 +639,18 @@ spa_remove(spa_t *spa)
nvlist_free(spa->spa_load_info);
spa_config_set(spa, NULL);
#ifdef illumos
mutex_enter(&cpu_lock);
if (spa->spa_deadman_cycid != CYCLIC_NONE)
cyclic_remove(spa->spa_deadman_cycid);
mutex_exit(&cpu_lock);
spa->spa_deadman_cycid = CYCLIC_NONE;
#else /* !illumos */
#ifdef _KERNEL
callout_drain(&spa->spa_deadman_cycid);
#endif
#endif
refcount_destroy(&spa->spa_refcount);
spa_config_lock_destroy(spa);
@ -1510,6 +1617,12 @@ spa_prev_software_version(spa_t *spa)
return (spa->spa_prev_software_version);
}
uint64_t
spa_deadman_synctime(spa_t *spa)
{
return (spa->spa_deadman_synctime);
}
uint64_t
dva_get_dsize_sync(spa_t *spa, const dva_t *dva)
{
@ -1605,7 +1718,9 @@ spa_init(int mode)
spa_mode_global = mode;
#ifdef illumos
#ifndef _KERNEL
#ifdef _KERNEL
spa_arch_init();
#else
if (spa_mode_global != FREAD && dprintf_find_string("watch")) {
arc_procfd = open("/proc/self/ctl", O_WRONLY);
if (arc_procfd == -1) {
@ -1629,6 +1744,11 @@ spa_init(int mode)
zpool_feature_init();
spa_config_load();
l2arc_start();
#ifndef illumos
#ifdef _KERNEL
zfs_deadman_init();
#endif
#endif /* !illumos */
}
void

View File

@ -599,6 +599,7 @@ extern boolean_t spa_suspended(spa_t *spa);
extern uint64_t spa_bootfs(spa_t *spa);
extern uint64_t spa_delegation(spa_t *spa);
extern objset_t *spa_meta_objset(spa_t *spa);
extern uint64_t spa_deadman_synctime(spa_t *spa);
/* Miscellaneous support routines */
extern void spa_activate_mos_feature(spa_t *spa, const char *feature);

View File

@ -23,6 +23,10 @@
* Use is subject to license terms.
*/
/*
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
#ifndef _SYS_SPA_BOOT_H
#define _SYS_SPA_BOOT_H
@ -35,6 +39,8 @@ extern "C" {
extern char *spa_get_bootprop(char *prop);
extern void spa_free_bootprop(char *prop);
extern void spa_arch_init(void);
#ifdef __cplusplus
}
#endif

View File

@ -22,6 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
*/
#ifndef _SYS_SPA_IMPL_H
@ -230,6 +231,16 @@ struct spa {
uint64_t spa_feat_for_write_obj; /* required to write to pool */
uint64_t spa_feat_for_read_obj; /* required to read from pool */
uint64_t spa_feat_desc_obj; /* Feature descriptions */
#ifdef illumos
cyclic_id_t spa_deadman_cycid; /* cyclic id */
#else /* FreeBSD */
#ifdef _KERNEL
struct callout spa_deadman_cycid; /* callout id */
#endif
#endif /* illumos */
uint64_t spa_deadman_calls; /* number of deadman calls */
uint64_t spa_sync_starttime; /* starting time fo spa_sync */
uint64_t spa_deadman_synctime; /* deadman expiration timer */
/*
* spa_refcnt & spa_config_lock must be the last elements
* because refcount_t changes size based on compilation options.

View File

@ -80,6 +80,7 @@ extern void vdev_metaslab_fini(vdev_t *vd);
extern void vdev_metaslab_set_size(vdev_t *);
extern void vdev_expand(vdev_t *vd, uint64_t txg);
extern void vdev_split(vdev_t *vd);
extern void vdev_deadman(vdev_t *vd);
extern void vdev_get_stats(vdev_t *vd, vdev_stat_t *vs);

View File

@ -104,6 +104,8 @@ struct vdev_queue {
avl_tree_t vq_read_tree;
avl_tree_t vq_write_tree;
avl_tree_t vq_pending_tree;
uint64_t vq_io_complete_ts;
uint64_t vq_io_delta_ts;
kmutex_t vq_lock;
};

View File

@ -22,6 +22,10 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
#ifndef _SYS_ZFS_CONTEXT_H
#define _SYS_ZFS_CONTEXT_H
@ -88,6 +92,11 @@ extern "C" {
#include <sys/u8_textprep.h>
#include <sys/fm/util.h>
#include <sys/sunddi.h>
#ifdef illumos
#include <sys/cyclic.h>
#else /* FreeBSD */
#include <sys/callout.h>
#endif
#include <machine/stdarg.h>

View File

@ -246,12 +246,24 @@ typedef struct zinject_record {
uint32_t zi_iotype;
int32_t zi_duration;
uint64_t zi_timer;
uint32_t zi_cmd;
uint32_t zi_pad;
} zinject_record_t;
#define ZINJECT_NULL 0x1
#define ZINJECT_FLUSH_ARC 0x2
#define ZINJECT_UNLOAD_SPA 0x4
typedef enum zinject_type {
ZINJECT_UNINITIALIZED,
ZINJECT_DATA_FAULT,
ZINJECT_DEVICE_FAULT,
ZINJECT_LABEL_FAULT,
ZINJECT_IGNORED_WRITES,
ZINJECT_PANIC,
ZINJECT_DELAY_IO,
} zinject_type_t;
typedef struct zfs_share {
uint64_t z_exportdata;
uint64_t z_sharedata;

View File

@ -443,6 +443,7 @@ struct zio {
uint64_t io_offset;
uint64_t io_deadline;
uint64_t io_timestamp;
avl_node_t io_offset_node;
avl_node_t io_deadline_node;
avl_tree_t *io_vdev_tree;
@ -596,6 +597,7 @@ extern int zio_handle_fault_injection(zio_t *zio, int error);
extern int zio_handle_device_injection(vdev_t *vd, zio_t *zio, int error);
extern int zio_handle_label_injection(zio_t *zio, int error);
extern void zio_handle_ignored_writes(zio_t *zio);
extern uint64_t zio_handle_io_delay(zio_t *zio);
/*
* Checksum ereport functions

View File

@ -3173,3 +3173,41 @@ vdev_split(vdev_t *vd)
}
vdev_propagate_state(cvd);
}
void
vdev_deadman(vdev_t *vd)
{
for (int c = 0; c < vd->vdev_children; c++) {
vdev_t *cvd = vd->vdev_child[c];
vdev_deadman(cvd);
}
if (vd->vdev_ops->vdev_op_leaf) {
vdev_queue_t *vq = &vd->vdev_queue;
mutex_enter(&vq->vq_lock);
if (avl_numnodes(&vq->vq_pending_tree) > 0) {
spa_t *spa = vd->vdev_spa;
zio_t *fio;
uint64_t delta;
/*
* Look at the head of all the pending queues,
* if any I/O has been outstanding for longer than
* the spa_deadman_synctime we panic the system.
*/
fio = avl_first(&vq->vq_pending_tree);
delta = ddi_get_lbolt64() - fio->io_timestamp;
if (delta > NSEC_TO_TICK(spa_deadman_synctime(spa))) {
zfs_dbgmsg("SLOW IO: zio timestamp %llu, "
"delta %llu, last io %llu",
fio->io_timestamp, delta,
vq->vq_io_complete_ts);
fm_panic("I/O to pool '%s' appears to be "
"hung.", spa_name(spa));
}
}
mutex_exit(&vq->vq_lock);
}
}

View File

@ -23,6 +23,10 @@
* Use is subject to license terms.
*/
/*
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>
#include <sys/vdev_impl.h>
#include <sys/zio.h>
@ -315,6 +319,7 @@ again:
zio_buf_alloc(size), size, fio->io_type, ZIO_PRIORITY_AGG,
flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE,
vdev_queue_agg_io_done, NULL);
aio->io_timestamp = fio->io_timestamp;
nio = fio;
do {
@ -386,7 +391,8 @@ vdev_queue_io(zio_t *zio)
mutex_enter(&vq->vq_lock);
zio->io_deadline = (ddi_get_lbolt64() >> zfs_vdev_time_shift) +
zio->io_timestamp = ddi_get_lbolt64();
zio->io_deadline = (zio->io_timestamp >> zfs_vdev_time_shift) +
zio->io_priority;
vdev_queue_io_add(vq, zio);
@ -411,10 +417,16 @@ vdev_queue_io_done(zio_t *zio)
{
vdev_queue_t *vq = &zio->io_vd->vdev_queue;
if (zio_injection_enabled)
delay(SEC_TO_TICK(zio_handle_io_delay(zio)));
mutex_enter(&vq->vq_lock);
avl_remove(&vq->vq_pending_tree, zio);
vq->vq_io_complete_ts = ddi_get_lbolt64();
vq->vq_io_delta_ts = vq->vq_io_complete_ts - zio->io_timestamp;
for (int i = 0; i < zfs_vdev_ramp_rate; i++) {
zio_t *nio = vdev_queue_io_to_issue(vq, zfs_vdev_max_pending);
if (nio == NULL)

View File

@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
/*
@ -147,14 +148,8 @@ zio_handle_fault_injection(zio_t *zio, int error)
for (handler = list_head(&inject_handlers); handler != NULL;
handler = list_next(&inject_handlers, handler)) {
/* Ignore errors not destined for this pool */
if (zio->io_spa != handler->zi_spa)
continue;
/* Ignore device errors and panic injection */
if (handler->zi_record.zi_guid != 0 ||
handler->zi_record.zi_func[0] != '\0' ||
handler->zi_record.zi_duration != 0)
if (zio->io_spa != handler->zi_spa ||
handler->zi_record.zi_cmd != ZINJECT_DATA_FAULT)
continue;
/* If this handler matches, return EIO */
@ -197,10 +192,7 @@ zio_handle_label_injection(zio_t *zio, int error)
uint64_t start = handler->zi_record.zi_start;
uint64_t end = handler->zi_record.zi_end;
/* Ignore device only faults or panic injection */
if (handler->zi_record.zi_start == 0 ||
handler->zi_record.zi_func[0] != '\0' ||
handler->zi_record.zi_duration != 0)
if (handler->zi_record.zi_cmd != ZINJECT_LABEL_FAULT)
continue;
/*
@ -246,13 +238,7 @@ zio_handle_device_injection(vdev_t *vd, zio_t *zio, int error)
for (handler = list_head(&inject_handlers); handler != NULL;
handler = list_next(&inject_handlers, handler)) {
/*
* Ignore label specific faults, panic injection
* or fake writes
*/
if (handler->zi_record.zi_start != 0 ||
handler->zi_record.zi_func[0] != '\0' ||
handler->zi_record.zi_duration != 0)
if (handler->zi_record.zi_cmd != ZINJECT_DEVICE_FAULT)
continue;
if (vd->vdev_guid == handler->zi_record.zi_guid) {
@ -316,10 +302,8 @@ zio_handle_ignored_writes(zio_t *zio)
handler = list_next(&inject_handlers, handler)) {
/* Ignore errors not destined for this pool */
if (zio->io_spa != handler->zi_spa)
continue;
if (handler->zi_record.zi_duration == 0)
if (zio->io_spa != handler->zi_spa ||
handler->zi_record.zi_cmd != ZINJECT_IGNORED_WRITES)
continue;
/*
@ -355,11 +339,8 @@ spa_handle_ignored_writes(spa_t *spa)
for (handler = list_head(&inject_handlers); handler != NULL;
handler = list_next(&inject_handlers, handler)) {
/* Ignore errors not destined for this pool */
if (spa != handler->zi_spa)
continue;
if (handler->zi_record.zi_duration == 0)
if (spa != handler->zi_spa ||
handler->zi_record.zi_cmd != ZINJECT_IGNORED_WRITES)
continue;
if (handler->zi_record.zi_duration > 0) {
@ -379,6 +360,34 @@ spa_handle_ignored_writes(spa_t *spa)
rw_exit(&inject_lock);
}
uint64_t
zio_handle_io_delay(zio_t *zio)
{
vdev_t *vd = zio->io_vd;
inject_handler_t *handler;
uint64_t seconds = 0;
if (zio_injection_enabled == 0)
return (0);
rw_enter(&inject_lock, RW_READER);
for (handler = list_head(&inject_handlers); handler != NULL;
handler = list_next(&inject_handlers, handler)) {
if (handler->zi_record.zi_cmd != ZINJECT_DELAY_IO)
continue;
if (vd->vdev_guid == handler->zi_record.zi_guid) {
seconds = handler->zi_record.zi_timer;
break;
}
}
rw_exit(&inject_lock);
return (seconds);
}
/*
* Create a new handler for the given record. We add it to the list, adding
* a reference to the spa_t in the process. We increment zio_injection_enabled,

View File

@ -1124,7 +1124,7 @@ t4fw.fwo optional cxgbe \
no-implicit-rule \
clean "t4fw.fwo"
t4fw.fw optional cxgbe \
dependency "$S/dev/cxgbe/firmware/t4fw-1.6.2.0.bin.uu" \
dependency "$S/dev/cxgbe/firmware/t4fw-1.8.4.0.bin.uu" \
compile-with "${NORMAL_FW}" \
no-obj no-implicit-rule \
clean "t4fw.fw"

View File

@ -1437,6 +1437,8 @@ struct ath_hal {
HAL_STATUS __ahdecl(*ah_setQuiet)(struct ath_hal *ah, uint32_t period,
uint32_t duration, uint32_t nextStart,
HAL_QUIET_FLAG flag);
void __ahdecl(*ah_setChainMasks)(struct ath_hal *,
uint32_t, uint32_t);
/* DFS functions */
void __ahdecl(*ah_enableDfs)(struct ath_hal *ah,

View File

@ -259,6 +259,7 @@ extern HAL_BOOL ar5210GetDiagState(struct ath_hal *ah, int request,
extern uint32_t ar5210Get11nExtBusy(struct ath_hal *);
extern HAL_BOOL ar5210GetMibCycleCounts(struct ath_hal *,
HAL_SURVEY_SAMPLE *);
extern void ar5210SetChainMasks(struct ath_hal *, uint32_t, uint32_t);
extern void ar5210EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *);
extern void ar5210GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *);
extern void ar5210UpdateDiagReg(struct ath_hal *ah, uint32_t val);

View File

@ -137,6 +137,7 @@ static const struct ath_hal_private ar5210hal = {{
.ah_setCoverageClass = ar5210SetCoverageClass,
.ah_get11nExtBusy = ar5210Get11nExtBusy,
.ah_getMibCycleCounts = ar5210GetMibCycleCounts,
.ah_setChainMasks = ar5210SetChainMasks,
.ah_enableDfs = ar5210EnableDfs,
.ah_getDfsThresh = ar5210GetDfsThresh,
/* XXX procRadarEvent */

View File

@ -670,6 +670,12 @@ ar5210GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample)
return (AH_FALSE);
}
void
ar5210SetChainMasks(struct ath_hal *ah, uint32_t txchainmask,
uint32_t rxchainmask)
{
}
void
ar5210EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
{

View File

@ -286,6 +286,8 @@ extern HAL_BOOL ar5211GetDiagState(struct ath_hal *ah, int request,
extern uint32_t ar5211Get11nExtBusy(struct ath_hal *);
extern HAL_BOOL ar5211GetMibCycleCounts(struct ath_hal *,
HAL_SURVEY_SAMPLE *);
extern void ar5211SetChainMasks(struct ath_hal *ah, uint32_t, uint32_t);
extern void ar5211EnableDfs(struct ath_hal *, HAL_PHYERR_PARAM *);
extern void ar5211GetDfsThresh(struct ath_hal *, HAL_PHYERR_PARAM *);

View File

@ -137,6 +137,7 @@ static const struct ath_hal_private ar5211hal = {{
.ah_setCoverageClass = ar5211SetCoverageClass,
.ah_get11nExtBusy = ar5211Get11nExtBusy,
.ah_getMibCycleCounts = ar5211GetMibCycleCounts,
.ah_setChainMasks = ar5211SetChainMasks,
.ah_enableDfs = ar5211EnableDfs,
.ah_getDfsThresh = ar5211GetDfsThresh,
/* XXX procRadarEvent */

View File

@ -710,6 +710,12 @@ ar5211GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample)
return (AH_FALSE);
}
void
ar5211SetChainMasks(struct ath_hal *ah, uint32_t txchainmask,
uint32_t rxchainmask)
{
}
void
ar5211EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe)
{

View File

@ -513,6 +513,7 @@ extern HAL_STATUS ar5212SetQuiet(struct ath_hal *ah, uint32_t period,
uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag);
extern HAL_BOOL ar5212GetMibCycleCounts(struct ath_hal *,
HAL_SURVEY_SAMPLE *);
extern void ar5212SetChainMasks(struct ath_hal *, uint32_t, uint32_t);
extern HAL_BOOL ar5212SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
int setChip);

View File

@ -134,6 +134,7 @@ static const struct ath_hal_private ar5212hal = {{
.ah_setCoverageClass = ar5212SetCoverageClass,
.ah_setQuiet = ar5212SetQuiet,
.ah_getMibCycleCounts = ar5212GetMibCycleCounts,
.ah_setChainMasks = ar5212SetChainMasks,
/* DFS Functions */
.ah_enableDfs = ar5212EnableDfs,

View File

@ -1413,3 +1413,9 @@ ar5212GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample)
return (AH_FALSE);
}
void
ar5212SetChainMasks(struct ath_hal *ah, uint32_t tx_chainmask,
uint32_t rx_chainmask)
{
}

View File

@ -239,6 +239,7 @@ extern HAL_BOOL ar5416SetDecompMask(struct ath_hal *, uint16_t, int);
extern void ar5416SetCoverageClass(struct ath_hal *, uint8_t, int);
extern HAL_BOOL ar5416GetMibCycleCounts(struct ath_hal *ah,
HAL_SURVEY_SAMPLE *hsample);
extern void ar5416SetChainMasks(struct ath_hal *ah, uint32_t, uint32_t);
extern uint32_t ar5416Get11nExtBusy(struct ath_hal *ah);
extern void ar5416Set11nMac2040(struct ath_hal *ah, HAL_HT_MACMODE mode);
extern HAL_HT_RXCLEAR ar5416Get11nRxClear(struct ath_hal *ah);

View File

@ -150,6 +150,7 @@ ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
ah->ah_setCoverageClass = ar5416SetCoverageClass;
ah->ah_setQuiet = ar5416SetQuiet;
ah->ah_getMibCycleCounts = ar5416GetMibCycleCounts;
ah->ah_setChainMasks = ar5416SetChainMasks;
ah->ah_resetKeyCacheEntry = ar5416ResetKeyCacheEntry;
ah->ah_setKeyCacheEntry = ar5416SetKeyCacheEntry;

View File

@ -255,6 +255,20 @@ ar5416GetMibCycleCounts(struct ath_hal *ah, HAL_SURVEY_SAMPLE *hsample)
return (good);
}
/*
* Setup the TX/RX chainmasks - this needs to be done before a call
* to the reset method as it doesn't update the hardware.
*/
void
ar5416SetChainMasks(struct ath_hal *ah, uint32_t tx_chainmask,
uint32_t rx_chainmask)
{
HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps;
AH5416(ah)->ah_tx_chainmask = tx_chainmask & pCap->halTxChainMask;
AH5416(ah)->ah_rx_chainmask = rx_chainmask & pCap->halRxChainMask;
}
/*
* Return approximation of extension channel busy over an time interval
* 0% (clear) -> 100% (busy)

View File

@ -44,7 +44,6 @@ static void ar5416InitBB(struct ath_hal *ah, const struct ieee80211_channel *);
static void ar5416InitIMR(struct ath_hal *ah, HAL_OPMODE opmode);
static void ar5416InitQoS(struct ath_hal *ah);
static void ar5416InitUserSettings(struct ath_hal *ah);
static void ar5416UpdateChainMasks(struct ath_hal *ah, HAL_BOOL is_ht);
static void ar5416OverrideIni(struct ath_hal *ah, const struct ieee80211_channel *);
#if 0
@ -209,11 +208,6 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMODE opmode,
HALDEBUG(ah, HAL_DEBUG_RESET, ">>>2 %s: AR_PHY_ADC_CTL=0x%x\n",
__func__, OS_REG_READ(ah,AR_PHY_ADC_CTL));
/*
* Setup ah_tx_chainmask / ah_rx_chainmask before we fiddle
* with enabling the TX/RX radio chains.
*/
ar5416UpdateChainMasks(ah, IEEE80211_IS_CHAN_HT(chan));
/*
* This routine swaps the analog chains - it should be done
* before any radio register twiddling is done.
@ -1464,31 +1458,6 @@ ar5416RestoreChainMask(struct ath_hal *ah)
}
}
/*
* Update the chainmask based on the current channel configuration.
*
* XXX ath9k checks bluetooth co-existence here
* XXX ath9k checks whether the current state is "off-channel".
* XXX ath9k sticks the hardware into 1x1 mode for legacy;
* we're going to leave multi-RX on for multi-path cancellation.
*/
static void
ar5416UpdateChainMasks(struct ath_hal *ah, HAL_BOOL is_ht)
{
struct ath_hal_private *ahpriv = AH_PRIVATE(ah);
HAL_CAPABILITIES *pCap = &ahpriv->ah_caps;
if (is_ht) {
AH5416(ah)->ah_tx_chainmask = pCap->halTxChainMask;
} else {
AH5416(ah)->ah_tx_chainmask = 1;
}
AH5416(ah)->ah_rx_chainmask = pCap->halRxChainMask;
HALDEBUG(ah, HAL_DEBUG_RESET, "TX chainmask: 0x%x; RX chainmask: 0x%x\n",
AH5416(ah)->ah_tx_chainmask,
AH5416(ah)->ah_rx_chainmask);
}
void
ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan)
{

View File

@ -700,20 +700,6 @@ ar5416Set11nRateScenario(struct ath_hal *ah, struct ath_desc *ds,
HALASSERT(nseries == 4);
(void)nseries;
/*
* XXX since the upper layers doesn't know the current chainmask
* XXX setup, just override its decisions here.
* XXX The upper layers need to be taught this!
*/
if (series[0].Tries != 0)
series[0].ChSel = AH5416(ah)->ah_tx_chainmask;
if (series[1].Tries != 0)
series[1].ChSel = AH5416(ah)->ah_tx_chainmask;
if (series[2].Tries != 0)
series[2].ChSel = AH5416(ah)->ah_tx_chainmask;
if (series[3].Tries != 0)
series[3].ChSel = AH5416(ah)->ah_tx_chainmask;
/*
* Only one of RTS and CTS enable must be set.
* If a frame has both set, just do RTS protection -

View File

@ -1476,6 +1476,26 @@ ath_reset_keycache(struct ath_softc *sc)
ieee80211_crypto_reload_keys(ic);
}
/*
* Fetch the current chainmask configuration based on the current
* operating channel and options.
*/
static void
ath_update_chainmasks(struct ath_softc *sc, struct ieee80211_channel *chan)
{
/*
* Set TX chainmask to the currently configured chainmask;
* the TX chainmask depends upon the current operating mode.
*/
sc->sc_cur_rxchainmask = sc->sc_rxchainmask;
if (IEEE80211_IS_CHAN_HT(chan)) {
sc->sc_cur_txchainmask = sc->sc_txchainmask;
} else {
sc->sc_cur_txchainmask = 1;
}
}
void
ath_resume(struct ath_softc *sc)
{
@ -1494,6 +1514,10 @@ ath_resume(struct ath_softc *sc)
* Must reset the chip before we reload the
* keycache as we were powered down on suspend.
*/
ath_update_chainmasks(sc,
sc->sc_curchan != NULL ? sc->sc_curchan : ic->ic_curchan);
ath_hal_setchainmasks(sc->sc_ah, sc->sc_cur_txchainmask,
sc->sc_cur_rxchainmask);
ath_hal_reset(ah, sc->sc_opmode,
sc->sc_curchan != NULL ? sc->sc_curchan : ic->ic_curchan,
AH_FALSE, &status);
@ -1935,6 +1959,9 @@ ath_init(void *arg)
* and then setup of the interrupt mask.
*/
ath_settkipmic(sc);
ath_update_chainmasks(sc, ic->ic_curchan);
ath_hal_setchainmasks(sc->sc_ah, sc->sc_cur_txchainmask,
sc->sc_cur_rxchainmask);
if (!ath_hal_reset(ah, sc->sc_opmode, ic->ic_curchan, AH_FALSE, &status)) {
if_printf(ifp, "unable to reset hardware; hal status %u\n",
status);
@ -2250,6 +2277,9 @@ ath_reset(struct ifnet *ifp, ATH_RESET_TYPE reset_type)
ath_settkipmic(sc); /* configure TKIP MIC handling */
/* NB: indicate channel change so we do a full reset */
ath_update_chainmasks(sc, ic->ic_curchan);
ath_hal_setchainmasks(sc->sc_ah, sc->sc_cur_txchainmask,
sc->sc_cur_rxchainmask);
if (!ath_hal_reset(ah, sc->sc_opmode, ic->ic_curchan, AH_TRUE, &status))
if_printf(ifp, "%s: unable to reset hardware; hal status %u\n",
__func__, status);
@ -4440,6 +4470,9 @@ ath_chan_set(struct ath_softc *sc, struct ieee80211_channel *chan)
*/
ath_draintxq(sc, ATH_RESET_FULL); /* clear pending tx frames */
ath_update_chainmasks(sc, chan);
ath_hal_setchainmasks(sc->sc_ah, sc->sc_cur_txchainmask,
sc->sc_cur_rxchainmask);
if (!ath_hal_reset(ah, sc->sc_opmode, chan, AH_TRUE, &status)) {
if_printf(ifp, "%s: unable to reset "
"channel %u (%u MHz, flags 0x%x), hal status %u\n",

View File

@ -498,13 +498,6 @@ ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni,
series[i].Tries = rc[i].tries;
/*
* XXX this isn't strictly correct - sc_txchainmask
* XXX isn't the currently active chainmask;
* XXX it's the interface chainmask at startup.
* XXX It's overridden in the HAL rate scenario function
* XXX for now.
*/
/*
* XXX TODO: When the NIC is capable of three stream TX,
* transmit 1/2 stream rates on two streams.
@ -512,7 +505,7 @@ ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni,
* This reduces the power consumption of the NIC and
* keeps it within the PCIe slot power limits.
*/
series[i].ChSel = sc->sc_txchainmask;
series[i].ChSel = sc->sc_cur_txchainmask;
if (flags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA))
series[i].RateFlags |= HAL_RATESERIES_RTS_CTS;
@ -542,6 +535,14 @@ ath_rateseries_setup(struct ath_softc *sc, struct ieee80211_node *ni,
ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20)
series[i].RateFlags |= HAL_RATESERIES_HALFGI;
/*
* XXX TODO: STBC if it's possible
*/
/*
* XXX TODO: LDPC if it's possible
*/
series[i].Rate = rt->info[rc[i].rix].rateCode;
series[i].RateIndex = rc[i].rix;
series[i].tx_power_cap = 0x3f; /* XXX for now */

View File

@ -715,8 +715,10 @@ struct ath_softc {
u_int32_t sc_avgtsfdeltap;/* TDMA slot adjust (+) */
u_int32_t sc_avgtsfdeltam;/* TDMA slot adjust (-) */
uint16_t *sc_eepromdata; /* Local eeprom data, if AR9100 */
int sc_txchainmask; /* currently configured TX chainmask */
int sc_rxchainmask; /* currently configured RX chainmask */
int sc_txchainmask; /* hardware TX chainmask */
int sc_rxchainmask; /* hardware RX chainmask */
int sc_cur_txchainmask; /* currently configured TX chainmask */
int sc_cur_rxchainmask; /* currently configured RX chainmask */
int sc_rts_aggr_limit; /* TX limit on RTS aggregates */
int sc_aggr_limit; /* TX limit on all aggregates */
int sc_delim_min_pad; /* Minimum delimiter count */
@ -1334,6 +1336,8 @@ void ath_intr(void *);
((*(_ah)->ah_getMibCycleCounts)((_ah), (_sample)))
#define ath_hal_get_chan_ext_busy(_ah) \
((*(_ah)->ah_get11nExtBusy)((_ah)))
#define ath_hal_setchainmasks(_ah, _txchainmask, _rxchainmask) \
((*(_ah)->ah_setChainMasks)((_ah), (_txchainmask), (_rxchainmask)))
#define ath_hal_spectral_supported(_ah) \
(ath_hal_getcapability(_ah, HAL_CAP_SPECTRAL_SCAN, 0, NULL) == HAL_OK)

View File

@ -282,6 +282,7 @@ TUNABLE_INT("hw.ciss.force_interrupt", &ciss_force_interrupt);
#define CISS_BOARD_SA5 1
#define CISS_BOARD_SA5B 2
#define CISS_BOARD_NOMSI (1<<4)
#define CISS_BOARD_SIMPLE (1<<5)
static struct
{
@ -290,7 +291,8 @@ static struct
int flags;
char *desc;
} ciss_vendor_data[] = {
{ 0x0e11, 0x4070, CISS_BOARD_SA5|CISS_BOARD_NOMSI, "Compaq Smart Array 5300" },
{ 0x0e11, 0x4070, CISS_BOARD_SA5|CISS_BOARD_NOMSI|CISS_BOARD_SIMPLE,
"Compaq Smart Array 5300" },
{ 0x0e11, 0x4080, CISS_BOARD_SA5B|CISS_BOARD_NOMSI, "Compaq Smart Array 5i" },
{ 0x0e11, 0x4082, CISS_BOARD_SA5B|CISS_BOARD_NOMSI, "Compaq Smart Array 532" },
{ 0x0e11, 0x4083, CISS_BOARD_SA5B|CISS_BOARD_NOMSI, "HP Smart Array 5312" },
@ -682,8 +684,15 @@ ciss_init_pci(struct ciss_softc *sc)
supported_methods = CISS_TRANSPORT_METHOD_PERF;
break;
default:
supported_methods = sc->ciss_cfg->supported_methods;
break;
/*
* Override the capabilities of the BOARD and specify SIMPLE
* MODE
*/
if (ciss_vendor_data[i].flags & CISS_BOARD_SIMPLE)
supported_methods = CISS_TRANSPORT_METHOD_SIMPLE;
else
supported_methods = sc->ciss_cfg->supported_methods;
break;
}
setup:

View File

@ -600,7 +600,7 @@ struct adapter {
struct callout sfl_callout;
an_handler_t an_handler __aligned(CACHE_LINE_SIZE);
fw_msg_handler_t fw_msg_handler[4]; /* NUM_FW6_TYPES */
fw_msg_handler_t fw_msg_handler[5]; /* NUM_FW6_TYPES */
cpl_handler_t cpl_handler[0xef]; /* NUM_CPL_CMDS */
#ifdef INVARIANTS

View File

@ -64,8 +64,9 @@ enum {
};
#define FW_VERSION_MAJOR 1
#define FW_VERSION_MINOR 6
#define FW_VERSION_MICRO 2
#define FW_VERSION_MINOR 8
#define FW_VERSION_MICRO 4
#define FW_VERSION_BUILD 0
struct port_stats {
u64 tx_octets; /* total # of octets in good frames */
@ -546,7 +547,4 @@ int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type cty
int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox);
int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val);
int t4_config_scheduler(struct adapter *adapter, int mode, int level, int pktsize,
int sched_class, int port, int rate, int unit,
int weight, int minrate, int maxrate);
#endif /* __CHELSIO_COMMON_H */

View File

@ -3909,13 +3909,13 @@ int t4_i2c_rd(struct adapter *adap, unsigned int mbox, unsigned int port_id,
F_FW_CMD_READ |
V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_FUNC_I2C));
c.cycles_to_len16 = htonl(FW_LEN16(c));
c.u.i2c.pid_pkd = V_FW_LDST_CMD_PID(port_id);
c.u.i2c.base = dev_addr;
c.u.i2c.boffset = offset;
c.u.i2c_deprecated.pid_pkd = V_FW_LDST_CMD_PID(port_id);
c.u.i2c_deprecated.base = dev_addr;
c.u.i2c_deprecated.boffset = offset;
ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c);
if (ret == 0)
*valp = c.u.i2c.data;
*valp = c.u.i2c_deprecated.data;
return ret;
}
@ -4593,7 +4593,7 @@ int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox,
}
}
if (rss_size)
*rss_size = G_FW_VI_CMD_RSSSIZE(ntohs(c.rsssize_pkd));
*rss_size = G_FW_VI_CMD_RSSSIZE(ntohs(c.norss_rsssize));
return G_FW_VI_CMD_VIID(htons(c.type_to_viid));
}
@ -5304,43 +5304,3 @@ int __devinit t4_port_init(struct port_info *p, int mbox, int pf, int vf)
return 0;
}
int t4_config_scheduler(struct adapter *adapter, int mode, int level,
int pktsize, int sched_class, int port, int unit,
int rate, int weight, int minrate, int maxrate)
{
struct fw_sched_cmd cmd, rpl;
if (rate < 0 || unit < 0)
return -EINVAL;
memset(&cmd, 0, sizeof(cmd));
cmd.op_to_write = cpu_to_be32(V_FW_CMD_OP(FW_SCHED_CMD) |
F_FW_CMD_REQUEST | F_FW_CMD_WRITE);
cmd.retval_len16 = cpu_to_be32(V_FW_CMD_LEN16(sizeof(cmd)/16));
cmd.u.params.sc = 1;
cmd.u.params.level = level;
cmd.u.params.mode = mode;
cmd.u.params.ch = port;
cmd.u.params.cl = sched_class;
cmd.u.params.rate = rate;
cmd.u.params.unit = unit;
switch (level) {
case FW_SCHED_PARAMS_LEVEL_CH_WRR:
case FW_SCHED_PARAMS_LEVEL_CL_WRR:
cmd.u.params.weight = cpu_to_be16(weight);
break;
case FW_SCHED_PARAMS_LEVEL_CH_RL:
case FW_SCHED_PARAMS_LEVEL_CL_RL:
cmd.u.params.max = cpu_to_be32(maxrate);
cmd.u.params.min = cpu_to_be32(minrate);
cmd.u.params.pktsize = cpu_to_be16(pktsize);
break;
default:
return -EINVAL;
}
return t4_wr_mbox_meat(adapter, adapter->mbox, &cmd, sizeof(cmd), &rpl, 1);
}

View File

@ -2224,6 +2224,15 @@ struct cpl_sge_egr_update {
#define V_EGR_QID(x) ((x) << S_EGR_QID)
#define G_EGR_QID(x) (((x) >> S_EGR_QID) & M_EGR_QID)
/* cpl_fw*.type values */
enum {
FW_TYPE_CMD_RPL = 0,
FW_TYPE_WR_RPL = 1,
FW_TYPE_CQE = 2,
FW_TYPE_OFLD_CONNECTION_WR_RPL = 3,
FW_TYPE_RSSCPL = 4,
};
struct cpl_fw2_pld {
RSS_HDR
u8 opcode;
@ -2292,10 +2301,11 @@ struct cpl_fw6_msg {
/* cpl_fw6_msg.type values */
enum {
FW6_TYPE_CMD_RPL = 0,
FW6_TYPE_WR_RPL = 1,
FW6_TYPE_CQE = 2,
FW6_TYPE_OFLD_CONNECTION_WR_RPL = 3,
FW6_TYPE_CMD_RPL = FW_TYPE_CMD_RPL,
FW6_TYPE_WR_RPL = FW_TYPE_WR_RPL,
FW6_TYPE_CQE = FW_TYPE_CQE,
FW6_TYPE_OFLD_CONNECTION_WR_RPL = FW_TYPE_OFLD_CONNECTION_WR_RPL,
FW6_TYPE_RSSCPL = FW_TYPE_RSSCPL,
NUM_FW6_TYPES
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -45,9 +45,11 @@ enum fw_retval {
FW_EFAULT = 14, /* bad address; fw bad */
FW_EBUSY = 16, /* resource busy */
FW_EEXIST = 17, /* file exists */
FW_ENODEV = 19, /* no such device */
FW_EINVAL = 22, /* invalid argument */
FW_ENOSPC = 28, /* no space left on device */
FW_ENOSYS = 38, /* functionality not implemented */
FW_ENODATA = 61, /* no data available */
FW_EPROTO = 71, /* protocol error */
FW_EADDRINUSE = 98, /* address already in use */
FW_EADDRNOTAVAIL = 99, /* cannot assigned requested address */
@ -114,6 +116,8 @@ enum fw_wr_opcodes {
FW_SCSI_TGT_ACC_WR = 0x35,
FW_SCSI_TGT_XMIT_WR = 0x36,
FW_SCSI_TGT_RSP_WR = 0x37,
FW_POFCOE_TCB_WR = 0x42,
FW_POFCOE_ULPTX_WR = 0x43,
FW_LASTC2E_WR = 0x70
};
@ -556,12 +560,15 @@ struct fw_eth_tx_uo_wr {
__be32 op_immdlen;
__be32 equiq_to_len16;
__be64 r3;
__be16 ethlen;
__u8 r4;
__u8 ethlen;
__be16 iplen;
__be16 udplen;
__u8 udplen;
__u8 rtplen;
__be16 r5;
__be16 mss;
__be16 schedpktsize;
__be32 length;
__be32 r4;
};
struct fw_eq_flush_wr {
@ -708,19 +715,19 @@ enum fw_flowc_mnem_uostate {
};
enum fw_flowc_mnem {
FW_FLOWC_MNEM_PFNVFN, /* PFN [15:8] VFN [7:0] */
FW_FLOWC_MNEM_CH,
FW_FLOWC_MNEM_PORT,
FW_FLOWC_MNEM_IQID,
FW_FLOWC_MNEM_SNDNXT,
FW_FLOWC_MNEM_RCVNXT,
FW_FLOWC_MNEM_SNDBUF,
FW_FLOWC_MNEM_MSS,
FW_FLOWC_MNEM_TXDATAPLEN_MAX,
FW_FLOWC_MNEM_TCPSTATE,
FW_FLOWC_MNEM_UOSTATE,
FW_FLOWC_MNEM_SCHEDCLASS,
FW_FLOWC_MNEM_DCBPRIO,
FW_FLOWC_MNEM_PFNVFN = 0, /* PFN [15:8] VFN [7:0] */
FW_FLOWC_MNEM_CH = 1,
FW_FLOWC_MNEM_PORT = 2,
FW_FLOWC_MNEM_IQID = 3,
FW_FLOWC_MNEM_SNDNXT = 4,
FW_FLOWC_MNEM_RCVNXT = 5,
FW_FLOWC_MNEM_SNDBUF = 6,
FW_FLOWC_MNEM_MSS = 7,
FW_FLOWC_MNEM_TXDATAPLEN_MAX = 8,
FW_FLOWC_MNEM_TCPSTATE = 9,
FW_FLOWC_MNEM_UOSTATE = 10,
FW_FLOWC_MNEM_SCHEDCLASS = 11,
FW_FLOWC_MNEM_DCBPRIO = 12,
};
struct fw_flowc_mnemval {
@ -2789,6 +2796,55 @@ struct fw_scsi_tgt_rsp_wr {
#define G_FW_SCSI_TGT_RSP_WR_CLASS(x) \
(((x) >> S_FW_SCSI_TGT_RSP_WR_CLASS) & M_FW_SCSI_TGT_RSP_WR_CLASS)
struct fw_pofcoe_tcb_wr {
__be32 op_compl;
__be32 equiq_to_len16;
__be64 cookie;
__be32 tid_to_port;
__be16 x_id;
__be16 vlan_id;
__be32 s_id;
__be32 d_id;
__be32 tag;
__be32 xfer_len;
__be32 r4;
__be16 r5;
__be16 iqid;
};
#define S_FW_POFCOE_TCB_WR_TID 12
#define M_FW_POFCOE_TCB_WR_TID 0xfffff
#define V_FW_POFCOE_TCB_WR_TID(x) ((x) << S_FW_POFCOE_TCB_WR_TID)
#define G_FW_POFCOE_TCB_WR_TID(x) \
(((x) >> S_FW_POFCOE_TCB_WR_TID) & M_FW_POFCOE_TCB_WR_TID)
#define S_FW_POFCOE_TCB_WR_ALLOC 4
#define M_FW_POFCOE_TCB_WR_ALLOC 0x1
#define V_FW_POFCOE_TCB_WR_ALLOC(x) ((x) << S_FW_POFCOE_TCB_WR_ALLOC)
#define G_FW_POFCOE_TCB_WR_ALLOC(x) \
(((x) >> S_FW_POFCOE_TCB_WR_ALLOC) & M_FW_POFCOE_TCB_WR_ALLOC)
#define F_FW_POFCOE_TCB_WR_ALLOC V_FW_POFCOE_TCB_WR_ALLOC(1U)
#define S_FW_POFCOE_TCB_WR_FREE 3
#define M_FW_POFCOE_TCB_WR_FREE 0x1
#define V_FW_POFCOE_TCB_WR_FREE(x) ((x) << S_FW_POFCOE_TCB_WR_FREE)
#define G_FW_POFCOE_TCB_WR_FREE(x) \
(((x) >> S_FW_POFCOE_TCB_WR_FREE) & M_FW_POFCOE_TCB_WR_FREE)
#define F_FW_POFCOE_TCB_WR_FREE V_FW_POFCOE_TCB_WR_FREE(1U)
#define S_FW_POFCOE_TCB_WR_PORT 0
#define M_FW_POFCOE_TCB_WR_PORT 0x7
#define V_FW_POFCOE_TCB_WR_PORT(x) ((x) << S_FW_POFCOE_TCB_WR_PORT)
#define G_FW_POFCOE_TCB_WR_PORT(x) \
(((x) >> S_FW_POFCOE_TCB_WR_PORT) & M_FW_POFCOE_TCB_WR_PORT)
struct fw_pofcoe_ulptx_wr {
__be32 op_pkd;
__be32 equiq_to_len16;
__u64 cookie;
};
/******************************************************************************
* C O M M A N D s
*********************/
@ -2937,8 +2993,9 @@ enum fw_ldst_addrspc {
FW_LDST_ADDRSPC_MPS = 0x0020,
FW_LDST_ADDRSPC_FUNC = 0x0028,
FW_LDST_ADDRSPC_FUNC_PCIE = 0x0029,
FW_LDST_ADDRSPC_FUNC_I2C = 0x002A,
FW_LDST_ADDRSPC_FUNC_I2C = 0x002A, /* legacy */
FW_LDST_ADDRSPC_LE = 0x0030,
FW_LDST_ADDRSPC_I2C = 0x0038,
};
/*
@ -3018,17 +3075,26 @@ struct fw_ldst_cmd {
__be16 nset_pkd;
__be32 data[12];
} pcie;
struct fw_ldst_i2c {
struct fw_ldst_i2c_deprecated {
__u8 pid_pkd;
__u8 base;
__u8 boffset;
__u8 data;
__be32 r9;
} i2c_deprecated;
struct fw_ldst_i2c {
__u8 pid;
__u8 did;
__u8 boffset;
__u8 blen;
__be32 r9;
__u8 data[48];
} i2c;
struct fw_ldst_le {
__be16 region;
__be16 nval;
__u32 val[12];
__be32 index;
__be32 r9;
__u8 val[33];
__u8 r11[7];
} le;
} u;
};
@ -3332,6 +3398,8 @@ enum fw_caps_config_fcoe {
FW_CAPS_CONFIG_FCOE_INITIATOR = 0x00000001,
FW_CAPS_CONFIG_FCOE_TARGET = 0x00000002,
FW_CAPS_CONFIG_FCOE_CTRL_OFLD = 0x00000004,
FW_CAPS_CONFIG_POFCOE_INITIATOR = 0x00000008,
FW_CAPS_CONFIG_POFCOE_TARGET = 0x00000010,
};
enum fw_memtype_cf {
@ -3465,7 +3533,8 @@ enum fw_params_param_pfvf {
FW_PARAMS_PARAM_PFVF_ACTIVE_FILTER_START = 0x2D,
FW_PARAMS_PARAM_PFVF_ACTIVE_FILTER_END = 0x2E,
FW_PARAMS_PARAM_PFVF_ETHOFLD_START = 0x2F,
FW_PARAMS_PARAM_PFVF_ETHOFLD_END = 0x30
FW_PARAMS_PARAM_PFVF_ETHOFLD_END = 0x30,
FW_PARAMS_PARAM_PFVF_CPLFW4MSG_ENCAP = 0x31
};
/*
@ -3474,6 +3543,7 @@ enum fw_params_param_pfvf {
enum fw_params_param_dmaq {
FW_PARAMS_PARAM_DMAQ_IQ_DCAEN_DCACPU = 0x00,
FW_PARAMS_PARAM_DMAQ_IQ_INTCNTTHRESH = 0x01,
FW_PARAMS_PARAM_DMAQ_IQ_INTIDX = 0x02,
FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10,
FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11,
FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12,
@ -4943,7 +5013,7 @@ struct fw_vi_cmd {
__u8 portid_pkd;
__u8 nmac;
__u8 nmac0[6];
__be16 rsssize_pkd;
__be16 norss_rsssize;
__u8 nmac1[6];
__be16 idsiiq_pkd;
__u8 nmac2[6];
@ -4998,6 +5068,13 @@ struct fw_vi_cmd {
#define G_FW_VI_CMD_PORTID(x) \
(((x) >> S_FW_VI_CMD_PORTID) & M_FW_VI_CMD_PORTID)
#define S_FW_VI_CMD_NORSS 11
#define M_FW_VI_CMD_NORSS 0x1
#define V_FW_VI_CMD_NORSS(x) ((x) << S_FW_VI_CMD_NORSS)
#define G_FW_VI_CMD_NORSS(x) \
(((x) >> S_FW_VI_CMD_NORSS) & M_FW_VI_CMD_NORSS)
#define F_FW_VI_CMD_NORSS V_FW_VI_CMD_NORSS(1U)
#define S_FW_VI_CMD_RSSSIZE 0
#define M_FW_VI_CMD_RSSSIZE 0x7ff
#define V_FW_VI_CMD_RSSSIZE(x) ((x) << S_FW_VI_CMD_RSSSIZE)
@ -5524,6 +5601,8 @@ enum fw_port_dcb_type {
enum fw_port_diag_ops {
FW_PORT_DIAGS_TEMP = 0x00,
FW_PORT_DIAGS_TX_POWER = 0x01,
FW_PORT_DIAGS_RX_POWER = 0x02,
};
struct fw_port_cmd {
@ -5560,8 +5639,9 @@ struct fw_port_cmd {
__be64 r9;
} info;
struct fw_port_diags {
__be32 diagop_diagval;
__be32 r;
__u8 diagop;
__u8 r[3];
__be32 diagval;
} diags;
union fw_port_dcb {
struct fw_port_dcb_pgid {
@ -5602,7 +5682,7 @@ struct fw_port_cmd {
struct fw_port_dcb_control {
__u8 type;
__u8 all_syncd_pkd;
__be16 r10_lo[3];
__be16 r10_lo[3];
__be64 r11;
} control;
} dcb;
@ -5748,18 +5828,6 @@ struct fw_port_cmd {
#define G_FW_PORT_CMD_MODTYPE(x) \
(((x) >> S_FW_PORT_CMD_MODTYPE) & M_FW_PORT_CMD_MODTYPE)
#define S_FW_PORT_CMD_DIAGOP 24
#define M_FW_PORT_CMD_DIAGOP 0xff
#define V_FW_PORT_CMD_DIAGOP(x) ((x) << S_FW_PORT_CMD_DIAGOP)
#define G_FW_PORT_CMD_DIAGOP(x) \
(((x) >> S_FW_PORT_CMD_DIAGOP) & M_FW_PORT_CMD_DIAGOP)
#define S_FW_PORT_CMD_DIAGVAL 0
#define M_FW_PORT_CMD_DIAGVAL 0xffffff
#define V_FW_PORT_CMD_DIAGVAL(x) ((x) << S_FW_PORT_CMD_DIAGVAL)
#define G_FW_PORT_CMD_DIAGVAL(x) \
(((x) >> S_FW_PORT_CMD_DIAGVAL) & M_FW_PORT_CMD_DIAGVAL)
#define S_FW_PORT_CMD_APPLY 7
#define M_FW_PORT_CMD_APPLY 0x1
#define V_FW_PORT_CMD_APPLY(x) ((x) << S_FW_PORT_CMD_APPLY)
@ -5816,6 +5884,10 @@ enum fw_port_module_type {
enum fw_port_mod_sub_type {
FW_PORT_MOD_SUB_TYPE_NA,
FW_PORT_MOD_SUB_TYPE_MV88E114X=0x1,
FW_PORT_MOD_SUB_TYPE_TN8022=0x2,
FW_PORT_MOD_SUB_TYPE_AQ1202=0x3,
FW_PORT_MOD_SUB_TYPE_88x3120=0x4,
FW_PORT_MOD_SUB_TYPE_BCM84834=0x5,
FW_PORT_MOD_SUB_TYPE_BT_VSC8634=0x8,
/*
@ -5832,11 +5904,13 @@ enum fw_port_mod_sub_type {
/* link down reason codes (3b) */
enum fw_port_link_dn_rc {
FW_PORT_LINK_DN_RC_NONE,
FW_PORT_LINK_DN_RC_REMFLT,
FW_PORT_LINK_DN_ANEG_F,
FW_PORT_LINK_DN_MS_RES_F,
FW_PORT_LINK_DN_OVERHEAT,
FW_PORT_LINK_DN_UNKNOWN
FW_PORT_LINK_DN_RC_REMFLT, /* Remote fault detected */
FW_PORT_LINK_DN_ANEG_F, /* Auto-negotiation fault */
FW_PORT_LINK_DN_RESERVED3,
FW_PORT_LINK_DN_OVERHEAT, /* Port overheated */
FW_PORT_LINK_DN_UNKNOWN, /* Unable to determine reason */
FW_PORT_LINK_DN_RX_LOS, /* No RX signal detected */
FW_PORT_LINK_DN_RESERVED7
};
/* port stats */
@ -6635,7 +6709,6 @@ enum fw_sched_params_level {
FW_SCHED_PARAMS_LEVEL_CL_RL = 0,
FW_SCHED_PARAMS_LEVEL_CL_WRR = 1,
FW_SCHED_PARAMS_LEVEL_CH_RL = 2,
FW_SCHED_PARAMS_LEVEL_CH_WRR = 3,
};
enum fw_sched_params_mode {
@ -6676,7 +6749,8 @@ struct fw_sched_cmd {
__be32 max;
__be16 weight;
__be16 pktsize;
__be32 r4;
__be16 burstsize;
__be16 r4;
} params;
} u;
};
@ -7353,6 +7427,16 @@ struct fw_debug_cmd {
* P C I E F W R E G I S T E R
**************************************/
enum pcie_fw_eval {
PCIE_FW_EVAL_CRASH = 0,
PCIE_FW_EVAL_PREP = 1,
PCIE_FW_EVAL_CONF = 2,
PCIE_FW_EVAL_INIT = 3,
PCIE_FW_EVAL_UNEXPECTEDEVENT = 4,
PCIE_FW_EVAL_OVERHEAT = 5,
PCIE_FW_EVAL_DEVICESHUTDOWN = 6,
};
/**
* Register definitions for the PCIE_FW register which the firmware uses
* to retain status across RESETs. This register should be considered
@ -7377,6 +7461,11 @@ struct fw_debug_cmd {
#define G_PCIE_FW_HALT(x) (((x) >> S_PCIE_FW_HALT) & M_PCIE_FW_HALT)
#define F_PCIE_FW_HALT V_PCIE_FW_HALT(1U)
#define S_PCIE_FW_EVAL 24
#define M_PCIE_FW_EVAL 0x7
#define V_PCIE_FW_EVAL(x) ((x) << S_PCIE_FW_EVAL)
#define G_PCIE_FW_EVAL(x) (((x) >> S_PCIE_FW_EVAL) & M_PCIE_FW_EVAL)
#define S_PCIE_FW_STAGE 21
#define M_PCIE_FW_STAGE 0x7
#define V_PCIE_FW_STAGE(x) ((x) << S_PCIE_FW_STAGE)
@ -7455,11 +7544,11 @@ struct fw_hdr {
__u8 intfver_ri;
__u8 intfver_iscsipdu;
__u8 intfver_iscsi;
__u8 intfver_fcoepdu;
__u8 intfver_fcoe;
__u8 reserved2;
__u32 reserved2;
__u32 reserved3;
__u32 reserved4;
__u32 reserved5;
__be32 flags;
__be32 reserved6[23];
};
@ -7504,6 +7593,7 @@ enum {
FW_HDR_INTFVER_RI = 0x00,
FW_HDR_INTFVER_ISCSIPDU = 0x00,
FW_HDR_INTFVER_ISCSI = 0x00,
FW_HDR_INTFVER_FCOEPDU = 0x00,
FW_HDR_INTFVER_FCOE = 0x00,
};

View File

@ -281,6 +281,7 @@ static int upload_config_file(struct adapter *, const struct firmware *,
static int partition_resources(struct adapter *, const struct firmware *);
static int get_params__pre_init(struct adapter *);
static int get_params__post_init(struct adapter *);
static int set_params__post_init(struct adapter *);
static void t4_set_desc(struct adapter *);
static void build_medialist(struct port_info *);
static int update_mac_settings(struct port_info *, int);
@ -519,6 +520,10 @@ t4_attach(device_t dev)
if (rc != 0)
goto done; /* error message displayed already */
rc = set_params__post_init(sc);
if (rc != 0)
goto done; /* error message displayed already */
if (sc->flags & MASTER_PF) {
uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE);
@ -1991,6 +1996,33 @@ get_params__post_init(struct adapter *sc)
return (rc);
}
static int
set_params__post_init(struct adapter *sc)
{
uint32_t param, val;
int rc;
param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP);
rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, &param, &val);
if (rc == 0) {
/* ask for encapsulated CPLs */
param = FW_PARAM_PFVF(CPLFW4MSG_ENCAP);
val = 1;
rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &param, &val);
if (rc != 0) {
device_printf(sc->dev,
"failed to set parameter (post_init): %d.\n", rc);
return (rc);
}
} else if (rc != FW_EINVAL) {
device_printf(sc->dev,
"failed to check for encapsulated CPLs: %d.\n", rc);
} else
rc = 0; /* the firmware doesn't support the param, no worries */
return (rc);
}
#undef FW_PARAM_PFVF
#undef FW_PARAM_DEV
@ -3077,6 +3109,14 @@ t4_register_fw_msg_handler(struct adapter *sc, int type, fw_msg_handler_t h)
if (type >= nitems(sc->fw_msg_handler))
return (EINVAL);
/*
* These are dispatched by the handler for FW{4|6}_CPL_MSG using the CPL
* handler dispatch table. Reject any attempt to install a handler for
* this subtype.
*/
if (type == FW_TYPE_RSSCPL || type == FW6_TYPE_RSSCPL)
return (EINVAL);
new = h ? (uintptr_t)h : (uintptr_t)fw_msg_not_handled;
loc = (uintptr_t *) &sc->fw_msg_handler[type];
atomic_store_rel_ptr(loc, new);

View File

@ -3509,6 +3509,10 @@ handle_sge_egr_update(struct sge_iq *iq, const struct rss_header *rss,
return (0);
}
/* handle_fw_msg works for both fw4_msg and fw6_msg because this is valid */
CTASSERT(offsetof(struct cpl_fw4_msg, data) == \
offsetof(struct cpl_fw6_msg, data));
static int
handle_fw_msg(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
{
@ -3518,6 +3522,13 @@ handle_fw_msg(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
KASSERT(m == NULL, ("%s: payload with opcode %02x", __func__,
rss->opcode));
if (cpl->type == FW_TYPE_RSSCPL || cpl->type == FW6_TYPE_RSSCPL) {
const struct rss_header *rss2;
rss2 = (const struct rss_header *)&cpl->data[0];
return (sc->cpl_handler[rss2->opcode](iq, rss2, m));
}
return (sc->fw_msg_handler[cpl->type](sc, &cpl->data[0]));
}

View File

@ -1709,7 +1709,13 @@ isp_fibre_init(ispsoftc_t *isp)
*
* NB: for the 2300, ICBOPT_EXTENDED is required.
*/
if (IS_2200(isp) || IS_23XX(isp)) {
if (IS_2100(isp)) {
/*
* We can't have Fast Posting any more- we now
* have 32 bit handles.
*/
icbp->icb_fwoptions &= ~ICBOPT_FAST_POST;
} else if (IS_2200(isp) || IS_23XX(isp)) {
icbp->icb_fwoptions |= ICBOPT_EXTENDED;
icbp->icb_xfwoptions = fcp->isp_xfwoptions;

View File

@ -288,42 +288,43 @@ mxge_dma_free(mxge_dma_t *dma)
static int
mxge_parse_strings(mxge_softc_t *sc)
{
#define MXGE_NEXT_STRING(p) while(ptr < limit && *ptr++)
char *ptr, *limit;
char *ptr;
int i, found_mac, found_sn2;
char *endptr;
ptr = sc->eeprom_strings;
limit = sc->eeprom_strings + MXGE_EEPROM_STRINGS_SIZE;
found_mac = 0;
found_sn2 = 0;
while (ptr < limit && *ptr != '\0') {
if (memcmp(ptr, "MAC=", 4) == 0) {
ptr += 1;
sc->mac_addr_string = ptr;
for (i = 0; i < 6; i++) {
ptr += 3;
if ((ptr + 2) > limit)
while (*ptr != '\0') {
if (strncmp(ptr, "MAC=", 4) == 0) {
ptr += 4;
for (i = 0;;) {
sc->mac_addr[i] = strtoul(ptr, &endptr, 16);
if (endptr - ptr != 2)
goto abort;
ptr = endptr;
if (++i == 6)
break;
if (*ptr++ != ':')
goto abort;
sc->mac_addr[i] = strtoul(ptr, NULL, 16);
found_mac = 1;
}
} else if (memcmp(ptr, "PC=", 3) == 0) {
found_mac = 1;
} else if (strncmp(ptr, "PC=", 3) == 0) {
ptr += 3;
strncpy(sc->product_code_string, ptr,
sizeof (sc->product_code_string) - 1);
} else if (!found_sn2 && (memcmp(ptr, "SN=", 3) == 0)) {
strlcpy(sc->product_code_string, ptr,
sizeof(sc->product_code_string));
} else if (!found_sn2 && (strncmp(ptr, "SN=", 3) == 0)) {
ptr += 3;
strncpy(sc->serial_number_string, ptr,
sizeof (sc->serial_number_string) - 1);
} else if (memcmp(ptr, "SN2=", 4) == 0) {
strlcpy(sc->serial_number_string, ptr,
sizeof(sc->serial_number_string));
} else if (strncmp(ptr, "SN2=", 4) == 0) {
/* SN2 takes precedence over SN */
ptr += 4;
found_sn2 = 1;
strncpy(sc->serial_number_string, ptr,
sizeof (sc->serial_number_string) - 1);
strlcpy(sc->serial_number_string, ptr,
sizeof(sc->serial_number_string));
}
MXGE_NEXT_STRING(ptr);
while (*ptr++ != '\0') {}
}
if (found_mac)
@ -649,12 +650,6 @@ abort:
return (mxge_load_firmware(sc, 0));
}
union qualhack
{
const char *ro_char;
char *rw_char;
};
static int
mxge_validate_firmware(mxge_softc_t *sc, const mcp_gen_header_t *hdr)
{
@ -667,7 +662,7 @@ mxge_validate_firmware(mxge_softc_t *sc, const mcp_gen_header_t *hdr)
}
/* save firmware version for sysctl */
strncpy(sc->fw_version, hdr->version, sizeof (sc->fw_version));
strlcpy(sc->fw_version, hdr->version, sizeof(sc->fw_version));
if (mxge_verbose)
device_printf(sc->dev, "firmware id: %s\n", hdr->version);
@ -3325,8 +3320,6 @@ mxge_alloc_slice_rings(struct mxge_slice_state *ss, int rx_ring_entries,
size_t bytes;
int err, i;
err = ENOMEM;
/* allocate per-slice receive resources */
ss->rx_small.mask = ss->rx_big.mask = rx_ring_entries - 1;
@ -3335,24 +3328,16 @@ mxge_alloc_slice_rings(struct mxge_slice_state *ss, int rx_ring_entries,
/* allocate the rx shadow rings */
bytes = rx_ring_entries * sizeof (*ss->rx_small.shadow);
ss->rx_small.shadow = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK);
if (ss->rx_small.shadow == NULL)
return err;
bytes = rx_ring_entries * sizeof (*ss->rx_big.shadow);
ss->rx_big.shadow = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK);
if (ss->rx_big.shadow == NULL)
return err;
/* allocate the rx host info rings */
bytes = rx_ring_entries * sizeof (*ss->rx_small.info);
ss->rx_small.info = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK);
if (ss->rx_small.info == NULL)
return err;
bytes = rx_ring_entries * sizeof (*ss->rx_big.info);
ss->rx_big.info = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK);
if (ss->rx_big.info == NULL)
return err;
/* allocate the rx busdma resources */
err = bus_dma_tag_create(sc->parent_dmat, /* parent */
@ -3449,8 +3434,6 @@ mxge_alloc_slice_rings(struct mxge_slice_state *ss, int rx_ring_entries,
bytes = 8 +
sizeof (*ss->tx.req_list) * (ss->tx.max_desc + 4);
ss->tx.req_bytes = malloc(bytes, M_DEVBUF, M_WAITOK);
if (ss->tx.req_bytes == NULL)
return err;
/* ensure req_list entries are aligned to 8 bytes */
ss->tx.req_list = (mcp_kreq_ether_send_t *)
((unsigned long)(ss->tx.req_bytes + 7) & ~7UL);
@ -3459,14 +3442,10 @@ mxge_alloc_slice_rings(struct mxge_slice_state *ss, int rx_ring_entries,
bytes = sizeof (*ss->tx.seg_list) * ss->tx.max_desc;
ss->tx.seg_list = (bus_dma_segment_t *)
malloc(bytes, M_DEVBUF, M_WAITOK);
if (ss->tx.seg_list == NULL)
return err;
/* allocate the tx host info ring */
bytes = tx_ring_entries * sizeof (*ss->tx.info);
ss->tx.info = malloc(bytes, M_DEVBUF, M_ZERO|M_WAITOK);
if (ss->tx.info == NULL)
return err;
/* allocate the tx busdma resources */
err = bus_dma_tag_create(sc->parent_dmat, /* parent */

View File

@ -8211,8 +8211,13 @@ static void sym_update_trans(hcb_p np, tcb_p tp, struct sym_trans *tip,
* Scale against driver configuration limits.
*/
if (tip->width > SYM_SETUP_MAX_WIDE) tip->width = SYM_SETUP_MAX_WIDE;
if (tip->offset > SYM_SETUP_MAX_OFFS) tip->offset = SYM_SETUP_MAX_OFFS;
if (tip->period < SYM_SETUP_MIN_SYNC) tip->period = SYM_SETUP_MIN_SYNC;
if (tip->period && tip->offset) {
if (tip->offset > SYM_SETUP_MAX_OFFS) tip->offset = SYM_SETUP_MAX_OFFS;
if (tip->period < SYM_SETUP_MIN_SYNC) tip->period = SYM_SETUP_MIN_SYNC;
} else {
tip->offset = 0;
tip->period = 0;
}
/*
* Scale against actual controller BUS width.
@ -8231,21 +8236,23 @@ static void sym_update_trans(hcb_p np, tcb_p tp, struct sym_trans *tip,
/*
* Scale period factor and offset against controller limits.
*/
if (tip->options & PPR_OPT_DT) {
if (tip->period < np->minsync_dt)
tip->period = np->minsync_dt;
if (tip->period > np->maxsync_dt)
tip->period = np->maxsync_dt;
if (tip->offset > np->maxoffs_dt)
tip->offset = np->maxoffs_dt;
}
else {
if (tip->period < np->minsync)
tip->period = np->minsync;
if (tip->period > np->maxsync)
tip->period = np->maxsync;
if (tip->offset > np->maxoffs)
tip->offset = np->maxoffs;
if (tip->offset && tip->period) {
if (tip->options & PPR_OPT_DT) {
if (tip->period < np->minsync_dt)
tip->period = np->minsync_dt;
if (tip->period > np->maxsync_dt)
tip->period = np->maxsync_dt;
if (tip->offset > np->maxoffs_dt)
tip->offset = np->maxoffs_dt;
}
else {
if (tip->period < np->minsync)
tip->period = np->minsync;
if (tip->period > np->maxsync)
tip->period = np->maxsync;
if (tip->offset > np->maxoffs)
tip->offset = np->maxoffs;
}
}
}

View File

@ -63,8 +63,8 @@
#include <dev/usb/usb_transfer.h>
#endif /* USB_GLOBAL_INCLUDE_FILE */
static void usbpf_init(void);
static void usbpf_uninit(void);
static void usbpf_init(void *);
static void usbpf_uninit(void *);
static int usbpf_ioctl(struct ifnet *, u_long, caddr_t);
static int usbpf_clone_match(struct if_clone *, const char *);
static int usbpf_clone_create(struct if_clone *, char *, size_t, caddr_t);
@ -82,7 +82,7 @@ SYSINIT(usbpf_init, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_init, NULL);
SYSUNINIT(usbpf_uninit, SI_SUB_PSEUDO, SI_ORDER_MIDDLE, usbpf_uninit, NULL);
static void
usbpf_init(void)
usbpf_init(void *arg)
{
usbpf_cloner = if_clone_advanced(usbusname, 0, usbpf_clone_match,
@ -90,7 +90,7 @@ usbpf_init(void)
}
static void
usbpf_uninit(void)
usbpf_uninit(void *arg)
{
int devlcnt;
device_t *devlp;

View File

@ -650,6 +650,7 @@ vendor OWEN 0x1555 Owen
vendor OQO 0x1557 OQO
vendor UMEDIA 0x157e U-MEDIA Communications
vendor FIBERLINE 0x1582 Fiberline
vendor AFATECH 0x15a4 Afatech Technologies, Inc.
vendor SPARKLAN 0x15a9 SparkLAN
vendor OLIMEX 0x15ba Olimex
vendor SOUNDGRAPH 0x15c2 Soundgraph, Inc.
@ -916,6 +917,9 @@ product ADS UBS10BTX 0x0009 UBS-10BT Ethernet
/* AEI products */
product AEI FASTETHERNET 0x1701 Fast Ethernet
/* Afatech Technologies, Inc. */
product AFATECH AFATECH1336 0x1336 Flash Card Reader
/* Agate Technologies products */
product AGATE QDRIVE 0x0378 Q-Drive

View File

@ -387,7 +387,7 @@ pmap_bootstrap()
*/
ia64_kptdir = ia64_physmem_alloc(PAGE_SIZE, PAGE_SIZE);
nkpt = 0;
kernel_vm_end = VM_MIN_KERNEL_ADDRESS;
kernel_vm_end = VM_INIT_KERNEL_ADDRESS;
/*
* Determine a valid (mappable) VHPT size.
@ -425,7 +425,7 @@ pmap_bootstrap()
ia64_set_pta(base + (1 << 8) + (pmap_vhpt_log2size << 2) + 1);
ia64_srlz_i();
virtual_avail = VM_MIN_KERNEL_ADDRESS;
virtual_avail = VM_INIT_KERNEL_ADDRESS;
virtual_end = VM_MAX_KERNEL_ADDRESS;
/*
@ -1383,7 +1383,7 @@ pmap_kextract(vm_offset_t va)
/* Region 5 is our KVA. Bail out if the VA is beyond our limits. */
if (va >= kernel_vm_end)
goto err_out;
if (va >= VM_MIN_KERNEL_ADDRESS) {
if (va >= VM_INIT_KERNEL_ADDRESS) {
pte = pmap_find_kpte(va);
pa = pmap_present(pte) ? pmap_ppn(pte) | (va & PAGE_MASK) : 0;
goto out;
@ -2746,7 +2746,7 @@ DB_COMMAND(kpte, db_kpte)
db_printf("usage: kpte <kva>\n");
return;
}
if (addr < VM_MIN_KERNEL_ADDRESS) {
if (addr < VM_INIT_KERNEL_ADDRESS) {
db_printf("kpte: error: invalid <kva>\n");
return;
}

View File

@ -181,12 +181,13 @@
/* user/kernel map constants */
#define VM_MIN_ADDRESS 0
#define VM_MAXUSER_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION)
#define VM_MIN_KERNEL_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1)
#define VM_MAX_KERNEL_ADDRESS \
(VM_MIN_KERNEL_ADDRESS + IA64_REGION_GAP_START - 1)
#define VM_MIN_KERNEL_ADDRESS VM_MAXUSER_ADDRESS
#define VM_INIT_KERNEL_ADDRESS IA64_RR_BASE(IA64_VM_MINKERN_REGION + 1)
#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(IA64_VM_MINKERN_REGION + 2) - 1)
#define VM_MAX_ADDRESS ~0UL
#define KERNBASE VM_MAXUSER_ADDRESS
/* We link the kernel at IA64_PBVM_BASE. */
#define KERNBASE IA64_PBVM_BASE
/*
* USRSTACK is the top (end) of the user stack. Immediately above the user

View File

@ -855,9 +855,7 @@ do_dup(struct thread *td, int flags, int old, int new,
/*
* If the caller specified a file descriptor, make sure the file
* table is large enough to hold it, and grab it. Otherwise, just
* allocate a new descriptor the usual way. Since the filedesc
* lock may be temporarily dropped in the process, we have to look
* out for a race.
* allocate a new descriptor the usual way.
*/
if (flags & DUP_FIXED) {
if (new >= fdp->fd_nfiles) {
@ -1427,8 +1425,7 @@ fdgrowtable(struct filedesc *fdp, int nfd)
FILEDESC_XLOCK_ASSERT(fdp);
KASSERT(fdp->fd_nfiles > 0,
("zero-length file table"));
KASSERT(fdp->fd_nfiles > 0, ("zero-length file table"));
/* save old values */
onfiles = fdp->fd_nfiles;
@ -1449,13 +1446,11 @@ fdgrowtable(struct filedesc *fdp, int nfd)
* it on the freelist. We place the struct freetable in the
* middle so we don't have to worry about padding.
*/
ntable = malloc(nnfiles * sizeof(*ntable) +
sizeof(struct freetable) +
nnfiles * sizeof(*nfileflags),
M_FILEDESC, M_ZERO | M_WAITOK);
ntable = malloc(nnfiles * sizeof(*ntable) + sizeof(struct freetable) +
nnfiles * sizeof(*nfileflags), M_FILEDESC, M_ZERO | M_WAITOK);
nfileflags = (char *)&ntable[nnfiles] + sizeof(struct freetable);
nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE,
M_FILEDESC, M_ZERO | M_WAITOK);
nmap = malloc(NDSLOTS(nnfiles) * NDSLOTSIZE, M_FILEDESC,
M_ZERO | M_WAITOK);
/* copy the old data over and point at the new tables */
memcpy(ntable, otable, onfiles * sizeof(*otable));

View File

@ -17,7 +17,7 @@ FIRMWS += ${F}:${F:C/.txt//}:1.0.0.0
.endif
.endfor
T4FW_VER = 1.6.2.0
T4FW_VER = 1.8.4.0
FIRMWS += t4fw.fw:t4fw:${T4FW_VER}
CLEANFILES += t4fw.fw

Some files were not shown because too many files have changed in this diff Show More