diff options
author | Laszlo Ast <laszlo.ast@siemens-enterprise.com> | 2009-11-19 11:07:12 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 09:41:41 -0600 |
commit | e560125e2692714054b718b51211f32a311538b5 (patch) | |
tree | e501936c109f4e7a9606c35ff83b94b91c912cf0 /hw/omap_mmc.c | |
parent | 38f5b2b88cbe02492a4cad3aa06a778a952f7146 (diff) | |
download | hqemu-e560125e2692714054b718b51211f32a311538b5.zip hqemu-e560125e2692714054b718b51211f32a311538b5.tar.gz |
lsi53c895a: Implement IRQ on reselection
The critical part of this change is how to deal with simultaneaous
generation of interrupts. The only (normal) case when this happens in
the emulation is near simultaneous reselection + selection. If selection
comes first, there is no problem, since the target attempting
reselection loses the arbitration (in the emulation it only means that
the reselect function will not be started). In the worst case the host
adapter is reselected, but the device driver already started a
selection, so we jump to the alternative address to handle the
situation.
The SCRIPTS code can trigger another interrupt to notify the driver that
the new task has to be postponed. I suppose that on real hardware there
is enough time after the reselection interrupt to set the SIP bit before
the next interrupt comes, so it would result in 2 stacked interrupts (a
SCSI and a DMA one). However, in the emulation there is no interrupt
stacking, so there is a good chance that the 2 interrupts will get to
the interrupt handler at the same time.
Nevertheless, it should not make a big difference in interrupt handling,
since in both cases both interrupts have to be fetched first, and after
that the new task (that failed during the selection phase) has to be
prepared/reset for a later restart, and the reconnected device has to be
serviced.
The changes do not modify the host adapter's behavior if this interrupt
is not enabled.
See also LSI53C895A technical manual, SCID and SIEN0.
Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/omap_mmc.c')
0 files changed, 0 insertions, 0 deletions