Home | History | Annotate | Download | only in cardbus

Lines Matching defs:tuple

310 parse_tuple(u_int8_t *tuple, int len, void *data)
316 switch (tuple[0]) {
318 if (tuple[1] != 4) {
320 __func__, tuple[1]));
323 cis->manufacturer = tuple[2] | (tuple[3] << 8);
324 cis->product = tuple[4] | (tuple[5] << 8);
328 memcpy(cis->cis1_info_buf, tuple + 2, tuple[1]);
333 if (p >= cis->cis1_info_buf + tuple[1] || *p == '\xff')
344 if (tuple[1] != 6) {
346 __func__, tuple[1]));
349 bar_index = tuple[2] & 7;
351 DPRINTF(("%s: invalid ASI in BAR tuple\n", __func__));
355 cis->bar[bar_index].flags = tuple[2];
357 (tuple[4] << 0) |
358 (tuple[5] << 8) |
359 (tuple[6] << 16) |
360 (tuple[7] << 24);
364 cis->funcid = tuple[2];
370 if (tuple[1] >= 2 &&
372 tuple[2] == 0) {
373 cis->funce.serial.uart_type = tuple[3] & 0x1f;
379 if (tuple[1] >= 8 &&
380 tuple[2] == PCMCIA_TPLFE_TYPE_LAN_NID) {
381 if (tuple[3] >
385 __func__, tuple[3]));
389 tuple + 4, tuple[3]);
402 * reads and analyses tuple, sets configuration index.
608 u_int8_t *tuple = malloc(TUPLESIZE, M_DEVBUF, M_WAITOK);
610 tuple, TUPLESIZE)) {
615 decode_tuples(tuple, TUPLESIZE,
618 decode_tuples(tuple, TUPLESIZE,
621 free(tuple, M_DEVBUF);
923 decode_tuples(u_int8_t *tuple, int buflen, tuple_decode_func func, void *data)
925 u_int8_t *tp = tuple;
927 if (PCMCIA_CISTPL_LINKTARGET != *tuple) {
928 DPRINTF(("WRONG TUPLE: 0x%x\n", *tuple));
932 while ((tp = decode_tuple(tp, tuple + buflen, func, data)) != NULL)
939 decode_tuple(u_int8_t *tuple, u_int8_t *end,
945 type = tuple[0];
952 if (tuple + 2 > end)
954 len = tuple[1] + 2;
958 if (tuple + len > end)
961 (*func)(tuple, len, data);
963 if (type == PCMCIA_CISTPL_END || tuple + len == end)
966 return (tuple + len);
1117 print_tuple(u_int8_t *tuple, int len, void *data)
1121 printf("tuple: %s len %d\n", tuple_name(tuple[0]), len);
1127 printf(" %x", tuple[i]);