mirror of https://gitee.com/openkylin/qemu.git
lsi53c895a: Rename 'sense' to 'status'
The 'sense' field in the HBA status structure is misnamed, as it actually carries the SCSI status. Rename it. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: qemu-trivial@nongnu.org Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
6774e44ae3
commit
2f172849b6
|
@ -189,7 +189,7 @@ typedef struct {
|
||||||
uint32_t script_ram_base;
|
uint32_t script_ram_base;
|
||||||
|
|
||||||
int carry; /* ??? Should this be an a visible register somewhere? */
|
int carry; /* ??? Should this be an a visible register somewhere? */
|
||||||
int sense;
|
int status;
|
||||||
/* Action to take at the end of a MSG IN phase.
|
/* Action to take at the end of a MSG IN phase.
|
||||||
0 = COMMAND, 1 = disconnect, 2 = DATA OUT, 3 = DATA IN. */
|
0 = COMMAND, 1 = disconnect, 2 = DATA OUT, 3 = DATA IN. */
|
||||||
int msg_action;
|
int msg_action;
|
||||||
|
@ -695,8 +695,8 @@ static void lsi_command_complete(SCSIBus *bus, int reason, uint32_t tag,
|
||||||
|
|
||||||
out = (s->sstat1 & PHASE_MASK) == PHASE_DO;
|
out = (s->sstat1 & PHASE_MASK) == PHASE_DO;
|
||||||
if (reason == SCSI_REASON_DONE) {
|
if (reason == SCSI_REASON_DONE) {
|
||||||
DPRINTF("Command complete sense=%d\n", (int)arg);
|
DPRINTF("Command complete status=%d\n", (int)arg);
|
||||||
s->sense = arg;
|
s->status = arg;
|
||||||
s->command_complete = 2;
|
s->command_complete = 2;
|
||||||
if (s->waiting && s->dbc != 0) {
|
if (s->waiting && s->dbc != 0) {
|
||||||
/* Raise phase mismatch for short transfers. */
|
/* Raise phase mismatch for short transfers. */
|
||||||
|
@ -783,14 +783,14 @@ static void lsi_do_command(LSIState *s)
|
||||||
|
|
||||||
static void lsi_do_status(LSIState *s)
|
static void lsi_do_status(LSIState *s)
|
||||||
{
|
{
|
||||||
uint8_t sense;
|
uint8_t status;
|
||||||
DPRINTF("Get status len=%d sense=%d\n", s->dbc, s->sense);
|
DPRINTF("Get status len=%d status=%d\n", s->dbc, s->status);
|
||||||
if (s->dbc != 1)
|
if (s->dbc != 1)
|
||||||
BADF("Bad Status move\n");
|
BADF("Bad Status move\n");
|
||||||
s->dbc = 1;
|
s->dbc = 1;
|
||||||
sense = s->sense;
|
status = s->status;
|
||||||
s->sfbr = sense;
|
s->sfbr = status;
|
||||||
cpu_physical_memory_write(s->dnad, &sense, 1);
|
cpu_physical_memory_write(s->dnad, &status, 1);
|
||||||
lsi_set_phase(s, PHASE_MI);
|
lsi_set_phase(s, PHASE_MI);
|
||||||
s->msg_action = 1;
|
s->msg_action = 1;
|
||||||
lsi_add_msg_byte(s, 0); /* COMMAND COMPLETE */
|
lsi_add_msg_byte(s, 0); /* COMMAND COMPLETE */
|
||||||
|
@ -2122,7 +2122,7 @@ static const VMStateDescription vmstate_lsi_scsi = {
|
||||||
VMSTATE_PCI_DEVICE(dev, LSIState),
|
VMSTATE_PCI_DEVICE(dev, LSIState),
|
||||||
|
|
||||||
VMSTATE_INT32(carry, LSIState),
|
VMSTATE_INT32(carry, LSIState),
|
||||||
VMSTATE_INT32(sense, LSIState),
|
VMSTATE_INT32(status, LSIState),
|
||||||
VMSTATE_INT32(msg_action, LSIState),
|
VMSTATE_INT32(msg_action, LSIState),
|
||||||
VMSTATE_INT32(msg_len, LSIState),
|
VMSTATE_INT32(msg_len, LSIState),
|
||||||
VMSTATE_BUFFER(msg, LSIState),
|
VMSTATE_BUFFER(msg, LSIState),
|
||||||
|
|
Loading…
Reference in New Issue