Skip to contentSkip to conversation

vscsi: send the CHECK_CONDITION status down together with autosense data

PATCH In review Paolo Bonzini 3 participants 5 messages Aug 24, 2011 – Aug 25, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vscsi: send the CHECK_CONDITION status down together with autosense data

I introduced this bug in commit 05751d3 (vscsi: always use get_sense, 2011-08-03) because at the time there was no way to expose a sense condition to SLOF and Linux manages to work around the bug. However, the bug becomes evident now that SCSI devices also report unit attention on reset.

SLOF also has problems dealing with unit attention conditions, so it still will not boot even with this fix (just like OpenBIOS). IBM folks are aware of their part of the bug. :-)

---
 hw/spapr_vscsi.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
hw/spapr_vscsi.c +0 -1
index fc9ac6a..ee6f6bf 100644
@@ -483,7 +483,6 @@ static void vscsi_command_complete(SCSIRequest *sreq, uint32_t status)
     if (status == CHECK_CONDITION) {
         req->senselen = scsi_req_get_sense(req->sreq, req->sense,
                                            sizeof(req->sense));
-        status = 0;
         dprintf("VSCSI: Sense data, %d bytes:\n", len);
         dprintf("       %02x  %02x  %02x  %02x  %02x  %02x  %02x  %02x\n",
                 req->sense[0], req->sense[1], req->sense[2], req->sense[3],
Signature · 1 line
1.7.6
#1 lore raw
Quoted 9 lines · Paolo Bonzini

I introduced this bug in commit 05751d3 (vscsi: always use get_sense, 2011-08-03) because at the time there was no way to expose a sense condition to SLOF and Linux manages to work around the bug. However, the bug becomes evident now that SCSI devices also report unit attention on reset.

SLOF also has problems dealing with unit attention conditions, so it still will not boot even with this fix (just like OpenBIOS). IBM folks are aware of their part of the bug. :-)

David, please ack.

Alex

#2 lore raw
Quoted 9 lines · Alexander Graf
Quoted 6 lines · Paolo Bonzini

I introduced this bug in commit 05751d3 (vscsi: always use get_sense, 2011-08-03) because at the time there was no way to expose a sense condition to SLOF and Linux manages to work around the bug. However, the bug becomes evident now that SCSI devices also report unit attention on reset.

Quoted 5 lines
Quoted 3 lines

SLOF also has problems dealing with unit attention conditions, so it still will not boot even with this fix (just like OpenBIOS). IBM folks are aware of their part of the bug. :-)

David, please ack.

Done.

We also need to get the updated SLOF into place, I can't remember how we sent commits involving binary blobs previously.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#3 lore raw
Quoted 14 lines · David Gibson
Quoted 13 lines · Alexander Graf
Quoted 9 lines · Paolo Bonzini

I introduced this bug in commit 05751d3 (vscsi: always use get_sense, 2011-08-03) because at the time there was no way to expose a sense condition to SLOF and Linux manages to work around the bug. However, the bug becomes evident now that SCSI devices also report unit attention on reset.

SLOF also has problems dealing with unit attention conditions, so it still will not boot even with this fix (just like OpenBIOS). IBM folks are aware of their part of the bug. :-)

Quoted 6 lines
Quoted 1 line

David, please ack.

Done.

We also need to get the updated SLOF into place, I can't remember how we sent commits involving binary blobs previously.

git-format-patch should spit out a git binary diff just fine :)

Alex

Acked-by on v1 1/1
#4 lore raw
In reply to Paolo Bonzini
Quoted 6 lines · Paolo Bonzini

I introduced this bug in commit 05751d3 (vscsi: always use get_sense, 2011-08-03) because at the time there was no way to expose a sense condition to SLOF and Linux manages to work around the bug. However, the bug becomes evident now that SCSI devices also report unit attention on reset.

Quoted 6 lines

SLOF also has problems dealing with unit attention conditions, so it still will not boot even with this fix (just like OpenBIOS). IBM folks are aware of their part of the bug. :-)

With both this, and the SLOF update from Thomas, we can boot again.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson