From 088113ed0b486a379c183bc8c1996ee801a8c156 Mon Sep 17 00:00:00 2001 From: Vinod Kashyap Date: Wed, 12 May 2004 04:10:37 +0000 Subject: 1. Fixed potential problem that would cause out-of-order requests in twe_startio. 2. Changed version. Submitted by: scottl Reviewed by: vkashyap Approved by: re --- sys/dev/twe/twe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/dev/twe/twe.c') diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c index e3c20738a97a..e935c895451c 100644 --- a/sys/dev/twe/twe.c +++ b/sys/dev/twe/twe.c @@ -396,13 +396,13 @@ twe_startio(struct twe_softc *sc) /* build a command from an outstanding bio */ if (tr == NULL) { - /* see if there's work to be done */ - if ((bp = twe_dequeue_bio(sc)) == NULL) + /* get a command to handle the bio with */ + if (twe_get_request(sc, &tr)) break; - /* get a command to handle the bio with */ - if (twe_get_request(sc, &tr)) { - twe_enqueue_bio(sc, bp); /* failed, put the bio back */ + /* see if there's work to be done */ + if ((bp = twe_dequeue_bio(sc)) == NULL) { + twe_release_request(tr); break; } -- cgit v1.3