Re: USB gadget : generic functionfs function has no os_desc while rndis function has, why?

2018-02-06 Thread Jun Sun
Thanks, Krysztof. I'm trying to follow your example and maybe to massage it into my need. One quick question - In your example, you set vendor code to be 0xBC. Is this code of any significance? What values should I use? b_vendor_code = 0xBC, Jun On Thu, Jan 4, 2018 at 8:22 AM, Krzysztof

usb: uas : working uas devices ?

2018-02-06 Thread Tushar Nimkar
Can anyone help me in selecting UASP/UAS device ? Any link/ model no. will be helpful. I could see unusual_uas.h has many devices which are not behaving well so don't want to take risk in selecting. Other then Trancend SSDs because I have that. Want to check on other disks. -- Best Regards,

Re: [PATCH 2/2] usb: chipidea: imx: Fix ULPI on imx53

2018-02-06 Thread Peter Chen
On Tue, Feb 06, 2018 at 04:50:41PM +0100, Sebastian Reichel wrote: > Hi Peter, > > On Mon, Jan 29, 2018 at 11:33:15AM +0800, Peter Chen wrote: > > On Wed, Jan 24, 2018 at 06:14:39PM +0100, Sebastian Reichel wrote: > > > Traditionally, PORTSC should be set before initializing ULPI phys. But > > >

Re: Problem with xhci_hcd on Gigabyte Z170X Gaming 7-EK

2018-02-06 Thread Herbert Poetzl
On Tue, Feb 06, 2018 at 07:54:53PM +0100, Herbert Poetzl wrote: > On Tue, Feb 06, 2018 at 07:38:42PM +0200, Mathias Nyman wrote: >> On 01.02.2018 02:43, Herbert Poetzl wrote: >>> On Wed, Jan 31, 2018 at 04:58:58PM +0200, Mathias Nyman wrote: On 30.01.2018 08:06, Herbert Poetzl wrote: > On

Re: [WebUSB - USB gadget] Prevent CDC-ACM from loading serial interface

2018-02-06 Thread Greg KH
On Wed, Feb 07, 2018 at 12:05:04AM +0100, Alberto Esposito wrote: > Thank you Greg for your reply :) it's such an honor to speak with you :) > > > You could, but then you would not be a cdc-acm device, right? > > that would not be a problem. I just need to send and receive data > between my usb

Re: [WebUSB - USB gadget] Prevent CDC-ACM from loading serial interface

2018-02-06 Thread Alberto Esposito
Thank you Greg for your reply :) it's such an honor to speak with you :) > You could, but then you would not be a cdc-acm device, right? that would not be a problem. I just need to send and receive data between my usb gadget and chrome. >Why not just disconnect the driver from the device when

Re: [WebUSB - USB gadget] Prevent CDC-ACM from loading serial interface

2018-02-06 Thread Greg KH
On Tue, Feb 06, 2018 at 11:31:40PM +0100, Alberto Esposito wrote: > Hello everybody! > > I'm trying to connect to a serial interface created with usb gadget > driver via WebUSB. > > I was successful in setting up the serial interface, but WebUSB > refuses to work because it can't claim the

[WebUSB - USB gadget] Prevent CDC-ACM from loading serial interface

2018-02-06 Thread Alberto Esposito
Hello everybody! I'm trying to connect to a serial interface created with usb gadget driver via WebUSB. I was successful in setting up the serial interface, but WebUSB refuses to work because it can't claim the interface, since it's busy. The culprit is the cdc-acm driver, which correctly see

[BUG] uas: regression preventing some drives from being used

2018-02-06 Thread Cyril Roelandt
Hi, I use two hard drives in an enclosure connected to my PC using UAS. The enclosure is a JMicron JMS56x (152d:0562); the drives are a Fujitsu MHZ2160BH G2 (2"5, 160GB) and a Western Digital EFRX-68N32N0 (3"5, 4TB). Using a USB2 port, I can see both drives as expected. I used to be able to use

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-06 Thread Andreas Kemnade
Hi, On Tue, 6 Feb 2018 10:47:25 -0800 Tony Lindgren wrote: > * Andreas Kemnade [180127 08:34]: > > On dm3730 there are enumeration problems after resume. > > Investigation led to the cause that the MUSB_POWER_SOFTCONN > > bit is not set. If it was set

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-06 Thread Andreas Kemnade
Hi, On Tue, 6 Feb 2018 12:46:05 -0600 Bin Liu wrote: > Hi, > > On Sat, Jan 27, 2018 at 09:34:03AM +0100, Andreas Kemnade wrote: > > On dm3730 there are enumeration problems after resume. > > Investigation led to the cause that the MUSB_POWER_SOFTCONN > > bit is not set. If it was

Re: Problem with xhci_hcd on Gigabyte Z170X Gaming 7-EK

2018-02-06 Thread Herbert Poetzl
On Tue, Feb 06, 2018 at 07:38:42PM +0200, Mathias Nyman wrote: > On 01.02.2018 02:43, Herbert Poetzl wrote: >> On Wed, Jan 31, 2018 at 04:58:58PM +0200, Mathias Nyman wrote: >>> On 30.01.2018 08:06, Herbert Poetzl wrote: On Mon, Jan 29, 2018 at 02:26:52PM +0200, Mathias Nyman wrote: > On

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-06 Thread Tony Lindgren
* Andreas Kemnade [180127 08:34]: > On dm3730 there are enumeration problems after resume. > Investigation led to the cause that the MUSB_POWER_SOFTCONN > bit is not set. If it was set before suspend (because it > was enabled via musb_pullup()), it is set in >

Re: [PATCH] usb: musb: fix enumeration after resume

2018-02-06 Thread Bin Liu
Hi, On Sat, Jan 27, 2018 at 09:34:03AM +0100, Andreas Kemnade wrote: > On dm3730 there are enumeration problems after resume. > Investigation led to the cause that the MUSB_POWER_SOFTCONN > bit is not set. If it was set before suspend (because it > was enabled via musb_pullup()), it is set in >

Re: power management problems in ehci-omap

2018-02-06 Thread Andreas Kemnade
On Tue, 6 Feb 2018 10:16:23 -0800 Tony Lindgren wrote: > * Andreas Kemnade [180206 18:04]: > > On Tue, 6 Feb 2018 09:17:37 -0800 > > Tony Lindgren wrote: > > > uarts=$(find /sys/class/tty/tty[SO]*/power/ -type d 2>/dev/null) > > > for

Re: power management problems in ehci-omap

2018-02-06 Thread Tony Lindgren
* Andreas Kemnade [180206 18:04]: > On Tue, 6 Feb 2018 09:17:37 -0800 > Tony Lindgren wrote: > > uarts=$(find /sys/class/tty/tty[SO]*/power/ -type d 2>/dev/null) > > for uart in $uarts; do > > echo enabled > $uart/wakeup 2>&1 > > echo auto >

xhci_hcd: kernel 4.15.1 oops on suspend to ram

2018-02-06 Thread Jose Marino
I'm running archlinux on a Dell XPS15 9550 and I connect it to a TB16 thunderbolt dock. Connected to the dock I have a 4k external display and a USB logitech transmitter for my wireless keyboard and mouse. The module 'xhci_pci' is automatically unloaded/reloaded on suspend/resume to make the

Re: power management problems in ehci-omap

2018-02-06 Thread Andreas Kemnade
On Tue, 6 Feb 2018 09:17:37 -0800 Tony Lindgren wrote: > * Andreas Kemnade [180206 16:56]: > > On Tue, 6 Feb 2018 08:04:52 -0800 > > Tony Lindgren wrote: > > > > > * Andreas Kemnade [180206 06:42]: > > > >

Re: Problem with xhci_hcd on Gigabyte Z170X Gaming 7-EK

2018-02-06 Thread Mathias Nyman
On 01.02.2018 02:43, Herbert Poetzl wrote: On Wed, Jan 31, 2018 at 04:58:58PM +0200, Mathias Nyman wrote: On 30.01.2018 08:06, Herbert Poetzl wrote: On Mon, Jan 29, 2018 at 02:26:52PM +0200, Mathias Nyman wrote: On 20.01.2018 06:20, Herbert Poetzl wrote: I've recently acquired a Gigabyte

Re: [BUG] SD card reader disappears after suspend

2018-02-06 Thread Mathias Nyman
On 29.01.2018 16:24, Mathias Nyman wrote: On 25.01.2018 17:51, Alan Stern wrote: On Thu, 25 Jan 2018, Samuel Sadok wrote: 2018-01-23 17:31 GMT+01:00 Alan Stern : On Tue, 23 Jan 2018, Samuel Sadok wrote: Thanks Alan, While I was at it I also enabled debug logs

Re: power management problems in ehci-omap

2018-02-06 Thread Tony Lindgren
* Andreas Kemnade [180206 16:56]: > On Tue, 6 Feb 2018 08:04:52 -0800 > Tony Lindgren wrote: > > > * Andreas Kemnade [180206 06:42]: > > > rechecked with a board with really nothing connected there > > > Same behaviour > > > >

Re: power management problems in ehci-omap

2018-02-06 Thread Andreas Kemnade
On Tue, 6 Feb 2018 08:04:52 -0800 Tony Lindgren wrote: > * Andreas Kemnade [180206 06:42]: > > rechecked with a board with really nothing connected there > > Same behaviour > > I've just verified that my test board power consumption goes > back to

Re: power management problems in ehci-omap

2018-02-06 Thread Tony Lindgren
* Andreas Kemnade [180206 06:42]: > rechecked with a board with really nothing connected there > Same behaviour I've just verified that my test board power consumption goes back to normal after rmmod ehci-omap with v4.15. For ehci PM, it might be a bit easier to do

RE: [PATCH v4 6/7] typec: tcpm: Represent source supply through power_supply class

2018-02-06 Thread Adam Thomson
On 30 January 2018 13:12, Heikki Krogerus wrote: > Hi Adam, > > On Tue, Jan 02, 2018 at 03:50:54PM +, Adam Thomson wrote: > > This commit adds a power_supply class instance to represent a > > PD source's voltage and current properties. This provides an > > interface for reading these

Re: [PATCH 2/2] usb: chipidea: imx: Fix ULPI on imx53

2018-02-06 Thread Sebastian Reichel
Hi Peter, On Mon, Jan 29, 2018 at 11:33:15AM +0800, Peter Chen wrote: > On Wed, Jan 24, 2018 at 06:14:39PM +0100, Sebastian Reichel wrote: > > Traditionally, PORTSC should be set before initializing ULPI phys. But > > setting PORTSC before powering on the phy results in a kernel freeze > > on

Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Arnd Bergmann
On Tue, Feb 6, 2018 at 2:05 PM, Robin Murphy wrote: > > It looks like we have only one real arch (score) without IOMEM, and two > (s390 and tile) where it is possible to configure out, so it does seem like > a reasonable feature to assume. Maybe we could have something like

Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Arnd Bergmann
On Tue, Feb 6, 2018 at 11:14 AM, Geert Uytterhoeven wrote: > Hi all, > > If NO_DMA=y, get_dma_ops() returns a reference to the non-existing > symbol bad_dma_ops, thus causing a link failure if it is ever used. > > The intention of this is twofold: > 1. To catch

[PATCH] usb: dwc2: Fix interval type issue

2018-02-06 Thread Grigor Tovmasyan
The maximum value that unsigned char can hold is 255, meanwhile the maximum value of interval is 2^(bIntervalMax-1)=2^15. Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] usb: dwc2: Fix kernel doc's warnings.

2018-02-06 Thread Grigor Tovmasyan
Added descriptions for all not described parameters. Signed-off-by: Grigor Tovmasyan --- drivers/usb/dwc2/core.c | 7 +++ drivers/usb/dwc2/core.h | 131 ++- drivers/usb/dwc2/debug.h | 2 +-

Re: [PATCH v4 4/7] typec: tcpm: Add core support for sink side PPS

2018-02-06 Thread Heikki Krogerus
On Tue, Feb 06, 2018 at 02:33:08PM +, Adam Thomson wrote: > On 30 January 2018 12:47, Heikki Krogerus wrote: > > > > +static int tcpm_pps_set_op_curr(struct tcpm_port *port, u16 op_curr) > > > +{ > > > + unsigned int target_mw; > > > + int ret = 0; > > > + > > > + mutex_lock(>swap_lock); > >

RE: [PATCH v4 4/7] typec: tcpm: Add core support for sink side PPS

2018-02-06 Thread Adam Thomson
On 30 January 2018 12:47, Heikki Krogerus wrote: > > +static int tcpm_pps_set_op_curr(struct tcpm_port *port, u16 op_curr) > > +{ > > + unsigned int target_mw; > > + int ret = 0; > > + > > + mutex_lock(>swap_lock); > > + mutex_lock(>lock); > > + > > + if (!port->pps_data.active) { > > +

RE: [PATCH v4 1/7] typec: tcpm: Add PD Rev 3.0 definitions to PD header

2018-02-06 Thread Adam Thomson
On 30 January 2018 12:22, Heikki Krogerus wrote: > On Tue, Jan 02, 2018 at 03:50:49PM +, Adam Thomson wrote: > > This commit adds definitions for PD Rev 3.0 messages, including > > APDO PPS and extended message support for TCPM. > > > > Signed-off-by: Adam Thomson

Re: [PATCH] usb: gadget: f_fs: get the correct address of comp_desc

2018-02-06 Thread wlf
Hi Jack, 在 2018年02月06日 02:17, Jack Pham 写道: Hi William, On Mon, Feb 05, 2018 at 07:33:38PM +0800, William Wu wrote: Refer to the USB 3.0 spec '9.6.7 SuperSpeed Endpoint Companion', the companion descriptor follows the standard endpoint descriptor. This descriptor is only defined for

Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Robin Murphy
On 06/02/18 10:14, Geert Uytterhoeven wrote: Hi all, If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. The intention of this is twofold: 1. To catch users of the DMA API on systems that do no

Re: [PATCH/RFC 4/6] mm: Add NO_DMA dummies for DMA pool API

2018-02-06 Thread Robin Murphy
Hi Geert, On 06/02/18 10:14, Geert Uytterhoeven wrote: Add dummies for dma{,m}_pool_{create,destroy,alloc,free}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dma_pool_destroy" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR:

Re: [PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Mark Brown
On Tue, Feb 06, 2018 at 11:14:46AM +0100, Geert Uytterhoeven wrote: > The intention of this is twofold: > 1. To catch users of the DMA API on systems that do no support the DMA > mapping API, > 2. To avoid building drivers that cannot work on such systems anyway. > > However, the

Re: usb drivers in userspace

2018-02-06 Thread Felipe Balbi
Hi, Ran Shalit writes: > On Tue, Feb 6, 2018 at 1:35 PM, Felipe Balbi > wrote: >> >> Hi, >> >> Ran Shalit writes: >>> Hello, >>> >>> Is it possible to write a usb driver in userspace ? >>> I see that for

Re: usb drivers in userspace

2018-02-06 Thread Ran Shalit
On Tue, Feb 6, 2018 at 1:35 PM, Felipe Balbi wrote: > > Hi, > > Ran Shalit writes: >> Hello, >> >> Is it possible to write a usb driver in userspace ? >> I see that for peripheral/gadget, there is gadgetfs which can be used for >> that. >> >>

Re: usb drivers in userspace

2018-02-06 Thread Felipe Balbi
Hi, Ran Shalit writes: > Hello, > > Is it possible to write a usb driver in userspace ? > I see that for peripheral/gadget, there is gadgetfs which can be used for > that. > > What about host drivers ? > Can we use for example vfio (seems to be used with pci so I'm not >

usb drivers in userspace

2018-02-06 Thread Ran Shalit
Hello, Is it possible to write a usb driver in userspace ? I see that for peripheral/gadget, there is gadgetfs which can be used for that. What about host drivers ? Can we use for example vfio (seems to be used with pci so I'm not sure) ? Or is there another way ? Thank you, Ran -- To

Re: uas failing on multiple disk access on a jmicron JMS567 bridge

2018-02-06 Thread Menion
2018-02-06 11:18 GMT+01:00 Oliver Neukum : > Am Mittwoch, den 31.01.2018, 12:45 +0100 schrieb Menion: >> you can see that short while after the two HD are mounted I start to >> get any sort of USB command errors. > > Well, no, all errors are Write(10). Thus my question whether

Re: uas failing on multiple disk access on a jmicron JMS567 bridge

2018-02-06 Thread Oliver Neukum
Am Mittwoch, den 31.01.2018, 12:45 +0100 schrieb Menion: > you can see that short while after the two HD are mounted I start to > get any sort of USB command errors. Well, no, all errors are Write(10). Thus my question whether you can trigger it with any other command. Does it error out with

USB Gadget capabilities

2018-02-06 Thread Rogan Dawes
Hi folks, I'm trying to identify hardware which has both USB host and USB gadget capabilities. Unfortunately, in some cases, datasheets are unavailable, or unclear, claiming only USB host support. However, digging further, it turns out that USB gadget support is also present, if one uses a USB A

[PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Geert Uytterhoeven
Hi all, If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. The intention of this is twofold: 1. To catch users of the DMA API on systems that do no support the DMA mapping API, 2. To avoid

[PATCH/RFC 2/6] dma-coherent: Add NO_DMA dummies for managed DMA API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for dmam_{alloc,free}_coherent(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dmam_alloc_coherent" [drivers/net/ethernet/arc/arc_emac.ko] undefined! ERROR: "dmam_free_coherent"

[PATCH/RFC 6/6] Treewide: Remove depends on HAS_DMA in case of platform dependency

2018-02-06 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH/RFC 4/6] mm: Add NO_DMA dummies for DMA pool API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for dma{,m}_pool_{create,destroy,alloc,free}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "dma_pool_destroy" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR: "dma_pool_free" [drivers/usb/mtu3/mtu3.ko] undefined! ERROR:

[PATCH/RFC 1/6] dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy

2018-02-06 Thread Geert Uytterhoeven
If NO_DMA=y, get_dma_ops() returns a reference to the non-existing symbol bad_dma_ops, thus causing a link failure if it is ever used. Make get_dma_ops() return NULL instead, to avoid the link failure. This allows to improve compile-testing, and limits the need to keep on sprinkling dependencies

[PATCH/RFC 5/6] scsi: Add NO_DMA dummies for SCSI DMA mapping API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for scsi_dma_{,un}map(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "scsi_dma_unmap" [drivers/firewire/firewire-sbp2.ko] undefined! ERROR: "scsi_dma_map" [drivers/firewire/firewire-sbp2.ko] undefined! Signed-off-by: Geert

[PATCH/RFC 3/6] usb: gadget: Add NO_DMA dummies for DMA mapping API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for usb_gadget_{,un}map_request{,_by_dev}(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "usb_gadget_unmap_request_by_dev" [drivers/usb/renesas_usbhs/renesas_usbhs.ko] undefined! ERROR: "usb_gadget_map_request_by_dev"

Re: usb: uas: device reset most the time while enumeration- usb3.0

2018-02-06 Thread Oliver Neukum
Am Montag, den 05.02.2018, 23:46 +0530 schrieb Tushar Nimkar: > Greg, > > I have cherry-picked 9 patches as follows. Those won't do you any good. Please test a) with 4.14 or 4.15 b) test on another host And tell me what read_capacity_16() does at USB2.0 speeds We need to determine whether

Re: [PATCH] usb: gadget: udc: change comparison to bitshift when dealing with a mask

2018-02-06 Thread Wolfram Sang
On Tue, Feb 06, 2018 at 09:50:40AM +0100, Wolfram Sang wrote: > Due to a typo, the mask was destroyed by a comparison instead of a bit > shift. > > Reported-by: Geert Uytterhoeven > Signed-off-by: Wolfram Sang > --- > Only build tested.

[PATCH] usb: gadget: udc: change comparison to bitshift when dealing with a mask

2018-02-06 Thread Wolfram Sang
Due to a typo, the mask was destroyed by a comparison instead of a bit shift. Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang --- Only build tested. drivers/usb/gadget/udc/goku_udc.h | 2 +- 1 file changed, 1 insertion(+),