esp: correctly fill bus id with requested lun
authorHervé Poussineau <hpoussin@reactos.org>
Sat, 2 Jul 2011 15:23:00 +0000 (17:23 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 2 Jul 2011 18:50:19 +0000 (18:50 +0000)
This bug showed up after 1455084ea2c48abf23c4e4e15e378ee43457f381, and
may be seen only on operating systems *not* using DMA to give commands
to SCSI adapter.

Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/esp.c

index 6d3f5d239b9992d5bf585c0d94893fe62053eeca..8e95672f0ee0367cc1c75aa2ef6990bdc7739c34 100644 (file)
--- a/hw/esp.c
+++ b/hw/esp.c
@@ -211,7 +211,7 @@ static uint32_t get_cmd(ESPState *s, uint8_t *buf)
     } else {
         dmalen = s->ti_size;
         memcpy(buf, s->ti_buf, dmalen);
-        buf[0] = 0;
+        buf[0] = buf[2] >> 5;
     }
     DPRINTF("get_cmd: len %d target %d\n", dmalen, target);