Commit 15084a4a authored by Jack Hammer's avatar Jack Hammer Committed by James Bottomley

[SCSI] ips soft lockup during reset/initialization

Resetting the adapter causes the ServeRAID driver to exceed
the max time allowed by the softlock watchdog. Resetting the
hardware can easily require 30 or more seconds. To avoid the

    "BUG: soft lockup detected on CPU#0!"

result, this patch replaces the mdelay() calls in the
initialization/reset routines with msleep().
Signed-off-by: default avatarJack Hammer <jack_hammer@adaptec.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 77427f51
...@@ -5012,7 +5012,7 @@ ips_init_copperhead(ips_ha_t * ha) ...@@ -5012,7 +5012,7 @@ ips_init_copperhead(ips_ha_t * ha)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (j >= 45) if (j >= 45)
...@@ -5038,7 +5038,7 @@ ips_init_copperhead(ips_ha_t * ha) ...@@ -5038,7 +5038,7 @@ ips_init_copperhead(ips_ha_t * ha)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (j >= 240) if (j >= 240)
...@@ -5056,7 +5056,7 @@ ips_init_copperhead(ips_ha_t * ha) ...@@ -5056,7 +5056,7 @@ ips_init_copperhead(ips_ha_t * ha)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (i >= 240) if (i >= 240)
...@@ -5106,7 +5106,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) ...@@ -5106,7 +5106,7 @@ ips_init_copperhead_memio(ips_ha_t * ha)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (j >= 45) if (j >= 45)
...@@ -5132,7 +5132,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) ...@@ -5132,7 +5132,7 @@ ips_init_copperhead_memio(ips_ha_t * ha)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (j >= 240) if (j >= 240)
...@@ -5150,7 +5150,7 @@ ips_init_copperhead_memio(ips_ha_t * ha) ...@@ -5150,7 +5150,7 @@ ips_init_copperhead_memio(ips_ha_t * ha)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (i >= 240) if (i >= 240)
...@@ -5202,7 +5202,7 @@ ips_init_morpheus(ips_ha_t * ha) ...@@ -5202,7 +5202,7 @@ ips_init_morpheus(ips_ha_t * ha)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (i >= 45) { if (i >= 45) {
...@@ -5228,7 +5228,7 @@ ips_init_morpheus(ips_ha_t * ha) ...@@ -5228,7 +5228,7 @@ ips_init_morpheus(ips_ha_t * ha)
if (Post != 0x4F00) if (Post != 0x4F00)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (i >= 120) { if (i >= 120) {
...@@ -5258,7 +5258,7 @@ ips_init_morpheus(ips_ha_t * ha) ...@@ -5258,7 +5258,7 @@ ips_init_morpheus(ips_ha_t * ha)
break; break;
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
} }
if (i >= 240) { if (i >= 240) {
...@@ -5318,12 +5318,12 @@ ips_reset_copperhead(ips_ha_t * ha) ...@@ -5318,12 +5318,12 @@ ips_reset_copperhead(ips_ha_t * ha)
outb(IPS_BIT_RST, ha->io_addr + IPS_REG_SCPR); outb(IPS_BIT_RST, ha->io_addr + IPS_REG_SCPR);
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
outb(0, ha->io_addr + IPS_REG_SCPR); outb(0, ha->io_addr + IPS_REG_SCPR);
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
if ((*ha->func.init) (ha)) if ((*ha->func.init) (ha))
break; break;
...@@ -5363,12 +5363,12 @@ ips_reset_copperhead_memio(ips_ha_t * ha) ...@@ -5363,12 +5363,12 @@ ips_reset_copperhead_memio(ips_ha_t * ha)
writeb(IPS_BIT_RST, ha->mem_ptr + IPS_REG_SCPR); writeb(IPS_BIT_RST, ha->mem_ptr + IPS_REG_SCPR);
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
writeb(0, ha->mem_ptr + IPS_REG_SCPR); writeb(0, ha->mem_ptr + IPS_REG_SCPR);
/* Delay for 1 Second */ /* Delay for 1 Second */
MDELAY(IPS_ONE_SEC); msleep(IPS_ONE_SEC);
if ((*ha->func.init) (ha)) if ((*ha->func.init) (ha))
break; break;
...@@ -5409,7 +5409,7 @@ ips_reset_morpheus(ips_ha_t * ha) ...@@ -5409,7 +5409,7 @@ ips_reset_morpheus(ips_ha_t * ha)
writel(0x80000000, ha->mem_ptr + IPS_REG_I960_IDR); writel(0x80000000, ha->mem_ptr + IPS_REG_I960_IDR);
/* Delay for 5 Seconds */ /* Delay for 5 Seconds */
MDELAY(5 * IPS_ONE_SEC); msleep(5 * IPS_ONE_SEC);
/* Do a PCI config read to wait for adapter */ /* Do a PCI config read to wait for adapter */
pci_read_config_byte(ha->pcidev, 4, &junk); pci_read_config_byte(ha->pcidev, 4, &junk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment