[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 04/14] cuda.c: fix CUDA ADB error packet format
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 04/14] cuda.c: fix CUDA ADB error packet format |
Date: |
Thu, 12 Nov 2015 15:38:33 +1100 |
From: Mark Cave-Ayland <address@hidden>
According to MOL, ADB error packets should be of the form (type, status, cmd)
rather than just (type, status). This fixes ADB device detection under MacOS 9.
Signed-off-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/misc/macio/cuda.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c
index 0fd75b3..bfcdcae 100644
--- a/hw/misc/macio/cuda.c
+++ b/hw/misc/macio/cuda.c
@@ -560,19 +560,21 @@ static void cuda_receive_packet_from_host(CUDAState *s,
switch(data[0]) {
case ADB_PACKET:
{
- uint8_t obuf[ADB_MAX_OUT_LEN + 2];
+ uint8_t obuf[ADB_MAX_OUT_LEN + 3];
int olen;
olen = adb_request(&s->adb_bus, obuf + 2, data + 1, len - 1);
if (olen > 0) {
obuf[0] = ADB_PACKET;
obuf[1] = 0x00;
+ cuda_send_packet_to_host(s, obuf, olen + 2);
} else {
/* error */
obuf[0] = ADB_PACKET;
obuf[1] = -olen;
+ obuf[2] = data[1];
olen = 0;
+ cuda_send_packet_to_host(s, obuf, olen + 3);
}
- cuda_send_packet_to_host(s, obuf, olen + 2);
}
break;
case CUDA_PACKET:
--
2.5.0
- [Qemu-ppc] [PULL 00/14] ppc-next queue 20151112, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 01/14] PPC: Allow Rc bit to be set on mtspr, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 00/14] ppc-next queue 20151112, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 02/14] PPC: Fix lswx bounds checks, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 07/14] cuda.c: implement dummy IIC access commands, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 04/14] cuda.c: fix CUDA ADB error packet format,
David Gibson <=
- [Qemu-ppc] [PULL 08/14] cuda.c: fix CUDA SR interrupt clearing, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 05/14] cuda.c: fix CUDA_PACKET response packet format, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 03/14] PPC: mac99: Always add USB controller, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 06/14] cuda.c: implement simple CUDA_GET_6805_ADDR command, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 09/14] cuda.c: add defines for CUDA registers, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 12/14] cuda.c: fix T2 timer and enable its interrupt, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 13/14] cuda.c: add delay to setting of SR_INT bit, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 11/14] cuda.c: rename get_counter() state variable from s to ti for consistency, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 10/14] cuda.c: refactor get_tb() so that the time can be passed in, David Gibson, 2015/11/11
- [Qemu-ppc] [PULL 14/14] monitor/target-ppc: Define target_get_monitor_def, David Gibson, 2015/11/11