Revision ad3376cc hw/lsi53c895a.c
b/hw/lsi53c895a.c | ||
---|---|---|
580 | 580 |
s->current->dma_len -= count; |
581 | 581 |
if (s->current->dma_len == 0) { |
582 | 582 |
s->current->dma_buf = NULL; |
583 |
if (out) { |
|
584 |
/* Write the data. */ |
|
585 |
dev->info->write_data(s->current->req); |
|
586 |
} else { |
|
587 |
/* Request any remaining data. */ |
|
588 |
dev->info->read_data(s->current->req); |
|
589 |
} |
|
583 |
scsi_req_continue(s->current->req); |
|
590 | 584 |
} else { |
591 | 585 |
s->current->dma_buf += count; |
592 | 586 |
lsi_resume_script(s); |
... | ... | |
791 | 785 |
s->current->req = scsi_req_new(dev, s->current->tag, s->current_lun); |
792 | 786 |
|
793 | 787 |
n = scsi_req_enqueue(s->current->req, buf); |
794 |
if (n > 0) { |
|
795 |
lsi_set_phase(s, PHASE_DI); |
|
796 |
dev->info->read_data(s->current->req); |
|
797 |
} else if (n < 0) { |
|
798 |
lsi_set_phase(s, PHASE_DO); |
|
799 |
dev->info->write_data(s->current->req); |
|
788 |
if (n) { |
|
789 |
if (n > 0) { |
|
790 |
lsi_set_phase(s, PHASE_DI); |
|
791 |
} else if (n < 0) { |
|
792 |
lsi_set_phase(s, PHASE_DO); |
|
793 |
} |
|
794 |
scsi_req_continue(s->current->req); |
|
800 | 795 |
} |
801 |
|
|
802 | 796 |
if (!s->command_complete) { |
803 | 797 |
if (n) { |
804 | 798 |
/* Command did not complete immediately so disconnect. */ |
Also available in: Unified diff