Lines Matching refs:len
57 int start, int len) in pnpbios_parse_allocated_ioresource() argument
60 int end = start + len - 1; in pnpbios_parse_allocated_ioresource()
62 if (len <= 0 || end >= 0x10003) in pnpbios_parse_allocated_ioresource()
69 int start, int len) in pnpbios_parse_allocated_memresource() argument
72 int end = start + len - 1; in pnpbios_parse_allocated_memresource()
74 if (len <= 0) in pnpbios_parse_allocated_memresource()
84 unsigned int len, tag; in pnpbios_parse_allocated_resource_data() local
98 len = (p[2] << 8) | p[1]; in pnpbios_parse_allocated_resource_data()
101 len = p[0] & 0x07; in pnpbios_parse_allocated_resource_data()
108 if (len != 9) in pnpbios_parse_allocated_resource_data()
124 if (len != 17) in pnpbios_parse_allocated_resource_data()
132 if (len != 9) in pnpbios_parse_allocated_resource_data()
140 if (len < 2 || len > 3) in pnpbios_parse_allocated_resource_data()
156 if (len != 2) in pnpbios_parse_allocated_resource_data()
170 if (len != 7) in pnpbios_parse_allocated_resource_data()
182 if (len != 3) in pnpbios_parse_allocated_resource_data()
197 tag, len); in pnpbios_parse_allocated_resource_data()
203 p += len + 3; in pnpbios_parse_allocated_resource_data()
205 p += len + 1; in pnpbios_parse_allocated_resource_data()
221 resource_size_t min, max, align, len; in pnpbios_parse_mem_option() local
227 len = ((p[11] << 8) | p[10]) << 8; in pnpbios_parse_mem_option()
229 pnp_register_mem_resource(dev, option_flags, min, max, align, len, in pnpbios_parse_mem_option()
237 resource_size_t min, max, align, len; in pnpbios_parse_mem32_option() local
243 len = (p[19] << 24) | (p[18] << 16) | (p[17] << 8) | p[16]; in pnpbios_parse_mem32_option()
245 pnp_register_mem_resource(dev, option_flags, min, max, align, len, in pnpbios_parse_mem32_option()
253 resource_size_t base, len; in pnpbios_parse_fixed_mem32_option() local
257 len = (p[11] << 24) | (p[10] << 16) | (p[9] << 8) | p[8]; in pnpbios_parse_fixed_mem32_option()
259 pnp_register_mem_resource(dev, option_flags, base, base, 0, len, flags); in pnpbios_parse_fixed_mem32_option()
292 resource_size_t min, max, align, len; in pnpbios_parse_port_option() local
298 len = p[7]; in pnpbios_parse_port_option()
300 pnp_register_port_resource(dev, option_flags, min, max, align, len, in pnpbios_parse_port_option()
308 resource_size_t base, len; in pnpbios_parse_fixed_port_option() local
311 len = p[3]; in pnpbios_parse_fixed_port_option()
312 pnp_register_port_resource(dev, option_flags, base, base, 0, len, in pnpbios_parse_fixed_port_option()
320 unsigned int len, tag; in pnpbios_parse_resource_option_data() local
333 len = (p[2] << 8) | p[1]; in pnpbios_parse_resource_option_data()
336 len = p[0] & 0x07; in pnpbios_parse_resource_option_data()
343 if (len != 9) in pnpbios_parse_resource_option_data()
345 pnpbios_parse_mem_option(dev, p, len, option_flags); in pnpbios_parse_resource_option_data()
349 if (len != 17) in pnpbios_parse_resource_option_data()
351 pnpbios_parse_mem32_option(dev, p, len, option_flags); in pnpbios_parse_resource_option_data()
355 if (len != 9) in pnpbios_parse_resource_option_data()
357 pnpbios_parse_fixed_mem32_option(dev, p, len, in pnpbios_parse_resource_option_data()
362 if (len < 2 || len > 3) in pnpbios_parse_resource_option_data()
364 pnpbios_parse_irq_option(dev, p, len, option_flags); in pnpbios_parse_resource_option_data()
368 if (len != 2) in pnpbios_parse_resource_option_data()
370 pnpbios_parse_dma_option(dev, p, len, option_flags); in pnpbios_parse_resource_option_data()
374 if (len != 7) in pnpbios_parse_resource_option_data()
376 pnpbios_parse_port_option(dev, p, len, option_flags); in pnpbios_parse_resource_option_data()
384 if (len != 3) in pnpbios_parse_resource_option_data()
386 pnpbios_parse_fixed_port_option(dev, p, len, in pnpbios_parse_resource_option_data()
391 if (len > 1) in pnpbios_parse_resource_option_data()
394 if (len > 0) in pnpbios_parse_resource_option_data()
400 if (len != 0) in pnpbios_parse_resource_option_data()
411 tag, len); in pnpbios_parse_resource_option_data()
417 p += len + 3; in pnpbios_parse_resource_option_data()
419 p += len + 1; in pnpbios_parse_resource_option_data()
435 int len, tag; in pnpbios_parse_compatible_ids() local
447 len = (p[2] << 8) | p[1]; in pnpbios_parse_compatible_ids()
450 len = p[0] & 0x07; in pnpbios_parse_compatible_ids()
458 len >= PNP_NAME_LEN ? PNP_NAME_LEN - 2 : len); in pnpbios_parse_compatible_ids()
459 dev->name[len >= in pnpbios_parse_compatible_ids()
460 PNP_NAME_LEN ? PNP_NAME_LEN - 1 : len] = '\0'; in pnpbios_parse_compatible_ids()
464 if (len != 4) in pnpbios_parse_compatible_ids()
481 tag, len); in pnpbios_parse_compatible_ids()
487 p += len + 3; in pnpbios_parse_compatible_ids()
489 p += len + 1; in pnpbios_parse_compatible_ids()
505 unsigned long len; in pnpbios_encode_mem() local
509 len = resource_size(res); in pnpbios_encode_mem()
512 len = 0; in pnpbios_encode_mem()
519 p[10] = (len >> 8) & 0xff; in pnpbios_encode_mem()
520 p[11] = ((len >> 8) >> 8) & 0xff; in pnpbios_encode_mem()
522 pnp_dbg(&dev->dev, " encode mem %#lx-%#lx\n", base, base + len - 1); in pnpbios_encode_mem()
529 unsigned long len; in pnpbios_encode_mem32() local
533 len = resource_size(res); in pnpbios_encode_mem32()
536 len = 0; in pnpbios_encode_mem32()
547 p[16] = len & 0xff; in pnpbios_encode_mem32()
548 p[17] = (len >> 8) & 0xff; in pnpbios_encode_mem32()
549 p[18] = (len >> 16) & 0xff; in pnpbios_encode_mem32()
550 p[19] = (len >> 24) & 0xff; in pnpbios_encode_mem32()
552 pnp_dbg(&dev->dev, " encode mem32 %#lx-%#lx\n", base, base + len - 1); in pnpbios_encode_mem32()
559 unsigned long len; in pnpbios_encode_fixed_mem32() local
563 len = resource_size(res); in pnpbios_encode_fixed_mem32()
566 len = 0; in pnpbios_encode_fixed_mem32()
573 p[8] = len & 0xff; in pnpbios_encode_fixed_mem32()
574 p[9] = (len >> 8) & 0xff; in pnpbios_encode_fixed_mem32()
575 p[10] = (len >> 16) & 0xff; in pnpbios_encode_fixed_mem32()
576 p[11] = (len >> 24) & 0xff; in pnpbios_encode_fixed_mem32()
579 base + len - 1); in pnpbios_encode_fixed_mem32()
617 unsigned long len; in pnpbios_encode_port() local
621 len = resource_size(res); in pnpbios_encode_port()
624 len = 0; in pnpbios_encode_port()
631 p[7] = len & 0xff; in pnpbios_encode_port()
633 pnp_dbg(&dev->dev, " encode io %#lx-%#lx\n", base, base + len - 1); in pnpbios_encode_port()
640 unsigned long len = resource_size(res); in pnpbios_encode_fixed_port() local
644 len = resource_size(res); in pnpbios_encode_fixed_port()
647 len = 0; in pnpbios_encode_fixed_port()
652 p[3] = len & 0xff; in pnpbios_encode_fixed_port()
655 base + len - 1); in pnpbios_encode_fixed_port()
663 unsigned int len, tag; in pnpbios_encode_allocated_resource_data() local
673 len = (p[2] << 8) | p[1]; in pnpbios_encode_allocated_resource_data()
676 len = p[0] & 0x07; in pnpbios_encode_allocated_resource_data()
683 if (len != 9) in pnpbios_encode_allocated_resource_data()
691 if (len != 17) in pnpbios_encode_allocated_resource_data()
699 if (len != 9) in pnpbios_encode_allocated_resource_data()
707 if (len < 2 || len > 3) in pnpbios_encode_allocated_resource_data()
715 if (len != 2) in pnpbios_encode_allocated_resource_data()
723 if (len != 7) in pnpbios_encode_allocated_resource_data()
735 if (len != 3) in pnpbios_encode_allocated_resource_data()
750 tag, len); in pnpbios_encode_allocated_resource_data()
756 p += len + 3; in pnpbios_encode_allocated_resource_data()
758 p += len + 1; in pnpbios_encode_allocated_resource_data()