usb device implemented with functionfs - must app run as root?

2017-12-05 Thread andy_purcell
I have implemented a USB device using functionfs. A colleague now says our app must run as a normal user, not as root. I tried it and it does not work. The problem is this - the endpoint files created by the OS are owned by root. These ep files are created after I write the descriptors and

[PATCH 2/2] usbip: Use common error handling code in stub_recv_cmd_submit()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 22:40:30 +0100 Add a jump target so that a bit of exception handling can be better reused at the end of this function. Signed-off-by: Markus Elfring --- drivers/usb/usbip/stub_rx.c | 22

[PATCH 0/2] usbip: Adjustments for two function implementations

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 22:44:55 +0100 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in two functions Use common error handling

[PATCH 1/2] usbip: Delete an error message for a failed memory allocation in two functions

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 22:25:38 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 4/4] uwb/i1480/dfu/usb: Delete two error messages for a failed memory allocation in i1480_usb_probe()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 21:07:47 +0100 Omit extra messages for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 3/4] uwb/i1480/dfu/mac: Delete an error message for a failed memory allocation in fw_hdrs_load()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 21:00:03 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 2/4] uwb: Delete an error message for a failed memory allocation in whcrc_probe()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 20:43:31 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 1/4] uwb: Delete an error message for a failed memory allocation in hwarc_probe()

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 20:30:50 +0100 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 0/4] UWB: Adjustments for four function implementations

2017-12-05 Thread SF Markus Elfring
From: Markus Elfring Date: Tue, 5 Dec 2017 21:17:55 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Delete an error message for a failed memory allocation in hwarc_probe() Delete an error message for

[PATCH] tools/usbip: fixes build with musl libc toolchain

2017-12-05 Thread julien . boibessot
From: Julien BOIBESSOT Indeed musl doesn't define old SIGCLD signal name but only new one SIGCHLD. SIGCHLD is the new POSIX name for that signal so it doesn't change anything on other libcs. This fixes this kind of build error: usbipd.c: In function ‘set_signal’:

Re: [PATCH] xhci: Fix front USB ports on ASUS PRIME B350M-A

2017-12-05 Thread Bjorn Helgaas
[+cc Rafael, linux-pm] On Wed, Dec 06, 2017 at 12:22:42AM +0800, Kai-Heng Feng wrote: > The board in question has three XHCI HCs: > 02:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] USB 3.1 > XHCI Controller [1022:43bb] (rev 02) > 04:00.0 USB controller [0c03]: ASMedia Technology

Re: [PATCH v1 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:23PM +, Michael Drake wrote: > This adds a new way of dumping descriptors, which splits the knowledge > of how to interpret descriptor data from the actual dumping. This has > two advantages: > > 1. It is easy to add support for new descriptors, since they are

Re: [PATCH v1 8/8] lsusb: Dump USB3 BOS Configuration Summary Descriptor.

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:31PM +, Michael Drake wrote: > --- > lsusb.c | 6 ++ > 1 file changed, 6 insertions(+) And here. > > diff --git a/lsusb.c b/lsusb.c > index c9d0d74..ddc19e0 100644 > --- a/lsusb.c > +++ b/lsusb.c > @@ -75,6 +75,7 @@ > #define USB_DC_PLATFORM

Re: [PATCH v1 7/8] lsusb: Add descriptor definition for USB3 BOS Configuration Summary.

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:30PM +, Michael Drake wrote: > --- > desc-defs.c | 16 > desc-defs.h | 3 +++ > 2 files changed, 19 insertions(+) Same here, some text please. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

Re: [PATCH v1 6/8] lsusb: Add initial support for UAC3.

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:29PM +, Michael Drake wrote: > --- > lsusb.c | 52 ++-- > 1 file changed, 34 insertions(+), 18 deletions(-) Again, some changelog text please. -- To unsubscribe from this list: send the line "unsubscribe linux-usb"

Re: [PATCH v1 5/8] lsusb: Add descriptor definitions for UAC3.

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:28PM +, Michael Drake wrote: > --- > desc-defs.c | 277 > > desc-defs.h | 3 + > desc-dump.c | 5 ++ > 3 files changed, 270 insertions(+), 15 deletions(-) We need some kind of changelog text here

Re: [PATCH v1 4/8] lsusb: Switch to descriptor-definition based dump for UAC1 and UAC2.

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:27PM +, Michael Drake wrote: > This gives us more consistency in handling of incorrect descriptor > buffer lengths, and improves whitespace/alignment consistency. > --- > Makefile.am | 2 + > lsusb.c | 779 >

Re: [PATCH v1 3/8] lsusb: Add code to dump descriptor data using descriptor definition.

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:26PM +, Michael Drake wrote: > This adds a new way of dumping descriptors. It takes the descriptor > data to be dumped, and a descriptor definition as input. > > The descriptor definition takes the form of a NULL terminated array > of descriptor field

Re: [PATCH v1 2/8] lsusb: Add declarative definitions for UAC1 and UAC2 descriptors.

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:25PM +, Michael Drake wrote: > These descriptor definitions descibe how raw descriptor data > should be interpreted. > --- > desc-defs.c | 647 > > desc-defs.h | 153 ++ > 2 files changed,

Re: [PATCH v1 1/8] lsusb: Split subtype mapping out of AudioControl interface handling.

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 04:14:24PM +, Michael Drake wrote: > UAC1 and UAC2 have different different meanings for the same subtype > value. This splits the subtype mapping out. > --- Minor nit, can you sign-off on your patches like kernel patches have? That way I know you are contributing

[PATCH] xhci: Fix front USB ports on ASUS PRIME B350M-A

2017-12-05 Thread Kai-Heng Feng
The board in question has three XHCI HCs: 02:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] USB 3.1 XHCI Controller [1022:43bb] (rev 02) 04:00.0 USB controller [0c03]: ASMedia Technology Inc. Device [1b21:1343] 0a:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] USB3

Re: [PATCH v3 1/2] usb: dwc2: host: Don't retry NAKed transactions right away

2017-12-05 Thread Stefan Wahren
Hi Felipe, Hi John, Am 30.10.2017 um 18:08 schrieb Douglas Anderson: On rk3288-veyron devices on Chrome OS it was found that plugging in an Arduino-based USB device could cause the system to lockup, especially if the CPU Frequency was at one of the slower operating points (like 100 MHz / 200

[PATCH v1 5/8] lsusb: Add descriptor definitions for UAC3.

2017-12-05 Thread Michael Drake
--- desc-defs.c | 277 desc-defs.h | 3 + desc-dump.c | 5 ++ 3 files changed, 270 insertions(+), 15 deletions(-) diff --git a/desc-defs.c b/desc-defs.c index 6bc558e..3b5ea1e 100644 --- a/desc-defs.c +++ b/desc-defs.c @@ -61,6

[PATCH v1 2/8] lsusb: Add declarative definitions for UAC1 and UAC2 descriptors.

2017-12-05 Thread Michael Drake
These descriptor definitions descibe how raw descriptor data should be interpreted. --- desc-defs.c | 647 desc-defs.h | 153 ++ 2 files changed, 800 insertions(+) create mode 100644 desc-defs.c create mode 100644

[PATCH v1 6/8] lsusb: Add initial support for UAC3.

2017-12-05 Thread Michael Drake
--- lsusb.c | 52 ++-- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/lsusb.c b/lsusb.c index ac6e061..c9d0d74 100644 --- a/lsusb.c +++ b/lsusb.c @@ -106,6 +106,11 @@ #define USB_AUDIO_CLASS_2 0x20 #endif +/* USB

[PATCH v1 7/8] lsusb: Add descriptor definition for USB3 BOS Configuration Summary.

2017-12-05 Thread Michael Drake
--- desc-defs.c | 16 desc-defs.h | 3 +++ 2 files changed, 19 insertions(+) diff --git a/desc-defs.c b/desc-defs.c index 3b5ea1e..885e3fa 100644 --- a/desc-defs.c +++ b/desc-defs.c @@ -892,3 +892,19 @@ const struct desc * const desc_audio_as_isochronous_audio_data_endpoint[3]

[PATCH v1 3/8] lsusb: Add code to dump descriptor data using descriptor definition.

2017-12-05 Thread Michael Drake
This adds a new way of dumping descriptors. It takes the descriptor data to be dumped, and a descriptor definition as input. The descriptor definition takes the form of a NULL terminated array of descriptor field definitions. These definitions describe how the raw descriptor data buffer should

[PATCH v1 0/8] lsusb: Add initial support for USB Audio Class 3

2017-12-05 Thread Michael Drake
This adds a new way of dumping descriptors, which splits the knowledge of how to interpret descriptor data from the actual dumping. This has two advantages: 1. It is easy to add support for new descriptors, since they are now simple definitions that resemble the tables in the USB

[PATCH v1 1/8] lsusb: Split subtype mapping out of AudioControl interface handling.

2017-12-05 Thread Michael Drake
UAC1 and UAC2 have different different meanings for the same subtype value. This splits the subtype mapping out. --- lsusb.c | 100 ++-- 1 file changed, 79 insertions(+), 21 deletions(-) diff --git a/lsusb.c b/lsusb.c index

[PATCH v1 4/8] lsusb: Switch to descriptor-definition based dump for UAC1 and UAC2.

2017-12-05 Thread Michael Drake
This gives us more consistency in handling of incorrect descriptor buffer lengths, and improves whitespace/alignment consistency. --- Makefile.am | 2 + lsusb.c | 779 +--- 2 files changed, 63 insertions(+), 718 deletions(-) diff

[PATCH v1 8/8] lsusb: Dump USB3 BOS Configuration Summary Descriptor.

2017-12-05 Thread Michael Drake
--- lsusb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lsusb.c b/lsusb.c index c9d0d74..ddc19e0 100644 --- a/lsusb.c +++ b/lsusb.c @@ -75,6 +75,7 @@ #define USB_DC_PLATFORM0x05 #define USB_DC_SUPERSPEEDPLUS 0x0a #define USB_DC_BILLBOARD

Re: [debian bug:883345] vhci-hcd: kernel oops when attaching a mass storage on client side of usbip

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 10:17:08AM +0200, borissh1...@gmail.com wrote: > On Tuesday, 5 December 2017 9:39:33 IST Greg KH wrote: > > On Mon, Dec 04, 2017 at 10:05:45PM +0200, borissh1...@gmail.com wrote: > > > Hi , > > > > > > vhci-hcd kernel oops when attaching a mass storage on 4.13.13. > > > >

Re: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-12-05 Thread Ulf Hansson
On 5 December 2017 at 04:23, Yoshihiro Shimoda wrote: > Hi, > >> From: Ulf Hansson, Sent: Monday, December 4, 2017 7:41 PM >> >> On 1 December 2017 at 12:03, Yoshihiro Shimoda >> wrote: > >> > Sure! I tested your patch, and

[GIT PULL] USB driver fixes for 4.15-rc3

2017-12-05 Thread Greg KH
The following changes since commit 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323: Linux 4.15-rc1 (2017-11-26 16:01:47 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-4.15-rc3 for you to fetch changes up to

Re: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-12-05 Thread Rafael J. Wysocki
On Tue, Dec 5, 2017 at 4:03 PM, Alan Stern wrote: > On Tue, 5 Dec 2017, Yoshihiro Shimoda wrote: > >> Hi, >> >> > From: Ulf Hansson, Sent: Monday, December 4, 2017 7:41 PM >> > >> > On 1 December 2017 at 12:03, Yoshihiro Shimoda >> >

[PATCH] tools/usbip: fixes potential (minor) "buffer overflow" (detected on recent gcc with -Werror)

2017-12-05 Thread julien . boibessot
From: Julien BOIBESSOT Fixes following build error: vhci_driver.c: In function 'refresh_imported_device_list': vhci_driver.c:118:37: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=] snprintf(status,

RE: [PATCH] PM / runtime: Drop children check from __pm_runtime_set_status()

2017-12-05 Thread Alan Stern
On Tue, 5 Dec 2017, Yoshihiro Shimoda wrote: > Hi, > > > From: Ulf Hansson, Sent: Monday, December 4, 2017 7:41 PM > > > > On 1 December 2017 at 12:03, Yoshihiro Shimoda > > wrote: > > > > Sure! I tested your patch, and then the following message disappeared!

Re: [RFC PATCH 0/2] usb: typec: alternate mode bus

2017-12-05 Thread Hans de Goede
Hi, On 01-12-17 09:38, Heikki Krogerus wrote: Hi, Thanks for taking a look at this.. On Sun, Nov 26, 2017 at 12:23:31PM +0100, Hans de Goede wrote: Hi Heiko, On 28-09-17 13:35, Heikki Krogerus wrote: Hi guys, The bus allows SVID specific communication with the partners to be handled in

[PATCH] usb: musb: da8xx: fix babble condition handling

2017-12-05 Thread Bin Liu
When babble condition happens, the musb controller might automatically turns off VBUS. On DA8xx platform, the controller generates drvvbus interrupt for turning off VBUS along with the babble interrupt. In this case, we should handle the babble interrupt first and recover from the babble

[PATCH] musb-fixes for v4.15-rc3

2017-12-05 Thread Bin Liu
Hi Greg, Here is only one musb patch for the next v4.15 -rc, which fixes the babble condition handling for DA8xx. Please let me know if any change is needed. Thanks, -Bin. --- Bin Liu (1): usb: musb: da8xx: fix babble condition handling drivers/usb/musb/da8xx.c | 10 +- 1 file

Re: Rectifying: xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 01:38:02PM +0100, Luca Osvaldo Mastromatteo wrote: > Hi, I've reported some problems I'm having with this driver to the > linux kernel bugzilla and they gave me this mail, so I'm copying and > paste the issue I wrote in there. Thanks > > 'I've recently bought an USB 3.0

Re: [PATCH 21/45] usb: typec: remove duplicate includes

2017-12-05 Thread Guenter Roeck
On 12/04/2017 06:04 PM, Pravin Shedge wrote: These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge Reviewed-by: Guenter Roeck

Re: [PATCH v3 07/16] phy: qcom-qusb2: Add support for different register layouts

2017-12-05 Thread Vivek Gautam
On 11/21/2017 02:53 PM, Manu Gautam wrote: New version of QUSB2 PHY has some registers offset changed. Add support to have register layout for a target and update the same in phy_configuration. Signed-off-by: Manu Gautam --- drivers/phy/qualcomm/phy-qcom-qusb2.c |

Re: [PATCH v9] xhci : AMD Promontory USB disable port support

2017-12-05 Thread Greg KH
On Tue, Dec 05, 2017 at 05:20:56PM +0800, Joe Lee wrote: > Dear Greg: > I am sorry if this has caused you any inconvenience. > I can't understand what is a good line-wrapping. > Can you check the line-wrapping for me? > > > For AMD Promontory xHCI host, > > although you can disable USB 2.0 ports

Re: Several issues on AMD Promontory [1022:43bb]

2017-12-05 Thread Kai Heng Feng
> On 5 Dec 2017, at 4:52 PM, Joe Lee wrote: > > Hi Kai-Hen, > I want to know what this kernel version? v4.15-rc2. The issue happens on all kernel version though. > > >All three issue can still be reproduced with or without your patch, > >"[PATCH v8] xhci : AMD

Re: [PATCH v4] usb: xhci: allow imod-interval to be configurable

2017-12-05 Thread Mathias Nyman
On 05.12.2017 04:54, Adam Wallis wrote: On 12/4/2017 9:15 PM, Chunfeng Yun wrote: On Mon, 2017-12-04 at 09:27 -0500, Adam Wallis wrote: The xHCI driver currently has the IMOD set to 160, which translates to an IMOD interval of 40,000ns (160 * 250)ns Commit 0cbd4b34cda9 ("xhci: mediatek:

Re: [debian bug:883345] vhci-hcd: kernel oops when attaching a mass storage on client side of usbip

2017-12-05 Thread borissh1983
On Tuesday, 5 December 2017 9:39:33 IST Greg KH wrote: > On Mon, Dec 04, 2017 at 10:05:45PM +0200, borissh1...@gmail.com wrote: > > Hi , > > > > vhci-hcd kernel oops when attaching a mass storage on 4.13.13. > > > > When I try to attach a mass storage device to a vhci-hcd, it generates an > >

<    1   2