From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754398AbcKUPbJ (ORCPT ); Mon, 21 Nov 2016 10:31:09 -0500 Received: from mga14.intel.com ([192.55.52.115]:39890 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752814AbcKUPbI (ORCPT ); Mon, 21 Nov 2016 10:31:08 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,675,1473145200"; d="scan'208";a="7447033" Subject: Re: [PATCH V2] usb: xhci: add support for performing fake doorbell To: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Mathias Nyman References: <20161001215817.25384-1-zajec5@gmail.com> <20161017203036.23399-1-zajec5@gmail.com> Cc: Greg Kroah-Hartman , Hauke Mehrtens , Rob Herring , Mark Rutland , "linux-usb@vger.kernel.org" , "devicetree@vger.kernel.org" , Linux Kernel Mailing List , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Florian Fainelli , BCM Kernel Feedback From: Mathias Nyman Message-ID: <58331360.5000508@linux.intel.com> Date: Mon, 21 Nov 2016 17:31:44 +0200 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21.11.2016 09:57, Rafał Miłecki wrote: > Hi Mathias, > > On 17 October 2016 at 22:30, Rafał Miłecki wrote: >> From: Rafał Miłecki >> >> Broadcom's Northstar XHCI controllers seem to need a special start >> procedure to work correctly. There isn't any official documentation of >> this, the problem is that controller doesn't detect any connected >> devices with default setup. Moreover connecting USB device to controller >> that doesn't run properly can cause SoC's watchdog issues. >> >> A workaround that was successfully tested on multiple devices is to >> perform a fake doorbell. This patch adds code for doing this and enables >> it on BCM4708 family. >> >> Signed-off-by: Rafał Miłecki >> --- >> V2: Enable quirk for brcm,bcm4708 machines instead of adding separated binding >> for it. Thanks Rob for your comment on this. > > Do you think you can pick & push this one? V2 follows Rob's suggestion > and he has some DT knowledge for sure, so I guess it should be OK. > -- Is there some more background information on this? I don't have any contacts to Broadcom myself, adding the BMC Kernel Feedback list to CC. Maybe someone over there has an errata, documentation or just general feedback. How was this workaround even figured out? ringing the doorbell for the first device doesn't seem like something found by trial and error, especially when xhci specs state that: "Software shall not write the Doorbell of an endpoint until after it has issued a Configure Endpoint Command for the endpoint and received a successful Command Completion Event." The whole workaround is a bit intrusive, allocating a fake device, ring a doorbell for a fake device in the wrong state, clearing off HSE (host system error) which should only be set when things really go bad, some random usleeps, and possible calling xhci_start() twice. I can't take this as is without some more info. -Mathias