From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752192AbbBRIqj (ORCPT ); Wed, 18 Feb 2015 03:46:39 -0500 Received: from mga11.intel.com ([192.55.52.93]:28344 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751189AbbBRIqh (ORCPT ); Wed, 18 Feb 2015 03:46:37 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,595,1418112000"; d="scan'208";a="456143057" Message-ID: <54E451B1.8020401@intel.com> Date: Wed, 18 Feb 2015 10:47:45 +0200 From: Mathias Nyman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Sneeker Yeh , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Felipe Balbi , Greg Kroah-Hartman , Grant Likely , Huang Rui , Kishon Vijay Abraham I , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org CC: Andy Green , Jassi Brar , Sneeker Yeh Subject: Re: [PATCH v4 1/5] xhci: add a quirk for device disconnection errata for Synopsis Designware USB3 core References: <1424151697-2084-1-git-send-email-Sneeker.Yeh@tw.fujitsu.com> <1424151697-2084-2-git-send-email-Sneeker.Yeh@tw.fujitsu.com> In-Reply-To: <1424151697-2084-2-git-send-email-Sneeker.Yeh@tw.fujitsu.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi This looks correct, but if you are still going to make a new series fixing Felipe's comments then the following tiny nitpicks could be fixed as well. Otherwise Acked-by: Mathias Nyman Felipe, Do you want to take this series through your tree? On 17.02.2015 07:41, Sneeker Yeh wrote: > > +static void xhci_try_to_clear_csc(struct usb_hcd *hcd, int dev_port_num) Either add a function description explaining something like "Late clearing of connect status. Some quirky hardware will suspend the controller when CSC bit is cleared and leave URBs unhandled" Or change the function name to something like xhci_late_csc_clear_quirk() or xhci_deferred_csc_clear_quirk() Maybe the name should be changed anyways. The "try to" makes it look like some non-blocking version of a csc clear function. > +{ > + int max_ports; > + struct xhci_hcd *xhci = hcd_to_xhci(hcd); > + __le32 __iomem **port_array; > + u32 status; > + > + /* print debug info */ Remove this comment > + if (hcd->speed == HCD_USB3) { > + max_ports = xhci->num_usb3_ports; > + port_array = xhci->usb3_ports; > + } else { > + max_ports = xhci->num_usb2_ports; > + port_array = xhci->usb2_ports; > + } > + > + if (dev_port_num > max_ports) { > + xhci_err(xhci, "%s() port number invalid", __func__); > + return; > + } > + status = readl(port_array[dev_port_num - 1]); > + > + /* write 1 to clear */ Not really a helpful comment either, either remove or change to something like "clearing the connect status bit will now immediately suspend these quirky controllers" -Mathias From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathias Nyman Subject: Re: [PATCH v4 1/5] xhci: add a quirk for device disconnection errata for Synopsis Designware USB3 core Date: Wed, 18 Feb 2015 10:47:45 +0200 Message-ID: <54E451B1.8020401@intel.com> References: <1424151697-2084-1-git-send-email-Sneeker.Yeh@tw.fujitsu.com> <1424151697-2084-2-git-send-email-Sneeker.Yeh@tw.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1424151697-2084-2-git-send-email-Sneeker.Yeh-l16TxrwUIHTQFUHtdCDX3A@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sneeker Yeh , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Felipe Balbi , Greg Kroah-Hartman , Grant Likely , Huang Rui , Kishon Vijay Abraham I , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Andy Green , Jassi Brar , Sneeker Yeh List-Id: devicetree@vger.kernel.org Hi This looks correct, but if you are still going to make a new series fixing Felipe's comments then the following tiny nitpicks could be fixed as well. Otherwise Acked-by: Mathias Nyman Felipe, Do you want to take this series through your tree? On 17.02.2015 07:41, Sneeker Yeh wrote: > > +static void xhci_try_to_clear_csc(struct usb_hcd *hcd, int dev_port_num) Either add a function description explaining something like "Late clearing of connect status. Some quirky hardware will suspend the controller when CSC bit is cleared and leave URBs unhandled" Or change the function name to something like xhci_late_csc_clear_quirk() or xhci_deferred_csc_clear_quirk() Maybe the name should be changed anyways. The "try to" makes it look like some non-blocking version of a csc clear function. > +{ > + int max_ports; > + struct xhci_hcd *xhci = hcd_to_xhci(hcd); > + __le32 __iomem **port_array; > + u32 status; > + > + /* print debug info */ Remove this comment > + if (hcd->speed == HCD_USB3) { > + max_ports = xhci->num_usb3_ports; > + port_array = xhci->usb3_ports; > + } else { > + max_ports = xhci->num_usb2_ports; > + port_array = xhci->usb2_ports; > + } > + > + if (dev_port_num > max_ports) { > + xhci_err(xhci, "%s() port number invalid", __func__); > + return; > + } > + status = readl(port_array[dev_port_num - 1]); > + > + /* write 1 to clear */ Not really a helpful comment either, either remove or change to something like "clearing the connect status bit will now immediately suspend these quirky controllers" -Mathias -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html