mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-03 12:30:08 +00:00
scsibus: push_data of zero bytes is ok.
It just means the data hasn't been put on the fifo yet.
This commit is contained in:
parent
61576d4032
commit
abe0c14301
@ -263,11 +263,18 @@ bool ScsiBus::pull_data(const int id, uint8_t* dst_ptr, const int size)
|
||||
|
||||
bool ScsiBus::push_data(const int id, const uint8_t* src_ptr, const int size)
|
||||
{
|
||||
if (!this->devices[id]->rcv_data(src_ptr, size)) {
|
||||
LOG_F(ERROR, "ScsiBus: error while transferring I->T data!");
|
||||
if (!this->devices[id]) {
|
||||
LOG_F(ERROR, "%s: no device %d for push_data %d bytes", this->get_name().c_str(), id, size);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this->devices[id]->rcv_data(src_ptr, size)) {
|
||||
if (size) {
|
||||
LOG_F(ERROR, "%s: error while transferring I->T data!", this->get_name().c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user