Skip to contentSkip to conversation

lsi: check if SIGP bit is already set in Wait reselect

PATCH In review Sven Schnelle 2 participants 3 messages Feb 17, 2019 – Mar 4, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lsi: check if SIGP bit is already set in Wait reselect

If SIGP is set, the 'Wait for Reselection' command should jump immediately to the address stored in the second DWORD of the instruction. This fixes spurious hangs in the HP-UX 11.11 installer when the SIGP bit gets set by the kernel before the 'Wait for Reselection' command is executed by SCRIPTS.

---
 hw/scsi/lsi53c895a.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
hw/scsi/lsi53c895a.c +4 -2
index 8ba07f8756..bcff859bac 100644
@@ -1297,8 +1297,10 @@ again:
                 }
                 break;
             case 2: /* Wait Reselect */
-                if (!lsi_irq_on_rsl(s)) {
-                    lsi_wait_reselect(s);
+                if (s->istat0 & LSI_ISTAT0_SIGP) {
+                    s->dsp = s->dnad;
+                } else if (!lsi_irq_on_rsl(s)) {
+                        lsi_wait_reselect(s);
                 }
                 break;
             case 3: /* Set */
Signature · 1 line
2.20.1
#1 lore raw

Hi List,

is this patch going to be accepted?

Thanks
Sven

Quoted 33 lines · Sven Schnelle

If SIGP is set, the 'Wait for Reselection' command should jump immediately to the address stored in the second DWORD of the instruction. This fixes spurious hangs in the HP-UX 11.11 installer when the SIGP bit gets set by the kernel before the 'Wait for Reselection' command is executed by SCRIPTS.

---
 hw/scsi/lsi53c895a.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
hw/scsi/lsi53c895a.c +4 -2
index 8ba07f8756..bcff859bac 100644
@@ -1297,8 +1297,10 @@ again:
                 }
                 break;
             case 2: /* Wait Reselect */
-                if (!lsi_irq_on_rsl(s)) {
-                    lsi_wait_reselect(s);
+                if (s->istat0 & LSI_ISTAT0_SIGP) {
+                    s->dsp = s->dnad;
+                } else if (!lsi_irq_on_rsl(s)) {
+                        lsi_wait_reselect(s);
                 }
                 break;
             case 3: /* Set */
Signature · 1 line
2.20.1
#2 lore raw
Quoted 3 lines · Sven Schnelle

Hi List,

is this patch going to be accepted?

Yes, I have queued it now.

Paolo

Quoted 38 lines

Thanks
Sven

Quoted 33 lines · Sven Schnelle

If SIGP is set, the 'Wait for Reselection' command should jump immediately to the address stored in the second DWORD of the instruction. This fixes spurious hangs in the HP-UX 11.11 installer when the SIGP bit gets set by the kernel before the 'Wait for Reselection' command is executed by SCRIPTS.

---
 hw/scsi/lsi53c895a.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
hw/scsi/lsi53c895a.c +4 -2
index 8ba07f8756..bcff859bac 100644
@@ -1297,8 +1297,10 @@ again:
                 }
                 break;
             case 2: /* Wait Reselect */
-                if (!lsi_irq_on_rsl(s)) {
-                    lsi_wait_reselect(s);
+                if (s->istat0 & LSI_ISTAT0_SIGP) {
+                    s->dsp = s->dnad;
+                } else if (!lsi_irq_on_rsl(s)) {
+                        lsi_wait_reselect(s);
                 }
                 break;
             case 3: /* Set */
Signature · 1 line
2.20.1