From owner-freebsd-current@FreeBSD.ORG Fri Aug 30 09:35:35 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 35482BA0 for ; Fri, 30 Aug 2013 09:35:35 +0000 (UTC) (envelope-from johannes@brilliantservice.co.jp) Received: from mail-ie0-f174.google.com (mail-ie0-f174.google.com [209.85.223.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01FAD257C for ; Fri, 30 Aug 2013 09:35:34 +0000 (UTC) Received: by mail-ie0-f174.google.com with SMTP id k14so2830967iea.33 for ; Fri, 30 Aug 2013 02:35:28 -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=eIAU+Oh4XvXwPRkcIfXfqenl3jH1sLtMkmzLKSC9IFs=; b=U2UGzg1M0ImpM4RyC5/8UPAE5hibrdpAjdeP3YaDEg9WnzbP6g4tTDxGX4+YPAzKtV lrwLXsJ493g7j6WBGl5r1GdFpShPzTEEcOFhwNQCPKYvILPsmd2WAs7NEx8EOXSwGtDU aeCMJaGjxi5xOHDWFynE60vuz+gADraJ/5CUS8ep+oekn7RUz8kiclceOMO0vlm0/tQi G950gE1Vywnh19HWCx9OuK5qEGmGabx8hycIj9bs6oXkALuv4cVrLZD7MS0RV45QB6jl MrVdHVynbSij62/LMRBHVUKNm3U7+SuYmdFyyBN/D0fNx8qcF5ZFj2bHHbwr2xS4y2y1 tHFA== X-Gm-Message-State: ALoCoQkyNuqUaA0n6w/xV83tUNkI7SPbPeXelte3vuEbf4J1MrPF437RHk7t512TVSS+RmE8Ip4n X-Received: by 10.50.39.84 with SMTP id n20mr1667901igk.14.1377855328376; Fri, 30 Aug 2013 02:35:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.43.158.74 with HTTP; Fri, 30 Aug 2013 02:35:12 -0700 (PDT) In-Reply-To: <52203EC9.4060808@bitfrost.no> References: <521B9CD7.8010902@bitfrost.no> <521C6C26.7050207@bitfrost.no> <52203EC9.4060808@bitfrost.no> From: "Lundberg, Johannes" Date: Fri, 30 Aug 2013 11:35:12 +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: 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 09:35:35 -0000 Hi Hans I tried the patch and the result is the same. However, I found the command that causes the freeze. Also, it is not always it freezes but maybe 9/10 reboots or more frequently. At the end of the function xhci_start_controller(..) there is a for loop: 487 for (i = 0; i != 100; i++) { 488 usb_pause_mtx(NULL, hz / 100); 489 temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH; 490 if (!temp) 491 break; 492 } and it freezes at usb_pause_mtx(...) value of i is 0 value of hz is 1000 Johannes Lundberg BRILLIANTSERVICE CO., LTD. On Fri, Aug 30, 2013 at 8:42 AM, Hans Petter Selasky wrote: > On 08/30/13 08:09, Lundberg, Johannes wrote: > >> What I got so far is this; >> >> USB driver from current stops after >> xhci0: 32 byte context size >> >> While driver from 9.1 continues to the next step which is >> usbus0 on xhci0 >> xhci0: usbpf: Attached >> ... >> >> I can try adding some printf's in the code and see if I get some more.. >> >> > Hi, > > There are only a few commits to the xhci driver since 9.1 was releases, so > this should be easy to figure out. > > I'm doing a wild guess. Can you try the attached patch. It will ensure > that any BIOS generated interrupts get cleared before we reset the > controller. > > --HPS > >