From owner-freebsd-current@FreeBSD.ORG Fri Aug 30 12:25:02 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 31F5C81C; Fri, 30 Aug 2013 12:25:02 +0000 (UTC) (envelope-from hps@bitfrost.no) Received: from mta.bitpro.no (mta.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id AFB852FD9; Fri, 30 Aug 2013 12:25:01 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta.bitpro.no (Postfix) with ESMTP id 8C4FB7A1D6; Fri, 30 Aug 2013 14:24:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id B4F8E8F50DC; Fri, 30 Aug 2013 14:25:12 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I529+-rpETBs; Fri, 30 Aug 2013 14:25:12 +0200 (CEST) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id D94918F50DA; Fri, 30 Aug 2013 14:25:11 +0200 (CEST) Message-ID: <52208F63.4060308@bitfrost.no> Date: Fri, 30 Aug 2013 14:26:11 +0200 From: Hans Petter Selasky Organization: Bitfrost A/S User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130522 Thunderbird/17.0.6 MIME-Version: 1.0 To: "Lundberg, Johannes" Subject: Re: xhci broken on 10-CURRENT and 2013 MacBook Air? References: <521B9CD7.8010902@bitfrost.no> <521C6C26.7050207@bitfrost.no> <52203EC9.4060808@bitfrost.no> <52207030.8050107@bitfrost.no> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 12:25:02 -0000 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