Lines Matching refs:buf

318 	u8 temp, buf[2];  in af9005_read_tuner_registers()  local
320 buf[0] = addr; /* tuner i2c address */ in af9005_read_tuner_registers()
321 buf[1] = values[0]; /* tuner register */ in af9005_read_tuner_registers()
327 ret = af9005_write_tuner_registers(d, 0x00c0, buf, 2); in af9005_read_tuner_registers()
368 u8 buf[3]; in af9005_i2c_write() local
374 buf[0] = i2caddr; in af9005_i2c_write()
375 buf[1] = reg + (u8) i; in af9005_i2c_write()
376 buf[2] = data[i]; in af9005_i2c_write()
380 buf, 3); in af9005_i2c_write()
431 reg = *msg[0].buf; in af9005_i2c_xfer()
433 value = msg[1].buf; in af9005_i2c_xfer()
439 reg = msg[0].buf[0]; in af9005_i2c_xfer()
441 value = &msg[0].buf[1]; in af9005_i2c_xfer()
467 u8 buf[64]; in af9005_send_command() local
483 buf[0] = (u8) (packet_len & 0xff); in af9005_send_command()
484 buf[1] = (u8) ((packet_len & 0xff00) >> 8); in af9005_send_command()
486 buf[2] = 0x26; /* packet type */ in af9005_send_command()
487 buf[3] = wlen + 3; in af9005_send_command()
488 buf[4] = st->sequence++; in af9005_send_command()
489 buf[5] = command; in af9005_send_command()
490 buf[6] = wlen; in af9005_send_command()
492 buf[7 + i] = wbuf[i]; in af9005_send_command()
493 ret = dvb_usb_generic_rw(d, buf, wlen + 7, ibuf, rlen + 7, 0); in af9005_send_command()
500 if (ibuf[4] != buf[4]) { in af9005_send_command()
567 u8 buf[FW_BULKOUT_SIZE + 2]; in af9005_boot_packet() local
570 memset(buf, 0, sizeof(buf)); in af9005_boot_packet()
571 buf[0] = (u8) (FW_BULKOUT_SIZE & 0xff); in af9005_boot_packet()
572 buf[1] = (u8) ((FW_BULKOUT_SIZE >> 8) & 0xff); in af9005_boot_packet()
575 buf[2] = 0x11; in af9005_boot_packet()
576 buf[3] = 0x04; in af9005_boot_packet()
577 buf[4] = 0x00; /* sequence number, original driver doesn't increment it here */ in af9005_boot_packet()
578 buf[5] = 0x03; in af9005_boot_packet()
579 checksum = buf[4] + buf[5]; in af9005_boot_packet()
580 buf[6] = (u8) ((checksum >> 8) & 0xff); in af9005_boot_packet()
581 buf[7] = (u8) (checksum & 0xff); in af9005_boot_packet()
584 buf[2] = 0x11; in af9005_boot_packet()
585 buf[3] = 0x04; in af9005_boot_packet()
586 buf[4] = 0x00; /* sequence number, original driver doesn't increment it here */ in af9005_boot_packet()
587 buf[5] = 0x01; in af9005_boot_packet()
588 checksum = buf[4] + buf[5]; in af9005_boot_packet()
589 buf[6] = (u8) ((checksum >> 8) & 0xff); in af9005_boot_packet()
590 buf[7] = (u8) (checksum & 0xff); in af9005_boot_packet()
593 buf[2] = 0x10; in af9005_boot_packet()
594 buf[3] = 0x08; in af9005_boot_packet()
595 buf[4] = 0x00; /* sequence number, original driver doesn't increment it here */ in af9005_boot_packet()
596 buf[5] = 0x97; in af9005_boot_packet()
597 buf[6] = 0xaa; in af9005_boot_packet()
598 buf[7] = 0x55; in af9005_boot_packet()
599 buf[8] = 0xa5; in af9005_boot_packet()
600 buf[9] = 0x5a; in af9005_boot_packet()
603 checksum += buf[i]; in af9005_boot_packet()
604 buf[10] = (u8) ((checksum >> 8) & 0xff); in af9005_boot_packet()
605 buf[11] = (u8) (checksum & 0xff); in af9005_boot_packet()
612 debug_dump(buf, FW_BULKOUT_SIZE + 2, deb_fw); in af9005_boot_packet()
616 buf, FW_BULKOUT_SIZE + 2, &act_len, 2000); in af9005_boot_packet()
624 memset(buf, 0, 9); in af9005_boot_packet()
626 usb_rcvbulkpipe(udev, 0x01), buf, 9, &act_len, 2000); in af9005_boot_packet()
632 debug_dump(buf, act_len, deb_fw); in af9005_boot_packet()
636 if (buf[2] != 0x11) { in af9005_boot_packet()
640 if (buf[3] != 0x05) { in af9005_boot_packet()
644 if (buf[4] != 0x00) { in af9005_boot_packet()
648 if (buf[5] != 0x04) { in af9005_boot_packet()
653 checksum += buf[i]; in af9005_boot_packet()
654 if (buf[7] * 256 + buf[8] != checksum) { in af9005_boot_packet()
658 *reply = buf[6]; in af9005_boot_packet()
661 if (buf[2] != 0x11) { in af9005_boot_packet()
665 if (buf[3] != 0x05) { in af9005_boot_packet()
669 if (buf[4] != 0x00) { in af9005_boot_packet()
673 if (buf[5] != 0x02) { in af9005_boot_packet()
678 checksum += buf[i]; in af9005_boot_packet()
679 if (buf[7] * 256 + buf[8] != checksum) { in af9005_boot_packet()
683 *reply = buf[6]; in af9005_boot_packet()
686 if (buf[2] != 0x10) { in af9005_boot_packet()
690 if (buf[3] != 0x05) { in af9005_boot_packet()
694 if (buf[4] != 0x00) { in af9005_boot_packet()
698 if (buf[5] != 0x01) { in af9005_boot_packet()
702 if (buf[6] != 0x10) { in af9005_boot_packet()
707 checksum += buf[i]; in af9005_boot_packet()
708 if (buf[7] * 256 + buf[8] != checksum) { in af9005_boot_packet()
723 u8 buf[FW_BULKOUT_SIZE + 2]; in af9005_download_firmware() local
734 buf[0] = (u8) (FW_BULKOUT_SIZE & 0xff); in af9005_download_firmware()
735 buf[1] = (u8) ((FW_BULKOUT_SIZE >> 8) & 0xff); in af9005_download_firmware()
737 memcpy(&buf[2], fw->data + i * FW_BULKOUT_SIZE, in af9005_download_firmware()
740 debug_dump(buf, FW_BULKOUT_SIZE + 2, deb_fw); in af9005_download_firmware()
743 buf, FW_BULKOUT_SIZE + 2, &act_len, 1000); in af9005_download_firmware()
800 u8 buf[8]; in af9005_frontend_attach() local
813 af9005_read_eeprom(adap->dev, i, buf, 8); in af9005_frontend_attach()
815 debug_dump(buf, 8, printk); in af9005_frontend_attach()