[haiku-commits] haiku: hrev43412 - src/add-ons/kernel/busses/usb

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 5 Dec 2011 03:02:05 +0100 (CET)

hrev43412 adds 1 changeset to branch 'master'
old head: a395486027c1c0d2b5d99eb62ef0eba1ca4f072a
new head: ebdb8247fd2618970201748cf021846882a05a6b

----------------------------------------------------------------------------

ebdb824: Move mutex initialization earlier, analogous to hrev43320.
  
  Avoids crashing if the bus manager init fails. Also fixes CID 10846.

                                            [ Michael Lotz <mmlr@xxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev43412
Commit:      ebdb8247fd2618970201748cf021846882a05a6b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=ebdb824
Author:      Michael Lotz <mmlr@xxxxxxxx>
Date:        Mon Dec  5 02:00:24 2011 UTC

----------------------------------------------------------------------------

1 files changed, 4 insertions(+), 3 deletions(-)
src/add-ons/kernel/busses/usb/ehci.cpp |    7 ++++---

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/busses/usb/ehci.cpp 
b/src/add-ons/kernel/busses/usb/ehci.cpp
index 3ce830f..86ca326 100644
--- a/src/add-ons/kernel/busses/usb/ehci.cpp
+++ b/src/add-ons/kernel/busses/usb/ehci.cpp
@@ -109,6 +109,7 @@ EHCI::EHCI(pci_info *info, Stack *stack)
                fPCIInfo(info),
                fStack(stack),
                fEnabledInterrupts(0),
+               fThreshold(0),
                fPeriodicFrameListArea(-1),
                fPeriodicFrameList(NULL),
                fInterruptEntries(NULL),
@@ -136,6 +137,9 @@ EHCI::EHCI(pci_info *info, Stack *stack)
                fPortSuspendChange(0),
                fInterruptPollThread(-1)
 {
+       // Create a lock for the isochronous transfer list
+       mutex_init(&fIsochronousLock, "EHCI isochronous lock");
+
        if (BusManager::InitCheck() < B_OK) {
                TRACE_ERROR("bus manager failed to init\n");
                return;
@@ -305,9 +309,6 @@ EHCI::EHCI(pci_info *info, Stack *stack)
                B_NORMAL_PRIORITY, (void *)this);
        resume_thread(fFinishThread);
 
-       // Create a lock for the isochronous transfer list
-       mutex_init(&fIsochronousLock, "EHCI isochronous lock");
-
        // Create semaphore the isochronous finisher thread will wait for
        fFinishIsochronousTransfersSem = create_sem(0,
                "EHCI Isochronous Finish Transfers");


Other related posts:

  • » [haiku-commits] haiku: hrev43412 - src/add-ons/kernel/busses/usb - mmlr