Skip to contentSkip to conversation

esp: correctly fill bus id with requested lun

PATCH Applied Hervé Poussineau 3 participants 3 messages Jul 2, 2011 – Jul 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 esp: correctly fill bus id with requested lun

This bug showed up after 1455084ea2c48abf23c4e4e15e378ee43457f381, and may be seen only on operating systems *not* using DMA to give commands to SCSI adapter.

---
 hw/esp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/esp.c +1 -1
index 6d3f5d2..8e95672 100644
@@ -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);
 
Signature · 1 line
1.7.5.4
Applied
#1 lore raw

Thanks, applied.

2011/7/2 Hervé Poussineau <[email protected]>:

Quoted 27 lines

This bug showed up after 1455084ea2c48abf23c4e4e15e378ee43457f381, and may be seen only on operating systems *not* using DMA to give commands to SCSI adapter.

---
 hw/esp.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
hw/esp.c +1 -2
index 6d3f5d2..8e95672 100644
@@ -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);
 
--

1.7.5.4

#2 lore raw
In reply to Hervé Poussineau

2011/7/2 Hervé Poussineau <[email protected]>:

Quoted 14 lines

This bug showed up after 1455084ea2c48abf23c4e4e15e378ee43457f381, and may be seen only on operating systems *not* using DMA to give commands to SCSI adapter.

---
 hw/esp.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
hw/esp.c +0 -0
index 6d3f5d2..8e95672 100644

hw/esp.c static uint32_t get_cmd(ESPState *s, uint8_t *buf) · line 214

Quoted 5 lines
hw/esp.c +1 -1
@@ -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;

why this byte needs to be overwritten? Doesn't ti_buf have a bus id?

Quoted 8 lines
hw/esp.c +0 -1
     }
     DPRINTF("get_cmd: len %d target %d\n", dmalen, target);
 
--

1.7.5.4

Signature · 4 lines
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/