Patchwork [6/7] lsi53c895a: Use alternative address when already reselected

login
register
mail settings
Submitter Jan Kiszka
Date Nov. 19, 2009, 10:07 a.m.
Message ID <20091119100712.16666.12700.stgit@mchn012c.ww002.siemens.net>
Download mbox | patch
Permalink /patch/38819/
State New
Headers show

Comments

Jan Kiszka - Nov. 19, 2009, 10:07 a.m.
From: Laszlo Ast <laszlo.ast@siemens-enterprise.com>

See SCRIPTS, 3.2.17 SELECT.

Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

 hw/lsi53c895a.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 4c638be..480fbca 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -1038,8 +1038,9 @@  again:
             switch (opcode) {
             case 0: /* Select */
                 s->sdid = id;
-                if (s->current_dma_len && (s->ssid & 0xf) == id) {
-                    DPRINTF("Already reselected by target %d\n", id);
+                if (s->scntl1 & LSI_SCNTL1_CON) {
+                    DPRINTF("Already reselected, jumping to alternative address\n");
+                    s->dsp = s->dnad;
                     break;
                 }
                 s->sstat0 |= LSI_SSTAT0_WOA;