From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763669AbcISHlb (ORCPT ); Mon, 19 Sep 2016 03:41:31 -0400 Received: from mga14.intel.com ([192.55.52.115]:3347 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753252AbcISHlX (ORCPT ); Mon, 19 Sep 2016 03:41:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,361,1470726000"; d="scan'208";a="881343019" Subject: Re: [RFC PATCH] xhci: do not halt the secondary HCD To: Joel Stanley , linux-usb@vger.kernel.org References: <20160919063545.2055-1-joel@jms.id.au> Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org From: Mathias Nyman Message-ID: <57DF969B.8030204@linux.intel.com> Date: Mon, 19 Sep 2016 10:41:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160919063545.2055-1-joel@jms.id.au> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.09.2016 09:35, Joel Stanley wrote: > We can't halt the secondary HCD, because it's also the primary HCD, > which will cause problems if we have devices attached to the primary > HCD, like a keyboard. > > We've been carrying this in our Linux-as-a-bootloader environment for a little > while now. The machines all have the same TI TUSB73x0 part, and when we kexec > the devices don't come back until a system power cycle. > > I'd like some advice on an acceptable way to upstream the fix, so that the xhci > device survives kexec. > > Signed-off-by: Joel Stanley > --- What kernel version is this? As Greg said there are fixes in this area in the 4.8 latest rc kernel. If that doesn't work then we need to figure out what the real issue is. xhci hardware is really just one controller. The split into primary and secondary HCD is a software only. We always load the primary HCD first (USB2) and secondary second (USB3). We unload them in reverse order, and need to stop the xhci (halt the hcd) as a first step. load primary load secondary (starts the xhci controller ... unload secondary (halts the controller) unload primary (free memory) -Mathias