Date: Sat, 6 Feb 2010 01:02:30 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 174385 for review Message-ID: <201002060102.o1612Uh8028742@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=174385 Change 174385 by mav@mav_mavtest on 2010/02/06 01:01:49 After last running command completed, give commands in timeout second time. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#42 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/siis/siis.c#42 (text+ko) ==== @@ -1074,6 +1074,28 @@ } } +/* Must be called with channel locked. */ +static void +siis_rearm_timeout(device_t dev) +{ + struct siis_channel *ch = device_get_softc(dev); + int i; + + mtx_assert(&ch->mtx, MA_OWNED); + for (i = 0; i < SIIS_MAX_SLOTS; i++) { + struct siis_slot *slot = &ch->slot[i]; + + /* Do we have a running request on slot? */ + if (slot->state < SIIS_SLOT_RUNNING) + continue; + if ((ch->toslots & (1 << i)) == 0) + continue; + callout_reset(&slot->timeout, + (int)slot->ccb->ccb_h.timeout * hz / 1000, + (timeout_t*)siis_timeout, slot); + } +} + /* Locked by callout mechanism. */ static void siis_timeout(struct siis_slot *slot) @@ -1235,8 +1257,9 @@ siis_issue_read_log(dev); } /* If all the reset of commands are in timeout - abort them. */ - } else if ((ch->rslots & ~ch->toslots) == 0) - siis_process_timeout(dev); + } else if ((ch->rslots & ~ch->toslots) == 0 && + et != SIIS_ERR_TIMEOUT) + siis_rearm_timeout(dev); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002060102.o1612Uh8028742>