Lines Matching defs:rhdr
873 struct iscsi_scsi_rsp *rhdr = (struct iscsi_scsi_rsp *)hdr;
877 iscsi_update_cmdsn(session, (struct iscsi_nopin*)rhdr);
878 conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1;
880 sc->result = (DID_OK << 16) | rhdr->cmd_status;
903 if (rhdr->response != ISCSI_STATUS_CMD_COMPLETED) {
908 if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION) {
931 if (rhdr->flags & (ISCSI_FLAG_CMD_BIDI_UNDERFLOW |
933 sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status;
936 if (rhdr->flags & (ISCSI_FLAG_CMD_UNDERFLOW |
938 int res_count = be32_to_cpu(rhdr->residual_count);
941 (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW ||
946 sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status;
968 struct iscsi_data_rsp *rhdr = (struct iscsi_data_rsp *)hdr;
971 if (!(rhdr->flags & ISCSI_FLAG_DATA_STATUS))
975 sc->result = (DID_OK << 16) | rhdr->cmd_status;
976 conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1;
977 if (rhdr->flags & (ISCSI_FLAG_DATA_UNDERFLOW |
979 int res_count = be32_to_cpu(rhdr->residual_count);
982 (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW ||
986 sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status;
1016 static int iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr)
1021 if (!rhdr) {
1030 if (rhdr) {
1031 hdr.lun = rhdr->lun;
1032 hdr.ttt = rhdr->ttt;
1041 if (!rhdr)
1045 if (!rhdr)
1051 } else if (!rhdr) {