limit the amount of retries when sending data to prevent lockups.

This commit is contained in:
Alfred Perlstein 2001-03-27 05:03:49 +00:00
parent df99bf760c
commit da1aa0fd06
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74838

View file

@ -952,8 +952,10 @@ static int wi_write_data(sc, id, off, buf, len)
{
int i;
u_int16_t *ptr;
#ifdef WI_HERMES_AUTOINC_WAR
int retries;
retries = WI_TIMEOUT >> 4;
again:
#endif
@ -973,7 +975,12 @@ static int wi_write_data(sc, id, off, buf, len)
if (CSR_READ_2(sc, WI_DATA0) != 0x1234 ||
CSR_READ_2(sc, WI_DATA0) != 0x5678)
goto again;
{
if (--retries >= 0)
goto again;
device_printf(sc->dev, "wi_write_data device timeout\n");
return (EIO);
}
#endif
return(0);