From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754250AbcKULvv (ORCPT ); Mon, 21 Nov 2016 06:51:51 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:64403 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753457AbcKULvu (ORCPT ); Mon, 21 Nov 2016 06:51:50 -0500 Subject: Re: [PATCH 1/3] usb: xhci: add quirk flag for broken PED bits To: Sergei Shtylyov , , References: <1479394881-13863-1-git-send-email-rogerq@ti.com> <1479394881-13863-2-git-send-email-rogerq@ti.com> <7d09bdad-0618-c579-a9ad-2bac20a5b525@cogentembedded.com> CC: , From: Roger Quadros Message-ID: <1396ea2e-8a29-d4ff-d56d-368639195a8d@ti.com> Date: Mon, 21 Nov 2016 13:51:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <7d09bdad-0618-c579-a9ad-2bac20a5b525@cogentembedded.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/11/16 12:49, Sergei Shtylyov wrote: > Hello. > > On 11/17/2016 6:01 PM, Roger Quadros wrote: > >> From: Felipe Balbi >> >> Some devices from Texas Instruments [1] suffer from >> a silicon bug where Port Enabled/Disabled bit >> should not be used to silence an erroneous device. >> >> The bug is so that if port is disabled with PED >> bit, an IRQ for device removal (or attachment) >> will never fire. >> >> Just for the sake of completeness, the actual >> problem lies with SNPS USB IP and this affects >> all known versions up to 3.00a. A separate >> patch will be added to dwc3 to enabled this >> quirk flag if version is <= 3.00a. >> >> [1] - AM572x Silicon Errata http://www.ti.com/lit/er/sprz429j/sprz429j.pdf >> Section i896— USB xHCI Port Disable Feature Does Not Work >> >> Signed-off-by: Felipe Balbi >> Signed-off-by: Roger Quadros >> --- >> drivers/usb/host/xhci-hub.c | 6 ++++++ >> drivers/usb/host/xhci.h | 3 +++ >> 2 files changed, 9 insertions(+) >> >> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c >> index 0ef1690..c3c051d 100644 >> --- a/drivers/usb/host/xhci-hub.c >> +++ b/drivers/usb/host/xhci-hub.c >> @@ -458,6 +458,12 @@ static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, >> return; >> } >> >> + if (xhci->quirks & XHCI_BROKEN_PORT_PED) { >> + xhci_dbg(xhci, "Broken Port Enabled/Disabled, ignoring " >> + "port disable request.\n"); > > The messages shouldn't be broken up to facilitate grepping. > > [...] >> diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h >> index f945380..4f724aa 100644 >> --- a/drivers/usb/host/xhci.h >> +++ b/drivers/usb/host/xhci.h >> @@ -1656,6 +1656,9 @@ struct xhci_hcd { >> #define XHCI_SSIC_PORT_UNUSED (1 << 22) >> #define XHCI_NO_64BIT_SUPPORT (1 << 23) >> #define XHCI_MISSING_CAS (1 << 24) >> +/* For controller with a broken Port Disable implementation */ >> +#define XHCI_BROKEN_PORT_PED (1 << 21) > > Indent with tabs as above, please. > > [...] > Thanks. I've fixed both issues and sent a v2. cheers, -roger