From owner-freebsd-current@FreeBSD.ORG Fri Aug 30 13:19:44 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A56A63AA for ; Fri, 30 Aug 2013 13:19:44 +0000 (UTC) (envelope-from johannes@brilliantservice.co.jp) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70B6123F8 for ; Fri, 30 Aug 2013 13:19:44 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id c10so2725261ieb.31 for ; Fri, 30 Aug 2013 06:19:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=oZJ+3IzLFrt0LWypO0OwuaQ5cpFUTn9SQeKw7zkjgC0=; b=V6SITTAxQzlPRsySBq8XqVPPMgTA0Ero3Hr1r9ZnDBRlzvp52DyaULO5ryQ2z44EMW QvCJh8Pr9rGF510xN6KFTiA/vTcgm1p8vrUJ1TLsMSl8iArSj7DRfwCUuCjHP7KRNwNX Clo3KsUWrLvCRNfMBIDQTZcEn1Y1MnRGFeuvIHwrP6rnXkRZbq9/2e0wpNKvGfumyaH/ RHrhs+3cBpjHdZnPV+Yy9SByBjm1cd7IT+XwWf+exCozenELVIGBF/oLkNaKRQNyV5Mi ZOdUFo3r4cbr3bNn+Curo+PhgsKjhUmmjvPjp9OzXkb7OflirAVzwQMxAmlGlSm3YCQB 2Obg== X-Gm-Message-State: ALoCoQkRrEjaqXxrSgZcVwPO3dGDzXh7fLyac7or1xz4m32OVVnzcxgmB5pkMEhfzB/IF9GQr/Ys X-Received: by 10.50.20.232 with SMTP id q8mr2412431ige.0.1377868777921; Fri, 30 Aug 2013 06:19:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.43.158.74 with HTTP; Fri, 30 Aug 2013 06:19:22 -0700 (PDT) In-Reply-To: <52208F63.4060308@bitfrost.no> References: <521B9CD7.8010902@bitfrost.no> <521C6C26.7050207@bitfrost.no> <52203EC9.4060808@bitfrost.no> <52207030.8050107@bitfrost.no> <52208F63.4060308@bitfrost.no> From: "Lundberg, Johannes" Date: Fri, 30 Aug 2013 15:19:22 +0200 Message-ID: Subject: Re: xhci broken on 10-CURRENT and 2013 MacBook Air? To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Alexander Motin , FreeBSD Current , "freebsd-usb@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 13:19:44 -0000 Hi Hans I tried that too and no change... But, the variable overflow you introduced, it is never increased, right? So, it will never become zero... Johannes Lundberg BRILLIANTSERVICE CO., LTD. On Fri, Aug 30, 2013 at 2:26 PM, Hans Petter Selasky wrote: > On 08/30/13 13:54, Lundberg, Johannes wrote: > >> Still got the same behaviour after applying the patch... >> >> Johannes Lundberg >> BRILLIANTSERVICE CO., LTD. >> > >> > > I've seen something similar with my mac, that the boot menu counter is not > always counting stable. I think this problem is inside the following > function, if you say that the code is stuck inside pause(): > > sys/x86/isa/clock.c:DELAY() > > Maybe you can try this patch instead. Just apply it by hand: > > === sys/x86/isa/clock.c > ==============================**==============================**====== > --- sys/x86/isa/clock.c (revision 254832) > +++ sys/x86/isa/clock.c (local) > @@ -262,6 +262,7 @@ > timecounter_get_t *func; > uint64_t end, freq, now; > u_int last, mask, u; > + int overflow = 0; > > tc = timecounter; > freq = atomic_load_acq_64(&tsc_freq); > @@ -281,6 +282,11 @@ > sched_pin(); > last = func(tc) & mask; > do { > + if (--overflow == 0) { > + printf("DELAY overflow\n"); > + break; > + } > + > cpu_spinwait(); > u = func(tc) & mask; > if (u < last) > @@ -304,6 +310,7 @@ > DELAY(int n) > { > int delta, prev_tick, tick, ticks_left; > + int overflow = 0; > #ifdef DELAYDEBUG > int getit_calls = 1; > int n1; > @@ -365,6 +372,10 @@ > / 1000000; > > while (ticks_left > 0) { > + if (--overflow == 0) { > + printf("DELAY overflow\n"); > + break; > + } > #ifdef KDB > if (kdb_active) { > #ifdef PC98 > > > --HPS >