struct scsi_cmnd *sc = ctask->sc;
 
                conn->exp_statsn = be32_to_cpu(rhdr->statsn) + 1;
-               if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) {
+               if (rhdr->flags & ISCSI_FLAG_DATA_UNDERFLOW) {
                        int res_count = be32_to_cpu(rhdr->residual_count);
 
                        if (res_count > 0 &&
                        } else
                                sc->result = (DID_BAD_TARGET << 16) |
                                        rhdr->cmd_status;
-               } else if (rhdr->flags & ISCSI_FLAG_CMD_BIDI_UNDERFLOW)
-                       sc->result = (DID_BAD_TARGET << 16) | rhdr->cmd_status;
-               else if (rhdr->flags & ISCSI_FLAG_CMD_OVERFLOW) {
+               } else if (rhdr->flags & ISCSI_FLAG_DATA_OVERFLOW) {
                        sc->resid = be32_to_cpu(rhdr->residual_count);
                        sc->result = (DID_OK << 16) | rhdr->cmd_status;
                } else