sheepdog: move coroutine send/recv function to generic code
Outside coroutines, avoid busy waiting on EAGAIN by temporarilymaking the socket blocking.
The API of qemu_recvv/qemu_sendv is slightly different fromdo_readv/do_writev because they do not handle coroutines. It...
add qemu_send_full and qemu_recv_full
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
sd: Remember to reset .expecting_acmd on reset.
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/sd.c: Clear status bits when read via response r6
Response format r6 includes a subset of the status bits;clear the clear-on-read bits which are read by an r6 response.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/sd.c: Correct handling of APP_CMD status bit
Fix some bugs in our implementation of the APP_CMD status bit: * the response to an ACMD should have APP_CMD set, not cleared * if an illegal ACMD is sent then the next command should be handled as a normal command...
hw/sd.c: Correct handling of type B SD status bits
Correct how we handle the type B ("cleared on valid command")status bits. In particular, the CURRENT_STATE bits in a responseshould be the state of the card when it received that command,not the state when it received the preceding command. (This is...
hw/sd.c: Set ILLEGAL_COMMAND for ACMDs in invalid state
App commands in an invalid state should set ILLEGAL_COMMAND, notmerely return a zero response.
hw/sd.c: Handle CRC and locked-card errors in normal code path
Handle returning CRC and locked-card errors in the same code pathwe use for other responses. This makes no difference in behaviourbut means that these error responses will be printed by the debug...
hw/sd.c: Handle illegal commands in sd_do_command
Add an extra sd_illegal value to the sd_rsp_type_t enum so thatsd_app_command() and sd_normal_command() can tell sd_do_command()that the command was illegal. This is needed so we can do thingslike reset certain status bits only on receipt of a valid command....
hw/sd.c: When setting ADDRESS_ERROR bit, don't clear everything else
Fix a typo that meant that ADDRESS_ERRORs setting or clearing writeprotection would clear every other bit in the status register.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
View all revisions | View revisions
Also available in: Atom