Lines Matching defs:rhdr
830 struct iscsi_cmd_rsp *rhdr = (struct iscsi_cmd_rsp *)hdr;
834 iscsi_update_cmdsn(session, (struct iscsi_nopin*)rhdr);
835 conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1;
837 sc->result = (DID_OK << 16) | rhdr->cmd_status;
839 if (rhdr->response != ISCSI_STATUS_CMD_COMPLETED) {
844 if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION) {
867 if (rhdr->flags & (ISCSI_FLAG_CMD_BIDI_UNDERFLOW |
869 int res_count = be32_to_cpu(rhdr->bi_residual_count);
872 (rhdr->flags & ISCSI_FLAG_CMD_BIDI_OVERFLOW ||
876 sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status;
879 if (rhdr->flags & (ISCSI_FLAG_CMD_UNDERFLOW |
881 int res_count = be32_to_cpu(rhdr->residual_count);
884 (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW ||
889 sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status;
908 struct iscsi_data_rsp *rhdr = (struct iscsi_data_rsp *)hdr;
911 if (!(rhdr->flags & ISCSI_FLAG_DATA_STATUS))
915 sc->result = (DID_OK << 16) | rhdr->cmd_status;
916 conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1;
917 if (rhdr->flags & (ISCSI_FLAG_DATA_UNDERFLOW |
919 int res_count = be32_to_cpu(rhdr->residual_count);
922 (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW ||
926 sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status;
955 static void iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr)
960 if (!rhdr && conn->ping_task)
967 if (rhdr) {
968 memcpy(hdr.lun, rhdr->lun, 8);
969 hdr.ttt = rhdr->ttt;
977 else if (!rhdr) {