From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756553AbbJ2BWG (ORCPT ); Wed, 28 Oct 2015 21:22:06 -0400 Received: from mga14.intel.com ([192.55.52.115]:3974 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbbJ2BWE (ORCPT ); Wed, 28 Oct 2015 21:22:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,212,1444719600"; d="scan'208";a="821898842" Subject: Re: [PATCH 01/12] usb: xhci: expose xhci extended capabilities via debugfs To: Greg Kroah-Hartman References: <1446019243-5565-1-git-send-email-baolu.lu@linux.intel.com> <1446019243-5565-2-git-send-email-baolu.lu@linux.intel.com> <20151028124017.GB6856@kroah.com> Cc: Mathias Nyman , Alan Stern , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: "Lu, Baolu" Message-ID: <563174BA.9010307@linux.intel.com> Date: Thu, 29 Oct 2015 09:22:02 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151028124017.GB6856@kroah.com> 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 10/28/2015 08:40 PM, Greg Kroah-Hartman wrote: >> >+struct debug_buffer { >> >+ ssize_t (*fill_func)(struct debug_buffer *); >> >+ struct usb_bus *bus; >> >+ struct mutex mutex; >> >+ size_t count; >> >+ char *output_buf; >> >+ size_t alloc_size; >> >+}; >> >+ >> >+static const char *get_extcap_desc(u32 cap_id) >> >+{ >> >+ switch (cap_id) { >> >+ case XHCI_EXT_CAPS_LEGACY: >> >+ return "USB Legacy Support"; >> >+ case XHCI_EXT_CAPS_PROTOCOL: >> >+ return "Supported Protocol"; >> >+ case XHCI_EXT_CAPS_PM: >> >+ return "Extended Power Management"; >> >+ case XHCI_EXT_CAPS_VIRT: >> >+ return "I/O Virtualization (xHCI-IOV)"; >> >+ case XHCI_EXT_CAPS_ROUTE: >> >+ return "Message Interrupt"; >> >+ case XHCI_EXT_CAPS_LOCALMEM: >> >+ return "Local Memory"; >> >+ case XHCI_EXT_CAPS_DEBUG: >> >+ return "USB Debug Capability"; > This is a lot more stuff than just debug port, it should be in sysfs > as individual files, not one big one that you somehow have to parse in > order to determine this information. > I will move it into sysfs in v2. Thanks, Baolu