diff --git a/cpp/controllers/generic_controller.cpp b/cpp/controllers/generic_controller.cpp index cb7ee76d..36517df2 100644 --- a/cpp/controllers/generic_controller.cpp +++ b/cpp/controllers/generic_controller.cpp @@ -395,12 +395,7 @@ void GenericController::Receive() return; } - if (IsByteTransfer()) { - ReceiveBytes(); - return; - } - - const bool in_transfer = UpdateTransferSize(); + const bool in_transfer = IsByteTransfer() ? false : UpdateTransferSize(); // Processing after receiving data switch (GetPhase()) { @@ -450,51 +445,6 @@ void GenericController::Receive() } } -void GenericController::ReceiveBytes() -{ - bool result = true; - - // Processing after receiving data - switch (GetPhase()) { - case phase_t::dataout: - result = XferOut(false); - break; - - case phase_t::msgout: - SetMessage(GetBuffer()[0]); - - XferMsg(GetMessage()); - - // Clear message data in preparation for Message In - SetMessage(0x00); - break; - - default: - break; - } - - if (!result) { - Error(sense_key::aborted_command, asc::controller_receive_bytes_result); - return; - } - - // Move to next phase - switch (GetPhase()) { - case phase_t::msgout: - ProcessMessage(); - break; - - case phase_t::dataout: - Status(); - break; - - default: - error("Unexpected bus phase: " + Bus::GetPhaseName(GetPhase())); - assert(false); - break; - } -} - bool GenericController::XferOut(bool cont) { if (!IsByteTransfer()) { diff --git a/cpp/controllers/generic_controller.h b/cpp/controllers/generic_controller.h index 614fec29..11750649 100644 --- a/cpp/controllers/generic_controller.h +++ b/cpp/controllers/generic_controller.h @@ -58,7 +58,6 @@ class GenericController : public AbstractController void Send(); virtual void XferMsg(int) = 0; bool XferOutBlockOriented(bool); - void ReceiveBytes(); void LogCdb() const;