diff options
Diffstat (limited to 'sys/dev/twe/twe.c')
-rw-r--r-- | sys/dev/twe/twe.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c index e3c2073..e935c89 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; } |