[SCSI] qla2xxx: Add cond_resched() calls during HBA flash manipulation.

We're observing soft lockups during HBA FLASH retrieval and
update.  Add cond_resched() each time around the tight-loops
during flash read()s/write()s.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Andrew Vasquez 2007-03-12 10:41:28 -07:00 коммит произвёл James Bottomley
Родитель ed67708639
Коммит 40a2e34a94
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -466,6 +466,7 @@ qla24xx_read_flash_dword(scsi_qla_host_t *ha, uint32_t addr)
udelay(10); udelay(10);
else else
rval = QLA_FUNCTION_TIMEOUT; rval = QLA_FUNCTION_TIMEOUT;
cond_resched();
} }
/* TODO: What happens if we time out? */ /* TODO: What happens if we time out? */
@ -508,6 +509,7 @@ qla24xx_write_flash_dword(scsi_qla_host_t *ha, uint32_t addr, uint32_t data)
udelay(10); udelay(10);
else else
rval = QLA_FUNCTION_TIMEOUT; rval = QLA_FUNCTION_TIMEOUT;
cond_resched();
} }
return rval; return rval;
} }
@ -1255,6 +1257,7 @@ qla2x00_poll_flash(scsi_qla_host_t *ha, uint32_t addr, uint8_t poll_data,
} }
udelay(10); udelay(10);
barrier(); barrier();
cond_resched();
} }
return status; return status;
} }
@ -1403,6 +1406,7 @@ qla2x00_read_flash_data(scsi_qla_host_t *ha, uint8_t *tmp_buf, uint32_t saddr,
if (saddr % 100) if (saddr % 100)
udelay(10); udelay(10);
*tmp_buf = data; *tmp_buf = data;
cond_resched();
} }
} }
@ -1689,6 +1693,7 @@ update_flash:
rval = QLA_FUNCTION_FAILED; rval = QLA_FUNCTION_FAILED;
break; break;
} }
cond_resched();
} }
} while (0); } while (0);
qla2x00_flash_disable(ha); qla2x00_flash_disable(ha);