summaryrefslogtreecommitdiff
path: root/sys/dev/std
diff options
context:
space:
mode:
authorperry <perry@NetBSD.org>2005-02-27 00:26:58 +0000
committerperry <perry@NetBSD.org>2005-02-27 00:26:58 +0000
commitf31bd063e99a4029f1bf9dac360c83c605ab8ba4 (patch)
treed06e6ea6eebeb4af06272dd4f675871761a5c024 /sys/dev/std
parent5b0739524b9b827c78dadf2f4d675f74670bf688 (diff)
nuke trailing whitespace
Diffstat (limited to 'sys/dev/std')
-rw-r--r--sys/dev/std/ieee1212.c204
-rw-r--r--sys/dev/std/ieee1212reg.h8
-rw-r--r--sys/dev/std/ieee1212var.h4
3 files changed, 108 insertions, 108 deletions
diff --git a/sys/dev/std/ieee1212.c b/sys/dev/std/ieee1212.c
index 6b6f8f09f25..1f38c6931ed 100644
--- a/sys/dev/std/ieee1212.c
+++ b/sys/dev/std/ieee1212.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee1212.c,v 1.8 2004/09/13 12:55:48 drochner Exp $ */
+/* $NetBSD: ieee1212.c,v 1.9 2005/02/27 00:27:49 perry Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ieee1212.c,v 1.8 2004/09/13 12:55:48 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee1212.c,v 1.9 2005/02/27 00:27:49 perry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -49,7 +49,7 @@ __KERNEL_RCSID(0, "$NetBSD: ieee1212.c,v 1.8 2004/09/13 12:55:48 drochner Exp $"
#include <dev/std/ieee1212var.h>
static const char * const p1212_keytype_strings[] = P1212_KEYTYPE_STRINGS ;
-static const char * const p1212_keyvalue_strings[] = P1212_KEYVALUE_STRINGS ;
+static const char * const p1212_keyvalue_strings[] = P1212_KEYVALUE_STRINGS ;
static u_int16_t p1212_calc_crc(u_int32_t, u_int32_t *, int, int);
static int p1212_parse_directory(struct p1212_dir *, u_int32_t *, u_int32_t);
@@ -91,7 +91,7 @@ int p1212debug = 1;
int
p1212_iscomplete(u_int32_t *t, u_int32_t *size)
{
- u_int16_t infolen, crclen, len;
+ u_int16_t infolen, crclen, len;
u_int32_t newlen, offset, test;
int complete, i, numdirs, type, val, *dirs;
@@ -114,12 +114,12 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
"Info len: %d\n", crclen, infolen));
return -1;
}
-
+
/*
* Now loop through it to check if all the offsets referenced are
* within the image stored so far. If not, get those as well.
*/
-
+
offset = P1212_ROMFMT_GET_INFOLEN((ntohl(t[0]))) + 1;
/*
@@ -129,7 +129,7 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
* then add another since infolen doesn't end on the root dir entry but
* right before it.
*/
-
+
if ((*size == 1) || (*size < (offset + 1))) {
*size = (crclen > infolen) ? crclen : infolen;
if (crclen == infolen)
@@ -141,9 +141,9 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
complete = 0;
numdirs = 0;
newlen = 0;
-
+
while (!complete) {
-
+
/*
* Make sure the whole directory is in memory. If not, bail now
* and read it in.
@@ -154,7 +154,7 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
newlen += offset + 1;
break;
}
-
+
if (newlen == 0) {
DPRINTF(("Impossible directory length of 0!\n"));
return -1;
@@ -178,20 +178,20 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
case P1212_KEYTYPE_Offset:
break;
case P1212_KEYTYPE_Leaf:
-
+
/*
* If a leaf is found, and it's beyond the
* current rom length and it's beyond the
* current newlen setting,
* then set newlen accordingly.
*/
-
+
test = offset + i + val + 1;
if ((test > *size) && (test > newlen)) {
newlen = test;
break;
}
-
+
/*
* For leaf nodes just make sure the whole leaf
* length is in the buffer. There's no data
@@ -201,7 +201,7 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
*/
test--;
- infolen =
+ infolen =
P1212_DIRENT_GET_LEN((ntohl(t[test])));
test++;
test += infolen;
@@ -209,26 +209,26 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
newlen = test;
}
break;
-
+
case P1212_KEYTYPE_Directory:
-
+
/* Make sure the first quad is in memory. */
-
+
test = offset + i + val + 1;
if ((test > *size) && (test > newlen)) {
newlen = test;
break;
}
-
+
/*
- * Can't just walk the ROM looking at type
- * codes since these are only valid on
+ * Can't just walk the ROM looking at type
+ * codes since these are only valid on
* directory entries. So save any directories
* we find into a queue and the bottom of the
- * while loop will pop the last one off and
+ * while loop will pop the last one off and
* walk that directory.
*/
-
+
test--;
dirs = realloc(dirs,
sizeof(int) * (numdirs + 1), M_DEVBUF,
@@ -241,10 +241,10 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
break;
}
}
-
+
if (newlen) {
/* Cleanup. */
- if (dirs)
+ if (dirs)
free(dirs, M_DEVBUF);
break;
}
@@ -255,11 +255,11 @@ p1212_iscomplete(u_int32_t *t, u_int32_t *size)
} else
complete = 1;
}
-
+
if (newlen)
*size = newlen;
return 0;
-
+
}
struct p1212_rom *
@@ -270,7 +270,7 @@ p1212_parse(u_int32_t *t, u_int32_t size, u_int32_t mask)
u_int32_t next, check;
struct p1212_rom *rom;
int i;
-
+
check = size;
if (p1212_iscomplete(t, &check) == -1) {
@@ -283,12 +283,12 @@ p1212_parse(u_int32_t *t, u_int32_t size, u_int32_t mask)
}
/* Calculate both a good and known bad crc. */
-
+
/* CRC's are calculated from everything except the first quad. */
-
- crc = p1212_calc_crc(0, &t[1], P1212_ROMFMT_GET_CRCLEN((ntohl(t[0]))),
+
+ crc = p1212_calc_crc(0, &t[1], P1212_ROMFMT_GET_CRCLEN((ntohl(t[0]))),
0);
-
+
romcrc = P1212_ROMFMT_GET_CRC((ntohl(t[0])));
if (crc != romcrc) {
crc1 = p1212_calc_crc(0, &t[1],
@@ -303,10 +303,10 @@ p1212_parse(u_int32_t *t, u_int32_t size, u_int32_t mask)
}
/* Now, walk the ROM. */
-
+
/* Get the initial offset for the root dir. */
-
- rom = malloc(sizeof(struct p1212_rom), M_DEVBUF, M_WAITOK);
+
+ rom = malloc(sizeof(struct p1212_rom), M_DEVBUF, M_WAITOK);
rom->len = P1212_ROMFMT_GET_INFOLEN((ntohl(t[0])));
next = rom->len + 1;
@@ -315,7 +315,7 @@ p1212_parse(u_int32_t *t, u_int32_t size, u_int32_t mask)
free(rom, M_DEVBUF);
return NULL;
}
-
+
/* Exclude the quad which covers the bus name. */
rom->len--;
@@ -330,12 +330,12 @@ p1212_parse(u_int32_t *t, u_int32_t size, u_int32_t mask)
/* The name field is always 4 bytes and always the 2nd field. */
strncpy(rom->name, (char *)&t[1], 4);
rom->name[4] = 0;
-
+
/*
* Fill out the root directory. All these values are hardcoded so the
* parse/print/match routines have a standard layout to work against.
*/
-
+
rom->root = malloc(sizeof(*rom->root), M_DEVBUF, M_WAITOK|M_ZERO);
rom->root->com.key.key_type = P1212_KEYTYPE_Directory;
rom->root->com.key.key_value = 0;
@@ -343,7 +343,7 @@ p1212_parse(u_int32_t *t, u_int32_t size, u_int32_t mask)
rom->root->com.key.val = 0;
TAILQ_INIT(&rom->root->data_root);
TAILQ_INIT(&rom->root->subdir_root);
-
+
if (p1212_parse_directory(rom->root, &t[next], mask)) {
DPRINTF(("Parse error in ROM. Bailing\n"));
p1212_free(rom);
@@ -365,7 +365,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
int i, module_vendor_flag, module_sw_flag, node_sw_flag, unit_sw_flag;
int node_capabilities_flag, offset, unit_location_flag, unitdir_cnt;
int leafoff;
-
+
t = addr;
dir = root;
@@ -376,11 +376,11 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
unitdir_cnt = 0;
offset = 0;
- while (dir) {
+ while (dir) {
dir->match = 0;
crclen = P1212_DIRENT_GET_LEN((ntohl(t[offset])));
romcrc = P1212_DIRENT_GET_CRC((ntohl(t[offset])));
-
+
crc = p1212_calc_crc(0, &t[offset + 1], crclen, 0);
if (crc != romcrc) {
crc1 = p1212_calc_crc(0, &t[offset + 1], crclen, 1);
@@ -398,7 +398,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
unit_sw_flag = 0;
unit_location_flag = 0;
offset++;
-
+
if ((dir->parent == NULL) && dir->com.key.val) {
DPRINTF(("Invalid root dir. key.val is 0x%0x and not"
" 0x0\n", dir->com.key.val));
@@ -409,7 +409,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
desc = ntohl(t[i]);
type = P1212_DIRENT_GET_KEYTYPE(desc);
val = P1212_DIRENT_GET_KEYVALUE(desc);
-
+
/*
* Sanity check for valid types/locations/etc.
*
@@ -417,7 +417,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
* ISO/IEC 13213:1194(ANSI/IEEE Std 1212, 1994 edition)
* for specifics.
*
- * XXX: These all really should be broken out into
+ * XXX: These all really should be broken out into
* subroutines as it's grown large and complicated
* in certain cases.
*/
@@ -445,7 +445,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
}
break;
}
-
+
switch (type) {
case P1212_KEYTYPE_Immediate:
if (p1212_validate_immed(val, mask)) {
@@ -492,7 +492,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
(unsigned short)type);
break;
}
-
+
/* Note flags for required fields. */
if (val == P1212_KEYVALUE_Module_Vendor_Id) {
@@ -502,13 +502,13 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
if (val == P1212_KEYVALUE_Node_Capabilities) {
node_capabilities_flag = 1;
}
-
+
if (val == P1212_KEYVALUE_Unit_Sw_Version)
unit_sw_flag = 1;
if (val == P1212_KEYVALUE_Unit_Location)
unit_location_flag = 1;
-
+
/*
* This is just easier to spell out. You can't have
* a module sw version if you include a node sw version
@@ -547,7 +547,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
}
node_sw_flag = 1;
}
-
+
if (val == P1212_KEYVALUE_Unit_Directory) {
if (module_sw_flag || node_sw_flag) {
DPRINTF(("Can't have unit directories "
@@ -557,7 +557,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
}
unitdir_cnt++;
}
-
+
/*
* Text descriptors are special. They describe the
* last entry they follow. So they need to be included
@@ -565,8 +565,8 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
* preventing one from putting text descriptors after
* directory descriptors. Also they can be a single
* value or a list of them in a directory format so
- * account for either. Finally if they're in a
- * directory those can be the only types in a
+ * account for either. Finally if they're in a
+ * directory those can be the only types in a
* directory.
*/
@@ -605,7 +605,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
}
com->textcnt = 1;
} else {
- i = p1212_parse_textdir(com,
+ i = p1212_parse_textdir(com,
&t[leafoff]);
if (i)
return 1;
@@ -624,7 +624,7 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
P1212_DIRENT_GET_VALUE((ntohl(t[i])));
com = &data->com;
- /*
+ /*
* Don't try and read the offset. It may be
* a register or something special. Generally
* these are node specific so let the upper
@@ -632,12 +632,12 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
*/
if ((type == P1212_KEYTYPE_Immediate) ||
- (type == P1212_KEYTYPE_Offset))
+ (type == P1212_KEYTYPE_Offset))
data->val = data->com.key.val;
-
+
data->leafdata = NULL;
TAILQ_INSERT_TAIL(&dir->data_root, data, data);
-
+
if (type == P1212_KEYTYPE_Leaf) {
leafoff = i + data->com.key.val;
data->leafdata =
@@ -647,10 +647,10 @@ p1212_parse_directory(struct p1212_dir *root, u_int32_t *addr, u_int32_t mask)
return 1;
}
}
- }
+ }
if (type == P1212_KEYTYPE_Directory) {
-
- sdir = malloc(sizeof(struct p1212_dir),
+
+ sdir = malloc(sizeof(struct p1212_dir),
M_DEVBUF, M_WAITOK|M_ZERO);
sdir->parent = dir;
sdir->com.key.key_type = type;
@@ -735,7 +735,7 @@ p1212_parse_leaf(u_int32_t *t)
return NULL;
}
t++;
-
+
/*
* Most of these are vendor specific so don't bother trying to map them
* out. Anything which needs them later on can extract them.
@@ -762,11 +762,11 @@ p1212_parse_textdir(struct p1212_com *com, u_int32_t *addr)
* A bit more complicated. A directory for a text descriptor can
* contain text descriptor leaf nodes only.
*/
-
+
com->text = NULL;
size = sizeof(struct p1212_text *);
t = addr;
-
+
crclen = P1212_DIRENT_GET_LEN((ntohl(t[0])));
romcrc = P1212_DIRENT_GET_CRC((ntohl(t[0])));
crc = p1212_calc_crc(0, &t[1], crclen, 0);
@@ -780,7 +780,7 @@ p1212_parse_textdir(struct p1212_com *com, u_int32_t *addr)
t++;
for (i = 0; i < crclen; i++) {
entry = ntohl(t[i]);
-
+
type = P1212_DIRENT_GET_KEYTYPE(entry);
val = P1212_DIRENT_GET_KEYVALUE(entry);
if ((type != P1212_KEYTYPE_Leaf) ||
@@ -792,7 +792,7 @@ p1212_parse_textdir(struct p1212_com *com, u_int32_t *addr)
p1212_keyvalue_strings[val], &t[i]-&addr[0]));
return 1;
}
-
+
new = P1212_DIRENT_GET_VALUE(entry);
com->text = realloc(com->text, size * (com->textcnt + 1),
M_DEVBUF, M_WAITOK);
@@ -814,12 +814,12 @@ p1212_parse_text_desc(u_int32_t *addr)
u_int16_t crclen, crc, crc1, romcrc;
struct p1212_textdata *text;
int size;
-
+
t = addr;
-
+
crclen = P1212_DIRENT_GET_LEN((ntohl(t[0])));
romcrc = P1212_DIRENT_GET_CRC((ntohl(t[0])));
-
+
if (crclen < P1212_TEXT_Min_Leaf_Length) {
DPRINTF(("Invalid ROM: text descriptor too short\n"));
return NULL;
@@ -864,7 +864,7 @@ p1212_find(struct p1212_dir *root, int type, int value, int flags)
numkeys = 0;
retkeys = NULL;
-
+
if ((type < P1212_KEYTYPE_Immediate) ||
(type > P1212_KEYTYPE_Directory)) {
#ifdef DIAGNOSTIC
@@ -880,7 +880,7 @@ p1212_find(struct p1212_dir *root, int type, int value, int flags)
#endif
return NULL;
}
-
+
if (flags & ~(P1212_FIND_SEARCHALL | P1212_FIND_RETURNALL)) {
#ifdef DIAGNOSTIC
printf("p1212_find: invalid flags - %d\n", flags);
@@ -893,7 +893,7 @@ p1212_find(struct p1212_dir *root, int type, int value, int flags)
* without using recursion. Using the walk API would have made things
* more complicated in trying to build up the return struct otherwise.
*/
-
+
dir = root;
sdir = NULL;
@@ -953,7 +953,7 @@ p1212_find(struct p1212_dir *root, int type, int value, int flags)
return retkeys;
}
-void
+void
p1212_walk(struct p1212_dir *root, void *arg,
void (*func)(struct p1212_key *, void *))
{
@@ -975,11 +975,11 @@ p1212_walk(struct p1212_dir *root, void *arg,
#endif
return;
}
-
+
/* Allow walking from any point. Just mark the starting point. */
parent = root->parent;
root->parent = NULL;
-
+
/*
* Depth first traversal that doesn't use recursion.
*
@@ -992,7 +992,7 @@ p1212_walk(struct p1212_dir *root, void *arg,
while (dir) {
func((struct p1212_key *) dir, arg);
- TAILQ_FOREACH(data, &dir->data_root, data)
+ TAILQ_FOREACH(data, &dir->data_root, data)
func((struct p1212_key *) data, arg);
if (!TAILQ_EMPTY(&dir->subdir_root)) {
sdir = TAILQ_FIRST(&dir->subdir_root);
@@ -1005,7 +1005,7 @@ p1212_walk(struct p1212_dir *root, void *arg,
} while ((sdir == NULL) && dir);
}
dir = sdir;
- }
+ }
root->parent = parent;
}
@@ -1014,17 +1014,17 @@ void
p1212_print(struct p1212_dir *dir)
{
int indent;
-
+
indent = 0;
-
+
p1212_walk(dir, &indent, p1212_print_node);
printf("\n");
}
-
+
static void
p1212_print_node(struct p1212_key *key, void *arg)
{
-
+
struct p1212_data *data;
struct p1212_dir *sdir, *dir;
int i, j, *indent;
@@ -1055,14 +1055,14 @@ p1212_print_node(struct p1212_key *key, void *arg)
/* Set the indent string up. 4 spaces per level. */
for (i = 0; i < (*indent * 4); i++)
printf(" ");
-
+
if (dir) {
printf("Directory: ");
if (dir->print)
dir->print(dir);
else {
if (key->key_value >=
- (sizeof(p1212_keyvalue_strings) / sizeof(char *)))
+ (sizeof(p1212_keyvalue_strings) / sizeof(char *)))
printf("Unknown type 0x%04hx\n",
(unsigned short)key->key_value);
else
@@ -1083,7 +1083,7 @@ p1212_print_node(struct p1212_key *key, void *arg)
data->print(data);
else {
if (key->key_value >=
- (sizeof(p1212_keyvalue_strings) / sizeof(char *)))
+ (sizeof(p1212_keyvalue_strings) / sizeof(char *)))
printf("Unknown type 0x%04hx: ",
(unsigned short)key->key_value);
else
@@ -1093,10 +1093,10 @@ p1212_print_node(struct p1212_key *key, void *arg)
printf("0x%08x\n", key->val);
#ifdef DIAGNOSTIC
if ((data->com.key.key_type == P1212_KEYTYPE_Leaf) &&
- (data->leafdata == NULL))
+ (data->leafdata == NULL))
panic("Invalid data node in configrom tree");
#endif
-
+
if (data->leafdata) {
for (i = 0; i < data->leafdata->len; i++) {
for (j = 0; j < (*indent * 4); j++)
@@ -1105,14 +1105,14 @@ p1212_print_node(struct p1212_key *key, void *arg)
data->leafdata->data[i]);
}
}
- if (data->com.textcnt)
+ if (data->com.textcnt)
for (i = 0; i < data->com.textcnt; i++) {
for (j = 0; j < (*indent * 4); j++)
printf(" ");
printf("Text descriptor: %s\n",
data->com.text[i]->text);
}
-
+
}
}
}
@@ -1126,7 +1126,7 @@ p1212_free(struct p1212_rom *rom)
int i;
dir = rom->root;
-
+
/* Avoid recursing. Find the bottom most node and work back. */
while (dir) {
if (!TAILQ_EMPTY(&dir->subdir_root)) {
@@ -1144,7 +1144,7 @@ p1212_free(struct p1212_rom *rom)
TAILQ_REMOVE(&dir->parent->subdir_root, dir,
dir);
}
-
+
while ((data = TAILQ_FIRST(&dir->data_root))) {
if (data->leafdata) {
if (data->leafdata->data)
@@ -1160,7 +1160,7 @@ p1212_free(struct p1212_rom *rom)
free(data, M_DEVBUF);
}
sdir = dir;
- if (dir->parent)
+ if (dir->parent)
dir = dir->parent;
else
dir = NULL;
@@ -1191,15 +1191,15 @@ p1212_calc_crc(u_int32_t crc, u_int32_t *data, int len, int broke)
int shift;
u_int32_t sum;
int i;
-
+
for (i = 0; i < len; i++) {
for (shift = 28; shift > 0; shift -= 4) {
sum = ((crc >> 12) ^ (ntohl(data[i]) >> shift)) &
0x0000000f;
crc = (crc << 4) ^ (sum << 12) ^ (sum << 5) ^ sum;
}
-
-
+
+
/* The broken implementation doesn't do the last shift. */
if (!broke) {
sum = ((crc >> 12) ^ ntohl(data[i])) & 0x0000000f;
@@ -1221,7 +1221,7 @@ p1212_match_units(struct device *sc, struct p1212_dir *dir,
struct p1212_dir **udirs;
struct device **devret, *dev;
int numdev;
-
+
/*
* Setup typical return val. Always allocate one extra pointer for a
* NULL guard end pointer.
@@ -1232,9 +1232,9 @@ p1212_match_units(struct device *sc, struct p1212_dir *dir,
devret[1] = NULL;
udirs = (struct p1212_dir **)p1212_find(dir, P1212_KEYTYPE_Directory,
- P1212_KEYVALUE_Unit_Directory,
+ P1212_KEYVALUE_Unit_Directory,
P1212_FIND_SEARCHALL|P1212_FIND_RETURNALL);
-
+
if (udirs) {
do {
dev = config_found_ia(sc, "fwnode", udirs, print);
@@ -1258,15 +1258,15 @@ p1212_match_units(struct device *sc, struct p1212_dir *dir,
return devret;
}
-/*
+/*
* Make these their own functions as they have slightly complicated rules.
*
* For example:
*
* Under normal circumstances only the 2 extent types can be offset
* types. However some spec's which use p1212 like SBP2 for
- * firewire/1394 will define a dependent info type as an offset value.
- * Allow the upper level code to flag this and pass it down during
+ * firewire/1394 will define a dependent info type as an offset value.
+ * Allow the upper level code to flag this and pass it down during
* parsing. The same thing applies to immediate types.
*/
@@ -1276,14 +1276,14 @@ p1212_validate_offset(u_int16_t val, u_int32_t mask)
if ((val == P1212_KEYVALUE_Node_Units_Extent) ||
(val == P1212_KEYVALUE_Node_Memory_Extent) ||
((mask & P1212_ALLOW_DEPENDENT_INFO_OFFSET_TYPE) &&
- ((val == P1212_KEYVALUE_Unit_Dependent_Info) ||
- (val == P1212_KEYVALUE_Node_Dependent_Info) ||
+ ((val == P1212_KEYVALUE_Unit_Dependent_Info) ||
+ (val == P1212_KEYVALUE_Node_Dependent_Info) ||
(val == P1212_KEYVALUE_Module_Dependent_Info))))
return 0;
return 1;
}
-static int
+static int
p1212_validate_immed(u_int16_t val, u_int32_t mask)
{
switch (val) {
diff --git a/sys/dev/std/ieee1212reg.h b/sys/dev/std/ieee1212reg.h
index 22e17aff11a..35be26d9cc0 100644
--- a/sys/dev/std/ieee1212reg.h
+++ b/sys/dev/std/ieee1212reg.h
@@ -1,11 +1,11 @@
-/* $NetBSD: ieee1212reg.h,v 1.8 2002/06/25 16:31:43 itojun Exp $ */
+/* $NetBSD: ieee1212reg.h,v 1.9 2005/02/27 00:27:49 perry Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
- * by
+ * by
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -68,7 +68,7 @@
/* ROM Formats
* 0x00-0x000000 Initializing
* 0x01-0xzzyyxx Minimal (zz-yy-xx is an OUI)
- * 0xii-0xcc-0xllll General (ii is info-length,
+ * 0xii-0xcc-0xllll General (ii is info-length,
* cc is crc-length, llll is length)
*/
@@ -242,7 +242,7 @@
/*
* XXX: Note that some of these go away if full p1212r support is done as
- * a lot of the restrictions were lifted there in what can go where.
+ * a lot of the restrictions were lifted there in what can go where.
*/
diff --git a/sys/dev/std/ieee1212var.h b/sys/dev/std/ieee1212var.h
index 54f3c7ea16d..74648aa223a 100644
--- a/sys/dev/std/ieee1212var.h
+++ b/sys/dev/std/ieee1212var.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ieee1212var.h,v 1.1 2002/02/27 04:58:51 jmc Exp $ */
+/* $NetBSD: ieee1212var.h,v 1.2 2005/02/27 00:27:49 perry Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@ struct p1212_com {
struct p1212_data {
struct p1212_com com;
-
+
u_int32_t val;
struct p1212_leafdata *leafdata;
void (*print)(struct p1212_data *);