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] [day] [month] [year] [list]
Date:   Wed, 31 Jul 2019 03:49:39 +0000
From:   Pawel Laszczak <pawell@...ence.com>
To:     Felipe Balbi <felipe.balbi@...ux.intel.com>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.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>,
        Jayshri Dajiram Pawar <jpawar@...ence.com>,
        Rahul Kumar <kurahul@...ence.com>,
        Anil Joy Varughese <aniljoy@...ence.com>
Subject: RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and
 usb_dr_mode_to_string.

Hi Felipe,

What about this patch. I just noticed that prefix is incorrect "1/3". Can it stay or should I send it again ?

Cheers,
Pawel 

>>>Pawel Laszczak <pawell@...ence.com> writes:
>>>>>> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
>>>>>> index 69f1b6328532..c156817672c4 100644
>>>>>> --- a/include/linux/usb/otg.h
>>>>>> +++ b/include/linux/usb/otg.h
>>>>>> @@ -129,4 +129,20 @@ enum usb_dr_mode {
>>>>>>   */
>>>>>>  extern enum usb_dr_mode usb_get_dr_mode(struct device *dev);
>>>>>>
>>>>>> +/**
>>>>>> + * usb_get_dr_mode_from_string - Convert string to dual role mode.
>>>>>> + * @str: Pointer to the given string
>>>>>> + *
>>>>>> + * The function gets string and returns the correspondig enum usb_dr_mode.
>>>>>> + */
>>>>>> +extern enum usb_dr_mode usb_get_dr_mode_from_string(const char *str);
>>>>>> +
>>>>>> +/**
>>>>>> + * usb_dr_mode_to_string - Convert dual role mode to string.
>>>>>> + * @dr_mode: Pointer to the given dual role mode
>>>>>> + *
>>>>>> + * The function gets enum usb_dr_mode, and returns the correspondig string.
>>>>>> + */
>>>>>> +extern const char *usb_dr_mode_to_string(const enum usb_dr_mode dr_mode);
>>>>>> +
>>>>>>  #endif /* __LINUX_USB_OTG_H */
>>>>>
>>>>>Still missing the stubs I mentioned. Did you try compiling with and
>>>>>without common enabled?
>>>>>
>>>> Sorry, I thought that I send answer yesterday but it's look like I prepared the answer but
>>>> I  forgot to send.
>>>>
>>>> In /drivers/usb/Kconfig we have:
>>>>
>>>> config USB
>>>> 	tristate "Support for Host-side USB"
>>>> 	depends on USB_ARCH_HAS_HCD
>>>> 	select USB_COMMON
>>>>
>>>> and in /drivers/usb/gadget/Kconfig we have:
>>>>
>>>> menuconfig USB_GADGET
>>>> 	tristate "USB Gadget Support"
>>>> 	select USB_COMMON
>>>>
>>>> I think that it should cover all cases.
>>>>
>>>> Am I right ?
>>>
>>>Run a few tens of randconfig builds and see if you ever catch any
>>>problem. I think randconfig can produce a defconfig where USB=n
>>>USB_GADGET=n and USB_COMMON=y.
>>
>>Ok, I will test it, but I think that it should work.
>>The same situation we have for example with: usb_otg_state_string or usb_ep_type_string.
>>
>
>I've been testing it with USB=n USB_GADGET=n and USB_COMMON=y and also only with CONFIG_USB_COMMON=y.
>Also I've tested this patch with different default configuration together with CDNS3 driver which use these functions.
>I've test It mainly with x86 and arm architecture.
>So far I've not found any issue.
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ