Lines Matching refs:raw_cmd
606 static __inline__ void print_message(RawRequest_t *raw_cmd,const char *message) in print_message() argument
613 for (i=0; i< raw_cmd->cmd_count; i++) in print_message()
615 (int)raw_cmd->cmd[i] ); in print_message()
617 for (i=0; i< raw_cmd->reply_count; i++) in print_message()
619 (int)raw_cmd->reply[i] ); in print_message()
621 code = (raw_cmd->reply[0] <<16) + in print_message()
622 (raw_cmd->reply[1] << 8) + in print_message()
623 raw_cmd->reply[2]; in print_message()
638 int send_one_cmd(int fd, RawRequest_t *raw_cmd, const char *message) in send_one_cmd() argument
640 if (ioctl( fd, FDRAWCMD, raw_cmd) >= 0) { in send_one_cmd()
641 if (raw_cmd->reply_count < 7) { in send_one_cmd()
674 int analyze_one_reply(RawRequest_t *raw_cmd, int *bytes, int do_print) in analyze_one_reply() argument
677 if(raw_cmd->reply_count == 7) { in analyze_one_reply()
680 if (raw_cmd->reply[3] != raw_cmd->cmd[2]) { in analyze_one_reply()
682 end = raw_cmd->cmd[6] + 1; in analyze_one_reply()
684 end = raw_cmd->reply[5]; in analyze_one_reply()
687 *bytes = end - raw_cmd->cmd[4]; in analyze_one_reply()
689 *bytes = *bytes << (7 + raw_cmd->cmd[5]); in analyze_one_reply()
693 switch(raw_cmd->reply[0] & 0xc0){ in analyze_one_reply()
695 if ((raw_cmd->reply[0] & 0x38) == 0 && in analyze_one_reply()
696 (raw_cmd->reply[1]) == 0x80 && in analyze_one_reply()
697 (raw_cmd->reply[2]) == 0) { in analyze_one_reply()
698 *bytes += 1 << (7 + raw_cmd->cmd[5]); in analyze_one_reply()
702 if ( raw_cmd->reply[1] & ST1_WP ){ in analyze_one_reply()
709 print_message(raw_cmd, ""); in analyze_one_reply()
725 if(raw_cmd->flags & FD_RAW_MORE) in analyze_one_reply()