From 8374316088346710d725daf766ecdf76da3767f1 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 27 Jun 2007 21:47:23 +0000 Subject: [PATCH] Actually initialize the list of first and last isochronous transfers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21517 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/busses/usb/uhci.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/uhci.cpp b/src/add-ons/kernel/busses/usb/uhci.cpp index 3b7120f5f3..b22b1dc328 100644 --- a/src/add-ons/kernel/busses/usb/uhci.cpp +++ b/src/add-ons/kernel/busses/usb/uhci.cpp @@ -396,17 +396,19 @@ UHCI::UHCI(pci_info *info, Stack *stack) // Create the array that will keep bandwidth information fFrameBandwidth = new(std::nothrow) uint16[NUMBER_OF_FRAMES]; + // Create lists for managing isochronous transfer descriptors + fFirstIsochronousDescriptor = new(std::nothrow) uhci_td *[NUMBER_OF_FRAMES]; + fLastIsochronousDescriptor = new(std::nothrow) uhci_td *[NUMBER_OF_FRAMES]; + for (int32 i = 0; i < NUMBER_OF_FRAMES; i++) { fFrameList[i] = fQueues[UHCI_INTERRUPT_QUEUE]->PhysicalAddress() | FRAMELIST_NEXT_IS_QH; fFrameBandwidth[i] = MAX_AVAILABLE_BANDWIDTH; + fFirstIsochronousDescriptor[i] = NULL; + fLastIsochronousDescriptor[i] = NULL; } - // create lists for managing isochronous transfer descriptors - fFirstIsochronousDescriptor = new(std::nothrow) uhci_td *[NUMBER_OF_FRAMES]; - fLastIsochronousDescriptor = new(std::nothrow) uhci_td *[NUMBER_OF_FRAMES]; - - // create semaphore the finisher thread will wait for + // Create semaphore the finisher thread will wait for fFinishTransfersSem = create_sem(0, "UHCI Finish Transfers"); if (fFinishTransfersSem < B_OK) { TRACE_ERROR(("usb_uhci: failed to create semaphore\n"));