From 562328e70a80b4f6807ed9be81e101ae82ded619 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 7 May 2007 16:58:00 +0000 Subject: [PATCH] Fixed wrong cancelling algorithm. This is what you get when you "rework" an existing function without thinking it through again... Thanks J Jerome for noticing\! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21058 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/busses/usb/ehci.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp b/src/add-ons/kernel/busses/usb/ehci.cpp index 62a27b2425..27ec860840 100644 --- a/src/add-ons/kernel/busses/usb/ehci.cpp +++ b/src/add-ons/kernel/busses/usb/ehci.cpp @@ -916,19 +916,21 @@ EHCI::CancelQueuedTransfers(Pipe *pipe) current->transfer->Finished(B_CANCELED, 0); delete current->transfer; + transfer_data *next = current->link; if (last) - last->link = current->link; + last->link = next; else - fFirstTransfer = current->link; + fFirstTransfer = next; if (fLastTransfer == current) fLastTransfer = last; delete current; + current = next; + } else { + last = current; + current = current->link; } - - last = current; - current = current->link; } Unlock();