Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752795AbdGXD7d (ORCPT ); Sun, 23 Jul 2017 23:59:33 -0400 Received: from mga02.intel.com ([134.134.136.20]:40274 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbdGXD72 (ORCPT ); Sun, 23 Jul 2017 23:59:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,404,1496127600"; d="scan'208";a="111160828" Subject: Re: [PATCH 2/3] usb: xhci: Add DbC support in xHCI driver To: Felipe Balbi , Mathias Nyman , Greg Kroah-Hartman References: <1500627169-27116-1-git-send-email-baolu.lu@linux.intel.com> <1500627169-27116-3-git-send-email-baolu.lu@linux.intel.com> <87pocu3wts.fsf@linux.intel.com> Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: Lu Baolu Message-ID: <5975709A.8070602@linux.intel.com> Date: Mon, 24 Jul 2017 11:59:22 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <87pocu3wts.fsf@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1052 Lines: 37 Hi Felipe, On 07/21/2017 06:31 PM, Felipe Balbi wrote: > Hi, > > Lu Baolu writes: >> +static void xhci_dbc_stop(struct xhci_hcd *xhci) >> +{ >> + struct xhci_dbc *dbc = xhci->dbc; >> + >> + WARN_ON(!dbc); >> + >> + cancel_delayed_work_sync(&dbc->event_work); >> + >> + if (dbc->gs_port_num != GSPORT_INVAL) { >> + gserial_disconnect(&dbc->gs_port); >> + gserial_free_line(dbc->gs_port_num); > why are you tying host stack to the gadget framework? XHCI debug capability is actually a debug device gadget. The hardware and firmware do everything of gadget work and leave the interface to xHCI for enabling/disabling and queuing transfer requests. u_serial.c provides a generic layer between a USB gadget and the TTY layer. I used it to avoid duplicating code. > > With this, you're forcing every single PC in the world to compile the > gadget framework, that's a bit much don't you think? > Yes, you are right. Is it acceptable if I move u_serial.c from the current place to drivers/usb/common? Best regards, Lu Baolu