summaryrefslogtreecommitdiffstats
path: root/sys/dev/twe/twe.c
diff options
context:
space:
mode:
authorvkashyap <vkashyap@FreeBSD.org>2004-05-12 04:10:37 +0000
committervkashyap <vkashyap@FreeBSD.org>2004-05-12 04:10:37 +0000
commit14bc83bc9c967d7557e40bd525990e9c923ff4e1 (patch)
treeb30e9b3f85b9e6742f97dcf417b5d4416767f8e0 /sys/dev/twe/twe.c
parentdb27194e31283993707fc97cedf0154d60f25123 (diff)
downloadFreeBSD-src-14bc83bc9c967d7557e40bd525990e9c923ff4e1.zip
FreeBSD-src-14bc83bc9c967d7557e40bd525990e9c923ff4e1.tar.gz
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
Diffstat (limited to 'sys/dev/twe/twe.c')
-rw-r--r--sys/dev/twe/twe.c10
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;
}
OpenPOWER on IntegriCloud