lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Feb 2019 06:28:59 +0000
From:   Pawel Laszczak <pawell@...ence.com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "felipe.balbi@...ux.intel.com" <felipe.balbi@...ux.intel.com>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "hdegoede@...hat.com" <hdegoede@...hat.com>,
        "heikki.krogerus@...ux.intel.com" <heikki.krogerus@...ux.intel.com>,
        "andy.shevchenko@...il.com" <andy.shevchenko@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "rogerq@...com" <rogerq@...com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jbergsagel@...com" <jbergsagel@...com>,
        "nsekhar@...com" <nsekhar@...com>, "nm@...com" <nm@...com>,
        Suresh Punnoose <sureshp@...ence.com>,
        "peter.chen@....com" <peter.chen@....com>,
        Rahul Kumar <kurahul@...ence.com>
Subject: RE: [PATCH v4 2/6] usb:common Separated decoding functions from dwc3
 driver.

Hi,

>On Thu, Feb 14, 2019 at 07:45:10PM +0000, Pawel Laszczak wrote:
>> Patch moves some decoding functions from driver/usb/dwc3/debug.h driver
>> to driver/usb/common/debug.c file. These moved functions include:
>>     dwc3_decode_get_status
>>     dwc3_decode_set_clear_feature
>>     dwc3_decode_set_address
>>     dwc3_decode_get_set_descriptor
>>     dwc3_decode_get_configuration
>>     dwc3_decode_set_configuration
>>     dwc3_decode_get_intf
>>     dwc3_decode_set_intf
>>     dwc3_decode_synch_frame
>>     dwc3_decode_set_sel
>>     dwc3_decode_set_isoch_delay
>>     dwc3_decode_ctrl
>>
>> These functions are used also in inroduced cdns3 driver.
>>
>> All functions prefixes were changed from dwc3 to usb.
>> Also, function's parameters has been extended according to the name
>> of fields in standard SETUP packet.
>> Additionally, patch adds usb_decode_ctrl function to
>> include/linux/usb/ch9.h file.
>>
>> Signed-off-by: Pawel Laszczak <pawell@...ence.com>
>> ---
>>  drivers/usb/common/Makefile |   2 +-
>>  drivers/usb/common/debug.c  | 270 ++++++++++++++++++++++++++++++++++++
>>  drivers/usb/dwc3/debug.h    | 249 ---------------------------------
>>  drivers/usb/dwc3/trace.h    |   2 +-
>>  include/linux/usb/ch9.h     |  25 ++++
>>  5 files changed, 297 insertions(+), 251 deletions(-)
>>  create mode 100644 drivers/usb/common/debug.c
>>
>> diff --git a/drivers/usb/common/Makefile b/drivers/usb/common/Makefile
>> index fb4d5ef4165c..3d3d2962ea4b 100644
>> --- a/drivers/usb/common/Makefile
>> +++ b/drivers/usb/common/Makefile
>> @@ -4,7 +4,7 @@
>>  #
>>
>>  obj-$(CONFIG_USB_COMMON)	  += usb-common.o
>> -usb-common-y			  += common.o
>> +usb-common-y			  += common.o debug.o
>
>It's nice to have these in a common place, but you just bloated all of
>the USB-enabled systems in the world for the use of 2 odd-ball system
>controllers that almost no one has :)
>
>So, any way to only pull in this file if you actually need these
>functions?
>
Yes, I'm using these functions a lot for debugging. It's only way to check what driver does.
We are also going to upstreaming 3.1 controller so there will be a third driver using them :). 
  
I'm not sure If anyone will use them on host side, so we can consider whether they should be
in usb/common directory. Maybe usb/gadget will be better place. 

Felipe, do you have any comments in this topic?   

Thanks 
Pawel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ